1
0
mirror of https://github.com/bitwarden/web synced 2025-12-06 00:03:28 +00:00
Files
web/app/main.6a0d3942239a08208ced.js
github-actions[bot] 8cb18488fd Staging deploy 2.26.1 (#1472)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2022-02-11 01:49:11 -08:00

2 lines
2.8 MiB
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(()=>{var e,t={50060:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppRoutingModule=void 0;const r=n(68012),o=n(32621),a=(n(68012),[{path:"providers",loadChildren:()=>i(void 0,void 0,void 0,(function*(){return(yield Promise.resolve().then((()=>n(69169)))).ProvidersModule}))}]);class s{}t.AppRoutingModule=s,s.ɵfac=function(e){return new(e||s)},s.ɵmod=o.ɵɵdefineNgModule({type:s}),s.ɵinj=o.ɵɵdefineInjector({imports:[[r.RouterModule.forChild(a)],r.RouterModule]})},34669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppComponent=void 0;const i=n(58939),r=n(42230),o=n(53027),a=n(32621),s=n(68012);class l extends i.AppComponent{ngOnInit(){super.ngOnInit(),this.policyListService.addPolicies([new o.MaximumVaultTimeoutPolicy,new r.DisablePersonalVaultExportPolicy])}}t.AppComponent=l,l.ɵfac=function(){let e;return function(t){return(e||(e=a.ɵɵgetInheritedFactory(l)))(t||l)}}(),l.ɵcmp=a.ɵɵdefineComponent({type:l,selectors:[["app-root"]],features:[a.ɵɵInheritDefinitionFeature],decls:2,vars:0,template:function(e,t){1&e&&(a.ɵɵelement(0,"router-outlet"),a.ɵɵtext(1,"\n"))},directives:[s.RouterOutlet],encapsulation:2})},10379:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppModule=void 0;const i=n(83072),r=n(96832),o=n(3435),a=n(68012),s=n(37407),l=n(45331),c=n(50060),d=n(34669),p=n(24456),u=n(41641),m=n(12353),h=n(83681),v=n(2313),f=n(32621);n(45331);class g{}t.AppModule=g,g.ɵfac=function(e){return new(e||g)},g.ɵmod=f.ɵɵdefineNgModule({type:g,bootstrap:[d.AppComponent]}),g.ɵinj=f.ɵɵdefineInjector({imports:[[m.OssModule,o.BrowserAnimationsModule,r.FormsModule,r.ReactiveFormsModule,h.ServicesModule,l.BitwardenToastModule.forRoot({maxOpened:5,autoDismiss:!0,closeButton:!0}),s.InfiniteScrollModule,i.DragDropModule,c.AppRoutingModule,u.OssRoutingModule,p.OrganizationsModule,a.RouterModule,v.WildcardRoutingModule]]})},19471:(e,t,n)=>{"use strict";const i=n(61248),r=n(32621);n(43734),n(19755),n(28981),n(5812);const o=n(10379);r.enableProdMode(),i.platformBrowser().bootstrapModule(o.AppModule,{preserveWhitespaces:!0})},7562:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoComponent=void 0;n(96832),n(68012),n(91092),n(40349),n(94308),n(99954);const r=n(47671),o=n(32621),a=n(96832),s=n(68012),l=n(91092),c=n(99954),d=n(40349),p=n(94308),u=n(57490),m=n(637),h=n(50553),v=n(52900),f=n(72596);function g(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",3),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(o.ɵɵelement(0,"i",26),o.ɵɵpipe(1,"i18n")),2&e&&o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,1,"loading"))}function x(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"keyConnectorTest"),"\n "))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div",36),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",37),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"keyConnectorTestFail"),"\n "))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"div",38),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",39),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"keyConnectorTestSuccess"),"\n "))}function w(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,S,5,3,"div",34),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,b,5,3,"div",35),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.keyConnectorUrl.hasError("invalidUrl")),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.keyConnectorUrl.hasError("invalidUrl"))}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",27),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n\n "),o.ɵɵelementStart(6,"div",8),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"label",28),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",29),o.ɵɵtext(13,"\n "),o.ɵɵelement(14,"input",30),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",31),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"button",32),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).validateKeyConnectorUrl()})),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,y,2,3,"i",33),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,x,3,3,"span",1),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,w,6,2,"ng-container",1),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("useAlertRole",!0),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,7,"keyConnectorWarning"),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,9,"keyConnectorUrl")),o.ɵɵadvance(9),o.ɵɵproperty("disabled",!e.enableTestKeyConnector),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.keyConnectorUrl.pending),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.keyConnectorUrl.pending),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.keyConnectorUrl.pristine&&!e.keyConnectorUrl.pending)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",40),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"h2"),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",8),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label"),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"div",29),o.ɵɵtext(15,"\n "),o.ɵɵelement(16,"input",41),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",31),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.callbackPath)})),o.ɵɵpipe(21,"i18n"),o.ɵɵtext(22,"\n "),o.ɵɵelement(23,"i",43),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",8),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"label"),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"div",29),o.ɵɵtext(36,"\n "),o.ɵɵelement(37,"input",41),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"div",31),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.signedOutCallbackPath)})),o.ɵɵpipe(42,"i18n"),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"i",43),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"div",8),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"label",44),o.ɵɵtext(53),o.ɵɵpipe(54,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelement(56,"input",45),o.ɵɵtext(57,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"div",8),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"label",46),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelement(65,"input",47),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementStart(68,"div",8),o.ɵɵtext(69,"\n "),o.ɵɵelementStart(70,"label",48),o.ɵɵtext(71),o.ɵɵpipe(72,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵelement(74,"input",49),o.ɵɵtext(75,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n "),o.ɵɵelementStart(77,"div",8),o.ɵɵtext(78,"\n "),o.ɵɵelementStart(79,"label",50),o.ɵɵtext(80),o.ɵɵpipe(81,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(82,"\n "),o.ɵɵelement(83,"input",51),o.ɵɵtext(84,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"div",8),o.ɵɵtext(87,"\n "),o.ɵɵelementStart(88,"label",52),o.ɵɵtext(89),o.ɵɵpipe(90,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(91,"\n "),o.ɵɵelementStart(92,"select",53),o.ɵɵtext(93,"\n "),o.ɵɵelementStart(94,"option",24),o.ɵɵtext(95,"Redirect GET"),o.ɵɵelementEnd(),o.ɵɵtext(96,"\n "),o.ɵɵelementStart(97,"option",24),o.ɵɵtext(98,"Form POST"),o.ɵɵelementEnd(),o.ɵɵtext(99,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(100,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"div",8),o.ɵɵtext(103,"\n "),o.ɵɵelementStart(104,"div",9),o.ɵɵtext(105,"\n "),o.ɵɵelement(106,"input",54),o.ɵɵtext(107,"\n "),o.ɵɵelementStart(108,"label",55),o.ɵɵtext(109),o.ɵɵpipe(110,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(111,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(112,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(113,"\n "),o.ɵɵelementStart(114,"div",8),o.ɵɵtext(115,"\n "),o.ɵɵelementStart(116,"label",56),o.ɵɵtext(117),o.ɵɵpipe(118,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(119,"\n "),o.ɵɵelement(120,"input",57),o.ɵɵtext(121,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(122,"\n "),o.ɵɵelementStart(123,"div",8),o.ɵɵtext(124,"\n "),o.ɵɵelementStart(125,"label",58),o.ɵɵtext(126),o.ɵɵpipe(127,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(128,"\n "),o.ɵɵelement(129,"input",59),o.ɵɵtext(130,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(131,"\n "),o.ɵɵelementStart(132,"div",8),o.ɵɵtext(133,"\n "),o.ɵɵelementStart(134,"label",60),o.ɵɵtext(135),o.ɵɵpipe(136,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(137,"\n "),o.ɵɵelement(138,"input",61),o.ɵɵtext(139,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(140,"\n "),o.ɵɵelementStart(141,"div",8),o.ɵɵtext(142,"\n "),o.ɵɵelementStart(143,"label",62),o.ɵɵtext(144),o.ɵɵpipe(145,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(146,"\n "),o.ɵɵelement(147,"input",63),o.ɵɵtext(148,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(149,"\n "),o.ɵɵelementStart(150,"div",8),o.ɵɵtext(151,"\n "),o.ɵɵelementStart(152,"label",64),o.ɵɵtext(153),o.ɵɵpipe(154,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(155,"\n "),o.ɵɵelement(156,"input",65),o.ɵɵtext(157,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(158,"\n "),o.ɵɵelementStart(159,"div",8),o.ɵɵtext(160,"\n "),o.ɵɵelementStart(161,"label",66),o.ɵɵtext(162),o.ɵɵpipe(163,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(164,"\n "),o.ɵɵelement(165,"input",67),o.ɵɵtext(166,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(167,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(168,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,21,"openIdConnectConfig")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,23,"callbackPath")),o.ɵɵadvance(5),o.ɵɵproperty("value",e.callbackPath),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(21,25,"copyValue")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,27,"signedOutCallbackPath")),o.ɵɵadvance(5),o.ɵɵproperty("value",e.signedOutCallbackPath),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(42,29,"copyValue")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(54,31,"authority")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(63,33,"clientId")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(72,35,"clientSecret")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(81,37,"metadataAddress")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(90,39,"oidcRedirectBehavior")),o.ɵɵadvance(5),o.ɵɵproperty("ngValue",0),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",1),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(110,41,"getClaimsFromUserInfoEndpoint"),"\n "),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(118,43,"additionalScopes")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(127,45,"additionalUserIdClaimTypes")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(136,47,"additionalEmailClaimTypes")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(145,49,"additionalNameClaimTypes")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(154,51,"acrValues")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(163,53,"expectedReturnAcrValue"))}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e)}}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e)}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e)}}function A(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",40),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"h2"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"div",8),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"label"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",29),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"input",41),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",31),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.spEntityId)})),o.ɵɵpipe(22,"i18n"),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"i",43),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",8),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"label"),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",29),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"input",41),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"div",31),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.launchUri(t.spMetadataUrl)})),o.ɵɵpipe(43,"i18n"),o.ɵɵtext(44,"\n "),o.ɵɵelement(45,"i",68),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.spMetadataUrl)})),o.ɵɵpipe(49,"i18n"),o.ɵɵtext(50,"\n "),o.ɵɵelement(51,"i",43),o.ɵɵtext(52,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"div",8),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"label"),o.ɵɵtext(60),o.ɵɵpipe(61,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementStart(63,"div",29),o.ɵɵtext(64,"\n "),o.ɵɵelement(65,"input",41),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",31),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.spAcsUrl)})),o.ɵɵpipe(70,"i18n"),o.ɵɵtext(71,"\n "),o.ɵɵelement(72,"i",43),o.ɵɵtext(73,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(74,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"div",8),o.ɵɵtext(79,"\n "),o.ɵɵelementStart(80,"label",69),o.ɵɵtext(81),o.ɵɵpipe(82,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(83,"\n "),o.ɵɵelementStart(84,"select",70),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"option",24),o.ɵɵtext(87,"Not Configured"),o.ɵɵelementEnd(),o.ɵɵtext(88,"\n "),o.ɵɵelementStart(89,"option",24),o.ɵɵtext(90,"Unspecified"),o.ɵɵelementEnd(),o.ɵɵtext(91,"\n "),o.ɵɵelementStart(92,"option",24),o.ɵɵtext(93,"Email Address"),o.ɵɵelementEnd(),o.ɵɵtext(94,"\n "),o.ɵɵelementStart(95,"option",24),o.ɵɵtext(96,"X.509 Subject Name"),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"option",24),o.ɵɵtext(99,"Windows Domain Qualified Name"),o.ɵɵelementEnd(),o.ɵɵtext(100,"\n "),o.ɵɵelementStart(101,"option",24),o.ɵɵtext(102,"Kerberos Principal Name"),o.ɵɵelementEnd(),o.ɵɵtext(103,"\n "),o.ɵɵelementStart(104,"option",24),o.ɵɵtext(105,"Entity Identifier"),o.ɵɵelementEnd(),o.ɵɵtext(106,"\n "),o.ɵɵelementStart(107,"option",24),o.ɵɵtext(108,"Persistent"),o.ɵɵelementEnd(),o.ɵɵtext(109,"\n "),o.ɵɵelementStart(110,"option",24),o.ɵɵtext(111,"Transient"),o.ɵɵelementEnd(),o.ɵɵtext(112,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(113,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(114,"\n "),o.ɵɵelementStart(115,"div",8),o.ɵɵtext(116,"\n "),o.ɵɵelementStart(117,"label",71),o.ɵɵtext(118),o.ɵɵpipe(119,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(120,"\n "),o.ɵɵelementStart(121,"select",72),o.ɵɵtext(122,"\n "),o.ɵɵtemplate(123,E,2,2,"option",73),o.ɵɵtext(124,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(125,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(126,"\n "),o.ɵɵelementStart(127,"div",8),o.ɵɵtext(128,"\n "),o.ɵɵelementStart(129,"label",74),o.ɵɵtext(130),o.ɵɵpipe(131,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(132,"\n "),o.ɵɵelementStart(133,"select",75),o.ɵɵtext(134,"\n "),o.ɵɵelementStart(135,"option",24),o.ɵɵtext(136,"If IdP Wants Authn Requests Signed"),o.ɵɵelementEnd(),o.ɵɵtext(137,"\n "),o.ɵɵelementStart(138,"option",24),o.ɵɵtext(139,"Always"),o.ɵɵelementEnd(),o.ɵɵtext(140,"\n "),o.ɵɵelementStart(141,"option",24),o.ɵɵtext(142,"Never"),o.ɵɵelementEnd(),o.ɵɵtext(143,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(144,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(145,"\n "),o.ɵɵelementStart(146,"div",8),o.ɵɵtext(147,"\n "),o.ɵɵelementStart(148,"label",76),o.ɵɵtext(149),o.ɵɵpipe(150,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(151,"\n "),o.ɵɵelementStart(152,"select",77),o.ɵɵtext(153,"\n "),o.ɵɵtemplate(154,P,2,2,"option",73),o.ɵɵtext(155,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(156,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(157,"\n "),o.ɵɵelementStart(158,"div",8),o.ɵɵtext(159,"\n "),o.ɵɵelementStart(160,"div",9),o.ɵɵtext(161,"\n "),o.ɵɵelement(162,"input",78),o.ɵɵtext(163,"\n "),o.ɵɵelementStart(164,"label",79),o.ɵɵtext(165),o.ɵɵpipe(166,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(167,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(168,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(169,"\n "),o.ɵɵelementStart(170,"div",8),o.ɵɵtext(171,"\n "),o.ɵɵelementStart(172,"div",9),o.ɵɵtext(173,"\n "),o.ɵɵelement(174,"input",80),o.ɵɵtext(175,"\n "),o.ɵɵelementStart(176,"label",81),o.ɵɵtext(177),o.ɵɵpipe(178,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(179,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(180,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(181,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(182,"\n\n "),o.ɵɵtext(183,"\n "),o.ɵɵelementStart(184,"div",40),o.ɵɵtext(185,"\n "),o.ɵɵelementStart(186,"h2"),o.ɵɵtext(187),o.ɵɵpipe(188,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(189,"\n\n "),o.ɵɵelementStart(190,"div",8),o.ɵɵtext(191,"\n "),o.ɵɵelementStart(192,"label",82),o.ɵɵtext(193),o.ɵɵpipe(194,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(195,"\n "),o.ɵɵelement(196,"input",83),o.ɵɵtext(197,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(198,"\n "),o.ɵɵelementStart(199,"div",8),o.ɵɵtext(200,"\n "),o.ɵɵelementStart(201,"label",84),o.ɵɵtext(202),o.ɵɵpipe(203,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(204,"\n "),o.ɵɵelementStart(205,"select",85),o.ɵɵtext(206,"\n "),o.ɵɵelementStart(207,"option",24),o.ɵɵtext(208,"Redirect"),o.ɵɵelementEnd(),o.ɵɵtext(209,"\n "),o.ɵɵelementStart(210,"option",24),o.ɵɵtext(211,"HTTP POST"),o.ɵɵelementEnd(),o.ɵɵtext(212,"\n "),o.ɵɵelementStart(213,"option",24),o.ɵɵtext(214,"Artifact"),o.ɵɵelementEnd(),o.ɵɵtext(215,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(216,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(217,"\n "),o.ɵɵelementStart(218,"div",8),o.ɵɵtext(219,"\n "),o.ɵɵelementStart(220,"label",86),o.ɵɵtext(221),o.ɵɵpipe(222,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(223,"\n "),o.ɵɵelement(224,"input",87),o.ɵɵtext(225,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(226,"\n "),o.ɵɵelementStart(227,"div",8),o.ɵɵtext(228,"\n "),o.ɵɵelementStart(229,"label",88),o.ɵɵtext(230),o.ɵɵpipe(231,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(232,"\n "),o.ɵɵelement(233,"input",89),o.ɵɵtext(234,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(235,"\n "),o.ɵɵelementStart(236,"div",8),o.ɵɵtext(237,"\n "),o.ɵɵelementStart(238,"label",90),o.ɵɵtext(239),o.ɵɵpipe(240,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(241,"\n "),o.ɵɵelement(242,"input",91),o.ɵɵtext(243,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(244,"\n "),o.ɵɵelementStart(245,"div",8),o.ɵɵtext(246,"\n "),o.ɵɵelementStart(247,"label",92),o.ɵɵtext(248),o.ɵɵpipe(249,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(250,"\n "),o.ɵɵelement(251,"textarea",93),o.ɵɵtext(252,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(253,"\n "),o.ɵɵelementStart(254,"div",8),o.ɵɵtext(255,"\n "),o.ɵɵelementStart(256,"label",94),o.ɵɵtext(257),o.ɵɵpipe(258,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(259,"\n "),o.ɵɵelementStart(260,"select",95),o.ɵɵtext(261,"\n "),o.ɵɵtemplate(262,k,2,2,"option",73),o.ɵɵtext(263,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(264,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(265,"\n "),o.ɵɵelementStart(266,"div",96),o.ɵɵtext(267,"\n "),o.ɵɵtext(268,"\n "),o.ɵɵelementStart(269,"div",9),o.ɵɵtext(270,"\n "),o.ɵɵelement(271,"input",97),o.ɵɵtext(272,"\n "),o.ɵɵelementStart(273,"label",98),o.ɵɵtext(274),o.ɵɵpipe(275,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(276,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(277,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(278,"\n "),o.ɵɵelementStart(279,"div",8),o.ɵɵtext(280,"\n "),o.ɵɵelementStart(281,"div",9),o.ɵɵtext(282,"\n "),o.ɵɵelement(283,"input",99),o.ɵɵtext(284,"\n "),o.ɵɵelementStart(285,"label",100),o.ɵɵtext(286),o.ɵɵpipe(287,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(288,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(289,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(290,"\n "),o.ɵɵelementStart(291,"div",8),o.ɵɵtext(292,"\n "),o.ɵɵelementStart(293,"div",9),o.ɵɵtext(294,"\n "),o.ɵɵelement(295,"input",101),o.ɵɵtext(296,"\n "),o.ɵɵelementStart(297,"label",102),o.ɵɵtext(298),o.ɵɵpipe(299,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(300,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(301,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(302,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(303,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,47,"samlSpConfig")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,49,"spEntityId")),o.ɵɵadvance(5),o.ɵɵproperty("value",e.spEntityId),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(22,51,"copyValue")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(34,53,"spMetadataUrl")),o.ɵɵadvance(5),o.ɵɵproperty("value",e.spMetadataUrl),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(43,55,"launch")),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(49,57,"copyValue")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(61,59,"spAcsUrl")),o.ɵɵadvance(5),o.ɵɵproperty("value",e.spAcsUrl),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(70,61,"copyValue")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(82,63,"spNameIdFormat")),o.ɵɵadvance(5),o.ɵɵproperty("ngValue",0),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",1),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",2),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",3),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",4),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",5),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",6),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",7),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",8),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(119,65,"spOutboundSigningAlgorithm")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.samlSigningAlgorithms),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(131,67,"spSigningBehavior")),o.ɵɵadvance(5),o.ɵɵproperty("ngValue",0),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",1),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",3),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(150,69,"spMinIncomingSigningAlgorithm")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.samlSigningAlgorithms),o.ɵɵadvance(11),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(166,71,"spWantAssertionsSigned"),"\n "),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(178,73,"spValidateCertificates"),"\n "),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(188,75,"samlIdpConfig")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(194,77,"idpEntityId")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(203,79,"idpBindingType")),o.ɵɵadvance(5),o.ɵɵproperty("ngValue",1),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",2),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",4),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(222,81,"idpSingleSignOnServiceUrl")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(231,83,"idpSingleLogoutServiceUrl")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(240,85,"idpArtifactResolutionServiceUrl")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(249,87,"idpX509PublicCert")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(258,89,"idpOutboundSigningAlgorithm")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.samlSigningAlgorithms),o.ɵɵadvance(4),o.ɵɵproperty("hidden",!0),o.ɵɵadvance(8),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(275,91,"idpAllowUnsolicitedAuthnResponse"),"\n "),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(287,93,"idpDisableOutboundLogoutRequests"),"\n "),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(299,95,"idpWantAuthnRequestsSigned"),"\n ")}}function O(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",5,6),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"p"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵelementStart(6,"a",7),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelement(11,"br"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n\n "),o.ɵɵelementStart(15,"div",8),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",9),o.ɵɵtext(18,"\n "),o.ɵɵelement(19,"input",10),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",11),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"small",12),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n\n "),o.ɵɵelementStart(31,"div",8),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"label"),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"div",13),o.ɵɵtext(38,"\n "),o.ɵɵelement(39,"input",14),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"label",15),o.ɵɵtext(42),o.ɵɵpipe(43,"i18n"),o.ɵɵelementStart(44,"small"),o.ɵɵtext(45),o.ɵɵpipe(46,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"div",16),o.ɵɵtext(51,"\n "),o.ɵɵelement(52,"input",17),o.ɵɵtext(53,"\n "),o.ɵɵelementStart(54,"label",18),o.ɵɵtext(55),o.ɵɵpipe(56,"i18n"),o.ɵɵelementStart(57,"a",19),o.ɵɵpipe(58,"i18n"),o.ɵɵtext(59,"\n "),o.ɵɵelement(60,"i",20),o.ɵɵtext(61,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementStart(63,"small"),o.ɵɵtext(64),o.ɵɵpipe(65,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n\n "),o.ɵɵtemplate(70,I,30,11,"ng-container",1),o.ɵɵtext(71,"\n\n "),o.ɵɵelementStart(72,"div",8),o.ɵɵtext(73,"\n "),o.ɵɵelementStart(74,"label",21),o.ɵɵtext(75),o.ɵɵpipe(76,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"select",22),o.ɵɵtext(79,"\n "),o.ɵɵelementStart(80,"option",23),o.ɵɵtext(81),o.ɵɵpipe(82,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(83,"\n "),o.ɵɵelementStart(84,"option",24),o.ɵɵtext(85,"OpenID Connect"),o.ɵɵelementEnd(),o.ɵɵtext(86,"\n "),o.ɵɵelementStart(87,"option",24),o.ɵɵtext(88,"SAML 2.0"),o.ɵɵelementEnd(),o.ɵɵtext(89,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(90,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(91,"\n\n "),o.ɵɵtext(92,"\n "),o.ɵɵtemplate(93,C,169,55,"div",1),o.ɵɵtext(94,"\n\n "),o.ɵɵtemplate(95,A,304,97,"div",1),o.ɵɵtext(96,"\n\n "),o.ɵɵelementStart(97,"button",25),o.ɵɵtext(98,"\n "),o.ɵɵelement(99,"i",26),o.ɵɵpipe(100,"i18n"),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"span"),o.ɵɵtext(103),o.ɵɵpipe(104,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(105,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(106,"\n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext();o.ɵɵproperty("formGroup",t.data)("appApiAction",t.formPromise),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(5,29,"ssoPolicyHelpStart"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,31,"ssoPolicyHelpLink")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,33,"ssoPolicyHelpEnd"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(13,35,"ssoPolicyHelpKeyConnector"),"\n "),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,37,"allowSso")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(28,39,"allowSsoDesc")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(35,41,"memberDecryptionOption")),o.ɵɵadvance(5),o.ɵɵproperty("value",!1),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(43,43,"masterPass"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(46,45,"memberDecryptionPassDesc")),o.ɵɵadvance(7),o.ɵɵproperty("value",!0),o.ɵɵattribute("disabled",!t.organization.useKeyConnector||null),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(56,47,"keyConnector"),"\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(58,49,"learnMore")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(65,51,"memberDecryptionKeyConnectorDesc")),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",t.data.value.keyConnectorEnabled),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(76,53,"type")),o.ɵɵadvance(5),o.ɵɵproperty("ngValue",0),o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(82,55,"selectType")),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",1),o.ɵɵadvance(3),o.ɵɵproperty("ngValue",2),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",1==t.data.value.configType),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",2==t.data.value.configType),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(100,57,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(104,59,"save"))}}class T{constructor(e,t,n,i,r,o){this.formBuilder=e,this.route=t,this.apiService=n,this.platformUtilsService=i,this.i18nService=r,this.organizationService=o,this.samlSigningAlgorithms=["http://www.w3.org/2001/04/xmldsig-more#rsa-sha256","http://www.w3.org/2000/09/xmldsig#rsa-sha384","http://www.w3.org/2000/09/xmldsig#rsa-sha512","http://www.w3.org/2000/09/xmldsig#rsa-sha1"],this.loading=!0,this.enabled=this.formBuilder.control(!1),this.data=this.formBuilder.group({configType:[],keyConnectorEnabled:[],keyConnectorUrl:[],authority:[],clientId:[],clientSecret:[],metadataAddress:[],redirectBehavior:[],getClaimsFromUserInfoEndpoint:[],additionalScopes:[],additionalUserIdClaimTypes:[],additionalEmailClaimTypes:[],additionalNameClaimTypes:[],acrValues:[],expectedReturnAcrValue:[],spNameIdFormat:[],spOutboundSigningAlgorithm:[],spSigningBehavior:[],spMinIncomingSigningAlgorithm:[],spWantAssertionsSigned:[],spValidateCertificates:[],idpEntityId:[],idpBindingType:[],idpSingleSignOnServiceUrl:[],idpSingleLogoutServiceUrl:[],idpArtifactResolutionServiceUrl:[],idpX509PublicCert:[],idpOutboundSigningAlgorithm:[],idpAllowUnsolicitedAuthnResponse:[],idpDisableOutboundLogoutRequests:[],idpWantAuthnRequestsSigned:[]})}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load()}))))}))}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId);const e=yield this.apiService.getOrganizationSso(this.organizationId);this.data.patchValue(e.data),this.enabled.setValue(e.enabled),this.callbackPath=e.urls.callbackPath,this.signedOutCallbackPath=e.urls.signedOutCallbackPath,this.spEntityId=e.urls.spEntityId,this.spMetadataUrl=e.urls.spMetadataUrl,this.spAcsUrl=e.urls.spAcsUrl,this.keyConnectorUrl.markAsDirty(),this.loading=!1}))}copy(e){this.platformUtilsService.copyToClipboard(e)}launchUri(e){this.platformUtilsService.launchUri(e)}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.postData();try{const e=yield this.formPromise;this.data.patchValue(e.data),this.enabled.setValue(e.enabled),this.platformUtilsService.showToast("success",null,this.i18nService.t("ssoSettingsSaved"))}catch(e){}this.formPromise=null}))}postData(){return i(this,void 0,void 0,(function*(){if(this.data.get("keyConnectorEnabled").value&&(yield this.validateKeyConnectorUrl(),this.keyConnectorUrl.hasError("invalidUrl")))throw new Error(this.i18nService.t("keyConnectorTestFail"));const e=new r.OrganizationSsoRequest;return e.enabled=this.enabled.value,e.data=this.data.value,this.apiService.postOrganizationSso(this.organizationId,e)}))}validateKeyConnectorUrl(){return i(this,void 0,void 0,(function*(){if(!this.keyConnectorUrl.pristine){this.keyConnectorUrl.markAsPending();try{yield this.apiService.getKeyConnectorAlive(this.keyConnectorUrl.value),this.keyConnectorUrl.updateValueAndValidity()}catch(e){this.keyConnectorUrl.setErrors({invalidUrl:!0})}this.keyConnectorUrl.markAsPristine()}}))}get enableTestKeyConnector(){return this.data.get("keyConnectorEnabled").value&&null!=this.keyConnectorUrl&&""!==this.keyConnectorUrl.value}get keyConnectorUrl(){return this.data.get("keyConnectorUrl")}}t.SsoComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.ApiService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.I18nService),o.ɵɵdirectiveInject(p.OrganizationService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-org-manage-sso"]],decls:11,vars:5,consts:[[1,"page-header","d-flex"],[4,"ngIf"],["ngNativeValidate","",3,"formGroup","appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"formGroup","appApiAction","ngSubmit"],["form",""],["routerLink","../policies"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"form-text","text-muted"],[1,"form-check","form-check-block"],["type","radio","id","memberDecryptionPass","formControlName","keyConnectorEnabled",1,"form-check-input",3,"value"],["for","memberDecryptionPass",1,"form-check-label"],[1,"form-check","mt-2","form-check-block"],["type","radio","id","memberDecryptionKey","formControlName","keyConnectorEnabled",1,"form-check-input",3,"value"],["for","memberDecryptionKey",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/about-key-connector/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["for","type"],["id","type","formControlName","configType",1,"form-control"],["disabled","",3,"ngValue"],[3,"ngValue"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","warning",3,"useAlertRole"],["for","keyConnectorUrl"],[1,"input-group"],["formControlName","keyConnectorUrl","id","keyConnectorUrl","required","",1,"form-control"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["class","text-danger","role","alert",4,"ngIf"],["class","text-success","role","alert",4,"ngIf"],["role","alert",1,"text-danger"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle"],["role","alert",1,"text-success"],["aria-hidden","true",1,"bwi","bwi-check-circle"],[1,"config-section"],["readonly","",1,"form-control",3,"value"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","authority"],["formControlName","authority","id","authority",1,"form-control"],["for","clientId"],["formControlName","clientId","id","clientId",1,"form-control"],["for","clientSecret"],["formControlName","clientSecret","id","clientSecret",1,"form-control"],["for","metadataAddress"],["formControlName","metadataAddress","id","metadataAddress",1,"form-control"],["for","redirectBehavior"],["formControlName","redirectBehavior","id","redirectBehavior",1,"form-control"],["type","checkbox","id","getClaimsFromUserInfoEndpoint","formControlName","getClaimsFromUserInfoEndpoint",1,"form-check-input"],["for","getClaimsFromUserInfoEndpoint",1,"form-check-label"],["for","additionalScopes"],["formControlName","additionalScopes","id","additionalScopes",1,"form-control"],["for","additionalUserIdClaimTypes"],["formControlName","additionalUserIdClaimTypes","id","additionalUserIdClaimTypes",1,"form-control"],["for","additionalEmailClaimTypes"],["formControlName","additionalEmailClaimTypes","id","additionalEmailClaimTypes",1,"form-control"],["for","additionalNameClaimTypes"],["formControlName","additionalNameClaimTypes","id","additionalNameClaimTypes",1,"form-control"],["for","acrValues"],["formControlName","acrValues","id","acrValues",1,"form-control"],["for","expectedReturnAcrValue"],["formControlName","expectedReturnAcrValue","id","expectedReturnAcrValue",1,"form-control"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-external-link"],["for","spNameIdFormat"],["formControlName","spNameIdFormat","id","spNameIdFormat",1,"form-control"],["for","spOutboundSigningAlgorithm"],["formControlName","spOutboundSigningAlgorithm","id","spOutboundSigningAlgorithm",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],["for","spSigningBehavior"],["formControlName","spSigningBehavior","id","spSigningBehavior",1,"form-control"],["for","spMinIncomingSigningAlgorithm"],["formControlName","spMinIncomingSigningAlgorithm","id","spMinIncomingSigningAlgorithm",1,"form-control"],["type","checkbox","id","spWantAssertionsSigned","formControlName","spWantAssertionsSigned",1,"form-check-input"],["for","spWantAssertionsSigned",1,"form-check-label"],["type","checkbox","id","spValidateCertificates","formControlName","spValidateCertificates",1,"form-check-input"],["for","spValidateCertificates",1,"form-check-label"],["for","idpEntityId"],["formControlName","idpEntityId","id","idpEntityId",1,"form-control"],["for","idpBindingType"],["formControlName","idpBindingType","id","idpBindingType",1,"form-control"],["for","idpSingleSignOnServiceUrl"],["formControlName","idpSingleSignOnServiceUrl","id","idpSingleSignOnServiceUrl",1,"form-control"],["for","idpSingleLogoutServiceUrl"],["formControlName","idpSingleLogoutServiceUrl","id","idpSingleLogoutServiceUrl",1,"form-control"],["for","idpArtifactResolutionServiceUrl"],["formControlName","idpArtifactResolutionServiceUrl","id","idpArtifactResolutionServiceUrl",1,"form-control"],["for","idpX509PublicCert"],["formControlName","idpX509PublicCert","rows","6","id","idpX509PublicCert",1,"form-control","form-control-sm","text-monospace"],["for","idpOutboundSigningAlgorithm"],["formControlName","idpOutboundSigningAlgorithm","id","idpOutboundSigningAlgorithm",1,"form-control"],[1,"form-group",3,"hidden"],["type","checkbox","id","idpAllowUnsolicitedAuthnResponse","formControlName","idpAllowUnsolicitedAuthnResponse",1,"form-check-input"],["for","idpAllowUnsolicitedAuthnResponse",1,"form-check-label"],["type","checkbox","id","idpDisableOutboundLogoutRequests","formControlName","idpDisableOutboundLogoutRequests",1,"form-check-input"],["for","idpDisableOutboundLogoutRequests",1,"form-check-label"],["type","checkbox","id","idpWantAuthnRequestsSigned","formControlName","idpWantAuthnRequestsSigned",1,"form-check-input"],["for","idpWantAuthnRequestsSigned",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n\n"),o.ɵɵtemplate(7,g,9,6,"ng-container",1),o.ɵɵtext(8,"\n\n"),o.ɵɵtemplate(9,O,107,61,"form",2),o.ɵɵtext(10,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"singleSignOn")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading))},directives:[u.NgIf,a.NgControlStatusGroup,a.FormGroupDirective,m.ApiActionDirective,s.RouterLinkWithHref,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.RadioControlValueAccessor,a.DefaultValueAccessor,a.FormControlName,h.A11yTitleDirective,a.SelectControlValueAccessor,a.NgSelectOption,a.ɵNgSelectMultipleOption,v.CalloutComponent,a.RequiredValidator,u.NgForOf],pipes:[f.I18nPipe],encapsulation:2})},28901:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsRoutingModule=void 0;const i=n(68012),r=n(22306),o=n(49618),a=n(47760),s=n(93263),l=n(86950),c=n(81616),d=n(7562),p=n(32621),u=(n(68012),[{path:"organizations/:organizationId",component:a.OrganizationLayoutComponent,canActivate:[r.AuthGuardService,l.OrganizationGuardService],children:[{path:"manage",component:s.ManageComponent,canActivate:[c.OrganizationTypeGuardService],data:{permissions:[o.Permissions.CreateNewCollections,o.Permissions.EditAnyCollection,o.Permissions.DeleteAnyCollection,o.Permissions.EditAssignedCollections,o.Permissions.DeleteAssignedCollections,o.Permissions.AccessEventLogs,o.Permissions.ManageGroups,o.Permissions.ManageUsers,o.Permissions.ManagePolicies,o.Permissions.ManageSso]},children:[{path:"sso",component:d.SsoComponent}]}]}]);class m{}t.OrganizationsRoutingModule=m,m.ɵfac=function(e){return new(e||m)},m.ɵmod=p.ɵɵdefineNgModule({type:m}),m.ɵinj=p.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(u)],i.RouterModule]})},24456:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsModule=void 0;const i=n(57490),r=n(96832),o=n(12353),a=n(28901),s=n(32621);class l{}t.OrganizationsModule=l,l.ɵfac=function(e){return new(e||l)},l.ɵmod=s.ɵɵdefineNgModule({type:l}),l.ɵinj=s.ɵɵdefineInjector({imports:[[i.CommonModule,r.FormsModule,r.ReactiveFormsModule,o.OssModule,a.OrganizationsRoutingModule]]})},42230:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisablePersonalVaultExportPolicyComponent=t.DisablePersonalVaultExportPolicy=void 0;const i=n(40251),r=n(52289),o=n(32621),a=n(96832),s=n(72596);class l extends r.BasePolicy{constructor(){super(...arguments),this.name="disablePersonalVaultExport",this.description="disablePersonalVaultExportDesc",this.type=i.PolicyType.DisablePersonalVaultExport,this.component=c}}t.DisablePersonalVaultExportPolicy=l;class c extends r.BasePolicyComponent{}t.DisablePersonalVaultExportPolicyComponent=c,c.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(c)))(t||c)}}(),c.ɵcmp=o.ɵɵdefineComponent({type:c,selectors:[["policy-disable-personal-vault-export"]],features:[o.ɵɵInheritDefinitionFeature],decls:12,vars:4,consts:[[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,2,"enabled")))},directives:[a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective],pipes:[s.I18nPipe],encapsulation:2})},53027:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaximumVaultTimeoutPolicyComponent=t.MaximumVaultTimeoutPolicy=void 0;n(96832),n(40349);const i=n(40251),r=n(52289),o=n(32621),a=n(96832),s=n(40349),l=n(52900),c=n(72596);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="maximumVaultTimeout",this.description="maximumVaultTimeoutDesc",this.type=i.PolicyType.MaximumVaultTimeout,this.component=p}}t.MaximumVaultTimeoutPolicy=d;class p extends r.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.i18nService=t,this.data=this.formBuilder.group({hours:[null],minutes:[null]})}loadData(){var e;const t=null===(e=this.policyResponse.data)||void 0===e?void 0:e.minutes;null!=t&&this.data.patchValue({hours:Math.floor(t/60),minutes:t%60})}buildRequestData(){return null==this.data.value.hours&&null==this.data.value.minutes?null:{minutes:60*this.data.value.hours+this.data.value.minutes}}buildRequest(e){var t;const n=null!==(t=e.get(i.PolicyType.SingleOrg))&&void 0!==t&&t;if(this.enabled.value&&!n)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));const r=this.buildRequestData();if(null==(null==r?void 0:r.minutes)||(null==r?void 0:r.minutes)<=0)throw new Error(this.i18nService.t("invalidMaximumVaultTimeout"));return super.buildRequest(e)}}t.MaximumVaultTimeoutPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-maximum-timeout"]],features:[o.ɵɵInheritDefinitionFeature],decls:48,vars:20,consts:[["type","tip",3,"title"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],["for","hours"],[1,"row"],[1,"col-6"],["id","hours","type","number","min","0","name","hours","formControlName","hours",1,"form-control"],["id","minutes","type","number","min","0","max","59","name","minutes","formControlName","minutes",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n\n"),o.ɵɵelementStart(5,"div",1),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",2),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"input",3),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"label",4),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n\n"),o.ɵɵelementStart(17,"div",5),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",1),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",6),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"div",7),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"div",8),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"input",9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"small"),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",8),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"input",10),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"small"),o.ɵɵtext(41),o.ɵɵpipe(42,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n")),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,8,"prerequisite")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,10,"requireSsoPolicyReq"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,12,"enabled")),o.ɵɵadvance(5),o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,14,"maximumVaultTimeoutLabel")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,16,"hours")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(42,18,"minutes")))},directives:[l.CalloutComponent,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.NgControlStatusGroup,a.FormGroupDirective,a.MinValidator,a.NumberValueAccessor,a.DefaultValueAccessor,a.FormControlName,a.MaxValidator],pipes:[c.I18nPipe],encapsulation:2})},79673:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddOrganizationComponent=void 0;const r=n(32621),o=(n(40349),n(99954),n(85556),n(9941),n(22397),n(32621)),a=n(85556),s=n(22397),l=n(40349),c=n(99954),d=n(9941),p=n(50553),u=n(57490),m=n(69242),h=n(72596);function v(e,t){1&e&&(o.ɵɵelementStart(0,"div",10),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",11),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(5,4,"loading"),"\n "))}function f(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",14),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-avatar",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"td"),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",16),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).add(t)})),o.ɵɵtext(13,"\n Add\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("data",e.name)("circle",!0)("fontSize",14),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",e.name,"\n "),o.ɵɵadvance(4),o.ɵɵproperty("disabled",n.formPromise)}}function g(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"table",12),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,f,16,5,"tr",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.organizations)}}class y{constructor(e,t,n,i,o){this.providerService=e,this.webProviderService=t,this.i18nService=n,this.platformUtilsService=i,this.validationService=o,this.onAddedOrganization=new r.EventEmitter,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){null!=this.providerId&&(this.provider=yield this.providerService.get(this.providerId),this.loading=!1)}))}add(e){return i(this,void 0,void 0,(function*(){if(this.formPromise)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("addOrganizationConfirmation",e.name,this.provider.name),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.formPromise=this.webProviderService.addOrganizationToProvider(this.providerId,e.id),yield this.formPromise}catch(t){return void this.validationService.showError(t)}finally{this.formPromise=null}this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationJoinedProvider")),this.onAddedOrganization.emit()}))}}t.AddOrganizationComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.ProviderService),o.ɵɵdirectiveInject(s.WebProviderService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.ValidationService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["provider-add-organization"]],inputs:{providerId:"providerId",organizations:"organizations"},outputs:{onAddedOrganization:"onAddedOrganization"},decls:30,vars:8,consts:[["role","dialog","aria-modal","true","aria-labelledby","addTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],["id","addTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],[4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],[1,"btn","btn-outline-secondary","pull-right",3,"disabled","click"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",5),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",6),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",7),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,v,6,6,"div",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,g,7,1,"ng-container",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,4,"addExistingOrganization"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,6,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading))},directives:[p.A11yTitleDirective,u.NgIf,u.NgForOf,m.AvatarComponent],pipes:[h.I18nPipe],encapsulation:2})},65504:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ClientsComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(91092),n(40349),n(70143),n(94308),n(99954),n(85556),n(14170),n(29546),n(9941),n(39691)),s=n(47073),l=(n(22397),n(79673)),c=n(32621),d=n(68012),p=n(85556),u=n(91092),m=n(14170),h=n(99954),v=n(40349),f=n(9941),g=n(22397),y=n(70143),x=n(29546),S=n(94308),b=n(96832),w=n(57490),I=n(69242),C=n(50553),E=n(80507),P=n(72596),k=n(35734),A=["add"];function O(e,t){1&e&&(c.ɵɵelementStart(0,"a",8),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"newClientOrganization"),"\n "))}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",10),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().addExistingOrganization()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"addExistingOrganization"),"\n "))}function M(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",11),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",12),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function D(e,t){1&e&&(c.ɵɵelementStart(0,"p"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"noClientsInList")))}function B(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",19),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",20),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"button",21),c.ɵɵpipe(5,"i18n"),c.ɵɵtext(6,"\n "),c.ɵɵelement(7,"i",22),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",23),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"a",24),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).remove(t)})),c.ɵɵtext(13,"\n "),c.ɵɵelement(14,"i",25),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(5,2,"options")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(16,4,"remove"),"\n "))}const R=function(e){return["/organizations",e]};function U(e,t){if(1&e&&(c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",15),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"app-avatar",16),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td"),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"a",17),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵtemplate(13,B,20,6,"td",18),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit,n=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("data",e.organizationName)("circle",!0)("fontSize",14),c.ɵɵadvance(5),c.ɵɵproperty("routerLink",c.ɵɵpureFunction1(6,R,e.organizationId)),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.organizationName),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",n.manageOrganizations)}}function V(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"table",13),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tbody"),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,U,15,8,"tr",14),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function F(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,D,3,3,"p",6),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,V,10,3,"ng-container",6),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}function N(e,t){}const _=[a.PlanType.Free,a.PlanType.FamiliesAnnually2019,a.PlanType.FamiliesAnnually];class j{constructor(e,t,n,i,r,o,a,s,l,c,d){this.route=e,this.providerService=t,this.apiService=n,this.searchService=i,this.platformUtilsService=r,this.i18nService=o,this.validationService=a,this.webProviderService=s,this.logService=l,this.modalService=c,this.organizationService=d,this.loading=!0,this.manageOrganizations=!1,this.showAddExisting=!1,this.didScroll=!1,this.pageSize=100,this.pagedClientsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))}))))}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getProviderClients(this.providerId);this.clients=null!=e.data&&e.data.length>0?e.data:[],this.manageOrganizations=(yield this.providerService.get(this.providerId)).type===s.ProviderUserType.ProviderAdmin;const t=(yield this.organizationService.getAll()).filter((e=>e.isOwner&&null==e.providerId)),n=yield Promise.all(t.map((e=>this.apiService.getOrganization(e.id)))).then((e=>e.filter((e=>!_.includes(e.planType))).map((e=>e.id))));this.addableOrganizations=t.filter((e=>n.includes(e.id))),this.showAddExisting=0!==this.addableOrganizations.length,this.loading=!1}))}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.clients&&this.clients.length>this.pageSize}isSearching(){return this.searchService.isSearchable(this.searchText)}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedClients=[],this.loadMore()}))}loadMore(){if(!this.clients||this.clients.length<=this.pageSize)return;const e=this.pagedClients.length;let t=this.pageSize;0===e&&this.pagedClientsCount>this.pageSize&&(t=this.pagedClientsCount),this.clients.length>e&&(this.pagedClients=this.pagedClients.concat(this.clients.slice(e,e+t))),this.pagedClientsCount=this.pagedClients.length,this.didScroll=this.pagedClients.length>this.pageSize}addExistingOrganization(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(l.AddOrganizationComponent,this.addModalRef,(t=>{t.providerId=this.providerId,t.organizations=this.addableOrganizations,t.onAddedOrganization.subscribe((()=>i(this,void 0,void 0,(function*(){try{yield this.load(),e.close()}catch(t){this.logService.error(`Handled exception: ${t}`)}}))))}))}))}remove(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("detachOrganizationConfirmation"),e.organizationName,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;this.actionPromise=this.webProviderService.detachOrganizastion(this.providerId,e.id);try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("detachedOrganization",e.organizationName)),yield this.load()}catch(t){this.validationService.showError(t)}this.actionPromise=null}))}}t.ClientsComponent=j,j.ɵfac=function(e){return new(e||j)(c.ɵɵdirectiveInject(d.ActivatedRoute),c.ɵɵdirectiveInject(p.ProviderService),c.ɵɵdirectiveInject(u.ApiService),c.ɵɵdirectiveInject(m.SearchService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(v.I18nService),c.ɵɵdirectiveInject(f.ValidationService),c.ɵɵdirectiveInject(g.WebProviderService),c.ɵɵdirectiveInject(y.LogService),c.ɵɵdirectiveInject(x.ModalService),c.ɵɵdirectiveInject(S.OrganizationService))},j.ɵcmp=c.ɵɵdefineComponent({type:j,selectors:[["ng-component"]],viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(A,7,r.ViewContainerRef),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.addModalRef=e.first)}},decls:32,vars:19,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["class","btn btn-sm btn-outline-primary ml-3","routerLink","create",4,"ngIf"],["class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["add",""],["routerLink","create",1,"btn","btn-sm","btn-outline-primary","ml-3"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","circle","fontSize"],[3,"routerLink"],["class","table-list-options",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n\n "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,O,5,3,"a",4),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,T,5,3,"button",5),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n\n"),c.ɵɵtemplate(24,M,9,6,"ng-container",6),c.ɵɵtext(25,"\n\n"),c.ɵɵtemplate(26,F,6,2,"ng-container",6),c.ɵɵpipe(27,"search"),c.ɵɵtext(28,"\n\n"),c.ɵɵtemplate(29,N,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(31,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,8,"clients")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,10,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,12,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.manageOrganizations),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.manageOrganizations&&t.showAddExisting),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&c.ɵɵpipeBind4(27,14,t.clients,t.searchText,"organizationName","id")))},directives:[b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,w.NgIf,d.RouterLinkWithHref,w.NgForOf,I.AvatarComponent,C.A11yTitleDirective,E.StopClickDirective],pipes:[P.I18nPipe,k.SearchPipe],encapsulation:2})},30330:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOrganizationComponent=void 0;n(68012);const r=n(13816),o=n(32621),a=n(68012),s=n(13816),l=n(72596);class c{constructor(e){this.route=e}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId}))))}}t.CreateOrganizationComponent=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵdirectiveInject(a.ActivatedRoute))},c.ɵcmp=o.ɵɵdefineComponent({type:c,selectors:[["app-create-organization"]],viewQuery:function(e,t){if(1&e&&o.ɵɵviewQuery(r.OrganizationPlansComponent,7),2&e){let e;o.ɵɵqueryRefresh(e=o.ɵɵloadQuery())&&(t.orgPlansComponent=e.first)}},decls:13,vars:7,consts:[[1,"page-header"],[3,"providerId"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelement(11,"app-organization-plans",1),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newClientOrganization")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,5,"newClientOrganizationDesc")),o.ɵɵadvance(3),o.ɵɵproperty("providerId",t.providerId))},directives:[s.OrganizationPlansComponent],pipes:[l.I18nPipe],encapsulation:2})},39167:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptProviderComponent=void 0;n(68012);const r=n(92295),o=(n(91092),n(40349),n(99954),n(77243),n(64696)),a=n(32621),s=n(68012),l=n(40349),c=n(77243),d=n(91092),p=n(99954),u=n(57490),m=n(72596);function h(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}const v=function(e){return{email:e}};function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementStart(16,"strong",13),a.ɵɵtext(17),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"p"),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"hr"),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"div",14),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"a",15),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"a",16),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,8,"joinProvider")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",e.providerName,"\n "),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,10,"joinProviderDesc")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(16,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,12,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(18,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(34,14,"createAccount"),"\n ")}}class g extends r.BaseAcceptComponent{constructor(e,t,n,i,r,o){super(e,o,t,n,i),this.apiService=r,this.failedMessage="providerInviteAcceptFailed",this.requiredParameters=["providerId","providerUserId","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new o.ProviderUserAcceptRequest;t.token=e.token,yield this.apiService.postProviderUserAccept(e.providerId,e.providerUserId,t),this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("providerInviteAcceptedDesc"),{timeout:1e4}),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.providerName=e.providerName}))}}t.AcceptProviderComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(c.StateService),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.PlatformUtilsService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["app-accept-provider"]],features:[a.ɵɵInheritDefinitionFeature],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-block","mt-2"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,h,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,f,41,20,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[u.NgIf,s.RouterLinkWithHref],pipes:[m.I18nPipe],encapsulation:2})},97572:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkConfirmComponent=void 0;const r=n(56747),o=n(95257),a=n(80675),s=n(76473),l=n(32621),c=n(50553),d=n(57490),p=n(52900),u=n(69242),m=n(72596),h=n(68625);function v(e,t){1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,4,"loading"),"\n "))}function f(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",17),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function g(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function y(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,y,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",n.fingerprints.get(e.id),"\n ")}}function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,S,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(16,9,"bulkFilteredMessage"),"\n ")}}function w(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",19),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"table",20),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"thead"),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"tr"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"th",21),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"th"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,x,17,9,"tr",22),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,b,18,11,"tr",22),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,6,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(7,8,"learnMore"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(18,10,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,12,"fingerprint")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.excludedUsers)}}function I(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function E(e,t){1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,I,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,C,2,1,"td",11),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,E,3,3,"td",11),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",n.statuses.has(e.id)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function k(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"table",20),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"thead"),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"tr"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"th",21),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"th"),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵtemplate(18,P,18,10,"tr",22),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,3,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,5,"status")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers)}}function A(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"confirm"))}}class O extends s.BulkConfirmComponent{isAccepted(e){return e.status===a.ProviderUserStatusType.Accepted}getPublicKeys(){return i(this,void 0,void 0,(function*(){const e=new o.ProviderUserBulkRequest(this.filteredUsers.map((e=>e.id)));return yield this.apiService.postProviderUsersPublicKey(this.providerId,e)}))}getCryptoKey(){return this.cryptoService.getProviderKey(this.providerId)}postConfirmRequest(e){return i(this,void 0,void 0,(function*(){const t=new r.ProviderUserBulkConfirmRequest(e);return yield this.apiService.postProviderUserBulkConfirm(this.providerId,t)}))}}t.BulkConfirmComponent=O,O.ɵfac=function(){let e;return function(t){return(e||(e=l.ɵɵgetInheritedFactory(O)))(t||O)}}(),O.ɵcmp=l.ɵɵdefineComponent({type:O,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[l.ɵɵInheritDefinitionFeature],decls:45,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","danger"],["type","error"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",5),l.ɵɵpipe(13,"i18n"),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"span",6),l.ɵɵtext(16,"×"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",7),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,v,6,6,"div",8),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,f,3,3,"app-callout",9),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,g,2,1,"app-callout",10),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,w,31,14,"ng-container",11),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,k,21,7,"ng-container",11),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",12),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,A,9,7,"button",13),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"button",14),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,9,"confirmUsers"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(13,11,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.filteredUsers.length<=0),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.error),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.done),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&t.done),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.done),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(39,13,"close"),"\n "))},directives:[c.A11yTitleDirective,d.NgIf,p.CalloutComponent,d.NgForOf,u.AvatarComponent],pipes:[m.I18nPipe,h.UserNamePipe],encapsulation:2})},60546:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRemoveComponent=void 0;const r=n(95257),o=n(23918),a=n(32621),s=n(50553),l=n(57490),c=n(52900),d=n(69242),p=n(72596),u=n(68625);function m(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",14),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",15),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function v(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",20),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"removeUsersWarning"),"\n "))}function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",24),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function g(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",21),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"app-avatar",22),a.ɵɵpipe(5,"userName"),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"td"),a.ɵɵtext(10),a.ɵɵtemplate(11,f,2,1,"small",23),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵadvance(4),a.ɵɵproperty("data",a.ɵɵpipeBind1(5,6,e))("email",e.email)("circle",!0)("fontSize",14),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",e.email,"\n "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.name)}}function y(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,v,3,3,"app-callout",16),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"table",17),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"thead"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"tr"),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"th",18),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,g,14,8,"tr",19),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.users.length>0&&!e.error),a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,3,"user")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",e.users)}}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",24),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(a.ɵɵelementStart(0,"td"),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function b(e,t){1&e&&(a.ɵɵelementStart(0,"td"),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",21),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"app-avatar",22),a.ɵɵpipe(5,"userName"),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"td"),a.ɵɵtext(10),a.ɵɵtemplate(11,x,2,1,"small",23),a.ɵɵtext(12,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,S,2,1,"td",10),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,b,3,3,"td",10),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("data",a.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",e.email,"\n "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.name),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",n.statuses.has(e.id)),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function I(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"table",17),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"thead"),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"tr"),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"th",18),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"th"),a.ɵɵtext(13),a.ɵɵpipe(14,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,w,18,10,"tr",19),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(9),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,3,"user")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(14,5,"status")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",e.users)}}function C(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",25),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",26),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span"),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext();a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,"removeUsers"))}}class E extends o.BulkRemoveComponent{deleteUsers(){return i(this,void 0,void 0,(function*(){const e=new r.ProviderUserBulkRequest(this.users.map((e=>e.id)));return yield this.apiService.deleteManyProviderUsers(this.providerId,e)}))}}t.BulkRemoveComponent=E,E.ɵfac=function(){let e;return function(t){return(e||(e=a.ɵɵgetInheritedFactory(E)))(t||E)}}(),E.ɵcmp=a.ɵɵdefineComponent({type:E,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[a.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"button",5),a.ɵɵpipe(13,"i18n"),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"span",6),a.ɵɵtext(16,"×"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"div",7),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,m,3,3,"app-callout",8),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,h,2,1,"app-callout",9),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,y,19,5,"ng-container",10),a.ɵɵtext(27,"\n "),a.ɵɵtemplate(28,I,21,7,"ng-container",10),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",11),a.ɵɵtext(32,"\n "),a.ɵɵtemplate(33,C,9,7,"button",12),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"button",13),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(10,8,"removeUsers"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(13,10,"close")),a.ɵɵadvance(10),a.ɵɵproperty("ngIf",t.users.length<=0),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.error),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.done),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.done),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!t.done&&t.users.length>0),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(37,12,"close"),"\n "))},directives:[s.A11yTitleDirective,l.NgIf,c.CalloutComponent,l.NgForOf,d.AvatarComponent],pipes:[p.I18nPipe,u.UserNamePipe],encapsulation:2})},14055:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventsComponent=void 0;n(68012),n(91092),n(38364),n(40349),n(70143),n(99954),n(85556),n(68625),n(62858);const r=n(5869),o=n(32621),a=n(91092),s=n(68012),l=n(62858),c=n(40349),d=n(85556),p=n(38364),u=n(99954),m=n(70143),h=n(68625),v=n(96832),f=n(637),g=n(57490),y=n(72596);function x(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",17),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noEventsInList")))}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",26),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",17),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"td"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",27),o.ɵɵtext(17),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelement(20,"td",28),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,11,e.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),o.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",e.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.userName),o.ɵɵadvance(3),o.ɵɵproperty("innerHTML",e.message,o.ɵɵsanitizeHtml)}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",21),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",22),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",17),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"th",23),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"th",24),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"tbody"),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,b,22,14,"tr",25),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(19,9,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",e.events)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",29,30),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",31),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}function C(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,S,3,3,"p",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,w,32,13,"table",18),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,I,10,8,"button",19),o.ɵɵtext(7,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.events||!e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.events&&e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.continuationToken)}}const E=function(e){return{"bwi-spin":e}},P=function(e){return{loading:e}};class k extends r.BaseEventsComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(n,i,o,a,l),this.apiService=e,this.route=t,this.providerService=r,this.router=s,this.userNamePipe=c,this.exportFileName="provider-events",this.providerUsersUserIdMap=new Map,this.providerUsersIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;const t=yield this.providerService.get(this.providerId);null!=t&&t.useEvents?yield this.load():this.router.navigate(["/providers",this.providerId])}))))}))}load(){return i(this,void 0,void 0,(function*(){(yield this.apiService.getProviderUsers(this.providerId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.providerUsersIdMap.set(e.id,{name:t,email:e.email}),this.providerUsersUserIdMap.set(e.userId,{name:t,email:e.email})})),yield this.loadEvents(!0),this.loaded=!0}))}requestEvents(e,t,n){return this.apiService.getEventsProvider(this.providerId,e,t,n)}getUserName(e,t){return null!=t&&this.providerUsersUserIdMap.has(t)?this.providerUsersUserIdMap.get(t):null}}t.EventsComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.ProviderService),o.ɵɵdirectiveInject(p.ExportService),o.ɵɵdirectiveInject(u.PlatformUtilsService),o.ɵɵdirectiveInject(s.Router),o.ɵɵdirectiveInject(m.LogService),o.ɵɵdirectiveInject(h.UserNamePipe))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["provider-events"]],features:[o.ɵɵInheritDefinitionFeature],decls:57,vars:35,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"d-inline",3,"appApiAction"],["refreshForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["exportForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","btn-submit","manual","ml-3",3,"ngClass","disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["width","150",1,"border-top-0"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["aria-hidden","true",3,"title"],[3,"title"],[3,"innerHTML"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",1),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",2),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",3),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",4),o.ɵɵlistener("ngModelChange",(function(e){return t.start=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",5),o.ɵɵtext(18,"-"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"label",6),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"input",7),o.ɵɵlistener("ngModelChange",(function(e){return t.end=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"form",8,9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"button",10),o.ɵɵlistener("click",(function(){return t.loadEvents(!0)})),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",11),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"form",8,12),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",13),o.ɵɵlistener("click",(function(){return t.exportEvents()})),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",14),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵtemplate(53,x,9,6,"ng-container",15),o.ɵɵtext(54,"\n"),o.ɵɵtemplate(55,C,8,3,"ng-container",15),o.ɵɵtext(56,"\n")),2&e){const e=o.ɵɵreference(29),n=o.ɵɵreference(39);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"eventLogs")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,19,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,21,"startDate")),o.ɵɵproperty("ngModel",t.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(22,23,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(25,25,"endDate")),o.ɵɵproperty("ngModel",t.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.refreshPromise),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loaded&&e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(31,E,t.loaded&&e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(35,27,"refresh"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.exportPromise),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(33,P,n.loading))("disabled",t.loaded&&n.loading||t.dirtyDates),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"export")),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded)}},directives:[v.DefaultValueAccessor,v.NgControlStatus,v.NgModel,v.ɵNgNoValidate,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgClass,g.NgIf,g.NgForOf],pipes:[y.I18nPipe,g.DatePipe],encapsulation:2})},89029:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManageComponent=void 0;n(68012),n(85556);const r=n(32621),o=n(68012),a=n(85556),s=n(57490),l=n(72596);function c(e,t){1&e&&(r.ɵɵelementStart(0,"a",10),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"people"),"\n "))}function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",11),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"eventLogs"),"\n "))}function p(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",5),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",6),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",7),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,c,3,3,"a",8),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,d,3,3,"a",9),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"manage")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.provider.canManageUsers),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.provider.canAccessEventLogs&&e.accessEvents)}}class u{constructor(e,t){this.route=e,this.providerService=t,this.accessEvents=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.provider=yield this.providerService.get(e.providerId),this.accessEvents=this.provider.useEvents}))))}}t.ManageComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService))},u.ɵcmp=r.ɵɵdefineComponent({type:u,selectors:[["provider-manage"]],decls:16,vars:1,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","people","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","events","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","people","routerLinkActive","active",1,"list-group-item"],["routerLink","events","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,p,13,5,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10,"\n "),r.ɵɵelement(11,"router-outlet"),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n")),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngIf",t.provider))},directives:[s.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[l.I18nPipe],encapsulation:2})},20873:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PeopleComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(91092),n(82058),n(40349),n(70143),n(99954),n(85556),n(14170),n(77243),n(29546),n(9941),n(80675)),s=n(47073),l=(n(35734),n(68625),n(95257)),c=n(73046),d=n(14914),p=n(42983),u=n(26530),m=n(97572),h=n(60546),v=n(21781),f=n(32621),g=n(91092),y=n(68012),x=n(40349),S=n(29546),b=n(99954),w=n(82058),I=n(14170),C=n(9941),E=n(70143),P=n(35734),k=n(68625),A=n(77243),O=n(85556),T=n(57490),M=n(96832),D=n(50553),B=n(80507),R=n(52900),U=n(92521),V=n(69242),F=n(72596),N=["addEdit"],_=["groupsTemplate"],j=["eventsTemplate"],z=["bulkStatusTemplate"],L=["bulkConfirmTemplate"],K=["bulkRemoveTemplate"];function q(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",30),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.allCount)}}function G(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",30),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.invitedCount)}}function W(e,t){if(1&e&&(f.ɵɵelementStart(0,"span",31),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext();f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.acceptedCount)}}function H(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"button",32),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);return f.ɵɵnextContext().bulkConfirm()})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",33),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"confirmSelected"),"\n "))}function $(e,t){1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",34),f.ɵɵpipe(3,"i18n"),f.ɵɵtext(4,"\n "),f.ɵɵelementStart(5,"span",35),f.ɵɵtext(6),f.ɵɵpipe(7,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(8,"\n"),f.ɵɵelementContainerEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(3,2,"loading")),f.ɵɵadvance(4),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(7,4,"loading")))}function Q(e,t){1&e&&(f.ɵɵelementStart(0,"p"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"noUsersInList")))}function Y(e,t){1&e&&(f.ɵɵelementStart(0,"app-callout",39),f.ɵɵpipe(1,"i18n"),f.ɵɵtext(2),f.ɵɵpipe(3,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(1,2,"confirmUsers")),f.ɵɵadvance(2),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(3,4,"providerUsersNeedConfirmed"),"\n "))}function J(e,t){1&e&&(f.ɵɵelementStart(0,"span",57),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"invited")))}function X(e,t){1&e&&(f.ɵɵelementStart(0,"span",58),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"accepted")))}function Z(e,t){if(1&e&&(f.ɵɵelementStart(0,"small",59),f.ɵɵtext(1),f.ɵɵelementEnd()),2&e){const e=f.ɵɵnextContext().$implicit;f.ɵɵadvance(1),f.ɵɵtextInterpolate(e.name)}}function ee(e,t){1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",60),f.ɵɵpipe(3,"i18n"),f.ɵɵtext(4,"\n "),f.ɵɵelementStart(5,"span",35),f.ɵɵtext(6),f.ɵɵpipe(7,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(8,"\n "),f.ɵɵelementContainerEnd()),2&e&&(f.ɵɵadvance(2),f.ɵɵpropertyInterpolate("title",f.ɵɵpipeBind1(3,2,"userUsingTwoStep")),f.ɵɵadvance(4),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(7,4,"userUsingTwoStep")))}function te(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"providerAdmin")))}function ne(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"serviceUser")))}function ie(e,t){1&e&&(f.ɵɵelementStart(0,"span"),f.ɵɵtext(1),f.ɵɵpipe(2,"i18n"),f.ɵɵelementEnd()),2&e&&(f.ɵɵadvance(1),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(2,1,"custom")))}function re(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",61),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).reinvite(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",14),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function oe(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",62),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).confirm(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",33),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function ae(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",61),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).groups(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",63),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"groups"),"\n "))}function se(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"a",61),f.ɵɵlistener("click",(function(){f.ɵɵrestoreView(e);const t=f.ɵɵnextContext().$implicit;return f.ɵɵnextContext(3).events(t)})),f.ɵɵtext(1,"\n "),f.ɵɵelement(2,"i",64),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd()}2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function le(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementStart(0,"tr"),f.ɵɵtext(1,"\n "),f.ɵɵelementStart(2,"td",40),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).checkUser(t)})),f.ɵɵtext(3,"\n "),f.ɵɵelementStart(4,"input",41),f.ɵɵlistener("ngModelChange",(function(t){return f.ɵɵrestoreView(e).$implicit.checked=t})),f.ɵɵelementEnd(),f.ɵɵtext(5,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(6,"\n "),f.ɵɵelementStart(7,"td",42),f.ɵɵtext(8,"\n "),f.ɵɵelementStart(9,"app-avatar",43),f.ɵɵpipe(10,"userName"),f.ɵɵtext(11,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(12,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(13,"\n "),f.ɵɵelementStart(14,"td"),f.ɵɵtext(15,"\n "),f.ɵɵelementStart(16,"a",44),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).edit(t)})),f.ɵɵtext(17),f.ɵɵelementEnd(),f.ɵɵtext(18,"\n "),f.ɵɵtemplate(19,J,3,3,"span",45),f.ɵɵtext(20,"\n "),f.ɵɵtemplate(21,X,3,3,"span",46),f.ɵɵtext(22,"\n "),f.ɵɵtemplate(23,Z,2,1,"small",47),f.ɵɵtext(24,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(25,"\n "),f.ɵɵelementStart(26,"td"),f.ɵɵtext(27,"\n "),f.ɵɵtemplate(28,ee,9,6,"ng-container",23),f.ɵɵtext(29,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(30,"\n "),f.ɵɵelementStart(31,"td"),f.ɵɵtext(32,"\n "),f.ɵɵtemplate(33,te,3,3,"span",23),f.ɵɵtext(34,"\n "),f.ɵɵtemplate(35,ne,3,3,"span",23),f.ɵɵtext(36,"\n "),f.ɵɵtemplate(37,ie,3,3,"span",23),f.ɵɵtext(38,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(39,"\n "),f.ɵɵelementStart(40,"td",48),f.ɵɵtext(41,"\n "),f.ɵɵelementStart(42,"div",49),f.ɵɵtext(43,"\n "),f.ɵɵelementStart(44,"button",50),f.ɵɵpipe(45,"i18n"),f.ɵɵtext(46,"\n "),f.ɵɵelement(47,"i",51),f.ɵɵtext(48,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(49,"\n "),f.ɵɵelementStart(50,"div",52),f.ɵɵtext(51,"\n "),f.ɵɵtemplate(52,re,5,3,"a",53),f.ɵɵtext(53,"\n "),f.ɵɵtemplate(54,oe,5,3,"a",54),f.ɵɵtext(55,"\n "),f.ɵɵtemplate(56,ae,5,3,"a",53),f.ɵɵtext(57,"\n "),f.ɵɵtemplate(58,se,5,3,"a",53),f.ɵɵtext(59,"\n "),f.ɵɵelementStart(60,"a",55),f.ɵɵlistener("click",(function(){const t=f.ɵɵrestoreView(e).$implicit;return f.ɵɵnextContext(3).remove(t)})),f.ɵɵtext(61,"\n "),f.ɵɵelement(62,"i",56),f.ɵɵtext(63),f.ɵɵpipe(64,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(65,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(66,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(67,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(68,"\n "),f.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=f.ɵɵnextContext(3);f.ɵɵadvance(4),f.ɵɵproperty("ngModel",e.checked),f.ɵɵadvance(5),f.ɵɵproperty("data",f.ɵɵpipeBind1(10,19,e))("email",e.email)("circle",!0)("fontSize",14),f.ɵɵadvance(8),f.ɵɵtextInterpolate(e.email),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.name),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",e.twoFactorEnabled),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",e.type===n.userType.ProviderAdmin),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.type===n.userType.ServiceUser),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.type===n.userType.Custom),f.ɵɵadvance(7),f.ɵɵpropertyInterpolate("appA11yTitle",f.ɵɵpipeBind1(45,21,"options")),f.ɵɵadvance(8),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",n.accessGroups),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",n.accessEvents&&e.status===n.userStatusType.Confirmed),f.ɵɵadvance(5),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(64,23,"remove"),"\n ")}}function ce(e,t){if(1&e){const e=f.ɵɵgetCurrentView();f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵtemplate(2,Y,4,6,"app-callout",36),f.ɵɵtext(3,"\n "),f.ɵɵelementStart(4,"table",37),f.ɵɵlistener("scrolled",(function(){f.ɵɵrestoreView(e);return f.ɵɵnextContext(2).loadMore()})),f.ɵɵtext(5,"\n "),f.ɵɵelementStart(6,"tbody"),f.ɵɵtext(7,"\n "),f.ɵɵtemplate(8,le,69,25,"tr",38),f.ɵɵtext(9,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(10,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(11,"\n "),f.ɵɵelementContainerEnd()}if(2&e){const e=f.ɵɵnextContext().ngIf,t=f.ɵɵnextContext();f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.showConfirmUsers),f.ɵɵadvance(2),f.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),f.ɵɵadvance(4),f.ɵɵproperty("ngForOf",e)}}function de(e,t){if(1&e&&(f.ɵɵelementContainerStart(0),f.ɵɵtext(1,"\n "),f.ɵɵtemplate(2,Q,3,3,"p",23),f.ɵɵtext(3,"\n "),f.ɵɵtemplate(4,ce,12,4,"ng-container",23),f.ɵɵtext(5,"\n"),f.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;f.ɵɵadvance(2),f.ɵɵproperty("ngIf",!e.length),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",e.length)}}function pe(e,t){}function ue(e,t){}function me(e,t){}function he(e,t){}function ve(e,t){}function fe(e,t){}const ge=function(e){return{active:e}},ye=function(e,t){return[e,t,"name","email","id"]};class xe extends d.BasePeopleComponent{constructor(e,t,n,i,r,o,l,c,d,p,u,m,h,v){super(e,c,n,r,o,d,i,p,u,m,h),this.route=t,this.router=l,this.providerService=v,this.userType=s.ProviderUserType,this.userStatusType=a.ProviderUserStatusType,this.accessEvents=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;const t=yield this.providerService.get(this.providerId);t.canManageUsers?(this.accessEvents=t.useEvents,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.searchText=e.search,null!=e.viewEvents){const t=this.users.filter((t=>t.id===e.viewEvents));t.length>0&&t[0].status===a.ProviderUserStatusType.Confirmed&&this.events(t[0])}}))))):this.router.navigate(["../"],{relativeTo:this.route})}))))}getUsers(){return this.apiService.getProviderUsers(this.providerId)}deleteUser(e){return this.apiService.deleteProviderUser(this.providerId,e)}reinviteUser(e){return this.apiService.postProviderUserReinvite(this.providerId,e)}confirmUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getProviderKey(this.providerId),i=yield this.cryptoService.rsaEncrypt(n.key,t.buffer),r=new c.ProviderUserConfirmRequest;r.key=i.encryptedString,yield this.apiService.postProviderUserConfirm(this.providerId,e.id,r)}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(v.UserAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.providerId=this.providerId,n.providerUserId=null!=e?e.id:null,n.onSavedUser.subscribe((()=>{t.close(),this.load()})),n.onDeletedUser.subscribe((()=>{t.close(),this.removeUser(e)}))}))}))}events(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(u.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=this.userNamePipe.transform(e),t.providerId=this.providerId,t.entityId=e.id,t.showUser=!1,t.entity="user"}))}))}bulkRemove(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(h.BulkRemoveComponent,this.bulkRemoveModalRef,(e=>{e.providerId=this.providerId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}bulkReinvite(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const e=this.getCheckedUsers(),t=e.filter((e=>e.status===a.ProviderUserStatusType.Invited));if(t.length<=0)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable"));else{try{const n=new l.ProviderUserBulkRequest(t.map((e=>e.id))),i=this.apiService.postManyProviderUserReinvite(this.providerId,n);this.showBulkStatus(e,t,i,this.i18nService.t("bulkReinviteMessage"))}catch(n){this.validationService.showError(n)}this.actionPromise=null}}))}bulkConfirm(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(m.BulkConfirmComponent,this.bulkConfirmModalRef,(e=>{e.providerId=this.providerId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}showBulkStatus(e,t,n,r){return i(this,void 0,void 0,(function*(){const[i,o]=yield this.modalService.openViewRef(p.BulkStatusComponent,this.bulkStatusModalRef,(e=>{e.loading=!0}));let a=!1;i.onShown.subscribe((()=>{a&&i.close()}));try{const a=yield n;if(i){const n=a.data.filter((e=>""!==e.error)).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t.error})),{}),i=t.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t})),{});o.users=e.map((e=>{var t;let o=null!==(t=n[e.id])&&void 0!==t?t:r;return i.hasOwnProperty(e.id)||(o=this.i18nService.t("bulkFilteredMessage")),{user:e,error:n.hasOwnProperty(e.id),message:o}})),o.loading=!1}}catch(s){a=!0,i.close()}}))}}t.PeopleComponent=xe,xe.ɵfac=function(e){return new(e||xe)(f.ɵɵdirectiveInject(g.ApiService),f.ɵɵdirectiveInject(y.ActivatedRoute),f.ɵɵdirectiveInject(x.I18nService),f.ɵɵdirectiveInject(S.ModalService),f.ɵɵdirectiveInject(b.PlatformUtilsService),f.ɵɵdirectiveInject(w.CryptoService),f.ɵɵdirectiveInject(y.Router),f.ɵɵdirectiveInject(I.SearchService),f.ɵɵdirectiveInject(C.ValidationService),f.ɵɵdirectiveInject(E.LogService),f.ɵɵdirectiveInject(P.SearchPipe),f.ɵɵdirectiveInject(k.UserNamePipe),f.ɵɵdirectiveInject(A.StateService),f.ɵɵdirectiveInject(O.ProviderService))},xe.ɵcmp=f.ɵɵdefineComponent({type:xe,selectors:[["provider-people"]],viewQuery:function(e,t){if(1&e&&(f.ɵɵviewQuery(N,7,r.ViewContainerRef),f.ɵɵviewQuery(_,7,r.ViewContainerRef),f.ɵɵviewQuery(j,7,r.ViewContainerRef),f.ɵɵviewQuery(z,7,r.ViewContainerRef),f.ɵɵviewQuery(L,7,r.ViewContainerRef),f.ɵɵviewQuery(K,7,r.ViewContainerRef)),2&e){let e;f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.addEditModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.groupsModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.eventsModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkStatusModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkConfirmModalRef=e.first),f.ɵɵqueryRefresh(e=f.ɵɵloadQuery())&&(t.bulkRemoveModalRef=e.first)}},features:[f.ɵɵInheritDefinitionFeature],decls:110,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"dropdown-divider"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["eventsTemplate",""],["confirmTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","bwi bwi-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-remove"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-lock",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sitemap"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"]],template:function(e,t){1&e&&(f.ɵɵelementStart(0,"div",0),f.ɵɵtext(1,"\n "),f.ɵɵelementStart(2,"h1"),f.ɵɵtext(3),f.ɵɵpipe(4,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(5,"\n "),f.ɵɵelementStart(6,"div",1),f.ɵɵtext(7,"\n "),f.ɵɵelementStart(8,"div",2),f.ɵɵtext(9,"\n "),f.ɵɵelementStart(10,"button",3),f.ɵɵlistener("click",(function(){return t.filter(null)})),f.ɵɵtext(11),f.ɵɵpipe(12,"i18n"),f.ɵɵtemplate(13,q,2,1,"span",4),f.ɵɵtext(14,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(15,"\n "),f.ɵɵelementStart(16,"button",3),f.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),f.ɵɵtext(17),f.ɵɵpipe(18,"i18n"),f.ɵɵtemplate(19,G,2,1,"span",4),f.ɵɵtext(20,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(21,"\n "),f.ɵɵelementStart(22,"button",3),f.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),f.ɵɵtext(23),f.ɵɵpipe(24,"i18n"),f.ɵɵtemplate(25,W,2,1,"span",5),f.ɵɵtext(26,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(27,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(28,"\n "),f.ɵɵelementStart(29,"div",6),f.ɵɵtext(30,"\n "),f.ɵɵelementStart(31,"label",7),f.ɵɵtext(32),f.ɵɵpipe(33,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(34,"\n "),f.ɵɵelementStart(35,"input",8),f.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),f.ɵɵpipe(36,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(37,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(38,"\n "),f.ɵɵelementStart(39,"div",9),f.ɵɵtext(40,"\n "),f.ɵɵelementStart(41,"button",10),f.ɵɵpipe(42,"i18n"),f.ɵɵtext(43,"\n "),f.ɵɵelement(44,"i",11),f.ɵɵtext(45,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(46,"\n "),f.ɵɵelementStart(47,"div",12),f.ɵɵtext(48,"\n "),f.ɵɵelementStart(49,"button",13),f.ɵɵlistener("click",(function(){return t.bulkReinvite()})),f.ɵɵtext(50,"\n "),f.ɵɵelement(51,"i",14),f.ɵɵtext(52),f.ɵɵpipe(53,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(54,"\n "),f.ɵɵtemplate(55,H,5,3,"button",15),f.ɵɵtext(56,"\n "),f.ɵɵelementStart(57,"button",16),f.ɵɵlistener("click",(function(){return t.bulkRemove()})),f.ɵɵtext(58,"\n "),f.ɵɵelement(59,"i",17),f.ɵɵtext(60),f.ɵɵpipe(61,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(62,"\n "),f.ɵɵelement(63,"div",18),f.ɵɵtext(64,"\n "),f.ɵɵelementStart(65,"button",13),f.ɵɵlistener("click",(function(){return t.selectAll(!0)})),f.ɵɵtext(66,"\n "),f.ɵɵelement(67,"i",19),f.ɵɵtext(68),f.ɵɵpipe(69,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(70,"\n "),f.ɵɵelementStart(71,"button",13),f.ɵɵlistener("click",(function(){return t.selectAll(!1)})),f.ɵɵtext(72,"\n "),f.ɵɵelement(73,"i",20),f.ɵɵtext(74),f.ɵɵpipe(75,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(76,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(77,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(78,"\n "),f.ɵɵelementStart(79,"button",21),f.ɵɵlistener("click",(function(){return t.invite()})),f.ɵɵtext(80,"\n "),f.ɵɵelement(81,"i",22),f.ɵɵtext(82),f.ɵɵpipe(83,"i18n"),f.ɵɵelementEnd(),f.ɵɵtext(84,"\n "),f.ɵɵelementEnd(),f.ɵɵtext(85,"\n"),f.ɵɵelementEnd(),f.ɵɵtext(86,"\n"),f.ɵɵtemplate(87,$,9,6,"ng-container",23),f.ɵɵtext(88,"\n"),f.ɵɵtemplate(89,de,6,2,"ng-container",23),f.ɵɵpipe(90,"search"),f.ɵɵtext(91,"\n"),f.ɵɵtemplate(92,pe,0,0,"ng-template",null,24,f.ɵɵtemplateRefExtractor),f.ɵɵtext(94,"\n"),f.ɵɵtemplate(95,ue,0,0,"ng-template",null,25,f.ɵɵtemplateRefExtractor),f.ɵɵtext(97,"\n"),f.ɵɵtemplate(98,me,0,0,"ng-template",null,26,f.ɵɵtemplateRefExtractor),f.ɵɵtext(100,"\n"),f.ɵɵtemplate(101,he,0,0,"ng-template",null,27,f.ɵɵtemplateRefExtractor),f.ɵɵtext(103,"\n"),f.ɵɵtemplate(104,ve,0,0,"ng-template",null,28,f.ɵɵtemplateRefExtractor),f.ɵɵtext(106,"\n"),f.ɵɵtemplate(107,fe,0,0,"ng-template",null,29,f.ɵɵtemplateRefExtractor),f.ɵɵtext(109,"\n")),2&e&&(f.ɵɵadvance(3),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(4,22,"people")),f.ɵɵadvance(7),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(52,ge,null==t.status)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(12,24,"all"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.allCount),f.ɵɵadvance(3),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(54,ge,t.status==t.userStatusType.Invited)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(18,26,"invited"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.invitedCount),f.ɵɵadvance(3),f.ɵɵproperty("ngClass",f.ɵɵpureFunction1(56,ge,t.status==t.userStatusType.Accepted)),f.ɵɵadvance(1),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(24,28,"accepted"),"\n "),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",t.acceptedCount),f.ɵɵadvance(7),f.ɵɵtextInterpolate(f.ɵɵpipeBind1(33,30,"search")),f.ɵɵadvance(3),f.ɵɵpropertyInterpolate("placeholder",f.ɵɵpipeBind1(36,32,"search")),f.ɵɵproperty("ngModel",t.searchText),f.ɵɵadvance(6),f.ɵɵpropertyInterpolate("appA11yTitle",f.ɵɵpipeBind1(42,34,"options")),f.ɵɵadvance(11),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(53,36,"reinviteSelected"),"\n "),f.ɵɵadvance(3),f.ɵɵproperty("ngIf",t.showBulkConfirmUsers),f.ɵɵadvance(5),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(61,38,"remove"),"\n "),f.ɵɵadvance(8),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(69,40,"selectAll"),"\n "),f.ɵɵadvance(6),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(75,42,"unselectAll"),"\n "),f.ɵɵadvance(8),f.ɵɵtextInterpolate1("\n ",f.ɵɵpipeBind1(83,44,"inviteUser"),"\n "),f.ɵɵadvance(5),f.ɵɵproperty("ngIf",t.loading),f.ɵɵadvance(2),f.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:f.ɵɵpipeBindV(90,46,f.ɵɵpureFunction2(58,ye,t.users,t.searchText)))))},directives:[T.NgClass,T.NgIf,M.DefaultValueAccessor,M.NgControlStatus,M.NgModel,D.A11yTitleDirective,B.StopClickDirective,T.NgForOf,R.CalloutComponent,M.CheckboxControlValueAccessor,U.StopPropDirective,V.AvatarComponent],pipes:[F.I18nPipe,P.SearchPipe,k.UserNamePipe],encapsulation:2})},21781:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAddEditComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(88968)),a=n(35629),s=n(47073),l=n(54372),c=n(32621),d=n(91092),p=n(40349),u=n(99954),m=n(70143),h=n(96832),v=n(637),f=n(57490),g=n(50553),y=n(72596);function x(e,t){if(1&e&&(c.ɵɵelementStart(0,"small",16),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function S(e,t){1&e&&(c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",18),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",19),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",28),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"label",29),c.ɵɵtext(9),c.ɵɵpipe(10,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",30),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).emails=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"small",16),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,4,"providerInviteUserDesc")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(10,6,"email")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.emails),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(16,8,"inviteMultipleEmailDesc","20"))}}function w(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,b,19,11,"ng-container",20),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h3"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementStart(7,"a",21),c.ɵɵpipe(8,"i18n"),c.ɵɵtext(9,"\n "),c.ɵɵelement(10,"i",22),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",23),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"input",24),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().type=t})),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"label",25),c.ɵɵtext(19),c.ɵɵpipe(20,"i18n"),c.ɵɵelementStart(21,"small"),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementStart(27,"div",23),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"input",26),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().type=t})),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"label",27),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementStart(34,"small"),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.editMode),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(6,11,"userType"),"\n "),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(8,13,"learnMore")),c.ɵɵadvance(9),c.ɵɵproperty("value",e.userType.ServiceUser)("ngModel",e.type),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(20,15,"serviceUser"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,17,"serviceUserDesc")),c.ɵɵadvance(7),c.ɵɵproperty("value",e.userType.ProviderAdmin)("ngModel",e.type),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(33,19,"providerAdmin"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(36,21,"providerAdminDesc"))}}function I(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",31,32),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",33),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",34),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext();c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}class C{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedUser=new r.EventEmitter,this.onDeletedUser=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.type=s.ProviderUserType.ServiceUser,this.permissions=new a.PermissionsApi,this.showCustom=!1,this.access="selected",this.userType=s.ProviderUserType}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.providerUserId,this.editMode){this.editMode=!0,this.title=this.i18nService.t("editUser");try{const e=yield this.apiService.getProviderUser(this.providerId,this.providerUserId);this.type=e.type}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteUser");this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{if(this.editMode){const e=new l.ProviderUserUpdateRequest;e.type=this.type,this.formPromise=this.apiService.putProviderUser(this.providerId,this.providerUserId,e)}else{const e=new o.ProviderUserInviteRequest;e.emails=this.emails.trim().split(/\s*,\s*/),e.type=this.type,this.formPromise=this.apiService.postProviderUserInvite(this.providerId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit()}catch(e){this.logService.error(e)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteProviderUser(this.providerId,this.providerUserId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit()}catch(e){this.logService.error(e)}}))}}t.UserAddEditComponent=C,C.ɵfac=function(e){return new(e||C)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},C.ɵcmp=c.ɵɵdefineComponent({type:C,selectors:[["provider-user-add-edit"]],inputs:{name:"name",providerUserId:"providerUserId",providerId:"providerId"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/provider-users/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeServiceUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeServiceUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeProviderAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeProviderAdmin",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵtemplate(11,x,2,1,"small",6),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"button",7),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"span",8),c.ɵɵtext(18,"×"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,S,9,6,"div",9),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,w,40,23,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",10),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"button",11),c.ɵɵtext(29,"\n "),c.ɵɵelement(30,"i",12),c.ɵɵpipe(31,"i18n"),c.ɵɵtext(32,"\n "),c.ɵɵelementStart(33,"span"),c.ɵɵtext(34),c.ɵɵpipe(35,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"button",13),c.ɵɵtext(39),c.ɵɵpipe(40,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"div",14),c.ɵɵtext(43,"\n "),c.ɵɵtemplate(44,I,9,10,"button",15),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",t.title,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",t.name),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(15,11,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(31,13,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(35,15,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(40,17,"cancel"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.editMode)}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.NgIf,g.A11yTitleDirective,h.RadioControlValueAccessor,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,h.RequiredValidator],pipes:[y.I18nPipe],encapsulation:2})},27395:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersLayoutComponent=void 0;n(68012),n(85556);const r=n(32621),o=n(68012),a=n(85556),s=n(64052),l=n(57490),c=n(14992),d=n(69242),p=n(72596);function u(e,t){1&e&&(r.ɵɵelementStart(0,"div",11),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",13),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"providerIsDisabled"),"\n "))}function m(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",15),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",19),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",20),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("routerLink",e.manageRoute),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,2,"manage"),"\n ")}}function h(e,t){1&e&&(r.ɵɵelementStart(0,"li",15),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",21),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",22),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"settings"),"\n "))}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",15),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",16),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",17),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,m,8,4,"li",18),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,h,8,3,"li",18),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,3,"clients"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showManageTab),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.showSettingsTab)}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",4),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",5),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"app-avatar",6),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"div",7),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span"),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"small",8),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,u,8,3,"div",9),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵtemplate(23,v,15,5,"ul",10),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(8),r.ɵɵproperty("data",e.provider.name)("circle",!0),r.ɵɵadvance(5),r.ɵɵtextInterpolate(e.provider.name),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(17,6,"provider")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.provider.enabled),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.showMenuBar)}}class g{constructor(e,t){this.route=e,this.providerService=t}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId,yield this.load()}))))}load(){return i(this,void 0,void 0,(function*(){this.provider=yield this.providerService.get(this.providerId)}))}get showMenuBar(){return this.showManageTab||this.showSettingsTab}get showManageTab(){return this.provider.canManageUsers||this.provider.canAccessEventLogs}get showSettingsTab(){return this.provider.isProviderAdmin}get manageRoute(){switch(!0){case this.provider.canManageUsers:return"manage/people";case this.provider.canAccessEventLogs:return"manage/events"}}}t.ProvidersLayoutComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["providers-layout"]],decls:11,vars:1,consts:[["class","org-nav",4,"ngIf"],[1,"container","page-content"],[1,"org-nav"],[1,"container","d-flex"],[1,"d-flex","flex-column"],[1,"my-auto","d-flex","align-items-center","pl-1"],["size","45",3,"data","circle"],[1,"org-name","ml-3"],[1,"text-muted"],["class","ml-3 card border-danger text-danger bg-transparent",4,"ngIf"],["class","nav nav-tabs",4,"ngIf"],[1,"ml-3","card","border-danger","text-danger","bg-transparent"],[1,"card-body","py-2"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","clients","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-bank"],["class","nav-item",4,"ngIf"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-sliders"],["routerLink","settings","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-cogs"]],template:function(e,t){1&e&&(r.ɵɵelement(0,"app-navbar"),r.ɵɵtext(1,"\n"),r.ɵɵtemplate(2,f,27,8,"div",0),r.ɵɵtext(3,"\n"),r.ɵɵelementStart(4,"div",1),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"router-outlet"),r.ɵɵtext(7,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n"),r.ɵɵelement(9,"app-footer"),r.ɵɵtext(10,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.provider))},directives:[s.NavbarComponent,l.NgIf,o.RouterOutlet,c.FooterComponent,d.AvatarComponent,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[p.I18nPipe],encapsulation:2})},22654:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersRoutingModule=void 0;const i=n(68012),r=n(22306),o=n(49618),a=n(65504),s=n(30330),l=n(39167),c=n(14055),d=n(89029),p=n(20873),u=n(27395),m=n(89853),h=n(5987),v=n(3896),f=n(94113),g=n(32051),y=n(25060),x=n(89183),S=n(31980),b=n(32621),w=(n(68012),[{path:"",canActivate:[r.AuthGuardService],component:g.ProvidersComponent},{path:"",component:f.FrontendLayoutComponent,children:[{path:"setup-provider",component:h.SetupProviderComponent,data:{titleId:"setupProvider"}},{path:"accept-provider",component:l.AcceptProviderComponent,data:{titleId:"acceptProvider"}}]},{path:"",canActivate:[r.AuthGuardService],children:[{path:"setup",component:v.SetupComponent},{path:":providerId",component:u.ProvidersLayoutComponent,canActivate:[y.ProviderGuardService],children:[{path:"",pathMatch:"full",redirectTo:"clients"},{path:"clients/create",component:s.CreateOrganizationComponent},{path:"clients",component:a.ClientsComponent,data:{titleId:"clients"}},{path:"manage",component:d.ManageComponent,children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"people",component:p.PeopleComponent,canActivate:[x.ProviderTypeGuardService],data:{titleId:"people",permissions:[o.Permissions.ManageUsers]}},{path:"events",component:c.EventsComponent,canActivate:[x.ProviderTypeGuardService],data:{titleId:"eventLogs",permissions:[o.Permissions.AccessEventLogs]}}]},{path:"settings",component:m.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:S.AccountComponent,canActivate:[x.ProviderTypeGuardService],data:{titleId:"myProvider",permissions:[o.Permissions.ManageProvider]}}]}]}]}]);class I{}t.ProvidersRoutingModule=I,I.ɵfac=function(e){return new(e||I)},I.ɵmod=b.ɵɵdefineNgModule({type:I}),I.ɵinj=b.ɵɵdefineInjector({imports:[[i.RouterModule.forChild(w)],i.RouterModule]})},69169:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersModule=void 0;const i=n(57490),r=(n(32621),n(96832)),o=(n(29546),n(25060)),a=n(89183),s=n(22397),l=n(22654),c=n(79673),d=n(12353),p=n(32621),u=n(29546);class m{constructor(e,t){e.registerComponentFactoryResolver(c.AddOrganizationComponent,t)}}t.ProvidersModule=m,m.ɵfac=function(e){return new(e||m)(p.ɵɵinject(u.ModalService),p.ɵɵinject(p.ComponentFactoryResolver))},m.ɵmod=p.ɵɵdefineNgModule({type:m}),m.ɵinj=p.ɵɵdefineInjector({providers:[s.WebProviderService,o.ProviderGuardService,a.ProviderTypeGuardService],imports:[[i.CommonModule,r.FormsModule,d.OssModule,l.ProvidersRoutingModule]]})},25060:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderGuardService=void 0;n(68012),n(40349),n(99954),n(85556);const r=n(32621),o=n(68012),a=n(99954),s=n(40349),l=n(85556);class c{constructor(e,t,n,i){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.providerService=i}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.providerService.get(e.params.providerId);return null==t?(this.router.navigate(["/"]),!1):!(!t.isProviderAdmin&&!t.enabled)||(this.platformUtilsService.showToast("error",null,this.i18nService.t("providerIsDisabled")),this.router.navigate(["/"]),!1)}))}}t.ProviderGuardService=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵinject(o.Router),r.ɵɵinject(a.PlatformUtilsService),r.ɵɵinject(s.I18nService),r.ɵɵinject(l.ProviderService))},c.ɵprov=r.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},89183:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderTypeGuardService=void 0;n(68012),n(85556);const r=n(49618),o=n(32621),a=n(85556),s=n(68012);class l{constructor(e,t){this.providerService=e,this.router=t}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.providerService.get(e.params.providerId),n=null==e.data?null:e.data.permissions;return!!(-1!==n.indexOf(r.Permissions.AccessEventLogs)&&t.canAccessEventLogs||-1!==n.indexOf(r.Permissions.ManageProvider)&&t.isProviderAdmin||-1!==n.indexOf(r.Permissions.ManageUsers)&&t.canManageUsers)||(this.router.navigate(["/providers",t.id]),!1)}))}}t.ProviderTypeGuardService=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.ProviderService),o.ɵɵinject(s.Router))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},22397:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebProviderService=void 0;n(91092),n(82058),n(2173);const r=n(41724),o=n(32621),a=n(82058),s=n(2173),l=n(91092);class c{constructor(e,t,n){this.cryptoService=e,this.syncService=t,this.apiService=n}addOrganizationToProvider(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getOrgKey(t),i=yield this.cryptoService.getProviderKey(e),o=yield this.cryptoService.encrypt(n.key,i),a=new r.ProviderAddOrganizationRequest;a.organizationId=t,a.key=o.encryptedString;const s=yield this.apiService.postProviderAddOrganization(e,a);return yield this.syncService.fullSync(!0),s}))}detachOrganizastion(e,t){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteProviderOrganization(e,t),yield this.syncService.fullSync(!0)}))}}t.WebProviderService=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵinject(a.CryptoService),o.ɵɵinject(s.SyncService),o.ɵɵinject(l.ApiService))},c.ɵprov=o.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},31980:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954),n(2173);const r=n(40084),o=n(32621),a=n(91092),s=n(40349),l=n(68012),c=n(2173),d=n(99954),p=n(70143),u=n(57490),m=n(96832),h=n(637),v=n(69242),f=n(72596);function g(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",3),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",5,6),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",7),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",8),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",9),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"label",10),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"input",11),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().provider.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",9),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",12),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"input",13),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().provider.billingEmail=t})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",8),o.ɵɵtext(27,"\n "),o.ɵɵelement(28,"app-avatar",14),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"button",15),o.ɵɵtext(33,"\n "),o.ɵɵelement(34,"i",16),o.ɵɵpipe(35,"i18n"),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"span"),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext();o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,11,"providerName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.provider.name)("disabled",t.selfHosted),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,13,"billingEmail")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.provider.billingEmail)("disabled",t.selfHosted),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("data",t.provider.name),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(35,15,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,17,"save"))}}class x{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.route=n,this.syncService=i,this.platformUtilsService=r,this.logService=o,this.selfHosted=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.selfHosted=this.platformUtilsService.isSelfHost(),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.providerId=e.providerId;try{this.provider=yield this.apiService.getProvider(this.providerId)}catch(t){this.logService.error(`Handled exception: ${t}`)}})))),this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.ProviderUpdateRequest;e.name=this.provider.name,e.businessName=this.provider.businessName,e.billingEmail=this.provider.billingEmail,this.formPromise=this.apiService.putProvider(this.providerId,e).then((()=>this.syncService.fullSync(!0))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("providerUpdated"))}catch(e){this.logService.error(`Handled exception: ${e}`)}}))}}t.AccountComponent=x,x.ɵfac=function(e){return new(e||x)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ActivatedRoute),o.ɵɵdirectiveInject(c.SyncService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.LogService))},x.ɵcmp=o.ɵɵdefineComponent({type:x,selectors:[["provider-account"]],decls:11,vars:5,consts:[[1,"page-header"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail",1,"form-control",3,"ngModel","disabled","ngModelChange"],["dynamic","true","size","75","fontSize","35",3,"data"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵtemplate(7,g,9,6,"div",1),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,y,42,19,"form",2),o.ɵɵtext(10,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"myProvider")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.provider&&!t.loading))},directives:[u.NgIf,m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,v.AvatarComponent],pipes:[f.I18nPipe],encapsulation:2})},89853:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(68012),n(99954),n(85556);const r=n(32621),o=n(68012),a=n(85556),s=n(99954),l=n(72596);class c{constructor(e,t,n){this.route=e,this.providerService=t,this.platformUtilsService=n}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){yield this.providerService.get(e.providerId)}))))}}t.SettingsComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.ProviderService),r.ɵɵdirectiveInject(s.PlatformUtilsService))},c.ɵcmp=r.ɵɵdefineComponent({type:c,selectors:[["provider-settings"]],decls:28,vars:6,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],[1,"col-9"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",7),r.ɵɵtext(22,"\n "),r.ɵɵelement(23,"router-outlet"),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,2,"settings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,4,"myProvider"),"\n "))},directives:[o.RouterLinkWithHref,o.RouterLinkActive,o.RouterOutlet],pipes:[l.I18nPipe],encapsulation:2})},5987:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetupProviderComponent=void 0;const r=n(92295),o=n(32621),a=n(57490),s=n(68012),l=n(72596);function c(e,t){1&e&&(o.ɵɵelementStart(0,"div",2),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"img",3),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",4),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",5),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"span",6),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(8),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,4,"loading")))}const d=function(e){return{email:e}};function p(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",7),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",8),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",9),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",10),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",11),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",12),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"p"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"hr"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",13),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"a",14),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,4,"setupProvider")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,6,"setupProviderLoginDesc")),o.ɵɵadvance(7),o.ɵɵproperty("queryParams",o.ɵɵpureFunction1(10,d,e.email)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(24,8,"logIn"),"\n ")}}class u extends r.BaseAcceptComponent{constructor(){super(...arguments),this.failedShortMessage="inviteAcceptFailedShort",this.failedMessage="inviteAcceptFailed",this.requiredParameters=["providerId","email","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){this.router.navigate(["/providers/setup"],{queryParams:e})}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){}))}}t.SetupProviderComponent=u,u.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(u)))(t||u)}}(),u.ɵcmp=o.ɵɵdefineComponent({type:u,selectors:[["app-setup-provider"]],features:[o.ɵɵInheritDefinitionFeature],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,c,17,6,"div",0),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,p,31,12,"div",1),o.ɵɵtext(3,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[a.NgIf,s.RouterLinkWithHref],pipes:[l.I18nPipe],encapsulation:2})},3896:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetupComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(82058),n(9941),n(40349),n(99954),n(2173),n(72562)),a=n(32621),s=n(68012),l=n(99954),c=n(40349),d=n(82058),p=n(91092),u=n(2173),m=n(9941),h=n(64052),v=n(57490),f=n(14992),g=n(96832),y=n(637),x=n(72596);function S(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",16),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(2).cancel()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function b(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"form",3,4),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"h2",5),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",6),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",7),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",8),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"input",9),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().name=t})),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",7),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",10),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"input",11),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().billingEmail=t})),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n\n "),a.ɵɵelementStart(28,"div",12),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"button",13),a.ɵɵtext(31,"\n "),a.ɵɵelement(32,"i",14),a.ɵɵpipe(33,"i18n"),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"span"),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,S,3,3,"button",15),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵreference(1),t=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(5,10,"generalInformation")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,12,"providerName")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.name),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,14,"billingEmail")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.billingEmail),a.ɵɵadvance(6),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(33,16,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,18,"submit")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.showCancel)}}class w{constructor(e,t,n,i,r,o,a,s){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.cryptoService=r,this.apiService=o,this.syncService=a,this.validationService=s,this.loading=!0,this.authed=!1}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null==e.providerId||null==e.email||null==e.token)return this.platformUtilsService.showToast("error",null,this.i18nService.t("emergencyInviteAcceptFailed"),{timeout:1e4}),void this.router.navigate(["/"]);this.providerId=e.providerId,this.token=e.token;try{const e=yield this.apiService.getProvider(this.providerId);null!=e.name&&this.router.navigate(["/providers",e.id],{replaceUrl:!0})}catch(t){this.validationService.showError(t),this.router.navigate(["/"])}}))))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.doSubmit(),yield this.formPromise,this.formPromise=null}))}doSubmit(){return i(this,void 0,void 0,(function*(){try{const e=(yield this.cryptoService.makeShareKey())[0].encryptedString,t=new o.ProviderSetupRequest;t.name=this.name,t.billingEmail=this.billingEmail,t.token=this.token,t.key=e;const n=yield this.apiService.postProviderSetup(this.providerId,t);this.platformUtilsService.showToast("success",null,this.i18nService.t("providerSetup")),yield this.syncService.fullSync(!0),this.router.navigate(["/providers",n.id])}catch(e){this.validationService.showError(e)}}))}}t.SetupComponent=w,w.ɵfac=function(e){return new(e||w)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.CryptoService),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.SyncService),a.ɵɵdirectiveInject(m.ValidationService))},w.ɵcmp=a.ɵɵdefineComponent({type:w,selectors:[["provider-setup"]],decls:20,vars:7,consts:[[1,"container","page-content"],[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"mt-5"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"mt-4"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(a.ɵɵelement(0,"app-navbar"),a.ɵɵtext(1,"\n"),a.ɵɵelementStart(2,"div",0),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",1),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"h1"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"p"),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n\n "),a.ɵɵtemplate(15,b,43,20,"form",2),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n"),a.ɵɵelement(18,"app-footer"),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,3,"setupProvider")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,5,"setupProviderDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.loading))},directives:[h.NavbarComponent,v.NgIf,f.FooterComponent,g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,g.DefaultValueAccessor,g.RequiredValidator,g.NgControlStatus,g.NgModel],pipes:[x.I18nPipe],encapsulation:2})},990:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditCustomFieldsComponent=void 0;n(32621);const i=n(83072),r=(n(98573),n(40349),n(52556),n(58841)),o=n(23635),a=n(12657),s=n(18276),l=n(70829),c=n(32621),d=n(40349),p=n(98573);class u{constructor(e,t){this.i18nService=e,this.eventService=t,this.addFieldType=s.FieldType.Text,this.linkedFieldOptions=[],this.cipherType=o.CipherType,this.fieldType=s.FieldType,this.eventType=a.EventType,this.addFieldTypeOptions=[{name:e.t("cfTypeText"),value:s.FieldType.Text},{name:e.t("cfTypeHidden"),value:s.FieldType.Hidden},{name:e.t("cfTypeBoolean"),value:s.FieldType.Boolean}],this.addFieldLinkedTypeOption={name:this.i18nService.t("cfTypeLinked"),value:s.FieldType.Linked}}ngOnChanges(e){null!=e.thisCipherType&&(this.setLinkedFieldOptions(),e.thisCipherType.firstChange||this.resetCipherLinkedFields())}addField(){null==this.cipher.fields&&(this.cipher.fields=[]);const e=new r.FieldView;e.type=this.addFieldType,e.newField=!0,e.type===s.FieldType.Linked&&(e.linkedId=this.linkedFieldOptions[0].value),this.cipher.fields.push(e)}removeField(e){const t=this.cipher.fields.indexOf(e);t>-1&&this.cipher.fields.splice(t,1)}toggleFieldValue(e){const t=e;t.showValue=!t.showValue,this.editMode&&t.showValue&&this.eventService.collect(a.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipher.id)}trackByFunction(e,t){return e}drop(e){i.moveItemInArray(this.cipher.fields,e.previousIndex,e.currentIndex)}setLinkedFieldOptions(){if(null==this.cipher.linkedFieldOptions)return;const e=[];this.cipher.linkedFieldOptions.forEach(((t,n)=>e.push({name:this.i18nService.t(t.i18nKey),value:n}))),this.linkedFieldOptions=e.sort(l.Utils.getSortFunction(this.i18nService,"name"))}resetCipherLinkedFields(){null!=this.cipher.fields&&0!==this.cipher.fields.length&&(null!=this.cipher.linkedFieldOptions?this.cipher.fields.filter((e=>e.type===s.FieldType.Linked)).forEach((e=>e.linkedId=this.linkedFieldOptions[0].value)):this.cipher.fields=this.cipher.fields.filter((e=>e.type!==s.FieldType.Linked)))}}t.AddEditCustomFieldsComponent=u,u.ɵfac=function(e){return new(e||u)(c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(p.EventService))},u.ɵdir=c.ɵɵdefineDirective({type:u,inputs:{cipher:"cipher",thisCipherType:"thisCipherType",editMode:"editMode"},features:[c.ɵɵNgOnChangesFeature]})},53093:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;const r=n(32621),o=n(2944),a=n(23635),s=n(12657),l=n(68320),c=n(40251),d=n(94465),p=n(60689),u=(n(22501),n(68062),n(69050),n(98573),n(4349),n(40349),n(70143),n(36424),n(94308),n(14293),n(99954),n(10685),n(77243),n(17283)),m=n(52556),h=n(92643),v=n(38138),f=n(52450),g=n(56561),y=n(70829),x=n(32621),S=n(68062),b=n(4349),w=n(40349),I=n(99954),C=n(22501),E=n(77243),P=n(69050),k=n(36424),A=n(98573),O=n(10685),T=n(70143),M=n(14293),D=n(94308);class B{constructor(e,t,n,i,o,s,l,c,d,u,m,h,v){this.cipherService=e,this.folderService=t,this.i18nService=n,this.platformUtilsService=i,this.auditService=o,this.stateService=s,this.collectionService=l,this.messagingService=c,this.eventService=d,this.policyService=u,this.logService=m,this.passwordRepromptService=h,this.organizationService=v,this.cloneMode=!1,this.folderId=null,this.organizationId=null,this.onSavedCipher=new r.EventEmitter,this.onDeletedCipher=new r.EventEmitter,this.onRestoredCipher=new r.EventEmitter,this.onCancelled=new r.EventEmitter,this.onEditAttachments=new r.EventEmitter,this.onShareCipher=new r.EventEmitter,this.onEditCollections=new r.EventEmitter,this.onGeneratePassword=new r.EventEmitter,this.editMode=!1,this.collections=[],this.showPassword=!1,this.showCardNumber=!1,this.showCardCode=!1,this.cipherType=a.CipherType,this.ownershipOptions=[],this.currentDate=new Date,this.allowPersonal=!0,this.reprompt=!1,this.canUseReprompt=!0,this.typeOptions=[{name:n.t("typeLogin"),value:a.CipherType.Login},{name:n.t("typeCard"),value:a.CipherType.Card},{name:n.t("typeIdentity"),value:a.CipherType.Identity},{name:n.t("typeSecureNote"),value:a.CipherType.SecureNote}],this.cardBrandOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"Visa",value:"Visa"},{name:"Mastercard",value:"Mastercard"},{name:"American Express",value:"Amex"},{name:"Discover",value:"Discover"},{name:"Diners Club",value:"Diners Club"},{name:"JCB",value:"JCB"},{name:"Maestro",value:"Maestro"},{name:"UnionPay",value:"UnionPay"},{name:n.t("other"),value:"Other"}],this.cardExpMonthOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:"01 - "+n.t("january"),value:"1"},{name:"02 - "+n.t("february"),value:"2"},{name:"03 - "+n.t("march"),value:"3"},{name:"04 - "+n.t("april"),value:"4"},{name:"05 - "+n.t("may"),value:"5"},{name:"06 - "+n.t("june"),value:"6"},{name:"07 - "+n.t("july"),value:"7"},{name:"08 - "+n.t("august"),value:"8"},{name:"09 - "+n.t("september"),value:"9"},{name:"10 - "+n.t("october"),value:"10"},{name:"11 - "+n.t("november"),value:"11"},{name:"12 - "+n.t("december"),value:"12"}],this.identityTitleOptions=[{name:"-- "+n.t("select")+" --",value:null},{name:n.t("mr"),value:n.t("mr")},{name:n.t("mrs"),value:n.t("mrs")},{name:n.t("ms"),value:n.t("ms")},{name:n.t("dr"),value:n.t("dr")}],this.uriMatchOptions=[{name:n.t("defaultMatchDetection"),value:null},{name:n.t("baseDomain"),value:p.UriMatchType.Domain},{name:n.t("host"),value:p.UriMatchType.Host},{name:n.t("startsWith"),value:p.UriMatchType.StartsWith},{name:n.t("regEx"),value:p.UriMatchType.RegularExpression},{name:n.t("exact"),value:p.UriMatchType.Exact},{name:n.t("never"),value:p.UriMatchType.Never}],this.autofillOnPageLoadOptions=[{name:n.t("autoFillOnPageLoadUseDefault"),value:null},{name:n.t("autoFillOnPageLoadYes"),value:!0},{name:n.t("autoFillOnPageLoadNo"),value:!1}]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}init(){return i(this,void 0,void 0,(function*(){if(this.ownershipOptions.length&&(this.ownershipOptions=[]),yield this.policyService.policyAppliesToUser(c.PolicyType.PersonalOwnership))this.allowPersonal=!1;else{const e=yield this.stateService.getEmail();this.ownershipOptions.push({name:e,value:null})}(yield this.organizationService.getAll()).sort(y.Utils.getSortFunction(this.i18nService,"name")).forEach((e=>{e.enabled&&e.status===l.OrganizationUserStatusType.Confirmed&&this.ownershipOptions.push({name:e.name,value:e.id})})),this.allowPersonal||(this.organizationId=this.ownershipOptions[0].value),this.writeableCollections=yield this.loadCollections(),this.canUseReprompt=yield this.passwordRepromptService.enabled()}))}load(){return i(this,void 0,void 0,(function*(){this.editMode=null!=this.cipherId,this.editMode?(this.editMode=!0,this.cloneMode?(this.cloneMode=!0,this.title=this.i18nService.t("addItem")):this.title=this.i18nService.t("editItem")):this.title=this.i18nService.t("addItem");const e=yield this.stateService.getAddEditCipherInfo();if(null!=e&&(this.cipher=e.cipher,this.collectionIds=e.collectionIds),yield this.stateService.setAddEditCipherInfo(null),null==this.cipher)if(this.editMode){const e=yield this.loadCipher();this.cipher=yield e.decrypt(),this.cloneMode&&(this.cipher.name+=" - "+this.i18nService.t("clone"),null!=this.cipher.organizationId||this.allowPersonal||(this.cipher.organizationId=this.organizationId))}else this.cipher=new m.CipherView,this.cipher.organizationId=null==this.organizationId?null:this.organizationId,this.cipher.folderId=this.folderId,this.cipher.type=null==this.type?a.CipherType.Login:this.type,this.cipher.login=new f.LoginView,this.cipher.login.uris=[new v.LoginUriView],this.cipher.card=new u.CardView,this.cipher.identity=new h.IdentityView,this.cipher.secureNote=new g.SecureNoteView,this.cipher.secureNote.type=d.SecureNoteType.Generic,this.cipher.reprompt=o.CipherRepromptType.None;null==this.cipher||this.editMode&&null==e&&!this.cloneMode||(yield this.organizationChanged(),null!=this.collectionIds&&this.collectionIds.length>0&&this.collections.length>0&&this.collections.forEach((e=>{this.collectionIds.indexOf(e.id)>-1&&(e.checked=!0)}))),this.folders=yield this.folderService.getAllDecrypted(),this.editMode&&this.previousCipherId!==this.cipherId&&this.eventService.collect(s.EventType.Cipher_ClientViewed,this.cipherId),this.previousCipherId=this.cipherId,this.reprompt=this.cipher.reprompt!==o.CipherRepromptType.None}))}submit(){return i(this,void 0,void 0,(function*(){if(this.cipher.isDeleted)return this.restore();if(null==this.cipher.name||""===this.cipher.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;if((!this.editMode||this.cloneMode)&&!this.allowPersonal&&null==this.cipher.organizationId)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("personalOwnershipSubmitError")),!1;this.editMode&&!this.cloneMode||this.cipher.type!==a.CipherType.Login||null==this.cipher.login.uris||1!==this.cipher.login.uris.length||null!=this.cipher.login.uris[0].uri&&""!==this.cipher.login.uris[0].uri||(this.cipher.login.uris=null),this.editMode&&!this.cloneMode||null==this.cipher.organizationId||(this.cipher.collectionIds=null==this.collections?[]:this.collections.filter((e=>e.checked)).map((e=>e.id))),this.cloneMode&&(this.cipher.id=null);const e=yield this.encryptCipher();try{return this.formPromise=this.saveCipher(e),yield this.formPromise,this.cipher.id=e.id,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode&&!this.cloneMode?"editedItem":"addedItem")),this.onSavedCipher.emit(this.cipher),this.messagingService.send(this.editMode&&!this.cloneMode?"editedCipher":"addedCipher"),!0}catch(t){this.logService.error(t)}return!1}))}addUri(){this.cipher.type===a.CipherType.Login&&(null==this.cipher.login.uris&&(this.cipher.login.uris=[]),this.cipher.login.uris.push(new v.LoginUriView))}removeUri(e){if(this.cipher.type!==a.CipherType.Login||null==this.cipher.login.uris)return;const t=this.cipher.login.uris.indexOf(e);t>-1&&this.cipher.login.uris.splice(t,1)}trackByFunction(e,t){return e}cancel(){this.onCancelled.emit(this.cipher)}attachments(){this.onEditAttachments.emit(this.cipher)}share(){this.onShareCipher.emit(this.cipher)}editCollections(){this.onEditCollections.emit(this.cipher)}delete(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(this.cipher.isDeleted?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t("deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.deleteCipher(),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.cipher.isDeleted?"permanentlyDeletedItem":"deletedItem")),this.onDeletedCipher.emit(this.cipher),this.messagingService.send(this.cipher.isDeleted?"permanentlyDeletedCipher":"deletedCipher")}catch(e){this.logService.error(e)}return!0}))}restore(){return i(this,void 0,void 0,(function*(){if(!this.cipher.isDeleted)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.restorePromise=this.restoreCipher(),yield this.restorePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.onRestoredCipher.emit(this.cipher),this.messagingService.send("restoredCipher")}catch(e){this.logService.error(e)}return!0}))}generatePassword(){return i(this,void 0,void 0,(function*(){if(null!=this.cipher.login&&null!=this.cipher.login.password&&this.cipher.login.password.length){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("overwritePasswordConfirmation"),this.i18nService.t("overwritePassword"),this.i18nService.t("yes"),this.i18nService.t("no"))))return!1}return this.onGeneratePassword.emit(),!0}))}togglePassword(){this.showPassword=!this.showPassword,document.getElementById("loginPassword").focus(),this.editMode&&this.showPassword&&this.eventService.collect(s.EventType.Cipher_ClientToggledPasswordVisible,this.cipherId)}toggleCardNumber(){return i(this,void 0,void 0,(function*(){this.showCardNumber=!this.showCardNumber,this.showCardNumber&&this.eventService.collect(s.EventType.Cipher_ClientToggledCardNumberVisible,this.cipherId)}))}toggleCardCode(){this.showCardCode=!this.showCardCode,document.getElementById("cardCode").focus(),this.editMode&&this.showCardCode&&this.eventService.collect(s.EventType.Cipher_ClientToggledCardCodeVisible,this.cipherId)}toggleUriOptions(e){const t=e;t.showOptions=(null!=t.showOptions||null==e.match)&&!t.showOptions}loginUriMatchChanged(e){const t=e;t.showOptions=null==t.showOptions||t.showOptions}organizationChanged(){return i(this,void 0,void 0,(function*(){if(null!=this.writeableCollections&&this.writeableCollections.forEach((e=>e.checked=!1)),null!=this.cipher.organizationId){this.collections=this.writeableCollections.filter((e=>e.organizationId===this.cipher.organizationId));const e=yield this.organizationService.get(this.cipher.organizationId);null!=e&&(this.cipher.organizationUseTotp=e.useTotp)}else this.collections=[]}))}checkPassword(){return i(this,void 0,void 0,(function*(){if(null!=this.checkPasswordPromise)return;if(null==this.cipher.login||null==this.cipher.login.password||""===this.cipher.login.password)return;this.checkPasswordPromise=this.auditService.passwordLeaked(this.cipher.login.password);const e=yield this.checkPasswordPromise;this.checkPasswordPromise=null,e>0?this.platformUtilsService.showToast("warning",null,this.i18nService.t("passwordExposed",e.toString())):this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordSafe"))}))}repromptChanged(){this.reprompt=!this.reprompt,this.reprompt?this.cipher.reprompt=o.CipherRepromptType.Password:this.cipher.reprompt=o.CipherRepromptType.None}loadCollections(){return i(this,void 0,void 0,(function*(){return(yield this.collectionService.getAllDecrypted()).filter((e=>!e.readOnly))}))}loadCipher(){return this.cipherService.get(this.cipherId)}encryptCipher(){return this.cipherService.encrypt(this.cipher)}saveCipher(e){return this.cipherService.saveWithServer(e)}deleteCipher(){return this.cipher.isDeleted?this.cipherService.deleteWithServer(this.cipher.id):this.cipherService.softDeleteWithServer(this.cipher.id)}restoreCipher(){return this.cipherService.restoreWithServer(this.cipher.id)}}t.AddEditComponent=B,B.ɵfac=function(e){return new(e||B)(x.ɵɵdirectiveInject(S.CipherService),x.ɵɵdirectiveInject(b.FolderService),x.ɵɵdirectiveInject(w.I18nService),x.ɵɵdirectiveInject(I.PlatformUtilsService),x.ɵɵdirectiveInject(C.AuditService),x.ɵɵdirectiveInject(E.StateService),x.ɵɵdirectiveInject(P.CollectionService),x.ɵɵdirectiveInject(k.MessagingService),x.ɵɵdirectiveInject(A.EventService),x.ɵɵdirectiveInject(O.PolicyService),x.ɵɵdirectiveInject(T.LogService),x.ɵɵdirectiveInject(M.PasswordRepromptService),x.ɵɵdirectiveInject(D.OrganizationService))},B.ɵdir=x.ɵɵdefineDirective({type:B,inputs:{cloneMode:"cloneMode",folderId:"folderId",cipherId:"cipherId",type:"type",collectionIds:"collectionIds",organizationId:"organizationId"},outputs:{onSavedCipher:"onSavedCipher",onDeletedCipher:"onDeletedCipher",onRestoredCipher:"onRestoredCipher",onCancelled:"onCancelled",onEditAttachments:"onEditAttachments",onShareCipher:"onShareCipher",onEditCollections:"onEditCollections",onGeneratePassword:"onGeneratePassword"}})},25885:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;const r=n(32621),o=(n(91092),n(68062),n(82058),n(40349),n(70143),n(99954),n(77243),n(25237)),a=n(32621),s=n(68062),l=n(40349),c=n(82058),d=n(99954),p=n(91092),u=n(70143),m=n(77243);class h{constructor(e,t,n,i,o,a,s,l){this.cipherService=e,this.i18nService=t,this.cryptoService=n,this.platformUtilsService=i,this.apiService=o,this.win=a,this.logService=s,this.stateService=l,this.onUploadedAttachment=new r.EventEmitter,this.onDeletedAttachment=new r.EventEmitter,this.onReuploadedAttachment=new r.EventEmitter,this.deletePromises={},this.reuploadPromises={},this.emergencyAccessId=null}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}submit(){return i(this,void 0,void 0,(function*(){if(!this.hasUpdatedKey)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("updateKey"));const e=document.getElementById("file"),t=e.files;if(null!=t&&0!==t.length)if(t[0].size>524288e3)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize"));else{try{this.formPromise=this.saveCipherAttachment(t[0]),this.cipherDomain=yield this.formPromise,this.cipher=yield this.cipherDomain.decrypt(),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onUploadedAttachment.emit()}catch(n){this.logService.error(n)}e.type="",e.type="file",e.value=""}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}))}delete(e){return i(this,void 0,void 0,(function*(){if(null!=this.deletePromises[e.id])return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteAttachmentConfirmation"),this.i18nService.t("deleteAttachment"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")){try{this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),yield this.deletePromises[e.id],this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedAttachment"));const t=this.cipher.attachments.indexOf(e);t>-1&&this.cipher.attachments.splice(t,1)}catch(t){this.logService.error(t)}this.deletePromises[e.id]=null,this.onDeletedAttachment.emit()}}))}download(e){return i(this,void 0,void 0,(function*(){const t=e;if(t.downloading)return;if(!this.canAccessAttachments)return void this.platformUtilsService.showToast("error",this.i18nService.t("premiumRequired"),this.i18nService.t("premiumRequiredDesc"));let n;try{n=(yield this.apiService.getAttachmentData(this.cipher.id,e.id,this.emergencyAccessId)).url}catch(r){if(!(r instanceof o.ErrorResponse&&404===r.statusCode))throw r instanceof o.ErrorResponse?new Error(r.getSingleMessage()):r;n=e.url}t.downloading=!0;const i=yield fetch(new Request(n,{cache:"no-store"}));if(200!==i.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(t.downloading=!1);try{const t=yield i.arrayBuffer(),n=null!=e.key?e.key:yield this.cryptoService.getOrgKey(this.cipher.organizationId),r=yield this.cryptoService.decryptFromBytes(t,n);this.platformUtilsService.saveFile(this.win,r,null,e.fileName)}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}t.downloading=!1}))}init(){return i(this,void 0,void 0,(function*(){this.cipherDomain=yield this.loadCipher(),this.cipher=yield this.cipherDomain.decrypt(),this.hasUpdatedKey=yield this.cryptoService.hasEncKey();const e=yield this.stateService.getCanAccessPremium();if(this.canAccessAttachments=e||null!=this.cipher.organizationId,this.canAccessAttachments){if(!this.hasUpdatedKey){(yield this.platformUtilsService.showDialog(this.i18nService.t("updateKey"),this.i18nService.t("featureUnavailable"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"),"warning"))&&this.platformUtilsService.launchUri("https://help.bitwarden.com/article/update-encryption-key/")}}else{(yield this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase")}}))}reuploadCipherAttachment(e,t){return i(this,void 0,void 0,(function*(){const n=e;if(null==e.key&&!n.downloading&&null==this.reuploadPromises[e.id])try{this.reuploadPromises[e.id]=Promise.resolve().then((()=>i(this,void 0,void 0,(function*(){n.downloading=!0;const i=yield fetch(new Request(e.url,{cache:"no-store"}));if(200!==i.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(n.downloading=!1);try{const n=yield i.arrayBuffer(),r=null!=e.key?e.key:yield this.cryptoService.getOrgKey(this.cipher.organizationId),o=yield this.cryptoService.decryptFromBytes(n,r);this.cipherDomain=yield this.cipherService.saveAttachmentRawWithServer(this.cipherDomain,e.fileName,o,t),this.cipher=yield this.cipherDomain.decrypt(),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),yield this.deletePromises[e.id];const a=this.cipher.attachments.filter((t=>t.id===e.id));if(a.length>0){const e=this.cipher.attachments.indexOf(a[0]);e>-1&&this.cipher.attachments.splice(e,1)}this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onReuploadedAttachment.emit()}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}n.downloading=!1})))),yield this.reuploadPromises[e.id]}catch(r){this.logService.error(r)}}))}loadCipher(){return this.cipherService.get(this.cipherId)}saveCipherAttachment(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e)}deleteCipherAttachment(e){return this.cipherService.deleteAttachmentWithServer(this.cipher.id,e)}}t.AttachmentsComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.CryptoService),a.ɵɵdirectiveInject(d.PlatformUtilsService),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(Window),a.ɵɵdirectiveInject(u.LogService),a.ɵɵdirectiveInject(m.StateService))},h.ɵdir=a.ɵɵdefineDirective({type:h,inputs:{cipherId:"cipherId"},outputs:{onUploadedAttachment:"onUploadedAttachment",onDeletedAttachment:"onDeletedAttachment",onReuploadedAttachment:"onReuploadedAttachment"}})},69242:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AvatarComponent=void 0;n(61248),n(39229),n(77243);const r=n(70829),o=n(32621),a=n(61248),s=n(39229),l=n(77243),c=n(57490),d=function(e){return{"rounded-circle":e}};function p(e,t){if(1&e&&o.ɵɵelement(0,"img",1),2&e){const e=o.ɵɵnextContext();o.ɵɵpropertyInterpolate("title",e.data),o.ɵɵproperty("src",e.sanitizer.bypassSecurityTrustResourceUrl(e.src),o.ɵɵsanitizeUrl)("ngClass",o.ɵɵpureFunction1(3,d,e.circle))}}class u{constructor(e,t,n){this.sanitizer=e,this.cryptoFunctionService=t,this.stateService=n,this.size=45,this.charCount=2,this.textColor="#ffffff",this.fontSize=20,this.fontWeight=300,this.dynamic=!1,this.circle=!1}ngOnInit(){this.dynamic||this.generate()}ngOnChanges(){this.dynamic&&this.generate()}generate(){return i(this,void 0,void 0,(function*(){if((yield this.stateService.getEnableGravitars())&&null!=this.email){const e=yield this.cryptoFunctionService.hash(this.email.toLowerCase().trim(),"md5"),t=r.Utils.fromBufferToHex(e).toLowerCase();this.src="https://www.gravatar.com/avatar/"+t+"?s="+this.size+"&r=pg&d=retro"}else{let e=null;const t=this.data.toUpperCase();this.charCount>1&&(e=this.getFirstLetters(t,this.charCount)),null==e&&(e=this.unicodeSafeSubstring(t,this.charCount)),e.match(r.Utils.regexpEmojiPresentation)&&(e=e.match(r.Utils.regexpEmojiPresentation)[0]);const n=this.getCharText(e),i=this.stringToColor(t),o=this.getSvg(this.size,i);o.appendChild(n);const a=window.document.createElement("div").appendChild(o).outerHTML,s=window.btoa(unescape(encodeURIComponent(a)));this.src="data:image/svg+xml;base64,"+s}}))}stringToColor(e){let t=0;for(let i=0;i<e.length;i++)t=e.charCodeAt(i)+((t<<5)-t);let n="#";for(let i=0;i<3;i++){n+=("00"+(t>>8*i&255).toString(16)).substr(-2)}return n}getFirstLetters(e,t){const n=e.split(" ");if(n.length>1){let e="";for(let i=0;i<t;i++)e+=this.unicodeSafeSubstring(n[i],1);return e}return null}getSvg(e,t){const n=window.document.createElement("svg");return n.setAttribute("xmlns","http://www.w3.org/2000/svg"),n.setAttribute("pointer-events","none"),n.setAttribute("width",e.toString()),n.setAttribute("height",e.toString()),n.style.backgroundColor=t,n.style.width=e+"px",n.style.height=e+"px",n}getCharText(e){const t=window.document.createElement("text");return t.setAttribute("text-anchor","middle"),t.setAttribute("y","50%"),t.setAttribute("x","50%"),t.setAttribute("dy","0.35em"),t.setAttribute("pointer-events","auto"),t.setAttribute("fill",this.textColor),t.setAttribute("font-family",'"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"'),t.textContent=e,t.style.fontWeight=this.fontWeight.toString(),t.style.fontSize=this.fontSize+"px",t}unicodeSafeSubstring(e,t){const n=e.match(/./gu);return null!=n?n.slice(0,t).join(""):""}}t.AvatarComponent=u,u.ɵfac=function(e){return new(e||u)(o.ɵɵdirectiveInject(a.DomSanitizer),o.ɵɵdirectiveInject(s.CryptoFunctionService),o.ɵɵdirectiveInject(l.StateService))},u.ɵcmp=o.ɵɵdefineComponent({type:u,selectors:[["app-avatar"]],inputs:{data:"data",email:"email",size:"size",charCount:"charCount",textColor:"textColor",fontSize:"fontSize",fontWeight:"fontWeight",dynamic:"dynamic",circle:"circle"},features:[o.ɵɵNgOnChangesFeature],decls:1,vars:1,consts:[[3,"src","title","ngClass",4,"ngIf"],[3,"src","title","ngClass"]],template:function(e,t){1&e&&o.ɵɵtemplate(0,p,1,5,"img",0),2&e&&o.ɵɵproperty("ngIf",t.src)},directives:[c.NgIf,c.NgClass],encapsulation:2})},52900:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutComponent=void 0;n(40349),n(91577);const i=n(32621),r=n(40349),o=n(57490),a=n(72596);function s(e,t){if(1&e&&i.ɵɵelement(0,"i",6),2&e){const e=i.ɵɵnextContext(2);i.ɵɵclassMapInterpolate1("bwi ",e.icon,"")}}function l(e,t){if(1&e&&(i.ɵɵelementStart(0,"h3",4),i.ɵɵtext(1,"\n "),i.ɵɵtemplate(2,s,1,3,"i",5),i.ɵɵtext(3),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(2),i.ɵɵproperty("ngIf",e.icon),i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.title,"\n ")}}function c(e,t){if(1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",e.getPasswordScoreAlertDisplay()),"\n ")}}function d(e,t){if(1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext(2);i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minLength.toString()),"\n ")}}function p(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),"\n "))}function u(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),"\n "))}function m(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),"\n "))}function h(e,t){1&e&&(i.ɵɵelementStart(0,"li"),i.ɵɵtext(1),i.ɵɵpipe(2,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),"\n "))}function v(e,t){if(1&e&&(i.ɵɵelementStart(0,"div",7),i.ɵɵtext(1),i.ɵɵelementStart(2,"ul"),i.ɵɵtext(3,"\n "),i.ɵɵtemplate(4,c,3,4,"li",8),i.ɵɵtext(5,"\n "),i.ɵɵtemplate(6,d,3,4,"li",8),i.ɵɵtext(7,"\n "),i.ɵɵtemplate(8,p,3,3,"li",8),i.ɵɵtext(9,"\n "),i.ɵɵtemplate(10,u,3,3,"li",8),i.ɵɵtext(11,"\n "),i.ɵɵtemplate(12,m,3,3,"li",8),i.ɵɵtext(13,"\n "),i.ɵɵtemplate(14,h,3,4,"li",8),i.ɵɵtext(15,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(16,"\n "),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.enforcedPolicyMessage,"\n "),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",(null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minComplexity)>0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",(null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.minLength)>0),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireUpper),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireLower),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireNumbers),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.requireSpecial)}}const f=function(e){return{clickable:e}};class g{constructor(e){this.i18nService=e,this.type="info",this.useAlertRole=!1}ngOnInit(){this.calloutStyle=this.type,void 0===this.enforcedPolicyMessage&&(this.enforcedPolicyMessage=this.i18nService.t("masterPasswordPolicyInEffect")),"warning"===this.type||"danger"===this.type?("danger"===this.type&&(this.calloutStyle="danger"),void 0===this.title&&(this.title=this.i18nService.t("warning")),void 0===this.icon&&(this.icon="bwi-exclamation-triangle")):"error"===this.type?(this.calloutStyle="danger",void 0===this.title&&(this.title=this.i18nService.t("error")),void 0===this.icon&&(this.icon="bwi-error")):"tip"===this.type&&(this.calloutStyle="success",void 0===this.title&&(this.title=this.i18nService.t("tip")),void 0===this.icon&&(this.icon="bwi-lightbulb"))}getPasswordScoreAlertDisplay(){if(null==this.enforcedPolicyOptions)return"";let e;switch(this.enforcedPolicyOptions.minComplexity){case 4:e=this.i18nService.t("strong");break;case 3:e=this.i18nService.t("good");break;default:e=this.i18nService.t("weak")}return e+" ("+this.enforcedPolicyOptions.minComplexity+")"}}t.CalloutComponent=g,g.ɵfac=function(e){return new(e||g)(i.ɵɵdirectiveInject(r.I18nService))},g.ɵcmp=i.ɵɵdefineComponent({type:g,selectors:[["app-callout"]],inputs:{type:"type",icon:"icon",title:"title",clickable:"clickable",enforcedPolicyOptions:"enforcedPolicyOptions",enforcedPolicyMessage:"enforcedPolicyMessage",useAlertRole:"useAlertRole"},ngContentSelectors:["*"],decls:10,vars:9,consts:[[3,"ngClass"],["callout",""],["class","callout-heading",4,"ngIf"],["class","enforced-policy-options",4,"ngIf"],[1,"callout-heading"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"],[1,"enforced-policy-options"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0,1),i.ɵɵtext(2,"\n "),i.ɵɵtemplate(3,l,4,2,"h3",2),i.ɵɵtext(4,"\n "),i.ɵɵtemplate(5,v,17,7,"div",3),i.ɵɵtext(6,"\n "),i.ɵɵprojection(7),i.ɵɵtext(8,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(9,"\n")),2&e&&(i.ɵɵclassMapInterpolate1("callout callout-",t.calloutStyle,""),i.ɵɵproperty("ngClass",i.ɵɵpureFunction1(7,f,t.clickable)),i.ɵɵattribute("role",t.useAlertRole?"alert":null),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",t.title),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.enforcedPolicyOptions))},directives:[o.NgClass,o.NgIf],pipes:[a.I18nPipe],encapsulation:2})},33421:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CaptchaProtectedComponent=void 0;n(57997),n(40349),n(99954);const r=n(14287),o=n(70829),a=n(32621),s=n(57997),l=n(40349),c=n(99954);class d{constructor(e,t,n){this.environmentService=e,this.i18nService=t,this.platformUtilsService=n,this.captchaSiteKey=null,this.captchaToken=null}setupCaptcha(){return i(this,void 0,void 0,(function*(){const e=this.environmentService.getWebVaultUrl();this.captcha=new r.CaptchaIFrame(window,e,this.i18nService,(e=>{this.captchaToken=e}),(e=>{this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}),(e=>{this.platformUtilsService.showToast("info",this.i18nService.t("info"),e)}))}))}showCaptcha(){return!o.Utils.isNullOrWhitespace(this.captchaSiteKey)}handleCaptchaRequired(e){return!o.Utils.isNullOrWhitespace(e.captchaSiteKey)&&(this.captchaSiteKey=e.captchaSiteKey,this.captcha.init(e.captchaSiteKey),!0)}}t.CaptchaProtectedComponent=d,d.ɵfac=function(e){return new(e||d)(a.ɵɵdirectiveInject(s.EnvironmentService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService))},d.ɵdir=a.ɵɵdefineDirective({type:d,inputs:{captchaSiteKey:"captchaSiteKey"}})},48921:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePasswordComponent=void 0;n(82058),n(40349),n(36424),n(86193),n(99954),n(10685),n(77243);const r=n(32621),o=n(40349),a=n(82058),s=n(36424),l=n(86193),c=n(99954),d=n(10685),p=n(77243);class u{constructor(e,t,n,i,r,o,a){this.i18nService=e,this.cryptoService=t,this.messagingService=n,this.passwordGenerationService=i,this.platformUtilsService=r,this.policyService=o,this.stateService=a}ngOnInit(){var e;return i(this,void 0,void 0,(function*(){this.email=yield this.stateService.getEmail(),null!==(e=this.enforcedPolicyOptions)&&void 0!==e||(this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions())}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.strongPassword()))return;if(!(yield this.setupSubmitActions()))return;const e=yield this.stateService.getEmail();null==this.kdf&&(this.kdf=yield this.stateService.getKdfType()),null==this.kdfIterations&&(this.kdfIterations=yield this.stateService.getKdfIterations());const t=yield this.cryptoService.makeKey(this.masterPassword,e.trim().toLowerCase(),this.kdf,this.kdfIterations),n=yield this.cryptoService.hashPassword(this.masterPassword,t);let i=null;i=null==(yield this.cryptoService.getEncKey())?yield this.cryptoService.makeEncKey(t):yield this.cryptoService.remakeEncKey(t),yield this.performSubmitActions(n,t,i)}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){return!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){}))}strongPassword(){return i(this,void 0,void 0,(function*(){if(null==this.masterPassword||""===this.masterPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;if(this.masterPassword.length<8)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),!1;if(this.masterPassword!==this.masterPasswordRetype)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch")),!1;const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());if(null!=this.enforcedPolicyOptions&&!this.policyService.evaluateMasterPassword(e.score,this.masterPassword,this.enforcedPolicyOptions))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),!1;if(null!=e&&e.score<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1}return!0}))}updatePasswordStrength(){null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}logOut(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel")))&&this.messagingService.send("logout")}))}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e}}t.ChangePasswordComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.CryptoService),r.ɵɵdirectiveInject(s.MessagingService),r.ɵɵdirectiveInject(l.PasswordGenerationService),r.ɵɵdirectiveInject(c.PlatformUtilsService),r.ɵɵdirectiveInject(d.PolicyService),r.ɵɵdirectiveInject(p.StateService))},u.ɵdir=r.ɵɵdefineDirective({type:u})},85654:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CiphersComponent=void 0;const r=n(32621),o=(n(14170),n(32621)),a=n(14170);class s{constructor(e){this.searchService=e,this.activeCipherId=null,this.onCipherClicked=new r.EventEmitter,this.onCipherRightClicked=new r.EventEmitter,this.onAddCipher=new r.EventEmitter,this.onAddCipherOptions=new r.EventEmitter,this.loaded=!1,this.ciphers=[],this.searchPlaceholder=null,this.filter=null,this.deleted=!1,this.searchPending=!1,this.searchTimeout=null,this.deletedFilter=e=>e.isDeleted===this.deleted}load(e=null,t=!1){return i(this,void 0,void 0,(function*(){this.deleted=t||!1,yield this.applyFilter(e),this.loaded=!0}))}reload(e=null,t=!1){return i(this,void 0,void 0,(function*(){this.loaded=!1,this.ciphers=[],yield this.load(e,t)}))}refresh(){return i(this,void 0,void 0,(function*(){yield this.reload(this.filter,this.deleted)}))}applyFilter(e=null){return i(this,void 0,void 0,(function*(){this.filter=e,yield this.search(null)}))}search(e=null,t){return i(this,void 0,void 0,(function*(){this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),null!=e?(this.searchPending=!0,this.searchTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){yield this.doSearch(t),this.searchPending=!1}))),e)):yield this.doSearch(t)}))}selectCipher(e){this.onCipherClicked.emit(e)}rightClickCipher(e){this.onCipherRightClicked.emit(e)}addCipher(){this.onAddCipher.emit()}addCipherOptions(){this.onAddCipherOptions.emit()}isSearching(){return!this.searchPending&&this.searchService.isSearchable(this.searchText)}doSearch(e){return i(this,void 0,void 0,(function*(){this.ciphers=yield this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e)}))}}t.CiphersComponent=s,s.ɵfac=function(e){return new(e||s)(o.ɵɵdirectiveInject(a.SearchService))},s.ɵdir=o.ɵɵdefineDirective({type:s,inputs:{activeCipherId:"activeCipherId"},outputs:{onCipherClicked:"onCipherClicked",onCipherRightClicked:"onCipherRightClicked",onAddCipher:"onAddCipher",onAddCipherOptions:"onAddCipherOptions"}})},20492:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;const r=n(32621),o=(n(68062),n(69050),n(40349),n(70143),n(99954),n(32621)),a=n(69050),s=n(99954),l=n(40349),c=n(68062),d=n(70143);class p{constructor(e,t,n,i,o){this.collectionService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherService=i,this.logService=o,this.allowSelectNone=!1,this.onSavedCollections=new r.EventEmitter,this.collections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.cipherDomain=yield this.loadCipher(),this.collectionIds=this.loadCipherCollections(),this.cipher=yield this.cipherDomain.decrypt(),this.collections=yield this.loadCollections(),this.collections.forEach((e=>e.checked=!1)),null!=this.collectionIds&&this.collections.forEach((e=>{e.checked=null!=this.collectionIds&&this.collectionIds.indexOf(e.id)>-1}))}))}submit(){return i(this,void 0,void 0,(function*(){const e=this.collections.filter((e=>!!e.checked)).map((e=>e.id));if(this.allowSelectNone||0!==e.length){this.cipherDomain.collectionIds=e;try{this.formPromise=this.saveCollections(),yield this.formPromise,this.onSavedCollections.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("editedItem"))}catch(t){this.logService.error(t)}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection"))}))}loadCipher(){return this.cipherService.get(this.cipherId)}loadCipherCollections(){return this.cipherDomain.collectionIds}loadCollections(){return i(this,void 0,void 0,(function*(){return(yield this.collectionService.getAllDecrypted()).filter((e=>!e.readOnly&&e.organizationId===this.cipher.organizationId))}))}saveCollections(){return this.cipherService.saveCollectionsWithServer(this.cipherDomain)}}t.CollectionsComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.CollectionService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.CipherService),o.ɵɵdirectiveInject(d.LogService))},p.ɵdir=o.ɵɵdefineDirective({type:p,inputs:{cipherId:"cipherId",allowSelectNone:"allowSelectNone"},outputs:{onSavedCollections:"onSavedCollections"}})},66567:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;const r=n(32621),o=(n(96832),n(82058),n(98573),n(38364),n(40349),n(70143),n(99954),n(10685),n(61554),n(12657)),a=n(40251),s=n(32621),l=n(82058),c=n(40349),d=n(99954),p=n(38364),u=n(98573),m=n(10685),h=n(70143),v=n(61554),f=n(96832);class g{constructor(e,t,n,i,o,a,s,l,c,d){this.cryptoService=e,this.i18nService=t,this.platformUtilsService=n,this.exportService=i,this.eventService=o,this.policyService=a,this.win=s,this.logService=l,this.userVerificationService=c,this.formBuilder=d,this.onSaved=new r.EventEmitter,this.disabledByPolicy=!1,this.exportForm=this.formBuilder.group({format:["json"],secret:[""]}),this.formatOptions=[{name:".json",value:"json"},{name:".csv",value:"csv"},{name:".json (Encrypted)",value:"encrypted_json"}]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.checkExportDisabled()}))}checkExportDisabled(){return i(this,void 0,void 0,(function*(){this.disabledByPolicy=yield this.policyService.policyAppliesToUser(a.PolicyType.DisablePersonalVaultExport),this.disabledByPolicy&&this.exportForm.disable()}))}get encryptedFormat(){return"encrypted_json"===this.format}submit(){return i(this,void 0,void 0,(function*(){if(this.disabledByPolicy)return void this.platformUtilsService.showToast("error",null,this.i18nService.t("personalVaultExportPolicyInEffect"));if(!(yield this.warningDialog()))return;const e=this.exportForm.get("secret").value;try{yield this.userVerificationService.verifyUser(e)}catch(t){return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message)}try{this.formPromise=this.getExportData();const e=yield this.formPromise;this.downloadFile(e),this.saved(),yield this.collectEvent(),this.exportForm.get("secret").setValue("")}catch(t){this.logService.error(t)}}))}warningDialog(){return i(this,void 0,void 0,(function*(){return this.encryptedFormat?yield this.platformUtilsService.showDialog("<p>"+this.i18nService.t("encExportKeyWarningDesc")+"<p>"+this.i18nService.t("encExportAccountWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning",!0):yield this.platformUtilsService.showDialog(this.i18nService.t("exportWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning")}))}saved(){this.onSaved.emit()}getExportData(){return this.exportService.getExport(this.format)}getFileName(e){let t=this.format;return"encrypted_json"===this.format&&(e=null==e?"encrypted":"encrypted_"+e,t="json"),this.exportService.getFileName(e,t)}collectEvent(){return i(this,void 0,void 0,(function*(){yield this.eventService.collect(o.EventType.User_ClientExportedVault)}))}get format(){return this.exportForm.get("format").value}downloadFile(e){const t=this.getFileName();this.platformUtilsService.saveFile(this.win,e,{type:"text/plain"},t)}}t.ExportComponent=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵdirectiveInject(l.CryptoService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.ExportService),s.ɵɵdirectiveInject(u.EventService),s.ɵɵdirectiveInject(m.PolicyService),s.ɵɵdirectiveInject(Window),s.ɵɵdirectiveInject(h.LogService),s.ɵɵdirectiveInject(v.UserVerificationService),s.ɵɵdirectiveInject(f.FormBuilder))},g.ɵdir=s.ɵɵdefineDirective({type:g,outputs:{onSaved:"onSaved"}})},64970:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderAddEditComponent=void 0;const r=n(32621),o=(n(4349),n(40349),n(70143),n(99954),n(50044)),a=n(32621),s=n(4349),l=n(40349),c=n(99954),d=n(70143);class p{constructor(e,t,n,i){this.folderService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedFolder=new r.EventEmitter,this.onDeletedFolder=new r.EventEmitter,this.editMode=!1,this.folder=new o.FolderView}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.init()}))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.folder.name||""===this.folder.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;try{const e=yield this.folderService.encrypt(this.folder);return this.formPromise=this.folderService.saveWithServer(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedFolder":"addedFolder")),this.onSavedFolder.emit(this.folder),!0}catch(e){this.logService.error(e)}return!1}))}delete(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteFolderConfirmation"),this.i18nService.t("deleteFolder"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.folderService.deleteWithServer(this.folder.id),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedFolder")),this.onDeletedFolder.emit(this.folder)}catch(e){this.logService.error(e)}return!0}))}init(){return i(this,void 0,void 0,(function*(){if(this.editMode=null!=this.folderId,this.editMode){this.editMode=!0,this.title=this.i18nService.t("editFolder");const e=yield this.folderService.get(this.folderId);this.folder=yield e.decrypt()}else this.title=this.i18nService.t("addFolder")}))}}t.FolderAddEditComponent=p,p.ɵfac=function(e){return new(e||p)(a.ɵɵdirectiveInject(s.FolderService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.LogService))},p.ɵdir=a.ɵɵdefineDirective({type:p,inputs:{folderId:"folderId"},outputs:{onSavedFolder:"onSavedFolder",onDeletedFolder:"onDeletedFolder"}})},43556:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingsComponent=void 0;const r=n(32621),o=n(23635),a=(n(69050),n(4349),n(77243),n(32621)),s=n(69050),l=n(4349),c=n(77243);class d{constructor(e,t,n){this.collectionService=e,this.folderService=t,this.stateService=n,this.showFolders=!0,this.showCollections=!0,this.showFavorites=!0,this.showTrash=!0,this.onAllClicked=new r.EventEmitter,this.onFavoritesClicked=new r.EventEmitter,this.onTrashClicked=new r.EventEmitter,this.onCipherTypeClicked=new r.EventEmitter,this.onFolderClicked=new r.EventEmitter,this.onAddFolder=new r.EventEmitter,this.onEditFolder=new r.EventEmitter,this.onCollectionClicked=new r.EventEmitter,this.loaded=!1,this.cipherType=o.CipherType,this.selectedAll=!1,this.selectedFavorites=!1,this.selectedTrash=!1,this.selectedType=null,this.selectedFolder=!1,this.selectedFolderId=null,this.selectedCollectionId=null}load(e=!0){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getCollapsedGroupings();this.collapsedGroupings=null==t?new Set:new Set(t),yield this.loadFolders(),yield this.loadCollections(),e&&(this.loaded=!0)}))}loadCollections(e){return i(this,void 0,void 0,(function*(){if(!this.showCollections)return;const t=yield this.collectionService.getAllDecrypted();this.collections=null!=e?t.filter((t=>t.organizationId===e)):t,this.nestedCollections=yield this.collectionService.getAllNested(this.collections)}))}loadFolders(){return i(this,void 0,void 0,(function*(){this.showFolders&&(this.folders=yield this.folderService.getAllDecrypted(),this.nestedFolders=yield this.folderService.getAllNested())}))}selectAll(){this.clearSelections(),this.selectedAll=!0,this.onAllClicked.emit()}selectFavorites(){this.clearSelections(),this.selectedFavorites=!0,this.onFavoritesClicked.emit()}selectTrash(){this.clearSelections(),this.selectedTrash=!0,this.onTrashClicked.emit()}selectType(e){this.clearSelections(),this.selectedType=e,this.onCipherTypeClicked.emit(e)}selectFolder(e){this.clearSelections(),this.selectedFolder=!0,this.selectedFolderId=e.id,this.onFolderClicked.emit(e)}addFolder(){this.onAddFolder.emit()}editFolder(e){this.onEditFolder.emit(e)}selectCollection(e){this.clearSelections(),this.selectedCollectionId=e.id,this.onCollectionClicked.emit(e)}clearSelections(){this.selectedAll=!1,this.selectedFavorites=!1,this.selectedTrash=!1,this.selectedType=null,this.selectedFolder=!1,this.selectedFolderId=null,this.selectedCollectionId=null}collapse(e,t=""){return i(this,void 0,void 0,(function*(){if(null==e.id)return;const n=t+e.id;this.isCollapsed(e,t)?this.collapsedGroupings.delete(n):this.collapsedGroupings.add(n),yield this.stateService.setCollapsedGroupings(this.collapsedGroupings)}))}isCollapsed(e,t=""){return this.collapsedGroupings.has(t+e.id)}}t.GroupingsComponent=d,d.ɵfac=function(e){return new(e||d)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.FolderService),a.ɵɵdirectiveInject(c.StateService))},d.ɵdir=a.ɵɵdefineDirective({type:d,inputs:{showFolders:"showFolders",showCollections:"showCollections",showFavorites:"showFavorites",showTrash:"showTrash"},outputs:{onAllClicked:"onAllClicked",onFavoritesClicked:"onFavoritesClicked",onTrashClicked:"onTrashClicked",onCipherTypeClicked:"onCipherTypeClicked",onFolderClicked:"onFolderClicked",onAddFolder:"onAddFolder",onEditFolder:"onEditFolder",onCollectionClicked:"onCollectionClicked"}})},38830:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HintComponent=void 0;const r=n(68591);t.HintComponent=class{constructor(e,t,n,i,r){this.router=e,this.i18nService=t,this.apiService=n,this.platformUtilsService=i,this.logService=r,this.email="",this.successRoute="login"}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.email&&""!==this.email)if(-1!==this.email.indexOf("@"))try{this.formPromise=this.apiService.postPasswordHint(new r.PasswordHintRequest(this.email)),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("masterPassSent")),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute])}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"))}))}}},52665:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.IconComponent=void 0;const r=n(23635),o=(n(52556),n(57997),n(77243),n(70829)),a=n(32621),s=n(57997),l=n(77243),c=n(57490),d=n(50601);function p(e,t){if(1&e&&a.ɵɵelement(0,"img",3),2&e){const e=a.ɵɵnextContext();a.ɵɵpropertyInterpolate("appFallbackSrc",e.fallbackImage),a.ɵɵproperty("src",e.image,a.ɵɵsanitizeUrl)}}function u(e,t){if(1&e&&a.ɵɵelement(0,"i"),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMapInterpolate1("bwi bwi-fw bwi-lg ",e.icon,"")}}const m={Visa:"card-visa",Mastercard:"card-mastercard",Amex:"card-amex",Discover:"card-discover","Diners Club":"card-diners-club",JCB:"card-jcb",Maestro:"card-maestro",UnionPay:"card-union-pay"};class h{constructor(e,t){this.stateService=t,this.iconsUrl=e.getIconsUrl()}ngOnChanges(){return i(this,void 0,void 0,(function*(){this.image=null,this.fallbackImage=null,this.imageEnabled=!(yield this.stateService.getDisableFavicon()),this.load()}))}load(){switch(this.cipher.type){case r.CipherType.Login:this.icon="bwi-globe",this.setLoginIcon();break;case r.CipherType.SecureNote:this.icon="bwi-sticky-note";break;case r.CipherType.Card:this.icon="bwi-credit-card",this.setCardIcon();break;case r.CipherType.Identity:this.icon="bwi-id-card"}}setLoginIcon(){if(this.cipher.login.uri){let t=this.cipher.login.uri,n=!1;if(0===t.indexOf("androidapp://")?(this.icon="bwi-android",this.image=null):0===t.indexOf("iosapp://")?(this.icon="bwi-apple",this.image=null):this.imageEnabled&&-1===t.indexOf("://")&&t.indexOf(".")>-1?(t="http://"+t,n=!0):this.imageEnabled&&(n=0===t.indexOf("http")&&t.indexOf(".")>-1),this.imageEnabled&&n)try{this.image=this.iconsUrl+"/"+o.Utils.getHostname(t)+"/icon.png",this.fallbackImage="images/bwi-globe.png"}catch(e){}}else this.image=null}setCardIcon(){const e=this.cipher.card.brand;this.imageEnabled&&e in m&&(this.icon="credit-card-icon "+m[e])}}t.IconComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.EnvironmentService),a.ɵɵdirectiveInject(l.StateService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["app-vault-icon"]],inputs:{cipher:"cipher"},features:[a.ɵɵNgOnChangesFeature],decls:7,vars:2,consts:[["aria-hidden","true",1,"icon"],["alt","",3,"src","appFallbackSrc",4,"ngIf"],[3,"class",4,"ngIf"],["alt","",3,"src","appFallbackSrc"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,p,1,2,"img",1),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,u,1,3,"i",2),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n")),2&e&&(a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.imageEnabled&&t.image),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.imageEnabled||!t.image))},directives:[c.NgIf,d.FallbackSrcDirective],encapsulation:2})},10940:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockComponent=void 0;n(32621),n(68012);const r=n(53232),o=(n(91092),n(82058),n(57997),n(40349),n(34445),n(70143),n(36424),n(99954),n(77243),n(88332),n(66607)),a=n(44980),s=n(70829),l=n(6317),c=n(65845),d=n(32621),p=n(68012),u=n(40349),m=n(99954),h=n(36424),v=n(82058),f=n(88332),g=n(57997),y=n(77243),x=n(91092),S=n(70143),b=n(34445);class w{constructor(e,t,n,i,r,o,a,s,l,c,d,p){this.router=e,this.i18nService=t,this.platformUtilsService=n,this.messagingService=i,this.cryptoService=r,this.vaultTimeoutService=o,this.environmentService=a,this.stateService=s,this.apiService=l,this.logService=c,this.keyConnectorService=d,this.ngZone=p,this.masterPassword="",this.pin="",this.showPassword=!1,this.pinLock=!1,this.webVaultHostname="",this.successRoute="vault",this.invalidPinAttempts=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.stateService.activeAccount.subscribe((e=>i(this,void 0,void 0,(function*(){yield this.load()}))))}))}submit(){return i(this,void 0,void 0,(function*(){if(this.pinLock&&(null==this.pin||""===this.pin))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("pinRequired"));if(!this.pinLock&&(null==this.masterPassword||""===this.masterPassword))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));const e=yield this.stateService.getKdfType(),t=yield this.stateService.getKdfIterations();if(this.pinLock){let i=!0;try{if(this.pinSet[0]){const n=yield this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t,yield this.stateService.getDecryptedPinProtected()),r=yield this.cryptoService.getEncKey(n),a=yield this.stateService.getProtectedPin();i=(yield this.cryptoService.decryptToUtf8(new o.EncString(a),r))!==this.pin,i||(yield this.setKeyAndContinue(n))}else{const n=yield this.cryptoService.makeKeyFromPin(this.pin,this.email,e,t);i=!1,yield this.setKeyAndContinue(n)}}catch(n){i=!0}if(i){if(this.invalidPinAttempts++,this.invalidPinAttempts>=5)return void this.messagingService.send("logout");this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidPin"))}}else{const n=yield this.cryptoService.makeKey(this.masterPassword,this.email,e,t);let r=!1;if(null!=(yield this.cryptoService.getKeyHash()))r=yield this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,n);else{const e=new a.SecretVerificationRequest,t=yield this.cryptoService.hashPassword(this.masterPassword,n,l.HashPurpose.ServerAuthorization);e.masterPasswordHash=t;try{this.formPromise=this.apiService.postAccountVerifyPassword(e),yield this.formPromise,r=!0;const t=yield this.cryptoService.hashPassword(this.masterPassword,n,l.HashPurpose.LocalAuthorization);yield this.cryptoService.setKeyHash(t)}catch(i){this.logService.error(i)}}if(r){if(this.pinSet[0]){const i=yield this.stateService.getProtectedPin(),r=yield this.cryptoService.getEncKey(n),a=yield this.cryptoService.decryptToUtf8(new o.EncString(i),r),s=yield this.cryptoService.makePinKey(a,this.email,e,t);yield this.stateService.setDecryptedPinProtected(yield this.cryptoService.encrypt(n.key,s))}yield this.setKeyAndContinue(n)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword"))}}))}logOut(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel")))&&this.messagingService.send("logout")}))}unlockBiometric(){return i(this,void 0,void 0,(function*(){if(!this.biometricLock)return;const e=null!=(yield this.cryptoService.getKey(c.KeySuffixOptions.Biometric));return e&&(yield this.doContinue()),e}))}togglePassword(){this.showPassword=!this.showPassword;const e=document.getElementById(this.pinLock?"pin":"masterPassword");this.ngZone.isStable?e.focus():this.ngZone.onStable.pipe(r.take(1)).subscribe((()=>e.focus()))}setKeyAndContinue(e){return i(this,void 0,void 0,(function*(){yield this.cryptoService.setKey(e),yield this.doContinue()}))}doContinue(){return i(this,void 0,void 0,(function*(){yield this.stateService.setBiometricLocked(!1),yield this.stateService.setEverBeenUnlocked(!0);const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),this.messagingService.send("unlocked"),null!=this.onSuccessfulSubmit?yield this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute])}))}load(){return i(this,void 0,void 0,(function*(){this.pinSet=yield this.vaultTimeoutService.isPinLockSet(),this.pinLock=this.pinSet[0]&&null!=(yield this.stateService.getDecryptedPinProtected())||this.pinSet[1],this.supportsBiometric=yield this.platformUtilsService.supportsBiometric(),this.biometricLock=(yield this.vaultTimeoutService.isBiometricLockSet())&&((yield this.cryptoService.hasKeyStored(c.KeySuffixOptions.Biometric))||!this.platformUtilsService.supportsSecureStorage()),this.biometricText=yield this.stateService.getBiometricText(),this.email=yield this.stateService.getEmail();const e=yield this.keyConnectorService.getUsesKeyConnector();this.hideInput=e&&!this.pinLock,!e||this.biometricLock||this.pinLock||(yield this.vaultTimeoutService.logOut());const t=this.environmentService.getWebVaultUrl(),n="https://vault.bitwarden.com"===t?"https://bitwarden.com":t;this.webVaultHostname=s.Utils.getHostname(n)}))}}t.LockComponent=w,w.ɵfac=function(e){return new(e||w)(d.ɵɵdirectiveInject(p.Router),d.ɵɵdirectiveInject(u.I18nService),d.ɵɵdirectiveInject(m.PlatformUtilsService),d.ɵɵdirectiveInject(h.MessagingService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(f.VaultTimeoutService),d.ɵɵdirectiveInject(g.EnvironmentService),d.ɵɵdirectiveInject(y.StateService),d.ɵɵdirectiveInject(x.ApiService),d.ɵɵdirectiveInject(S.LogService),d.ɵɵdirectiveInject(b.KeyConnectorService),d.ɵɵdirectiveInject(d.NgZone))},w.ɵdir=d.ɵɵdefineDirective({type:w})},78490:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginComponent=void 0;n(32621),n(68012);const r=n(53232),o=(n(26451),n(39229),n(57997),n(40349),n(70143),n(86193),n(99954),n(77243),n(70829)),a=n(33421),s=n(32621),l=n(26451),c=n(68012),d=n(99954),p=n(40349),u=n(77243),m=n(57997),h=n(86193),v=n(39229),f=n(70143);class g extends a.CaptchaProtectedComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(o,i,n),this.authService=e,this.router=t,this.stateService=r,this.passwordGenerationService=a,this.cryptoFunctionService=s,this.logService=l,this.ngZone=c,this.email="",this.rememberEmail=!0,this.masterPassword="",this.showPassword=!1,this.twoFactorRoute="2fa",this.successRoute="vault",this.forcePasswordResetRoute="update-temp-password",this.alwaysRememberEmail=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){null!=this.email&&""!==this.email||(this.email=yield this.stateService.getRememberedEmail(),null==this.email&&(this.email="")),this.alwaysRememberEmail||(this.rememberEmail=null!=(yield this.stateService.getRememberedEmail())),o.Utils.isBrowser&&!o.Utils.isNode&&this.focusInput()}))}submit(){return i(this,void 0,void 0,(function*(){if(yield this.setupCaptcha(),null!=this.email&&""!==this.email)if(-1!==this.email.indexOf("@"))if(null!=this.masterPassword&&""!==this.masterPassword)try{this.formPromise=this.authService.logIn(this.email,this.masterPassword,this.captchaToken);const e=yield this.formPromise;if(this.rememberEmail||this.alwaysRememberEmail?yield this.stateService.setRememberedEmail(this.email):yield this.stateService.setRememberedEmail(null),this.handleCaptchaRequired(e))return;if(e.twoFactor)null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute]);else if(e.forcePasswordReset)null!=this.onSuccessfulLoginForceResetNavigate?this.onSuccessfulLoginForceResetNavigate():this.router.navigate([this.forcePasswordResetRoute]);else{const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute])}}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"))}))}togglePassword(){this.showPassword=!this.showPassword,this.ngZone.isStable?document.getElementById("masterPassword").focus():this.ngZone.onStable.pipe(r.take(1)).subscribe((()=>document.getElementById("masterPassword").focus()))}launchSsoBrowser(e,t){return i(this,void 0,void 0,(function*(){const n={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1},i=yield this.passwordGenerationService.generatePassword(n),r=yield this.passwordGenerationService.generatePassword(n),a=yield this.cryptoFunctionService.hash(r,"sha256"),s=o.Utils.fromBufferToUrlB64(a);yield this.stateService.setSsoState(i),yield this.stateService.setSsoCodeVerifier(r);const l=this.environmentService.getWebVaultUrl();this.platformUtilsService.launchUri(l+"/#/sso?clientId="+e+"&redirectUri="+encodeURIComponent(t)+"&state="+i+"&codeChallenge="+s)}))}focusInput(){document.getElementById(null==this.email||""===this.email?"email":"masterPassword").focus()}}t.LoginComponent=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.StateService),s.ɵɵdirectiveInject(m.EnvironmentService),s.ɵɵdirectiveInject(h.PasswordGenerationService),s.ɵɵdirectiveInject(v.CryptoFunctionService),s.ɵɵdirectiveInject(f.LogService),s.ɵɵdirectiveInject(s.NgZone))},g.ɵdir=s.ɵɵdefineDirective({type:g,inputs:{email:"email",rememberEmail:"rememberEmail"},features:[s.ɵɵInheritDefinitionFeature]})},20443:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DynamicModalComponent=void 0;const i=n(32621),r=(n(46915),n(29546),n(99806),n(32621)),o=n(29546),a=n(46915),s=n(99806),l=["modalContent"];function c(e,t){}class d{constructor(e,t,n,i,r){this.modalService=e,this.cd=t,this.el=n,this.focusTrapFactory=i,this.modalRef=r}ngAfterViewInit(){this.loadChildComponent(this.childComponentType),null!=this.setComponentParameters&&this.setComponentParameters(this.componentRef.instance),this.cd.detectChanges(),this.modalRef.created(this.el.nativeElement),this.focusTrap=this.focusTrapFactory.create(this.el.nativeElement.querySelector(".modal-dialog")),null==this.el.nativeElement.querySelector("[appAutoFocus]")&&this.focusTrap.focusFirstTabbableElementWhenReady()}loadChildComponent(e){const t=this.modalService.resolveComponentFactory(e);this.modalContentRef.clear(),this.componentRef=this.modalContentRef.createComponent(t)}ngOnDestroy(){this.componentRef&&this.componentRef.destroy(),this.focusTrap.destroy()}close(){this.modalRef.close()}getFocus(){const e=this.el.nativeElement.querySelector("[appAutoFocus]");null==e||e.focus()}}t.DynamicModalComponent=d,d.ɵfac=function(e){return new(e||d)(r.ɵɵdirectiveInject(o.ModalService),r.ɵɵdirectiveInject(r.ChangeDetectorRef),r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(a.ConfigurableFocusTrapFactory),r.ɵɵdirectiveInject(s.ModalRef))},d.ɵcmp=r.ɵɵdefineComponent({type:d,selectors:[["app-modal"]],viewQuery:function(e,t){if(1&e&&r.ɵɵviewQuery(l,7,i.ViewContainerRef),2&e){let e;r.ɵɵqueryRefresh(e=r.ɵɵloadQuery())&&(t.modalContentRef=e.first)}},decls:2,vars:0,consts:[["modalContent",""]],template:function(e,t){1&e&&r.ɵɵtemplate(0,c,0,0,"ng-template",null,0,r.ɵɵtemplateRefExtractor)},encapsulation:2})},28129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalInjector=void 0;t.ModalInjector=class{constructor(e,t){this._parentInjector=e,this._additionalTokens=t}get(e,t,n){var i;return null!==(i=this._additionalTokens.get(e))&&void 0!==i?i:this._parentInjector.get(e,t)}}},99806:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalRef=void 0;const i=n(59666),r=n(53232);t.ModalRef=class{constructor(){this._onCreated=new i.Subject,this._onClose=new i.Subject,this._onClosed=new i.Subject,this._onShow=new i.Subject,this._onShown=new i.Subject,this.onCreated=this._onCreated.asObservable(),this.onClose=this._onClose.asObservable(),this.onClosed=this._onClosed.asObservable(),this.onShow=this._onShow.asObservable(),this.onShown=this._onShow.asObservable()}show(){this._onShow.next()}shown(){this._onShown.next()}close(e){this.lastResult=e,this._onClose.next(e)}closed(){this._onClosed.next(this.lastResult)}created(e){this._onCreated.next(e)}onClosedPromise(){return this.onClosed.pipe(r.first()).toPromise()}}},33045:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorHistoryComponent=void 0;n(40349),n(86193),n(99954);const r=n(32621),o=n(86193),a=n(99954),s=n(40349);class l{constructor(e,t,n,i){this.passwordGenerationService=e,this.platformUtilsService=t,this.i18nService=n,this.win=i,this.history=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.history=yield this.passwordGenerationService.getHistory()}))}clear(){this.history=[],this.passwordGenerationService.clear()}copy(e){const t=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(e,t),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password")))}}t.PasswordGeneratorHistoryComponent=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵdirectiveInject(o.PasswordGenerationService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(Window))},l.ɵdir=r.ɵɵdefineDirective({type:l})},66326:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorComponent=void 0;const r=n(32621),o=(n(40349),n(86193),n(99954),n(32621)),a=n(86193),s=n(99954),l=n(40349);class c{constructor(e,t,n,i){this.passwordGenerationService=e,this.platformUtilsService=t,this.i18nService=n,this.win=i,this.showSelect=!1,this.onSelected=new r.EventEmitter,this.options={},this.password="-",this.showOptions=!1,this.avoidAmbiguous=!1,this.passTypeOptions=[{name:n.t("password"),value:"password"},{name:n.t("passphrase"),value:"passphrase"}]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.passwordGenerationService.getOptions();this.options=e[0],this.enforcedPolicyOptions=e[1],this.avoidAmbiguous=!this.options.ambiguous,this.options.type="passphrase"===this.options.type?"passphrase":"password",this.password=yield this.passwordGenerationService.generatePassword(this.options),yield this.passwordGenerationService.addHistory(this.password)}))}sliderChanged(){return i(this,void 0,void 0,(function*(){this.saveOptions(!1),yield this.passwordGenerationService.addHistory(this.password)}))}sliderInput(){return i(this,void 0,void 0,(function*(){this.normalizeOptions(),this.password=yield this.passwordGenerationService.generatePassword(this.options)}))}saveOptions(e=!0){return i(this,void 0,void 0,(function*(){this.normalizeOptions(),yield this.passwordGenerationService.saveOptions(this.options),e&&(yield this.regenerate())}))}regenerate(){return i(this,void 0,void 0,(function*(){this.password=yield this.passwordGenerationService.generatePassword(this.options),yield this.passwordGenerationService.addHistory(this.password)}))}copy(){const e=null!=this.win?{window:this.win}:null;this.platformUtilsService.copyToClipboard(this.password,e),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password")))}select(){this.onSelected.emit(this.password)}toggleOptions(){this.showOptions=!this.showOptions}normalizeOptions(){if(this.options.ambiguous=!this.avoidAmbiguous,!(this.options.uppercase||this.options.lowercase||this.options.number||this.options.special)&&(this.options.lowercase=!0,null!=this.win)){const e=this.win.document.querySelector("#lowercase");e&&(e.checked=!0)}this.passwordGenerationService.normalizeOptions(this.options,this.enforcedPolicyOptions)}}t.PasswordGeneratorComponent=c,c.ɵfac=function(e){return new(e||c)(o.ɵɵdirectiveInject(a.PasswordGenerationService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(Window))},c.ɵdir=o.ɵɵdefineDirective({type:c,inputs:{showSelect:"showSelect"},outputs:{onSelected:"onSelected"}})},39200:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptComponent=void 0;n(82058),n(40349),n(99954),n(99806);const r=n(32621),o=n(99806),a=n(82058),s=n(99954),l=n(40349);class c{constructor(e,t,n,i){this.modalRef=e,this.cryptoService=t,this.platformUtilsService=n,this.i18nService=i,this.showPassword=!1,this.masterPassword=""}togglePassword(){this.showPassword=!this.showPassword}submit(){return i(this,void 0,void 0,(function*(){(yield this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,null))?this.modalRef.close(!0):this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword"))}))}}t.PasswordRepromptComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.ModalRef),r.ɵɵdirectiveInject(a.CryptoService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.I18nService))},c.ɵdir=r.ɵɵdefineDirective({type:c})},4748:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterComponent=void 0;n(68012);const r=n(82822),o=n(94401),a=(n(91092),n(26451),n(82058),n(57997),n(40349),n(70143),n(86193),n(99954),n(77243),n(25847)),s=n(33421),l=n(32621),c=n(26451),d=n(68012),p=n(40349),u=n(82058),m=n(91092),h=n(77243),v=n(99954),f=n(86193),g=n(57997),y=n(70143);class x extends s.CaptchaProtectedComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(l,n,a),this.authService=e,this.router=t,this.cryptoService=i,this.apiService=r,this.stateService=o,this.passwordGenerationService=s,this.logService=c,this.name="",this.email="",this.masterPassword="",this.confirmMasterPassword="",this.hint="",this.showPassword=!1,this.showTerms=!0,this.acceptPolicies=!1,this.successRoute="login",this.showTerms=!a.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.setupCaptcha()}))}get masterPasswordScoreWidth(){return null==this.masterPasswordScore?0:20*(this.masterPasswordScore+1)}get masterPasswordScoreColor(){switch(this.masterPasswordScore){case 4:return"success";case 3:return"primary";case 2:return"warning";default:return"danger"}}get masterPasswordScoreText(){switch(this.masterPasswordScore){case 4:return this.i18nService.t("strong");case 3:return this.i18nService.t("good");case 2:return this.i18nService.t("weak");default:return null!=this.masterPasswordScore?this.i18nService.t("weak"):null}}submit(){return i(this,void 0,void 0,(function*(){if(!this.acceptPolicies&&this.showTerms)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("acceptPoliciesError"));if(null==this.email||""===this.email)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("emailRequired"));if(-1===this.email.indexOf("@"))return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidEmail"));if(null==this.masterPassword||""===this.masterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"));if(this.masterPassword.length<8)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength"));if(this.masterPassword!==this.confirmMasterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassDoesntMatch"));const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());if(null!=e&&e.score<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return}if(this.hint===this.masterPassword)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("hintEqualsPassword"));this.name=""===this.name?null:this.name,this.email=this.email.trim().toLowerCase();const t=a.KdfType.PBKDF2_SHA256,n=this.platformUtilsService.isIE()?1e4:1e5,i=yield this.cryptoService.makeKey(this.masterPassword,this.email,t,n),s=yield this.cryptoService.makeEncKey(i),l=yield this.cryptoService.hashPassword(this.masterPassword,i),c=yield this.cryptoService.makeKeyPair(s[0]),d=new o.RegisterRequest(this.email,this.name,l,this.hint,s[1].encryptedString,t,n,this.referenceData,this.captchaToken);d.keys=new r.KeysRequest(c[0],c[1].encryptedString);const p=yield this.stateService.getOrganizationInvitation();null!=p&&null!=p.token&&null!=p.organizationUserId&&(d.token=p.token,d.organizationUserId=p.organizationUserId);try{this.formPromise=this.apiService.postRegister(d);try{yield this.formPromise}catch(u){if(this.handleCaptchaRequired(u))return;throw u}this.platformUtilsService.showToast("success",null,this.i18nService.t("newAccountCreated")),this.router.navigate([this.successRoute],{queryParams:{email:this.email}})}catch(u){this.logService.error(u)}}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}updatePasswordStrength(){null!=this.masterPasswordStrengthTimeout&&clearTimeout(this.masterPasswordStrengthTimeout),this.masterPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e}}t.RegisterComponent=x,x.ɵfac=function(e){return new(e||x)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CryptoService),l.ɵɵdirectiveInject(m.ApiService),l.ɵɵdirectiveInject(h.StateService),l.ɵɵdirectiveInject(v.PlatformUtilsService),l.ɵɵdirectiveInject(f.PasswordGenerationService),l.ɵɵdirectiveInject(g.EnvironmentService),l.ɵɵdirectiveInject(y.LogService))},x.ɵdir=l.ɵɵdefineDirective({type:x,features:[l.ɵɵInheritDefinitionFeature]})},44911:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RemovePasswordComponent=void 0;n(68012),n(91092),n(40349),n(34445),n(99954),n(77243),n(2173);const r=n(32621),o=n(68012),a=n(77243),s=n(91092),l=n(2173),c=n(99954),d=n(40349),p=n(34445);class u{constructor(e,t,n,i,r,o,a){this.router=e,this.stateService=t,this.apiService=n,this.syncService=i,this.platformUtilsService=r,this.i18nService=o,this.keyConnectorService=a,this.continuing=!1,this.leaving=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.organization=yield this.keyConnectorService.getManagingOrganization(),this.email=yield this.stateService.getEmail(),yield this.syncService.fullSync(!1),this.loading=!1}))}convert(){return i(this,void 0,void 0,(function*(){this.continuing=!0,this.actionPromise=this.keyConnectorService.migrateUser();try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedMasterPassword")),yield this.keyConnectorService.removeConvertAccountRequired(),this.router.navigate([""])}catch(e){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e.message)}}))}leave(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("leaveOrganizationConfirmation"),this.organization.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.leaving=!0,this.actionPromise=this.apiService.postLeaveOrganization(this.organization.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("leftOrganization")),yield this.keyConnectorService.removeConvertAccountRequired(),this.router.navigate([""])}catch(e){this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}}))}}t.RemovePasswordComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.StateService),r.ɵɵdirectiveInject(s.ApiService),r.ɵɵdirectiveInject(l.SyncService),r.ɵɵdirectiveInject(c.PlatformUtilsService),r.ɵɵdirectiveInject(d.I18nService),r.ɵɵdirectiveInject(p.KeyConnectorService))},u.ɵdir=r.ɵɵdefineDirective({type:u})},54484:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(57490);const r=n(32621),o=n(40251),a=n(49538),s=(n(57997),n(40349),n(70143),n(36424),n(99954),n(10685),n(94129),n(77243),n(26425)),l=n(24018),c=n(21801),d=n(32621),p=n(40349),u=n(99954),m=n(57997),h=n(57490),v=n(94129),f=n(36424),g=n(10685),y=n(70143),x=n(77243);class S{constructor(e,t,n,i,o,s,l,c,d){this.i18nService=e,this.platformUtilsService=t,this.environmentService=n,this.datePipe=i,this.sendService=o,this.messagingService=s,this.policyService=l,this.logService=c,this.stateService=d,this.onSavedSend=new r.EventEmitter,this.onDeletedSend=new r.EventEmitter,this.onCancelled=new r.EventEmitter,this.copyLink=!1,this.disableSend=!1,this.disableHideEmail=!1,this.showPassword=!1,this.sendType=a.SendType,this.canAccessPremium=!0,this.emailVerified=!0,this.alertShown=!1,this.showOptions=!1,this.typeOptions=[{name:e.t("sendTypeFile"),value:a.SendType.File},{name:e.t("sendTypeText"),value:a.SendType.Text}],this.sendLinkBaseUrl=this.environmentService.getSendUrl()}get link(){return null!=this.send.id&&null!=this.send.accessId?this.sendLinkBaseUrl+this.send.accessId+"/"+this.send.urlB64Key:null}get isSafari(){return this.platformUtilsService.isSafari()}get isDateTimeLocalSupported(){return!(this.platformUtilsService.isFirefox()||this.platformUtilsService.isSafari())}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}get editMode(){return null!=this.sendId}get title(){return this.i18nService.t(this.editMode?"editSend":"createSend")}setDates(e){this.deletionDate=e.deletionDate,this.expirationDate=e.expirationDate}load(){return i(this,void 0,void 0,(function*(){if(this.disableSend=yield this.policyService.policyAppliesToUser(o.PolicyType.DisableSend),this.disableHideEmail=yield this.policyService.policyAppliesToUser(o.PolicyType.SendOptions,(e=>e.data.disableHideEmail)),this.canAccessPremium=yield this.stateService.getCanAccessPremium(),this.emailVerified=yield this.stateService.getEmailVerified(),this.canAccessPremium&&this.emailVerified||(this.type=a.SendType.Text),null==this.send)if(this.editMode){const e=yield this.loadSend();this.send=yield e.decrypt()}else this.send=new c.SendView,this.send.type=null==this.type?a.SendType.File:this.type,this.send.file=new s.SendFileView,this.send.text=new l.SendTextView,this.send.deletionDate=new Date,this.send.deletionDate.setDate(this.send.deletionDate.getDate()+7);this.hasPassword=null!=this.send.password&&""!==this.send.password.trim()}))}submit(){return i(this,void 0,void 0,(function*(){if(this.disableSend)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("sendDisabledWarning")),!1;if(null==this.send.name||""===this.send.name)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),!1;let e=null;if(this.send.type===a.SendType.File&&!this.editMode){const t=document.getElementById("file").files;if(null==t||0===t.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"));if(e=t[0],t[0].size>524288e3)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize"))}null!=this.password&&""===this.password.trim()&&(this.password=null),this.formPromise=this.encryptSend(e).then((e=>i(this,void 0,void 0,(function*(){const t=this.sendService.saveWithServer(e);if(yield t,null==this.send.id&&(this.send.id=e[0].id),null==this.send.accessId&&(this.send.accessId=e[0].accessId),this.onSavedSend.emit(this.send),this.copyLink&&null!=this.link){const e=yield this.copyLinkToClipboard(this.link);null==e||e?this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedSend":"createdSend")):(yield this.platformUtilsService.showDialog(this.i18nService.t(this.editMode?"editedSend":"createdSend"),null,this.i18nService.t("ok"),null,"success",null),yield this.copyLinkToClipboard(this.link))}}))));try{return yield this.formPromise,!0}catch(t){this.logService.error(t)}return!1}))}copyLinkToClipboard(e){return i(this,void 0,void 0,(function*(){return Promise.resolve(this.platformUtilsService.copyToClipboard(e))}))}delete(){return i(this,void 0,void 0,(function*(){if(null!=this.deletePromise)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{return this.deletePromise=this.sendService.deleteWithServer(this.send.id),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),yield this.load(),this.onDeletedSend.emit(this.send),!0}catch(e){this.logService.error(e)}return!1}))}typeChanged(){this.send.type!==a.SendType.File||this.alertShown||(this.canAccessPremium?this.emailVerified||(this.alertShown=!0,this.messagingService.send("emailVerificationRequired")):(this.alertShown=!0,this.messagingService.send("premiumRequired")))}toggleOptions(){this.showOptions=!this.showOptions}loadSend(){return i(this,void 0,void 0,(function*(){return this.sendService.get(this.sendId)}))}encryptSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.sendService.encrypt(this.send,e,this.password,null);try{t[0].deletionDate=null==this.deletionDate?null:new Date(this.deletionDate)}catch(n){t[0].deletionDate=null}try{t[0].expirationDate=null==this.expirationDate?null:new Date(this.expirationDate)}catch(i){t[0].expirationDate=null}return t}))}togglePasswordVisible(){this.showPassword=!this.showPassword,document.getElementById("password").focus()}}t.AddEditComponent=S,S.ɵfac=function(e){return new(e||S)(d.ɵɵdirectiveInject(p.I18nService),d.ɵɵdirectiveInject(u.PlatformUtilsService),d.ɵɵdirectiveInject(m.EnvironmentService),d.ɵɵdirectiveInject(h.DatePipe),d.ɵɵdirectiveInject(v.SendService),d.ɵɵdirectiveInject(f.MessagingService),d.ɵɵdirectiveInject(g.PolicyService),d.ɵɵdirectiveInject(y.LogService),d.ɵɵdirectiveInject(x.StateService))},S.ɵdir=d.ɵɵdefineDirective({type:S,inputs:{sendId:"sendId",type:"type"},outputs:{onSavedSend:"onSavedSend",onDeletedSend:"onDeletedSend",onCancelled:"onCancelled"}})},46215:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(57490);const i=n(32621),r=n(96832),o=(n(40349),n(99954),n(32621)),a=n(40349),s=n(99954),l=n(57490);var c,d,p;!function(e){e.Default="default",e.Firefox="firefox",e.Safari="safari"}(c||(c={})),function(e){e.DeletionDate="deletion",e.ExpriationDate="expiration"}(d||(d={})),function(e){e[e.OneHour=1]="OneHour",e[e.OneDay=24]="OneDay",e[e.TwoDays=48]="TwoDays",e[e.ThreeDays=72]="ThreeDays",e[e.SevenDays=168]="SevenDays",e[e.ThirtyDays=720]="ThirtyDays",e[e.Custom=0]="Custom",e[e.Never=null]="Never"}(p||(p={}));class u{constructor(e,t,n){this.i18nService=e,this.platformUtilsService=t,this.datePipe=n,this.datesChanged=new i.EventEmitter,this.datesForm=new r.FormGroup({selectedDeletionDatePreset:new r.FormControl,selectedExpirationDatePreset:new r.FormControl,defaultDeletionDateTime:new r.FormControl,defaultExpirationDateTime:new r.FormControl,fallbackDeletionDate:new r.FormControl,fallbackDeletionTime:new r.FormControl,fallbackExpirationDate:new r.FormControl,fallbackExpirationTime:new r.FormControl}),this.deletionDatePresets=[{name:this.i18nService.t("oneHour"),value:p.OneHour},{name:this.i18nService.t("oneDay"),value:p.OneDay},{name:this.i18nService.t("days","2"),value:p.TwoDays},{name:this.i18nService.t("days","3"),value:p.ThreeDays},{name:this.i18nService.t("days","7"),value:p.SevenDays},{name:this.i18nService.t("days","30"),value:p.ThirtyDays},{name:this.i18nService.t("custom"),value:p.Custom}],this.expirationDatePresets=[{name:this.i18nService.t("never"),value:p.Never}].concat([...this.deletionDatePresets])}get browserPath(){return this.platformUtilsService.isFirefox()?c.Firefox:this.platformUtilsService.isSafari()?c.Safari:c.Default}get selectedDeletionDatePreset(){return this.datesForm.get("selectedDeletionDatePreset")}get selectedExpirationDatePreset(){return this.datesForm.get("selectedExpirationDatePreset")}get defaultDeletionDateTime(){return this.datesForm.get("defaultDeletionDateTime")}get defaultExpirationDateTime(){return this.datesForm.get("defaultExpirationDateTime")}get fallbackDeletionDate(){return this.datesForm.get("fallbackDeletionDate")}get fallbackDeletionTime(){return this.datesForm.get("fallbackDeletionTime")}get fallbackExpirationDate(){return this.datesForm.get("fallbackExpirationDate")}get fallbackExpirationTime(){return this.datesForm.get("fallbackExpirationTime")}get formattedDeletionDate(){switch(this.selectedDeletionDatePreset.value){case p.Never:return this.selectedDeletionDatePreset.setValue(p.SevenDays),this.formattedDeletionDate;case p.Custom:switch(this.browserPath){case c.Safari:case c.Firefox:return this.fallbackDeletionDate.value+"T"+this.fallbackDeletionTime.value;default:return this.defaultDeletionDateTime.value}default:const e=new Date,t=e.setTime(e.getTime()+60*this.selectedDeletionDatePreset.value*60*1e3);return new Date(t).toString()}}get formattedExpirationDate(){switch(this.selectedExpirationDatePreset.value){case p.Never:return null;case p.Custom:switch(this.browserPath){case c.Safari:case c.Firefox:return this.fallbackExpirationDate.value&&this.fallbackExpirationTime.value||!this.editMode?this.fallbackExpirationDate.value+"T"+this.fallbackExpirationTime.value:null;default:return this.defaultExpirationDateTime.value?this.defaultExpirationDateTime.value:null}default:const e=new Date,t=e.setTime(e.getTime()+60*this.selectedExpirationDatePreset.value*60*1e3);return new Date(t).toString()}}get safariDeletionTimePresetOptions(){return this.safariTimePresetOptions(d.DeletionDate)}get safariExpirationTimePresetOptions(){return this.safariTimePresetOptions(d.ExpriationDate)}get nextWeek(){const e=new Date;return e.setDate(e.getDate()+7),e}ngOnInit(){this.setInitialFormValues(),this.emitDates(),this.datesForm.valueChanges.subscribe((()=>{this.emitDates()}))}onDeletionDatePresetSelect(e){this.selectedDeletionDatePreset.setValue(e)}clearExpiration(){switch(this.browserPath){case c.Safari:case c.Firefox:this.fallbackExpirationDate.setValue(null),this.fallbackExpirationTime.setValue(null);break;case c.Default:this.defaultExpirationDateTime.setValue(null)}}emitDates(){this.datesChanged.emit({deletionDate:this.formattedDeletionDate,expirationDate:this.formattedExpirationDate})}setInitialFormValues(){if(this.editMode)switch(this.selectedDeletionDatePreset.setValue(p.Custom),this.selectedExpirationDatePreset.setValue(p.Custom),this.browserPath){case c.Safari:case c.Firefox:this.fallbackDeletionDate.setValue(this.initialDeletionDate.toISOString().slice(0,10)),this.fallbackDeletionTime.setValue(this.initialDeletionDate.toTimeString().slice(0,5)),null!=this.initialExpirationDate&&(this.fallbackExpirationDate.setValue(this.initialExpirationDate.toISOString().slice(0,10)),this.fallbackExpirationTime.setValue(this.initialExpirationDate.toTimeString().slice(0,5)));break;case c.Default:this.initialExpirationDate&&this.defaultExpirationDateTime.setValue(this.datePipe.transform(new Date(this.initialExpirationDate),"yyyy-MM-ddTHH:mm")),this.defaultDeletionDateTime.setValue(this.datePipe.transform(new Date(this.initialDeletionDate),"yyyy-MM-ddTHH:mm"))}else if(this.selectedDeletionDatePreset.setValue(p.SevenDays),this.selectedExpirationDatePreset.setValue(p.Never),this.browserPath===c.Safari)this.fallbackDeletionDate.setValue(this.nextWeek.toISOString().slice(0,10)),this.fallbackDeletionTime.setValue(this.safariTimePresetOptions(d.DeletionDate)[1].twentyFourHour)}safariTimePresetOptions(e){const t=[],n=[],i=[],r=[];for(let a=1;a<=12;a++)for(let e=0;e<60;e+=15){let o=a.toString(),s=e.toString();if(a<10&&(o="0"+o),e<10&&(s="0"+s),12===a){const e={twelveHour:`${o}:${s} AM`,twentyFourHour:`00:${s}`};n.push(e);const i={twelveHour:`${o}:${s} PM`,twentyFourHour:`${o}:${s}`};t.push(i)}else{const e={twelveHour:`${o}:${s} AM`,twentyFourHour:`${o}:${s}`};i.push(e);const t={twelveHour:`${o}:${s} PM`,twentyFourHour:`${a+12}:${s}`};r.push(t)}}const o=[...n,...i,...t,...r];if(e===d.ExpriationDate&&null!=this.initialExpirationDate&&this.editMode){return[{twelveHour:this.datePipe.transform(this.initialExpirationDate,"hh:mm a"),twentyFourHour:this.datePipe.transform(this.initialExpirationDate,"HH:mm")},{twelveHour:null,twentyFourHour:null},...o]}if(e===d.DeletionDate&&null!=this.initialDeletionDate&&this.editMode){return[{twelveHour:this.datePipe.transform(this.initialDeletionDate,"hh:mm a"),twentyFourHour:this.datePipe.transform(this.initialDeletionDate,"HH:mm")},...o]}return[{twelveHour:null,twentyFourHour:null},...o]}}t.EffluxDatesComponent=u,u.ɵfac=function(e){return new(e||u)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.DatePipe))},u.ɵdir=o.ɵɵdefineDirective({type:u,inputs:{initialDeletionDate:"initialDeletionDate",initialExpirationDate:"initialExpirationDate",editMode:"editMode",disabled:"disabled"},outputs:{datesChanged:"datesChanged"}})},88154:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendComponent=void 0;n(32621);const r=n(40251),o=n(49538),a=(n(57997),n(40349),n(70143),n(99954),n(10685),n(14170),n(94129),n(32621)),s=n(94129),l=n(40349),c=n(99954),d=n(57997),p=n(14170),u=n(10685),m=n(70143);class h{constructor(e,t,n,i,r,a,s,l){this.sendService=e,this.i18nService=t,this.platformUtilsService=n,this.environmentService=i,this.ngZone=r,this.searchService=a,this.policyService=s,this.logService=l,this.disableSend=!1,this.sendType=o.SendType,this.loaded=!1,this.loading=!0,this.refreshing=!1,this.expired=!1,this.type=null,this.sends=[],this.filteredSends=[],this.searchPending=!1,this.hasSearched=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.disableSend=yield this.policyService.policyAppliesToUser(r.PolicyType.DisableSend)}))}load(e=null){return i(this,void 0,void 0,(function*(){this.loading=!0;const e=yield this.sendService.getAllDecrypted();this.sends=e,null!=this.onSuccessfulLoad?yield this.onSuccessfulLoad():this.selectAll(),this.loading=!1,this.loaded=!0}))}reload(e=null){return i(this,void 0,void 0,(function*(){this.loaded=!1,this.sends=[],yield this.load(e)}))}refresh(){return i(this,void 0,void 0,(function*(){try{this.refreshing=!0,yield this.reload(this.filter)}finally{this.refreshing=!1}}))}applyFilter(e=null){return i(this,void 0,void 0,(function*(){this.filter=e,yield this.search(null)}))}search(e=null){return i(this,void 0,void 0,(function*(){if(this.searchPending=!1,null!=this.searchTimeout&&clearTimeout(this.searchTimeout),null==e)return this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((e=>null==this.filter||this.filter(e))),void this.applyTextSearch();this.searchPending=!0,this.searchTimeout=setTimeout((()=>i(this,void 0,void 0,(function*(){this.hasSearched=this.searchService.isSearchable(this.searchText),this.filteredSends=this.sends.filter((e=>null==this.filter||this.filter(e))),this.applyTextSearch(),this.searchPending=!1}))),e)}))}removePassword(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise||null==e.password)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removePasswordConfirmation"),this.i18nService.t("removePassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.sendService.removePasswordWithServer(e.id),yield this.actionPromise,null!=this.onSuccessfulRemovePassword?this.onSuccessfulRemovePassword():(this.platformUtilsService.showToast("success",null,this.i18nService.t("removedPassword")),yield this.load())}catch(t){this.logService.error(t)}this.actionPromise=null}))}delete(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return!1;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.sendService.deleteWithServer(e.id),yield this.actionPromise,null!=this.onSuccessfulDelete?this.onSuccessfulDelete():(this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),yield this.refresh())}catch(t){this.logService.error(t)}return this.actionPromise=null,!0}))}copy(e){const t=this.environmentService.getSendUrl()+e.accessId+"/"+e.urlB64Key;this.platformUtilsService.copyToClipboard(t),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendLink")))}searchTextChanged(){this.search(200)}selectAll(){this.clearSelections(),this.selectedAll=!0,this.applyFilter(null)}selectType(e){this.clearSelections(),this.selectedType=e,this.applyFilter((t=>t.type===e))}clearSelections(){this.selectedAll=!1,this.selectedType=null}applyTextSearch(){null!=this.searchText&&(this.filteredSends=this.searchService.searchSends(this.filteredSends,this.searchText))}}t.SendComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.SendService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.EnvironmentService),a.ɵɵdirectiveInject(a.NgZone),a.ɵɵdirectiveInject(p.SearchService),a.ɵɵdirectiveInject(u.PolicyService),a.ɵɵdirectiveInject(m.LogService))},h.ɵdir=a.ɵɵdefineDirective({type:h})},89487:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(82058),n(40349),n(36424),n(86193),n(99954),n(10685),n(77243),n(2173),n(82822)),a=n(63750),s=n(8696),l=n(48921),c=n(6317),d=n(25847),p=n(70829),u=n(32621),m=n(40349),h=n(82058),v=n(36424),f=n(86193),g=n(99954),y=n(10685),x=n(68012),S=n(91092),b=n(2173),w=n(77243);class I extends l.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,d),this.router=a,this.apiService=s,this.syncService=l,this.route=c,this.syncLoading=!0,this.showPassword=!1,this.hint="",this.identifier=null,this.resetPasswordAutoEnroll=!1,this.successRoute="vault"}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){if(yield this.syncService.fullSync(!0),this.syncLoading=!1,this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){null!=e.identifier&&(this.identifier=e.identifier)})))),null!=this.identifier)try{const e=yield this.apiService.getOrganizationAutoEnrollStatus(this.identifier);this.orgId=e.id,this.resetPasswordAutoEnroll=e.resetPasswordEnabled,this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPoliciesForInvitedUsers(this.orgId)}catch(t){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}e.ngOnInit.call(this)}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){this.kdf=d.KdfType.PBKDF2_SHA256;const e=this.platformUtilsService.isIE();return this.kdfIterations=e?1e4:1e5,!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){const r=yield this.cryptoService.makeKeyPair(n[0]),l=new s.SetPasswordRequest(e,n[1].encryptedString,this.hint,this.kdf,this.kdfIterations,this.identifier,new o.KeysRequest(r[0],r[1].encryptedString));try{this.resetPasswordAutoEnroll?this.formPromise=this.apiService.setPassword(l).then((()=>i(this,void 0,void 0,(function*(){return yield this.onSetPasswordSuccess(t,n,r),this.apiService.getOrganizationKeys(this.orgId)})))).then((e=>i(this,void 0,void 0,(function*(){if(null==e)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const t=yield this.stateService.getUserId(),n=p.Utils.fromB64ToArray(e.publicKey),i=yield this.cryptoService.getEncKey(),r=yield this.cryptoService.rsaEncrypt(i.key,n.buffer),o=new a.OrganizationUserResetPasswordEnrollmentRequest;return o.resetPasswordKey=r.encryptedString,this.apiService.putOrganizationUserResetPasswordEnrollment(this.orgId,t,o)})))):this.formPromise=this.apiService.setPassword(l).then((()=>i(this,void 0,void 0,(function*(){yield this.onSetPasswordSuccess(t,n,r)})))),yield this.formPromise,null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.router.navigate([this.successRoute])}catch(c){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}onSetPasswordSuccess(e,t,n){return i(this,void 0,void 0,(function*(){yield this.stateService.setKdfType(this.kdf),yield this.stateService.setKdfIterations(this.kdfIterations),yield this.cryptoService.setKey(e),yield this.cryptoService.setEncKey(t[1].encryptedString),yield this.cryptoService.setEncPrivateKey(n[1].encryptedString);const i=yield this.cryptoService.hashPassword(this.masterPassword,e,c.HashPurpose.LocalAuthorization);yield this.cryptoService.setKeyHash(i)}))}}t.SetPasswordComponent=I,I.ɵfac=function(e){return new(e||I)(u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(h.CryptoService),u.ɵɵdirectiveInject(v.MessagingService),u.ɵɵdirectiveInject(f.PasswordGenerationService),u.ɵɵdirectiveInject(g.PlatformUtilsService),u.ɵɵdirectiveInject(y.PolicyService),u.ɵɵdirectiveInject(x.Router),u.ɵɵdirectiveInject(S.ApiService),u.ɵɵdirectiveInject(b.SyncService),u.ɵɵdirectiveInject(x.ActivatedRoute),u.ɵɵdirectiveInject(w.StateService))},I.ɵdir=u.ɵɵdefineDirective({type:I,features:[u.ɵɵInheritDefinitionFeature]})},48701:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutInputComponent=void 0;n(96832),n(40349),n(10685);const r=n(40251),o=n(32621),a=n(96832),s=n(10685),l=n(40349);class c{constructor(e,t,n){this.formBuilder=e,this.policyService=t,this.i18nService=n,this.form=this.formBuilder.group({vaultTimeout:[null],custom:this.formBuilder.group({hours:[null],minutes:[null]})})}get showCustom(){return this.form.get("vaultTimeout").value===c.CUSTOM_VALUE}ngOnInit(){return i(this,void 0,void 0,(function*(){if(yield this.policyService.policyAppliesToUser(r.PolicyType.MaximumVaultTimeout)){const e=yield this.policyService.getAll(r.PolicyType.MaximumVaultTimeout);this.vaultTimeoutPolicy=e[0],this.vaultTimeoutPolicyHours=Math.floor(this.vaultTimeoutPolicy.data.minutes/60),this.vaultTimeoutPolicyMinutes=this.vaultTimeoutPolicy.data.minutes%60,this.vaultTimeouts=this.vaultTimeouts.filter((e=>e.value<=this.vaultTimeoutPolicy.data.minutes&&(e.value>0||e.value===c.CUSTOM_VALUE)&&null!=e.value)),this.validatorChange()}this.form.valueChanges.subscribe((e=>i(this,void 0,void 0,(function*(){this.onChange(this.getVaultTimeout(e))})))),this.form.get("vaultTimeout").valueChanges.subscribe((e=>{if(e!==c.CUSTOM_VALUE)return;const t=Math.max(this.form.value.vaultTimeout,0);this.form.patchValue({custom:{hours:Math.floor(t/60),minutes:t%60}})}))}))}ngOnChanges(){this.vaultTimeouts.push({name:this.i18nService.t("custom"),value:c.CUSTOM_VALUE})}getVaultTimeout(e){return e.vaultTimeout!==c.CUSTOM_VALUE?e.vaultTimeout:60*e.custom.hours+e.custom.minutes}writeValue(e){null!=e&&(this.vaultTimeouts.every((t=>t.value!==e))?this.form.setValue({vaultTimeout:c.CUSTOM_VALUE,custom:{hours:Math.floor(e/60),minutes:e%60}}):this.form.patchValue({vaultTimeout:e}))}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}validate(e){var t,n;return this.vaultTimeoutPolicy&&(null===(n=null===(t=this.vaultTimeoutPolicy)||void 0===t?void 0:t.data)||void 0===n?void 0:n.minutes)<e.value?{policyError:!0}:null}registerOnValidatorChange(e){this.validatorChange=e}}t.VaultTimeoutInputComponent=c,c.CUSTOM_VALUE=-100,c.ɵfac=function(e){return new(e||c)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.PolicyService),o.ɵɵdirectiveInject(l.I18nService))},c.ɵdir=o.ɵɵdefineDirective({type:c,inputs:{vaultTimeouts:"vaultTimeouts"},features:[o.ɵɵNgOnChangesFeature]})},39155:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ShareComponent=void 0;const r=n(32621),o=n(68320),a=(n(68062),n(69050),n(40349),n(70143),n(94308),n(99954),n(70829)),s=n(32621),l=n(69050),c=n(99954),d=n(40349),p=n(68062),u=n(70143),m=n(94308);class h{constructor(e,t,n,i,o,a){this.collectionService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherService=i,this.logService=o,this.organizationService=a,this.onSharedCipher=new r.EventEmitter,this.collections=[],this.organizations=[],this.writeableCollections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.collectionService.getAllDecrypted();this.writeableCollections=e.map((e=>e)).filter((e=>!e.readOnly));const t=yield this.organizationService.getAll();this.organizations=t.sort(a.Utils.getSortFunction(this.i18nService,"name")).filter((e=>e.enabled&&e.status===o.OrganizationUserStatusType.Confirmed));const n=yield this.cipherService.get(this.cipherId);this.cipher=yield n.decrypt(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections()}))}filterCollections(){this.writeableCollections.forEach((e=>e.checked=!1)),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((e=>e.organizationId===this.organizationId))}submit(){var e,t;return i(this,void 0,void 0,(function*(){const n=this.collections.filter((e=>!!e.checked)).map((e=>e.id));if(0===n.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection"));const r=yield this.cipherService.get(this.cipherId),o=yield r.decrypt(),a=null!==(t=null===(e=this.organizations.find((e=>e.id===this.organizationId)))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization");try{return this.formPromise=this.cipherService.shareWithServer(o,this.organizationId,n).then((()=>i(this,void 0,void 0,(function*(){this.onSharedCipher.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemToOrg",o.name,a))})))),yield this.formPromise,!0}catch(s){this.logService.error(s)}return!1}))}get canSave(){if(null!=this.collections)for(let e=0;e<this.collections.length;e++)if(this.collections[e].checked)return!0;return!1}}t.ShareComponent=h,h.ɵfac=function(e){return new(e||h)(s.ɵɵdirectiveInject(l.CollectionService),s.ɵɵdirectiveInject(c.PlatformUtilsService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.CipherService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.OrganizationService))},h.ɵdir=s.ɵɵdefineDirective({type:h,inputs:{cipherId:"cipherId",organizationId:"organizationId"},outputs:{onSharedCipher:"onSharedCipher"}})},11882:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(26451),n(39229),n(57997),n(40349),n(70143),n(86193),n(99954),n(77243),n(70829)),a=n(32621),s=n(26451),l=n(68012),c=n(40349),d=n(77243),p=n(99954),u=n(91092),m=n(39229),h=n(57997),v=n(86193),f=n(70143);class g{constructor(e,t,n,i,r,o,a,s,l,c,d){this.authService=e,this.router=t,this.i18nService=n,this.route=i,this.stateService=r,this.platformUtilsService=o,this.apiService=a,this.cryptoFunctionService=s,this.environmentService=l,this.passwordGenerationService=c,this.logService=d,this.loggingIn=!1,this.twoFactorRoute="2fa",this.successRoute="lock",this.changePasswordRoute="set-password",this.forcePasswordResetRoute="update-temp-password"}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.code&&null!=e.state){const t=yield this.stateService.getSsoCodeVerifier(),n=yield this.stateService.getSsoState();yield this.stateService.setSsoCodeVerifier(null),yield this.stateService.setSsoState(null),null!=e.code&&null!=t&&null!=n&&this.checkState(n,e.state)&&(yield this.logIn(e.code,t,this.getOrgIdentifierFromState(e.state)))}else null!=e.clientId&&null!=e.redirectUri&&null!=e.state&&null!=e.codeChallenge&&(this.redirectUri=e.redirectUri,this.state=e.state,this.codeChallenge=e.codeChallenge,this.clientId=e.clientId)}))))}))}submit(e,t){return i(this,void 0,void 0,(function*(){if(this.initiateSsoFormPromise=this.preValidate(),yield this.initiateSsoFormPromise){const n=yield this.buildAuthorizeUrl(e,t);this.platformUtilsService.launchUri(n,{sameWindow:!0})}}))}preValidate(){return i(this,void 0,void 0,(function*(){return null==this.identifier||""===this.identifier?(this.platformUtilsService.showToast("error",this.i18nService.t("ssoValidationFailed"),this.i18nService.t("ssoIdentifierRequired")),!1):yield this.apiService.preValidateSso(this.identifier)}))}buildAuthorizeUrl(e,t){return i(this,void 0,void 0,(function*(){let n=this.codeChallenge,i=this.state;const r={type:"password",length:64,uppercase:!0,lowercase:!0,numbers:!0,special:!1};if(null==n){const e=yield this.passwordGenerationService.generatePassword(r),t=yield this.cryptoFunctionService.hash(e,"sha256");n=o.Utils.fromBufferToUrlB64(t),yield this.stateService.setSsoCodeVerifier(e)}null==i&&(i=yield this.passwordGenerationService.generatePassword(r),e&&(i+=`_returnUri='${e}'`)),i+=`_identifier=${this.identifier}`,yield this.stateService.setSsoState(i);let a=this.environmentService.getIdentityUrl()+"/connect/authorize?client_id="+this.clientId+"&redirect_uri="+encodeURIComponent(this.redirectUri)+"&response_type=code&scope=api offline_access&state="+i+"&code_challenge="+n+"&code_challenge_method=S256&response_mode=query&domain_hint="+encodeURIComponent(this.identifier);if(t){const e=yield this.apiService.getSsoUserIdentifier();a+=`&user_identifier=${encodeURIComponent(e)}`}return a}))}logIn(e,t,n){return i(this,void 0,void 0,(function*(){this.loggingIn=!0;try{this.formPromise=this.authService.logInSso(e,t,this.redirectUri,n);const i=yield this.formPromise;if(i.twoFactor)null!=this.onSuccessfulLoginTwoFactorNavigate?this.onSuccessfulLoginTwoFactorNavigate():this.router.navigate([this.twoFactorRoute],{queryParams:{identifier:n,sso:"true"}});else if(i.resetMasterPassword)null!=this.onSuccessfulLoginChangePasswordNavigate?this.onSuccessfulLoginChangePasswordNavigate():this.router.navigate([this.changePasswordRoute],{queryParams:{identifier:n}});else if(i.forcePasswordReset)null!=this.onSuccessfulLoginForceResetNavigate?this.onSuccessfulLoginForceResetNavigate():this.router.navigate([this.forcePasswordResetRoute]);else{const e=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!e),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute])}}catch(i){this.logService.error(i),"Unable to reach key connector"===i.message&&this.platformUtilsService.showToast("error",null,this.i18nService.t("ssoKeyConnectorUnavailable"))}this.loggingIn=!1}))}getOrgIdentifierFromState(e){if(null==e)return null;const t=e.split("_identifier=");return t.length>1?t[1]:null}checkState(e,t){if(null==e)return!1;if(null==t)return!1;const n=e.split("_identifier="),i=t.split("_identifier=");return n[0]===i[0]}}t.SsoComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.AuthService),a.ɵɵdirectiveInject(l.Router),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(l.ActivatedRoute),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PlatformUtilsService),a.ɵɵdirectiveInject(u.ApiService),a.ɵɵdirectiveInject(m.CryptoFunctionService),a.ɵɵdirectiveInject(h.EnvironmentService),a.ɵɵdirectiveInject(v.PasswordGenerationService),a.ɵɵdirectiveInject(f.LogService))},g.ɵdir=a.ɵɵdefineDirective({type:g})},45331:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenToastModule=t.BitwardenToastGlobalConfig=t.BitwardenToast=void 0;const i=n(98212),r=n(57490),o=(n(32621),n(68290)),a=n(32621),s=n(68290),l=n(57490);function c(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",6),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().remove()})),a.ɵɵelementStart(1,"span",7),a.ɵɵtext(2,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd()}}function d(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(1),a.ɵɵtextInterpolate1("[",e.duplicatesCount+1,"]")}}function p(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1),a.ɵɵtemplate(2,d,2,1,"ng-container",5),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.titleClass),a.ɵɵattribute("aria-label",e.title),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",e.title," "),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",e.duplicatesCount)}}function u(e,t){if(1&e&&a.ɵɵelement(0,"div",8),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.messageClass),a.ɵɵproperty("innerHTML",e.message,a.ɵɵsanitizeHtml)}}function m(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",9),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵclassMap(e.options.messageClass),a.ɵɵattribute("aria-label",e.message),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",e.message," ")}}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵelement(1,"div",10),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵstyleProp("width",e.width+"%")}}class v extends o.Toast{constructor(e,t){super(e,t),this.toastrService=e,this.toastPackage=t}}t.BitwardenToast=v,v.ɵfac=function(e){return new(e||v)(a.ɵɵdirectiveInject(s.ToastrService),a.ɵɵdirectiveInject(s.ToastPackage))},v.ɵcmp=a.ɵɵdefineComponent({type:v,selectors:[["","toast-component2",""]],features:[a.ɵɵInheritDefinitionFeature],attrs:["toast-component2",""],decls:8,vars:5,consts:[["type","button","class","toast-close-button","aria-label","Close",3,"click",4,"ngIf"],[1,"icon"],[3,"class",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class","innerHTML",4,"ngIf"],["role","alertdialog","aria-live","polite",3,"class",4,"ngIf"],[4,"ngIf"],["type","button","aria-label","Close",1,"toast-close-button",3,"click"],["aria-hidden","true"],["role","alertdialog","aria-live","polite",3,"innerHTML"],["role","alertdialog","aria-live","polite"],[1,"toast-progress"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,c,3,0,"button",0),a.ɵɵelementStart(1,"div",1),a.ɵɵelement(2,"i"),a.ɵɵelementEnd(),a.ɵɵelementStart(3,"div"),a.ɵɵtemplate(4,p,3,5,"div",2),a.ɵɵtemplate(5,u,1,3,"div",3),a.ɵɵtemplate(6,m,2,4,"div",4),a.ɵɵelementEnd(),a.ɵɵtemplate(7,h,2,2,"div",5)),2&e&&(a.ɵɵproperty("ngIf",t.options.closeButton),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.title),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.message&&t.options.enableHtml),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.message&&!t.options.enableHtml),a.ɵɵadvance(1),a.ɵɵproperty("ngIf",t.options.progressBar))},directives:[l.NgIf],encapsulation:2,data:{animation:[i.trigger("flyInOut",[i.state("inactive",i.style({opacity:0})),i.state("active",i.style({opacity:1})),i.state("removed",i.style({opacity:0})),i.transition("inactive => active",i.animate("{{ easeTime }}ms {{ easing }}")),i.transition("active => removed",i.animate("{{ easeTime }}ms {{ easing }}"))])]}}),t.BitwardenToastGlobalConfig=Object.assign(Object.assign({},o.DefaultNoComponentGlobalConfig),{toastComponent:v});class f{static forRoot(e={}){return{ngModule:f,providers:[{provide:o.TOAST_CONFIG,useValue:{default:t.BitwardenToastGlobalConfig,config:e}}]}}}t.BitwardenToastModule=f,f.ɵfac=function(e){return new(e||f)},f.ɵmod=a.ɵɵdefineNgModule({type:f}),f.ɵinj=a.ɵɵdefineInjector({imports:[[r.CommonModule]]})},5775:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;const i=n(32621),r=(n(68012),n(26451),n(40349),n(99954),n(32621)),o=n(26451),a=n(68012),s=n(40349),l=n(99954);class c{constructor(e,t,n,r,o){this.authService=e,this.router=t,this.i18nService=n,this.platformUtilsService=r,this.win=o,this.onProviderSelected=new i.EventEmitter,this.onRecoverSelected=new i.EventEmitter,this.providers=[]}ngOnInit(){this.providers=this.authService.getSupportedTwoFactorProviders(this.win)}choose(e){this.onProviderSelected.emit(e.type)}recover(){this.platformUtilsService.launchUri("https://help.bitwarden.com/article/lost-two-step-device/"),this.onRecoverSelected.emit()}}t.TwoFactorOptionsComponent=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵdirectiveInject(o.AuthService),r.ɵɵdirectiveInject(a.Router),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(Window))},c.ɵdir=r.ɵɵdefineDirective({type:c,outputs:{onProviderSelected:"onProviderSelected",onRecoverSelected:"onRecoverSelected"}})},21509:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorComponent=void 0;n(68012);const r=n(53232),o=n(57976),a=n(3061),s=(n(91092),n(26451),n(57997),n(40349),n(70143),n(99954),n(77243),n(25906)),l=n(51597),c=n(76015),d=n(32621),p=n(26451),u=n(68012),m=n(40349),h=n(91092),v=n(99954),f=n(57997),g=n(77243),y=n(70143);class x{constructor(e,t,n,i,r,a,l,c,d,p){this.authService=e,this.router=t,this.i18nService=n,this.apiService=i,this.platformUtilsService=r,this.win=a,this.environmentService=l,this.stateService=c,this.route=d,this.logService=p,this.token="",this.remember=!1,this.webAuthnReady=!1,this.webAuthnNewTab=!1,this.providers=s.TwoFactorProviders,this.providerType=o.TwoFactorProviderType,this.selectedProviderType=o.TwoFactorProviderType.Authenticator,this.webAuthnSupported=!1,this.webAuthn=null,this.title="",this.twoFactorEmail=null,this.identifier=null,this.loginRoute="login",this.successRoute="vault",this.webAuthnSupported=this.platformUtilsService.supportsWebAuthn(a)}get webAuthnAllow(){return`publickey-credentials-get ${this.environmentService.getWebVaultUrl()}`}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.authing&&null!=this.authService.twoFactorProvidersData){if(this.route.queryParams.pipe(r.first()).subscribe((e=>{null!=e.identifier&&(this.identifier=e.identifier)})),this.needsLock&&(this.successRoute="lock"),null!=this.win&&this.webAuthnSupported){const e=this.environmentService.getWebVaultUrl();this.webAuthn=new c.WebAuthnIFrame(this.win,e,this.webAuthnNewTab,this.platformUtilsService,this.i18nService,(e=>{this.token=e,this.submit()}),(e=>{this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),e)}),(e=>{"ready"===e&&(this.webAuthnReady=!0)}))}this.selectedProviderType=this.authService.getDefaultTwoFactorProvider(this.webAuthnSupported),yield this.init()}else this.router.navigate([this.loginRoute])}))}ngOnDestroy(){this.cleanupWebAuthn(),this.webAuthn=null}init(){return i(this,void 0,void 0,(function*(){if(null==this.selectedProviderType)return void(this.title=this.i18nService.t("loginUnavailable"));this.cleanupWebAuthn(),this.title=s.TwoFactorProviders[this.selectedProviderType].name;const e=this.authService.twoFactorProvidersData.get(this.selectedProviderType);switch(this.selectedProviderType){case o.TwoFactorProviderType.WebAuthn:this.webAuthnNewTab||setTimeout((()=>{this.authWebAuthn()}),500);break;case o.TwoFactorProviderType.Duo:case o.TwoFactorProviderType.OrganizationDuo:setTimeout((()=>{l.init({iframe:void 0,host:e.Host,sig_request:e.Signature,submit_callback:e=>i(this,void 0,void 0,(function*(){const t=e.querySelector('input[name="sig_response"]');null!=t&&(this.token=t.value,yield this.submit())}))})}),0);break;case o.TwoFactorProviderType.Email:this.twoFactorEmail=e.Email,this.authService.twoFactorProvidersData.size>1&&(yield this.sendEmail(!1))}}))}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.token&&""!==this.token){if(this.selectedProviderType===o.TwoFactorProviderType.WebAuthn){if(null==this.webAuthn)return;this.webAuthn.stop()}else this.selectedProviderType!==o.TwoFactorProviderType.Email&&this.selectedProviderType!==o.TwoFactorProviderType.Authenticator||(this.token=this.token.replace(" ","").trim());try{yield this.doSubmit()}catch(e){this.selectedProviderType===o.TwoFactorProviderType.WebAuthn&&null!=this.webAuthn&&this.webAuthn.start()}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verificationCodeRequired"))}))}doSubmit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.authService.logInTwoFactor(this.selectedProviderType,this.token,this.remember);const e=yield this.formPromise,t=yield this.stateService.getDisableFavicon();yield this.stateService.setDisableFavicon(!!t),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),e.resetMasterPassword&&(this.successRoute="set-password"),e.forcePasswordReset&&(this.successRoute="update-temp-password"),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}})}))}sendEmail(e){return i(this,void 0,void 0,(function*(){if(this.selectedProviderType===o.TwoFactorProviderType.Email&&null==this.emailPromise){try{const t=new a.TwoFactorEmailRequest;t.email=this.authService.email,t.masterPasswordHash=this.authService.masterPasswordHash,this.emailPromise=this.apiService.postTwoFactorEmail(t),yield this.emailPromise,e&&this.platformUtilsService.showToast("success",null,this.i18nService.t("verificationCodeEmailSent",this.twoFactorEmail))}catch(t){this.logService.error(t)}this.emailPromise=null}}))}authWebAuthn(){const e=this.authService.twoFactorProvidersData.get(this.selectedProviderType);this.webAuthnSupported&&null!=this.webAuthn&&this.webAuthn.init(e)}cleanupWebAuthn(){null!=this.webAuthn&&(this.webAuthn.stop(),this.webAuthn.cleanup())}get authing(){return this.authService.authingWithPassword()||this.authService.authingWithSso()||this.authService.authingWithApiKey()}get needsLock(){return this.authService.authingWithSso()||this.authService.authingWithApiKey()}}t.TwoFactorComponent=x,x.ɵfac=function(e){return new(e||x)(d.ɵɵdirectiveInject(p.AuthService),d.ɵɵdirectiveInject(u.Router),d.ɵɵdirectiveInject(m.I18nService),d.ɵɵdirectiveInject(h.ApiService),d.ɵɵdirectiveInject(v.PlatformUtilsService),d.ɵɵdirectiveInject(Window),d.ɵɵdirectiveInject(f.EnvironmentService),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(u.ActivatedRoute),d.ɵɵdirectiveInject(y.LogService))},x.ɵdir=d.ɵɵdefineDirective({type:x})},79754:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdatePasswordComponent=void 0;n(68012),n(91092),n(82058),n(40349),n(70143),n(36424),n(86193),n(99954),n(10685),n(77243),n(61554);const r=n(48921),o=n(25122),a=n(97583),s=n(32621),l=n(68012),c=n(40349),d=n(99954),p=n(86193),u=n(10685),m=n(82058),h=n(36424),v=n(91092),f=n(77243),g=n(61554),y=n(70143);class x extends r.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(t,o,a,i,n,r,l),this.router=e,this.apiService=s,this.userVerificationService=c,this.logService=d,this.showPassword=!1}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}cancel(){return i(this,void 0,void 0,(function*(){yield this.stateService.setOrganizationInvitation(null),yield this.stateService.setLoginRedirect(null),this.router.navigate(["/vault"])}))}setupSubmitActions(){return i(this,void 0,void 0,(function*(){if(null==this.currentMasterPassword||""===this.currentMasterPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;const e={type:a.VerificationType.MasterPassword,secret:this.currentMasterPassword};try{yield this.userVerificationService.verifyUser(e)}catch(t){return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),t.message),!1}return this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations(),!0}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){try{const t=new o.PasswordRequest;t.masterPasswordHash=yield this.cryptoService.hashPassword(this.currentMasterPassword,null),t.newMasterPasswordHash=e,t.key=n[1].encryptedString,this.apiService.postPassword(t),this.platformUtilsService.showToast("success",this.i18nService.t("masterPasswordChanged"),this.i18nService.t("logBackIn")),null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.messagingService.send("logout")}catch(t){this.logService.error(t)}}))}}t.UpdatePasswordComponent=x,x.ɵfac=function(e){return new(e||x)(s.ɵɵdirectiveInject(l.Router),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.PasswordGenerationService),s.ɵɵdirectiveInject(u.PolicyService),s.ɵɵdirectiveInject(m.CryptoService),s.ɵɵdirectiveInject(h.MessagingService),s.ɵɵdirectiveInject(v.ApiService),s.ɵɵdirectiveInject(f.StateService),s.ɵɵdirectiveInject(g.UserVerificationService),s.ɵɵdirectiveInject(y.LogService))},x.ɵdir=s.ɵɵdefineDirective({type:x,features:[s.ɵɵInheritDefinitionFeature]})},30747:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordComponent=void 0;n(91092),n(82058),n(40349),n(70143),n(36424),n(86193),n(99954),n(10685),n(77243),n(2173);const r=n(48921),o=n(8290),a=n(32621),s=n(40349),l=n(99954),c=n(86193),d=n(10685),p=n(82058),u=n(36424),m=n(91092),h=n(77243),v=n(2173),f=n(70143);class g extends r.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,r,o,n,t,i,s),this.apiService=a,this.syncService=l,this.logService=c,this.showPassword=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield this.syncService.fullSync(!0),e.ngOnInit.call(this)}))}togglePassword(e){this.showPassword=!this.showPassword,document.getElementById(e?"masterPasswordRetype":"masterPassword").focus()}setupSubmitActions(){return i(this,void 0,void 0,(function*(){return this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(),this.email=yield this.stateService.getEmail(),this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations(),!0}))}submit(){return i(this,void 0,void 0,(function*(){if((yield this.strongPassword())&&(yield this.setupSubmitActions()))try{const e=yield this.cryptoService.makeKey(this.masterPassword,this.email.trim().toLowerCase(),this.kdf,this.kdfIterations),t=yield this.cryptoService.hashPassword(this.masterPassword,e),n=yield this.cryptoService.getEncKey(),i=yield this.cryptoService.remakeEncKey(e,n);yield this.performSubmitActions(t,e,i)}catch(e){this.logService.error(e)}}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){try{const t=new o.UpdateTempPasswordRequest;t.key=n[1].encryptedString,t.newMasterPasswordHash=e,t.masterPasswordHint=this.hint,this.formPromise=this.apiService.putUpdateTempPassword(t),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedMasterPassword")),null!=this.onSuccessfulChangePassword?this.onSuccessfulChangePassword():this.messagingService.send("logout")}catch(t){this.logService.error(t)}}))}}t.UpdateTempPasswordComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.PasswordGenerationService),a.ɵɵdirectiveInject(d.PolicyService),a.ɵɵdirectiveInject(p.CryptoService),a.ɵɵdirectiveInject(u.MessagingService),a.ɵɵdirectiveInject(m.ApiService),a.ɵɵdirectiveInject(h.StateService),a.ɵɵdirectiveInject(v.SyncService),a.ɵɵdirectiveInject(f.LogService))},g.ɵdir=a.ɵɵdefineDirective({type:g,features:[a.ɵɵInheritDefinitionFeature]})},38287:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyMasterPasswordComponent=void 0;const r=n(98212),o=n(96832),a=(n(34445),n(61554),n(97583)),s=n(32621),l=n(34445),c=n(61554),d=n(57490),p=n(96832),u=n(17302),m=n(966),h=n(72596);function v(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",1),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"input",2),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"small",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("formControl",e.secret),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,"confirmIdentity"))}}function f(e,t){1&e&&(s.ɵɵelementStart(0,"span",10),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",11),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵproperty("@sent",void 0),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,2,"codeSent"),"\n "))}function g(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",4),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",5),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"button",6),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().requestOTP()})),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,f,5,4,"span",7),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n\n "),s.ɵɵelementStart(15,"div",4),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"label",8),s.ɵɵtext(18),s.ɵɵpipe(19,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelement(21,"input",9),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"small",3),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,7,"sendVerificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.disableRequestOTP),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,9,"sendCode"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.sentCode),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(19,11,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("formControl",e.secret),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(25,13,"confirmIdentity"))}}class y{constructor(e,t){this.keyConnectorService=e,this.userVerificationService=t,this.usesKeyConnector=!1,this.disableRequestOTP=!1,this.sentCode=!1,this.secret=new o.FormControl("")}ngOnInit(){return i(this,void 0,void 0,(function*(){this.usesKeyConnector=yield this.keyConnectorService.getUsesKeyConnector(),this.processChanges(this.secret.value),this.secret.valueChanges.subscribe((e=>this.processChanges(e)))}))}requestOTP(){return i(this,void 0,void 0,(function*(){if(this.usesKeyConnector){this.disableRequestOTP=!0;try{yield this.userVerificationService.requestOTP(),this.sentCode=!0}finally{this.disableRequestOTP=!1}}}))}writeValue(e){this.secret.setValue(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disableRequestOTP=e,e?this.secret.disable():this.secret.enable()}processChanges(e){null!=this.onChange&&this.onChange({type:this.usesKeyConnector?a.VerificationType.OTP:a.VerificationType.MasterPassword,secret:e})}}t.VerifyMasterPasswordComponent=y,y.ɵfac=function(e){return new(e||y)(s.ɵɵdirectiveInject(l.KeyConnectorService),s.ɵɵdirectiveInject(c.UserVerificationService))},y.ɵcmp=s.ɵɵdefineComponent({type:y,selectors:[["app-verify-master-password"]],features:[s.ɵɵProvidersFeature([{provide:o.NG_VALUE_ACCESSOR,multi:!0,useExisting:y}])],decls:4,vars:2,consts:[[4,"ngIf"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"formControl"],[1,"form-text","text-muted"],[1,"form-group"],[1,"d-block"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["class","ml-2 text-success","role","alert",4,"ngIf"],["for","verificationCode"],["id","verificationCode","type","input","name","verificationCode","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"formControl"],["role","alert",1,"ml-2","text-success"],["aria-hidden","true",1,"bwi","bwi-check-circle"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,v,12,7,"ng-container",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,g,28,15,"ng-container",0),s.ɵɵtext(3,"\n")),2&e&&(s.ɵɵproperty("ngIf",!t.usesKeyConnector),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.usesKeyConnector))},directives:[d.NgIf,p.DefaultValueAccessor,p.RequiredValidator,u.AutofocusDirective,m.InputVerbatimDirective,p.NgControlStatus,p.FormControlDirective],pipes:[h.I18nPipe],encapsulation:2,data:{animation:[r.trigger("sent",[r.transition(":enter",[r.style({opacity:0}),r.animate("100ms",r.style({opacity:1}))])])]}})},50553:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.A11yTitleDirective=void 0;n(32621);const i=n(32621);class r{constructor(e,t){this.el=e,this.renderer=t}set appA11yTitle(e){this.title=e}ngOnInit(){this.el.nativeElement.hasAttribute("title")||this.renderer.setAttribute(this.el.nativeElement,"title",this.title),this.el.nativeElement.hasAttribute("aria-label")||this.renderer.setAttribute(this.el.nativeElement,"aria-label",this.title)}}t.A11yTitleDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(i.Renderer2))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appA11yTitle",""]],inputs:{appA11yTitle:"appA11yTitle"}})},637:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiActionDirective=void 0;n(32621),n(70143);const i=n(25237),r=(n(9941),n(32621)),o=n(9941),a=n(70143);class s{constructor(e,t,n){this.el=e,this.validationService=t,this.logService=n}ngOnChanges(e){null!=this.appApiAction&&null!=this.appApiAction.then&&(this.el.nativeElement.loading=!0,this.appApiAction.then((e=>{this.el.nativeElement.loading=!1}),(e=>{var t;this.el.nativeElement.loading=!1,(e instanceof i.ErrorResponse||"ErrorResponse"===e.constructor.name)&&e.captchaRequired?this.logService.error("Captcha required error response: "+e.getSingleMessage()):(null===(t=this.logService)||void 0===t||t.error(`Received API exception: ${e}`),this.validationService.showError(e))})))}}t.ApiActionDirective=s,s.ɵfac=function(e){return new(e||s)(r.ɵɵdirectiveInject(r.ElementRef),r.ɵɵdirectiveInject(o.ValidationService),r.ɵɵdirectiveInject(a.LogService))},s.ɵdir=r.ɵɵdefineDirective({type:s,selectors:[["","appApiAction",""]],inputs:{appApiAction:"appApiAction"},features:[r.ɵɵNgOnChangesFeature]})},17302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AutofocusDirective=void 0;n(32621);const i=n(53232),r=n(70829),o=n(32621);class a{constructor(e,t){this.el=e,this.ngZone=t}set appAutofocus(e){this.autofocus=""===e||!0===e}ngOnInit(){!r.Utils.isMobileBrowser&&this.autofocus&&(this.ngZone.isStable?this.el.nativeElement.focus():this.ngZone.onStable.pipe(i.take(1)).subscribe((()=>this.el.nativeElement.focus())))}}t.AutofocusDirective=a,a.ɵfac=function(e){return new(e||a)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.NgZone))},a.ɵdir=o.ɵɵdefineDirective({type:a,selectors:[["","appAutofocus",""]],inputs:{appAutofocus:"appAutofocus"}})},90841:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlurClickDirective=void 0;n(32621);const i=n(32621);class r{constructor(e){this.el=e}onClick(){this.el.nativeElement.blur()}}t.BlurClickDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appBlurClick",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(){return t.onClick()}))}})},50601:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackSrcDirective=void 0;n(32621);const i=n(32621);class r{constructor(e){this.el=e}onError(){this.el.nativeElement.src=this.appFallbackSrc}}t.FallbackSrcDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appFallbackSrc",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("error",(function(){return t.onError()}))},inputs:{appFallbackSrc:"appFallbackSrc"}})},966:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InputVerbatimDirective=void 0;n(32621);const i=n(32621);class r{constructor(e,t){this.el=e,this.renderer=t}set appInputVerbatim(e){this.disableComplete=""===e||!0===e}ngOnInit(){this.disableComplete&&!this.el.nativeElement.hasAttribute("autocomplete")&&this.renderer.setAttribute(this.el.nativeElement,"autocomplete","off"),this.el.nativeElement.hasAttribute("autocapitalize")||this.renderer.setAttribute(this.el.nativeElement,"autocapitalize","none"),this.el.nativeElement.hasAttribute("autocorrect")||this.renderer.setAttribute(this.el.nativeElement,"autocorrect","none"),this.el.nativeElement.hasAttribute("spellcheck")||this.renderer.setAttribute(this.el.nativeElement,"spellcheck","false"),this.el.nativeElement.hasAttribute("inputmode")||this.renderer.setAttribute(this.el.nativeElement,"inputmode","verbatim")}}t.InputVerbatimDirective=r,r.ɵfac=function(e){return new(e||r)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(i.Renderer2))},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appInputVerbatim",""]],inputs:{appInputVerbatim:"appInputVerbatim"}})},90317:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectCopyDirective=void 0;n(32621),n(99954);const i=n(32621),r=n(99954);class o{constructor(e,t){this.el=e,this.platformUtilsService=t}onCopy(){if(null==window)return;let e="";const t=window.getSelection();for(let n=0;n<t.rangeCount;n++){const i=t.getRangeAt(n).toString();let r=i.length;const o=i.search(/(?:\r\n|\r|\n)/);if(o>-1){""===i.substr(o).trim()&&(r=o)}e+=i.substring(0,r)}this.platformUtilsService.copyToClipboard(e,{window})}}t.SelectCopyDirective=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(r.PlatformUtilsService))},o.ɵdir=i.ɵɵdefineDirective({type:o,selectors:[["","appSelectCopy",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("copy",(function(){return t.onCopy()}))}})},80507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopClickDirective=void 0;const i=n(32621);class r{onClick(e){e.preventDefault()}}t.StopClickDirective=r,r.ɵfac=function(e){return new(e||r)},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appStopClick",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}})},92521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StopPropDirective=void 0;const i=n(32621);class r{onClick(e){e.stopPropagation()}}t.StopPropDirective=r,r.ɵfac=function(e){return new(e||r)},r.ɵdir=i.ɵɵdefineDirective({type:r,selectors:[["","appStopProp",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}})},3057:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseValueDirective=void 0;const i=n(32621),r=n(96832),o=n(32621);class a{constructor(e,t){this.elementRef=e,this.renderer=t,this.trueValue=!0,this.falseValue=!1,this.propagateChange=e=>{}}onHostChange(e){this.propagateChange(e.target.checked?this.trueValue:this.falseValue)}writeValue(e){e===this.trueValue?this.renderer.setProperty(this.elementRef.nativeElement,"checked",!0):this.renderer.setProperty(this.elementRef.nativeElement,"checked",!1)}registerOnChange(e){this.propagateChange=e}registerOnTouched(e){}setDisabledState(e){}}t.TrueFalseValueDirective=a,a.ɵfac=function(e){return new(e||a)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.Renderer2))},a.ɵdir=o.ɵɵdefineDirective({type:a,selectors:[["input","type","checkbox","appTrueFalseValue",""]],hostBindings:function(e,t){1&e&&o.ɵɵlistener("change",(function(e){return t.onHostChange(e)}))},inputs:{trueValue:"trueValue",falseValue:"falseValue"},features:[o.ɵɵProvidersFeature([{provide:r.NG_VALUE_ACCESSOR,useExisting:i.forwardRef((()=>a)),multi:!0}])]})},24950:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPasswordPipe=void 0;const i=n(70829),r=n(32621);class o{transform(e){const t=Array.from(e);let n="";for(let r=0;r<t.length;r++){let e=t[r],o=!1;switch(e){case"&":e="&amp;",o=!0;break;case"<":e="&lt;",o=!0;break;case">":e="&gt;",o=!0;break;case" ":e="&nbsp;",o=!0}let a="letter";e.match(i.Utils.regexpEmojiPresentation)?a="emoji":o||e.match(/[^\w ]/)?a="special":e.match(/\d/)&&(a="number"),n+='<span class="password-'+a+'">'+e+"</span>"}return n}}t.ColorPasswordPipe=o,o.ɵfac=function(e){return new(e||o)},o.ɵpipe=r.ɵɵdefinePipe({name:"colorPassword",type:o,pure:!0})},72596:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.I18nPipe=void 0;n(40349);const i=n(32621),r=n(40349);class o{constructor(e){this.i18nService=e}transform(e,t,n,i){return this.i18nService.t(e,t,n,i)}}t.I18nPipe=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵdirectiveInject(r.I18nService,16))},o.ɵpipe=i.ɵɵdefinePipe({name:"i18n",type:o,pure:!0})},35734:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPipe=void 0;const i=n(32621);class r{transform(e,t,n,i,r){return null==e||0===e.length?[]:null==t||t.length<2?e:(t=t.trim().toLowerCase(),e.filter((e=>null!=n&&null!=e[n]&&e[n].toString().toLowerCase().indexOf(t)>-1||(null!=i&&null!=e[i]&&e[i].toString().toLowerCase().indexOf(t)>-1||null!=r&&null!=e[r]&&e[r].toString().toLowerCase().indexOf(t)>-1))))}}t.SearchPipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"search",type:r,pure:!0})},68625:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserNamePipe=void 0;const i=n(32621);class r{transform(e){return null==e?null:null==e.name||""===e.name.trim()?e.email:e.name}}t.UserNamePipe=r,r.ɵfac=function(e){return new(e||r)},r.ɵpipe=i.ɵɵdefinePipe({name:"userName",type:r,pure:!0})},22306:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthGuardService=void 0;n(68012),n(34445),n(36424),n(77243),n(88332);const r=n(32621),o=n(88332),a=n(68012),s=n(36424),l=n(34445),c=n(77243);class d{constructor(e,t,n,i,r){this.vaultTimeoutService=e,this.router=t,this.messagingService=n,this.keyConnectorService=i,this.stateService=r}canActivate(e,t){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated()))return this.messagingService.send("authBlocked"),!1;return(yield this.vaultTimeoutService.isLocked())?(null!=t&&this.messagingService.send("lockedUrl",{url:t.url}),this.router.navigate(["lock"],{queryParams:{promptBiometric:!0}}),!1):!(!t.url.includes("remove-password")&&(yield this.keyConnectorService.getConvertAccountRequired()))||(this.router.navigate(["/remove-password"]),!1)}))}}t.AuthGuardService=d,d.ɵfac=function(e){return new(e||d)(r.ɵɵinject(o.VaultTimeoutService),r.ɵɵinject(a.Router),r.ɵɵinject(s.MessagingService),r.ɵɵinject(l.KeyConnectorService),r.ɵɵinject(c.StateService))},d.ɵprov=r.ɵɵdefineInjectable({token:d,factory:d.ɵfac})},78824:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;const i=n(39257),r=n(32621);class o extends i.BroadcasterService{}t.BroadcasterService=o,o.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(o)))(t||o)}}(),o.ɵprov=r.ɵɵdefineInjectable({token:o,factory:o.ɵfac})},1273:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.JslibServicesModule=void 0;const r=n(32621),o=n(29697),a=n(80761),s=n(31207),l=n(25906),c=n(55637),d=n(95080),p=n(58771),u=n(68166),m=n(75078),h=n(49250),v=n(56811),f=n(13765),g=n(99984),y=n(76441),x=n(38578),S=n(40750),b=n(68683),w=n(81533),I=n(48177),C=n(9964),E=n(66708),P=n(1824),k=n(12354),A=n(91656),O=n(28265),T=n(85965),M=n(79720),D=n(51467),B=n(45750),R=n(84042),U=n(91092),V=n(79505),F=n(22501),N=n(26451),_=n(67569),j=n(68062),z=n(69050),L=n(82058),K=n(39229),q=n(57997),G=n(98573),W=n(38364),H=n(30692),$=n(4349),Q=n(40349),Y=n(34445),J=n(70143),X=n(36424),Z=n(90181),ee=n(94308),te=n(86193),ne=n(14293),ie=n(99954),re=n(10685),oe=n(85556),ae=n(14170),se=n(94129),le=n(66359),ce=n(77243),de=n(25331),pe=n(43081),ue=n(2173),me=n(49613),he=n(63529),ve=n(61554),fe=n(88332),ge=n(22306),ye=n(78824),xe=n(99819),Se=n(29546),be=n(61853),we=n(7735),Ie=n(9941),Ce=n(84582),Ee=n(51338),Pe=n(36907),ke=n(32621);class Ae{}t.JslibServicesModule=Ae,Ae.ɵfac=function(e){return new(e||Ae)},Ae.ɵmod=ke.ɵɵdefineNgModule({type:Ae}),Ae.ɵinj=ke.ɵɵdefineInjector({providers:[{provide:"WINDOW",useValue:window},{provide:r.LOCALE_ID,useFactory:e=>e.translationLocale,deps:[Q.I18nService]},Ie.ValidationService,ge.AuthGuardService,we.UnauthGuardService,xe.LockGuardService,Se.ModalService,{provide:V.AppIdService,useClass:a.AppIdService,deps:[pe.StorageService]},{provide:F.AuditService,useClass:s.AuditService,deps:[K.CryptoFunctionService,U.ApiService]},{provide:N.AuthService,useClass:l.AuthService,deps:[L.CryptoService,U.ApiService,me.TokenService,V.AppIdService,Q.I18nService,ie.PlatformUtilsService,X.MessagingService,fe.VaultTimeoutService,J.LogService,K.CryptoFunctionService,Y.KeyConnectorService,q.EnvironmentService,ce.StateService]},{provide:j.CipherService,useFactory:(e,t,n,i,r,o,a,s)=>new c.CipherService(e,t,n,i,r,(()=>o.get(ae.SearchService)),a,s),deps:[L.CryptoService,le.SettingsService,U.ApiService,H.FileUploadService,Q.I18nService,r.Injector,J.LogService,ce.StateService]},{provide:$.FolderService,useClass:g.FolderService,deps:[L.CryptoService,U.ApiService,Q.I18nService,j.CipherService,ce.StateService]},{provide:J.LogService,useFactory:()=>new p.ConsoleLogService(!1)},{provide:z.CollectionService,useClass:d.CollectionService,deps:[L.CryptoService,Q.I18nService,ce.StateService]},{provide:q.EnvironmentService,useClass:m.EnvironmentService,deps:[ce.StateService]},{provide:he.TotpService,useClass:M.TotpService,deps:[K.CryptoFunctionService,J.LogService,ce.StateService]},{provide:me.TokenService,useClass:T.TokenService,deps:[ce.StateService]},{provide:L.CryptoService,useClass:u.CryptoService,deps:[K.CryptoFunctionService,ie.PlatformUtilsService,J.LogService,ce.StateService]},{provide:te.PasswordGenerationService,useClass:b.PasswordGenerationService,deps:[L.CryptoService,re.PolicyService,ce.StateService]},{provide:U.ApiService,useFactory:(e,t,n,r)=>new o.ApiService(e,t,n,(e=>i(void 0,void 0,void 0,(function*(){return r.send("logout",{expired:e})})))),deps:[me.TokenService,ie.PlatformUtilsService,q.EnvironmentService,X.MessagingService]},{provide:H.FileUploadService,useClass:f.FileUploadService,deps:[J.LogService,U.ApiService]},{provide:ue.SyncService,useFactory:(e,t,n,r,o,a,s,l,c,d,p,u,m,h)=>new O.SyncService(e,t,n,r,o,a,s,l,c,d,p,u,m,h,(e=>i(void 0,void 0,void 0,(function*(){return s.send("logout",{expired:e})})))),deps:[U.ApiService,le.SettingsService,$.FolderService,j.CipherService,L.CryptoService,z.CollectionService,X.MessagingService,re.PolicyService,se.SendService,J.LogService,Y.KeyConnectorService,ce.StateService,ee.OrganizationService,oe.ProviderService]},{provide:_.BroadcasterService,useClass:ye.BroadcasterService},{provide:le.SettingsService,useClass:P.SettingsService,deps:[ce.StateService]},{provide:fe.VaultTimeoutService,useFactory:(e,t,n,r,o,a,s,l,c,d,p)=>new B.VaultTimeoutService(e,t,n,r,o,a,s,l,c,d,p,null,(e=>i(void 0,void 0,void 0,(function*(){return a.send("logout",{expired:!1,userId:e})})))),deps:[j.CipherService,$.FolderService,z.CollectionService,L.CryptoService,ie.PlatformUtilsService,X.MessagingService,ae.SearchService,me.TokenService,re.PolicyService,Y.KeyConnectorService,ce.StateService]},{provide:ce.StateService,useFactory:(e,t,n,i)=>new k.StateService(e,t,n,i,new Pe.StateFactory(Ee.GlobalState,Ce.Account)),deps:[pe.StorageService,"SECURE_STORAGE",J.LogService,de.StateMigrationService]},{provide:de.StateMigrationService,useFactory:(e,t)=>new A.StateMigrationService(e,t,new Pe.StateFactory(Ee.GlobalState,Ce.Account)),deps:[pe.StorageService,"SECURE_STORAGE"]},{provide:W.ExportService,useClass:v.ExportService,deps:[$.FolderService,j.CipherService,U.ApiService,L.CryptoService]},{provide:ae.SearchService,useClass:C.SearchService,deps:[j.CipherService,J.LogService,Q.I18nService]},{provide:Z.NotificationsService,useFactory:(e,t,n,r,o,a,s,l)=>new x.NotificationsService(e,t,n,r,o,(()=>i(void 0,void 0,void 0,(function*(){return a.send("logout",{expired:!0})}))),s,l),deps:[ue.SyncService,V.AppIdService,U.ApiService,fe.VaultTimeoutService,q.EnvironmentService,X.MessagingService,J.LogService,ce.StateService]},{provide:K.CryptoFunctionService,useClass:R.WebCryptoFunctionService,deps:["WINDOW",ie.PlatformUtilsService]},{provide:G.EventService,useClass:h.EventService,deps:[U.ApiService,j.CipherService,ce.StateService,J.LogService,ee.OrganizationService]},{provide:re.PolicyService,useClass:w.PolicyService,deps:[ce.StateService,ee.OrganizationService,U.ApiService]},{provide:se.SendService,useClass:E.SendService,deps:[L.CryptoService,U.ApiService,H.FileUploadService,Q.I18nService,K.CryptoFunctionService,ce.StateService]},{provide:Y.KeyConnectorService,useClass:y.KeyConnectorService,deps:[ce.StateService,L.CryptoService,U.ApiService,me.TokenService,J.LogService,ee.OrganizationService]},{provide:ve.UserVerificationService,useClass:D.UserVerificationService,deps:[L.CryptoService,Q.I18nService,U.ApiService]},{provide:ne.PasswordRepromptService,useClass:be.PasswordRepromptService},{provide:ee.OrganizationService,useClass:S.OrganizationService,deps:[ce.StateService]},{provide:oe.ProviderService,useClass:I.ProviderService,deps:[ce.StateService]}]})},99819:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockGuardService=void 0;n(68012),n(77243),n(88332);const r=n(32621),o=n(88332),a=n(68012),s=n(77243);class l{constructor(e,t,n){this.vaultTimeoutService=e,this.router=t,this.stateService=n,this.homepage="vault",this.loginpage="login"}canActivate(){return i(this,void 0,void 0,(function*(){if(yield this.vaultTimeoutService.isLocked())return!0;const e=(yield this.stateService.getIsAuthenticated())?[this.homepage]:[this.loginpage];return this.router.navigate(e),!1}))}}t.LockGuardService=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵinject(o.VaultTimeoutService),r.ɵɵinject(a.Router),r.ɵɵinject(s.StateService))},l.ɵprov=r.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},29546:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ModalService=t.ModalConfig=void 0;n(32621);const r=n(53232),o=n(20443),a=n(28129),s=n(99806),l=n(32621);class c{constructor(){this.allowMultipleModals=!1}}t.ModalConfig=c;class d{constructor(e,t,n){this.componentFactoryResolver=e,this.applicationRef=t,this.injector=n,this.modalList=[],this.factoryResolvers=new Map,document.addEventListener("keyup",(e=>{"Escape"===e.key&&this.modalCount>0&&this.topModal.instance.close()}))}get modalCount(){return this.modalList.length}get topModal(){return this.modalList[this.modalCount-1]}openViewRef(e,t,n=null){return i(this,void 0,void 0,(function*(){const[i,o]=this.openInternal(e,null,!1);return o.instance.setComponentParameters=n,t.insert(o.hostView),yield i.onCreated.pipe(r.first()).toPromise(),[i,o.instance.componentRef.instance]}))}open(e,t){var n;if((null===(n=null==t?void 0:t.allowMultipleModals)||void 0===n||!n)&&this.modalCount>0)return;const[i,r]=this.openInternal(e,t,!0);return i}registerComponentFactoryResolver(e,t){this.factoryResolvers.set(e,t)}resolveComponentFactory(e){return this.factoryResolvers.has(e)?this.factoryResolvers.get(e).resolveComponentFactory(e):this.componentFactoryResolver.resolveComponentFactory(e)}openInternal(e,t,n){const[i,o]=this.createModalComponent(t);if(o.instance.childComponentType=e,n){this.applicationRef.attachView(o.hostView);const e=o.hostView.rootNodes[0];document.body.appendChild(e)}return i.onClosed.pipe(r.first()).subscribe((()=>{n&&this.applicationRef.detachView(o.hostView),o.destroy(),this.modalList.pop(),this.modalCount>0&&this.topModal.instance.getFocus()})),this.setupHandlers(i),this.modalList.push(o),[i,o]}setupHandlers(e){let t=null;e.onCreated.pipe(r.first()).subscribe((n=>{document.body.classList.add("modal-open");const i=n.querySelector(".modal"),r=i.querySelector(".modal-dialog");t=document.createElement("div"),t.className="modal-backdrop fade",t.style.zIndex=`${this.modalCount}040`,i.prepend(t),r.addEventListener("click",(e=>{e.stopPropagation()})),r.style.zIndex=`${this.modalCount}050`;const o=Array.from(n.querySelectorAll('.modal-backdrop, .modal *[data-dismiss="modal"]'));for(const t of o)t.addEventListener("click",(t=>{e.close()}))})),e.onClose.pipe(r.first()).subscribe((()=>{e.closed(),0===this.modalCount&&document.body.classList.remove("modal-open")}))}createModalComponent(e){const t=new s.ModalRef,n=new WeakMap;n.set(c,e),n.set(s.ModalRef,t);return[t,this.componentFactoryResolver.resolveComponentFactory(o.DynamicModalComponent).create(new a.ModalInjector(this.injector,n))]}}t.ModalService=d,d.ɵfac=function(e){return new(e||d)(l.ɵɵinject(l.ComponentFactoryResolver),l.ɵɵinject(l.ApplicationRef),l.ɵɵinject(l.Injector))},d.ɵprov=l.ɵɵdefineInjectable({token:d,factory:d.ɵfac})},61853:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;n(34445);const r=n(39200),o=(n(29546),n(32621)),a=n(29546),s=n(34445);class l{constructor(e,t){this.modalService=e,this.keyConnectorService=t,this.component=r.PasswordRepromptComponent}protectedFields(){return["TOTP","Password","H_Field","Card Number","Security Code"]}showPasswordPrompt(){return i(this,void 0,void 0,(function*(){if(!(yield this.enabled()))return!0;const e=this.modalService.open(this.component,{allowMultipleModals:!0});if(null==e)return!1;return!0===(yield e.onClosedPromise())}))}enabled(){return i(this,void 0,void 0,(function*(){return!(yield this.keyConnectorService.getUsesKeyConnector())}))}}t.PasswordRepromptService=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.ModalService),o.ɵɵinject(s.KeyConnectorService))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},7735:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnauthGuardService=void 0;n(68012),n(77243),n(88332);const r=n(32621),o=n(88332),a=n(68012),s=n(77243);class l{constructor(e,t,n){this.vaultTimeoutService=e,this.router=t,this.stateService=n,this.homepage="vault"}canActivate(){return i(this,void 0,void 0,(function*(){if(yield this.stateService.getIsAuthenticated()){return(yield this.vaultTimeoutService.isLocked())?this.router.navigate(["lock"]):this.router.navigate([this.homepage]),!1}return!0}))}}t.UnauthGuardService=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵinject(o.VaultTimeoutService),r.ɵɵinject(a.Router),r.ɵɵinject(s.StateService))},l.ɵprov=r.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},9941:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationService=void 0;n(40349),n(99954);const i=n(32621),r=n(40349),o=n(99954);class a{constructor(e,t){this.i18nService=e,this.platformUtilsService=t}showError(e){const t=this.i18nService.t("unexpectedError");let n=[];return null!=e&&"string"==typeof e?n.push(e):null==e||"object"!=typeof e?n.push(t):null!=e.validationErrors?n=n.concat(e.getAllMessages()):n.push(e.message?e.message:t),1===n.length?this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n[0]):n.length>1&&this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),n,{timeout:5e3*n.length}),n}}t.ValidationService=a,a.ɵfac=function(e){return new(e||a)(i.ɵɵinject(r.I18nService),i.ɵɵinject(o.PlatformUtilsService))},a.ɵprov=i.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},91092:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiService=void 0;t.ApiService=class{}},79505:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppIdService=void 0;t.AppIdService=class{}},22501:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuditService=void 0;t.AuditService=class{}},26451:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthService=void 0;t.AuthService=class{}},67569:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;t.BroadcasterService=class{}},68062:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherService=void 0;t.CipherService=class{}},69050:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionService=void 0;t.CollectionService=class{}},82058:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoService=void 0;t.CryptoService=class{}},39229:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoFunctionService=void 0;t.CryptoFunctionService=class{}},57997:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentService=void 0;t.EnvironmentService=class{}},98573:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventService=void 0;t.EventService=class{}},38364:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;t.ExportService=class{}},30692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadService=void 0;t.FileUploadService=class{}},4349:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderService=void 0;t.FolderService=class{}},40349:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;t.I18nService=class{}},58004:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;t.ImportService=class{}},34445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorService=void 0;t.KeyConnectorService=class{}},70143:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;t.LogService=class{}},36424:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagingService=void 0;t.MessagingService=class{}},90181:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsService=void 0;t.NotificationsService=class{}},94308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationService=void 0;t.OrganizationService=class{}},86193:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;t.PasswordGenerationService=class{}},14293:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;t.PasswordRepromptService=class{}},99954:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlatformUtilsService=void 0;t.PlatformUtilsService=class{}},10685:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyService=void 0;t.PolicyService=class{}},85556:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderService=void 0;t.ProviderService=class{}},14170:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchService=void 0;t.SearchService=class{constructor(){this.indexedEntityId=null}}},94129:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;t.SendService=class{}},66359:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsService=void 0;t.SettingsService=class{}},77243:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;t.StateService=class{}},25331:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;t.StateMigrationService=class{}},43081:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageService=void 0;t.StorageService=class{}},2173:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncService=void 0;t.SyncService=class{}},49613:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;t.TokenService=class{}},63529:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;t.TotpService=class{}},61554:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserVerificationService=void 0;t.UserVerificationService=class{}},88332:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;t.VaultTimeoutService=class{}},2944:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRepromptType=void 0,function(e){e[e.None=0]="None",e[e.Password=1]="Password"}(t.CipherRepromptType||(t.CipherRepromptType={}))},23635:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherType=void 0,function(e){e[e.Login=1]="Login",e[e.SecureNote=2]="SecureNote",e[e.Card=3]="Card",e[e.Identity=4]="Identity"}(t.CipherType||(t.CipherType={}))},83914:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceType=void 0,function(e){e[e.Android=0]="Android",e[e.iOS=1]="iOS",e[e.ChromeExtension=2]="ChromeExtension",e[e.FirefoxExtension=3]="FirefoxExtension",e[e.OperaExtension=4]="OperaExtension",e[e.EdgeExtension=5]="EdgeExtension",e[e.WindowsDesktop=6]="WindowsDesktop",e[e.MacOsDesktop=7]="MacOsDesktop",e[e.LinuxDesktop=8]="LinuxDesktop",e[e.ChromeBrowser=9]="ChromeBrowser",e[e.FirefoxBrowser=10]="FirefoxBrowser",e[e.OperaBrowser=11]="OperaBrowser",e[e.EdgeBrowser=12]="EdgeBrowser",e[e.IEBrowser=13]="IEBrowser",e[e.UnknownBrowser=14]="UnknownBrowser",e[e.AndroidAmazon=15]="AndroidAmazon",e[e.UWP=16]="UWP",e[e.SafariBrowser=17]="SafariBrowser",e[e.VivaldiBrowser=18]="VivaldiBrowser",e[e.VivaldiExtension=19]="VivaldiExtension",e[e.SafariExtension=20]="SafariExtension"}(t.DeviceType||(t.DeviceType={}))},26515:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed",e[e.RecoveryInitiated=3]="RecoveryInitiated",e[e.RecoveryApproved=4]="RecoveryApproved"}(t.EmergencyAccessStatusType||(t.EmergencyAccessStatusType={}))},50692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessType=void 0,function(e){e[e.View=0]="View",e[e.Takeover=1]="Takeover"}(t.EmergencyAccessType||(t.EmergencyAccessType={}))},45419:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptionType=void 0,function(e){e[e.AesCbc256_B64=0]="AesCbc256_B64",e[e.AesCbc128_HmacSha256_B64=1]="AesCbc128_HmacSha256_B64",e[e.AesCbc256_HmacSha256_B64=2]="AesCbc256_HmacSha256_B64",e[e.Rsa2048_OaepSha256_B64=3]="Rsa2048_OaepSha256_B64",e[e.Rsa2048_OaepSha1_B64=4]="Rsa2048_OaepSha1_B64",e[e.Rsa2048_OaepSha256_HmacSha256_B64=5]="Rsa2048_OaepSha256_HmacSha256_B64",e[e.Rsa2048_OaepSha1_HmacSha256_B64=6]="Rsa2048_OaepSha1_HmacSha256_B64"}(t.EncryptionType||(t.EncryptionType={}))},12657:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventType=void 0,function(e){e[e.User_LoggedIn=1e3]="User_LoggedIn",e[e.User_ChangedPassword=1001]="User_ChangedPassword",e[e.User_Updated2fa=1002]="User_Updated2fa",e[e.User_Disabled2fa=1003]="User_Disabled2fa",e[e.User_Recovered2fa=1004]="User_Recovered2fa",e[e.User_FailedLogIn=1005]="User_FailedLogIn",e[e.User_FailedLogIn2fa=1006]="User_FailedLogIn2fa",e[e.User_ClientExportedVault=1007]="User_ClientExportedVault",e[e.User_UpdatedTempPassword=1008]="User_UpdatedTempPassword",e[e.User_MigratedKeyToKeyConnector=1009]="User_MigratedKeyToKeyConnector",e[e.Cipher_Created=1100]="Cipher_Created",e[e.Cipher_Updated=1101]="Cipher_Updated",e[e.Cipher_Deleted=1102]="Cipher_Deleted",e[e.Cipher_AttachmentCreated=1103]="Cipher_AttachmentCreated",e[e.Cipher_AttachmentDeleted=1104]="Cipher_AttachmentDeleted",e[e.Cipher_Shared=1105]="Cipher_Shared",e[e.Cipher_UpdatedCollections=1106]="Cipher_UpdatedCollections",e[e.Cipher_ClientViewed=1107]="Cipher_ClientViewed",e[e.Cipher_ClientToggledPasswordVisible=1108]="Cipher_ClientToggledPasswordVisible",e[e.Cipher_ClientToggledHiddenFieldVisible=1109]="Cipher_ClientToggledHiddenFieldVisible",e[e.Cipher_ClientToggledCardCodeVisible=1110]="Cipher_ClientToggledCardCodeVisible",e[e.Cipher_ClientCopiedPassword=1111]="Cipher_ClientCopiedPassword",e[e.Cipher_ClientCopiedHiddenField=1112]="Cipher_ClientCopiedHiddenField",e[e.Cipher_ClientCopiedCardCode=1113]="Cipher_ClientCopiedCardCode",e[e.Cipher_ClientAutofilled=1114]="Cipher_ClientAutofilled",e[e.Cipher_SoftDeleted=1115]="Cipher_SoftDeleted",e[e.Cipher_Restored=1116]="Cipher_Restored",e[e.Cipher_ClientToggledCardNumberVisible=1117]="Cipher_ClientToggledCardNumberVisible",e[e.Collection_Created=1300]="Collection_Created",e[e.Collection_Updated=1301]="Collection_Updated",e[e.Collection_Deleted=1302]="Collection_Deleted",e[e.Group_Created=1400]="Group_Created",e[e.Group_Updated=1401]="Group_Updated",e[e.Group_Deleted=1402]="Group_Deleted",e[e.OrganizationUser_Invited=1500]="OrganizationUser_Invited",e[e.OrganizationUser_Confirmed=1501]="OrganizationUser_Confirmed",e[e.OrganizationUser_Updated=1502]="OrganizationUser_Updated",e[e.OrganizationUser_Removed=1503]="OrganizationUser_Removed",e[e.OrganizationUser_UpdatedGroups=1504]="OrganizationUser_UpdatedGroups",e[e.OrganizationUser_UnlinkedSso=1505]="OrganizationUser_UnlinkedSso",e[e.OrganizationUser_ResetPassword_Enroll=1506]="OrganizationUser_ResetPassword_Enroll",e[e.OrganizationUser_ResetPassword_Withdraw=1507]="OrganizationUser_ResetPassword_Withdraw",e[e.OrganizationUser_AdminResetPassword=1508]="OrganizationUser_AdminResetPassword",e[e.OrganizationUser_ResetSsoLink=1509]="OrganizationUser_ResetSsoLink",e[e.OrganizationUser_FirstSsoLogin=1510]="OrganizationUser_FirstSsoLogin",e[e.Organization_Updated=1600]="Organization_Updated",e[e.Organization_PurgedVault=1601]="Organization_PurgedVault",e[e.Organization_VaultAccessed=1603]="Organization_VaultAccessed",e[e.Organization_EnabledSso=1604]="Organization_EnabledSso",e[e.Organization_DisabledSso=1605]="Organization_DisabledSso",e[e.Organization_EnabledKeyConnector=1606]="Organization_EnabledKeyConnector",e[e.Organization_DisabledKeyConnector=1607]="Organization_DisabledKeyConnector",e[e.Policy_Updated=1700]="Policy_Updated",e[e.ProviderUser_Invited=1800]="ProviderUser_Invited",e[e.ProviderUser_Confirmed=1801]="ProviderUser_Confirmed",e[e.ProviderUser_Updated=1802]="ProviderUser_Updated",e[e.ProviderUser_Removed=1803]="ProviderUser_Removed",e[e.ProviderOrganization_Created=1900]="ProviderOrganization_Created",e[e.ProviderOrganization_Added=1901]="ProviderOrganization_Added",e[e.ProviderOrganization_Removed=1902]="ProviderOrganization_Removed",e[e.ProviderOrganization_VaultAccessed=1903]="ProviderOrganization_VaultAccessed"}(t.EventType||(t.EventType={}))},18276:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldType=void 0,function(e){e[e.Text=0]="Text",e[e.Hidden=1]="Hidden",e[e.Boolean=2]="Boolean",e[e.Linked=3]="Linked"}(t.FieldType||(t.FieldType={}))},15660:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadType=void 0,function(e){e[e.Direct=0]="Direct",e[e.Azure=1]="Azure"}(t.FileUploadType||(t.FileUploadType={}))},6317:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HashPurpose=void 0,function(e){e[e.ServerAuthorization=1]="ServerAuthorization",e[e.LocalAuthorization=2]="LocalAuthorization"}(t.HashPurpose||(t.HashPurpose={}))},1139:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlStorageLocation=void 0,function(e){e.Local="local",e.Memory="memory",e.Session="session"}(t.HtmlStorageLocation||(t.HtmlStorageLocation={}))},25847:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KdfType=void 0,function(e){e[e.PBKDF2_SHA256=0]="PBKDF2_SHA256"}(t.KdfType||(t.KdfType={}))},65845:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeySuffixOptions=void 0,function(e){e.Auto="auto",e.Biometric="biometric"}(t.KeySuffixOptions||(t.KeySuffixOptions={}))},96255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityLinkedId=t.CardLinkedId=t.LoginLinkedId=void 0,function(e){e[e.Username=100]="Username",e[e.Password=101]="Password"}(t.LoginLinkedId||(t.LoginLinkedId={})),function(e){e[e.CardholderName=300]="CardholderName",e[e.ExpMonth=301]="ExpMonth",e[e.ExpYear=302]="ExpYear",e[e.Code=303]="Code",e[e.Brand=304]="Brand",e[e.Number=305]="Number"}(t.CardLinkedId||(t.CardLinkedId={})),function(e){e[e.Title=400]="Title",e[e.MiddleName=401]="MiddleName",e[e.Address1=402]="Address1",e[e.Address2=403]="Address2",e[e.Address3=404]="Address3",e[e.City=405]="City",e[e.State=406]="State",e[e.PostalCode=407]="PostalCode",e[e.Country=408]="Country",e[e.Company=409]="Company",e[e.Email=410]="Email",e[e.Phone=411]="Phone",e[e.Ssn=412]="Ssn",e[e.Username=413]="Username",e[e.PassportNumber=414]="PassportNumber",e[e.LicenseNumber=415]="LicenseNumber",e[e.FirstName=416]="FirstName",e[e.LastName=417]="LastName",e[e.FullName=418]="FullName"}(t.IdentityLinkedId||(t.IdentityLinkedId={}))},65076:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogLevelType=void 0,function(e){e[e.Debug=0]="Debug",e[e.Info=1]="Info",e[e.Warning=2]="Warning",e[e.Error=3]="Error"}(t.LogLevelType||(t.LogLevelType={}))},70954:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationType=void 0,function(e){e[e.SyncCipherUpdate=0]="SyncCipherUpdate",e[e.SyncCipherCreate=1]="SyncCipherCreate",e[e.SyncLoginDelete=2]="SyncLoginDelete",e[e.SyncFolderDelete=3]="SyncFolderDelete",e[e.SyncCiphers=4]="SyncCiphers",e[e.SyncVault=5]="SyncVault",e[e.SyncOrgKeys=6]="SyncOrgKeys",e[e.SyncFolderCreate=7]="SyncFolderCreate",e[e.SyncFolderUpdate=8]="SyncFolderUpdate",e[e.SyncCipherDelete=9]="SyncCipherDelete",e[e.SyncSettings=10]="SyncSettings",e[e.LogOut=11]="LogOut",e[e.SyncSendCreate=12]="SyncSendCreate",e[e.SyncSendUpdate=13]="SyncSendUpdate",e[e.SyncSendDelete=14]="SyncSendDelete"}(t.NotificationType||(t.NotificationType={}))},68320:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.OrganizationUserStatusType||(t.OrganizationUserStatusType={}))},16233:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserType=void 0,function(e){e[e.Owner=0]="Owner",e[e.Admin=1]="Admin",e[e.User=2]="User",e[e.Manager=3]="Manager",e[e.Custom=4]="Custom"}(t.OrganizationUserType||(t.OrganizationUserType={}))},6127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentMethodType=void 0,function(e){e[e.Card=0]="Card",e[e.BankAccount=1]="BankAccount",e[e.PayPal=2]="PayPal",e[e.BitPay=3]="BitPay",e[e.Credit=4]="Credit",e[e.WireTransfer=5]="WireTransfer",e[e.AppleInApp=6]="AppleInApp",e[e.GoogleInApp=7]="GoogleInApp",e[e.Check=8]="Check"}(t.PaymentMethodType||(t.PaymentMethodType={}))},49618:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Permissions=void 0,function(e){e[e.AccessEventLogs=0]="AccessEventLogs",e[e.AccessImportExport=1]="AccessImportExport",e[e.AccessReports=2]="AccessReports",e[e.ManageAllCollections=3]="ManageAllCollections",e[e.ManageAssignedCollections=4]="ManageAssignedCollections",e[e.ManageGroups=5]="ManageGroups",e[e.ManageOrganization=6]="ManageOrganization",e[e.ManagePolicies=7]="ManagePolicies",e[e.ManageProvider=8]="ManageProvider",e[e.ManageUsers=9]="ManageUsers",e[e.ManageUsersPassword=10]="ManageUsersPassword",e[e.CreateNewCollections=11]="CreateNewCollections",e[e.EditAnyCollection=12]="EditAnyCollection",e[e.DeleteAnyCollection=13]="DeleteAnyCollection",e[e.EditAssignedCollections=14]="EditAssignedCollections",e[e.DeleteAssignedCollections=15]="DeleteAssignedCollections",e[e.ManageSso=16]="ManageSso"}(t.Permissions||(t.Permissions={}))},29557:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanSponsorshipType=void 0,function(e){e[e.FamiliesForEnterprise=0]="FamiliesForEnterprise"}(t.PlanSponsorshipType||(t.PlanSponsorshipType={}))},39691:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanType=void 0,function(e){e[e.Free=0]="Free",e[e.FamiliesAnnually2019=1]="FamiliesAnnually2019",e[e.TeamsMonthly2019=2]="TeamsMonthly2019",e[e.TeamsAnnually2019=3]="TeamsAnnually2019",e[e.EnterpriseMonthly2019=4]="EnterpriseMonthly2019",e[e.EnterpriseAnnually2019=5]="EnterpriseAnnually2019",e[e.Custom=6]="Custom",e[e.FamiliesAnnually=7]="FamiliesAnnually",e[e.TeamsMonthly=8]="TeamsMonthly",e[e.TeamsAnnually=9]="TeamsAnnually",e[e.EnterpriseMonthly=10]="EnterpriseMonthly",e[e.EnterpriseAnnually=11]="EnterpriseAnnually"}(t.PlanType||(t.PlanType={}))},40251:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyType=void 0,function(e){e[e.TwoFactorAuthentication=0]="TwoFactorAuthentication",e[e.MasterPassword=1]="MasterPassword",e[e.PasswordGenerator=2]="PasswordGenerator",e[e.SingleOrg=3]="SingleOrg",e[e.RequireSso=4]="RequireSso",e[e.PersonalOwnership=5]="PersonalOwnership",e[e.DisableSend=6]="DisableSend",e[e.SendOptions=7]="SendOptions",e[e.ResetPassword=8]="ResetPassword",e[e.MaximumVaultTimeout=9]="MaximumVaultTimeout",e[e.DisablePersonalVaultExport=10]="DisablePersonalVaultExport"}(t.PolicyType||(t.PolicyType={}))},48155:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProductType=void 0,function(e){e[e.Free=0]="Free",e[e.Families=1]="Families",e[e.Teams=2]="Teams",e[e.Enterprise=3]="Enterprise"}(t.ProductType||(t.ProductType={}))},80675:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserStatusType=void 0,function(e){e[e.Invited=0]="Invited",e[e.Accepted=1]="Accepted",e[e.Confirmed=2]="Confirmed"}(t.ProviderUserStatusType||(t.ProviderUserStatusType={}))},47073:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserType=void 0,function(e){e[e.ProviderAdmin=0]="ProviderAdmin",e[e.ServiceUser=1]="ServiceUser"}(t.ProviderUserType||(t.ProviderUserType={}))},94465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteType=void 0,function(e){e[e.Generic=0]="Generic"}(t.SecureNoteType||(t.SecureNoteType={}))},49538:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendType=void 0,function(e){e[e.Text=0]="Text",e[e.File=1]="File"}(t.SendType||(t.SendType={}))},35979:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateVersion=void 0,function(e){e[e.One=1]="One",e[e.Two=2]="Two",e[e.Three=3]="Three",e[e.Latest=3]="Latest"}(t.StateVersion||(t.StateVersion={}))},58578:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageLocation=void 0,function(e){e.Both="both",e.Disk="disk",e.Memory="memory"}(t.StorageLocation||(t.StorageLocation={}))},53387:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ThemeType=void 0,function(e){e.System="system",e.Light="light",e.Dark="dark",e.Nord="nord",e.SolarizedDark="solarizedDark"}(t.ThemeType||(t.ThemeType={}))},93921:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionType=void 0,function(e){e[e.Charge=0]="Charge",e[e.Credit=1]="Credit",e[e.PromotionalCredit=2]="PromotionalCredit",e[e.ReferralCredit=3]="ReferralCredit",e[e.Refund=4]="Refund"}(t.TransactionType||(t.TransactionType={}))},57976:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderType=void 0,function(e){e[e.Authenticator=0]="Authenticator",e[e.Email=1]="Email",e[e.Duo=2]="Duo",e[e.Yubikey=3]="Yubikey",e[e.U2f=4]="U2f",e[e.Remember=5]="Remember",e[e.OrganizationDuo=6]="OrganizationDuo",e[e.WebAuthn=7]="WebAuthn"}(t.TwoFactorProviderType||(t.TwoFactorProviderType={}))},60689:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UriMatchType=void 0,function(e){e[e.Domain=0]="Domain",e[e.Host=1]="Host",e[e.StartsWith=2]="StartsWith",e[e.Exact=3]="Exact",e[e.RegularExpression=4]="RegularExpression",e[e.Never=5]="Never"}(t.UriMatchType||(t.UriMatchType={}))},97583:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerificationType=void 0,function(e){e[e.MasterPassword=0]="MasterPassword",e[e.OTP=1]="OTP"}(t.VerificationType||(t.VerificationType={}))},82637:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccountFactory=void 0;t.AccountFactory=class{constructor(e){this.accountConstructor=e}create(e){return new this.accountConstructor(e)}}},88975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalStateFactory=void 0;t.GlobalStateFactory=class{constructor(e){this.globalStateConstructor=e}create(e){return new this.globalStateConstructor(e)}}},36907:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateFactory=void 0;const i=n(82637),r=n(88975);t.StateFactory=class{constructor(e,t){this.globalStateFactory=new r.GlobalStateFactory(e),this.accountFactory=new i.AccountFactory(t)}createGlobal(e){return this.globalStateFactory.create(e)}createAccount(e){return this.accountFactory.create(e)}}},1378:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AscendoCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<2)return;const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[e.length-1]),n.name=this.getValueOrDefault(e[0],"--"),e.length>2&&e.length%2==0)for(let t=0;t<e.length-2;t+=2){const i=e[t+2],r=e[t+1];if(this.isNullOrWhitespace(i)||this.isNullOrWhitespace(r))continue;const o=r.toLowerCase();null==n.login.password&&this.passwordFieldNames.indexOf(o)>-1?n.login.password=this.getValueOrDefault(i):null==n.login.username&&this.usernameFieldNames.indexOf(o)>-1?n.login.username=this.getValueOrDefault(i):(null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(o)>-1?n.login.uris=this.makeUriArray(i):this.processKvp(n,r,i)}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AscendoCsvImporter=o},73973:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvastCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name),n.login.uris=this.makeUriArray(e.web),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.login),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AvastCsvImporter=o},86094:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AvastJsonImporter=void 0;const i=n(30400),r=n(93292),o=n(23635),a=n(94465);class s extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);return null==n?(t.success=!1,Promise.resolve(t)):(null!=n.logins&&n.logins.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.custName),n.notes=this.getValueOrDefault(e.note),n.login.uris=this.makeUriArray(e.url),n.login.password=this.getValueOrDefault(e.pwd),n.login.username=this.getValueOrDefault(e.loginName),this.cleanupCipher(n),t.ciphers.push(n)})),null!=n.notes&&n.notes.forEach((e=>{const n=this.initLoginCipher();n.type=o.CipherType.SecureNote,n.secureNote.type=a.SecureNoteType.Generic,n.name=this.getValueOrDefault(e.label),n.notes=this.getValueOrDefault(e.text),this.cleanupCipher(n),t.ciphers.push(n)})),null!=n.cards&&n.cards.forEach((e=>{const n=this.initLoginCipher();n.type=o.CipherType.Card,n.name=this.getValueOrDefault(e.custName),n.notes=this.getValueOrDefault(e.note),n.card.cardholderName=this.getValueOrDefault(e.holderName),n.card.number=this.getValueOrDefault(e.cardNumber),n.card.code=this.getValueOrDefault(e.cvv),n.card.brand=this.getCardBrand(n.card.number),null!=e.expirationDate&&(null!=e.expirationDate.month&&(n.card.expMonth=e.expirationDate.month+""),null!=e.expirationDate.year&&(n.card.expYear=e.expirationDate.year+"")),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AvastJsonImporter=s},28422:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AviraCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name,this.getValueOrDefault(this.nameFromUrl(e.website),"--")),n.login.uris=this.makeUriArray(e.website),n.login.password=this.getValueOrDefault(e.password),this.isNullOrWhitespace(e.username)&&!this.isNullOrWhitespace(e.secondary_username)?n.login.username=e.secondary_username:(n.login.username=this.getValueOrDefault(e.username),n.notes=this.getValueOrDefault(e.secondary_username)),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.AviraCsvImporter=o},30400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImporter=void 0;const i=n(57460),r=n(52556),o=n(82186),a=n(38138),s=n(70829),l=n(58841),c=n(50044),d=n(52450),p=n(56561),u=n(23635),m=n(18276),h=n(94465),v=n(58771);t.BaseImporter=class{constructor(){this.organizationId=null,this.logService=new v.ConsoleLogService(!1),this.newLineRegex=/(?:\r\n|\r|\n)/,this.passwordFieldNames=["password","pass word","passphrase","pass phrase","pass","code","code word","codeword","secret","secret word","personpwd","key","keyword","key word","keyphrase","key phrase","form_pw","wppassword","pin","pwd","pw","pword","passwd","p","serial","serial#","license key","reg #","passwort"],this.usernameFieldNames=["user","name","user name","username","login name","email","e-mail","id","userid","user id","login","form_loginname","wpname","mail","loginid","login id","log","personlogin","first name","last name","card#","account #","member","member #","nom","benutzername"],this.notesFieldNames=["note","notes","comment","comments","memo","description","free form","freeform","free text","freetext","free","kommentar"],this.uriFieldNames=["url","hyper link","hyperlink","link","host","hostname","host name","server","address","hyper ref","href","web","website","web site","site","web-site","uri","ort","adresse"],this.parseCsvOptions={encoding:"UTF-8",skipEmptyLines:!1}}get organization(){return null!=this.organizationId}parseXml(e){const t=(new DOMParser).parseFromString(e,"application/xml");return null!=t&&null==t.querySelector("parsererror")?t:null}parseCsv(e,t,n={}){const r=Object.assign({header:t},this.parseCsvOptions,n);e=this.splitNewLine(e).join("\n").trim();const o=i.parse(e,r);return null!=o.errors&&o.errors.length>0&&o.errors.forEach((e=>{null!=e.row&&this.logService.warning("Error parsing row "+e.row+": "+e.message)})),o.data&&o.data.length>0?o.data:null}parseSingleRowCsv(e){if(this.isNullOrWhitespace(e))return null;const t=this.parseCsv(e,!1);return null!=t&&t.length>0&&t[0].length>0?t[0]:null}makeUriArray(e){if(null==e)return null;if("string"==typeof e){const t=new a.LoginUriView;return t.uri=this.fixUri(e),this.isNullOrWhitespace(t.uri)?null:(t.match=null,[t])}if(e.length>0){const t=[];return e.forEach((e=>{const n=new a.LoginUriView;n.uri=this.fixUri(e),this.isNullOrWhitespace(n.uri)||(n.match=null,t.push(n))})),0===t.length?null:t}return null}fixUri(e){return null==e?null:(-1===(e=e.trim()).indexOf("://")&&e.indexOf(".")>=0&&(e="http://"+e),e.length>1e3?e.substring(0,1e3):e)}nameFromUrl(e){const t=s.Utils.getHostname(e);return this.isNullOrWhitespace(t)?null:t.startsWith("www.")?t.replace("www.",""):t}isNullOrWhitespace(e){return s.Utils.isNullOrWhitespace(e)}getValueOrDefault(e,t=null){return this.isNullOrWhitespace(e)?t:e}splitNewLine(e){return e.split(this.newLineRegex)}getCardBrand(e){if(this.isNullOrWhitespace(e))return null;let t=new RegExp("^4");return null!=e.match(t)?"Visa":/^(5[1-5][0-9]{14}|2(22[1-9][0-9]{12}|2[3-9][0-9]{13}|[3-6][0-9]{14}|7[0-1][0-9]{13}|720[0-9]{12}))$/.test(e)?"Mastercard":(t=new RegExp("^3[47]"),null!=e.match(t)?"Amex":(t=new RegExp("^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)"),null!=e.match(t)?"Discover":(t=new RegExp("^36"),null!=e.match(t)?"Diners Club":(t=new RegExp("^30[0-5]"),null!=e.match(t)?"Diners Club":(t=new RegExp("^35(2[89]|[3-8][0-9])"),null!=e.match(t)?"JCB":(t=new RegExp("^(4026|417500|4508|4844|491(3|7))"),null!=e.match(t)?"Visa":null))))))}setCardExpiration(e,t){if(!this.isNullOrWhitespace(t)){const n=(t=t.replace(/\s/g,"")).split("/");if(2===n.length){let t=null,i=null;if(1!==n[0].length&&2!==n[0].length||(t=n[0],2===t.length&&"0"===t[0]&&(t=t.substr(1,1))),2!==n[1].length&&4!==n[1].length||(i=2===t.length?"20"+n[1]:n[1]),null!=t&&null!=i)return e.card.expMonth=t,e.card.expYear=i,!0}}return!1}moveFoldersToCollections(e){e.folderRelationships.forEach((t=>e.collectionRelationships.push(t))),e.collections=e.folders.map((e=>{const t=new o.CollectionView;return t.name=e.name,t})),e.folderRelationships=[],e.folders=[]}querySelectorDirectChild(e,t){const n=this.querySelectorAllDirectChild(e,t);return 0===n.length?null:n[0]}querySelectorAllDirectChild(e,t){return Array.from(e.querySelectorAll(t)).filter((t=>t.parentNode===e))}initLoginCipher(){const e=new r.CipherView;return e.favorite=!1,e.notes="",e.fields=[],e.login=new d.LoginView,e.type=u.CipherType.Login,e}cleanupCipher(e){null!=e&&(e.type!==u.CipherType.Login&&(e.login=null),this.isNullOrWhitespace(e.name)&&(e.name="--"),this.isNullOrWhitespace(e.notes)?e.notes=null:e.notes=e.notes.trim(),null!=e.fields&&0===e.fields.length&&(e.fields=null))}processKvp(e,t,n,i=m.FieldType.Text){if(!this.isNullOrWhitespace(n))if(this.isNullOrWhitespace(t)&&(t=""),n.length>200||n.trim().search(this.newLineRegex)>-1)null==e.notes&&(e.notes=""),e.notes+=t+": "+this.splitNewLine(n).join("\n")+"\n";else{null==e.fields&&(e.fields=[]);const r=new l.FieldView;r.type=i,r.name=t,r.value=n,e.fields.push(r)}}processFolder(e,t){let n=e.folders.length;const i=!this.isNullOrWhitespace(t);let r=i;if(i)for(let o=0;o<e.folders.length;o++)if(e.folders[o].name===t){r=!1,n=o;break}if(r){const n=new c.FolderView;n.name=t,e.folders.push(n)}i&&e.folderRelationships.push([e.ciphers.length,n])}convertToNoteIfNeeded(e){e.type===u.CipherType.Login&&this.isNullOrWhitespace(e.login.username)&&this.isNullOrWhitespace(e.login.password)&&(null==e.login.uris||0===e.login.uris.length)&&(e.type=u.CipherType.SecureNote,e.secureNote=new p.SecureNoteView,e.secureNote.type=h.SecureNoteType.Generic)}}},1627:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(52556),a=n(82186),s=n(58841),l=n(52450),c=n(56561),d=n(2944),p=n(23635),u=n(18276),m=n(94465);class h extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.organization&&!this.isNullOrWhitespace(e.collections)){e.collections.split(",").forEach((e=>{let n=!0,i=t.collections.length;for(let r=0;r<t.collections.length;r++)if(t.collections[r].name===e){n=!1,i=r;break}if(n){const n=new a.CollectionView;n.name=e,t.collections.push(n)}t.collectionRelationships.push([t.ciphers.length,i])}))}else this.organization||this.processFolder(t,e.folder);const n=new o.CipherView;n.favorite=!this.organization&&"0"!==this.getValueOrDefault(e.favorite,"0"),n.type=p.CipherType.Login,n.notes=this.getValueOrDefault(e.notes),n.name=this.getValueOrDefault(e.name,"--");try{n.reprompt=parseInt(this.getValueOrDefault(e.reprompt,d.CipherRepromptType.None.toString()),10)}catch(i){console.error("Unable to parse reprompt value",i),n.reprompt=d.CipherRepromptType.None}if(!this.isNullOrWhitespace(e.fields)){const t=this.splitNewLine(e.fields);for(let e=0;e<t.length;e++){if(this.isNullOrWhitespace(t[e]))continue;const i=t[e].lastIndexOf(": ");if(-1===i)continue;null==n.fields&&(n.fields=[]);const r=new s.FieldView;r.name=t[e].substr(0,i),r.value=null,r.type=u.FieldType.Text,t[e].length>i+2&&(r.value=t[e].substr(i+2)),n.fields.push(r)}}if("note"===(null!=e.type?e.type.toLowerCase():null))n.type=p.CipherType.SecureNote,n.secureNote=new c.SecureNoteView,n.secureNote.type=m.SecureNoteType.Generic;else{n.type=p.CipherType.Login,n.login=new l.LoginView,n.login.totp=this.getValueOrDefault(e.login_totp||e.totp),n.login.username=this.getValueOrDefault(e.login_username||e.username),n.login.password=this.getValueOrDefault(e.login_password||e.password);const t=this.parseSingleRowCsv(e.login_uri||e.uri);n.login.uris=this.makeUriArray(t)}t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BitwardenCsvImporter=h},16039:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenJsonImporter=void 0;const r=n(30400),o=n(66607),a=n(93292),s=n(7064),l=n(79937),c=n(50901);class d extends r.BaseImporter{constructor(e,t){super(),this.cryptoService=e,this.i18nService=t}parse(e){return i(this,void 0,void 0,(function*(){return this.result=new a.ImportResult,this.results=JSON.parse(e),null==this.results||null==this.results.items||0===this.results.items.length?(this.result.success=!1,this.result):(this.results.encrypted?yield this.parseEncrypted():this.parseDecrypted(),this.result)}))}parseEncrypted(){return i(this,void 0,void 0,(function*(){if(null!=this.results.encKeyValidation_DO_NOT_EDIT){const e=yield this.cryptoService.getOrgKey(this.organizationId),t=new o.EncString(this.results.encKeyValidation_DO_NOT_EDIT);if(null===(yield this.cryptoService.decryptToUtf8(t,e)))return this.result.success=!1,void(this.result.errorMessage=this.i18nService.t("importEncKeyError"))}const e=new Map;if(this.organization&&null!=this.results.collections)for(const t of this.results.collections){const n=l.CollectionWithId.toDomain(t);if(null!=n){n.id=null,n.organizationId=this.organizationId;const i=yield n.decrypt();e.set(t.id,this.result.collections.length),this.result.collections.push(i)}}else if(!this.organization&&null!=this.results.folders)for(const t of this.results.folders){const n=c.FolderWithId.toDomain(t);if(null!=n){n.id=null;const i=yield n.decrypt();e.set(t.id,this.result.folders.length),this.result.folders.push(i)}}for(const t of this.results.items){const n=s.CipherWithIds.toDomain(t);n.id=null,n.folderId=null,n.organizationId=this.organizationId,n.collectionIds=null,null!=n.passwordHistory&&n.passwordHistory.length>5&&(n.passwordHistory=n.passwordHistory.slice(0,5)),!this.organization&&null!=t.folderId&&e.has(t.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,e.get(t.folderId)]):this.organization&&null!=t.collectionIds&&t.collectionIds.forEach((t=>{e.has(t)&&this.result.collectionRelationships.push([this.result.ciphers.length,e.get(t)])}));const i=yield n.decrypt();this.cleanupCipher(i),this.result.ciphers.push(i)}this.result.success=!0}))}parseDecrypted(){const e=new Map;this.organization&&null!=this.results.collections?this.results.collections.forEach((t=>{const n=l.CollectionWithId.toView(t);null!=n&&(n.id=null,n.organizationId=null,e.set(t.id,this.result.collections.length),this.result.collections.push(n))})):this.organization||null==this.results.folders||this.results.folders.forEach((t=>{const n=c.FolderWithId.toView(t);null!=n&&(n.id=null,e.set(t.id,this.result.folders.length),this.result.folders.push(n))})),this.results.items.forEach((t=>{const n=s.CipherWithIds.toView(t);n.id=null,n.folderId=null,n.organizationId=null,n.collectionIds=null,null!=n.passwordHistory&&n.passwordHistory.length>5&&(n.passwordHistory=n.passwordHistory.slice(0,5)),!this.organization&&null!=t.folderId&&e.has(t.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,e.get(t.folderId)]):this.organization&&null!=t.collectionIds&&t.collectionIds.forEach((t=>{e.has(t)&&this.result.collectionRelationships.push([this.result.ciphers.length,e.get(t)])})),this.cleanupCipher(n),this.result.ciphers.push(n)})),this.result.success=!0}}t.BitwardenJsonImporter=d},78855:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlackBerryCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if("list"===e.grouping)return;const n=this.initLoginCipher();n.favorite="1"===e.fav,n.name=this.getValueOrDefault(e.name),n.notes=this.getValueOrDefault(e.extra),"note"!==e.grouping&&(n.login.uris=this.makeUriArray(e.url),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.username)),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BlackBerryCsvImporter=o},22126:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlurCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{"null"===e.label&&(e.label=null);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.label,this.getValueOrDefault(this.nameFromUrl(e.domain),"--")),n.login.uris=this.makeUriArray(e.domain),n.login.password=this.getValueOrDefault(e.password),this.isNullOrWhitespace(e.email)&&!this.isNullOrWhitespace(e.username)?n.login.username=e.username:(n.login.username=this.getValueOrDefault(e.email),n.notes=this.getValueOrDefault(e.username)),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.BlurCsvImporter=o},97542:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ButtercupCsvImporter=void 0;const i=n(30400),r=n(93292),o=["!group_id","!group_name","title","username","password","URL","id"];class a extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValueOrDefault(e["!group_name"]));const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.title,"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.URL);let i=!1;for(const t in e)e.hasOwnProperty(t)&&(i||-1!==o.indexOf(t)||(i=!0),i&&this.processKvp(n,t,e[t]));this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.ButtercupCsvImporter=a},50311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.name,"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.ChromeCsvImporter=o},44521:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ClipperzHtmlImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const i=n.querySelector("textarea");if(null==i||this.isNullOrWhitespace(i.textContent))return t.errorMessage="Missing textarea.",t.success=!1,Promise.resolve(t);return JSON.parse(i.textContent).forEach((e=>{const n=this.initLoginCipher();if(this.isNullOrWhitespace(e.label)||(n.name=e.label.split(" ")[0]),null==e.data||this.isNullOrWhitespace(e.data.notes)||(n.notes=e.data.notes.split("\\n").join("\n")),null!=e.currentVersion&&null!=e.currentVersion.fields)for(const t in e.currentVersion.fields){if(!e.currentVersion.fields.hasOwnProperty(t))continue;const i=e.currentVersion.fields[t];switch(null!=i.actionType?i.actionType.toLowerCase():null){case"password":n.login.password=this.getValueOrDefault(i.value);break;case"email":case"username":case"user":case"name":n.login.username=this.getValueOrDefault(i.value);break;case"url":n.login.uris=this.makeUriArray(i.value);break;default:const e=null!=i.label?i.label.toLowerCase():null;null==n.login.password&&this.passwordFieldNames.indexOf(e)>-1?n.login.password=this.getValueOrDefault(i.value):null==n.login.username&&this.usernameFieldNames.indexOf(e)>-1?n.login.username=this.getValueOrDefault(i.value):(null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(e)>-1?n.login.uris=this.makeUriArray(i.value):this.processKvp(n,i.label,i.value)}}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}}t.ClipperzHtmlImporter=o},33936:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodebookCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValueOrDefault(e.Category));const n=this.initLoginCipher();n.favorite="True"===this.getValueOrDefault(e.Favorite),n.name=this.getValueOrDefault(e.Entry,"--"),n.notes=this.getValueOrDefault(e.Note),n.login.username=this.getValueOrDefault(e.Username,e.Email),n.login.password=this.getValueOrDefault(e.Password),n.login.totp=this.getValueOrDefault(e.TOTP),n.login.uris=this.makeUriArray(e.Website),this.isNullOrWhitespace(e.Username)||this.processKvp(n,"Email",e.Email),this.processKvp(n,"Phone",e.Phone),this.processKvp(n,"PIN",e.PIN),this.processKvp(n,"Account",e.Account),this.processKvp(n,"Date",e.Date),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.CodebookCsvImporter=o},3311:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DashlaneJsonImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(52556),s=n(92643),l=n(56561),c=n(23635),d=n(94465),p=new Set(["ADDRESS","AUTHENTIFIANT","BANKSTATEMENT","IDCARD","IDENTITY","PAYMENTMEANS_CREDITCARD","PAYMENTMEAN_PAYPAL","EMAIL"]);class u extends i.BaseImporter{parse(e){this.result=new r.ImportResult;const t=JSON.parse(e);if(null==t||0===t.length)return this.result.success=!1,Promise.resolve(this.result);null!=t.ADDRESS&&this.processAddress(t.ADDRESS),null!=t.AUTHENTIFIANT&&this.processAuth(t.AUTHENTIFIANT),null!=t.BANKSTATEMENT&&this.processNote(t.BANKSTATEMENT,"BankAccountName"),null!=t.IDCARD&&this.processNote(t.IDCARD,"Fullname"),null!=t.PAYMENTMEANS_CREDITCARD&&this.processCard(t.PAYMENTMEANS_CREDITCARD),null!=t.IDENTITY&&this.processIdentity(t.IDENTITY);for(const n in t)t.hasOwnProperty(n)&&!p.has(n)&&this.processNote(t[n],null,"Generic Note");return this.result.success=!0,Promise.resolve(this.result)}processAuth(e){e.forEach((e=>{const t=this.initLoginCipher();t.name=this.getValueOrDefault(e.title),t.login.username=this.getValueOrDefault(e.login,this.getValueOrDefault(e.secondaryLogin)),this.isNullOrWhitespace(t.login.username)?t.login.username=this.getValueOrDefault(e.email):this.isNullOrWhitespace(e.email)||(t.notes="Email: "+e.email+"\n"),t.login.password=this.getValueOrDefault(e.password),t.login.uris=this.makeUriArray(e.domain),t.notes+=this.getValueOrDefault(e.note,""),this.convertToNoteIfNeeded(t),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processIdentity(e){e.forEach((e=>{const t=new a.CipherView;t.identity=new s.IdentityView,t.type=c.CipherType.Identity,t.name=this.getValueOrDefault(e.fullName,"");const n=t.name.split(" ");n.length>0&&(t.identity.firstName=this.getValueOrDefault(n[0])),2===n.length?t.identity.lastName=this.getValueOrDefault(n[1]):3===n.length&&(t.identity.middleName=this.getValueOrDefault(n[1]),t.identity.lastName=this.getValueOrDefault(n[2])),t.identity.username=this.getValueOrDefault(e.pseudo),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processAddress(e){e.forEach((e=>{const t=new a.CipherView;t.identity=new s.IdentityView,t.type=c.CipherType.Identity,t.name=this.getValueOrDefault(e.addressName),t.identity.address1=this.getValueOrDefault(e.addressFull),t.identity.city=this.getValueOrDefault(e.city),t.identity.state=this.getValueOrDefault(e.state),t.identity.postalCode=this.getValueOrDefault(e.zipcode),t.identity.country=this.getValueOrDefault(e.country),null!=t.identity.country&&(t.identity.country=t.identity.country.toUpperCase()),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processCard(e){e.forEach((e=>{const t=new a.CipherView;t.card=new o.CardView,t.type=c.CipherType.Card,t.name=this.getValueOrDefault(e.bank),t.card.number=this.getValueOrDefault(e.cardNumber),t.card.brand=this.getCardBrand(t.card.number),t.card.cardholderName=this.getValueOrDefault(e.owner),this.isNullOrWhitespace(t.card.brand)||(this.isNullOrWhitespace(t.name)?t.name=t.card.brand:t.name+=" - "+t.card.brand),this.cleanupCipher(t),this.result.ciphers.push(t)}))}processNote(e,t,n=null){e.forEach((e=>{const i=new a.CipherView;i.secureNote=new l.SecureNoteView,i.type=c.CipherType.SecureNote,i.secureNote.type=d.SecureNoteType.Generic,i.name=null!=n?n:this.getValueOrDefault(e[t]);for(const n in e)e.hasOwnProperty(n)&&n!==t&&this.processKvp(i,n,e[n].toString());this.cleanupCipher(i),this.result.ciphers.push(i)}))}}t.DashlaneJsonImporter=u},36636:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptrCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(23635);class s extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Label,"--"),n.notes=this.getValueOrDefault(e.Notes);const i=this.getValueOrDefault(e.Text);this.isNullOrWhitespace(i)||(this.isNullOrWhitespace(n.notes)?n.notes=i:n.notes+="\n\n"+i);const r=e["Entry Type"];if("Password"===r)n.login.username=this.getValueOrDefault(e.Username),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e["Site URL"]);else if("Credit Card"===r){n.type=a.CipherType.Card,n.card=new o.CardView,n.card.cardholderName=this.getValueOrDefault(e["Name on card"]),n.card.number=this.getValueOrDefault(e["Card Number"]),n.card.brand=this.getCardBrand(n.card.number),n.card.code=this.getValueOrDefault(e.CVV);const t=this.getValueOrDefault(e.Expiry);if(!this.isNullOrWhitespace(t)){const e=t.split("/");e.length>1&&(n.card.expMonth=parseInt(e[0],null).toString(),n.card.expYear=(2e3+parseInt(e[1],null)).toString())}}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.EncryptrCsvImporter=s},77177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(23635),a=n(94465),s=n(17283),l=n(56561);class c extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let i=!0;return n.forEach((e=>{if(e.length<2||i&&("Title"===e[0]||"title"===e[0]))return void(i=!1);const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[e.length-1]),n.name=this.getValueOrDefault(e[0],"--"),2!==e.length&&(this.containsField(e,"username")||this.containsField(e,"password")||this.containsField(e,"email")||this.containsField(e,"url"))||(n.type=o.CipherType.SecureNote,n.secureNote=new l.SecureNoteView,n.secureNote.type=a.SecureNoteType.Generic),this.containsField(e,"cardholder")&&this.containsField(e,"number")&&this.containsField(e,"expiry date")&&(n.type=o.CipherType.Card,n.card=new s.CardView),e.length>2&&e.length%2==0)for(let t=0;t<e.length-2;t+=2){const i=e[t+2];if(this.isNullOrWhitespace(i))continue;const r=e[t+1],a=r.toLowerCase();if(n.type===o.CipherType.Login){if("url"===a&&(null==n.login.uris||0===n.login.uris.length)){n.login.uris=this.makeUriArray(i);continue}if(("username"===a||"email"===a)&&this.isNullOrWhitespace(n.login.username)){n.login.username=i;continue}if("password"===a&&this.isNullOrWhitespace(n.login.password)){n.login.password=i;continue}if("totp"===a&&this.isNullOrWhitespace(n.login.totp)){n.login.totp=i;continue}}else if(n.type===o.CipherType.Card){if("cardholder"===a&&this.isNullOrWhitespace(n.card.cardholderName)){n.card.cardholderName=i;continue}if("number"===a&&this.isNullOrWhitespace(n.card.number)){n.card.number=i,n.card.brand=this.getCardBrand(i);continue}if("cvc"===a&&this.isNullOrWhitespace(n.card.code)){n.card.code=i;continue}if("expiry date"===a&&this.isNullOrWhitespace(n.card.expMonth)&&this.isNullOrWhitespace(n.card.expYear)){if(this.setCardExpiration(n,i))continue}else if("type"===a)continue}this.processKvp(n,r,i)}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}containsField(e,t){return null!=e&&null!=t&&e.filter((e=>!this.isNullOrWhitespace(e)&&e.toLowerCase()===t.toLowerCase())).length>0}}t.EnpassCsvImporter=c},4049:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassJsonImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(50044),s=n(23635),l=n(18276);class c extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||null==n.items||0===n.items.length)return t.success=!1,Promise.resolve(t);const i=new Map,o=new Map,s=this.buildFolderTree(n.folders);return this.flattenFolderTree(null,s,i),i.forEach(((e,n)=>{o.set(n,t.folders.length);const i=new a.FolderView;i.name=e,t.folders.push(i)})),n.items.forEach((e=>{null!=e.folders&&e.folders.length>0&&o.has(e.folders[0])&&t.folderRelationships.push([t.ciphers.length,o.get(e.folders[0])]);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.title),n.favorite=e.favorite>0,null!=e.template_type&&null!=e.fields&&e.fields.length>0&&(0===e.template_type.indexOf("login.")||0===e.template_type.indexOf("password.")?this.processLogin(n,e.fields):0===e.template_type.indexOf("creditcard.")?this.processCard(n,e.fields):e.template_type.indexOf("identity.")<0&&e.fields.some((e=>"password"===e.type&&!this.isNullOrWhitespace(e.value)))?this.processLogin(n,e.fields):this.processNote(n,e.fields)),n.notes+="\n"+this.getValueOrDefault(e.note,""),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}processLogin(e,t){const n=[];t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||("username"!==t.type&&"email"!==t.type||!this.isNullOrWhitespace(e.login.username)?"password"===t.type&&this.isNullOrWhitespace(e.login.password)?e.login.password=t.value:"totp"===t.type&&this.isNullOrWhitespace(e.login.totp)?e.login.totp=t.value:"url"===t.type?n.push(t.value):this.processKvp(e,t.label,t.value,1===t.sensitive?l.FieldType.Hidden:l.FieldType.Text):e.login.username=t.value)})),e.login.uris=this.makeUriArray(n)}processCard(e,t){e.card=new o.CardView,e.type=s.CipherType.Card,t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||"ccType"===t.type||("ccName"===t.type&&this.isNullOrWhitespace(e.card.cardholderName)?e.card.cardholderName=t.value:"ccNumber"===t.type&&this.isNullOrWhitespace(e.card.number)?(e.card.number=t.value,e.card.brand=this.getCardBrand(e.card.number)):"ccCvc"===t.type&&this.isNullOrWhitespace(e.card.code)?e.card.code=t.value:"ccExpiry"===t.type&&this.isNullOrWhitespace(e.card.expYear)&&this.setCardExpiration(e,t.value)||this.processKvp(e,t.label,t.value,1===t.sensitive?l.FieldType.Hidden:l.FieldType.Text))}))}processNote(e,t){t.forEach((t=>{this.isNullOrWhitespace(t.value)||"section"===t.type||this.processKvp(e,t.label,t.value,1===t.sensitive?l.FieldType.Hidden:l.FieldType.Text)}))}buildFolderTree(e){if(null==e)return[];const t=[],n=new Map([]);return e.forEach((e=>{n.set(e.uuid,e),e.children=[]})),e.forEach((e=>{null!=e.parent_uuid&&""!==e.parent_uuid&&n.has(e.parent_uuid)?n.get(e.parent_uuid).children.push(e):t.push(e)})),t}flattenFolderTree(e,t,n){null!=t&&t.forEach((t=>{if(null!=t.title&&""!==t.title.trim()){let i=t.title.trim();null!=e&&""!==e.trim()&&(i=e+"/"+i),n.set(t.uuid,i),null!=t.children&&0!==t.children.length&&this.flattenFolderTree(i,t.children,n)}}))}}t.EnpassJsonImporter=c},18810:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FirefoxCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.filter((e=>"chrome://FirefoxAccounts"!==e.url)).forEach((e=>{const n=this.initLoginCipher(),i=this.getValueOrDefault(e.url,this.getValueOrDefault(e.hostname));n.name=this.getValueOrDefault(this.nameFromUrl(i),"--"),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(i),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.FirefoxCsvImporter=o},68656:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FSecureFskImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(23635);class s extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||null==n.data)return t.success=!1,Promise.resolve(t);for(const i in n.data){if(!n.data.hasOwnProperty(i))continue;const e=n.data[i],r=this.initLoginCipher();if(r.name=this.getValueOrDefault(e.service),r.notes=this.getValueOrDefault(e.notes),"website"===e.style||"globe"===e.style)r.login.username=this.getValueOrDefault(e.username),r.login.password=this.getValueOrDefault(e.password),r.login.uris=this.makeUriArray(e.url);else{if("creditcard"!==e.style)continue;r.type=a.CipherType.Card,r.card=new o.CardView,r.card.cardholderName=this.getValueOrDefault(e.username),r.card.number=this.getValueOrDefault(e.creditNumber),r.card.brand=this.getCardBrand(r.card.number),r.card.code=this.getValueOrDefault(e.creditCvv),this.isNullOrWhitespace(e.creditExpiry)||this.setCardExpiration(r,e.creditExpiry)||this.processKvp(r,"Expiration",e.creditExpiry),this.isNullOrWhitespace(e.password)||this.processKvp(r,"PIN",e.password)}this.convertToNoteIfNeeded(r),this.cleanupCipher(r),t.ciphers.push(r)}return t.success=!0,Promise.resolve(t)}}t.FSecureFskImporter=s},15641:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GnomeJsonImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||0===Object.keys(n).length)return t.success=!1,Promise.resolve(t);for(const i in n)n.hasOwnProperty(i)&&!this.isNullOrWhitespace(i)&&0!==n[i].length&&n[i].forEach((e=>{if(this.isNullOrWhitespace(e.display_name)||0!==e.display_name.indexOf("http"))return;this.processFolder(t,i);const n=this.initLoginCipher();if(n.name=e.display_name.replace("http://","").replace("https://",""),n.name.length>30&&(n.name=n.name.substring(0,30)),n.login.password=this.getValueOrDefault(e.secret),n.login.uris=this.makeUriArray(e.display_name),null!=e.attributes){n.login.username=null!=e.attributes?this.getValueOrDefault(e.attributes.username_value):null;for(const t in e.attributes)e.attributes.hasOwnProperty(t)&&"username_value"!==t&&"xdg:schema"!==t&&this.processKvp(n,t,e.attributes[t])}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)}));return this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.GnomeJsonImporter=o},99095:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KasperskyTxtImporter=void 0;const i=n(30400),r=n(93292),o="Notes\n\n",a="Applications\n\n",s="Websites\n\n",l="\n---\n";class c extends i.BaseImporter{parse(e){const t=new r.ImportResult;let n,i,l,c=this.splitNewLine(e).join("\n");if(-1!==c.indexOf(o)){const e=c.split(o);e.length>1&&(c=e[0],n=e[1])}if(-1!==c.indexOf(a)){const e=c.split(a);e.length>1&&(c=e[0],i=e[1])}if(0===c.indexOf(s)){const e=c.split(s);e.length>1&&(c=e[0],l=e[1])}const d=this.parseDataCategory(n),p=this.parseDataCategory(i),u=this.parseDataCategory(l);return d.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.get("Name")),n.notes=this.getValueOrDefault(e.get("Text")),this.cleanupCipher(n),t.ciphers.push(n)})),u.concat(p).forEach((e=>{const n=this.initLoginCipher(),i=e.has("Website name")?"Website name":"Application";n.name=this.getValueOrDefault(e.get(i),""),this.isNullOrWhitespace(e.get("Login name"))||(this.isNullOrWhitespace(n.name)||(n.name+=": "),n.name+=e.get("Login name")),n.notes=this.getValueOrDefault(e.get("Comment")),e.has("Website URL")&&(n.login.uris=this.makeUriArray(e.get("Website URL"))),n.login.username=this.getValueOrDefault(e.get("Login")),n.login.password=this.getValueOrDefault(e.get("Password")),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}parseDataCategory(e){if(this.isNullOrWhitespace(e)||-1===e.indexOf(l))return[];const t=[];return e.split(l).forEach((e=>{if(-1===e.indexOf("\n"))return;const n=new Map;let i,r;e.split("\n").forEach((e=>{if(null!=i)return void(i+="\n"+e);const t=e.indexOf(":");let o,a;-1!==t&&(o=e.substring(0,t),e.length>t+1&&(a=e.substring(t+2)),null!=o&&n.set(o,a),"Comment"!==o&&"Text"!==o||(i=a,r=o))})),null!=i&&null!=r&&n.set(r,i),0!==n.size&&t.push(n)})),t}}t.KasperskyTxtImporter=c},54547:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeePass2XmlImporter=void 0;const i=n(30400),r=n(18276),o=n(93292),a=n(50044);class s extends i.BaseImporter{constructor(){super(...arguments),this.result=new o.ImportResult}parse(e){const t=this.parseXml(e);if(null==t)return this.result.success=!1,Promise.resolve(this.result);const n=t.querySelector("KeePassFile > Root > Group");return null==n?(this.result.errorMessage="Missing `KeePassFile > Root > Group` node.",this.result.success=!1,Promise.resolve(this.result)):(this.traverse(n,!0,""),this.organization&&this.moveFoldersToCollections(this.result),this.result.success=!0,Promise.resolve(this.result))}traverse(e,t,n){const i=this.result.folders.length;let o=n;if(!t){""!==o&&(o+="/");const t=this.querySelectorDirectChild(e,"Name");o+=null==t?"-":t.textContent;const n=new a.FolderView;n.name=o,this.result.folders.push(n)}this.querySelectorAllDirectChild(e,"Entry").forEach((e=>{const n=this.result.ciphers.length,o=this.initLoginCipher();this.querySelectorAllDirectChild(e,"String").forEach((e=>{const t=this.querySelectorDirectChild(e,"Value"),n=null!=t?t.textContent:null;if(this.isNullOrWhitespace(n))return;const i=this.querySelectorDirectChild(e,"Key"),a=null!=i?i.textContent:null;if("URL"===a)o.login.uris=this.makeUriArray(n);else if("UserName"===a)o.login.username=n;else if("Password"===a)o.login.password=n;else if("otp"===a)o.login.totp=n.replace("key=","");else if("Title"===a)o.name=n;else if("Notes"===a)o.notes+=n+"\n";else{let e=r.FieldType.Text;const i=t.attributes;i.length>0&&null!=i.ProtectInMemory&&"True"===i.ProtectInMemory.value&&(e=r.FieldType.Hidden),this.processKvp(o,a,n,e)}})),this.cleanupCipher(o),this.result.ciphers.push(o),t||this.result.folderRelationships.push([n,i])})),this.querySelectorAllDirectChild(e,"Group").forEach((e=>{this.traverse(e,!1,o)}))}}t.KeePass2XmlImporter=s},56873:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeePassXCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(e.Title))return;e.Group=!this.isNullOrWhitespace(e.Group)&&e.Group.startsWith("Root/")?e.Group.replace("Root/",""):e.Group;const n=this.isNullOrWhitespace(e.Group)?null:e.Group;this.processFolder(t,n);const i=this.initLoginCipher();i.notes=this.getValueOrDefault(e.Notes),i.name=this.getValueOrDefault(e.Title,"--"),i.login.username=this.getValueOrDefault(e.Username),i.login.password=this.getValueOrDefault(e.Password),i.login.uris=this.makeUriArray(e.URL),this.cleanupCipher(i),t.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.KeePassXCsvImporter=o},60788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeeperCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<6)return;this.processFolder(t,e[0]);const n=this.initLoginCipher();if(n.notes=this.getValueOrDefault(e[5])+"\n",n.name=this.getValueOrDefault(e[1],"--"),n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[4]),e.length>7)for(let t=7;t<e.length;t+=2)this.processKvp(n,e[t],e[t+1]);this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.KeeperCsvImporter=o},83277:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeeperJsonImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);return null==n||null==n.records||0===n.records.length?(t.success=!1,Promise.resolve(t)):(n.records.forEach((e=>{this.parseFolders(t,e);const n=this.initLoginCipher();if(n.name=e.title,n.login.username=e.login,n.login.password=e.password,n.login.uris=this.makeUriArray(e.login_url),n.notes=e.notes,null!=e.custom_fields){let t=Object.keys(e.custom_fields);null!=e.custom_fields["TFC:Keeper"]&&(t=t.filter((e=>"TFC:Keeper"!==e)),n.login.totp=e.custom_fields["TFC:Keeper"]),t.forEach((t=>{this.processKvp(n,t,e.custom_fields[t])}))}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}parseFolders(e,t){null!=t.folders&&0!==t.folders.length&&t.folders.forEach((t=>{null==t.folder?null==t.shared_folder||this.processFolder(e,t.shared_folder):this.processFolder(e,t.folder)}))}}t.KeeperJsonImporter=o},44360:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LastPassCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(52556),s=n(50044),l=n(92643),c=n(52450),d=n(56561),p=n(23635),u=n(94465);class m extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach(((e,n)=>{const i=t.ciphers.length;let r=t.folders.length,o=e.grouping;null!=o&&(o=o.replace(/\\/g,"/").replace(/[\x00-\x1F\x7F-\x9F]/g,""));const a="(none)"!==this.getValueOrDefault(o,"(none)");let l=a;if(a)for(let s=0;s<t.folders.length;s++)if(t.folders[s].name===o){l=!1,r=s;break}const d=this.buildBaseCipher(e);if(d.type===p.CipherType.Login)d.notes=this.getValueOrDefault(e.extra),d.login=new c.LoginView,d.login.uris=this.makeUriArray(e.url),d.login.username=this.getValueOrDefault(e.username),d.login.password=this.getValueOrDefault(e.password),d.login.totp=this.getValueOrDefault(e.totp);else if(d.type===p.CipherType.SecureNote)this.parseSecureNote(e,d);else if(d.type===p.CipherType.Card)d.card=this.parseCard(e),d.notes=this.getValueOrDefault(e.notes);else if(d.type===p.CipherType.Identity&&(d.identity=this.parseIdentity(e),d.notes=this.getValueOrDefault(e.notes),!this.isNullOrWhitespace(e.ccnum))){const n=this.buildBaseCipher(e);n.identity=null,n.type=p.CipherType.Card,n.card=this.parseCard(e),t.ciphers.push(n)}if(t.ciphers.push(d),l){const e=new s.FolderView;e.name=o,t.folders.push(e)}a&&t.folderRelationships.push([i,r])})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}buildBaseCipher(e){const t=new a.CipherView;return e.hasOwnProperty("profilename")&&e.hasOwnProperty("profilelanguage")?(t.favorite=!1,t.name=this.getValueOrDefault(e.profilename,"--"),t.type=p.CipherType.Card,this.isNullOrWhitespace(e.title)&&this.isNullOrWhitespace(e.firstname)&&this.isNullOrWhitespace(e.lastname)&&this.isNullOrWhitespace(e.address1)&&this.isNullOrWhitespace(e.phone)&&this.isNullOrWhitespace(e.username)&&this.isNullOrWhitespace(e.email)||(t.type=p.CipherType.Identity)):(t.favorite=!this.organization&&"1"===this.getValueOrDefault(e.fav,"0"),t.name=this.getValueOrDefault(e.name,"--"),t.type="http://sn"===e.url?p.CipherType.SecureNote:p.CipherType.Login),t}parseCard(e){const t=new o.CardView;if(t.cardholderName=this.getValueOrDefault(e.ccname),t.number=this.getValueOrDefault(e.ccnum),t.code=this.getValueOrDefault(e.cccsc),t.brand=this.getCardBrand(e.ccnum),!this.isNullOrWhitespace(e.ccexp)&&e.ccexp.indexOf("-")>-1){const n=e.ccexp.split("-");n.length>1&&(t.expYear=n[0],t.expMonth=n[1],2===t.expMonth.length&&"0"===t.expMonth[0]&&(t.expMonth=t.expMonth[1]))}return t}parseIdentity(e){const t=new l.IdentityView;return t.title=this.getValueOrDefault(e.title),t.firstName=this.getValueOrDefault(e.firstname),t.middleName=this.getValueOrDefault(e.middlename),t.lastName=this.getValueOrDefault(e.lastname),t.username=this.getValueOrDefault(e.username),t.company=this.getValueOrDefault(e.company),t.ssn=this.getValueOrDefault(e.ssn),t.address1=this.getValueOrDefault(e.address1),t.address2=this.getValueOrDefault(e.address2),t.address3=this.getValueOrDefault(e.address3),t.city=this.getValueOrDefault(e.city),t.state=this.getValueOrDefault(e.state),t.postalCode=this.getValueOrDefault(e.zip),t.country=this.getValueOrDefault(e.country),t.email=this.getValueOrDefault(e.email),t.phone=this.getValueOrDefault(e.phone),this.isNullOrWhitespace(t.title)||(t.title=t.title.charAt(0).toUpperCase()+t.title.slice(1)),t}parseSecureNote(e,t){const n=this.splitNewLine(e.extra);let i=!1;if(n.length){const e=n[0].split(":");if(e.length>1&&"NoteType"===e[0]&&("Credit Card"===e[1]||"Address"===e[1])){if("Credit Card"===e[1]){const e=this.parseSecureNoteMapping(t,n,{Number:"number","Name on Card":"cardholderName","Security Code":"code","Expiration Date":"expMonth"});if(this.isNullOrWhitespace(e.expMonth)||","===e.expMonth)e.expMonth=void 0;else{const[t,n]=e.expMonth.split(",");if(this.isNullOrWhitespace(t))e.expMonth=void 0;else{const n=new Date(Date.parse(t.trim()+" 1, 2012")).getMonth()+1;isNaN(n)?e.expMonth=void 0:e.expMonth=n.toString()}this.isNullOrWhitespace(n)||(e.expYear=n)}t.type=p.CipherType.Card,t.card=e}else if("Address"===e[1]){const e=this.parseSecureNoteMapping(t,n,{Title:"title","First Name":"firstName","Last Name":"lastName","Middle Name":"middleName",Company:"company","Address 1":"address1","Address 2":"address2","Address 3":"address3","City / Town":"city",State:"state","Zip / Postal Code":"postalCode",Country:"country","Email Address":"email",Username:"username"});t.type=p.CipherType.Identity,t.identity=e}i=!0}}i||(t.secureNote=new d.SecureNoteView,t.secureNote.type=u.SecureNoteType.Generic,t.notes=this.getValueOrDefault(e.extra))}parseSecureNoteMapping(e,t,n){const i={};let r=!1;return t.forEach((t=>{let o=null,a=null;if(!r){if(this.isNullOrWhitespace(t))return;const e=t.indexOf(":");if(-1===e?o=t:(o=t.substring(0,e),t.length>e&&(a=t.substring(e+1))),this.isNullOrWhitespace(o)||this.isNullOrWhitespace(a)||"NoteType"===o)return}r?e.notes+="\n"+t:"Notes"===o?(this.isNullOrWhitespace(e.notes)?e.notes=a:e.notes+="\n"+a,r=!0):n.hasOwnProperty(o)?i[n[o]]=a:this.processKvp(e,o,a)})),i}}t.LastPassCsvImporter=m},86904:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogMeOnceCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<4)return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[1]),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.LogMeOnceCsvImporter=o},49717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MeldiumCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.DisplayName,"--"),n.notes=this.getValueOrDefault(e.Notes),n.login.username=this.getValueOrDefault(e.UserName),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e.Url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.MeldiumCsvImporter=o},46037:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MSecureCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(23635),a=n(94465),s=n(56561);class l extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<3)return;const n="Unassigned"!==this.getValueOrDefault(e[0],"Unassigned")?e[0]:null;this.processFolder(t,n);const i=this.initLoginCipher();if(i.name=this.getValueOrDefault(e[2],"--"),"Web Logins"===e[1]||"Login"===e[1])i.login.uris=this.makeUriArray(e[4]),i.login.username=this.getValueOrDefault(e[5]),i.login.password=this.getValueOrDefault(e[6]),i.notes=this.isNullOrWhitespace(e[3])?null:e[3].split("\\n").join("\n");else if(e.length>3){i.type=o.CipherType.SecureNote,i.secureNote=new s.SecureNoteView,i.secureNote.type=a.SecureNoteType.Generic;for(let t=3;t<e.length;t++)this.isNullOrWhitespace(e[t])||(i.notes+=e[t]+"\n")}this.isNullOrWhitespace(e[1])||i.type===o.CipherType.Login||(i.name=e[1]+": "+i.name),this.cleanupCipher(i),t.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.MSecureCsvImporter=l},59253:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MykiCsvImporter=void 0;const i=n(30400),r=n(23635),o=n(94465),a=n(17283),s=n(92643),l=n(56561),c=n(93292);class d extends i.BaseImporter{parse(e){const t=new c.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.nickname,"--"),n.notes=this.getValueOrDefault(e.additionalInfo),void 0!==e.url)n.login.uris=this.makeUriArray(e.url),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.totp=this.getValueOrDefault(e.twoFactAuthToken);else if(void 0!==e.cardNumber)n.card=new a.CardView,n.type=r.CipherType.Card,n.card.cardholderName=this.getValueOrDefault(e.cardName),n.card.number=this.getValueOrDefault(e.cardNumber),n.card.brand=this.getCardBrand(n.card.number),n.card.expMonth=this.getValueOrDefault(e.exp_month),n.card.expYear=this.getValueOrDefault(e.exp_year),n.card.code=this.getValueOrDefault(e.cvv);else if(void 0!==e.firstName)n.identity=new s.IdentityView,n.type=r.CipherType.Identity,n.identity.title=this.getValueOrDefault(e.title),n.identity.firstName=this.getValueOrDefault(e.firstName),n.identity.middleName=this.getValueOrDefault(e.middleName),n.identity.lastName=this.getValueOrDefault(e.lastName),n.identity.phone=this.getValueOrDefault(e.number),n.identity.email=this.getValueOrDefault(e.email),n.identity.address1=this.getValueOrDefault(e.firstAddressLine),n.identity.address2=this.getValueOrDefault(e.secondAddressLine),n.identity.city=this.getValueOrDefault(e.city),n.identity.country=this.getValueOrDefault(e.country),n.identity.postalCode=this.getValueOrDefault(e.zipCode);else{if(void 0===e.content)return;n.secureNote=new l.SecureNoteView,n.type=r.CipherType.SecureNote,n.secureNote.type=o.SecureNoteType.Generic,n.name=this.getValueOrDefault(e.title,"--"),n.notes=this.getValueOrDefault(e.content)}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.MykiCsvImporter=d},45980:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NordPassCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(52556),a=n(52450),s=n(23635),l=n(94465);class c extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.evaluateType(e);if(void 0===n)return;this.organization||this.processFolder(t,e.folder);const i=new o.CipherView;switch(i.name=this.getValueOrDefault(e.name,"--"),i.notes=this.getValueOrDefault(e.note),n){case s.CipherType.Login:i.type=s.CipherType.Login,i.login=new a.LoginView,i.login.username=this.getValueOrDefault(e.username),i.login.password=this.getValueOrDefault(e.password),i.login.uris=this.makeUriArray(e.url);break;case s.CipherType.Card:i.type=s.CipherType.Card,i.card.cardholderName=this.getValueOrDefault(e.cardholdername),i.card.number=this.getValueOrDefault(e.cardnumber),i.card.code=this.getValueOrDefault(e.cvc),i.card.brand=this.getCardBrand(i.card.number),this.setCardExpiration(i,e.expirydate);break;case s.CipherType.Identity:i.type=s.CipherType.Identity,this.processName(i,this.getValueOrDefault(e.full_name)),i.identity.address1=this.getValueOrDefault(e.address1),i.identity.address2=this.getValueOrDefault(e.address2),i.identity.city=this.getValueOrDefault(e.city),i.identity.state=this.getValueOrDefault(e.state),i.identity.postalCode=this.getValueOrDefault(e.zipcode),i.identity.country=this.getValueOrDefault(e.country),null!=i.identity.country&&(i.identity.country=i.identity.country.toUpperCase()),i.identity.email=this.getValueOrDefault(e.email),i.identity.phone=this.getValueOrDefault(e.phone_number);break;case s.CipherType.SecureNote:i.type=s.CipherType.SecureNote,i.secureNote.type=l.SecureNoteType.Generic}this.cleanupCipher(i),t.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}evaluateType(e){return this.isNullOrWhitespace(e.username)?this.isNullOrWhitespace(e.cardnumber)?this.isNullOrWhitespace(e.full_name)?this.isNullOrWhitespace(e.note)?void 0:s.CipherType.SecureNote:s.CipherType.Identity:s.CipherType.Card:s.CipherType.Login}processName(e,t){if(this.isNullOrWhitespace(t))return;const n=t.split(" ");n.length>0&&(e.identity.firstName=this.getValueOrDefault(n[0])),2===n.length?e.identity.lastName=this.getValueOrDefault(n[1]):n.length>=3&&(e.identity.middleName=this.getValueOrDefault(n[1]),e.identity.lastName=n.slice(2,n.length).join(" "))}}t.NordPassCsvImporter=c},71122:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherImportContext=void 0;t.CipherImportContext=class{constructor(e,t,n){this.importRecord=e,this.property=t,this.cipher=n,this.lowerProperty=t.toLowerCase()}}},82702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePassword1PifImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(92643),s=n(27551),l=n(56561),c=n(23635),d=n(18276),p=n(94465);class u extends i.BaseImporter{constructor(){super(...arguments),this.result=new r.ImportResult}parse(e){return e.split(this.newLineRegex).forEach((e=>{if(this.isNullOrWhitespace(e)||"{"!==e[0])return;const t=JSON.parse(e);if(!0===t.trashed)return;const n=this.initLoginCipher();this.isNullOrWhitespace(t.hmac)?this.processStandardItem(t,n):this.processWinOpVaultItem(t,n),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),this.result.ciphers.push(n)})),this.result.success=!0,Promise.resolve(this.result)}processWinOpVaultItem(e,t){if(null!=e.overview&&(t.name=this.getValueOrDefault(e.overview.title),null!=e.overview.URLs)){const n=[];e.overview.URLs.forEach((e=>{this.isNullOrWhitespace(e.u)||n.push(e.u)})),t.login.uris=this.makeUriArray(n)}null!=e.details&&(null!=e.details.passwordHistory&&this.parsePasswordHistory(e.details.passwordHistory,t),this.isNullOrWhitespace(e.details.ccnum)&&this.isNullOrWhitespace(e.details.cvv)?this.isNullOrWhitespace(e.details.firstname)&&this.isNullOrWhitespace(e.details.address1)||(t.type=c.CipherType.Identity,t.identity=new a.IdentityView):(t.type=c.CipherType.Card,t.card=new o.CardView),t.type!==c.CipherType.Login||this.isNullOrWhitespace(e.details.password)||(t.login.password=e.details.password),this.isNullOrWhitespace(e.details.notesPlain)||(t.notes=e.details.notesPlain.split(this.newLineRegex).join("\n")+"\n"),null!=e.details.fields&&this.parseFields(e.details.fields,t,"designation","value","name"),null!=e.details.sections&&e.details.sections.forEach((e=>{null!=e.fields&&this.parseFields(e.fields,t,"n","v","t")})))}processStandardItem(e,t){if(t.favorite=!(!e.openContents||!e.openContents.faveIndex),t.name=this.getValueOrDefault(e.title),"securenotes.SecureNote"===e.typeName?(t.type=c.CipherType.SecureNote,t.secureNote=new l.SecureNoteView,t.secureNote.type=p.SecureNoteType.Generic):"wallet.financial.CreditCard"===e.typeName?(t.type=c.CipherType.Card,t.card=new o.CardView):"identities.Identity"===e.typeName?(t.type=c.CipherType.Identity,t.identity=new a.IdentityView):t.login.uris=this.makeUriArray(e.location),null!=e.secureContents){if(null!=e.secureContents.passwordHistory&&this.parsePasswordHistory(e.secureContents.passwordHistory,t),this.isNullOrWhitespace(e.secureContents.notesPlain)||(t.notes=e.secureContents.notesPlain.split(this.newLineRegex).join("\n")+"\n"),t.type===c.CipherType.Login&&(this.isNullOrWhitespace(e.secureContents.password)||(t.login.password=e.secureContents.password),null!=e.secureContents.URLs)){const n=[];e.secureContents.URLs.forEach((e=>{this.isNullOrWhitespace(e.url)||n.push(e.url)})),n.length>0&&(t.login.uris=this.makeUriArray(n))}null!=e.secureContents.fields&&this.parseFields(e.secureContents.fields,t,"designation","value","name"),null!=e.secureContents.sections&&e.secureContents.sections.forEach((e=>{null!=e.fields&&this.parseFields(e.fields,t,"n","v","t")}))}}parsePasswordHistory(e,t){const n=e.length>5?5:e.length;t.passwordHistory=e.filter((e=>!this.isNullOrWhitespace(e.value)&&null!=e.time)).sort(((e,t)=>t.time-e.time)).slice(0,n).map((e=>{const t=new s.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))}parseFields(e,t,n,i,r){e.forEach((e=>{if(null==e[i]||""===e[i].toString().trim())return;const o="date"===e.k?new Date(1e3*e[i]).toUTCString():e[i].toString(),a=null!=e[n]?e[n].toString():null;if(t.type===c.CipherType.Login){if(this.isNullOrWhitespace(t.login.username)&&"username"===a)return void(t.login.username=o);if(this.isNullOrWhitespace(t.login.password)&&"password"===a)return void(t.login.password=o);if(this.isNullOrWhitespace(t.login.totp)&&null!=a&&a.startsWith("TOTP_"))return void(t.login.totp=o)}else if(t.type===c.CipherType.Card){if(this.isNullOrWhitespace(t.card.number)&&"ccnum"===a)return t.card.number=o,void(t.card.brand=this.getCardBrand(o));if(this.isNullOrWhitespace(t.card.code)&&"cvv"===a)return void(t.card.code=o);if(this.isNullOrWhitespace(t.card.cardholderName)&&"cardholder"===a)return void(t.card.cardholderName=o);if(this.isNullOrWhitespace(t.card.expiration)&&"expiry"===a&&6===o.length)return t.card.expMonth=o.substr(4,2),"0"===t.card.expMonth[0]&&(t.card.expMonth=t.card.expMonth.substr(1,1)),void(t.card.expYear=o.substr(0,4));if("type"===a)return}else if(t.type===c.CipherType.Identity){const n=t.identity;if(this.isNullOrWhitespace(n.firstName)&&"firstname"===a)return void(n.firstName=o);if(this.isNullOrWhitespace(n.lastName)&&"lastname"===a)return void(n.lastName=o);if(this.isNullOrWhitespace(n.middleName)&&"initial"===a)return void(n.middleName=o);if(this.isNullOrWhitespace(n.phone)&&"defphone"===a)return void(n.phone=o);if(this.isNullOrWhitespace(n.company)&&"company"===a)return void(n.company=o);if(this.isNullOrWhitespace(n.email)&&"email"===a)return void(n.email=o);if(this.isNullOrWhitespace(n.username)&&"username"===a)return void(n.username=o);if("address"===a){const{street:t,city:r,country:o,zip:a}=e[i];return n.address1=this.getValueOrDefault(t),n.city=this.getValueOrDefault(r),this.isNullOrWhitespace(o)||(n.country=o.toUpperCase()),void(n.postalCode=this.getValueOrDefault(a))}}const s=this.isNullOrWhitespace(e[r])?"no_name":e[r];if("password"===s&&null!=t.passwordHistory&&t.passwordHistory.some((e=>e.password===o)))return;const l="concealed"===e.k?d.FieldType.Hidden:d.FieldType.Text;this.processKvp(t,s,o,l)}))}}t.OnePassword1PifImporter=u},45616:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordCsvImporter=t.IgnoredProperties=void 0;const i=n(93292),r=n(30400),o=n(23635),a=n(18276),s=n(71122);t.IgnoredProperties=["ainfo","autosubmit","notesplain","ps","scope","tags","title","uuid","notes"];class l extends r.BaseImporter{constructor(){super(...arguments),this.loginPropertyParsers=[this.setLoginUsername,this.setLoginPassword,this.setLoginUris],this.creditCardPropertyParsers=[this.setCreditCardNumber,this.setCreditCardVerification,this.setCreditCardCardholderName,this.setCreditCardExpiry],this.identityPropertyParsers=[this.setIdentityFirstName,this.setIdentityInitial,this.setIdentityLastName,this.setIdentityUserName,this.setIdentityEmail,this.setIdentityPhone,this.setIdentityCompany]}parse(e){const t=new i.ImportResult,n=this.parseCsv(e,!0,{quoteChar:'"',escapeChar:"\\"});return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(this.getProp(e,"title")))return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(this.getProp(e,"title"),"--"),this.setNotes(e,n),this.setCipherType(e,n);let i=null;for(const t in e){if(!e.hasOwnProperty(t)||this.isNullOrWhitespace(e[t]))continue;const r=new s.CipherImportContext(e,t,n);n.type===o.CipherType.Login&&this.setKnownLoginValue(r)||(n.type===o.CipherType.Card&&this.setKnownCreditCardValue(r)||n.type===o.CipherType.Identity&&this.setKnownIdentityValue(r)||(i=this.setUnknownValue(r,i)))}n.type===o.CipherType.Login&&!this.isNullOrWhitespace(i)&&this.isNullOrWhitespace(n.login.username)&&-1===i.indexOf("://")&&(n.login.username=i),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}getProp(e,t){return Object.entries(e).reduce(((e,t)=>(e[t[0].toLowerCase()]=t[1],e)),{})[t.toLowerCase()]}getPropByRegexp(e,t){const n=Object.keys(e).reduce(((e,n)=>(n.match(t)&&e.push(n),e)),[]);return 0===n.length?null:e[n[0]]}getPropIncluding(e,t){const n=Object.keys(e).reduce(((e,n)=>(n.toLowerCase().includes(t.toLowerCase())&&e.push(n),e)),[]);return 0===n.length?null:e[n[0]]}setNotes(e,t){t.notes=this.getValueOrDefault(this.getProp(e,"notesPlain"),"")+"\n"+this.getValueOrDefault(this.getProp(e,"notes"),"")+"\n",t.notes.trim()}setKnownLoginValue(e){return this.loginPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setKnownCreditCardValue(e){return this.creditCardPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setKnownIdentityValue(e){return this.identityPropertyParsers.reduce(((t,n)=>(t||(t=n.bind(this)(e)),t)),!1)}setUnknownValue(e,n){if(-1===t.IgnoredProperties.indexOf(e.lowerProperty)&&!e.lowerProperty.startsWith("section:")&&!e.lowerProperty.startsWith("section ")){if(null==n&&"email"===e.lowerProperty)return e.importRecord[e.property];if("created date"===e.lowerProperty||"modified date"===e.lowerProperty){const t=new Date(1e3*parseInt(e.importRecord[e.property],10)).toUTCString();return this.processKvp(e.cipher,"1Password "+e.property,t),null}e.lowerProperty.includes("password")||e.lowerProperty.includes("key")||e.lowerProperty.includes("secret")?this.processKvp(e.cipher,e.property,e.importRecord[e.property],a.FieldType.Hidden):this.processKvp(e.cipher,e.property,e.importRecord[e.property])}return null}setIdentityFirstName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.firstName)||!e.lowerProperty.includes("first name"))&&(e.cipher.identity.firstName=e.importRecord[e.property],!0)}setIdentityInitial(e){return!(!this.isNullOrWhitespace(e.cipher.identity.middleName)||!e.lowerProperty.includes("initial"))&&(e.cipher.identity.middleName=e.importRecord[e.property],!0)}setIdentityLastName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.lastName)||!e.lowerProperty.includes("last name"))&&(e.cipher.identity.lastName=e.importRecord[e.property],!0)}setIdentityUserName(e){return!(!this.isNullOrWhitespace(e.cipher.identity.username)||!e.lowerProperty.includes("username"))&&(e.cipher.identity.username=e.importRecord[e.property],!0)}setIdentityCompany(e){return!(!this.isNullOrWhitespace(e.cipher.identity.company)||!e.lowerProperty.includes("company"))&&(e.cipher.identity.company=e.importRecord[e.property],!0)}setIdentityPhone(e){return!(!this.isNullOrWhitespace(e.cipher.identity.phone)||!e.lowerProperty.includes("default phone"))&&(e.cipher.identity.phone=e.importRecord[e.property],!0)}setIdentityEmail(e){return!(!this.isNullOrWhitespace(e.cipher.identity.email)||!e.lowerProperty.includes("email"))&&(e.cipher.identity.email=e.importRecord[e.property],!0)}setCreditCardNumber(e){return!(!this.isNullOrWhitespace(e.cipher.card.number)||!e.lowerProperty.includes("number"))&&(e.cipher.card.number=e.importRecord[e.property],e.cipher.card.brand=this.getCardBrand(e.cipher.card.number),!0)}setCreditCardVerification(e){return!(!this.isNullOrWhitespace(e.cipher.card.code)||!e.lowerProperty.includes("verification number"))&&(e.cipher.card.code=e.importRecord[e.property],!0)}setCreditCardCardholderName(e){return!(!this.isNullOrWhitespace(e.cipher.card.cardholderName)||!e.lowerProperty.includes("cardholder name"))&&(e.cipher.card.cardholderName=e.importRecord[e.property],!0)}setCreditCardExpiry(e){return!(!this.isNullOrWhitespace(e.cipher.card.expiration)||!e.lowerProperty.includes("expiry date")||7!==e.importRecord[e.property].length)&&(e.cipher.card.expMonth=e.importRecord[e.property].substr(0,2),"0"===e.cipher.card.expMonth[0]&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=e.importRecord[e.property].substr(3,4),!0)}setLoginPassword(e){return!(!this.isNullOrWhitespace(e.cipher.login.password)||"password"!==e.lowerProperty)&&(e.cipher.login.password=e.importRecord[e.property],!0)}setLoginUsername(e){return!(!this.isNullOrWhitespace(e.cipher.login.username)||"username"!==e.lowerProperty)&&(e.cipher.login.username=e.importRecord[e.property],!0)}setLoginUris(e){if((null==e.cipher.login.uris||0===e.cipher.login.uris.length)&&"urls"===e.lowerProperty){const t=e.importRecord[e.property].split(this.newLineRegex);return e.cipher.login.uris=this.makeUriArray(t),!0}return"url"===e.lowerProperty&&(null==e.cipher.login.uris&&(e.cipher.login.uris=[]),e.cipher.login.uris.concat(this.makeUriArray(e.importRecord[e.property])),!0)}}t.OnePasswordCsvImporter=l},7965:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordMacCsvImporter=void 0;const i=n(45616),r=n(23635),o=n(17283),a=n(92643);class s extends i.OnePasswordCsvImporter{setCipherType(e,t){switch(this.getValueOrDefault(this.getProp(e,"type"),"Login")){case"Credit Card":t.type=r.CipherType.Card,t.card=new o.CardView,i.IgnoredProperties.push("type");break;case"Identity":t.type=r.CipherType.Identity,t.identity=new a.IdentityView,i.IgnoredProperties.push("type");break;case"Login":case"Secure Note":i.IgnoredProperties.push("type")}}}t.OnePasswordMacCsvImporter=s},7620:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordWinCsvImporter=void 0;const i=n(45616),r=n(23635),o=n(17283),a=n(92643),s=n(52450);class l extends i.OnePasswordCsvImporter{constructor(){super(),this.identityPropertyParsers.push(this.setIdentityAddress)}setCipherType(e,t){t.type=r.CipherType.Login,t.login=new s.LoginView,this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: number/i))||this.isNullOrWhitespace(this.getPropByRegexp(e,/\d+: expiry date/i))||(t.type=r.CipherType.Card,t.card=new o.CardView),this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: first name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: initial/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/name \d+: last name/i))&&this.isNullOrWhitespace(this.getPropByRegexp(e,/internet \d+: email/i))||(t.type=r.CipherType.Identity,t.identity=new a.IdentityView)}setIdentityAddress(e){return!!e.lowerProperty.match(/address \d+: address/i)&&(this.processKvp(e.cipher,"address",e.importRecord[e.property]),!0)}setCreditCardExpiry(e){if(this.isNullOrWhitespace(e.cipher.card.expiration)&&e.lowerProperty.includes("expiry date")){const t=e.importRecord[e.property].split("/");return e.cipher.card.expMonth=t[0],"0"===e.cipher.card.expMonth[0]&&2===e.cipher.card.expMonth.length&&(e.cipher.card.expMonth=e.cipher.card.expMonth.substr(1,1)),e.cipher.card.expYear=t[2].length>4?t[2].substr(0,4):t[2],!0}return!1}}t.OnePasswordWinCsvImporter=l},40355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PadlockCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(82186);class a extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let i=null;return n.forEach((e=>{if(null==i)return void(i=e.map((e=>e)));if(e.length<2||e.length!==i.length)return;if(!this.isNullOrWhitespace(e[1]))if(this.organization){e[1].split(",").forEach((e=>{e=e.trim();let n=!0,i=t.collections.length;for(let r=0;r<t.collections.length;r++)if(t.collections[r].name===e){n=!1,i=r;break}if(n){const n=new o.CollectionView;n.name=e,t.collections.push(n)}t.collectionRelationships.push([t.ciphers.length,i])}))}else{const n=e[1].split(","),i=n.length>0?n[0].trim():null;this.processFolder(t,i)}const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--");for(let t=2;t<e.length;t++){const r=i[t].trim().toLowerCase();this.isNullOrWhitespace(e[t])||this.isNullOrWhitespace(r)||(this.usernameFieldNames.indexOf(r)>-1?n.login.username=e[t]:this.passwordFieldNames.indexOf(r)>-1?n.login.password=e[t]:this.uriFieldNames.indexOf(r)>-1?n.login.uris=this.makeUriArray(e[t]):this.processKvp(n,i[t],e[t]))}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t)}}t.PadlockCsvImporter=a},17680:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PassKeepCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{this.processFolder(t,this.getValue("category",e));const n=this.initLoginCipher();n.notes=this.getValue("description",e),n.name=this.getValueOrDefault(this.getValue("title",e),"--"),n.login.username=this.getValue("username",e),n.login.password=this.getValue("password",e),n.login.uris=this.makeUriArray(this.getValue("site",e)),this.processKvp(n,"Password 2",this.getValue("password2",e)),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}getValue(e,t){return this.getValueOrDefault(t[e],this.getValueOrDefault(t[" "+e]))}}t.PassKeepCsvImporter=o},68112:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PassmanJsonImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);return null==n||0===n.length?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(null!=e.tags&&e.tags.length>0){const n=e.tags[0].text;this.processFolder(t,n)}const n=this.initLoginCipher();n.name=e.label,n.login.username=this.getValueOrDefault(e.username),this.isNullOrWhitespace(n.login.username)?n.login.username=this.getValueOrDefault(e.email):this.isNullOrWhitespace(e.email)||(n.notes="Email: "+e.email+"\n"),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),n.notes+=this.getValueOrDefault(e.description,""),null!=e.otp&&(n.login.totp=this.getValueOrDefault(e.otp.secret)),null!=e.custom_fields&&e.custom_fields.forEach((e=>{switch(e.field_type){case"text":case"password":this.processKvp(n,e.label,e.value)}})),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.PassmanJsonImporter=o},15688:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasspackCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(82186);class a extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.isNullOrWhitespace(e.Tags)?null:JSON.parse(e.Tags),i=null!=n&&null!=n.tags&&n.tags.length>0?n.tags.map((e=>{try{const t=JSON.parse(e);return this.getValueOrDefault(t.tag)}catch(t){}return null})).filter((e=>!this.isNullOrWhitespace(e))):null;this.organization&&null!=i&&i.length>0?i.forEach((e=>{let n=!0,i=t.collections.length;for(let r=0;r<t.collections.length;r++)if(t.collections[r].name===e){n=!1,i=r;break}if(n){const n=new o.CollectionView;n.name=e,t.collections.push(n)}t.collectionRelationships.push([t.ciphers.length,i])})):!this.organization&&null!=i&&i.length>0&&this.processFolder(t,i[0]);const r=this.initLoginCipher();r.notes=this.getValueOrDefault(e.Notes,""),r.notes+="\n\n"+this.getValueOrDefault(e["Shared Notes"],"")+"\n",r.name=this.getValueOrDefault(e["Entry Name"],"--"),r.login.username=this.getValueOrDefault(e["User ID"]),r.login.password=this.getValueOrDefault(e.Password),r.login.uris=this.makeUriArray(e.URL),null!=e.__parsed_extra&&e.__parsed_extra.length>0&&e.__parsed_extra.forEach((e=>{this.isNullOrWhitespace(e)||(r.notes+="\n"+e)}));const a=this.isNullOrWhitespace(e["Extra Fields"])?null:JSON.parse(e["Extra Fields"]),s=null!=a&&null!=a.extraFields&&a.extraFields.length>0?a.extraFields.map((e=>{try{return JSON.parse(e)}catch(t){}return null})):null;null!=s&&s.forEach((e=>{null!=e&&this.processKvp(r,e.name,e.data)})),this.cleanupCipher(r),t.ciphers.push(r)})),t.success=!0,Promise.resolve(t))}}t.PasspackCsvImporter=a},58849:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordAgentCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);if(null==n)return t.success=!1,Promise.resolve(t);let i=!0;return n.forEach((e=>{if(5!==e.length&&e.length<9)return;const n=10===e.length&&"0"===e[0],r=this.initLoginCipher();if(r.name=this.getValueOrDefault(e[n?1:0],"--"),r.login.username=this.getValueOrDefault(e[n?2:1]),r.login.password=this.getValueOrDefault(e[n?3:2]),5===e.length)i=!1,r.notes=this.getValueOrDefault(e[4]),r.login.uris=this.makeUriArray(e[3]);else{const i=this.getValueOrDefault(e[n?9:8],"(None)");let o="(None)"!==i?i.split("\\").join("/"):null;null!=o&&(o=i.split(" > ").join("/"),o=i.split(">").join("/")),this.processFolder(t,o),r.notes=this.getValueOrDefault(e[n?5:3]),r.login.uris=this.makeUriArray(e[4])}this.convertToNoteIfNeeded(r),this.cleanupCipher(r),t.ciphers.push(r)})),i&&this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordAgentCsvImporter=o},14598:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordBossJsonImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(50044),s=n(23635);class l extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=JSON.parse(e);if(null==n||null==n.items)return t.success=!1,Promise.resolve(t);const i=new Map;n.folders.forEach((e=>{i.set(e.id,e.name)}));const l=new Map;return i.forEach(((e,n)=>{l.set(n,t.folders.length);const i=new a.FolderView;i.name=e,t.folders.push(i)})),n.items.forEach((e=>{const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.name,"--"),n.login.uris=this.makeUriArray(e.login_url),null!=e.folder&&l.has(e.folder)&&t.folderRelationships.push([t.ciphers.length,l.get(e.folder)]),null!=e.identifiers){this.isNullOrWhitespace(e.identifiers.notes)||(n.notes=e.identifiers.notes.split("\\r\\n").join("\n").split("\\n").join("\n")),"CreditCard"===e.type&&(n.card=new o.CardView,n.type=s.CipherType.Card);for(const t in e.identifiers){if(!e.identifiers.hasOwnProperty(t))continue;const r=e.identifiers[t],o=null!=r?r.toString():null;if(!this.isNullOrWhitespace(o)&&"notes"!==t&&"ignoreItemInSecurityScore"!==t)if("custom_fields"!==t){if(n.type===s.CipherType.Card){if("cardNumber"===t){n.card.number=o,n.card.brand=this.getCardBrand(o);continue}if("nameOnCard"===t){n.card.cardholderName=o;continue}if("security_code"===t){n.card.code=o;continue}if("expires"===t){try{const e=new Date(o);n.card.expYear=e.getFullYear().toString(),n.card.expMonth=(e.getMonth()+1).toString()}catch(i){}continue}if("cardType"===t)continue}else{if(("username"===t||"email"===t)&&this.isNullOrWhitespace(n.login.username)){n.login.username=o;continue}if("password"===t){n.login.password=o;continue}if("totp"===t){n.login.totp=o;continue}if((null==n.login.uris||0===n.login.uris.length)&&this.uriFieldNames.indexOf(t)>-1){n.login.uris=this.makeUriArray(o);continue}}this.processKvp(n,t,o)}else r.forEach((e=>{this.processKvp(n,e.name,e.value)}))}this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)}})),t.success=!0,Promise.resolve(t)}}t.PasswordBossJsonImporter=l},16089:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordDragonXmlImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const i=n.querySelectorAll("PasswordManager > record");return Array.from(i).forEach((e=>{const n=this.querySelectorDirectChild(e,"Category"),i=null==n||this.isNullOrWhitespace(n.textContent)||"Unfiled"===n.textContent?null:n.textContent;this.processFolder(t,i);const r=this.querySelectorDirectChild(e,"Account-Name"),o=this.querySelectorDirectChild(e,"User-Id"),a=this.querySelectorDirectChild(e,"Password"),s=this.querySelectorDirectChild(e,"URL"),l=this.querySelectorDirectChild(e,"Notes"),c=this.initLoginCipher();c.name=null!=r?this.getValueOrDefault(r.textContent,"--"):"--",c.notes=null!=l?this.getValueOrDefault(l.textContent):"",c.login.username=null!=o?this.getValueOrDefault(o.textContent):null,c.login.password=null!=a?this.getValueOrDefault(a.textContent):null,c.login.uris=null!=s?this.makeUriArray(s.textContent):null;const d=[];for(let t=1;t<=10;t++)d.push("Attribute-"+t);this.querySelectorAllDirectChild(e,d.join(",")).forEach((e=>{this.isNullOrWhitespace(e.textContent)||"null"===e.textContent||this.processKvp(c,e.tagName,e.textContent)})),this.cleanupCipher(c),t.ciphers.push(c)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordDragonXmlImporter=o},63638:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordSafeXmlImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const i=n.querySelector("passwordsafe");if(null==i)return t.errorMessage="Missing `passwordsafe` node.",t.success=!1,Promise.resolve(t);const o=i.getAttribute("delimiter"),a=n.querySelectorAll("passwordsafe > entry");return Array.from(a).forEach((e=>{const n=this.querySelectorDirectChild(e,"group"),i=null==n||this.isNullOrWhitespace(n.textContent)?null:n.textContent.split(".").join("/");this.processFolder(t,i);const r=this.querySelectorDirectChild(e,"title"),a=this.querySelectorDirectChild(e,"username"),s=this.querySelectorDirectChild(e,"email"),l=this.querySelectorDirectChild(e,"password"),c=this.querySelectorDirectChild(e,"url"),d=this.querySelectorDirectChild(e,"notes"),p=this.initLoginCipher();p.name=null!=r?this.getValueOrDefault(r.textContent,"--"):"--",p.notes=null!=d?this.getValueOrDefault(d.textContent,"").split(o).join("\n"):null,p.login.username=null!=a?this.getValueOrDefault(a.textContent):null,p.login.password=null!=l?this.getValueOrDefault(l.textContent):null,p.login.uris=null!=c?this.makeUriArray(c.textContent):null,this.isNullOrWhitespace(p.login.username)&&null!=s?p.login.username=this.getValueOrDefault(s.textContent):null==s||this.isNullOrWhitespace(s.textContent)||(p.notes=this.isNullOrWhitespace(p.notes)?"Email: "+s.textContent:p.notes+"\nEmail: "+s.textContent),this.cleanupCipher(p),t.ciphers.push(p)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.PasswordSafeXmlImporter=o},44713:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordWalletTxtImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<1)return;e.length>5&&this.processFolder(t,e[5]);const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),e.length>4&&(n.notes=this.getValueOrDefault(e[4],"").split("¬").join("\n")),e.length>2&&(n.login.username=this.getValueOrDefault(e[2])),e.length>3&&(n.login.password=this.getValueOrDefault(e[3])),e.length>1&&(n.login.uris=this.makeUriArray(e[1])),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}}t.PasswordWalletTxtImporter=o},90400:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RememBearCsvImporter=void 0;const i=n(30400),r=n(23635),o=n(93292),a=n(17283);class s extends i.BaseImporter{parse(e){const t=new o.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if("true"===e.trash)return;const n=this.initLoginCipher();if(n.name=this.getValueOrDefault(e.name),n.notes=this.getValueOrDefault(e.notes),"LoginItem"===e.type)n.login.uris=this.makeUriArray(e.website),n.login.password=this.getValueOrDefault(e.password),n.login.username=this.getValueOrDefault(e.username);else if("CreditCardItem"===e.type){n.type=r.CipherType.Card,n.card=new a.CardView,n.card.cardholderName=this.getValueOrDefault(e.cardholder),n.card.number=this.getValueOrDefault(e.number),n.card.brand=this.getCardBrand(n.card.number),n.card.code=this.getValueOrDefault(e.verification);try{const t=this.getValueOrDefault(e.expiryMonth);if(null!=t){const e=parseInt(t,null);null!=e&&e>=1&&e<=12&&(n.card.expMonth=e.toString())}}catch(i){}try{const t=this.getValueOrDefault(e.expiryYear);if(null!=t){const e=parseInt(t,null);null!=e&&(n.card.expYear=e.toString())}}catch(o){}const t=this.getValueOrDefault(e.pin);null!=t&&this.processKvp(n,"PIN",t);const s=this.getValueOrDefault(e.zipCode);null!=s&&this.processKvp(n,"Zip Code",s)}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.RememBearCsvImporter=s},45355:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RoboFormCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);if(null==n)return t.success=!1,Promise.resolve(t);let i=1;return n.forEach((e=>{const r=!this.isNullOrWhitespace(e.Folder)&&e.Folder.startsWith("/")?e.Folder.replace("/",""):e.Folder,o=this.isNullOrWhitespace(r)?null:r;this.processFolder(t,o);const a=this.initLoginCipher();if(a.notes=this.getValueOrDefault(e.Note),a.name=this.getValueOrDefault(e.Name,"--"),a.login.username=this.getValueOrDefault(e.Login),a.login.password=this.getValueOrDefault(e.Pwd),a.login.uris=this.makeUriArray(e.Url),!this.isNullOrWhitespace(e.Rf_fields)){let t=[e.Rf_fields];null!=e.__parsed_extra&&e.__parsed_extra.length>0&&(t=t.concat(e.__parsed_extra)),t.forEach((e=>{const t=e.split(":");if(t.length<3)return;const n="-no-name-"===t[0]?null:t[0],i=4===t.length&&"rck"===t[2]?t[1]:t[2];this.processKvp(a,n,i)}))}this.convertToNoteIfNeeded(a),this.cleanupCipher(a),i===n.length&&"--"===a.name&&this.isNullOrWhitespace(a.login.password)||(t.ciphers.push(a),i++)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}}t.RoboFormCsvImporter=o},44058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafariCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Title,"--"),n.login.username=this.getValueOrDefault(e.Username),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e.Url),n.login.totp=this.getValueOrDefault(e.OTPAuth),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.SafariCsvImporter=o},42237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SafeInCloudXmlImporter=void 0;const i=n(30400),r=n(93292),o=n(50044),a=n(56561),s=n(23635),l=n(94465),c=n(18276);class d extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);if(null==n.querySelector("database"))return t.errorMessage="Missing `database` node.",t.success=!1,Promise.resolve(t);const i=new Map;return Array.from(n.querySelectorAll("database > label")).forEach((e=>{const n=e.getAttribute("name"),r=e.getAttribute("id");if(!this.isNullOrWhitespace(n)&&!this.isNullOrWhitespace(r)){i.set(r,t.folders.length);const e=new o.FolderView;e.name=n,t.folders.push(e)}})),Array.from(n.querySelectorAll("database > card")).forEach((e=>{if("true"===e.getAttribute("template")||"true"===e.getAttribute("deleted"))return;const n=this.querySelectorDirectChild(e,"label_id");if(null!=n){const e=n.textContent;!this.isNullOrWhitespace(e)&&i.has(e)&&t.folderRelationships.push([t.ciphers.length,i.get(e)])}const r=this.initLoginCipher();r.name=this.getValueOrDefault(e.getAttribute("title"),"--"),"true"===e.getAttribute("star")&&(r.favorite=!0);"note"===e.getAttribute("type")?(r.type=s.CipherType.SecureNote,r.secureNote=new a.SecureNoteView,r.secureNote.type=l.SecureNoteType.Generic):Array.from(this.querySelectorAllDirectChild(e,"field")).forEach((e=>{const t=e.textContent;if(this.isNullOrWhitespace(t))return;const n=e.getAttribute("name"),i=this.getValueOrDefault(e.getAttribute("type"),"").toLowerCase();"login"===i?r.login.username=t:"password"===i||"secret"===i?this.processKvp(r,n,t,c.FieldType.Hidden):"one_time_password"===i?r.login.totp=t:"notes"===i?r.notes+=t+"\n":"weblogin"===i||"website"===i?r.login.uris=this.makeUriArray(t):this.processKvp(r,n,t)})),Array.from(this.querySelectorAllDirectChild(e,"notes")).forEach((e=>{r.notes+=e.textContent+"\n"})),this.setPassword(r),this.cleanupCipher(r),t.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}setPassword(e){const t=e.fields.filter((e=>e.type===c.FieldType.Hidden));if(!t.length)return;let n;for(const i of t)if(this.passwordFieldNames.includes(i.name.toLowerCase())){n=i,e.fields=e.fields.filter((e=>e!==n));break}n||(n=t[0]),e.login.password=n.value}}t.SafeInCloudXmlImporter=d},77559:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SaferPassCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(this.nameFromUrl(e.url),"--"),n.notes=this.getValueOrDefault(e.notes),n.login.username=this.getValueOrDefault(e.username),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.SaferPassCsvImporter=o},29278:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureSafeCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Title),n.notes=this.getValueOrDefault(e.Comment),n.login.uris=this.makeUriArray(e.Url),n.login.password=this.getValueOrDefault(e.Password),n.login.username=this.getValueOrDefault(e.Username),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.SecureSafeCsvImporter=o},73717:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SplashIdCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(e.length<3)return;this.processFolder(t,this.getValueOrDefault(e[e.length-1]));const n=this.initLoginCipher();n.notes=this.getValueOrDefault(e[e.length-2],""),n.name=this.getValueOrDefault(e[1],"--"),"Web Logins"===e[0]||"Servers"===e[0]||"Email Accounts"===e[0]?(n.login.username=this.getValueOrDefault(e[2]),n.login.password=this.getValueOrDefault(e[3]),n.login.uris=this.makeUriArray(e[4]),this.parseFieldsToNotes(n,5,e)):this.parseFieldsToNotes(n,2,e),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}parseFieldsToNotes(e,t,n){for(let i=t;i<n.length-3;i++)this.isNullOrWhitespace(n[i])||(e.notes+=n[i]+"\n")}}t.SplashIdCsvImporter=o},74460:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StickyPasswordXmlImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseXml(e);if(null==n)return t.success=!1,Promise.resolve(t);const i=n.querySelectorAll("root > Database > Logins > Login");return Array.from(i).forEach((e=>{const i=e.getAttribute("ID");if(this.isNullOrWhitespace(i))return;const r=e.getAttribute("Name"),o=e.getAttribute("Password");let a=null,s=null,l=null,c=null,d=null;const p=n.querySelector('root > Database > Accounts > Account > LoginLinks > Login[SourceLoginID="'+i+'"]');if(null!=p){const e=p.parentElement.parentElement;null!=e&&(a=e.getAttribute("Name"),s=e.getAttribute("Link"),c=e.getAttribute("ParentID"),l=e.getAttribute("Comments"),this.isNullOrWhitespace(l)||(l=l.split("/n").join("\n")))}this.isNullOrWhitespace(c)||(d=this.buildGroupText(n,c,""),this.processFolder(t,d));const u=this.initLoginCipher();u.name=this.getValueOrDefault(a,"--"),u.notes=this.getValueOrDefault(l),u.login.username=this.getValueOrDefault(r),u.login.password=this.getValueOrDefault(o),u.login.uris=this.makeUriArray(s),this.cleanupCipher(u),t.ciphers.push(u)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t)}buildGroupText(e,t,n){const i=e.querySelector('root > Database > Groups > Group[ID="'+t+'"]');return null==i?n:(this.isNullOrWhitespace(n)||(n="/"+n),n=i.getAttribute("Name")+n,this.buildGroupText(e,i.getAttribute("ParentID"),n))}}t.StickyPasswordXmlImporter=o},61799:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrueKeyCsvImporter=void 0;const i=n(30400),r=n(93292),o=n(17283),a=n(56561),s=n(23635),l=n(94465),c=["kind","autologin","favorite","hexcolor","protectedwithpassword","subdomainonly","type","tk_export_version","note","title","document_content"];class d extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();if(n.favorite="true"===this.getValueOrDefault(e.favorite,"").toLowerCase(),n.name=this.getValueOrDefault(e.name,"--"),n.notes=this.getValueOrDefault(e.memo,""),n.login.username=this.getValueOrDefault(e.login),n.login.password=this.getValueOrDefault(e.password),n.login.uris=this.makeUriArray(e.url),"login"!==e.kind&&(n.name=this.getValueOrDefault(e.title,"--"),n.notes=this.getValueOrDefault(e.note,"")),"cc"===e.kind){if(n.type=s.CipherType.Card,n.card=new o.CardView,n.card.cardholderName=this.getValueOrDefault(e.cardholder),n.card.number=this.getValueOrDefault(e.number),n.card.brand=this.getCardBrand(n.card.number),!this.isNullOrWhitespace(e.expiryDate))try{const t=new Date(e.expiryDate);n.card.expYear=t.getFullYear().toString(),n.card.expMonth=(t.getMonth()+1).toString()}catch(i){}}else if("login"!==e.kind){n.type=s.CipherType.SecureNote,n.secureNote=new a.SecureNoteView,n.secureNote.type=l.SecureNoteType.Generic,this.isNullOrWhitespace(n.notes)||(n.notes=this.getValueOrDefault(e.document_content,""));for(const t in e)e.hasOwnProperty(t)&&c.indexOf(t.toLowerCase())<0&&!this.isNullOrWhitespace(e[t])&&this.processKvp(n,t,e[t])}this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.TrueKeyCsvImporter=d},42489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpmCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!1);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(5!==e.length)return;const n=this.initLoginCipher();n.name=this.getValueOrDefault(e[0],"--"),n.notes=this.getValueOrDefault(e[4]),n.login.username=this.getValueOrDefault(e[1]),n.login.password=this.getValueOrDefault(e[2]),n.login.uris=this.makeUriArray(e[3]),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.UpmCsvImporter=o},92154:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.YotiCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{const n=this.initLoginCipher();n.name=this.getValueOrDefault(e.Name,"--"),n.login.username=this.getValueOrDefault(e["User name"]),n.login.password=this.getValueOrDefault(e.Password),n.login.uris=this.makeUriArray(e.URL),this.cleanupCipher(n),t.ciphers.push(n)})),t.success=!0,Promise.resolve(t))}}t.YotiCsvImporter=o},37032:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZohoVaultCsvImporter=void 0;const i=n(30400),r=n(93292);class o extends i.BaseImporter{parse(e){const t=new r.ImportResult,n=this.parseCsv(e,!0);return null==n?(t.success=!1,Promise.resolve(t)):(n.forEach((e=>{if(this.isNullOrWhitespace(e["Password Name"])&&this.isNullOrWhitespace(e["Secret Name"]))return;this.processFolder(t,this.getValueOrDefault(e.ChamberName));const n=this.initLoginCipher();n.favorite="1"===this.getValueOrDefault(e.Favorite,"0"),n.notes=this.getValueOrDefault(e.Notes),n.name=this.getValueOrDefault(e["Password Name"],this.getValueOrDefault(e["Secret Name"],"--")),n.login.uris=this.makeUriArray(this.getValueOrDefault(e["Password URL"],this.getValueOrDefault(e["Secret URL"]))),this.parseData(n,e.SecretData),this.parseData(n,e.CustomData),this.convertToNoteIfNeeded(n),this.cleanupCipher(n),t.ciphers.push(n)})),this.organization&&this.moveFoldersToCollections(t),t.success=!0,Promise.resolve(t))}parseData(e,t){if(this.isNullOrWhitespace(t))return;this.splitNewLine(t).forEach((t=>{const n=t.indexOf(":");if(n<0)return;const i=t.substring(0,n),r=t.length>n?t.substring(n+1):null;if(this.isNullOrWhitespace(i)||this.isNullOrWhitespace(r)||"SecretType"===i)return;const o=i.toLowerCase();null==e.login.username&&this.usernameFieldNames.indexOf(o)>-1?e.login.username=r:null==e.login.password&&this.passwordFieldNames.indexOf(o)>-1?e.login.password=r:this.processKvp(e,i,r)}))}}t.ZohoVaultCsvImporter=o},14287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CaptchaIFrame=void 0;const i=n(70560);class r extends i.IFrameComponent{constructor(e,t,n,i,r,o){super(e,t,"captcha-connector.html","hcaptcha_iframe",i,r,(e=>{const t=JSON.parse(e);"string"!=typeof t?(this.iframe.height=t.height.toString(),this.iframe.width=t.width.toString()):o(t)})),this.i18nService=n}init(e){super.initComponent(this.createParams({siteKey:e,locale:this.i18nService.translationLocale},1))}}t.CaptchaIFrame=r},70560:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IFrameComponent=void 0;t.IFrameComponent=class{constructor(e,t,n,i,r,o,a){this.win=e,this.webVaultUrl=t,this.path=n,this.iframeId=i,this.successCallback=r,this.errorCallback=o,this.infoCallback=a,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}stop(){this.sendMessage("stop")}start(){this.sendMessage("start")}sendMessage(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)}base64Encode(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode("0x"+t))))}cleanup(){this.win.removeEventListener("message",this.parseFunction,!1)}createParams(e,t){return new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),v:t.toString()})}initComponent(e){this.connectorLink.href=`${this.webVaultUrl}/${this.path}?${e}`,this.iframe=this.win.document.getElementById(this.iframeId),this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1)}parseMessage(e){if(!this.validMessage(e))return;const t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}validMessage(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))}}},99413:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.linkedFieldOption=t.LinkedMetadata=void 0;class n{constructor(e,t){this.propertyKey=e,this._i18nKey=t}get i18nKey(){var e;return null!==(e=this._i18nKey)&&void 0!==e?e:this.propertyKey}}t.LinkedMetadata=n,t.linkedFieldOption=function(e,t){return(i,r)=>{null==i.linkedFieldOptions&&(i.linkedFieldOptions=new Map),i.linkedFieldOptions.set(e,new n(r,t))}}},70223:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequentialize=void 0,t.sequentialize=function(e){return(t,n,i)=>{const r=i.value,o=new Map;return{value:function(...t){const n=(e=>{let t=o.get(e);return null!=t||(t=new Map,o.set(e,t)),t})(this),i=e(t);let a=n.get(i);if(null!=a)return a;const s=()=>{n.delete(i),0===n.size&&o.delete(this)};return a=r.apply(this,t).then((e=>(s(),e))).catch((e=>{throw s(),e})),n.set(i,a),a}}}}},26019:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServiceUtils=void 0;const i=n(96836);class r{static nestedTraverse(e,t,n,o,a,s){if(n.length<=t)return;const l=t===n.length-1,c=n[t];for(let d=0;d<e.length;d++)if(e[d].node.name===n[t])return l&&e[d].node.id!==o.id?void e.push(new i.TreeNode(o,c,a)):void r.nestedTraverse(e[d].children,t+1,n,o,e[d].node,s);if(0===e.filter((e=>e.node.name===c)).length){if(l)return void e.push(new i.TreeNode(o,c,a));const d=n[t]+s+n[t+1];r.nestedTraverse(e,0,[d,...n.slice(t+2)],o,a,s)}}static getTreeNodeObject(e,t){for(let n=0;n<e.length;n++){if(e[n].node.id===t)return e[n];if(null!=e[n].children){const i=r.getTreeNodeObject(e[n].children,t);if(null!==i)return i}}return null}}t.ServiceUtils=r},67654:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0,t.throttle=function(e,t){return(n,i,r)=>{const o=r.value,a=new Map;return{value:function(...n){const i=(e=>{let t=a.get(e);return null!=t||(t=new Map,a.set(e,t)),t})(this),r=t(n);let s=i.get(r);return null==s&&(s=[],i.set(r,s)),new Promise(((t,l)=>{const c=()=>{const d=()=>{s.splice(s.indexOf(c),1),s.length>=e?s[e-1]():0===s.length&&(i.delete(r),0===i.size&&a.delete(this))};o.apply(this,n).then((e=>(d(),e))).catch((e=>{throw d(),e})).then(t,l)};s.push(c),s.length<=e&&c()}))}}}}},27760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValid=t.getDomain=void 0,t.getDomain=function(e){return null},t.isValid=function(e){return!0}},70829:(e,t,n)=>{"use strict";var i=n(34155);Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;const r=n(27760),o="undefined"==typeof window?n(8575):null;class a{static init(){a.inited||(a.inited=!0,a.isNode=void 0!==i&&null!=i.release&&"node"===i.release.name,a.isBrowser="undefined"!=typeof window,a.isMobileBrowser=a.isBrowser&&this.isMobile(window),a.isAppleMobileBrowser=a.isBrowser&&this.isAppleMobile(window),a.global=a.isNode&&!a.isBrowser?n.g:window)}static fromB64ToArray(e){if(a.isNode)return new Uint8Array(Buffer.from(e,"base64"));{const t=window.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}}static fromUrlB64ToArray(e){return a.fromB64ToArray(a.fromUrlB64ToB64(e))}static fromHexToArray(e){if(a.isNode)return new Uint8Array(Buffer.from(e,"hex"));{const t=new Uint8Array(e.length/2);for(let n=0;n<e.length;n+=2)t[n/2]=parseInt(e.substr(n,2),16);return t}}static fromUtf8ToArray(e){if(a.isNode)return new Uint8Array(Buffer.from(e,"utf8"));{const t=unescape(encodeURIComponent(e)),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}}static fromByteStringToArray(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}static fromBufferToB64(e){if(a.isNode)return Buffer.from(e).toString("base64");{let t="";const n=new Uint8Array(e);for(let e=0;e<n.byteLength;e++)t+=String.fromCharCode(n[e]);return window.btoa(t)}}static fromBufferToUrlB64(e){return a.fromB64toUrlB64(a.fromBufferToB64(e))}static fromB64toUrlB64(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}static fromBufferToUtf8(e){if(a.isNode)return Buffer.from(e).toString("utf8");{const t=new Uint8Array(e),n=String.fromCharCode.apply(null,t);return decodeURIComponent(escape(n))}}static fromBufferToByteString(e){return String.fromCharCode.apply(null,new Uint8Array(e))}static fromBufferToHex(e){if(a.isNode)return Buffer.from(e).toString("hex");{const t=new Uint8Array(e);return Array.prototype.map.call(t,(e=>("00"+e.toString(16)).slice(-2))).join("")}}static fromUrlB64ToB64(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("Illegal base64url string!")}return t}static fromUrlB64ToUtf8(e){return a.fromB64ToUtf8(a.fromUrlB64ToB64(e))}static fromUtf8ToB64(e){return a.isNode?Buffer.from(e,"utf8").toString("base64"):decodeURIComponent(escape(window.btoa(e)))}static fromUtf8ToUrlB64(e){return a.fromBufferToUrlB64(a.fromUtf8ToArray(e))}static fromB64ToUtf8(e){return a.isNode?Buffer.from(e,"base64").toString("utf8"):decodeURIComponent(escape(window.atob(e)))}static newGuid(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}static isGuid(e){return RegExp(/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,"i").test(e)}static getHostname(e){const t=a.getUrl(e);try{return null!=t&&""!==t.hostname?t.hostname:null}catch(n){return null}}static getHost(e){const t=a.getUrl(e);try{return null!=t&&""!==t.host?t.host:null}catch(n){return null}}static getDomain(e){if(null==e)return null;if(""===(e=e.trim()))return null;if(e.startsWith("data:"))return null;let t=e.startsWith("http://")||e.startsWith("https://");if(!t&&e.indexOf("://")<0&&a.tldEndingRegex.test(e)&&e.indexOf("@")<0&&(e="http://"+e,t=!0),t)try{const t=a.getUrlObject(e);if(!(null==(null==r?void 0:r.isValid)||r.isValid(t.hostname)))return null;if("localhost"===t.hostname||a.validIpAddress(t.hostname))return t.hostname;const n=null!=r&&null!=r.getDomain?r.getDomain(t.hostname):null;return null!=n?n:t.hostname}catch(n){}try{const t=null!=r&&null!=r.getDomain?r.getDomain(e):null;if(null!=t)return t}catch(i){return null}return null}static getQueryParams(e){const t=a.getUrl(e);if(null==t||null==t.search||""===t.search)return null;const n=new Map;return("?"===t.search[0]?t.search.substr(1):t.search).split("&").forEach((e=>{const t=e.split("=");t.length<1||n.set(decodeURIComponent(t[0]).toLowerCase(),null==t[1]?"":decodeURIComponent(t[1]))})),n}static getSortFunction(e,t){return(n,i)=>null==n[t]&&null!=i[t]?-1:null!=n[t]&&null==i[t]?1:null==n[t]&&null==i[t]?0:e.collator?e.collator.compare(n[t],i[t]):n[t].localeCompare(i[t])}static isNullOrWhitespace(e){return null==e||"string"!=typeof e||""===e.trim()}static nameOf(e){return e}static assign(e,t){return Object.assign(e,t)}static iterateEnum(e){return Object.keys(e).filter((e=>Number.isNaN(+e))).map((t=>e[t]))}static getUrl(e){if(null==e)return null;if(""===(e=e.trim()))return null;let t=a.getUrlObject(e);if(null==t){!(0===e.indexOf("http://")||0===e.indexOf("https://"))&&e.indexOf(".")>-1&&(t=a.getUrlObject("http://"+e))}return t}static camelToPascalCase(e){return e.charAt(0).toUpperCase()+e.slice(1)}static validIpAddress(e){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(e)}static isMobile(e){let t=!1;var n;return n=e.navigator.userAgent||e.navigator.vendor||e.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(n)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(n.substr(0,4)))&&(t=!0),t||null!=e.navigator.userAgent.match(/iPad/i)}static isAppleMobile(e){return null!=e.navigator.userAgent.match(/iPhone/i)||null!=e.navigator.userAgent.match(/iPad/i)}static getUrlObject(e){try{if(null!=o)return new o.URL(e);if("function"==typeof URL)return new URL(e);if(null!=window){const t=e.indexOf("://")>-1;if(!t&&e.indexOf(".")>-1)e="http://"+e;else if(!t)return null;const n=window.document.createElement("a");return n.href=e,n}}catch(t){}return null}}t.Utils=a,a.inited=!1,a.isNode=!1,a.isBrowser=!0,a.isMobileBrowser=!1,a.isAppleMobileBrowser=!1,a.global=null,a.tldEndingRegex=/.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/,a.regexpEmojiPresentation=/(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])/g,a.init()},76015:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnIFrame=void 0;t.WebAuthnIFrame=class{constructor(e,t,n,i,r,o,a,s){this.win=e,this.webVaultUrl=t,this.webAuthnNewTab=n,this.platformUtilsService=i,this.i18nService=r,this.successCallback=o,this.errorCallback=a,this.infoCallback=s,this.iframe=null,this.parseFunction=this.parseMessage.bind(this),this.connectorLink=e.document.createElement("a")}init(e){const t=new URLSearchParams({data:this.base64Encode(JSON.stringify(e)),parent:encodeURIComponent(this.win.document.location.href),btnText:encodeURIComponent(this.i18nService.t("webAuthnAuthenticate")),v:"1"});this.webAuthnNewTab?(t.append("locale",this.i18nService.translationLocale),this.platformUtilsService.launchUri(`${this.webVaultUrl}/webauthn-fallback-connector.html?${t}`)):(this.connectorLink.href=`${this.webVaultUrl}/webauthn-connector.html?${t}`,this.iframe=this.win.document.getElementById("webauthn_iframe"),this.iframe.allow="publickey-credentials-get "+new URL(this.webVaultUrl).origin,this.iframe.src=this.connectorLink.href,this.win.addEventListener("message",this.parseFunction,!1))}stop(){this.sendMessage("stop")}start(){this.sendMessage("start")}sendMessage(e){this.iframe&&this.iframe.src&&this.iframe.contentWindow&&this.iframe.contentWindow.postMessage(e,this.iframe.src)}base64Encode(e){return btoa(encodeURIComponent(e).replace(/%([0-9A-F]{2})/g,((e,t)=>String.fromCharCode("0x"+t))))}cleanup(){this.win.removeEventListener("message",this.parseFunction,!1)}parseMessage(e){if(!this.validMessage(e))return;const t=e.data.split("|");"success"===t[0]&&this.successCallback?this.successCallback(t[1]):"error"===t[0]&&this.errorCallback?this.errorCallback(t[1]):"info"===t[0]&&this.infoCallback&&this.infoCallback(t[1])}validMessage(e){return null!=e.origin&&""!==e.origin&&e.origin===this.connectorLink.origin&&null!=e.data&&"string"==typeof e.data&&(0===e.data.indexOf("success|")||0===e.data.indexOf("error|")||0===e.data.indexOf("info|"))}}},64466:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EEFLongWordList=void 0,t.EEFLongWordList=["abacus","abdomen","abdominal","abide","abiding","ability","ablaze","able","abnormal","abrasion","abrasive","abreast","abridge","abroad","abruptly","absence","absentee","absently","absinthe","absolute","absolve","abstain","abstract","absurd","accent","acclaim","acclimate","accompany","account","accuracy","accurate","accustom","acetone","achiness","aching","acid","acorn","acquaint","acquire","acre","acrobat","acronym","acting","action","activate","activator","active","activism","activist","activity","actress","acts","acutely","acuteness","aeration","aerobics","aerosol","aerospace","afar","affair","affected","affecting","affection","affidavit","affiliate","affirm","affix","afflicted","affluent","afford","affront","aflame","afloat","aflutter","afoot","afraid","afterglow","afterlife","aftermath","aftermost","afternoon","aged","ageless","agency","agenda","agent","aggregate","aghast","agile","agility","aging","agnostic","agonize","agonizing","agony","agreeable","agreeably","agreed","agreeing","agreement","aground","ahead","ahoy","aide","aids","aim","ajar","alabaster","alarm","albatross","album","alfalfa","algebra","algorithm","alias","alibi","alienable","alienate","aliens","alike","alive","alkaline","alkalize","almanac","almighty","almost","aloe","aloft","aloha","alone","alongside","aloof","alphabet","alright","although","altitude","alto","aluminum","alumni","always","amaretto","amaze","amazingly","amber","ambiance","ambiguity","ambiguous","ambition","ambitious","ambulance","ambush","amendable","amendment","amends","amenity","amiable","amicably","amid","amigo","amino","amiss","ammonia","ammonium","amnesty","amniotic","among","amount","amperage","ample","amplifier","amplify","amply","amuck","amulet","amusable","amused","amusement","amuser","amusing","anaconda","anaerobic","anagram","anatomist","anatomy","anchor","anchovy","ancient","android","anemia","anemic","aneurism","anew","angelfish","angelic","anger","angled","angler","angles","angling","angrily","angriness","anguished","angular","animal","animate","animating","animation","animator","anime","animosity","ankle","annex","annotate","announcer","annoying","annually","annuity","anointer","another","answering","antacid","antarctic","anteater","antelope","antennae","anthem","anthill","anthology","antibody","antics","antidote","antihero","antiquely","antiques","antiquity","antirust","antitoxic","antitrust","antiviral","antivirus","antler","antonym","antsy","anvil","anybody","anyhow","anymore","anyone","anyplace","anything","anytime","anyway","anywhere","aorta","apache","apostle","appealing","appear","appease","appeasing","appendage","appendix","appetite","appetizer","applaud","applause","apple","appliance","applicant","applied","apply","appointee","appraisal","appraiser","apprehend","approach","approval","approve","apricot","april","apron","aptitude","aptly","aqua","aqueduct","arbitrary","arbitrate","ardently","area","arena","arguable","arguably","argue","arise","armadillo","armband","armchair","armed","armful","armhole","arming","armless","armoire","armored","armory","armrest","army","aroma","arose","around","arousal","arrange","array","arrest","arrival","arrive","arrogance","arrogant","arson","art","ascend","ascension","ascent","ascertain","ashamed","ashen","ashes","ashy","aside","askew","asleep","asparagus","aspect","aspirate","aspire","aspirin","astonish","astound","astride","astrology","astronaut","astronomy","astute","atlantic","atlas","atom","atonable","atop","atrium","atrocious","atrophy","attach","attain","attempt","attendant","attendee","attention","attentive","attest","attic","attire","attitude","attractor","attribute","atypical","auction","audacious","audacity","audible","audibly","audience","audio","audition","augmented","august","authentic","author","autism","autistic","autograph","automaker","automated","automatic","autopilot","available","avalanche","avatar","avenge","avenging","avenue","average","aversion","avert","aviation","aviator","avid","avoid","await","awaken","award","aware","awhile","awkward","awning","awoke","awry","axis","babble","babbling","babied","baboon","backache","backboard","backboned","backdrop","backed","backer","backfield","backfire","backhand","backing","backlands","backlash","backless","backlight","backlit","backlog","backpack","backpedal","backrest","backroom","backshift","backside","backslid","backspace","backspin","backstab","backstage","backtalk","backtrack","backup","backward","backwash","backwater","backyard","bacon","bacteria","bacterium","badass","badge","badland","badly","badness","baffle","baffling","bagel","bagful","baggage","bagged","baggie","bagginess","bagging","baggy","bagpipe","baguette","baked","bakery","bakeshop","baking","balance","balancing","balcony","balmy","balsamic","bamboo","banana","banish","banister","banjo","bankable","bankbook","banked","banker","banking","banknote","bankroll","banner","bannister","banshee","banter","barbecue","barbed","barbell","barber","barcode","barge","bargraph","barista","baritone","barley","barmaid","barman","barn","barometer","barrack","barracuda","barrel","barrette","barricade","barrier","barstool","bartender","barterer","bash","basically","basics","basil","basin","basis","basket","batboy","batch","bath","baton","bats","battalion","battered","battering","battery","batting","battle","bauble","bazooka","blabber","bladder","blade","blah","blame","blaming","blanching","blandness","blank","blaspheme","blasphemy","blast","blatancy","blatantly","blazer","blazing","bleach","bleak","bleep","blemish","blend","bless","blighted","blimp","bling","blinked","blinker","blinking","blinks","blip","blissful","blitz","blizzard","bloated","bloating","blob","blog","bloomers","blooming","blooper","blot","blouse","blubber","bluff","bluish","blunderer","blunt","blurb","blurred","blurry","blurt","blush","blustery","boaster","boastful","boasting","boat","bobbed","bobbing","bobble","bobcat","bobsled","bobtail","bodacious","body","bogged","boggle","bogus","boil","bok","bolster","bolt","bonanza","bonded","bonding","bondless","boned","bonehead","boneless","bonelike","boney","bonfire","bonnet","bonsai","bonus","bony","boogeyman","boogieman","book","boondocks","booted","booth","bootie","booting","bootlace","bootleg","boots","boozy","borax","boring","borough","borrower","borrowing","boss","botanical","botanist","botany","botch","both","bottle","bottling","bottom","bounce","bouncing","bouncy","bounding","boundless","bountiful","bovine","boxcar","boxer","boxing","boxlike","boxy","breach","breath","breeches","breeching","breeder","breeding","breeze","breezy","brethren","brewery","brewing","briar","bribe","brick","bride","bridged","brigade","bright","brilliant","brim","bring","brink","brisket","briskly","briskness","bristle","brittle","broadband","broadcast","broaden","broadly","broadness","broadside","broadways","broiler","broiling","broken","broker","bronchial","bronco","bronze","bronzing","brook","broom","brought","browbeat","brownnose","browse","browsing","bruising","brunch","brunette","brunt","brush","brussels","brute","brutishly","bubble","bubbling","bubbly","buccaneer","bucked","bucket","buckle","buckshot","buckskin","bucktooth","buckwheat","buddhism","buddhist","budding","buddy","budget","buffalo","buffed","buffer","buffing","buffoon","buggy","bulb","bulge","bulginess","bulgur","bulk","bulldog","bulldozer","bullfight","bullfrog","bullhorn","bullion","bullish","bullpen","bullring","bullseye","bullwhip","bully","bunch","bundle","bungee","bunion","bunkbed","bunkhouse","bunkmate","bunny","bunt","busboy","bush","busily","busload","bust","busybody","buzz","cabana","cabbage","cabbie","cabdriver","cable","caboose","cache","cackle","cacti","cactus","caddie","caddy","cadet","cadillac","cadmium","cage","cahoots","cake","calamari","calamity","calcium","calculate","calculus","caliber","calibrate","calm","caloric","calorie","calzone","camcorder","cameo","camera","camisole","camper","campfire","camping","campsite","campus","canal","canary","cancel","candied","candle","candy","cane","canine","canister","cannabis","canned","canning","cannon","cannot","canola","canon","canopener","canopy","canteen","canyon","capable","capably","capacity","cape","capillary","capital","capitol","capped","capricorn","capsize","capsule","caption","captivate","captive","captivity","capture","caramel","carat","caravan","carbon","cardboard","carded","cardiac","cardigan","cardinal","cardstock","carefully","caregiver","careless","caress","caretaker","cargo","caring","carless","carload","carmaker","carnage","carnation","carnival","carnivore","carol","carpenter","carpentry","carpool","carport","carried","carrot","carrousel","carry","cartel","cartload","carton","cartoon","cartridge","cartwheel","carve","carving","carwash","cascade","case","cash","casing","casino","casket","cassette","casually","casualty","catacomb","catalog","catalyst","catalyze","catapult","cataract","catatonic","catcall","catchable","catcher","catching","catchy","caterer","catering","catfight","catfish","cathedral","cathouse","catlike","catnap","catnip","catsup","cattail","cattishly","cattle","catty","catwalk","caucasian","caucus","causal","causation","cause","causing","cauterize","caution","cautious","cavalier","cavalry","caviar","cavity","cedar","celery","celestial","celibacy","celibate","celtic","cement","census","ceramics","ceremony","certainly","certainty","certified","certify","cesarean","cesspool","chafe","chaffing","chain","chair","chalice","challenge","chamber","chamomile","champion","chance","change","channel","chant","chaos","chaperone","chaplain","chapped","chaps","chapter","character","charbroil","charcoal","charger","charging","chariot","charity","charm","charred","charter","charting","chase","chasing","chaste","chastise","chastity","chatroom","chatter","chatting","chatty","cheating","cheddar","cheek","cheer","cheese","cheesy","chef","chemicals","chemist","chemo","cherisher","cherub","chess","chest","chevron","chevy","chewable","chewer","chewing","chewy","chief","chihuahua","childcare","childhood","childish","childless","childlike","chili","chill","chimp","chip","chirping","chirpy","chitchat","chivalry","chive","chloride","chlorine","choice","chokehold","choking","chomp","chooser","choosing","choosy","chop","chosen","chowder","chowtime","chrome","chubby","chuck","chug","chummy","chump","chunk","churn","chute","cider","cilantro","cinch","cinema","cinnamon","circle","circling","circular","circulate","circus","citable","citadel","citation","citizen","citric","citrus","city","civic","civil","clad","claim","clambake","clammy","clamor","clamp","clamshell","clang","clanking","clapped","clapper","clapping","clarify","clarinet","clarity","clash","clasp","class","clatter","clause","clavicle","claw","clay","clean","clear","cleat","cleaver","cleft","clench","clergyman","clerical","clerk","clever","clicker","client","climate","climatic","cling","clinic","clinking","clip","clique","cloak","clobber","clock","clone","cloning","closable","closure","clothes","clothing","cloud","clover","clubbed","clubbing","clubhouse","clump","clumsily","clumsy","clunky","clustered","clutch","clutter","coach","coagulant","coastal","coaster","coasting","coastland","coastline","coat","coauthor","cobalt","cobbler","cobweb","cocoa","coconut","cod","coeditor","coerce","coexist","coffee","cofounder","cognition","cognitive","cogwheel","coherence","coherent","cohesive","coil","coke","cola","cold","coleslaw","coliseum","collage","collapse","collar","collected","collector","collide","collie","collision","colonial","colonist","colonize","colony","colossal","colt","coma","come","comfort","comfy","comic","coming","comma","commence","commend","comment","commerce","commode","commodity","commodore","common","commotion","commute","commuting","compacted","compacter","compactly","compactor","companion","company","compare","compel","compile","comply","component","composed","composer","composite","compost","composure","compound","compress","comprised","computer","computing","comrade","concave","conceal","conceded","concept","concerned","concert","conch","concierge","concise","conclude","concrete","concur","condense","condiment","condition","condone","conducive","conductor","conduit","cone","confess","confetti","confidant","confident","confider","confiding","configure","confined","confining","confirm","conflict","conform","confound","confront","confused","confusing","confusion","congenial","congested","congrats","congress","conical","conjoined","conjure","conjuror","connected","connector","consensus","consent","console","consoling","consonant","constable","constant","constrain","constrict","construct","consult","consumer","consuming","contact","container","contempt","contend","contented","contently","contents","contest","context","contort","contour","contrite","control","contusion","convene","convent","copartner","cope","copied","copier","copilot","coping","copious","copper","copy","coral","cork","cornball","cornbread","corncob","cornea","corned","corner","cornfield","cornflake","cornhusk","cornmeal","cornstalk","corny","coronary","coroner","corporal","corporate","corral","correct","corridor","corrode","corroding","corrosive","corsage","corset","cortex","cosigner","cosmetics","cosmic","cosmos","cosponsor","cost","cottage","cotton","couch","cough","could","countable","countdown","counting","countless","country","county","courier","covenant","cover","coveted","coveting","coyness","cozily","coziness","cozy","crabbing","crabgrass","crablike","crabmeat","cradle","cradling","crafter","craftily","craftsman","craftwork","crafty","cramp","cranberry","crane","cranial","cranium","crank","crate","crave","craving","crawfish","crawlers","crawling","crayfish","crayon","crazed","crazily","craziness","crazy","creamed","creamer","creamlike","crease","creasing","creatable","create","creation","creative","creature","credible","credibly","credit","creed","creme","creole","crepe","crept","crescent","crested","cresting","crestless","crevice","crewless","crewman","crewmate","crib","cricket","cried","crier","crimp","crimson","cringe","cringing","crinkle","crinkly","crisped","crisping","crisply","crispness","crispy","criteria","critter","croak","crock","crook","croon","crop","cross","crouch","crouton","crowbar","crowd","crown","crucial","crudely","crudeness","cruelly","cruelness","cruelty","crumb","crummiest","crummy","crumpet","crumpled","cruncher","crunching","crunchy","crusader","crushable","crushed","crusher","crushing","crust","crux","crying","cryptic","crystal","cubbyhole","cube","cubical","cubicle","cucumber","cuddle","cuddly","cufflink","culinary","culminate","culpable","culprit","cultivate","cultural","culture","cupbearer","cupcake","cupid","cupped","cupping","curable","curator","curdle","cure","curfew","curing","curled","curler","curliness","curling","curly","curry","curse","cursive","cursor","curtain","curtly","curtsy","curvature","curve","curvy","cushy","cusp","cussed","custard","custodian","custody","customary","customer","customize","customs","cut","cycle","cyclic","cycling","cyclist","cylinder","cymbal","cytoplasm","cytoplast","dab","dad","daffodil","dagger","daily","daintily","dainty","dairy","daisy","dallying","dance","dancing","dandelion","dander","dandruff","dandy","danger","dangle","dangling","daredevil","dares","daringly","darkened","darkening","darkish","darkness","darkroom","darling","darn","dart","darwinism","dash","dastardly","data","datebook","dating","daughter","daunting","dawdler","dawn","daybed","daybreak","daycare","daydream","daylight","daylong","dayroom","daytime","dazzler","dazzling","deacon","deafening","deafness","dealer","dealing","dealmaker","dealt","dean","debatable","debate","debating","debit","debrief","debtless","debtor","debug","debunk","decade","decaf","decal","decathlon","decay","deceased","deceit","deceiver","deceiving","december","decency","decent","deception","deceptive","decibel","decidable","decimal","decimeter","decipher","deck","declared","decline","decode","decompose","decorated","decorator","decoy","decrease","decree","dedicate","dedicator","deduce","deduct","deed","deem","deepen","deeply","deepness","deface","defacing","defame","default","defeat","defection","defective","defendant","defender","defense","defensive","deferral","deferred","defiance","defiant","defile","defiling","define","definite","deflate","deflation","deflator","deflected","deflector","defog","deforest","defraud","defrost","deftly","defuse","defy","degraded","degrading","degrease","degree","dehydrate","deity","dejected","delay","delegate","delegator","delete","deletion","delicacy","delicate","delicious","delighted","delirious","delirium","deliverer","delivery","delouse","delta","deluge","delusion","deluxe","demanding","demeaning","demeanor","demise","democracy","democrat","demote","demotion","demystify","denatured","deniable","denial","denim","denote","dense","density","dental","dentist","denture","deny","deodorant","deodorize","departed","departure","depict","deplete","depletion","deplored","deploy","deport","depose","depraved","depravity","deprecate","depress","deprive","depth","deputize","deputy","derail","deranged","derby","derived","desecrate","deserve","deserving","designate","designed","designer","designing","deskbound","desktop","deskwork","desolate","despair","despise","despite","destiny","destitute","destruct","detached","detail","detection","detective","detector","detention","detergent","detest","detonate","detonator","detoxify","detract","deuce","devalue","deviancy","deviant","deviate","deviation","deviator","device","devious","devotedly","devotee","devotion","devourer","devouring","devoutly","dexterity","dexterous","diabetes","diabetic","diabolic","diagnoses","diagnosis","diagram","dial","diameter","diaper","diaphragm","diary","dice","dicing","dictate","dictation","dictator","difficult","diffused","diffuser","diffusion","diffusive","dig","dilation","diligence","diligent","dill","dilute","dime","diminish","dimly","dimmed","dimmer","dimness","dimple","diner","dingbat","dinghy","dinginess","dingo","dingy","dining","dinner","diocese","dioxide","diploma","dipped","dipper","dipping","directed","direction","directive","directly","directory","direness","dirtiness","disabled","disagree","disallow","disarm","disarray","disaster","disband","disbelief","disburse","discard","discern","discharge","disclose","discolor","discount","discourse","discover","discuss","disdain","disengage","disfigure","disgrace","dish","disinfect","disjoin","disk","dislike","disliking","dislocate","dislodge","disloyal","dismantle","dismay","dismiss","dismount","disobey","disorder","disown","disparate","disparity","dispatch","dispense","dispersal","dispersed","disperser","displace","display","displease","disposal","dispose","disprove","dispute","disregard","disrupt","dissuade","distance","distant","distaste","distill","distinct","distort","distract","distress","district","distrust","ditch","ditto","ditzy","dividable","divided","dividend","dividers","dividing","divinely","diving","divinity","divisible","divisibly","division","divisive","divorcee","dizziness","dizzy","doable","docile","dock","doctrine","document","dodge","dodgy","doily","doing","dole","dollar","dollhouse","dollop","dolly","dolphin","domain","domelike","domestic","dominion","dominoes","donated","donation","donator","donor","donut","doodle","doorbell","doorframe","doorknob","doorman","doormat","doornail","doorpost","doorstep","doorstop","doorway","doozy","dork","dormitory","dorsal","dosage","dose","dotted","doubling","douche","dove","down","dowry","doze","drab","dragging","dragonfly","dragonish","dragster","drainable","drainage","drained","drainer","drainpipe","dramatic","dramatize","drank","drapery","drastic","draw","dreaded","dreadful","dreadlock","dreamboat","dreamily","dreamland","dreamless","dreamlike","dreamt","dreamy","drearily","dreary","drench","dress","drew","dribble","dried","drier","drift","driller","drilling","drinkable","drinking","dripping","drippy","drivable","driven","driver","driveway","driving","drizzle","drizzly","drone","drool","droop","drop-down","dropbox","dropkick","droplet","dropout","dropper","drove","drown","drowsily","drudge","drum","dry","dubbed","dubiously","duchess","duckbill","ducking","duckling","ducktail","ducky","duct","dude","duffel","dugout","duh","duke","duller","dullness","duly","dumping","dumpling","dumpster","duo","dupe","duplex","duplicate","duplicity","durable","durably","duration","duress","during","dusk","dust","dutiful","duty","duvet","dwarf","dweeb","dwelled","dweller","dwelling","dwindle","dwindling","dynamic","dynamite","dynasty","dyslexia","dyslexic","each","eagle","earache","eardrum","earflap","earful","earlobe","early","earmark","earmuff","earphone","earpiece","earplugs","earring","earshot","earthen","earthlike","earthling","earthly","earthworm","earthy","earwig","easeful","easel","easiest","easily","easiness","easing","eastbound","eastcoast","easter","eastward","eatable","eaten","eatery","eating","eats","ebay","ebony","ebook","ecard","eccentric","echo","eclair","eclipse","ecologist","ecology","economic","economist","economy","ecosphere","ecosystem","edge","edginess","edging","edgy","edition","editor","educated","education","educator","eel","effective","effects","efficient","effort","eggbeater","egging","eggnog","eggplant","eggshell","egomaniac","egotism","egotistic","either","eject","elaborate","elastic","elated","elbow","eldercare","elderly","eldest","electable","election","elective","elephant","elevate","elevating","elevation","elevator","eleven","elf","eligible","eligibly","eliminate","elite","elitism","elixir","elk","ellipse","elliptic","elm","elongated","elope","eloquence","eloquent","elsewhere","elude","elusive","elves","email","embargo","embark","embassy","embattled","embellish","ember","embezzle","emblaze","emblem","embody","embolism","emboss","embroider","emcee","emerald","emergency","emission","emit","emote","emoticon","emotion","empathic","empathy","emperor","emphases","emphasis","emphasize","emphatic","empirical","employed","employee","employer","emporium","empower","emptier","emptiness","empty","emu","enable","enactment","enamel","enchanted","enchilada","encircle","enclose","enclosure","encode","encore","encounter","encourage","encroach","encrust","encrypt","endanger","endeared","endearing","ended","ending","endless","endnote","endocrine","endorphin","endorse","endowment","endpoint","endurable","endurance","enduring","energetic","energize","energy","enforced","enforcer","engaged","engaging","engine","engorge","engraved","engraver","engraving","engross","engulf","enhance","enigmatic","enjoyable","enjoyably","enjoyer","enjoying","enjoyment","enlarged","enlarging","enlighten","enlisted","enquirer","enrage","enrich","enroll","enslave","ensnare","ensure","entail","entangled","entering","entertain","enticing","entire","entitle","entity","entomb","entourage","entrap","entree","entrench","entrust","entryway","entwine","enunciate","envelope","enviable","enviably","envious","envision","envoy","envy","enzyme","epic","epidemic","epidermal","epidermis","epidural","epilepsy","epileptic","epilogue","epiphany","episode","equal","equate","equation","equator","equinox","equipment","equity","equivocal","eradicate","erasable","erased","eraser","erasure","ergonomic","errand","errant","erratic","error","erupt","escalate","escalator","escapable","escapade","escapist","escargot","eskimo","esophagus","espionage","espresso","esquire","essay","essence","essential","establish","estate","esteemed","estimate","estimator","estranged","estrogen","etching","eternal","eternity","ethanol","ether","ethically","ethics","euphemism","evacuate","evacuee","evade","evaluate","evaluator","evaporate","evasion","evasive","even","everglade","evergreen","everybody","everyday","everyone","evict","evidence","evident","evil","evoke","evolution","evolve","exact","exalted","example","excavate","excavator","exceeding","exception","excess","exchange","excitable","exciting","exclaim","exclude","excluding","exclusion","exclusive","excretion","excretory","excursion","excusable","excusably","excuse","exemplary","exemplify","exemption","exerciser","exert","exes","exfoliate","exhale","exhaust","exhume","exile","existing","exit","exodus","exonerate","exorcism","exorcist","expand","expanse","expansion","expansive","expectant","expedited","expediter","expel","expend","expenses","expensive","expert","expire","expiring","explain","expletive","explicit","explode","exploit","explore","exploring","exponent","exporter","exposable","expose","exposure","express","expulsion","exquisite","extended","extending","extent","extenuate","exterior","external","extinct","extortion","extradite","extras","extrovert","extrude","extruding","exuberant","fable","fabric","fabulous","facebook","facecloth","facedown","faceless","facelift","faceplate","faceted","facial","facility","facing","facsimile","faction","factoid","factor","factsheet","factual","faculty","fade","fading","failing","falcon","fall","false","falsify","fame","familiar","family","famine","famished","fanatic","fancied","fanciness","fancy","fanfare","fang","fanning","fantasize","fantastic","fantasy","fascism","fastball","faster","fasting","fastness","faucet","favorable","favorably","favored","favoring","favorite","fax","feast","federal","fedora","feeble","feed","feel","feisty","feline","felt-tip","feminine","feminism","feminist","feminize","femur","fence","fencing","fender","ferment","fernlike","ferocious","ferocity","ferret","ferris","ferry","fervor","fester","festival","festive","festivity","fetal","fetch","fever","fiber","fiction","fiddle","fiddling","fidelity","fidgeting","fidgety","fifteen","fifth","fiftieth","fifty","figment","figure","figurine","filing","filled","filler","filling","film","filter","filth","filtrate","finale","finalist","finalize","finally","finance","financial","finch","fineness","finer","finicky","finished","finisher","finishing","finite","finless","finlike","fiscally","fit","five","flaccid","flagman","flagpole","flagship","flagstick","flagstone","flail","flakily","flaky","flame","flammable","flanked","flanking","flannels","flap","flaring","flashback","flashbulb","flashcard","flashily","flashing","flashy","flask","flatbed","flatfoot","flatly","flatness","flatten","flattered","flatterer","flattery","flattop","flatware","flatworm","flavored","flavorful","flavoring","flaxseed","fled","fleshed","fleshy","flick","flier","flight","flinch","fling","flint","flip","flirt","float","flock","flogging","flop","floral","florist","floss","flounder","flyable","flyaway","flyer","flying","flyover","flypaper","foam","foe","fog","foil","folic","folk","follicle","follow","fondling","fondly","fondness","fondue","font","food","fool","footage","football","footbath","footboard","footer","footgear","foothill","foothold","footing","footless","footman","footnote","footpad","footpath","footprint","footrest","footsie","footsore","footwear","footwork","fossil","foster","founder","founding","fountain","fox","foyer","fraction","fracture","fragile","fragility","fragment","fragrance","fragrant","frail","frame","framing","frantic","fraternal","frayed","fraying","frays","freckled","freckles","freebase","freebee","freebie","freedom","freefall","freehand","freeing","freeload","freely","freemason","freeness","freestyle","freeware","freeway","freewill","freezable","freezing","freight","french","frenzied","frenzy","frequency","frequent","fresh","fretful","fretted","friction","friday","fridge","fried","friend","frighten","frightful","frigidity","frigidly","frill","fringe","frisbee","frisk","fritter","frivolous","frolic","from","front","frostbite","frosted","frostily","frosting","frostlike","frosty","froth","frown","frozen","fructose","frugality","frugally","fruit","frustrate","frying","gab","gaffe","gag","gainfully","gaining","gains","gala","gallantly","galleria","gallery","galley","gallon","gallows","gallstone","galore","galvanize","gambling","game","gaming","gamma","gander","gangly","gangrene","gangway","gap","garage","garbage","garden","gargle","garland","garlic","garment","garnet","garnish","garter","gas","gatherer","gathering","gating","gauging","gauntlet","gauze","gave","gawk","gazing","gear","gecko","geek","geiger","gem","gender","generic","generous","genetics","genre","gentile","gentleman","gently","gents","geography","geologic","geologist","geology","geometric","geometry","geranium","gerbil","geriatric","germicide","germinate","germless","germproof","gestate","gestation","gesture","getaway","getting","getup","giant","gibberish","giblet","giddily","giddiness","giddy","gift","gigabyte","gigahertz","gigantic","giggle","giggling","giggly","gigolo","gilled","gills","gimmick","girdle","giveaway","given","giver","giving","gizmo","gizzard","glacial","glacier","glade","gladiator","gladly","glamorous","glamour","glance","glancing","glandular","glare","glaring","glass","glaucoma","glazing","gleaming","gleeful","glider","gliding","glimmer","glimpse","glisten","glitch","glitter","glitzy","gloater","gloating","gloomily","gloomy","glorified","glorifier","glorify","glorious","glory","gloss","glove","glowing","glowworm","glucose","glue","gluten","glutinous","glutton","gnarly","gnat","goal","goatskin","goes","goggles","going","goldfish","goldmine","goldsmith","golf","goliath","gonad","gondola","gone","gong","good","gooey","goofball","goofiness","goofy","google","goon","gopher","gore","gorged","gorgeous","gory","gosling","gossip","gothic","gotten","gout","gown","grab","graceful","graceless","gracious","gradation","graded","grader","gradient","grading","gradually","graduate","graffiti","grafted","grafting","grain","granddad","grandkid","grandly","grandma","grandpa","grandson","granite","granny","granola","grant","granular","grape","graph","grapple","grappling","grasp","grass","gratified","gratify","grating","gratitude","gratuity","gravel","graveness","graves","graveyard","gravitate","gravity","gravy","gray","grazing","greasily","greedily","greedless","greedy","green","greeter","greeting","grew","greyhound","grid","grief","grievance","grieving","grievous","grill","grimace","grimacing","grime","griminess","grimy","grinch","grinning","grip","gristle","grit","groggily","groggy","groin","groom","groove","grooving","groovy","grope","ground","grouped","grout","grove","grower","growing","growl","grub","grudge","grudging","grueling","gruffly","grumble","grumbling","grumbly","grumpily","grunge","grunt","guacamole","guidable","guidance","guide","guiding","guileless","guise","gulf","gullible","gully","gulp","gumball","gumdrop","gumminess","gumming","gummy","gurgle","gurgling","guru","gush","gusto","gusty","gutless","guts","gutter","guy","guzzler","gyration","habitable","habitant","habitat","habitual","hacked","hacker","hacking","hacksaw","had","haggler","haiku","half","halogen","halt","halved","halves","hamburger","hamlet","hammock","hamper","hamster","hamstring","handbag","handball","handbook","handbrake","handcart","handclap","handclasp","handcraft","handcuff","handed","handful","handgrip","handgun","handheld","handiness","handiwork","handlebar","handled","handler","handling","handmade","handoff","handpick","handprint","handrail","handsaw","handset","handsfree","handshake","handstand","handwash","handwork","handwoven","handwrite","handyman","hangnail","hangout","hangover","hangup","hankering","hankie","hanky","haphazard","happening","happier","happiest","happily","happiness","happy","harbor","hardcopy","hardcore","hardcover","harddisk","hardened","hardener","hardening","hardhat","hardhead","hardiness","hardly","hardness","hardship","hardware","hardwired","hardwood","hardy","harmful","harmless","harmonica","harmonics","harmonize","harmony","harness","harpist","harsh","harvest","hash","hassle","haste","hastily","hastiness","hasty","hatbox","hatchback","hatchery","hatchet","hatching","hatchling","hate","hatless","hatred","haunt","haven","hazard","hazelnut","hazily","haziness","hazing","hazy","headache","headband","headboard","headcount","headdress","headed","header","headfirst","headgear","heading","headlamp","headless","headlock","headphone","headpiece","headrest","headroom","headscarf","headset","headsman","headstand","headstone","headway","headwear","heap","heat","heave","heavily","heaviness","heaving","hedge","hedging","heftiness","hefty","helium","helmet","helper","helpful","helping","helpless","helpline","hemlock","hemstitch","hence","henchman","henna","herald","herbal","herbicide","herbs","heritage","hermit","heroics","heroism","herring","herself","hertz","hesitancy","hesitant","hesitate","hexagon","hexagram","hubcap","huddle","huddling","huff","hug","hula","hulk","hull","human","humble","humbling","humbly","humid","humiliate","humility","humming","hummus","humongous","humorist","humorless","humorous","humpback","humped","humvee","hunchback","hundredth","hunger","hungrily","hungry","hunk","hunter","hunting","huntress","huntsman","hurdle","hurled","hurler","hurling","hurray","hurricane","hurried","hurry","hurt","husband","hush","husked","huskiness","hut","hybrid","hydrant","hydrated","hydration","hydrogen","hydroxide","hyperlink","hypertext","hyphen","hypnoses","hypnosis","hypnotic","hypnotism","hypnotist","hypnotize","hypocrisy","hypocrite","ibuprofen","ice","iciness","icing","icky","icon","icy","idealism","idealist","idealize","ideally","idealness","identical","identify","identity","ideology","idiocy","idiom","idly","igloo","ignition","ignore","iguana","illicitly","illusion","illusive","image","imaginary","imagines","imaging","imbecile","imitate","imitation","immature","immerse","immersion","imminent","immobile","immodest","immorally","immortal","immovable","immovably","immunity","immunize","impaired","impale","impart","impatient","impeach","impeding","impending","imperfect","imperial","impish","implant","implement","implicate","implicit","implode","implosion","implosive","imply","impolite","important","importer","impose","imposing","impotence","impotency","impotent","impound","imprecise","imprint","imprison","impromptu","improper","improve","improving","improvise","imprudent","impulse","impulsive","impure","impurity","iodine","iodize","ion","ipad","iphone","ipod","irate","irk","iron","irregular","irrigate","irritable","irritably","irritant","irritate","islamic","islamist","isolated","isolating","isolation","isotope","issue","issuing","italicize","italics","item","itinerary","itunes","ivory","ivy","jab","jackal","jacket","jackknife","jackpot","jailbird","jailbreak","jailer","jailhouse","jalapeno","jam","janitor","january","jargon","jarring","jasmine","jaundice","jaunt","java","jawed","jawless","jawline","jaws","jaybird","jaywalker","jazz","jeep","jeeringly","jellied","jelly","jersey","jester","jet","jiffy","jigsaw","jimmy","jingle","jingling","jinx","jitters","jittery","job","jockey","jockstrap","jogger","jogging","john","joining","jokester","jokingly","jolliness","jolly","jolt","jot","jovial","joyfully","joylessly","joyous","joyride","joystick","jubilance","jubilant","judge","judgingly","judicial","judiciary","judo","juggle","juggling","jugular","juice","juiciness","juicy","jujitsu","jukebox","july","jumble","jumbo","jump","junction","juncture","june","junior","juniper","junkie","junkman","junkyard","jurist","juror","jury","justice","justifier","justify","justly","justness","juvenile","kabob","kangaroo","karaoke","karate","karma","kebab","keenly","keenness","keep","keg","kelp","kennel","kept","kerchief","kerosene","kettle","kick","kiln","kilobyte","kilogram","kilometer","kilowatt","kilt","kimono","kindle","kindling","kindly","kindness","kindred","kinetic","kinfolk","king","kinship","kinsman","kinswoman","kissable","kisser","kissing","kitchen","kite","kitten","kitty","kiwi","kleenex","knapsack","knee","knelt","knickers","knoll","koala","kooky","kosher","krypton","kudos","kung","labored","laborer","laboring","laborious","labrador","ladder","ladies","ladle","ladybug","ladylike","lagged","lagging","lagoon","lair","lake","lance","landed","landfall","landfill","landing","landlady","landless","landline","landlord","landmark","landmass","landmine","landowner","landscape","landside","landslide","language","lankiness","lanky","lantern","lapdog","lapel","lapped","lapping","laptop","lard","large","lark","lash","lasso","last","latch","late","lather","latitude","latrine","latter","latticed","launch","launder","laundry","laurel","lavender","lavish","laxative","lazily","laziness","lazy","lecturer","left","legacy","legal","legend","legged","leggings","legible","legibly","legislate","lego","legroom","legume","legwarmer","legwork","lemon","lend","length","lens","lent","leotard","lesser","letdown","lethargic","lethargy","letter","lettuce","level","leverage","levers","levitate","levitator","liability","liable","liberty","librarian","library","licking","licorice","lid","life","lifter","lifting","liftoff","ligament","likely","likeness","likewise","liking","lilac","lilly","lily","limb","limeade","limelight","limes","limit","limping","limpness","line","lingo","linguini","linguist","lining","linked","linoleum","linseed","lint","lion","lip","liquefy","liqueur","liquid","lisp","list","litigate","litigator","litmus","litter","little","livable","lived","lively","liver","livestock","lividly","living","lizard","lubricant","lubricate","lucid","luckily","luckiness","luckless","lucrative","ludicrous","lugged","lukewarm","lullaby","lumber","luminance","luminous","lumpiness","lumping","lumpish","lunacy","lunar","lunchbox","luncheon","lunchroom","lunchtime","lung","lurch","lure","luridness","lurk","lushly","lushness","luster","lustfully","lustily","lustiness","lustrous","lusty","luxurious","luxury","lying","lyrically","lyricism","lyricist","lyrics","macarena","macaroni","macaw","mace","machine","machinist","magazine","magenta","maggot","magical","magician","magma","magnesium","magnetic","magnetism","magnetize","magnifier","magnify","magnitude","magnolia","mahogany","maimed","majestic","majesty","majorette","majority","makeover","maker","makeshift","making","malformed","malt","mama","mammal","mammary","mammogram","manager","managing","manatee","mandarin","mandate","mandatory","mandolin","manger","mangle","mango","mangy","manhandle","manhole","manhood","manhunt","manicotti","manicure","manifesto","manila","mankind","manlike","manliness","manly","manmade","manned","mannish","manor","manpower","mantis","mantra","manual","many","map","marathon","marauding","marbled","marbles","marbling","march","mardi","margarine","margarita","margin","marigold","marina","marine","marital","maritime","marlin","marmalade","maroon","married","marrow","marry","marshland","marshy","marsupial","marvelous","marxism","mascot","masculine","mashed","mashing","massager","masses","massive","mastiff","matador","matchbook","matchbox","matcher","matching","matchless","material","maternal","maternity","math","mating","matriarch","matrimony","matrix","matron","matted","matter","maturely","maturing","maturity","mauve","maverick","maximize","maximum","maybe","mayday","mayflower","moaner","moaning","mobile","mobility","mobilize","mobster","mocha","mocker","mockup","modified","modify","modular","modulator","module","moisten","moistness","moisture","molar","molasses","mold","molecular","molecule","molehill","mollusk","mom","monastery","monday","monetary","monetize","moneybags","moneyless","moneywise","mongoose","mongrel","monitor","monkhood","monogamy","monogram","monologue","monopoly","monorail","monotone","monotype","monoxide","monsieur","monsoon","monstrous","monthly","monument","moocher","moodiness","moody","mooing","moonbeam","mooned","moonlight","moonlike","moonlit","moonrise","moonscape","moonshine","moonstone","moonwalk","mop","morale","morality","morally","morbidity","morbidly","morphine","morphing","morse","mortality","mortally","mortician","mortified","mortify","mortuary","mosaic","mossy","most","mothball","mothproof","motion","motivate","motivator","motive","motocross","motor","motto","mountable","mountain","mounted","mounting","mourner","mournful","mouse","mousiness","moustache","mousy","mouth","movable","move","movie","moving","mower","mowing","much","muck","mud","mug","mulberry","mulch","mule","mulled","mullets","multiple","multiply","multitask","multitude","mumble","mumbling","mumbo","mummified","mummify","mummy","mumps","munchkin","mundane","municipal","muppet","mural","murkiness","murky","murmuring","muscular","museum","mushily","mushiness","mushroom","mushy","music","musket","muskiness","musky","mustang","mustard","muster","mustiness","musty","mutable","mutate","mutation","mute","mutilated","mutilator","mutiny","mutt","mutual","muzzle","myself","myspace","mystified","mystify","myth","nacho","nag","nail","name","naming","nanny","nanometer","nape","napkin","napped","napping","nappy","narrow","nastily","nastiness","national","native","nativity","natural","nature","naturist","nautical","navigate","navigator","navy","nearby","nearest","nearly","nearness","neatly","neatness","nebula","nebulizer","nectar","negate","negation","negative","neglector","negligee","negligent","negotiate","nemeses","nemesis","neon","nephew","nerd","nervous","nervy","nest","net","neurology","neuron","neurosis","neurotic","neuter","neutron","never","next","nibble","nickname","nicotine","niece","nifty","nimble","nimbly","nineteen","ninetieth","ninja","nintendo","ninth","nuclear","nuclei","nucleus","nugget","nullify","number","numbing","numbly","numbness","numeral","numerate","numerator","numeric","numerous","nuptials","nursery","nursing","nurture","nutcase","nutlike","nutmeg","nutrient","nutshell","nuttiness","nutty","nuzzle","nylon","oaf","oak","oasis","oat","obedience","obedient","obituary","object","obligate","obliged","oblivion","oblivious","oblong","obnoxious","oboe","obscure","obscurity","observant","observer","observing","obsessed","obsession","obsessive","obsolete","obstacle","obstinate","obstruct","obtain","obtrusive","obtuse","obvious","occultist","occupancy","occupant","occupier","occupy","ocean","ocelot","octagon","octane","october","octopus","ogle","oil","oink","ointment","okay","old","olive","olympics","omega","omen","ominous","omission","omit","omnivore","onboard","oncoming","ongoing","onion","online","onlooker","only","onscreen","onset","onshore","onslaught","onstage","onto","onward","onyx","oops","ooze","oozy","opacity","opal","open","operable","operate","operating","operation","operative","operator","opium","opossum","opponent","oppose","opposing","opposite","oppressed","oppressor","opt","opulently","osmosis","other","otter","ouch","ought","ounce","outage","outback","outbid","outboard","outbound","outbreak","outburst","outcast","outclass","outcome","outdated","outdoors","outer","outfield","outfit","outflank","outgoing","outgrow","outhouse","outing","outlast","outlet","outline","outlook","outlying","outmatch","outmost","outnumber","outplayed","outpost","outpour","output","outrage","outrank","outreach","outright","outscore","outsell","outshine","outshoot","outsider","outskirts","outsmart","outsource","outspoken","outtakes","outthink","outward","outweigh","outwit","oval","ovary","oven","overact","overall","overarch","overbid","overbill","overbite","overblown","overboard","overbook","overbuilt","overcast","overcoat","overcome","overcook","overcrowd","overdraft","overdrawn","overdress","overdrive","overdue","overeager","overeater","overexert","overfed","overfeed","overfill","overflow","overfull","overgrown","overhand","overhang","overhaul","overhead","overhear","overheat","overhung","overjoyed","overkill","overlabor","overlaid","overlap","overlay","overload","overlook","overlord","overlying","overnight","overpass","overpay","overplant","overplay","overpower","overprice","overrate","overreach","overreact","override","overripe","overrule","overrun","overshoot","overshot","oversight","oversized","oversleep","oversold","overspend","overstate","overstay","overstep","overstock","overstuff","oversweet","overtake","overthrow","overtime","overtly","overtone","overture","overturn","overuse","overvalue","overview","overwrite","owl","oxford","oxidant","oxidation","oxidize","oxidizing","oxygen","oxymoron","oyster","ozone","paced","pacemaker","pacific","pacifier","pacifism","pacifist","pacify","padded","padding","paddle","paddling","padlock","pagan","pager","paging","pajamas","palace","palatable","palm","palpable","palpitate","paltry","pampered","pamperer","pampers","pamphlet","panama","pancake","pancreas","panda","pandemic","pang","panhandle","panic","panning","panorama","panoramic","panther","pantomime","pantry","pants","pantyhose","paparazzi","papaya","paper","paprika","papyrus","parabola","parachute","parade","paradox","paragraph","parakeet","paralegal","paralyses","paralysis","paralyze","paramedic","parameter","paramount","parasail","parasite","parasitic","parcel","parched","parchment","pardon","parish","parka","parking","parkway","parlor","parmesan","parole","parrot","parsley","parsnip","partake","parted","parting","partition","partly","partner","partridge","party","passable","passably","passage","passcode","passenger","passerby","passing","passion","passive","passivism","passover","passport","password","pasta","pasted","pastel","pastime","pastor","pastrami","pasture","pasty","patchwork","patchy","paternal","paternity","path","patience","patient","patio","patriarch","patriot","patrol","patronage","patronize","pauper","pavement","paver","pavestone","pavilion","paving","pawing","payable","payback","paycheck","payday","payee","payer","paying","payment","payphone","payroll","pebble","pebbly","pecan","pectin","peculiar","peddling","pediatric","pedicure","pedigree","pedometer","pegboard","pelican","pellet","pelt","pelvis","penalize","penalty","pencil","pendant","pending","penholder","penknife","pennant","penniless","penny","penpal","pension","pentagon","pentagram","pep","perceive","percent","perch","percolate","perennial","perfected","perfectly","perfume","periscope","perish","perjurer","perjury","perkiness","perky","perm","peroxide","perpetual","perplexed","persecute","persevere","persuaded","persuader","pesky","peso","pessimism","pessimist","pester","pesticide","petal","petite","petition","petri","petroleum","petted","petticoat","pettiness","petty","petunia","phantom","phobia","phoenix","phonebook","phoney","phonics","phoniness","phony","phosphate","photo","phrase","phrasing","placard","placate","placidly","plank","planner","plant","plasma","plaster","plastic","plated","platform","plating","platinum","platonic","platter","platypus","plausible","plausibly","playable","playback","player","playful","playgroup","playhouse","playing","playlist","playmaker","playmate","playoff","playpen","playroom","playset","plaything","playtime","plaza","pleading","pleat","pledge","plentiful","plenty","plethora","plexiglas","pliable","plod","plop","plot","plow","ploy","pluck","plug","plunder","plunging","plural","plus","plutonium","plywood","poach","pod","poem","poet","pogo","pointed","pointer","pointing","pointless","pointy","poise","poison","poker","poking","polar","police","policy","polio","polish","politely","polka","polo","polyester","polygon","polygraph","polymer","poncho","pond","pony","popcorn","pope","poplar","popper","poppy","popsicle","populace","popular","populate","porcupine","pork","porous","porridge","portable","portal","portfolio","porthole","portion","portly","portside","poser","posh","posing","possible","possibly","possum","postage","postal","postbox","postcard","posted","poster","posting","postnasal","posture","postwar","pouch","pounce","pouncing","pound","pouring","pout","powdered","powdering","powdery","power","powwow","pox","praising","prance","prancing","pranker","prankish","prankster","prayer","praying","preacher","preaching","preachy","preamble","precinct","precise","precision","precook","precut","predator","predefine","predict","preface","prefix","preflight","preformed","pregame","pregnancy","pregnant","preheated","prelaunch","prelaw","prelude","premiere","premises","premium","prenatal","preoccupy","preorder","prepaid","prepay","preplan","preppy","preschool","prescribe","preseason","preset","preshow","president","presoak","press","presume","presuming","preteen","pretended","pretender","pretense","pretext","pretty","pretzel","prevail","prevalent","prevent","preview","previous","prewar","prewashed","prideful","pried","primal","primarily","primary","primate","primer","primp","princess","print","prior","prism","prison","prissy","pristine","privacy","private","privatize","prize","proactive","probable","probably","probation","probe","probing","probiotic","problem","procedure","process","proclaim","procreate","procurer","prodigal","prodigy","produce","product","profane","profanity","professed","professor","profile","profound","profusely","progeny","prognosis","program","progress","projector","prologue","prolonged","promenade","prominent","promoter","promotion","prompter","promptly","prone","prong","pronounce","pronto","proofing","proofread","proofs","propeller","properly","property","proponent","proposal","propose","props","prorate","protector","protegee","proton","prototype","protozoan","protract","protrude","proud","provable","proved","proven","provided","provider","providing","province","proving","provoke","provoking","provolone","prowess","prowler","prowling","proximity","proxy","prozac","prude","prudishly","prune","pruning","pry","psychic","public","publisher","pucker","pueblo","pug","pull","pulmonary","pulp","pulsate","pulse","pulverize","puma","pumice","pummel","punch","punctual","punctuate","punctured","pungent","punisher","punk","pupil","puppet","puppy","purchase","pureblood","purebred","purely","pureness","purgatory","purge","purging","purifier","purify","purist","puritan","purity","purple","purplish","purposely","purr","purse","pursuable","pursuant","pursuit","purveyor","pushcart","pushchair","pusher","pushiness","pushing","pushover","pushpin","pushup","pushy","putdown","putt","puzzle","puzzling","pyramid","pyromania","python","quack","quadrant","quail","quaintly","quake","quaking","qualified","qualifier","qualify","quality","qualm","quantum","quarrel","quarry","quartered","quarterly","quarters","quartet","quench","query","quicken","quickly","quickness","quicksand","quickstep","quiet","quill","quilt","quintet","quintuple","quirk","quit","quiver","quizzical","quotable","quotation","quote","rabid","race","racing","racism","rack","racoon","radar","radial","radiance","radiantly","radiated","radiation","radiator","radio","radish","raffle","raft","rage","ragged","raging","ragweed","raider","railcar","railing","railroad","railway","raisin","rake","raking","rally","ramble","rambling","ramp","ramrod","ranch","rancidity","random","ranged","ranger","ranging","ranked","ranking","ransack","ranting","rants","rare","rarity","rascal","rash","rasping","ravage","raven","ravine","raving","ravioli","ravishing","reabsorb","reach","reacquire","reaction","reactive","reactor","reaffirm","ream","reanalyze","reappear","reapply","reappoint","reapprove","rearrange","rearview","reason","reassign","reassure","reattach","reawake","rebalance","rebate","rebel","rebirth","reboot","reborn","rebound","rebuff","rebuild","rebuilt","reburial","rebuttal","recall","recant","recapture","recast","recede","recent","recess","recharger","recipient","recital","recite","reckless","reclaim","recliner","reclining","recluse","reclusive","recognize","recoil","recollect","recolor","reconcile","reconfirm","reconvene","recopy","record","recount","recoup","recovery","recreate","rectal","rectangle","rectified","rectify","recycled","recycler","recycling","reemerge","reenact","reenter","reentry","reexamine","referable","referee","reference","refill","refinance","refined","refinery","refining","refinish","reflected","reflector","reflex","reflux","refocus","refold","reforest","reformat","reformed","reformer","reformist","refract","refrain","refreeze","refresh","refried","refueling","refund","refurbish","refurnish","refusal","refuse","refusing","refutable","refute","regain","regalia","regally","reggae","regime","region","register","registrar","registry","regress","regretful","regroup","regular","regulate","regulator","rehab","reheat","rehire","rehydrate","reimburse","reissue","reiterate","rejoice","rejoicing","rejoin","rekindle","relapse","relapsing","relatable","related","relation","relative","relax","relay","relearn","release","relenting","reliable","reliably","reliance","reliant","relic","relieve","relieving","relight","relish","relive","reload","relocate","relock","reluctant","rely","remake","remark","remarry","rematch","remedial","remedy","remember","reminder","remindful","remission","remix","remnant","remodeler","remold","remorse","remote","removable","removal","removed","remover","removing","rename","renderer","rendering","rendition","renegade","renewable","renewably","renewal","renewed","renounce","renovate","renovator","rentable","rental","rented","renter","reoccupy","reoccur","reopen","reorder","repackage","repacking","repaint","repair","repave","repaying","repayment","repeal","repeated","repeater","repent","rephrase","replace","replay","replica","reply","reporter","repose","repossess","repost","repressed","reprimand","reprint","reprise","reproach","reprocess","reproduce","reprogram","reps","reptile","reptilian","repugnant","repulsion","repulsive","repurpose","reputable","reputably","request","require","requisite","reroute","rerun","resale","resample","rescuer","reseal","research","reselect","reseller","resemble","resend","resent","reset","reshape","reshoot","reshuffle","residence","residency","resident","residual","residue","resigned","resilient","resistant","resisting","resize","resolute","resolved","resonant","resonate","resort","resource","respect","resubmit","result","resume","resupply","resurface","resurrect","retail","retainer","retaining","retake","retaliate","retention","rethink","retinal","retired","retiree","retiring","retold","retool","retorted","retouch","retrace","retract","retrain","retread","retreat","retrial","retrieval","retriever","retry","return","retying","retype","reunion","reunite","reusable","reuse","reveal","reveler","revenge","revenue","reverb","revered","reverence","reverend","reversal","reverse","reversing","reversion","revert","revisable","revise","revision","revisit","revivable","revival","reviver","reviving","revocable","revoke","revolt","revolver","revolving","reward","rewash","rewind","rewire","reword","rework","rewrap","rewrite","rhyme","ribbon","ribcage","rice","riches","richly","richness","rickety","ricotta","riddance","ridden","ride","riding","rifling","rift","rigging","rigid","rigor","rimless","rimmed","rind","rink","rinse","rinsing","riot","ripcord","ripeness","ripening","ripping","ripple","rippling","riptide","rise","rising","risk","risotto","ritalin","ritzy","rival","riverbank","riverbed","riverboat","riverside","riveter","riveting","roamer","roaming","roast","robbing","robe","robin","robotics","robust","rockband","rocker","rocket","rockfish","rockiness","rocking","rocklike","rockslide","rockstar","rocky","rogue","roman","romp","rope","roping","roster","rosy","rotten","rotting","rotunda","roulette","rounding","roundish","roundness","roundup","roundworm","routine","routing","rover","roving","royal","rubbed","rubber","rubbing","rubble","rubdown","ruby","ruckus","rudder","rug","ruined","rule","rumble","rumbling","rummage","rumor","runaround","rundown","runner","running","runny","runt","runway","rupture","rural","ruse","rush","rust","rut","sabbath","sabotage","sacrament","sacred","sacrifice","sadden","saddlebag","saddled","saddling","sadly","sadness","safari","safeguard","safehouse","safely","safeness","saffron","saga","sage","sagging","saggy","said","saint","sake","salad","salami","salaried","salary","saline","salon","saloon","salsa","salt","salutary","salute","salvage","salvaging","salvation","same","sample","sampling","sanction","sanctity","sanctuary","sandal","sandbag","sandbank","sandbar","sandblast","sandbox","sanded","sandfish","sanding","sandlot","sandpaper","sandpit","sandstone","sandstorm","sandworm","sandy","sanitary","sanitizer","sank","santa","sapling","sappiness","sappy","sarcasm","sarcastic","sardine","sash","sasquatch","sassy","satchel","satiable","satin","satirical","satisfied","satisfy","saturate","saturday","sauciness","saucy","sauna","savage","savanna","saved","savings","savior","savor","saxophone","say","scabbed","scabby","scalded","scalding","scale","scaling","scallion","scallop","scalping","scam","scandal","scanner","scanning","scant","scapegoat","scarce","scarcity","scarecrow","scared","scarf","scarily","scariness","scarring","scary","scavenger","scenic","schedule","schematic","scheme","scheming","schilling","schnapps","scholar","science","scientist","scion","scoff","scolding","scone","scoop","scooter","scope","scorch","scorebook","scorecard","scored","scoreless","scorer","scoring","scorn","scorpion","scotch","scoundrel","scoured","scouring","scouting","scouts","scowling","scrabble","scraggly","scrambled","scrambler","scrap","scratch","scrawny","screen","scribble","scribe","scribing","scrimmage","script","scroll","scrooge","scrounger","scrubbed","scrubber","scruffy","scrunch","scrutiny","scuba","scuff","sculptor","sculpture","scurvy","scuttle","secluded","secluding","seclusion","second","secrecy","secret","sectional","sector","secular","securely","security","sedan","sedate","sedation","sedative","sediment","seduce","seducing","segment","seismic","seizing","seldom","selected","selection","selective","selector","self","seltzer","semantic","semester","semicolon","semifinal","seminar","semisoft","semisweet","senate","senator","send","senior","senorita","sensation","sensitive","sensitize","sensually","sensuous","sepia","september","septic","septum","sequel","sequence","sequester","series","sermon","serotonin","serpent","serrated","serve","service","serving","sesame","sessions","setback","setting","settle","settling","setup","sevenfold","seventeen","seventh","seventy","severity","shabby","shack","shaded","shadily","shadiness","shading","shadow","shady","shaft","shakable","shakily","shakiness","shaking","shaky","shale","shallot","shallow","shame","shampoo","shamrock","shank","shanty","shape","shaping","share","sharpener","sharper","sharpie","sharply","sharpness","shawl","sheath","shed","sheep","sheet","shelf","shell","shelter","shelve","shelving","sherry","shield","shifter","shifting","shiftless","shifty","shimmer","shimmy","shindig","shine","shingle","shininess","shining","shiny","ship","shirt","shivering","shock","shone","shoplift","shopper","shopping","shoptalk","shore","shortage","shortcake","shortcut","shorten","shorter","shorthand","shortlist","shortly","shortness","shorts","shortwave","shorty","shout","shove","showbiz","showcase","showdown","shower","showgirl","showing","showman","shown","showoff","showpiece","showplace","showroom","showy","shrank","shrapnel","shredder","shredding","shrewdly","shriek","shrill","shrimp","shrine","shrink","shrivel","shrouded","shrubbery","shrubs","shrug","shrunk","shucking","shudder","shuffle","shuffling","shun","shush","shut","shy","siamese","siberian","sibling","siding","sierra","siesta","sift","sighing","silenced","silencer","silent","silica","silicon","silk","silliness","silly","silo","silt","silver","similarly","simile","simmering","simple","simplify","simply","sincere","sincerity","singer","singing","single","singular","sinister","sinless","sinner","sinuous","sip","siren","sister","sitcom","sitter","sitting","situated","situation","sixfold","sixteen","sixth","sixties","sixtieth","sixtyfold","sizable","sizably","size","sizing","sizzle","sizzling","skater","skating","skedaddle","skeletal","skeleton","skeptic","sketch","skewed","skewer","skid","skied","skier","skies","skiing","skilled","skillet","skillful","skimmed","skimmer","skimming","skimpily","skincare","skinhead","skinless","skinning","skinny","skintight","skipper","skipping","skirmish","skirt","skittle","skydiver","skylight","skyline","skype","skyrocket","skyward","slab","slacked","slacker","slacking","slackness","slacks","slain","slam","slander","slang","slapping","slapstick","slashed","slashing","slate","slather","slaw","sled","sleek","sleep","sleet","sleeve","slept","sliceable","sliced","slicer","slicing","slick","slider","slideshow","sliding","slighted","slighting","slightly","slimness","slimy","slinging","slingshot","slinky","slip","slit","sliver","slobbery","slogan","sloped","sloping","sloppily","sloppy","slot","slouching","slouchy","sludge","slug","slum","slurp","slush","sly","small","smartly","smartness","smasher","smashing","smashup","smell","smelting","smile","smilingly","smirk","smite","smith","smitten","smock","smog","smoked","smokeless","smokiness","smoking","smoky","smolder","smooth","smother","smudge","smudgy","smuggler","smuggling","smugly","smugness","snack","snagged","snaking","snap","snare","snarl","snazzy","sneak","sneer","sneeze","sneezing","snide","sniff","snippet","snipping","snitch","snooper","snooze","snore","snoring","snorkel","snort","snout","snowbird","snowboard","snowbound","snowcap","snowdrift","snowdrop","snowfall","snowfield","snowflake","snowiness","snowless","snowman","snowplow","snowshoe","snowstorm","snowsuit","snowy","snub","snuff","snuggle","snugly","snugness","speak","spearfish","spearhead","spearman","spearmint","species","specimen","specked","speckled","specks","spectacle","spectator","spectrum","speculate","speech","speed","spellbind","speller","spelling","spendable","spender","spending","spent","spew","sphere","spherical","sphinx","spider","spied","spiffy","spill","spilt","spinach","spinal","spindle","spinner","spinning","spinout","spinster","spiny","spiral","spirited","spiritism","spirits","spiritual","splashed","splashing","splashy","splatter","spleen","splendid","splendor","splice","splicing","splinter","splotchy","splurge","spoilage","spoiled","spoiler","spoiling","spoils","spoken","spokesman","sponge","spongy","sponsor","spoof","spookily","spooky","spool","spoon","spore","sporting","sports","sporty","spotless","spotlight","spotted","spotter","spotting","spotty","spousal","spouse","spout","sprain","sprang","sprawl","spray","spree","sprig","spring","sprinkled","sprinkler","sprint","sprite","sprout","spruce","sprung","spry","spud","spur","sputter","spyglass","squabble","squad","squall","squander","squash","squatted","squatter","squatting","squeak","squealer","squealing","squeamish","squeegee","squeeze","squeezing","squid","squiggle","squiggly","squint","squire","squirt","squishier","squishy","stability","stabilize","stable","stack","stadium","staff","stage","staging","stagnant","stagnate","stainable","stained","staining","stainless","stalemate","staleness","stalling","stallion","stamina","stammer","stamp","stand","stank","staple","stapling","starboard","starch","stardom","stardust","starfish","stargazer","staring","stark","starless","starlet","starlight","starlit","starring","starry","starship","starter","starting","startle","startling","startup","starved","starving","stash","state","static","statistic","statue","stature","status","statute","statutory","staunch","stays","steadfast","steadier","steadily","steadying","steam","steed","steep","steerable","steering","steersman","stegosaur","stellar","stem","stench","stencil","step","stereo","sterile","sterility","sterilize","sterling","sternness","sternum","stew","stick","stiffen","stiffly","stiffness","stifle","stifling","stillness","stilt","stimulant","stimulate","stimuli","stimulus","stinger","stingily","stinging","stingray","stingy","stinking","stinky","stipend","stipulate","stir","stitch","stock","stoic","stoke","stole","stomp","stonewall","stoneware","stonework","stoning","stony","stood","stooge","stool","stoop","stoplight","stoppable","stoppage","stopped","stopper","stopping","stopwatch","storable","storage","storeroom","storewide","storm","stout","stove","stowaway","stowing","straddle","straggler","strained","strainer","straining","strangely","stranger","strangle","strategic","strategy","stratus","straw","stray","streak","stream","street","strength","strenuous","strep","stress","stretch","strewn","stricken","strict","stride","strife","strike","striking","strive","striving","strobe","strode","stroller","strongbox","strongly","strongman","struck","structure","strudel","struggle","strum","strung","strut","stubbed","stubble","stubbly","stubborn","stucco","stuck","student","studied","studio","study","stuffed","stuffing","stuffy","stumble","stumbling","stump","stung","stunned","stunner","stunning","stunt","stupor","sturdily","sturdy","styling","stylishly","stylist","stylized","stylus","suave","subarctic","subatomic","subdivide","subdued","subduing","subfloor","subgroup","subheader","subject","sublease","sublet","sublevel","sublime","submarine","submerge","submersed","submitter","subpanel","subpar","subplot","subprime","subscribe","subscript","subsector","subside","subsiding","subsidize","subsidy","subsoil","subsonic","substance","subsystem","subtext","subtitle","subtly","subtotal","subtract","subtype","suburb","subway","subwoofer","subzero","succulent","such","suction","sudden","sudoku","suds","sufferer","suffering","suffice","suffix","suffocate","suffrage","sugar","suggest","suing","suitable","suitably","suitcase","suitor","sulfate","sulfide","sulfite","sulfur","sulk","sullen","sulphate","sulphuric","sultry","superbowl","superglue","superhero","superior","superjet","superman","supermom","supernova","supervise","supper","supplier","supply","support","supremacy","supreme","surcharge","surely","sureness","surface","surfacing","surfboard","surfer","surgery","surgical","surging","surname","surpass","surplus","surprise","surreal","surrender","surrogate","surround","survey","survival","survive","surviving","survivor","sushi","suspect","suspend","suspense","sustained","sustainer","swab","swaddling","swagger","swampland","swan","swapping","swarm","sway","swear","sweat","sweep","swell","swept","swerve","swifter","swiftly","swiftness","swimmable","swimmer","swimming","swimsuit","swimwear","swinger","swinging","swipe","swirl","switch","swivel","swizzle","swooned","swoop","swoosh","swore","sworn","swung","sycamore","sympathy","symphonic","symphony","symptom","synapse","syndrome","synergy","synopses","synopsis","synthesis","synthetic","syrup","system","t-shirt","tabasco","tabby","tableful","tables","tablet","tableware","tabloid","tackiness","tacking","tackle","tackling","tacky","taco","tactful","tactical","tactics","tactile","tactless","tadpole","taekwondo","tag","tainted","take","taking","talcum","talisman","tall","talon","tamale","tameness","tamer","tamper","tank","tanned","tannery","tanning","tantrum","tapeless","tapered","tapering","tapestry","tapioca","tapping","taps","tarantula","target","tarmac","tarnish","tarot","tartar","tartly","tartness","task","tassel","taste","tastiness","tasting","tasty","tattered","tattle","tattling","tattoo","taunt","tavern","thank","that","thaw","theater","theatrics","thee","theft","theme","theology","theorize","thermal","thermos","thesaurus","these","thesis","thespian","thicken","thicket","thickness","thieving","thievish","thigh","thimble","thing","think","thinly","thinner","thinness","thinning","thirstily","thirsting","thirsty","thirteen","thirty","thong","thorn","those","thousand","thrash","thread","threaten","threefold","thrift","thrill","thrive","thriving","throat","throbbing","throng","throttle","throwaway","throwback","thrower","throwing","thud","thumb","thumping","thursday","thus","thwarting","thyself","tiara","tibia","tidal","tidbit","tidiness","tidings","tidy","tiger","tighten","tightly","tightness","tightrope","tightwad","tigress","tile","tiling","till","tilt","timid","timing","timothy","tinderbox","tinfoil","tingle","tingling","tingly","tinker","tinkling","tinsel","tinsmith","tint","tinwork","tiny","tipoff","tipped","tipper","tipping","tiptoeing","tiptop","tiring","tissue","trace","tracing","track","traction","tractor","trade","trading","tradition","traffic","tragedy","trailing","trailside","train","traitor","trance","tranquil","transfer","transform","translate","transpire","transport","transpose","trapdoor","trapeze","trapezoid","trapped","trapper","trapping","traps","trash","travel","traverse","travesty","tray","treachery","treading","treadmill","treason","treat","treble","tree","trekker","tremble","trembling","tremor","trench","trend","trespass","triage","trial","triangle","tribesman","tribunal","tribune","tributary","tribute","triceps","trickery","trickily","tricking","trickle","trickster","tricky","tricolor","tricycle","trident","tried","trifle","trifocals","trillion","trilogy","trimester","trimmer","trimming","trimness","trinity","trio","tripod","tripping","triumph","trivial","trodden","trolling","trombone","trophy","tropical","tropics","trouble","troubling","trough","trousers","trout","trowel","truce","truck","truffle","trump","trunks","trustable","trustee","trustful","trusting","trustless","truth","try","tubby","tubeless","tubular","tucking","tuesday","tug","tuition","tulip","tumble","tumbling","tummy","turban","turbine","turbofan","turbojet","turbulent","turf","turkey","turmoil","turret","turtle","tusk","tutor","tutu","tux","tweak","tweed","tweet","tweezers","twelve","twentieth","twenty","twerp","twice","twiddle","twiddling","twig","twilight","twine","twins","twirl","twistable","twisted","twister","twisting","twisty","twitch","twitter","tycoon","tying","tyke","udder","ultimate","ultimatum","ultra","umbilical","umbrella","umpire","unabashed","unable","unadorned","unadvised","unafraid","unaired","unaligned","unaltered","unarmored","unashamed","unaudited","unawake","unaware","unbaked","unbalance","unbeaten","unbend","unbent","unbiased","unbitten","unblended","unblessed","unblock","unbolted","unbounded","unboxed","unbraided","unbridle","unbroken","unbuckled","unbundle","unburned","unbutton","uncanny","uncapped","uncaring","uncertain","unchain","unchanged","uncharted","uncheck","uncivil","unclad","unclaimed","unclamped","unclasp","uncle","unclip","uncloak","unclog","unclothed","uncoated","uncoiled","uncolored","uncombed","uncommon","uncooked","uncork","uncorrupt","uncounted","uncouple","uncouth","uncover","uncross","uncrown","uncrushed","uncured","uncurious","uncurled","uncut","undamaged","undated","undaunted","undead","undecided","undefined","underage","underarm","undercoat","undercook","undercut","underdog","underdone","underfed","underfeed","underfoot","undergo","undergrad","underhand","underline","underling","undermine","undermost","underpaid","underpass","underpay","underrate","undertake","undertone","undertook","undertow","underuse","underwear","underwent","underwire","undesired","undiluted","undivided","undocked","undoing","undone","undrafted","undress","undrilled","undusted","undying","unearned","unearth","unease","uneasily","uneasy","uneatable","uneaten","unedited","unelected","unending","unengaged","unenvied","unequal","unethical","uneven","unexpired","unexposed","unfailing","unfair","unfasten","unfazed","unfeeling","unfiled","unfilled","unfitted","unfitting","unfixable","unfixed","unflawed","unfocused","unfold","unfounded","unframed","unfreeze","unfrosted","unfrozen","unfunded","unglazed","ungloved","unglue","ungodly","ungraded","ungreased","unguarded","unguided","unhappily","unhappy","unharmed","unhealthy","unheard","unhearing","unheated","unhelpful","unhidden","unhinge","unhitched","unholy","unhook","unicorn","unicycle","unified","unifier","uniformed","uniformly","unify","unimpeded","uninjured","uninstall","uninsured","uninvited","union","uniquely","unisexual","unison","unissued","unit","universal","universe","unjustly","unkempt","unkind","unknotted","unknowing","unknown","unlaced","unlatch","unlawful","unleaded","unlearned","unleash","unless","unleveled","unlighted","unlikable","unlimited","unlined","unlinked","unlisted","unlit","unlivable","unloaded","unloader","unlocked","unlocking","unlovable","unloved","unlovely","unloving","unluckily","unlucky","unmade","unmanaged","unmanned","unmapped","unmarked","unmasked","unmasking","unmatched","unmindful","unmixable","unmixed","unmolded","unmoral","unmovable","unmoved","unmoving","unnamable","unnamed","unnatural","unneeded","unnerve","unnerving","unnoticed","unopened","unopposed","unpack","unpadded","unpaid","unpainted","unpaired","unpaved","unpeeled","unpicked","unpiloted","unpinned","unplanned","unplanted","unpleased","unpledged","unplowed","unplug","unpopular","unproven","unquote","unranked","unrated","unraveled","unreached","unread","unreal","unreeling","unrefined","unrelated","unrented","unrest","unretired","unrevised","unrigged","unripe","unrivaled","unroasted","unrobed","unroll","unruffled","unruly","unrushed","unsaddle","unsafe","unsaid","unsalted","unsaved","unsavory","unscathed","unscented","unscrew","unsealed","unseated","unsecured","unseeing","unseemly","unseen","unselect","unselfish","unsent","unsettled","unshackle","unshaken","unshaved","unshaven","unsheathe","unshipped","unsightly","unsigned","unskilled","unsliced","unsmooth","unsnap","unsocial","unsoiled","unsold","unsolved","unsorted","unspoiled","unspoken","unstable","unstaffed","unstamped","unsteady","unsterile","unstirred","unstitch","unstopped","unstuck","unstuffed","unstylish","unsubtle","unsubtly","unsuited","unsure","unsworn","untagged","untainted","untaken","untamed","untangled","untapped","untaxed","unthawed","unthread","untidy","untie","until","untimed","untimely","untitled","untoasted","untold","untouched","untracked","untrained","untreated","untried","untrimmed","untrue","untruth","unturned","untwist","untying","unusable","unused","unusual","unvalued","unvaried","unvarying","unveiled","unveiling","unvented","unviable","unvisited","unvocal","unwanted","unwarlike","unwary","unwashed","unwatched","unweave","unwed","unwelcome","unwell","unwieldy","unwilling","unwind","unwired","unwitting","unwomanly","unworldly","unworn","unworried","unworthy","unwound","unwoven","unwrapped","unwritten","unzip","upbeat","upchuck","upcoming","upcountry","update","upfront","upgrade","upheaval","upheld","uphill","uphold","uplifted","uplifting","upload","upon","upper","upright","uprising","upriver","uproar","uproot","upscale","upside","upstage","upstairs","upstart","upstate","upstream","upstroke","upswing","uptake","uptight","uptown","upturned","upward","upwind","uranium","urban","urchin","urethane","urgency","urgent","urging","urologist","urology","usable","usage","useable","used","uselessly","user","usher","usual","utensil","utility","utilize","utmost","utopia","utter","vacancy","vacant","vacate","vacation","vagabond","vagrancy","vagrantly","vaguely","vagueness","valiant","valid","valium","valley","valuables","value","vanilla","vanish","vanity","vanquish","vantage","vaporizer","variable","variably","varied","variety","various","varmint","varnish","varsity","varying","vascular","vaseline","vastly","vastness","veal","vegan","veggie","vehicular","velcro","velocity","velvet","vendetta","vending","vendor","veneering","vengeful","venomous","ventricle","venture","venue","venus","verbalize","verbally","verbose","verdict","verify","verse","version","versus","vertebrae","vertical","vertigo","very","vessel","vest","veteran","veto","vexingly","viability","viable","vibes","vice","vicinity","victory","video","viewable","viewer","viewing","viewless","viewpoint","vigorous","village","villain","vindicate","vineyard","vintage","violate","violation","violator","violet","violin","viper","viral","virtual","virtuous","virus","visa","viscosity","viscous","viselike","visible","visibly","vision","visiting","visitor","visor","vista","vitality","vitalize","vitally","vitamins","vivacious","vividly","vividness","vixen","vocalist","vocalize","vocally","vocation","voice","voicing","void","volatile","volley","voltage","volumes","voter","voting","voucher","vowed","vowel","voyage","wackiness","wad","wafer","waffle","waged","wager","wages","waggle","wagon","wake","waking","walk","walmart","walnut","walrus","waltz","wand","wannabe","wanted","wanting","wasabi","washable","washbasin","washboard","washbowl","washcloth","washday","washed","washer","washhouse","washing","washout","washroom","washstand","washtub","wasp","wasting","watch","water","waviness","waving","wavy","whacking","whacky","wham","wharf","wheat","whenever","whiff","whimsical","whinny","whiny","whisking","whoever","whole","whomever","whoopee","whooping","whoops","why","wick","widely","widen","widget","widow","width","wieldable","wielder","wife","wifi","wikipedia","wildcard","wildcat","wilder","wildfire","wildfowl","wildland","wildlife","wildly","wildness","willed","willfully","willing","willow","willpower","wilt","wimp","wince","wincing","wind","wing","winking","winner","winnings","winter","wipe","wired","wireless","wiring","wiry","wisdom","wise","wish","wisplike","wispy","wistful","wizard","wobble","wobbling","wobbly","wok","wolf","wolverine","womanhood","womankind","womanless","womanlike","womanly","womb","woof","wooing","wool","woozy","word","work","worried","worrier","worrisome","worry","worsening","worshiper","worst","wound","woven","wow","wrangle","wrath","wreath","wreckage","wrecker","wrecking","wrench","wriggle","wriggly","wrinkle","wrinkly","wrist","writing","written","wrongdoer","wronged","wrongful","wrongly","wrongness","wrought","xbox","xerox","yahoo","yam","yanking","yapping","yard","yarn","yeah","yearbook","yearling","yearly","yearning","yeast","yelling","yelp","yen","yesterday","yiddish","yield","yin","yippee","yo-yo","yodel","yoga","yogurt","yonder","yoyo","yummy","zap","zealous","zebra","zen","zeppelin","zero","zestfully","zesty","zigzagged","zipfile","zipping","zippy","zips","zit","zodiac","zombie","zone","zoning","zookeeper","zoologist","zoology","zoom"]},69930:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.cardholderName=this.getResponseProperty("CardholderName"),this.brand=this.getResponseProperty("Brand"),this.number=this.getResponseProperty("Number"),this.expMonth=this.getResponseProperty("ExpMonth"),this.expYear=this.getResponseProperty("ExpYear"),this.code=this.getResponseProperty("Code"))}}t.CardApi=r},6847:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.value=this.getResponseProperty("Value"),this.linkedId=this.getResponseProperty("linkedId"))}}t.FieldApi=r},17733:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.title=this.getResponseProperty("Title"),this.firstName=this.getResponseProperty("FirstName"),this.middleName=this.getResponseProperty("MiddleName"),this.lastName=this.getResponseProperty("LastName"),this.address1=this.getResponseProperty("Address1"),this.address2=this.getResponseProperty("Address2"),this.address3=this.getResponseProperty("Address3"),this.city=this.getResponseProperty("City"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.country=this.getResponseProperty("Country"),this.company=this.getResponseProperty("Company"),this.email=this.getResponseProperty("Email"),this.phone=this.getResponseProperty("Phone"),this.ssn=this.getResponseProperty("SSN"),this.username=this.getResponseProperty("Username"),this.passportNumber=this.getResponseProperty("PassportNumber"),this.licenseNumber=this.getResponseProperty("LicenseNumber"))}}t.IdentityApi=r},85489:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginApi=void 0;const i=n(8018),r=n(72873);class o extends i.BaseResponse{constructor(e=null){if(super(e),null==e)return;this.username=this.getResponseProperty("Username"),this.password=this.getResponseProperty("Password"),this.passwordRevisionDate=this.getResponseProperty("PasswordRevisionDate"),this.totp=this.getResponseProperty("Totp"),this.autofillOnPageLoad=this.getResponseProperty("AutofillOnPageLoad");const t=this.getResponseProperty("Uris");null!=t&&(this.uris=t.map((e=>new r.LoginUriApi(e))))}}t.LoginApi=o},72873:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){if(super(e),this.match=null,null==e)return;this.uri=this.getResponseProperty("Uri");const t=this.getResponseProperty("Match");this.match=null!=t?t:null}}t.LoginUriApi=r},35629:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){if(super(e),null==e)return this;this.accessEventLogs=this.getResponseProperty("AccessEventLogs"),this.accessImportExport=this.getResponseProperty("AccessImportExport"),this.accessReports=this.getResponseProperty("AccessReports"),this.manageAllCollections=this.getResponseProperty("ManageAllCollections"),this.manageAssignedCollections=this.getResponseProperty("ManageAssignedCollections"),this.createNewCollections=this.getResponseProperty("CreateNewCollections"),this.editAnyCollection=this.getResponseProperty("EditAnyCollection"),this.deleteAnyCollection=this.getResponseProperty("DeleteAnyCollection"),this.editAssignedCollections=this.getResponseProperty("EditAssignedCollections"),this.deleteAssignedCollections=this.getResponseProperty("DeleteAssignedCollections"),this.manageCiphers=this.getResponseProperty("ManageCiphers"),this.manageGroups=this.getResponseProperty("ManageGroups"),this.manageSso=this.getResponseProperty("ManageSso"),this.managePolicies=this.getResponseProperty("ManagePolicies"),this.manageUsers=this.getResponseProperty("ManageUsers"),this.manageResetPassword=this.getResponseProperty("ManageResetPassword")}}t.PermissionsApi=r},82976:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.type=this.getResponseProperty("Type"))}}t.SecureNoteApi=r},72193:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.id=this.getResponseProperty("Id"),this.fileName=this.getResponseProperty("FileName"),this.key=this.getResponseProperty("Key"),this.size=this.getResponseProperty("Size"),this.sizeName=this.getResponseProperty("SizeName"))}}t.SendFileApi=r},75558:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextApi=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.text=this.getResponseProperty("Text"),this.hidden=this.getResponseProperty("Hidden")||!1)}}t.SendTextApi=r},12043:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SsoConfigApi=void 0;const i=n(8018);var r,o,a,s,l;!function(e){e[e.OpenIdConnect=1]="OpenIdConnect",e[e.Saml2=2]="Saml2"}(r||(r={})),function(e){e[e.RedirectGet=0]="RedirectGet",e[e.FormPost=1]="FormPost"}(o||(o={})),function(e){e[e.HttpRedirect=1]="HttpRedirect",e[e.HttpPost=2]="HttpPost",e[e.Artifact=4]="Artifact"}(a||(a={})),function(e){e[e.NotConfigured=0]="NotConfigured",e[e.Unspecified=1]="Unspecified",e[e.EmailAddress=2]="EmailAddress",e[e.X509SubjectName=3]="X509SubjectName",e[e.WindowsDomainQualifiedName=4]="WindowsDomainQualifiedName",e[e.KerberosPrincipalName=5]="KerberosPrincipalName",e[e.EntityIdentifier=6]="EntityIdentifier",e[e.Persistent=7]="Persistent",e[e.Transient=8]="Transient"}(s||(s={})),function(e){e[e.IfIdpWantAuthnRequestsSigned=0]="IfIdpWantAuthnRequestsSigned",e[e.Always=1]="Always",e[e.Never=3]="Never"}(l||(l={}));class c extends i.BaseResponse{constructor(e=null){super(e),null!=e&&(this.configType=this.getResponseProperty("ConfigType"),this.keyConnectorEnabled=this.getResponseProperty("KeyConnectorEnabled"),this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl"),this.authority=this.getResponseProperty("Authority"),this.clientId=this.getResponseProperty("ClientId"),this.clientSecret=this.getResponseProperty("ClientSecret"),this.metadataAddress=this.getResponseProperty("MetadataAddress"),this.redirectBehavior=this.getResponseProperty("RedirectBehavior"),this.getClaimsFromUserInfoEndpoint=this.getResponseProperty("GetClaimsFromUserInfoEndpoint"),this.additionalScopes=this.getResponseProperty("AdditionalScopes"),this.additionalUserIdClaimTypes=this.getResponseProperty("AdditionalUserIdClaimTypes"),this.additionalEmailClaimTypes=this.getResponseProperty("AdditionalEmailClaimTypes"),this.additionalNameClaimTypes=this.getResponseProperty("AdditionalNameClaimTypes"),this.acrValues=this.getResponseProperty("AcrValues"),this.expectedReturnAcrValue=this.getResponseProperty("ExpectedReturnAcrValue"),this.spNameIdFormat=this.getResponseProperty("SpNameIdFormat"),this.spOutboundSigningAlgorithm=this.getResponseProperty("SpOutboundSigningAlgorithm"),this.spSigningBehavior=this.getResponseProperty("SpSigningBehavior"),this.spMinIncomingSigningAlgorithm=this.getResponseProperty("SpMinIncomingSigningAlgorithm"),this.spWantAssertionsSigned=this.getResponseProperty("SpWantAssertionsSigned"),this.spValidateCertificates=this.getResponseProperty("SpValidateCertificates"),this.idpEntityId=this.getResponseProperty("IdpEntityId"),this.idpBindingType=this.getResponseProperty("IdpBindingType"),this.idpSingleSignOnServiceUrl=this.getResponseProperty("IdpSingleSignOnServiceUrl"),this.idpSingleLogoutServiceUrl=this.getResponseProperty("IdpSingleLogoutServiceUrl"),this.idpArtifactResolutionServiceUrl=this.getResponseProperty("IdpArtifactResolutionServiceUrl"),this.idpX509PublicCert=this.getResponseProperty("IdpX509PublicCert"),this.idpOutboundSigningAlgorithm=this.getResponseProperty("IdpOutboundSigningAlgorithm"),this.idpAllowUnsolicitedAuthnResponse=this.getResponseProperty("IdpAllowUnsolicitedAuthnResponse"),this.idpDisableOutboundLogoutRequests=this.getResponseProperty("IdpDisableOutboundLogoutRequests"),this.idpWantAuthnRequestsSigned=this.getResponseProperty("IdpWantAuthnRequestsSigned"))}}t.SsoConfigApi=c},62823:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentData=void 0;t.AttachmentData=class{constructor(e){null!=e&&(this.id=e.id,this.url=e.url,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)}}},56316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardData=void 0;t.CardData=class{constructor(e){null!=e&&(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code)}}},13886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherData=void 0;const i=n(23635),r=n(62823),o=n(56316),a=n(17958),s=n(7188),l=n(36883),c=n(60667),d=n(17402);t.CipherData=class{constructor(e,t,n){if(null!=e){switch(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.userId=t,this.edit=e.edit,this.viewPassword=e.viewPassword,this.organizationUseTotp=e.organizationUseTotp,this.favorite=e.favorite,this.revisionDate=e.revisionDate,this.type=e.type,this.name=e.name,this.notes=e.notes,this.collectionIds=null!=n?n:e.collectionIds,this.deletedDate=e.deletedDate,this.reprompt=e.reprompt,this.type){case i.CipherType.Login:this.login=new l.LoginData(e.login);break;case i.CipherType.SecureNote:this.secureNote=new d.SecureNoteData(e.secureNote);break;case i.CipherType.Card:this.card=new o.CardData(e.card);break;case i.CipherType.Identity:this.identity=new s.IdentityData(e.identity)}null!=e.fields&&(this.fields=e.fields.map((e=>new a.FieldData(e)))),null!=e.attachments&&(this.attachments=e.attachments.map((e=>new r.AttachmentData(e)))),null!=e.passwordHistory&&(this.passwordHistory=e.passwordHistory.map((e=>new c.PasswordHistoryData(e))))}}}},58209:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionData=void 0;t.CollectionData=class{constructor(e){this.id=e.id,this.organizationId=e.organizationId,this.name=e.name,this.externalId=e.externalId,this.readOnly=e.readOnly}}},11740:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventData=void 0;t.EventData=class{}},17958:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldData=void 0;t.FieldData=class{constructor(e){null!=e&&(this.type=e.type,this.name=e.name,this.value=e.value,this.linkedId=e.linkedId)}}},20301:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderData=void 0;t.FolderData=class{constructor(e,t){this.userId=t,this.name=e.name,this.id=e.id,this.revisionDate=e.revisionDate}}},7188:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityData=void 0;t.IdentityData=class{constructor(e){null!=e&&(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber)}}},36883:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginData=void 0;const i=n(86279);t.LoginData=class{constructor(e){null!=e&&(this.username=e.username,this.password=e.password,this.passwordRevisionDate=e.passwordRevisionDate,this.totp=e.totp,this.autofillOnPageLoad=e.autofillOnPageLoad,e.uris&&(this.uris=e.uris.map((e=>new i.LoginUriData(e)))))}}},86279:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriData=void 0;t.LoginUriData=class{constructor(e){this.match=null,null!=e&&(this.uri=e.uri,this.match=e.match)}}},74102:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationData=void 0;t.OrganizationData=class{constructor(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useSso=e.useSso,this.useKeyConnector=e.useKeyConnector,this.useResetPassword=e.useResetPassword,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordEnrolled=e.resetPasswordEnrolled,this.userId=e.userId,this.hasPublicAndPrivateKeys=e.hasPublicAndPrivateKeys,this.providerId=e.providerId,this.providerName=e.providerName,this.familySponsorshipFriendlyName=e.familySponsorshipFriendlyName,this.familySponsorshipAvailable=e.familySponsorshipAvailable,this.planProductType=e.planProductType,this.keyConnectorEnabled=e.keyConnectorEnabled,this.keyConnectorUrl=e.keyConnectorUrl}}},60667:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryData=void 0;t.PasswordHistoryData=class{constructor(e){null!=e&&(this.password=e.password,this.lastUsedDate=e.lastUsedDate)}}},79384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyData=void 0;t.PolicyData=class{constructor(e){this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled}}},89652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderData=void 0;t.ProviderData=class{constructor(e){this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.userId=e.userId,this.useEvents=e.useEvents}}},17402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteData=void 0;t.SecureNoteData=class{constructor(e){null!=e&&(this.type=e.type)}}},75059:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendData=void 0;const i=n(49538),r=n(21151),o=n(75662);t.SendData=class{constructor(e,t){if(null!=e)switch(this.id=e.id,this.accessId=e.accessId,this.userId=t,this.type=e.type,this.name=e.name,this.notes=e.notes,this.key=e.key,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.expirationDate=e.expirationDate,this.deletionDate=e.deletionDate,this.password=e.password,this.disabled=e.disable,this.hideEmail=e.hideEmail,this.type){case i.SendType.Text:this.text=new o.SendTextData(e.text);break;case i.SendType.File:this.file=new r.SendFileData(e.file)}}}},21151:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileData=void 0;t.SendFileData=class{constructor(e){null!=e&&(this.id=e.id,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)}}},75662:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextData=void 0;t.SendTextData=class{constructor(e){null!=e&&(this.text=e.text,this.hidden=e.hidden)}}},84582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountTokens=t.AccountSettings=t.AccountProfile=t.AccountKeys=t.AccountData=t.DataEncryptionPair=t.EncryptionPair=void 0;const i=n(53797);class r{}t.EncryptionPair=r;class o{}t.DataEncryptionPair=o;class a{constructor(){this.ciphers=new o,this.folders=new o,this.sends=new o,this.collections=new o,this.policies=new o,this.passwordGenerationHistory=new r}}t.AccountData=a;class s{constructor(){this.cryptoSymmetricKey=new r,this.organizationKeys=new r,this.providerKeys=new r,this.privateKey=new r}}t.AccountKeys=s;class l{}t.AccountProfile=l;class c{constructor(){this.environmentUrls=new i.EnvironmentUrls,this.pinProtected=new r,this.vaultTimeoutAction="lock"}}t.AccountSettings=c;class d{}t.AccountTokens=d;t.Account=class{constructor(e){this.data=new a,this.keys=new s,this.profile=new l,this.settings=new c,this.tokens=new d,Object.assign(this,{data:Object.assign(Object.assign({},new a),null==e?void 0:e.data),keys:Object.assign(Object.assign({},new s),null==e?void 0:e.keys),profile:Object.assign(Object.assign({},new l),null==e?void 0:e.profile),settings:Object.assign(Object.assign({},new c),null==e?void 0:e.settings),tokens:Object.assign(Object.assign({},new d),null==e?void 0:e.tokens)})}}},59066:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Attachment=void 0;const r=n(62823),o=n(56513),a=n(14621),s=n(61833),l=n(70829);class c extends a.default{constructor(e,t=!1){super(),null!=e&&(this.size=e.size,this.buildDomainModel(this,e,{id:null,url:null,sizeName:null,fileName:null,key:null},t,["id","url","sizeName"]))}decrypt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.decryptObj(new o.AttachmentView(this),{fileName:null},e,t);if(null!=this.key){let r;const o=l.Utils.global.bitwardenContainerService;if(!o)throw new Error("global bitwardenContainerService not initialized.");r=o.getCryptoService();try{const i=yield r.getOrgKey(e),o=yield r.decryptToBytes(this.key,null!=i?i:t);n.key=new s.SymmetricCryptoKey(o)}catch(i){}}return n}))}toAttachmentData(){const e=new r.AttachmentData;return e.size=this.size,this.buildDataModel(this,e,{id:null,url:null,sizeName:null,fileName:null,key:null},["id","url","sizeName"]),e}}t.Attachment=c},9405:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuthResult=void 0;t.AuthResult=class{constructor(){this.twoFactor=!1,this.captchaSiteKey="",this.resetMasterPassword=!1,this.forcePasswordReset=!1,this.twoFactorProviders=null}}},95746:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;const i=n(56316),r=n(14621),o=n(17283);class a extends r.default{constructor(e,t=!1){super(),null!=e&&this.buildDomainModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},t,[])}decrypt(e,t){return this.decryptObj(new o.CardView(this),{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},e,t)}toCardData(){const e=new i.CardData;return this.buildDataModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null}),e}}t.Card=a},78758:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Cipher=void 0;const r=n(23635),o=n(13886),a=n(52556),s=n(59066),l=n(95746),c=n(14621),d=n(6692),p=n(66434),u=n(19976),m=n(58434),h=n(60571);class v extends c.default{constructor(e,t=!1,n=null){if(super(),null!=e){switch(this.buildDomainModel(this,e,{id:null,userId:null,organizationId:null,folderId:null,name:null,notes:null},t,["id","userId","organizationId","folderId"]),this.type=e.type,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,null!=e.viewPassword?this.viewPassword=e.viewPassword:this.viewPassword=!0,this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null,this.collectionIds=e.collectionIds,this.localData=n,this.deletedDate=null!=e.deletedDate?new Date(e.deletedDate):null,this.reprompt=e.reprompt,this.type){case r.CipherType.Login:this.login=new u.Login(e.login,t);break;case r.CipherType.SecureNote:this.secureNote=new h.SecureNote(e.secureNote,t);break;case r.CipherType.Card:this.card=new l.Card(e.card,t);break;case r.CipherType.Identity:this.identity=new p.Identity(e.identity,t)}null!=e.attachments?this.attachments=e.attachments.map((e=>new s.Attachment(e,t))):this.attachments=null,null!=e.fields?this.fields=e.fields.map((e=>new d.Field(e,t))):this.fields=null,null!=e.passwordHistory?this.passwordHistory=e.passwordHistory.map((e=>new m.Password(e,t))):this.passwordHistory=null}}decrypt(e){return i(this,void 0,void 0,(function*(){const t=new a.CipherView(this);switch(yield this.decryptObj(t,{name:null,notes:null},this.organizationId,e),this.type){case r.CipherType.Login:t.login=yield this.login.decrypt(this.organizationId,e);break;case r.CipherType.SecureNote:t.secureNote=yield this.secureNote.decrypt(this.organizationId,e);break;case r.CipherType.Card:t.card=yield this.card.decrypt(this.organizationId,e);break;case r.CipherType.Identity:t.identity=yield this.identity.decrypt(this.organizationId,e)}const n=this.organizationId;if(null!=this.attachments&&this.attachments.length>0){const i=[];yield this.attachments.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.attachments=i}if(null!=this.fields&&this.fields.length>0){const i=[];yield this.fields.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.fields=i}if(null!=this.passwordHistory&&this.passwordHistory.length>0){const i=[];yield this.passwordHistory.reduce(((t,r)=>t.then((()=>r.decrypt(n,e))).then((e=>{i.push(e)}))),Promise.resolve()),t.passwordHistory=i}return t}))}toCipherData(e){const t=new o.CipherData;switch(t.id=this.id,t.organizationId=this.organizationId,t.folderId=this.folderId,t.userId=null!=this.organizationId?e:null,t.edit=this.edit,t.viewPassword=this.viewPassword,t.organizationUseTotp=this.organizationUseTotp,t.favorite=this.favorite,t.revisionDate=null!=this.revisionDate?this.revisionDate.toISOString():null,t.type=this.type,t.collectionIds=this.collectionIds,t.deletedDate=null!=this.deletedDate?this.deletedDate.toISOString():null,t.reprompt=this.reprompt,this.buildDataModel(this,t,{name:null,notes:null}),t.type){case r.CipherType.Login:t.login=this.login.toLoginData();break;case r.CipherType.SecureNote:t.secureNote=this.secureNote.toSecureNoteData();break;case r.CipherType.Card:t.card=this.card.toCardData();break;case r.CipherType.Identity:t.identity=this.identity.toIdentityData()}return null!=this.fields&&(t.fields=this.fields.map((e=>e.toFieldData()))),null!=this.attachments&&(t.attachments=this.attachments.map((e=>e.toAttachmentData()))),null!=this.passwordHistory&&(t.passwordHistory=this.passwordHistory.map((e=>e.toPasswordHistoryData()))),t}}t.Cipher=v},30260:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;const i=n(82186),r=n(14621);class o extends r.default{constructor(e,t=!1){super(),null!=e&&this.buildDomainModel(this,e,{id:null,organizationId:null,name:null,externalId:null,readOnly:null,hidePasswords:null},t,["id","organizationId","externalId","readOnly","hidePasswords"])}decrypt(){return this.decryptObj(new i.CollectionView(this),{name:null},this.organizationId)}}t.Collection=o},4465:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DecryptParameters=void 0;t.DecryptParameters=class{}},14621:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0});const r=n(66607);t.default=class{buildDomainModel(e,t,n,i,o=[]){for(const a in n){if(!n.hasOwnProperty(a))continue;const s=t[n[a]||a];!0===i||o.indexOf(a)>-1?e[a]=s||null:e[a]=s?new r.EncString(s):null}}buildDataModel(e,t,n,i=[]){for(const r in n){if(!n.hasOwnProperty(r))continue;const o=e[n[r]||r];i.indexOf(r)>-1?t[r]=null!=o?o:null:t[r]=null!=o?o.encryptedString:null}}decryptObj(e,t,n,r=null){return i(this,void 0,void 0,(function*(){const i=[],o=this;for(const a in t)t.hasOwnProperty(a)&&function(a){const s=Promise.resolve().then((()=>{const e=t[a]||a;return o[e]?o[e].decrypt(n,r):null})).then((t=>{e[a]=t}));i.push(s)}(a);return yield Promise.all(i),e}))}}},65850:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncArrayBuffer=void 0;t.EncArrayBuffer=class{constructor(e){this.buffer=e}}},66607:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EncString=void 0;const r=n(45419),o=n(70829);t.EncString=class{constructor(e,t,n,i){if(null!=t){const r=e;return this.encryptedString=null!=n?r+"."+n+"|"+t:r+"."+t,null!=i&&(this.encryptedString+="|"+i),this.encryptionType=r,this.data=t,this.iv=n,void(this.mac=i)}if(this.encryptedString=e,!this.encryptedString)return;const o=this.encryptedString.split(".");let a=null;if(2===o.length)try{this.encryptionType=parseInt(o[0],null),a=o[1].split("|")}catch(s){return}else a=this.encryptedString.split("|"),this.encryptionType=3===a.length?r.EncryptionType.AesCbc128_HmacSha256_B64:r.EncryptionType.AesCbc256_B64;switch(this.encryptionType){case r.EncryptionType.AesCbc128_HmacSha256_B64:case r.EncryptionType.AesCbc256_HmacSha256_B64:if(3!==a.length)return;this.iv=a[0],this.data=a[1],this.mac=a[2];break;case r.EncryptionType.AesCbc256_B64:if(2!==a.length)return;this.iv=a[0],this.data=a[1];break;case r.EncryptionType.Rsa2048_OaepSha256_B64:case r.EncryptionType.Rsa2048_OaepSha1_B64:if(1!==a.length)return;this.data=a[0];break;default:return}}decrypt(e,t=null){return i(this,void 0,void 0,(function*(){if(null!=this.decryptedValue)return this.decryptedValue;let n;const i=o.Utils.global.bitwardenContainerService;if(!i)throw new Error("global bitwardenContainerService not initialized.");n=i.getCryptoService();try{null==t&&(t=yield n.getOrgKey(e)),this.decryptedValue=yield n.decryptToUtf8(this,t)}catch(r){this.decryptedValue="[error: cannot decrypt]"}return this.decryptedValue}))}}},92422:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptedObject=void 0;t.EncryptedObject=class{}},53797:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentUrls=void 0;t.EnvironmentUrls=class{constructor(){this.base=null,this.api=null,this.identity=null,this.icons=null,this.notifications=null,this.events=null,this.webVault=null,this.keyConnector=null}}},6692:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;const i=n(17958),r=n(14621),o=n(58841);class a extends r.default{constructor(e,t=!1){super(),null!=e&&(this.type=e.type,this.linkedId=e.linkedId,this.buildDomainModel(this,e,{name:null,value:null},t,[]))}decrypt(e,t){return this.decryptObj(new o.FieldView(this),{name:null,value:null},e,t)}toFieldData(){const e=new i.FieldData;return this.buildDataModel(this,e,{name:null,value:null,type:null,linkedId:null},["type","linkedId"]),e}}t.Field=a},60149:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0;const i=n(50044),r=n(14621);class o extends r.default{constructor(e,t=!1){super(),null!=e&&(this.buildDomainModel(this,e,{id:null,name:null},t,["id"]),this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null)}decrypt(){return this.decryptObj(new i.FolderView(this),{name:null},null)}}t.Folder=o},1104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GeneratedPasswordHistory=void 0;t.GeneratedPasswordHistory=class{constructor(e,t){this.password=e,this.date=t}}},51338:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalState=void 0;const i=n(35979),r=n(53387),o=n(53797),a=n(56393);t.GlobalState=class{constructor(){this.locale="en",this.theme=r.ThemeType.System,this.window=new a.WindowState,this.stateVersion=i.StateVersion.One,this.environmentUrls=new o.EnvironmentUrls}}},66434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;const i=n(7188),r=n(14621),o=n(92643);class a extends r.default{constructor(e,t=!1){super(),null!=e&&this.buildDomainModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},t,[])}decrypt(e,t){return this.decryptObj(new o.IdentityView(this),{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},e,t)}toIdentityData(){const e=new i.IdentityData;return this.buildDataModel(this,e,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null}),e}}t.Identity=a},93292:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportResult=void 0;t.ImportResult=class{constructor(){this.success=!1,this.ciphers=[],this.folders=[],this.folderRelationships=[],this.collections=[],this.collectionRelationships=[]}}},19976:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;const r=n(68058),o=n(36883),a=n(52450),s=n(14621);class l extends s.default{constructor(e,t=!1){super(),null!=e&&(this.passwordRevisionDate=null!=e.passwordRevisionDate?new Date(e.passwordRevisionDate):null,this.autofillOnPageLoad=e.autofillOnPageLoad,this.buildDomainModel(this,e,{username:null,password:null,totp:null},t,[]),e.uris&&(this.uris=[],e.uris.forEach((e=>{this.uris.push(new r.LoginUri(e,t))}))))}decrypt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.decryptObj(new a.LoginView(this),{username:null,password:null,totp:null},e,t);if(null!=this.uris){n.uris=[];for(let i=0;i<this.uris.length;i++){const r=yield this.uris[i].decrypt(e,t);n.uris.push(r)}}return n}))}toLoginData(){const e=new o.LoginData;return e.passwordRevisionDate=null!=this.passwordRevisionDate?this.passwordRevisionDate.toISOString():null,e.autofillOnPageLoad=this.autofillOnPageLoad,this.buildDataModel(this,e,{username:null,password:null,totp:null}),null!=this.uris&&this.uris.length>0&&(e.uris=[],this.uris.forEach((t=>{e.uris.push(t.toLoginUriData())}))),e}}t.Login=l},68058:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;const i=n(86279),r=n(38138),o=n(14621);class a extends o.default{constructor(e,t=!1){super(),null!=e&&(this.match=e.match,this.buildDomainModel(this,e,{uri:null},t,[]))}decrypt(e,t){return this.decryptObj(new r.LoginUriView(this),{uri:null},e,t)}toLoginUriData(){const e=new i.LoginUriData;return this.buildDataModel(this,e,{uri:null},["match"]),e}}t.LoginUri=a},91577:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyOptions=void 0;const i=n(14621);class r extends i.default{constructor(){super(...arguments),this.minComplexity=0,this.minLength=0,this.requireUpper=!1,this.requireLower=!1,this.requireNumbers=!1,this.requireSpecial=!1}}t.MasterPasswordPolicyOptions=r},30608:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Organization=void 0;const i=n(68320),r=n(16233);t.Organization=class{constructor(e){null!=e&&(this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.usePolicies=e.usePolicies,this.useGroups=e.useGroups,this.useDirectory=e.useDirectory,this.useEvents=e.useEvents,this.useTotp=e.useTotp,this.use2fa=e.use2fa,this.useApi=e.useApi,this.useSso=e.useSso,this.useKeyConnector=e.useKeyConnector,this.useResetPassword=e.useResetPassword,this.selfHost=e.selfHost,this.usersGetPremium=e.usersGetPremium,this.seats=e.seats,this.maxCollections=e.maxCollections,this.maxStorageGb=e.maxStorageGb,this.ssoBound=e.ssoBound,this.identifier=e.identifier,this.permissions=e.permissions,this.resetPasswordEnrolled=e.resetPasswordEnrolled,this.userId=e.userId,this.hasPublicAndPrivateKeys=e.hasPublicAndPrivateKeys,this.providerId=e.providerId,this.providerName=e.providerName,this.isProviderUser=e.isProviderUser,this.familySponsorshipFriendlyName=e.familySponsorshipFriendlyName,this.familySponsorshipAvailable=e.familySponsorshipAvailable,this.planProductType=e.planProductType,this.keyConnectorEnabled=e.keyConnectorEnabled,this.keyConnectorUrl=e.keyConnectorUrl)}get canAccess(){return this.type===r.OrganizationUserType.Owner||this.enabled&&this.status===i.OrganizationUserStatusType.Confirmed}get isManager(){return this.type===r.OrganizationUserType.Manager||this.type===r.OrganizationUserType.Owner||this.type===r.OrganizationUserType.Admin}get isAdmin(){return this.type===r.OrganizationUserType.Owner||this.type===r.OrganizationUserType.Admin}get isOwner(){return this.type===r.OrganizationUserType.Owner||this.isProviderUser}get canAccessEventLogs(){return this.isAdmin||this.permissions.accessEventLogs}get canAccessImportExport(){return this.isAdmin||this.permissions.accessImportExport}get canAccessReports(){return this.isAdmin||this.permissions.accessReports}get canCreateNewCollections(){var e;return this.isManager||(null!==(e=this.permissions.createNewCollections)&&void 0!==e?e:this.permissions.manageAllCollections)}get canEditAnyCollection(){var e;return this.isAdmin||(null!==(e=this.permissions.editAnyCollection)&&void 0!==e?e:this.permissions.manageAllCollections)}get canDeleteAnyCollection(){var e;return this.isAdmin||(null!==(e=this.permissions.deleteAnyCollection)&&void 0!==e?e:this.permissions.manageAllCollections)}get canViewAllCollections(){return this.canCreateNewCollections||this.canEditAnyCollection||this.canDeleteAnyCollection}get canEditAssignedCollections(){var e;return this.isManager||(null!==(e=this.permissions.editAssignedCollections)&&void 0!==e?e:this.permissions.manageAssignedCollections)}get canDeleteAssignedCollections(){var e;return this.isManager||(null!==(e=this.permissions.deleteAssignedCollections)&&void 0!==e?e:this.permissions.manageAssignedCollections)}get canViewAssignedCollections(){return this.canDeleteAssignedCollections||this.canEditAssignedCollections}get canManageGroups(){return this.isAdmin||this.permissions.manageGroups}get canManageSso(){return this.isAdmin||this.permissions.manageSso}get canManagePolicies(){return this.isAdmin||this.permissions.managePolicies}get canManageUsers(){return this.isAdmin||this.permissions.manageUsers}get canManageUsersPassword(){return this.isAdmin||this.permissions.manageResetPassword}get isExemptFromPolicies(){return this.canManagePolicies}}},58434:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Password=void 0;const i=n(60667),r=n(14621),o=n(27551);class a extends r.default{constructor(e,t=!1){super(),null!=e&&(this.buildDomainModel(this,e,{password:null},t),this.lastUsedDate=new Date(e.lastUsedDate))}decrypt(e,t){return this.decryptObj(new o.PasswordHistoryView(this),{password:null},e,t)}toPasswordHistoryData(){const e=new i.PasswordHistoryData;return e.lastUsedDate=this.lastUsedDate.toISOString(),this.buildDataModel(this,e,{password:null}),e}}t.Password=a},65507:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyOptions=void 0;const i=n(14621);class r extends i.default{constructor(){super(...arguments),this.defaultType="",this.minLength=0,this.useUppercase=!1,this.useLowercase=!1,this.useNumbers=!1,this.numberCount=0,this.useSpecial=!1,this.specialCount=0,this.minNumberWords=0,this.capitalize=!1,this.includeNumber=!1}inEffect(){return""!==this.defaultType||this.minLength>0||this.numberCount>0||this.specialCount>0||this.useUppercase||this.useLowercase||this.useNumbers||this.useSpecial||this.minNumberWords>0||this.capitalize||this.includeNumber}}t.PasswordGeneratorPolicyOptions=r},5784:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Policy=void 0;const i=n(14621);class r extends i.default{constructor(e){super(),null!=e&&(this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled)}}t.Policy=r},23723:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;const i=n(80675),r=n(47073);t.Provider=class{constructor(e){null!=e&&(this.id=e.id,this.name=e.name,this.status=e.status,this.type=e.type,this.enabled=e.enabled,this.userId=e.userId,this.useEvents=e.useEvents)}get canAccess(){return!!this.isProviderAdmin||this.enabled&&this.status===i.ProviderUserStatusType.Confirmed}get canCreateOrganizations(){return this.enabled&&this.isProviderAdmin}get canManageUsers(){return this.isProviderAdmin}get canAccessEventLogs(){return this.isProviderAdmin}get isProviderAdmin(){return this.type===r.ProviderUserType.ProviderAdmin}}},56014:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyOptions=void 0;const i=n(14621);class r extends i.default{constructor(){super(...arguments),this.autoEnrollEnabled=!1}}t.ResetPasswordPolicyOptions=r},60571:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;const i=n(17402),r=n(14621),o=n(56561);class a extends r.default{constructor(e,t=!1){super(),null!=e&&(this.type=e.type)}decrypt(e,t){return Promise.resolve(new o.SecureNoteView(this))}toSecureNoteData(){const e=new i.SecureNoteData;return e.type=this.type,e}}t.SecureNote=a},97038:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.Send=void 0;const r=n(49538),o=n(70829),a=n(21801),s=n(14621),l=n(37500),c=n(59574);class d extends s.default{constructor(e,t=!1){if(super(),null!=e)switch(this.buildDomainModel(this,e,{id:null,accessId:null,userId:null,name:null,notes:null,key:null},t,["id","accessId","userId"]),this.type=e.type,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.password=e.password,this.disabled=e.disabled,this.revisionDate=null!=e.revisionDate?new Date(e.revisionDate):null,this.deletionDate=null!=e.deletionDate?new Date(e.deletionDate):null,this.expirationDate=null!=e.expirationDate?new Date(e.expirationDate):null,this.hideEmail=e.hideEmail,this.type){case r.SendType.Text:this.text=new c.SendText(e.text,t);break;case r.SendType.File:this.file=new l.SendFile(e.file,t)}}decrypt(){return i(this,void 0,void 0,(function*(){const e=new a.SendView(this);let t;const n=o.Utils.global.bitwardenContainerService;if(!n)throw new Error("global bitwardenContainerService not initialized.");t=n.getCryptoService();try{e.key=yield t.decryptToBytes(this.key,null),e.cryptoKey=yield t.makeSendKey(e.key)}catch(i){}switch(yield this.decryptObj(e,{name:null,notes:null},null,e.cryptoKey),this.type){case r.SendType.File:e.file=yield this.file.decrypt(e.cryptoKey);break;case r.SendType.Text:e.text=yield this.text.decrypt(e.cryptoKey)}return e}))}}t.Send=d},63290:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccess=void 0;const r=n(49538),o=n(69254),a=n(14621),s=n(37500),l=n(59574);class c extends a.default{constructor(e,t=!1){if(super(),null!=e)switch(this.buildDomainModel(this,e,{id:null,name:null,expirationDate:null,creatorIdentifier:null},t,["id","expirationDate","creatorIdentifier"]),this.type=e.type,this.type){case r.SendType.Text:this.text=new l.SendText(e.text,t);break;case r.SendType.File:this.file=new s.SendFile(e.file,t)}}decrypt(e){return i(this,void 0,void 0,(function*(){const t=new o.SendAccessView(this);switch(yield this.decryptObj(t,{name:null},null,e),this.type){case r.SendType.File:t.file=yield this.file.decrypt(e);break;case r.SendType.Text:t.text=yield this.text.decrypt(e)}return t}))}}t.SendAccess=c},37500:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendFile=void 0;const r=n(14621),o=n(26425);class a extends r.default{constructor(e,t=!1){super(),null!=e&&(this.size=e.size,this.buildDomainModel(this,e,{id:null,sizeName:null,fileName:null},t,["id","sizeName"]))}decrypt(e){return i(this,void 0,void 0,(function*(){return yield this.decryptObj(new o.SendFileView(this),{fileName:null},null,e)}))}}t.SendFile=a},59574:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendText=void 0;const i=n(14621),r=n(24018);class o extends i.default{constructor(e,t=!1){super(),null!=e&&(this.hidden=e.hidden,this.buildDomainModel(this,e,{text:null},t,[]))}decrypt(e){return this.decryptObj(new r.SendTextView(this),{text:null},null,e)}}t.SendText=o},5181:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortedCiphersCache=void 0;t.SortedCiphersCache=class{constructor(e){this.comparator=e,this.sortedCiphersByUrl=new Map,this.timeouts=new Map}isCached(e){return this.sortedCiphersByUrl.has(e)}addCiphers(e,t){t.sort(this.comparator),this.sortedCiphersByUrl.set(e,new n(t)),this.resetTimer(e)}getLastUsed(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastUsed():null}getLastLaunched(e){return this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastLaunched():null}getNext(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getNext():null}updateLastUsedIndex(e){this.isCached(e)&&this.sortedCiphersByUrl.get(e).updateLastUsedIndex()}clear(){this.sortedCiphersByUrl.clear(),this.timeouts.clear()}resetTimer(e){clearTimeout(this.timeouts.get(e)),this.timeouts.set(e,setTimeout((()=>{this.sortedCiphersByUrl.delete(e),this.timeouts.delete(e)}),3e3))}};class n{constructor(e){this.ciphers=e,this.lastUsedIndex=-1}getLastUsed(){return this.lastUsedIndex=Math.max(this.lastUsedIndex,0),this.ciphers[this.lastUsedIndex]}getLastLaunched(){return this.ciphers.filter((e=>{var t;return null===(t=e.localData)||void 0===t?void 0:t.lastLaunched})).sort(((e,t)=>t.localData.lastLaunched.valueOf()-e.localData.lastLaunched.valueOf()))[0]}getNextIndex(){return(this.lastUsedIndex+1)%this.ciphers.length}getNext(){return this.ciphers[this.getNextIndex()]}updateLastUsedIndex(){this.lastUsedIndex=this.getNextIndex()}}},72190:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;t.State=class{constructor(e){this.accounts={},this.authenticatedAccounts=[],this.accountActivity={},this.globals=e}}},61833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SymmetricCryptoKey=void 0;const i=n(45419),r=n(70829);t.SymmetricCryptoKey=class{constructor(e,t){if(null==e)throw new Error("Must provide key");if(null==t)if(32===e.byteLength)t=i.EncryptionType.AesCbc256_B64;else{if(64!==e.byteLength)throw new Error("Unable to determine encType.");t=i.EncryptionType.AesCbc256_HmacSha256_B64}if(this.key=e,this.encType=t,t===i.EncryptionType.AesCbc256_B64&&32===e.byteLength)this.encKey=e,this.macKey=null;else if(t===i.EncryptionType.AesCbc128_HmacSha256_B64&&32===e.byteLength)this.encKey=e.slice(0,16),this.macKey=e.slice(16,32);else{if(t!==i.EncryptionType.AesCbc256_HmacSha256_B64||64!==e.byteLength)throw new Error("Unsupported encType/key length.");this.encKey=e.slice(0,32),this.macKey=e.slice(32,64)}null!=this.key&&(this.keyB64=r.Utils.fromBufferToB64(this.key)),null!=this.encKey&&(this.encKeyB64=r.Utils.fromBufferToB64(this.encKey)),null!=this.macKey&&(this.macKeyB64=r.Utils.fromBufferToB64(this.macKey))}}},96836:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNode=void 0;t.TreeNode=class{constructor(e,t,n){this.children=[],this.parent=n,this.node=e,this.node.name=t}}},56393:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WindowState=void 0;t.WindowState=class{}},77111:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;const i=n(17283),r=n(95746),o=n(66607);class a{constructor(e){var t,n,r,o,a,s;null!=e&&(e instanceof i.CardView?(this.cardholderName=e.cardholderName,this.brand=e.brand,this.number=e.number,this.expMonth=e.expMonth,this.expYear=e.expYear,this.code=e.code):(this.cardholderName=null===(t=e.cardholderName)||void 0===t?void 0:t.encryptedString,this.brand=null===(n=e.brand)||void 0===n?void 0:n.encryptedString,this.number=null===(r=e.number)||void 0===r?void 0:r.encryptedString,this.expMonth=null===(o=e.expMonth)||void 0===o?void 0:o.encryptedString,this.expYear=null===(a=e.expYear)||void 0===a?void 0:a.encryptedString,this.code=null===(s=e.code)||void 0===s?void 0:s.encryptedString))}static template(){const e=new a;return e.cardholderName="John Doe",e.brand="visa",e.number="4242424242424242",e.expMonth="04",e.expYear="2023",e.code="123",e}static toView(e,t=new i.CardView){return t.cardholderName=e.cardholderName,t.brand=e.brand,t.number=e.number,t.expMonth=e.expMonth,t.expYear=e.expYear,t.code=e.code,t}static toDomain(e,t=new r.Card){return t.cardholderName=null!=e.cardholderName?new o.EncString(e.cardholderName):null,t.brand=null!=e.brand?new o.EncString(e.brand):null,t.number=null!=e.number?new o.EncString(e.number):null,t.expMonth=null!=e.expMonth?new o.EncString(e.expMonth):null,t.expYear=null!=e.expYear?new o.EncString(e.expYear):null,t.code=null!=e.code?new o.EncString(e.code):null,t}}t.Card=a},18237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cipher=void 0;const i=n(2944),r=n(23635),o=n(52556),a=n(78758),s=n(66607),l=n(77111),c=n(43295),d=n(10703),p=n(76350),u=n(34390);class m{static template(){const e=new m;return e.organizationId=null,e.collectionIds=null,e.folderId=null,e.type=r.CipherType.Login,e.name="Item name",e.notes="Some notes about this item.",e.favorite=!1,e.fields=[],e.login=null,e.secureNote=null,e.card=null,e.identity=null,e.reprompt=i.CipherRepromptType.None,e}static toView(e,t=new o.CipherView){var n,a,s;if(t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.collectionIds||e.collectionIds){const i=new Set((null!==(n=t.collectionIds)&&void 0!==n?n:[]).concat(null!==(a=e.collectionIds)&&void 0!==a?a:[]));t.collectionIds=Array.from(i.values())}switch(t.name=e.name,t.notes=e.notes,t.favorite=e.favorite,t.reprompt=null!==(s=e.reprompt)&&void 0!==s?s:i.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((e=>c.Field.toView(e)))),e.type){case r.CipherType.Login:t.login=p.Login.toView(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNote.toView(e.secureNote);break;case r.CipherType.Card:t.card=l.Card.toView(e.card);break;case r.CipherType.Identity:t.identity=d.Identity.toView(e.identity)}return t}static toDomain(e,t=new a.Cipher){var n;switch(t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.name=null!=e.name?new s.EncString(e.name):null,t.notes=null!=e.notes?new s.EncString(e.notes):null,t.favorite=e.favorite,t.reprompt=null!==(n=e.reprompt)&&void 0!==n?n:i.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((e=>c.Field.toDomain(e)))),e.type){case r.CipherType.Login:t.login=p.Login.toDomain(e.login);break;case r.CipherType.SecureNote:t.secureNote=u.SecureNote.toDomain(e.secureNote);break;case r.CipherType.Card:t.card=l.Card.toDomain(e.card);break;case r.CipherType.Identity:t.identity=d.Identity.toDomain(e.identity)}return t}build(e){var t,n;switch(this.organizationId=e.organizationId,this.folderId=e.folderId,this.type=e.type,this.reprompt=e.reprompt,e instanceof o.CipherView?(this.name=e.name,this.notes=e.notes):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.notes=null===(n=e.notes)||void 0===n?void 0:n.encryptedString),this.favorite=e.favorite,null!=e.fields&&(o.CipherView,this.fields=e.fields.map((e=>new c.Field(e)))),e.type){case r.CipherType.Login:this.login=new p.Login(e.login);break;case r.CipherType.SecureNote:this.secureNote=new u.SecureNote(e.secureNote);break;case r.CipherType.Card:this.card=new l.Card(e.card);break;case r.CipherType.Identity:this.identity=new d.Identity(e.identity)}}}t.Cipher=m},7064:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherWithIds=void 0;const i=n(18237);class r extends i.Cipher{build(e){this.id=e.id,super.build(e),this.collectionIds=e.collectionIds}}t.CipherWithIds=r},8131:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;const i=n(82186),r=n(30260),o=n(66607);class a{static template(){const e=new a;return e.organizationId="00000000-0000-0000-0000-000000000000",e.name="Collection name",e.externalId=null,e}static toView(e,t=new i.CollectionView){return t.name=e.name,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t}static toDomain(e,t=new r.Collection){return t.name=null!=e.name?new o.EncString(e.name):null,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t}build(e){var t;this.organizationId=e.organizationId,e instanceof i.CollectionView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.externalId=e.externalId}}t.Collection=a},79937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionWithId=void 0;const i=n(8131);class r extends i.Collection{build(e){this.id=e.id,super.build(e)}}t.CollectionWithId=r},14259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;const i=n(12657);t.Event=class{constructor(e){this.message=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=i.EventType[e.type]}}},43295:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;const i=n(18276),r=n(58841),o=n(66607),a=n(6692);class s{constructor(e){var t,n;null!=e&&(e instanceof r.FieldView?(this.name=e.name,this.value=e.value):(this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.value=null===(n=e.value)||void 0===n?void 0:n.encryptedString),this.type=e.type,this.linkedId=e.linkedId)}static template(){const e=new s;return e.name="Field name",e.value="Some value",e.type=i.FieldType.Text,e}static toView(e,t=new r.FieldView){return t.type=e.type,t.value=e.value,t.name=e.name,t.linkedId=e.linkedId,t}static toDomain(e,t=new a.Field){return t.type=e.type,t.value=null!=e.value?new o.EncString(e.value):null,t.name=null!=e.name?new o.EncString(e.name):null,t.linkedId=e.linkedId,t}}t.Field=s},85139:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0;const i=n(50044),r=n(66607),o=n(60149);class a{static template(){const e=new a;return e.name="Folder name",e}static toView(e,t=new i.FolderView){return t.name=e.name,t}static toDomain(e,t=new o.Folder){return t.name=null!=e.name?new r.EncString(e.name):null,t}build(e){var t;e instanceof i.FolderView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString}}t.Folder=a},50901:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWithId=void 0;const i=n(85139);class r extends i.Folder{build(e){this.id=e.id,super.build(e)}}t.FolderWithId=r},10703:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;const i=n(92643),r=n(66607),o=n(66434);class a{constructor(e){var t,n,r,o,a,s,l,c,d,p,u,m,h,v,f,g,y,x;null!=e&&(e instanceof i.IdentityView?(this.title=e.title,this.firstName=e.firstName,this.middleName=e.middleName,this.lastName=e.lastName,this.address1=e.address1,this.address2=e.address2,this.address3=e.address3,this.city=e.city,this.state=e.state,this.postalCode=e.postalCode,this.country=e.country,this.company=e.company,this.email=e.email,this.phone=e.phone,this.ssn=e.ssn,this.username=e.username,this.passportNumber=e.passportNumber,this.licenseNumber=e.licenseNumber):(this.title=null===(t=e.title)||void 0===t?void 0:t.encryptedString,this.firstName=null===(n=e.firstName)||void 0===n?void 0:n.encryptedString,this.middleName=null===(r=e.middleName)||void 0===r?void 0:r.encryptedString,this.lastName=null===(o=e.lastName)||void 0===o?void 0:o.encryptedString,this.address1=null===(a=e.address1)||void 0===a?void 0:a.encryptedString,this.address2=null===(s=e.address2)||void 0===s?void 0:s.encryptedString,this.address3=null===(l=e.address3)||void 0===l?void 0:l.encryptedString,this.city=null===(c=e.city)||void 0===c?void 0:c.encryptedString,this.state=null===(d=e.state)||void 0===d?void 0:d.encryptedString,this.postalCode=null===(p=e.postalCode)||void 0===p?void 0:p.encryptedString,this.country=null===(u=e.country)||void 0===u?void 0:u.encryptedString,this.company=null===(m=e.company)||void 0===m?void 0:m.encryptedString,this.email=null===(h=e.email)||void 0===h?void 0:h.encryptedString,this.phone=null===(v=e.phone)||void 0===v?void 0:v.encryptedString,this.ssn=null===(f=e.ssn)||void 0===f?void 0:f.encryptedString,this.username=null===(g=e.username)||void 0===g?void 0:g.encryptedString,this.passportNumber=null===(y=e.passportNumber)||void 0===y?void 0:y.encryptedString,this.licenseNumber=null===(x=e.licenseNumber)||void 0===x?void 0:x.encryptedString))}static template(){const e=new a;return e.title="Mr",e.firstName="John",e.middleName="William",e.lastName="Doe",e.address1="123 Any St",e.address2="Apt #123",e.address3=null,e.city="New York",e.state="NY",e.postalCode="10001",e.country="US",e.company="Acme Inc.",e.email="john@company.com",e.phone="5555551234",e.ssn="000-123-4567",e.username="jdoe",e.passportNumber="US-123456789",e.licenseNumber="D123-12-123-12333",e}static toView(e,t=new i.IdentityView){return t.title=e.title,t.firstName=e.firstName,t.middleName=e.middleName,t.lastName=e.lastName,t.address1=e.address1,t.address2=e.address2,t.address3=e.address3,t.city=e.city,t.state=e.state,t.postalCode=e.postalCode,t.country=e.country,t.company=e.company,t.email=e.email,t.phone=e.phone,t.ssn=e.ssn,t.username=e.username,t.passportNumber=e.passportNumber,t.licenseNumber=e.licenseNumber,t}static toDomain(e,t=new o.Identity){return t.title=null!=e.title?new r.EncString(e.title):null,t.firstName=null!=e.firstName?new r.EncString(e.firstName):null,t.middleName=null!=e.middleName?new r.EncString(e.middleName):null,t.lastName=null!=e.lastName?new r.EncString(e.lastName):null,t.address1=null!=e.address1?new r.EncString(e.address1):null,t.address2=null!=e.address2?new r.EncString(e.address2):null,t.address3=null!=e.address3?new r.EncString(e.address3):null,t.city=null!=e.city?new r.EncString(e.city):null,t.state=null!=e.state?new r.EncString(e.state):null,t.postalCode=null!=e.postalCode?new r.EncString(e.postalCode):null,t.country=null!=e.country?new r.EncString(e.country):null,t.company=null!=e.company?new r.EncString(e.company):null,t.email=null!=e.email?new r.EncString(e.email):null,t.phone=null!=e.phone?new r.EncString(e.phone):null,t.ssn=null!=e.ssn?new r.EncString(e.ssn):null,t.username=null!=e.username?new r.EncString(e.username):null,t.passportNumber=null!=e.passportNumber?new r.EncString(e.passportNumber):null,t.licenseNumber=null!=e.licenseNumber?new r.EncString(e.licenseNumber):null,t}}t.Identity=a},76350:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;const i=n(65481),r=n(52450),o=n(66607),a=n(19976);class s{constructor(e){var t,n,o;null!=e&&(null!=e.uris&&(r.LoginView,this.uris=e.uris.map((e=>new i.LoginUri(e)))),e instanceof r.LoginView?(this.username=e.username,this.password=e.password,this.totp=e.totp):(this.username=null===(t=e.username)||void 0===t?void 0:t.encryptedString,this.password=null===(n=e.password)||void 0===n?void 0:n.encryptedString,this.totp=null===(o=e.totp)||void 0===o?void 0:o.encryptedString))}static template(){const e=new s;return e.uris=[],e.username="jdoe",e.password="myp@ssword123",e.totp="JBSWY3DPEHPK3PXP",e}static toView(e,t=new r.LoginView){return null!=e.uris&&(t.uris=e.uris.map((e=>i.LoginUri.toView(e)))),t.username=e.username,t.password=e.password,t.totp=e.totp,t}static toDomain(e,t=new a.Login){return null!=e.uris&&(t.uris=e.uris.map((e=>i.LoginUri.toDomain(e)))),t.username=null!=e.username?new o.EncString(e.username):null,t.password=null!=e.password?new o.EncString(e.password):null,t.totp=null!=e.totp?new o.EncString(e.totp):null,t}}t.Login=s},65481:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;const i=n(38138),r=n(66607),o=n(68058);class a{constructor(e){var t;this.match=null,null!=e&&(e instanceof i.LoginUriView?this.uri=e.uri:this.uri=null===(t=e.uri)||void 0===t?void 0:t.encryptedString,this.match=e.match)}static template(){const e=new a;return e.uri="https://google.com",e.match=null,e}static toView(e,t=new i.LoginUriView){return t.uri=e.uri,t.match=e.match,t}static toDomain(e,t=new o.LoginUri){return t.uri=null!=e.uri?new r.EncString(e.uri):null,t.match=e.match,t}}t.LoginUri=a},34390:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;const i=n(94465),r=n(56561),o=n(60571);class a{constructor(e){null!=e&&(this.type=e.type)}static template(){const e=new a;return e.type=i.SecureNoteType.Generic,e}static toView(e,t=new r.SecureNoteView){return t.type=e.type,t}static toDomain(e,t=new o.SecureNote){return t.type=e.type,t}}t.SecureNote=a},51323:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetKeyConnectorKeyRequest=void 0;t.SetKeyConnectorKeyRequest=class{constructor(e,t,n,i,r){this.key=e,this.kdf=t,this.kdfIterations=n,this.orgIdentifier=i,this.keys=r}}},33401:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyOTPRequest=void 0;t.VerifyOTPRequest=class{constructor(e){this.OTP=e}}},27086:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentRequest=void 0;t.AttachmentRequest=class{}},15906:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BitPayInvoiceRequest=void 0;t.BitPayInvoiceRequest=class{}},11100:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkDeleteRequest=void 0;t.CipherBulkDeleteRequest=class{constructor(e,t){this.ids=null==e?[]:e,this.organizationId=t}}},9015:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkMoveRequest=void 0;t.CipherBulkMoveRequest=class{constructor(e,t){this.ids=null==e?[]:e,this.folderId=t}}},38037:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkRestoreRequest=void 0;t.CipherBulkRestoreRequest=class{constructor(e){this.ids=null==e?[]:e}}},92042:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkShareRequest=void 0;const i=n(57509);t.CipherBulkShareRequest=class{constructor(e,t){null!=e&&(this.ciphers=[],e.forEach((e=>{this.ciphers.push(new i.CipherWithIdRequest(e))}))),this.collectionIds=t}}},79873:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherCollectionsRequest=void 0;t.CipherCollectionsRequest=class{constructor(e){this.collectionIds=null==e?[]:e}}},53552:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherCreateRequest=void 0;const i=n(52675);t.CipherCreateRequest=class{constructor(e){this.cipher=new i.CipherRequest(e),this.collectionIds=e.collectionIds}}},52675:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRequest=void 0;const i=n(23635),r=n(69930),o=n(6847),a=n(17733),s=n(85489),l=n(72873),c=n(82976),d=n(27086);t.CipherRequest=class{constructor(e){switch(this.type=e.type,this.folderId=e.folderId,this.organizationId=e.organizationId,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.favorite=e.favorite,this.lastKnownRevisionDate=e.revisionDate,this.reprompt=e.reprompt,this.type){case i.CipherType.Login:this.login=new s.LoginApi,this.login.uris=null,this.login.username=e.login.username?e.login.username.encryptedString:null,this.login.password=e.login.password?e.login.password.encryptedString:null,this.login.passwordRevisionDate=null!=e.login.passwordRevisionDate?e.login.passwordRevisionDate.toISOString():null,this.login.totp=e.login.totp?e.login.totp.encryptedString:null,this.login.autofillOnPageLoad=e.login.autofillOnPageLoad,null!=e.login.uris&&(this.login.uris=e.login.uris.map((e=>{const t=new l.LoginUriApi;return t.uri=null!=e.uri?e.uri.encryptedString:null,t.match=null!=e.match?e.match:null,t})));break;case i.CipherType.SecureNote:this.secureNote=new c.SecureNoteApi,this.secureNote.type=e.secureNote.type;break;case i.CipherType.Card:this.card=new r.CardApi,this.card.cardholderName=null!=e.card.cardholderName?e.card.cardholderName.encryptedString:null,this.card.brand=null!=e.card.brand?e.card.brand.encryptedString:null,this.card.number=null!=e.card.number?e.card.number.encryptedString:null,this.card.expMonth=null!=e.card.expMonth?e.card.expMonth.encryptedString:null,this.card.expYear=null!=e.card.expYear?e.card.expYear.encryptedString:null,this.card.code=null!=e.card.code?e.card.code.encryptedString:null;break;case i.CipherType.Identity:this.identity=new a.IdentityApi,this.identity.title=null!=e.identity.title?e.identity.title.encryptedString:null,this.identity.firstName=null!=e.identity.firstName?e.identity.firstName.encryptedString:null,this.identity.middleName=null!=e.identity.middleName?e.identity.middleName.encryptedString:null,this.identity.lastName=null!=e.identity.lastName?e.identity.lastName.encryptedString:null,this.identity.address1=null!=e.identity.address1?e.identity.address1.encryptedString:null,this.identity.address2=null!=e.identity.address2?e.identity.address2.encryptedString:null,this.identity.address3=null!=e.identity.address3?e.identity.address3.encryptedString:null,this.identity.city=null!=e.identity.city?e.identity.city.encryptedString:null,this.identity.state=null!=e.identity.state?e.identity.state.encryptedString:null,this.identity.postalCode=null!=e.identity.postalCode?e.identity.postalCode.encryptedString:null,this.identity.country=null!=e.identity.country?e.identity.country.encryptedString:null,this.identity.company=null!=e.identity.company?e.identity.company.encryptedString:null,this.identity.email=null!=e.identity.email?e.identity.email.encryptedString:null,this.identity.phone=null!=e.identity.phone?e.identity.phone.encryptedString:null,this.identity.ssn=null!=e.identity.ssn?e.identity.ssn.encryptedString:null,this.identity.username=null!=e.identity.username?e.identity.username.encryptedString:null,this.identity.passportNumber=null!=e.identity.passportNumber?e.identity.passportNumber.encryptedString:null,this.identity.licenseNumber=null!=e.identity.licenseNumber?e.identity.licenseNumber.encryptedString:null}null!=e.fields&&(this.fields=e.fields.map((e=>{const t=new o.FieldApi;return t.type=e.type,t.name=e.name?e.name.encryptedString:null,t.value=e.value?e.value.encryptedString:null,t.linkedId=e.linkedId,t}))),null!=e.passwordHistory&&(this.passwordHistory=[],e.passwordHistory.forEach((e=>{this.passwordHistory.push({lastUsedDate:e.lastUsedDate,password:e.password?e.password.encryptedString:null})}))),null!=e.attachments&&(this.attachments={},this.attachments2={},e.attachments.forEach((e=>{const t=e.fileName?e.fileName.encryptedString:null;this.attachments[e.id]=t;const n=new d.AttachmentRequest;n.fileName=t,null!=e.key&&(n.key=e.key.encryptedString),this.attachments2[e.id]=n})))}}},47205:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherShareRequest=void 0;const i=n(52675);t.CipherShareRequest=class{constructor(e){this.cipher=new i.CipherRequest(e),this.collectionIds=e.collectionIds}}},57509:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherWithIdRequest=void 0;const i=n(52675);class r extends i.CipherRequest{constructor(e){super(e),this.id=e.id}}t.CipherWithIdRequest=r},26180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionRequest=void 0;t.CollectionRequest=class{constructor(e){this.groups=[],null!=e&&(this.name=e.name?e.name.encryptedString:null,this.externalId=e.externalId)}}},53849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteRecoverRequest=void 0;t.DeleteRecoverRequest=class{}},20013:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceRequest=void 0;t.DeviceRequest=class{constructor(e,t){this.type=t.getDevice(),this.name=t.getDeviceString(),this.identifier=e,this.pushToken=null}}},96103:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailRequest=void 0;const i=n(29565);class r extends i.EmailTokenRequest{}t.EmailRequest=r},29565:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmailTokenRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.EmailTokenRequest=r},48903:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAcceptRequest=void 0;t.EmergencyAccessAcceptRequest=class{}},93581:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessConfirmRequest=void 0;t.EmergencyAccessConfirmRequest=class{}},78104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessInviteRequest=void 0;t.EmergencyAccessInviteRequest=class{}},8061:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessPasswordRequest=void 0;t.EmergencyAccessPasswordRequest=class{}},62632:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessUpdateRequest=void 0;t.EmergencyAccessUpdateRequest=class{}},62849:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventRequest=void 0;t.EventRequest=class{}},27104:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderRequest=void 0;t.FolderRequest=class{constructor(e){this.name=e.name?e.name.encryptedString:null}}},82041:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWithIdRequest=void 0;const i=n(27104);class r extends i.FolderRequest{constructor(e){super(e),this.id=e.id}}t.FolderWithIdRequest=r},65575:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupRequest=void 0;t.GroupRequest=class{constructor(){this.collections=[]}}},54384:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportCiphersRequest=void 0;t.ImportCiphersRequest=class{constructor(){this.ciphers=[],this.folders=[],this.folderRelationships=[]}}},94834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportOrganizationCiphersRequest=void 0;t.ImportOrganizationCiphersRequest=class{constructor(){this.ciphers=[],this.collections=[],this.collectionRelationships=[]}}},9974:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KdfRequest=void 0;const i=n(25122);class r extends i.PasswordRequest{}t.KdfRequest=r},84555:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorUserKeyRequest=void 0;t.KeyConnectorUserKeyRequest=class{constructor(e){this.key=e}}},82822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysRequest=void 0;t.KeysRequest=class{constructor(e,t){this.publicKey=e,this.encryptedPrivateKey=t}}},44181:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KvpRequest=void 0;t.KvpRequest=class{constructor(e,t){this.key=e,this.value=t}}},95703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSponsorshipRedeemRequest=void 0;t.OrganizationSponsorshipRedeemRequest=class{}},47671:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoRequest=void 0;t.OrganizationSsoRequest=class{constructor(){this.enabled=!1}}},9207:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationCreateRequest=void 0;t.OrganizationCreateRequest=class{}},93633:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationKeysRequest=void 0;const i=n(82822);class r extends i.KeysRequest{constructor(e,t){super(e,t)}}t.OrganizationKeysRequest=r},57121:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionUpdateRequest=void 0;t.OrganizationSubscriptionUpdateRequest=class{constructor(e,t){this.seatAdjustment=e,this.maxAutoscaleSeats=t}}},88166:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationTaxInfoUpdateRequest=void 0;const i=n(15311);class r extends i.TaxInfoUpdateRequest{}t.OrganizationTaxInfoUpdateRequest=r},87388:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpdateRequest=void 0;t.OrganizationUpdateRequest=class{}},26942:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpgradeRequest=void 0;t.OrganizationUpgradeRequest=class{}},86490:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserAcceptRequest=void 0;t.OrganizationUserAcceptRequest=class{}},99516:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkConfirmRequest=void 0;t.OrganizationUserBulkConfirmRequest=class{constructor(e){this.keys=e}}},13175:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkRequest=void 0;t.OrganizationUserBulkRequest=class{constructor(e){this.ids=null==e?[]:e}}},80119:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserConfirmRequest=void 0;t.OrganizationUserConfirmRequest=class{}},63777:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserInviteRequest=void 0;t.OrganizationUserInviteRequest=class{constructor(){this.emails=[],this.collections=[]}}},63750:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordEnrollmentRequest=void 0;t.OrganizationUserResetPasswordEnrollmentRequest=class{}},524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordRequest=void 0;t.OrganizationUserResetPasswordRequest=class{}},32698:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserUpdateGroupsRequest=void 0;t.OrganizationUserUpdateGroupsRequest=class{constructor(){this.groupIds=[]}}},66299:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserUpdateRequest=void 0;t.OrganizationUserUpdateRequest=class{constructor(){this.collections=[]}}},68591:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHintRequest=void 0;t.PasswordHintRequest=class{constructor(e){this.email=e}}},25122:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.PasswordRequest=r},19582:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentRequest=void 0;const i=n(88166);class r extends i.OrganizationTaxInfoUpdateRequest{}t.PaymentRequest=r},70180:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyRequest=void 0;t.PolicyRequest=class{}},82474:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginRequest=void 0;t.PreloginRequest=class{constructor(e){this.email=e}}},41724:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderAddOrganizationRequest=void 0;t.ProviderAddOrganizationRequest=class{}},5328:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationCreateRequest=void 0;t.ProviderOrganizationCreateRequest=class{constructor(e,t){this.clientOwnerEmail=e,this.organizationCreateRequest=t}}},72562:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderSetupRequest=void 0;t.ProviderSetupRequest=class{}},40084:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUpdateRequest=void 0;t.ProviderUpdateRequest=class{}},64696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserAcceptRequest=void 0;t.ProviderUserAcceptRequest=class{}},56747:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkConfirmRequest=void 0;t.ProviderUserBulkConfirmRequest=class{constructor(e){this.keys=e}}},95257:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkRequest=void 0;t.ProviderUserBulkRequest=class{constructor(e){this.ids=null==e?[]:e}}},73046:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserConfirmRequest=void 0;t.ProviderUserConfirmRequest=class{}},88968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserInviteRequest=void 0;t.ProviderUserInviteRequest=class{constructor(){this.emails=[]}}},54372:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUpdateRequest=void 0;t.ProviderUserUpdateRequest=class{}},86226:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceEventRequest=void 0;t.ReferenceEventRequest=class{}},94401:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterRequest=void 0;t.RegisterRequest=class{constructor(e,t,n,i,r,o,a,s,l){this.email=e,this.name=t,this.masterPasswordHash=n,this.key=r,this.kdf=o,this.kdfIterations=a,this.referenceData=s,this.captchaResponse=l,this.masterPasswordHint=i||null}}},44980:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecretVerificationRequest=void 0;t.SecretVerificationRequest=class{}},69788:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyRequest=void 0;t.SelectionReadOnlyRequest=class{constructor(e,t,n){this.id=e,this.readOnly=t,this.hidePasswords=n}}},18:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessRequest=void 0;t.SendAccessRequest=class{}},74348:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendRequest=void 0;const i=n(49538),r=n(72193),o=n(75558);t.SendRequest=class{constructor(e,t){switch(this.type=e.type,this.fileLength=t,this.name=e.name?e.name.encryptedString:null,this.notes=e.notes?e.notes.encryptedString:null,this.maxAccessCount=e.maxAccessCount,this.expirationDate=null!=e.expirationDate?e.expirationDate.toISOString():null,this.deletionDate=null!=e.deletionDate?e.deletionDate.toISOString():null,this.key=null!=e.key?e.key.encryptedString:null,this.password=e.password,this.disabled=e.disabled,this.hideEmail=e.hideEmail,this.type){case i.SendType.Text:this.text=new o.SendTextApi,this.text.text=null!=e.text.text?e.text.text.encryptedString:null,this.text.hidden=e.text.hidden;break;case i.SendType.File:this.file=new r.SendFileApi,this.file.fileName=null!=e.file.fileName?e.file.fileName.encryptedString:null}}}},76171:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendWithIdRequest=void 0;const i=n(74348);class r extends i.SendRequest{constructor(e){super(e),this.id=e.id}}t.SendWithIdRequest=r},8696:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordRequest=void 0;t.SetPasswordRequest=class{constructor(e,t,n,i,r,o,a){this.masterPasswordHash=e,this.key=t,this.masterPasswordHint=n,this.kdf=i,this.kdfIterations=r,this.orgIdentifier=o,this.keys=a}}},13420:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StorageRequest=void 0;t.StorageRequest=class{}},15311:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoUpdateRequest=void 0;t.TaxInfoUpdateRequest=class{}},41128:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRequest=void 0;const i=n(70829);t.TokenRequest=class{constructor(e,t,n,i,r,o,a,s){this.provider=i,this.token=r,this.remember=o,this.captchaResponse=a,null!=e&&e.length>1?(this.email=e[0],this.masterPasswordHash=e[1]):null!=t&&t.length>2?(this.code=t[0],this.codeVerifier=t[1],this.redirectUri=t[2]):null!=n&&n.length>1&&(this.clientId=n[0],this.clientSecret=n[1]),this.device=null!=s?s:null}toIdentityToken(e){const t={scope:"api offline_access",client_id:e};if(null!=this.clientSecret)t.scope=e.startsWith("organization")?"api.organization":"api",t.grant_type="client_credentials",t.client_secret=this.clientSecret;else if(null!=this.masterPasswordHash&&null!=this.email)t.grant_type="password",t.username=this.email,t.password=this.masterPasswordHash;else{if(null==this.code||null==this.codeVerifier||null==this.redirectUri)throw new Error("must provide credentials or codes");t.grant_type="authorization_code",t.code=this.code,t.code_verifier=this.codeVerifier,t.redirect_uri=this.redirectUri}return this.device&&(t.deviceType=this.device.type,t.deviceIdentifier=this.device.identifier,t.deviceName=this.device.name),this.token&&null!=this.provider&&(t.twoFactorToken=this.token,t.twoFactorProvider=this.provider,t.twoFactorRemember=this.remember?"1":"0"),null!=this.captchaResponse&&(t.captchaResponse=this.captchaResponse),t}alterIdentityTokenHeaders(e){null==this.clientSecret&&null!=this.masterPasswordHash&&null!=this.email&&e.set("Auth-Email",i.Utils.fromUtf8ToUrlB64(this.email))}}},3061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.TwoFactorEmailRequest=r},12263:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.TwoFactorProviderRequest=r},27833:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoveryRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.TwoFactorRecoveryRequest=r},85402:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateDomainsRequest=void 0;t.UpdateDomainsRequest=class{}},45022:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateKeyRequest=void 0;t.UpdateKeyRequest=class{constructor(){this.ciphers=[],this.folders=[],this.sends=[]}}},48816:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateProfileRequest=void 0;t.UpdateProfileRequest=class{constructor(e,t){this.culture="en-US",this.name=e,this.masterPasswordHint=t||null}}},8290:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordRequest=void 0;const i=n(524);class r extends i.OrganizationUserResetPasswordRequest{}t.UpdateTempPasswordRequest=r},36797:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorAuthenticatorRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorAuthenticatorRequest=r},20500:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorDuoRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorDuoRequest=r},7442:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorEmailRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorEmailRequest=r},62417:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorWebAuthnDeleteRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorWebAuthnDeleteRequest=r},67564:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorWebAuthnRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorWebAuthnRequest=r},77186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTwoFactorYubioOtpRequest=void 0;const i=n(44980);class r extends i.SecretVerificationRequest{}t.UpdateTwoFactorYubioOtpRequest=r},33885:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyBankRequest=void 0;t.VerifyBankRequest=class{}},66092:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyDeleteRecoverRequest=void 0;t.VerifyDeleteRecoverRequest=class{constructor(e,t){this.userId=e,this.token=t}}},60967:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailRequest=void 0;t.VerifyEmailRequest=class{constructor(e,t){this.userId=e,this.token=t}}},47159:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKeyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.apiKey=this.getResponseProperty("ApiKey")}}t.ApiKeyResponse=r},12197:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.url=this.getResponseProperty("Url"),this.fileName=this.getResponseProperty("FileName"),this.key=this.getResponseProperty("Key"),this.size=this.getResponseProperty("Size"),this.sizeName=this.getResponseProperty("SizeName")}}t.AttachmentResponse=r},37394:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentUploadDataResponse=void 0;const i=n(8018),r=n(54690);class o extends i.BaseResponse{constructor(e){super(e),this.url=null,this.attachmentId=this.getResponseProperty("AttachmentId"),this.fileUploadType=this.getResponseProperty("FileUploadType");const t=this.getResponseProperty("CipherResponse"),n=this.getResponseProperty("CipherMiniResponse");this.cipherResponse=null==t?null:new r.CipherResponse(t),this.cipherMiniResponse=null==n?null:new r.CipherResponse(n),this.url=this.getResponseProperty("Url")}}t.AttachmentUploadDataResponse=o},8018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseResponse=void 0;t.BaseResponse=class{constructor(e){this.response=e}getResponseProperty(e,t=null,n=!1){if(null==e||""===e)throw new Error("propertyName must not be null/empty.");if(null==t&&null!=this.response&&(t=this.response),null==t)return null;if(!n&&void 0===t[e]){let n=null;n=e.charAt(0)===e.charAt(0).toUpperCase()?e.charAt(0).toLowerCase():e.charAt(0).toUpperCase(),e.length>1&&(n+=e.slice(1)),void 0===t[e=n]&&(e=e.toLowerCase()),void 0===t[e]&&(e=e.toUpperCase())}return t[e]}}},46063:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingTransactionResponse=t.BillingInvoiceResponse=t.BillingSourceResponse=t.BillingResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.invoices=[],this.transactions=[],this.balance=this.getResponseProperty("Balance");const t=this.getResponseProperty("PaymentSource"),n=this.getResponseProperty("Transactions"),i=this.getResponseProperty("Invoices");this.paymentSource=null==t?null:new o(t),null!=n&&(this.transactions=n.map((e=>new s(e)))),null!=i&&(this.invoices=i.map((e=>new a(e))))}}t.BillingResponse=r;class o extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.cardBrand=this.getResponseProperty("CardBrand"),this.description=this.getResponseProperty("Description"),this.needsVerification=this.getResponseProperty("NeedsVerification")}}t.BillingSourceResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.url=this.getResponseProperty("Url"),this.pdfUrl=this.getResponseProperty("PdfUrl"),this.number=this.getResponseProperty("Number"),this.paid=this.getResponseProperty("Paid"),this.date=this.getResponseProperty("Date"),this.amount=this.getResponseProperty("Amount")}}t.BillingInvoiceResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.createdDate=this.getResponseProperty("CreatedDate"),this.amount=this.getResponseProperty("Amount"),this.refunded=this.getResponseProperty("Refunded"),this.partiallyRefunded=this.getResponseProperty("PartiallyRefunded"),this.refundedAmount=this.getResponseProperty("RefundedAmount"),this.type=this.getResponseProperty("Type"),this.paymentMethodType=this.getResponseProperty("PaymentMethodType"),this.details=this.getResponseProperty("Details")}}t.BillingTransactionResponse=s},55134:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BreachAccountResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.addedDate=this.getResponseProperty("AddedDate"),this.breachDate=this.getResponseProperty("BreachDate"),this.dataClasses=this.getResponseProperty("DataClasses"),this.description=this.getResponseProperty("Description"),this.domain=this.getResponseProperty("Domain"),this.isActive=this.getResponseProperty("IsActive"),this.isVerified=this.getResponseProperty("IsVerified"),this.logoPath=this.getResponseProperty("LogoPath"),this.modifiedDate=this.getResponseProperty("ModifiedDate"),this.name=this.getResponseProperty("Name"),this.pwnCount=this.getResponseProperty("PwnCount"),this.title=this.getResponseProperty("Title")}}t.BreachAccountResponse=r},54690:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherResponse=void 0;const i=n(12197),r=n(8018),o=n(7113),a=n(2944),s=n(69930),l=n(6847),c=n(17733),d=n(85489),p=n(82976);class u extends r.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.folderId=this.getResponseProperty("FolderId")||null,this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.notes=this.getResponseProperty("Notes"),this.favorite=this.getResponseProperty("Favorite")||!1,this.edit=!!this.getResponseProperty("Edit"),null==this.getResponseProperty("ViewPassword")?this.viewPassword=!0:this.viewPassword=this.getResponseProperty("ViewPassword"),this.organizationUseTotp=this.getResponseProperty("OrganizationUseTotp"),this.revisionDate=this.getResponseProperty("RevisionDate"),this.collectionIds=this.getResponseProperty("CollectionIds"),this.deletedDate=this.getResponseProperty("DeletedDate");const t=this.getResponseProperty("Login");null!=t&&(this.login=new d.LoginApi(t));const n=this.getResponseProperty("Card");null!=n&&(this.card=new s.CardApi(n));const r=this.getResponseProperty("Identity");null!=r&&(this.identity=new c.IdentityApi(r));const u=this.getResponseProperty("SecureNote");null!=u&&(this.secureNote=new p.SecureNoteApi(u));const m=this.getResponseProperty("Fields");null!=m&&(this.fields=m.map((e=>new l.FieldApi(e))));const h=this.getResponseProperty("Attachments");null!=h&&(this.attachments=h.map((e=>new i.AttachmentResponse(e))));const v=this.getResponseProperty("PasswordHistory");null!=v&&(this.passwordHistory=v.map((e=>new o.PasswordHistoryResponse(e)))),this.reprompt=this.getResponseProperty("Reprompt")||a.CipherRepromptType.None}}t.CipherResponse=u},98594:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionGroupDetailsResponse=t.CollectionDetailsResponse=t.CollectionResponse=void 0;const i=n(8018),r=n(64396);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.name=this.getResponseProperty("Name"),this.externalId=this.getResponseProperty("ExternalId")}}t.CollectionResponse=o;t.CollectionDetailsResponse=class extends o{constructor(e){super(e),this.readOnly=this.getResponseProperty("ReadOnly")||!1}};t.CollectionGroupDetailsResponse=class extends o{constructor(e){super(e),this.groups=[];const t=this.getResponseProperty("Groups");null!=t&&(this.groups=t.map((e=>new r.SelectionReadOnlyResponse(e))))}}},82859:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DomainsResponse=void 0;const i=n(8018),r=n(25012);class o extends i.BaseResponse{constructor(e){super(e),this.globalEquivalentDomains=[],this.equivalentDomains=this.getResponseProperty("EquivalentDomains");const t=this.getResponseProperty("GlobalEquivalentDomains");this.globalEquivalentDomains=null!=t?t.map((e=>new r.GlobalDomainResponse(e))):[]}}t.DomainsResponse=o},21531:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewResponse=t.EmergencyAccessTakeoverResponse=t.EmergencyAccessGrantorDetailsResponse=t.EmergencyAccessGranteeDetailsResponse=void 0;const i=n(8018),r=n(54690);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.granteeId=this.getResponseProperty("GranteeId"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.waitTimeDays=this.getResponseProperty("WaitTimeDays"),this.creationDate=this.getResponseProperty("CreationDate")}}t.EmergencyAccessGranteeDetailsResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.grantorId=this.getResponseProperty("GrantorId"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.waitTimeDays=this.getResponseProperty("WaitTimeDays"),this.creationDate=this.getResponseProperty("CreationDate")}}t.EmergencyAccessGrantorDetailsResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.keyEncrypted=this.getResponseProperty("KeyEncrypted"),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations")}}t.EmergencyAccessTakeoverResponse=s;class l extends i.BaseResponse{constructor(e){super(e),this.ciphers=[],this.keyEncrypted=this.getResponseProperty("KeyEncrypted");const t=this.getResponseProperty("Ciphers");null!=t&&(this.ciphers=t.map((e=>new r.CipherResponse(e))))}}t.EmergencyAccessViewResponse=l},25237:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;const i=n(70829),r=n(8018);class o extends r.BaseResponse{constructor(e,t,n){var r,o;super(e);let a=null;if(null!=e){const t=this.getResponseProperty("ErrorModel");a=t&&n?t:e}a?(this.message=this.getResponseProperty("Message",a),this.validationErrors=this.getResponseProperty("ValidationErrors",a),this.captchaSiteKey=null===(o=null===(r=this.validationErrors)||void 0===r?void 0:r.HCaptcha_SiteKey)||void 0===o?void 0:o[0],this.captchaRequired=!i.Utils.isNullOrWhitespace(this.captchaSiteKey)):429===t&&(this.message="Rate limit exceeded. Try again later."),this.statusCode=t}getSingleMessage(){if(null==this.validationErrors)return this.message;for(const e in this.validationErrors)if(this.validationErrors.hasOwnProperty(e)&&this.validationErrors[e].length)return this.validationErrors[e][0];return this.message}getAllMessages(){const e=[];if(null==this.validationErrors)return e;for(const t in this.validationErrors)this.validationErrors.hasOwnProperty(t)&&this.validationErrors[t].forEach((n=>{let i="";if(t.indexOf("[")>-1&&t.indexOf("]")>-1){const e=t.lastIndexOf(".");i=t.substr(0,e>-1?e:t.length)+": "}e.push(i+n)}));return e}}t.ErrorResponse=o},52758:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.userId=this.getResponseProperty("UserId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.providerId=this.getResponseProperty("ProviderId"),this.cipherId=this.getResponseProperty("CipherId"),this.collectionId=this.getResponseProperty("CollectionId"),this.groupId=this.getResponseProperty("GroupId"),this.policyId=this.getResponseProperty("PolicyId"),this.organizationUserId=this.getResponseProperty("OrganizationUserId"),this.providerUserId=this.getResponseProperty("ProviderUserId"),this.providerOrganizationId=this.getResponseProperty("ProviderOrganizationId"),this.actingUserId=this.getResponseProperty("ActingUserId"),this.date=this.getResponseProperty("Date"),this.deviceType=this.getResponseProperty("DeviceType"),this.ipAddress=this.getResponseProperty("IpAddress")}}t.EventResponse=r},29345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.revisionDate=this.getResponseProperty("RevisionDate")}}t.FolderResponse=r},25012:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalDomainResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.domains=this.getResponseProperty("Domains"),this.excluded=this.getResponseProperty("Excluded")}}t.GlobalDomainResponse=r},90380:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupDetailsResponse=t.GroupResponse=void 0;const i=n(8018),r=n(64396);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.name=this.getResponseProperty("Name"),this.accessAll=this.getResponseProperty("AccessAll"),this.externalId=this.getResponseProperty("ExternalId")}}t.GroupResponse=o;t.GroupDetailsResponse=class extends o{constructor(e){super(e),this.collections=[];const t=this.getResponseProperty("Collections");null!=t&&(this.collections=t.map((e=>new r.SelectionReadOnlyResponse(e))))}}},72513:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityCaptchaResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.siteKey=this.getResponseProperty("HCaptcha_SiteKey")}}t.IdentityCaptchaResponse=r},65392:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTokenResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.accessToken=e.access_token,this.expiresIn=e.expires_in,this.refreshToken=e.refresh_token,this.tokenType=e.token_type,this.resetMasterPassword=this.getResponseProperty("ResetMasterPassword"),this.privateKey=this.getResponseProperty("PrivateKey"),this.key=this.getResponseProperty("Key"),this.twoFactorToken=this.getResponseProperty("TwoFactorToken"),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations"),this.forcePasswordReset=this.getResponseProperty("ForcePasswordReset"),this.apiUseKeyConnector=this.getResponseProperty("ApiUseKeyConnector"),this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl")}}t.IdentityTokenResponse=r},6985:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityTwoFactorResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.twoFactorProviders2=new Map,this.captchaToken=this.getResponseProperty("CaptchaBypassToken"),this.twoFactorProviders=this.getResponseProperty("TwoFactorProviders");const t=this.getResponseProperty("TwoFactorProviders2");if(null!=t)for(const n in t)t.hasOwnProperty(n)&&this.twoFactorProviders2.set(parseInt(n,null),t[n])}}t.IdentityTwoFactorResponse=r},27177:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorUserKeyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.key=this.getResponseProperty("Key")}}t.KeyConnectorUserKeyResponse=r},69911:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeysResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.privateKey=this.getResponseProperty("PrivateKey"),this.publicKey=this.getResponseProperty("PublicKey")}}t.KeysResponse=r},24749:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ListResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e,t){super(e);const n=this.getResponseProperty("Data");this.data=null==n?[]:n.map((e=>new t(e))),this.continuationToken=this.getResponseProperty("ContinuationToken")}}t.ListResponse=r},58830:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncSendNotification=t.UserNotification=t.SyncFolderNotification=t.SyncCipherNotification=t.NotificationResponse=void 0;const i=n(8018),r=n(70954);class o extends i.BaseResponse{constructor(e){super(e),this.contextId=this.getResponseProperty("ContextId"),this.type=this.getResponseProperty("Type");const t=this.getResponseProperty("Payload");switch(this.type){case r.NotificationType.SyncCipherCreate:case r.NotificationType.SyncCipherDelete:case r.NotificationType.SyncCipherUpdate:case r.NotificationType.SyncLoginDelete:this.payload=new a(t);break;case r.NotificationType.SyncFolderCreate:case r.NotificationType.SyncFolderDelete:case r.NotificationType.SyncFolderUpdate:this.payload=new s(t);break;case r.NotificationType.SyncVault:case r.NotificationType.SyncCiphers:case r.NotificationType.SyncOrgKeys:case r.NotificationType.SyncSettings:case r.NotificationType.LogOut:this.payload=new l(t);break;case r.NotificationType.SyncSendCreate:case r.NotificationType.SyncSendUpdate:case r.NotificationType.SyncSendDelete:this.payload=new c(t)}}}t.NotificationResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.collectionIds=this.getResponseProperty("CollectionIds"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncCipherNotification=a;class s extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncFolderNotification=s;class l extends i.BaseResponse{constructor(e){super(e),this.userId=this.getResponseProperty("UserId"),this.date=new Date(this.getResponseProperty("Date"))}}t.UserNotification=l;class c extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.revisionDate=new Date(this.getResponseProperty("RevisionDate"))}}t.SyncSendNotification=c},68026:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSsoResponse=void 0;const i=n(12043),r=n(8018);class o extends r.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.data=new i.SsoConfigApi(this.getResponseProperty("Data")),this.urls=new a(this.getResponseProperty("Urls"))}}t.OrganizationSsoResponse=o;class a extends r.BaseResponse{constructor(e){super(e),this.callbackPath=this.getResponseProperty("CallbackPath"),this.signedOutCallbackPath=this.getResponseProperty("SignedOutCallbackPath"),this.spEntityId=this.getResponseProperty("SpEntityId"),this.spMetadataUrl=this.getResponseProperty("SpMetadataUrl"),this.spAcsUrl=this.getResponseProperty("SpAcsUrl")}}},47568:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationAutoEnrollStatusResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.resetPasswordEnabled=this.getResponseProperty("ResetPasswordEnabled")}}t.OrganizationAutoEnrollStatusResponse=r},78508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationKeysResponse=void 0;const i=n(69911);class r extends i.KeysResponse{constructor(e){super(e)}}t.OrganizationKeysResponse=r},94180:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationResponse=void 0;const i=n(8018),r=n(27543);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.identifier=this.getResponseProperty("Identifier"),this.name=this.getResponseProperty("Name"),this.businessName=this.getResponseProperty("BusinessName"),this.businessAddress1=this.getResponseProperty("BusinessAddress1"),this.businessAddress2=this.getResponseProperty("BusinessAddress2"),this.businessAddress3=this.getResponseProperty("BusinessAddress3"),this.businessCountry=this.getResponseProperty("BusinessCountry"),this.businessTaxNumber=this.getResponseProperty("BusinessTaxNumber"),this.billingEmail=this.getResponseProperty("BillingEmail");const t=this.getResponseProperty("Plan");this.plan=null==t?null:new r.PlanResponse(t),this.planType=this.getResponseProperty("PlanType"),this.seats=this.getResponseProperty("Seats"),this.maxAutoscaleSeats=this.getResponseProperty("MaxAutoscaleSeats"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.useGroups=this.getResponseProperty("UseGroups"),this.useDirectory=this.getResponseProperty("UseDirectory"),this.useEvents=this.getResponseProperty("UseEvents"),this.useTotp=this.getResponseProperty("UseTotp"),this.use2fa=this.getResponseProperty("Use2fa"),this.useApi=this.getResponseProperty("UseApi"),this.useResetPassword=this.getResponseProperty("UseResetPassword"),this.hasPublicAndPrivateKeys=this.getResponseProperty("HasPublicAndPrivateKeys")}}t.OrganizationResponse=o},59621:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionResponse=void 0;const i=n(94180),r=n(66610);class o extends i.OrganizationResponse{constructor(e){super(e),this.storageName=this.getResponseProperty("StorageName"),this.storageGb=this.getResponseProperty("StorageGb");const t=this.getResponseProperty("Subscription");this.subscription=null==t?null:new r.BillingSubscriptionResponse(t);const n=this.getResponseProperty("UpcomingInvoice");this.upcomingInvoice=null==n?null:new r.BillingSubscriptionUpcomingInvoiceResponse(n),this.expiration=this.getResponseProperty("Expiration")}}t.OrganizationSubscriptionResponse=o},31937:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkPublicKeyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.key=this.getResponseProperty("Key")}}t.OrganizationUserBulkPublicKeyResponse=r},98631:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.error=this.getResponseProperty("Error")}}t.OrganizationUserBulkResponse=r},26888:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordDetailsReponse=t.OrganizationUserDetailsResponse=t.OrganizationUserUserDetailsResponse=t.OrganizationUserResponse=void 0;const i=n(8018),r=n(64396),o=n(35629);class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.permissions=new o.PermissionsApi(this.getResponseProperty("Permissions")),this.accessAll=this.getResponseProperty("AccessAll"),this.resetPasswordEnrolled=this.getResponseProperty("ResetPasswordEnrolled")}}t.OrganizationUserResponse=a;t.OrganizationUserUserDetailsResponse=class extends a{constructor(e){var t;super(e),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.twoFactorEnabled=this.getResponseProperty("TwoFactorEnabled"),this.usesKeyConnector=null!==(t=this.getResponseProperty("UsesKeyConnector"))&&void 0!==t&&t}};t.OrganizationUserDetailsResponse=class extends a{constructor(e){super(e),this.collections=[];const t=this.getResponseProperty("Collections");null!=t&&(this.collections=t.map((e=>new r.SelectionReadOnlyResponse(e))))}};class s extends i.BaseResponse{constructor(e){super(e),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations"),this.resetPasswordKey=this.getResponseProperty("ResetPasswordKey"),this.encryptedPrivateKey=this.getResponseProperty("EncryptedPrivateKey")}}t.OrganizationUserResetPasswordDetailsReponse=s},7113:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.password=this.getResponseProperty("Password"),this.lastUsedDate=this.getResponseProperty("LastUsedDate")}}t.PasswordHistoryResponse=r},79997:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentResponse=void 0;const i=n(8018),r=n(17866);class o extends i.BaseResponse{constructor(e){super(e);const t=this.getResponseProperty("UserProfile");null!=t&&(this.userProfile=new r.ProfileResponse(t)),this.paymentIntentClientSecret=this.getResponseProperty("PaymentIntentClientSecret"),this.success=this.getResponseProperty("Success")}}t.PaymentResponse=o},27543:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PlanResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.type=this.getResponseProperty("Type"),this.product=this.getResponseProperty("Product"),this.name=this.getResponseProperty("Name"),this.isAnnual=this.getResponseProperty("IsAnnual"),this.nameLocalizationKey=this.getResponseProperty("NameLocalizationKey"),this.descriptionLocalizationKey=this.getResponseProperty("DescriptionLocalizationKey"),this.canBeUsedByBusiness=this.getResponseProperty("CanBeUsedByBusiness"),this.baseSeats=this.getResponseProperty("BaseSeats"),this.baseStorageGb=this.getResponseProperty("BaseStorageGb"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxUsers=this.getResponseProperty("MaxUsers"),this.hasAdditionalSeatsOption=this.getResponseProperty("HasAdditionalSeatsOption"),this.maxAdditionalSeats=this.getResponseProperty("MaxAdditionalSeats"),this.hasAdditionalStorageOption=this.getResponseProperty("HasAdditionalStorageOption"),this.maxAdditionalStorage=this.getResponseProperty("MaxAdditionalStorage"),this.hasPremiumAccessOption=this.getResponseProperty("HasPremiumAccessOption"),this.trialPeriodDays=this.getResponseProperty("TrialPeriodDays"),this.hasSelfHost=this.getResponseProperty("HasSelfHost"),this.hasPolicies=this.getResponseProperty("HasPolicies"),this.hasGroups=this.getResponseProperty("HasGroups"),this.hasDirectory=this.getResponseProperty("HasDirectory"),this.hasEvents=this.getResponseProperty("HasEvents"),this.hasTotp=this.getResponseProperty("HasTotp"),this.has2fa=this.getResponseProperty("Has2fa"),this.hasApi=this.getResponseProperty("HasApi"),this.hasSso=this.getResponseProperty("HasSso"),this.hasResetPassword=this.getResponseProperty("HasResetPassword"),this.usersGetPremium=this.getResponseProperty("UsersGetPremium"),this.upgradeSortOrder=this.getResponseProperty("UpgradeSortOrder"),this.displaySortOrder=this.getResponseProperty("SortOrder"),this.legacyYear=this.getResponseProperty("LegacyYear"),this.disabled=this.getResponseProperty("Disabled"),this.stripePlanId=this.getResponseProperty("StripePlanId"),this.stripeSeatPlanId=this.getResponseProperty("StripeSeatPlanId"),this.stripeStoragePlanId=this.getResponseProperty("StripeStoragePlanId"),this.stripePremiumAccessPlanId=this.getResponseProperty("StripePremiumAccessPlanId"),this.basePrice=this.getResponseProperty("BasePrice"),this.seatPrice=this.getResponseProperty("SeatPrice"),this.additionalStoragePricePerGb=this.getResponseProperty("AdditionalStoragePricePerGb"),this.premiumAccessOptionPrice=this.getResponseProperty("PremiumAccessOptionPrice")}}t.PlanResponse=r},43886:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.organizationId=this.getResponseProperty("OrganizationId"),this.type=this.getResponseProperty("Type"),this.data=this.getResponseProperty("Data"),this.enabled=this.getResponseProperty("Enabled")}}t.PolicyResponse=r},93952:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.kdf=this.getResponseProperty("Kdf"),this.kdfIterations=this.getResponseProperty("KdfIterations")}}t.PreloginResponse=r},77469:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileOrganizationResponse=void 0;const i=n(8018),r=n(35629);class o extends i.BaseResponse{constructor(e){var t,n;super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.usePolicies=this.getResponseProperty("UsePolicies"),this.useGroups=this.getResponseProperty("UseGroups"),this.useDirectory=this.getResponseProperty("UseDirectory"),this.useEvents=this.getResponseProperty("UseEvents"),this.useTotp=this.getResponseProperty("UseTotp"),this.use2fa=this.getResponseProperty("Use2fa"),this.useApi=this.getResponseProperty("UseApi"),this.useSso=this.getResponseProperty("UseSso"),this.useKeyConnector=null!==(t=this.getResponseProperty("UseKeyConnector"))&&void 0!==t&&t,this.useResetPassword=this.getResponseProperty("UseResetPassword"),this.selfHost=this.getResponseProperty("SelfHost"),this.usersGetPremium=this.getResponseProperty("UsersGetPremium"),this.seats=this.getResponseProperty("Seats"),this.maxCollections=this.getResponseProperty("MaxCollections"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.key=this.getResponseProperty("Key"),this.hasPublicAndPrivateKeys=this.getResponseProperty("HasPublicAndPrivateKeys"),this.status=this.getResponseProperty("Status"),this.type=this.getResponseProperty("Type"),this.enabled=this.getResponseProperty("Enabled"),this.ssoBound=this.getResponseProperty("SsoBound"),this.identifier=this.getResponseProperty("Identifier"),this.permissions=new r.PermissionsApi(this.getResponseProperty("permissions")),this.resetPasswordEnrolled=this.getResponseProperty("ResetPasswordEnrolled"),this.userId=this.getResponseProperty("UserId"),this.providerId=this.getResponseProperty("ProviderId"),this.providerName=this.getResponseProperty("ProviderName"),this.familySponsorshipFriendlyName=this.getResponseProperty("FamilySponsorshipFriendlyName"),this.familySponsorshipAvailable=this.getResponseProperty("FamilySponsorshipAvailable"),this.planProductType=this.getResponseProperty("PlanProductType"),this.keyConnectorEnabled=null!==(n=this.getResponseProperty("KeyConnectorEnabled"))&&void 0!==n&&n,this.keyConnectorUrl=this.getResponseProperty("KeyConnectorUrl")}}t.ProfileOrganizationResponse=o},80685:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderOrganizationResponse=void 0;const i=n(77469);class r extends i.ProfileOrganizationResponse{constructor(e){super(e),this.keyConnectorEnabled=!1}}t.ProfileProviderOrganizationResponse=r},45154:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderResponse=void 0;const i=n(8018),r=n(35629);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.key=this.getResponseProperty("Key"),this.status=this.getResponseProperty("Status"),this.type=this.getResponseProperty("Type"),this.enabled=this.getResponseProperty("Enabled"),this.permissions=new r.PermissionsApi(this.getResponseProperty("permissions")),this.userId=this.getResponseProperty("UserId"),this.useEvents=this.getResponseProperty("UseEvents")}}t.ProfileProviderResponse=o},17866:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileResponse=void 0;const i=n(8018),r=n(77469),o=n(80685),a=n(45154);class s extends i.BaseResponse{constructor(e){var t,n;super(e),this.organizations=[],this.providers=[],this.providerOrganizations=[],this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email"),this.emailVerified=this.getResponseProperty("EmailVerified"),this.masterPasswordHint=this.getResponseProperty("MasterPasswordHint"),this.premium=this.getResponseProperty("Premium"),this.culture=this.getResponseProperty("Culture"),this.twoFactorEnabled=this.getResponseProperty("TwoFactorEnabled"),this.key=this.getResponseProperty("Key"),this.privateKey=this.getResponseProperty("PrivateKey"),this.securityStamp=this.getResponseProperty("SecurityStamp"),this.forcePasswordReset=null!==(t=this.getResponseProperty("ForcePasswordReset"))&&void 0!==t&&t,this.usesKeyConnector=null!==(n=this.getResponseProperty("UsesKeyConnector"))&&void 0!==n&&n;const i=this.getResponseProperty("Organizations");null!=i&&(this.organizations=i.map((e=>new r.ProfileOrganizationResponse(e))));const s=this.getResponseProperty("Providers");null!=s&&(this.providers=s.map((e=>new a.ProfileProviderResponse(e))));const l=this.getResponseProperty("ProviderOrganizations");null!=l&&(this.providerOrganizations=l.map((e=>new o.ProfileProviderOrganizationResponse(e))))}}t.ProfileResponse=s},46109:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationOrganizationDetailsResponse=t.ProviderOrganizationResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.providerId=this.getResponseProperty("ProviderId"),this.organizationId=this.getResponseProperty("OrganizationId"),this.key=this.getResponseProperty("Key"),this.settings=this.getResponseProperty("Settings"),this.creationDate=this.getResponseProperty("CreationDate"),this.revisionDate=this.getResponseProperty("RevisionDate")}}t.ProviderOrganizationResponse=r;t.ProviderOrganizationOrganizationDetailsResponse=class extends r{constructor(e){super(e),this.organizationName=this.getResponseProperty("OrganizationName")}}},78343:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.name=this.getResponseProperty("Name"),this.businessName=this.getResponseProperty("BusinessName"),this.billingEmail=this.getResponseProperty("BillingEmail")}}t.ProviderResponse=r},86998:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkPublicKeyResponse=void 0;const i=n(31937);class r extends i.OrganizationUserBulkPublicKeyResponse{}t.ProviderUserBulkPublicKeyResponse=r},97051:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.error=this.getResponseProperty("Error")}}t.ProviderUserBulkResponse=r},97972:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUserDetailsResponse=t.ProviderUserResponse=void 0;const i=n(8018),r=n(35629);class o extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.userId=this.getResponseProperty("UserId"),this.type=this.getResponseProperty("Type"),this.status=this.getResponseProperty("Status"),this.permissions=new r.PermissionsApi(this.getResponseProperty("Permissions"))}}t.ProviderUserResponse=o;t.ProviderUserUserDetailsResponse=class extends o{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.email=this.getResponseProperty("Email")}}},64396:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.readOnly=this.getResponseProperty("ReadOnly"),this.hidePasswords=this.getResponseProperty("HidePasswords")}}t.SelectionReadOnlyResponse=r},51204:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessResponse=void 0;const i=n(8018),r=n(72193),o=n(75558);class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name");const t=this.getResponseProperty("Text");null!=t&&(this.text=new o.SendTextApi(t));const n=this.getResponseProperty("File");null!=n&&(this.file=new r.SendFileApi(n)),this.expirationDate=this.getResponseProperty("ExpirationDate"),this.creatorIdentifier=this.getResponseProperty("CreatorIdentifier")}}t.SendAccessResponse=a},17889:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileDownloadDataResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=null,this.url=null,this.id=this.getResponseProperty("Id"),this.url=this.getResponseProperty("Url")}}t.SendFileDownloadDataResponse=r},77838:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileUploadDataResponse=void 0;const i=n(8018),r=n(90742);class o extends i.BaseResponse{constructor(e){super(e),this.url=null,this.fileUploadType=this.getResponseProperty("FileUploadType");const t=this.getResponseProperty("SendResponse");this.sendResponse=null==t?null:new r.SendResponse(t),this.url=this.getResponseProperty("Url")}}t.SendFileUploadDataResponse=o},90742:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendResponse=void 0;const i=n(8018),r=n(72193),o=n(75558);class a extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.accessId=this.getResponseProperty("AccessId"),this.type=this.getResponseProperty("Type"),this.name=this.getResponseProperty("Name"),this.notes=this.getResponseProperty("Notes"),this.key=this.getResponseProperty("Key"),this.maxAccessCount=this.getResponseProperty("MaxAccessCount"),this.accessCount=this.getResponseProperty("AccessCount"),this.revisionDate=this.getResponseProperty("RevisionDate"),this.expirationDate=this.getResponseProperty("ExpirationDate"),this.deletionDate=this.getResponseProperty("DeletionDate"),this.password=this.getResponseProperty("Password"),this.disable=this.getResponseProperty("Disabled")||!1,this.hideEmail=this.getResponseProperty("HideEmail")||!1;const t=this.getResponseProperty("Text");null!=t&&(this.text=new o.SendTextApi(t));const n=this.getResponseProperty("File");null!=n&&(this.file=new r.SendFileApi(n))}}t.SendResponse=a},66610:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSubscriptionUpcomingInvoiceResponse=t.BillingSubscriptionItemResponse=t.BillingSubscriptionResponse=t.SubscriptionResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.storageName=this.getResponseProperty("StorageName"),this.storageGb=this.getResponseProperty("StorageGb"),this.maxStorageGb=this.getResponseProperty("MaxStorageGb"),this.license=this.getResponseProperty("License"),this.expiration=this.getResponseProperty("Expiration"),this.usingInAppPurchase=this.getResponseProperty("UsingInAppPurchase");const t=this.getResponseProperty("Subscription"),n=this.getResponseProperty("UpcomingInvoice");this.subscription=null==t?null:new o(t),this.upcomingInvoice=null==n?null:new s(n)}}t.SubscriptionResponse=r;class o extends i.BaseResponse{constructor(e){super(e),this.items=[],this.trialEndDate=this.getResponseProperty("TrialStartDate"),this.trialEndDate=this.getResponseProperty("TrialEndDate"),this.periodStartDate=this.getResponseProperty("PeriodStartDate"),this.periodEndDate=this.getResponseProperty("PeriodEndDate"),this.cancelledDate=this.getResponseProperty("CancelledDate"),this.cancelAtEndDate=this.getResponseProperty("CancelAtEndDate"),this.status=this.getResponseProperty("Status"),this.cancelled=this.getResponseProperty("Cancelled");const t=this.getResponseProperty("Items");null!=t&&(this.items=t.map((e=>new a(e))))}}t.BillingSubscriptionResponse=o;class a extends i.BaseResponse{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.amount=this.getResponseProperty("Amount"),this.quantity=this.getResponseProperty("Quantity"),this.interval=this.getResponseProperty("Interval"),this.sponsoredSubscriptionItem=this.getResponseProperty("SponsoredSubscriptionItem")}}t.BillingSubscriptionItemResponse=a;class s extends i.BaseResponse{constructor(e){super(e),this.date=this.getResponseProperty("Date"),this.amount=this.getResponseProperty("Amount")}}t.BillingSubscriptionUpcomingInvoiceResponse=s},59561:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SyncResponse=void 0;const i=n(8018),r=n(54690),o=n(98594),a=n(82859),s=n(29345),l=n(43886),c=n(17866),d=n(90742);class p extends i.BaseResponse{constructor(e){super(e),this.folders=[],this.collections=[],this.ciphers=[],this.policies=[],this.sends=[];const t=this.getResponseProperty("Profile");null!=t&&(this.profile=new c.ProfileResponse(t));const n=this.getResponseProperty("Folders");null!=n&&(this.folders=n.map((e=>new s.FolderResponse(e))));const i=this.getResponseProperty("Collections");null!=i&&(this.collections=i.map((e=>new o.CollectionDetailsResponse(e))));const p=this.getResponseProperty("Ciphers");null!=p&&(this.ciphers=p.map((e=>new r.CipherResponse(e))));const u=this.getResponseProperty("Domains");null!=u&&(this.domains=new a.DomainsResponse(u));const m=this.getResponseProperty("Policies");null!=m&&(this.policies=m.map((e=>new l.PolicyResponse(e))));const h=this.getResponseProperty("Sends");null!=h&&(this.sends=h.map((e=>new d.SendResponse(e))))}}t.SyncResponse=p},94548:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.taxId=this.getResponseProperty("TaxIdNumber"),this.taxIdType=this.getResponseProperty("TaxIdType"),this.line1=this.getResponseProperty("Line1"),this.line2=this.getResponseProperty("Line2"),this.city=this.getResponseProperty("City"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.country=this.getResponseProperty("Country")}}t.TaxInfoResponse=r},70287:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaxRateResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.id=this.getResponseProperty("Id"),this.country=this.getResponseProperty("Country"),this.state=this.getResponseProperty("State"),this.postalCode=this.getResponseProperty("PostalCode"),this.rate=this.getResponseProperty("Rate")}}t.TaxRateResponse=r},78302:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticatorResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.key=this.getResponseProperty("Key")}}t.TwoFactorAuthenticatorResponse=r},35508:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorDuoResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.host=this.getResponseProperty("Host"),this.secretKey=this.getResponseProperty("SecretKey"),this.integrationKey=this.getResponseProperty("IntegrationKey")}}t.TwoFactorDuoResponse=r},29964:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.email=this.getResponseProperty("Email")}}t.TwoFactorEmailResponse=r},43373:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorProviderResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.type=this.getResponseProperty("Type")}}t.TwoFactorProviderResponse=r},38669:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoverResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.code=this.getResponseProperty("Code")}}t.TwoFactorRecoverResponse=r},42142:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeResponse=t.KeyResponse=t.TwoFactorWebAuthnResponse=void 0;const i=n(70829),r=n(8018);class o extends r.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled");const t=this.getResponseProperty("Keys");this.keys=null==t?null:t.map((e=>new a(e)))}}t.TwoFactorWebAuthnResponse=o;class a extends r.BaseResponse{constructor(e){super(e),this.name=this.getResponseProperty("Name"),this.id=this.getResponseProperty("Id"),this.migrated=this.getResponseProperty("Migrated")}}t.KeyResponse=a;class s extends r.BaseResponse{constructor(e){super(e),this.attestation=this.getResponseProperty("attestation"),this.authenticatorSelection=this.getResponseProperty("authenticatorSelection"),this.challenge=i.Utils.fromUrlB64ToArray(this.getResponseProperty("challenge")),this.excludeCredentials=this.getResponseProperty("excludeCredentials").map((e=>(e.id=i.Utils.fromUrlB64ToArray(e.id).buffer,e))),this.extensions=this.getResponseProperty("extensions"),this.pubKeyCredParams=this.getResponseProperty("pubKeyCredParams"),this.rp=this.getResponseProperty("rp"),this.timeout=this.getResponseProperty("timeout");const t=this.getResponseProperty("user");t.id=i.Utils.fromUrlB64ToArray(t.id),this.user=t}}t.ChallengeResponse=s},14402:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorYubiKeyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.enabled=this.getResponseProperty("Enabled"),this.key1=this.getResponseProperty("Key1"),this.key2=this.getResponseProperty("Key2"),this.key3=this.getResponseProperty("Key3"),this.key4=this.getResponseProperty("Key4"),this.key5=this.getResponseProperty("Key5"),this.nfc=this.getResponseProperty("Nfc")}}t.TwoFactorYubiKeyResponse=r},30192:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserKeyResponse=void 0;const i=n(8018);class r extends i.BaseResponse{constructor(e){super(e),this.userId=this.getResponseProperty("UserId"),this.publicKey=this.getResponseProperty("PublicKey")}}t.UserKeyResponse=r},56513:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentView=void 0;t.AttachmentView=class{constructor(e){this.id=null,this.url=null,this.size=null,this.sizeName=null,this.fileName=null,this.key=null,e&&(this.id=e.id,this.url=e.url,this.size=e.size,this.sizeName=e.sizeName)}get fileSize(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0}}},17283:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.CardView=void 0;const o=n(48244),a=n(96255),s=n(99413);class l extends o.ItemView{constructor(e){super(),this.cardholderName=null,this.expMonth=null,this.expYear=null,this.code=null,this._brand=null,this._number=null,this._subTitle=null}get maskedCode(){return null!=this.code?"•".repeat(this.code.length):null}get maskedNumber(){return null!=this.number?"•".repeat(this.number.length):null}get brand(){return this._brand}set brand(e){this._brand=e,this._subTitle=null}get number(){return this._number}set number(e){this._number=e,this._subTitle=null}get subTitle(){if(null==this._subTitle&&(this._subTitle=this.brand,null!=this.number&&this.number.length>=4)){null!=this._subTitle&&""!==this._subTitle?this._subTitle+=", ":this._subTitle="";const e=this.number.length>=5&&null!=this.number.match(new RegExp("^3[47]"))?5:4;this._subTitle+="*"+this.number.substr(this.number.length-e)}return this._subTitle}get expiration(){if(!this.expMonth&&!this.expYear)return null;let e=null!=this.expMonth?("0"+this.expMonth).slice(-2):"__";return e+=" / "+(null!=this.expYear?this.formatYear(this.expYear):"____"),e}formatYear(e){return 2===e.length?"20"+e:e}}i([s.linkedFieldOption(a.CardLinkedId.CardholderName),r("design:type",String)],l.prototype,"cardholderName",void 0),i([s.linkedFieldOption(a.CardLinkedId.ExpMonth,"expirationMonth"),r("design:type",String)],l.prototype,"expMonth",void 0),i([s.linkedFieldOption(a.CardLinkedId.ExpYear,"expirationYear"),r("design:type",String)],l.prototype,"expYear",void 0),i([s.linkedFieldOption(a.CardLinkedId.Code,"securityCode"),r("design:type",String)],l.prototype,"code",void 0),i([s.linkedFieldOption(a.CardLinkedId.Brand),r("design:type",String),r("design:paramtypes",[String])],l.prototype,"brand",null),i([s.linkedFieldOption(a.CardLinkedId.Number),r("design:type",String),r("design:paramtypes",[String])],l.prototype,"number",null),t.CardView=l},52556:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherView=void 0;const i=n(2944),r=n(23635),o=n(17283),a=n(92643),s=n(52450),l=n(56561);t.CipherView=class{constructor(e){var t;this.id=null,this.organizationId=null,this.folderId=null,this.name=null,this.notes=null,this.type=null,this.favorite=!1,this.organizationUseTotp=!1,this.edit=!1,this.viewPassword=!0,this.login=new s.LoginView,this.identity=new a.IdentityView,this.card=new o.CardView,this.secureNote=new l.SecureNoteView,this.attachments=null,this.fields=null,this.passwordHistory=null,this.collectionIds=null,this.revisionDate=null,this.deletedDate=null,this.reprompt=i.CipherRepromptType.None,e&&(this.id=e.id,this.organizationId=e.organizationId,this.folderId=e.folderId,this.favorite=e.favorite,this.organizationUseTotp=e.organizationUseTotp,this.edit=e.edit,this.viewPassword=e.viewPassword,this.type=e.type,this.localData=e.localData,this.collectionIds=e.collectionIds,this.revisionDate=e.revisionDate,this.deletedDate=e.deletedDate,this.reprompt=null!==(t=e.reprompt)&&void 0!==t?t:i.CipherRepromptType.None)}get item(){switch(this.type){case r.CipherType.Login:return this.login;case r.CipherType.SecureNote:return this.secureNote;case r.CipherType.Card:return this.card;case r.CipherType.Identity:return this.identity}return null}get subTitle(){return this.item.subTitle}get hasPasswordHistory(){return this.passwordHistory&&this.passwordHistory.length>0}get hasAttachments(){return this.attachments&&this.attachments.length>0}get hasOldAttachments(){if(this.hasAttachments)for(let e=0;e<this.attachments.length;e++)if(null==this.attachments[e].key)return!0;return!1}get hasFields(){return this.fields&&this.fields.length>0}get passwordRevisionDisplayDate(){return this.type!==r.CipherType.Login||null==this.login||null==this.login.password||""===this.login.password?null:this.login.passwordRevisionDate}get isDeleted(){return null!=this.deletedDate}get linkedFieldOptions(){return this.item.linkedFieldOptions}linkedFieldValue(e){var t;const n=null===(t=this.linkedFieldOptions)||void 0===t?void 0:t.get(e);if(null==n)return null;this.item;return this.item[n.propertyKey]}linkedFieldI18nKey(e){var t;return null===(t=this.linkedFieldOptions.get(e))||void 0===t?void 0:t.i18nKey}}},82186:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionView=void 0;const i=n(30260);t.CollectionView=class{constructor(e){this.id=null,this.organizationId=null,this.name=null,this.externalId=null,this.readOnly=null,this.hidePasswords=null,e&&(this.id=e.id,this.organizationId=e.organizationId,this.externalId=e.externalId,e instanceof i.Collection&&(this.readOnly=e.readOnly,this.hidePasswords=e.hidePasswords))}}},93445:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventView=void 0;t.EventView=class{constructor(e){this.message=e.message,this.humanReadableMessage=e.humanReadableMessage,this.appIcon=e.appIcon,this.appName=e.appName,this.userId=e.userId,this.userName=e.userName,this.userEmail=e.userEmail,this.date=e.date,this.ip=e.ip,this.type=e.type}}},58841:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldView=void 0;t.FieldView=class{constructor(e){this.name=null,this.value=null,this.type=null,this.newField=!1,this.showValue=!1,this.linkedId=null,e&&(this.type=e.type,this.linkedId=e.linkedId)}get maskedValue(){return null!=this.value?"••••••••":null}}},50044:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderView=void 0;t.FolderView=class{constructor(e){this.id=null,this.name=null,this.revisionDate=null,e&&(this.id=e.id,this.revisionDate=e.revisionDate)}}},92643:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityView=void 0;const o=n(48244),a=n(70829),s=n(96255),l=n(99413);class c extends o.ItemView{constructor(e){super(),this.title=null,this.middleName=null,this.address1=null,this.address2=null,this.address3=null,this.city=null,this.state=null,this.postalCode=null,this.country=null,this.company=null,this.email=null,this.phone=null,this.ssn=null,this.username=null,this.passportNumber=null,this.licenseNumber=null,this._firstName=null,this._lastName=null,this._subTitle=null}get firstName(){return this._firstName}set firstName(e){this._firstName=e,this._subTitle=null}get lastName(){return this._lastName}set lastName(e){this._lastName=e,this._subTitle=null}get subTitle(){return null!=this._subTitle||null==this.firstName&&null==this.lastName||(this._subTitle="",null!=this.firstName&&(this._subTitle=this.firstName),null!=this.lastName&&(""!==this._subTitle&&(this._subTitle+=" "),this._subTitle+=this.lastName)),this._subTitle}get fullName(){if(null!=this.title||null!=this.firstName||null!=this.middleName||null!=this.lastName){let e="";return null!=this.title&&(e+=this.title+" "),null!=this.firstName&&(e+=this.firstName+" "),null!=this.middleName&&(e+=this.middleName+" "),null!=this.lastName&&(e+=this.lastName),e.trim()}return null}get fullAddress(){let e=this.address1;return a.Utils.isNullOrWhitespace(this.address2)||(a.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address2),a.Utils.isNullOrWhitespace(this.address3)||(a.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address3),e}get fullAddressPart2(){if(null==this.city&&null==this.state&&null==this.postalCode)return null;const e=this.city||"-",t=this.state,n=this.postalCode||"-";let i=e;return a.Utils.isNullOrWhitespace(t)||(i+=", "+t),i+=", "+n,i}}i([l.linkedFieldOption(s.IdentityLinkedId.Title),r("design:type",String)],c.prototype,"title",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.MiddleName),r("design:type",String)],c.prototype,"middleName",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Address1),r("design:type",String)],c.prototype,"address1",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Address2),r("design:type",String)],c.prototype,"address2",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Address3),r("design:type",String)],c.prototype,"address3",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.City,"cityTown"),r("design:type",String)],c.prototype,"city",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.State,"stateProvince"),r("design:type",String)],c.prototype,"state",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.PostalCode,"zipPostalCode"),r("design:type",String)],c.prototype,"postalCode",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Country),r("design:type",String)],c.prototype,"country",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Company),r("design:type",String)],c.prototype,"company",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Email),r("design:type",String)],c.prototype,"email",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Phone),r("design:type",String)],c.prototype,"phone",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Ssn),r("design:type",String)],c.prototype,"ssn",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.Username),r("design:type",String)],c.prototype,"username",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.PassportNumber),r("design:type",String)],c.prototype,"passportNumber",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.LicenseNumber),r("design:type",String)],c.prototype,"licenseNumber",void 0),i([l.linkedFieldOption(s.IdentityLinkedId.FirstName),r("design:type",String),r("design:paramtypes",[String])],c.prototype,"firstName",null),i([l.linkedFieldOption(s.IdentityLinkedId.LastName),r("design:type",String),r("design:paramtypes",[String])],c.prototype,"lastName",null),i([l.linkedFieldOption(s.IdentityLinkedId.FullName),r("design:type",String),r("design:paramtypes",[])],c.prototype,"fullName",null),t.IdentityView=c},48244:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ItemView=void 0;t.ItemView=class{}},38138:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriView=void 0;const i=n(60689),r=n(70829),o=["https://","http://","ssh://","ftp://","sftp://","irc://","vnc://","rdp://","ms-rd:","chrome://","iosapp://","androidapp://"];t.LoginUriView=class{constructor(e){this.match=null,this._uri=null,this._domain=null,this._hostname=null,this._host=null,this._canLaunch=null,e&&(this.match=e.match)}get uri(){return this._uri}set uri(e){this._uri=e,this._domain=null,this._canLaunch=null}get domain(){return null==this._domain&&null!=this.uri&&(this._domain=r.Utils.getDomain(this.uri),""===this._domain&&(this._domain=null)),this._domain}get hostname(){return this.match===i.UriMatchType.RegularExpression?null:(null==this._hostname&&null!=this.uri&&(this._hostname=r.Utils.getHostname(this.uri),""===this._hostname&&(this._hostname=null)),this._hostname)}get host(){return this.match===i.UriMatchType.RegularExpression?null:(null==this._host&&null!=this.uri&&(this._host=r.Utils.getHost(this.uri),""===this._host&&(this._host=null)),this._host)}get hostnameOrUri(){return null!=this.hostname?this.hostname:this.uri}get hostOrUri(){return null!=this.host?this.host:this.uri}get isWebsite(){return null!=this.uri&&(0===this.uri.indexOf("http://")||0===this.uri.indexOf("https://")||this.uri.indexOf("://")<0&&r.Utils.tldEndingRegex.test(this.uri))}get canLaunch(){if(null!=this._canLaunch)return this._canLaunch;if(null!=this.uri&&this.match!==i.UriMatchType.RegularExpression){const e=this.launchUri;for(let t=0;t<o.length;t++)if(0===e.indexOf(o[t]))return this._canLaunch=!0,this._canLaunch}return this._canLaunch=!1,this._canLaunch}get launchUri(){return this.uri.indexOf("://")<0&&r.Utils.tldEndingRegex.test(this.uri)?"http://"+this.uri:this.uri}}},52450:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginView=void 0;const o=n(48244),a=n(70829),s=n(96255),l=n(99413);class c extends o.ItemView{constructor(e){super(),this.username=null,this.password=null,this.passwordRevisionDate=null,this.totp=null,this.uris=null,this.autofillOnPageLoad=null,e&&(this.passwordRevisionDate=e.passwordRevisionDate,this.autofillOnPageLoad=e.autofillOnPageLoad)}get uri(){return this.hasUris?this.uris[0].uri:null}get maskedPassword(){return null!=this.password?"••••••••":null}get subTitle(){return this.username}get canLaunch(){return this.hasUris&&this.uris.some((e=>e.canLaunch))}get hasTotp(){return!a.Utils.isNullOrWhitespace(this.totp)}get launchUri(){if(this.hasUris){const e=this.uris.find((e=>e.canLaunch));if(null!=e)return e.launchUri}return null}get hasUris(){return null!=this.uris&&this.uris.length>0}}i([l.linkedFieldOption(s.LoginLinkedId.Username),r("design:type",String)],c.prototype,"username",void 0),i([l.linkedFieldOption(s.LoginLinkedId.Password),r("design:type",String)],c.prototype,"password",void 0),t.LoginView=c},27551:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryView=void 0;t.PasswordHistoryView=class{constructor(e){this.password=null,this.lastUsedDate=null,e&&(this.lastUsedDate=e.lastUsedDate)}}},56561:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteView=void 0;const i=n(48244);class r extends i.ItemView{constructor(e){super(),this.type=null,e&&(this.type=e.type)}get subTitle(){return null}}t.SecureNoteView=r},69254:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendAccessView=void 0;const i=n(26425),r=n(24018);t.SendAccessView=class{constructor(e){this.id=null,this.name=null,this.type=null,this.text=new r.SendTextView,this.file=new i.SendFileView,this.expirationDate=null,this.creatorIdentifier=null,e&&(this.id=e.id,this.type=e.type,this.expirationDate=e.expirationDate,this.creatorIdentifier=e.creatorIdentifier)}}},26425:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileView=void 0;t.SendFileView=class{constructor(e){this.id=null,this.size=null,this.sizeName=null,this.fileName=null,e&&(this.id=e.id,this.size=e.size,this.sizeName=e.sizeName)}get fileSize(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0}}},24018:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextView=void 0;t.SendTextView=class{constructor(e){this.text=null,e&&(this.hidden=e.hidden)}get maskedText(){return null!=this.text?"••••••••":null}}},21801:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendView=void 0;const i=n(70829),r=n(26425),o=n(24018);t.SendView=class{constructor(e){this.id=null,this.accessId=null,this.name=null,this.notes=null,this.type=null,this.text=new o.SendTextView,this.file=new r.SendFileView,this.maxAccessCount=null,this.accessCount=0,this.revisionDate=null,this.deletionDate=null,this.expirationDate=null,this.password=null,this.disabled=!1,this.hideEmail=!1,e&&(this.id=e.id,this.accessId=e.accessId,this.type=e.type,this.maxAccessCount=e.maxAccessCount,this.accessCount=e.accessCount,this.revisionDate=e.revisionDate,this.deletionDate=e.deletionDate,this.expirationDate=e.expirationDate,this.disabled=e.disabled,this.password=e.password,this.hideEmail=e.hideEmail)}get urlB64Key(){return i.Utils.fromBufferToUrlB64(this.key)}get maxAccessCountReached(){return null!=this.maxAccessCount&&this.accessCount>=this.maxAccessCount}get expired(){return null!=this.expirationDate&&this.expirationDate<=new Date}get pendingDelete(){return this.deletionDate<=new Date}}},29697:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiService=void 0;const r=n(83914),o=n(70829),a=n(47159),s=n(12197),l=n(37394),c=n(46063),d=n(55134),p=n(54690),u=n(98594),m=n(82859),h=n(21531),v=n(25237),f=n(52758),g=n(29345),y=n(90380),x=n(72513),S=n(65392),b=n(6985),w=n(24749),I=n(68026),C=n(47568),E=n(78508),P=n(94180),k=n(59621),A=n(31937),O=n(98631),T=n(26888),M=n(79997),D=n(27543),B=n(43886),R=n(93952),U=n(17866),V=n(46109),F=n(78343),N=n(86998),_=n(97051),j=n(97972),z=n(64396),L=n(51204),K=n(17889),q=n(77838),G=n(90742),W=n(66610),H=n(59561),$=n(94548),Q=n(70287),Y=n(78302),J=n(35508),X=n(29964),Z=n(43373),ee=n(38669),te=n(42142),ne=n(42142),ie=n(14402),re=n(30192),oe=n(27177);t.ApiService=class{constructor(e,t,n,i,o=null){this.tokenService=e,this.platformUtilsService=t,this.environmentService=n,this.logoutCallback=i,this.customUserAgent=o,this.isWebClient=!1,this.isDesktopClient=!1,this.device=t.getDevice(),this.deviceType=this.device.toString(),this.isWebClient=this.device===r.DeviceType.IEBrowser||this.device===r.DeviceType.ChromeBrowser||this.device===r.DeviceType.EdgeBrowser||this.device===r.DeviceType.FirefoxBrowser||this.device===r.DeviceType.OperaBrowser||this.device===r.DeviceType.SafariBrowser||this.device===r.DeviceType.UnknownBrowser||this.device===r.DeviceType.VivaldiBrowser,this.isDesktopClient=this.device===r.DeviceType.WindowsDesktop||this.device===r.DeviceType.MacOsDesktop||this.device===r.DeviceType.LinuxDesktop}postIdentityToken(e){var t;return i(this,void 0,void 0,(function*(){const n=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&n.set("User-Agent",this.customUserAgent),e.alterIdentityTokenHeaders(n);const i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+"/connect/token",{body:this.qsStringify(e.toIdentityToken(null!==(t=e.clientId)&&void 0!==t?t:this.platformUtilsService.identityClientId)),credentials:this.getCredentials(),cache:"no-store",headers:n,method:"POST"}));let r=null;if(this.isJsonResponse(i)&&(r=yield i.json()),null!=r){if(200===i.status)return new S.IdentityTokenResponse(r);if(400===i.status&&r.TwoFactorProviders2&&Object.keys(r.TwoFactorProviders2).length)return yield this.tokenService.clearTwoFactorToken(e.email),new b.IdentityTwoFactorResponse(r);if(400===i.status&&r.HCaptcha_SiteKey&&Object.keys(r.HCaptcha_SiteKey).length)return new x.IdentityCaptchaResponse(r)}return Promise.reject(new v.ErrorResponse(r,i.status,!0))}))}refreshIdentityToken(){return i(this,void 0,void 0,(function*(){try{yield this.doAuthRefresh()}catch(e){return Promise.reject(null)}}))}getProfile(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/profile",null,!0,!0);return new U.ProfileResponse(e)}))}getUserBilling(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/billing",null,!0,!0);return new c.BillingResponse(e)}))}getUserSubscription(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/subscription",null,!0,!0);return new W.SubscriptionResponse(e)}))}getTaxInfo(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/accounts/tax",null,!0,!0);return new $.TaxInfoResponse(e)}))}putProfile(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/accounts/profile",e,!0,!0);return new U.ProfileResponse(t)}))}putTaxInfo(e){return this.send("PUT","/accounts/tax",e,!0,!1)}postPrelogin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/prelogin",e,!1,!0);return new R.PreloginResponse(t)}))}postEmailToken(e){return this.send("POST","/accounts/email-token",e,!0,!1)}postEmail(e){return this.send("POST","/accounts/email",e,!0,!1)}postPassword(e){return this.send("POST","/accounts/password",e,!0,!1)}setPassword(e){return this.send("POST","/accounts/set-password",e,!0,!1)}postSetKeyConnectorKey(e){return this.send("POST","/accounts/set-key-connector-key",e,!0,!1)}postSecurityStamp(e){return this.send("POST","/accounts/security-stamp",e,!0,!1)}deleteAccount(e){return this.send("DELETE","/accounts",e,!0,!1)}getAccountRevisionDate(){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/accounts/revision-date",null,!0,!0)}))}postPasswordHint(e){return this.send("POST","/accounts/password-hint",e,!1,!1)}postRegister(e){return this.send("POST","/accounts/register",e,!1,!1)}postPremium(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/premium",e,!0,!0);return new M.PaymentResponse(t)}))}postIapCheck(e){return i(this,void 0,void 0,(function*(){return this.send("POST","/accounts/iap-check",e,!0,!1)}))}postReinstatePremium(){return this.send("POST","/accounts/reinstate-premium",null,!0,!1)}postCancelPremium(){return this.send("POST","/accounts/cancel-premium",null,!0,!1)}postAccountStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/accounts/storage",e,!0,!0);return new M.PaymentResponse(t)}))}postAccountPayment(e){return this.send("POST","/accounts/payment",e,!0,!1)}postAccountLicense(e){return this.send("POST","/accounts/license",e,!0,!1)}postAccountKeys(e){return this.send("POST","/accounts/keys",e,!0,!1)}postAccountKey(e){return this.send("POST","/accounts/key",e,!0,!1)}postAccountVerifyEmail(){return this.send("POST","/accounts/verify-email",null,!0,!1)}postAccountVerifyEmailToken(e){return this.send("POST","/accounts/verify-email-token",e,!1,!1)}postAccountVerifyPassword(e){return this.send("POST","/accounts/verify-password",e,!0,!1)}postAccountRecoverDelete(e){return this.send("POST","/accounts/delete-recover",e,!1,!1)}postAccountRecoverDeleteToken(e){return this.send("POST","/accounts/delete-recover-token",e,!1,!1)}postAccountKdf(e){return this.send("POST","/accounts/kdf",e,!0,!1)}deleteSsoUser(e){return i(this,void 0,void 0,(function*(){return this.send("DELETE","/accounts/sso/"+e,null,!0,!1)}))}getSsoUserIdentifier(){return i(this,void 0,void 0,(function*(){return this.send("GET","/accounts/sso/user-identifier",null,!0,!0)}))}postUserApiKey(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.send("POST","/accounts/api-key",t,!0,!0);return new a.ApiKeyResponse(e)}))}postUserRotateApiKey(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.send("POST","/accounts/rotate-api-key",t,!0,!0);return new a.ApiKeyResponse(e)}))}putUpdateTempPassword(e){return this.send("PUT","/accounts/update-temp-password",e,!0,!1)}postAccountRequestOTP(){return this.send("POST","/accounts/request-otp",null,!0,!1)}postAccountVerifyOTP(e){return this.send("POST","/accounts/verify-otp",e,!0,!1)}postConvertToKeyConnector(){return this.send("POST","/accounts/convert-to-key-connector",null,!0,!1)}getFolder(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/folders/"+e,null,!0,!0);return new g.FolderResponse(t)}))}postFolder(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/folders",e,!0,!0);return new g.FolderResponse(t)}))}putFolder(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/folders/"+e,t,!0,!0);return new g.FolderResponse(n)}))}deleteFolder(e){return this.send("DELETE","/folders/"+e,null,!0,!1)}getSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/sends/"+e,null,!0,!0);return new G.SendResponse(t)}))}postSendAccess(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("POST","/sends/access/"+e,t,!1,!0,n,(t=>{t.set("Send-Id",e)}));return new L.SendAccessResponse(i)}))}getSendFileDownloadData(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("POST","/sends/"+e.id+"/access/file/"+e.file.id,t,!1,!0,n,(t=>{t.set("Send-Id",e.id)}));return new K.SendFileDownloadDataResponse(i)}))}getSends(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/sends",null,!0,!0);return new w.ListResponse(e,G.SendResponse)}))}postSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends",e,!0,!0);return new G.SendResponse(t)}))}postFileTypeSend(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends/file/v2",e,!0,!0);return new q.SendFileUploadDataResponse(t)}))}renewSendFileUploadUrl(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/sends/"+e+"/file/"+t,null,!0,!0);return new q.SendFileUploadDataResponse(n)}))}postSendFile(e,t,n){return this.send("POST","/sends/"+e+"/file/"+t,n,!0,!1)}postSendFileLegacy(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/sends/file",e,!0,!0);return new G.SendResponse(t)}))}putSend(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/sends/"+e,t,!0,!0);return new G.SendResponse(n)}))}putSendRemovePassword(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/sends/"+e+"/remove-password",null,!0,!0);return new G.SendResponse(t)}))}deleteSend(e){return this.send("DELETE","/sends/"+e,null,!0,!1)}getCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/"+e,null,!0,!0);return new p.CipherResponse(t)}))}getCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/"+e+"/admin",null,!0,!0);return new p.CipherResponse(t)}))}getCiphersOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/ciphers/organization-details?organizationId="+e,null,!0,!0);return new w.ListResponse(t,p.CipherResponse)}))}postCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers",e,!0,!0);return new p.CipherResponse(t)}))}postCipherCreate(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers/create",e,!0,!0);return new p.CipherResponse(t)}))}postCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/ciphers/admin",e,!0,!0);return new p.CipherResponse(t)}))}putCipher(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e,t,!0,!0);return new p.CipherResponse(n)}))}putCipherAdmin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e+"/admin",t,!0,!0);return new p.CipherResponse(n)}))}deleteCipher(e){return this.send("DELETE","/ciphers/"+e,null,!0,!1)}deleteCipherAdmin(e){return this.send("DELETE","/ciphers/"+e+"/admin",null,!0,!1)}deleteManyCiphers(e){return this.send("DELETE","/ciphers",e,!0,!1)}deleteManyCiphersAdmin(e){return this.send("DELETE","/ciphers/admin",e,!0,!1)}putMoveCiphers(e){return this.send("PUT","/ciphers/move",e,!0,!1)}putShareCipher(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/ciphers/"+e+"/share",t,!0,!0);return new p.CipherResponse(n)}))}putShareCiphers(e){return this.send("PUT","/ciphers/share",e,!0,!1)}putCipherCollections(e,t){return this.send("PUT","/ciphers/"+e+"/collections",t,!0,!1)}putCipherCollectionsAdmin(e,t){return this.send("PUT","/ciphers/"+e+"/collections-admin",t,!0,!1)}postPurgeCiphers(e,t=null){let n="/ciphers/purge";return null!=t&&(n+="?organizationId="+t),this.send("POST",n,e,!0,!1)}postImportCiphers(e){return this.send("POST","/ciphers/import",e,!0,!1)}postImportOrganizationCiphers(e,t){return this.send("POST","/ciphers/import-organization?organizationId="+e,t,!0,!1)}putDeleteCipher(e){return this.send("PUT","/ciphers/"+e+"/delete",null,!0,!1)}putDeleteCipherAdmin(e){return this.send("PUT","/ciphers/"+e+"/delete-admin",null,!0,!1)}putDeleteManyCiphers(e){return this.send("PUT","/ciphers/delete",e,!0,!1)}putDeleteManyCiphersAdmin(e){return this.send("PUT","/ciphers/delete-admin",e,!0,!1)}putRestoreCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/"+e+"/restore",null,!0,!0);return new p.CipherResponse(t)}))}putRestoreCipherAdmin(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/"+e+"/restore-admin",null,!0,!0);return new p.CipherResponse(t)}))}putRestoreManyCiphers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/ciphers/restore",e,!0,!0);return new w.ListResponse(t,p.CipherResponse)}))}getAttachmentData(e,t,n){return i(this,void 0,void 0,(function*(){const i=(null!=n?"/emergency-access/"+n+"/":"/ciphers/")+e+"/attachment/"+t,r=yield this.send("GET",i,null,!0,!0);return new s.AttachmentResponse(r)}))}postCipherAttachment(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment/v2",t,!0,!0);return new l.AttachmentUploadDataResponse(n)}))}postCipherAttachmentLegacy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment",t,!0,!0);return new p.CipherResponse(n)}))}postCipherAttachmentAdminLegacy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/ciphers/"+e+"/attachment-admin",t,!0,!0);return new p.CipherResponse(n)}))}deleteCipherAttachment(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t,null,!0,!1)}deleteCipherAttachmentAdmin(e,t){return this.send("DELETE","/ciphers/"+e+"/attachment/"+t+"/admin",null,!0,!1)}postShareCipherAttachment(e,t,n,i){return this.send("POST","/ciphers/"+e+"/attachment/"+t+"/share?organizationId="+i,n,!0,!1)}renewAttachmentUploadUrl(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/ciphers/"+e+"/attachment/"+t+"/renew",null,!0,!0);return new l.AttachmentUploadDataResponse(n)}))}postAttachmentFile(e,t,n){return this.send("POST","/ciphers/"+e+"/attachment/"+t,n,!0,!1)}getCollectionDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/collections/"+t+"/details",null,!0,!0);return new u.CollectionGroupDetailsResponse(n)}))}getUserCollections(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/collections",null,!0,!0);return new w.ListResponse(e,u.CollectionResponse)}))}getCollections(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/collections",null,!0,!0);return new w.ListResponse(t,u.CollectionResponse)}))}getCollectionUsers(e,t){return i(this,void 0,void 0,(function*(){return(yield this.send("GET","/organizations/"+e+"/collections/"+t+"/users",null,!0,!0)).map((e=>new z.SelectionReadOnlyResponse(e)))}))}postCollection(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/collections",t,!0,!0);return new u.CollectionResponse(n)}))}putCollection(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/collections/"+t,n,!0,!0);return new u.CollectionResponse(i)}))}putCollectionUsers(e,t,n){return i(this,void 0,void 0,(function*(){yield this.send("PUT","/organizations/"+e+"/collections/"+t+"/users",n,!0,!1)}))}deleteCollection(e,t){return this.send("DELETE","/organizations/"+e+"/collections/"+t,null,!0,!1)}deleteCollectionUser(e,t,n){return this.send("DELETE","/organizations/"+e+"/collections/"+t+"/user/"+n,null,!0,!1)}getGroupDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/groups/"+t+"/details",null,!0,!0);return new y.GroupDetailsResponse(n)}))}getGroups(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/groups",null,!0,!0);return new w.ListResponse(t,y.GroupResponse)}))}getGroupUsers(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/organizations/"+e+"/groups/"+t+"/users",null,!0,!0)}))}postGroup(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/groups",t,!0,!0);return new y.GroupResponse(n)}))}putGroup(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/groups/"+t,n,!0,!0);return new y.GroupResponse(i)}))}putGroupUsers(e,t,n){return i(this,void 0,void 0,(function*(){yield this.send("PUT","/organizations/"+e+"/groups/"+t+"/users",n,!0,!1)}))}deleteGroup(e,t){return this.send("DELETE","/organizations/"+e+"/groups/"+t,null,!0,!1)}deleteGroupUser(e,t,n){return this.send("DELETE","/organizations/"+e+"/groups/"+t+"/user/"+n,null,!0,!1)}getPolicy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/policies/"+t,null,!0,!0);return new B.PolicyResponse(n)}))}getPolicies(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/policies",null,!0,!0);return new w.ListResponse(t,B.PolicyResponse)}))}getPoliciesByToken(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET","/organizations/"+e+"/policies/token?token="+encodeURIComponent(t)+"&email="+encodeURIComponent(n)+"&organizationUserId="+r,null,!1,!0);return new w.ListResponse(i,B.PolicyResponse)}))}getPoliciesByInvitedUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/policies/invited-user?userId="+t,null,!1,!0);return new w.ListResponse(n,B.PolicyResponse)}))}putPolicy(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("PUT","/organizations/"+e+"/policies/"+t,n,!0,!0);return new B.PolicyResponse(i)}))}getOrganizationUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/users/"+t,null,!0,!0);return new T.OrganizationUserDetailsResponse(n)}))}getOrganizationUserGroups(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("GET","/organizations/"+e+"/users/"+t+"/groups",null,!0,!0)}))}getOrganizationUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/users",null,!0,!0);return new w.ListResponse(t,T.OrganizationUserUserDetailsResponse)}))}getOrganizationUserResetPasswordDetails(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/organizations/"+e+"/users/"+t+"/reset-password-details",null,!0,!0);return new T.OrganizationUserResetPasswordDetailsReponse(n)}))}getOrganizationAutoEnrollStatus(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/auto-enroll-status",null,!0,!0);return new C.OrganizationAutoEnrollStatusResponse(t)}))}postOrganizationUserInvite(e,t){return this.send("POST","/organizations/"+e+"/users/invite",t,!0,!1)}postOrganizationUserReinvite(e,t){return this.send("POST","/organizations/"+e+"/users/"+t+"/reinvite",null,!0,!1)}postManyOrganizationUserReinvite(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/reinvite",t,!0,!0);return new w.ListResponse(n,O.OrganizationUserBulkResponse)}))}postOrganizationUserAccept(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/accept",n,!0,!1)}postOrganizationUserConfirm(e,t,n){return this.send("POST","/organizations/"+e+"/users/"+t+"/confirm",n,!0,!1)}postOrganizationUsersPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/public-keys",t,!0,!0);return new w.ListResponse(n,A.OrganizationUserBulkPublicKeyResponse)}))}postOrganizationUserBulkConfirm(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/users/confirm",t,!0,!0);return new w.ListResponse(n,O.OrganizationUserBulkResponse)}))}putOrganizationUser(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t,n,!0,!1)}putOrganizationUserGroups(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/groups",n,!0,!1)}putOrganizationUserResetPasswordEnrollment(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/reset-password-enrollment",n,!0,!1)}putOrganizationUserResetPassword(e,t,n){return this.send("PUT","/organizations/"+e+"/users/"+t+"/reset-password",n,!0,!1)}deleteOrganizationUser(e,t){return this.send("DELETE","/organizations/"+e+"/users/"+t,null,!0,!1)}deleteManyOrganizationUsers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("DELETE","/organizations/"+e+"/users",t,!0,!0);return new w.ListResponse(n,O.OrganizationUserBulkResponse)}))}getPlans(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/plans/",null,!0,!0);return new w.ListResponse(e,D.PlanResponse)}))}postImportDirectory(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/import",t,!0,!1)}))}postPublicImportDirectory(e){return i(this,void 0,void 0,(function*(){return this.send("POST","/public/organization/import",e,!0,!1)}))}getTaxRates(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/plans/sales-tax-rates/",null,!0,!0);return new w.ListResponse(e,Q.TaxRateResponse)}))}getSettingsDomains(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/settings/domains",null,!0,!0);return new m.DomainsResponse(e)}))}putSettingsDomains(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/settings/domains",e,!0,!0);return new m.DomainsResponse(t)}))}getSync(){return i(this,void 0,void 0,(function*(){const e=this.isDesktopClient||this.isWebClient?"/sync?excludeDomains=true":"/sync",t=yield this.send("GET",e,null,!0,!0);return new H.SyncResponse(t)}))}getTwoFactorProviders(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/two-factor",null,!0,!0);return new w.ListResponse(e,Z.TwoFactorProviderResponse)}))}getTwoFactorOrganizationProviders(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/two-factor",null,!0,!0);return new w.ListResponse(t,Z.TwoFactorProviderResponse)}))}getTwoFactorAuthenticator(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-authenticator",e,!0,!0);return new Y.TwoFactorAuthenticatorResponse(t)}))}getTwoFactorEmail(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-email",e,!0,!0);return new X.TwoFactorEmailResponse(t)}))}getTwoFactorDuo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-duo",e,!0,!0);return new J.TwoFactorDuoResponse(t)}))}getTwoFactorOrganizationDuo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/two-factor/get-duo",t,!0,!0);return new J.TwoFactorDuoResponse(n)}))}getTwoFactorYubiKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-yubikey",e,!0,!0);return new ie.TwoFactorYubiKeyResponse(t)}))}getTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-webauthn",e,!0,!0);return new te.TwoFactorWebAuthnResponse(t)}))}getTwoFactorWebAuthnChallenge(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-webauthn-challenge",e,!0,!0);return new ne.ChallengeResponse(t)}))}getTwoFactorRecover(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/two-factor/get-recover",e,!0,!0);return new ee.TwoFactorRecoverResponse(t)}))}putTwoFactorAuthenticator(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/authenticator",e,!0,!0);return new Y.TwoFactorAuthenticatorResponse(t)}))}putTwoFactorEmail(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/email",e,!0,!0);return new X.TwoFactorEmailResponse(t)}))}putTwoFactorDuo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/duo",e,!0,!0);return new J.TwoFactorDuoResponse(t)}))}putTwoFactorOrganizationDuo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e+"/two-factor/duo",t,!0,!0);return new J.TwoFactorDuoResponse(n)}))}putTwoFactorYubiKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/yubikey",e,!0,!0);return new ie.TwoFactorYubiKeyResponse(t)}))}putTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=e.deviceResponse.response,n=Object.assign({},e);n.deviceResponse={id:e.deviceResponse.id,rawId:btoa(e.deviceResponse.id),type:e.deviceResponse.type,extensions:e.deviceResponse.getClientExtensionResults(),response:{AttestationObject:o.Utils.fromBufferToB64(t.attestationObject),clientDataJson:o.Utils.fromBufferToB64(t.clientDataJSON)}};const i=yield this.send("PUT","/two-factor/webauthn",n,!0,!0);return new te.TwoFactorWebAuthnResponse(i)}))}deleteTwoFactorWebAuthn(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("DELETE","/two-factor/webauthn",e,!0,!0);return new te.TwoFactorWebAuthnResponse(t)}))}putTwoFactorDisable(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("PUT","/two-factor/disable",e,!0,!0);return new Z.TwoFactorProviderResponse(t)}))}putTwoFactorOrganizationDisable(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e+"/two-factor/disable",t,!0,!0);return new Z.TwoFactorProviderResponse(n)}))}postTwoFactorRecover(e){return this.send("POST","/two-factor/recover",e,!1,!1)}postTwoFactorEmailSetup(e){return this.send("POST","/two-factor/send-email",e,!0,!1)}postTwoFactorEmail(e){return this.send("POST","/two-factor/send-email-login",e,!1,!1)}getEmergencyAccessTrusted(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/emergency-access/trusted",null,!0,!0);return new w.ListResponse(e,h.EmergencyAccessGranteeDetailsResponse)}))}getEmergencyAccessGranted(){return i(this,void 0,void 0,(function*(){const e=yield this.send("GET","/emergency-access/granted",null,!0,!0);return new w.ListResponse(e,h.EmergencyAccessGrantorDetailsResponse)}))}getEmergencyAccess(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/emergency-access/"+e,null,!0,!0);return new h.EmergencyAccessGranteeDetailsResponse(t)}))}getEmergencyGrantorPolicies(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/emergency-access/"+e+"/policies",null,!0,!0);return new w.ListResponse(t,B.PolicyResponse)}))}putEmergencyAccess(e,t){return this.send("PUT","/emergency-access/"+e,t,!0,!1)}deleteEmergencyAccess(e){return this.send("DELETE","/emergency-access/"+e,null,!0,!1)}postEmergencyAccessInvite(e){return this.send("POST","/emergency-access/invite",e,!0,!1)}postEmergencyAccessReinvite(e){return this.send("POST","/emergency-access/"+e+"/reinvite",null,!0,!1)}postEmergencyAccessAccept(e,t){return this.send("POST","/emergency-access/"+e+"/accept",t,!0,!1)}postEmergencyAccessConfirm(e,t){return this.send("POST","/emergency-access/"+e+"/confirm",t,!0,!1)}postEmergencyAccessInitiate(e){return this.send("POST","/emergency-access/"+e+"/initiate",null,!0,!1)}postEmergencyAccessApprove(e){return this.send("POST","/emergency-access/"+e+"/approve",null,!0,!1)}postEmergencyAccessReject(e){return this.send("POST","/emergency-access/"+e+"/reject",null,!0,!1)}postEmergencyAccessTakeover(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/emergency-access/"+e+"/takeover",null,!0,!0);return new h.EmergencyAccessTakeoverResponse(t)}))}postEmergencyAccessPassword(e,t){return i(this,void 0,void 0,(function*(){yield this.send("POST","/emergency-access/"+e+"/password",t,!0,!0)}))}postEmergencyAccessView(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/emergency-access/"+e+"/view",null,!0,!0);return new h.EmergencyAccessViewResponse(t)}))}getOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e,null,!0,!0);return new P.OrganizationResponse(t)}))}getOrganizationBilling(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/billing",null,!0,!0);return new c.BillingResponse(t)}))}getOrganizationSubscription(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/subscription",null,!0,!0);return new k.OrganizationSubscriptionResponse(t)}))}getOrganizationLicense(e,t){return i(this,void 0,void 0,(function*(){return this.send("GET","/organizations/"+e+"/license?installationId="+t,null,!0,!0)}))}getOrganizationTaxInfo(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/tax",null,!0,!0);return new $.TaxInfoResponse(t)}))}getOrganizationSso(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/sso",null,!0,!0);return new I.OrganizationSsoResponse(t)}))}postOrganization(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/organizations",e,!0,!0);return new P.OrganizationResponse(t)}))}putOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/organizations/"+e,t,!0,!0);return new P.OrganizationResponse(n)}))}putOrganizationTaxInfo(e,t){return i(this,void 0,void 0,(function*(){return this.send("PUT","/organizations/"+e+"/tax",t,!0,!1)}))}postLeaveOrganization(e){return this.send("POST","/organizations/"+e+"/leave",null,!0,!1)}postOrganizationLicense(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("POST","/organizations/license",e,!0,!0);return new P.OrganizationResponse(t)}))}postOrganizationLicenseUpdate(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/license",t,!0,!1)}))}postOrganizationApiKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/api-key",t,!0,!0);return new a.ApiKeyResponse(n)}))}postOrganizationRotateApiKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/rotate-api-key",t,!0,!0);return new a.ApiKeyResponse(n)}))}postOrganizationSso(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/sso",t,!0,!0);return new I.OrganizationSsoResponse(n)}))}postOrganizationUpgrade(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/upgrade",t,!0,!0);return new M.PaymentResponse(n)}))}postOrganizationUpdateSubscription(e,t){return i(this,void 0,void 0,(function*(){return this.send("POST","/organizations/"+e+"/subscription",t,!0,!1)}))}postOrganizationSeat(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/seat",t,!0,!0);return new M.PaymentResponse(n)}))}postOrganizationStorage(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/storage",t,!0,!0);return new M.PaymentResponse(n)}))}postOrganizationPayment(e,t){return this.send("POST","/organizations/"+e+"/payment",t,!0,!1)}postOrganizationVerifyBank(e,t){return this.send("POST","/organizations/"+e+"/verify-bank",t,!0,!1)}postOrganizationCancel(e){return this.send("POST","/organizations/"+e+"/cancel",null,!0,!1)}postOrganizationReinstate(e){return this.send("POST","/organizations/"+e+"/reinstate",null,!0,!1)}deleteOrganization(e,t){return this.send("DELETE","/organizations/"+e,t,!0,!1)}getOrganizationKeys(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/organizations/"+e+"/keys",null,!0,!0);return new E.OrganizationKeysResponse(t)}))}postOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/organizations/"+e+"/keys",t,!0,!0);return new E.OrganizationKeysResponse(n)}))}postProviderSetup(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/setup",t,!0,!0);return new F.ProviderResponse(n)}))}getProvider(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e,null,!0,!0);return new F.ProviderResponse(t)}))}putProvider(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("PUT","/providers/"+e,t,!0,!0);return new F.ProviderResponse(n)}))}getProviderUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e+"/users",null,!0,!0);return new w.ListResponse(t,j.ProviderUserUserDetailsResponse)}))}getProviderUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("GET","/providers/"+e+"/users/"+t,null,!0,!0);return new j.ProviderUserResponse(n)}))}postProviderUserInvite(e,t){return this.send("POST","/providers/"+e+"/users/invite",t,!0,!1)}postProviderUserReinvite(e,t){return this.send("POST","/providers/"+e+"/users/"+t+"/reinvite",null,!0,!1)}postManyProviderUserReinvite(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/reinvite",t,!0,!0);return new w.ListResponse(n,_.ProviderUserBulkResponse)}))}postProviderUserBulkConfirm(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/confirm",t,!0,!0);return new w.ListResponse(n,_.ProviderUserBulkResponse)}))}deleteManyProviderUsers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("DELETE","/providers/"+e+"/users",t,!0,!0);return new w.ListResponse(n,_.ProviderUserBulkResponse)}))}postProviderUserAccept(e,t,n){return this.send("POST","/providers/"+e+"/users/"+t+"/accept",n,!0,!1)}postProviderUserConfirm(e,t,n){return this.send("POST","/providers/"+e+"/users/"+t+"/confirm",n,!0,!1)}postProviderUsersPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/users/public-keys",t,!0,!0);return new w.ListResponse(n,N.ProviderUserBulkPublicKeyResponse)}))}putProviderUser(e,t,n){return this.send("PUT","/providers/"+e+"/users/"+t,n,!0,!1)}deleteProviderUser(e,t){return this.send("DELETE","/providers/"+e+"/users/"+t,null,!0,!1)}getProviderClients(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/providers/"+e+"/organizations",null,!0,!0);return new w.ListResponse(t,V.ProviderOrganizationOrganizationDetailsResponse)}))}postProviderAddOrganization(e,t){return this.send("POST","/providers/"+e+"/organizations/add",t,!0,!1)}postProviderCreateOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.send("POST","/providers/"+e+"/organizations",t,!0,!0);return new V.ProviderOrganizationResponse(n)}))}deleteProviderOrganization(e,t){return this.send("DELETE","/providers/"+e+"/organizations/"+t,null,!0,!1)}getEvents(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/events",e,t,n),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}getEventsCipher(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/ciphers/"+e+"/events",t,n,r),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}getEventsOrganization(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/organizations/"+e+"/events",t,n,r),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}getEventsOrganizationUser(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/organizations/"+e+"/users/"+t+"/events",n,r,o),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}getEventsProvider(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/providers/"+e+"/events",t,n,r),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}getEventsProviderUser(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i=yield this.send("GET",this.addEventParameters("/providers/"+e+"/users/"+t+"/events",n,r,o),null,!0,!0);return new w.ListResponse(i,f.EventResponse)}))}postEventsCollect(e){return i(this,void 0,void 0,(function*(){const t=yield this.getActiveBearerToken(),n=new Headers({"Device-Type":this.deviceType,Authorization:"Bearer "+t,"Content-Type":"application/json; charset=utf-8"});null!=this.customUserAgent&&n.set("User-Agent",this.customUserAgent);if(200!==(yield this.fetch(new Request(this.environmentService.getEventsUrl()+"/collect",{cache:"no-store",credentials:this.getCredentials(),method:"POST",body:JSON.stringify(e),headers:n}))).status)return Promise.reject("Event post failed.")}))}getUserPublicKey(e){return i(this,void 0,void 0,(function*(){const t=yield this.send("GET","/users/"+e+"/public-key",null,!0,!0);return new re.UserKeyResponse(t)}))}getHibpBreach(e){return i(this,void 0,void 0,(function*(){return(yield this.send("GET","/hibp/breach?username="+e,null,!0,!0)).map((e=>new d.BreachAccountResponse(e)))}))}postBitPayInvoice(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/bitpay-invoice",e,!0,!0)}))}postSetupPayment(){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/setup-payment",null,!0,!0)}))}getUserKeyFromKeyConnector(e){return i(this,void 0,void 0,(function*(){const t=yield this.getActiveBearerToken(),n=yield this.fetch(new Request(e+"/user-keys",{cache:"no-store",method:"GET",headers:new Headers({Accept:"application/json",Authorization:"Bearer "+t})}));if(200!==n.status){const e=yield this.handleError(n,!1,!0);return Promise.reject(e)}return new oe.KeyConnectorUserKeyResponse(yield n.json())}))}postUserKeyToKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getActiveBearerToken(),i=yield this.fetch(new Request(e+"/user-keys",{cache:"no-store",method:"POST",headers:new Headers({Accept:"application/json",Authorization:"Bearer "+n,"Content-Type":"application/json; charset=utf-8"}),body:JSON.stringify(t)}));if(200!==i.status){const e=yield this.handleError(i,!1,!0);return Promise.reject(e)}}))}getKeyConnectorAlive(e){return i(this,void 0,void 0,(function*(){const t=yield this.fetch(new Request(e+"/alive",{cache:"no-store",method:"GET",headers:new Headers({Accept:"application/json","Content-Type":"application/json; charset=utf-8"})}));if(200!==t.status){const e=yield this.handleError(t,!1,!0);return Promise.reject(e)}}))}getActiveBearerToken(){return i(this,void 0,void 0,(function*(){let e=yield this.tokenService.getToken();return(yield this.tokenService.tokenNeedsRefresh())&&(yield this.doAuthRefresh(),e=yield this.tokenService.getToken()),e}))}fetch(e){return"GET"===e.method&&(e.headers.set("Cache-Control","no-store"),e.headers.set("Pragma","no-cache")),this.nativeFetch(e)}nativeFetch(e){return fetch(e)}preValidateSso(e){return i(this,void 0,void 0,(function*(){if(null==e||""===e)throw new Error("Organization Identifier was not provided.");const t=new Headers({Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent);const n=`/account/prevalidate?domainHint=${encodeURIComponent(e)}`,i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+n,{cache:"no-store",credentials:this.getCredentials(),headers:t,method:"GET"}));if(200===i.status)return!0;{const e=yield this.handleError(i,!1,!0);return Promise.reject(e)}}))}postCreateSponsorship(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/"+e+"/families-for-enterprise",t,!0,!1)}))}deleteRevokeSponsorship(e){return i(this,void 0,void 0,(function*(){return yield this.send("DELETE","/organization/sponsorship/"+e,null,!0,!1)}))}deleteRemoveSponsorship(e){return i(this,void 0,void 0,(function*(){return yield this.send("DELETE","/organization/sponsorship/sponsored/"+e,null,!0,!1)}))}postPreValidateSponsorshipToken(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/validate-token?sponsorshipToken="+encodeURIComponent(e),null,!0,!0)}))}postRedeemSponsorship(e,t){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/redeem?sponsorshipToken="+encodeURIComponent(e),t,!0,!1)}))}postResendSponsorshipOffer(e){return i(this,void 0,void 0,(function*(){return yield this.send("POST","/organization/sponsorship/"+e+"/families-for-enterprise/resend",null,!0,!1)}))}doAuthRefresh(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getRefreshToken();if(null!=e&&""!==e)return this.doRefreshToken();const t=yield this.tokenService.getClientId(),n=yield this.tokenService.getClientSecret();if(!o.Utils.isNullOrWhitespace(t)&&!o.Utils.isNullOrWhitespace(n))return this.doApiTokenRefresh();throw new Error("Cannot refresh token, no refresh token or api keys are stored")}))}doApiTokenRefresh(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getClientId(),t=yield this.tokenService.getClientSecret();if(o.Utils.isNullOrWhitespace(e)||o.Utils.isNullOrWhitespace(t)||null==this.apiKeyRefresh)throw new Error;yield this.apiKeyRefresh(e,t)}))}doRefreshToken(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getRefreshToken();if(null==e||""===e)throw new Error;const t=new Headers({"Content-Type":"application/x-www-form-urlencoded; charset=utf-8",Accept:"application/json","Device-Type":this.deviceType});null!=this.customUserAgent&&t.set("User-Agent",this.customUserAgent);const n=yield this.tokenService.decodeToken(),i=yield this.fetch(new Request(this.environmentService.getIdentityUrl()+"/connect/token",{body:this.qsStringify({grant_type:"refresh_token",client_id:n.client_id,refresh_token:e}),cache:"no-store",credentials:this.getCredentials(),headers:t,method:"POST"}));if(200!==i.status){const e=yield this.handleError(i,!0,!0);return Promise.reject(e)}{const e=yield i.json(),t=new S.IdentityTokenResponse(e);yield this.tokenService.setTokens(t.accessToken,t.refreshToken,null)}}))}send(e,t,n,r,a,s,l){return i(this,void 0,void 0,(function*(){const i=(s=o.Utils.isNullOrWhitespace(s)?this.environmentService.getApiUrl():s)+t;if(new URL(i).href!==i)return Promise.reject("Invalid request url path.");const c=new Headers({"Device-Type":this.deviceType});null!=this.customUserAgent&&c.set("User-Agent",this.customUserAgent);const d={cache:"no-store",credentials:this.getCredentials(),method:e};if(r){const e=yield this.getActiveBearerToken();c.set("Authorization","Bearer "+e)}null!=n&&("string"==typeof n?(d.body=n,c.set("Content-Type","application/x-www-form-urlencoded; charset=utf-8")):"object"==typeof n&&(n instanceof FormData?d.body=n:(c.set("Content-Type","application/json; charset=utf-8"),d.body=JSON.stringify(n)))),a&&c.set("Accept","application/json"),null!=l&&l(c),d.headers=c;const p=yield this.fetch(new Request(i,d));if(a&&200===p.status){return yield p.json()}if(200!==p.status){const e=yield this.handleError(p,!1,r);return Promise.reject(e)}}))}handleError(e,t,n){return i(this,void 0,void 0,(function*(){if(n&&(t&&400===e.status||401===e.status||403===e.status))return yield this.logoutCallback(!0),null;let i=null;return this.isJsonResponse(e)?i=yield e.json():this.isTextResponse(e)&&(i={Message:yield e.text()}),new v.ErrorResponse(i,e.status,t)}))}qsStringify(e){return Object.keys(e).map((t=>encodeURIComponent(t)+"="+encodeURIComponent(e[t]))).join("&")}getCredentials(){if(!this.isWebClient||this.environmentService.hasBaseUrl())return"include"}addEventParameters(e,t,n,i){return null!=t&&(e+="?start="+t),null!=n&&(e+=e.indexOf("?")>-1?"&":"?",e+="end="+n),null!=i&&(e+=e.indexOf("?")>-1?"&":"?",e+="continuationToken="+i),e}isJsonResponse(e){const t=e.headers.get("content-type");return null!=t&&t.indexOf("application/json")>-1}isTextResponse(e){const t=e.headers.get("content-type");return null!=t&&t.indexOf("text")>-1}}},80761:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppIdService=void 0;const r=n(70829),o=n(1139);t.AppIdService=class{constructor(e){this.storageService=e}getAppId(){return this.makeAndGetAppId("appId")}getAnonymousAppId(){return this.makeAndGetAppId("anonymousAppId")}makeAndGetAppId(e){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e,{htmlStorageLocation:o.HtmlStorageLocation.Local});if(null!=t)return t;const n=r.Utils.newGuid();return yield this.storageService.save(e,n,{htmlStorageLocation:o.HtmlStorageLocation.Local}),n}))}}},31207:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuditService=void 0;const a=n(67654),s=n(70829);class l{constructor(e,t){this.cryptoFunctionService=e,this.apiService=t}passwordLeaked(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.hash(e,"sha1"),n=s.Utils.fromBufferToHex(t).toUpperCase(),i=n.substr(0,5),r=n.substr(5),o=yield this.apiService.nativeFetch(new Request("https://api.pwnedpasswords.com/range/"+i)),a=(yield o.text()).split(/\r?\n/).find((e=>e.split(":")[0]===r));return null!=a?parseInt(a.split(":")[1],10):0}))}breachedAccounts(e){return o(this,void 0,void 0,(function*(){try{return yield this.apiService.getHibpBreach(e)}catch(t){if(404===t.statusCode)return[];throw new Error}}))}}i([a.throttle(100,(()=>"passwordLeaked")),r("design:type",Function),r("design:paramtypes",[String]),r("design:returntype",Promise)],l.prototype,"passwordLeaked",null),t.AuditService=l},25906:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AuthService=t.TwoFactorProviders=void 0;const r=n(6317),o=n(57976),a=n(84582),s=n(9405),l=n(51323),c=n(20013),d=n(84555),p=n(82822),u=n(82474),m=n(41128),h=n(70829);t.TwoFactorProviders={[o.TwoFactorProviderType.Authenticator]:{type:o.TwoFactorProviderType.Authenticator,name:null,description:null,priority:1,sort:1,premium:!1},[o.TwoFactorProviderType.Yubikey]:{type:o.TwoFactorProviderType.Yubikey,name:null,description:null,priority:3,sort:2,premium:!0},[o.TwoFactorProviderType.Duo]:{type:o.TwoFactorProviderType.Duo,name:"Duo",description:null,priority:2,sort:3,premium:!0},[o.TwoFactorProviderType.OrganizationDuo]:{type:o.TwoFactorProviderType.OrganizationDuo,name:"Duo (Organization)",description:null,priority:10,sort:4,premium:!1},[o.TwoFactorProviderType.Email]:{type:o.TwoFactorProviderType.Email,name:null,description:null,priority:0,sort:6,premium:!1},[o.TwoFactorProviderType.WebAuthn]:{type:o.TwoFactorProviderType.WebAuthn,name:null,description:null,priority:4,sort:5,premium:!0}};t.AuthService=class{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m=!0){this.cryptoService=e,this.apiService=t,this.tokenService=n,this.appIdService=i,this.i18nService=r,this.platformUtilsService=o,this.messagingService=a,this.vaultTimeoutService=s,this.logService=l,this.cryptoFunctionService=c,this.keyConnectorService=d,this.environmentService=p,this.stateService=u,this.setCryptoKeys=m,this.selectedTwoFactorProviderType=null}init(){t.TwoFactorProviders[o.TwoFactorProviderType.Email].name=this.i18nService.t("emailTitle"),t.TwoFactorProviders[o.TwoFactorProviderType.Email].description=this.i18nService.t("emailDesc"),t.TwoFactorProviders[o.TwoFactorProviderType.Authenticator].name=this.i18nService.t("authenticatorAppTitle"),t.TwoFactorProviders[o.TwoFactorProviderType.Authenticator].description=this.i18nService.t("authenticatorAppDesc"),t.TwoFactorProviders[o.TwoFactorProviderType.Duo].description=this.i18nService.t("duoDesc"),t.TwoFactorProviders[o.TwoFactorProviderType.OrganizationDuo].name="Duo ("+this.i18nService.t("organization")+")",t.TwoFactorProviders[o.TwoFactorProviderType.OrganizationDuo].description=this.i18nService.t("duoOrganizationDesc"),t.TwoFactorProviders[o.TwoFactorProviderType.WebAuthn].name=this.i18nService.t("webAuthnTitle"),t.TwoFactorProviders[o.TwoFactorProviderType.WebAuthn].description=this.i18nService.t("webAuthnDesc"),t.TwoFactorProviders[o.TwoFactorProviderType.Yubikey].name=this.i18nService.t("yubiKeyTitle"),t.TwoFactorProviders[o.TwoFactorProviderType.Yubikey].description=this.i18nService.t("yubiKeyDesc")}logIn(e,t,n){return i(this,void 0,void 0,(function*(){this.selectedTwoFactorProviderType=null;const i=yield this.makePreloginKey(t,e),o=yield this.cryptoService.hashPassword(t,i),a=yield this.cryptoService.hashPassword(t,i,r.HashPurpose.LocalAuthorization);return yield this.logInHelper(e,o,a,null,null,null,null,null,i,null,null,null,n,null)}))}logInSso(e,t,n,r){return i(this,void 0,void 0,(function*(){return this.selectedTwoFactorProviderType=null,yield this.logInHelper(null,null,null,e,t,n,null,null,null,null,null,null,null,r)}))}logInApiKey(e,t){return i(this,void 0,void 0,(function*(){return this.selectedTwoFactorProviderType=null,yield this.logInHelper(null,null,null,null,null,null,e,t,null,null,null,null,null,null)}))}logInTwoFactor(e,t,n){return i(this,void 0,void 0,(function*(){return yield this.logInHelper(this.email,this.masterPasswordHash,this.localMasterPasswordHash,this.code,this.codeVerifier,this.ssoRedirectUrl,this.clientId,this.clientSecret,this.key,e,t,n,this.captchaToken,null)}))}logInComplete(e,t,n,o,a,s){return i(this,void 0,void 0,(function*(){this.selectedTwoFactorProviderType=null;const i=yield this.makePreloginKey(t,e),l=yield this.cryptoService.hashPassword(t,i),c=yield this.cryptoService.hashPassword(t,i,r.HashPurpose.LocalAuthorization);return yield this.logInHelper(e,l,c,null,null,null,null,null,i,n,o,a,s,null)}))}logInSsoComplete(e,t,n,r,o,a){return i(this,void 0,void 0,(function*(){return this.selectedTwoFactorProviderType=null,yield this.logInHelper(null,null,null,e,t,n,null,null,null,r,o,a,null,null)}))}logInApiKeyComplete(e,t,n,r,o){return i(this,void 0,void 0,(function*(){return this.selectedTwoFactorProviderType=null,yield this.logInHelper(null,null,null,null,null,null,e,t,null,n,r,o,null,null)}))}logOut(e){e(),this.messagingService.send("loggedOut")}getSupportedTwoFactorProviders(e){const n=[];return null==this.twoFactorProvidersData||(this.twoFactorProvidersData.has(o.TwoFactorProviderType.OrganizationDuo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.OrganizationDuo]),this.twoFactorProvidersData.has(o.TwoFactorProviderType.Authenticator)&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.Authenticator]),this.twoFactorProvidersData.has(o.TwoFactorProviderType.Yubikey)&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.Yubikey]),this.twoFactorProvidersData.has(o.TwoFactorProviderType.Duo)&&this.platformUtilsService.supportsDuo()&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.Duo]),this.twoFactorProvidersData.has(o.TwoFactorProviderType.WebAuthn)&&this.platformUtilsService.supportsWebAuthn(e)&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.WebAuthn]),this.twoFactorProvidersData.has(o.TwoFactorProviderType.Email)&&n.push(t.TwoFactorProviders[o.TwoFactorProviderType.Email])),n}getDefaultTwoFactorProvider(e){if(null==this.twoFactorProvidersData)return null;if(null!=this.selectedTwoFactorProviderType&&this.twoFactorProvidersData.has(this.selectedTwoFactorProviderType))return this.selectedTwoFactorProviderType;let n=null,i=-1;return this.twoFactorProvidersData.forEach(((r,a)=>{const s=t.TwoFactorProviders[a];if(null!=s&&s.priority>i){if(a===o.TwoFactorProviderType.WebAuthn&&!e)return;n=a,i=s.priority}})),n}makePreloginKey(e,t){return i(this,void 0,void 0,(function*(){t=t.trim().toLowerCase();let n=null,i=null;try{const e=yield this.apiService.postPrelogin(new u.PreloginRequest(t));null!=e&&(n=e.kdf,i=e.kdfIterations)}catch(r){if(null==r||404!==r.statusCode)throw r}return this.cryptoService.makeKey(e,t,n,i)}))}authingWithApiKey(){return null!=this.clientId&&null!=this.clientSecret}authingWithSso(){return null!=this.code&&null!=this.codeVerifier&&null!=this.ssoRedirectUrl}authingWithPassword(){return null!=this.email&&null!=this.masterPasswordHash}logInHelper(e,t,n,r,u,v,f,g,y,x,S,b,w,I){return i(this,void 0,void 0,(function*(){const i=yield this.tokenService.getTwoFactorToken(e),C=yield this.appIdService.getAppId(),E=new c.DeviceRequest(C,this.platformUtilsService);let P,k=[],A=[],O=[null,null];k=null!=e&&null!=t?[e,t]:null,A=null!=r&&null!=u&&null!=v?[r,u,v]:null,O=null!=f&&null!=g?[f,g]:null,P=null!=S&&null!=x?new m.TokenRequest(k,A,O,x,S,b,w,E):null!=i?new m.TokenRequest(k,A,O,o.TwoFactorProviderType.Remember,i,!1,w,E):new m.TokenRequest(k,A,O,null,null,!1,w,E);const T=yield this.apiService.postIdentityToken(P);this.clearState();const M=new s.AuthResult;if(M.captchaSiteKey=T.siteKey,M.captchaSiteKey)return M;if(M.twoFactor=!!T.twoFactorProviders2,M.twoFactor){this.email=e,this.masterPasswordHash=t,this.localMasterPasswordHash=n,this.code=r,this.codeVerifier=u,this.ssoRedirectUrl=v,this.clientId=f,this.clientSecret=g,this.key=this.setCryptoKeys?y:null;const i=T;return this.twoFactorProvidersData=i.twoFactorProviders2,M.twoFactorProviders=i.twoFactorProviders2,this.captchaToken=i.captchaToken,M}const D=T;M.resetMasterPassword=D.resetMasterPassword,M.forcePasswordReset=D.forcePasswordReset;const B=yield this.tokenService.decodeToken(D.accessToken);if(yield this.stateService.addAccount(new a.Account({profile:Object.assign(Object.assign({},new a.AccountProfile),{userId:B.sub,email:B.email,apiKeyClientId:f,hasPremiumPersonally:B.premium,kdfIterations:D.kdfIterations,kdfType:D.kdf}),keys:Object.assign(Object.assign({},new a.AccountKeys),{apiKeyClientSecret:g}),tokens:Object.assign(Object.assign({},new a.AccountTokens),{accessToken:D.accessToken,refreshToken:D.refreshToken})})),null!=D.twoFactorToken&&(yield this.tokenService.setTwoFactorToken(D.twoFactorToken,e)),this.setCryptoKeys)if(null!=y&&(yield this.cryptoService.setKey(y)),null!=n&&(yield this.cryptoService.setKeyHash(n)),null==r||null!=D.key){if(null!=D.keyConnectorUrl)yield this.keyConnectorService.getAndSetKey(D.keyConnectorUrl);else if(D.apiUseKeyConnector){const e=this.environmentService.getKeyConnectorUrl();yield this.keyConnectorService.getAndSetKey(e)}if(yield this.cryptoService.setEncKey(D.key),null==D.privateKey)try{const e=yield this.cryptoService.makeKeyPair();yield this.apiService.postAccountKeys(new p.KeysRequest(e[0],e[1].encryptedString)),D.privateKey=e[1].encryptedString}catch(R){this.logService.error(R)}yield this.cryptoService.setEncPrivateKey(D.privateKey)}else if(null!=D.keyConnectorUrl){const e=yield this.cryptoFunctionService.randomBytes(64),t=yield this.cryptoService.makeKey(h.Utils.fromBufferToB64(e),yield this.tokenService.getEmail(),D.kdf,D.kdfIterations),n=new d.KeyConnectorUserKeyRequest(t.encKeyB64);yield this.cryptoService.setKey(t);const i=yield this.cryptoService.makeEncKey(t);yield this.cryptoService.setEncKey(i[1].encryptedString);const[r,o]=yield this.cryptoService.makeKeyPair();try{yield this.apiService.postUserKeyToKeyConnector(D.keyConnectorUrl,n)}catch(R){throw new Error("Unable to reach key connector")}const a=new p.KeysRequest(r,o.encryptedString),s=new l.SetKeyConnectorKeyRequest(i[1].encryptedString,D.kdf,D.kdfIterations,I,a);yield this.apiService.postSetKeyConnectorKey(s)}return null!=this.vaultTimeoutService&&(yield this.stateService.setBiometricLocked(!1)),this.messagingService.send("loggedIn"),M}))}clearState(){this.key=null,this.email=null,this.masterPasswordHash=null,this.localMasterPasswordHash=null,this.code=null,this.codeVerifier=null,this.ssoRedirectUrl=null,this.clientId=null,this.clientSecret=null,this.twoFactorProvidersData=null,this.selectedTwoFactorProviderType=null}}},72983:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AzureFileUploadService=void 0;const r=n(70829);t.AzureFileUploadService=class{constructor(e){this.logService=e}upload(e,t,n){return i(this,void 0,void 0,(function*(){return t.buffer.byteLength<=268435456?yield this.azureUploadBlob(e,t):yield this.azureUploadBlocks(e,t,n)}))}azureUploadBlob(e,t){return i(this,void 0,void 0,(function*(){const n=r.Utils.getUrl(e),i=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":n.searchParams.get("sv"),"Content-Length":t.buffer.byteLength.toString(),"x-ms-blob-type":"BlockBlob"}),o=new Request(e,{body:t.buffer,cache:"no-store",method:"PUT",headers:i}),a=yield fetch(o);if(201!==a.status)throw new Error(`Failed to create Azure blob: ${a.status}`)}))}azureUploadBlocks(e,t,n){return i(this,void 0,void 0,(function*(){const i=r.Utils.getUrl(e),o=this.getMaxBlockSize(i.searchParams.get("sv"));let a=0;const s=Math.ceil(t.buffer.byteLength/o),l=[];if(s>5e4)throw new Error("Cannot upload file, exceeds maximum size of "+5e4*o);try{for(;a<s;){e=yield this.renewUrlIfNecessary(e,n);const i=r.Utils.getUrl(e),s=this.encodedBlockId(a);i.searchParams.append("comp","block"),i.searchParams.append("blockid",s);const c=a*o,d=t.buffer.slice(c,c+o),p=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":i.searchParams.get("sv"),"Content-Length":d.byteLength.toString()}),u=new Request(i.toString(),{body:d,cache:"no-store",method:"PUT",headers:p}),m=yield fetch(u);if(201!==m.status){const e=`Unsuccessful block PUT. Received status ${m.status}`;throw this.logService.error(e+"\n"+(yield m.json())),new Error(e)}l.push(s),a++}e=yield this.renewUrlIfNecessary(e,n);const i=r.Utils.getUrl(e),c=this.blockListXml(l);i.searchParams.append("comp","blocklist");const d=new Headers({"x-ms-date":(new Date).toUTCString(),"x-ms-version":i.searchParams.get("sv"),"Content-Length":c.length.toString()}),p=new Request(i.toString(),{body:c,cache:"no-store",method:"PUT",headers:d}),u=yield fetch(p);if(201!==u.status){const e=`Unsuccessful block list PUT. Received status ${u.status}`;throw this.logService.error(e+"\n"+(yield u.json())),new Error(e)}}catch(c){throw c}}))}renewUrlIfNecessary(e,t){var n;return i(this,void 0,void 0,(function*(){const i=r.Utils.getUrl(e),o=new Date(null!==(n=i.searchParams.get("se"))&&void 0!==n?n:"");return isNaN(o.getTime())&&o.setTime(Date.now()+36e5),o.getTime()<Date.now()+1e3?yield t():e}))}encodedBlockId(e){const t=("000000000000000000000000000000000000000000000000"+e.toString()).slice(-48);return r.Utils.fromUtf8ToB64(t)}blockListXml(e){let t='<?xml version="1.0" encoding="utf-8"?><BlockList>';return e.forEach((e=>{t+=`<Latest>${e}</Latest>`})),t+="</BlockList>",t}getMaxBlockSize(e){return o.compare(e,"2019-12-12")>=0?4194304e3:o.compare(e,"2016-05-31")>=0?104857600:4194304}};class o{constructor(e){this.year=0,this.month=0,this.day=0;try{const t=e.split("-").map((e=>Number.parseInt(e,10)));this.year=t[0],this.month=t[1],this.day=t[2]}catch(t){}}static compare(e,t){return"string"==typeof e&&(e=new o(e)),"string"==typeof t&&(t=new o(t)),e.year!==t.year?e.year-t.year:e.month!==t.month?e.month-t.month:e.day!==t.day?e.day-t.day:0}compare(e){return o.compare(this,e)}}},74166:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenFileUploadService=void 0;const r=n(70829);t.BitwardenFileUploadService=class{constructor(e){this.apiService=e}upload(e,t,n){return i(this,void 0,void 0,(function*(){const i=new FormData;try{const n=new Blob([t.buffer],{type:"application/octet-stream"});i.append("data",n,e)}catch(o){if(!r.Utils.isNode||r.Utils.isBrowser)throw o;i.append("data",Buffer.from(t.buffer),{filepath:e,contentType:"application/octet-stream"})}yield n(i)}))}}},39257:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;t.BroadcasterService=class{constructor(){this.subscribers=new Map}send(e,t){null==t?this.subscribers.forEach((t=>{t(e)})):this.subscribers.has(t)&&this.subscribers.get(t)(e)}subscribe(e,t){this.subscribers.set(e,t)}unsubscribe(e){this.subscribers.has(e)&&this.subscribers.delete(e)}}},55637:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CipherService=void 0;const a=n(23635),s=n(18276),l=n(60689),c=n(13886),d=n(59066),p=n(95746),u=n(78758),m=n(6692),h=n(66434),v=n(19976),f=n(68058),g=n(58434),y=n(60571),x=n(11100),S=n(9015),b=n(38037),w=n(92042),I=n(79873),C=n(53552),E=n(52675),P=n(47205),k=n(25237),A=n(27551),O=n(5181),T=n(70223),M=n(70829),D=new Map([["google.com",new Set(["script.google.com"])]]);class B{constructor(e,t,n,i,r,o,a,s){this.cryptoService=e,this.settingsService=t,this.apiService=n,this.fileUploadService=i,this.i18nService=r,this.searchService=o,this.logService=a,this.stateService=s,this.sortedCiphersCache=new O.SortedCiphersCache(this.sortCiphersByLastUsed)}getDecryptedCipherCache(){return o(this,void 0,void 0,(function*(){return yield this.stateService.getDecryptedCiphers()}))}setDecryptedCipherCache(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCiphers(e),null!=this.searchService&&(null==e?this.searchService().clearIndex():this.searchService().indexCiphers())}))}clearCache(e){return o(this,void 0,void 0,(function*(){yield this.clearDecryptedCiphersState(e)}))}encrypt(e,t,n=null){return o(this,void 0,void 0,(function*(){if(null!=e.id){if(null==n&&(n=yield this.get(e.id)),null!=n){const t=yield n.decrypt();if(e.passwordHistory=t.passwordHistory||[],e.type===a.CipherType.Login&&t.type===a.CipherType.Login)if(null!=t.login.password&&""!==t.login.password&&t.login.password!==e.login.password){const n=new A.PasswordHistoryView;n.password=t.login.password,n.lastUsedDate=e.login.passwordRevisionDate=new Date,e.passwordHistory.splice(0,0,n)}else e.login.passwordRevisionDate=t.login.passwordRevisionDate;if(t.hasFields){const n=t.fields.filter((e=>e.type===s.FieldType.Hidden&&null!=e.name&&""!==e.name&&null!=e.value&&""!==e.value)),i=null==e.fields?[]:e.fields.filter((e=>e.type===s.FieldType.Hidden&&null!=e.name&&""!==e.name));n.forEach((t=>{const n=i.find((e=>e.name===t.name));if(null==n||n.value!==t.value){const n=new A.PasswordHistoryView;n.password=t.name+": "+t.value,n.lastUsedDate=new Date,e.passwordHistory.splice(0,0,n)}}))}}null!=e.passwordHistory&&0===e.passwordHistory.length?e.passwordHistory=null:null!=e.passwordHistory&&e.passwordHistory.length>5&&(e.passwordHistory=e.passwordHistory.slice(0,5))}const i=new u.Cipher;if(i.id=e.id,i.folderId=e.folderId,i.favorite=e.favorite,i.organizationId=e.organizationId,i.type=e.type,i.collectionIds=e.collectionIds,i.revisionDate=e.revisionDate,i.reprompt=e.reprompt,null==t&&null!=i.organizationId&&null==(t=yield this.cryptoService.getOrgKey(i.organizationId)))throw new Error("Cannot encrypt cipher for organization. No key.");return yield Promise.all([this.encryptObjProperty(e,i,{name:null,notes:null},t),this.encryptCipherData(i,e,t),this.encryptFields(e.fields,t).then((e=>{i.fields=e})),this.encryptPasswordHistories(e.passwordHistory,t).then((e=>{i.passwordHistory=e})),this.encryptAttachments(e.attachments,t).then((e=>{i.attachments=e}))]),i}))}encryptAttachments(e,t){return o(this,void 0,void 0,(function*(){if(null==e||0===e.length)return null;const n=[],i=[];return e.forEach((e=>o(this,void 0,void 0,(function*(){const r=new d.Attachment;r.id=e.id,r.size=e.size,r.sizeName=e.sizeName,r.url=e.url;const a=this.encryptObjProperty(e,r,{fileName:null},t).then((()=>o(this,void 0,void 0,(function*(){null!=e.key&&(r.key=yield this.cryptoService.encrypt(e.key.key,t)),i.push(r)}))));n.push(a)})))),yield Promise.all(n),i}))}encryptFields(e,t){return o(this,void 0,void 0,(function*(){if(!e||!e.length)return null;const n=this,i=[];return yield e.reduce(((e,r)=>o(this,void 0,void 0,(function*(){yield e;const o=yield n.encryptField(r,t);i.push(o)}))),Promise.resolve()),i}))}encryptField(e,t){return o(this,void 0,void 0,(function*(){const n=new m.Field;return n.type=e.type,n.linkedId=e.linkedId,e.type===s.FieldType.Boolean&&"true"!==e.value&&(e.value="false"),yield this.encryptObjProperty(e,n,{name:null,value:null},t),n}))}encryptPasswordHistories(e,t){return o(this,void 0,void 0,(function*(){if(!e||!e.length)return null;const n=this,i=[];return yield e.reduce(((e,r)=>o(this,void 0,void 0,(function*(){yield e;const o=yield n.encryptPasswordHistory(r,t);i.push(o)}))),Promise.resolve()),i}))}encryptPasswordHistory(e,t){return o(this,void 0,void 0,(function*(){const n=new g.Password;return n.lastUsedDate=e.lastUsedDate,yield this.encryptObjProperty(e,n,{password:null},t),n}))}get(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t||!t.hasOwnProperty(e))return null;const n=yield this.stateService.getLocalData();return new u.Cipher(t[e],!1,n?n[e]:null)}))}getAll(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getLocalData(),t=yield this.stateService.getEncryptedCiphers(),n=[];for(const i in t)t.hasOwnProperty(i)&&n.push(new u.Cipher(t[i],!1,e?e[i]:null));return n}))}getAllDecrypted(){var e;return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getUserId();if(null!=(yield this.getDecryptedCipherCache()))return null!=this.searchService&&(null!==(e=this.searchService().indexedEntityId)&&void 0!==e?e:t)!==t&&(yield this.searchService().indexCiphers(t,yield this.getDecryptedCipherCache())),yield this.getDecryptedCipherCache();const n=[];if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const i=[];return(yield this.getAll()).forEach((e=>o(this,void 0,void 0,(function*(){i.push(e.decrypt().then((e=>n.push(e))))})))),yield Promise.all(i),n.sort(this.getLocaleSortingFunction()),yield this.setDecryptedCipherCache(n),n}))}getAllDecryptedForGrouping(e,t=!0){return o(this,void 0,void 0,(function*(){return(yield this.getAllDecrypted()).filter((n=>!n.isDeleted&&(!(!t||n.folderId!==e)||!t&&null!=n.collectionIds&&n.collectionIds.indexOf(e)>-1)))}))}getAllDecryptedForUrl(e,t,n=null){return o(this,void 0,void 0,(function*(){if(null==e&&null==t)return Promise.resolve([]);const i=M.Utils.getDomain(e),r=null==i?Promise.resolve([]):this.settingsService.getEquivalentDomains().then((e=>{let t=[];return e.forEach((e=>{e.length&&e.indexOf(i)>=0&&(t=t.concat(e))})),t.length||t.push(i),t})),o=yield Promise.all([r,this.getAllDecrypted()]),s=o[0],c=o[1];return null==n&&null==(n=yield this.stateService.getDefaultUriMatch())&&(n=l.UriMatchType.Domain),c.filter((r=>{if(null!=r.deletedDate)return!1;if(null!=t&&t.indexOf(r.type)>-1)return!0;if(null!=e&&r.type===a.CipherType.Login&&null!=r.login.uris)for(let t=0;t<r.login.uris.length;t++){const a=r.login.uris[t];if(null==a.uri)continue;switch(null==a.match?n:a.match){case l.UriMatchType.Domain:if(null!=i&&null!=a.domain&&s.indexOf(a.domain)>-1){if(!D.has(a.domain))return!0;{const t=M.Utils.getHost(e);if(!D.get(a.domain).has(t))return!0}}break;case l.UriMatchType.Host:const t=M.Utils.getHost(e);if(null!=t&&t===M.Utils.getHost(a.uri))return!0;break;case l.UriMatchType.Exact:if(e===a.uri)return!0;break;case l.UriMatchType.StartsWith:if(e.startsWith(a.uri))return!0;break;case l.UriMatchType.RegularExpression:try{if(new RegExp(a.uri,"i").test(e))return!0}catch(o){this.logService.error(o)}case l.UriMatchType.Never:}}return!1}))}))}getAllFromApiForOrganization(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.getCiphersOrganization(e);if(null!=t&&null!=t.data&&t.data.length){const e=[],n=[];return t.data.forEach((t=>{const i=new c.CipherData(t),r=new u.Cipher(i);n.push(r.decrypt().then((t=>e.push(t))))})),yield Promise.all(n),e.sort(this.getLocaleSortingFunction()),e}return[]}))}getLastUsedForUrl(e,t=!1){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!0,!1,t)}))}getLastLaunchedForUrl(e,t=!1){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!1,!0,t)}))}getNextCipherForUrl(e){return o(this,void 0,void 0,(function*(){return this.getCipherForUrl(e,!1,!1,!1)}))}updateLastUsedIndexForUrl(e){this.sortedCiphersCache.updateLastUsedIndex(e)}updateLastUsedDate(e){return o(this,void 0,void 0,(function*(){let t=yield this.stateService.getLocalData();t||(t={}),t[e]?t[e].lastUsedDate=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},yield this.stateService.setLocalData(t);const n=yield this.stateService.getDecryptedCiphers();if(n){for(let i=0;i<n.length;i++){const r=n[i];if(r.id===e){r.localData=t[e];break}}yield this.stateService.setDecryptedCiphers(n)}}))}updateLastLaunchedDate(e){return o(this,void 0,void 0,(function*(){let t=yield this.stateService.getLocalData();t||(t={}),t[e]?t[e].lastLaunched=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},yield this.stateService.setLocalData(t);const n=yield this.stateService.getDecryptedCiphers();if(n){for(let i=0;i<n.length;i++){const r=n[i];if(r.id===e){r.localData=t[e];break}}yield this.stateService.setDecryptedCiphers(n)}}))}saveNeverDomain(e){return o(this,void 0,void 0,(function*(){if(null==e)return;let t=yield this.stateService.getNeverDomains();t||(t={}),t[e]=null,yield this.stateService.setNeverDomains(t)}))}saveWithServer(e){return o(this,void 0,void 0,(function*(){let t;if(null==e.id){if(null!=e.collectionIds){const n=new C.CipherCreateRequest(e);t=yield this.apiService.postCipherCreate(n)}else{const n=new E.CipherRequest(e);t=yield this.apiService.postCipher(n)}e.id=t.id}else{const n=new E.CipherRequest(e);t=yield this.apiService.putCipher(e.id,n)}const n=new c.CipherData(t,yield this.stateService.getUserId(),e.collectionIds);yield this.upsert(n)}))}shareWithServer(e,t,n){return o(this,void 0,void 0,(function*(){const i=[];null!=e.attachments&&e.attachments.forEach((n=>{null==n.key&&i.push(this.shareAttachmentWithServer(n,e.id,t))})),yield Promise.all(i),e.organizationId=t,e.collectionIds=n;const r=yield this.encrypt(e),o=new P.CipherShareRequest(r),a=yield this.apiService.putShareCipher(e.id,o),s=new c.CipherData(a,yield this.stateService.getUserId(),n);yield this.upsert(s)}))}shareManyWithServer(e,t,n){return o(this,void 0,void 0,(function*(){const i=[],r=[];for(const s of e)s.organizationId=t,s.collectionIds=n,i.push(this.encrypt(s).then((e=>{r.push(e)})));yield Promise.all(i);const o=new w.CipherBulkShareRequest(r,n);yield this.apiService.putShareCiphers(o);const a=yield this.stateService.getUserId();yield this.upsert(r.map((e=>e.toCipherData(a))))}))}saveAttachmentWithServer(e,t,n=!1){return new Promise(((i,r)=>{const a=new FileReader;a.readAsArrayBuffer(t),a.onload=a=>o(this,void 0,void 0,(function*(){try{const r=yield this.saveAttachmentRawWithServer(e,t.name,a.target.result,n);i(r)}catch(o){r(o)}})),a.onerror=e=>{r("Error reading file.")}}))}saveAttachmentRawWithServer(e,t,n,i=!1){return o(this,void 0,void 0,(function*(){const r=yield this.cryptoService.getOrgKey(e.organizationId),o=yield this.cryptoService.encrypt(t,r),a=yield this.cryptoService.makeEncKey(r),s=yield this.cryptoService.encryptToBytes(n,a[0]),l={key:a[1].encryptedString,fileName:o.encryptedString,fileSize:s.buffer.byteLength,adminRequest:i};let d;try{const t=yield this.apiService.postCipherAttachment(e.id,l);d=i?t.cipherMiniResponse:t.cipherResponse,yield this.fileUploadService.uploadCipherAttachment(i,t,o,s)}catch(m){if(!(m instanceof k.ErrorResponse&&404===m.statusCode||405===m.statusCode))throw m instanceof k.ErrorResponse?new Error(m.getSingleMessage()):m;d=yield this.legacyServerAttachmentFileUpload(i,e.id,o,s,a[1])}const p=new c.CipherData(d,yield this.stateService.getUserId(),e.collectionIds);return i||(yield this.upsert(p)),new u.Cipher(p)}))}legacyServerAttachmentFileUpload(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=new FormData;try{const e=new Blob([i.buffer],{type:"application/octet-stream"});o.append("key",r.encryptedString),o.append("data",e,n.encryptedString)}catch(s){if(!M.Utils.isNode||M.Utils.isBrowser)throw s;o.append("key",r.encryptedString),o.append("data",Buffer.from(i.buffer),{filepath:n.encryptedString,contentType:"application/octet-stream"})}let a;try{a=e?yield this.apiService.postCipherAttachmentAdminLegacy(t,o):yield this.apiService.postCipherAttachmentLegacy(t,o)}catch(s){throw new Error(s.getSingleMessage())}return a}))}saveCollectionsWithServer(e){return o(this,void 0,void 0,(function*(){const t=new I.CipherCollectionsRequest(e.collectionIds);yield this.apiService.putCipherCollections(e.id,t);const n=e.toCipherData(yield this.stateService.getUserId());yield this.upsert(n)}))}upsert(e){return o(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedCiphers();if(null==t&&(t={}),e instanceof c.CipherData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return o(this,void 0,void 0,(function*(){yield this.clearDecryptedCiphersState(),yield this.stateService.setEncryptedCiphers(e)}))}clear(e){return o(this,void 0,void 0,(function*(){yield this.clearEncryptedCiphersState(e),yield this.clearCache(e)}))}moveManyWithServer(e,t){return o(this,void 0,void 0,(function*(){yield this.apiService.putMoveCiphers(new S.CipherBulkMoveRequest(e,t));let n=yield this.stateService.getEncryptedCiphers();null==n&&(n={}),e.forEach((e=>{n.hasOwnProperty(e)&&(n[e].folderId=t)})),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(n)}))}delete(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null!=t){if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}}))}deleteWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.deleteCipher(e),yield this.delete(e)}))}deleteManyWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.deleteManyCiphers(new x.CipherBulkDeleteRequest(e)),yield this.delete(e)}))}deleteAttachment(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.stateService.getEncryptedCiphers();if(null!=n&&n.hasOwnProperty(e)&&null!=n[e].attachments){for(let i=0;i<n[e].attachments.length;i++)n[e].attachments[i].id===t&&n[e].attachments.splice(i,1);yield this.clearCache(),yield this.stateService.setEncryptedCiphers(n)}}))}deleteAttachmentWithServer(e,t){return o(this,void 0,void 0,(function*(){try{yield this.apiService.deleteCipherAttachment(e,t)}catch(n){return Promise.reject(n.getSingleMessage())}yield this.deleteAttachment(e,t)}))}sortCiphersByLastUsed(e,t){const n=e.localData&&e.localData.lastUsedDate?e.localData.lastUsedDate:null,i=t.localData&&t.localData.lastUsedDate?t.localData.lastUsedDate:null,r=null!=n&&null!=i;return r&&n<i?1:null!=n&&null==i||r&&n>i?-1:null!=i&&null==n?1:0}sortCiphersByLastUsedThenName(e,t){const n=this.sortCiphersByLastUsed(e,t);return 0!==n?n:this.getLocaleSortingFunction()(e,t)}getLocaleSortingFunction(){return(e,t)=>{let n=e.name,i=t.name;if(null==n&&null!=i)return-1;if(null!=n&&null==i)return 1;if(null==n&&null==i)return 0;const r=this.i18nService.collator?this.i18nService.collator.compare(n,i):n.localeCompare(i);return 0!==r||e.type!==a.CipherType.Login||t.type!==a.CipherType.Login?r:(null!=e.login.username&&(n+=e.login.username),null!=t.login.username&&(i+=t.login.username),this.i18nService.collator?this.i18nService.collator.compare(n,i):n.localeCompare(i))}}softDelete(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t)return;const n=e=>{null!=t[e]&&(t[e].deletedDate=(new Date).toISOString())};"string"==typeof e?n(e):e.forEach(n),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}))}softDeleteWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.putDeleteCipher(e),yield this.softDelete(e)}))}softDeleteManyWithServer(e){return o(this,void 0,void 0,(function*(){yield this.apiService.putDeleteManyCiphers(new x.CipherBulkDeleteRequest(e)),yield this.softDelete(e)}))}restore(e){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCiphers();if(null==t)return;const n=e=>{null!=t[e.id]&&(t[e.id].deletedDate=null,t[e.id].revisionDate=e.revisionDate)};"Array"===e.constructor.name?e.forEach(n):n(e),yield this.clearCache(),yield this.stateService.setEncryptedCiphers(t)}))}restoreWithServer(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.putRestoreCipher(e);yield this.restore({id:e,revisionDate:t.revisionDate})}))}restoreManyWithServer(e){return o(this,void 0,void 0,(function*(){const t=yield this.apiService.putRestoreManyCiphers(new b.CipherBulkRestoreRequest(e)),n=[];for(const e of t.data)n.push({id:e.id,revisionDate:e.revisionDate});yield this.restore(n)}))}shareAttachmentWithServer(e,t,n){return o(this,void 0,void 0,(function*(){const i=yield this.apiService.nativeFetch(new Request(e.url,{cache:"no-store"}));if(200!==i.status)throw Error("Failed to download attachment: "+i.status.toString());const r=yield i.arrayBuffer(),o=yield this.cryptoService.decryptFromBytes(r,null),a=yield this.cryptoService.getOrgKey(n),s=yield this.cryptoService.encrypt(e.fileName,a),l=yield this.cryptoService.makeEncKey(a),c=yield this.cryptoService.encryptToBytes(o,l[0]),d=new FormData;try{const e=new Blob([c.buffer],{type:"application/octet-stream"});d.append("key",l[1].encryptedString),d.append("data",e,s.encryptedString)}catch(p){if(!M.Utils.isNode||M.Utils.isBrowser)throw p;d.append("key",l[1].encryptedString),d.append("data",Buffer.from(c.buffer),{filepath:s.encryptedString,contentType:"application/octet-stream"})}try{yield this.apiService.postShareCipherAttachment(t,e.id,d,n)}catch(p){throw new Error(p.getSingleMessage())}}))}encryptObjProperty(e,t,n,i){return o(this,void 0,void 0,(function*(){const r=[],o=this;for(const a in n)n.hasOwnProperty(a)&&function(t,a){const s=Promise.resolve().then((()=>{const r=e[n[t]||t];return r&&""!==r?o.cryptoService.encrypt(r,i):null})).then((e=>{a[t]=e}));r.push(s)}(a,t);yield Promise.all(r)}))}encryptCipherData(e,t,n){return o(this,void 0,void 0,(function*(){switch(e.type){case a.CipherType.Login:if(e.login=new v.Login,e.login.passwordRevisionDate=t.login.passwordRevisionDate,e.login.autofillOnPageLoad=t.login.autofillOnPageLoad,yield this.encryptObjProperty(t.login,e.login,{username:null,password:null,totp:null},n),null!=t.login.uris){e.login.uris=[];for(let i=0;i<t.login.uris.length;i++){const r=new f.LoginUri;r.match=t.login.uris[i].match,yield this.encryptObjProperty(t.login.uris[i],r,{uri:null},n),e.login.uris.push(r)}}return;case a.CipherType.SecureNote:return e.secureNote=new y.SecureNote,void(e.secureNote.type=t.secureNote.type);case a.CipherType.Card:return e.card=new p.Card,void(yield this.encryptObjProperty(t.card,e.card,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},n));case a.CipherType.Identity:return e.identity=new h.Identity,void(yield this.encryptObjProperty(t.identity,e.identity,{title:null,firstName:null,middleName:null,lastName:null,address1:null,address2:null,address3:null,city:null,state:null,postalCode:null,country:null,company:null,email:null,phone:null,ssn:null,username:null,passportNumber:null,licenseNumber:null},n));default:throw new Error("Unknown cipher type.")}}))}getCipherForUrl(e,t,n,i){return o(this,void 0,void 0,(function*(){const r=i?"autofillOnPageLoad-"+e:e;if(!this.sortedCiphersCache.isCached(r)){let t=yield this.getAllDecryptedForUrl(e);if(!t)return null;if(i){const e=yield this.stateService.getAutoFillOnPageLoadDefault();if(t=t.filter((t=>t.login.autofillOnPageLoad||null==t.login.autofillOnPageLoad&&!1!==e)),0===t.length)return null}this.sortedCiphersCache.addCiphers(r,t)}return n?this.sortedCiphersCache.getLastLaunched(r):t?this.sortedCiphersCache.getLastUsed(r):this.sortedCiphersCache.getNext(r)}))}clearEncryptedCiphersState(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setEncryptedCiphers(null,{userId:e})}))}clearDecryptedCiphersState(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCiphers(null,{userId:e}),this.clearSortedCiphers()}))}clearSortedCiphers(){this.sortedCiphersCache.clear()}}i([T.sequentialize((()=>"getAllDecrypted")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],B.prototype,"getAllDecrypted",null),t.CipherService=B},95080:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionService=void 0;const r=n(58209),o=n(30260),a=n(82186),s=n(26019),l=n(70829);t.CollectionService=class{constructor(e,t,n){this.cryptoService=e,this.i18nService=t,this.stateService=n}clearCache(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCollections(null,{userId:e})}))}encrypt(e){return i(this,void 0,void 0,(function*(){if(null==e.organizationId)throw new Error("Collection has no organization id.");const t=yield this.cryptoService.getOrgKey(e.organizationId);if(null==t)throw new Error("No key for this collection's organization.");const n=new o.Collection;return n.id=e.id,n.organizationId=e.organizationId,n.readOnly=e.readOnly,n.name=yield this.cryptoService.encrypt(e.name,t),n}))}decryptMany(e){return i(this,void 0,void 0,(function*(){if(null==e)return[];const t=[],n=[];return e.forEach((e=>{n.push(e.decrypt().then((e=>t.push(e))))})),yield Promise.all(n),t.sort(l.Utils.getSortFunction(this.i18nService,"name"))}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCollections();return null!=t&&t.hasOwnProperty(e)?new o.Collection(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedCollections(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new o.Collection(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getDecryptedCollections();if(null!=e)return e;if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=yield this.getAll();return e=yield this.decryptMany(t),yield this.stateService.setDecryptedCollections(e),e}))}getAllNested(e=null){return i(this,void 0,void 0,(function*(){null==e&&(e=yield this.getAllDecrypted());const t=[];return e.forEach((e=>{const n=new a.CollectionView;n.id=e.id,n.organizationId=e.organizationId;const i=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];s.ServiceUtils.nestedTraverse(t,0,i,n,null,"/")})),t}))}getNested(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAllNested();return s.ServiceUtils.getTreeNodeObject(t,e)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedCollections();if(null==t&&(t={}),e instanceof r.CollectionData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.clearCache(),yield this.stateService.setEncryptedCollections(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.clearCache(e),yield this.stateService.setEncryptedCollections(null,{userId:e})}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedCollections();null!=t&&("string"==typeof e?delete t[e]:e.forEach((e=>{delete t[e]})),yield this.replace(t))}))}}},58771:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogService=void 0;const i=n(65076),r=n(40827);t.ConsoleLogService=class{constructor(e,t=null){this.isDev=e,this.filter=t,this.timersMap=new Map}debug(e){this.isDev&&this.write(i.LogLevelType.Debug,e)}info(e){this.write(i.LogLevelType.Info,e)}warning(e){this.write(i.LogLevelType.Warning,e)}error(e){this.write(i.LogLevelType.Error,e)}write(e,t){if(null==this.filter||!this.filter(e))switch(e){case i.LogLevelType.Debug:case i.LogLevelType.Info:console.log(t);break;case i.LogLevelType.Warning:console.warn(t);break;case i.LogLevelType.Error:console.error(t)}}time(e="default"){this.timersMap.has(e)||this.timersMap.set(e,r())}timeEnd(e="default"){const t=r(this.timersMap.get(e));return this.timersMap.delete(e),this.write(i.LogLevelType.Info,`${e}: ${1e3*t[0]+t[1]/1e7}ms`),t}}},98274:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContainerService=void 0;t.ContainerService=class{constructor(e){this.cryptoService=e}attachToWindow(e){this.attachToGlobal(e)}attachToGlobal(e){e.bitwardenContainerService||(e.bitwardenContainerService=this)}getCryptoService(){return this.cryptoService}}},68166:function(e,t,n){"use strict";var i=this&&this.__decorate||function(e,t,n,i){var r,o=arguments.length,a=o<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,i);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(o<3?r(a):o>3?r(t,n,a):r(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},r=this&&this.__metadata||function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},o=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoService=void 0;const a=n(24736),s=n(45419),l=n(6317),c=n(25847),d=n(65845),p=n(65850),u=n(92422),m=n(66607),h=n(61833),v=n(70223),f=n(70829),g=n(64466);class y{constructor(e,t,n,i){this.cryptoFunctionService=e,this.platformUtilService=t,this.logService=n,this.stateService=i}setKey(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKey(e,{userId:t}),yield this.storeKey(e,t)}))}setKeyHash(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setKeyHash(e)}))}setEncKey(e){return o(this,void 0,void 0,(function*(){null!=e&&(yield this.stateService.setDecryptedCryptoSymmetricKey(null),yield this.stateService.setEncryptedCryptoSymmetricKey(e))}))}setEncPrivateKey(e){return o(this,void 0,void 0,(function*(){null!=e&&(yield this.stateService.setDecryptedPrivateKey(null),yield this.stateService.setEncryptedPrivateKey(e))}))}setOrgKeys(e,t){return o(this,void 0,void 0,(function*(){const n={};e.forEach((e=>{n[e.id]=e.key}));for(const e of t){const t=yield this.getProviderKey(e.providerId),i=yield this.decryptToBytes(new m.EncString(e.key),t);n[e.id]=(yield this.rsaEncrypt(i)).encryptedString}return yield this.stateService.setDecryptedOrganizationKeys(null),yield this.stateService.setEncryptedOrganizationKeys(n)}))}setProviderKeys(e){return o(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=e.key})),yield this.stateService.setDecryptedProviderKeys(null),yield this.stateService.setEncryptedProviderKeys(t)}))}getKey(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.stateService.getCryptoMasterKey({userId:t});if(null!=n)return n;e||(e=d.KeySuffixOptions.Auto);const i=yield this.getKeyFromStorage(e,t);return null!=i&&this.setKey(i,t),i}))}getKeyFromStorage(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.retrieveKeyFromStorage(e,t);if(null!=n){const e=new h.SymmetricCryptoKey(f.Utils.fromB64ToArray(n).buffer);return(yield this.validateKey(e))?e:(this.logService.warning("Wrong key, throwing away stored key"),yield this.clearSecretKeyStore(t),null)}return null}))}getKeyHash(){return o(this,void 0,void 0,(function*(){return yield this.stateService.getKeyHash()}))}compareAndUpdateKeyHash(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.getKeyHash();if(null!=e&&null!=n){const i=yield this.hashPassword(e,t,l.HashPurpose.LocalAuthorization);if(null!=i&&n===i)return!0;const r=yield this.hashPassword(e,t,l.HashPurpose.ServerAuthorization);if(null!=r&&n===r)return yield this.setKeyHash(i),!0}return!1}))}getEncKey(e=null){return o(this,void 0,void 0,(function*(){const t=yield this.stateService.getDecryptedCryptoSymmetricKey();if(null!=t)return t;const n=yield this.stateService.getEncryptedCryptoSymmetricKey();if(null==n)return null;if(null==e&&(e=yield this.getKey()),null==e)return null;let i;const r=new m.EncString(n);if(r.encryptionType===s.EncryptionType.AesCbc256_B64)i=yield this.decryptToBytes(r,e);else{if(r.encryptionType!==s.EncryptionType.AesCbc256_HmacSha256_B64)throw new Error("Unsupported encKey type.");{const t=yield this.stretchKey(e);i=yield this.decryptToBytes(r,t)}}if(null==i)return null;const o=new h.SymmetricCryptoKey(i);return yield this.stateService.setDecryptedCryptoSymmetricKey(o),o}))}getPublicKey(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getPublicKey();if(null!=e)return e;const t=yield this.getPrivateKey();if(null==t)return null;const n=yield this.cryptoFunctionService.rsaExtractPublicKey(t);return yield this.stateService.setPublicKey(n),n}))}getPrivateKey(){return o(this,void 0,void 0,(function*(){const e=yield this.stateService.getDecryptedPrivateKey();if(null!=e)return e;const t=yield this.stateService.getEncryptedPrivateKey();if(null==t)return null;const n=yield this.decryptToBytes(new m.EncString(t),null);return yield this.stateService.setDecryptedPrivateKey(n),n}))}getFingerprint(e,t){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getPublicKey()),null===t)throw new Error("No public key available.");const n=yield this.cryptoFunctionService.hash(t,"sha256"),i=yield this.cryptoFunctionService.hkdfExpand(n,e,32,"sha256");return this.hashPhrase(i)}))}getOrgKeys(){return o(this,void 0,void 0,(function*(){const e=new Map,t=yield this.stateService.getDecryptedOrganizationKeys();if(null!=t&&t.size>0)return t;const n=yield this.stateService.getEncryptedOrganizationKeys();if(null==n)return null;let i=!1;for(const r in n){if(!n.hasOwnProperty(r))continue;const t=yield this.rsaDecrypt(n[r]);e.set(r,new h.SymmetricCryptoKey(t)),i=!0}return i&&(yield this.stateService.setDecryptedOrganizationKeys(e)),e}))}getOrgKey(e){return o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.getOrgKeys();return null!=t&&t.has(e)?t.get(e):null}))}getProviderKeys(){return o(this,void 0,void 0,(function*(){const e=new Map,t=yield this.stateService.getDecryptedProviderKeys();if(null!=t&&t.size>0)return t;const n=yield this.stateService.getEncryptedProviderKeys();if(null==n)return null;let i=!1;for(const r in n){if(!n.hasOwnProperty(r))continue;const t=yield this.rsaDecrypt(n[r]);e.set(r,new h.SymmetricCryptoKey(t)),i=!0}return i&&(yield this.stateService.setDecryptedProviderKeys(e)),e}))}getProviderKey(e){return o(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.getProviderKeys();return null!=t&&t.has(e)?t.get(e):null}))}hasKey(){return o(this,void 0,void 0,(function*(){return(yield this.hasKeyInMemory())||(yield this.hasKeyStored(d.KeySuffixOptions.Auto))||(yield this.hasKeyStored(d.KeySuffixOptions.Biometric))}))}hasKeyInMemory(e){return o(this,void 0,void 0,(function*(){return null!=(yield this.stateService.getCryptoMasterKey({userId:e}))}))}hasKeyStored(e,t){return o(this,void 0,void 0,(function*(){return null!=(e===d.KeySuffixOptions.Auto?yield this.stateService.getCryptoMasterKeyAuto({userId:t}):yield this.stateService.hasCryptoMasterKeyBiometric({userId:t}))}))}hasEncKey(){return o(this,void 0,void 0,(function*(){return null!=(yield this.stateService.getEncryptedCryptoSymmetricKey())}))}clearKey(e=!0,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKey(null,{userId:t}),yield this.stateService.setLegacyEtmKey(null,{userId:t}),e&&(yield this.clearSecretKeyStore(t))}))}clearStoredKey(e){return o(this,void 0,void 0,(function*(){e===d.KeySuffixOptions.Auto?yield this.stateService.setCryptoMasterKeyAuto(null):yield this.stateService.setCryptoMasterKeyBiometric(null)}))}clearKeyHash(e){return o(this,void 0,void 0,(function*(){return yield this.stateService.setKeyHash(null,{userId:e})}))}clearEncKey(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedCryptoSymmetricKey(null,{userId:t}),e||(yield this.stateService.setEncryptedCryptoSymmetricKey(null,{userId:t}))}))}clearKeyPair(e,t){return o(this,void 0,void 0,(function*(){const n=[this.stateService.setDecryptedPrivateKey(null,{userId:t}),this.stateService.setPublicKey(null,{userId:t})];return e||n.push(this.stateService.setEncryptedPrivateKey(null,{userId:t})),Promise.all(n)}))}clearOrgKeys(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedOrganizationKeys(null,{userId:t}),e||(yield this.stateService.setEncryptedOrganizationKeys(null,{userId:t}))}))}clearProviderKeys(e,t){return o(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedProviderKeys(null,{userId:t}),e||(yield this.stateService.setEncryptedProviderKeys(null,{userId:t}))}))}clearPinProtectedKey(e){return o(this,void 0,void 0,(function*(){return yield this.stateService.setEncryptedPinProtected(null,{userId:e})}))}clearKeys(e){return o(this,void 0,void 0,(function*(){yield this.clearKey(!0,e),yield this.clearKeyHash(e),yield this.clearOrgKeys(!1,e),yield this.clearProviderKeys(!1,e),yield this.clearEncKey(!1,e),yield this.clearKeyPair(!1,e),yield this.clearPinProtectedKey(e)}))}toggleKey(){return o(this,void 0,void 0,(function*(){const e=yield this.getKey();yield this.setKey(e)}))}makeKey(e,t,n,i){return o(this,void 0,void 0,(function*(){let r=null;if(null!=n&&n!==c.KdfType.PBKDF2_SHA256)throw new Error("Unknown Kdf.");if(null==i)i=5e3;else if(i<5e3)throw new Error("PBKDF2 iteration minimum is 5000.");return r=yield this.cryptoFunctionService.pbkdf2(e,t,"sha256",i),new h.SymmetricCryptoKey(r)}))}makeKeyFromPin(e,t,n,i,r=null){return o(this,void 0,void 0,(function*(){if(null==r){const e=yield this.stateService.getEncryptedPinProtected();if(null==e)throw new Error("No PIN protected key found.");r=new m.EncString(e)}const o=yield this.makePinKey(e,t,n,i),a=yield this.decryptToBytes(r,o);return new h.SymmetricCryptoKey(a)}))}makeShareKey(){return o(this,void 0,void 0,(function*(){const e=yield this.cryptoFunctionService.randomBytes(64),t=yield this.getPublicKey();return[yield this.rsaEncrypt(e,t),new h.SymmetricCryptoKey(e)]}))}makeKeyPair(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.rsaGenerateKeyPair(2048);return[f.Utils.fromBufferToB64(t[0]),yield this.encrypt(t[1],e)]}))}makePinKey(e,t,n,i){return o(this,void 0,void 0,(function*(){const r=yield this.makeKey(e,t,n,i);return yield this.stretchKey(r)}))}makeSendKey(e){return o(this,void 0,void 0,(function*(){const t=yield this.cryptoFunctionService.hkdf(e,"bitwarden-send","send",64,"sha256");return new h.SymmetricCryptoKey(t)}))}hashPassword(e,t,n){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getKey()),null==e||null==t)throw new Error("Invalid parameters.");const i=n===l.HashPurpose.LocalAuthorization?2:1,r=yield this.cryptoFunctionService.pbkdf2(t.key,e,"sha256",i);return f.Utils.fromBufferToB64(r)}))}makeEncKey(e){return o(this,void 0,void 0,(function*(){const t=yield this.getKeyForEncryption(e),n=yield this.cryptoFunctionService.randomBytes(64);return this.buildEncKey(t,n)}))}remakeEncKey(e,t){return o(this,void 0,void 0,(function*(){return null==t&&(t=yield this.getEncKey()),this.buildEncKey(e,t.key)}))}encrypt(e,t){return o(this,void 0,void 0,(function*(){if(null==e)return Promise.resolve(null);let n;n="string"==typeof e?f.Utils.fromUtf8ToArray(e).buffer:e;const i=yield this.aesEncrypt(n,t),r=f.Utils.fromBufferToB64(i.iv),o=f.Utils.fromBufferToB64(i.data),a=null!=i.mac?f.Utils.fromBufferToB64(i.mac):null;return new m.EncString(i.key.encType,o,r,a)}))}encryptToBytes(e,t){return o(this,void 0,void 0,(function*(){const n=yield this.aesEncrypt(e,t);let i=0;null!=n.mac&&(i=n.mac.byteLength);const r=new Uint8Array(1+n.iv.byteLength+i+n.data.byteLength);return r.set([n.key.encType]),r.set(new Uint8Array(n.iv),1),null!=n.mac&&r.set(new Uint8Array(n.mac),1+n.iv.byteLength),r.set(new Uint8Array(n.data),1+n.iv.byteLength+i),new p.EncArrayBuffer(r.buffer)}))}rsaEncrypt(e,t){return o(this,void 0,void 0,(function*(){if(null==t&&(t=yield this.getPublicKey()),null==t)throw new Error("Public key unavailable.");const n=yield this.cryptoFunctionService.rsaEncrypt(e,t,"sha1");return new m.EncString(s.EncryptionType.Rsa2048_OaepSha1_B64,f.Utils.fromBufferToB64(n))}))}rsaDecrypt(e,t){return o(this,void 0,void 0,(function*(){const n=e.split(".");let i,r=null;if(1===n.length)r=s.EncryptionType.Rsa2048_OaepSha256_B64,i=[n[0]];else if(2===n.length)try{r=parseInt(n[0],null),i=n[1].split("|")}catch(c){this.logService.error(c)}switch(r){case s.EncryptionType.Rsa2048_OaepSha256_B64:case s.EncryptionType.Rsa2048_OaepSha1_B64:case s.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:case s.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}if(null==i||i.length<=0)throw new Error("encPieces unavailable.");const o=f.Utils.fromB64ToArray(i[0]).buffer,a=null!=t?t:yield this.getPrivateKey();if(null==a)throw new Error("No private key.");let l="sha1";switch(r){case s.EncryptionType.Rsa2048_OaepSha256_B64:case s.EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:l="sha256";break;case s.EncryptionType.Rsa2048_OaepSha1_B64:case s.EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:break;default:throw new Error("encType unavailable.")}return this.cryptoFunctionService.rsaDecrypt(o,a,l)}))}decryptToBytes(e,t){return o(this,void 0,void 0,(function*(){const n=f.Utils.fromB64ToArray(e.iv).buffer,i=f.Utils.fromB64ToArray(e.data).buffer,r=e.mac?f.Utils.fromB64ToArray(e.mac).buffer:null,o=yield this.aesDecryptToBytes(e.encryptionType,i,n,r,t);return null==o?null:o}))}decryptToUtf8(e,t){return o(this,void 0,void 0,(function*(){return yield this.aesDecryptToUtf8(e.encryptionType,e.data,e.iv,e.mac,t)}))}decryptFromBytes(e,t){return o(this,void 0,void 0,(function*(){if(null==e)throw new Error("no encBuf.");const n=new Uint8Array(e),i=n[0];let r=null,o=null,a=null;switch(i){case s.EncryptionType.AesCbc128_HmacSha256_B64:case s.EncryptionType.AesCbc256_HmacSha256_B64:if(n.length<=49)return null;o=n.slice(1,17),a=n.slice(17,49),r=n.slice(49);break;case s.EncryptionType.AesCbc256_B64:if(n.length<=17)return null;o=n.slice(1,17),r=n.slice(17);break;default:return null}return yield this.aesDecryptToBytes(i,r.buffer,o.buffer,null!=a?a.buffer:null,t)}))}randomNumber(e,t){return o(this,void 0,void 0,(function*(){let n=0;const i=t-e+1,r=Math.ceil(Math.log2(i));if(r>53)throw new Error("We cannot generate numbers larger than 53 bits.");const o=Math.ceil(r/8),a=Math.pow(2,r)-1,s=new Uint8Array(yield this.cryptoFunctionService.randomBytes(o));let l=8*(o-1);for(let e=0;e<o;e++)n+=s[e]*Math.pow(2,l),l-=8;return n&=a,n>=i?this.randomNumber(e,t):e+n}))}validateKey(e){return o(this,void 0,void 0,(function*(){try{const t=yield this.stateService.getEncryptedPrivateKey(),n=yield this.getEncKey(e);if(null==t||null==n)return!1;const i=yield this.decryptToBytes(new m.EncString(t),n);yield this.cryptoFunctionService.rsaExtractPublicKey(i)}catch(t){return!1}return!0}))}storeKey(e,t){return o(this,void 0,void 0,(function*(){(yield this.shouldStoreKey(d.KeySuffixOptions.Auto,t))?yield this.stateService.setCryptoMasterKeyAuto(e.keyB64,{userId:t}):(yield this.shouldStoreKey(d.KeySuffixOptions.Biometric,t))?yield this.stateService.setCryptoMasterKeyBiometric(e.keyB64,{userId:t}):(yield this.stateService.setCryptoMasterKeyAuto(null,{userId:t}),yield this.stateService.setCryptoMasterKeyBiometric(null,{userId:t}))}))}shouldStoreKey(e,t){return o(this,void 0,void 0,(function*(){let n=!1;if(e===d.KeySuffixOptions.Auto){n=null==(yield this.stateService.getVaultTimeout({userId:t}))}else if(e===d.KeySuffixOptions.Biometric){n=(yield this.stateService.getBiometricUnlock({userId:t}))&&this.platformUtilService.supportsSecureStorage()}return n}))}retrieveKeyFromStorage(e,t){return o(this,void 0,void 0,(function*(){return e===d.KeySuffixOptions.Auto?yield this.stateService.getCryptoMasterKeyAuto({userId:t}):yield this.stateService.getCryptoMasterKeyBiometric({userId:t})}))}aesEncrypt(e,t){return o(this,void 0,void 0,(function*(){const n=new u.EncryptedObject;if(n.key=yield this.getKeyForEncryption(t),n.iv=yield this.cryptoFunctionService.randomBytes(16),n.data=yield this.cryptoFunctionService.aesEncrypt(e,n.iv,n.key.encKey),null!=n.key.macKey){const e=new Uint8Array(n.iv.byteLength+n.data.byteLength);e.set(new Uint8Array(n.iv),0),e.set(new Uint8Array(n.data),n.iv.byteLength),n.mac=yield this.cryptoFunctionService.hmac(e.buffer,n.key.macKey,"sha256")}return n}))}aesDecryptToUtf8(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=yield this.getKeyForEncryption(r),a=yield this.resolveLegacyKey(e,o);if(null!=a.macKey&&null==i)return this.logService.error("mac required."),null;if(a.encType!==e)return this.logService.error("encType unavailable."),null;const s=this.cryptoFunctionService.aesDecryptFastParameters(t,n,i,a);if(null!=s.macKey&&null!=s.mac){const e=yield this.cryptoFunctionService.hmacFast(s.macData,s.macKey,"sha256");if(!(yield this.cryptoFunctionService.compareFast(s.mac,e)))return this.logService.error("mac failed."),null}return this.cryptoFunctionService.aesDecryptFast(s)}))}aesDecryptToBytes(e,t,n,i,r){return o(this,void 0,void 0,(function*(){const o=yield this.getKeyForEncryption(r),a=yield this.resolveLegacyKey(e,o);if(null!=a.macKey&&null==i)return null;if(a.encType!==e)return null;if(null!=a.macKey&&null!=i){const e=new Uint8Array(n.byteLength+t.byteLength);e.set(new Uint8Array(n),0),e.set(new Uint8Array(t),n.byteLength);const r=yield this.cryptoFunctionService.hmac(e.buffer,a.macKey,"sha256");if(null===r)return null;if(!(yield this.cryptoFunctionService.compare(i,r)))return this.logService.error("mac failed."),null}return yield this.cryptoFunctionService.aesDecrypt(t,n,a.encKey)}))}getKeyForEncryption(e){return o(this,void 0,void 0,(function*(){if(null!=e)return e;const t=yield this.getEncKey();return null!=t?t:yield this.getKey()}))}resolveLegacyKey(e,t){return o(this,void 0,void 0,(function*(){if(e===s.EncryptionType.AesCbc128_HmacSha256_B64&&t.encType===s.EncryptionType.AesCbc256_B64){let e=yield this.stateService.getLegacyEtmKey();return null==e&&(e=new h.SymmetricCryptoKey(t.key,s.EncryptionType.AesCbc128_HmacSha256_B64),yield this.stateService.setLegacyEtmKey(e)),e}return t}))}stretchKey(e){return o(this,void 0,void 0,(function*(){const t=new Uint8Array(64),n=yield this.cryptoFunctionService.hkdfExpand(e.key,"enc",32,"sha256"),i=yield this.cryptoFunctionService.hkdfExpand(e.key,"mac",32,"sha256");return t.set(new Uint8Array(n)),t.set(new Uint8Array(i),32),new h.SymmetricCryptoKey(t.buffer)}))}hashPhrase(e,t=64){return o(this,void 0,void 0,(function*(){const n=Math.log(g.EEFLongWordList.length)/Math.log(2);let i=Math.ceil(t/n);const r=Array.from(new Uint8Array(e));if(i*n>4*r.length)throw new Error("Output entropy of hash function is too small");const o=[];let s=a.fromArray(r,256);for(;i--;){const e=s.mod(g.EEFLongWordList.length);s=s.divide(g.EEFLongWordList.length),o.push(g.EEFLongWordList[e])}return o}))}buildEncKey(e,t){return o(this,void 0,void 0,(function*(){let n=null;if(32===e.key.byteLength){const i=yield this.stretchKey(e);n=yield this.encrypt(t,i)}else{if(64!==e.key.byteLength)throw new Error("Invalid key size.");n=yield this.encrypt(t,e)}return[new h.SymmetricCryptoKey(t),n]}))}clearSecretKeyStore(e){return o(this,void 0,void 0,(function*(){yield this.stateService.setCryptoMasterKeyAuto(null,{userId:e}),yield this.stateService.setCryptoMasterKeyBiometric(null,{userId:e})}))}}i([v.sequentialize((()=>"getEncKey")),r("design:type",Function),r("design:paramtypes",[h.SymmetricCryptoKey]),r("design:returntype",Promise)],y.prototype,"getEncKey",null),i([v.sequentialize((()=>"getOrgKeys")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],y.prototype,"getOrgKeys",null),i([v.sequentialize((()=>"getProviderKeys")),r("design:type",Function),r("design:paramtypes",[]),r("design:returntype",Promise)],y.prototype,"getProviderKeys",null),t.CryptoService=y},75078:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EnvironmentService=void 0;const r=n(59666),o=n(53797);t.EnvironmentService=class{constructor(e){this.stateService=e,this.urlsSubject=new r.Subject,this.urls=this.urlsSubject,this.stateService.activeAccount.subscribe((e=>i(this,void 0,void 0,(function*(){yield this.setUrlsFromStorage()}))))}hasBaseUrl(){return null!=this.baseUrl}getNotificationsUrl(){return null!=this.notificationsUrl?this.notificationsUrl:null!=this.baseUrl?this.baseUrl+"/notifications":"https://notifications.bitwarden.com"}getWebVaultUrl(){return null!=this.webVaultUrl?this.webVaultUrl:this.baseUrl?this.baseUrl:"https://vault.bitwarden.com"}getSendUrl(){return"https://vault.bitwarden.com"===this.getWebVaultUrl()?"https://send.bitwarden.com/#":this.getWebVaultUrl()+"/#/send/"}getIconsUrl(){return null!=this.iconsUrl?this.iconsUrl:this.baseUrl?this.baseUrl+"/icons":"https://icons.bitwarden.net"}getApiUrl(){return null!=this.apiUrl?this.apiUrl:this.baseUrl?this.baseUrl+"/api":"https://api.bitwarden.com"}getIdentityUrl(){return null!=this.identityUrl?this.identityUrl:this.baseUrl?this.baseUrl+"/identity":"https://identity.bitwarden.com"}getEventsUrl(){return null!=this.eventsUrl?this.eventsUrl:this.baseUrl?this.baseUrl+"/events":"https://events.bitwarden.com"}getKeyConnectorUrl(){return this.keyConnectorUrl}setUrlsFromStorage(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEnvironmentUrls(),t=new o.EnvironmentUrls;this.baseUrl=t.base=e.base,this.webVaultUrl=e.webVault,this.apiUrl=t.api=e.api,this.identityUrl=t.identity=e.identity,this.iconsUrl=e.icons,this.notificationsUrl=e.notifications,this.eventsUrl=t.events=e.events,this.keyConnectorUrl=e.keyConnector}))}setUrls(e){return i(this,void 0,void 0,(function*(){return e.base=this.formatUrl(e.base),e.webVault=this.formatUrl(e.webVault),e.api=this.formatUrl(e.api),e.identity=this.formatUrl(e.identity),e.icons=this.formatUrl(e.icons),e.notifications=this.formatUrl(e.notifications),e.events=this.formatUrl(e.events),e.keyConnector=this.formatUrl(e.keyConnector),yield this.stateService.setEnvironmentUrls({base:e.base,api:e.api,identity:e.identity,webVault:e.webVault,icons:e.icons,notifications:e.notifications,events:e.events,keyConnector:e.keyConnector}),this.baseUrl=e.base,this.webVaultUrl=e.webVault,this.apiUrl=e.api,this.identityUrl=e.identity,this.iconsUrl=e.icons,this.notificationsUrl=e.notifications,this.eventsUrl=e.events,this.keyConnectorUrl=e.keyConnector,this.urlsSubject.next(e),e}))}getUrls(){return{base:this.baseUrl,webVault:this.webVaultUrl,api:this.apiUrl,identity:this.identityUrl,icons:this.iconsUrl,notifications:this.notificationsUrl,events:this.eventsUrl,keyConnector:this.keyConnectorUrl}}formatUrl(e){return null==e||""===e?null:((e=e.replace(/\/+$/g,"")).startsWith("http://")||e.startsWith("https://")||(e="https://"+e),e.trim())}}},49250:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventService=void 0;const r=n(11740),o=n(62849);t.EventService=class{constructor(e,t,n,i,r){this.apiService=e,this.cipherService=t,this.stateService=n,this.logService=i,this.organizationService=r,this.inited=!1}init(e){this.inited||(this.inited=!0,e&&(this.uploadEvents(),setInterval((()=>this.uploadEvents()),6e4)))}collect(e,t=null,n=!1){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated()))return;const i=yield this.organizationService.getAll();if(null==i)return;const o=new Set(i.filter((e=>e.useEvents)).map((e=>e.id)));if(0===o.size)return;if(null!=t){const e=yield this.cipherService.get(t);if(null==e||null==e.organizationId||!o.has(e.organizationId))return}let a=yield this.stateService.getEventCollection();null==a&&(a=[]);const s=new r.EventData;s.type=e,s.cipherId=t,s.date=(new Date).toISOString(),a.push(s),yield this.stateService.setEventCollection(a),n&&(yield this.uploadEvents())}))}uploadEvents(e){return i(this,void 0,void 0,(function*(){if(!(yield this.stateService.getIsAuthenticated({userId:e})))return;const t=yield this.stateService.getEventCollection({userId:e});if(null==t||0===t.length)return;const n=t.map((e=>{const t=new o.EventRequest;return t.type=e.type,t.cipherId=e.cipherId,t.date=e.date,t}));try{yield this.apiService.postEventsCollect(n),this.clearEvents(e)}catch(i){this.logService.error(i)}}))}clearEvents(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEventCollection(null,{userId:e})}))}}},56811:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;const r=n(57460),o=n(23635),a=n(78758),s=n(30260),l=n(13886),c=n(58209),d=n(7064),p=n(79937),u=n(14259),m=n(50901),h=n(70829);t.ExportService=class{constructor(e,t,n,i){this.folderService=e,this.cipherService=t,this.apiService=n,this.cryptoService=i}getExport(e="csv"){return i(this,void 0,void 0,(function*(){return"encrypted_json"===e?this.getEncryptedExport():this.getDecryptedExport(e)}))}getOrganizationExport(e,t="csv"){return i(this,void 0,void 0,(function*(){return"encrypted_json"===t?this.getOrganizationEncryptedExport(e):this.getOrganizationDecryptedExport(e,t)}))}getEventExport(e){return i(this,void 0,void 0,(function*(){return r.unparse(e.map((e=>new u.Event(e))))}))}getFileName(e=null,t="csv"){const n=new Date;return"bitwarden"+(e?"_"+e:"")+"_export_"+(n.getFullYear()+""+this.padNumber(n.getMonth()+1,2)+this.padNumber(n.getDate(),2)+this.padNumber(n.getHours(),2)+this.padNumber(n.getMinutes(),2)+this.padNumber(n.getSeconds(),2))+"."+t}getDecryptedExport(e){return i(this,void 0,void 0,(function*(){let t=[],n=[];const i=[];if(i.push(this.folderService.getAllDecrypted().then((e=>{t=e}))),i.push(this.cipherService.getAllDecrypted().then((e=>{n=e.filter((e=>null==e.deletedDate))}))),yield Promise.all(i),"csv"===e){const e=new Map;t.forEach((t=>{null!=t.id&&e.set(t.id,t)}));const i=[];return n.forEach((t=>{if(t.type!==o.CipherType.Login&&t.type!==o.CipherType.SecureNote)return;if(null!=t.organizationId)return;const n={};n.folder=null!=t.folderId&&e.has(t.folderId)?e.get(t.folderId).name:null,n.favorite=t.favorite?1:null,this.buildCommonCipher(n,t),i.push(n)})),r.unparse(i)}{const e={encrypted:!1,folders:[],items:[]};return t.forEach((t=>{if(null==t.id)return;const n=new m.FolderWithId;n.build(t),e.folders.push(n)})),n.forEach((t=>{if(null!=t.organizationId)return;const n=new d.CipherWithIds;n.build(t),n.collectionIds=null,e.items.push(n)})),JSON.stringify(e,null," ")}}))}getEncryptedExport(){return i(this,void 0,void 0,(function*(){let e=[],t=[];const n=[];n.push(this.folderService.getAll().then((t=>{e=t}))),n.push(this.cipherService.getAll().then((e=>{t=e.filter((e=>null==e.deletedDate))}))),yield Promise.all(n);const i={encrypted:!0,encKeyValidation_DO_NOT_EDIT:(yield this.cryptoService.encrypt(h.Utils.newGuid())).encryptedString,folders:[],items:[]};return e.forEach((e=>{if(null==e.id)return;const t=new m.FolderWithId;t.build(e),i.folders.push(t)})),t.forEach((e=>{if(null!=e.organizationId)return;const t=new d.CipherWithIds;t.build(e),t.collectionIds=null,i.items.push(t)})),JSON.stringify(i,null," ")}))}getOrganizationDecryptedExport(e,t){return i(this,void 0,void 0,(function*(){const n=[],i=[],u=[];if(u.push(this.apiService.getCollections(e).then((e=>{const t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((e=>{const i=new s.Collection(new c.CollectionData(e));t.push(i.decrypt().then((e=>{n.push(e)})))})),Promise.all(t)}))),u.push(this.apiService.getCiphersOrganization(e).then((e=>{const t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((e=>null===e.deletedDate)).forEach((e=>{const n=new a.Cipher(new l.CipherData(e));t.push(n.decrypt().then((e=>{i.push(e)})))})),Promise.all(t)}))),yield Promise.all(u),"csv"===t){const e=new Map;n.forEach((t=>{e.set(t.id,t)}));const t=[];return i.forEach((n=>{if(n.type!==o.CipherType.Login&&n.type!==o.CipherType.SecureNote)return;const i={collections:[]};null!=n.collectionIds&&(i.collections=n.collectionIds.filter((t=>e.has(t))).map((t=>e.get(t).name))),this.buildCommonCipher(i,n),t.push(i)})),r.unparse(t)}{const e={encrypted:!1,collections:[],items:[]};return n.forEach((t=>{const n=new p.CollectionWithId;n.build(t),e.collections.push(n)})),i.forEach((t=>{const n=new d.CipherWithIds;n.build(t),e.items.push(n)})),JSON.stringify(e,null," ")}}))}getOrganizationEncryptedExport(e){return i(this,void 0,void 0,(function*(){const t=[],n=[],i=[];i.push(this.apiService.getCollections(e).then((e=>(null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((e=>{const n=new s.Collection(new c.CollectionData(e));t.push(n)})),Promise.all([]))))),i.push(this.apiService.getCiphersOrganization(e).then((e=>(null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((e=>null===e.deletedDate)).forEach((e=>{const t=new a.Cipher(new l.CipherData(e));n.push(t)})),Promise.all([]))))),yield Promise.all(i);const r=yield this.cryptoService.getOrgKey(e),o={encrypted:!0,encKeyValidation_DO_NOT_EDIT:(yield this.cryptoService.encrypt(h.Utils.newGuid(),r)).encryptedString,collections:[],items:[]};return t.forEach((e=>{const t=new p.CollectionWithId;t.build(e),o.collections.push(t)})),n.forEach((e=>{const t=new d.CipherWithIds;t.build(e),o.items.push(t)})),JSON.stringify(o,null," ")}))}padNumber(e,t,n="0"){const i=e.toString();return i.length>=t?i:new Array(t-i.length+1).join(n)+i}buildCommonCipher(e,t){switch(e.type=null,e.name=t.name,e.notes=t.notes,e.fields=null,e.reprompt=t.reprompt,e.login_uri=null,e.login_username=null,e.login_password=null,e.login_totp=null,t.fields&&t.fields.forEach((t=>{e.fields?e.fields+="\n":e.fields="",e.fields+=(t.name||"")+": "+t.value})),t.type){case o.CipherType.Login:e.type="login",e.login_username=t.login.username,e.login_password=t.login.password,e.login_totp=t.login.totp,t.login.uris&&(e.login_uri=[],t.login.uris.forEach((t=>{e.login_uri.push(t.uri)})));break;case o.CipherType.SecureNote:e.type="note";break;default:return}return e}}},13765:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FileUploadService=void 0;const r=n(15660),o=n(72983),a=n(74166);t.FileUploadService=class{constructor(e,t){this.logService=e,this.apiService=t,this.azureFileUploadService=new o.AzureFileUploadService(e),this.bitwardenFileUploadService=new a.BitwardenFileUploadService(t)}uploadSendFile(e,t,n){return i(this,void 0,void 0,(function*(){try{switch(e.fileUploadType){case r.FileUploadType.Direct:yield this.bitwardenFileUploadService.upload(t.encryptedString,n,(t=>this.apiService.postSendFile(e.sendResponse.id,e.sendResponse.file.id,t)));break;case r.FileUploadType.Azure:const o=()=>i(this,void 0,void 0,(function*(){return(yield this.apiService.renewSendFileUploadUrl(e.sendResponse.id,e.sendResponse.file.id)).url}));yield this.azureFileUploadService.upload(e.url,n,o);break;default:throw new Error("Unknown file upload type")}}catch(o){throw yield this.apiService.deleteSend(e.sendResponse.id),o}}))}uploadCipherAttachment(e,t,n,o){return i(this,void 0,void 0,(function*(){const a=e?t.cipherMiniResponse:t.cipherResponse;try{switch(t.fileUploadType){case r.FileUploadType.Direct:yield this.bitwardenFileUploadService.upload(n.encryptedString,o,(e=>this.apiService.postAttachmentFile(a.id,t.attachmentId,e)));break;case r.FileUploadType.Azure:const e=()=>i(this,void 0,void 0,(function*(){return(yield this.apiService.renewAttachmentUploadUrl(a.id,t.attachmentId)).url}));yield this.azureFileUploadService.upload(t.url,o,e);break;default:throw new Error("Unknown file upload type.")}}catch(s){throw e?yield this.apiService.deleteCipherAttachmentAdmin(a.id,t.attachmentId):yield this.apiService.deleteCipherAttachment(a.id,t.attachmentId),s}}))}}},99984:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FolderService=void 0;const r=n(20301),o=n(60149),a=n(27104),s=n(50044),l=n(26019),c=n(70829);t.FolderService=class{constructor(e,t,n,i,r){this.cryptoService=e,this.apiService=t,this.i18nService=n,this.cipherService=i,this.stateService=r}clearCache(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null,{userId:e})}))}encrypt(e,t){return i(this,void 0,void 0,(function*(){const n=new o.Folder;return n.id=e.id,n.name=yield this.cryptoService.encrypt(e.name,t),n}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedFolders();return null!=t&&t.hasOwnProperty(e)?new o.Folder(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedFolders(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new o.Folder(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getDecryptedFolders();if(null!=e)return e;if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=[],n=[];(yield this.getAll()).forEach((e=>{n.push(e.decrypt().then((e=>t.push(e))))})),yield Promise.all(n),t.sort(c.Utils.getSortFunction(this.i18nService,"name"));const i=new s.FolderView;return i.name=this.i18nService.t("noneFolder"),t.push(i),yield this.stateService.setDecryptedFolders(t),t}))}getAllNested(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllDecrypted(),t=[];return e.forEach((e=>{const n=new s.FolderView;n.id=e.id,n.revisionDate=e.revisionDate;const i=null!=e.name?e.name.replace(/^\/+|\/+$/g,"").split("/"):[];l.ServiceUtils.nestedTraverse(t,0,i,n,null,"/")})),t}))}getNested(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAllNested();return l.ServiceUtils.getTreeNodeObject(t,e)}))}saveWithServer(e){return i(this,void 0,void 0,(function*(){const t=new a.FolderRequest(e);let n;null==e.id?(n=yield this.apiService.postFolder(t),e.id=n.id):n=yield this.apiService.putFolder(e.id,t);const i=yield this.stateService.getUserId(),o=new r.FolderData(n,i);yield this.upsert(o)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedFolders();if(null==t&&(t={}),e instanceof r.FolderData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedFolders(null,{userId:e}),yield this.stateService.setEncryptedFolders(null,{userId:e})}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedFolders();if(null==t)return;if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.stateService.setDecryptedFolders(null),yield this.stateService.setEncryptedFolders(t);const n=yield this.stateService.getEncryptedCiphers();if(null!=n){const t=[];for(const i in n)n[i].folderId===e&&(n[i].folderId=null,t.push(n[i]));t.length>0&&this.cipherService.upsert(t)}}))}deleteWithServer(e){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteFolder(e),yield this.delete(e)}))}}},75631:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;t.I18nService=class{constructor(e,t,n){this.systemLanguage=e,this.localesDirectory=t,this.getLocalesJson=n,this.supportedTranslationLocales=["en"],this.localeNames=new Map([["af","Afrikaans"],["az","Azərbaycanca"],["be","Беларуская"],["bg","български"],["ca","català"],["cs","čeština"],["da","dansk"],["de","Deutsch"],["el","Ελληνικά"],["en","English"],["en-GB","English (British)"],["eo","Esperanto"],["es","español"],["et","eesti"],["fa","فارسی"],["fi","suomi"],["fr","français"],["he","עברית"],["hi","हिन्दी"],["hr","hrvatski"],["hu","magyar"],["id","Bahasa Indonesia"],["it","italiano"],["ja","日本語"],["ko","한국어"],["lv","Latvietis"],["ml","മലയാളം"],["nb","norsk (bokmål)"],["nl","Nederlands"],["pl","polski"],["pt-BR","português do Brasil"],["pt-PT","português"],["ro","română"],["ru","русский"],["sk","slovenčina"],["sr","Српски"],["sv","svenska"],["th","ไทย"],["tr","Türkçe"],["uk","українська"],["vi","Tiếng Việt"],["zh-CN","中文(中国大陆)"],["zh-TW","中文(台灣)"]]),this.defaultMessages={},this.localeMessages={},this.systemLanguage=e.replace("_","-")}init(e){return n(this,void 0,void 0,(function*(){if(this.inited)throw new Error("i18n already initialized.");if(null==this.supportedTranslationLocales||0===this.supportedTranslationLocales.length)throw new Error("supportedTranslationLocales not set.");this.inited=!0,this.locale=this.translationLocale=null!=e?e:this.systemLanguage;try{this.collator=new Intl.Collator(this.locale,{numeric:!0,sensitivity:"base"})}catch(t){this.collator=null}-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.translationLocale.slice(0,2),-1===this.supportedTranslationLocales.indexOf(this.translationLocale)&&(this.translationLocale=this.supportedTranslationLocales[0])),null!=this.localesDirectory&&(yield this.loadMessages(this.translationLocale,this.localeMessages),this.translationLocale!==this.supportedTranslationLocales[0]&&(yield this.loadMessages(this.supportedTranslationLocales[0],this.defaultMessages)))}))}t(e,t,n,i){return this.translate(e,t,n,i)}translate(e,t,n,i){let r;return r=this.localeMessages.hasOwnProperty(e)&&this.localeMessages[e]?this.localeMessages[e]:this.defaultMessages.hasOwnProperty(e)&&this.defaultMessages[e]?this.defaultMessages[e]:"",""!==r&&(null!=t&&(r=r.split("__$1__").join(t)),null!=n&&(r=r.split("__$2__").join(n)),null!=i&&(r=r.split("__$3__").join(i))),r}loadMessages(e,t){return n(this,void 0,void 0,(function*(){const n=e.replace("-","_"),i=yield this.getLocalesJson(n);for(const e in i)if(i.hasOwnProperty(e)&&(t[e]=i[e].message,i[e].placeholders))for(const n in i[e].placeholders){if(!i[e].placeholders.hasOwnProperty(n)||!i[e].placeholders[n].content)continue;const r="\\$"+n.toUpperCase()+"\\$";let o=i[e].placeholders[n].content;"$1"!==o&&"$2"!==o&&"$3"!==o||(o="__$"+o+"__"),t[e]=t[e].replace(new RegExp(r,"g"),o)}}))}}},80321:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;const r=n(23635),o=n(70829),a=n(52675),s=n(26180),l=n(27104),c=n(54384),d=n(94834),p=n(44181),u=n(25237),m=n(1378),h=n(73973),v=n(86094),f=n(28422),g=n(1627),y=n(16039),x=n(78855),S=n(22126),b=n(97542),w=n(50311),I=n(44521),C=n(33936),E=n(3311),P=n(36636),k=n(77177),A=n(4049),O=n(18810),T=n(68656),M=n(15641),D=n(99095),B=n(54547),R=n(56873),U=n(60788),V=n(83277),F=n(44360),N=n(86904),_=n(49717),j=n(46037),z=n(59253),L=n(45980),K=n(82702),q=n(7965),G=n(7620),W=n(40355),H=n(17680),$=n(68112),Q=n(15688),Y=n(58849),J=n(14598),X=n(16089),Z=n(63638),ee=n(44713),te=n(90400),ne=n(45355),ie=n(44058),re=n(42237),oe=n(77559),ae=n(29278),se=n(73717),le=n(74460),ce=n(61799),de=n(42489),pe=n(92154),ue=n(37032);t.ImportService=class{constructor(e,t,n,i,r,o,a){this.cipherService=e,this.folderService=t,this.apiService=n,this.i18nService=i,this.collectionService=r,this.platformUtilsService=o,this.cryptoService=a,this.featuredImportOptions=[{id:"bitwardenjson",name:"Bitwarden (json)"},{id:"bitwardencsv",name:"Bitwarden (csv)"},{id:"chromecsv",name:"Chrome (csv)"},{id:"dashlanejson",name:"Dashlane (json)"},{id:"firefoxcsv",name:"Firefox (csv)"},{id:"keepass2xml",name:"KeePass 2 (xml)"},{id:"lastpasscsv",name:"LastPass (csv)"},{id:"safaricsv",name:"Safari and macOS (csv)"},{id:"1password1pif",name:"1Password (1pif)"}],this.regularImportOptions=[{id:"keepassxcsv",name:"KeePassX (csv)"},{id:"1passwordwincsv",name:"1Password 6 and 7 Windows (csv)"},{id:"1passwordmaccsv",name:"1Password 6 and 7 Mac (csv)"},{id:"roboformcsv",name:"RoboForm (csv)"},{id:"keepercsv",name:"Keeper (csv)"},{id:"enpasscsv",name:"Enpass (csv)"},{id:"enpassjson",name:"Enpass (json)"},{id:"safeincloudxml",name:"SafeInCloud (xml)"},{id:"pwsafexml",name:"Password Safe (xml)"},{id:"stickypasswordxml",name:"Sticky Password (xml)"},{id:"msecurecsv",name:"mSecure (csv)"},{id:"truekeycsv",name:"True Key (csv)"},{id:"passwordbossjson",name:"Password Boss (json)"},{id:"zohovaultcsv",name:"Zoho Vault (csv)"},{id:"splashidcsv",name:"SplashID (csv)"},{id:"passworddragonxml",name:"Password Dragon (xml)"},{id:"padlockcsv",name:"Padlock (csv)"},{id:"passboltcsv",name:"Passbolt (csv)"},{id:"clipperzhtml",name:"Clipperz (html)"},{id:"aviracsv",name:"Avira (csv)"},{id:"saferpasscsv",name:"SaferPass (csv)"},{id:"upmcsv",name:"Universal Password Manager (csv)"},{id:"ascendocsv",name:"Ascendo DataVault (csv)"},{id:"meldiumcsv",name:"Meldium (csv)"},{id:"passkeepcsv",name:"PassKeep (csv)"},{id:"operacsv",name:"Opera (csv)"},{id:"vivaldicsv",name:"Vivaldi (csv)"},{id:"gnomejson",name:"GNOME Passwords and Keys/Seahorse (json)"},{id:"blurcsv",name:"Blur (csv)"},{id:"passwordagentcsv",name:"Password Agent (csv)"},{id:"passpackcsv",name:"Passpack (csv)"},{id:"passmanjson",name:"Passman (json)"},{id:"avastcsv",name:"Avast Passwords (csv)"},{id:"avastjson",name:"Avast Passwords (json)"},{id:"fsecurefsk",name:"F-Secure KEY (fsk)"},{id:"kasperskytxt",name:"Kaspersky Password Manager (txt)"},{id:"remembearcsv",name:"RememBear (csv)"},{id:"passwordwallettxt",name:"PasswordWallet (txt)"},{id:"mykicsv",name:"Myki (csv)"},{id:"securesafecsv",name:"SecureSafe (csv)"},{id:"logmeoncecsv",name:"LogMeOnce (csv)"},{id:"blackberrycsv",name:"BlackBerry Password Keeper (csv)"},{id:"buttercupcsv",name:"Buttercup (csv)"},{id:"codebookcsv",name:"Codebook (csv)"},{id:"encryptrcsv",name:"Encryptr (csv)"},{id:"yoticsv",name:"Yoti (csv)"},{id:"nordpasscsv",name:"Nordpass (csv)"}]}getImportOptions(){return this.featuredImportOptions.concat(this.regularImportOptions)}import(e,t,n=null){return i(this,void 0,void 0,(function*(){const i=yield e.parse(t);if(i.success){if(0===i.folders.length&&0===i.ciphers.length)return new Error(this.i18nService.t("importNothingError"));if(i.ciphers.length>0){const e=Math.floor(i.ciphers.length/2),t=i.ciphers.length-1;if(this.badData(i.ciphers[0])&&this.badData(i.ciphers[e])&&this.badData(i.ciphers[t]))return new Error(this.i18nService.t("importFormatError"))}try{yield this.postImport(i,n)}catch(r){const e=new u.ErrorResponse(r,400);return this.handleServerError(e,i)}return null}return o.Utils.isNullOrWhitespace(i.errorMessage)?new Error(this.i18nService.t("importFormatError")):new Error(i.errorMessage)}))}getImporter(e,t=null){const n=this.getImporterInstance(e);return null==n?null:(n.organizationId=t,n)}getImporterInstance(e){if(null==e||""===e)return null;switch(e){case"bitwardencsv":return new g.BitwardenCsvImporter;case"bitwardenjson":return new y.BitwardenJsonImporter(this.cryptoService,this.i18nService);case"lastpasscsv":case"passboltcsv":return new F.LastPassCsvImporter;case"keepassxcsv":return new R.KeePassXCsvImporter;case"aviracsv":return new f.AviraCsvImporter;case"blurcsv":return new S.BlurCsvImporter;case"safeincloudxml":return new re.SafeInCloudXmlImporter;case"padlockcsv":return new W.PadlockCsvImporter;case"keepass2xml":return new B.KeePass2XmlImporter;case"chromecsv":case"operacsv":case"vivaldicsv":return new w.ChromeCsvImporter;case"firefoxcsv":return new O.FirefoxCsvImporter;case"upmcsv":return new de.UpmCsvImporter;case"saferpasscsv":return new oe.SaferPassCsvImporter;case"safaricsv":return new ie.SafariCsvImporter;case"meldiumcsv":return new _.MeldiumCsvImporter;case"1password1pif":return new K.OnePassword1PifImporter;case"1passwordwincsv":return new G.OnePasswordWinCsvImporter;case"1passwordmaccsv":return new q.OnePasswordMacCsvImporter;case"keepercsv":return new U.KeeperCsvImporter;case"keeperjson":return new V.KeeperJsonImporter;case"passworddragonxml":return new X.PasswordDragonXmlImporter;case"enpasscsv":return new k.EnpassCsvImporter;case"enpassjson":return new A.EnpassJsonImporter;case"pwsafexml":return new Z.PasswordSafeXmlImporter;case"dashlanejson":return new E.DashlaneJsonImporter;case"msecurecsv":return new j.MSecureCsvImporter;case"stickypasswordxml":return new le.StickyPasswordXmlImporter;case"truekeycsv":return new ce.TrueKeyCsvImporter;case"clipperzhtml":return new I.ClipperzHtmlImporter;case"roboformcsv":return new ne.RoboFormCsvImporter;case"ascendocsv":return new m.AscendoCsvImporter;case"passwordbossjson":return new J.PasswordBossJsonImporter;case"zohovaultcsv":return new ue.ZohoVaultCsvImporter;case"splashidcsv":return new se.SplashIdCsvImporter;case"passkeepcsv":return new H.PassKeepCsvImporter;case"gnomejson":return new M.GnomeJsonImporter;case"passwordagentcsv":return new Y.PasswordAgentCsvImporter;case"passpackcsv":return new Q.PasspackCsvImporter;case"passmanjson":return new $.PassmanJsonImporter;case"avastcsv":return new h.AvastCsvImporter;case"avastjson":return new v.AvastJsonImporter;case"fsecurefsk":return new T.FSecureFskImporter;case"kasperskytxt":return new D.KasperskyTxtImporter;case"remembearcsv":return new te.RememBearCsvImporter;case"passwordwallettxt":return new ee.PasswordWalletTxtImporter;case"mykicsv":return new z.MykiCsvImporter;case"securesafecsv":return new ae.SecureSafeCsvImporter;case"logmeoncecsv":return new N.LogMeOnceCsvImporter;case"blackberrycsv":return new x.BlackBerryCsvImporter;case"buttercupcsv":return new b.ButtercupCsvImporter;case"codebookcsv":return new C.CodebookCsvImporter;case"encryptrcsv":return new P.EncryptrCsvImporter;case"yoticsv":return new pe.YotiCsvImporter;case"nordpasscsv":return new L.NordPassCsvImporter;default:return null}}postImport(e,t=null){return i(this,void 0,void 0,(function*(){if(null==t){const t=new c.ImportCiphersRequest;for(let n=0;n<e.ciphers.length;n++){const i=yield this.cipherService.encrypt(e.ciphers[n]);t.ciphers.push(new a.CipherRequest(i))}if(null!=e.folders)for(let n=0;n<e.folders.length;n++){const i=yield this.folderService.encrypt(e.folders[n]);t.folders.push(new l.FolderRequest(i))}return null!=e.folderRelationships&&e.folderRelationships.forEach((e=>t.folderRelationships.push(new p.KvpRequest(e[0],e[1])))),yield this.apiService.postImportCiphers(t)}{const n=new d.ImportOrganizationCiphersRequest;for(let i=0;i<e.ciphers.length;i++){e.ciphers[i].organizationId=t;const r=yield this.cipherService.encrypt(e.ciphers[i]);n.ciphers.push(new a.CipherRequest(r))}if(null!=e.collections)for(let i=0;i<e.collections.length;i++){e.collections[i].organizationId=t;const r=yield this.collectionService.encrypt(e.collections[i]);n.collections.push(new s.CollectionRequest(r))}return null!=e.collectionRelationships&&e.collectionRelationships.forEach((e=>n.collectionRelationships.push(new p.KvpRequest(e[0],e[1])))),yield this.apiService.postImportOrganizationCiphers(t,n)}}))}badData(e){return(null==e.name||"--"===e.name)&&e.type===r.CipherType.Login&&null!=e.login&&o.Utils.isNullOrWhitespace(e.login.password)}handleServerError(e,t){if(null==e.validationErrors)return new Error(e.message);let n="";return Object.entries(e.validationErrors).forEach((([e,i],o)=>{let a,s;const l=Number(e.match(/[0-9]+/)[0]);switch(e.match(/^\w+/)[0]){case"Ciphers":a=t.ciphers[l],s=r.CipherType[a.type];break;case"Folders":a=t.folders[l],s="Folder";break;case"Collections":a=t.collections[l],s="Collection";break;default:return}o>0&&(n+="\n\n"),"Folder"!==s&&"Collection"!==s&&(n+="["+(l+1)+"] "),n+="["+s+'] "'+a.name+'": '+i})),new Error(n)}}},76441:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyConnectorService=void 0;const r=n(16233),o=n(70829),a=n(61833),s=n(84555);t.KeyConnectorService=class{constructor(e,t,n,i,r,o){this.stateService=e,this.cryptoService=t,this.apiService=n,this.tokenService=i,this.logService=r,this.organizationService=o}setUsesKeyConnector(e){return this.stateService.setUsesKeyConnector(e)}getUsesKeyConnector(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getUsesKeyConnector()}))}userNeedsMigration(){return i(this,void 0,void 0,(function*(){const e=yield this.tokenService.getIsExternal(),t=null!=(yield this.getManagingOrganization()),n=!(yield this.getUsesKeyConnector());return e&&t&&n}))}migrateUser(){return i(this,void 0,void 0,(function*(){const e=yield this.getManagingOrganization(),t=yield this.cryptoService.getKey(),n=new s.KeyConnectorUserKeyRequest(t.encKeyB64);try{yield this.apiService.postUserKeyToKeyConnector(e.keyConnectorUrl,n)}catch(i){throw new Error("Unable to reach key connector")}yield this.apiService.postConvertToKeyConnector()}))}getAndSetKey(e){return i(this,void 0,void 0,(function*(){try{const t=yield this.apiService.getUserKeyFromKeyConnector(e),n=o.Utils.fromB64ToArray(t.key),i=new a.SymmetricCryptoKey(n);yield this.cryptoService.setKey(i)}catch(t){throw this.logService.error(t),new Error("Unable to reach key connector")}}))}getManagingOrganization(){return i(this,void 0,void 0,(function*(){return(yield this.organizationService.getAll()).find((e=>e.keyConnectorEnabled&&e.type!==r.OrganizationUserType.Admin&&e.type!==r.OrganizationUserType.Owner&&!e.isProviderUser))}))}setConvertAccountRequired(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setConvertAccountToKeyConnector(e)}))}getConvertAccountRequired(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getConvertAccountToKeyConnector()}))}removeConvertAccountRequired(){return i(this,void 0,void 0,(function*(){yield this.stateService.setConvertAccountToKeyConnector(null)}))}clear(){return i(this,void 0,void 0,(function*(){yield this.removeConvertAccountRequired()}))}}},38578:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NotificationsService=void 0;const r=n(27749),o=n(31683),a=n(70954),s=n(58830);t.NotificationsService=class{constructor(e,t,n,i,r,o,a,s){this.syncService=e,this.appIdService=t,this.apiService=n,this.vaultTimeoutService=i,this.environmentService=r,this.logoutCallback=o,this.logService=a,this.stateService=s,this.connected=!1,this.inited=!1,this.inactive=!1,this.reconnectTimer=null,this.environmentService.urls.subscribe((()=>{this.inited&&this.init()}))}init(){return i(this,void 0,void 0,(function*(){this.inited=!1,this.url=this.environmentService.getNotificationsUrl(),"https://-"!==this.url&&(null!=this.signalrConnection&&(this.signalrConnection.off("ReceiveMessage"),this.signalrConnection.off("Heartbeat"),yield this.signalrConnection.stop(),this.connected=!1,this.signalrConnection=null),this.signalrConnection=(new r.HubConnectionBuilder).withUrl(this.url+"/hub",{accessTokenFactory:()=>this.apiService.getActiveBearerToken(),skipNegotiation:!0,transport:r.HttpTransportType.WebSockets}).withHubProtocol(new o.MessagePackHubProtocol).build(),this.signalrConnection.on("ReceiveMessage",(e=>this.processNotification(new s.NotificationResponse(e)))),this.signalrConnection.on("Heartbeat",(e=>{})),this.signalrConnection.onclose((()=>{this.connected=!1,this.reconnect(!0)})),this.inited=!0,(yield this.isAuthedAndUnlocked())&&(yield this.reconnect(!1)))}))}updateConnection(e=!1){return i(this,void 0,void 0,(function*(){if(this.inited)try{(yield this.isAuthedAndUnlocked())?yield this.reconnect(e):yield this.signalrConnection.stop()}catch(t){this.logService.error(t.toString())}}))}reconnectFromActivity(){return i(this,void 0,void 0,(function*(){this.inactive=!1,this.inited&&!this.connected&&(yield this.reconnect(!0))}))}disconnectFromInactivity(){return i(this,void 0,void 0,(function*(){this.inactive=!0,this.inited&&this.connected&&(yield this.signalrConnection.stop())}))}processNotification(e){return i(this,void 0,void 0,(function*(){const t=yield this.appIdService.getAppId();if(null==e||e.contextId===t)return;const n=yield this.stateService.getIsAuthenticated(),i=e.payload.userId||e.payload.UserId,r=yield this.stateService.getUserId();if(!n||null==i||i===r)switch(e.type){case a.NotificationType.SyncCipherCreate:case a.NotificationType.SyncCipherUpdate:yield this.syncService.syncUpsertCipher(e.payload,e.type===a.NotificationType.SyncCipherUpdate);break;case a.NotificationType.SyncCipherDelete:case a.NotificationType.SyncLoginDelete:yield this.syncService.syncDeleteCipher(e.payload);break;case a.NotificationType.SyncFolderCreate:case a.NotificationType.SyncFolderUpdate:yield this.syncService.syncUpsertFolder(e.payload,e.type===a.NotificationType.SyncFolderUpdate);break;case a.NotificationType.SyncFolderDelete:yield this.syncService.syncDeleteFolder(e.payload);break;case a.NotificationType.SyncVault:case a.NotificationType.SyncCiphers:case a.NotificationType.SyncSettings:n&&(yield this.syncService.fullSync(!1));break;case a.NotificationType.SyncOrgKeys:n&&(yield this.syncService.fullSync(!0),yield this.signalrConnection.stop());break;case a.NotificationType.LogOut:n&&this.logoutCallback();break;case a.NotificationType.SyncSendCreate:case a.NotificationType.SyncSendUpdate:yield this.syncService.syncUpsertSend(e.payload,e.type===a.NotificationType.SyncSendUpdate);break;case a.NotificationType.SyncSendDelete:yield this.syncService.syncDeleteSend(e.payload)}}))}reconnect(e){return i(this,void 0,void 0,(function*(){if(null!=this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.connected||!this.inited||this.inactive)return;if(yield this.isAuthedAndUnlocked()){try{yield this.signalrConnection.start(),this.connected=!0,e&&(yield this.syncService.fullSync(!1))}catch(t){this.logService.error(t)}this.connected||(this.reconnectTimer=setTimeout((()=>this.reconnect(e)),this.random(12e4,3e5)))}}))}isAuthedAndUnlocked(){return i(this,void 0,void 0,(function*(){if(yield this.stateService.getIsAuthenticated()){return!(yield this.vaultTimeoutService.isLocked())}return!1}))}random(e,t){return e=Math.ceil(e),t=Math.floor(t),Math.floor(Math.random()*(t-e+1))+e}}},40750:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationService=void 0;const r=n(30608);t.OrganizationService=class{constructor(e){this.stateService=e}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getOrganizations();return null!=t&&t.hasOwnProperty(e)?new r.Organization(t[e]):null}))}getByIdentifier(e){return i(this,void 0,void 0,(function*(){const t=yield this.getAll();return null==t||0===t.length?null:t.find((t=>t.identifier===e))}))}getAll(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getOrganizations({userId:e}),n=[];for(const e in t)t.hasOwnProperty(e)&&!t[e].isProviderUser&&n.push(new r.Organization(t[e]));return n}))}save(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setOrganizations(e)}))}canManageSponsorships(){return i(this,void 0,void 0,(function*(){return(yield this.getAll()).some((e=>e.familySponsorshipAvailable||null!==e.familySponsorshipFriendlyName))}))}}},68683:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;const r=n(21322),o=n(66607),a=n(1104),s=n(65507),l=n(64466),c=n(40251),d={length:14,ambiguous:!1,number:!0,minNumber:1,uppercase:!0,minUppercase:0,lowercase:!0,minLowercase:0,special:!1,minSpecial:1,type:"password",numWords:3,wordSeparator:"-",capitalize:!1,includeNumber:!1};t.PasswordGenerationService=class{constructor(e,t,n){this.cryptoService=e,this.policyService=t,this.stateService=n}generatePassword(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},d,e);if("passphrase"===t.type)return this.generatePassphrase(e);this.sanitizePasswordLength(t,!0);const n=t.minUppercase+t.minLowercase+t.minNumber+t.minSpecial;t.length<n&&(t.length=n);const i=[];if(t.lowercase&&t.minLowercase>0)for(let e=0;e<t.minLowercase;e++)i.push("l");if(t.uppercase&&t.minUppercase>0)for(let e=0;e<t.minUppercase;e++)i.push("u");if(t.number&&t.minNumber>0)for(let e=0;e<t.minNumber;e++)i.push("n");if(t.special&&t.minSpecial>0)for(let e=0;e<t.minSpecial;e++)i.push("s");for(;i.length<t.length;)i.push("a");yield this.shuffleArray(i);let r="",o="abcdefghijkmnopqrstuvwxyz";t.ambiguous&&(o+="l"),t.lowercase&&(r+=o);let a="ABCDEFGHJKLMNPQRSTUVWXYZ";t.ambiguous&&(a+="IO"),t.uppercase&&(r+=a);let s="23456789";t.ambiguous&&(s+="01"),t.number&&(r+=s);const l="!@#$%^&*";t.special&&(r+=l);let c="";for(let e=0;e<t.length;e++){let t;switch(i[e]){case"l":t=o;break;case"u":t=a;break;case"n":t=s;break;case"s":t=l;break;case"a":t=r}const n=yield this.cryptoService.randomNumber(0,t.length-1);c+=t.charAt(n)}return c}))}generatePassphrase(e){return i(this,void 0,void 0,(function*(){const t=Object.assign({},d,e);(null==t.numWords||t.numWords<=2)&&(t.numWords=d.numWords),(null==t.wordSeparator||0===t.wordSeparator.length||t.wordSeparator.length>1)&&(t.wordSeparator=" "),null==t.capitalize&&(t.capitalize=!1),null==t.includeNumber&&(t.includeNumber=!1);const n=l.EEFLongWordList.length-1,i=new Array(t.numWords);for(let e=0;e<t.numWords;e++){const r=yield this.cryptoService.randomNumber(0,n);t.capitalize?i[e]=this.capitalize(l.EEFLongWordList[r]):i[e]=l.EEFLongWordList[r]}return t.includeNumber&&(yield this.appendRandomNumberToRandomWord(i)),i.join(t.wordSeparator)}))}getOptions(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getPasswordGenerationOptions();e=null==e?d:Object.assign({},d,e),yield this.stateService.setPasswordGenerationOptions(e);const t=yield this.enforcePasswordGeneratorPoliciesOnOptions(e);return e=t[0],[e,t[1]]}))}enforcePasswordGeneratorPoliciesOnOptions(e){return i(this,void 0,void 0,(function*(){let t=yield this.getPasswordGeneratorPolicyOptions();return null!=t?(e.length<t.minLength&&(e.length=t.minLength),t.useUppercase&&(e.uppercase=!0),t.useLowercase&&(e.lowercase=!0),t.useNumbers&&(e.number=!0),e.minNumber<t.numberCount&&(e.minNumber=t.numberCount),t.useSpecial&&(e.special=!0),e.minSpecial<t.specialCount&&(e.minSpecial=t.specialCount),e.minSpecial+e.minNumber>e.length&&(e.minSpecial=e.length-e.minNumber),e.numWords<t.minNumberWords&&(e.numWords=t.minNumberWords),t.capitalize&&(e.capitalize=!0),t.includeNumber&&(e.includeNumber=!0),"password"!==t.defaultType&&"passphrase"!==t.defaultType||(e.type=t.defaultType)):t=new s.PasswordGeneratorPolicyOptions,[e,t]}))}getPasswordGeneratorPolicyOptions(){return i(this,void 0,void 0,(function*(){const e=null==this.policyService?null:yield this.policyService.getAll(c.PolicyType.PasswordGenerator);let t=null;return null==e||0===e.length||e.forEach((e=>{e.enabled&&null!=e.data&&(null==t&&(t=new s.PasswordGeneratorPolicyOptions),null!=e.data.defaultType&&"password"!==t.defaultType&&(t.defaultType=e.data.defaultType),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.useUpper&&(t.useUppercase=!0),e.data.useLower&&(t.useLowercase=!0),e.data.useNumbers&&(t.useNumbers=!0),null!=e.data.minNumbers&&e.data.minNumbers>t.numberCount&&(t.numberCount=e.data.minNumbers),e.data.useSpecial&&(t.useSpecial=!0),null!=e.data.minSpecial&&e.data.minSpecial>t.specialCount&&(t.specialCount=e.data.minSpecial),null!=e.data.minNumberWords&&e.data.minNumberWords>t.minNumberWords&&(t.minNumberWords=e.data.minNumberWords),e.data.capitalize&&(t.capitalize=!0),e.data.includeNumber&&(t.includeNumber=!0))})),t}))}saveOptions(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setPasswordGenerationOptions(e)}))}getHistory(){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasKey()))return new Array;if(null==(yield this.stateService.getDecryptedPasswordGenerationHistory())){const e=yield this.stateService.getEncryptedPasswordGenerationHistory(),t=yield this.decryptHistory(e);yield this.stateService.setDecryptedPasswordGenerationHistory(t)}const e=yield this.stateService.getDecryptedPasswordGenerationHistory();return null!=e?e:new Array}))}addHistory(e){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasKey()))return;const t=yield this.getHistory();if(this.matchesPrevious(e,t))return;t.unshift(new a.GeneratedPasswordHistory(e,Date.now())),t.length>100&&t.pop();const n=yield this.encryptHistory(t);return yield this.stateService.setEncryptedPasswordGenerationHistory(n)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEncryptedPasswordGenerationHistory(null,{userId:e}),yield this.stateService.setDecryptedPasswordGenerationHistory(null,{userId:e})}))}passwordStrength(e,t=null){if(null==e||0===e.length)return null;let n=["bitwarden","bit","warden"];null!=t&&t.length>0&&(n=n.concat(t));const i=Array.from(new Set(n));return r(e,i)}normalizeOptions(e,t){e.minLowercase=0,e.minUppercase=0,!e.length||e.length<5?e.length=5:e.length>128&&(e.length=128),e.length<t.minLength&&(e.length=t.minLength),e.minNumber?e.minNumber>e.length?e.minNumber=e.length:e.minNumber>9&&(e.minNumber=9):e.minNumber=0,e.minNumber<t.numberCount&&(e.minNumber=t.numberCount),e.minSpecial?e.minSpecial>e.length?e.minSpecial=e.length:e.minSpecial>9&&(e.minSpecial=9):e.minSpecial=0,e.minSpecial<t.specialCount&&(e.minSpecial=t.specialCount),e.minSpecial+e.minNumber>e.length&&(e.minSpecial=e.length-e.minNumber),null==e.numWords||e.length<3?e.numWords=3:e.numWords>20&&(e.numWords=20),e.numWords<t.minNumberWords&&(e.numWords=t.minNumberWords),null!=e.wordSeparator&&e.wordSeparator.length>1&&(e.wordSeparator=e.wordSeparator[0]),this.sanitizePasswordLength(e,!1)}capitalize(e){return e.charAt(0).toUpperCase()+e.slice(1)}appendRandomNumberToRandomWord(e){return i(this,void 0,void 0,(function*(){if(null==e||e.length<=0)return;const t=yield this.cryptoService.randomNumber(0,e.length-1),n=yield this.cryptoService.randomNumber(0,9);e[t]=e[t]+n}))}encryptHistory(e){return i(this,void 0,void 0,(function*(){if(null==e||0===e.length)return Promise.resolve([]);const t=e.map((e=>i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.encrypt(e.password);return new a.GeneratedPasswordHistory(t.encryptedString,e.date)}))));return yield Promise.all(t)}))}decryptHistory(e){return i(this,void 0,void 0,(function*(){if(null==e||0===e.length)return Promise.resolve([]);const t=e.map((e=>i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.decryptToUtf8(new o.EncString(e.password));return new a.GeneratedPasswordHistory(t,e.date)}))));return yield Promise.all(t)}))}matchesPrevious(e,t){return null!=t&&0!==t.length&&t[t.length-1].password===e}shuffleArray(e){return i(this,void 0,void 0,(function*(){for(let t=e.length-1;t>0;t--){const n=yield this.cryptoService.randomNumber(0,t);[e[t],e[n]]=[e[n],e[t]]}}))}sanitizePasswordLength(e,t){let n=0,i=0,r=e.minNumber,o=e.minSpecial;e.uppercase&&e.minUppercase<=0?n=1:e.uppercase||(n=0),e.lowercase&&e.minLowercase<=0?i=1:e.lowercase||(i=0),e.number&&e.minNumber<=0?r=1:e.number||(r=0),e.special&&e.minSpecial<=0?o=1:e.special||(o=0),(!e.length||e.length<1)&&(e.length=10);const a=n+i+r+o;e.length<a&&(e.length=a),t&&(e.minUppercase=n,e.minLowercase=i,e.minNumber=r,e.minSpecial=o)}}},81533:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyService=void 0;const r=n(79384),o=n(91577),a=n(5784),s=n(56014),l=n(68320),c=n(16233),d=n(40251);t.PolicyService=class{constructor(e,t,n){this.stateService=e,this.organizationService=t,this.apiService=n}clearCache(){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedPolicies(null)}))}getAll(e,t){return i(this,void 0,void 0,(function*(){let n=[];const i=yield this.stateService.getDecryptedPolicies({userId:t});if(null!=i)n=i;else{const e=yield this.stateService.getEncryptedPolicies({userId:t});for(const t in e)e.hasOwnProperty(t)&&n.push(new a.Policy(e[t]));yield this.stateService.setDecryptedPolicies(n,{userId:t})}return null!=e?n.filter((t=>t.type===e)):n}))}getPolicyForOrganization(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.organizationService.get(t);if(null==n?void 0:n.isProviderUser){const e=(yield this.apiService.getPolicies(t)).data.find((e=>e.organizationId===t));return null==e?null:new a.Policy(new r.PolicyData(e))}return(yield this.getAll(e)).find((e=>e.organizationId===t))}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedPolicies(null),yield this.stateService.setEncryptedPolicies(e)}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedPolicies(null,{userId:e}),yield this.stateService.setEncryptedPolicies(null,{userId:e})}))}getMasterPasswordPoliciesForInvitedUsers(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getUserId(),n=yield this.apiService.getPoliciesByInvitedUser(e,t),i=yield this.mapPoliciesFromToken(n);return this.getMasterPasswordPolicyOptions(i)}))}getMasterPasswordPolicyOptions(e){return i(this,void 0,void 0,(function*(){let t=null;return null==(e=null==e?yield this.getAll(d.PolicyType.MasterPassword):e.filter((e=>e.type===d.PolicyType.MasterPassword)))||0===e.length||e.forEach((e=>{e.enabled&&null!=e.data&&(null==t&&(t=new o.MasterPasswordPolicyOptions),null!=e.data.minComplexity&&e.data.minComplexity>t.minComplexity&&(t.minComplexity=e.data.minComplexity),null!=e.data.minLength&&e.data.minLength>t.minLength&&(t.minLength=e.data.minLength),e.data.requireUpper&&(t.requireUpper=!0),e.data.requireLower&&(t.requireLower=!0),e.data.requireNumbers&&(t.requireNumbers=!0),e.data.requireSpecial&&(t.requireSpecial=!0))})),t}))}evaluateMasterPassword(e,t,n){return null==n||!(n.minComplexity>0&&n.minComplexity>e)&&(!(n.minLength>0&&n.minLength>t.length)&&((!n.requireUpper||t.toLocaleLowerCase()!==t)&&((!n.requireLower||t.toLocaleUpperCase()!==t)&&(!(n.requireNumbers&&!/[0-9]/.test(t))&&!(n.requireSpecial&&!/[!@#$%\^&*]/g.test(t))))))}getResetPasswordPolicyOptions(e,t){var n,i,r;const o=new s.ResetPasswordPolicyOptions;if(null==e||null==t)return[o,!1];const a=e.find((e=>e.organizationId===t&&e.type===d.PolicyType.ResetPassword&&e.enabled));return o.autoEnrollEnabled=null!==(i=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.autoEnrollEnabled)&&void 0!==i&&i,[o,null!==(r=null==a?void 0:a.enabled)&&void 0!==r&&r]}mapPoliciesFromToken(e){if(null==e||null==e.data)return null;return e.data.map((e=>new r.PolicyData(e))).map((e=>new a.Policy(e)))}policyAppliesToUser(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.getAll(e,n),r=yield this.organizationService.getAll(n);let o;o=null!=t?i.filter((e=>e.enabled&&t(e))):i.filter((e=>e.enabled));const a=new Set(o.map((e=>e.organizationId)));return r.some((t=>t.enabled&&t.status>=l.OrganizationUserStatusType.Accepted&&t.usePolicies&&!this.isExcemptFromPolicies(t,e)&&a.has(t.id)))}))}isExcemptFromPolicies(e,t){return t===d.PolicyType.MaximumVaultTimeout?e.type===c.OrganizationUserType.Owner:e.isExemptFromPolicies}}},48177:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderService=void 0;const r=n(23723);t.ProviderService=class{constructor(e){this.stateService=e}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getProviders();return null!=t&&t.hasOwnProperty(e)?new r.Provider(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getProviders(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new r.Provider(e[n]));return t}))}save(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setProviders(e)}))}}},9964:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SearchService=void 0;const r=n(31336),o=n(23635),a=n(18276),s=n(60689);t.SearchService=class{constructor(e,t,n){this.cipherService=e,this.logService=t,this.i18nService=n,this.indexedEntityId=null,this.indexing=!1,this.index=null,this.searchableMinLength=2,-1!==["zh-CN","zh-TW"].indexOf(n.locale)&&(this.searchableMinLength=1)}clearIndex(){this.indexedEntityId=null,this.index=null}isSearchable(e){return!(null==e||null==this.index&&e.length<this.searchableMinLength||null!=this.index&&e.length<this.searchableMinLength&&0!==e.indexOf(">"))}indexCiphers(e,t){return i(this,void 0,void 0,(function*(){if(this.indexing)return;this.logService.time("search indexing"),this.indexing=!0,this.indexedEntityId=e,this.index=null;const n=new r.Builder;n.ref("id"),n.field("shortid",{boost:100,extractor:e=>e.id.substr(0,8)}),n.field("name",{boost:10}),n.field("subtitle",{boost:5,extractor:e=>null!=e.subTitle&&e.type===o.CipherType.Card?e.subTitle.replace(/\*/g,""):e.subTitle}),n.field("notes"),n.field("login.username",{extractor:e=>e.type===o.CipherType.Login&&null!=e.login?e.login.username:null}),n.field("login.uris",{boost:2,extractor:e=>this.uriExtractor(e)}),n.field("fields",{extractor:e=>this.fieldExtractor(e,!1)}),n.field("fields_joined",{extractor:e=>this.fieldExtractor(e,!0)}),n.field("attachments",{extractor:e=>this.attachmentExtractor(e,!1)}),n.field("attachments_joined",{extractor:e=>this.attachmentExtractor(e,!0)}),n.field("organizationid",{extractor:e=>e.organizationId}),(t=t||(yield this.cipherService.getAllDecrypted())).forEach((e=>n.add(e))),this.index=n.build(),this.indexing=!1,this.logService.timeEnd("search indexing")}))}searchCiphers(e,t=null,n=null){return i(this,void 0,void 0,(function*(){const i=[];if(null!=e&&(e=e.trim().toLowerCase()),""===e&&(e=null),null==n&&(n=yield this.cipherService.getAllDecrypted()),null!=t&&Array.isArray(t)&&t.length>0?n=n.filter((e=>t.every((t=>null==t||t(e))))):null!=t&&(n=n.filter(t)),!this.isSearchable(e))return n;this.indexing&&(yield new Promise((e=>setTimeout(e,250))),this.indexing&&(yield new Promise((e=>setTimeout(e,500)))));const o=this.getIndexForSearch();if(null==o)return this.searchCiphersBasic(n,e);const a=new Map;n.forEach((e=>a.set(e.id,e)));let s=null;if(null!=e&&e.length>1&&0===e.indexOf(">"))try{s=o.search(e.substr(1).trim())}catch(l){this.logService.error(l)}else{const t=r.Query.wildcard.LEADING|r.Query.wildcard.TRAILING;s=o.query((n=>{r.tokenizer(e).forEach((e=>{const i=e.toString();n.term(i,{fields:["name"],wildcard:t}),n.term(i,{fields:["subtitle"],wildcard:t}),n.term(i,{fields:["login.uris"],wildcard:t}),n.term(i,{})}))}))}return null!=s&&s.forEach((e=>{a.has(e.ref)&&i.push(a.get(e.ref))})),i}))}searchCiphersBasic(e,t,n=!1){return t=t.trim().toLowerCase(),e.filter((e=>n===e.isDeleted&&(null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&e.id.startsWith(t))||(null!=e.subTitle&&e.subTitle.toLowerCase().indexOf(t)>-1||!!(e.login&&null!=e.login.uri&&e.login.uri.toLowerCase().indexOf(t)>-1))))))}searchSends(e,t){return t=t.trim().toLocaleLowerCase(),e.filter((e=>{var n,i,r;return null!=e.name&&e.name.toLowerCase().indexOf(t)>-1||(!!(t.length>=8&&(e.id.startsWith(t)||e.accessId.toLocaleLowerCase().startsWith(t)||null!=(null===(n=e.file)||void 0===n?void 0:n.id)&&e.file.id.startsWith(t)))||(null!=e.notes&&e.notes.toLowerCase().indexOf(t)>-1||(null!=(null===(i=e.text)||void 0===i?void 0:i.text)&&e.text.text.toLowerCase().indexOf(t)>-1||(null!=(null===(r=e.file)||void 0===r?void 0:r.fileName)&&e.file.fileName.toLowerCase().indexOf(t)>-1||void 0))))}))}getIndexForSearch(){return this.index}fieldExtractor(e,t){if(!e.hasFields)return null;let n=[];return e.fields.forEach((e=>{null!=e.name&&n.push(e.name),e.type===a.FieldType.Text&&null!=e.value&&n.push(e.value)})),n=n.filter((e=>""!==e.trim())),0===n.length?null:t?n.join(" "):n}attachmentExtractor(e,t){if(!e.hasAttachments)return null;let n=[];return e.attachments.forEach((e=>{null!=e&&null!=e.fileName&&(t&&e.fileName.indexOf(".")>-1?n.push(e.fileName.substr(0,e.fileName.lastIndexOf("."))):n.push(e.fileName))})),n=n.filter((e=>""!==e.trim())),0===n.length?null:t?n.join(" "):n}uriExtractor(e){if(e.type!==o.CipherType.Login||null==e.login||!e.login.hasUris)return null;const t=[];return e.login.uris.forEach((e=>{if(null==e.uri||""===e.uri)return;if(null!=e.hostname)return void t.push(e.hostname);let n=e.uri;if(e.match!==s.UriMatchType.RegularExpression){const e=n.indexOf("://");e>-1&&(n=n.substr(e+3));const t=n.search(/\?|&|#/);t>-1&&(n=n.substring(0,t))}t.push(n)})),t.length>0?t:null}}},66708:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;const r=n(75059),o=n(74348),a=n(25237),s=n(97038),l=n(37500),c=n(59574),d=n(49538),p=n(70829);t.SendService=class{constructor(e,t,n,i,r,o){this.cryptoService=e,this.apiService=t,this.fileUploadService=n,this.i18nService=i,this.cryptoFunctionService=r,this.stateService=o}clearCache(){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null)}))}encrypt(e,t,n,r){return i(this,void 0,void 0,(function*(){let i=null;const o=new s.Send;if(o.id=e.id,o.type=e.type,o.disabled=e.disabled,o.hideEmail=e.hideEmail,o.maxAccessCount=e.maxAccessCount,null==e.key&&(e.key=yield this.cryptoFunctionService.randomBytes(16),e.cryptoKey=yield this.cryptoService.makeSendKey(e.key)),null!=n){const t=yield this.cryptoFunctionService.pbkdf2(n,e.key,"sha256",1e5);o.password=p.Utils.fromBufferToB64(t)}if(o.key=yield this.cryptoService.encrypt(e.key,r),o.name=yield this.cryptoService.encrypt(e.name,e.cryptoKey),o.notes=yield this.cryptoService.encrypt(e.notes,e.cryptoKey),o.type===d.SendType.Text)o.text=new c.SendText,o.text.text=yield this.cryptoService.encrypt(e.text.text,e.cryptoKey),o.text.hidden=e.text.hidden;else if(o.type===d.SendType.File&&(o.file=new l.SendFile,null!=t))if(t instanceof ArrayBuffer){const[n,r]=yield this.encryptFileData(e.file.fileName,t,e.cryptoKey);o.file.fileName=n,i=r}else i=yield this.parseFile(o,t,e.cryptoKey);return[o,i]}))}get(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedSends();return null!=t&&t.hasOwnProperty(e)?new s.Send(t[e]):null}))}getAll(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getEncryptedSends(),t=[];for(const n in e)e.hasOwnProperty(n)&&t.push(new s.Send(e[n]));return t}))}getAllDecrypted(){return i(this,void 0,void 0,(function*(){let e=yield this.stateService.getDecryptedSends();if(null!=e)return e;e=[];if(!(yield this.cryptoService.hasKey()))throw new Error("No key.");const t=[];return(yield this.getAll()).forEach((n=>{t.push(n.decrypt().then((t=>e.push(t))))})),yield Promise.all(t),e.sort(p.Utils.getSortFunction(this.i18nService,"name")),yield this.stateService.setDecryptedSends(e),e}))}saveWithServer(e){var t;return i(this,void 0,void 0,(function*(){const n=new o.SendRequest(e[0],null===(t=e[1])||void 0===t?void 0:t.buffer.byteLength);let i;if(null==e[0].id){if(e[0].type===d.SendType.Text)i=yield this.apiService.postSend(n);else try{const t=yield this.apiService.postFileTypeSend(n);i=t.sendResponse,yield this.fileUploadService.uploadSendFile(t,e[0].file.fileName,e[1])}catch(c){if(!(c instanceof a.ErrorResponse&&404===c.statusCode))throw c instanceof a.ErrorResponse?new Error(c.getSingleMessage()):c;i=yield this.legacyServerSendFileUpload(e,n)}e[0].id=i.id,e[0].accessId=i.accessId}else i=yield this.apiService.putSend(e[0].id,n);const s=yield this.stateService.getUserId(),l=new r.SendData(i,s);yield this.upsert(l)}))}legacyServerSendFileUpload(e,t){return i(this,void 0,void 0,(function*(){const n=new FormData;try{const i=new Blob([e[1].buffer],{type:"application/octet-stream"});n.append("model",JSON.stringify(t)),n.append("data",i,e[0].file.fileName.encryptedString)}catch(i){if(!p.Utils.isNode||p.Utils.isBrowser)throw i;n.append("model",JSON.stringify(t)),n.append("data",Buffer.from(e[1].buffer),{filepath:e[0].file.fileName.encryptedString,contentType:"application/octet-stream"})}return yield this.apiService.postSendFileLegacy(n)}))}upsert(e){return i(this,void 0,void 0,(function*(){let t=yield this.stateService.getEncryptedSends();if(null==t&&(t={}),e instanceof r.SendData){const n=e;t[n.id]=n}else e.forEach((e=>{t[e.id]=e}));yield this.replace(t)}))}replace(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null),yield this.stateService.setEncryptedSends(e)}))}clear(){return i(this,void 0,void 0,(function*(){yield this.stateService.setDecryptedSends(null),yield this.stateService.setEncryptedSends(null)}))}delete(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getEncryptedSends();if(null!=t){if("string"==typeof e){if(null==t[e])return;delete t[e]}else e.forEach((e=>{delete t[e]}));yield this.replace(t)}}))}deleteWithServer(e){return i(this,void 0,void 0,(function*(){yield this.apiService.deleteSend(e),yield this.delete(e)}))}removePasswordWithServer(e){return i(this,void 0,void 0,(function*(){const t=yield this.apiService.putSendRemovePassword(e),n=yield this.stateService.getUserId(),i=new r.SendData(t,n);yield this.upsert(i)}))}parseFile(e,t,n){return new Promise(((r,o)=>{const a=new FileReader;a.readAsArrayBuffer(t),a.onload=a=>i(this,void 0,void 0,(function*(){try{const[i,o]=yield this.encryptFileData(t.name,a.target.result,n);e.file.fileName=i,r(o)}catch(i){o(i)}})),a.onerror=()=>{o("Error reading file.")}}))}encryptFileData(e,t,n){return i(this,void 0,void 0,(function*(){return[yield this.cryptoService.encrypt(e,n),yield this.cryptoService.encryptToBytes(t,n)]}))}}},1824:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsService=void 0;const i="equivalentDomains";t.SettingsService=class{constructor(e){this.stateService=e}clearCache(){return n(this,void 0,void 0,(function*(){yield this.stateService.setSettings(null)}))}getEquivalentDomains(){return this.getSettingsKey(i)}setEquivalentDomains(e){return n(this,void 0,void 0,(function*(){yield this.setSettingsKey(i,e)}))}clear(e){return n(this,void 0,void 0,(function*(){yield this.stateService.setSettings(null,{userId:e})}))}getSettings(){return n(this,void 0,void 0,(function*(){const e=yield this.stateService.getSettings();if(null==e){yield this.stateService.getUserId()}return e}))}getSettingsKey(e){return n(this,void 0,void 0,(function*(){const t=yield this.getSettings();return null!=t&&t[e]?t[e]:null}))}setSettingsKey(e,t){return n(this,void 0,void 0,(function*(){let n=yield this.getSettings();n||(n={}),n[e]=t,yield this.stateService.setSettings(n)}))}}},12354:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const r=n(84582),o=n(1139),a=n(58578),s=n(72190),l=n(59666),c=n(53797),d=n(56393),p="global",u="authenticatedAccounts",m="activeUserId",h="tempAccountSettings",v="accountActivity",f="_masterkey_auto",g="_masterkey_biometric",y="_masterkey";t.StateService=class{constructor(e,t,n,i,r){this.storageService=e,this.secureStorageService=t,this.logService=n,this.stateMigrationService=i,this.stateFactory=r,this.accounts=new l.BehaviorSubject({}),this.activeAccount=new l.BehaviorSubject(null),this.state=new s.State(this.createGlobals()),this.hasBeenInited=!1}init(){return i(this,void 0,void 0,(function*(){this.hasBeenInited||((yield this.stateMigrationService.needsMigration())&&(yield this.stateMigrationService.migrate()),yield this.initAccountState(),this.hasBeenInited=!0)}))}initAccountState(){var e;return i(this,void 0,void 0,(function*(){this.state.authenticatedAccounts=null!==(e=yield this.storageService.get(u))&&void 0!==e?e:[];for(const e in this.state.authenticatedAccounts)null!=e&&(yield this.syncAccountFromDisk(this.state.authenticatedAccounts[e]));const t=yield this.storageService.get(m);null!=t&&(this.state.activeUserId=t),yield this.pushAccounts(),this.activeAccount.next(this.state.activeUserId)}))}syncAccountFromDisk(e){return i(this,void 0,void 0,(function*(){if(null==e)return;this.state.accounts[e]=this.createAccount();const t=yield this.getAccountFromDisk({userId:e});this.state.accounts[e].profile=t.profile}))}addAccount(e){return i(this,void 0,void 0,(function*(){e=yield this.setAccountEnvironmentUrls(e),this.state.authenticatedAccounts.push(e.profile.userId),yield this.storageService.save(u,this.state.authenticatedAccounts),this.state.accounts[e.profile.userId]=e,yield this.scaffoldNewAccountStorage(e),yield this.setLastActive((new Date).getTime(),{userId:e.profile.userId}),yield this.setActiveUser(e.profile.userId),this.activeAccount.next(e.profile.userId)}))}setActiveUser(e){return i(this,void 0,void 0,(function*(){this.clearDecryptedDataForActiveUser(),this.state.activeUserId=e,yield this.storageService.save(m,e),this.activeAccount.next(this.state.activeUserId),yield this.pushAccounts()}))}clean(e){return i(this,void 0,void 0,(function*(){e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield this.deAuthenticateAccount(e.userId),e.userId===this.state.activeUserId&&(yield this.dynamicallySetActiveUser()),yield this.removeAccountFromDisk(null==e?void 0:e.userId),this.removeAccountFromMemory(null==e?void 0:e.userId),yield this.pushAccounts()}))}getAccessToken(e){var t,n;return i(this,void 0,void 0,(function*(){const i="logOut"===(yield this.getVaultTimeoutAction({userId:null==e?void 0:e.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();return e=this.reconcileOptions(e,i),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.accessToken}))}setAccessToken(e,t){return i(this,void 0,void 0,(function*(){const n="logOut"===(yield this.getVaultTimeoutAction({userId:null==t?void 0:t.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();t=this.reconcileOptions(t,n);const i=yield this.getAccount(t);i.tokens.accessToken=e,yield this.saveAccount(i,t)}))}getAddEditCipherInfo(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.addEditCipherInfo}))}setAddEditCipherInfo(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.addEditCipherInfo=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getAlwaysShowDock(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.alwaysShowDock)&&void 0!==n&&n}))}setAlwaysShowDock(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.alwaysShowDock=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getApiKeyClientId(e){var t,n;return i(this,void 0,void 0,(function*(){const i="logOut"===(yield this.getVaultTimeoutAction({userId:null==e?void 0:e.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();return e=this.reconcileOptions(e,i),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.apiKeyClientId}))}setApiKeyClientId(e,t){return i(this,void 0,void 0,(function*(){const n="logOut"===(yield this.getVaultTimeoutAction({userId:null==t?void 0:t.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();t=this.reconcileOptions(t,n);const i=yield this.getAccount(t);i.profile.apiKeyClientId=e,yield this.saveAccount(i,t)}))}getApiKeyClientSecret(e){var t,n;return i(this,void 0,void 0,(function*(){const i="logOut"===(yield this.getVaultTimeoutAction({userId:null==e?void 0:e.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();return e=this.reconcileOptions(e,i),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.apiKeyClientSecret}))}setApiKeyClientSecret(e,t){return i(this,void 0,void 0,(function*(){const n="logOut"===(yield this.getVaultTimeoutAction({userId:null==t?void 0:t.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();t=this.reconcileOptions(t,n);const i=yield this.getAccount(t);i.keys.apiKeyClientSecret=e,yield this.saveAccount(i,t)}))}getAutoConfirmFingerPrints(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autoConfirmFingerPrints)||void 0===r||r}))}setAutoConfirmFingerprints(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.autoConfirmFingerPrints=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getAutoFillOnPageLoadDefault(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.autoFillOnPageLoadDefault)&&void 0!==r&&r}))}setAutoFillOnPageLoadDefault(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.autoFillOnPageLoadDefault=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricAwaitingAcceptance(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricAwaitingAcceptance)&&void 0!==n&&n}))}setBiometricAwaitingAcceptance(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricAwaitingAcceptance=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricFingerprintValidated(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricFingerprintValidated)&&void 0!==n&&n}))}setBiometricFingerprintValidated(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricFingerprintValidated=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricLocked(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.biometricLocked)&&void 0!==r&&r}))}setBiometricLocked(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.settings.biometricLocked=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getBiometricText(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.biometricText}))}setBiometricText(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.biometricText=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getBiometricUnlock(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.biometricUnlock)&&void 0!==r&&r}))}setBiometricUnlock(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.biometricUnlock=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getCanAccessPremium(e){return i(this,void 0,void 0,(function*(){if(!(yield this.getIsAuthenticated(e)))return!1;if((yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions()))).profile.hasPremiumPersonally)return!0;const t=yield this.getOrganizations(e);if(null==t)return!1;for(const e of Object.keys(t)){const n=t[e];if(n.enabled&&n.usersGetPremium&&!n.isProviderUser)return!0}return!1}))}getClearClipboard(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.clearClipboard)&&void 0!==r?r:null}))}setClearClipboard(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.clearClipboard=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getCollapsedGroupings(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.collapsedGroupings}))}setCollapsedGroupings(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.collapsedGroupings=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getConvertAccountToKeyConnector(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.convertAccountToKeyConnector}))}setConvertAccountToKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.convertAccountToKeyConnector=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getCryptoMasterKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.cryptoMasterKey}))}setCryptoMasterKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.cryptoMasterKey=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getCryptoMasterKeyAuto(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"auto"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${e.userId}${f}`,e)}))}setCryptoMasterKeyAuto(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(this.reconcileOptions(t,{keySuffix:"auto"}),yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.secureStorageService.save(`${t.userId}${f}`,e,t))}))}getCryptoMasterKeyB64(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(e,yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${null==e?void 0:e.userId}${y}`,e)}))}setCryptoMasterKeyB64(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(t,yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.secureStorageService.save(`${t.userId}${y}`,e,t))}))}getCryptoMasterKeyBiometric(e){return i(this,void 0,void 0,(function*(){return null==(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)?null:yield this.secureStorageService.get(`${e.userId}${g}`,e)}))}hasCryptoMasterKeyBiometric(e){return i(this,void 0,void 0,(function*(){return null!=(null==(e=this.reconcileOptions(this.reconcileOptions(e,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:e.userId)&&(yield this.secureStorageService.has(`${e.userId}${g}`,e))}))}setCryptoMasterKeyBiometric(e,t){return i(this,void 0,void 0,(function*(){null!=(null==(t=this.reconcileOptions(this.reconcileOptions(t,{keySuffix:"biometric"}),yield this.defaultSecureStorageOptions()))?void 0:t.userId)&&(yield this.secureStorageService.save(`${t.userId}${g}`,e,t))}))}getDecodedToken(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.decodedToken}))}setDecodedToken(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.tokens.decodedToken=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCiphers(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.ciphers)||void 0===r?void 0:r.decrypted}))}setDecryptedCiphers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.ciphers.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCollections(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.collections)||void 0===r?void 0:r.decrypted}))}setDecryptedCollections(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.collections.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedCryptoSymmetricKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.cryptoSymmetricKey)||void 0===r?void 0:r.decrypted}))}setDecryptedCryptoSymmetricKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.cryptoSymmetricKey.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedFolders(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.folders)||void 0===r?void 0:r.decrypted}))}setDecryptedFolders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.folders.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedOrganizationKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.organizationKeys)||void 0===r?void 0:r.decrypted}))}setDecryptedOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.organizationKeys.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPasswordGenerationHistory(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.passwordGenerationHistory)||void 0===r?void 0:r.decrypted}))}setDecryptedPasswordGenerationHistory(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.passwordGenerationHistory.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPinProtected(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.pinProtected)||void 0===r?void 0:r.decrypted}))}setDecryptedPinProtected(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.settings.pinProtected.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPolicies(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.policies)||void 0===r?void 0:r.decrypted}))}setDecryptedPolicies(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.policies.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedPrivateKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.privateKey)||void 0===r?void 0:r.decrypted}))}setDecryptedPrivateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.privateKey.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedProviderKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.providerKeys)||void 0===r?void 0:r.decrypted}))}setDecryptedProviderKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.providerKeys.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDecryptedSends(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.sends)||void 0===r?void 0:r.decrypted}))}setDecryptedSends(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.sends.decrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getDefaultUriMatch(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.defaultUriMatch}))}setDefaultUriMatch(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.defaultUriMatch=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAddLoginNotification(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAddLoginNotification)&&void 0!==r&&r}))}setDisableAddLoginNotification(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAddLoginNotification=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAutoBiometricsPrompt(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAutoBiometricsPrompt)&&void 0!==r&&r}))}setDisableAutoBiometricsPrompt(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAutoBiometricsPrompt=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableAutoTotpCopy(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableAutoTotpCopy)&&void 0!==r&&r}))}setDisableAutoTotpCopy(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableAutoTotpCopy=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableBadgeCounter(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableBadgeCounter)&&void 0!==r&&r}))}setDisableBadgeCounter(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableBadgeCounter=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableChangedPasswordNotification(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableChangedPasswordNotification)&&void 0!==r&&r}))}setDisableChangedPasswordNotification(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableChangedPasswordNotification=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableContextMenuItem(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableContextMenuItem)&&void 0!==r&&r}))}setDisableContextMenuItem(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableContextMenuItem=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDisableFavicon(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.disableFavicon)&&void 0!==n&&n}))}setDisableFavicon(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.disableFavicon=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getDisableGa(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.disableGa)&&void 0!==r&&r}))}setDisableGa(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.disableGa=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDontShowCardsCurrentTab(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.dontShowCardsCurrentTab)&&void 0!==r&&r}))}setDontShowCardsCurrentTab(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.dontShowCardsCurrentTab=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getDontShowIdentitiesCurrentTab(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.dontShowIdentitiesCurrentTab)&&void 0!==r&&r}))}setDontShowIdentitiesCurrentTab(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.dontShowIdentitiesCurrentTab=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEmail(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.email}))}setEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.email=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getEmailVerified(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile.emailVerified)&&void 0!==n&&n}))}setEmailVerified(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.emailVerified=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableAlwaysOnTop(e){var t,n,r,o;return i(this,void 0,void 0,(function*(){const i=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableAlwaysOnTop,a=null===(r=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===r?void 0:r.enableAlwaysOnTop;return null!==(o=null!=i?i:a)&&void 0!==o&&o}))}setEnableAlwaysOnTop(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.enableAlwaysOnTop=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()));const i=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));i.enableAlwaysOnTop=e,yield this.saveGlobals(i,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableAutoFillOnPageLoad(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableAutoFillOnPageLoad)&&void 0!==r&&r}))}setEnableAutoFillOnPageLoad(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.enableAutoFillOnPageLoad=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBiometric(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBiometrics)&&void 0!==n&&n}))}setEnableBiometric(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBiometrics=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBrowserIntegration(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBrowserIntegration)&&void 0!==n&&n}))}setEnableBrowserIntegration(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBrowserIntegration=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableBrowserIntegrationFingerprint(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableBrowserIntegrationFingerprint)&&void 0!==n&&n}))}setEnableBrowserIntegrationFingerprint(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableBrowserIntegrationFingerprint=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableCloseToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableCloseToTray)&&void 0!==n&&n}))}setEnableCloseToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableCloseToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableFullWidth(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableFullWidth)&&void 0!==r&&r}))}setEnableFullWidth(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.enableFullWidth=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnableGravitars(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.enableGravitars)&&void 0!==r&&r}))}setEnableGravitars(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.enableGravitars=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnableMinimizeToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableMinimizeToTray)&&void 0!==n&&n}))}setEnableMinimizeToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableMinimizeToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableStartToTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableStartToTray)&&void 0!==n&&n}))}setEnableStartToTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableStartToTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEnableTray(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.enableTray)&&void 0!==n&&n}))}setEnableTray(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.enableTray=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedCiphers(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.ciphers)||void 0===r?void 0:r.encrypted}))}setEncryptedCiphers(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.ciphers.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedCollections(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.collections)||void 0===r?void 0:r.encrypted}))}setEncryptedCollections(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.collections.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedCryptoSymmetricKey(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys.cryptoSymmetricKey.encrypted}))}setEncryptedCryptoSymmetricKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.cryptoSymmetricKey.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedFolders(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.folders)||void 0===r?void 0:r.encrypted}))}setEncryptedFolders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.folders.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEncryptedOrganizationKeys(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.organizationKeys.encrypted}))}setEncryptedOrganizationKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.organizationKeys.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPasswordGenerationHistory(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.passwordGenerationHistory)||void 0===r?void 0:r.encrypted}))}setEncryptedPasswordGenerationHistory(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.passwordGenerationHistory.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPinProtected(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.pinProtected)||void 0===r?void 0:r.encrypted}))}setEncryptedPinProtected(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.pinProtected.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPolicies(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.policies)||void 0===r?void 0:r.encrypted}))}setEncryptedPolicies(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.policies.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedPrivateKey(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.privateKey)||void 0===r?void 0:r.encrypted}))}setEncryptedPrivateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.privateKey.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedProviderKeys(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null===(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.providerKeys)||void 0===r?void 0:r.encrypted}))}setEncryptedProviderKeys(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.providerKeys.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEncryptedSends(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.sends.encrypted}))}setEncryptedSends(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.data.sends.encrypted=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getEntityId(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.entityId}))}setEntityId(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.profile.entityId=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEntityType(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.entityType}))}setEntityType(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.profile.entityType=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEnvironmentUrls(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null==this.state.activeUserId?yield this.getGlobalEnvironmentUrls(e):(e=this.reconcileOptions(e,yield this.defaultOnDiskOptions()),null!==(r=null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.environmentUrls)&&void 0!==r?r:new c.EnvironmentUrls)}))}setEnvironmentUrls(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.environmentUrls=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEquivalentDomains(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.equivalentDomains}))}setEquivalentDomains(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.equivalentDomains=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEventCollection(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.eventCollection}))}setEventCollection(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.eventCollection=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getEverBeenUnlocked(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.everBeenUnlocked)&&void 0!==r&&r}))}setEverBeenUnlocked(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.everBeenUnlocked=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getForcePasswordReset(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.forcePasswordReset)&&void 0!==r&&r}))}setForcePasswordReset(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.profile.forcePasswordReset=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getInstalledVersion(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.installedVersion}))}setInstalledVersion(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.installedVersion=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getIsAuthenticated(e){return i(this,void 0,void 0,(function*(){return null!=(yield this.getAccessToken(e))&&null!=(yield this.getUserId(e))}))}getKdfIterations(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.kdfIterations}))}setKdfIterations(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.kdfIterations=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getKdfType(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.kdfType}))}setKdfType(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.kdfType=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getKeyHash(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.keyHash}))}setKeyHash(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.keyHash=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getLastActive(e){return i(this,void 0,void 0,(function*(){e=this.reconcileOptions(e,yield this.defaultOnDiskOptions());const t=yield this.storageService.get(v,e);return null==t||Object.keys(t).length<1?null:t[e.userId]}))}setLastActive(e,t){var n;return i(this,void 0,void 0,(function*(){if(null==(t=this.reconcileOptions(t,yield this.defaultOnDiskOptions())).userId)return;const i=null!==(n=yield this.storageService.get(v,t))&&void 0!==n?n:{};i[t.userId]=e,yield this.storageService.save(v,i,t)}))}getLastSync(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.lastSync}))}setLastSync(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.profile.lastSync=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getLegacyEtmKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.legacyEtmKey}))}setLegacyEtmKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.keys.legacyEtmKey=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getLocalData(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.data)||void 0===n?void 0:n.localData}))}setLocalData(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.data.localData=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getLocale(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.locale}))}setLocale(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.locale=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getLoginRedirect(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.loginRedirect}))}setLoginRedirect(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,this.defaultInMemoryOptions));n.loginRedirect=e,yield this.saveGlobals(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getMainWindowSize(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.mainWindowSize}))}setMainWindowSize(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,this.defaultInMemoryOptions));n.mainWindowSize=e,yield this.saveGlobals(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getMinimizeOnCopyToClipboard(e){var t,n,r;return i(this,void 0,void 0,(function*(){return null!==(r=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.minimizeOnCopyToClipboard)&&void 0!==r&&r}))}setMinimizeOnCopyToClipboard(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.minimizeOnCopyToClipboard=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNeverDomains(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.neverDomains}))}setNeverDomains(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.neverDomains=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNoAutoPromptBiometrics(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.noAutoPromptBiometrics)&&void 0!==n&&n}))}setNoAutoPromptBiometrics(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.noAutoPromptBiometrics=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getNoAutoPromptBiometricsText(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.noAutoPromptBiometricsText}))}setNoAutoPromptBiometricsText(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.noAutoPromptBiometricsText=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getOpenAtLogin(e){var t,n;return i(this,void 0,void 0,(function*(){return null!==(n=null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.openAtLogin)&&void 0!==n&&n}))}setOpenAtLogin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.openAtLogin=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getOrganizationInvitation(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.organizationInvitation}))}setOrganizationInvitation(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,this.defaultInMemoryOptions));n.organizationInvitation=e,yield this.saveGlobals(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getOrganizations(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.organizations}))}setOrganizations(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.organizations=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getPasswordGenerationOptions(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.passwordGenerationOptions}))}setPasswordGenerationOptions(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.passwordGenerationOptions=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getProtectedPin(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.protectedPin}))}setProtectedPin(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.settings.protectedPin=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getProviders(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.data)||void 0===n?void 0:n.providers}))}setProviders(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.data.providers=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getPublicKey(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.keys)||void 0===n?void 0:n.publicKey}))}setPublicKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.keys.publicKey=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getRefreshToken(e){var t,n;return i(this,void 0,void 0,(function*(){const i="logOut"===(yield this.getVaultTimeoutAction({userId:null==e?void 0:e.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();return e=this.reconcileOptions(e,i),null===(n=null===(t=yield this.getAccount(e))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.refreshToken}))}setRefreshToken(e,t){return i(this,void 0,void 0,(function*(){const n="logOut"===(yield this.getVaultTimeoutAction({userId:null==t?void 0:t.userId}))?this.defaultInMemoryOptions:yield this.defaultOnDiskOptions();t=this.reconcileOptions(t,n);const i=yield this.getAccount(t);i.tokens.refreshToken=e,yield this.saveAccount(i,t)}))}getRememberedEmail(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.rememberedEmail}))}setRememberedEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.rememberedEmail=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getSecurityStamp(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,this.defaultInMemoryOptions)))||void 0===t?void 0:t.tokens)||void 0===n?void 0:n.securityStamp}))}setSecurityStamp(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,this.defaultInMemoryOptions));n.tokens.securityStamp=e,yield this.saveAccount(n,this.reconcileOptions(t,this.defaultInMemoryOptions))}))}getSettings(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskMemoryOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.settings}))}setSettings(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()));n.settings.settings=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskMemoryOptions()))}))}getSsoCodeVerifier(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.ssoCodeVerifier}))}setSsoCodeVerifier(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.ssoCodeVerifier=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getSsoOrgIdentifier(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.ssoOrganizationIdentifier}))}setSsoOrganizationIdentifier(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.ssoOrganizationIdentifier=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getSsoState(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.ssoState}))}setSsoState(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.ssoState=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getTheme(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.theme}))}setTheme(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.theme=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getTwoFactorToken(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.twoFactorToken}))}setTwoFactorToken(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.twoFactorToken=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getUserId(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.userId}))}getUsesKeyConnector(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskOptions())))||void 0===t?void 0:t.profile)||void 0===n?void 0:n.usesKeyConnector}))}setUsesKeyConnector(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));n.profile.usesKeyConnector=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getVaultTimeout(e){var t,n;return i(this,void 0,void 0,(function*(){return null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.vaultTimeout}))}setVaultTimeout(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.vaultTimeout=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getVaultTimeoutAction(e){var t,n,r;return i(this,void 0,void 0,(function*(){const i=null===(n=null===(t=yield this.getAccount(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.settings)||void 0===n?void 0:n.vaultTimeoutAction,o=null===(r=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===r?void 0:r.vaultTimeoutAction;return null!=i?i:o}))}setVaultTimeoutAction(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getAccount(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.settings.vaultTimeoutAction=e,yield this.saveAccount(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getStateVersion(){var e;return i(this,void 0,void 0,(function*(){return null!==(e=(yield this.getGlobals(yield this.defaultOnDiskLocalOptions())).stateVersion)&&void 0!==e?e:1}))}setStateVersion(e){return i(this,void 0,void 0,(function*(){const t=yield this.getGlobals(yield this.defaultOnDiskOptions());t.stateVersion=e,yield this.saveGlobals(t,yield this.defaultOnDiskOptions())}))}getWindow(){return i(this,void 0,void 0,(function*(){const e=yield this.getGlobals(yield this.defaultOnDiskOptions());return null!=(null==e?void 0:e.window)&&Object.keys(e.window).length>0?e.window:new d.WindowState}))}setWindow(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskOptions()));return n.window=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskOptions()))}))}getGlobals(e){return i(this,void 0,void 0,(function*(){let t;return this.useMemory(e.storageLocation)&&(t=this.getGlobalsFromMemory()),this.useDisk&&null==t&&(t=yield this.getGlobalsFromDisk(e)),null!=t?t:this.createGlobals()}))}saveGlobals(e,t){return i(this,void 0,void 0,(function*(){return this.useMemory(t.storageLocation)?this.saveGlobalsToMemory(e):yield this.saveGlobalsToDisk(e,t)}))}getGlobalsFromMemory(){return this.state.globals}getGlobalsFromDisk(e){return i(this,void 0,void 0,(function*(){return yield this.storageService.get(p,e)}))}saveGlobalsToMemory(e){this.state.globals=e}saveGlobalsToDisk(e,t){return i(this,void 0,void 0,(function*(){t.useSecureStorage?yield this.secureStorageService.save(p,e,t):yield this.storageService.save(p,e,t)}))}getAccount(e){return i(this,void 0,void 0,(function*(){try{let t;return this.useMemory(e.storageLocation)&&(t=this.getAccountFromMemory(e)),this.useDisk(e.storageLocation)&&null==t&&(t=yield this.getAccountFromDisk(e)),t}catch(t){this.logService.error(t)}}))}getAccountFromMemory(e){return null==this.state.accounts?null:this.state.accounts[this.getUserIdFromMemory(e)]}getUserIdFromMemory(e){var t,n;return null!=(null==e?void 0:e.userId)?null===(n=null===(t=this.state.accounts[e.userId])||void 0===t?void 0:t.profile)||void 0===n?void 0:n.userId:this.state.activeUserId}getAccountFromDisk(e){var t;return i(this,void 0,void 0,(function*(){if(null==(null==e?void 0:e.userId)&&null==this.state.activeUserId)return null;return(null==e?void 0:e.useSecureStorage)?null!==(t=yield this.secureStorageService.get(e.userId,e))&&void 0!==t?t:yield this.storageService.get(e.userId,this.reconcileOptions(e,{htmlStorageLocation:o.HtmlStorageLocation.Local})):yield this.storageService.get(e.userId,e)}))}useMemory(e){return e===a.StorageLocation.Memory||e===a.StorageLocation.Both}useDisk(e){return e===a.StorageLocation.Disk||e===a.StorageLocation.Both}saveAccount(e,t={storageLocation:a.StorageLocation.Both,useSecureStorage:!1}){return i(this,void 0,void 0,(function*(){return this.useMemory(t.storageLocation)?yield this.saveAccountToMemory(e):yield this.saveAccountToDisk(e,t)}))}saveAccountToDisk(e,t){return i(this,void 0,void 0,(function*(){const n=t.useSecureStorage?this.secureStorageService:this.storageService;yield n.save(`${t.userId}`,e,t)}))}saveAccountToMemory(e){return i(this,void 0,void 0,(function*(){null!==this.getAccountFromMemory({userId:e.profile.userId})&&(this.state.accounts[e.profile.userId]=e),yield this.pushAccounts()}))}scaffoldNewAccountStorage(e){return i(this,void 0,void 0,(function*(){const t=JSON.parse(JSON.stringify(e));yield this.scaffoldNewAccountLocalStorage(t),yield this.scaffoldNewAccountSessionStorage(t),yield this.scaffoldNewAccountMemoryStorage(t)}))}scaffoldNewAccountLocalStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e.profile.userId,yield this.defaultOnDiskLocalOptions()),n=e.settings.environmentUrls;null!=(null==t?void 0:t.settings)?e.settings=t.settings:(yield this.storageService.has(h))&&(e.settings=yield this.storageService.get(h),yield this.storageService.remove(h)),e.settings.environmentUrls=n,"logOut"===e.settings.vaultTimeoutAction&&(e.tokens.accessToken=null,e.tokens.refreshToken=null,e.profile.apiKeyClientId=null,e.keys.apiKeyClientSecret=null),yield this.storageService.save(e.profile.userId,e,yield this.defaultOnDiskLocalOptions())}))}scaffoldNewAccountMemoryStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e.profile.userId,yield this.defaultOnDiskMemoryOptions());null!=(null==t?void 0:t.settings)&&(t.settings.environmentUrls=e.settings.environmentUrls,e.settings=t.settings),yield this.storageService.save(e.profile.userId,e,yield this.defaultOnDiskMemoryOptions())}))}scaffoldNewAccountSessionStorage(e){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e.profile.userId,yield this.defaultOnDiskOptions());null!=(null==t?void 0:t.settings)&&(t.settings.environmentUrls=e.settings.environmentUrls,e.settings=t.settings),yield this.storageService.save(e.profile.userId,e,yield this.defaultOnDiskOptions())}))}pushAccounts(){var e;return i(this,void 0,void 0,(function*(){yield this.pruneInMemoryAccounts(),null==(null===(e=this.state)||void 0===e?void 0:e.accounts)||Object.keys(this.state.accounts).length<1?this.accounts.next(null):this.accounts.next(this.state.accounts)}))}reconcileOptions(e,t){var n,i,r,o,a;return null==e?t:(e.userId=null!==(n=null==e?void 0:e.userId)&&void 0!==n?n:t.userId,e.storageLocation=null!==(i=null==e?void 0:e.storageLocation)&&void 0!==i?i:t.storageLocation,e.useSecureStorage=null!==(r=null==e?void 0:e.useSecureStorage)&&void 0!==r?r:t.useSecureStorage,e.htmlStorageLocation=null!==(o=null==e?void 0:e.htmlStorageLocation)&&void 0!==o?o:t.htmlStorageLocation,e.keySuffix=null!==(a=null==e?void 0:e.keySuffix)&&void 0!==a?a:t.keySuffix,e)}get defaultInMemoryOptions(){return{storageLocation:a.StorageLocation.Memory,userId:this.state.activeUserId}}defaultOnDiskOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Session,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage(),useSecureStorage:!1}}))}defaultOnDiskLocalOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Local,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage(),useSecureStorage:!1}}))}defaultOnDiskMemoryOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,htmlStorageLocation:o.HtmlStorageLocation.Memory,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getUserId(),useSecureStorage:!1}}))}defaultSecureStorageOptions(){var e;return i(this,void 0,void 0,(function*(){return{storageLocation:a.StorageLocation.Disk,useSecureStorage:!0,userId:null!==(e=this.state.activeUserId)&&void 0!==e?e:yield this.getActiveUserIdFromStorage()}}))}getActiveUserIdFromStorage(){return i(this,void 0,void 0,(function*(){return yield this.storageService.get(m)}))}removeAccountFromLocalStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e,{htmlStorageLocation:o.HtmlStorageLocation.Local});yield this.storageService.save(e,this.resetAccount(t),yield this.defaultOnDiskLocalOptions())}))}removeAccountFromSessionStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){const t=yield this.storageService.get(e,{htmlStorageLocation:o.HtmlStorageLocation.Session});yield this.storageService.save(e,this.resetAccount(t),yield this.defaultOnDiskOptions())}))}removeAccountFromSecureStorage(e=this.state.activeUserId){return i(this,void 0,void 0,(function*(){yield this.setCryptoMasterKeyAuto(null,{userId:e}),yield this.setCryptoMasterKeyBiometric(null,{userId:e}),yield this.setCryptoMasterKeyB64(null,{userId:e})}))}removeAccountFromMemory(e=this.state.activeUserId){delete this.state.accounts[e]}pruneInMemoryAccounts(){return i(this,void 0,void 0,(function*(){for(const e in this.state.accounts)(yield this.getIsAuthenticated({userId:e}))||delete this.state.accounts[e]}))}resetAccount(e){const t={settings:e.settings};return Object.assign(this.createAccount(),t)}setAccountEnvironmentUrls(e){return i(this,void 0,void 0,(function*(){return e.settings.environmentUrls=yield this.getGlobalEnvironmentUrls(),e}))}getGlobalEnvironmentUrls(e){var t;return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,yield this.defaultOnDiskOptions()),null!==(t=(yield this.getGlobals(e)).environmentUrls)&&void 0!==t?t:new c.EnvironmentUrls}))}clearDecryptedDataForActiveUser(){var e,t;const n=this.state.activeUserId;null!=n&&null!=(null===(t=null===(e=this.state)||void 0===e?void 0:e.accounts[n])||void 0===t?void 0:t.data)&&(this.state.accounts[n].data=new r.AccountData)}createAccount(e=null){return this.stateFactory.createAccount(e)}createGlobals(e=null){return this.stateFactory.createGlobal(e)}deAuthenticateAccount(e){return i(this,void 0,void 0,(function*(){yield this.setAccessToken(null,{userId:e}),yield this.setLastActive(null,{userId:e});const t=this.state.authenticatedAccounts.indexOf(e);t>-1&&(this.state.authenticatedAccounts.splice(t,1),yield this.storageService.save(u,this.state.authenticatedAccounts))}))}removeAccountFromDisk(e){return i(this,void 0,void 0,(function*(){yield this.removeAccountFromSessionStorage(e),yield this.removeAccountFromLocalStorage(e),yield this.removeAccountFromSecureStorage(e)}))}dynamicallySetActiveUser(){return i(this,void 0,void 0,(function*(){for(const e in this.state.accounts)if(null!=e){if(yield this.getIsAuthenticated({userId:e})){yield this.setActiveUser(e);break}yield this.setActiveUser(null)}}))}}},91656:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;const r=n(1139),o=n(35979),a=n(85965),s={accessToken:"accessToken",alwaysShowDock:"alwaysShowDock",autoConfirmFingerprints:"autoConfirmFingerprints",autoFillOnPageLoadDefault:"autoFillOnPageLoadDefault",biometricAwaitingAcceptance:"biometricAwaitingAcceptance",biometricFingerprintValidated:"biometricFingerprintValidated",biometricText:"biometricText",biometricUnlock:"biometric",clearClipboard:"clearClipboardKey",clientId:"apikey_clientId",clientSecret:"apikey_clientSecret",collapsedGroupings:"collapsedGroupings",convertAccountToKeyConnector:"convertAccountToKeyConnector",defaultUriMatch:"defaultUriMatch",disableAddLoginNotification:"disableAddLoginNotification",disableAutoBiometricsPrompt:"noAutoPromptBiometrics",disableAutoTotpCopy:"disableAutoTotpCopy",disableBadgeCounter:"disableBadgeCounter",disableChangedPasswordNotification:"disableChangedPasswordNotification",disableContextMenuItem:"disableContextMenuItem",disableFavicon:"disableFavicon",disableGa:"disableGa",dontShowCardsCurrentTab:"dontShowCardsCurrentTab",dontShowIdentitiesCurrentTab:"dontShowIdentitiesCurrentTab",emailVerified:"emailVerified",enableAlwaysOnTop:"enableAlwaysOnTopKey",enableAutoFillOnPageLoad:"enableAutoFillOnPageLoad",enableBiometric:"enabledBiometric",enableBrowserIntegration:"enableBrowserIntegration",enableBrowserIntegrationFingerprint:"enableBrowserIntegrationFingerprint",enableCloseToTray:"enableCloseToTray",enableFullWidth:"enableFullWidth",enableGravatars:"enableGravatars",enableMinimizeToTray:"enableMinimizeToTray",enableStartToTray:"enableStartToTrayKey",enableTray:"enableTray",encKey:"encKey",encOrgKeys:"encOrgKeys",encPrivate:"encPrivateKey",encProviderKeys:"encProviderKeys",entityId:"entityId",entityType:"entityType",environmentUrls:"environmentUrls",equivalentDomains:"equivalentDomains",eventCollection:"eventCollection",forcePasswordReset:"forcePasswordReset",history:"generatedPasswordHistory",installedVersion:"installedVersion",kdf:"kdf",kdfIterations:"kdfIterations",key:"key",keyHash:"keyHash",lastActive:"lastActive",localData:"sitesLocalData",locale:"locale",mainWindowSize:"mainWindowSize",minimizeOnCopyToClipboard:"minimizeOnCopyToClipboardKey",neverDomains:"neverDomains",noAutoPromptBiometricsText:"noAutoPromptBiometricsText",openAtLogin:"openAtLogin",passwordGenerationOptions:"passwordGenerationOptions",pinProtected:"pinProtectedKey",protectedPin:"protectedPin",refreshToken:"refreshToken",ssoCodeVerifier:"ssoCodeVerifier",ssoIdentifier:"ssoOrgIdentifier",ssoState:"ssoState",stamp:"securityStamp",theme:"theme",userEmail:"userEmail",userId:"userId",usesConnector:"usesKeyConnector",vaultTimeoutAction:"vaultTimeoutAction",vaultTimeout:"lockOption",rememberedEmail:"rememberedEmail"},l={ciphers:"ciphers_",collections:"collections_",folders:"folders_",lastSync:"lastSync_",policies:"policies_",twoFactorToken:"twoFactorToken_",organizations:"organizations_",providers:"providers_",sends:"sends_",settings:"settings_"},c="global",d="authenticatedAccounts",p="activeUserId",u="tempAccountSettings",m="accountActivity",h="_masterkey_auto",v="_masterkey_biometric",f="_masterkey";t.StateMigrationService=class{constructor(e,t,n){this.storageService=e,this.secureStorageService=t,this.stateFactory=n}needsMigration(){return i(this,void 0,void 0,(function*(){const e=yield this.getCurrentStateVersion();return null==e||e<o.StateVersion.Latest}))}migrate(){return i(this,void 0,void 0,(function*(){let e=yield this.getCurrentStateVersion();for(;e<o.StateVersion.Latest;){switch(e){case o.StateVersion.One:yield this.migrateStateFrom1To2();break;case o.StateVersion.Two:yield this.migrateStateFrom2To3()}e+=1}}))}migrateStateFrom1To2(){var e,t,n,r,a,g,y,x,S,b,w,I,C,E,P,k,A,O,T,M,D,B,R,U,V,F,N,_,j,z,L,K,q,G,W,H,$,Q,Y,J,X,Z,ee,te,ne,ie,re,oe;return i(this,void 0,void 0,(function*(){const ae=e=>i(this,void 0,void 0,(function*(){for(const e in s)null!=e&&(yield this.set(s[e],null));if(null!=e)for(const e in l)null!=e&&(yield this.set(l[e]+le,null))})),se=null!==(e=yield this.get(c))&&void 0!==e?e:this.stateFactory.createGlobal(null);se.stateVersion=o.StateVersion.Two,se.environmentUrls=null!==(t=yield this.get(s.environmentUrls))&&void 0!==t?t:se.environmentUrls,se.locale=null!==(n=yield this.get(s.locale))&&void 0!==n?n:se.locale,se.noAutoPromptBiometrics=null!==(r=yield this.get(s.disableAutoBiometricsPrompt))&&void 0!==r?r:se.noAutoPromptBiometrics,se.noAutoPromptBiometricsText=null!==(a=yield this.get(s.noAutoPromptBiometricsText))&&void 0!==a?a:se.noAutoPromptBiometricsText,se.ssoCodeVerifier=null!==(g=yield this.get(s.ssoCodeVerifier))&&void 0!==g?g:se.ssoCodeVerifier,se.ssoOrganizationIdentifier=null!==(y=yield this.get(s.ssoIdentifier))&&void 0!==y?y:se.ssoOrganizationIdentifier,se.ssoState=null!==(x=yield this.get(s.ssoState))&&void 0!==x?x:se.ssoState,se.rememberedEmail=null!==(S=yield this.get(s.rememberedEmail))&&void 0!==S?S:se.rememberedEmail,se.theme=null!==(b=yield this.get(s.theme))&&void 0!==b?b:se.theme,se.vaultTimeout=null!==(w=yield this.get(s.vaultTimeout))&&void 0!==w?w:se.vaultTimeout,se.vaultTimeoutAction=null!==(I=yield this.get(s.vaultTimeoutAction))&&void 0!==I?I:se.vaultTimeoutAction,se.window=null!==(C=yield this.get(s.mainWindowSize))&&void 0!==C?C:se.window,se.enableTray=null!==(E=yield this.get(s.enableTray))&&void 0!==E?E:se.enableTray,se.enableMinimizeToTray=null!==(P=yield this.get(s.enableMinimizeToTray))&&void 0!==P?P:se.enableMinimizeToTray,se.enableCloseToTray=null!==(k=yield this.get(s.enableCloseToTray))&&void 0!==k?k:se.enableCloseToTray,se.enableStartToTray=null!==(A=yield this.get(s.enableStartToTray))&&void 0!==A?A:se.enableStartToTray,se.openAtLogin=null!==(O=yield this.get(s.openAtLogin))&&void 0!==O?O:se.openAtLogin,se.alwaysShowDock=null!==(T=yield this.get(s.alwaysShowDock))&&void 0!==T?T:se.alwaysShowDock,se.enableBrowserIntegration=null!==(M=yield this.get(s.enableBrowserIntegration))&&void 0!==M?M:se.enableBrowserIntegration,se.enableBrowserIntegrationFingerprint=null!==(D=yield this.get(s.enableBrowserIntegrationFingerprint))&&void 0!==D?D:se.enableBrowserIntegrationFingerprint;const le=null!==(B=yield this.get(s.userId))&&void 0!==B?B:yield this.get(s.entityId),ce=this.stateFactory.createAccount(null),de={autoConfirmFingerPrints:null!==(R=yield this.get(s.autoConfirmFingerprints))&&void 0!==R?R:ce.settings.autoConfirmFingerPrints,autoFillOnPageLoadDefault:null!==(U=yield this.get(s.autoFillOnPageLoadDefault))&&void 0!==U?U:ce.settings.autoFillOnPageLoadDefault,biometricLocked:null,biometricUnlock:null!==(V=yield this.get(s.biometricUnlock))&&void 0!==V?V:ce.settings.biometricUnlock,clearClipboard:null!==(F=yield this.get(s.clearClipboard))&&void 0!==F?F:ce.settings.clearClipboard,defaultUriMatch:null!==(N=yield this.get(s.defaultUriMatch))&&void 0!==N?N:ce.settings.defaultUriMatch,disableAddLoginNotification:null!==(_=yield this.get(s.disableAddLoginNotification))&&void 0!==_?_:ce.settings.disableAddLoginNotification,disableAutoBiometricsPrompt:null!==(j=yield this.get(s.disableAutoBiometricsPrompt))&&void 0!==j?j:ce.settings.disableAutoBiometricsPrompt,disableAutoTotpCopy:null!==(z=yield this.get(s.disableAutoTotpCopy))&&void 0!==z?z:ce.settings.disableAutoTotpCopy,disableBadgeCounter:null!==(L=yield this.get(s.disableBadgeCounter))&&void 0!==L?L:ce.settings.disableBadgeCounter,disableChangedPasswordNotification:null!==(K=yield this.get(s.disableChangedPasswordNotification))&&void 0!==K?K:ce.settings.disableChangedPasswordNotification,disableContextMenuItem:null!==(q=yield this.get(s.disableContextMenuItem))&&void 0!==q?q:ce.settings.disableContextMenuItem,disableGa:null!==(G=yield this.get(s.disableGa))&&void 0!==G?G:ce.settings.disableGa,dontShowCardsCurrentTab:null!==(W=yield this.get(s.dontShowCardsCurrentTab))&&void 0!==W?W:ce.settings.dontShowCardsCurrentTab,dontShowIdentitiesCurrentTab:null!==(H=yield this.get(s.dontShowIdentitiesCurrentTab))&&void 0!==H?H:ce.settings.dontShowIdentitiesCurrentTab,enableAlwaysOnTop:null!==($=yield this.get(s.enableAlwaysOnTop))&&void 0!==$?$:ce.settings.enableAlwaysOnTop,enableAutoFillOnPageLoad:null!==(Q=yield this.get(s.enableAutoFillOnPageLoad))&&void 0!==Q?Q:ce.settings.enableAutoFillOnPageLoad,enableBiometric:null!==(Y=yield this.get(s.enableBiometric))&&void 0!==Y?Y:ce.settings.enableBiometric,enableFullWidth:null!==(J=yield this.get(s.enableFullWidth))&&void 0!==J?J:ce.settings.enableFullWidth,enableGravitars:null!==(X=yield this.get(s.enableGravatars))&&void 0!==X?X:ce.settings.enableGravitars,environmentUrls:null!==(Z=se.environmentUrls)&&void 0!==Z?Z:ce.settings.environmentUrls,equivalentDomains:null!==(ee=yield this.get(s.equivalentDomains))&&void 0!==ee?ee:ce.settings.equivalentDomains,minimizeOnCopyToClipboard:null!==(te=yield this.get(s.minimizeOnCopyToClipboard))&&void 0!==te?te:ce.settings.minimizeOnCopyToClipboard,neverDomains:null!==(ne=yield this.get(s.neverDomains))&&void 0!==ne?ne:ce.settings.neverDomains,passwordGenerationOptions:null!==(ie=yield this.get(s.passwordGenerationOptions))&&void 0!==ie?ie:ce.settings.passwordGenerationOptions,pinProtected:{decrypted:null,encrypted:yield this.get(s.pinProtected)},protectedPin:yield this.get(s.protectedPin),settings:null==le?null:yield this.get(l.settings+le),vaultTimeout:null!==(re=yield this.get(s.vaultTimeout))&&void 0!==re?re:ce.settings.vaultTimeout,vaultTimeoutAction:null!==(oe=yield this.get(s.vaultTimeoutAction))&&void 0!==oe?oe:ce.settings.vaultTimeoutAction};if(null==le)return yield this.set(u,de),yield this.set(c,se),yield this.set(d,[]),yield this.set(p,null),void(yield ae());se.twoFactorToken=yield this.get(l.twoFactorToken+le),yield this.set(c,se),yield this.set(le,{data:{addEditCipherInfo:null,ciphers:{decrypted:null,encrypted:yield this.get(l.ciphers+le)},collapsedGroupings:null,collections:{decrypted:null,encrypted:yield this.get(l.collections+le)},eventCollection:yield this.get(s.eventCollection),folders:{decrypted:null,encrypted:yield this.get(l.folders+le)},localData:null,organizations:yield this.get(l.organizations+le),passwordGenerationHistory:{decrypted:null,encrypted:yield this.get(s.history)},policies:{decrypted:null,encrypted:yield this.get(l.policies+le)},providers:yield this.get(l.providers+le),sends:{decrypted:null,encrypted:yield this.get(l.sends+le)}},keys:{apiKeyClientSecret:yield this.get(s.clientSecret),cryptoMasterKey:null,cryptoMasterKeyAuto:null,cryptoMasterKeyB64:null,cryptoMasterKeyBiometric:null,cryptoSymmetricKey:{encrypted:yield this.get(s.encKey),decrypted:null},legacyEtmKey:null,organizationKeys:{decrypted:null,encrypted:yield this.get(s.encOrgKeys+le)},privateKey:{decrypted:null,encrypted:yield this.get(s.encPrivate)},providerKeys:{decrypted:null,encrypted:yield this.get(s.encProviderKeys+le)},publicKey:null},profile:{apiKeyClientId:yield this.get(s.clientId),authenticationStatus:null,convertAccountToKeyConnector:yield this.get(s.convertAccountToKeyConnector),email:yield this.get(s.userEmail),emailVerified:yield this.get(s.emailVerified),entityId:null,entityType:null,everBeenUnlocked:null,forcePasswordReset:null,hasPremiumPersonally:null,kdfIterations:yield this.get(s.kdfIterations),kdfType:yield this.get(s.kdf),keyHash:yield this.get(s.keyHash),lastSync:null,userId:le,usesKeyConnector:null},settings:de,tokens:{accessToken:yield this.get(s.accessToken),decodedToken:null,refreshToken:yield this.get(s.refreshToken),securityStamp:null}}),yield this.set(d,[le]),yield this.set(p,le);const pe={[le]:yield this.get(s.lastActive)};pe[le]=yield this.get(s.lastActive),yield this.set(m,pe),yield ae(le),(yield this.secureStorageService.has(s.key,{keySuffix:"biometric"}))&&(yield this.secureStorageService.save(`${le}${v}`,yield this.secureStorageService.get(s.key,{keySuffix:"biometric"}),{keySuffix:"biometric"}),yield this.secureStorageService.remove(s.key,{keySuffix:"biometric"})),(yield this.secureStorageService.has(s.key,{keySuffix:"auto"}))&&(yield this.secureStorageService.save(`${le}${h}`,yield this.secureStorageService.get(s.key,{keySuffix:"auto"}),{keySuffix:"auto"}),yield this.secureStorageService.remove(s.key,{keySuffix:"auto"})),(yield this.secureStorageService.has(s.key))&&(yield this.secureStorageService.save(`${le}${f}`,yield this.secureStorageService.get(s.key)),yield this.secureStorageService.remove(s.key))}))}migrateStateFrom2To3(){return i(this,void 0,void 0,(function*(){const e=yield this.get(d);yield Promise.all(e.map((e=>i(this,void 0,void 0,(function*(){var t,n;const i=yield this.get(e);if(null===(null===(t=null==i?void 0:i.profile)||void 0===t?void 0:t.hasPremiumPersonally)&&null!=(null===(n=i.tokens)||void 0===n?void 0:n.accessToken)){const t=yield a.TokenService.decodeToken(i.tokens.accessToken);i.profile.hasPremiumPersonally=t.premium,yield this.set(e,i)}})))));const t=yield this.getGlobals();t.stateVersion=o.StateVersion.Three,yield this.set(c,t)}))}get options(){return{htmlStorageLocation:r.HtmlStorageLocation.Local}}get(e){return this.storageService.get(e,this.options)}set(e,t){return null==t?this.storageService.remove(e,this.options):this.storageService.save(e,t,this.options)}getGlobals(){return i(this,void 0,void 0,(function*(){return yield this.get(c)}))}getCurrentStateVersion(){var e,t;return i(this,void 0,void 0,(function*(){return null!==(t=null===(e=yield this.getGlobals())||void 0===e?void 0:e.stateVersion)&&void 0!==t?t:o.StateVersion.One}))}}},28265:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SyncService=void 0;const r=n(13886),o=n(58209),a=n(20301),s=n(74102),l=n(79384),c=n(89652),d=n(75059);t.SyncService=class{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){this.apiService=e,this.settingsService=t,this.folderService=n,this.cipherService=i,this.cryptoService=r,this.collectionService=o,this.messagingService=a,this.policyService=s,this.sendService=l,this.logService=c,this.keyConnectorService=d,this.stateService=p,this.organizationService=u,this.providerService=m,this.logoutCallback=h,this.syncInProgress=!1}getLastSync(){return i(this,void 0,void 0,(function*(){if(null==(yield this.stateService.getUserId()))return null;const e=yield this.stateService.getLastSync();return e?new Date(e):null}))}setLastSync(e,t){return i(this,void 0,void 0,(function*(){yield this.stateService.setLastSync(e.toJSON(),{userId:t})}))}fullSync(e,t=!1){return i(this,void 0,void 0,(function*(){this.syncStarted();if(!(yield this.stateService.getIsAuthenticated()))return this.syncCompleted(!1);const n=new Date;let i=!1;try{i=yield this.needsSyncing(e)}catch(o){if(t)throw o}if(!i)return yield this.setLastSync(n),this.syncCompleted(!1);const r=yield this.stateService.getUserId();try{yield this.apiService.refreshIdentityToken();const e=yield this.apiService.getSync();return yield this.syncProfile(e.profile),yield this.syncFolders(r,e.folders),yield this.syncCollections(e.collections),yield this.syncCiphers(r,e.ciphers),yield this.syncSends(r,e.sends),yield this.syncSettings(e.domains),yield this.syncPolicies(e.policies),yield this.setLastSync(n),this.syncCompleted(!0)}catch(o){if(t)throw o;return this.syncCompleted(!1)}}))}syncUpsertFolder(e,t){return i(this,void 0,void 0,(function*(){if(this.syncStarted(),yield this.stateService.getIsAuthenticated())try{const n=yield this.folderService.get(e.id);if(!t&&null==n||t&&null!=n&&n.revisionDate<e.revisionDate){const t=yield this.apiService.getFolder(e.id);if(null!=t){const n=yield this.stateService.getUserId();return yield this.folderService.upsert(new a.FolderData(t,n)),this.messagingService.send("syncedUpsertedFolder",{folderId:e.id}),this.syncCompleted(!0)}}}catch(n){this.logService.error(n)}return this.syncCompleted(!1)}))}syncDeleteFolder(e){return i(this,void 0,void 0,(function*(){return this.syncStarted(),(yield this.stateService.getIsAuthenticated())?(yield this.folderService.delete(e.id),this.messagingService.send("syncedDeletedFolder",{folderId:e.id}),this.syncCompleted(!0),!0):this.syncCompleted(!1)}))}syncUpsertCipher(e,t){return i(this,void 0,void 0,(function*(){if(this.syncStarted(),yield this.stateService.getIsAuthenticated())try{let n=!0;const i=yield this.cipherService.get(e.id);null!=i&&i.revisionDate>=e.revisionDate&&(n=!1);let o=!1;if(n&&(t?(n=null!=i,o=!0):null==e.collectionIds||null==e.organizationId?n=null==i:(n=!1,o=!0)),!n&&o&&null!=e.organizationId&&null!=e.collectionIds&&e.collectionIds.length>0){const t=yield this.collectionService.getAll();if(null!=t)for(let i=0;i<t.length;i++)if(e.collectionIds.indexOf(t[i].id)>-1){n=!0;break}}if(n){const t=yield this.apiService.getCipher(e.id);if(null!=t){const n=yield this.stateService.getUserId();return yield this.cipherService.upsert(new r.CipherData(t,n)),this.messagingService.send("syncedUpsertedCipher",{cipherId:e.id}),this.syncCompleted(!0)}}}catch(n){if(null!=n&&404===n.statusCode&&t)return yield this.cipherService.delete(e.id),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),this.syncCompleted(!0)}return this.syncCompleted(!1)}))}syncDeleteCipher(e){return i(this,void 0,void 0,(function*(){return this.syncStarted(),(yield this.stateService.getIsAuthenticated())?(yield this.cipherService.delete(e.id),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),this.syncCompleted(!0)):this.syncCompleted(!1)}))}syncUpsertSend(e,t){return i(this,void 0,void 0,(function*(){if(this.syncStarted(),yield this.stateService.getIsAuthenticated())try{const n=yield this.sendService.get(e.id);if(!t&&null==n||t&&null!=n&&n.revisionDate<e.revisionDate){const t=yield this.apiService.getSend(e.id);if(null!=t){const n=yield this.stateService.getUserId();return yield this.sendService.upsert(new d.SendData(t,n)),this.messagingService.send("syncedUpsertedSend",{sendId:e.id}),this.syncCompleted(!0)}}}catch(n){this.logService.error(n)}return this.syncCompleted(!1)}))}syncDeleteSend(e){return i(this,void 0,void 0,(function*(){return this.syncStarted(),(yield this.stateService.getIsAuthenticated())?(yield this.sendService.delete(e.id),this.messagingService.send("syncedDeletedSend",{sendId:e.id}),this.syncCompleted(!0),!0):this.syncCompleted(!1)}))}syncStarted(){this.syncInProgress=!0,this.messagingService.send("syncStarted")}syncCompleted(e){return this.syncInProgress=!1,this.messagingService.send("syncCompleted",{successfully:e}),e}needsSyncing(e){return i(this,void 0,void 0,(function*(){if(e)return!0;const t=yield this.getLastSync();if(null==t||0===t.getTime())return!0;const n=yield this.apiService.getAccountRevisionDate();return!(new Date(n)<=t)}))}syncProfile(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getSecurityStamp();if(null!=t&&t!==e.securityStamp)throw null!=this.logoutCallback&&(yield this.logoutCallback(!0)),new Error("Stamp has changed");yield this.cryptoService.setEncKey(e.key),yield this.cryptoService.setEncPrivateKey(e.privateKey),yield this.cryptoService.setProviderKeys(e.providers),yield this.cryptoService.setOrgKeys(e.organizations,e.providerOrganizations),yield this.stateService.setSecurityStamp(e.securityStamp),yield this.stateService.setEmailVerified(e.emailVerified),yield this.stateService.setForcePasswordReset(e.forcePasswordReset),yield this.keyConnectorService.setUsesKeyConnector(e.usesKeyConnector);const n={};e.organizations.forEach((e=>{n[e.id]=new s.OrganizationData(e)}));const i={};e.providers.forEach((e=>{i[e.id]=new c.ProviderData(e)})),e.providerOrganizations.forEach((e=>{null==n[e.id]&&(n[e.id]=new s.OrganizationData(e),n[e.id].isProviderUser=!0)})),yield this.organizationService.save(n),yield this.providerService.save(i),(yield this.keyConnectorService.userNeedsMigration())?(yield this.keyConnectorService.setConvertAccountRequired(!0),this.messagingService.send("convertAccountToKeyConnector")):this.keyConnectorService.removeConvertAccountRequired()}))}syncFolders(e,t){return i(this,void 0,void 0,(function*(){const n={};return t.forEach((t=>{n[t.id]=new a.FolderData(t,e)})),yield this.folderService.replace(n)}))}syncCollections(e){return i(this,void 0,void 0,(function*(){const t={};return e.forEach((e=>{t[e.id]=new o.CollectionData(e)})),yield this.collectionService.replace(t)}))}syncCiphers(e,t){return i(this,void 0,void 0,(function*(){const n={};return t.forEach((t=>{n[t.id]=new r.CipherData(t,e)})),yield this.cipherService.replace(n)}))}syncSends(e,t){return i(this,void 0,void 0,(function*(){const n={};return t.forEach((t=>{n[t.id]=new d.SendData(t,e)})),yield this.sendService.replace(n)}))}syncSettings(e){return i(this,void 0,void 0,(function*(){let t=[];return null!=e&&null!=e.equivalentDomains&&(t=t.concat(e.equivalentDomains)),null!=e&&null!=e.globalEquivalentDomains&&e.globalEquivalentDomains.forEach((e=>{e.domains.length>0&&t.push(e.domains)})),this.settingsService.setEquivalentDomains(t)}))}syncPolicies(e){return i(this,void 0,void 0,(function*(){const t={};return null!=e&&e.forEach((e=>{t[e.id]=new l.PolicyData(e)})),yield this.policyService.replace(t)}))}}},85965:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;const r=n(70829);class o{constructor(e){this.stateService=e}static decodeToken(e){if(null==e)throw new Error("Token not provided.");const t=e.split(".");if(3!==t.length)throw new Error("JWT must have 3 parts");const n=r.Utils.fromUrlB64ToUtf8(t[1]);if(null==n)throw new Error("Cannot decode the token");return JSON.parse(n)}setTokens(e,t,n){return i(this,void 0,void 0,(function*(){yield this.setToken(e),yield this.setRefreshToken(t),null!=n&&(yield this.setClientId(n[0]),yield this.setClientSecret(n[1]))}))}setClientId(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setApiKeyClientId(e)}))}getClientId(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getApiKeyClientId()}))}setClientSecret(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setApiKeyClientSecret(e)}))}getClientSecret(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getApiKeyClientSecret()}))}setToken(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setAccessToken(e)}))}getToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getAccessToken()}))}setRefreshToken(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setRefreshToken(e)}))}getRefreshToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getRefreshToken()}))}toggleTokens(){return i(this,void 0,void 0,(function*(){const e=yield this.getToken(),t=yield this.getRefreshToken(),n=yield this.getClientId(),i=yield this.getClientSecret(),r=yield this.stateService.getVaultTimeout(),o=yield this.stateService.getVaultTimeoutAction();null==r&&0!==r||"logOut"!==o||(yield this.clearToken()),yield this.setToken(e),yield this.setRefreshToken(t),yield this.setClientId(n),yield this.setClientSecret(i)}))}setTwoFactorToken(e){return i(this,void 0,void 0,(function*(){return yield this.stateService.setTwoFactorToken(e)}))}getTwoFactorToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getTwoFactorToken()}))}clearTwoFactorToken(){return i(this,void 0,void 0,(function*(){return yield this.stateService.setTwoFactorToken(null)}))}clearToken(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setAccessToken(null,{userId:e}),yield this.stateService.setRefreshToken(null,{userId:e}),yield this.stateService.setApiKeyClientId(null,{userId:e}),yield this.stateService.setApiKeyClientSecret(null,{userId:e})}))}decodeToken(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getDecodedToken();if(null===e&&null!=t)return t;if(null==(e=null!=e?e:yield this.stateService.getAccessToken()))throw new Error("Token not found.");return o.decodeToken(e)}))}getTokenExpirationDate(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.exp)return null;const t=new Date(0);return t.setUTCSeconds(e.exp),t}))}tokenSecondsRemaining(e=0){return i(this,void 0,void 0,(function*(){const t=yield this.getTokenExpirationDate();if(null==t)return 0;const n=t.valueOf()-((new Date).valueOf()+1e3*e);return Math.round(n/1e3)}))}tokenNeedsRefresh(e=5){return i(this,void 0,void 0,(function*(){return(yield this.tokenSecondsRemaining())<60*e}))}getUserId(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.sub)throw new Error("No user id found");return e.sub}))}getEmail(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.email)throw new Error("No email found");return e.email}))}getEmailVerified(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.email_verified)throw new Error("No email verification found");return e.email_verified}))}getName(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return void 0===e.name?null:e.name}))}getPremium(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return void 0!==e.premium&&e.premium}))}getIssuer(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();if(void 0===e.iss)throw new Error("No issuer found");return e.iss}))}getIsExternal(){return i(this,void 0,void 0,(function*(){const e=yield this.decodeToken();return Array.isArray(e.amr)&&e.amr.includes("external")}))}}t.TokenService=o},79720:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;const r=n(70829),o="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",a="23456789BCDFGHJKMNPQRTVWXY";t.TotpService=class{constructor(e,t,n){this.cryptoFunctionService=e,this.logService=t,this.stateService=n}getCode(e){return i(this,void 0,void 0,(function*(){if(null==e)return null;let t=30,n="sha1",i=6,o=e;const s=0===e.toLowerCase().indexOf("otpauth://"),l=!s&&0===e.toLowerCase().indexOf("steam://");if(s){const a=r.Utils.getQueryParams(e);if(a.has("digits")&&null!=a.get("digits"))try{const e=parseInt(a.get("digits").trim(),null);e>10?i=10:e>0&&(i=e)}catch(g){this.logService.error("Invalid digits param.")}if(a.has("period")&&null!=a.get("period"))try{const e=parseInt(a.get("period").trim(),null);e>0&&(t=e)}catch(y){this.logService.error("Invalid period param.")}if(a.has("secret")&&null!=a.get("secret")&&(o=a.get("secret")),a.has("algorithm")&&null!=a.get("algorithm")){const e=a.get("algorithm").toLowerCase();"sha1"!==e&&"sha256"!==e&&"sha512"!==e||(n=e)}}else l&&(o=e.substr("steam://".length),i=5);const c=Math.round((new Date).getTime()/1e3),d=this.leftPad(this.decToHex(Math.floor(c/t)),16,"0"),p=r.Utils.fromHexToArray(d),u=this.b32ToBytes(o);if(!u.length||!p.length)return null;const m=yield this.sign(u,p,n);if(0===m.length)return null;const h=15&m[m.length-1],v=(127&m[h])<<24|(255&m[h+1])<<16|(255&m[h+2])<<8|255&m[h+3];let f="";if(l){let e=2147483647&v;for(let t=0;t<i;t++)f+=a[e%a.length],e=Math.trunc(e/a.length)}else f=(v%Math.pow(10,i)).toString(),f=this.leftPad(f,i,"0");return f}))}getTimeInterval(e){let t=30;if(null!=e&&0===e.toLowerCase().indexOf("otpauth://")){const i=r.Utils.getQueryParams(e);if(i.has("period")&&null!=i.get("period"))try{t=parseInt(i.get("period").trim(),null)}catch(n){this.logService.error("Invalid period param.")}}return t}isAutoCopyEnabled(){return i(this,void 0,void 0,(function*(){return!(yield this.stateService.getDisableAutoTotpCopy())}))}leftPad(e,t,n){return t+1>=e.length&&(e=Array(t+1-e.length).join(n)+e),e}decToHex(e){return(e<15.5?"0":"")+Math.round(e).toString(16)}b32ToHex(e){e=e.toUpperCase();let t="";for(let r=0;r<e.length;r++)o.indexOf(e[r])<0||(t+=e[r]);e=t;let n="",i="";for(let r=0;r<e.length;r++){const t=o.indexOf(e.charAt(r));t<0||(n+=this.leftPad(t.toString(2),5,"0"))}for(let r=0;r+4<=n.length;r+=4){const e=n.substr(r,4);i+=parseInt(e,2).toString(16)}return i}b32ToBytes(e){return r.Utils.fromHexToArray(this.b32ToHex(e))}sign(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.cryptoFunctionService.hmac(t.buffer,e.buffer,n);return new Uint8Array(i)}))}}},51467:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserVerificationService=void 0;const r=n(97583),o=n(33401),a=n(44980);t.UserVerificationService=class{constructor(e,t,n){this.cryptoService=e,this.i18nService=t,this.apiService=n}buildRequest(e,t,n){return i(this,void 0,void 0,(function*(){this.validateInput(e);const i=null!=t?new t:new a.SecretVerificationRequest;return e.type===r.VerificationType.OTP?i.otp=e.secret:i.masterPasswordHash=n?e.secret:yield this.cryptoService.hashPassword(e.secret,null),i}))}verifyUser(e){return i(this,void 0,void 0,(function*(){if(this.validateInput(e),e.type===r.VerificationType.OTP){const n=new o.VerifyOTPRequest(e.secret);try{yield this.apiService.postAccountVerifyOTP(n)}catch(t){throw new Error(this.i18nService.t("invalidVerificationCode"))}}else{if(!(yield this.cryptoService.compareAndUpdateKeyHash(e.secret,null)))throw new Error(this.i18nService.t("invalidMasterPassword"))}return!0}))}requestOTP(){return i(this,void 0,void 0,(function*(){yield this.apiService.postAccountRequestOTP()}))}validateInput(e){if(null==(null==e?void 0:e.secret)||""===e.secret)throw e.type===r.VerificationType.OTP?new Error(this.i18nService.t("verificationCodeRequired")):new Error(this.i18nService.t("masterPassRequired"))}}},45750:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;const r=n(65845),o=n(40251);t.VaultTimeoutService=class{constructor(e,t,n,i,r,o,a,s,l,c,d,p=null,u=null){this.cipherService=e,this.folderService=t,this.collectionService=n,this.cryptoService=i,this.platformUtilsService=r,this.messagingService=o,this.searchService=a,this.tokenService=s,this.policyService=l,this.keyConnectorService=c,this.stateService=d,this.lockedCallback=p,this.loggedOutCallback=u,this.inited=!1}init(e){this.inited||(this.inited=!0,e&&this.startCheck())}startCheck(){this.checkVaultTimeout(),setInterval((()=>this.checkVaultTimeout()),1e4)}isLocked(e){return i(this,void 0,void 0,(function*(){return(yield this.cryptoService.hasKeyStored(r.KeySuffixOptions.Auto,e))&&!(yield this.stateService.getEverBeenUnlocked({userId:e}))&&(yield this.cryptoService.getKey(r.KeySuffixOptions.Auto,e)),!(yield this.cryptoService.hasKeyInMemory(e))}))}checkVaultTimeout(){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.isViewOpen()))for(const e in this.stateService.accounts.getValue())null!=e&&(yield this.shouldLock(e))&&(yield this.executeTimeoutAction(e))}))}lock(e=!1,t){return i(this,void 0,void 0,(function*(){if(yield this.stateService.getIsAuthenticated({userId:t})){if(yield this.keyConnectorService.getUsesKeyConnector()){const e=yield this.isPinLockSet();e[0]&&null!=(yield this.stateService.getDecryptedPinProtected())||e[1]||(yield this.isBiometricLockSet())||(yield this.logOut(t))}null!=t&&t!==(yield this.stateService.getUserId())||this.searchService.clearIndex(),yield this.stateService.setEverBeenUnlocked(!0,{userId:t}),yield this.stateService.setBiometricLocked(!0,{userId:t}),yield this.cryptoService.clearKey(!1,t),yield this.cryptoService.clearOrgKeys(!0,t),yield this.cryptoService.clearKeyPair(!0,t),yield this.cryptoService.clearEncKey(!0,t),yield this.folderService.clearCache(t),yield this.cipherService.clearCache(t),yield this.collectionService.clearCache(t),this.messagingService.send("locked",{userId:t}),null!=this.lockedCallback&&(yield this.lockedCallback(t))}}))}logOut(e){return i(this,void 0,void 0,(function*(){null!=this.loggedOutCallback&&(yield this.loggedOutCallback(e))}))}setVaultTimeoutOptions(e,t){return i(this,void 0,void 0,(function*(){yield this.stateService.setVaultTimeout(e);const n=yield this.tokenService.getToken(),i=yield this.tokenService.getRefreshToken(),r=yield this.tokenService.getClientId(),o=yield this.tokenService.getClientSecret(),a=yield this.stateService.getVaultTimeoutAction();null==e&&0!==e||"logOut"!==t||t===a||(yield this.tokenService.clearToken()),yield this.stateService.setVaultTimeoutAction(t),yield this.tokenService.setToken(n),yield this.tokenService.setRefreshToken(i),yield this.tokenService.setClientId(r),yield this.tokenService.setClientSecret(o),yield this.cryptoService.toggleKey()}))}isPinLockSet(){return i(this,void 0,void 0,(function*(){return[null!=(yield this.stateService.getProtectedPin()),null!=(yield this.stateService.getEncryptedPinProtected())]}))}isBiometricLockSet(){return i(this,void 0,void 0,(function*(){return yield this.stateService.getBiometricUnlock()}))}getVaultTimeout(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getVaultTimeout({userId:e});if(yield this.policyService.policyAppliesToUser(o.PolicyType.MaximumVaultTimeout,null,e)){const n=yield this.policyService.getAll(o.PolicyType.MaximumVaultTimeout,e);let i=Math.min(t,n[0].data.minutes);return(null==t||i<0)&&(i=n[0].data.minutes),t!==i&&(yield this.stateService.setVaultTimeout(i,{userId:e})),i}return t}))}clear(e){return i(this,void 0,void 0,(function*(){yield this.stateService.setEverBeenUnlocked(!1,{userId:e}),yield this.stateService.setDecryptedPinProtected(null,{userId:e}),yield this.stateService.setProtectedPin(null,{userId:e})}))}isLoggedOut(e){return i(this,void 0,void 0,(function*(){return!(yield this.stateService.getIsAuthenticated({userId:e}))}))}shouldLock(e){return i(this,void 0,void 0,(function*(){if(yield this.isLoggedOut(e))return!1;if(yield this.isLocked(e))return!1;const t=yield this.getVaultTimeout(e);if(null==t||t<0)return!1;const n=yield this.stateService.getLastActive({userId:e});if(null==n)return!1;const i=60*t;return((new Date).getTime()-n)/1e3>=i}))}executeTimeoutAction(e){return i(this,void 0,void 0,(function*(){"logOut"===(yield this.stateService.getVaultTimeoutAction({userId:e}))?yield this.logOut(e):yield this.lock(!0,e)}))}}},84042:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebCryptoFunctionService=void 0;const r=n(22079),o=n(70829),a=n(4465);t.WebCryptoFunctionService=class{constructor(e,t){this.win=e,this.platformUtilsService=t,this.crypto=void 0!==e.crypto?e.crypto:null,this.subtle=this.crypto&&void 0!==e.crypto.subtle?e.crypto.subtle:null,this.isIE=t.isIE();const n=e.navigator.userAgent;this.isOldSafari=t.isSafari()&&(n.indexOf(" Version/10.")>-1||n.indexOf(" Version/9.")>-1)}pbkdf2(e,t,n,a){return i(this,void 0,void 0,(function*(){if(this.isIE||this.isOldSafari){const i="sha256"===n?32:64,s=this.toByteString(e),l=this.toByteString(t),c=r.pbkdf2(s,l,a,i,n);return o.Utils.fromByteStringToArray(c).buffer}const i="sha256"===n?256:512,s=this.toBuf(e),l={name:"PBKDF2",salt:this.toBuf(t),iterations:a,hash:{name:this.toWebCryptoAlgorithm(n)}},c=yield this.subtle.importKey("raw",s,{name:"PBKDF2"},!1,["deriveBits"]);return yield this.subtle.deriveBits(l,c,i)}))}hkdf(e,t,n,r,o){return i(this,void 0,void 0,(function*(){const i={name:"HKDF",salt:this.toBuf(t),info:this.toBuf(n),hash:{name:this.toWebCryptoAlgorithm(o)}},a=yield this.subtle.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"]);return yield this.subtle.deriveBits(i,a,8*r)}))}hkdfExpand(e,t,n,r){return i(this,void 0,void 0,(function*(){const i="sha256"===r?32:64;if(n>255*i)throw new Error("outputByteSize is too large.");if(new Uint8Array(e).length<i)throw new Error("prk is too small.");const o=this.toBuf(t),a=new Uint8Array(o);let s=0,l=new Uint8Array(0);const c=Math.ceil(n/i),d=new Uint8Array(c*i);for(let t=0;t<c;t++){const i=new Uint8Array(l.length+a.length+1);if(i.set(l),i.set(a,l.length),i.set([t+1],i.length-1),l=new Uint8Array(yield this.hmac(i.buffer,e,r)),d.set(l,s),s+=l.length,s>=n)break}return d.slice(0,n).buffer}))}hash(e,t){return i(this,void 0,void 0,(function*(){if(this.isIE&&"sha1"===t||"md5"===t){const n="md5"===t?r.md.md5.create():r.md.sha1.create(),i=this.toByteString(e);return n.update(i,"raw"),o.Utils.fromByteStringToArray(n.digest().data).buffer}const n=this.toBuf(e);return yield this.subtle.digest({name:this.toWebCryptoAlgorithm(t)},n)}))}hmac(e,t,n){return i(this,void 0,void 0,(function*(){if(this.isIE&&"sha512"===n){const i=r.hmac.create(),a=this.toByteString(t),s=this.toByteString(e);return i.start(n,a),i.update(s,"raw"),o.Utils.fromByteStringToArray(i.digest().data).buffer}const i={name:"HMAC",hash:{name:this.toWebCryptoAlgorithm(n)}},a=yield this.subtle.importKey("raw",t,i,!1,["sign"]);return yield this.subtle.sign(i,a,e)}))}compare(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.randomBytes(32),i={name:"HMAC",hash:{name:"SHA-256"}},r=yield this.subtle.importKey("raw",n,i,!1,["sign"]),o=yield this.subtle.sign(i,r,e),a=yield this.subtle.sign(i,r,t);if(o.byteLength!==a.byteLength)return!1;const s=new Uint8Array(o),l=new Uint8Array(a);for(let e=0;e<l.length;e++)if(s[e]!==l[e])return!1;return!0}))}hmacFast(e,t,n){const i=r.hmac.create();i.start(n,t),i.update(e);const o=i.digest().getBytes();return Promise.resolve(o)}compareFast(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.randomBytes(32),i=new Uint32Array(n),o=r.util.createBuffer();for(let e=0;e<i.length;e++)o.putInt32(i[e]);const a=o.getBytes(),s=r.hmac.create();s.start("sha256",a),s.update(e);const l=s.digest().getBytes();s.start(null,null),s.update(t);return l===s.digest().getBytes()}))}aesEncrypt(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.subtle.importKey("raw",n,{name:"AES-CBC"},!1,["encrypt"]);return yield this.subtle.encrypt({name:"AES-CBC",iv:t},i,e)}))}aesDecryptFastParameters(e,t,n,i){const o=new a.DecryptParameters;return null!=i.meta&&(o.encKey=i.meta.encKeyByteString,o.macKey=i.meta.macKeyByteString),null==o.encKey&&(o.encKey=r.util.decode64(i.encKeyB64)),o.data=r.util.decode64(e),o.iv=r.util.decode64(t),o.macData=o.iv+o.data,null==o.macKey&&null!=i.macKeyB64&&(o.macKey=r.util.decode64(i.macKeyB64)),null!=n&&(o.mac=r.util.decode64(n)),null==i.meta&&(i.meta={}),null==i.meta.encKeyByteString&&(i.meta.encKeyByteString=o.encKey),null!=o.macKey&&null==i.meta.macKeyByteString&&(i.meta.macKeyByteString=o.macKey),o}aesDecryptFast(e){const t=r.util.createBuffer(e.data),n=r.cipher.createDecipher("AES-CBC",e.encKey);n.start({iv:e.iv}),n.update(t),n.finish();const i=n.output.toString("utf8");return Promise.resolve(i)}aesDecrypt(e,t,n){return i(this,void 0,void 0,(function*(){const i=yield this.subtle.importKey("raw",n,{name:"AES-CBC"},!1,["decrypt"]);return yield this.subtle.decrypt({name:"AES-CBC",iv:t},i,e)}))}rsaEncrypt(e,t,n){return i(this,void 0,void 0,(function*(){const i={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm(n)}},r=yield this.subtle.importKey("spki",t,i,!1,["encrypt"]);return yield this.subtle.encrypt(i,r,e)}))}rsaDecrypt(e,t,n){return i(this,void 0,void 0,(function*(){const i={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm(n)}},r=yield this.subtle.importKey("pkcs8",t,i,!1,["decrypt"]);return yield this.subtle.decrypt(i,r,e)}))}rsaExtractPublicKey(e){return i(this,void 0,void 0,(function*(){const t={name:"RSA-OAEP",hash:{name:this.toWebCryptoAlgorithm("sha1")}},n=yield this.subtle.importKey("pkcs8",e,t,!0,["decrypt"]),i=yield this.subtle.exportKey("jwk",n),r={kty:"RSA",e:i.e,n:i.n,alg:"RSA-OAEP",ext:!0},o=yield this.subtle.importKey("jwk",r,t,!0,["encrypt"]);return yield this.subtle.exportKey("spki",o)}))}rsaGenerateKeyPair(e){return i(this,void 0,void 0,(function*(){const t={name:"RSA-OAEP",modulusLength:e,publicExponent:new Uint8Array([1,0,1]),hash:{name:this.toWebCryptoAlgorithm("sha1")}},n=yield this.subtle.generateKey(t,!0,["encrypt","decrypt"]);return[yield this.subtle.exportKey("spki",n.publicKey),yield this.subtle.exportKey("pkcs8",n.privateKey)]}))}randomBytes(e){const t=new Uint8Array(e);return this.crypto.getRandomValues(t),Promise.resolve(t.buffer)}toBuf(e){let t;return t="string"==typeof e?o.Utils.fromUtf8ToArray(e).buffer:e,t}toByteString(e){let t;return t="string"==typeof e?r.util.encodeUtf8(e):o.Utils.fromBufferToByteString(e),t}toWebCryptoAlgorithm(e){if("md5"===e)throw new Error("MD5 is not supported in WebCrypto.");return"sha1"===e?"SHA-1":"sha256"===e?"SHA-256":"SHA-512"}}},85570:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const i=n(77243);class r extends i.StateService{}t.StateService=r},22707:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptEmergencyComponent=void 0;n(68012),n(91092),n(40349),n(99954),n(77243);const r=n(48903),o=n(92295),a=n(32621),s=n(68012),l=n(99954),c=n(40349),d=n(91092),p=n(77243),u=n(57490),m=n(72596);function h(e,t){1&e&&(a.ɵɵelementStart(0,"div",2),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",3),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",4),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",5),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",6),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))}const v=function(e){return{email:e}};function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",8),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",9),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",10),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"div",11),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",12),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"p",4),a.ɵɵtext(15),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"p"),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelement(21,"hr"),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",13),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"a",14),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"a",15),a.ɵɵtext(30),a.ɵɵpipe(31,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(33,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,7,"emergencyAccess")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",e.name,"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(19,9,"acceptEmergencyAccess")),a.ɵɵadvance(7),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(15,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,11,"logIn"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("queryParams",a.ɵɵpureFunction1(17,v,e.email)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(31,13,"createAccount"),"\n ")}}class g extends o.BaseAcceptComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.apiService=r,this.requiredParameters=["id","name","email","token"],this.failedShortMessage="emergencyInviteAcceptFailedShort",this.failedMessage="emergencyInviteAcceptFailed"}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new r.EmergencyAccessAcceptRequest;t.token=e.token,this.actionPromise=this.apiService.postEmergencyAccessAccept(e.id,t),yield this.actionPromise,this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("emergencyInviteAcceptedDesc"),{timeout:1e4}),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.name=e.name,null!=this.name&&(this.name=this.name.replace(/\+/g," "))}))}}t.AcceptEmergencyComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.StateService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["app-accept-emergency"]],features:[a.ɵɵInheritDefinitionFeature],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,h,17,6,"div",0),a.ɵɵtext(1,"\n"),a.ɵɵtemplate(2,f,38,19,"div",1),a.ɵɵtext(3,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[u.NgIf,s.RouterLinkWithHref],pipes:[m.I18nPipe],encapsulation:2})},11993:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptOrganizationComponent=void 0;n(68012),n(91092),n(82058),n(40349),n(70143),n(99954),n(10685),n(77243);const r=n(86490),o=n(63750),a=n(70829),s=n(92295),l=n(32621),c=n(68012),d=n(99954),p=n(40349),u=n(91092),m=n(77243),h=n(82058),v=n(10685),f=n(70143),g=n(57490),y=n(72596);function x(e,t){1&e&&(l.ɵɵelementStart(0,"div",2),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div"),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"img",3),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",4),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",5),l.ɵɵpipe(9,"i18n"),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"span",6),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(8),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(9,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,4,"loading")))}const S=function(e){return{email:e}};function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",8),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",9),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"p",10),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",11),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"div",12),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"p",4),l.ɵɵtext(15),l.ɵɵelementStart(16,"strong",13),l.ɵɵtext(17),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"p"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelement(24,"hr"),l.ɵɵtext(25,"\n "),l.ɵɵelementStart(26,"div",14),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"a",15),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementStart(32,"a",16),l.ɵɵtext(33),l.ɵɵpipe(34,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n"),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(7),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(8,8,"joinOrganization")),l.ɵɵadvance(8),l.ɵɵtextInterpolate1("\n ",e.orgName,"\n "),l.ɵɵadvance(2),l.ɵɵtextInterpolate(e.email),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,10,"joinOrganizationDesc")),l.ɵɵadvance(7),l.ɵɵproperty("queryParams",l.ɵɵpureFunction1(16,S,e.email)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(30,12,"logIn"),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("queryParams",l.ɵɵpureFunction1(18,S,e.email)),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(34,14,"createAccount"),"\n ")}}class w extends s.BaseAcceptComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,o),this.apiService=r,this.cryptoService=a,this.policyService=s,this.logService=l,this.requiredParameters=["organizationId","organizationUserId","token"]}authedHandler(e){return i(this,void 0,void 0,(function*(){const t=new r.OrganizationUserAcceptRequest;t.token=e.token,(yield this.performResetPasswordAutoEnroll(e))?this.actionPromise=this.apiService.postOrganizationUserAccept(e.organizationId,e.organizationUserId,t).then((()=>this.apiService.getOrganizationKeys(e.organizationId))).then((t=>i(this,void 0,void 0,(function*(){if(null==t)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const n=a.Utils.fromB64ToArray(t.publicKey),i=yield this.cryptoService.getEncKey(),r=yield this.cryptoService.rsaEncrypt(i.key,n.buffer),s=new o.OrganizationUserResetPasswordEnrollmentRequest;return s.resetPasswordKey=r.encryptedString,this.apiService.putOrganizationUserResetPasswordEnrollment(e.organizationId,yield this.stateService.getUserId(),s)})))):this.actionPromise=this.apiService.postOrganizationUserAccept(e.organizationId,e.organizationUserId,t),yield this.actionPromise,this.platformUtilService.showToast("success",this.i18nService.t("inviteAccepted"),this.i18nService.t("inviteAcceptedDesc"),{timeout:1e4}),yield this.stateService.setOrganizationInvitation(null),this.router.navigate(["/vault"])}))}unauthedHandler(e){return i(this,void 0,void 0,(function*(){this.orgName=e.organizationName,null!=this.orgName&&(this.orgName=this.orgName.replace(/\+/g," ")),yield this.stateService.setOrganizationInvitation(e)}))}performResetPasswordAutoEnroll(e){return i(this,void 0,void 0,(function*(){let t=null;try{const n=yield this.apiService.getPoliciesByToken(e.organizationId,e.token,e.email,e.organizationUserId);t=this.policyService.mapPoliciesFromToken(n)}catch(n){this.logService.error(n)}if(null!=t){const n=this.policyService.getResetPasswordPolicyOptions(t,e.organizationId);return n[1]&&n[0].autoEnrollEnabled}return!1}))}}t.AcceptOrganizationComponent=w,w.ɵfac=function(e){return new(e||w)(l.ɵɵdirectiveInject(c.Router),l.ɵɵdirectiveInject(d.PlatformUtilsService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(c.ActivatedRoute),l.ɵɵdirectiveInject(u.ApiService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(h.CryptoService),l.ɵɵdirectiveInject(v.PolicyService),l.ɵɵdirectiveInject(f.LogService))},w.ɵcmp=l.ɵɵdefineComponent({type:w,selectors:[["app-accept-organization"]],features:[l.ɵɵInheritDefinitionFeature],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["src","../../images/logo-dark@2x.png","alt","Bitwarden",1,"mb-4","logo"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"d-block","mt-2"],[1,"d-flex"],["routerLink","/",1,"btn","btn-primary","btn-block",3,"queryParams"],["routerLink","/register",1,"btn","btn-primary","btn-block","ml-2","mt-0",3,"queryParams"]],template:function(e,t){1&e&&(l.ɵɵtemplate(0,x,17,6,"div",0),l.ɵɵtext(1,"\n"),l.ɵɵtemplate(2,b,41,20,"div",1),l.ɵɵtext(3,"\n")),2&e&&(l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.authed))},directives:[g.NgIf,c.RouterLinkWithHref],pipes:[y.I18nPipe],encapsulation:2})},17004:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HintComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954);const i=n(38830),r=n(32621),o=n(68012),a=n(40349),s=n(91092),l=n(99954),c=n(70143),d=n(96832),p=n(637),u=n(17302),m=n(966),h=n(72596);class v extends i.HintComponent{constructor(e,t,n,i,r){super(e,t,n,i,r)}}t.HintComponent=v,v.ɵfac=function(e){return new(e||v)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.ApiService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(c.LogService))},v.ɵcmp=r.ɵɵdefineComponent({type:v,selectors:[["app-hint"]],features:[r.ɵɵInheritDefinitionFeature],decls:52,vars:22,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],[3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"div",7),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"label",8),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"input",9),r.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"small",10),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelement(28,"hr"),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",11),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"button",12),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"span",13),r.ɵɵtext(35),r.ɵɵpipe(36,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelement(38,"i",14),r.ɵɵpipe(39,"i18n"),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"a",15),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,10,"passwordHint")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(19,12,"emailAddress")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.email),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"enterEmailToGetHint")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵproperty("hidden",e.loading),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(36,16,"submit")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(39,18,"loading")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(44,20,"cancel"),"\n ")}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,d.DefaultValueAccessor,d.RequiredValidator,u.AutofocusDirective,m.InputVerbatimDirective,d.NgControlStatus,d.NgModel,o.RouterLinkWithHref],pipes:[h.I18nPipe],encapsulation:2})},2402:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LockComponent=void 0;n(32621),n(68012),n(91092),n(82058),n(57997),n(40349),n(34445),n(70143),n(36424),n(99954),n(77243),n(88332),n(16689);const r=n(10940),o=n(32621),a=n(68012),s=n(40349),l=n(99954),c=n(36424),d=n(82058),p=n(88332),u=n(57997),m=n(16689),h=n(77243),v=n(91092),f=n(70143),g=n(34445),y=n(96832),x=n(637),S=n(17302),b=n(966),w=n(50553),I=n(57490),C=n(72596),E=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class P extends r.LockComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,n,i,r,o,a,l,c,d,p,u),this.routerService=s}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield e.ngOnInit.call(this),this.onSuccessfulSubmit=()=>i(this,void 0,void 0,(function*(){const e=this.routerService.getPreviousUrl();"/"!==e&&-1===e.indexOf("lock")&&(this.successRoute=e),this.router.navigate([this.successRoute])}))}))}}t.LockComponent=P,P.ɵfac=function(e){return new(e||P)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.CryptoService),o.ɵɵdirectiveInject(p.VaultTimeoutService),o.ɵɵdirectiveInject(u.EnvironmentService),o.ɵɵdirectiveInject(m.RouterService),o.ɵɵdirectiveInject(h.StateService),o.ɵɵdirectiveInject(v.ApiService),o.ɵɵdirectiveInject(f.LogService),o.ɵɵdirectiveInject(g.KeyConnectorService),o.ɵɵdirectiveInject(o.NgZone))},P.ɵcmp=o.ɵɵdefineComponent({type:P,selectors:[["app-lock"]],features:[o.ɵɵInheritDefinitionFeature],decls:68,vars:31,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"text-center","mb-4"],["aria-hidden","true",1,"bwi","bwi-lock","bwi-4x","text-muted"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],[1,"form-group"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appAutofocus","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"text-muted","form-text"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-unlock"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"i",5),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"p",6),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",7),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",8),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",9),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",10),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",11),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"button",13),o.ɵɵlistener("click",(function(){return t.togglePassword()})),o.ɵɵpipe(31,"i18n"),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",14),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"small",15),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelement(42,"hr"),o.ɵɵtext(43,"\n "),o.ɵɵelementStart(44,"div",11),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"button",16),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"span"),o.ɵɵtext(49," "),o.ɵɵelement(50,"i",17),o.ɵɵtext(51),o.ɵɵpipe(52,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelement(54,"i",18),o.ɵɵpipe(55,"i18n"),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"button",19),o.ɵɵlistener("click",(function(){return t.logOut()})),o.ɵɵtext(59),o.ɵɵpipe(60,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(13),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,12,"yourVaultIsLocked")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,14,"masterPass")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),o.ɵɵproperty("ngModel",t.masterPassword),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(31,16,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(28,E,!t.showPassword,t.showPassword)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind3(39,18,"loggedInAsEmailOn",t.email,t.webVaultHostname),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(52,22,"unlock")," "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(55,24,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(60,26,"logOut"),"\n ")}},directives:[y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,b.InputVerbatimDirective,y.NgControlStatus,y.NgModel,w.A11yTitleDirective,I.NgClass],pipes:[C.I18nPipe],encapsulation:2})},78129:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LoginComponent=void 0;n(32621),n(68012);const r=n(53232),o=(n(91092),n(26451),n(39229),n(57997),n(40349),n(70143),n(86193),n(99954),n(10685),n(85570),n(78490)),a=n(79384),s=n(32621),l=n(26451),c=n(68012),d=n(40349),p=n(99954),u=n(57997),m=n(86193),h=n(39229),v=n(91092),f=n(10685),g=n(70143),y=n(85570),x=n(96832),S=n(637),b=n(57490),w=n(966),I=n(50553),C=n(52900),E=n(72596);function P(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",31),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"resetPasswordPolicyAutoEnroll")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"resetPasswordAutoEnrollInviteWarning"),"\n "))}const k=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},A=function(e){return{email:e}};class O extends o.LoginComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,r,n,u,o,a,s,d,p),this.route=i,this.apiService=l,this.policyService=c,this.stateService=u,this.showResetPasswordAutoEnrollWarning=!1,this.onSuccessfulLoginNavigate=this.goAfterLogIn}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(r.first()).subscribe((t=>i(this,void 0,void 0,(function*(){null!=t.email&&t.email.indexOf("@")>-1&&(this.email=t.email),null!=t.premium?this.stateService.setLoginRedirect({route:"/settings/premium"}):null!=t.org&&this.stateService.setLoginRedirect({route:"/settings/create-organization",qParams:{plan:t.org}}),null!=t.sponsorshipToken&&this.stateService.setLoginRedirect({route:"/setup/families-for-enterprise",qParams:{token:t.sponsorshipToken}}),yield e.ngOnInit.call(this),this.rememberEmail=yield this.stateService.getRememberEmail()}))));const t=yield this.stateService.getOrganizationInvitation();if(null!=t){let e=null;try{this.policies=yield this.apiService.getPoliciesByToken(t.organizationId,t.token,t.email,t.organizationUserId),e=this.policyService.mapPoliciesFromToken(this.policies)}catch(n){this.logService.error(n)}if(null!=e){const n=this.policyService.getResetPasswordPolicyOptions(e,t.organizationId);this.showResetPasswordAutoEnrollWarning=n[1]&&n[0].autoEnrollEnabled,this.enforcedPasswordPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(e)}}}))}goAfterLogIn(){return i(this,void 0,void 0,(function*(){if(null!=this.enforcedPasswordPolicyOptions){const e=this.passwordGenerationService.passwordStrength(this.masterPassword,this.getPasswordStrengthUserInput()),t=null==e?null:e.score;if(!this.policyService.evaluateMasterPassword(t,this.masterPassword,this.enforcedPasswordPolicyOptions)){const e={};return this.policies.data.map((t=>e[t.id]=new a.PolicyData(t))),yield this.policyService.replace(e),void this.router.navigate(["update-password"])}}const e=yield this.stateService.getLoginRedirect();null!=e?(this.router.navigate([e.route],{queryParams:e.qParams}),yield this.stateService.setLoginRedirect(null)):this.router.navigate([this.successRoute])}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){yield this.stateService.setRememberEmail(this.rememberEmail),this.rememberEmail||(yield this.stateService.setRememberedEmail(null)),yield e.submit.call(this)}))}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e}}t.LoginComponent=O,O.ɵfac=function(e){return new(e||O)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.EnvironmentService),s.ɵɵdirectiveInject(m.PasswordGenerationService),s.ɵɵdirectiveInject(h.CryptoFunctionService),s.ɵɵdirectiveInject(v.ApiService),s.ɵɵdirectiveInject(f.PolicyService),s.ɵɵdirectiveInject(g.LogService),s.ɵɵdirectiveInject(s.NgZone),s.ɵɵdirectiveInject(y.StateService))},O.ɵcmp=s.ɵɵdefineComponent({type:O,selectors:[["app-login"]],features:[s.ɵɵInheritDefinitionFeature],decls:104,vars:45,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["alt","Bitwarden",1,"mb-2","logo","logo-themed"],[1,"lead","text-center","mx-4","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"form-text"],["routerLink","/hint"],[1,"form-check","mb-3"],["type","checkbox","id","rememberEmail","name","RememberEmail",1,"form-check-input",3,"ngModel","ngModelChange"],["for","rememberEmail",1,"form-check-label"],[1,"mb-n3",3,"hidden"],["id","hcaptcha_iframe","height","80"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/register",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"queryParams"],["aria-hidden","true",1,"bwi","bwi-pencil-square"],["routerLink","/sso",1,"btn","btn-outline-secondary","btn-block","mt-2"],["aria-hidden","true",1,"bwi","bwi-bank"],["type","warning",3,"title"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelement(7,"img",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"p",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",6),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",7),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,P,4,6,"app-callout",8),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",9),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",10),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",11),s.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",9),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",12),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",13),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",14),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"button",15),s.ɵɵlistener("click",(function(){return t.togglePassword()})),s.ɵɵpipe(39,"i18n"),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",16),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"small",17),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"a",18),s.ɵɵtext(48),s.ɵɵpipe(49,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"div",19),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"input",20),s.ɵɵlistener("ngModelChange",(function(e){return t.rememberEmail=e})),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"label",21),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"div",22),s.ɵɵtext(63,"\n "),s.ɵɵelement(64,"iframe",23),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelement(67,"hr"),s.ɵɵtext(68,"\n "),s.ɵɵelementStart(69,"div",13),s.ɵɵtext(70,"\n "),s.ɵɵelementStart(71,"button",24),s.ɵɵtext(72,"\n "),s.ɵɵelementStart(73,"span"),s.ɵɵtext(74," "),s.ɵɵelement(75,"i",25),s.ɵɵtext(76),s.ɵɵpipe(77,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"i",26),s.ɵɵpipe(80,"i18n"),s.ɵɵtext(81,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementStart(83,"a",27),s.ɵɵtext(84,"\n "),s.ɵɵelement(85,"i",28),s.ɵɵtext(86),s.ɵɵpipe(87,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(88,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"div",13),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"a",29),s.ɵɵtext(93,"\n "),s.ɵɵelement(94,"i",30),s.ɵɵtext(95),s.ɵɵpipe(96,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(98,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(99,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(100,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(101,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(102,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,20,"loginOrCreateNewAccount")),s.ɵɵadvance(7),s.ɵɵproperty("ngIf",t.showResetPasswordAutoEnrollWarning),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,22,"emailAddress")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.email),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,24,"masterPass")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),s.ɵɵproperty("ngModel",t.masterPassword),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(39,26,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(40,k,!t.showPassword,t.showPassword)),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(49,28,"getMasterPasswordHint")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.rememberEmail),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,30,"rememberEmail")),s.ɵɵadvance(4),s.ɵɵproperty("hidden",!t.showCaptcha()),s.ɵɵadvance(9),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(77,32,"logIn")," "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(80,34,"loading")),s.ɵɵadvance(4),s.ɵɵproperty("queryParams",s.ɵɵpureFunction1(43,A,t.email)),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(87,36,"createAccount"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(96,38,"enterpriseSingleSignOn"),"\n ")}},directives:[x.NgControlStatusGroup,x.NgForm,S.ApiActionDirective,b.NgIf,x.DefaultValueAccessor,x.RequiredValidator,w.InputVerbatimDirective,x.NgControlStatus,x.NgModel,I.A11yTitleDirective,b.NgClass,c.RouterLinkWithHref,x.CheckboxControlValueAccessor,C.CalloutComponent],pipes:[E.I18nPipe],encapsulation:2})},76613:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoverDeleteComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954);const r=n(53849),o=n(32621),a=n(68012),s=n(91092),l=n(99954),c=n(40349),d=n(70143),p=n(96832),u=n(637),m=n(17302),h=n(966),v=n(72596);class f{constructor(e,t,n,i,r){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.logService=r}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.DeleteRecoverRequest;e.email=this.email.trim().toLowerCase(),this.formPromise=this.apiService.postAccountRecoverDelete(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deleteRecoverEmailSent")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.RecoverDeleteComponent=f,f.ɵfac=function(e){return new(e||f)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.ApiService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.LogService))},f.ɵcmp=o.ɵɵdefineComponent({type:f,selectors:[["app-recover-delete"]],decls:52,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",5),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",6),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"p"),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",7),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",8),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"input",9),o.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelement(28,"hr"),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",10),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"button",11),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"span"),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"i",12),o.ɵɵpipe(39,"i18n"),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"a",13),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,9,"deleteAccount")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,11,"deleteRecoverDesc")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,13,"emailAddress")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.email),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(36,15,"submit")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(39,17,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(44,19,"cancel"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,p.DefaultValueAccessor,p.RequiredValidator,m.AutofocusDirective,h.InputVerbatimDirective,p.NgControlStatus,p.NgModel,a.RouterLinkWithHref],pipes:[v.I18nPipe],encapsulation:2})},8938:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RecoverTwoFactorComponent=void 0;n(68012),n(91092),n(26451),n(82058),n(40349),n(70143),n(99954);const r=n(27833),o=n(32621),a=n(68012),s=n(91092),l=n(99954),c=n(40349),d=n(82058),p=n(26451),u=n(70143),m=n(96832),h=n(637),v=n(17302),f=n(966),g=n(72596);class y{constructor(e,t,n,i,r,o,a){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.cryptoService=r,this.authService=o,this.logService=a}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.TwoFactorRecoveryRequest;e.recoveryCode=this.recoveryCode.replace(/\s/g,"").toLowerCase(),e.email=this.email.trim().toLowerCase();const t=yield this.authService.makePreloginKey(this.masterPassword,e.email);e.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,t),this.formPromise=this.apiService.postTwoFactorRecover(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("twoStepRecoverDisabled")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.RecoverTwoFactorComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.ApiService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.CryptoService),o.ɵɵdirectiveInject(p.AuthService),o.ɵɵdirectiveInject(u.LogService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["app-recover-two-factor"]],decls:74,vars:32,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["href","https://bitwarden.com/help/lost-two-step-device/","target","_blank","rel","noopener"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","appAutofocus","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPassword","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","recoveryCode"],["id","recoveryCode","type","text","name","RecoveryCode","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",3),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"p",4),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",5),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",6),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"p"),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementStart(18,"a",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",8),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"label",9),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"input",10),o.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"div",8),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"label",11),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"div",8),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"label",13),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"input",14),o.ɵɵlistener("ngModelChange",(function(e){return t.recoveryCode=e})),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelement(50,"hr"),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"div",15),o.ɵɵtext(53,"\n "),o.ɵɵelementStart(54,"button",16),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"span"),o.ɵɵtext(57),o.ɵɵpipe(58,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelement(60,"i",17),o.ɵɵpipe(61,"i18n"),o.ɵɵtext(62,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementStart(64,"a",18),o.ɵɵtext(65),o.ɵɵpipe(66,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(70,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(71,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,14,"recoverAccountTwoStep")),o.ɵɵadvance(8),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(17,16,"recoverAccountTwoStepDesc"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,18,"learnMore")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(27,20,"emailAddress")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.email),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(36,22,"masterPass")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.masterPassword),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(45,24,"recoveryCodeTitle")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.recoveryCode),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(58,26,"submit")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(61,28,"loading")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(66,30,"cancel"),"\n ")}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,m.DefaultValueAccessor,m.RequiredValidator,v.AutofocusDirective,f.InputVerbatimDirective,m.NgControlStatus,m.NgModel,a.RouterLinkWithHref],pipes:[g.I18nPipe],encapsulation:2})},875:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(26451),n(82058),n(57997),n(40349),n(70143),n(86193),n(99954),n(10685),n(77243),n(4748)),a=n(5784),s=n(79384),l=n(86226),c=n(32621),d=n(26451),p=n(68012),u=n(40349),m=n(82058),h=n(91092),v=n(77243),f=n(99954),g=n(86193),y=n(10685),x=n(57997),S=n(70143),b=n(57490),w=n(96832),I=n(637),C=n(966),E=n(17302),P=n(14296),k=n(50553),A=n(52900),O=n(72596);function T(e,t){1&e&&(c.ɵɵelementStart(0,"header",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",42),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",4),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",43),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",44),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd())}function M(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"The Bitwarden Password Manager"),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"h2"),c.ɵɵtext(6,"\n Trusted by millions of individuals, teams, and organizations worldwide for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"p"),c.ɵɵtext(9,"Store logins, secure notes, and more"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd())}function D(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Teams"),c.ɵɵelement(2,"br"),c.ɵɵelementEnd())}function B(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Enterprise"),c.ɵɵelementEnd())}function R(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"\n Start Your "),c.ɵɵtemplate(4,D,3,0,"span",39),c.ɵɵtemplate(5,B,2,0,"span",39),c.ɵɵtext(6," Free Trial Now\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2"),c.ɵɵtext(9,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Deploy and manage quickly and easily"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"p"),c.ɵɵtext(21,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(4),c.ɵɵproperty("ngIf","teams1"===e.layout||"teams1"===e.layout),c.ɵɵadvance(1),c.ɵɵproperty("ngIf","enterprise2"===e.layout)}}function U(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Teams"),c.ɵɵelement(2,"br"),c.ɵɵelementEnd())}function V(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1,"Enterprise"),c.ɵɵelementEnd())}function F(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"\n Start Your "),c.ɵɵtemplate(4,U,3,0,"span",39),c.ɵɵtemplate(5,V,2,0,"span",39),c.ɵɵtext(6," Free Trial Now\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2"),c.ɵɵtext(9,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Collaborate and share securely"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Deploy and manage quickly and easily"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"p"),c.ɵɵtext(21,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(4),c.ɵɵproperty("ngIf","cnetcmpgnteams"===e.layout),c.ɵɵadvance(1),c.ɵɵproperty("ngIf","cnetcmpgnent"===e.layout)}}function N(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3,"Start Your Premium Account Now"),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"h2"),c.ɵɵtext(6,"\n Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure\n password storage and sharing.\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"p"),c.ɵɵtext(9,"Store logins, secure notes, and more"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"p"),c.ɵɵtext(12,"Secure your account with advanced two-step login"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"p"),c.ɵɵtext(15,"Access anywhere on any device"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"p"),c.ɵɵtext(18,"Create your account to get started"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd())}function _(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",43),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",45),c.ɵɵtext(3,"\n "),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,M,20,0,"div",39),c.ɵɵtext(6,"\n\n "),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,R,23,2,"div",39),c.ɵɵtext(9,"\n\n "),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,F,23,2,"div",39),c.ɵɵtext(12,"\n\n "),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,N,20,0,"div",39),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵproperty("ngIf","teams"===e.layout||"enterprise"===e.layout||"enterprise1"===e.layout||"default"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","teams1"===e.layout||"teams2"===e.layout||"enterprise2"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnteams"===e.layout||"cnetcmpgnent"===e.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnind"===e.layout)}}function j(e,t){1&e&&(c.ɵɵelementStart(0,"p",46),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"createAccount")))}function z(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",47),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"createOrganizationStep1")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"createOrganizationCreatePersonalAccount"),"\n "))}function L(e,t){if(1&e&&(c.ɵɵelementStart(0,"app-callout",48),c.ɵɵtext(1,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}function K(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",12),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",49),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",50),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().acceptPolicies=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",51),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelement(9,"br"),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"a",52),c.ɵɵtext(12),c.ɵɵpipe(13,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(14,",\n "),c.ɵɵelementStart(15,"a",53),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.acceptPolicies),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"acceptPolicies"),""),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(13,6,"termsOfService")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,8,"privacyPolicy"))}}function q(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"figure"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"figcaption"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"cite"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",54),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"blockquote",55),c.ɵɵtext(13,'\n "No more excuses; start using Bitwarden today. The identity you save could be your\n own. The money definitely will be."\n '),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd())}function G(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"figure"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"figcaption"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"cite"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"img",56),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"blockquote",55),c.ɵɵtext(13,"\n “Bitwarden boasts the backing of some of the world's best security experts and an\n attractive, easy-to-use interface”\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd())}function W(e,t){1&e&&(c.ɵɵelementStart(0,"div",57),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",58),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd())}function H(e,t){1&e&&(c.ɵɵelementStart(0,"div",57),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",58),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd())}const $=function(e){return["layout",e]},Q=function(e,t){return{"col-5":e,"col-12":t}},Y=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class J extends o.RegisterComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p){super(e,t,n,i,r,a,s,l,d,p),this.route=o,this.policyService=c,this.showCreateOrgMessage=!1,this.layout=""}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.queryParams.pipe(r.first()).subscribe((e=>{this.referenceData=new l.ReferenceEventRequest,null!=e.email&&e.email.indexOf("@")>-1&&(this.email=e.email),null!=e.premium?this.stateService.setLoginRedirect({route:"/settings/premium"}):null!=e.org&&(this.showCreateOrgMessage=!0,this.referenceData.flow=e.org,this.stateService.setLoginRedirect({route:"/settings/create-organization",qParams:{plan:e.org}})),null!=e.layout&&(this.layout=this.referenceData.layout=e.layout),null!=e.reference?this.referenceData.id=e.reference:this.referenceData.id=("; "+document.cookie).split("; reference=").pop().split(";").shift(),null!=e.sponsorshipToken&&this.stateService.setLoginRedirect({route:"/setup/families-for-enterprise",qParams:{token:e.sponsorshipToken}}),""===this.referenceData.id&&(this.referenceData.id=null)}));const t=yield this.stateService.getOrganizationInvitation();if(null!=t)try{const e=yield this.apiService.getPoliciesByToken(t.organizationId,t.token,t.email,t.organizationUserId);if(null!=e.data){const t=e.data.map((e=>new s.PolicyData(e)));this.policies=t.map((e=>new a.Policy(e)))}}catch(n){this.logService.error(n)}null!=this.policies&&(this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(this.policies)),yield e.ngOnInit.call(this)}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.masterPassword,this.enforcedPolicyOptions)?yield e.submit.call(this):this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet"))}))}}t.RegisterComponent=J,J.ɵfac=function(e){return new(e||J)(c.ɵɵdirectiveInject(d.AuthService),c.ɵɵdirectiveInject(p.Router),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.CryptoService),c.ɵɵdirectiveInject(h.ApiService),c.ɵɵdirectiveInject(p.ActivatedRoute),c.ɵɵdirectiveInject(v.StateService),c.ɵɵdirectiveInject(f.PlatformUtilsService),c.ɵɵdirectiveInject(g.PasswordGenerationService),c.ɵɵdirectiveInject(y.PolicyService),c.ɵɵdirectiveInject(x.EnvironmentService),c.ɵɵdirectiveInject(S.LogService))},J.ɵcmp=c.ɵɵdefineComponent({type:J,selectors:[["app-register"]],features:[c.ɵɵInheritDefinitionFeature],decls:166,vars:85,consts:[[1,"layout",3,"ngClass"],["class","header",4,"ngIf"],["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],["class","col-7",4,"ngIf"],[3,"ngClass"],[1,"row","justify-content-md-center","mt-5"],["class","lead text-center mb-4",4,"ngIf"],[1,"card","d-block"],[1,"card-body"],["type","info","icon","bwi bwi-thumb-tack",3,"title",4,"ngIf"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],[1,"form-text","text-muted"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","appAutofocus","ngModelChange"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPassword","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],[3,"hidden"],["id","hcaptcha_iframe","height","80"],["class","form-group",4,"ngIf"],[1,"d-flex","mb-2"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"col-7","d-flex","align-items-center"],[4,"ngIf"],["class","col-5 d-flex align-items-center justify-content-center",4,"ngIf"],[1,"header"],[1,"container"],[1,"col-7"],["alt","Bitwarden","src","../../images/register-layout/logo-horizontal-white.svg",1,"logo","mb-2"],[1,"mt-5"],[1,"lead","text-center","mb-4"],["type","info","icon","bwi bwi-thumb-tack",3,"title"],["type","info",3,"enforcedPolicyOptions"],[1,"form-check"],["type","checkbox","id","acceptPolicies","name","AcceptPolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","acceptPolicies",1,"form-check-label","small","text-muted"],["href","https://bitwarden.com/terms/","target","_blank","rel","noopener"],["href","https://bitwarden.com/privacy/","target","_blank","rel","noopener"],["src","../../images/register-layout/cnet-logo.svg","alt","cnet logo",1,"w-25","d-block","mx-auto"],[1,"mx-auto","text-center","px-4"],["src","../../images/register-layout/forbes-logo.svg","alt","Forbes Logo",1,"w-25","d-block","mx-auto"],[1,"col-5","d-flex","align-items-center","justify-content-center"],["src","../../images/register-layout/usnews-360-badge.svg","alt","US News 360 Reviews Best Password Manager",1,"w-50","d-block"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵtext(2,"\n "),c.ɵɵtemplate(3,T,13,0,"header",1),c.ɵɵtext(4,"\n\n "),c.ɵɵelementStart(5,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",4),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,_,17,4,"div",5),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"div",6),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",7),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"div",6),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,j,3,3,"p",8),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",9),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"div",10),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,z,4,6,"app-callout",11),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",12),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"label",13),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"small",15),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"div",12),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"label",16),c.ɵɵtext(42),c.ɵɵpipe(43,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"input",17),c.ɵɵlistener("ngModelChange",(function(e){return t.name=e})),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"small",15),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementStart(52,"div",12),c.ɵɵtext(53,"\n "),c.ɵɵtemplate(54,L,2,1,"app-callout",18),c.ɵɵtext(55,"\n "),c.ɵɵelementStart(56,"label",19),c.ɵɵtext(57),c.ɵɵpipe(58,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(59,"\n "),c.ɵɵelementStart(60,"div",20),c.ɵɵtext(61,"\n "),c.ɵɵelementStart(62,"div",21),c.ɵɵtext(63,"\n "),c.ɵɵelementStart(64,"input",22),c.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementStart(66,"app-password-strength",23),c.ɵɵtext(67,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(68,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵelementStart(70,"div"),c.ɵɵtext(71,"\n "),c.ɵɵelementStart(72,"button",24),c.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),c.ɵɵpipe(73,"i18n"),c.ɵɵtext(74,"\n "),c.ɵɵelement(75,"i",25),c.ɵɵtext(76,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelement(78,"div",26),c.ɵɵtext(79,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(80,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(81,"\n "),c.ɵɵelementStart(82,"small",15),c.ɵɵtext(83),c.ɵɵpipe(84,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(85,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(86,"\n "),c.ɵɵelementStart(87,"div",12),c.ɵɵtext(88,"\n "),c.ɵɵelementStart(89,"label",27),c.ɵɵtext(90),c.ɵɵpipe(91,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(92,"\n "),c.ɵɵelementStart(93,"div",20),c.ɵɵtext(94,"\n "),c.ɵɵelementStart(95,"input",28),c.ɵɵlistener("ngModelChange",(function(e){return t.confirmMasterPassword=e})),c.ɵɵelementEnd(),c.ɵɵtext(96,"\n "),c.ɵɵelementStart(97,"button",24),c.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),c.ɵɵpipe(98,"i18n"),c.ɵɵtext(99,"\n "),c.ɵɵelement(100,"i",25),c.ɵɵtext(101,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(102,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(103,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(104,"\n "),c.ɵɵelementStart(105,"div",12),c.ɵɵtext(106,"\n "),c.ɵɵelementStart(107,"label",29),c.ɵɵtext(108),c.ɵɵpipe(109,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(110,"\n "),c.ɵɵelementStart(111,"input",30),c.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),c.ɵɵelementEnd(),c.ɵɵtext(112,"\n "),c.ɵɵelementStart(113,"small",15),c.ɵɵtext(114),c.ɵɵpipe(115,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(116,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(117,"\n "),c.ɵɵelementStart(118,"div",31),c.ɵɵtext(119,"\n "),c.ɵɵelement(120,"iframe",32),c.ɵɵtext(121,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(122,"\n "),c.ɵɵtemplate(123,K,21,10,"div",33),c.ɵɵtext(124,"\n "),c.ɵɵelement(125,"hr"),c.ɵɵtext(126,"\n "),c.ɵɵelementStart(127,"div",34),c.ɵɵtext(128,"\n "),c.ɵɵelementStart(129,"button",35),c.ɵɵtext(130,"\n "),c.ɵɵelementStart(131,"span"),c.ɵɵtext(132),c.ɵɵpipe(133,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(134,"\n "),c.ɵɵelement(135,"i",36),c.ɵɵpipe(136,"i18n"),c.ɵɵtext(137,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(138,"\n "),c.ɵɵelementStart(139,"a",37),c.ɵɵtext(140),c.ɵɵpipe(141,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(142,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(143,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(144,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(145,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(146,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(147,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(148,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(149,"\n "),c.ɵɵelementStart(150,"div",4),c.ɵɵtext(151,"\n "),c.ɵɵelementStart(152,"div",38),c.ɵɵtext(153,"\n "),c.ɵɵtemplate(154,q,16,0,"div",39),c.ɵɵtext(155,"\n\n "),c.ɵɵtemplate(156,G,16,0,"div",39),c.ɵɵtext(157,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(158,"\n "),c.ɵɵtemplate(159,W,4,0,"div",40),c.ɵɵtext(160,"\n "),c.ɵɵtemplate(161,H,4,0,"div",40),c.ɵɵtext(162,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(163,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(164,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(165,"\n")),2&e){const e=c.ɵɵreference(6);c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(71,$,t.layout)),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","default"===t.layout||"teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(73,Q,t.layout,!t.layout)),c.ɵɵadvance(4),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(76,Q,!t.layout,t.layout)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.layout),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.showCreateOrgMessage),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(30,43,"emailAddress")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.email)("appAutofocus",""===t.email),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(36,45,"emailAddressDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(43,47,"yourName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.name)("appAutofocus",""!==t.email),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,49,"yourNameDesc")),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.enforcedPolicyOptions),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(58,51,"masterPass")),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.masterPassword),c.ɵɵadvance(2),c.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),c.ɵɵadvance(6),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(73,53,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(79,Y,!t.showPassword,t.showPassword)),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(84,55,"masterPassDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(91,57,"reTypeMasterPass")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.confirmMasterPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(98,59,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(82,Y,!t.showPassword,t.showPassword)),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(109,61,"masterPassHint")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.hint),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(115,63,"masterPassHintDesc")),c.ɵɵadvance(4),c.ɵɵproperty("hidden",!t.showCaptcha()),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.showTerms),c.ɵɵadvance(6),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(133,65,"submit")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(136,67,"loading")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(141,69,"cancel"),"\n "),c.ɵɵadvance(14),c.ɵɵproperty("ngIf","cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"default"===t.layout),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","cnetcmpgnent"===t.layout||"cnetcmpgnteams"===t.layout||"cnetcmpgnind"===t.layout),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","teams"===t.layout||"teams1"===t.layout||"teams2"===t.layout||"enterprise"===t.layout||"enterprise1"===t.layout||"enterprise2"===t.layout||"default"===t.layout)}},directives:[b.NgClass,b.NgIf,w.NgControlStatusGroup,w.NgForm,I.ApiActionDirective,w.DefaultValueAccessor,w.RequiredValidator,C.InputVerbatimDirective,w.NgControlStatus,w.NgModel,E.AutofocusDirective,P.PasswordStrengthComponent,k.A11yTitleDirective,p.RouterLinkWithHref,A.CalloutComponent,w.CheckboxControlValueAccessor],pipes:[O.I18nPipe],encapsulation:2})},66737:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RemovePasswordComponent=void 0;const i=n(44911),r=n(32621),o=n(57490),a=n(72596);function s(e,t){1&e&&(r.ɵɵelementStart(0,"div",2),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div"),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"img",3),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"p",4),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",5),r.ɵɵpipe(9,"i18n"),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"span",6),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(8),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(9,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,4,"loading")))}function l(e,t){1&e&&(r.ɵɵelement(0,"i",16),r.ɵɵpipe(1,"i18n")),2&e&&r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,1,"loading"))}function c(e,t){1&e&&(r.ɵɵelement(0,"i",16),r.ɵɵpipe(1,"i18n")),2&e&&r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,1,"loading"))}function d(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",7),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",8),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",9),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"p",10),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"hr"),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",11),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"div",12),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"p"),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n\n "),r.ɵɵelementStart(20,"button",13),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().convert()})),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,l,2,3,"i",14),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().leave()})),r.ɵɵtext(27,"\n "),r.ɵɵtemplate(28,c,2,3,"i",14),r.ɵɵtext(29),r.ɵɵpipe(30,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n"),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,8,"removeMasterPassword")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(18,10,"convertOrganizationEncryptionDesc",e.organization.name)),r.ɵɵadvance(3),r.ɵɵproperty("disabled",e.actionPromise),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.continuing),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,13,"removeMasterPassword"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("disabled",e.actionPromise),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.leaving),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(30,15,"leaveOrganization"),"\n ")}}class p extends i.RemovePasswordComponent{}t.RemovePasswordComponent=p,p.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(p)))(t||p)}}(),p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-remove-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:4,vars:2,consts:[["class","mt-5 d-flex justify-content-center",4,"ngIf"],["class","container",4,"ngIf"],[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"container"],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","button",1,"btn","btn-primary","btn-block",3,"disabled","click"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","btn-block",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵtemplate(0,s,17,6,"div",0),r.ɵɵtext(1,"\n"),r.ɵɵtemplate(2,d,36,17,"div",1),r.ɵɵtext(3,"\n")),2&e&&(r.ɵɵproperty("ngIf",t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.loading))},directives:[o.NgIf],pipes:[a.I18nPipe],encapsulation:2})},65345:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;n(68012),n(91092),n(82058),n(40349),n(36424),n(86193),n(99954),n(10685),n(77243),n(2173);const i=n(89487),r=n(32621),o=n(91092),a=n(40349),s=n(82058),l=n(36424),c=n(86193),d=n(99954),p=n(10685),u=n(68012),m=n(2173),h=n(77243),v=n(96832),f=n(637),g=n(57490),y=n(52900),x=n(966),S=n(14296),b=n(50553),w=n(72596);function I(e,t){1&e&&(r.ɵɵelementStart(0,"div",8),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",9),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4),r.ɵɵpipe(5,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(5,4,"loading"),"\n "))}function C(e,t){1&e&&(r.ɵɵelementStart(0,"app-callout",30),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"resetPasswordPolicyAutoEnroll")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"resetPasswordAutoEnrollInviteWarning"),"\n "))}function E(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",31),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const P=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function k(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",10),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"app-callout",11),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,C,4,6,"app-callout",12),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",13),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,E,2,1,"app-callout",14),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"label",15),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"div",16),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"div",17),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"input",18),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPassword=t}))("input",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"app-password-strength",19),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div"),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().togglePassword(!1)})),r.ɵɵpipe(29,"i18n"),r.ɵɵtext(30,"\n "),r.ɵɵelement(31,"i",21),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelement(34,"div",22),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"small",23),r.ɵɵtext(39),r.ɵɵpipe(40,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",13),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"label",24),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"div",16),r.ɵɵtext(50,"\n "),r.ɵɵelementStart(51,"input",25),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPasswordRetype=t})),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementStart(53,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().togglePassword(!0)})),r.ɵɵpipe(54,"i18n"),r.ɵɵtext(55,"\n "),r.ɵɵelement(56,"i",21),r.ɵɵtext(57,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementStart(61,"div",13),r.ɵɵtext(62,"\n "),r.ɵɵelementStart(63,"label",26),r.ɵɵtext(64),r.ɵɵpipe(65,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementStart(67,"input",27),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().hint=t})),r.ɵɵelementEnd(),r.ɵɵtext(68,"\n "),r.ɵɵelementStart(69,"small",23),r.ɵɵtext(70),r.ɵɵpipe(71,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(72,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(73,"\n "),r.ɵɵelement(74,"hr"),r.ɵɵtext(75,"\n "),r.ɵɵelementStart(76,"div",16),r.ɵɵtext(77,"\n "),r.ɵɵelementStart(78,"button",28),r.ɵɵtext(79,"\n "),r.ɵɵelement(80,"i",9),r.ɵɵpipe(81,"i18n"),r.ɵɵtext(82,"\n "),r.ɵɵelementStart(83,"span"),r.ɵɵtext(84),r.ɵɵpipe(85,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(86,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(87,"\n "),r.ɵɵelementStart(88,"button",29),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().logOut()})),r.ɵɵtext(89),r.ɵɵpipe(90,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(91,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(92,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(1);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,23,"ssoCompleteRegistration")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.resetPasswordAutoEnroll),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.enforcedPolicyOptions),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(14,25,"masterPass")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),r.ɵɵproperty("ngModel",e.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",e.masterPasswordScore)("showText",!0),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(29,27,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(45,P,!e.showPassword,e.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(40,29,"masterPassDesc")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,31,"reTypeMasterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),r.ɵɵproperty("ngModel",e.masterPasswordRetype),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(54,33,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(48,P,!e.showPassword,e.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(65,35,"masterPassHint")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.hint),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(71,37,"masterPassHintDesc")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",t.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(81,39,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(85,41,"submit")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(90,43,"logOut"),"\n ")}}class A extends i.SetPasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(t,n,i,r,o,a,s,e,l,c,d)}}t.SetPasswordComponent=A,A.ɵfac=function(e){return new(e||A)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.CryptoService),r.ɵɵdirectiveInject(l.MessagingService),r.ɵɵdirectiveInject(c.PasswordGenerationService),r.ɵɵdirectiveInject(d.PlatformUtilsService),r.ɵɵdirectiveInject(p.PolicyService),r.ɵɵdirectiveInject(u.Router),r.ɵɵdirectiveInject(m.SyncService),r.ɵɵdirectiveInject(u.ActivatedRoute),r.ɵɵdirectiveInject(h.StateService))},A.ɵcmp=r.ɵɵdefineComponent({type:A,selectors:[["app-set-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:21,vars:6,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],["class","card-body text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"card-body"],["type","info"],["type","warning",3,"title",4,"ngIf"],[1,"form-group"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],[1,"form-text","text-muted"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","warning",3,"title"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,I,6,6,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,k,93,51,"div",7),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n")),2&e&&(r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,4,"setMasterPassword")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.syncLoading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.syncLoading))},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.CalloutComponent,v.DefaultValueAccessor,v.RequiredValidator,x.InputVerbatimDirective,v.NgControlStatus,v.NgModel,S.PasswordStrengthComponent,b.A11yTitleDirective,g.NgClass],pipes:[w.I18nPipe],encapsulation:2})},62194:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SsoComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(26451),n(39229),n(57997),n(40349),n(70143),n(86193),n(99954),n(77243),n(11882)),a=n(32621),s=n(26451),l=n(68012),c=n(40349),d=n(77243),p=n(99954),u=n(91092),m=n(39229),h=n(57997),v=n(86193),f=n(70143),g=n(96832),y=n(637),x=n(57490),S=n(17302),b=n(72596);function w(e,t){1&e&&(a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",8),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(5,4,"loading"),"\n "))}function I(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",7),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",9),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"label",10),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"input",11),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().identifier=t})),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelement(15,"hr"),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"div",12),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"button",13),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"span"),a.ɵɵtext(22," "),a.ɵɵelement(23,"i",14),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelement(27,"i",8),a.ɵɵpipe(28,"i18n"),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"a",15),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext(),t=a.ɵɵreference(1);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,7,"ssoLogInWithOrgIdentifier")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(10,9,"organizationIdentifier")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",e.identifier),a.ɵɵadvance(7),a.ɵɵproperty("disabled",t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(25,11,"logIn")," "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(28,13,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(33,15,"cancel"),"\n ")}}class C extends o.SsoComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,a,s,l,c,d),this.redirectUri=window.location.origin+"/sso-connector.html",this.clientId="web"}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this),this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.identifier)this.identifier=e.identifier;else{const e=yield this.stateService.getSsoOrgIdentifier();null!=e&&(this.identifier=e)}}))))}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){yield this.stateService.setSsoOrganizationIdentifier(this.identifier),"browser"===this.clientId&&(document.cookie=`ssoHandOffMessage=${this.i18nService.t("ssoHandOff")};SameSite=strict`),e.submit.call(this)}))}}t.SsoComponent=C,C.ɵfac=function(e){return new(e||C)(a.ɵɵdirectiveInject(s.AuthService),a.ɵɵdirectiveInject(l.Router),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(l.ActivatedRoute),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PlatformUtilsService),a.ɵɵdirectiveInject(u.ApiService),a.ɵɵdirectiveInject(m.CryptoFunctionService),a.ɵɵdirectiveInject(h.EnvironmentService),a.ɵɵdirectiveInject(v.PasswordGenerationService),a.ɵɵdirectiveInject(f.LogService))},C.ɵcmp=a.ɵɵdefineComponent({type:C,selectors:[["app-sso"]],features:[a.ɵɵInheritDefinitionFeature],decls:19,vars:3,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["alt","Bitwarden",1,"logo","mb-2","logo-themed"],[1,"card","d-block","mt-4"],["class","card-body",4,"ngIf"],[1,"card-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"form-group"],["for","identifier"],["id","identifier","type","text","name","Identifier","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelement(7,"img",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",5),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,w,6,6,"div",6),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,I,36,17,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n")),2&e&&(a.ɵɵproperty("appApiAction",t.initiateSsoFormPromise),a.ɵɵadvance(11),a.ɵɵproperty("ngIf",t.loggingIn),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.loggingIn))},directives:[g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,x.NgIf,g.DefaultValueAccessor,g.RequiredValidator,S.AutofocusDirective,g.NgControlStatus,g.NgModel,l.RouterLinkWithHref],pipes:[b.I18nPipe],encapsulation:2})},72664:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;n(68012),n(26451),n(40349),n(99954);const i=n(5775),r=n(32621),o=n(26451),a=n(68012),s=n(40349),l=n(99954),c=n(50553),d=n(57490),p=n(72596);function u(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",11),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",12),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"img",20),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",14),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3"),r.ɵɵtext(12),r.ɵɵelementEnd(),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"div",15),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"button",16),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext().choose(t)})),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit;r.ɵɵadvance(6),r.ɵɵclassMap("mfaType"+e.type),r.ɵɵproperty("alt",e.name+" logo"),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.name),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.description,"\n "),r.ɵɵadvance(4),r.ɵɵattribute("aria-describedby",e.name),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(19,7,"select"),"\n ")}}class m extends i.TwoFactorOptionsComponent{constructor(e,t,n,i){super(e,t,n,i,window)}}t.TwoFactorOptionsComponent=m,m.ɵfac=function(e){return new(e||m)(r.ɵɵdirectiveInject(o.AuthService),r.ɵɵdirectiveInject(a.Router),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.PlatformUtilsService))},m.ɵcmp=r.ɵɵdefineComponent({type:m,selectors:[["app-two-factor-options"]],features:[r.ɵɵInheritDefinitionFeature],decls:65,vars:22,consts:[["role","dialog","aria-modal","true","aria-labelledby","twoStepOptionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","twoStepOptionsTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"list-group","list-group-flush-2fa"],["class","list-group-item list-group-item-action",4,"ngFor","ngForOf"],[1,"list-group-item","list-group-item-action",3,"click"],[1,"two-factor-content"],[1,"logo-col"],["alt","rc logo",1,"recovery-code-img"],[1,"text-col"],[1,"btn-col"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"click"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"list-group-item","list-group-item-action"],[3,"alt"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",5),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",6),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",7),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"div",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,u,23,9,"div",9),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",10),r.ɵɵlistener("click",(function(){return t.recover()})),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"div",11),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",12),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"img",13),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",14),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"h3"),r.ɵɵtext(38),r.ɵɵpipe(39,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(40),r.ɵɵpipe(41,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",15),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"button",16),r.ɵɵlistener("click",(function(){return t.recover()})),r.ɵɵpipe(46,"i18n"),r.ɵɵtext(47),r.ɵɵpipe(48,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"div",17),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"button",18),r.ɵɵtext(58),r.ɵɵpipe(59,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(63,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(64,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,8,"twoStepOptions")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,10,"close")),r.ɵɵadvance(12),r.ɵɵproperty("ngForOf",t.providers),r.ɵɵadvance(14),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(39,12,"recoveryCodeTitle")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(41,14,"recoveryCodeDesc"),"\n "),r.ɵɵadvance(5),r.ɵɵattribute("aria-descibedby",r.ɵɵpipeBind1(46,16,"recoveryCodeTitle")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(48,18,"select"),"\n "),r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(59,20,"close"),"\n "))},directives:[c.A11yTitleDirective,d.NgForOf],pipes:[p.I18nPipe],encapsulation:2})},27306:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorComponent=void 0;const r=n(32621),o=(n(68012),n(91092),n(26451),n(57997),n(40349),n(70143),n(99954),n(77243),n(29546),n(21509)),a=n(72664),s=n(32621),l=n(26451),c=n(68012),d=n(40349),p=n(91092),u=n(99954),m=n(77243),h=n(57997),v=n(29546),f=n(70143),g=n(96832),y=n(637),x=n(57490),S=n(80507),b=n(17302),w=n(966),I=n(72596),C=["twoFactorOptions"];function E(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"enterVerificationCodeApp"),"\n "))}function P(e,t){if(1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(2,1,"enterVerificationCodeEmail",e.twoFactorEmail),"\n ")}}function k(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",22),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).sendEmail(!0)})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵproperty("appApiAction",e.emailPromise),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,2,"sendVerificationCodeEmailAgain"),"\n ")}}function A(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",20),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,k,3,4,"a",21),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email)}}function O(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,E,3,3,"p",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,P,3,4,"p",7),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",16),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"label",17),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"input",18),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,A,4,1,"small",19),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Authenticator),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.selectedProviderType===e.providerType.Email)}}function T(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p",13),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"picture"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"source",23),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"source",24),s.ɵɵtext(11,"\n "),s.ɵɵelement(12,"img",25),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",16),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"label",17),s.ɵɵtext(18),s.ɵɵpipe(19,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"input",26),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"insertYubiKey")),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(19,5,"verificationCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function M(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",27),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"iframe",28),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("allow",e.webAuthnAllow)}}function D(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",29),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"iframe",30),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd())}function B(e,t){1&e&&(s.ɵɵelement(0,"i",31),s.ɵɵpipe(1,"i18n")),2&e&&s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,1,"loading"))}function R(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",32),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",33),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().remember=t})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",34),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngModel",e.remember),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"rememberMe"))}}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"p"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"noTwoStepProviders")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"noTwoStepProviders2")))}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",35),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span"),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",36),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",37),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()),2&e){s.ɵɵnextContext();const e=s.ɵɵreference(1);s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(6,3,"continue"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(9,5,"loading"))}}function F(e,t){}const N=function(e){return{"col-9":e}};class _ extends o.TwoFactorComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,window,a,o,l,c),this.modalService=s,this.onSuccessfulLoginNavigate=this.goAfterLogIn}anotherMethod(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(a.TwoFactorOptionsComponent,this.twoFactorOptionsModal,(t=>{t.onProviderSelected.subscribe((t=>i(this,void 0,void 0,(function*(){e.close(),this.selectedProviderType=t,yield this.init()})))),t.onRecoverSelected.subscribe((()=>{e.close()}))}))}))}goAfterLogIn(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getLoginRedirect();null!=e?(this.router.navigate([e.route],{queryParams:e.qParams}),yield this.stateService.setLoginRedirect(null)):this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}})}))}}t.TwoFactorComponent=_,_.ɵfac=function(e){return new(e||_)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.ApiService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(m.StateService),s.ɵɵdirectiveInject(h.EnvironmentService),s.ɵɵdirectiveInject(v.ModalService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(f.LogService))},_.ɵcmp=s.ɵɵdefineComponent({type:_,selectors:[["app-two-factor"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(C,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.twoFactorOptionsModal=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:54,vars:19,consts:[["ngNativeValidate","","autocomplete","off",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5",3,"ngClass"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],[4,"ngIf"],["class","bwi bwi-spinner text-muted bwi-spin pull-right","aria-hidden","true",3,"title",4,"ngIf"],["class","form-check",4,"ngIf"],[1,"d-flex","mb-3"],["type","submit","class","btn btn-primary btn-block btn-submit",3,"disabled",4,"ngIf"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"text-center"],["href","#","appStopClick","",3,"click"],["twoFactorOptions",""],[1,"form-group"],["for","code",1,"sr-only"],["id","code","type","text","name","Code","required","","appAutofocus","","inputmode","tel","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-text",4,"ngIf"],[1,"form-text"],["href","#","appStopClick","",3,"appApiAction","click",4,"ngIf"],["href","#","appStopClick","",3,"appApiAction","click"],["srcset","../../images/yubikey.avif","type","image/avif"],["srcset","../../images/yubikey.webp","type","image/webp"],["src","../../images/yubikey.jpg","alt","",1,"rounded","img-fluid","mb-3"],["id","code","type","password","name","Code","required","","appAutofocus","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["id","web-authn-frame",1,"mb-3"],["id","webauthn_iframe",3,"allow"],["id","duo-frame",1,"mb-3"],["id","duo_iframe"],["aria-hidden","true",1,"bwi","bwi-spinner","text-muted","bwi-spin","pull-right",3,"title"],[1,"form-check"],["id","remember","type","checkbox","name","Remember",1,"form-check-input",3,"ngModel","ngModelChange"],["for","remember",1,"form-check-label"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"p",4),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",5),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",6),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,O,17,7,"ng-container",7),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,T,24,7,"ng-container",7),s.ɵɵtext(17,"\n "),s.ɵɵtemplate(18,M,7,1,"ng-container",7),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,D,7,0,"ng-container",7),s.ɵɵtext(21,"\n "),s.ɵɵtemplate(22,B,2,3,"i",8),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,R,8,4,"div",9),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,U,10,6,"ng-container",7),s.ɵɵtext(27,"\n "),s.ɵɵelement(28,"hr"),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",10),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,V,11,7,"button",11),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"a",12),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"div",13),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"a",14),s.ɵɵlistener("click",(function(){return t.anotherMethod()})),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n"),s.ɵɵtemplate(51,F,0,0,"ng-template",null,15,s.ɵɵtemplateRefExtractor),s.ɵɵtext(53,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(17,N,t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo)),s.ɵɵadvance(3),s.ɵɵtextInterpolate(t.title),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Email||t.selectedProviderType===t.providerType.Authenticator),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Yubikey),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.WebAuthn),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.selectedProviderType===t.providerType.Duo||t.selectedProviderType===t.providerType.OrganizationDuo),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.loading&&t.selectedProviderType===t.providerType.WebAuthn),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null!=t.selectedProviderType),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==t.selectedProviderType),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",null!=t.selectedProviderType&&t.selectedProviderType!==t.providerType.Duo&&t.selectedProviderType!==t.providerType.OrganizationDuo&&t.selectedProviderType!==t.providerType.WebAuthn),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(36,13,"cancel"),"\n "),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,15,"useAnotherTwoStepMethod"))}},directives:[g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,x.NgClass,x.NgIf,c.RouterLinkWithHref,S.StopClickDirective,g.DefaultValueAccessor,g.RequiredValidator,b.AutofocusDirective,w.InputVerbatimDirective,g.NgControlStatus,g.NgModel,g.CheckboxControlValueAccessor],pipes:[I.I18nPipe],encapsulation:2})},55299:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdatePasswordComponent=void 0;n(68012),n(91092),n(82058),n(40349),n(70143),n(36424),n(86193),n(99954),n(10685);const i=n(79754),r=(n(77243),n(61554),n(32621)),o=n(68012),a=n(40349),s=n(99954),l=n(86193),c=n(10685),d=n(82058),p=n(36424),u=n(91092),m=n(70143),h=n(77243),v=n(61554),f=n(96832),g=n(637),y=n(52900),x=n(57490),S=n(966),b=n(14296),w=n(72596);function I(e,t){if(1&e&&r.ɵɵelement(0,"app-callout",22),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class C extends i.UpdatePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(e,t,n,i,r,o,a,s,c,d,l)}}t.UpdatePasswordComponent=C,C.ɵfac=function(e){return new(e||C)(r.ɵɵdirectiveInject(o.Router),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.PasswordGenerationService),r.ɵɵdirectiveInject(c.PolicyService),r.ɵɵdirectiveInject(d.CryptoService),r.ɵɵdirectiveInject(p.MessagingService),r.ɵɵdirectiveInject(u.ApiService),r.ɵɵdirectiveInject(m.LogService),r.ɵɵdirectiveInject(h.StateService),r.ɵɵdirectiveInject(v.UserVerificationService))},C.ɵcmp=r.ɵɵdefineComponent({type:C,selectors:[["app-update-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:91,vars:33,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-4"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","currentMasterPassword"],["id","currentMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","newMasterPassword"],["id","newMasterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-callout",7),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵtemplate(19,I,1,1,"app-callout",8),r.ɵɵtext(20,"\n\n "),r.ɵɵelementStart(21,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"div",9),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",10),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"div",11),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"label",12),r.ɵɵtext(31),r.ɵɵpipe(32,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"input",13),r.ɵɵlistener("ngModelChange",(function(e){return t.currentMasterPassword=e})),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"div",9),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"div",10),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",11),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"label",14),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"input",15),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelement(51,"app-password-strength",16),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"div",10),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"div",11),r.ɵɵtext(58,"\n "),r.ɵɵelementStart(59,"label",17),r.ɵɵtext(60),r.ɵɵpipe(61,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementStart(63,"input",18),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),r.ɵɵelementEnd(),r.ɵɵtext(64,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(65,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(67,"\n "),r.ɵɵelementStart(68,"button",19),r.ɵɵtext(69,"\n "),r.ɵɵelement(70,"i",20),r.ɵɵpipe(71,"i18n"),r.ɵɵtext(72,"\n "),r.ɵɵelementStart(73,"span"),r.ɵɵtext(74),r.ɵɵpipe(75,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(76,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(77,"\n "),r.ɵɵelementStart(78,"button",21),r.ɵɵlistener("click",(function(){return t.cancel()})),r.ɵɵtext(79,"\n "),r.ɵɵelementStart(80,"span"),r.ɵɵtext(81),r.ɵɵpipe(82,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(83,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(84,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(85,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(86,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(87,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(88,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(89,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(90,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,17,"updateMasterPassword")),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(17,19,"masterPasswordInvalidWarning")," "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.enforcedPolicyOptions),r.ɵɵadvance(2),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(10),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(32,21,"currentMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.currentMasterPassword),r.ɵɵadvance(12),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,23,"newMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(61,25,"confirmNewMasterPass")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPasswordRetype),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(71,27,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(75,29,"changeMasterPassword")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(82,31,"cancel"))}},directives:[f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.CalloutComponent,x.NgIf,f.DefaultValueAccessor,f.RequiredValidator,S.InputVerbatimDirective,f.NgControlStatus,f.NgModel,b.PasswordStrengthComponent],pipes:[w.I18nPipe],encapsulation:2})},25197:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateTempPasswordComponent=void 0;n(91092),n(82058),n(40349),n(70143),n(36424),n(86193),n(99954),n(10685),n(2173);const i=n(30747),r=(n(77243),n(32621)),o=n(40349),a=n(99954),s=n(86193),l=n(10685),c=n(82058),d=n(36424),p=n(91092),u=n(70143),m=n(77243),h=n(2173),v=n(96832),f=n(637),g=n(52900),y=n(57490),x=n(966),S=n(14296),b=n(50553),w=n(72596);function I(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",26),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const C=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class E extends i.UpdateTempPasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,l,c,s)}}t.UpdateTempPasswordComponent=E,E.ɵfac=function(e){return new(e||E)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.PasswordGenerationService),r.ɵɵdirectiveInject(l.PolicyService),r.ɵɵdirectiveInject(c.CryptoService),r.ɵɵdirectiveInject(d.MessagingService),r.ɵɵdirectiveInject(p.ApiService),r.ɵɵdirectiveInject(u.LogService),r.ɵɵdirectiveInject(m.StateService),r.ɵɵdirectiveInject(h.SyncService))},E.ɵcmp=r.ɵɵdefineComponent({type:E,selectors:[["app-update-temp-password"]],features:[r.ɵɵInheritDefinitionFeature],decls:105,vars:51,consts:[["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-4"],[1,"lead","text-center","mb-4"],[1,"card","d-block"],[1,"card-body"],["type","warning"],[1,"form-group"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["for","masterPassword"],[1,"d-flex"],[1,"w-100"],["id","masterPassword","name","MasterPasswordHash","required","","appInputVerbatim","",1,"text-monospace","form-control","mb-1",3,"type","ngModel","ngModelChange","input"],[3,"score","showText"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"progress-bar","invisible"],["for","masterPasswordRetype"],["id","masterPasswordRetype","name","MasterPasswordRetype","required","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["for","hint"],["id","hint","type","text","name","Hint",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"div",3),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"p",4),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",5),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"div",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-callout",7),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"div",8),r.ɵɵtext(20,"\n "),r.ɵɵtemplate(21,I,2,1,"app-callout",9),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"label",10),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"div",11),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",12),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"input",13),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"app-password-strength",14),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"div"),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"button",15),r.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelement(42,"i",16),r.ɵɵtext(43,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelement(45,"div",17),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementStart(50,"div",8),r.ɵɵtext(51,"\n "),r.ɵɵelementStart(52,"label",18),r.ɵɵtext(53),r.ɵɵpipe(54,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(55,"\n "),r.ɵɵelementStart(56,"div",11),r.ɵɵtext(57,"\n "),r.ɵɵelementStart(58,"input",19),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementStart(60,"button",15),r.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),r.ɵɵpipe(61,"i18n"),r.ɵɵtext(62,"\n "),r.ɵɵelement(63,"i",16),r.ɵɵtext(64,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(65,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(67,"\n "),r.ɵɵelementStart(68,"div",8),r.ɵɵtext(69,"\n "),r.ɵɵelementStart(70,"label",20),r.ɵɵtext(71),r.ɵɵpipe(72,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(73,"\n "),r.ɵɵelementStart(74,"input",21),r.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),r.ɵɵelementEnd(),r.ɵɵtext(75,"\n "),r.ɵɵelementStart(76,"small",22),r.ɵɵtext(77),r.ɵɵpipe(78,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(79,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(80,"\n "),r.ɵɵelement(81,"hr"),r.ɵɵtext(82,"\n "),r.ɵɵelementStart(83,"div",11),r.ɵɵtext(84,"\n "),r.ɵɵelementStart(85,"button",23),r.ɵɵtext(86,"\n "),r.ɵɵelement(87,"i",24),r.ɵɵpipe(88,"i18n"),r.ɵɵtext(89,"\n "),r.ɵɵelementStart(90,"span"),r.ɵɵtext(91),r.ɵɵpipe(92,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(93,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(94,"\n "),r.ɵɵelementStart(95,"button",25),r.ɵɵlistener("click",(function(){return t.logOut()})),r.ɵɵtext(96),r.ɵɵpipe(97,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(98,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(99,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(100,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(101,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(102,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(103,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(104,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,23,"updateMasterPassword")),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(17,25,"updateMasterPasswordWarning")," "),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.enforcedPolicyOptions),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,27,"masterPass")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(40,29,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(45,C,!t.showPassword,t.showPassword)),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(54,31,"reTypeMasterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPasswordRetype),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(61,33,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(48,C,!t.showPassword,t.showPassword)),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(72,35,"masterPassHint")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.hint),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(78,37,"masterPassHintDesc")),r.ɵɵadvance(8),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(88,39,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(92,41,"submit")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(97,43,"logOut"),"\n ")}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.CalloutComponent,y.NgIf,v.DefaultValueAccessor,v.RequiredValidator,x.InputVerbatimDirective,v.NgControlStatus,v.NgModel,S.PasswordStrengthComponent,b.A11yTitleDirective,y.NgClass],pipes:[w.I18nPipe],encapsulation:2})},11398:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailTokenComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(40349),n(70143),n(99954),n(77243),n(60967)),a=n(32621),s=n(68012),l=n(99954),c=n(40349),d=n(91092),p=n(70143),u=n(77243),m=n(72596);class h{constructor(e,t,n,i,r,o,a){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.apiService=r,this.logService=o,this.stateService=a}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.userId&&null!=e.token)try{return yield this.apiService.postAccountVerifyEmailToken(new o.VerifyEmailRequest(e.userId,e.token)),(yield this.stateService.getIsAuthenticated())&&(yield this.apiService.refreshIdentityToken()),this.platformUtilsService.showToast("success",null,this.i18nService.t("emailVerified")),void this.router.navigate(["/"])}catch(t){this.logService.error(t)}this.platformUtilsService.showToast("error",null,this.i18nService.t("emailVerifiedFailed")),this.router.navigate(["/"])}))))}}t.VerifyEmailTokenComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(d.ApiService),a.ɵɵdirectiveInject(p.LogService),a.ɵɵdirectiveInject(u.StateService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["app-verify-email-token"]],decls:18,vars:6,consts:[[1,"mt-5","d-flex","justify-content-center"],["alt","Bitwarden",1,"mb-4","logo","logo-themed"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"img",1),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"p",2),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"i",3),a.ɵɵpipe(9,"i18n"),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"span",4),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n")),2&e&&(a.ɵɵadvance(8),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(9,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,4,"loading")))},pipes:[m.I18nPipe],encapsulation:2})},60909:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyRecoverDeleteComponent=void 0;n(68012);const r=n(53232),o=(n(91092),n(40349),n(70143),n(99954),n(66092)),a=n(32621),s=n(68012),l=n(91092),c=n(99954),d=n(40349),p=n(70143),u=n(96832),m=n(637),h=n(52900),v=n(72596);class f{constructor(e,t,n,i,r,o){this.router=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.route=r,this.logService=o}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){null!=e.userId&&null!=e.token&&null!=e.email?(this.userId=e.userId,this.token=e.token,this.email=e.email):this.router.navigate(["/"])}))))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new o.VerifyDeleteRecoverRequest(this.userId,this.token);this.formPromise=this.apiService.postAccountRecoverDeleteToken(e),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.router.navigate(["/"])}catch(e){this.logService.error(e)}}))}}t.VerifyRecoverDeleteComponent=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.Router),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.I18nService),a.ɵɵdirectiveInject(s.ActivatedRoute),a.ɵɵdirectiveInject(p.LogService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["app-verify-recover-delete"]],decls:53,vars:21,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],[1,"lead","text-center","mb-4"],[1,"card"],[1,"card-body"],["type","warning"],[1,"text-center"],[1,"d-flex"],["type","submit",1,"btn","btn-danger","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div",2),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",3),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"p",4),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"div",6),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"app-callout",7),a.ɵɵtext(16),a.ɵɵpipe(17,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"p",8),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"strong"),a.ɵɵtext(22),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"hr"),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"button",10),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"span"),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelement(39,"i",11),a.ɵɵpipe(40,"i18n"),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"a",12),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(49,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(50,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(51,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n")),2&e){const e=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,9,"deleteAccount")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(17,11,"deleteAccountWarning")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(t.email),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(27,13,"deleteRecoverConfirmDesc")),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,15,"deleteAccount")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(40,17,"loading")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,19,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.CalloutComponent,s.RouterLinkWithHref],pipes:[v.I18nPipe],encapsulation:2})},58939:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AppComponent=void 0;const r=n(32621),o=(n(61248),n(68012)),a=n(19755),s=(n(68290),n(86455)),l=(n(26451),n(67569),n(68062),n(69050),n(82058),n(98573),n(4349),n(40349),n(34445),n(90181),n(86193),n(99954),n(10685),n(14170),n(66359),n(77243),n(2173),n(49613),n(88332),n(15524),n(16689),n(87905)),c=n(56866),d=n(99635),p=n(45229),u=n(34053),m=n(14089),h=n(21061),v=n(2524),f=n(69952),g=n(32621),y=n(67569),x=n(49613),S=n(4349),b=n(66359),w=n(2173),I=n(86193),C=n(68062),E=n(26451),P=n(68012),k=n(68290),A=n(40349),O=n(99954),T=n(88332),M=n(82058),D=n(69050),B=n(61248),R=n(14170),U=n(90181),V=n(16689),F=n(77243),N=n(98573),_=n(10685),j=n(15524),z=n(34445),L="AppComponent";class K{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h,v,f,g,y,x,S,b,w,I,C){this.broadcasterService=e,this.tokenService=t,this.folderService=n,this.settingsService=i,this.syncService=r,this.passwordGenerationService=o,this.cipherService=a,this.authService=s,this.router=l,this.toastrService=c,this.i18nService=d,this.platformUtilsService=p,this.ngZone=u,this.vaultTimeoutService=m,this.cryptoService=h,this.collectionService=v,this.sanitizer=f,this.searchService=g,this.notificationsService=y,this.routerService=x,this.stateService=S,this.eventService=b,this.policyService=w,this.policyListService=I,this.keyConnectorService=C,this.lastActivity=null,this.idleTimer=null,this.isIdle=!1}ngOnInit(){this.ngZone.runOutsideAngular((()=>{window.onmousemove=()=>this.recordActivity(),window.onmousedown=()=>this.recordActivity(),window.ontouchstart=()=>this.recordActivity(),window.onclick=()=>this.recordActivity(),window.onscroll=()=>this.recordActivity(),window.onkeypress=()=>this.recordActivity()})),this.broadcasterService.subscribe(L,(e=>i(this,void 0,void 0,(function*(){this.ngZone.run((()=>i(this,void 0,void 0,(function*(){switch(e.command){case"loggedIn":case"loggedOut":case"unlocked":this.notificationsService.updateConnection(!1);break;case"authBlocked":this.router.navigate(["/"]);break;case"logout":this.logOut(!!e.expired);break;case"lockVault":yield this.vaultTimeoutService.lock();break;case"locked":this.notificationsService.updateConnection(!1),this.router.navigate(["lock"]);break;case"lockedUrl":window.setTimeout((()=>this.routerService.setPreviousUrl(e.url)),500);break;case"syncStarted":case"syncCompleted":default:break;case"upgradeOrganization":(yield this.platformUtilsService.showDialog(this.i18nService.t("upgradeOrganizationDesc"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("upgradeOrganization"),this.i18nService.t("cancel")))&&this.router.navigate(["organizations",e.organizationId,"settings","billing"]);break;case"premiumRequired":(yield this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.router.navigate(["settings/premium"]);break;case"emailVerificationRequired":(yield this.platformUtilsService.showDialog(this.i18nService.t("emailVerificationRequiredDesc"),this.i18nService.t("emailVerificationRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel")))&&this.platformUtilsService.launchUri("https://bitwarden.com/help/create-bitwarden-account/");break;case"showToast":this.showToast(e);break;case"setFullWidth":this.setFullWidth();break;case"convertAccountToKeyConnector":this.router.navigate(["/remove-password"])}}))))})))),this.router.events.subscribe((e=>{if(e instanceof o.NavigationEnd){const e=Array.from(document.querySelectorAll(".modal"));for(const t of e)a(t).modal("hide");null!=document.querySelector(".swal-modal")&&s.default.close(void 0)}})),this.policyListService.addPolicies([new f.TwoFactorAuthenticationPolicy,new c.MasterPasswordPolicy,new d.PasswordGeneratorPolicy,new v.SingleOrgPolicy,new u.RequireSsoPolicy,new p.PersonalOwnershipPolicy,new l.DisableSendPolicy,new h.SendOptionsPolicy,new m.ResetPasswordPolicy]),this.setFullWidth()}ngOnDestroy(){this.broadcasterService.unsubscribe(L)}logOut(e){return i(this,void 0,void 0,(function*(){yield this.eventService.uploadEvents();const t=yield this.stateService.getUserId();yield Promise.all([this.eventService.clearEvents(),this.syncService.setLastSync(new Date(0)),this.cryptoService.clearKeys(),this.settingsService.clear(t),this.cipherService.clear(t),this.folderService.clear(t),this.collectionService.clear(t),this.policyService.clear(t),this.passwordGenerationService.clear(),this.keyConnectorService.clear()]),this.searchService.clearIndex(),this.authService.logOut((()=>i(this,void 0,void 0,(function*(){e&&this.platformUtilsService.showToast("warning",this.i18nService.t("loggedOut"),this.i18nService.t("loginExpired")),yield this.stateService.clean({userId:t}),s.default.close(),this.router.navigate(["/"])}))))}))}recordActivity(){return i(this,void 0,void 0,(function*(){const e=(new Date).getTime();null!=this.lastActivity&&e-this.lastActivity<250||(this.lastActivity=e,this.stateService.setLastActive(e),this.isIdle&&(this.isIdle=!1,this.idleStateChanged()),null!=this.idleTimer&&(window.clearTimeout(this.idleTimer),this.idleTimer=null),this.idleTimer=window.setTimeout((()=>{this.isIdle||(this.isIdle=!0,this.idleStateChanged())}),6e5))}))}showToast(e){let t="";const n={};"string"==typeof e.text?t=e.text:1===e.text.length?t=e.text[0]:(e.text.forEach((e=>t+="<p>"+this.sanitizer.sanitize(r.SecurityContext.HTML,e)+"</p>")),n.enableHtml=!0),null!=e.options&&(!0===e.options.trustedHtml&&(n.enableHtml=!0),null!=e.options.timeout&&e.options.timeout>0&&(n.timeOut=e.options.timeout)),this.toastrService.show(t,e.title,n,"toast-"+e.type)}idleStateChanged(){this.isIdle?this.notificationsService.disconnectFromInactivity():this.notificationsService.reconnectFromActivity()}setFullWidth(){return i(this,void 0,void 0,(function*(){(yield this.stateService.getEnableFullWidth())?document.body.classList.add("full-width"):document.body.classList.remove("full-width")}))}}t.AppComponent=K,K.ɵfac=function(e){return new(e||K)(g.ɵɵdirectiveInject(y.BroadcasterService),g.ɵɵdirectiveInject(x.TokenService),g.ɵɵdirectiveInject(S.FolderService),g.ɵɵdirectiveInject(b.SettingsService),g.ɵɵdirectiveInject(w.SyncService),g.ɵɵdirectiveInject(I.PasswordGenerationService),g.ɵɵdirectiveInject(C.CipherService),g.ɵɵdirectiveInject(E.AuthService),g.ɵɵdirectiveInject(P.Router),g.ɵɵdirectiveInject(k.ToastrService),g.ɵɵdirectiveInject(A.I18nService),g.ɵɵdirectiveInject(O.PlatformUtilsService),g.ɵɵdirectiveInject(g.NgZone),g.ɵɵdirectiveInject(T.VaultTimeoutService),g.ɵɵdirectiveInject(M.CryptoService),g.ɵɵdirectiveInject(D.CollectionService),g.ɵɵdirectiveInject(B.DomSanitizer),g.ɵɵdirectiveInject(R.SearchService),g.ɵɵdirectiveInject(U.NotificationsService),g.ɵɵdirectiveInject(V.RouterService),g.ɵɵdirectiveInject(F.StateService),g.ɵɵdirectiveInject(N.EventService),g.ɵɵdirectiveInject(_.PolicyService),g.ɵɵdirectiveInject(j.PolicyListService),g.ɵɵdirectiveInject(z.KeyConnectorService))},K.ɵcmp=g.ɵɵdefineComponent({type:K,selectors:[["app-root"]],decls:2,vars:0,template:function(e,t){1&e&&(g.ɵɵelement(0,"router-outlet"),g.ɵɵtext(1,"\n"))},directives:[P.RouterOutlet],encapsulation:2})},92295:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseAcceptComponent=void 0;n(68012);const r=n(53232),o=(n(40349),n(99954),n(77243),n(32621)),a=n(68012),s=n(99954),l=n(40349),c=n(77243);class d{constructor(e,t,n,i,r){this.router=e,this.platformUtilService=t,this.i18nService=n,this.route=i,this.stateService=r,this.loading=!0,this.authed=!1,this.requiredParameters=[],this.failedShortMessage="inviteAcceptFailedShort",this.failedMessage="inviteAcceptFailed"}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){yield this.stateService.setLoginRedirect(null);let t=this.requiredParameters.some((t=>null==(null==e?void 0:e[t])||""===e[t])),n=null;if(!t)if(this.authed=yield this.stateService.getIsAuthenticated(),this.authed)try{yield this.authedHandler(e)}catch(i){t=!0,n=i.message}else yield this.stateService.setLoginRedirect({route:this.getRedirectRoute(),qParams:e}),this.email=e.email,yield this.unauthedHandler(e);if(t){const e=null!=n?this.i18nService.t(this.failedShortMessage,n):this.i18nService.t(this.failedMessage);this.platformUtilService.showToast("error",null,e,{timeout:1e4}),this.router.navigate(["/"])}this.loading=!1}))))}getRedirectRoute(){const e=this.router.parseUrl(this.router.url);return e.queryParams={},e.toString()}}t.BaseAcceptComponent=d,d.ɵfac=function(e){return new(e||d)(o.ɵɵdirectiveInject(a.Router),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(a.ActivatedRoute),o.ɵɵdirectiveInject(c.StateService))},d.ɵdir=o.ɵɵdefineDirective({type:d})},5869:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BaseEventsComponent=void 0;n(38364),n(40349),n(70143),n(99954);const r=n(93445),o=(n(62858),n(32621)),a=n(62858),s=n(40349),l=n(38364),c=n(99954),d=n(70143);class p{constructor(e,t,n,i,r){this.eventService=e,this.i18nService=t,this.exportService=n,this.platformUtilsService=i,this.logService=r,this.loading=!0,this.loaded=!1,this.dirtyDates=!0;const o=this.eventService.getDefaultDateFilters();this.start=o[0],this.end=o[1]}exportEvents(){return i(this,void 0,void 0,(function*(){if(this.appApiPromiseUnfulfilled()||this.dirtyDates)return;this.loading=!0;const e=this.parseDates();if(null!=e){try{this.exportPromise=this.export(e[0],e[1]),yield this.exportPromise}catch(t){this.logService.error(`Handled exception: ${t}`)}this.exportPromise=null,this.loading=!1}}))}loadEvents(e){return i(this,void 0,void 0,(function*(){if(this.appApiPromiseUnfulfilled())return;const t=this.parseDates();if(null==t)return;this.loading=!0;let n=[];try{const i=this.loadAndParseEvents(t[0],t[1],e?null:this.continuationToken);e?this.refreshPromise=i:this.morePromise=i;const r=yield i;this.continuationToken=r.continuationToken,n=r.events}catch(i){this.logService.error(`Handled exception: ${i}`)}!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(n):this.events=n,this.dirtyDates=!1,this.loading=!1,this.morePromise=null,this.refreshPromise=null}))}loadAndParseEvents(e,t,n){return i(this,void 0,void 0,(function*(){const o=yield this.requestEvents(e,t,n),a=yield Promise.all(o.data.map((e=>i(this,void 0,void 0,(function*(){const t=null==e.actingUserId?e.userId:e.actingUserId,n=yield this.eventService.getEventInfo(e),i=this.getUserName(e,t);return new r.EventView({message:n.message,humanReadableMessage:n.humanReadableMessage,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=i?i.name:this.i18nService.t("unknown"),userEmail:null!=i?i.email:"",date:e.date,ip:e.ipAddress,type:e.type})})))));return{continuationToken:o.continuationToken,events:a}}))}parseDates(){let e=null;try{e=this.eventService.formatDateFilters(this.start,this.end)}catch(t){return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),null}return e}appApiPromiseUnfulfilled(){return null!=this.refreshPromise||null!=this.morePromise||null!=this.exportPromise}export(e,t){return i(this,void 0,void 0,(function*(){let n=this.continuationToken,i=[].concat(this.events);for(;null!=n;){const r=yield this.loadAndParseEvents(e,t,n);n=r.continuationToken,i=i.concat(r.events)}const r=yield this.exportService.getEventExport(i),o=this.exportService.getFileName(this.exportFileName,"csv");this.platformUtilsService.saveFile(window,r,{type:"text/plain"},o)}))}}t.BaseEventsComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.EventService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ExportService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.LogService))},p.ɵdir=o.ɵɵdefineDirective({type:p})},14914:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BasePeopleComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(40349),n(70143),n(99954),n(14170),n(77243),n(29546),n(9941),n(35734),n(68625),n(70829)),a=n(14004),s=n(32621),l=n(91092),c=n(14170),d=n(40349),p=n(99954),u=n(82058),m=n(9941),h=n(29546),v=n(70143),f=n(35734),g=n(68625),y=n(77243),x=["confirmTemplate"];class S{constructor(e,t,n,i,r,o,a,s,l,c,d){this.apiService=e,this.searchService=t,this.i18nService=n,this.platformUtilsService=i,this.cryptoService=r,this.validationService=o,this.modalService=a,this.logService=s,this.searchPipe=l,this.userNamePipe=c,this.stateService=d,this.loading=!0,this.statusMap=new Map,this.users=[],this.pagedUsers=[],this.allUsers=[],this.didScroll=!1,this.pageSize=100,this.pagedUsersCount=0}get allCount(){return null!=this.allUsers?this.allUsers.length:0}get invitedCount(){return this.statusMap.has(this.userStatusType.Invited)?this.statusMap.get(this.userStatusType.Invited).length:0}get acceptedCount(){return this.statusMap.has(this.userStatusType.Accepted)?this.statusMap.get(this.userStatusType.Accepted).length:0}get confirmedCount(){return this.statusMap.has(this.userStatusType.Confirmed)?this.statusMap.get(this.userStatusType.Confirmed).length:0}get showConfirmUsers(){return null!=this.allUsers&&null!=this.statusMap&&this.allUsers.length>1&&this.confirmedCount>0&&this.confirmedCount<3&&this.acceptedCount>0}get showBulkConfirmUsers(){return this.acceptedCount>0}load(){return i(this,void 0,void 0,(function*(){const e=yield this.getUsers();this.statusMap.clear();for(const t of o.Utils.iterateEnum(this.userStatusType))this.statusMap.set(t,[]);this.allUsers=null!=e.data&&e.data.length>0?e.data:[],this.allUsers.sort(o.Utils.getSortFunction(this.i18nService,"email")),this.allUsers.forEach((e=>{this.statusMap.has(e.status)?this.statusMap.get(e.status).push(e):this.statusMap.set(e.status,[e])})),this.filter(this.status),this.loading=!1}))}filter(e){this.status=e,null!=this.status?this.users=this.statusMap.get(this.status):this.users=this.allUsers,this.selectAll(!1),this.resetPaging()}loadMore(){if(!this.users||this.users.length<=this.pageSize)return;const e=this.pagedUsers.length;let t=this.pageSize;0===e&&this.pagedUsersCount>this.pageSize&&(t=this.pagedUsersCount),this.users.length>e&&(this.pagedUsers=this.pagedUsers.concat(this.users.slice(e,e+t))),this.pagedUsersCount=this.pagedUsers.length,this.didScroll=this.pagedUsers.length>this.pageSize}checkUser(e,t){e.checked=null==t?!e.checked:t}selectAll(e){e&&this.selectAll(!1);const t=this.searchPipe.transform(this.users,this.searchText,"name","email","id"),n=e&&t.length>500?500:t.length;for(let i=0;i<n;i++)this.checkUser(t[i],e)}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedUsers=[],this.loadMore()}))}invite(){this.edit(null)}remove(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.deleteWarningMessage(e),this.userNamePipe.transform(e),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;this.actionPromise=this.deleteUser(e.id);try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.userNamePipe.transform(e))),this.removeUser(e)}catch(t){this.validationService.showError(t)}this.actionPromise=null}))}reinvite(e){return i(this,void 0,void 0,(function*(){if(null==this.actionPromise){this.actionPromise=this.reinviteUser(e.id);try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenReinvited",this.userNamePipe.transform(e)))}catch(t){this.validationService.showError(t)}this.actionPromise=null}}))}confirm(e){return i(this,void 0,void 0,(function*(){const t=t=>i(this,void 0,void 0,(function*(){try{this.actionPromise=this.confirmUser(e,t),yield this.actionPromise,function(t){e.status=t.userStatusType.Confirmed;const n=t.statusMap.get(t.userStatusType.Accepted).indexOf(e);n>-1&&(t.statusMap.get(t.userStatusType.Accepted).splice(n,1),t.statusMap.get(t.userStatusType.Confirmed).push(e))}(this),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e)))}catch(n){throw this.validationService.showError(n),n}finally{this.actionPromise=null}}));if(null==this.actionPromise)try{const r=yield this.apiService.getUserPublicKey(e.userId),s=o.Utils.fromB64ToArray(r.publicKey),l=yield this.stateService.getAutoConfirmFingerPrints();if(null==l||!l){const[n]=yield this.modalService.openViewRef(a.UserConfirmComponent,this.confirmModalRef,(r=>{r.name=this.userNamePipe.transform(e),r.userId=null!=e?e.userId:null,r.publicKey=s,r.onConfirmedUser.subscribe((()=>i(this,void 0,void 0,(function*(){try{r.formPromise=t(s),yield r.formPromise,n.close()}catch(e){this.logService.error(e)}}))))}));return}try{const t=yield this.cryptoService.getFingerprint(e.userId,s.buffer);this.logService.info(`User's fingerprint: ${t.join("-")}`)}catch(n){this.logService.error(n)}yield t(s)}catch(n){this.logService.error(`Handled exception: ${n}`)}}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.users&&this.users.length>this.pageSize}deleteWarningMessage(e){return this.i18nService.t("removeUserConfirmation")}getCheckedUsers(){return this.users.filter((e=>e.checked))}removeUser(e){let t=this.users.indexOf(e);t>-1&&(this.users.splice(t,1),this.resetPaging()),this.statusMap.has(e.status)&&(t=this.statusMap.get(e.status).indexOf(e),t>-1&&this.statusMap.get(e.status).splice(t,1))}}t.BasePeopleComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.SearchService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.CryptoService),s.ɵɵdirectiveInject(m.ValidationService),s.ɵɵdirectiveInject(h.ModalService),s.ɵɵdirectiveInject(v.LogService),s.ɵɵdirectiveInject(f.SearchPipe),s.ɵɵdirectiveInject(g.UserNamePipe),s.ɵɵdirectiveInject(y.StateService))},S.ɵdir=s.ɵɵdefineDirective({type:S,viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(x,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.confirmModalRef=e.first)}}})},73365:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NestedCheckboxComponent=void 0;const i=n(32621),r=n(70829),o=n(32621),a=n(96832),s=n(57490),l=n(72596);function c(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",7),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.set(t)})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",3),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("name",n.pascalize(e.id))("id",e.id)("ngModel",e.get()),o.ɵɵadvance(2),o.ɵɵproperty("for",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(6,5,e.id),"\n ")}}class d{constructor(){this.onSavedUser=new i.EventEmitter,this.onDeletedUser=new i.EventEmitter}get parentIndeterminate(){return!this.parentChecked&&this.checkboxes.some((e=>e.get()))}get parentChecked(){return this.checkboxes.every((e=>e.get()))}set parentChecked(e){this.checkboxes.forEach((t=>{t.set(e)}))}pascalize(e){return r.Utils.camelToPascalCase(e)}}t.NestedCheckboxComponent=d,d.ɵfac=function(e){return new(e||d)},d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["app-nested-checkbox"]],inputs:{parentId:"parentId",checkboxes:"checkboxes"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:17,vars:9,consts:[[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox",1,"form-check-input",3,"name","id","ngModel","indeterminate","ngModelChange"],[1,"form-check-label","font-weight-normal",3,"for"],[1,"form-group","form-group-child-check","mb-0"],["class","form-check mt-1",4,"ngFor","ngForOf"],[1,"form-check","mt-1"],["type","checkbox",1,"form-check-input",3,"name","id","ngModel","ngModelChange"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"input",2),o.ɵɵlistener("ngModelChange",(function(e){return t.parentChecked=e})),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",4),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,c,8,7,"div",5),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("name",t.pascalize(t.parentId))("id",t.parentId)("ngModel",t.parentChecked)("indeterminate",t.parentIndeterminate),o.ɵɵadvance(2),o.ɵɵproperty("for",t.parentId),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,7,t.parentId),"\n "),o.ɵɵadvance(6),o.ɵɵproperty("ngForOf",t.checkboxes))},directives:[a.CheckboxControlValueAccessor,a.NgControlStatus,a.NgModel,s.NgForOf],pipes:[l.I18nPipe],encapsulation:2})},51406:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptComponent=void 0;const i=n(39200),r=n(32621),o=n(96832),a=n(17302),s=n(966),l=n(50553),c=n(57490),d=n(90841),p=n(72596),u=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class m extends i.PasswordRepromptComponent{}t.PasswordRepromptComponent=m,m.ɵfac=function(){let e;return function(t){return(e||(e=r.ɵɵgetInheritedFactory(m)))(t||m)}}(),m.ɵcmp=r.ɵɵdefineComponent({type:m,selectors:[["ng-component"]],features:[r.ɵɵInheritDefinitionFeature],decls:59,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","masterPassword"],[1,"d-flex"],["id","masterPassword","name","MasterPassword","required","","appAutofocus","","appInputVerbatim","",1,"text-monospace","form-control",3,"type","ngModel","ngModelChange"],["type","button",1,"ml-1","btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],[1,"modal-footer"],["type","submit","appBlurClick","",1,"btn","btn-primary","btn-submit"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",7),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",8),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementStart(23,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"label",10),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",11),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"input",12),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"button",13),r.ɵɵlistener("click",(function(){return t.togglePassword()})),r.ɵɵpipe(34,"i18n"),r.ɵɵtext(35,"\n "),r.ɵɵelement(36,"i",14),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"div",15),r.ɵɵtext(43,"\n "),r.ɵɵelementStart(44,"button",16),r.ɵɵtext(45,"\n "),r.ɵɵelementStart(46,"span"),r.ɵɵtext(47),r.ɵɵpipe(48,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementStart(51,"button",17),r.ɵɵtext(52),r.ɵɵpipe(53,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(55,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(56,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(57,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n")),2&e&&(r.ɵɵadvance(10),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,9,"passwordConfirmation"),"\n "),r.ɵɵadvance(11),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(22,11,"passwordConfirmationDesc"),"\n\n "),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(27,13,"masterPass")),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(34,15,"toggleVisibility")),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(21,u,!t.showPassword,t.showPassword)),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(48,17,"ok")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(53,19,"cancel"),"\n "))},directives:[o.ɵNgNoValidate,o.NgControlStatusGroup,o.NgForm,o.DefaultValueAccessor,o.RequiredValidator,a.AutofocusDirective,s.InputVerbatimDirective,o.NgControlStatus,o.NgModel,l.A11yTitleDirective,c.NgClass,d.BlurClickDirective],pipes:[p.I18nPipe],encapsulation:2})},14296:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordStrengthComponent=void 0;n(40349);const i=n(32621),r=n(40349),o=n(57490);function a(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1),i.ɵɵelementContainerEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.text,"\n ")}}const s=function(e){return{width:e}};class l{constructor(e){this.i18nService=e,this.showText=!1,this.scoreWidth=0,this.color="bg-danger"}ngOnChanges(){switch(this.scoreWidth=null==this.score?0:20*(this.score+1),this.score){case 4:this.color="bg-success",this.text=this.i18nService.t("strong");break;case 3:this.color="bg-primary",this.text=this.i18nService.t("good");break;case 2:this.color="bg-warning",this.text=this.i18nService.t("weak");break;default:this.color="bg-danger",this.text=null!=this.score?this.i18nService.t("weak"):null}}}t.PasswordStrengthComponent=l,l.ɵfac=function(e){return new(e||l)(i.ɵɵdirectiveInject(r.I18nService))},l.ɵcmp=i.ɵɵdefineComponent({type:l,selectors:[["app-password-strength"]],inputs:{score:"score",showText:"showText"},features:[i.ɵɵNgOnChangesFeature],decls:8,vars:8,consts:[[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",3,"ngStyle"],[4,"ngIf"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3,"\n "),i.ɵɵtemplate(4,a,2,1,"ng-container",2),i.ɵɵtext(5,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(6,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n")),2&e&&(i.ɵɵadvance(2),i.ɵɵclassMapInterpolate1("progress-bar ",t.color,""),i.ɵɵproperty("ngStyle",i.ɵɵpureFunction1(6,s,t.scoreWidth+"%")),i.ɵɵattribute("aria-valuenow",t.scoreWidth),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showText&&t.text))},directives:[o.NgStyle,o.NgIf],encapsulation:2})},14992:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FooterComponent=void 0;n(99954);const r=n(32621),o=n(99954),a=n(72596);class s{constructor(e){this.platformUtilsService=e,this.year="2015"}ngOnInit(){return i(this,void 0,void 0,(function*(){this.year=(new Date).getFullYear().toString(),this.version=yield this.platformUtilsService.getApplicationVersion()}))}}t.FooterComponent=s,s.ɵfac=function(e){return new(e||s)(r.ɵɵdirectiveInject(o.PlatformUtilsService))},s.ɵcmp=r.ɵɵdefineComponent({type:s,selectors:[["app-footer"]],decls:15,vars:5,consts:[[1,"container","footer","text-muted"],[1,"row"],[1,"col"],[1,"col","text-center"],[1,"col","text-right"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"div",3),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n")),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("© ",t.year,", Bitwarden Inc."),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(11,2,"versionNumber",t.version),"\n "))},pipes:[a.I18nPipe],encapsulation:2})},94113:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FrontendLayoutComponent=void 0;n(99954);const r=n(32621),o=n(99954),a=n(68012),s=n(72596);class l{constructor(e){this.platformUtilsService=e,this.year="2015"}ngOnInit(){return i(this,void 0,void 0,(function*(){this.year=(new Date).getFullYear().toString(),this.version=yield this.platformUtilsService.getApplicationVersion(),document.body.classList.add("layout_frontend")}))}ngOnDestroy(){document.body.classList.remove("layout_frontend")}}t.FrontendLayoutComponent=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵdirectiveInject(o.PlatformUtilsService))},l.ɵcmp=r.ɵɵdefineComponent({type:l,selectors:[["app-frontend-layout"]],decls:8,vars:5,consts:[[1,"container","my-5","text-muted","text-center"]],template:function(e,t){1&e&&(r.ɵɵelement(0,"router-outlet"),r.ɵɵtext(1,"\n"),r.ɵɵelementStart(2,"div",0),r.ɵɵtext(3),r.ɵɵelement(4,"br"),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n © ",t.year,", Bitwarden Inc. "),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(6,2,"versionNumber",t.version),"\n"))},directives:[a.RouterOutlet],pipes:[s.I18nPipe],encapsulation:2})},64052:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.NavbarComponent=void 0;n(36424),n(99954),n(85556),n(2173),n(49613);const r=n(32621),o=n(36424),a=n(99954),s=n(49613),l=n(85556),c=n(2173),d=n(57490),p=n(68012),u=n(50553),m=n(92521),h=n(69242),v=n(72596),f=function(e){return["/providers",e]};function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",6),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",29),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵproperty("routerLink",r.ɵɵpureFunction1(4,f,e.providers[0].id)),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,2,"provider"))}}function y(e,t){1&e&&(r.ɵɵelementStart(0,"li",6),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",30),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,1,"provider")))}function x(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,g,6,6,"li",28),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,y,6,3,"li",28),r.ɵɵtext(5,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",1==e.providers.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.providers.length>1)}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",31),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"app-avatar",32),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",33),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"small",34),r.ɵɵtext(11),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("data",e.name)("email",e.email)("circle",!0),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,5,"loggedInAs")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(e.name)}}const b=function(e){return{"nav-background-alt":e}};class w{constructor(e,t,n,i,r){this.messagingService=e,this.platformUtilsService=t,this.tokenService=n,this.providerService=i,this.syncService=r,this.selfHosted=!1,this.providers=[],this.selfHosted=this.platformUtilsService.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.name=yield this.tokenService.getName(),this.email=yield this.tokenService.getEmail(),null!=this.name&&""!==this.name.trim()||(this.name=this.email),null==(yield this.syncService.getLastSync())&&(yield this.syncService.fullSync(!1)),this.providers=yield this.providerService.getAll()}))}lock(){this.messagingService.send("lockVault")}logOut(){this.messagingService.send("logout")}}t.NavbarComponent=w,w.ɵfac=function(e){return new(e||w)(r.ɵɵdirectiveInject(o.MessagingService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.TokenService),r.ɵɵdirectiveInject(l.ProviderService),r.ɵɵdirectiveInject(c.SyncService))},w.ɵcmp=r.ɵɵdefineComponent({type:w,selectors:[["app-navbar"]],decls:98,vars:36,consts:[[1,"navbar","navbar-expand","navbar-dark",3,"ngClass"],[1,"container"],["routerLink","/",1,"navbar-brand",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-shield"],[1,"collapse","navbar-collapse"],[1,"navbar-nav"],["routerLinkActive","active",1,"nav-item"],["routerLink","/vault",1,"nav-link"],["routerLink","/sends",1,"nav-link"],[4,"ngIf"],["routerLink","/tools",1,"nav-link"],["routerLink","/settings",1,"nav-link"],[1,"navbar-nav","flex-row","ml-md-auto","d-none","d-md-flex"],[1,"nav-item","dropdown"],["href","#","id","nav-profile","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"nav-item","nav-link","dropdown-toggle"],["aria-hidden","true",1,"bwi","bwi-user-circle","bwi-lg"],["aria-labelledby","nav-profile",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item-text d-flex align-items-center","appStopProp","",4,"ngIf"],[1,"dropdown-divider"],["href","#","routerLink","/settings/account",1,"dropdown-item"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-user"],["href","https://help.bitwarden.com","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-question-circle"],["href","https://bitwarden.com/download/","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-download"],["type","button",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lock"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sign-out"],["class","nav-item","routerLinkActive","active",4,"ngIf"],[1,"nav-link",3,"routerLink"],["routerLink","/providers",1,"nav-link"],["appStopProp","",1,"dropdown-item-text","d-flex","align-items-center"],["size","25","fontSize","14",3,"data","email","circle"],[1,"ml-2","overflow-hidden"],[1,"text-muted"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"nav",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",2),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelement(7,"i",3),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"div",4),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"ul",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"li",6),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"a",7),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"li",6),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"a",8),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵtemplate(28,x,6,2,"ng-container",9),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"li",6),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"a",10),r.ɵɵtext(33),r.ɵɵpipe(34,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"li",6),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"a",11),r.ɵɵtext(40),r.ɵɵpipe(41,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(43,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementStart(46,"ul",12),r.ɵɵtext(47,"\n "),r.ɵɵelementStart(48,"li",13),r.ɵɵtext(49,"\n "),r.ɵɵelementStart(50,"a",14),r.ɵɵtext(51,"\n "),r.ɵɵelement(52,"i",15),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"div",16),r.ɵɵtext(56,"\n "),r.ɵɵtemplate(57,S,14,7,"div",17),r.ɵɵtext(58,"\n "),r.ɵɵelement(59,"div",18),r.ɵɵtext(60,"\n "),r.ɵɵelementStart(61,"a",19),r.ɵɵtext(62,"\n "),r.ɵɵelement(63,"i",20),r.ɵɵtext(64),r.ɵɵpipe(65,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(66,"\n "),r.ɵɵelementStart(67,"a",21),r.ɵɵtext(68,"\n "),r.ɵɵelement(69,"i",22),r.ɵɵtext(70),r.ɵɵpipe(71,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(72,"\n "),r.ɵɵelementStart(73,"a",23),r.ɵɵtext(74,"\n "),r.ɵɵelement(75,"i",24),r.ɵɵtext(76),r.ɵɵpipe(77,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(78,"\n "),r.ɵɵelement(79,"div",18),r.ɵɵtext(80,"\n "),r.ɵɵelementStart(81,"button",25),r.ɵɵlistener("click",(function(){return t.lock()})),r.ɵɵtext(82,"\n "),r.ɵɵelement(83,"i",26),r.ɵɵtext(84),r.ɵɵpipe(85,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(86,"\n "),r.ɵɵelementStart(87,"button",25),r.ɵɵlistener("click",(function(){return t.logOut()})),r.ɵɵtext(88,"\n "),r.ɵɵelement(89,"i",27),r.ɵɵtext(90),r.ɵɵpipe(91,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(92,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(93,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(94,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(95,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(96,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(97,"\n")),2&e&&(r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(34,b,t.selfHosted)),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind2(5,13,"pageTitle","Bitwarden")),r.ɵɵadvance(13),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(18,16,"myVault")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,18,"send")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.providers.length>=1),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(34,20,"tools")),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(41,22,"settings")),r.ɵɵadvance(17),r.ɵɵproperty("ngIf",t.name),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(65,24,"myAccount"),"\n "),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(71,26,"getHelp"),"\n "),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(77,28,"getApps"),"\n "),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(85,30,"lockNow"),"\n "),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(91,32,"logOut"),"\n "))},directives:[d.NgClass,p.RouterLinkWithHref,u.A11yTitleDirective,p.RouterLinkActive,d.NgIf,m.StopPropDirective,h.AvatarComponent],pipes:[v.I18nPipe],encapsulation:2})},47760:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationLayoutComponent=void 0;n(32621),n(68012),n(67569),n(94308);const r=n(32621),o=n(68012),a=n(94308),s=n(67569),l=n(64052),c=n(57490),d=n(14992),p=n(69242),u=n(72596);function m(e,t){1&e&&(r.ɵɵelementStart(0,"div",11),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",13),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"organizationIsDisabled"),"\n "))}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",12),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",13),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(6,1,"accessingUsingProvider",e.organization.providerName),"\n ")}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",20),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",21),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("routerLink",e.manageRoute),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,2,"manage"),"\n ")}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",20),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",22),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("routerLink",e.toolsRoute),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,2,"tools"),"\n ")}}function g(e,t){1&e&&(r.ɵɵelementStart(0,"li",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"a",23),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",24),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,1,"settings"),"\n "))}function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",15),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"li",16),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"a",17),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",18),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,v,8,4,"li",19),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,f,8,4,"li",19),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,g,8,3,"li",19),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"vault"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showManageTab),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.showToolsTab),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.isOwner)}}function x(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",1),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",2),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",3),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",4),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"app-avatar",5),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"div",6),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span"),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"small",7),r.ɵɵtext(16),r.ɵɵpipe(17,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,m,8,3,"div",8),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,h,8,4,"div",9),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵtemplate(25,y,17,6,"ul",10),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(8),r.ɵɵproperty("data",e.organization.name)("circle",!0),r.ɵɵadvance(5),r.ɵɵtextInterpolate(e.organization.name),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(17,7,"organization")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.organization.enabled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.isProviderUser),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.showMenuBar)}}const S="OrganizationLayoutComponent";class b{constructor(e,t,n,i){this.route=e,this.organizationService=t,this.broadcasterService=n,this.ngZone=i}ngOnInit(){document.body.classList.remove("layout_frontend"),this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load()})))),this.broadcasterService.subscribe(S,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("updatedOrgLicense"===e.command)yield this.load()}))))}))}ngOnDestroy(){this.broadcasterService.unsubscribe(S)}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId)}))}get showMenuBar(){return this.showManageTab||this.showToolsTab||this.organization.isOwner}get showManageTab(){return this.organization.canManageUsers||this.organization.canViewAllCollections||this.organization.canViewAssignedCollections||this.organization.canManageGroups||this.organization.canManagePolicies||this.organization.canAccessEventLogs}get showToolsTab(){return this.organization.canAccessImportExport||this.organization.canAccessReports}get toolsRoute(){return this.organization.canAccessImportExport?"tools/import":"tools/exposed-passwords-report"}get manageRoute(){let e;switch(!0){case this.organization.canManageUsers:e="manage/people";break;case this.organization.canViewAssignedCollections||this.organization.canViewAllCollections:e="manage/collections";break;case this.organization.canManageGroups:e="manage/groups";break;case this.organization.canManagePolicies:e="manage/policies";break;case this.organization.canAccessEventLogs:e="manage/events"}return e}}t.OrganizationLayoutComponent=b,b.ɵfac=function(e){return new(e||b)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService),r.ɵɵdirectiveInject(s.BroadcasterService),r.ɵɵdirectiveInject(r.NgZone))},b.ɵcmp=r.ɵɵdefineComponent({type:b,selectors:[["app-organization-layout"]],decls:8,vars:1,consts:[["class","org-nav",4,"ngIf"],[1,"org-nav"],[1,"container","d-flex"],[1,"d-flex","flex-column"],[1,"my-auto","d-flex","align-items-center","pl-1"],["size","45",3,"data","circle"],[1,"org-name","ml-3"],[1,"text-muted"],["class","ml-3 card border-danger text-danger bg-transparent",4,"ngIf"],["class","ml-3 card border-info text-info bg-transparent",4,"ngIf"],["class","nav nav-tabs",4,"ngIf"],[1,"ml-3","card","border-danger","text-danger","bg-transparent"],[1,"card-body","py-2"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"ml-3","card","border-info","text-info","bg-transparent"],[1,"nav","nav-tabs"],[1,"nav-item"],["routerLink","vault","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-lock"],["class","nav-item",4,"ngIf"],["routerLinkActive","active",1,"nav-link",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-sliders"],["aria-hidden","true",1,"bwi","bwi-wrench"],["routerLink","settings","routerLinkActive","active",1,"nav-link"],["aria-hidden","true",1,"bwi","bwi-cogs"]],template:function(e,t){1&e&&(r.ɵɵelement(0,"app-navbar"),r.ɵɵtext(1,"\n"),r.ɵɵtemplate(2,x,29,9,"div",0),r.ɵɵtext(3,"\n"),r.ɵɵelement(4,"router-outlet"),r.ɵɵtext(5,"\n"),r.ɵɵelement(6,"app-footer"),r.ɵɵtext(7,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.organization))},directives:[l.NavbarComponent,c.NgIf,o.RouterOutlet,d.FooterComponent,p.AvatarComponent,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[u.I18nPipe],encapsulation:2})},20431:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserLayoutComponent=void 0;const i=n(32621),r=n(64052),o=n(68012),a=n(14992);class s{ngOnInit(){document.body.classList.remove("layout_frontend")}}t.UserLayoutComponent=s,s.ɵfac=function(e){return new(e||s)},s.ɵcmp=i.ɵɵdefineComponent({type:s,selectors:[["app-user-layout"]],decls:6,vars:0,template:function(e,t){1&e&&(i.ɵɵelement(0,"app-navbar"),i.ɵɵtext(1,"\n"),i.ɵɵelement(2,"router-outlet"),i.ɵɵtext(3,"\n"),i.ɵɵelement(4,"app-footer"),i.ɵɵtext(5,"\n"))},directives:[r.NavbarComponent,o.RouterOutlet,a.FooterComponent],encapsulation:2})},76473:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkConfirmComponent=void 0;n(91092),n(82058),n(40349);const r=n(99516),o=n(13175),a=n(68320),s=n(70829),l=n(32621),c=n(82058),d=n(91092),p=n(40349),u=n(50553),m=n(57490),h=n(52900),v=n(69242),f=n(72596),g=n(68625);function y(e,t){1&e&&(l.ɵɵelementStart(0,"div",15),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,4,"loading"),"\n "))}function x(e,t){1&e&&(l.ɵɵelementStart(0,"app-callout",17),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function S(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,b,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",n.fingerprints.get(e.id),"\n ")}}function I(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,I,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"td"),l.ɵɵtext(15),l.ɵɵpipe(16,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,7,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(16,9,"bulkFilteredMessage"),"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",19),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"table",20),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"thead"),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"tr"),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"th",21),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"th"),l.ɵɵtext(21),l.ɵɵpipe(22,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,w,17,9,"tr",22),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,C,18,11,"tr",22),l.ɵɵtext(29,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,6,"fingerprintEnsureIntegrityVerify"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(7,8,"learnMore"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(18,10,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(22,12,"fingerprint")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.excludedUsers)}}function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",26),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(2);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function A(e,t){1&e&&(l.ɵɵelementStart(0,"td"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function O(e,t){if(1&e&&(l.ɵɵelementStart(0,"tr"),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",23),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"app-avatar",24),l.ɵɵpipe(5,"userName"),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"td"),l.ɵɵtext(10),l.ɵɵtemplate(11,P,2,1,"small",25),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,k,2,1,"td",11),l.ɵɵtext(15,"\n "),l.ɵɵtemplate(16,A,3,3,"td",11),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd()),2&e){const e=t.$implicit,n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("data",l.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",e.email,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",e.name),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",n.statuses.has(e.id)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function T(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"table",20),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"thead"),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"tr"),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"th",21),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"th"),l.ɵɵtext(13),l.ɵɵpipe(14,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵtemplate(18,O,18,10,"tr",22),l.ɵɵtext(19,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,3,"user")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(14,5,"status")),l.ɵɵadvance(5),l.ɵɵproperty("ngForOf",e.filteredUsers)}}function M(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",16),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span"),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,3,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,5,"confirm"))}}class D{constructor(e,t,n){this.cryptoService=e,this.apiService=t,this.i18nService=n,this.publicKeys=new Map,this.fingerprints=new Map,this.statuses=new Map,this.loading=!0,this.done=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.excludedUsers=this.users.filter((e=>!this.isAccepted(e))),this.filteredUsers=this.users.filter((e=>this.isAccepted(e))),this.filteredUsers.length<=0&&(this.done=!0);const e=yield this.getPublicKeys();for(const t of e.data){const e=s.Utils.fromB64ToArray(t.key),n=yield this.cryptoService.getFingerprint(t.userId,e.buffer);null!=n&&(this.publicKeys.set(t.id,e),this.fingerprints.set(t.id,n.join("-")))}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){this.loading=!0;try{const e=yield this.getCryptoKey(),t=[];for(const n of this.filteredUsers){const i=this.publicKeys.get(n.id);if(null==i)continue;const r=yield this.cryptoService.rsaEncrypt(e.key,i.buffer);t.push({id:n.id,key:r.encryptedString})}(yield this.postConfirmRequest(t)).data.forEach((e=>{const t=""!==e.error?e.error:this.i18nService.t("bulkConfirmMessage");this.statuses.set(e.id,t)})),this.done=!0}catch(e){this.error=e.message}this.loading=!1}))}isAccepted(e){return e.status===a.OrganizationUserStatusType.Accepted}getPublicKeys(){return i(this,void 0,void 0,(function*(){const e=new o.OrganizationUserBulkRequest(this.filteredUsers.map((e=>e.id)));return yield this.apiService.postOrganizationUsersPublicKey(this.organizationId,e)}))}getCryptoKey(){return this.cryptoService.getOrgKey(this.organizationId)}postConfirmRequest(e){return i(this,void 0,void 0,(function*(){const t=new r.OrganizationUserBulkConfirmRequest(e);return yield this.apiService.postOrganizationUserBulkConfirm(this.organizationId,t)}))}}t.BulkConfirmComponent=D,D.ɵfac=function(e){return new(e||D)(l.ɵɵdirectiveInject(c.CryptoService),l.ɵɵdirectiveInject(d.ApiService),l.ɵɵdirectiveInject(p.I18nService))},D.ɵcmp=l.ɵɵdefineComponent({type:D,selectors:[["app-bulk-confirm"]],inputs:{organizationId:"organizationId",users:"users"},decls:45,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","danger"],["type","error"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",5),l.ɵɵpipe(13,"i18n"),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"span",6),l.ɵɵtext(16,"×"),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",7),l.ɵɵtext(21,"\n "),l.ɵɵtemplate(22,y,6,6,"div",8),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,x,3,3,"app-callout",9),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,S,2,1,"app-callout",10),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,E,31,14,"ng-container",11),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,T,21,7,"ng-container",11),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",12),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,M,9,7,"button",13),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"button",14),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,9,"confirmUsers"),"\n "),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(13,11,"close")),l.ɵɵadvance(10),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.filteredUsers.length<=0),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.error),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!t.done),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&t.done),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.done),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(39,13,"close"),"\n "))},directives:[u.A11yTitleDirective,m.NgIf,h.CalloutComponent,m.NgForOf,v.AvatarComponent],pipes:[f.I18nPipe,g.UserNamePipe],encapsulation:2})},23918:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRemoveComponent=void 0;n(91092),n(40349);const r=n(13175),o=n(32621),a=n(91092),s=n(40349),l=n(50553),c=n(57490),d=n(52900),p=n(69242),u=n(72596),m=n(68625);function h(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",14),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noSelectedUsersApplicable"),"\n "))}function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",15),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.error,"\n ")}}function f(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",20),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"removeUsersWarning"),"\n "))}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",21),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"app-avatar",22),o.ɵɵpipe(5,"userName"),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td"),o.ɵɵtext(10),o.ɵɵtemplate(11,g,2,1,"small",23),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(4),o.ɵɵproperty("data",o.ɵɵpipeBind1(5,6,e))("email",e.email)("circle",!0)("fontSize",14),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",e.email,"\n "),o.ɵɵadvance(1),o.ɵɵproperty("ngIf",e.name)}}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,f,3,3,"app-callout",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"table",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"thead"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"tr"),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,y,14,8,"tr",19),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.users.length>0&&!e.error),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,3,"user")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.users)}}function S(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",24),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",t.statuses.get(e.id),"\n ")}}function w(e,t){1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"bulkFilteredMessage"),"\n "))}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",21),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"app-avatar",22),o.ɵɵpipe(5,"userName"),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td"),o.ɵɵtext(10),o.ɵɵtemplate(11,S,2,1,"small",23),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,b,2,1,"td",10),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,3,3,"td",10),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("data",o.ɵɵpipeBind1(5,8,e))("email",e.email)("circle",!0)("fontSize",14),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",e.email,"\n "),o.ɵɵadvance(1),o.ɵɵproperty("ngIf",e.name),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",n.statuses.has(e.id)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.statuses.has(e.id))}}function C(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"table",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"thead"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"tr"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"th",18),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"th"),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,I,18,10,"tr",19),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,3,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,5,"status")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",e.users)}}function E(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",25),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",26),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"removeUsers"))}}class P{constructor(e,t){this.apiService=e,this.i18nService=t,this.statuses=new Map,this.loading=!1,this.done=!1}submit(){return i(this,void 0,void 0,(function*(){this.loading=!0;try{(yield this.deleteUsers()).data.forEach((e=>{const t=""!==e.error?e.error:this.i18nService.t("bulkRemovedMessage");this.statuses.set(e.id,t)})),this.done=!0}catch(e){this.error=e.message}this.loading=!1}))}deleteUsers(){return i(this,void 0,void 0,(function*(){const e=new r.OrganizationUserBulkRequest(this.users.map((e=>e.id)));return yield this.apiService.deleteManyOrganizationUsers(this.organizationId,e)}))}}t.BulkRemoveComponent=P,P.ɵfac=function(e){return new(e||P)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService))},P.ɵcmp=o.ɵɵdefineComponent({type:P,selectors:[["app-bulk-remove"]],inputs:{organizationId:"organizationId",users:"users"},decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","danger",4,"ngIf"],["type","error",4,"ngIf"],[4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","danger"],["type","error"],["type","warning",4,"ngIf"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["type","warning"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],[1,"text-muted","d-block"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",5),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",6),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",7),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,h,3,3,"app-callout",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,v,2,1,"app-callout",9),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,x,19,5,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,C,21,7,"ng-container",10),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"div",11),o.ɵɵtext(32,"\n "),o.ɵɵtemplate(33,E,9,7,"button",12),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"button",13),o.ɵɵtext(36),o.ɵɵpipe(37,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(10,8,"removeUsers"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.users.length<=0),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.error),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.done),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.done),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.done&&t.users.length>0),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(37,12,"close"),"\n "))},directives:[l.A11yTitleDirective,c.NgIf,d.CalloutComponent,c.NgForOf,p.AvatarComponent],pipes:[u.I18nPipe,m.UserNamePipe],encapsulation:2})},42983:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BulkStatusComponent=void 0;const i=n(32621),r=n(50553),o=n(57490),a=n(69242),s=n(72596),l=n(68625);function c(e,t){1&e&&(i.ɵɵelementStart(0,"div",12),i.ɵɵtext(1,"\n "),i.ɵɵelement(2,"i",13),i.ɵɵpipe(3,"i18n"),i.ɵɵtext(4),i.ɵɵpipe(5,"i18n"),i.ɵɵelementEnd()),2&e&&(i.ɵɵadvance(2),i.ɵɵpropertyInterpolate("title",i.ɵɵpipeBind1(3,2,"loading")),i.ɵɵadvance(2),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(5,4,"loading"),"\n "))}function d(e,t){if(1&e&&(i.ɵɵelementStart(0,"small",22),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate(e.user.name)}}function p(e,t){if(1&e&&(i.ɵɵelementStart(0,"td",23),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.message,"\n ")}}function u(e,t){if(1&e&&(i.ɵɵelementStart(0,"td"),i.ɵɵtext(1),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext().$implicit;i.ɵɵadvance(1),i.ɵɵtextInterpolate1("\n ",e.message,"\n ")}}function m(e,t){if(1&e&&(i.ɵɵelementStart(0,"tr"),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"td",17),i.ɵɵtext(3,"\n "),i.ɵɵelement(4,"app-avatar",18),i.ɵɵpipe(5,"userName"),i.ɵɵtext(6,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(7,"\n "),i.ɵɵelementStart(8,"td"),i.ɵɵtext(9),i.ɵɵtemplate(10,d,2,1,"small",19),i.ɵɵtext(11,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(12,"\n "),i.ɵɵtemplate(13,p,2,1,"td",20),i.ɵɵtext(14,"\n "),i.ɵɵtemplate(15,u,2,1,"td",21),i.ɵɵtext(16,"\n "),i.ɵɵelementEnd()),2&e){const e=t.$implicit;i.ɵɵadvance(4),i.ɵɵproperty("data",i.ɵɵpipeBind1(5,8,e.user))("email",e.user.email)("circle",!0)("fontSize",14),i.ɵɵadvance(5),i.ɵɵtextInterpolate1("\n ",e.user.email,"\n "),i.ɵɵadvance(1),i.ɵɵproperty("ngIf",e.user.name),i.ɵɵadvance(3),i.ɵɵproperty("ngIf",e.error),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",!e.error)}}function h(e,t){if(1&e&&(i.ɵɵelementStart(0,"table",14),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"thead"),i.ɵɵtext(3,"\n "),i.ɵɵelementStart(4,"tr"),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"th",15),i.ɵɵtext(7),i.ɵɵpipe(8,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(9,"\n "),i.ɵɵelementStart(10,"th"),i.ɵɵtext(11),i.ɵɵpipe(12,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(13,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(14,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(15,"\n "),i.ɵɵtemplate(16,m,17,10,"tr",16),i.ɵɵtext(17,"\n "),i.ɵɵelementEnd()),2&e){const e=i.ɵɵnextContext();i.ɵɵadvance(7),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(8,3,"user")),i.ɵɵadvance(4),i.ɵɵtextInterpolate(i.ɵɵpipeBind1(12,5,"status")),i.ɵɵadvance(5),i.ɵɵproperty("ngForOf",e.users)}}class v{constructor(){this.loading=!1}}t.BulkStatusComponent=v,v.ɵfac=function(e){return new(e||v)},v.ɵcmp=i.ɵɵdefineComponent({type:v,selectors:[["app-bulk-status"]],decls:37,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","bulkTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","bulkTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","card-body text-center",4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"card-body","text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"table","table-hover","table-list"],["colspan","2"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["class","text-muted d-block",4,"ngIf"],["class","text-danger",4,"ngIf"],[4,"ngIf"],[1,"text-muted","d-block"],[1,"text-danger"]],template:function(e,t){1&e&&(i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1,"\n "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3,"\n "),i.ɵɵelementStart(4,"div",2),i.ɵɵtext(5,"\n "),i.ɵɵelementStart(6,"div",3),i.ɵɵtext(7,"\n "),i.ɵɵelementStart(8,"h2",4),i.ɵɵtext(9),i.ɵɵpipe(10,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(11,"\n "),i.ɵɵelementStart(12,"button",5),i.ɵɵpipe(13,"i18n"),i.ɵɵtext(14,"\n "),i.ɵɵelementStart(15,"span",6),i.ɵɵtext(16,"×"),i.ɵɵelementEnd(),i.ɵɵtext(17,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(18,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(19,"\n "),i.ɵɵelementStart(20,"div",7),i.ɵɵtext(21,"\n "),i.ɵɵtemplate(22,c,6,6,"div",8),i.ɵɵtext(23,"\n "),i.ɵɵtemplate(24,h,18,7,"table",9),i.ɵɵtext(25,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(26,"\n "),i.ɵɵelementStart(27,"div",10),i.ɵɵtext(28,"\n "),i.ɵɵelementStart(29,"button",11),i.ɵɵtext(30),i.ɵɵpipe(31,"i18n"),i.ɵɵelementEnd(),i.ɵɵtext(32,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(33,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(34,"\n "),i.ɵɵelementEnd(),i.ɵɵtext(35,"\n"),i.ɵɵelementEnd(),i.ɵɵtext(36,"\n")),2&e&&(i.ɵɵadvance(9),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(10,5,"bulkConfirmStatus"),"\n "),i.ɵɵadvance(3),i.ɵɵpropertyInterpolate("appA11yTitle",i.ɵɵpipeBind1(13,7,"close")),i.ɵɵadvance(10),i.ɵɵproperty("ngIf",t.loading),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",!t.loading),i.ɵɵadvance(6),i.ɵɵtextInterpolate1("\n ",i.ɵɵpipeBind1(31,9,"close"),"\n "))},directives:[r.A11yTitleDirective,o.NgIf,o.NgForOf,a.AvatarComponent],pipes:[s.I18nPipe,l.UserNamePipe],encapsulation:2})},57635:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionAddEditComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(40349),n(70143),n(94308),n(99954),n(66607)),a=n(26180),s=n(69788),l=n(70829),c=n(32621),d=n(91092),p=n(40349),u=n(99954),m=n(82058),h=n(70143),v=n(94308),f=n(96832),g=n(637),y=n(50553),x=n(57490),S=n(17302),b=n(92521),w=n(72596);function I(e,t){1&e&&(c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",14),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",25),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",26),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).selectAll(!0)})),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"button",26),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).selectAll(!1)})),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,2,"selectAll"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function E(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function P(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",35),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"groupAccessAllItems")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"groupAccessAllItems")))}function k(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",30),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",31),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",32),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(8),c.ɵɵtemplate(9,P,9,6,"ng-container",22),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"td",33),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",34),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"td",33),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"input",34),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled",e.accessAll||!i.canSave),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",e.name,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",e.accessAll),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked||e.accessAll||!i.canSave),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Groups[",n,"].ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked||e.accessAll||!i.canSave)}}function A(e,t){if(1&e&&(c.ɵɵelementStart(0,"table",27),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"thead"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tr"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"th"),c.ɵɵtext(7," "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"th"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"th",28),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"th",28),c.ɵɵtext(18),c.ɵɵpipe(19,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"tbody"),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,k,22,11,"tr",29),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,4,"name")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,6,"hidePasswords")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(19,8,"readOnly")),c.ɵɵadvance(7),c.ɵɵproperty("ngForOf",e.groups)}}function O(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",23),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵtemplate(5,C,10,6,"div",12),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,E,3,3,"div",22),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,A,28,10,"table",24),c.ɵɵtext(11,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,4,"groupAccess"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.groups&&e.groups.length&&e.canSave),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.groups||!e.groups.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.groups&&e.groups.length)}}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",17),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",18),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"div",16),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"label",19),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",20),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().externalId=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"small",21),c.ɵɵtext(20),c.ɵɵpipe(21,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,O,12,6,"ng-container",22),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,8,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.name)("disabled",!e.canSave),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,10,"externalId")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.externalId)("disabled",!e.canSave),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(21,12,"externalIdDesc")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.accessGroups)}}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"button",36),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",37),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span"),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){c.ɵɵnextContext();const e=c.ɵɵreference(5);c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,"save"))}}function D(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",39,40),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",41),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",42),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function B(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",25),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,D,9,10,"button",38),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode)}}class R{constructor(e,t,n,i,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.logService=o,this.organizationService=a,this.onSavedCollection=new r.EventEmitter,this.onDeletedCollection=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.accessGroups=!1,this.groups=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.organizationService.get(this.organizationId);if(this.accessGroups=e.useGroups,this.editMode=this.loading=null!=this.collectionId,this.accessGroups){const e=yield this.apiService.getGroups(this.organizationId);this.groups=e.data.map((e=>e)).sort(l.Utils.getSortFunction(this.i18nService,"name"))}if(this.orgKey=yield this.cryptoService.getOrgKey(this.organizationId),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editCollection");try{const e=yield this.apiService.getCollectionDetails(this.organizationId,this.collectionId);this.name=yield this.cryptoService.decryptToUtf8(new o.EncString(e.name),this.orgKey),this.externalId=e.externalId,null!=e.groups&&this.groups.length>0&&e.groups.forEach((e=>{const t=this.groups.filter((t=>!t.accessAll&&t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(t){this.logService.error(t)}}else this.title=this.i18nService.t("addCollection");this.groups.forEach((e=>{e.accessAll&&(e.checked=!0)})),this.loading=!1}))}check(e,t){e.accessAll||(e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1,e.hidePasswords=!1))}selectAll(e){this.groups.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.orgKey)throw new Error("No encryption key for this organization.");const e=new a.CollectionRequest;e.name=(yield this.cryptoService.encrypt(this.name,this.orgKey)).encryptedString,e.externalId=this.externalId,e.groups=this.groups.filter((e=>e.checked&&!e.accessAll)).map((e=>new s.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)));try{this.editMode?this.formPromise=this.apiService.putCollection(this.organizationId,this.collectionId,e):this.formPromise=this.apiService.postCollection(this.organizationId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedCollectionId":"createdCollectionId",this.name)),this.onSavedCollection.emit()}catch(t){this.logService.error(t)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteCollection(this.organizationId,this.collectionId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedCollectionId",this.name)),this.onDeletedCollection.emit()}catch(e){this.logService.error(e)}}))}}t.CollectionAddEditComponent=R,R.ɵfac=function(e){return new(e||R)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.CryptoService),c.ɵɵdirectiveInject(h.LogService),c.ɵɵdirectiveInject(v.OrganizationService))},R.ɵcmp=c.ɵɵdefineComponent({type:R,selectors:[["app-collection-add-edit"]],inputs:{collectionId:"collectionId",organizationId:"organizationId",canSave:"canSave",canDelete:"canDelete"},outputs:{onSavedCollection:"onSavedCollection",onDeletedCollection:"onDeletedCollection"},decls:38,vars:12,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"form-text","text-muted"],[4,"ngIf"],[1,"mt-4","d-flex","mb-0"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-filter","text-muted","bwi-fw",3,"title"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,I,9,6,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,T,26,14,"div",8),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,M,9,7,"button",10),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"button",11),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵtemplate(32,B,4,1,"div",12),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n")),2&e&&(c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,8,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.canSave),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(30,10,"cancel"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.canDelete))},directives:[f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.A11yTitleDirective,x.NgIf,f.DefaultValueAccessor,f.RequiredValidator,S.AutofocusDirective,f.NgControlStatus,f.NgModel,x.NgForOf,f.CheckboxControlValueAccessor,b.StopPropDirective],pipes:[w.I18nPipe],encapsulation:2})},54605:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(91092),n(69050),n(40349),n(70143),n(94308),n(99954),n(14170),n(29546),n(58209)),s=n(30260),l=n(57635),c=n(8218),d=n(32621),p=n(91092),u=n(68012),m=n(69050),h=n(29546),v=n(40349),f=n(99954),g=n(14170),y=n(70143),x=n(94308),S=n(96832),b=n(57490),w=n(37407),I=n(80507),C=n(50553),E=n(72596),P=n(35734),k=["addEdit"],A=["usersTemplate"];function O(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",8),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().add()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",9),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"newCollection"),"\n "))}function T(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",10),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",11),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n"),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function M(e,t){1&e&&(d.ɵɵelementStart(0,"p"),d.ɵɵtext(1),d.ɵɵpipe(2,"i18n"),d.ɵɵelementEnd()),2&e&&(d.ɵɵadvance(1),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(2,1,"noCollectionsInList")))}function D(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",24),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext(2).$implicit;return d.ɵɵnextContext(3).users(t)})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",25),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"users"),"\n "))}function B(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"a",26),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext(2).$implicit;return d.ɵɵnextContext(3).delete(t)})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",27),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"delete"),"\n "))}function R(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",18),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",19),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",20),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",21),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,D,5,3,"a",22),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,B,5,3,"a",23),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext().$implicit,t=d.ɵɵnextContext(3);d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,3,"options")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",t.canEdit(e)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.canDelete(e))}}function U(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"tr"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"td"),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"a",15),d.ɵɵlistener("click",(function(){const t=d.ɵɵrestoreView(e).$implicit;return d.ɵɵnextContext(3).edit(t)})),d.ɵɵtext(5),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"td",16),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,R,15,5,"div",17),d.ɵɵtext(11,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=d.ɵɵnextContext(3);d.ɵɵadvance(5),d.ɵɵtextInterpolate(e.name),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",n.canEdit(e)||n.canDelete(e))}}function V(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"table",13),d.ɵɵlistener("scrolled",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext(2).loadMore()})),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"tbody"),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,U,13,2,"tr",14),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd()}if(2&e){const e=d.ɵɵnextContext().ngIf,t=d.ɵɵnextContext();d.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),d.ɵɵadvance(4),d.ɵɵproperty("ngForOf",e)}}function F(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵtemplate(2,M,3,3,"p",5),d.ɵɵtext(3,"\n "),d.ɵɵtemplate(4,V,7,3,"table",12),d.ɵɵtext(5,"\n"),d.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!e.length),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.length)}}function N(e,t){}function _(e,t){}class j{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.route=t,this.collectionService=n,this.modalService=i,this.i18nService=r,this.platformUtilsService=o,this.searchService=a,this.logService=s,this.organizationService=l,this.loading=!0,this.canCreate=!1,this.didScroll=!1,this.pageSize=100,this.pagedCollectionsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))}))))}))}load(){return i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(this.organizationId),this.canCreate=this.organization.canCreateNewCollections;const e=e=>i(this,void 0,void 0,(function*(){const t=e.data.filter((e=>e.organizationId===this.organizationId)).map((e=>new s.Collection(new a.CollectionData(e))));return yield this.collectionService.decryptMany(t)}));if(this.organization.canViewAssignedCollections){const t=yield this.apiService.getUserCollections();this.assignedCollections=yield e(t)}if(this.organization.canViewAllCollections){const t=yield this.apiService.getCollections(this.organizationId);this.collections=yield e(t)}else this.collections=this.assignedCollections;this.resetPaging(),this.loading=!1}))}loadMore(){if(!this.collections||this.collections.length<=this.pageSize)return;const e=this.pagedCollections.length;let t=this.pageSize;0===e&&this.pagedCollectionsCount>this.pageSize&&(t=this.pagedCollectionsCount),this.collections.length>e&&(this.pagedCollections=this.pagedCollections.concat(this.collections.slice(e,e+t))),this.pagedCollectionsCount=this.pagedCollections.length,this.didScroll=this.pagedCollections.length>this.pageSize}edit(e){return i(this,void 0,void 0,(function*(){const t=null==e&&this.canCreate,n=null!=e&&this.canEdit(e),i=null!=e&&this.canDelete(e);if(!(t||n||i))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("missingPermissions"));const[r]=yield this.modalService.openViewRef(l.CollectionAddEditComponent,this.addEditModalRef,(o=>{o.organizationId=this.organizationId,o.collectionId=null!=e?e.id:null,o.canSave=t||n,o.canDelete=i,o.onSavedCollection.subscribe((()=>{r.close(),this.load()})),o.onDeletedCollection.subscribe((()=>{r.close(),this.removeCollection(e)}))}))}))}add(){this.edit(null)}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteCollection(this.organizationId,e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedCollectionId",e.name)),this.removeCollection(e)}catch(t){this.logService.error(t),this.platformUtilsService.showToast("error",null,this.i18nService.t("missingPermissions"))}}))}users(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(c.EntityUsersComponent,this.usersModalRef,(n=>{n.organizationId=this.organizationId,n.entity="collection",n.entityId=e.id,n.entityName=e.name,n.onEditedUsers.subscribe((()=>{this.load(),t.close()}))}))}))}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedCollections=[],this.loadMore()}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.collections&&this.collections.length>this.pageSize}canEdit(e){return!!this.organization.canEditAnyCollection||!(!this.organization.canEditAssignedCollections||!this.assignedCollections.some((t=>t.id===e.id)))}canDelete(e){return!!this.organization.canDeleteAnyCollection||!(!this.organization.canDeleteAssignedCollections||!this.assignedCollections.some((t=>t.id===e.id)))}removeCollection(e){const t=this.collections.indexOf(e);t>-1&&(this.collections.splice(t,1),this.resetPaging())}}t.CollectionsComponent=j,j.ɵfac=function(e){return new(e||j)(d.ɵɵdirectiveInject(p.ApiService),d.ɵɵdirectiveInject(u.ActivatedRoute),d.ɵɵdirectiveInject(m.CollectionService),d.ɵɵdirectiveInject(h.ModalService),d.ɵɵdirectiveInject(v.I18nService),d.ɵɵdirectiveInject(f.PlatformUtilsService),d.ɵɵdirectiveInject(g.SearchService),d.ɵɵdirectiveInject(y.LogService),d.ɵɵdirectiveInject(x.OrganizationService))},j.ɵcmp=d.ɵɵdefineComponent({type:j,selectors:[["app-org-manage-collections"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(k,7,r.ViewContainerRef),d.ɵɵviewQuery(A,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.addEditModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.usersModalRef=e.first)}},decls:33,vars:18,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button","class","btn btn-sm btn-outline-primary ml-3",3,"click",4,"ngIf"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-danger","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h1"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n "),d.ɵɵelementStart(6,"div",1),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div"),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"label",2),d.ɵɵtext(11),d.ɵɵpipe(12,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n "),d.ɵɵelementStart(14,"input",3),d.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),d.ɵɵpipe(15,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(17,"\n "),d.ɵɵtemplate(18,O,5,3,"button",4),d.ɵɵtext(19,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n"),d.ɵɵtemplate(22,T,9,6,"ng-container",5),d.ɵɵtext(23,"\n"),d.ɵɵtemplate(24,F,6,2,"ng-container",5),d.ɵɵpipe(25,"search"),d.ɵɵtext(26,"\n"),d.ɵɵtemplate(27,N,0,0,"ng-template",null,6,d.ɵɵtemplateRefExtractor),d.ɵɵtext(29,"\n"),d.ɵɵtemplate(30,_,0,0,"ng-template",null,7,d.ɵɵtemplateRefExtractor),d.ɵɵtext(32,"\n")),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,7,"collections")),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(12,9,"search")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("placeholder",d.ɵɵpipeBind1(15,11,"search")),d.ɵɵproperty("ngModel",t.searchText),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.canCreate),d.ɵɵadvance(4),d.ɵɵproperty("ngIf",t.loading),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedCollections:d.ɵɵpipeBind4(25,13,t.collections,t.searchText,"name","id"))))},directives:[S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,b.NgIf,w.InfiniteScrollDirective,b.NgForOf,I.StopClickDirective,C.A11yTitleDirective],pipes:[E.I18nPipe,P.SearchPipe],encapsulation:2})},26530:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EntityEventsComponent=void 0;n(91092),n(40349),n(70143),n(62858),n(68625),n(99954);const r=n(32621),o=n(91092),a=n(40349),s=n(62858),l=n(99954),c=n(68625),d=n(70143),p=n(57490),u=n(50553),m=n(96832),h=n(637),v=n(72596);function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"small",11),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function g(e,t){1&e&&(r.ɵɵelementStart(0,"div",12),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",13),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",14),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noEventsInList"),"\n "))}function x(e,t){1&e&&(r.ɵɵelementStart(0,"th",34),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"user")))}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"td"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"span",37),r.ɵɵtext(3),r.ɵɵelementEnd(),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit;r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",e.userEmail),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.userName)}}function b(e,t){if(1&e&&(r.ɵɵelementStart(0,"tr"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td"),r.ɵɵtext(3),r.ɵɵpipe(4,"date"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"td"),r.ɵɵtext(7,"\n "),r.ɵɵelement(8,"i",35),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"span",14),r.ɵɵtext(11),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,S,5,2,"td",25),r.ɵɵtext(15,"\n "),r.ɵɵelement(16,"td",36),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit,n=r.ɵɵnextContext(3);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(4,10,e.date,"medium")),r.ɵɵadvance(5),r.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),r.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),r.ɵɵadvance(3),r.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",n.showUser),r.ɵɵadvance(2),r.ɵɵproperty("innerHTML",e.message,r.ɵɵsanitizeHtml)}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",28),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"thead"),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"tr"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"th",29),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"th",30),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span",14),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵtemplate(17,x,3,3,"th",31),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"th",32),r.ɵɵtext(20),r.ɵɵpipe(21,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"tbody"),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,b,18,13,"tr",33),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,5,"timestamp")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(14,7,"device")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showUser),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(21,9,"event")),r.ɵɵadvance(7),r.ɵɵproperty("ngForOf",e.events)}}function I(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",38,39),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).loadEvents(!1)})),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",40),r.ɵɵpipe(4,"i18n"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext(2);r.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(4,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"loadMore"))}}const C=function(e){return{"bwi-spin":e}};function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",12),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",15),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",16),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"label",17),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"input",18),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().start=t})),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"span",19),r.ɵɵtext(14,"-"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"label",20),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"input",21),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().end=t})),r.ɵɵpipe(21,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"button",22,23),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().loadEvents(!0)})),r.ɵɵtext(26,"\n "),r.ɵɵelement(27,"i",24),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"hr"),r.ɵɵtext(33,"\n "),r.ɵɵtemplate(34,y,3,3,"div",25),r.ɵɵtext(35,"\n "),r.ɵɵtemplate(36,w,30,11,"table",26),r.ɵɵtext(37,"\n "),r.ɵɵtemplate(38,I,10,8,"button",27),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(25),t=r.ɵɵnextContext();r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,13,"startDate")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("placeholder",r.ɵɵpipeBind1(11,15,"startDate")),r.ɵɵproperty("ngModel",t.start),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(18,17,"endDate")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("placeholder",r.ɵɵpipeBind1(21,19,"endDate")),r.ɵɵproperty("ngModel",t.end),r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.refreshPromise)("disabled",t.loaded&&e.loading),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction1(23,C,t.loaded&&e.loading)),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(29,21,"refresh"),"\n "),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",!t.events||!t.events.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.events&&t.events.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.continuationToken)}}class P{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.eventService=n,this.platformUtilsService=i,this.userNamePipe=r,this.logService=o,this.showUser=!1,this.loading=!0,this.loaded=!1,this.orgUsersUserIdMap=new Map,this.orgUsersIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=this.eventService.getDefaultDateFilters();this.start=e[0],this.end=e[1],yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){if(this.showUser){(yield this.apiService.getOrganizationUsers(this.organizationId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersIdMap.set(e.id,{name:t,email:e.email}),this.orgUsersUserIdMap.set(e.userId,{name:t,email:e.email})}))}yield this.loadEvents(!0),this.loaded=!0}))}loadEvents(e){return i(this,void 0,void 0,(function*(){if(null!=this.refreshPromise||null!=this.morePromise)return;let t,n=null;try{n=this.eventService.formatDateFilters(this.start,this.end)}catch(o){return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange"))}this.loading=!0;try{let i;i="user"===this.entity&&this.providerId?this.apiService.getEventsProviderUser(this.providerId,this.entityId,n[0],n[1],e?null:this.continuationToken):"user"===this.entity?this.apiService.getEventsOrganizationUser(this.organizationId,this.entityId,n[0],n[1],e?null:this.continuationToken):this.apiService.getEventsCipher(this.entityId,n[0],n[1],e?null:this.continuationToken),e?this.refreshPromise=i:this.morePromise=i,t=yield i}catch(o){this.logService.error(o)}this.continuationToken=t.continuationToken;const r=yield Promise.all(t.data.map((e=>i(this,void 0,void 0,(function*(){const t=null==e.actingUserId?e.userId:e.actingUserId,n=yield this.eventService.getEventInfo(e),i=this.showUser&&null!=t&&this.orgUsersUserIdMap.has(t)?this.orgUsersUserIdMap.get(t):null;return{message:n.message,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=i?i.name:this.showUser?this.i18nService.t("unknown"):null,userEmail:null!=i?i.email:this.showUser?"":null,date:e.date,ip:e.ipAddress,type:e.type}})))));!e&&null!=this.events&&this.events.length>0?this.events=this.events.concat(r):this.events=r,this.loading=!1,this.morePromise=null,this.refreshPromise=null}))}}t.EntityEventsComponent=P,P.ɵfac=function(e){return new(e||P)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.EventService),r.ɵɵdirectiveInject(l.PlatformUtilsService),r.ɵɵdirectiveInject(c.UserNamePipe),r.ɵɵdirectiveInject(d.LogService))},P.ɵcmp=r.ɵɵdefineComponent({type:P,selectors:[["app-entity-events"]],inputs:{name:"name",entity:"entity",entityId:"entityId",organizationId:"organizationId",providerId:"providerId",showUser:"showUser"},decls:36,vars:12,consts:[["role","dialog","aria-modal","true","aria-labelledby","eventLogsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","eventLogsTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"appApiAction","disabled","click"],["refreshBtn",""],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],[4,"ngIf"],["class","table table-hover mb-0",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover","mb-0"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["class","border-top-0","width","150",4,"ngIf"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["width","150",1,"border-top-0"],["aria-hidden","true",3,"title"],[3,"innerHTML"],[3,"appA11yTitle"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵtemplate(11,f,2,1,"small",5),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",6),r.ɵɵpipe(15,"i18n"),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"span",7),r.ɵɵtext(18,"×"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,g,9,6,"div",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,E,40,25,"div",8),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",9),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"button",10),r.ɵɵtext(29),r.ɵɵpipe(30,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,6,"eventLogs"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.name),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(15,8,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.loaded),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.loaded),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(30,10,"close"),"\n "))},directives:[p.NgIf,u.A11yTitleDirective,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,h.ApiActionDirective,p.NgClass,p.NgForOf],pipes:[v.I18nPipe,p.DatePipe],encapsulation:2})},8218:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EntityUsersComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(68320)),a=n(16233),s=n(69788),l=(n(99954),n(70829)),c=n(32621),d=n(91092),p=n(40349),u=n(99954),m=n(70143),h=n(96832),v=n(637),f=n(50553),g=n(57490),y=n(92521),x=n(69242),S=n(72596),b=n(35734),w=n(68625);function I(e,t){1&e&&(c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",14),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){if(1&e&&(c.ɵɵelementStart(0,"span",24),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.selectedCount)}}function E(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"hr"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"noUsersInList"),"\n "))}function P(e,t){1&e&&(c.ɵɵelementStart(0,"th"),c.ɵɵtext(1," "),c.ɵɵelementEnd())}function k(e,t){1&e&&(c.ɵɵelementStart(0,"th",28),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"hidePasswords"),"\n "))}function A(e,t){1&e&&(c.ɵɵelementStart(0,"th",28),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"readOnly"),"\n "))}function O(e,t){1&e&&(c.ɵɵelementStart(0,"span",37),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"invited")))}function T(e,t){1&e&&(c.ɵɵelementStart(0,"span",38),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"accepted")))}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"small",39),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function D(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",40),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",15),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"userAccessAllItems")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"userAccessAllItems")))}function B(e,t){if(1&e&&(c.ɵɵelementStart(0,"td"),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,D,9,6,"ng-container",23),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.accessAll)}}function R(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"owner")))}function U(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"admin")))}function V(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"manager")))}function F(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"user")))}function N(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"custom")))}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",42),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",e.accessAll||!e.checked)}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"td",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",42),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",e.accessAll||!e.checked)}}function z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",29),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",30),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t}))("change",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).selectedChanged(t)})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",31),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).check(t)})),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"app-avatar",32),c.ɵɵpipe(10,"userName"),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"td"),c.ɵɵtext(15),c.ɵɵtemplate(16,O,3,3,"span",33),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,T,3,3,"span",34),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,M,2,1,"small",35),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵtemplate(23,B,4,1,"td",23),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"td"),c.ɵɵtext(26,"\n "),c.ɵɵtemplate(27,R,3,3,"span",23),c.ɵɵtext(28,"\n "),c.ɵɵtemplate(29,U,3,3,"span",23),c.ɵɵtext(30,"\n "),c.ɵɵtemplate(31,V,3,3,"span",23),c.ɵɵtext(32,"\n "),c.ɵɵtemplate(33,F,3,3,"span",23),c.ɵɵtext(34,"\n "),c.ɵɵtemplate(35,N,3,3,"span",23),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵtemplate(38,_,4,3,"td",36),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,j,4,3,"td",36),c.ɵɵtext(41,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","",e.id.substr(0,8),"_Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled","collection"===n.entity&&e.accessAll),c.ɵɵadvance(5),c.ɵɵproperty("data",c.ɵɵpipeBind1(10,19,e))("email",e.email)("circle",!0)("fontSize",14),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",e.email,"\n "),c.ɵɵadvance(1),c.ɵɵproperty("ngIf",e.status===n.organizationUserStatusType.Invited),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.status===n.organizationUserStatusType.Accepted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.name),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===n.entity),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Owner),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Admin),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Manager),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.User),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.type===n.organizationUserType.Custom),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===n.entity),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","collection"===n.entity)}}function L(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"table",25),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"thead"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"tr"),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"th"),c.ɵɵtext(9," "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"th"),c.ɵɵtext(12," "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"th"),c.ɵɵtext(15),c.ɵɵpipe(16,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,P,2,0,"th",23),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"th"),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,k,3,3,"th",26),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,A,3,3,"th",26),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"tbody"),c.ɵɵtext(31,"\n "),c.ɵɵtemplate(32,z,42,21,"tr",27),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵadvance(15),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(16,6,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(22,8,"userType")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(2),c.ɵɵproperty("ngIf","collection"===t.entity),c.ɵɵadvance(6),c.ɵɵproperty("ngForOf",e)}}const K=function(e){return{active:e}};function q(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",18),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",19),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().searchText=t})),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"div",20),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",21),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().filterSelected(!1)})),c.ɵɵtext(17),c.ɵɵpipe(18,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"button",21),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().filterSelected(!0)})),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵtemplate(23,C,2,1,"span",22),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵtemplate(28,E,5,3,"ng-container",23),c.ɵɵtext(29,"\n "),c.ɵɵtemplate(30,L,36,10,"ng-container",23),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.ngIf,n=c.ɵɵnextContext();c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,10,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(11,12,"search")),c.ɵɵproperty("ngModel",n.searchText),c.ɵɵadvance(6),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(18,K,!n.showSelected)),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(18,14,"all"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(20,K,n.showSelected)),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(22,16,"selected"),"\n "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",n.selectedCount),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}const G=function(e,t){return[e,t,"name","email","id"]};class W{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onEditedUsers=new r.EventEmitter,this.organizationUserType=a.OrganizationUserType,this.organizationUserStatusType=o.OrganizationUserStatusType,this.showSelected=!1,this.loading=!0,this.selectedCount=0,this.allUsers=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.loadUsers(),this.loading=!1}))}get users(){return this.showSelected?this.allUsers.filter((e=>e.checked)):this.allUsers}loadUsers(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getOrganizationUsers(this.organizationId);if(this.allUsers=e.data.map((e=>e)).sort(l.Utils.getSortFunction(this.i18nService,"email")),"group"===this.entity){const t=yield this.apiService.getGroupUsers(this.organizationId,this.entityId);null!=t&&e.data.length>0&&t.forEach((t=>{const n=e.data.filter((e=>e.id===t));null!=n&&n.length>0&&(n[0].checked=!0)}))}else if("collection"===this.entity){const t=yield this.apiService.getCollectionUsers(this.organizationId,this.entityId);null!=t&&e.data.length>0&&t.forEach((t=>{const n=e.data.filter((e=>!e.accessAll&&e.id===t.id));null!=n&&n.length>0&&(n[0].checked=!0,n[0].readOnly=t.readOnly,n[0].hidePasswords=t.hidePasswords)}))}this.allUsers.forEach((e=>{"collection"===this.entity&&e.accessAll&&(e.checked=!0),e.checked&&this.selectedCount++}))}))}check(e){"collection"===this.entity&&e.accessAll||(e.checked=!e.checked,this.selectedChanged(e))}selectedChanged(e){e.checked?this.selectedCount++:("collection"===this.entity&&(e.readOnly=!1,e.hidePasswords=!1),this.selectedCount--)}filterSelected(e){this.showSelected=e}submit(){return i(this,void 0,void 0,(function*(){try{if("group"===this.entity){const e=this.users.filter((e=>e.checked)).map((e=>e.id));this.formPromise=this.apiService.putGroupUsers(this.organizationId,this.entityId,e)}else{const e=this.users.filter((e=>e.checked&&!e.accessAll)).map((e=>new s.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)));this.formPromise=this.apiService.putCollectionUsers(this.organizationId,this.entityId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedUsers")),this.onEditedUsers.emit()}catch(e){this.logService.error(e)}}))}}t.EntityUsersComponent=W,W.ɵfac=function(e){return new(e||W)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},W.ɵcmp=c.ɵɵdefineComponent({type:W,selectors:[["app-entity-users"]],inputs:{entity:"entity",entityId:"entityId",entityName:"entityName",organizationId:"organizationId"},outputs:{onEditedUsers:"onEditedUsers"},decls:49,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAccessTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"d-flex"],[1,"mr-3"],["for","search",1,"sr-only"],["type","search","id","search","name","SearchText",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],[4,"ngIf"],[1,"badge","badge-pill","badge-info"],[1,"table","table-hover","table-list","mb-0"],["width","100","class","text-center",4,"ngIf"],[4,"ngFor","ngForOf"],["width","100",1,"text-center"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","disabled","ngModelChange","change"],["width","30",3,"click"],["size","25",3,"data","email","circle","fontSize"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],["class","text-center",4,"ngIf"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-filter",3,"title"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementStart(12,"small"),c.ɵɵtext(13),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",6),c.ɵɵpipe(17,"i18n"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"span",7),c.ɵɵtext(20,"×"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,I,9,6,"div",8),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,q,32,22,"div",8),c.ɵɵpipe(27,"search"),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",9),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"button",10),c.ɵɵtext(32,"\n "),c.ɵɵelement(33,"i",11),c.ɵɵpipe(34,"i18n"),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"span"),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"button",12),c.ɵɵtext(42),c.ɵɵpipe(43,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(11,10,"userAccess"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(t.entityName),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(17,12,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading||!t.users),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&t.users&&c.ɵɵpipeBindV(27,14,c.ɵɵpureFunction2(26,G,t.users,t.searchText))),c.ɵɵadvance(5),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(34,20,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(38,22,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(43,24,"close"),"\n ")}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.A11yTitleDirective,g.NgIf,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,g.NgClass,g.NgForOf,h.CheckboxControlValueAccessor,y.StopPropDirective,x.AvatarComponent],pipes:[S.I18nPipe,b.SearchPipe,w.UserNamePipe],encapsulation:2})},66259:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventsComponent=void 0;n(68012),n(68625),n(91092),n(38364),n(40349),n(70143),n(94308),n(99954),n(85556),n(62858);const r=n(5869),o=n(32621),a=n(91092),s=n(68012),l=n(62858),c=n(40349),d=n(38364),p=n(99954),u=n(70143),m=n(68625),h=n(94308),v=n(85556),f=n(96832),g=n(637),y=n(57490),x=n(72596);function S(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",17),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noEventsInList")))}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",26),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"span",17),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"td"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",27),o.ɵɵtext(17),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelement(20,"td",28),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,11,e.date,"medium")),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("text-muted bwi bwi-lg ",e.appIcon,""),o.ɵɵpropertyInterpolate2("title","",e.appName,", ",e.ip,""),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",e.appName,", ",e.ip,""),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",e.userEmail),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.userName),o.ɵɵadvance(3),o.ɵɵproperty("innerHTML",e.message,o.ɵɵsanitizeHtml)}}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"thead"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"tr"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"th",21),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th",22),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"span",17),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"th",23),o.ɵɵtext(18),o.ɵɵpipe(19,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"th",24),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"tbody"),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,w,22,14,"tr",25),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"timestamp")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"device")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(19,9,"user")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"event")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",e.events)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",29,30),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).loadEvents(!1)})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",31),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",t.morePromise)("disabled",t.loaded&&e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"loadMore"))}}function E(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,3,3,"p",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,32,13,"table",18),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,C,10,8,"button",19),o.ɵɵtext(7,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.events||!e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.events&&e.events.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.continuationToken)}}const P=function(e){return{"bwi-spin":e}},k=function(e){return{loading:e}};class A extends r.BaseEventsComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(n,i,r,o,s),this.apiService=e,this.route=t,this.router=a,this.userNamePipe=l,this.organizationService=c,this.providerService=d,this.exportFileName="org-events",this.orgUsersUserIdMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,this.organization=yield this.organizationService.get(this.organizationId),null!=this.organization&&this.organization.useEvents?yield this.load():this.router.navigate(["/organizations",this.organizationId])}))))}))}load(){return i(this,void 0,void 0,(function*(){if((yield this.apiService.getOrganizationUsers(this.organizationId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersUserIdMap.set(e.userId,{name:t,email:e.email})})),null!=this.organization.providerId)try{if(null!=(yield this.providerService.get(this.organization.providerId))&&(yield this.providerService.get(this.organization.providerId)).canManageUsers){(yield this.apiService.getProviderUsers(this.organization.providerId)).data.forEach((e=>{const t=this.userNamePipe.transform(e);this.orgUsersUserIdMap.set(e.userId,{name:`${t} (${this.organization.providerName})`,email:e.email})}))}}catch(e){this.logService.warning(e)}yield this.loadEvents(!0),this.loaded=!0}))}requestEvents(e,t,n){return this.apiService.getEventsOrganization(this.organizationId,e,t,n)}getUserName(e,t){return null==t?null:this.orgUsersUserIdMap.has(t)?this.orgUsersUserIdMap.get(t):null!=e.providerId&&e.providerId===this.organization.providerId?{name:this.organization.providerName}:null}}t.EventsComponent=A,A.ɵfac=function(e){return new(e||A)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.ActivatedRoute),o.ɵɵdirectiveInject(l.EventService),o.ɵɵdirectiveInject(c.I18nService),o.ɵɵdirectiveInject(d.ExportService),o.ɵɵdirectiveInject(p.PlatformUtilsService),o.ɵɵdirectiveInject(s.Router),o.ɵɵdirectiveInject(u.LogService),o.ɵɵdirectiveInject(m.UserNamePipe),o.ɵɵdirectiveInject(h.OrganizationService),o.ɵɵdirectiveInject(v.ProviderService))},A.ɵcmp=o.ɵɵdefineComponent({type:A,selectors:[["app-org-events"]],features:[o.ɵɵInheritDefinitionFeature],decls:57,vars:35,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],[1,"form-inline"],["for","start",1,"sr-only"],["type","datetime-local","id","start","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"mx-2"],["for","end",1,"sr-only"],["type","datetime-local","id","end","placeholder","YYYY-MM-DDTHH:MM",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange","change"],[1,"d-inline",3,"appApiAction"],["refreshForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["exportForm",""],["type","button",1,"btn","btn-sm","btn-outline-primary","btn-submit","manual","ml-3",3,"ngClass","disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover",4,"ngIf"],["type","button","class","btn btn-block btn-link btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"table","table-hover"],["width","210",1,"border-top-0"],["width","40",1,"border-top-0"],["width","150",1,"border-top-0"],[1,"border-top-0"],[4,"ngFor","ngForOf"],["aria-hidden","true",3,"title"],[3,"title"],[3,"innerHTML"],["type","button",1,"btn","btn-block","btn-link","btn-submit",3,"appApiAction","disabled","click"],["moreBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",1),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",2),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",3),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",4),o.ɵɵlistener("ngModelChange",(function(e){return t.start=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"span",5),o.ɵɵtext(18,"-"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"label",6),o.ɵɵtext(21),o.ɵɵpipe(22,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"input",7),o.ɵɵlistener("ngModelChange",(function(e){return t.end=e}))("change",(function(){return t.dirtyDates=!0})),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"form",8,9),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"button",10),o.ɵɵlistener("click",(function(){return t.loadEvents(!0)})),o.ɵɵtext(32,"\n "),o.ɵɵelement(33,"i",11),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"form",8,12),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",13),o.ɵɵlistener("click",(function(){return t.exportEvents()})),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",14),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵtemplate(53,S,9,6,"ng-container",15),o.ɵɵtext(54,"\n"),o.ɵɵtemplate(55,E,8,3,"ng-container",15),o.ɵɵtext(56,"\n")),2&e){const e=o.ɵɵreference(29),n=o.ɵɵreference(39);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"eventLogs")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,19,"startDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(15,21,"startDate")),o.ɵɵproperty("ngModel",t.start),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(22,23,"endDate")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("placeholder",o.ɵɵpipeBind1(25,25,"endDate")),o.ɵɵproperty("ngModel",t.end),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.refreshPromise),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loaded&&e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(31,P,t.loaded&&e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(35,27,"refresh"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.exportPromise),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(33,k,n.loading))("disabled",t.loaded&&n.loading||t.dirtyDates),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"export")),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded)}},directives:[f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,f.ɵNgNoValidate,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.NgClass,y.NgIf,y.NgForOf],pipes:[x.I18nPipe,y.DatePipe],encapsulation:2})},82312:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupAddEditComponent=void 0;const r=n(32621),o=(n(91092),n(69050),n(40349),n(70143),n(99954),n(58209)),a=n(30260),s=n(65575),l=n(69788),c=n(32621),d=n(91092),p=n(40349),u=n(69050),m=n(99954),h=n(70143),v=n(96832),f=n(637),g=n(50553),y=n(57490),x=n(92521),S=n(72596);function b(e,t){1&e&&(c.ɵɵelementStart(0,"div",15),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",16),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",17),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).selectAll(!0)})),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).selectAll(!1)})),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,2,"selectAll"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function I(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function C(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",41),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",42),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",43),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).check(t)})),c.ɵɵtext(8),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"td",44),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",45),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.hidePasswords=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"td",44),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",45),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.readOnly=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",e.name,"\n "),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].HidePasswords"),c.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].ReadOnly"),c.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked)}}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"table",38),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"thead"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"tr"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"th"),c.ɵɵtext(7," "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"th"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"th",39),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"th",39),c.ɵɵtext(18),c.ɵɵpipe(19,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"tbody"),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,C,20,9,"tr",40),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,4,"name")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,6,"hidePasswords")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(19,8,"readOnly")),c.ɵɵadvance(7),c.ɵɵproperty("ngForOf",e.collections)}}function P(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,I,3,3,"div",35),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,E,28,10,"table",37),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.collections||!e.collections.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const k=function(e){return{"mb-0":e}};function A(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",15),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",18),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",19),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",20),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"div",18),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"label",21),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"input",22),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().externalId=t})),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"small",23),c.ɵɵtext(20),c.ɵɵpipe(21,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"h3",24),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",25),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementStart(29,"a",26),c.ɵɵpipe(30,"i18n"),c.ɵɵtext(31,"\n "),c.ɵɵelement(32,"i",27),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵtemplate(36,w,10,6,"div",28),c.ɵɵtext(37,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"div",29),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"div",30),c.ɵɵtext(42,"\n "),c.ɵɵelementStart(43,"input",31),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().access=t})),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"label",32),c.ɵɵtext(46),c.ɵɵpipe(47,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n "),c.ɵɵelementStart(50,"div",30),c.ɵɵtext(51,"\n "),c.ɵɵelementStart(52,"input",33),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().access=t})),c.ɵɵelementEnd(),c.ɵɵtext(53,"\n "),c.ɵɵelementStart(54,"label",34),c.ɵɵtext(55),c.ɵɵpipe(56,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(57,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(58,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(59,"\n "),c.ɵɵtemplate(60,P,6,2,"ng-container",35),c.ɵɵtext(61,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,14,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.name),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(15,16,"externalId")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.externalId),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(21,18,"externalIdDesc")),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,20,"accessControl"),"\n "),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(30,22,"learnMore")),c.ɵɵadvance(7),c.ɵɵproperty("ngIf","selected"===e.access&&e.collections&&e.collections.length),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(28,k,"selected"!==e.access)),c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.access),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(47,24,"groupAccessAllItems"),"\n "),c.ɵɵadvance(6),c.ɵɵproperty("ngModel",e.access),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(56,26,"groupAccessSelectedCollections"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf","selected"===e.access)}}function O(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",46,47),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",48),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",49),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext();c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}class T{constructor(e,t,n,i,o){this.apiService=e,this.i18nService=t,this.collectionService=n,this.platformUtilsService=i,this.logService=o,this.onSavedGroup=new r.EventEmitter,this.onDeletedGroup=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.access="selected",this.collections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.groupId,yield this.loadCollections(),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editGroup");try{const e=yield this.apiService.getGroupDetails(this.organizationId,this.groupId);this.access=e.accessAll?"all":"selected",this.name=e.name,this.externalId=e.externalId,null!=e.collections&&null!=this.collections&&e.collections.forEach((e=>{const t=this.collections.filter((t=>t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("addGroup");this.loading=!1}))}loadCollections(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getCollections(this.organizationId)).data.map((e=>new a.Collection(new o.CollectionData(e))));this.collections=yield this.collectionService.decryptMany(e)}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){const e=new s.GroupRequest;e.name=this.name,e.externalId=this.externalId,e.accessAll="all"===this.access,e.accessAll||(e.collections=this.collections.filter((e=>e.checked)).map((e=>new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords))));try{this.editMode?this.formPromise=this.apiService.putGroup(this.organizationId,this.groupId,e):this.formPromise=this.apiService.postGroup(this.organizationId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedGroupId":"createdGroupId",this.name)),this.onSavedGroup.emit()}catch(t){this.logService.error(t)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteGroup(this.organizationId,this.groupId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedGroupId",this.name)),this.onDeletedGroup.emit()}catch(e){this.logService.error(e)}}))}}t.GroupAddEditComponent=T,T.ɵfac=function(e){return new(e||T)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.CollectionService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.LogService))},T.ɵcmp=c.ɵɵdefineComponent({type:T,selectors:[["app-group-add-edit"]],inputs:{groupId:"groupId",organizationId:"organizationId"},outputs:{onSavedGroup:"onSavedGroup",onDeletedGroup:"onDeletedGroup"},decls:49,vars:18,consts:[["role","dialog","aria-modal","true","aria-labelledby","groupAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[1,"mt-4","d-flex"],[1,"mb-2"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/user-types-access-control/#access-control",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[4,"ngIf"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,b,9,6,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,A,62,30,"div",8),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"div",9),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"button",10),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"i",11),c.ɵɵpipe(29,"i18n"),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"span"),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"button",12),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"div",13),c.ɵɵtext(41,"\n "),c.ɵɵtemplate(42,O,9,10,"button",14),c.ɵɵtext(43,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n")),2&e){const e=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,10,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(29,12,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(33,14,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(38,16,"cancel"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.editMode)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.A11yTitleDirective,y.NgIf,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,y.NgClass,v.RadioControlValueAccessor,y.NgForOf,v.CheckboxControlValueAccessor,x.StopPropDirective],pipes:[S.I18nPipe],encapsulation:2})},54030:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupsComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(91092),n(40349),n(70143),n(94308),n(99954),n(14170),n(29546),n(70829)),s=n(8218),l=n(82312),c=n(32621),d=n(91092),p=n(68012),u=n(40349),m=n(29546),h=n(99954),v=n(14170),f=n(70143),g=n(94308),y=n(96832),x=n(57490),S=n(37407),b=n(80507),w=n(50553),I=n(72596),C=n(35734),E=["addEdit"],P=["usersTemplate"];function k(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",9),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",10),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function A(e,t){1&e&&(c.ɵɵelementStart(0,"p"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"noGroupsInList")))}function O(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td"),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"a",14),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).edit(t)})),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"td",15),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",16),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",17),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelement(15,"i",18),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",19),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"a",20),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).users(t)})),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"i",21),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"a",22),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).delete(t)})),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"i",23),c.ɵɵtext(29),c.ɵɵpipe(30,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit;c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.name),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,4,"options")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(24,6,"users"),"\n "),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(30,8,"delete"),"\n ")}}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"table",12),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,O,35,10,"tr",13),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function M(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,A,3,3,"p",6),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,T,7,3,"table",11),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length)}}function D(e,t){}function B(e,t){}class R{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.route=t,this.i18nService=n,this.modalService=i,this.platformUtilsService=r,this.router=o,this.searchService=a,this.logService=s,this.organizationService=l,this.loading=!0,this.didScroll=!1,this.pageSize=100,this.pagedGroupsCount=0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId;const t=yield this.organizationService.get(this.organizationId);null!=t&&t.useGroups?(yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.searchText=e.search}))))):this.router.navigate(["/organizations",this.organizationId])}))))}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getGroups(this.organizationId),t=null!=e.data&&e.data.length>0?e.data:[];t.sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,this.resetPaging(),this.loading=!1}))}loadMore(){if(!this.groups||this.groups.length<=this.pageSize)return;const e=this.pagedGroups.length;let t=this.pageSize;0===e&&this.pagedGroupsCount>this.pageSize&&(t=this.pagedGroupsCount),this.groups.length>e&&(this.pagedGroups=this.pagedGroups.concat(this.groups.slice(e,e+t))),this.pagedGroupsCount=this.pagedGroups.length,this.didScroll=this.pagedGroups.length>this.pageSize}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(l.GroupAddEditComponent,this.addEditModalRef,(n=>{n.organizationId=this.organizationId,n.groupId=null!=e?e.id:null,n.onSavedGroup.subscribe((()=>{t.close(),this.load()})),n.onDeletedGroup.subscribe((()=>{t.close(),this.removeGroup(e)}))}))}))}add(){this.edit(null)}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteGroup(this.organizationId,e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedGroupId",e.name)),this.removeGroup(e)}catch(t){this.logService.error(t)}}))}users(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(s.EntityUsersComponent,this.usersModalRef,(n=>{n.organizationId=this.organizationId,n.entity="group",n.entityId=e.id,n.entityName=e.name,n.onEditedUsers.subscribe((()=>{t.close()}))}))}))}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedGroups=[],this.loadMore()}))}isSearching(){return this.searchService.isSearchable(this.searchText)}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.groups&&this.groups.length>this.pageSize}removeGroup(e){const t=this.groups.indexOf(e);t>-1&&(this.groups.splice(t,1),this.resetPaging())}}t.GroupsComponent=R,R.ɵfac=function(e){return new(e||R)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.ActivatedRoute),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.ModalService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(p.Router),c.ɵɵdirectiveInject(v.SearchService),c.ɵɵdirectiveInject(f.LogService),c.ɵɵdirectiveInject(g.OrganizationService))},R.ɵcmp=c.ɵɵdefineComponent({type:R,selectors:[["app-org-groups"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(E,7,r.ViewContainerRef),c.ɵɵviewQuery(P,7,r.ViewContainerRef)),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.addEditModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.usersModalRef=e.first)}},decls:37,vars:20,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","table table-hover table-list","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",1),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div"),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",2),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",3),c.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"button",4),c.ɵɵlistener("click",(function(){return t.add()})),c.ɵɵtext(19,"\n "),c.ɵɵelement(20,"i",5),c.ɵɵtext(21),c.ɵɵpipe(22,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n"),c.ɵɵtemplate(26,k,9,6,"ng-container",6),c.ɵɵtext(27,"\n"),c.ɵɵtemplate(28,M,6,2,"ng-container",6),c.ɵɵpipe(29,"search"),c.ɵɵtext(30,"\n"),c.ɵɵtemplate(31,D,0,0,"ng-template",null,7,c.ɵɵtemplateRefExtractor),c.ɵɵtext(33,"\n"),c.ɵɵtemplate(34,B,0,0,"ng-template",null,8,c.ɵɵtemplateRefExtractor),c.ɵɵtext(36,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,7,"groups")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,9,"search")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("placeholder",c.ɵɵpipeBind1(15,11,"search")),c.ɵɵproperty("ngModel",t.searchText),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(22,13,"newGroup"),"\n "),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedGroups:c.ɵɵpipeBind4(29,15,t.groups,t.searchText,"name","id"))))},directives:[y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,x.NgIf,S.InfiniteScrollDirective,x.NgForOf,b.StopClickDirective,w.A11yTitleDirective],pipes:[I.I18nPipe,C.SearchPipe],encapsulation:2})},93263:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ManageComponent=void 0;n(68012),n(94308);const r=n(32621),o=n(68012),a=n(94308),s=n(57490),l=n(72596);function c(e,t){1&e&&(r.ɵɵelementStart(0,"a",14),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"people"),"\n "))}function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",15),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"collections"),"\n "))}function p(e,t){1&e&&(r.ɵɵelementStart(0,"a",16),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"groups"),"\n "))}function u(e,t){1&e&&(r.ɵɵelementStart(0,"a",17),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"policies"),"\n "))}function m(e,t){1&e&&(r.ɵɵelementStart(0,"a",18),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"singleSignOn"),"\n "))}function h(e,t){1&e&&(r.ɵɵelementStart(0,"a",19),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"eventLogs"),"\n "))}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",5),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",6),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",7),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,c,3,3,"a",8),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,d,3,3,"a",9),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,p,3,3,"a",10),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,u,3,3,"a",11),r.ɵɵtext(15,"\n "),r.ɵɵtemplate(16,m,3,3,"a",12),r.ɵɵtext(17,"\n "),r.ɵɵtemplate(18,h,3,3,"a",13),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,7,"manage")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.organization.canManageUsers),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canViewAllCollections||e.organization.canViewAssignedCollections),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManageGroups&&e.accessGroups),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManagePolicies&&e.accessPolicies),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canManageSso&&e.accessSso),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canAccessEventLogs&&e.accessEvents)}}class f{constructor(e,t){this.route=e,this.organizationService=t,this.accessPolicies=!1,this.accessGroups=!1,this.accessEvents=!1,this.accessSso=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.accessPolicies=this.organization.usePolicies,this.accessSso=this.organization.useSso,this.accessEvents=this.organization.useEvents,this.accessGroups=this.organization.useGroups}))))}}t.ManageComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-org-manage"]],decls:16,vars:1,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","people","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","collections","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","groups","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","policies","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","sso","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","events","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","people","routerLinkActive","active",1,"list-group-item"],["routerLink","collections","routerLinkActive","active",1,"list-group-item"],["routerLink","groups","routerLinkActive","active",1,"list-group-item"],["routerLink","policies","routerLinkActive","active",1,"list-group-item"],["routerLink","sso","routerLinkActive","active",1,"list-group-item"],["routerLink","events","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,v,21,9,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",4),r.ɵɵtext(10,"\n "),r.ɵɵelement(11,"router-outlet"),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n")),2&e&&(r.ɵɵadvance(6),r.ɵɵproperty("ngIf",t.organization))},directives:[s.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive],pipes:[l.I18nPipe],encapsulation:2})},22110:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PeopleComponent=void 0;const r=n(32621),o=n(53232),a=(n(68012),n(9941),n(91092),n(82058),n(40349),n(70143),n(94308),n(99954),n(10685),n(14170),n(77243),n(2173),n(29546),n(93633)),s=n(13175),l=n(80119),c=n(68320),d=n(16233),p=n(40251),u=(n(35734),n(68625),n(14914)),m=n(76473),h=n(23918),v=n(42983),f=n(26530),g=n(44354),y=n(84195),x=n(56777),S=n(32621),b=n(91092),w=n(68012),I=n(40349),C=n(29546),E=n(99954),P=n(82058),k=n(14170),A=n(9941),O=n(10685),T=n(70143),M=n(35734),D=n(68625),B=n(2173),R=n(77243),U=n(94308),V=n(57490),F=n(96832),N=n(50553),_=n(80507),j=n(37407),z=n(52900),L=n(92521),K=n(69242),q=n(72596),G=["addEdit"],W=["groupsTemplate"],H=["eventsTemplate"],$=["confirmTemplate"],Q=["resetPasswordTemplate"],Y=["bulkStatusTemplate"],J=["bulkConfirmTemplate"],X=["bulkRemoveTemplate"];function Z(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",32),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.allCount)}}function ee(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",32),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.invitedCount)}}function te(e,t){if(1&e&&(S.ɵɵelementStart(0,"span",33),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext();S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.acceptedCount)}}function ne(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"button",34),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);return S.ɵɵnextContext().bulkConfirm()})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",35),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"confirmSelected"),"\n "))}function ie(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",36),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n"),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"loading")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"loading")))}function re(e,t){1&e&&(S.ɵɵelementStart(0,"p"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"noUsersInList")))}function oe(e,t){1&e&&(S.ɵɵelementStart(0,"app-callout",41),S.ɵɵpipe(1,"i18n"),S.ɵɵtext(2),S.ɵɵpipe(3,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(1,2,"confirmUsers")),S.ɵɵadvance(2),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(3,4,"usersNeedConfirmed"),"\n "))}function ae(e,t){1&e&&(S.ɵɵelementStart(0,"span",58),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"invited")))}function se(e,t){1&e&&(S.ɵɵelementStart(0,"span",59),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"accepted")))}function le(e,t){if(1&e&&(S.ɵɵelementStart(0,"small",60),S.ɵɵtext(1),S.ɵɵelementEnd()),2&e){const e=S.ɵɵnextContext().$implicit;S.ɵɵadvance(1),S.ɵɵtextInterpolate(e.name)}}function ce(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",61),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n "),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"userUsingTwoStep")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"userUsingTwoStep")))}function de(e,t){1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",62),S.ɵɵpipe(3,"i18n"),S.ɵɵtext(4,"\n "),S.ɵɵelementStart(5,"span",37),S.ɵɵtext(6),S.ɵɵpipe(7,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(8,"\n "),S.ɵɵelementContainerEnd()),2&e&&(S.ɵɵadvance(2),S.ɵɵpropertyInterpolate("title",S.ɵɵpipeBind1(3,2,"enrolledPasswordReset")),S.ɵɵadvance(4),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(7,4,"enrolledPasswordReset")))}function pe(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"owner")))}function ue(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"admin")))}function me(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"manager")))}function he(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"user")))}function ve(e,t){1&e&&(S.ɵɵelementStart(0,"span"),S.ɵɵtext(1),S.ɵɵpipe(2,"i18n"),S.ɵɵelementEnd()),2&e&&(S.ɵɵadvance(1),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(2,1,"custom")))}function fe(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).reinvite(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",14),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function ge(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",64),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).confirm(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",35),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function ye(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).groups(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",65),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"groups"),"\n "))}function xe(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).events(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",66),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function Se(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"a",63),S.ɵɵlistener("click",(function(){S.ɵɵrestoreView(e);const t=S.ɵɵnextContext().$implicit;return S.ɵɵnextContext(3).resetPassword(t)})),S.ɵɵtext(1,"\n "),S.ɵɵelement(2,"i",67),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd()}2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(4,1,"resetPassword"),"\n "))}function be(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementStart(0,"tr"),S.ɵɵtext(1,"\n "),S.ɵɵelementStart(2,"td",42),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).checkUser(t)})),S.ɵɵtext(3,"\n "),S.ɵɵelementStart(4,"input",43),S.ɵɵlistener("ngModelChange",(function(t){return S.ɵɵrestoreView(e).$implicit.checked=t})),S.ɵɵelementEnd(),S.ɵɵtext(5,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(6,"\n "),S.ɵɵelementStart(7,"td",44),S.ɵɵtext(8,"\n "),S.ɵɵelementStart(9,"app-avatar",45),S.ɵɵpipe(10,"userName"),S.ɵɵtext(11,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(12,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(13,"\n "),S.ɵɵelementStart(14,"td"),S.ɵɵtext(15,"\n "),S.ɵɵelementStart(16,"a",46),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).edit(t)})),S.ɵɵtext(17),S.ɵɵelementEnd(),S.ɵɵtext(18,"\n "),S.ɵɵtemplate(19,ae,3,3,"span",47),S.ɵɵtext(20,"\n "),S.ɵɵtemplate(21,se,3,3,"span",48),S.ɵɵtext(22,"\n "),S.ɵɵtemplate(23,le,2,1,"small",49),S.ɵɵtext(24,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(25,"\n "),S.ɵɵelementStart(26,"td"),S.ɵɵtext(27,"\n "),S.ɵɵtemplate(28,ce,9,6,"ng-container",23),S.ɵɵtext(29,"\n "),S.ɵɵtemplate(30,de,9,6,"ng-container",23),S.ɵɵtext(31,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(32,"\n "),S.ɵɵelementStart(33,"td"),S.ɵɵtext(34,"\n "),S.ɵɵtemplate(35,pe,3,3,"span",23),S.ɵɵtext(36,"\n "),S.ɵɵtemplate(37,ue,3,3,"span",23),S.ɵɵtext(38,"\n "),S.ɵɵtemplate(39,me,3,3,"span",23),S.ɵɵtext(40,"\n "),S.ɵɵtemplate(41,he,3,3,"span",23),S.ɵɵtext(42,"\n "),S.ɵɵtemplate(43,ve,3,3,"span",23),S.ɵɵtext(44,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(45,"\n "),S.ɵɵelementStart(46,"td",50),S.ɵɵtext(47,"\n "),S.ɵɵelementStart(48,"div",51),S.ɵɵtext(49,"\n "),S.ɵɵelementStart(50,"button",52),S.ɵɵpipe(51,"i18n"),S.ɵɵtext(52,"\n "),S.ɵɵelement(53,"i",53),S.ɵɵtext(54,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(55,"\n "),S.ɵɵelementStart(56,"div",54),S.ɵɵtext(57,"\n "),S.ɵɵtemplate(58,fe,5,3,"a",55),S.ɵɵtext(59,"\n "),S.ɵɵtemplate(60,ge,5,3,"a",56),S.ɵɵtext(61,"\n "),S.ɵɵtemplate(62,ye,5,3,"a",55),S.ɵɵtext(63,"\n "),S.ɵɵtemplate(64,xe,5,3,"a",55),S.ɵɵtext(65,"\n "),S.ɵɵtemplate(66,Se,5,3,"a",55),S.ɵɵtext(67,"\n "),S.ɵɵelementStart(68,"a",57),S.ɵɵlistener("click",(function(){const t=S.ɵɵrestoreView(e).$implicit;return S.ɵɵnextContext(3).remove(t)})),S.ɵɵtext(69,"\n "),S.ɵɵelement(70,"i",17),S.ɵɵtext(71),S.ɵɵpipe(72,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(73,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(74,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(75,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(76,"\n "),S.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=S.ɵɵnextContext(3);S.ɵɵadvance(4),S.ɵɵproperty("ngModel",e.checked),S.ɵɵadvance(5),S.ɵɵproperty("data",S.ɵɵpipeBind1(10,23,e))("email",e.email)("circle",!0)("fontSize",14),S.ɵɵadvance(8),S.ɵɵtextInterpolate(e.email),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.name),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",e.twoFactorEnabled),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.showEnrolledStatus(e)),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",e.type===n.userType.Owner),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Admin),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Manager),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.User),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.type===n.userType.Custom),S.ɵɵadvance(7),S.ɵɵpropertyInterpolate("appA11yTitle",S.ɵɵpipeBind1(51,25,"options")),S.ɵɵadvance(8),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Invited),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.status===n.userStatusType.Accepted),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.accessGroups),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.accessEvents&&e.status===n.userStatusType.Confirmed),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",n.allowResetPassword(e)),S.ɵɵadvance(5),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(72,27,"remove"),"\n ")}}function we(e,t){if(1&e){const e=S.ɵɵgetCurrentView();S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵtemplate(2,oe,4,6,"app-callout",38),S.ɵɵtext(3,"\n "),S.ɵɵelementStart(4,"table",39),S.ɵɵlistener("scrolled",(function(){S.ɵɵrestoreView(e);return S.ɵɵnextContext(2).loadMore()})),S.ɵɵtext(5,"\n "),S.ɵɵelementStart(6,"tbody"),S.ɵɵtext(7,"\n "),S.ɵɵtemplate(8,be,77,29,"tr",40),S.ɵɵtext(9,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(10,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(11,"\n "),S.ɵɵelementContainerEnd()}if(2&e){const e=S.ɵɵnextContext().ngIf,t=S.ɵɵnextContext();S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.showConfirmUsers),S.ɵɵadvance(2),S.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),S.ɵɵadvance(4),S.ɵɵproperty("ngForOf",e)}}function Ie(e,t){if(1&e&&(S.ɵɵelementContainerStart(0),S.ɵɵtext(1,"\n "),S.ɵɵtemplate(2,re,3,3,"p",23),S.ɵɵtext(3,"\n "),S.ɵɵtemplate(4,we,12,4,"ng-container",23),S.ɵɵtext(5,"\n"),S.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;S.ɵɵadvance(2),S.ɵɵproperty("ngIf",!e.length),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",e.length)}}function Ce(e,t){}function Ee(e,t){}function Pe(e,t){}function ke(e,t){}function Ae(e,t){}function Oe(e,t){}function Te(e,t){}function Me(e,t){}const De=function(e){return{active:e}},Be=function(e,t){return[e,t,"name","email","id"]};class Re extends u.BasePeopleComponent{constructor(e,t,n,i,r,o,a,s,l,p,u,m,h,v,f,g){super(e,s,n,r,o,l,i,u,m,h,f),this.route=t,this.router=a,this.policyService=p,this.syncService=v,this.organizationService=g,this.userType=d.OrganizationUserType,this.userStatusType=c.OrganizationUserStatusType,this.status=null,this.accessEvents=!1,this.accessGroups=!1,this.canResetPassword=!1,this.orgUseResetPassword=!1,this.orgHasKeys=!1,this.orgResetPasswordPolicyEnabled=!1,this.callingUserType=null}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId;const t=yield this.organizationService.get(this.organizationId);if(t.canManageUsers){if(this.accessEvents=t.useEvents,this.accessGroups=t.useGroups,this.canResetPassword=t.canManageUsersPassword,this.orgUseResetPassword=t.useResetPassword,this.callingUserType=t.type,this.orgHasKeys=t.hasPublicAndPrivateKeys,this.canResetPassword&&!this.orgHasKeys){const e=yield this.cryptoService.getOrgKey(this.organizationId),t=yield this.cryptoService.makeKeyPair(e),n=new a.OrganizationKeysRequest(t[0],t[1].encryptedString),i=yield this.apiService.postOrganizationKeys(this.organizationId,n);if(null==i)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));this.orgHasKeys=null!=i.publicKey&&null!=i.privateKey,yield this.syncService.fullSync(!0)}yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.searchText=e.search,null!=e.viewEvents){const t=this.users.filter((t=>t.id===e.viewEvents));t.length>0&&t[0].status===c.OrganizationUserStatusType.Confirmed&&this.events(t[0])}}))))}else this.router.navigate(["../collections"],{relativeTo:this.route})}))))}))}load(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){const t=yield this.policyService.getPolicyForOrganization(p.PolicyType.ResetPassword,this.organizationId);this.orgResetPasswordPolicyEnabled=null==t?void 0:t.enabled,e.load.call(this)}))}getUsers(){return this.apiService.getOrganizationUsers(this.organizationId)}deleteUser(e){return this.apiService.deleteOrganizationUser(this.organizationId,e)}reinviteUser(e){return this.apiService.postOrganizationUserReinvite(this.organizationId,e)}confirmUser(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.getOrgKey(this.organizationId),i=yield this.cryptoService.rsaEncrypt(n.key,t.buffer),r=new l.OrganizationUserConfirmRequest;r.key=i.encryptedString,yield this.apiService.postOrganizationUserConfirm(this.organizationId,e.id,r)}))}allowResetPassword(e){let t=!1;switch(this.callingUserType){case d.OrganizationUserType.Owner:t=!0;break;case d.OrganizationUserType.Admin:t=e.type!==d.OrganizationUserType.Owner;break;case d.OrganizationUserType.Custom:t=e.type!==d.OrganizationUserType.Owner&&e.type!==d.OrganizationUserType.Admin}return this.canResetPassword&&t&&this.orgUseResetPassword&&this.orgHasKeys&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled&&e.status===c.OrganizationUserStatusType.Confirmed}showEnrolledStatus(e){return this.orgUseResetPassword&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(y.UserAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.organizationId=this.organizationId,n.organizationUserId=null!=e?e.id:null,n.usesKeyConnector=null==e?void 0:e.usesKeyConnector,n.onSavedUser.subscribe((()=>{t.close(),this.load()})),n.onDeletedUser.subscribe((()=>{t.close(),this.removeUser(e)}))}))}))}groups(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(x.UserGroupsComponent,this.groupsModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.organizationId=this.organizationId,n.organizationUserId=null!=e?e.id:null,n.onSavedUser.subscribe((()=>{t.close()}))}))}))}bulkRemove(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(h.BulkRemoveComponent,this.bulkRemoveModalRef,(e=>{e.organizationId=this.organizationId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}bulkReinvite(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const e=this.getCheckedUsers(),t=e.filter((e=>e.status===c.OrganizationUserStatusType.Invited));if(t.length<=0)this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable"));else{try{const n=new s.OrganizationUserBulkRequest(t.map((e=>e.id))),i=this.apiService.postManyOrganizationUserReinvite(this.organizationId,n);this.showBulkStatus(e,t,i,this.i18nService.t("bulkReinviteMessage"))}catch(n){this.validationService.showError(n)}this.actionPromise=null}}))}bulkConfirm(){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise)return;const[e]=yield this.modalService.openViewRef(m.BulkConfirmComponent,this.bulkConfirmModalRef,(e=>{e.organizationId=this.organizationId,e.users=this.getCheckedUsers()}));yield e.onClosedPromise(),yield this.load()}))}events(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(f.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=this.userNamePipe.transform(e),t.organizationId=this.organizationId,t.entityId=e.id,t.showUser=!1,t.entity="user"}))}))}resetPassword(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(g.ResetPasswordComponent,this.resetPasswordModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.email=null!=e?e.email:null,n.organizationId=this.organizationId,n.id=null!=e?e.id:null,n.onPasswordReset.subscribe((()=>{t.close(),this.load()}))}))}))}deleteWarningMessage(e){return e.usesKeyConnector?this.i18nService.t("removeUserConfirmationKeyConnector"):super.deleteWarningMessage(e)}showBulkStatus(e,t,n,r){return i(this,void 0,void 0,(function*(){const[i,o]=yield this.modalService.openViewRef(v.BulkStatusComponent,this.bulkStatusModalRef,(e=>{e.loading=!0}));let a=!1;i.onShown.subscribe((()=>{a&&i.close()}));try{const a=yield n;if(i){const n=a.data.filter((e=>""!==e.error)).reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t.error})),{}),i=t.reduce(((e,t)=>Object.assign(Object.assign({},e),{[t.id]:t})),{});o.users=e.map((e=>{var t;let o=null!==(t=n[e.id])&&void 0!==t?t:r;return i.hasOwnProperty(e.id)||(o=this.i18nService.t("bulkFilteredMessage")),{user:e,error:n.hasOwnProperty(e.id),message:o}})),o.loading=!1}}catch(s){a=!0,i.close()}}))}}t.PeopleComponent=Re,Re.ɵfac=function(e){return new(e||Re)(S.ɵɵdirectiveInject(b.ApiService),S.ɵɵdirectiveInject(w.ActivatedRoute),S.ɵɵdirectiveInject(I.I18nService),S.ɵɵdirectiveInject(C.ModalService),S.ɵɵdirectiveInject(E.PlatformUtilsService),S.ɵɵdirectiveInject(P.CryptoService),S.ɵɵdirectiveInject(w.Router),S.ɵɵdirectiveInject(k.SearchService),S.ɵɵdirectiveInject(A.ValidationService),S.ɵɵdirectiveInject(O.PolicyService),S.ɵɵdirectiveInject(T.LogService),S.ɵɵdirectiveInject(M.SearchPipe),S.ɵɵdirectiveInject(D.UserNamePipe),S.ɵɵdirectiveInject(B.SyncService),S.ɵɵdirectiveInject(R.StateService),S.ɵɵdirectiveInject(U.OrganizationService))},Re.ɵcmp=S.ɵɵdefineComponent({type:Re,selectors:[["app-org-people"]],viewQuery:function(e,t){if(1&e&&(S.ɵɵviewQuery(G,7,r.ViewContainerRef),S.ɵɵviewQuery(W,7,r.ViewContainerRef),S.ɵɵviewQuery(H,7,r.ViewContainerRef),S.ɵɵviewQuery($,7,r.ViewContainerRef),S.ɵɵviewQuery(Q,7,r.ViewContainerRef),S.ɵɵviewQuery(Y,7,r.ViewContainerRef),S.ɵɵviewQuery(J,7,r.ViewContainerRef),S.ɵɵviewQuery(X,7,r.ViewContainerRef)),2&e){let e;S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.addEditModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.groupsModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.eventsModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.confirmModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.resetPasswordModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkStatusModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkConfirmModalRef=e.first),S.ɵɵqueryRefresh(e=S.ɵɵloadQuery())&&(t.bulkRemoveModalRef=e.first)}},features:[S.ɵɵInheritDefinitionFeature],decls:116,vars:61,consts:[[1,"page-header","d-flex"],[1,"ml-auto","d-flex"],["role","group",1,"btn-group","btn-group-sm"],["type","button",1,"btn","btn-outline-secondary",3,"ngClass","click"],["class","badge badge-pill badge-info",4,"ngIf"],["class","badge badge-pill badge-warning",4,"ngIf"],[1,"ml-3"],["for","search",1,"sr-only"],["type","search","id","search",1,"form-control","form-control-sm",3,"placeholder","ngModel","ngModelChange"],["appListDropdown","",1,"dropdown","ml-3"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"dropdown-divider"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[4,"ngIf"],["addEdit",""],["groupsTemplate",""],["eventsTemplate",""],["confirmTemplate",""],["resetPasswordTemplate",""],["bulkStatusTemplate",""],["bulkConfirmTemplate",""],["bulkRemoveTemplate",""],[1,"badge","badge-pill","badge-info"],[1,"badge","badge-pill","badge-warning"],["appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","bwi bwi-check-circle",3,"title"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"text-muted","d-block"],["aria-hidden","true",1,"bwi","bwi-lock",3,"title"],["aria-hidden","true",1,"bwi","bwi-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sitemap"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"]],template:function(e,t){1&e&&(S.ɵɵelementStart(0,"div",0),S.ɵɵtext(1,"\n "),S.ɵɵelementStart(2,"h1"),S.ɵɵtext(3),S.ɵɵpipe(4,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(5,"\n "),S.ɵɵelementStart(6,"div",1),S.ɵɵtext(7,"\n "),S.ɵɵelementStart(8,"div",2),S.ɵɵtext(9,"\n "),S.ɵɵelementStart(10,"button",3),S.ɵɵlistener("click",(function(){return t.filter(null)})),S.ɵɵtext(11),S.ɵɵpipe(12,"i18n"),S.ɵɵtemplate(13,Z,2,1,"span",4),S.ɵɵtext(14,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(15,"\n "),S.ɵɵelementStart(16,"button",3),S.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),S.ɵɵtext(17),S.ɵɵpipe(18,"i18n"),S.ɵɵtemplate(19,ee,2,1,"span",4),S.ɵɵtext(20,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(21,"\n "),S.ɵɵelementStart(22,"button",3),S.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),S.ɵɵtext(23),S.ɵɵpipe(24,"i18n"),S.ɵɵtemplate(25,te,2,1,"span",5),S.ɵɵtext(26,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(27,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(28,"\n "),S.ɵɵelementStart(29,"div",6),S.ɵɵtext(30,"\n "),S.ɵɵelementStart(31,"label",7),S.ɵɵtext(32),S.ɵɵpipe(33,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(34,"\n "),S.ɵɵelementStart(35,"input",8),S.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),S.ɵɵpipe(36,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(37,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(38,"\n "),S.ɵɵelementStart(39,"div",9),S.ɵɵtext(40,"\n "),S.ɵɵelementStart(41,"button",10),S.ɵɵpipe(42,"i18n"),S.ɵɵtext(43,"\n "),S.ɵɵelement(44,"i",11),S.ɵɵtext(45,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(46,"\n "),S.ɵɵelementStart(47,"div",12),S.ɵɵtext(48,"\n "),S.ɵɵelementStart(49,"button",13),S.ɵɵlistener("click",(function(){return t.bulkReinvite()})),S.ɵɵtext(50,"\n "),S.ɵɵelement(51,"i",14),S.ɵɵtext(52),S.ɵɵpipe(53,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(54,"\n "),S.ɵɵtemplate(55,ne,5,3,"button",15),S.ɵɵtext(56,"\n "),S.ɵɵelementStart(57,"button",16),S.ɵɵlistener("click",(function(){return t.bulkRemove()})),S.ɵɵtext(58,"\n "),S.ɵɵelement(59,"i",17),S.ɵɵtext(60),S.ɵɵpipe(61,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(62,"\n "),S.ɵɵelement(63,"div",18),S.ɵɵtext(64,"\n "),S.ɵɵelementStart(65,"button",13),S.ɵɵlistener("click",(function(){return t.selectAll(!0)})),S.ɵɵtext(66,"\n "),S.ɵɵelement(67,"i",19),S.ɵɵtext(68),S.ɵɵpipe(69,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(70,"\n "),S.ɵɵelementStart(71,"button",13),S.ɵɵlistener("click",(function(){return t.selectAll(!1)})),S.ɵɵtext(72,"\n "),S.ɵɵelement(73,"i",20),S.ɵɵtext(74),S.ɵɵpipe(75,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(76,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(77,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(78,"\n "),S.ɵɵelementStart(79,"button",21),S.ɵɵlistener("click",(function(){return t.invite()})),S.ɵɵtext(80,"\n "),S.ɵɵelement(81,"i",22),S.ɵɵtext(82),S.ɵɵpipe(83,"i18n"),S.ɵɵelementEnd(),S.ɵɵtext(84,"\n "),S.ɵɵelementEnd(),S.ɵɵtext(85,"\n"),S.ɵɵelementEnd(),S.ɵɵtext(86,"\n"),S.ɵɵtemplate(87,ie,9,6,"ng-container",23),S.ɵɵtext(88,"\n"),S.ɵɵtemplate(89,Ie,6,2,"ng-container",23),S.ɵɵpipe(90,"search"),S.ɵɵtext(91,"\n"),S.ɵɵtemplate(92,Ce,0,0,"ng-template",null,24,S.ɵɵtemplateRefExtractor),S.ɵɵtext(94,"\n"),S.ɵɵtemplate(95,Ee,0,0,"ng-template",null,25,S.ɵɵtemplateRefExtractor),S.ɵɵtext(97,"\n"),S.ɵɵtemplate(98,Pe,0,0,"ng-template",null,26,S.ɵɵtemplateRefExtractor),S.ɵɵtext(100,"\n"),S.ɵɵtemplate(101,ke,0,0,"ng-template",null,27,S.ɵɵtemplateRefExtractor),S.ɵɵtext(103,"\n"),S.ɵɵtemplate(104,Ae,0,0,"ng-template",null,28,S.ɵɵtemplateRefExtractor),S.ɵɵtext(106,"\n"),S.ɵɵtemplate(107,Oe,0,0,"ng-template",null,29,S.ɵɵtemplateRefExtractor),S.ɵɵtext(109,"\n"),S.ɵɵtemplate(110,Te,0,0,"ng-template",null,30,S.ɵɵtemplateRefExtractor),S.ɵɵtext(112,"\n"),S.ɵɵtemplate(113,Me,0,0,"ng-template",null,31,S.ɵɵtemplateRefExtractor),S.ɵɵtext(115,"\n")),2&e&&(S.ɵɵadvance(3),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(4,22,"people")),S.ɵɵadvance(7),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(52,De,null==t.status)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(12,24,"all"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.allCount),S.ɵɵadvance(3),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(54,De,t.status==t.userStatusType.Invited)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(18,26,"invited"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.invitedCount),S.ɵɵadvance(3),S.ɵɵproperty("ngClass",S.ɵɵpureFunction1(56,De,t.status==t.userStatusType.Accepted)),S.ɵɵadvance(1),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(24,28,"accepted"),"\n "),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",t.acceptedCount),S.ɵɵadvance(7),S.ɵɵtextInterpolate(S.ɵɵpipeBind1(33,30,"search")),S.ɵɵadvance(3),S.ɵɵpropertyInterpolate("placeholder",S.ɵɵpipeBind1(36,32,"search")),S.ɵɵproperty("ngModel",t.searchText),S.ɵɵadvance(6),S.ɵɵpropertyInterpolate("appA11yTitle",S.ɵɵpipeBind1(42,34,"options")),S.ɵɵadvance(11),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(53,36,"reinviteSelected"),"\n "),S.ɵɵadvance(3),S.ɵɵproperty("ngIf",t.showBulkConfirmUsers),S.ɵɵadvance(5),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(61,38,"remove"),"\n "),S.ɵɵadvance(8),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(69,40,"selectAll"),"\n "),S.ɵɵadvance(6),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(75,42,"unselectAll"),"\n "),S.ɵɵadvance(8),S.ɵɵtextInterpolate1("\n ",S.ɵɵpipeBind1(83,44,"inviteUser"),"\n "),S.ɵɵadvance(5),S.ɵɵproperty("ngIf",t.loading),S.ɵɵadvance(2),S.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:S.ɵɵpipeBindV(90,46,S.ɵɵpureFunction2(58,Be,t.users,t.searchText)))))},directives:[V.NgClass,V.NgIf,F.DefaultValueAccessor,F.NgControlStatus,F.NgModel,N.A11yTitleDirective,_.StopClickDirective,j.InfiniteScrollDirective,V.NgForOf,z.CalloutComponent,F.CheckboxControlValueAccessor,L.StopPropDirective,K.AvatarComponent],pipes:[q.I18nPipe,M.SearchPipe,D.UserNamePipe],encapsulation:2})},60628:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PoliciesComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(91092),n(94308),n(29546),n(5768)),s=(n(15524),n(32621)),l=n(91092),c=n(68012),d=n(29546),p=n(94308),u=n(15524),m=n(57490),h=n(80507),v=n(72596),f=["editTemplate"];function g(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function y(e,t){1&e&&(s.ɵɵelementStart(0,"span",11),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enabled")))}function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"td"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).edit(t)})),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,y,3,3,"span",9),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"small",10),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,e.name)),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.policiesEnabledMap.get(e.type)),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,5,e.description))}}function S(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,x,12,7,"td",1),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.display(n.organization))}}function b(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",6),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,S,4,1,"tr",7),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.policies)}}function w(e,t){}class I{constructor(e,t,n,i,r,o){this.apiService=e,this.route=t,this.modalService=n,this.organizationService=i,this.policyListService=r,this.router=o,this.loading=!0,this.policiesEnabledMap=new Map}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,this.organization=yield this.organizationService.get(this.organizationId),null!=this.organization&&this.organization.usePolicies?(this.policies=this.policyListService.getPolicies(),yield this.load(),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null!=e.policyId){const t=e.policyId;for(const e of this.orgPolicies)if(e.id===t){for(let t=0;t<this.policies.length;t++)if(this.policies[t].type===e.type){this.edit(this.policies[t]);break}break}}}))))):this.router.navigate(["/organizations",this.organizationId])}))))}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getPolicies(this.organizationId);this.orgPolicies=null!=e.data&&e.data.length>0?e.data:[],this.orgPolicies.forEach((e=>{this.policiesEnabledMap.set(e.type,e.enabled)})),this.loading=!1}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(a.PolicyEditComponent,this.editModalRef,(n=>{n.policy=e,n.organizationId=this.organizationId,n.policiesEnabledMap=this.policiesEnabledMap,n.onSavedPolicy.subscribe((()=>{t.close(),this.load()}))}))}))}}t.PoliciesComponent=I,I.ɵfac=function(e){return new(e||I)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(d.ModalService),s.ɵɵdirectiveInject(p.OrganizationService),s.ɵɵdirectiveInject(u.PolicyListService),s.ɵɵdirectiveInject(c.Router))},I.ɵcmp=s.ɵɵdefineComponent({type:I,selectors:[["app-org-policies"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(f,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.editModalRef=e.first)}},decls:14,vars:5,consts:[[1,"page-header","d-flex"],[4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],["editTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["href","#","appStopClick","",3,"click"],["class","badge badge-success",4,"ngIf"],[1,"text-muted","d-block"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,g,9,6,"ng-container",1),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,b,7,1,"table",2),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,w,0,0,"ng-template",null,3,s.ɵɵtemplateRefExtractor),s.ɵɵtext(13,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"policies")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading))},directives:[m.NgIf,m.NgForOf,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2})},5768:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyEditComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(40251)),a=n(43886),s=(n(52289),n(32621)),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(96832),m=n(637),h=n(50553),v=n(57490),f=n(72596),g=["policyForm"];function y(e,t){1&e&&(s.ɵɵelementStart(0,"div",8),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",16),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",17),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){}class S{constructor(e,t,n,i,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.componentFactoryResolver=i,this.cdr=a,this.logService=s,this.policiesEnabledMap=new Map,this.onSavedPolicy=new r.EventEmitter,this.policyType=o.PolicyType,this.loading=!0,this.enabled=!1}ngAfterViewInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.loading=!1;const e=this.componentFactoryResolver.resolveComponentFactory(this.policy.component);this.policyComponent=this.policyFormRef.createComponent(e).instance,this.policyComponent.policy=this.policy,this.policyComponent.policyResponse=this.policyResponse,this.cdr.detectChanges()}))}load(){return i(this,void 0,void 0,(function*(){try{this.policyResponse=yield this.apiService.getPolicy(this.organizationId,this.policy.type)}catch(e){if(404!==e.statusCode)throw e;this.policyResponse=new a.PolicyResponse({Enabled:!1})}}))}submit(){return i(this,void 0,void 0,(function*(){let e;try{e=yield this.policyComponent.buildRequest(this.policiesEnabledMap)}catch(t){return void this.platformUtilsService.showToast("error",null,t)}try{this.formPromise=this.apiService.putPolicy(this.organizationId,this.policy.type,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("editedPolicyId",this.i18nService.t(this.policy.name))),this.onSavedPolicy.emit()}catch(t){this.logService.error(t)}}))}}t.PolicyEditComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(s.ComponentFactoryResolver),s.ɵɵdirectiveInject(s.ChangeDetectorRef),s.ɵɵdirectiveInject(p.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-policy-edit"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(g,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.policyFormRef=e.first)}},inputs:{policy:"policy",organizationId:"organizationId",policiesEnabledMap:"policiesEnabledMap"},outputs:{onSavedPolicy:"onSavedPolicy"},decls:57,vars:25,consts:[["role","dialog","aria-modal","true","aria-labelledby","policiesEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","policiesEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","modal-body",4,"ngIf"],[3,"hidden"],["policyForm",""],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"button",6),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"span",7),s.ɵɵtext(18,"×"),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n\n "),s.ɵɵelementStart(22,"div",8),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,y,9,6,"div",9),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",10),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"p"),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,x,0,0,"ng-template",null,11,s.ɵɵtemplateRefExtractor),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",12),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"button",13),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",14),s.ɵɵpipe(42,"i18n"),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"span"),s.ɵɵtext(45),s.ɵɵpipe(46,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"button",15),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n")),2&e){const e=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(11,11,"editPolicy")," - ",s.ɵɵpipeBind1(12,13,t.policy.name),"\n "),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(15,15,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("hidden",t.loading),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,17,t.policy.description)),s.ɵɵadvance(10),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(42,19,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(46,21,"save")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(51,23,"cancel"),"\n ")}},directives:[u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.A11yTitleDirective,v.NgIf],pipes:[f.I18nPipe],encapsulation:2})},44354:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(40349),n(70143),n(86193),n(99954),n(10685),n(66607)),a=n(61833),s=n(524),l=n(32621),c=n(91092),d=n(40349),p=n(99954),u=n(86193),m=n(10685),h=n(82058),v=n(70143),f=n(96832),g=n(637),y=n(57490),x=n(50553),S=n(52900),b=n(80507),w=n(17302),I=n(966),C=n(14296),E=n(72596);function P(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",30),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"app-callout",31),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵpropertyInterpolate("enforcedPolicyMessage",l.ɵɵpipeBind1(1,2,"resetPasswordMasterPasswordPolicyInEffect")),l.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}const A=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};class O{constructor(e,t,n,i,o,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.passwordGenerationService=i,this.policyService=o,this.cryptoService=a,this.logService=s,this.onPasswordReset=new r.EventEmitter,this.newPassword=null,this.showPassword=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions()}))}get loggedOutWarningName(){return null!=this.name?this.name:this.i18nService.t("thisUser")}generatePassword(){return i(this,void 0,void 0,(function*(){const e=(yield this.passwordGenerationService.getOptions())[0];this.newPassword=yield this.passwordGenerationService.generatePassword(e),this.updatePasswordStrength()}))}togglePassword(){this.showPassword=!this.showPassword,document.getElementById("newPassword").focus()}copy(e){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password"))))}submit(){return i(this,void 0,void 0,(function*(){if(null==this.newPassword||""===this.newPassword)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1;if(this.newPassword.length<8)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),!1;if(null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.newPassword,this.enforcedPolicyOptions)){if(this.masterPasswordScore<3){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1}try{this.formPromise=this.apiService.getOrganizationUserResetPasswordDetails(this.organizationId,this.id).then((e=>i(this,void 0,void 0,(function*(){if(null==e)throw new Error(this.i18nService.t("resetPasswordDetailsError"));const t=e.kdf,n=e.kdfIterations,i=e.resetPasswordKey,r=e.encryptedPrivateKey,l=yield this.cryptoService.getOrgKey(this.organizationId),c=yield this.cryptoService.decryptToBytes(new o.EncString(r),l),d=yield this.cryptoService.rsaDecrypt(i,c),p=new a.SymmetricCryptoKey(d),u=yield this.cryptoService.makeKey(this.newPassword,this.email.trim().toLowerCase(),t,n),m=yield this.cryptoService.hashPassword(this.newPassword,u),h=yield this.cryptoService.remakeEncKey(u,p),v=new s.OrganizationUserResetPasswordRequest;return v.key=h[1].encryptedString,v.newMasterPasswordHash=m,this.apiService.putOrganizationUserResetPassword(this.organizationId,this.id,v)})))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("resetPasswordSuccess")),this.onPasswordReset.emit()}catch(e){this.logService.error(e)}}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet"))}))}updatePasswordStrength(){null!=this.newPasswordStrengthTimeout&&clearTimeout(this.newPasswordStrengthTimeout),this.newPasswordStrengthTimeout=setTimeout((()=>{const e=this.passwordGenerationService.passwordStrength(this.newPassword,this.getPasswordStrengthUserInput());this.masterPasswordScore=null==e?null:e.score}),300)}getPasswordStrengthUserInput(){let e=[];const t=this.email.indexOf("@");return t>-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),null!=this.name&&""!==this.name&&(e=e.concat(this.name.trim().toLowerCase().split(" "))),e}}t.ResetPasswordComponent=O,O.ɵfac=function(e){return new(e||O)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.PasswordGenerationService),l.ɵɵdirectiveInject(m.PolicyService),l.ɵɵdirectiveInject(h.CryptoService),l.ɵɵdirectiveInject(v.LogService))},O.ɵcmp=l.ɵɵdefineComponent({type:O,selectors:[["app-reset-password"]],inputs:{name:"name",email:"email",id:"id",organizationId:"organizationId"},outputs:{onPasswordReset:"onPasswordReset"},decls:97,vars:43,consts:[["role","dialog","aria-modal","true","aria-labelledby","resetPasswordTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","resetPasswordTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage",4,"ngIf"],[1,"row"],[1,"col","form-group"],[1,"d-flex"],["for","newPassword"],[1,"ml-auto","d-flex"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-refresh"],[1,"input-group","mb-1"],["id","newPassword","appAutofocus","","name","NewPassword","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","ngModelChange","input"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],[3,"score","showText"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions","enforcedPolicyMessage"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,P,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"app-callout",10),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵtemplate(29,k,3,4,"app-callout",11),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"div",12),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"div",13),l.ɵɵtext(34,"\n "),l.ɵɵelementStart(35,"div",14),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"label",15),l.ɵɵtext(38),l.ɵɵpipe(39,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"div",16),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"a",17),l.ɵɵlistener("click",(function(){return t.generatePassword()})),l.ɵɵpipe(44,"i18n"),l.ɵɵtext(45,"\n "),l.ɵɵelement(46,"i",18),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"div",19),l.ɵɵtext(52,"\n "),l.ɵɵelementStart(53,"input",20),l.ɵɵlistener("ngModelChange",(function(e){return t.newPassword=e}))("input",(function(){return t.updatePasswordStrength()})),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"div",21),l.ɵɵtext(56,"\n "),l.ɵɵelementStart(57,"button",22),l.ɵɵlistener("click",(function(){return t.togglePassword()})),l.ɵɵpipe(58,"i18n"),l.ɵɵtext(59,"\n "),l.ɵɵelement(60,"i",23),l.ɵɵtext(61,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n "),l.ɵɵelementStart(63,"button",22),l.ɵɵlistener("click",(function(){return t.copy(t.newPassword)})),l.ɵɵpipe(64,"i18n"),l.ɵɵtext(65,"\n "),l.ɵɵelement(66,"i",24),l.ɵɵtext(67,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(68,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(69,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(70,"\n "),l.ɵɵelementStart(71,"app-password-strength",25),l.ɵɵtext(72,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(74,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(76,"\n "),l.ɵɵelementStart(77,"div",26),l.ɵɵtext(78,"\n "),l.ɵɵelementStart(79,"button",27),l.ɵɵtext(80,"\n "),l.ɵɵelement(81,"i",28),l.ɵɵpipe(82,"i18n"),l.ɵɵtext(83,"\n "),l.ɵɵelementStart(84,"span"),l.ɵɵtext(85),l.ɵɵpipe(86,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(87,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(88,"\n "),l.ɵɵelementStart(89,"button",29),l.ɵɵtext(90),l.ɵɵpipe(91,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(92,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(93,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(94,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(95,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(96,"\n")),2&e){const e=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,19,"resetPassword"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,21,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind2(27,23,"resetPasswordLoggedOutWarning",t.loggedOutWarningName),"\n "),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.enforcedPolicyOptions),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(39,26,"newPassword")),l.ɵɵadvance(5),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(44,28,"generatePassword")),l.ɵɵadvance(10),l.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),l.ɵɵproperty("ngModel",t.newPassword),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(58,30,"toggleVisibility")),l.ɵɵadvance(3),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(40,A,!t.showPassword,t.showPassword)),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(64,32,"copyPassword")),l.ɵɵadvance(8),l.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),l.ɵɵadvance(8),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(82,34,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(86,36,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(91,38,"cancel"),"\n ")}},directives:[f.ɵNgNoValidate,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.NgIf,x.A11yTitleDirective,S.CalloutComponent,b.StopClickDirective,f.DefaultValueAccessor,w.AutofocusDirective,f.RequiredValidator,I.InputVerbatimDirective,f.NgControlStatus,f.NgModel,y.NgClass,C.PasswordStrengthComponent],pipes:[E.I18nPipe],encapsulation:2})},84195:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserAddEditComponent=void 0;const r=n(32621),o=(n(91092),n(69050),n(40349),n(70143),n(99954),n(58209)),a=n(30260),s=n(63777),l=n(66299),c=n(69788),d=n(16233),p=n(35629),u=n(32621),m=n(91092),h=n(40349),v=n(69050),f=n(99954),g=n(70143),y=n(96832),x=n(637),S=n(57490),b=n(50553),w=n(73365),I=n(92521),C=n(72596);function E(e,t){if(1&e&&(u.ɵɵelementStart(0,"small",16),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate(e.name)}}function P(e,t){1&e&&(u.ɵɵelementStart(0,"div",17),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",18),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",19),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function k(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"p"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",44),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"label",45),u.ɵɵtext(9),u.ɵɵpipe(10,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"input",46),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).emails=t})),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"small",16),u.ɵɵtext(15),u.ɵɵpipe(16,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementContainerEnd()}if(2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,4,"inviteUserDesc")),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(10,6,"email")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",e.emails),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind2(16,8,"inviteMultipleEmailDesc","20"))}}function A(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"h3",34),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"div",47),u.ɵɵtext(7,"\n "),u.ɵɵelementStart(8,"div",48),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",35),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"label",49),u.ɵɵtext(13,"Manager Permissions"),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelement(15,"hr",50),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"app-nested-checkbox",51),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"div",48),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"div",35),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"label",49),u.ɵɵtext(27,"Admin Permissions"),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelement(29,"hr",50),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"div",52),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"div",53),u.ɵɵtext(34,"\n "),u.ɵɵelementStart(35,"input",54),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessEventLogs=t})),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementStart(37,"label",55),u.ɵɵtext(38),u.ɵɵpipe(39,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(40,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(42,"\n "),u.ɵɵelementStart(43,"div",52),u.ɵɵtext(44,"\n "),u.ɵɵelementStart(45,"div",53),u.ɵɵtext(46,"\n "),u.ɵɵelementStart(47,"input",56),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessImportExport=t})),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementStart(49,"label",57),u.ɵɵtext(50),u.ɵɵpipe(51,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(52,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(53,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"div",52),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"div",53),u.ɵɵtext(58,"\n "),u.ɵɵelementStart(59,"input",58),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.accessReports=t})),u.ɵɵelementEnd(),u.ɵɵtext(60,"\n "),u.ɵɵelementStart(61,"label",59),u.ɵɵtext(62),u.ɵɵpipe(63,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(66,"\n "),u.ɵɵelementStart(67,"app-nested-checkbox",60),u.ɵɵtext(68,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"div",52),u.ɵɵtext(71,"\n "),u.ɵɵelementStart(72,"div",53),u.ɵɵtext(73,"\n "),u.ɵɵelementStart(74,"input",61),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageGroups=t})),u.ɵɵelementEnd(),u.ɵɵtext(75,"\n "),u.ɵɵelementStart(76,"label",62),u.ɵɵtext(77),u.ɵɵpipe(78,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(79,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(80,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(81,"\n "),u.ɵɵelementStart(82,"div",52),u.ɵɵtext(83,"\n "),u.ɵɵelementStart(84,"div",53),u.ɵɵtext(85,"\n "),u.ɵɵelementStart(86,"input",63),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageSso=t})),u.ɵɵelementEnd(),u.ɵɵtext(87,"\n "),u.ɵɵelementStart(88,"label",64),u.ɵɵtext(89),u.ɵɵpipe(90,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(91,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(92,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(93,"\n "),u.ɵɵelementStart(94,"div",52),u.ɵɵtext(95,"\n "),u.ɵɵelementStart(96,"div",53),u.ɵɵtext(97,"\n "),u.ɵɵelementStart(98,"input",65),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.managePolicies=t})),u.ɵɵelementEnd(),u.ɵɵtext(99,"\n "),u.ɵɵelementStart(100,"label",66),u.ɵɵtext(101),u.ɵɵpipe(102,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(103,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(104,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(105,"\n "),u.ɵɵelementStart(106,"div",52),u.ɵɵtext(107,"\n "),u.ɵɵelementStart(108,"div",53),u.ɵɵtext(109,"\n "),u.ɵɵelementStart(110,"input",67),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageUsers=t}))("change",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).handleDependentPermissions()})),u.ɵɵelementEnd(),u.ɵɵtext(111,"\n "),u.ɵɵelementStart(112,"label",68),u.ɵɵtext(113),u.ɵɵpipe(114,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(115,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(116,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(117,"\n "),u.ɵɵelementStart(118,"div",52),u.ɵɵtext(119,"\n "),u.ɵɵelementStart(120,"div",53),u.ɵɵtext(121,"\n "),u.ɵɵelementStart(122,"input",69),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).permissions.manageResetPassword=t}))("change",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).handleDependentPermissions()})),u.ɵɵelementEnd(),u.ɵɵtext(123,"\n "),u.ɵɵelementStart(124,"label",70),u.ɵɵtext(125),u.ɵɵpipe(126,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(127,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(128,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(129,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(130,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(131,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(132,"\n "),u.ɵɵelementContainerEnd()}if(2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,19,"permissions"),"\n "),u.ɵɵadvance(14),u.ɵɵproperty("checkboxes",e.manageAssignedCollectionsCheckboxes),u.ɵɵadvance(18),u.ɵɵproperty("ngModel",e.permissions.accessEventLogs),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(39,21,"accessEventLogs"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.accessImportExport),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(51,23,"accessImportExport"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.accessReports),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(63,25,"accessReports"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("checkboxes",e.manageAllCollectionsCheckboxes),u.ɵɵadvance(7),u.ɵɵproperty("ngModel",e.permissions.manageGroups),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(78,27,"manageGroups"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageSso),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(90,29,"manageSso"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.managePolicies),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(102,31,"managePolicies"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageUsers),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(114,33,"manageUsers"),"\n "),u.ɵɵadvance(9),u.ɵɵproperty("ngModel",e.permissions.manageResetPassword),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(126,35,"manageResetPassword"),"\n ")}}function O(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",14),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",71),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).selectAll(!0)})),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"button",71),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext(2).selectAll(!1)})),u.ɵɵtext(7),u.ɵɵpipe(8,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(4,2,"selectAll"),"\n "),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function T(e,t){1&e&&(u.ɵɵelementStart(0,"div"),u.ɵɵtext(1),u.ɵɵpipe(2,"i18n"),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function M(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"tr"),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"td",76),u.ɵɵlistener("click",(function(){const t=u.ɵɵrestoreView(e).$implicit;return u.ɵɵnextContext(4).check(t)})),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"input",77),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.checked=t})),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"td",78),u.ɵɵlistener("click",(function(){const t=u.ɵɵrestoreView(e).$implicit;return u.ɵɵnextContext(4).check(t)})),u.ɵɵtext(8),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"td",79),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"input",80),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.hidePasswords=t})),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(14,"\n "),u.ɵɵelementStart(15,"td",79),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"input",80),u.ɵɵlistener("ngModelChange",(function(t){return u.ɵɵrestoreView(e).$implicit.readOnly=t})),u.ɵɵelementEnd(),u.ɵɵtext(18,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;u.ɵɵadvance(4),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),u.ɵɵproperty("ngModel",e.checked),u.ɵɵadvance(4),u.ɵɵtextInterpolate1("\n ",e.name,"\n "),u.ɵɵadvance(4),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].HidePasswords"),u.ɵɵproperty("ngModel",e.hidePasswords)("disabled",!e.checked),u.ɵɵadvance(5),u.ɵɵpropertyInterpolate1("name","Collection[",n,"].ReadOnly"),u.ɵɵproperty("ngModel",e.readOnly)("disabled",!e.checked)}}function D(e,t){if(1&e&&(u.ɵɵelementStart(0,"table",73),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"thead"),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"tr"),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"th"),u.ɵɵtext(7," "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"th"),u.ɵɵtext(10),u.ɵɵpipe(11,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementStart(13,"th",74),u.ɵɵtext(14),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"th",74),u.ɵɵtext(18),u.ɵɵpipe(19,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementStart(23,"tbody"),u.ɵɵtext(24,"\n "),u.ɵɵtemplate(25,M,20,9,"tr",75),u.ɵɵtext(26,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext(3);u.ɵɵadvance(10),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(11,4,"name")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(15,6,"hidePasswords")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(19,8,"readOnly")),u.ɵɵadvance(7),u.ɵɵproperty("ngForOf",e.collections)}}function B(e,t){if(1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,T,3,3,"div",20),u.ɵɵtext(3,"\n "),u.ɵɵtemplate(4,D,28,10,"table",72),u.ɵɵtext(5,"\n "),u.ɵɵelementContainerEnd()),2&e){const e=u.ɵɵnextContext(2);u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.collections||!e.collections.length),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const R=function(e){return{"mb-0":e}};function U(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"div",17),u.ɵɵtext(1,"\n "),u.ɵɵtemplate(2,k,19,11,"ng-container",20),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"h3"),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementStart(7,"a",21),u.ɵɵpipe(8,"i18n"),u.ɵɵtext(9,"\n "),u.ɵɵelement(10,"i",22),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"div",23),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"input",24),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"label",25),u.ɵɵtext(19),u.ɵɵpipe(20,"i18n"),u.ɵɵelementStart(21,"small"),u.ɵɵtext(22),u.ɵɵpipe(23,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(24,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(26,"\n "),u.ɵɵelementStart(27,"div",23),u.ɵɵtext(28,"\n "),u.ɵɵelementStart(29,"input",26),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(30,"\n "),u.ɵɵelementStart(31,"label",27),u.ɵɵtext(32),u.ɵɵpipe(33,"i18n"),u.ɵɵelementStart(34,"small"),u.ɵɵtext(35),u.ɵɵpipe(36,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(38,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(39,"\n "),u.ɵɵelementStart(40,"div",23),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"input",28),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(43,"\n "),u.ɵɵelementStart(44,"label",29),u.ɵɵtext(45),u.ɵɵpipe(46,"i18n"),u.ɵɵelementStart(47,"small"),u.ɵɵtext(48),u.ɵɵpipe(49,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(51,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(52,"\n "),u.ɵɵelementStart(53,"div",23),u.ɵɵtext(54,"\n "),u.ɵɵelementStart(55,"input",30),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(56,"\n "),u.ɵɵelementStart(57,"label",31),u.ɵɵtext(58),u.ɵɵpipe(59,"i18n"),u.ɵɵelementStart(60,"small"),u.ɵɵtext(61),u.ɵɵpipe(62,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(63,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(64,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(65,"\n "),u.ɵɵelementStart(66,"div",23),u.ɵɵtext(67,"\n "),u.ɵɵelementStart(68,"input",32),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().type=t})),u.ɵɵelementEnd(),u.ɵɵtext(69,"\n "),u.ɵɵelementStart(70,"label",33),u.ɵɵtext(71),u.ɵɵpipe(72,"i18n"),u.ɵɵelementStart(73,"small"),u.ɵɵtext(74),u.ɵɵpipe(75,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(76,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(77,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(78,"\n "),u.ɵɵtemplate(79,A,133,37,"ng-container",20),u.ɵɵtext(80,"\n "),u.ɵɵelementStart(81,"h3",34),u.ɵɵtext(82,"\n "),u.ɵɵelementStart(83,"div",35),u.ɵɵtext(84),u.ɵɵpipe(85,"i18n"),u.ɵɵelementStart(86,"a",36),u.ɵɵpipe(87,"i18n"),u.ɵɵtext(88,"\n "),u.ɵɵelement(89,"i",22),u.ɵɵtext(90,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(91,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(92,"\n "),u.ɵɵtemplate(93,O,10,6,"div",37),u.ɵɵtext(94,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(95,"\n "),u.ɵɵelementStart(96,"div",38),u.ɵɵtext(97,"\n "),u.ɵɵelementStart(98,"div",39),u.ɵɵtext(99,"\n "),u.ɵɵelementStart(100,"input",40),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().access=t})),u.ɵɵelementEnd(),u.ɵɵtext(101,"\n "),u.ɵɵelementStart(102,"label",41),u.ɵɵtext(103),u.ɵɵpipe(104,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(105,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(106,"\n "),u.ɵɵelementStart(107,"div",39),u.ɵɵtext(108,"\n "),u.ɵɵelementStart(109,"input",42),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().access=t})),u.ɵɵelementEnd(),u.ɵɵtext(110,"\n "),u.ɵɵelementStart(111,"label",43),u.ɵɵtext(112),u.ɵɵpipe(113,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(114,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(115,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(116,"\n "),u.ɵɵtemplate(117,B,6,2,"ng-container",20),u.ɵɵtext(118,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.editMode),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(6,33,"userType"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(8,35,"learnMore")),u.ɵɵadvance(9),u.ɵɵproperty("value",e.organizationUserType.User)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(20,37,"user"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(23,39,"userDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Manager)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(33,41,"manager"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(36,43,"managerDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Admin)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(46,45,"admin"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(49,47,"adminDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Owner)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(59,49,"owner"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(62,51,"ownerDesc")),u.ɵɵadvance(7),u.ɵɵproperty("value",e.organizationUserType.Custom)("ngModel",e.type),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(72,53,"custom"),"\n "),u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(75,55,"customDesc")),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",e.customUserTypeSelected),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(85,57,"accessControl"),"\n "),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(87,59,"learnMore")),u.ɵɵadvance(7),u.ɵɵproperty("ngIf","selected"===e.access&&e.collections&&e.collections.length),u.ɵɵadvance(3),u.ɵɵproperty("ngClass",u.ɵɵpureFunction1(65,R,"selected"!==e.access)),u.ɵɵadvance(4),u.ɵɵproperty("ngModel",e.access),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(104,61,"userAccessAllItems"),"\n "),u.ɵɵadvance(6),u.ɵɵproperty("ngModel",e.access),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(113,63,"userAccessSelectedCollections"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf","selected"===e.access)}}function V(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",81,82),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().delete()})),u.ɵɵpipe(2,"i18n"),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",83),u.ɵɵtext(5,"\n "),u.ɵɵelement(6,"i",84),u.ɵɵpipe(7,"i18n"),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵreference(1),t=u.ɵɵnextContext();u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(2,6,"delete")),u.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),u.ɵɵadvance(4),u.ɵɵproperty("hidden",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(7,8,"loading")),u.ɵɵproperty("hidden",!e.loading)}}class F{constructor(e,t,n,i,o){this.apiService=e,this.i18nService=t,this.collectionService=n,this.platformUtilsService=i,this.logService=o,this.usesKeyConnector=!1,this.onSavedUser=new r.EventEmitter,this.onDeletedUser=new r.EventEmitter,this.loading=!0,this.editMode=!1,this.type=d.OrganizationUserType.User,this.permissions=new p.PermissionsApi,this.showCustom=!1,this.access="selected",this.collections=[],this.organizationUserType=d.OrganizationUserType,this.manageAllCollectionsCheckboxes=[{id:"createNewCollections",get:()=>this.permissions.createNewCollections,set:e=>this.permissions.createNewCollections=e},{id:"editAnyCollection",get:()=>this.permissions.editAnyCollection,set:e=>this.permissions.editAnyCollection=e},{id:"deleteAnyCollection",get:()=>this.permissions.deleteAnyCollection,set:e=>this.permissions.deleteAnyCollection=e}],this.manageAssignedCollectionsCheckboxes=[{id:"editAssignedCollections",get:()=>this.permissions.editAssignedCollections,set:e=>this.permissions.editAssignedCollections=e},{id:"deleteAssignedCollections",get:()=>this.permissions.deleteAssignedCollections,set:e=>this.permissions.deleteAssignedCollections=e}]}get customUserTypeSelected(){return this.type===d.OrganizationUserType.Custom}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.organizationUserId,yield this.loadCollections(),this.editMode){this.editMode=!0,this.title=this.i18nService.t("editUser");try{const e=yield this.apiService.getOrganizationUser(this.organizationId,this.organizationUserId);this.access=e.accessAll?"all":"selected",this.type=e.type,e.type===d.OrganizationUserType.Custom&&(this.permissions=e.permissions),null!=e.collections&&null!=this.collections&&e.collections.forEach((e=>{const t=this.collections.filter((t=>t.id===e.id));null!=t&&t.length>0&&(t[0].checked=!0,t[0].readOnly=e.readOnly,t[0].hidePasswords=e.hidePasswords)}))}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteUser");this.loading=!1}))}loadCollections(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getCollections(this.organizationId)).data.map((e=>new a.Collection(new o.CollectionData(e))));this.collections=yield this.collectionService.decryptMany(e)}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}setRequestPermissions(e,t){return Object.assign(e,t?new p.PermissionsApi:this.permissions),e}handleDependentPermissions(){this.permissions.manageResetPassword&&!this.permissions.manageUsers&&(this.permissions.manageUsers=!0,document.getElementById("manageUsers").checked=!0,this.platformUtilsService.showToast("info",null,this.i18nService.t("resetPasswordManageUsers")))}submit(){var e,t;return i(this,void 0,void 0,(function*(){let n=null;"all"!==this.access&&(n=this.collections.filter((e=>e.checked)).map((e=>new c.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords))));try{if(this.editMode){const t=new l.OrganizationUserUpdateRequest;t.accessAll="all"===this.access,t.type=this.type,t.collections=n,t.permissions=this.setRequestPermissions(null!==(e=t.permissions)&&void 0!==e?e:new p.PermissionsApi,t.type!==d.OrganizationUserType.Custom),this.formPromise=this.apiService.putOrganizationUser(this.organizationId,this.organizationUserId,t)}else{const e=new s.OrganizationUserInviteRequest;e.emails=this.emails.trim().split(/\s*,\s*/),e.accessAll="all"===this.access,e.type=this.type,e.permissions=this.setRequestPermissions(null!==(t=e.permissions)&&void 0!==t?t:new p.PermissionsApi,e.type!==d.OrganizationUserType.Custom),e.collections=n,this.formPromise=this.apiService.postOrganizationUserInvite(this.organizationId,e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit()}catch(i){this.logService.error(i)}}))}delete(){return i(this,void 0,void 0,(function*(){if(!this.editMode)return;const e=this.usesKeyConnector?"removeUserConfirmationKeyConnector":"removeUserConfirmation";if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(e),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.deletePromise=this.apiService.deleteOrganizationUser(this.organizationId,this.organizationUserId),yield this.deletePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit()}catch(t){this.logService.error(t)}}))}}t.UserAddEditComponent=F,F.ɵfac=function(e){return new(e||F)(u.ɵɵdirectiveInject(m.ApiService),u.ɵɵdirectiveInject(h.I18nService),u.ɵɵdirectiveInject(v.CollectionService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(g.LogService))},F.ɵcmp=u.ɵɵdefineComponent({type:F,selectors:[["app-user-add-edit"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId",usesKeyConnector:"usesKeyConnector"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/provider-users/",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","userTypeUser",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeUser",1,"form-check-label"],["type","radio","name","userType","id","userTypeManager",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeManager",1,"form-check-label"],["type","radio","name","userType","id","userTypeAdmin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeAdmin",1,"form-check-label"],["type","radio","name","userType","id","userTypeOwner",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeOwner",1,"form-check-label"],["type","radio","name","userType","id","userTypeCustom",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","userTypeCustom",1,"form-check-label"],[1,"mt-4","d-flex"],[1,"mb-3"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/user-types-access-control/#access-control",3,"appA11yTitle"],["class","ml-auto",4,"ngIf"],[1,"form-group",3,"ngClass"],[1,"form-check"],["type","radio","name","access","id","accessAll","value","all",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessAll",1,"form-check-label"],["type","radio","name","access","id","accessSelected","value","selected",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessSelected",1,"form-check-label"],[1,"form-group","mb-4"],["for","emails"],["id","emails","type","text","name","Emails","required","","appAutoFocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"row"],[1,"col-6"],[1,"font-weight-bold","mb-0"],[1,"my-0","mr-2"],["parentId","manageAssignedCollections",3,"checkboxes"],[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox","name","accessEventLogs","id","accessEventLogs",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessEventLogs",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessImportExport","id","accessImportExport",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessImportExport",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessReports","id","accessReports",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessReports",1,"form-check-label","font-weight-normal"],["parentId","manageAllCollections",3,"checkboxes"],["type","checkbox","name","manageGroups","id","manageGroups",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageGroups",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageSso","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageSso",1,"form-check-label","font-weight-normal"],["type","checkbox","name","managePolicies","id","managePolicies",1,"form-check-input",3,"ngModel","ngModelChange"],["for","managePolicies",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageUsers","id","manageUsers",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageUsers",1,"form-check-label","font-weight-normal"],["type","checkbox","name","manageResetPassword","id","manageResetPassword",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","manageResetPassword",1,"form-check-label","font-weight-normal"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],["width","100",1,"text-center"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8,"\n "),u.ɵɵelementStart(9,"h2",5),u.ɵɵtext(10),u.ɵɵtemplate(11,E,2,1,"small",6),u.ɵɵtext(12,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"button",7),u.ɵɵpipe(15,"i18n"),u.ɵɵtext(16,"\n "),u.ɵɵelementStart(17,"span",8),u.ɵɵtext(18,"×"),u.ɵɵelementEnd(),u.ɵɵtext(19,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(20,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵtemplate(22,P,9,6,"div",9),u.ɵɵtext(23,"\n "),u.ɵɵtemplate(24,U,119,67,"div",9),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"div",10),u.ɵɵtext(27,"\n "),u.ɵɵelementStart(28,"button",11),u.ɵɵtext(29,"\n "),u.ɵɵelement(30,"i",12),u.ɵɵpipe(31,"i18n"),u.ɵɵtext(32,"\n "),u.ɵɵelementStart(33,"span"),u.ɵɵtext(34),u.ɵɵpipe(35,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementStart(38,"button",13),u.ɵɵtext(39),u.ɵɵpipe(40,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(41,"\n "),u.ɵɵelementStart(42,"div",14),u.ɵɵtext(43,"\n "),u.ɵɵtemplate(44,V,9,10,"button",15),u.ɵɵtext(45,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(46,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(47,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(48,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(49,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(50,"\n")),2&e){const e=u.ɵɵreference(5);u.ɵɵadvance(4),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate1("\n ",t.title,"\n "),u.ɵɵadvance(1),u.ɵɵproperty("ngIf",t.name),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(15,11,"close")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading),u.ɵɵadvance(4),u.ɵɵproperty("disabled",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(31,13,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(35,15,"save")),u.ɵɵadvance(5),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(40,17,"cancel"),"\n "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",t.editMode)}},directives:[y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.NgIf,b.A11yTitleDirective,y.RadioControlValueAccessor,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,S.NgClass,y.RequiredValidator,w.NestedCheckboxComponent,y.CheckboxControlValueAccessor,S.NgForOf,I.StopPropDirective],pipes:[C.I18nPipe],encapsulation:2})},14004:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserConfirmComponent=void 0;const r=n(32621),o=(n(82058),n(70143),n(77243),n(32621)),a=n(82058),s=n(70143),l=n(77243),c=n(96832),d=n(637),p=n(57490),u=n(50553),m=n(72596);function h(e,t){if(1&e&&(o.ɵɵelementStart(0,"small",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class v{constructor(e,t,n){this.cryptoService=e,this.logService=t,this.stateService=n,this.onConfirmedUser=new r.EventEmitter,this.dontAskAgain=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){try{if(null!=this.publicKey){const e=yield this.cryptoService.getFingerprint(this.userId,this.publicKey.buffer);null!=e&&(this.fingerprint=e.join("-"))}}catch(e){this.logService.error(e)}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){this.loading||(this.dontAskAgain&&(yield this.stateService.setAutoConfirmFingerprints(!0)),this.onConfirmedUser.emit())}))}}t.UserConfirmComponent=v,v.ɵfac=function(e){return new(e||v)(o.ɵɵdirectiveInject(a.CryptoService),o.ɵɵdirectiveInject(s.LogService),o.ɵɵdirectiveInject(l.StateService))},v.ɵcmp=o.ɵɵdefineComponent({type:v,selectors:[["app-user-confirm"]],inputs:{name:"name",userId:"userId",publicKey:"publicKey"},outputs:{onConfirmedUser:"onConfirmedUser"},decls:69,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,h,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"p"),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementStart(28,"a",10),o.ɵɵtext(29),o.ɵɵpipe(30,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"p"),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"code"),o.ɵɵtext(36),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"div",11),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"label",13),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",14),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"button",15),o.ɵɵtext(52,"\n "),o.ɵɵelement(53,"i",16),o.ɵɵpipe(54,"i18n"),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"span"),o.ɵɵtext(57),o.ɵɵpipe(58,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"button",17),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,13,"confirmUser"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.name),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,15,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(27,17,"fingerprintEnsureIntegrityVerify"),"\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(30,19,"learnMore"),""),o.ɵɵadvance(7),o.ɵɵtextInterpolate(t.fingerprint),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",t.dontAskAgain),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(45,21,"dontAskFingerprintAgain"),"\n "),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(54,23,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(58,25,"confirm")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(63,27,"cancel"),"\n ")}},directives:[c.ɵNgNoValidate,c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.NgIf,u.A11yTitleDirective,c.CheckboxControlValueAccessor,c.NgControlStatus,c.NgModel],pipes:[m.I18nPipe],encapsulation:2})},56777:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserGroupsComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(32698)),a=n(70829),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(96832),m=n(637),h=n(57490),v=n(50553),f=n(92521),g=n(72596);function y(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",14),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function x(e,t){1&e&&(s.ɵɵelementStart(0,"div",15),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",16),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",17),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"noGroupsInList"),"\n "))}function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",22),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).check(t)})),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",23),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.checked=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td",24),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).check(t)})),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;s.ɵɵadvance(4),s.ɵɵpropertyInterpolate1("name","Groups[",n,"].Checked"),s.ɵɵproperty("ngModel",e.checked),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",20),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,b,10,3,"tr",21),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.groups)}}function I(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",15),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,S,3,3,"div",18),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,w,7,1,"table",19),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"groupAccessUserDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.groups||!e.groups.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.groups&&e.groups.length)}}class C{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSavedUser=new r.EventEmitter,this.loading=!0,this.groups=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=(yield this.apiService.getGroups(this.organizationId)).data.map((e=>e));e.sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=e;try{const e=yield this.apiService.getOrganizationUserGroups(this.organizationId,this.organizationUserId);null!=e&&null!=this.groups&&e.forEach((e=>{const t=this.groups.filter((t=>t.id===e));null!=t&&t.length>0&&(t[0].checked=!0)}))}catch(t){this.logService.error(t)}this.loading=!1}))}check(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)}selectAll(e){this.groups.forEach((t=>this.check(t,e)))}submit(){return i(this,void 0,void 0,(function*(){const e=new o.OrganizationUserUpdateGroupsRequest;e.groupIds=this.groups.filter((e=>e.checked)).map((e=>e.id));try{this.formPromise=this.apiService.putOrganizationUserGroups(this.organizationId,this.organizationUserId,e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("editedGroupsForUser",this.name)),this.onSavedUser.emit()}catch(t){this.logService.error(t)}}))}}t.UserGroupsComponent=C,C.ɵfac=function(e){return new(e||C)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService))},C.ɵcmp=s.ɵɵdefineComponent({type:C,selectors:[["app-user-groups"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser"},decls:47,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","groupAccessTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","groupAccessTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],[3,"click"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵtemplate(12,y,2,1,"small",6),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",7),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",8),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,x,9,6,"div",9),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,I,10,5,"div",9),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",10),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"button",11),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",12),s.ɵɵpipe(32,"i18n"),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"span"),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"button",13),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n")),2&e){const e=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(11,10,"groupAccess"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.name),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,12,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.loading),s.ɵɵadvance(4),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(32,14,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(36,16,"save")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(41,18,"cancel"),"\n ")}},directives:[u.ɵNgNoValidate,u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.NgIf,v.A11yTitleDirective,h.NgForOf,u.CheckboxControlValueAccessor,f.StopPropDirective,u.NgControlStatus,u.NgModel],pipes:[g.I18nPipe],encapsulation:2})},52289:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePolicyComponent=t.BasePolicy=void 0;const i=n(96832),r=n(70180),o=(n(43886),n(32621));t.BasePolicy=class{display(e){return!0}};class a{constructor(){this.enabled=new i.FormControl(!1),this.data=null}ngOnInit(){this.enabled.setValue(this.policyResponse.enabled),null!=this.policyResponse.data&&this.loadData()}loadData(){var e;this.data.patchValue(null!==(e=this.policyResponse.data)&&void 0!==e?e:{})}buildRequestData(){return null!=this.data?this.data.value:null}buildRequest(e){const t=new r.PolicyRequest;return t.enabled=this.enabled.value,t.type=this.policy.type,t.data=this.buildRequestData(),Promise.resolve(t)}}t.BasePolicyComponent=a,a.ɵfac=function(e){return new(e||a)},a.ɵdir=o.ɵɵdefineDirective({type:a,inputs:{policyResponse:"policyResponse",policy:"policy"}})},87905:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DisableSendPolicyComponent=t.DisableSendPolicy=void 0;const i=n(40251),r=n(52289),o=n(32621),a=n(52900),s=n(96832),l=n(72596);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="disableSend",this.description="disableSendPolicyDesc",this.type=i.PolicyType.DisableSend,this.component=d}}t.DisableSendPolicy=c;class d extends r.BasePolicyComponent{}t.DisableSendPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-disable-send"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"disableSendExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},56866:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyComponent=t.MasterPasswordPolicy=void 0;n(96832),n(40349),n(94308);const r=n(40251),o=n(52289),a=n(32621),s=n(96832),l=n(40349),c=n(94308),d=n(57490),p=n(52900),u=n(72596);function m(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",21),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"keyConnectorPolicyRestriction"),"\n"))}function h(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",22),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class v extends o.BasePolicy{constructor(){super(...arguments),this.name="masterPass",this.description="masterPassPolicyDesc",this.type=r.PolicyType.MasterPassword,this.component=f}}t.MasterPasswordPolicy=v;class f extends o.BasePolicyComponent{constructor(e,t,n){super(),this.formBuilder=e,this.organizationService=n,this.data=this.formBuilder.group({minComplexity:[null],minLength:[null],requireUpper:[null],requireLower:[null],requireNumbers:[null],requireSpecial:[null]}),this.showKeyConnectorInfo=!1,this.passwordScores=[{name:"-- "+t.t("select")+" --",value:null},{name:t.t("weak")+" (0)",value:0},{name:t.t("weak")+" (1)",value:1},{name:t.t("weak")+" (2)",value:2},{name:t.t("good")+" (3)",value:3},{name:t.t("strong")+" (4)",value:4}]}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this);const t=yield this.organizationService.get(this.policyResponse.organizationId);this.showKeyConnectorInfo=t.keyConnectorEnabled}))}}t.MasterPasswordPolicyComponent=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.FormBuilder),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.OrganizationService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["policy-master-password"]],features:[a.ɵɵInheritDefinitionFeature],decls:73,vars:13,consts:[["type","info",4,"ngIf"],[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group"],["for","minComplexity"],["id","minComplexity","name","minComplexity","formControlName","minComplexity",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],["for","minLength"],["id","minLength","type","number","min","8","name","minLength","formControlName","minLength",1,"form-control"],["type","checkbox","id","requireUpper","name","requireUpper","formControlName","requireUpper",1,"form-check-input"],["for","requireUpper",1,"form-check-label"],["type","checkbox","id","requireLower","name","requireLower","formControlName","requireLower",1,"form-check-input"],["for","requireLower",1,"form-check-label"],["type","checkbox","id","requireNumbers","name","requireNumbers","formControlName","requireNumbers",1,"form-check-input"],["for","requireNumbers",1,"form-check-label"],["type","checkbox","id","requireSpecial","name","requireSpecial","formControlName","requireSpecial",1,"form-check-input"],["for","requireSpecial",1,"form-check-label"],["type","info"],[3,"ngValue"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,m,3,3,"app-callout",0),a.ɵɵtext(1,"\n\n"),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7,"\n "),a.ɵɵelement(8,"input",4),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"label",5),a.ɵɵtext(11),a.ɵɵpipe(12,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n\n "),a.ɵɵelementStart(16,"div",6),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"div",7),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"label",8),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"select",9),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,h,2,2,"option",10),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",7),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"label",11),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelement(36,"input",12),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"div",3),a.ɵɵtext(41,"\n "),a.ɵɵelement(42,"input",13),a.ɵɵtext(43,"\n "),a.ɵɵelementStart(44,"label",14),a.ɵɵtext(45,"A-Z"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"div",3),a.ɵɵtext(49,"\n "),a.ɵɵelement(50,"input",15),a.ɵɵtext(51,"\n "),a.ɵɵelementStart(52,"label",16),a.ɵɵtext(53,"a-z"),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"div",3),a.ɵɵtext(57,"\n "),a.ɵɵelement(58,"input",17),a.ɵɵtext(59,"\n "),a.ɵɵelementStart(60,"label",18),a.ɵɵtext(61,"0-9"),a.ɵɵelementEnd(),a.ɵɵtext(62,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(63,"\n "),a.ɵɵelementStart(64,"div",3),a.ɵɵtext(65,"\n "),a.ɵɵelement(66,"input",19),a.ɵɵtext(67,"\n "),a.ɵɵelementStart(68,"label",20),a.ɵɵtext(69,"!@#$%^&*"),a.ɵɵelementEnd(),a.ɵɵtext(70,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.showKeyConnectorInfo),a.ɵɵadvance(2),a.ɵɵproperty("formGroup",t.data),a.ɵɵadvance(6),a.ɵɵproperty("formControl",t.enabled),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(12,7,"enabled")),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,9,"minComplexityScore")),a.ɵɵadvance(5),a.ɵɵproperty("ngForOf",t.passwordScores),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,11,"minLength")))},directives:[d.NgIf,s.NgControlStatusGroup,s.FormGroupDirective,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective,s.SelectControlValueAccessor,s.FormControlName,d.NgForOf,s.MinValidator,s.NumberValueAccessor,s.DefaultValueAccessor,p.CalloutComponent,s.NgSelectOption,s.ɵNgSelectMultipleOption],pipes:[u.I18nPipe],encapsulation:2})},99635:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyComponent=t.PasswordGeneratorPolicy=void 0;n(96832),n(40349);const i=n(40251),r=n(52289),o=n(32621),a=n(96832),s=n(40349),l=n(57490),c=n(72596);function d(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",32),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class p extends r.BasePolicy{constructor(){super(...arguments),this.name="passwordGenerator",this.description="passwordGeneratorPolicyDesc",this.type=i.PolicyType.PasswordGenerator,this.component=u}}t.PasswordGeneratorPolicy=p;class u extends r.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.data=this.formBuilder.group({defaultType:[null],minLength:[null],useUpper:[null],useLower:[null],useNumbers:[null],useSpecial:[null],minNumbers:[null],minSpecial:[null],minNumberWords:[null],capitalize:[null],includeNumber:[null]}),this.defaultTypes=[{name:t.t("userPreference"),value:null},{name:t.t("password"),value:"password"},{name:t.t("passphrase"),value:"passphrase"}]}}t.PasswordGeneratorPolicyComponent=u,u.ɵfac=function(e){return new(e||u)(o.ɵɵdirectiveInject(a.FormBuilder),o.ɵɵdirectiveInject(s.I18nService))},u.ɵcmp=o.ɵɵdefineComponent({type:u,selectors:[["policy-password-generator"]],features:[o.ɵɵInheritDefinitionFeature],decls:133,vars:33,consts:[[3,"formGroup"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[1,"row"],[1,"col-6","form-group","mb-0"],["for","defaultType"],["id","defaultType","name","defaultType","formControlName","defaultType",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"mt-4"],[1,"col-6","form-group"],["for","minLength"],["id","minLength","type","number","name","minLength","min","5","max","128","formControlName","minLength",1,"form-control"],["for","minNumbers"],["id","minNumbers","type","number","name","minNumbers","min","0","max","9","formControlName","minNumbers",1,"form-control"],["for","minSpecial"],["id","minSpecial","type","number","name","minSpecial","min","0","max","9","formControlName","minSpecial",1,"form-control"],["type","checkbox","id","useUpper","formControlName","useUpper","name","useUpper",1,"form-check-input"],["for","useUpper",1,"form-check-label"],["type","checkbox","id","useLower","name","useLower","formControlName","useLower",1,"form-check-input"],["for","useLower",1,"form-check-label"],["type","checkbox","id","useNumbers","name","useNumbers","formControlName","useNumbers",1,"form-check-input"],["for","useNumbers",1,"form-check-label"],["type","checkbox","id","useSpecial","name","useSpecial","formControlName","useSpecial",1,"form-check-input"],["for","useSpecial",1,"form-check-label"],["for","minNumberWords"],["id","minNumberWords","type","number","name","minNumberWords","min","3","max","20","formControlName","minNumberWords",1,"form-control"],["type","checkbox","id","capitalize","name","capitalize","formControlName","capitalize",1,"form-check-input"],["for","capitalize",1,"form-check-label"],["type","checkbox","id","includeNumber","name","includeNumber","formControlName","includeNumber",1,"form-check-input"],["for","includeNumber",1,"form-check-label"],[3,"ngValue"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",3),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"label",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"select",8),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,d,2,2,"option",9),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"h3",10),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"div",5),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"div",11),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"label",12),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelement(41,"input",13),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"div",5),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"div",11),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"label",14),o.ɵɵtext(50),o.ɵɵpipe(51,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelement(53,"input",15),o.ɵɵtext(54,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementStart(56,"div",11),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"label",16),o.ɵɵtext(59),o.ɵɵpipe(60,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelement(62,"input",17),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementStart(66,"div",2),o.ɵɵtext(67,"\n "),o.ɵɵelement(68,"input",18),o.ɵɵtext(69,"\n "),o.ɵɵelementStart(70,"label",19),o.ɵɵtext(71,"A-Z"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵelementStart(74,"div",2),o.ɵɵtext(75,"\n "),o.ɵɵelement(76,"input",20),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"label",21),o.ɵɵtext(79,"a-z"),o.ɵɵelementEnd(),o.ɵɵtext(80,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(81,"\n "),o.ɵɵelementStart(82,"div",2),o.ɵɵtext(83,"\n "),o.ɵɵelement(84,"input",22),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"label",23),o.ɵɵtext(87,"0-9"),o.ɵɵelementEnd(),o.ɵɵtext(88,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"div",2),o.ɵɵtext(91,"\n "),o.ɵɵelement(92,"input",24),o.ɵɵtext(93,"\n "),o.ɵɵelementStart(94,"label",25),o.ɵɵtext(95,"!@#$%^&*"),o.ɵɵelementEnd(),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"h3",10),o.ɵɵtext(99),o.ɵɵpipe(100,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"div",5),o.ɵɵtext(103,"\n "),o.ɵɵelementStart(104,"div",11),o.ɵɵtext(105,"\n "),o.ɵɵelementStart(106,"label",26),o.ɵɵtext(107),o.ɵɵpipe(108,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(109,"\n "),o.ɵɵelement(110,"input",27),o.ɵɵtext(111,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(112,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(113,"\n "),o.ɵɵelementStart(114,"div",2),o.ɵɵtext(115,"\n "),o.ɵɵelement(116,"input",28),o.ɵɵtext(117,"\n "),o.ɵɵelementStart(118,"label",29),o.ɵɵtext(119),o.ɵɵpipe(120,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(121,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(122,"\n "),o.ɵɵelementStart(123,"div",2),o.ɵɵtext(124,"\n "),o.ɵɵelement(125,"input",30),o.ɵɵtext(126,"\n "),o.ɵɵelementStart(127,"label",31),o.ɵɵtext(128),o.ɵɵpipe(129,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(130,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(131,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(132,"\n")),2&e&&(o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(6),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,13,"enabled")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,15,"defaultType")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.defaultTypes),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,17,"password")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,19,"minLength")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(51,21,"minNumbers")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(60,23,"minSpecial")),o.ɵɵadvance(40),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(100,25,"passphrase")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(108,27,"minimumNumberOfWords")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(120,29,"capitalize")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(129,31,"includeNumber")))},directives:[a.NgControlStatusGroup,a.FormGroupDirective,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.SelectControlValueAccessor,a.FormControlName,l.NgForOf,a.MinValidator,a.MaxValidator,a.NumberValueAccessor,a.DefaultValueAccessor,a.NgSelectOption,a.ɵNgSelectMultipleOption],pipes:[c.I18nPipe],encapsulation:2})},45229:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PersonalOwnershipPolicyComponent=t.PersonalOwnershipPolicy=void 0;const i=n(40251),r=n(52289),o=n(32621),a=n(52900),s=n(96832),l=n(72596);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="personalOwnership",this.description="personalOwnershipPolicyDesc",this.type=i.PolicyType.PersonalOwnership,this.component=d}}t.PersonalOwnershipPolicy=c;class d extends r.BasePolicyComponent{}t.PersonalOwnershipPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-personal-ownership"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"personalOwnershipExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"personalOwnershipCheckboxDesc")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},34053:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RequireSsoPolicyComponent=t.RequireSsoPolicy=void 0;n(40349);const i=n(40251),r=n(52289),o=n(32621),a=n(40349),s=n(52900),l=n(96832),c=n(72596);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="requireSso",this.description="requireSsoPolicyDesc",this.type=i.PolicyType.RequireSso,this.component=p}display(e){return e.useSso}}t.RequireSsoPolicy=d;class p extends r.BasePolicyComponent{constructor(e){super(),this.i18nService=e}buildRequest(e){var t;const n=null!==(t=e.get(i.PolicyType.SingleOrg))&&void 0!==t&&t;if(this.enabled.value&&!n)throw new Error(this.i18nService.t("requireSsoPolicyReqError"));return super.buildRequest(e)}}t.RequireSsoPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-require-sso"]],features:[o.ɵɵInheritDefinitionFeature],decls:21,vars:13,consts:[["type","tip",3,"title"],["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n"),o.ɵɵelementStart(5,"app-callout",1),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n\n"),o.ɵɵelementStart(9,"div",2),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",3),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"input",4),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"label",5),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n")),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,5,"prerequisite")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,7,"requireSsoPolicyReq"),"\n"),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(7,9,"requireSsoExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,11,"enabled")))},directives:[s.CalloutComponent,l.CheckboxControlValueAccessor,l.NgControlStatus,l.FormControlDirective],pipes:[c.I18nPipe],encapsulation:2})},14089:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyComponent=t.ResetPasswordPolicy=void 0;n(96832),n(94308);const r=n(40251),o=n(52289),a=n(32621),s=n(96832),l=n(94308),c=n(57490),d=n(52900),p=n(72596);function u(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",10),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"keyConnectorPolicyRestriction"),"\n"))}class m extends o.BasePolicy{constructor(){super(...arguments),this.name="resetPasswordPolicy",this.description="resetPasswordPolicyDescription",this.type=r.PolicyType.ResetPassword,this.component=h}display(e){return e.useResetPassword}}t.ResetPasswordPolicy=m;class h extends o.BasePolicyComponent{constructor(e,t){super(),this.formBuilder=e,this.organizationService=t,this.data=this.formBuilder.group({autoEnrollEnabled:!1}),this.showKeyConnectorInfo=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){e.ngOnInit.call(this);const t=yield this.organizationService.get(this.policyResponse.organizationId);this.showKeyConnectorInfo=t.keyConnectorEnabled}))}}t.ResetPasswordPolicyComponent=h,h.ɵfac=function(e){return new(e||h)(a.ɵɵdirectiveInject(s.FormBuilder),a.ɵɵdirectiveInject(l.OrganizationService))},h.ɵcmp=a.ɵɵdefineComponent({type:h,selectors:[["policy-reset-password"]],features:[a.ɵɵInheritDefinitionFeature],decls:42,vars:21,consts:[["type","info",4,"ngIf"],["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","autoEnrollEnabled","name","AutoEnrollEnabled","formControlName","autoEnrollEnabled",1,"form-check-input"],["for","autoEnrollEnabled",1,"form-check-label"],["type","info"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,u,3,3,"app-callout",0),a.ɵɵtext(1,"\n\n"),a.ɵɵelementStart(2,"app-callout",1),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n\n"),a.ɵɵelementStart(6,"div",2),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"div",3),a.ɵɵtext(9,"\n "),a.ɵɵelement(10,"input",4),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"label",5),a.ɵɵtext(13),a.ɵɵpipe(14,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n\n"),a.ɵɵelementStart(18,"div",6),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"h3",7),a.ɵɵtext(21),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"p"),a.ɵɵtext(25),a.ɵɵpipe(26,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"app-callout",1),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"div",3),a.ɵɵtext(33,"\n "),a.ɵɵelement(34,"input",8),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"label",9),a.ɵɵtext(37),a.ɵɵpipe(38,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n")),2&e&&(a.ɵɵproperty("ngIf",t.showKeyConnectorInfo),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,9,"resetPasswordPolicyWarning"),"\n"),a.ɵɵadvance(7),a.ɵɵproperty("formControl",t.enabled),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(14,11,"enabled")),a.ɵɵadvance(5),a.ɵɵproperty("formGroup",t.data),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(22,13,"resetPasswordPolicyAutoEnroll")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(26,15,"resetPasswordPolicyAutoEnrollDescription")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,17,"resetPasswordPolicyAutoEnrollWarning"),"\n "),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(38,19,"resetPasswordPolicyAutoEnrollCheckbox"),"\n "))},directives:[c.NgIf,d.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective,s.NgControlStatusGroup,s.FormGroupDirective,s.FormControlName],pipes:[p.I18nPipe],encapsulation:2})},21061:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendOptionsPolicyComponent=t.SendOptionsPolicy=void 0;n(96832);const i=n(40251),r=n(52289),o=n(32621),a=n(96832),s=n(52900),l=n(72596);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="sendOptions",this.description="sendOptionsPolicyDesc",this.type=i.PolicyType.SendOptions,this.component=d}}t.SendOptionsPolicy=c;class d extends r.BasePolicyComponent{constructor(e){super(),this.formBuilder=e,this.data=this.formBuilder.group({disableHideEmail:!1})}}t.SendOptionsPolicyComponent=d,d.ɵfac=function(e){return new(e||d)(o.ɵɵdirectiveInject(a.FormBuilder))},d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-send-options"]],features:[o.ɵɵInheritDefinitionFeature],decls:32,vars:14,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"],[3,"formGroup"],[1,"mt-4"],["type","checkbox","id","disableHideEmail","name","DisableHideEmail","formControlName","disableHideEmail",1,"form-check-input"],["for","disableHideEmail",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n\n"),o.ɵɵelementStart(16,"div",5),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"h3",6),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",2),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"input",7),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"label",8),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,6,"sendOptionsExemption"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,8,"enabled")),o.ɵɵadvance(5),o.ɵɵproperty("formGroup",t.data),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,10,"options")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(28,12,"disableHideEmail")))},directives:[s.CalloutComponent,a.CheckboxControlValueAccessor,a.NgControlStatus,a.FormControlDirective,a.NgControlStatusGroup,a.FormGroupDirective,a.FormControlName],pipes:[l.I18nPipe],encapsulation:2})},2524:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SingleOrgPolicyComponent=t.SingleOrgPolicy=void 0;n(40349);const i=n(40251),r=n(52289),o=n(32621),a=n(40349),s=n(52900),l=n(96832),c=n(72596);class d extends r.BasePolicy{constructor(){super(...arguments),this.name="singleOrg",this.description="singleOrgDesc",this.type=i.PolicyType.SingleOrg,this.component=p}}t.SingleOrgPolicy=d;class p extends r.BasePolicyComponent{constructor(e){super(),this.i18nService=e}buildRequest(e){var t,n;if(!this.enabled.value){if(null!==(t=e.get(i.PolicyType.RequireSso))&&void 0!==t&&t)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("requireSso")));if(null!==(n=e.get(i.PolicyType.MaximumVaultTimeout))&&void 0!==n&&n)throw new Error(this.i18nService.t("disableRequiredError",this.i18nService.t("maximumVaultTimeoutLabel")))}return super.buildRequest(e)}}t.SingleOrgPolicyComponent=p,p.ɵfac=function(e){return new(e||p)(o.ɵɵdirectiveInject(a.I18nService))},p.ɵcmp=o.ɵɵdefineComponent({type:p,selectors:[["policy-single-org"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"singleOrgPolicyWarning"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[s.CalloutComponent,l.CheckboxControlValueAccessor,l.NgControlStatus,l.FormControlDirective],pipes:[c.I18nPipe],encapsulation:2})},69952:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticationPolicyComponent=t.TwoFactorAuthenticationPolicy=void 0;const i=n(40251),r=n(52289),o=n(32621),a=n(52900),s=n(96832),l=n(72596);class c extends r.BasePolicy{constructor(){super(...arguments),this.name="twoStepLogin",this.description="twoStepLoginPolicyDesc",this.type=i.PolicyType.TwoFactorAuthentication,this.component=d}}t.TwoFactorAuthenticationPolicy=c;class d extends r.BasePolicyComponent{}t.TwoFactorAuthenticationPolicyComponent=d,d.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(d)))(t||d)}}(),d.ɵcmp=o.ɵɵdefineComponent({type:d,selectors:[["policy-two-factor-authentication"]],features:[o.ɵɵInheritDefinitionFeature],decls:16,vars:7,consts:[["type","warning"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","enabled","name","Enabled",1,"form-check-input",3,"formControl"],["for","enabled",1,"form-check-label"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",0),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n\n"),o.ɵɵelementStart(4,"div",1),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",2),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"input",3),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",4),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n")),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"twoStepLoginPolicyWarning"),"\n"),o.ɵɵadvance(7),o.ɵɵproperty("formControl",t.enabled),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,5,"enabled")))},directives:[a.CalloutComponent,s.CheckboxControlValueAccessor,s.NgControlStatus,s.FormControlDirective],pipes:[l.I18nPipe],encapsulation:2})},17456:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;const r=n(32621),o=(n(68012),n(29546),n(91092),n(82058),n(40349),n(70143),n(99954),n(2173),n(93633)),a=n(87388),s=n(24406),l=n(99422),c=n(28047),d=n(22858),p=n(32621),u=n(29546),m=n(91092),h=n(40349),v=n(68012),f=n(2173),g=n(99954),y=n(82058),x=n(70143),S=n(57490),b=n(96832),w=n(637),I=n(69242),C=n(28047),E=n(72596),P=["deleteOrganizationTemplate"],k=["purgeOrganizationTemplate"],A=["apiKeyTemplate"],O=["rotateApiKeyTemplate"];function T(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",12),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",13),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function M(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",14,15),p.ɵɵlistener("ngSubmit",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().submit()})),p.ɵɵtext(2,"\n "),p.ɵɵelementStart(3,"div",16),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"div",17),p.ɵɵtext(6,"\n "),p.ɵɵelementStart(7,"div",18),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"label",19),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12,"\n "),p.ɵɵelementStart(13,"input",20),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.name=t})),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementStart(16,"div",18),p.ɵɵtext(17,"\n "),p.ɵɵelementStart(18,"label",21),p.ɵɵtext(19),p.ɵɵpipe(20,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(21,"\n "),p.ɵɵelementStart(22,"input",22),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.billingEmail=t})),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n "),p.ɵɵelementStart(25,"div",18),p.ɵɵtext(26,"\n "),p.ɵɵelementStart(27,"label",23),p.ɵɵtext(28),p.ɵɵpipe(29,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(30,"\n "),p.ɵɵelementStart(31,"input",24),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.businessName=t})),p.ɵɵelementEnd(),p.ɵɵtext(32,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n "),p.ɵɵelementStart(34,"div",18),p.ɵɵtext(35,"\n "),p.ɵɵelementStart(36,"label",25),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39,"\n "),p.ɵɵelementStart(40,"input",26),p.ɵɵlistener("ngModelChange",(function(t){p.ɵɵrestoreView(e);return p.ɵɵnextContext().org.identifier=t})),p.ɵɵelementEnd(),p.ɵɵtext(41,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(43,"\n "),p.ɵɵelementStart(44,"div",17),p.ɵɵtext(45,"\n "),p.ɵɵelement(46,"app-avatar",27),p.ɵɵtext(47,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(48,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(49,"\n "),p.ɵɵelementStart(50,"button",28),p.ɵɵtext(51,"\n "),p.ɵɵelement(52,"i",29),p.ɵɵpipe(53,"i18n"),p.ɵɵtext(54,"\n "),p.ɵɵelementStart(55,"span"),p.ɵɵtext(56),p.ɵɵpipe(57,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(58,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(59,"\n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(10),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,16,"organizationName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.name)("disabled",t.selfHosted),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(20,18,"billingEmail")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.billingEmail)("disabled",t.selfHosted),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(29,20,"businessName")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.businessName)("disabled",t.selfHosted),p.ɵɵadvance(6),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,22,"identifier")),p.ɵɵadvance(3),p.ɵɵproperty("ngModel",t.org.identifier),p.ɵɵadvance(6),p.ɵɵpropertyInterpolate("data",t.org.name),p.ɵɵadvance(4),p.ɵɵproperty("disabled",e.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(53,24,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(57,26,"save"))}}function D(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementContainerStart(0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"div",3),p.ɵɵtext(3,"\n "),p.ɵɵelementStart(4,"h1"),p.ɵɵtext(5),p.ɵɵpipe(6,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(7,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementStart(12,"a",30),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(16,"\n "),p.ɵɵelementStart(17,"button",31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().viewApiKey()})),p.ɵɵtext(18),p.ɵɵpipe(19,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(20,"\n "),p.ɵɵelementStart(21,"button",31),p.ɵɵlistener("click",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().rotateApiKey()})),p.ɵɵtext(22),p.ɵɵpipe(23,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(24,"\n"),p.ɵɵelementContainerEnd()}2&e&&(p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(6,5,"apiKey")),p.ɵɵadvance(5),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(11,7,"apiKeyDesc"),"\n "),p.ɵɵadvance(3),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(14,9,"learnMore"),"\n "),p.ɵɵadvance(5),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(19,11,"viewApiKey"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(23,13,"rotateApiKey"),"\n "))}function B(e,t){1&e&&(p.ɵɵelementStart(0,"div"),p.ɵɵtext(1,"\n "),p.ɵɵelement(2,"i",12),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"span",13),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8,"\n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,2,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){if(1&e){const e=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"form",14,32),p.ɵɵlistener("ngSubmit",(function(){p.ɵɵrestoreView(e);return p.ɵɵnextContext().submitTaxInfo()})),p.ɵɵtext(2,"\n "),p.ɵɵelement(3,"app-tax-info"),p.ɵɵtext(4,"\n "),p.ɵɵelementStart(5,"button",28),p.ɵɵtext(6,"\n "),p.ɵɵelement(7,"i",29),p.ɵɵpipe(8,"i18n"),p.ɵɵtext(9,"\n "),p.ɵɵelementStart(10,"span"),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(14,"\n"),p.ɵɵelementEnd()}if(2&e){const e=p.ɵɵreference(1),t=p.ɵɵnextContext();p.ɵɵproperty("appApiAction",t.taxFormPromise),p.ɵɵadvance(5),p.ɵɵproperty("disabled",e.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(8,4,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,6,"save"))}}function U(e,t){}function V(e,t){}function F(e,t){}function N(e,t){}class _{constructor(e,t,n,i,r,o,a,s,l){this.modalService=e,this.apiService=t,this.i18nService=n,this.route=i,this.syncService=r,this.platformUtilsService=o,this.cryptoService=a,this.logService=s,this.router=l,this.selfHosted=!1,this.loading=!0,this.canUseApi=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.selfHosted=this.platformUtilsService.isSelfHost(),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId;try{this.org=yield this.apiService.getOrganization(this.organizationId),this.canUseApi=this.org.useApi}catch(t){this.logService.error(t)}})))),this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new a.OrganizationUpdateRequest;if(e.name=this.org.name,e.businessName=this.org.businessName,e.billingEmail=this.org.billingEmail,e.identifier=this.org.identifier,!this.org.hasPublicAndPrivateKeys){const t=yield this.cryptoService.getOrgKey(this.organizationId),n=yield this.cryptoService.makeKeyPair(t);e.keys=new o.OrganizationKeysRequest(n[0],n[1].encryptedString)}this.formPromise=this.apiService.putOrganization(this.organizationId,e).then((()=>this.syncService.fullSync(!0))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationUpdated"))}catch(e){this.logService.error(e)}}))}submitTaxInfo(){return i(this,void 0,void 0,(function*(){this.taxFormPromise=this.taxInfo.submitTaxInfo(),yield this.taxFormPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("taxInfoUpdated"))}))}deleteOrganization(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(d.DeleteOrganizationComponent,this.deleteModalRef,(e=>{e.organizationId=this.organizationId,e.onSuccess.subscribe((()=>{this.router.navigate(["/"])}))}))}))}purgeVault(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.PurgeVaultComponent,this.purgeModalRef,(e=>{e.organizationId=this.organizationId}))}))}viewApiKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.ApiKeyComponent,this.apiKeyModalRef,(e=>{e.keyType="organization",e.entityId=this.organizationId,e.postKey=this.apiService.postOrganizationApiKey.bind(this.apiService),e.scope="api.organization",e.grantType="client_credentials",e.apiKeyTitle="apiKey",e.apiKeyWarning="apiKeyWarning",e.apiKeyDescription="apiKeyDesc"}))}))}rotateApiKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.ApiKeyComponent,this.rotateApiKeyModalRef,(e=>{e.keyType="organization",e.isRotation=!0,e.entityId=this.organizationId,e.postKey=this.apiService.postOrganizationRotateApiKey.bind(this.apiService),e.scope="api.organization",e.grantType="client_credentials",e.apiKeyTitle="apiKey",e.apiKeyWarning="apiKeyWarning",e.apiKeyDescription="apiKeyRotateDesc"}))}))}}t.AccountComponent=_,_.ɵfac=function(e){return new(e||_)(p.ɵɵdirectiveInject(u.ModalService),p.ɵɵdirectiveInject(m.ApiService),p.ɵɵdirectiveInject(h.I18nService),p.ɵɵdirectiveInject(v.ActivatedRoute),p.ɵɵdirectiveInject(f.SyncService),p.ɵɵdirectiveInject(g.PlatformUtilsService),p.ɵɵdirectiveInject(y.CryptoService),p.ɵɵdirectiveInject(x.LogService),p.ɵɵdirectiveInject(v.Router))},_.ɵcmp=p.ɵɵdefineComponent({type:_,selectors:[["app-org-account"]],viewQuery:function(e,t){if(1&e&&(p.ɵɵviewQuery(P,7,r.ViewContainerRef),p.ɵɵviewQuery(k,7,r.ViewContainerRef),p.ɵɵviewQuery(A,7,r.ViewContainerRef),p.ɵɵviewQuery(O,7,r.ViewContainerRef),p.ɵɵviewQuery(c.TaxInfoComponent,5)),2&e){let e;p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.deleteModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.purgeModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.apiKeyModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.rotateApiKeyModalRef=e.first),p.ɵɵqueryRefresh(e=p.ɵɵloadQuery())&&(t.taxInfo=e.first)}},decls:65,vars:26,consts:[[1,"page-header"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[1,"secondary-header","border-0","mb-0"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["type","button",1,"btn","btn-outline-danger",3,"click"],["deleteOrganizationTemplate",""],["purgeOrganizationTemplate",""],["apiKeyTemplate",""],["rotateApiKeyTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","identifier"],["id","identifier","type","text","name","Identifier",1,"form-control",3,"ngModel","ngModelChange"],["dynamic","true","size","75","fontSize","35",3,"data"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["href","https://docs.bitwarden.com","target","_blank","rel","noopener"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["formTax",""]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1,"\n "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(6,"\n"),p.ɵɵtemplate(7,T,9,6,"div",1),p.ɵɵtext(8,"\n"),p.ɵɵtemplate(9,M,60,28,"form",2),p.ɵɵtext(10,"\n"),p.ɵɵtemplate(11,D,25,15,"ng-container",1),p.ɵɵtext(12,"\n"),p.ɵɵelementStart(13,"div",3),p.ɵɵtext(14,"\n "),p.ɵɵelementStart(15,"h1"),p.ɵɵtext(16),p.ɵɵpipe(17,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(18,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(19,"\n"),p.ɵɵelementStart(20,"p"),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(23,"\n"),p.ɵɵtemplate(24,B,9,6,"div",1),p.ɵɵtext(25,"\n"),p.ɵɵtemplate(26,R,15,8,"form",2),p.ɵɵtext(27,"\n"),p.ɵɵelementStart(28,"div",4),p.ɵɵtext(29,"\n "),p.ɵɵelementStart(30,"h1"),p.ɵɵtext(31),p.ɵɵpipe(32,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(33,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(34,"\n"),p.ɵɵelementStart(35,"div",5),p.ɵɵtext(36,"\n "),p.ɵɵelementStart(37,"div",6),p.ɵɵtext(38,"\n "),p.ɵɵelementStart(39,"p"),p.ɵɵtext(40),p.ɵɵpipe(41,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(42,"\n "),p.ɵɵelementStart(43,"button",7),p.ɵɵlistener("click",(function(){return t.deleteOrganization()})),p.ɵɵtext(44),p.ɵɵpipe(45,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(46,"\n "),p.ɵɵelementStart(47,"button",7),p.ɵɵlistener("click",(function(){return t.purgeVault()})),p.ɵɵtext(48),p.ɵɵpipe(49,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(50,"\n "),p.ɵɵelementEnd(),p.ɵɵtext(51,"\n"),p.ɵɵelementEnd(),p.ɵɵtext(52,"\n"),p.ɵɵtemplate(53,U,0,0,"ng-template",null,8,p.ɵɵtemplateRefExtractor),p.ɵɵtext(55,"\n"),p.ɵɵtemplate(56,V,0,0,"ng-template",null,9,p.ɵɵtemplateRefExtractor),p.ɵɵtext(58,"\n"),p.ɵɵtemplate(59,F,0,0,"ng-template",null,10,p.ɵɵtemplateRefExtractor),p.ɵɵtext(61,"\n"),p.ɵɵtemplate(62,N,0,0,"ng-template",null,11,p.ɵɵtemplateRefExtractor),p.ɵɵtext(64,"\n")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,12,"myOrganization")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.org&&!t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.canUseApi),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(17,14,"taxInformation")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(22,16,"taxInformationDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.org||t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.org&&!t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(32,18,"dangerZone")),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(41,20,"dangerZoneDesc")),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(45,22,"deleteOrganization"),"\n "),p.ɵɵadvance(4),p.ɵɵtextInterpolate1("\n ",p.ɵɵpipeBind1(49,24,"purgeVault"),"\n "))},directives:[S.NgIf,b.NgControlStatusGroup,b.NgForm,w.ApiActionDirective,b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,I.AvatarComponent,C.TaxInfoComponent],pipes:[E.I18nPipe],encapsulation:2})},37159:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustSubscription=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(57121)),a=n(32621),s=n(91092),l=n(40349),c=n(99954),d=n(70143),p=n(96832),u=n(637),m=n(63410),h=n(72596),v=n(57490);class f{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.seatPrice=0,this.interval="year",this.onAdjusted=new r.EventEmitter}ngOnInit(){this.limitSubscription=null!=this.maxAutoscaleSeats,this.newSeatCount=this.currentSeatCount,this.newMaxSeats=this.maxAutoscaleSeats}submit(){return i(this,void 0,void 0,(function*(){try{const e=this.newSeatCount-this.currentSeatCount,t=new o.OrganizationSubscriptionUpdateRequest(e,this.newMaxSeats);this.formPromise=this.apiService.postOrganizationUpdateSubscription(this.organizationId,t),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("subscriptionUpdated"))}catch(e){this.logService.error(e)}this.onAdjusted.emit()}))}limitSubscriptionChanged(){this.limitSubscription||(this.newMaxSeats=null)}get adjustedSeatTotal(){return this.newSeatCount*this.seatPrice}get maxSeatTotal(){return this.newMaxSeats*this.seatPrice}}t.AdjustSubscription=f,f.ɵfac=function(e){return new(e||f)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.LogService))},f.ɵcmp=a.ɵɵdefineComponent({type:f,selectors:[["app-adjust-subscription"]],inputs:{organizationId:"organizationId",maxAutoscaleSeats:"maxAutoscaleSeats",currentSeatCount:"currentSeatCount",seatPrice:"seatPrice",interval:"interval"},outputs:{onAdjusted:"onAdjusted"},decls:82,vars:57,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"form-group","col-6"],["for","newSeatCount"],["id","newSeatCount","type","number","name","NewSeatCount","min","0","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"d-block","text-muted","mb-4"],[1,"row","mb-4"],[1,"form-group","col-sm"],[1,"form-check"],["id","limitSubscription","type","checkbox","name","LimitSubscription",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","limitSubscription"],[1,"d-block","text-muted"],[1,"row","mb-4",3,"hidden"],["for","maxAutoscaleSeats"],["id","maxAutoscaleSeats","type","number","name","MaxAutoscaleSeats","step","1",1,"form-control","col-6",3,"ngModel","min","required","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"showMethods"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"form",0,1),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"div"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"div",2),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",3),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"label",4),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"input",5),a.ɵɵlistener("ngModelChange",(function(e){return t.newSeatCount=e})),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"small",6),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"strong"),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20),a.ɵɵpipe(21,"currency"),a.ɵɵpipe(22,"currency"),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"div",7),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"div",8),a.ɵɵtext(30,"\n "),a.ɵɵelementStart(31,"div",9),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"input",10),a.ɵɵlistener("ngModelChange",(function(e){return t.limitSubscription=e}))("change",(function(){return t.limitSubscriptionChanged()})),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"label",11),a.ɵɵtext(36),a.ɵɵpipe(37,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"small",12),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(45,"\n "),a.ɵɵelementStart(46,"div",13),a.ɵɵtext(47,"\n "),a.ɵɵelementStart(48,"div",8),a.ɵɵtext(49,"\n "),a.ɵɵelementStart(50,"label",14),a.ɵɵtext(51),a.ɵɵpipe(52,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(53,"\n "),a.ɵɵelementStart(54,"input",15),a.ɵɵlistener("ngModelChange",(function(e){return t.newMaxSeats=e})),a.ɵɵelementEnd(),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"small",12),a.ɵɵtext(57,"\n "),a.ɵɵelementStart(58,"strong"),a.ɵɵtext(59),a.ɵɵpipe(60,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(61),a.ɵɵpipe(62,"currency"),a.ɵɵpipe(63,"currency"),a.ɵɵpipe(64,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n "),a.ɵɵelementStart(68,"button",16),a.ɵɵtext(69,"\n "),a.ɵɵelement(70,"i",17),a.ɵɵpipe(71,"i18n"),a.ɵɵtext(72,"\n "),a.ɵɵelementStart(73,"span"),a.ɵɵtext(74),a.ɵɵpipe(75,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(76,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(77,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(78,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(79,"\n"),a.ɵɵelement(80,"app-payment",18),a.ɵɵtext(81,"\n")),2&e){const e=a.ɵɵreference(1);a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,25,"subscriptionSeats")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.newSeatCount),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(19,27,"total"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate4(" ",t.newSeatCount||0," ×\n ",a.ɵɵpipeBind2(21,29,t.seatPrice,"$")," = ",a.ɵɵpipeBind2(22,32,t.adjustedSeatTotal,"$")," /\n ",a.ɵɵpipeBind1(23,35,t.interval),"\n "),a.ɵɵadvance(13),a.ɵɵproperty("ngModel",t.limitSubscription),a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(37,37,"limitSubscription")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(42,39,"limitSubscriptionDesc")),a.ɵɵadvance(5),a.ɵɵproperty("hidden",!t.limitSubscription),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(52,41,"maxSeatLimit")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.newMaxSeats)("min",null==t.newSeatCount?1:t.newSeatCount)("required",t.limitSubscription),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(60,43,"maxSeatCost"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate4(" ",t.newMaxSeats||0," ×\n ",a.ɵɵpipeBind2(62,45,t.seatPrice,"$")," = ",a.ɵɵpipeBind2(63,48,t.maxSeatTotal,"$")," /\n ",a.ɵɵpipeBind1(64,51,t.interval),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(71,53,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(75,55,"save")),a.ɵɵadvance(6),a.ɵɵproperty("showMethods",!1)}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,p.MinValidator,p.NumberValueAccessor,p.DefaultValueAccessor,p.RequiredValidator,p.NgControlStatus,p.NgModel,p.CheckboxControlValueAccessor,m.PaymentComponent],pipes:[h.I18nPipe,v.CurrencyPipe],encapsulation:2})},42634:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePlanComponent=void 0;const r=n(32621),o=(n(70143),n(39691)),a=n(48155),s=n(32621),l=n(70143),c=n(50553),d=n(13816),p=n(72596);class u{constructor(e){this.logService=e,this.onChanged=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.defaultUpgradePlan=o.PlanType.FamiliesAnnually,this.defaultUpgradeProduct=a.ProductType.Families}submit(){return i(this,void 0,void 0,(function*(){try{this.onChanged.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}}t.ChangePlanComponent=u,u.ɵfac=function(e){return new(e||u)(s.ɵɵdirectiveInject(l.LogService))},u.ɵcmp=s.ɵɵdefineComponent({type:u,selectors:[["app-change-plan"]],inputs:{organizationId:"organizationId"},outputs:{onChanged:"onChanged",onCanceled:"onCanceled"},decls:24,vars:14,consts:[[1,"card","card-org-plans"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"mb-0"],[3,"showFree","showCancel","plan","product","organizationId","onCanceled"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"button",2),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(5,"i18n"),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"span",3),s.ɵɵtext(8,"×"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"h2",4),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"p",5),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"app-organization-plans",6),s.ɵɵlistener("onCanceled",(function(){return t.cancel()})),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(5,8,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,10,"changeBillingPlan")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,12,"changeBillingPlanUpgrade")),s.ɵɵadvance(3),s.ɵɵproperty("showFree",!1)("showCancel",!0)("plan",t.defaultUpgradePlan)("product",t.defaultUpgradeProduct)("organizationId",t.organizationId))},directives:[c.A11yTitleDirective,d.OrganizationPlansComponent],pipes:[p.I18nPipe],encapsulation:2})},22858:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteOrganizationComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(61554),n(32621)),a=n(91092),s=n(40349),l=n(99954),c=n(61554),d=n(70143),p=n(96832),u=n(637),m=n(50553),h=n(52900),v=n(38287),f=n(72596);class g{constructor(e,t,n,i,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.logService=o,this.descriptionKey="deleteOrganizationDesc",this.onSuccess=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.deleteOrganization(this.organizationId,e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("organizationDeleted"),this.i18nService.t("organizationDeletedDesc")),this.onSuccess.emit()}catch(e){this.logService.error(e)}}))}}t.DeleteOrganizationComponent=g,g.ɵfac=function(e){return new(e||g)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.UserVerificationService),o.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=o.ɵɵdefineComponent({type:g,selectors:[["app-delete-organization"]],outputs:{onSuccess:"onSuccess"},decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteOrganizationTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteOrganizationTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"p"),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"app-callout",9),o.ɵɵtext(28),o.ɵɵpipe(29,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"app-verify-master-password",10),o.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"div",11),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"button",12),o.ɵɵtext(38,"\n "),o.ɵɵelement(39,"i",13),o.ɵɵpipe(40,"i18n"),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"span"),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"button",14),o.ɵɵtext(48),o.ɵɵpipe(49,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,10,"deleteOrganization")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,12,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(25,14,t.descriptionKey)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(29,16,"deleteOrganizationWarning")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.masterPassword),o.ɵɵadvance(6),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(40,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,20,"deleteOrganization")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.VerifyMasterPasswordComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},69181:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DownloadLicenseComponent=void 0;const r=n(32621),o=(n(91092),n(70143),n(99954),n(32621)),a=n(91092),s=n(99954),l=n(70143),c=n(96832),d=n(637),p=n(50553),u=n(72596);class m{constructor(e,t,n){this.apiService=e,this.platformUtilsService=t,this.logService=n,this.onDownloaded=new r.EventEmitter,this.onCanceled=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.installationId&&""!==this.installationId)try{this.formPromise=this.apiService.getOrganizationLicense(this.organizationId,this.installationId);const e=yield this.formPromise,t=JSON.stringify(e,null,2);this.platformUtilsService.saveFile(window,t,null,"bitwarden_organization_license.json"),this.onDownloaded.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}}t.DownloadLicenseComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.LogService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-download-license"]],inputs:{organizationId:"organizationId"},outputs:{onDownloaded:"onDownloaded",onCanceled:"onCanceled"},decls:53,vars:24,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],[1,"d-flex"],["for","installationId"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/licensing-on-premise/#organization-account-sharing",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","installationId","type","text","name","InstallationId","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"button",3),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"span",4),o.ɵɵtext(9,"×"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"h3",5),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",7),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",9),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"a",10),o.ɵɵpipe(27,"i18n"),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"i",11),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"input",12),o.ɵɵlistener("ngModelChange",(function(e){return t.installationId=e})),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"button",13),o.ɵɵtext(38,"\n "),o.ɵɵelement(39,"i",14),o.ɵɵpipe(40,"i18n"),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"span"),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"button",15),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵtext(48),o.ɵɵpipe(49,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,10,"cancel")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,12,"downloadLicense")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,14,"enterInstallationId")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(27,16,"learnMore")),o.ɵɵadvance(7),o.ɵɵproperty("ngModel",t.installationId),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(40,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,20,"submit")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(49,22,"cancel"),"\n ")}},directives:[c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective,c.DefaultValueAccessor,c.RequiredValidator,c.NgControlStatus,c.NgModel],pipes:[u.I18nPipe],encapsulation:2})},10619:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationBillingComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954);const r=n(25440),o=n(32621),a=n(91092),s=n(40349),l=n(68012),c=n(99954),d=n(70143),p=n(57490),u=n(76187),m=n(52900),h=n(96832),v=n(637),f=n(3068),g=n(50553),y=n(72596),x=function(e){return{"bwi-spin":e}};function S(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",3),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().load()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(5,x,e.loading)),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",5),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",6),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",14),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).addCredit()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-add-credit",15),o.ɵɵlistener("onAdded",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closeAddCredit(!1)})),o.ɵɵtext(1,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵproperty("organizationId",e.organizationId)}}function C(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function E(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-callout",18),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"p"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"form",19,20),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).verifyBank()})),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"label",21),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",22),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",23),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",24),o.ɵɵtext(20,"$0."),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"input",25),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).verifyAmount1=t})),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"label",26),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",22),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"div",23),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"div",24),o.ɵɵtext(35,"$0."),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"input",27),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).verifyAmount2=t})),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",28),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",29),o.ɵɵpipe(44,"i18n"),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"span"),o.ɵɵtext(47),o.ɵɵpipe(48,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(9),t=o.ɵɵnextContext(3);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,11,"verifyBankAccount")),o.ɵɵadvance(4),o.ɵɵtextInterpolate2("",o.ɵɵpipeBind1(5,13,"verifyBankAccountDesc")," ",o.ɵɵpipeBind1(6,15,"verifyBankAccountFailureWarning"),""),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.verifyBankPromise),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(13,17,"amount","1")),o.ɵɵadvance(11),o.ɵɵproperty("ngModel",t.verifyAmount1),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(28,20,"amount","2")),o.ɵɵadvance(11),o.ɵɵproperty("ngModel",t.verifyAmount2),o.ɵɵadvance(3),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(44,23,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(48,25,"verifyBankAccount"))}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"inAppPurchase")))}const k=function(e,t,n,i,r,o){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-money":n,"bwi-paypal text-primary":i,"bwi-apple text-muted":r,"bwi-google text-muted":o}};function A(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,E,52,27,"app-callout",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"p"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",17),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,P,3,3,"span",2),o.ɵɵtext(9),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.paymentSource.type===e.paymentMethodType.BankAccount&&e.paymentSource.needsVerification),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction6(4,k,e.paymentSource.type===e.paymentMethodType.Card,e.paymentSource.type===e.paymentMethodType.BankAccount,e.paymentSource.type===e.paymentMethodType.Check,e.paymentSource.type===e.paymentMethodType.PayPal,e.paymentSource.type===e.paymentMethodType.AppleInApp,e.paymentSource.type===e.paymentMethodType.GoogleInApp)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.paymentSourceInApp),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.paymentSource.description,"\n ")}}function O(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",14),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).changePayment()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,e.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function T(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-adjust-payment",30),o.ɵɵlistener("onAdjusted",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).closePayment(!1)})),o.ɵɵtext(1,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵproperty("currentType",null!=e.paymentSource?e.paymentSource.type:null)("organizationId",e.organizationId)}}function M(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noInvoices")))}function D(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",36),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"paid"),"\n "))}function B(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",37),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function R(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"a",33),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelement(11,"i",34),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",35),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"td"),o.ɵɵtext(20),o.ɵɵpipe(21,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"td"),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,D,5,3,"span",2),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,B,5,3,"span",2),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,9,e.date,"mediumDate")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("href",e.pdfUrl,o.ɵɵsanitizeUrl),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(9,12,"downloadInvoice")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("href",e.url,o.ɵɵsanitizeUrl),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(14,14,"viewInvoice")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(16,16,"invoiceNumber",e.number),""),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(21,19,e.amount,"$")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.paid),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.paid)}}function U(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",31),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,R,30,22,"tr",32),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.invoices)}}function V(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"noTransactions")))}function F(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function N(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"refundNoun")))}const _=function(e,t,n,i){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-bitcoin text-warning":n,"bwi-paypal text-primary":i}};function j(e,t){if(1&e&&o.ɵɵelement(0,"i",40),2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(3);o.ɵɵproperty("ngClass",o.ɵɵpureFunction4(1,_,e.paymentMethodType===t.paymentMethodType.Card,e.paymentMethodType===t.paymentMethodType.BankAccount||e.paymentMethodType===t.paymentMethodType.WireTransfer,e.paymentMethodType===t.paymentMethodType.BitPay,e.paymentMethodType===t.paymentMethodType.PayPal))}}const z=function(e){return{"text-strike":e}};function L(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"date"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,F,3,3,"span",2),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,N,3,3,"span",2),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"td"),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,j,1,6,"i",38),o.ɵɵtext(16),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"td",39),o.ɵɵpipe(19,"i18n"),o.ɵɵtext(20),o.ɵɵpipe(21,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(4,8,e.createdDate,"mediumDate")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.type===n.transactionType.Charge||e.type===n.transactionType.Credit),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.type===n.transactionType.Refund),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.paymentMethodType),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.details,"\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(19,11,e.refunded?"refunded":"")),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(16,z,e.refunded)),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(21,13,e.amount,"$"),"\n ")}}function K(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",31),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,L,23,18,"tr",32),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.transactions)}}function q(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h2"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"p",7),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"strong"),o.ɵɵtext(9),o.ɵɵpipe(10,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"p"),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,w,3,3,"button",8),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,I,2,1,"app-add-credit",9),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"h2",10),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,C,3,3,"p",2),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,A,11,11,"ng-container",2),o.ɵɵtext(28,"\n "),o.ɵɵtemplate(29,O,3,3,"button",8),o.ɵɵtext(30,"\n "),o.ɵɵtemplate(31,T,2,2,"app-adjust-payment",11),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"h2",10),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵtemplate(37,M,3,3,"p",2),o.ɵɵtext(38,"\n "),o.ɵɵtemplate(39,U,7,1,"table",12),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"h2",10),o.ɵɵtext(42),o.ɵɵpipe(43,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵtemplate(45,V,3,3,"p",2),o.ɵɵtext(46,"\n "),o.ɵɵtemplate(47,K,7,1,"table",12),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"small",13),o.ɵɵtext(50),o.ɵɵpipe(51,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,e.isCreditBalance?"accountCredit":"accountBalance")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(10,19,e.creditOrBalance,"$")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(15,22,"creditAppliedDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.showAddCredit),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showAddCredit),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,24,"paymentMethod")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.paymentSource),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.paymentSource),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.showAdjustPayment),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showAdjustPayment),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(35,26,"invoices")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.invoices||!e.invoices.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.invoices&&e.invoices.length),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(43,28,"transactions")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.transactions||!e.transactions.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.transactions&&e.transactions.length),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("* ",o.ɵɵpipeBind2(51,30,"chargesStatement","BITWARDEN"),"")}}class G extends r.UserBillingComponent{constructor(e,t,n,i,r){super(e,t,i,r),this.route=n}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.firstLoaded=!0}))))}))}}t.OrganizationBillingComponent=G,G.ɵfac=function(e){return new(e||G)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ActivatedRoute),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.LogService))},G.ɵcmp=o.ɵɵdefineComponent({type:G,selectors:[["app-org-billing"]],features:[o.ɵɵInheritDefinitionFeature],decls:13,vars:6,consts:[[1,"page-header","d-flex"],["class","btn btn-sm btn-outline-primary ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","ml-auto",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","organizationId","onAdjusted","onCanceled",4,"ngIf"],["class","table mb-2",4,"ngIf"],[1,"text-muted"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onAdded","onCanceled"],["type","warning",3,"title",4,"ngIf"],[1,"bwi","bwi-fw",3,"ngClass"],["type","warning",3,"title"],["ngNativeValidate","",1,"form-inline",3,"appApiAction","ngSubmit"],["verifyForm",""],["for","verifyAmount1",1,"sr-only"],[1,"input-group","mr-2"],[1,"input-group-prepend"],[1,"input-group-text"],["type","number","id","verifyAmount1","placeholder","xx","name","Amount1","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","verifyAmount2",1,"sr-only"],["type","number","id","verifyAmount2","placeholder","xx","name","Amount2","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-outline-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"currentType","organizationId","onAdjusted","onCanceled"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-file-pdf"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"bwi","bwi-check","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle","text-muted"],["class","bwi bwi-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,S,5,7,"button",1),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,b,9,6,"ng-container",2),o.ɵɵtext(10,"\n"),o.ɵɵtemplate(11,q,53,33,"ng-container",2),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,4,"billing"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.firstLoaded),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.billing))},directives:[p.NgIf,p.NgClass,u.AddCreditComponent,m.CalloutComponent,h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,h.MinValidator,h.MaxValidator,h.NumberValueAccessor,h.DefaultValueAccessor,h.RequiredValidator,h.NgControlStatus,h.NgModel,f.AdjustPaymentComponent,p.NgForOf,g.A11yTitleDirective],pipes:[y.I18nPipe,p.CurrencyPipe,p.DatePipe],encapsulation:2})},89012:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationSubscriptionComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(36424),n(94308),n(99954);const r=n(39691),o=n(32621),a=n(91092),s=n(99954),l=n(40349),c=n(36424),d=n(68012),p=n(94308),u=n(70143),m=n(57490),h=n(52900),v=n(637),f=n(42634),g=n(37159),y=n(96413),x=n(69181),S=n(50553),b=n(30029),w=n(72596);function I(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function E(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",6),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"canceled")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-callout",6),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"p"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"button",7,8),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).reinstate()})),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"i",9),o.ɵɵpipe(11,"i18n"),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"span"),o.ɵɵtext(14),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(8),t=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,6,"pendingCancellation")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",t.reinstatePromise)("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(11,10,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function k(e,t){1&e&&(o.ɵɵelementStart(0,"span",26),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"pendingCancellation")))}function A(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"dt"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"dd"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"span",24),o.ɵɵtext(9),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,k,3,3,"span",25),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"dt"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"dd"),o.ɵɵtext(19),o.ɵɵpipe(20,"date"),o.ɵɵpipe(21,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,5,"status")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(e.isSponsoredSubscription?"sponsored":e.subscription.status||"-"),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,7,"nextCharge")),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",e.nextInvoice?o.ɵɵpipeBind2(20,9,e.nextInvoice.date,"mediumDate")+", "+o.ɵɵpipeBind2(21,12,e.nextInvoice.amount,"$"):"-","\n ")}}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td"),o.ɵɵtext(3),o.ɵɵpipe(4,"currency"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"td"),o.ɵɵtext(7),o.ɵɵpipe(8,"currency"),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(3),o.ɵɵtextInterpolate3("\n ",e.name," ",e.quantity>1?"×"+e.quantity:""," @\n ",o.ɵɵpipeBind2(4,5,e.amount,"$"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate2("",o.ɵɵpipeBind2(8,8,e.quantity*e.amount,"$")," /",o.ɵɵpipeBind1(9,11,e.interval),"")}}function T(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",27),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"strong",28),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"table",29),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"tbody"),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,O,11,13,"tr",30),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"details")),o.ɵɵadvance(7),o.ɵɵproperty("ngForOf",e.subscription.items)}}function M(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",31),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"dl"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"dt"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"dd"),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,2,"provider")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(12,4,"yourProviderIs",e.userOrg.providerName))}}function D(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",32),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).changePlan()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"changeBillingPlan"),"\n "))}function B(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-change-plan",33),o.ɵɵlistener("onChanged",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeChangePlan(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeChangePlan(!1)})),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵproperty("organizationId",e.organizationId)}}function R(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",34),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"app-adjust-subscription",35),o.ɵɵlistener("onAdjusted",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).subscriptionAdjusted()})),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("seatPrice",e.seatPrice)("organizationId",e.organizationId)("interval",e.billingInterval)("currentSeatCount",e.seats)("maxAutoscaleSeats",e.maxAutoscaleSeats)}}function U(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",36,37),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).removeSponsorship()})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",9),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(3);o.ɵɵproperty("appApiAction",t.removeSponsorshipPromise)("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"removeSponsorship"))}}function V(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",32),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).adjustStorage(!0)})),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"button",40),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).adjustStorage(!1)})),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,2,"addStorage"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function F(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"app-adjust-storage",41),o.ɵɵlistener("onAdjusted",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).closeStorage(!1)})),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(4);o.ɵɵproperty("storageGbPrice",e.storageGbPrice)("add",e.adjustStorageAdd)("organizationId",e.organizationId)("interval",e.billingInterval)}}function N(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",34),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,V,10,6,"div",38),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,F,1,4,"app-adjust-storage",39),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.showAdjustStorage),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showAdjustStorage)}}function _(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).downloadLicense()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵproperty("disabled",e.showDownloadLicense),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,2,"downloadLicense"),"\n ")}}function j(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",43,44),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).cancel()})),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",9),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"span"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(3);o.ɵɵproperty("appApiAction",t.cancelPromise)("disabled",e.loading),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(4,4,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function z(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",34),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-download-license",45),o.ɵɵlistener("onDownloaded",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeDownloadLicense()}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeDownloadLicense()})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("organizationId",e.organizationId)}}const L=function(e){return{width:e}};function K(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",10),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",11),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"dl"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"dt"),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"dd"),o.ɵɵtext(13),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,A,23,15,"ng-container",1),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,T,14,4,"div",12),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,M,16,7,"ng-container",1),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementContainerStart(24),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,D,3,3,"button",13),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,B,1,1,"app-change-plan",14),o.ɵɵtext(29,"\n "),o.ɵɵelementContainerEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"h2",15),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"p",16),o.ɵɵtext(36),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,R,8,5,"ng-container",1),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,U,10,8,"button",17),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"h2",15),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"p"),o.ɵɵtext(47),o.ɵɵpipe(48,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"div",18),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"div",19),o.ɵɵtext(53),o.ɵɵpipe(54,"percent"),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵtemplate(57,N,9,2,"ng-container",1),o.ɵɵtext(58,"\n\n "),o.ɵɵelementStart(59,"h2",15),o.ɵɵtext(60),o.ɵɵpipe(61,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(62,"\n "),o.ɵɵelementStart(63,"p",16),o.ɵɵtext(64),o.ɵɵpipe(65,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",20),o.ɵɵtext(68,"\n "),o.ɵɵtemplate(69,_,3,4,"button",21),o.ɵɵtext(70,"\n "),o.ɵɵtemplate(71,j,10,8,"button",22),o.ɵɵtext(72,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵtemplate(74,z,4,1,"div",23),o.ɵɵtext(75,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,22,"billingPlan")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sub.plan.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscription),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.subscription),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",null!=(null==e.userOrg?null:e.userOrg.providerId)),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.showChangePlanButton),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showChangePlan),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,24,"manageSubscription")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.subscriptionDesc),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscription&&e.canAdjustSeats&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.isSponsoredSubscription),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,26,"storage")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind3(48,28,"subscriptionStorage",e.sub.maxStorageGb||0,e.sub.storageName||"0 MB")),o.ɵɵadvance(5),o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(38,L,e.storageProgressWidth+"%")),o.ɵɵattribute("aria-valuenow",e.storagePercentage),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(54,32,e.storagePercentage/100),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(61,34,"additionalOptions")),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(65,36,"additionalOptionsDesc"),"\n "),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.canDownloadLicense),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.showDownloadLicense)}}function q(e,t){1&e&&(o.ɵɵelementStart(0,"span",49),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",50),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"licenseIsExpired"),"\n "))}function G(e,t){if(1&e&&(o.ɵɵelementStart(0,"dd"),o.ɵɵtext(1),o.ɵɵpipe(2,"date"),o.ɵɵtemplate(3,q,5,3,"span",48),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(2,2,e.sub.expiration,"mediumDate"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.isExpired)}}function W(e,t){1&e&&(o.ɵɵelementStart(0,"dd"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"neverExpires")))}function H(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",51),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",52),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"button",53),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeUpdateLicense(!1)})),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"span",54),o.ɵɵtext(8,"×"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"h3",55),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"app-update-license",56),o.ɵɵlistener("onUpdated",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).closeUpdateLicense(!1)})),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(5,3,"cancel")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,5,"updateLicense")),o.ɵɵadvance(3),o.ɵɵproperty("organizationId",e.organizationId)}}function $(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"dl"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"dt"),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"dd"),o.ɵɵtext(9),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"dt"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,G,5,5,"dd",1),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,W,3,3,"dd",1),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div"),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"button",32),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).updateLicense()})),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"a",46),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵtemplate(31,H,18,7,"div",47),o.ɵɵtext(32,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,8,"billingPlan")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sub.plan.name),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,10,"expiration")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.sub.expiration),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.sub.expiration),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(24,12,"updateLicense"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,14,"manageSubscription"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.showUpdateLicense)}}function Q(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,E,4,6,"app-callout",5),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,P,18,14,"app-callout",5),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,K,76,40,"ng-container",1),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,$,33,16,"ng-container",1),o.ɵɵtext(9,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscription&&e.subscription.cancelled),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.selfHosted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.selfHosted)}}class Y{constructor(e,t,n,i,r,o,a){this.apiService=e,this.platformUtilsService=t,this.i18nService=n,this.messagingService=i,this.route=r,this.organizationService=o,this.logService=a,this.loading=!1,this.firstLoaded=!1,this.adjustSeatsAdd=!0,this.showAdjustSeats=!1,this.showAdjustSeatAutoscale=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.showDownloadLicense=!1,this.showChangePlan=!1,this.selfHosted=!1,this.selfHosted=t.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId,yield this.load(),this.firstLoaded=!0}))))}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.loading=!0,this.userOrg=yield this.organizationService.get(this.organizationId),this.sub=yield this.apiService.getOrganizationSubscription(this.organizationId),this.loading=!1)}))}reinstate(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel")))try{this.reinstatePromise=this.apiService.postOrganizationReinstate(this.organizationId),yield this.reinstatePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("reinstated")),this.load()}catch(e){this.logService.error(e)}}))}cancel(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(yield this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{this.cancelPromise=this.apiService.postOrganizationCancel(this.organizationId),yield this.cancelPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("canceledSubscription")),this.load()}catch(e){this.logService.error(e)}}))}changePlan(){return i(this,void 0,void 0,(function*(){this.showChangePlan=!this.showChangePlan}))}closeChangePlan(e){this.showChangePlan=!1}downloadLicense(){this.showDownloadLicense=!this.showDownloadLicense}closeDownloadLicense(){this.showDownloadLicense=!1}updateLicense(){this.loading||(this.showUpdateLicense=!0)}closeUpdateLicense(e){this.showUpdateLicense=!1,e&&(this.load(),this.messagingService.send("updatedOrgLicense"))}subscriptionAdjusted(){this.load()}adjustStorage(e){this.adjustStorageAdd=e,this.showAdjustStorage=!0}closeStorage(e){this.showAdjustStorage=!1,e&&this.load()}removeSponsorship(){return i(this,void 0,void 0,(function*(){if(yield this.platformUtilsService.showDialog(this.i18nService.t("removeSponsorshipConfirmation"),this.i18nService.t("removeSponsorship"),this.i18nService.t("remove"),this.i18nService.t("cancel"),"warning"))try{this.removeSponsorshipPromise=this.apiService.deleteRemoveSponsorship(this.organizationId),yield this.removeSponsorshipPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("removeSponsorshipSuccess")),yield this.load()}catch(e){this.logService.error(e)}}))}get isExpired(){return null!=this.sub&&null!=this.sub.expiration&&new Date(this.sub.expiration)<new Date}get subscriptionMarkedForCancel(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate}get subscription(){return null!=this.sub?this.sub.subscription:null}get nextInvoice(){return null!=this.sub?this.sub.upcomingInvoice:null}get storagePercentage(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0}get storageProgressWidth(){return this.storagePercentage<5?5:0}get billingInterval(){return!this.sub.plan.isAnnual?"month":"year"}get storageGbPrice(){return this.sub.plan.additionalStoragePricePerGb}get seatPrice(){return this.sub.plan.seatPrice}get seats(){return this.sub.seats}get maxAutoscaleSeats(){return this.sub.maxAutoscaleSeats}get canAdjustSeats(){return this.sub.plan.hasAdditionalSeatsOption}get isSponsoredSubscription(){var e;return null===(e=this.sub.subscription)||void 0===e?void 0:e.items.some((e=>e.sponsoredSubscriptionItem))}get canDownloadLicense(){return this.sub.planType!==r.PlanType.Free&&null==this.subscription||null!=this.subscription&&!this.subscription.cancelled}get subscriptionDesc(){return this.sub.planType===r.PlanType.Free?this.i18nService.t("subscriptionFreePlan",this.sub.seats.toString()):this.sub.planType===r.PlanType.FamiliesAnnually||this.sub.planType===r.PlanType.FamiliesAnnually2019?this.isSponsoredSubscription?this.i18nService.t("subscriptionSponsoredFamiliesPlan",this.sub.seats.toString()):this.i18nService.t("subscriptionFamiliesPlan",this.sub.seats.toString()):this.sub.maxAutoscaleSeats===this.sub.seats&&null!=this.sub.seats?this.i18nService.t("subscriptionMaxReached",this.sub.seats.toString()):null==this.sub.maxAutoscaleSeats?this.i18nService.t("subscriptionUserSeatsUnlimitedAutoscale"):this.i18nService.t("subscriptionUserSeatsLimitedAutoscale",this.sub.maxAutoscaleSeats.toString())}get showChangePlanButton(){return null==this.subscription&&this.sub.planType===r.PlanType.Free&&!this.showChangePlan}}t.OrganizationSubscriptionComponent=Y,Y.ɵfac=function(e){return new(e||Y)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.LogService))},Y.ɵcmp=o.ɵɵdefineComponent({type:Y,selectors:[["app-org-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["type","warning",3,"title",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"row"],[1,"col-4"],["class","col-8",4,"ngIf"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onChanged","onCanceled",4,"ngIf"],[1,"spaced-header"],[1,"mb-4"],["type","button","class","btn btn-outline-danger btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"disabled","click",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-1",3,"appApiAction","disabled","click",4,"ngIf"],["class","mt-3",4,"ngIf"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],[1,"col-sm"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onChanged","onCanceled"],[1,"mt-3"],[3,"seatPrice","organizationId","interval","currentSeatCount","maxAutoscaleSeats","onAdjusted"],["type","button",1,"btn","btn-outline-danger","btn-submit",3,"appApiAction","disabled","click"],["removeSponsorshipBtn",""],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary","ml-1",3,"click"],[3,"storageGbPrice","add","organizationId","interval","onAdjusted","onCanceled"],["type","button",1,"btn","btn-outline-secondary",3,"disabled","click"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-1",3,"appApiAction","disabled","click"],["cancelBtn",""],[3,"organizationId","onDownloaded","onCanceled"],["href","https://vault.bitwarden.com","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],["class","text-danger ml-2",4,"ngIf"],[1,"text-danger","ml-2"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"organizationId","onUpdated","onCanceled"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,I,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,C,9,6,"ng-container",1),o.ɵɵtext(10,"\n\n"),o.ɵɵtemplate(11,Q,10,4,"ng-container",1),o.ɵɵtext(12,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,4,"subscription"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.sub))},directives:[m.NgIf,h.CalloutComponent,v.ApiActionDirective,m.NgStyle,m.NgForOf,f.ChangePlanComponent,g.AdjustSubscription,y.AdjustStorageComponent,x.DownloadLicenseComponent,S.A11yTitleDirective,b.UpdateLicenseComponent],pipes:[w.I18nPipe,m.PercentPipe,m.DatePipe,m.CurrencyPipe],encapsulation:2})},23817:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(68012),n(94308),n(99954);const r=n(32621),o=n(68012),a=n(94308),s=n(99954),l=n(57490),c=n(72596);function d(e,t){1&e&&(r.ɵɵelementStart(0,"a",11),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"billing"),"\n "))}function p(e,t){1&e&&(r.ɵɵelementStart(0,"a",12),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"twoStepLogin"),"\n "))}class u{constructor(e,t,n){this.route=e,this.organizationService=t,this.platformUtilsService=n,this.access2fa=!1}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.selfHosted=yield this.platformUtilsService.isSelfHost();const t=yield this.organizationService.get(e.organizationId);this.access2fa=t.use2fa}))))}}t.SettingsComponent=u,u.ɵfac=function(e){return new(e||u)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService),r.ɵɵdirectiveInject(s.PlatformUtilsService))},u.ɵcmp=r.ɵɵdefineComponent({type:u,selectors:[["app-org-settings"]],decls:36,vars:11,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","billing","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","two-factor","class","list-group-item","routerLinkActive","active",4,"ngIf"],[1,"col-9"],["routerLink","billing","routerLinkActive","active",1,"list-group-item"],["routerLink","two-factor","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,d,3,3,"a",8),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,p,3,3,"a",9),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",10),r.ɵɵtext(30,"\n "),r.ɵɵelement(31,"router-outlet"),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,5,"settings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,7,"myOrganization"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,9,"subscription"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.access2fa))},directives:[o.RouterLinkWithHref,o.RouterLinkActive,l.NgIf,o.RouterOutlet],pipes:[c.I18nPipe],encapsulation:2})},94686:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorSetupComponent=void 0;n(68012),n(91092),n(36424),n(10685),n(77243),n(29546);const r=n(57976),o=n(23821),a=n(90211),s=n(32621),l=n(91092),c=n(29546),d=n(36424),p=n(10685),u=n(68012),m=n(77243),h=n(57490),v=n(52900),f=n(80507),g=n(72596);function y(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function x(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function S(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-callout",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"button",13),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().recoveryCode()})),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(8,4,"viewRecoveryCode"),"\n "))}function b(e,t){1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",14),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",15),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",12),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",24),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",15),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"enabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"enabled")))}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",25),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).premiumRequired()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"premium"),"\n "))}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",17),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"img",18),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",19),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h3",20),s.ɵɵtext(10),s.ɵɵtemplate(11,I,9,6,"ng-container",1),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,C,3,3,"a",21),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",22),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"button",23),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext().manage(t.type)})),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵclassMap("mfaType"+e.type),s.ɵɵproperty("alt",e.name+" logo"),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",e.name,"\n "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",e.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.canAccessPremium&&e.premium),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",e.description,"\n "),s.ɵɵadvance(4),s.ɵɵproperty("disabled",!n.canAccessPremium&&e.premium),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(21,9,"manage"),"\n ")}}function P(e,t){}function k(e,t){}function A(e,t){}function O(e,t){}function T(e,t){}function M(e,t){}const D=function(e){return{"mt-5":e}};class B extends a.TwoFactorSetupComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.route=r}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organizationId=t.organizationId,yield e.ngOnInit.call(this)}))))}))}manage(e){return i(this,void 0,void 0,(function*(){if(e===r.TwoFactorProviderType.OrganizationDuo){const e=yield this.openModal(this.duoModalRef,o.TwoFactorDuoComponent);e.type=r.TwoFactorProviderType.OrganizationDuo,e.organizationId=this.organizationId,e.onUpdated.subscribe((e=>{this.updateStatus(e,r.TwoFactorProviderType.OrganizationDuo)}))}}))}getTwoFactorProviders(){return this.apiService.getTwoFactorOrganizationProviders(this.organizationId)}filterProvider(e){return e!==r.TwoFactorProviderType.OrganizationDuo}}t.TwoFactorSetupComponent=B,B.ɵfac=function(e){return new(e||B)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ModalService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(p.PolicyService),s.ɵɵdirectiveInject(u.ActivatedRoute),s.ɵɵdirectiveInject(m.StateService))},B.ɵcmp=s.ɵɵdefineComponent({type:B,selectors:[["app-two-factor-setup"]],features:[s.ɵɵInheritDefinitionFeature],decls:44,vars:15,consts:[[1,"page-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],[3,"alt"],[1,"mx-4"],[1,"mb-0"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-fw",3,"title"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,y,3,3,"p",1),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,x,3,3,"p",1),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,S,10,6,"app-callout",2),s.ɵɵtext(12,"\n"),s.ɵɵelementStart(13,"h2",3),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵtemplate(16,b,9,6,"small",1),s.ɵɵtext(17,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n"),s.ɵɵtemplate(19,w,3,3,"app-callout",2),s.ɵɵtext(20,"\n"),s.ɵɵelementStart(21,"ul",4),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,E,24,11,"li",5),s.ɵɵtext(24,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n\n"),s.ɵɵtemplate(26,P,0,0,"ng-template",null,6,s.ɵɵtemplateRefExtractor),s.ɵɵtext(28,"\n"),s.ɵɵtemplate(29,k,0,0,"ng-template",null,7,s.ɵɵtemplateRefExtractor),s.ɵɵtext(31,"\n"),s.ɵɵtemplate(32,A,0,0,"ng-template",null,8,s.ɵɵtemplateRefExtractor),s.ɵɵtext(34,"\n"),s.ɵɵtemplate(35,O,0,0,"ng-template",null,9,s.ɵɵtemplateRefExtractor),s.ɵɵtext(37,"\n"),s.ɵɵtemplate(38,T,0,0,"ng-template",null,10,s.ɵɵtemplateRefExtractor),s.ɵɵtext(40,"\n"),s.ɵɵtemplate(41,M,0,0,"ng-template",null,11,s.ɵɵtemplateRefExtractor),s.ɵɵtext(43,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,9,"twoStepLogin")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(13,D,!t.organizationId)),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(15,11,"providers"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loading),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showPolicyWarning),s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",t.providers))},directives:[h.NgIf,h.NgClass,h.NgForOf,v.CalloutComponent,f.StopClickDirective],pipes:[g.I18nPipe],encapsulation:2})},41116:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.FamiliesForEnterpriseSetupComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(29546),n(9941),n(91092),n(40349),n(94308),n(2173),n(29557)),s=n(39691),l=n(48155),c=n(95703),d=n(22858),p=(n(99954),n(13816)),u=n(32621),m=n(68012),h=n(99954),v=n(40349),f=n(91092),g=n(2173),y=n(9941),x=n(94308),S=n(29546),b=n(57490),w=n(96832),I=n(637),C=n(13816),E=n(72596),P=["deleteOrganizationTemplate"];function k(e,t){1&e&&(u.ɵɵelementStart(0,"div",5),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",6),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",7),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function A(e,t){1&e&&(u.ɵɵelementStart(0,"div",5),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"span"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5,"\n "),u.ɵɵelementEnd()),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,1,"badToken")))}function O(e,t){if(1&e&&(u.ɵɵelementStart(0,"option",18),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=t.$implicit;u.ɵɵproperty("ngValue",e.id),u.ɵɵadvance(1),u.ɵɵtextInterpolate(e.name)}}function T(e,t){1&e&&(u.ɵɵelementStart(0,"div",19),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"app-organization-plans"),u.ɵɵtext(3,"\n "),u.ɵɵelementEnd())}function M(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",10),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"button",20),u.ɵɵtext(3,"\n "),u.ɵɵelement(4,"i",21),u.ɵɵpipe(5,"i18n"),u.ɵɵtext(6,"\n "),u.ɵɵelementStart(7,"span"),u.ɵɵtext(8),u.ɵɵpipe(9,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(10,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(11,"\n "),u.ɵɵelementEnd()),2&e){u.ɵɵnextContext();const e=u.ɵɵreference(1);u.ɵɵadvance(2),u.ɵɵproperty("disabled",e.loading),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(5,3,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(9,5,"acceptOffer"))}}function D(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"form",8,9),u.ɵɵlistener("ngSubmit",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().submit()})),u.ɵɵtext(2,"\n "),u.ɵɵelementStart(3,"p"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span"),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",10),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"label",11),u.ɵɵtext(13),u.ɵɵpipe(14,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n "),u.ɵɵelementStart(16,"select",12),u.ɵɵlistener("ngModelChange",(function(t){u.ɵɵrestoreView(e);return u.ɵɵnextContext().selectedFamilyOrganizationId=t})),u.ɵɵtext(17,"\n "),u.ɵɵelementStart(18,"option",13),u.ɵɵtext(19),u.ɵɵpipe(20,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(21,"\n "),u.ɵɵelementStart(22,"option",14),u.ɵɵtext(23),u.ɵɵpipe(24,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(25,"\n "),u.ɵɵtemplate(26,O,2,2,"option",15),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(29,"\n "),u.ɵɵtemplate(30,T,4,0,"div",16),u.ɵɵtext(31,"\n "),u.ɵɵtemplate(32,M,12,7,"div",17),u.ɵɵtext(33,"\n "),u.ɵɵelementEnd()}if(2&e){const e=u.ɵɵnextContext();u.ɵɵproperty("appApiAction",e.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,9,"acceptBitwardenFamiliesHelp")),u.ɵɵadvance(7),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(14,11,"sponsoredFamiliesSelectOffer")),u.ɵɵadvance(3),u.ɵɵproperty("ngModel",e.selectedFamilyOrganizationId),u.ɵɵadvance(3),u.ɵɵtextInterpolate1("-- ",u.ɵɵpipeBind1(20,13,"select")," --"),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(24,15,"newFamiliesOrganization")),u.ɵɵadvance(3),u.ɵɵproperty("ngForOf",e.existingFamilyOrganizations),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",e.showNewOrganization),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!e.showNewOrganization)}}function B(e,t){}class R{constructor(e,t,n,i,r,o,a,s,l){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.route=i,this.apiService=r,this.syncService=o,this.validationService=a,this.organizationService=s,this.modalService=l,this.loading=!0,this.badToken=!1,this.showNewOrganization=!1,this._selectedFamilyOrganizationId=""}set organizationPlansComponent(e){e&&(e.plan=s.PlanType.FamiliesAnnually,e.product=l.ProductType.Families,e.acceptingSponsorship=!0,e.onSuccess.subscribe(this.onOrganizationCreateSuccess.bind(this)))}ngOnInit(){return i(this,void 0,void 0,(function*(){document.body.classList.remove("layout_frontend"),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(null==e.token)return this.platformUtilsService.showToast("error",null,this.i18nService.t("sponsoredFamiliesAcceptFailed"),{timeout:1e4}),void this.router.navigate(["/"]);this.token=e.token,yield this.syncService.fullSync(!0),this.badToken=!(yield this.apiService.postPreValidateSponsorshipToken(this.token)),this.loading=!1,this.existingFamilyOrganizations=(yield this.organizationService.getAll()).filter((e=>e.planProductType===l.ProductType.Families)),0===this.existingFamilyOrganizations.length&&(this.selectedFamilyOrganizationId="createNew")}))))}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.doSubmit(this._selectedFamilyOrganizationId),yield this.formPromise,this.formPromise=null}))}get selectedFamilyOrganizationId(){return this._selectedFamilyOrganizationId}set selectedFamilyOrganizationId(e){this._selectedFamilyOrganizationId=e,this.showNewOrganization="createNew"===e}doSubmit(e){return i(this,void 0,void 0,(function*(){try{const t=new c.OrganizationSponsorshipRedeemRequest;t.planSponsorshipType=a.PlanSponsorshipType.FamiliesForEnterprise,t.sponsoredOrganizationId=e,yield this.apiService.postRedeemSponsorship(this.token,t),this.platformUtilsService.showToast("success",null,this.i18nService.t("sponsoredFamiliesOfferRedeemed")),yield this.syncService.fullSync(!0),this.router.navigate(["/"])}catch(t){this.showNewOrganization&&(yield this.modalService.openViewRef(d.DeleteOrganizationComponent,this.deleteModalRef,(t=>{t.organizationId=e,t.descriptionKey="orgCreatedSponsorshipInvalid",t.onSuccess.subscribe((()=>{this.router.navigate(["/"])}))}))),this.validationService.showError(this.i18nService.t("sponsorshipTokenHasExpired"))}}))}onOrganizationCreateSuccess(e){return i(this,void 0,void 0,(function*(){yield this.doSubmit(e.organizationId)}))}}t.FamiliesForEnterpriseSetupComponent=R,R.ɵfac=function(e){return new(e||R)(u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(h.PlatformUtilsService),u.ɵɵdirectiveInject(v.I18nService),u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(f.ApiService),u.ɵɵdirectiveInject(g.SyncService),u.ɵɵdirectiveInject(y.ValidationService),u.ɵɵdirectiveInject(x.OrganizationService),u.ɵɵdirectiveInject(S.ModalService))},R.ɵcmp=u.ɵɵdefineComponent({type:R,selectors:[["families-for-enterprise-setup"]],viewQuery:function(e,t){if(1&e&&(u.ɵɵviewQuery(p.OrganizationPlansComponent,5),u.ɵɵviewQuery(P,7,r.ViewContainerRef)),2&e){let e;u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.organizationPlansComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.deleteModalRef=e.first)}},decls:19,vars:6,consts:[[1,"container","page-content"],[1,"page-header"],["class","mt-5 d-flex justify-content-center",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["deleteOrganizationTemplate",""],[1,"mt-5","d-flex","justify-content-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group","col-6"],["for","availableSponsorshipOrg"],["id","availableSponsorshipOrg","name","Available Sponsorship Organization","required","",1,"form-control",3,"ngModel","ngModelChange"],["value","","disabled",""],["value","createNew"],[3,"ngValue",4,"ngFor","ngForOf"],["class","col-12",4,"ngIf"],["class","form-group col-6",4,"ngIf"],[3,"ngValue"],[1,"col-12"],["type","submit",1,"btn","btn-primary","mt-2","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"h1"),u.ɵɵtext(5),u.ɵɵpipe(6,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵtemplate(9,k,9,6,"div",2),u.ɵɵtext(10,"\n "),u.ɵɵtemplate(11,A,6,3,"div",2),u.ɵɵtext(12,"\n "),u.ɵɵtemplate(13,D,34,17,"form",3),u.ɵɵtext(14,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(15,"\n"),u.ɵɵtemplate(16,B,0,0,"ng-template",null,4,u.ɵɵtemplateRefExtractor),u.ɵɵtext(18,"\n")),2&e&&(u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(6,4,"sponsoredFamiliesOffer")),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&t.badToken),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&!t.badToken))},directives:[b.NgIf,w.NgControlStatusGroup,w.NgForm,I.ApiActionDirective,w.SelectControlValueAccessor,w.RequiredValidator,w.NgControlStatus,w.NgModel,w.NgSelectOption,w.ɵNgSelectMultipleOption,b.NgForOf,C.OrganizationPlansComponent],pipes:[E.I18nPipe],encapsulation:2})},28922:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;n(96832),n(68012),n(82058),n(98573),n(38364),n(40349),n(70143),n(99954),n(10685),n(61554);const r=n(1259),o=n(32621),a=n(82058),s=n(40349),l=n(99954),c=n(38364),d=n(98573),p=n(68012),u=n(10685),m=n(70143),h=n(61554),v=n(96832),f=n(637),g=n(57490),y=n(38287),x=n(52900),S=n(72596);function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",13),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"vaultExportDisabled")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"personalVaultExportPolicyInEffect"),"\n "))}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",14),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("value",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(o.ɵɵelement(0,"i",15),o.ɵɵpipe(1,"i18n")),2&e&&o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,1,"loading"))}function C(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"exportVault")))}class E extends r.ExportComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,a,s,l,c),this.route=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield e.ngOnInit.call(this),this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organizationId=e.organizationId}))))}))}checkExportDisabled(){return i(this,void 0,void 0,(function*(){}))}getExportData(){return this.exportService.getOrganizationExport(this.organizationId,this.format)}getFileName(){return super.getFileName("org")}collectEvent(){return i(this,void 0,void 0,(function*(){}))}}t.ExportComponent=E,E.ɵfac=function(e){return new(e||E)(o.ɵɵdirectiveInject(a.CryptoService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.ExportService),o.ɵɵdirectiveInject(d.EventService),o.ɵɵdirectiveInject(p.ActivatedRoute),o.ɵɵdirectiveInject(u.PolicyService),o.ɵɵdirectiveInject(m.LogService),o.ɵɵdirectiveInject(h.UserVerificationService),o.ɵɵdirectiveInject(v.FormBuilder))},E.ɵcmp=o.ɵɵdefineComponent({type:E,selectors:[["app-org-export"]],features:[o.ɵɵInheritDefinitionFeature],decls:44,vars:13,consts:[["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit"],["form",""],[1,"page-header"],["type","error",3,"title",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format","formControlName","format",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["ngDefaultControl","","formControlName","secret","name","secret"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],[4,"ngIf"],["type","error",3,"title"],[3,"value"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"h1"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n\n "),o.ɵɵtemplate(10,b,4,6,"app-callout",3),o.ɵɵtext(11,"\n\n "),o.ɵɵelementStart(12,"div",4),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"label",6),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"select",7),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,w,2,2,"option",8),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"div",4),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",5),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"app-verify-master-password",9),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"button",10),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,I,2,3,"i",11),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,C,3,3,"span",12),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise)("formGroup",t.exportForm),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,9,"exportVault")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.disabledByPolicy),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,11,"fileFormat")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.formatOptions),o.ɵɵadvance(14),o.ɵɵproperty("disabled",e.loading||t.exportForm.disabled),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.loading)}},directives:[v.NgControlStatusGroup,f.ApiActionDirective,v.FormGroupDirective,g.NgIf,v.SelectControlValueAccessor,v.NgControlStatus,v.FormControlName,g.NgForOf,y.VerifyMasterPasswordComponent,v.DefaultValueAccessor,x.CalloutComponent,v.NgSelectOption,v.ɵNgSelectMultipleOption],pipes:[S.I18nPipe],encapsulation:2})},14285:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExposedPasswordsReportComponent=void 0;n(68012),n(22501),n(68062),n(36424),n(94308),n(14293),n(77243),n(29546);const r=n(30839),o=n(32621),a=n(68062),s=n(22501),l=n(29546),c=n(36424),d=n(77243),p=n(94308),u=n(68012),m=n(14293),h=n(57490),v=n(52900),f=n(52665),g=n(80507),y=n(92521),x=n(72596);function S(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",19),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",21),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",22),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",21),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,b,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,w,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,I,9,6,"ng-container",7),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,C,9,6,"ng-container",7),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span",18),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵpipe(29,"number"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(28,7,"exposedXTimes",o.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(e.id))),"\n ")}}function P(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,E,32,12,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,4,"exposedPasswordsFound")),o.ɵɵproperty("useAlertRole",!0),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,6,"exposedPasswordsFoundDesc",o.ɵɵpipeBind1(6,9,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",5),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,S,4,6,"app-callout",6),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,P,16,11,"ng-container",7),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class O extends r.ExposedPasswordsReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,r,s),this.organizationService=o,this.route=a}ngOnInit(){const e=Object.getPrototypeOf(this.constructor.prototype);this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),e.ngOnInit()}))))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.ExposedPasswordsReportComponent=O,O.ɵfac=function(e){return new(e||O)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.AuditService),o.ɵɵdirectiveInject(l.ModalService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.StateService),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.ActivatedRoute),o.ɵɵdirectiveInject(m.PasswordRepromptService))},O.ɵcmp=o.ɵɵdefineComponent({type:O,selectors:[["app-exposed-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title","useAlertRole"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementStart(11,"button",1),o.ɵɵlistener("click",(function(){return t.load()})),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"i",2),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span"),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n"),o.ɵɵtemplate(21,k,6,2,"div",3),o.ɵɵtext(22,"\n"),o.ɵɵtemplate(23,A,0,0,"ng-template",null,4,o.ɵɵtemplateRefExtractor),o.ɵɵtext(25,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(14,10,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,12,"checkExposedPasswords")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},45292:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportComponent=void 0;n(68012),n(40349),n(58004),n(70143),n(94308),n(99954),n(10685);const r=n(95310),o=n(32621),a=n(40349),s=n(58004),l=n(68012),c=n(99954),d=n(10685),p=n(94308),u=n(70143),m=n(57490),h=n(96832),v=n(52900),f=n(72596);function g(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",18),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffectImports"),"\n"))}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",19),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",19),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"option",20),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,x,2,2,"option",9),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.importOptions)}}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",22),o.ɵɵtext(3,"\n https://bitwarden.com/help/export-your-data/"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementContainerEnd())}function w(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",23),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-lastpass/"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementContainerEnd())}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and\n save the CSV file.\n '),o.ɵɵelementContainerEnd())}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the\n CSV file.\n '),o.ɵɵelementContainerEnd())}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export\n Data", then click "Export CSV" for your "Accounts".\n '),o.ɵɵelementContainerEnd())}function P(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML"\n and save the XML file.\n '),o.ɵɵelementContainerEnd())}function k(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and\n navigate to "Settings" → "Export" button and save the file "As CSV".\n '),o.ɵɵelementContainerEnd())}function A(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the\n "KeePass XML (2.x)" option.\n '),o.ɵɵelementContainerEnd())}function O(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" →\n "Export" and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function T(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and\n navigate to "Settings". Click the "Export accounts" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function M(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and\n click "Show me my data" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function D(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .csv File" option. Click\n "Export" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function B(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .json File" option. Click\n "Export" to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function R(e,t){1&e&&(o.ɵɵelementStart(0,"span"),o.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),o.ɵɵelementEnd())}function U(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,R,2,0,"span",10),o.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(4,"a",24),o.ɵɵtext(5,"\n https://bitwarden.com/help/import-from-chrome/"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf","chromecsv"!==e.format)}}function V(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",25),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-firefox/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function F(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",26),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-safari/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function N(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-1password/"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function _(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To\n XML". In the dialog that pops up select "All Rows" and check all fields. Click the "Export"\n button and save the XML file.\n '),o.ɵɵelementContainerEnd())}function j(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV".\n Select "OK" to the warning alert and save the CSV file. Note that the importer only supports\n files exported while Enpass is set to the English language, so adjust your settings\n accordingly.\n '),o.ɵɵelementContainerEnd())}function z(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" →\n "Export". Select the ".json" file format option and save the JSON file.\n '),o.ɵɵelementContainerEnd())}function L(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML\n format..." and save the XML file.\n '),o.ɵɵelementContainerEnd())}function K(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Dashlane desktop application, navigate to "File" → "Export" → "Unsecured\n archive (readable) in JSON format" and save the JSON file.\n '),o.ɵɵelementContainerEnd())}function q(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..."\n and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function G(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export"\n → "Export all". Select the unencrypted format XML option and save the XML file.\n '),o.ɵɵelementContainerEnd())}function W(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to\n "App Settings". Click the "Export" button, enter your password and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function H(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the\n top right to expand the navigation bar. Navigate to "Data" → "Export". Click the\n "download HTML+JSON" button to save the HTML file.\n '),o.ɵɵelementContainerEnd())}function $(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) →\n "Options" → "Account & Data" and click the "Export" button. Select all of your data,\n change the "Format" to "CSV file" and then click the "Export" button to save the CSV file.\n Note: RoboForm only allows you to export Logins. Other items will not be exported.\n '),o.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the\n passwords you would like to export and click the "Export" button at the top of the listing.\n Choose the "csv (lastpass)" export format and click the "Export" button.\n '),o.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the\n dialog that pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save\n the CSV file.\n '),o.ɵɵelementContainerEnd())}function J(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" →\n "Password Boss JSON - not encrypted" and save the JSON file.\n '),o.ɵɵelementContainerEnd())}function X(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets".\n Select "All Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data\n from the textarea. Open a text editor like Notepad and paste the data. Save the data from the\n text editor as\n '),o.ɵɵelementStart(2,"code"),o.ɵɵtext(3,"zoho_export.csv"),o.ɵɵelementEnd(),o.ɵɵtext(4,".\n "),o.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top\n right corner. Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore"\n section and click "Backup to CSV" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function te(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),o.ɵɵelementStart(2,"a",28),o.ɵɵtext(3,"GNOME Keyring Import/Export"),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n python script to your desktop as "),o.ɵɵelementStart(5,"code"),o.ɵɵtext(6,"pw_helper.py"),o.ɵɵelementEnd(),o.ɵɵtext(7,". Open terminal and run\n "),o.ɵɵelementStart(8,"code"),o.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),o.ɵɵelementEnd(),o.ɵɵtext(10," and then\n "),o.ɵɵelementStart(11,"code"),o.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),o.ɵɵelementEnd(),o.ɵɵtext(13,". Then upload the\n resulting "),o.ɵɵelementStart(14,"code"),o.ɵɵtext(15,"my_passwords.json"),o.ɵɵelementEnd(),o.ɵɵtext(16," file here to Bitwarden.\n "),o.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the\n "Fields to export" button and check all of the fields, change the "Output format" to "CSV",\n and then click the "Start" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the\n "Download" button to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function re(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings"\n window switch to the "Export credentials" tab and choose "JSON" as the export type. Enter your\n vault\'s passphrase and click the "Export" button to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),o.ɵɵelementContainerEnd())}function se(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export\n Passwords". Select the "Export" button, enter your master password, and save the FSK file.\n '),o.ɵɵelementContainerEnd())}function le(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" →\n "Import/Export". Locate the "Export to text file" section and select the "Export" button to\n save the TXT file.\n '),o.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" →\n "Export". Enter your master password and select the "Export Anyway" button to save the CSV\n file.\n '),o.ɵɵelementContainerEnd())}function de(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT\n file.\n '),o.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts"\n and then scan the QR code with your mobile device. Various CSV files will then be saved to\n your computer\'s downloads folder.\n '),o.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),o.ɵɵelementContainerEnd())}function me(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function he(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" →\n "Import/Export". Select "Export Passwords" and follow the instructions on screen to save the\n unencrypted CSV file.\n '),o.ɵɵelementContainerEnd())}function ve(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon\n and select "Export" to save the CSV file.\n '),o.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then\n click "Yes" on the dialog and save the CSV file.\n '),o.ɵɵelementContainerEnd())}function ge(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to\n sync. Once syncing of your data is complete, the download icon in the top right corner will\n turn pink. Click the download icon and save the CSV file.\n "),o.ɵɵelementContainerEnd())}function ye(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the\n CSV file.\n '),o.ɵɵelementContainerEnd())}function xe(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",21),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,5,0,"ng-container",10),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,w,5,0,"ng-container",10),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,I,2,0,"ng-container",10),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,C,2,0,"ng-container",10),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,E,2,0,"ng-container",10),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,2,0,"ng-container",10),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,k,2,0,"ng-container",10),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,A,2,0,"ng-container",10),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,O,2,0,"ng-container",10),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,T,2,0,"ng-container",10),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,M,2,0,"ng-container",10),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,D,2,0,"ng-container",10),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,B,2,0,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,U,7,1,"ng-container",10),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,V,5,0,"ng-container",10),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,F,5,0,"ng-container",10),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,N,5,0,"ng-container",10),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,_,2,0,"ng-container",10),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,j,2,0,"ng-container",10),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,z,2,0,"ng-container",10),o.ɵɵtext(41,"\n "),o.ɵɵtemplate(42,L,2,0,"ng-container",10),o.ɵɵtext(43,"\n "),o.ɵɵtemplate(44,K,2,0,"ng-container",10),o.ɵɵtext(45,"\n "),o.ɵɵtemplate(46,q,2,0,"ng-container",10),o.ɵɵtext(47,"\n "),o.ɵɵtemplate(48,G,2,0,"ng-container",10),o.ɵɵtext(49,"\n "),o.ɵɵtemplate(50,W,2,0,"ng-container",10),o.ɵɵtext(51,"\n "),o.ɵɵtemplate(52,H,2,0,"ng-container",10),o.ɵɵtext(53,"\n "),o.ɵɵtemplate(54,$,2,0,"ng-container",10),o.ɵɵtext(55,"\n "),o.ɵɵtemplate(56,Q,2,0,"ng-container",10),o.ɵɵtext(57,"\n "),o.ɵɵtemplate(58,Y,2,0,"ng-container",10),o.ɵɵtext(59,"\n "),o.ɵɵtemplate(60,J,2,0,"ng-container",10),o.ɵɵtext(61,"\n "),o.ɵɵtemplate(62,X,5,0,"ng-container",10),o.ɵɵtext(63,"\n "),o.ɵɵtemplate(64,Z,2,0,"ng-container",10),o.ɵɵtext(65,"\n "),o.ɵɵtemplate(66,ee,2,0,"ng-container",10),o.ɵɵtext(67,"\n "),o.ɵɵtemplate(68,te,17,0,"ng-container",10),o.ɵɵtext(69,"\n "),o.ɵɵtemplate(70,ne,2,0,"ng-container",10),o.ɵɵtext(71,"\n "),o.ɵɵtemplate(72,ie,2,0,"ng-container",10),o.ɵɵtext(73,"\n "),o.ɵɵtemplate(74,re,2,0,"ng-container",10),o.ɵɵtext(75,"\n "),o.ɵɵtemplate(76,oe,2,0,"ng-container",10),o.ɵɵtext(77,"\n "),o.ɵɵtemplate(78,ae,2,0,"ng-container",10),o.ɵɵtext(79,"\n "),o.ɵɵtemplate(80,se,2,0,"ng-container",10),o.ɵɵtext(81,"\n "),o.ɵɵtemplate(82,le,2,0,"ng-container",10),o.ɵɵtext(83,"\n "),o.ɵɵtemplate(84,ce,2,0,"ng-container",10),o.ɵɵtext(85,"\n "),o.ɵɵtemplate(86,de,2,0,"ng-container",10),o.ɵɵtext(87,"\n "),o.ɵɵtemplate(88,pe,2,0,"ng-container",10),o.ɵɵtext(89,"\n "),o.ɵɵtemplate(90,ue,2,0,"ng-container",10),o.ɵɵtext(91,"\n "),o.ɵɵtemplate(92,me,2,0,"ng-container",10),o.ɵɵtext(93,"\n "),o.ɵɵtemplate(94,he,2,0,"ng-container",10),o.ɵɵtext(95,"\n "),o.ɵɵtemplate(96,ve,2,0,"ng-container",10),o.ɵɵtext(97,"\n "),o.ɵɵtemplate(98,fe,2,0,"ng-container",10),o.ɵɵtext(99,"\n "),o.ɵɵtemplate(100,ge,2,0,"ng-container",10),o.ɵɵtext(101,"\n "),o.ɵɵtemplate(102,ye,2,0,"ng-container",10),o.ɵɵtext(103,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵpropertyInterpolate("title",e.getFormatInstructionTitle()),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","bitwardencsv"===e.format||"bitwardenjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","lastpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepassxcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","aviracsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","blurcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","safeincloudxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","padlockcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepass2xml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","upmcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","saferpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","meldiumcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keepercsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","keeperjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","chromecsv"===e.format||"operacsv"===e.format||"vivaldicsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","firefoxcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","safaricsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","1password1pif"===e.format||"1passwordwincsv"===e.format||"1passwordmaccsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passworddragonxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","enpasscsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","enpassjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","pwsafexml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","dashlanejson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","msecurecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","stickypasswordxml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","truekeycsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","clipperzhtml"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","roboformcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passboltcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","ascendocsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordbossjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","zohovaultcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","splashidcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passkeepcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","gnomejson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordagentcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passpackcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passmanjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","avastcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","avastjson"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","fsecurefsk"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","kasperskytxt"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","remembearcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","passwordwallettxt"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","mykicsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","securesafecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","logmeoncecsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","blackberrycsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","buttercupcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","codebookcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","encryptrcsv"===e.format),o.ɵɵadvance(2),o.ɵɵproperty("ngIf","yoticsv"===e.format)}}const Se=function(e){return{manual:e}};class be extends r.ImportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,r,o,s),this.route=i,this.organizationService=a}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organizationId=t.organizationId,this.successNavigate=["organizations",this.organizationId,"vault"],yield e.ngOnInit.call(this),this.importBlockedByPolicy=!1}))));const t=yield this.organizationService.get(this.organizationId);this.organizationName=t.name}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("importWarning",this.organizationName),this.i18nService.t("warning"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))&&e.submit.call(this)}))}}t.ImportComponent=be,be.ɵfac=function(e){return new(e||be)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.ImportService),o.ɵɵdirectiveInject(l.Router),o.ɵɵdirectiveInject(l.ActivatedRoute),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.PolicyService),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.LogService))},be.ɵcmp=o.ɵɵdefineComponent({type:be,selectors:[["app-org-import"]],features:[o.ɵɵInheritDefinitionFeature],decls:69,vars:31,consts:[[1,"page-header"],["type","info",4,"ngIf"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file",3,"disabled"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/export-your-data/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-firefox/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-safari/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵtemplate(7,g,3,3,"app-callout",1),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",4),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"div",5),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",6),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",7),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"select",8),o.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,y,2,2,"option",9),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,S,6,1,"ng-container",10),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,xe,104,52,"app-callout",11),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"div",4),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",5),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",6),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"label",12),o.ɵɵtext(41),o.ɵɵpipe(42,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"input",13),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",6),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"label",14),o.ɵɵtext(52),o.ɵɵpipe(53,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"textarea",15),o.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"button",16),o.ɵɵtext(59,"\n "),o.ɵɵelement(60,"i",17),o.ɵɵpipe(61,"i18n"),o.ɵɵtext(62,"\n "),o.ɵɵelementStart(63,"span"),o.ɵɵtext(64),o.ɵɵpipe(65,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,17,"importData")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.importBlockedByPolicy),o.ɵɵadvance(12),o.ɵɵtextInterpolate1("1. ",o.ɵɵpipeBind1(20,19,"selectFormat"),""),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.format)("disabled",t.importBlockedByPolicy),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",t.featuredImportOptions),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",t.format),o.ɵɵadvance(9),o.ɵɵtextInterpolate1("2. ",o.ɵɵpipeBind1(42,21,"selectImportFile"),""),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.importBlockedByPolicy),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(53,23,"orCopyPasteFileContents")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.fileContents)("disabled",t.importBlockedByPolicy),o.ɵɵadvance(3),o.ɵɵproperty("disabled",t.loading||t.importBlockedByPolicy)("ngClass",o.ɵɵpureFunction1(29,Se,t.importBlockedByPolicy)),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(61,25,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(65,27,"importData")))},directives:[m.NgIf,h.NgControlStatusGroup,h.NgForm,h.SelectControlValueAccessor,h.RequiredValidator,h.NgControlStatus,h.NgModel,m.NgForOf,h.DefaultValueAccessor,m.NgClass,v.CalloutComponent,h.NgSelectOption,h.ɵNgSelectMultipleOption],pipes:[f.I18nPipe],encapsulation:2})},43554:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InactiveTwoFactorReportComponent=void 0;n(68012),n(68062),n(70143),n(36424),n(94308),n(14293),n(77243),n(29546);const r=n(60537),o=n(32621),a=n(68062),s=n(29546),l=n(36424),c=n(77243),d=n(68012),p=n(70143),u=n(14293),m=n(94308),h=n(57490),v=n(52900),f=n(52665),g=n(80507),y=n(92521),x=n(72596);function S(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",18),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",19),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"a",20),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(3);o.ɵɵpropertyInterpolate("href",t.cipherDocs.get(e.id),o.ɵɵsanitizeUrl),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,2,"instructions"),"")}}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",15),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,I,9,6,"ng-container",1),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,C,9,6,"ng-container",1),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"br"),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"td",16),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,3,4,"a",17),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(10,7,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",n.cipherDocs.has(e.id))}}function k(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,28,9,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"inactive2faFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,k,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function O(e,t){}class T extends r.InactiveTwoFactorReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,o,a),this.route=r,this.organizationService=s}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}}t.InactiveTwoFactorReportComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.LogService),o.ɵɵdirectiveInject(u.PasswordRepromptService),o.ɵɵdirectiveInject(m.OrganizationService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-inactive-two-factor-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,S,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,b,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,A,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,O,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},23508:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReusedPasswordsReportComponent=void 0;n(68012),n(68062),n(36424),n(94308),n(14293),n(77243),n(29546);const r=n(11423),o=n(32621),a=n(68062),s=n(29546),l=n(36424),c=n(77243),d=n(68012),p=n(94308),u=n(14293),m=n(57490),h=n(52900),v=n(52665),f=n(80507),g=n(92521),y=n(72596);function x(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",19),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function C(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",21),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,w,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,I,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,C,9,6,"ng-container",1),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,E,9,6,"ng-container",1),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span",18),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(e.login.password)),"\n ")}}function k(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,P,31,10,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,k,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function O(e,t){}class T extends r.ReusedPasswordsReportComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,a),this.route=r,this.organizationService=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.ReusedPasswordsReportComponent=T,T.ɵfac=function(e){return new(e||T)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.PasswordRepromptService))},T.ɵcmp=o.ɵɵdefineComponent({type:T,selectors:[["app-reused-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,x,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,S,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,A,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,O,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},96982:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ToolsComponent=void 0;n(68012),n(36424),n(94308);const r=n(32621),o=n(68012),a=n(94308),s=n(36424),l=n(57490),c=n(80507),d=n(72596);function p(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function u(e,t){1&e&&(r.ɵɵelementStart(0,"div",9),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",10),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",11),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",12),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"a",13),r.ɵɵtext(13),r.ɵɵpipe(14,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"tools")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"importData"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(14,7,"exportVault"),"\n "))}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",23),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).upgradeOrganization()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",15),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementStart(5,"div",16),r.ɵɵtext(6,"\n "),r.ɵɵtemplate(7,m,3,3,"a",17),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",11),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"a",18),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"a",19),r.ɵɵtext(18),r.ɵɵpipe(19,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"a",20),r.ɵɵtext(22),r.ɵɵpipe(23,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"a",21),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"a",22),r.ɵɵtext(30),r.ɵɵpipe(31,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,7,"reports"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.accessReports),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(15,9,"exposedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(19,11,"reusedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(23,13,"weakPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(27,15,"unsecuredWebsitesReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(31,17,"inactive2faReport"),"\n ")}}function v(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",4),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",5),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,u,17,9,"div",6),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,h,34,19,"div",7),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"div",8),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"router-outlet"),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.organization.canAccessImportExport),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.organization.canAccessReports)}}class f{constructor(e,t,n){this.route=e,this.organizationService=t,this.messagingService=n,this.accessReports=!1,this.loading=!0}ngOnInit(){this.route.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.accessReports=this.organization.useTotp,this.loading=!1}))))}upgradeOrganization(){this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id})}}t.ToolsComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.ActivatedRoute),r.ɵɵdirectiveInject(a.OrganizationService),r.ɵɵdirectiveInject(s.MessagingService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-org-tools"]],decls:7,vars:2,consts:[[1,"container","page-content"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"row"],[1,"col-3"],["class","card mb-4",4,"ngIf"],["class","card",4,"ngIf"],[1,"col-9"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"card"],[1,"card-header","d-flex"],[1,"ml-auto"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],["routerLink","exposed-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","reused-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","weak-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","unsecured-websites-report","routerLinkActive","active",1,"list-group-item"],["routerLink","inactive-two-factor-report","routerLinkActive","active",1,"list-group-item"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,p,9,6,"ng-container",1),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,v,17,2,"ng-container",1),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n")),2&e&&(r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.loading))},directives:[l.NgIf,o.RouterOutlet,o.RouterLinkWithHref,o.RouterLinkActive,c.StopClickDirective],pipes:[d.I18nPipe],encapsulation:2})},97140:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnsecuredWebsitesReportComponent=void 0;n(68012),n(68062),n(36424),n(94308),n(14293),n(77243),n(29546);const r=n(25589),o=n(32621),a=n(68062),s=n(29546),l=n(36424),c=n(77243),d=n(68012),p=n(94308),u=n(14293),m=n(57490),h=n(52900),v=n(52665),f=n(80507),g=n(92521),y=n(72596);function x(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function w(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",16),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",17),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",15),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,w,9,6,"ng-container",1),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,I,9,6,"ng-container",1),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"br"),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(10,6,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!n.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle)}}function E(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,C,23,8,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,E,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function k(e,t){}class A extends r.UnsecuredWebsitesReportComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,a),this.route=r,this.organizationService=o}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}}t.UnsecuredWebsitesReportComponent=A,A.ɵfac=function(e){return new(e||A)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.ModalService),o.ɵɵdirectiveInject(l.MessagingService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.OrganizationService),o.ɵɵdirectiveInject(u.PasswordRepromptService))},A.ɵcmp=o.ɵɵdefineComponent({type:A,selectors:[["app-unsecured-websites-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,x,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,S,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,P,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,k,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},35844:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WeakPasswordsReportComponent=void 0;n(68012),n(68062),n(36424),n(94308),n(86193),n(14293),n(77243),n(29546);const r=n(9023),o=n(32621),a=n(68062),s=n(86193),l=n(29546),c=n(36424),d=n(77243),p=n(68012),u=n(94308),m=n(14293),h=n(57490),v=n(52900),f=n(52665),g=n(80507),y=n(92521),x=n(72596);function S(e,t){1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",4),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2),o.ɵɵpipe(3,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"goodNews")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",18),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(3).selectCipher(t)})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"editItem")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function C(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementStart(1,"span"),o.ɵɵtext(2),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n ")),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.name)}}function E(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",19),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"shared")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"shared")))}function P(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",5),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"attachments")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"attachments")))}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",12),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-vault-icon",13),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td",14),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,I,6,4,"ng-container",15),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,C,4,1,"ng-template",null,16,o.ɵɵtemplateRefExtractor),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,E,9,6,"ng-container",1),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,P,9,6,"ng-container",1),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"br"),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"small"),o.ɵɵtext(21),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"td",17),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"span"),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit,n=o.ɵɵreference(12),i=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("cipher",e),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!i.organization&&e.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasAttachments),o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.subTitle),o.ɵɵadvance(5),o.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(e.id)[1],""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(e.id)[0]),"\n ")}}function A(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"app-callout",9),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4),o.ɵɵpipe(5,"i18n"),o.ɵɵpipe(6,"number"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"table",10),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"tbody"),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,k,31,12,"tr",11),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"weakPasswordsFound")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",o.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),o.ɵɵadvance(8),o.ɵɵproperty("ngForOf",e.ciphers)}}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,4,6,"app-callout",7),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,A,16,10,"ng-container",1),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.ciphers.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.ciphers.length)}}function T(e,t){}class M extends r.WeakPasswordsReportComponent{constructor(e,t,n,i,r,o,a,s){super(e,t,n,i,r,s),this.route=o,this.organizationService=a}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((t=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(t.organizationId),this.manageableCiphers=yield this.cipherService.getAll(),yield e.ngOnInit.call(this)}))))}))}getAllCiphers(){return this.cipherService.getAllFromApiForOrganization(this.organization.id)}canManageCipher(e){return this.manageableCiphers.some((t=>t.id===e.id))}}t.WeakPasswordsReportComponent=M,M.ɵfac=function(e){return new(e||M)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PasswordGenerationService),o.ɵɵdirectiveInject(l.ModalService),o.ɵɵdirectiveInject(c.MessagingService),o.ɵɵdirectiveInject(d.StateService),o.ɵɵdirectiveInject(p.ActivatedRoute),o.ɵɵdirectiveInject(u.OrganizationService),o.ɵɵdirectiveInject(m.PasswordRepromptService))},M.ɵcmp=o.ɵɵdefineComponent({type:M,selectors:[["app-weak-passwords-report"]],features:[o.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵtemplate(5,S,9,6,"small",1),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementStart(9,"p"),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n"),o.ɵɵtemplate(13,b,9,6,"div",1),o.ɵɵtext(14,"\n"),o.ɵɵtemplate(15,O,6,2,"div",2),o.ɵɵtext(16,"\n"),o.ɵɵtemplate(17,T,0,0,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(19,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},72778:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(91092),n(22501),n(68062),n(69050),n(98573),n(4349),n(40349),n(70143),n(36424),n(94308),n(86193),n(14293),n(99954),n(10685),n(77243),n(63529);const r=n(13886),o=n(78758),a=n(53552),s=n(52675),l=n(58746),c=n(32621),d=n(68062),p=n(4349),u=n(40349),m=n(99954),h=n(22501),v=n(77243),f=n(69050),g=n(63529),y=n(86193),x=n(91092),S=n(36424),b=n(98573),w=n(10685),I=n(70143),C=n(14293),E=n(94308),P=n(96832),k=n(637),A=n(50553),O=n(57490),T=n(90958),M=n(52900),D=n(17302),B=n(966),R=n(80507),U=n(72596);function V(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",26),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function F(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function N(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",16),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",17),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",27),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"select",28),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.type=t})),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,F,2,2,"option",29),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,4,"whatTypeOfItem")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.typeOptions)}}function _(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.id),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"label",31),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"select",32),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.folderId=t})),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,_,2,2,"option",29),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,4,"folder")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.folders)}}function z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",41),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelement(5,"i",44),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(3,1,"copyUsername")))}function L(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",57),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).generatePassword()})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",58),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}2&e&&c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,1,"generatePassword"))}function K(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",51),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,L,5,3,"a",52),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"a",53,54),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).checkPassword()})),c.ɵɵpipe(6,"i18n"),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"i",55),c.ɵɵtext(9,"\n "),c.ɵɵelement(10,"i",56),c.ɵɵpipe(11,"i18n"),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(5),t=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.cipher.viewPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,6,"checkPassword")),c.ɵɵproperty("appApiAction",t.checkPasswordPromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(11,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function q(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",61),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).premiumRequired()})),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"premium"),"\n "))}function G(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",61),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).upgradeOrganization()})),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function W(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"img",59),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,q,3,3,"a",60),c.ɵɵtext(6,"\n "),c.ɵɵtemplate(7,G,3,3,"a",60),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"verificationCodeTotp")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId&&!e.canAccessPremium),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const H=function(e){return{"stroke-dashoffset.px":e}};function $(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",62),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"span",63),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"span",64),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵnamespaceSVG(),c.ɵɵelementStart(7,"svg"),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"g"),c.ɵɵtext(10,"\n "),c.ɵɵelement(11,"circle",65),c.ɵɵtext(12,"\n "),c.ɵɵelement(13,"circle",66),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵnamespaceHTML(),c.ɵɵelementStart(18,"span",67),c.ɵɵpipe(19,"i18n"),c.ɵɵtext(20),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"button",68),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),c.ɵɵpipe(23,"i18n"),c.ɵɵtext(24,"\n "),c.ɵɵelement(25,"i",69),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.totpSec),c.ɵɵadvance(6),c.ɵɵproperty("ngStyle",c.ɵɵpureFunction1(9,H,e.totpDash)),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(19,5,"verificationCodeTotp")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(e.totpCodeFormatted),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function Q(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function Y(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",80),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(4).removeUri(t)})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",81),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}2&e&&c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,1,"remove"))}function J(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",16),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",71),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",72),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",34),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",73),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.uri=t})),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"div",41),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"button",42),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).launch(t)})),c.ɵɵpipe(16,"i18n"),c.ɵɵtext(17,"\n "),c.ɵɵelement(18,"i",74),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementStart(21,"button",50),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),c.ɵɵpipe(22,"i18n"),c.ɵɵtext(23,"\n "),c.ɵɵelement(24,"i",44),c.ɵɵtext(25,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"div",75),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"div",37),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"label",72),c.ɵɵtext(35),c.ɵɵpipe(36,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"a",76),c.ɵɵpipe(39,"i18n"),c.ɵɵtext(40,"\n "),c.ɵɵelement(41,"i",77),c.ɵɵtext(42,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(43,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"div",37),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"select",78),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(4).loginUriMatchChanged(t)})),c.ɵɵtext(48,"\n "),c.ɵɵtemplate(49,Q,2,2,"option",29),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵtemplate(52,Y,5,3,"button",79),c.ɵɵtext(53,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(55,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(4),c.ɵɵpropertyInterpolate1("for","loginUri",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(6,19,"uriPosition",n+1)),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate1("id","loginUri",n,""),c.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),c.ɵɵpropertyInterpolate1("placeholder","",c.ɵɵpipeBind1(11,22,"ex")," https://google.com"),c.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(16,24,"launch")),c.ɵɵproperty("disabled",!e.canLaunch),c.ɵɵadvance(6),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(22,26,"copyUri")),c.ɵɵadvance(13),c.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(39,30,"learnMore")),c.ɵɵadvance(9),c.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),c.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),c.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",i.uriMatchOptions),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function X(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,J,56,32,"div",70),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function Z(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",82),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).addUri()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",83),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const ee=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},te=function(e){return{low:e}};function ne(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",33),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",34),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"input",35),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.username=t})),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,z,8,3,"div",36),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",17),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",37),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"label",38),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,K,14,10,"div",39),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",34),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"input",40),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.password=t})),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementStart(33,"div",41),c.ɵɵtext(34,"\n "),c.ɵɵelementStart(35,"button",42),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).togglePassword()})),c.ɵɵpipe(36,"i18n"),c.ɵɵtext(37,"\n "),c.ɵɵelement(38,"i",43),c.ɵɵtext(39,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n "),c.ɵɵelementStart(41,"button",42),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),c.ɵɵpipe(42,"i18n"),c.ɵɵtext(43,"\n "),c.ɵɵelement(44,"i",44),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(49,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(50,"\n "),c.ɵɵelementStart(51,"div",16),c.ɵɵtext(52,"\n "),c.ɵɵelementStart(53,"div",17),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"label",45),c.ɵɵtext(56),c.ɵɵpipe(57,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(58,"\n "),c.ɵɵelementStart(59,"input",46),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.login.totp=t})),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(61,"\n "),c.ɵɵelementStart(62,"div",47),c.ɵɵtext(63,"\n "),c.ɵɵtemplate(64,W,9,5,"div",21),c.ɵɵtext(65,"\n "),c.ɵɵtemplate(66,$,28,11,"div",48),c.ɵɵtext(67,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(68,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵtemplate(70,X,4,2,"ng-container",21),c.ɵɵtext(71,"\n "),c.ɵɵtemplate(72,Z,5,3,"a",49),c.ɵɵtext(73,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,23,"username")),c.ɵɵadvance(5),c.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.isDeleted),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(24,25,"password")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(36,27,"toggleVisibility")),c.ɵɵproperty("disabled",!e.cipher.viewPassword),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(33,ee,!e.showPassword,e.showPassword)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(42,29,"copyPassword")),c.ɵɵproperty("disabled",!e.cipher.viewPassword),c.ɵɵadvance(15),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction1(36,te,e.totpLow)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.cipher.login.hasUris),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function ie(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function re(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function oe(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",17),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",84),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"input",85),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.cardholderName=t})),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"div",17),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"label",86),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"select",87),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.brand=t})),c.ɵɵtext(20,"\n "),c.ɵɵtemplate(21,ie,2,2,"option",29),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"div",16),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",17),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"label",88),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"div",34),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"input",89),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.number=t})),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"div",41),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleCardNumber()})),c.ɵɵpipe(41,"i18n"),c.ɵɵtext(42,"\n "),c.ɵɵelement(43,"i",43),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementStart(46,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),c.ɵɵpipe(47,"i18n"),c.ɵɵtext(48,"\n "),c.ɵɵelement(49,"i",44),c.ɵɵtext(50,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(53,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"div",90),c.ɵɵtext(56,"\n "),c.ɵɵelementStart(57,"label",91),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementStart(61,"select",92),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.expMonth=t})),c.ɵɵtext(62,"\n "),c.ɵɵtemplate(63,re,2,2,"option",29),c.ɵɵtext(64,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementStart(67,"div",90),c.ɵɵtext(68,"\n "),c.ɵɵelementStart(69,"label",93),c.ɵɵtext(70),c.ɵɵpipe(71,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(72,"\n "),c.ɵɵelementStart(73,"input",94),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.expYear=t})),c.ɵɵpipe(74,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(75,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(76,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelementStart(78,"div",16),c.ɵɵtext(79,"\n "),c.ɵɵelementStart(80,"div",17),c.ɵɵtext(81,"\n "),c.ɵɵelementStart(82,"label",95),c.ɵɵtext(83),c.ɵɵpipe(84,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(85,"\n "),c.ɵɵelementStart(86,"div",34),c.ɵɵtext(87,"\n "),c.ɵɵelementStart(88,"input",96),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.card.code=t})),c.ɵɵelementEnd(),c.ɵɵtext(89,"\n "),c.ɵɵelementStart(90,"div",41),c.ɵɵtext(91,"\n "),c.ɵɵelementStart(92,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleCardCode()})),c.ɵɵpipe(93,"i18n"),c.ɵɵtext(94,"\n "),c.ɵɵelement(95,"i",43),c.ɵɵtext(96,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(97,"\n "),c.ɵɵelementStart(98,"button",50),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),c.ɵɵpipe(99,"i18n"),c.ɵɵtext(100,"\n "),c.ɵɵelement(101,"i",44),c.ɵɵtext(102,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(103,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(104,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(105,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(106,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(107,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,29,"cardholderName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,31,"brand")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cardBrandOptions),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,33,"number")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(41,35,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(51,ee,!e.showCardNumber,e.showCardNumber)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(47,37,"copyNumber")),c.ɵɵadvance(12),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,39,"expirationMonth")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cardExpMonthOptions),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(71,41,"expirationYear")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate1("placeholder","",c.ɵɵpipeBind1(74,43,"ex")," 2019"),c.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(84,45,"securityCode")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),c.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(93,47,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(54,ee,!e.showCardCode,e.showCardCode)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(99,49,"securityCode"))}}function ae(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function se(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",16),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",97),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"label",98),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"select",99),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.title=t})),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,ae,2,2,"option",29),c.ɵɵtext(13,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"div",16),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"div",97),c.ɵɵtext(20,"\n "),c.ɵɵelementStart(21,"label",100),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"input",101),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.firstName=t})),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"div",97),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"label",102),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"input",103),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.middleName=t})),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementStart(37,"div",97),c.ɵɵtext(38,"\n "),c.ɵɵelementStart(39,"label",104),c.ɵɵtext(40),c.ɵɵpipe(41,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(42,"\n "),c.ɵɵelementStart(43,"input",105),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.lastName=t})),c.ɵɵelementEnd(),c.ɵɵtext(44,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(45,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(46,"\n "),c.ɵɵelementStart(47,"div",16),c.ɵɵtext(48,"\n "),c.ɵɵelementStart(49,"div",97),c.ɵɵtext(50,"\n "),c.ɵɵelementStart(51,"label",106),c.ɵɵtext(52),c.ɵɵpipe(53,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"input",107),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.username=t})),c.ɵɵelementEnd(),c.ɵɵtext(56,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(57,"\n "),c.ɵɵelementStart(58,"div",97),c.ɵɵtext(59,"\n "),c.ɵɵelementStart(60,"label",108),c.ɵɵtext(61),c.ɵɵpipe(62,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementStart(64,"input",109),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.company=t})),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(67,"\n "),c.ɵɵelementStart(68,"div",16),c.ɵɵtext(69,"\n "),c.ɵɵelementStart(70,"div",97),c.ɵɵtext(71,"\n "),c.ɵɵelementStart(72,"label",110),c.ɵɵtext(73),c.ɵɵpipe(74,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(75,"\n "),c.ɵɵelementStart(76,"input",111),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.ssn=t})),c.ɵɵelementEnd(),c.ɵɵtext(77,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(78,"\n "),c.ɵɵelementStart(79,"div",97),c.ɵɵtext(80,"\n "),c.ɵɵelementStart(81,"label",112),c.ɵɵtext(82),c.ɵɵpipe(83,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(84,"\n "),c.ɵɵelementStart(85,"input",113),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.passportNumber=t})),c.ɵɵelementEnd(),c.ɵɵtext(86,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(87,"\n "),c.ɵɵelementStart(88,"div",97),c.ɵɵtext(89,"\n "),c.ɵɵelementStart(90,"label",114),c.ɵɵtext(91),c.ɵɵpipe(92,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(93,"\n "),c.ɵɵelementStart(94,"input",115),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),c.ɵɵelementEnd(),c.ɵɵtext(95,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(96,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(97,"\n "),c.ɵɵelementStart(98,"div",16),c.ɵɵtext(99,"\n "),c.ɵɵelementStart(100,"div",17),c.ɵɵtext(101,"\n "),c.ɵɵelementStart(102,"label",116),c.ɵɵtext(103),c.ɵɵpipe(104,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(105,"\n "),c.ɵɵelementStart(106,"input",117),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.email=t})),c.ɵɵelementEnd(),c.ɵɵtext(107,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(108,"\n "),c.ɵɵelementStart(109,"div",17),c.ɵɵtext(110,"\n "),c.ɵɵelementStart(111,"label",118),c.ɵɵtext(112),c.ɵɵpipe(113,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(114,"\n "),c.ɵɵelementStart(115,"input",119),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.phone=t})),c.ɵɵelementEnd(),c.ɵɵtext(116,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(117,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(118,"\n "),c.ɵɵelementStart(119,"div",16),c.ɵɵtext(120,"\n "),c.ɵɵelementStart(121,"div",17),c.ɵɵtext(122,"\n "),c.ɵɵelementStart(123,"label",120),c.ɵɵtext(124),c.ɵɵpipe(125,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(126,"\n "),c.ɵɵelementStart(127,"input",121),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address1=t})),c.ɵɵelementEnd(),c.ɵɵtext(128,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(129,"\n "),c.ɵɵelementStart(130,"div",17),c.ɵɵtext(131,"\n "),c.ɵɵelementStart(132,"label",122),c.ɵɵtext(133),c.ɵɵpipe(134,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(135,"\n "),c.ɵɵelementStart(136,"input",123),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address2=t})),c.ɵɵelementEnd(),c.ɵɵtext(137,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(138,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(139,"\n "),c.ɵɵelementStart(140,"div",16),c.ɵɵtext(141,"\n "),c.ɵɵelementStart(142,"div",17),c.ɵɵtext(143,"\n "),c.ɵɵelementStart(144,"label",124),c.ɵɵtext(145),c.ɵɵpipe(146,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(147,"\n "),c.ɵɵelementStart(148,"input",125),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.address3=t})),c.ɵɵelementEnd(),c.ɵɵtext(149,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(150,"\n "),c.ɵɵelementStart(151,"div",17),c.ɵɵtext(152,"\n "),c.ɵɵelementStart(153,"label",126),c.ɵɵtext(154),c.ɵɵpipe(155,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(156,"\n "),c.ɵɵelementStart(157,"input",127),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.city=t})),c.ɵɵelementEnd(),c.ɵɵtext(158,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(159,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(160,"\n "),c.ɵɵelementStart(161,"div",16),c.ɵɵtext(162,"\n "),c.ɵɵelementStart(163,"div",17),c.ɵɵtext(164,"\n "),c.ɵɵelementStart(165,"label",128),c.ɵɵtext(166),c.ɵɵpipe(167,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(168,"\n "),c.ɵɵelementStart(169,"input",129),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.state=t})),c.ɵɵelementEnd(),c.ɵɵtext(170,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(171,"\n "),c.ɵɵelementStart(172,"div",17),c.ɵɵtext(173,"\n "),c.ɵɵelementStart(174,"label",130),c.ɵɵtext(175),c.ɵɵpipe(176,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(177,"\n "),c.ɵɵelementStart(178,"input",131),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.postalCode=t})),c.ɵɵelementEnd(),c.ɵɵtext(179,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(180,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(181,"\n "),c.ɵɵelementStart(182,"div",16),c.ɵɵtext(183,"\n "),c.ɵɵelementStart(184,"div",17),c.ɵɵtext(185,"\n "),c.ɵɵelementStart(186,"label",132),c.ɵɵtext(187),c.ɵɵpipe(188,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(189,"\n "),c.ɵɵelementStart(190,"input",133),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.identity.country=t})),c.ɵɵelementEnd(),c.ɵɵtext(191,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(192,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(193,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,55,"title")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.identityTitleOptions),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,57,"firstName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,59,"middleName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(41,61,"lastName")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(53,63,"username")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(62,65,"company")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(74,67,"ssn")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(83,69,"passportNumber")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(92,71,"licenseNumber")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(104,73,"email")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(113,75,"phone")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(125,77,"address1")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(134,79,"address2")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(146,81,"address3")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(155,83,"cityTown")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(167,85,"stateProvince")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(176,87,"zipPostalCode")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(188,89,"country")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function le(e,t){if(1&e&&(c.ɵɵelementStart(0,"option",30),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵproperty("ngValue",e.value),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function ce(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",134),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",16),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",135),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",136),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"select",137),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).organizationChanged()})),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,le,2,2,"option",29),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,5,"ownership")),c.ɵɵadvance(8),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.ownershipOptions)}}function de(e,t){1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function pe(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",139),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"input",140),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"label",141),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=c.ɵɵnextContext(4);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("id","collection-",n,""),c.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),c.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate1("for","collection-",n,""),c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function ue(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,pe,7,6,"div",138),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.collections)}}function me(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",134),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,de,3,3,"div",21),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,ue,4,1,"ng-container",21),c.ɵɵtext(9,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,3,"collections")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.collections||!e.collections.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function he(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"b",143),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5),c.ɵɵpipe(6,"date"),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function ve(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"b",143),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"a",145),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).viewHistory()})),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,3,"passwordHistory"),":"),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,5,"view")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function fe(e,t){if(1&e&&(c.ɵɵelementStart(0,"div"),c.ɵɵtext(1),c.ɵɵpipe(2,"date"),c.ɵɵelementStart(3,"span",148),c.ɵɵtext(4),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(e.password)}}function ge(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",146),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,fe,6,5,"div",147),c.ɵɵtext(3,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function ye(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",142),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"b",143),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9),c.ɵɵpipe(10,"date"),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,he,7,7,"div",21),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,ve,10,7,"div",21),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,ge,4,1,"div",144),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(7),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(8,5,"dateUpdated"),":"),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.showRevisionDate),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.hasPasswordHistory),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function xe(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h3",134),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",139),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"input",149),c.ɵɵlistener("change",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).repromptChanged()})),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",150),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"a",151),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16,"\n "),c.ɵɵelement(17,"i",77),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,5,"options")),c.ɵɵadvance(5),c.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,7,"passwordPrompt")),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(15,9,"learnMore"))}}function Se(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",13),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,V,3,3,"app-callout",14),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,N,14,6,"div",15),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",16),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"div",17),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"label",18),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"input",19),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().cipher.name=t})),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵtemplate(17,j,11,6,"div",20),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtext(20,"\n "),c.ɵɵtemplate(21,ne,74,38,"ng-container",21),c.ɵɵtext(22,"\n "),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,oe,108,57,"ng-container",21),c.ɵɵtext(25,"\n "),c.ɵɵtext(26,"\n "),c.ɵɵtemplate(27,se,194,91,"ng-container",21),c.ɵɵtext(28,"\n "),c.ɵɵelementStart(29,"div",22),c.ɵɵtext(30,"\n "),c.ɵɵelementStart(31,"label",23),c.ɵɵtext(32),c.ɵɵpipe(33,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n "),c.ɵɵelementStart(35,"textarea",24),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().cipher.notes=t})),c.ɵɵelementEnd(),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,ce,21,9,"ng-container",21),c.ɵɵtext(41,"\n "),c.ɵɵtemplate(42,me,10,5,"ng-container",21),c.ɵɵtext(43,"\n "),c.ɵɵtemplate(44,ye,19,10,"ng-container",21),c.ɵɵtext(45,"\n "),c.ɵɵtemplate(46,xe,21,11,"ng-container",21),c.ɵɵtext(47,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,20,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",!e.organization),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(33,22,"notes")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),c.ɵɵadvance(3),c.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.canUseReprompt)}}function be(e,t){if(1&e&&(c.ɵɵelementStart(0,"button",152),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",153),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span"),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(),t=c.ɵɵreference(5);c.ɵɵproperty("disabled",t.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const we=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function Ie(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",68),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).toggleFavorite()})),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",43),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(4,we,e.cipher.favorite,!e.cipher.favorite))}}function Ce(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",157,158),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).delete()})),c.ɵɵpipe(2,"i18n"),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",159),c.ɵɵtext(5,"\n "),c.ɵɵelement(6,"i",160),c.ɵɵpipe(7,"i18n"),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),c.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),c.ɵɵadvance(4),c.ɵɵproperty("hidden",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(7,8,"loading")),c.ɵɵproperty("hidden",!e.loading)}}function Ee(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",154),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,Ie,5,7,"button",155),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,Ce,9,10,"button",156),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class Pe extends l.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h,v){super(e,t,n,i,r,o,a,s,l,d,p,u,v,m,h),this.apiService=c,this.originalCipher=null}allowOwnershipAssignment(){return null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)&&(null!=this.organization?this.cloneMode&&this.organization.canEditAnyCollection:!this.editMode||this.cloneMode)}loadCollections(){return this.organization.canEditAnyCollection?Promise.resolve(this.collections):super.loadCollections()}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId),n=new r.CipherData(t);return this.originalCipher=new o.Cipher(n),new o.Cipher(n)}))}encryptCipher(){return this.organization.canEditAnyCollection?this.cipherService.encrypt(this.cipher,null,this.originalCipher):super.encryptCipher()}saveCipher(e){const t=Object.create(null,{saveCipher:{get:()=>super.saveCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection||null==e.organizationId)return t.saveCipher.call(this,e);if(this.editMode&&!this.cloneMode){const t=new s.CipherRequest(e);return this.apiService.putCipherAdmin(this.cipherId,t)}{const t=new a.CipherCreateRequest(e);return this.apiService.postCipherAdmin(t)}}))}deleteCipher(){const e=Object.create(null,{deleteCipher:{get:()=>super.deleteCipher}});return i(this,void 0,void 0,(function*(){return this.organization.canEditAnyCollection?this.cipher.isDeleted?this.apiService.deleteCipherAdmin(this.cipherId):this.apiService.putDeleteCipherAdmin(this.cipherId):e.deleteCipher.call(this)}))}}t.AddEditComponent=Pe,Pe.ɵfac=function(e){return new(e||Pe)(c.ɵɵdirectiveInject(d.CipherService),c.ɵɵdirectiveInject(p.FolderService),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.AuditService),c.ɵɵdirectiveInject(v.StateService),c.ɵɵdirectiveInject(f.CollectionService),c.ɵɵdirectiveInject(g.TotpService),c.ɵɵdirectiveInject(y.PasswordGenerationService),c.ɵɵdirectiveInject(x.ApiService),c.ɵɵdirectiveInject(S.MessagingService),c.ɵɵdirectiveInject(b.EventService),c.ɵɵdirectiveInject(w.PolicyService),c.ɵɵdirectiveInject(I.LogService),c.ɵɵdirectiveInject(C.PasswordRepromptService),c.ɵɵdirectiveInject(E.OrganizationService))},Pe.ɵcmp=c.ɵɵdefineComponent({type:Pe,selectors:[["app-org-vault-add-edit"]],features:[c.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"button",6),c.ɵɵpipe(13,"i18n"),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"span",7),c.ɵɵtext(16,"×"),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,Se,48,24,"div",8),c.ɵɵtext(21,"\n "),c.ɵɵelementStart(22,"div",9),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,be,9,7,"button",10),c.ɵɵtext(25,"\n "),c.ɵɵelementStart(26,"button",11),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵtemplate(30,Ee,6,2,"div",12),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n")),2&e&&(c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate(t.title),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(13,7,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",t.cipher),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",!t.viewOnly),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[P.NgControlStatusGroup,P.NgForm,k.ApiActionDirective,A.A11yTitleDirective,O.NgIf,P.DefaultValueAccessor,P.RequiredValidator,P.NgControlStatus,P.NgModel,T.AddEditCustomFieldsComponent,M.CalloutComponent,P.SelectControlValueAccessor,D.AutofocusDirective,O.NgForOf,P.NgSelectOption,P.ɵNgSelectMultipleOption,B.InputVerbatimDirective,O.NgClass,R.StopClickDirective,O.NgStyle,P.CheckboxControlValueAccessor],pipes:[U.I18nPipe,O.DatePipe],encapsulation:2})},25909:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;n(91092),n(68062),n(82058),n(40349),n(70143),n(99954),n(77243);const r=n(13886),o=n(78758),a=n(18641),s=n(32621),l=n(68062),c=n(40349),d=n(82058),p=n(77243),u=n(99954),m=n(91092),h=n(70143),v=n(96832),f=n(637),g=n(57490),y=n(50553),x=n(80507),S=n(72596);function b(e,t){if(1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.cipher.name)}}function w(e,t){1&e&&s.ɵɵelement(0,"i",24)}function I(e,t){1&e&&s.ɵɵelement(0,"i",25)}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",26),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",27),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",28),s.ɵɵpipe(5,"i18n"),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"span",29),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"button",30,31),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).reupload(t)})),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(12),t=s.ɵɵnextContext().$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(5,5,"attachmentFixDesc")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,7,"attachmentFixDesc")),s.ɵɵadvance(3),s.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"td",32),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"button",33,34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).delete(t)})),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",35),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",36),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(3),t=s.ɵɵnextContext().$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(4,6,"delete")),s.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(9,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",16),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,w,1,0,"i",17),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,I,1,0,"i",18),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"td",19),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",20),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"a",21),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).download(t)})),s.ɵɵtext(14),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,C,16,11,"div",22),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"small"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,E,12,10,"td",23),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!e.downloading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.downloading),s.ɵɵadvance(8),s.ɵɵtextInterpolate(e.fileName),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),s.ɵɵadvance(4),s.ɵɵtextInterpolate(e.sizeName),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!n.viewOnly)}}function k(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",14),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,P,25,6,"tr",15),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.cipher.attachments)}}function A(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",37),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"input",38),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"small",39),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"newAttachment")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,5,"file")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,7,"maxFileSize")))}function O(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",40),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",41),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){s.ɵɵnextContext();const e=s.ɵɵreference(5);s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,"save"))}}class T extends a.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,i,r,o,a),this.viewOnly=!1}reupload(e){const t=Object.create(null,{reuploadCipherAttachment:{get:()=>super.reuploadCipherAttachment}});return i(this,void 0,void 0,(function*(){this.organization.canEditAnyCollection&&this.showFixOldAttachments(e)&&(yield t.reuploadCipherAttachment.call(this,e,!0))}))}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId);return new o.Cipher(new r.CipherData(t))}))}saveCipherAttachment(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e,this.organization.canEditAnyCollection)}deleteCipherAttachment(e){return this.organization.canEditAnyCollection?this.apiService.deleteCipherAttachmentAdmin(this.cipherId,e):super.deleteCipherAttachment(e)}showFixOldAttachments(e){return null==e.key&&this.organization.canEditAnyCollection}}t.AttachmentsComponent=T,T.ɵfac=function(e){return new(e||T)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.CryptoService),s.ɵɵdirectiveInject(p.StateService),s.ɵɵdirectiveInject(u.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(h.LogService))},T.ɵcmp=s.ɵɵdefineComponent({type:T,selectors:[["app-org-vault-attachments"]],features:[s.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵtemplate(12,b,2,1,"small",6),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",7),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",8),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"div",9),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,k,7,1,"table",10),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,A,16,9,"div",6),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",11),s.ɵɵtext(31,"\n "),s.ɵɵtemplate(32,O,9,7,"button",12),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"button",13),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(11,8,"attachments"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.cipher),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,10,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.A11yTitleDirective,g.NgForOf,x.StopClickDirective],pipes:[S.I18nPipe],encapsulation:2})},65445:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CiphersComponent=void 0;const r=n(32621),o=(n(91092),n(68062),n(98573),n(40349),n(70143),n(14293),n(99954),n(14170),n(77243),n(63529),n(97618)),a=n(32621),s=n(14170),l=n(40349),c=n(99954),d=n(68062),p=n(91092),u=n(98573),m=n(63529),h=n(14293),v=n(70143),f=n(77243),g=n(57490),y=n(37407),x=n(96832),S=n(92521),b=n(52665),w=n(80507),I=n(50553),C=n(72596);function E(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",22),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function P(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",25),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachmentsNeedFix")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachmentsNeedFix")))}function k(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",24),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,P,9,6,"ng-container",0),a.ɵɵtext(10,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,5,"attachments")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.showFixOldAttachments(e))}}function A(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).copy(t,t.login.password,"password","Password")})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",26),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"copyPassword"),"\n "))}function O(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).copy(t,t.login.totp,"verificationCodeTotp","TOTP")})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",26),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"copyVerificationCode"),"\n "))}function T(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext(2).$implicit;return a.ɵɵnextContext(3).launch(t.login.launchUri)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",27),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"launch"),"\n "))}function M(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).copy(t,t.login.username,"username","Username")})),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"i",26),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,A,5,3,"a",19),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,O,5,3,"a",19),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,T,5,3,"a",19),a.ɵɵtext(13,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit,t=a.ɵɵnextContext(3);a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(6,4,"copyUsername"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",e.viewPassword),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.displayTotpCopyButton(e)),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.login.canLaunch)}}function D(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).clone(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",28),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"clone"),"\n "))}function B(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).share(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",29),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"moveToOrganization"),"\n "))}function R(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).collections(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",30),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"collections"),"\n "))}function U(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).events(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",31),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function V(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"a",17),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).restore(t)})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",32),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,1,"restore"),"\n "))}function F(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",5),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"input",6),a.ɵɵlistener("ngModelChange",(function(t){return a.ɵɵrestoreView(e).$implicit.checked=t})),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",7),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(8,"\n "),a.ɵɵelement(9,"app-vault-icon",8),a.ɵɵtext(10,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"td",9),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).checkCipher(t)})),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"a",10),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(15,"i18n"),a.ɵɵtext(16),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,E,9,6,"ng-container",0),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,k,11,7,"ng-container",0),a.ɵɵtext(21,"\n "),a.ɵɵelement(22,"br"),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"small",11),a.ɵɵtext(25),a.ɵɵelementEnd(),a.ɵɵtext(26,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"td",12),a.ɵɵtext(29,"\n "),a.ɵɵelementStart(30,"div",13),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"button",14),a.ɵɵpipe(33,"i18n"),a.ɵɵtext(34,"\n "),a.ɵɵelement(35,"i",15),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",16),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,M,14,6,"ng-container",0),a.ɵɵtext(41,"\n "),a.ɵɵelementStart(42,"a",17),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).attachments(t)})),a.ɵɵtext(43,"\n "),a.ɵɵelement(44,"i",18),a.ɵɵtext(45),a.ɵɵpipe(46,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵtemplate(48,D,5,3,"a",19),a.ɵɵtext(49,"\n "),a.ɵɵtemplate(50,B,5,3,"a",19),a.ɵɵtext(51,"\n "),a.ɵɵtemplate(52,R,5,3,"a",19),a.ɵɵtext(53,"\n "),a.ɵɵtemplate(54,U,5,3,"a",19),a.ɵɵtext(55,"\n "),a.ɵɵtemplate(56,V,5,3,"a",19),a.ɵɵtext(57,"\n "),a.ɵɵelementStart(58,"a",20),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).delete(t)})),a.ɵɵtext(59,"\n "),a.ɵɵelement(60,"i",21),a.ɵɵtext(61),a.ɵɵpipe(62,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(63,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngModel",e.checked),a.ɵɵadvance(5),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(15,16,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(7),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(33,18,"options")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",e.type===n.cipherType.Login&&!e.isDeleted),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(46,20,"attachments"),"\n "),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",(!n.organization&&!e.organizationId||n.organization)&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.organization&&!e.organizationId&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.organizationId&&!e.isDeleted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.organizationId&&n.accessEvents),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.isDeleted),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(62,22,e.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function N(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"table",3),a.ɵɵlistener("scrolled",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(2).loadMore()})),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"tbody"),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,F,67,24,"tr",4),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵnextContext().ngIf,t=a.ɵɵnextContext();a.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",e)}}function _(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",34),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",23),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function j(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",36),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext(4).addCipher()})),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",37),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function z(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,j,5,3,"button",35),a.ɵɵtext(7,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"noItemsInList")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",e.showAddNew)}}function L(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",33),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,_,9,6,"ng-container",0),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,z,8,4,"ng-container",0),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.loaded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.loaded)}}function K(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,N,7,3,"table",1),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,L,6,2,"div",2),a.ɵɵtext(5,"\n"),a.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.length)}}class q extends o.CiphersComponent{constructor(e,t,n,i,o,a,s,l,c,d){super(e,t,n,i,a,s,d,l,c),this.apiService=o,this.onEventsClicked=new r.EventEmitter,this.accessEvents=!1,this.allCiphers=[]}load(e=null){return i(this,void 0,void 0,(function*(){this.organization.canEditAnyCollection?(this.accessEvents=this.organization.useEvents,this.allCiphers=yield this.cipherService.getAllFromApiForOrganization(this.organization.id)):this.allCiphers=(yield this.cipherService.getAllDecrypted()).filter((e=>e.organizationId===this.organization.id)),yield this.searchService.indexCiphers(this.organization.id,this.allCiphers),yield this.applyFilter(e),this.loaded=!0}))}applyFilter(e=null){const t=Object.create(null,{applyFilter:{get:()=>super.applyFilter}});return i(this,void 0,void 0,(function*(){if(this.organization.canViewAllCollections)yield t.applyFilter.call(this,e);else{const n=t=>t.organizationId===this.organization.id&&(null==e||e(t));yield t.applyFilter.call(this,n)}}))}search(e=null){const t=Object.create(null,{search:{get:()=>super.search}});return i(this,void 0,void 0,(function*(){yield t.search.call(this,e,this.allCiphers)}))}events(e){this.onEventsClicked.emit(e)}deleteCipher(e){return this.organization.canEditAnyCollection?this.deleted?this.apiService.deleteCipherAdmin(e):this.apiService.putDeleteCipherAdmin(e):super.deleteCipher(e,this.deleted)}showFixOldAttachments(e){return this.organization.canEditAnyCollection&&e.hasOldAttachments}}t.CiphersComponent=q,q.ɵfac=function(e){return new(e||q)(a.ɵɵdirectiveInject(s.SearchService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.CipherService),a.ɵɵdirectiveInject(p.ApiService),a.ɵɵdirectiveInject(u.EventService),a.ɵɵdirectiveInject(m.TotpService),a.ɵɵdirectiveInject(h.PasswordRepromptService),a.ɵɵdirectiveInject(v.LogService),a.ɵɵdirectiveInject(f.StateService))},q.ɵcmp=a.ɵɵdefineComponent({type:q,selectors:[["app-org-vault-ciphers"]],outputs:{onEventsClicked:"onEventsClicked"},features:[a.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["href","#","appStopClick","","appStopProp","",3,"title","click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-share-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-files"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-collection"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],[1,"no-items"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){1&e&&(a.ɵɵtemplate(0,K,6,2,"ng-container",0),a.ɵɵtext(1,"\n")),2&e&&a.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[g.NgIf,y.InfiniteScrollDirective,g.NgForOf,x.CheckboxControlValueAccessor,S.StopPropDirective,x.NgControlStatus,x.NgModel,b.IconComponent,w.StopClickDirective,I.A11yTitleDirective],pipes:[C.I18nPipe],encapsulation:2})},93219:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;n(91092),n(68062),n(69050),n(40349),n(70143),n(99954);const r=n(13886),o=n(78758),a=n(79873),s=n(7702),l=n(32621),c=n(69050),d=n(99954),p=n(40349),u=n(68062),m=n(91092),h=n(70143),v=n(96832),f=n(637),g=n(57490),y=n(50553),x=n(92521),S=n(72596);function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"small"),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.cipher.name)}}function w(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",17),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"button",18),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectAll(!0)})),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"button",18),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectAll(!1)})),l.ɵɵtext(7),l.ɵɵpipe(8,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,2,"selectAll"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function I(e,t){1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function C(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"tr",21),l.ɵɵlistener("click",(function(){const t=l.ɵɵrestoreView(e).$implicit;return l.ɵɵnextContext(2).check(t)})),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"td",22),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"input",23),l.ɵɵlistener("ngModelChange",(function(t){return l.ɵɵrestoreView(e).$implicit.checked=t})),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"td"),l.ɵɵtext(8),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;l.ɵɵadvance(4),l.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),l.ɵɵproperty("ngModel",e.checked),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"table",19),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"tbody"),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,C,10,3,"tr",20),l.ɵɵtext(5,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",e.collections)}}class P extends s.CollectionsComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o),this.apiService=r,this.allowSelectNone=!0}loadCipher(){const e=Object.create(null,{loadCipher:{get:()=>super.loadCipher}});return i(this,void 0,void 0,(function*(){if(!this.organization.canViewAllCollections)return yield e.loadCipher.call(this);const t=yield this.apiService.getCipherAdmin(this.cipherId);return new o.Cipher(new r.CipherData(t))}))}loadCipherCollections(){return this.organization.canViewAllCollections?this.collectionIds:super.loadCipherCollections()}loadCollections(){return this.organization.canViewAllCollections?Promise.resolve(this.collections):super.loadCollections()}saveCollections(){if(this.organization.canEditAnyCollection){const e=new a.CipherCollectionsRequest(this.cipherDomain.collectionIds);return this.apiService.putCipherCollectionsAdmin(this.cipherId,e)}return super.saveCollections()}}t.CollectionsComponent=P,P.ɵfac=function(e){return new(e||P)(l.ɵɵdirectiveInject(c.CollectionService),l.ɵɵdirectiveInject(d.PlatformUtilsService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.CipherService),l.ɵɵdirectiveInject(m.ApiService),l.ɵɵdirectiveInject(h.LogService))},P.ɵcmp=l.ɵɵdefineComponent({type:P,selectors:[["app-org-vault-collections"]],features:[l.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,b,2,1,"small",6),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementStart(23,"div",9),l.ɵɵtext(24,"\n "),l.ɵɵelementStart(25,"p"),l.ɵɵtext(26),l.ɵɵpipe(27,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"div",10),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"h3"),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,w,10,6,"div",11),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵtemplate(38,I,3,3,"div",6),l.ɵɵtext(39,"\n "),l.ɵɵtemplate(40,E,7,1,"table",12),l.ɵɵtext(41,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(42,"\n "),l.ɵɵelementStart(43,"div",13),l.ɵɵtext(44,"\n "),l.ɵɵelementStart(45,"button",14),l.ɵɵtext(46,"\n "),l.ɵɵelement(47,"i",15),l.ɵɵpipe(48,"i18n"),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"span"),l.ɵɵtext(51),l.ɵɵpipe(52,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(53,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementStart(55,"button",16),l.ɵɵtext(56),l.ɵɵpipe(57,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(58,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(59,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(60,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(61,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(62,"\n")),2&e){const e=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(11,13,"collections"),"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.cipher),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,15,"close")),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(27,17,"collectionsDesc")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(33,19,"collections")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.collections&&t.collections.length),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.collections||!t.collections.length),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.collections&&t.collections.length),l.ɵɵadvance(5),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(48,21,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(52,23,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(57,25,"cancel"),"\n ")}},directives:[v.ɵNgNoValidate,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,y.A11yTitleDirective,g.NgForOf,v.CheckboxControlValueAccessor,x.StopPropDirective,v.NgControlStatus,v.NgModel],pipes:[S.I18nPipe],encapsulation:2})},28515:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingsComponent=void 0;n(91092),n(69050),n(4349),n(40349),n(77243);const r=n(58209),o=n(30260),a=n(82186),s=n(41412),l=n(32621),c=n(69050),d=n(4349),p=n(77243),u=n(91092),m=n(40349),h=n(50553),v=n(96832),f=n(17302),g=n(57490),y=n(80507),x=n(72596),S=function(e){return{active:e}};function b(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"li",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",8),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectFavorites()})),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",17),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(4,S,e.selectedFavorites)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(6,2,"favorites"),"\n ")}}function w(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"li",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"a",8),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().selectTrash()})),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",18),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(4,S,e.selectedTrash)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(6,2,"trash"),"\n ")}}function I(e,t){1&e&&(l.ɵɵelementStart(0,"p",19),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",20),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",21),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}const C=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};function E(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"i",33),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);const t=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(4).collapse(t.node)})),l.ɵɵpipe(1,"i18n"),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(4);l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"toggleCollapse")),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(4,C,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function P(e,t){1&e&&l.ɵɵelement(0,"i",34)}function k(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",35),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);const t=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(4).editFolder(t.node)})),l.ɵɵpipe(1,"i18n"),l.ɵɵtext(2,"\n "),l.ɵɵelement(3,"i",36),l.ɵɵtext(4,"\n "),l.ɵɵelementEnd()}2&e&&l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(1,1,"editFolder"))}function A(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementContainerEnd())}const O=function(e){return{$implicit:e}};function T(e,t){if(1&e&&(l.ɵɵelementStart(0,"ul",37),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,A,2,0,"ng-container",26),l.ɵɵtext(3,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵnextContext(2);const t=l.ɵɵreference(15);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",l.ɵɵpureFunction1(2,O,e.children))}}function M(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"li",7),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",22),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,E,2,7,"i",28),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"a",29),l.ɵɵlistener("click",(function(){const t=l.ɵɵrestoreView(e).$implicit;return l.ɵɵnextContext(4).selectFolder(t.node)})),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,P,1,0,"i",30),l.ɵɵtext(9),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,k,5,3,"a",31),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,T,4,4,"ul",32),l.ɵɵtext(15,"\n "),l.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=l.ɵɵnextContext(4);l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(6,S,n.selectedFolder&&e.node.id===n.selectedFolderId)),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",e.children.length),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",0===e.children.length),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",e.node.name,"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",e.node.id),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function D(e,t){if(1&e&&(l.ɵɵtext(0,"\n "),l.ɵɵtemplate(1,M,16,8,"li",27),l.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;l.ɵɵadvance(1),l.ɵɵproperty("ngForOf",e)}}function B(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementContainerEnd())}function R(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3",22),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",23),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).addFolder()})),l.ɵɵpipe(6,"i18n"),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",24),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"ul",6),l.ɵɵtext(13,"\n "),l.ɵɵtemplate(14,D,3,1,"ng-template",null,25,l.ɵɵtemplateRefExtractor),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,B,2,0,"ng-container",26),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementContainerEnd()}if(2&e){const e=l.ɵɵreference(15),t=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,4,"folders"),"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,6,"addFolder")),l.ɵɵadvance(12),l.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",l.ɵɵpureFunction1(8,O,t.nestedFolders))}}function U(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"i",33),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);const t=l.ɵɵnextContext().$implicit;return l.ɵɵnextContext(4).collapse(t.node)})),l.ɵɵpipe(1,"i18n"),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext().$implicit,t=l.ɵɵnextContext(4);l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,2,"toggleCollapse")),l.ɵɵproperty("ngClass",l.ɵɵpureFunction2(4,C,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function V(e,t){1&e&&l.ɵɵelement(0,"i",40)}function F(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementContainerEnd())}function N(e,t){if(1&e&&(l.ɵɵelementStart(0,"ul",37),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,F,2,0,"ng-container",26),l.ɵɵtext(3,"\n "),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext().$implicit;l.ɵɵnextContext(2);const t=l.ɵɵreference(9);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",l.ɵɵpureFunction1(2,O,e.children))}}function _(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"li",7),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,U,2,7,"i",28),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"a",29),l.ɵɵlistener("click",(function(){const t=l.ɵɵrestoreView(e).$implicit;return l.ɵɵnextContext(4).selectCollection(t.node)})),l.ɵɵtext(5,"\n "),l.ɵɵtemplate(6,V,1,0,"i",39),l.ɵɵtext(7),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵtemplate(9,N,4,4,"ul",32),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=l.ɵɵnextContext(4);l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(5,S,e.node.id===n.selectedCollectionId)),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",e.children.length),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",0===e.children.length),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",e.node.name,"\n "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function j(e,t){if(1&e&&(l.ɵɵtext(0,"\n "),l.ɵɵtemplate(1,_,11,7,"li",27),l.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;l.ɵɵadvance(1),l.ɵɵproperty("ngForOf",e)}}function z(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementContainerEnd())}function L(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h3"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"ul",6),l.ɵɵtext(7,"\n "),l.ɵɵtemplate(8,j,3,1,"ng-template",null,38,l.ɵɵtemplateRefExtractor),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,z,2,0,"ng-container",26),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵreference(9),t=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"collections")),l.ɵɵadvance(8),l.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",l.ɵɵpureFunction1(5,O,t.nestedCollections))}}function K(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,R,20,10,"ng-container",16),l.ɵɵtext(3,"\n "),l.ɵɵtemplate(4,L,14,7,"ng-container",16),l.ɵɵtext(5,"\n "),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",e.showFolders),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",e.showCollections&&e.collections&&e.collections.length)}}class q extends s.GroupingsComponent{constructor(e,t,n,i,r){super(e,t,n),this.apiService=i,this.i18nService=r}loadCollections(){const e=Object.create(null,{loadCollections:{get:()=>super.loadCollections}});return i(this,void 0,void 0,(function*(){if(!this.organization.canEditAnyCollection)return void(yield e.loadCollections.call(this,this.organization.id));const t=yield this.apiService.getCollections(this.organization.id);if(null!=t&&null!=t.data&&t.data.length){const e=t.data.map((e=>new o.Collection(new r.CollectionData(e))));this.collections=yield this.collectionService.decryptMany(e)}else this.collections=[];const n=new a.CollectionView;n.name=this.i18nService.t("unassigned"),n.id="unassigned",n.organizationId=this.organization.id,n.readOnly=!0,this.collections.push(n),this.nestedCollections=yield this.collectionService.getAllNested(this.collections)}))}collapse(e){const t=Object.create(null,{collapse:{get:()=>super.collapse}});return i(this,void 0,void 0,(function*(){yield t.collapse.call(this,e,"org_")}))}isCollapsed(e){return super.isCollapsed(e,"org_")}}t.GroupingsComponent=q,q.ɵfac=function(e){return new(e||q)(l.ɵɵdirectiveInject(c.CollectionService),l.ɵɵdirectiveInject(d.FolderService),l.ɵɵdirectiveInject(p.StateService),l.ɵɵdirectiveInject(u.ApiService),l.ɵɵdirectiveInject(m.I18nService))},q.ɵcmp=l.ɵɵdefineComponent({type:q,selectors:[["app-org-vault-groupings"]],features:[l.ɵɵInheritDefinitionFeature],decls:82,vars:47,consts:[[1,"card","vault-filters"],[1,"card-header","d-flex"],["href","https://bitwarden.com/help/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"bwi-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"bwi","bwi-li","bwi-fw","bwi-filter"],[3,"ngClass",4,"ngIf"],[1,"bwi","bwi-li","bwi-fw","bwi-globe"],[1,"bwi","bwi-li","bwi-fw","bwi-credit-card"],[1,"bwi","bwi-li","bwi-fw","bwi-id-card"],[1,"bwi","bwi-li","bwi-fw","bwi-sticky-note"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"bwi","bwi-li","bwi-fw","bwi-star"],[1,"bwi","bwi-li","bwi-fw","bwi-trash"],[1,"text-muted"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"sr-only"],[1,"d-flex"],["href","#","appStopClick","",1,"text-muted","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngFor","ngForOf"],["class","bwi-li bwi",3,"title","ngClass","click",4,"ngIf"],["href","#","appStopClick","",1,"text-break",3,"click"],["class","bwi bwi-li bwi-folder","aria-hidden","true",4,"ngIf"],["href","#","class","text-muted ml-auto show-active","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["class","bwi-ul card-ul carets",4,"ngIf"],[1,"bwi-li","bwi",3,"title","ngClass","click"],["aria-hidden","true",1,"bwi","bwi-li","bwi-folder"],["href","#","appStopClick","",1,"text-muted","ml-auto","show-active",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-pencil","bwi-fw"],[1,"bwi-ul","card-ul","carets"],["recursiveCollections",""],["class","bwi bwi-li bwi-collection","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-li","bwi-collection"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementStart(5,"a",2),l.ɵɵpipe(6,"i18n"),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"i",3),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"div",4),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"input",5),l.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"ul",6),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"li",7),l.ɵɵtext(20,"\n "),l.ɵɵelementStart(21,"a",8),l.ɵɵlistener("click",(function(){return t.selectAll()})),l.ɵɵtext(22,"\n "),l.ɵɵelement(23,"i",9),l.ɵɵtext(24),l.ɵɵpipe(25,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(27,"\n "),l.ɵɵtemplate(28,b,8,6,"li",10),l.ɵɵtext(29,"\n "),l.ɵɵtemplate(30,w,8,6,"li",10),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵelementStart(33,"h3"),l.ɵɵtext(34),l.ɵɵpipe(35,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(36,"\n "),l.ɵɵelementStart(37,"ul",6),l.ɵɵtext(38,"\n "),l.ɵɵelementStart(39,"li",7),l.ɵɵtext(40,"\n "),l.ɵɵelementStart(41,"a",8),l.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Login)})),l.ɵɵtext(42,"\n "),l.ɵɵelement(43,"i",11),l.ɵɵtext(44),l.ɵɵpipe(45,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementStart(48,"li",7),l.ɵɵtext(49,"\n "),l.ɵɵelementStart(50,"a",8),l.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Card)})),l.ɵɵtext(51,"\n "),l.ɵɵelement(52,"i",12),l.ɵɵtext(53),l.ɵɵpipe(54,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(56,"\n "),l.ɵɵelementStart(57,"li",7),l.ɵɵtext(58,"\n "),l.ɵɵelementStart(59,"a",8),l.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Identity)})),l.ɵɵtext(60,"\n "),l.ɵɵelement(61,"i",13),l.ɵɵtext(62),l.ɵɵpipe(63,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(64,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(65,"\n "),l.ɵɵelementStart(66,"li",7),l.ɵɵtext(67,"\n "),l.ɵɵelementStart(68,"a",8),l.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.SecureNote)})),l.ɵɵtext(69,"\n "),l.ɵɵelement(70,"i",14),l.ɵɵtext(71),l.ɵɵpipe(72,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(73,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(74,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(75,"\n "),l.ɵɵtemplate(76,I,9,6,"p",15),l.ɵɵtext(77,"\n "),l.ɵɵtemplate(78,K,6,2,"ng-container",16),l.ɵɵtext(79,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(80,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(81,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(4,19,"filters"),"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(6,21,"learnMore")),l.ɵɵadvance(9),l.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||l.ɵɵpipeBind1(15,23,"searchVault")),l.ɵɵproperty("ngModel",t.searchText),l.ɵɵadvance(5),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(37,S,t.selectedAll)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(25,25,"allItems"),"\n "),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.showFavorites),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.showTrash),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(35,27,"types")),l.ɵɵadvance(5),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(39,S,t.selectedType===t.cipherType.Login)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(45,29,"typeLogin"),"\n "),l.ɵɵadvance(4),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(41,S,t.selectedType===t.cipherType.Card)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(54,31,"typeCard"),"\n "),l.ɵɵadvance(4),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(43,S,t.selectedType===t.cipherType.Identity)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(63,33,"typeIdentity"),"\n "),l.ɵɵadvance(4),l.ɵɵproperty("ngClass",l.ɵɵpureFunction1(45,S,t.selectedType===t.cipherType.SecureNote)),l.ɵɵadvance(5),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(72,35,"typeSecureNote"),"\n "),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",!t.loaded),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.loaded))},directives:[h.A11yTitleDirective,v.DefaultValueAccessor,f.AutofocusDirective,v.NgControlStatus,v.NgModel,g.NgClass,y.StopClickDirective,g.NgIf,g.NgTemplateOutlet,g.NgForOf],pipes:[x.I18nPipe],encapsulation:2})},7525:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=(n(67569),n(40349),n(36424),n(94308),n(99954),n(2173),n(29546),n(26530)),s=n(72778),l=n(25909),c=n(65445),d=n(93219),p=n(28515),u=n(32621),m=n(68012),h=n(94308),v=n(2173),f=n(40349),g=n(29546),y=n(36424),x=n(67569),S=n(99954),b=n(28515),w=n(637),I=n(57490),C=n(8369),E=n(65445),P=n(52900),k=n(72596),A=["attachments"],O=["cipherAddEdit"],T=["collections"],M=["eventsTemplate"];function D(e,t){1&e&&(u.ɵɵelementContainerStart(0),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",18),u.ɵɵpipe(3,"i18n"),u.ɵɵtext(4,"\n "),u.ɵɵelementStart(5,"span",19),u.ɵɵtext(6),u.ɵɵpipe(7,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementContainerEnd()),2&e&&(u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("title",u.ɵɵpipeBind1(3,2,"loading")),u.ɵɵadvance(4),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){if(1&e){const e=u.ɵɵgetCurrentView();u.ɵɵelementStart(0,"button",20),u.ɵɵlistener("click",(function(){u.ɵɵrestoreView(e);return u.ɵɵnextContext().addCipher()})),u.ɵɵtext(1,"\n "),u.ɵɵelement(2,"i",21),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd()}2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1("",u.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function R(e,t){if(1&e&&(u.ɵɵelementStart(0,"app-callout",22),u.ɵɵtext(1),u.ɵɵelementEnd()),2&e){const e=u.ɵɵnextContext();u.ɵɵadvance(1),u.ɵɵtextInterpolate1("\n ",e.trashCleanupWarning,"\n ")}}function U(e,t){}function V(e,t){}function F(e,t){}function N(e,t){}const _="OrgVaultComponent";class j{constructor(e,t,n,i,r,o,a,s,l,c,d){this.route=e,this.organizationService=t,this.router=n,this.changeDetectorRef=i,this.syncService=r,this.i18nService=o,this.modalService=a,this.messagingService=s,this.broadcasterService=l,this.ngZone=c,this.platformUtilsService=d,this.collectionId=null,this.type=null,this.deleted=!1,this.trashCleanupWarning=null}ngOnInit(){this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning"),this.route.parent.params.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){this.organization=yield this.organizationService.get(e.organizationId),this.groupingsComponent.organization=this.organization,this.ciphersComponent.organization=this.organization,this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){if(this.ciphersComponent.searchText=this.groupingsComponent.searchText=e.search,this.organization.canViewAllCollections||(yield this.syncService.fullSync(!1),this.broadcasterService.subscribe(_,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield Promise.all([this.groupingsComponent.load(),this.ciphersComponent.refresh()]),this.changeDetectorRef.detectChanges())}))))}))),yield this.groupingsComponent.load(),null==e)this.groupingsComponent.selectedAll=!0,yield this.ciphersComponent.reload();else if(e.deleted)this.groupingsComponent.selectedTrash=!0,yield this.filterDeleted(!0);else if(e.type){const t=parseInt(e.type,null);this.groupingsComponent.selectedType=t,yield this.filterCipherType(t,!0)}else e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,yield this.filterCollection(e.collectionId,!0)):(this.groupingsComponent.selectedAll=!0,yield this.ciphersComponent.reload());if(null!=e.viewEvents){const t=this.ciphersComponent.ciphers.filter((t=>t.id===e.viewEvents));t.length>0&&this.viewEvents(t[0])}}))))}))))}ngOnDestroy(){this.broadcasterService.unsubscribe(_)}clearGroupingFilters(){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),yield this.ciphersComponent.applyFilter(),this.clearFilters(),this.go()}))}filterCipherType(e,t=!1){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType");const n=t=>t.type===e;t?yield this.ciphersComponent.reload(n):yield this.ciphersComponent.applyFilter(n),this.clearFilters(),this.type=e,this.go()}))}filterCollection(e,t=!1){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection");const n=t=>"unassigned"===e?null==t.collectionIds||0===t.collectionIds.length:null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1;t?yield this.ciphersComponent.reload(n):yield this.ciphersComponent.applyFilter(n),this.clearFilters(),this.collectionId=e,this.go()}))}filterDeleted(e=!1){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),e?yield this.ciphersComponent.reload(null,!0):yield this.ciphersComponent.applyFilter(null),this.clearFilters(),this.deleted=!0,this.go()}))}filterSearchText(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)}editCipherAttachments(e){return i(this,void 0,void 0,(function*(){if(null==this.organization.maxStorageGb||0===this.organization.maxStorageGb)return void this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId});let t=!1;const[n]=yield this.modalService.openViewRef(l.AttachmentsComponent,this.attachmentsModalRef,(n=>{n.organization=this.organization,n.cipherId=e.id,n.onUploadedAttachment.subscribe((()=>t=!0)),n.onDeletedAttachment.subscribe((()=>t=!0))}));n.onClosed.subscribe((()=>i(this,void 0,void 0,(function*(){t&&(yield this.ciphersComponent.refresh()),t=!1}))))}))}editCipherCollections(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(d.CollectionsComponent,this.collectionsModalRef,(n=>{this.organization.canEditAnyCollection&&(n.collectionIds=e.collectionIds,n.collections=this.groupingsComponent.collections.filter((e=>!e.readOnly))),n.organization=this.organization,n.cipherId=e.id,n.onSavedCollections.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}addCipher(){return i(this,void 0,void 0,(function*(){const e=yield this.editCipher(null);e.organizationId=this.organization.id,e.type=this.type,this.organization.canEditAnyCollection&&(e.collections=this.groupingsComponent.collections.filter((e=>!e.readOnly))),null!=this.collectionId&&(e.collectionIds=[this.collectionId])}))}editCipher(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(s.AddEditComponent,this.cipherAddEditModalRef,(n=>{n.organization=this.organization,n.cipherId=null==e?null:e.id,n.onSavedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()})))),n.onDeletedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()})))),n.onRestoredCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}));return n}))}cloneCipher(e){return i(this,void 0,void 0,(function*(){const t=yield this.editCipher(e);t.cloneMode=!0,t.organizationId=this.organization.id,this.organization.canEditAnyCollection&&(t.collections=this.groupingsComponent.collections.filter((e=>!e.readOnly))),t.collectionIds=e.collectionIds}))}viewEvents(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(a.EntityEventsComponent,this.eventsModalRef,(t=>{t.name=e.name,t.organizationId=this.organization.id,t.entityId=e.id,t.showUser=!0,t.entity="cipher"}))}))}clearFilters(){this.collectionId=null,this.type=null,this.deleted=!1}go(e=null){null==e&&(e={type:this.type,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})}}t.VaultComponent=j,j.ɵfac=function(e){return new(e||j)(u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(h.OrganizationService),u.ɵɵdirectiveInject(m.Router),u.ɵɵdirectiveInject(u.ChangeDetectorRef),u.ɵɵdirectiveInject(v.SyncService),u.ɵɵdirectiveInject(f.I18nService),u.ɵɵdirectiveInject(g.ModalService),u.ɵɵdirectiveInject(y.MessagingService),u.ɵɵdirectiveInject(x.BroadcasterService),u.ɵɵdirectiveInject(u.NgZone),u.ɵɵdirectiveInject(S.PlatformUtilsService))},j.ɵcmp=u.ɵɵdefineComponent({type:j,selectors:[["app-org-vault"]],viewQuery:function(e,t){if(1&e&&(u.ɵɵviewQuery(p.GroupingsComponent,7),u.ɵɵviewQuery(c.CiphersComponent,7),u.ɵɵviewQuery(A,7,r.ViewContainerRef),u.ɵɵviewQuery(O,7,r.ViewContainerRef),u.ɵɵviewQuery(T,7,r.ViewContainerRef),u.ɵɵviewQuery(M,7,r.ViewContainerRef)),2&e){let e;u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.groupingsComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.ciphersComponent=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.collectionsModalRef=e.first),u.ɵɵqueryRefresh(e=u.ɵɵloadQuery())&&(t.eventsModalRef=e.first)}},decls:53,vars:13,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"showFolders","showFavorites","showTrash","onAllClicked","onCipherTypeClicked","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted","organization"],["type","button","class","btn btn-outline-primary btn-sm ml-auto",3,"click",4,"ngIf"],["type","warning","icon","bwi bwi-exclamation-triangle",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onCollectionsClicked","onEventsClicked","onCloneClicked"],["attachments",""],["cipherAddEdit",""],["collections",""],["eventsTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","ml-auto",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["type","warning","icon","bwi bwi-exclamation-triangle"]],template:function(e,t){if(1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1,"\n "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3,"\n "),u.ɵɵelementStart(4,"div",2),u.ɵɵtext(5,"\n "),u.ɵɵelementStart(6,"app-org-vault-groupings",3),u.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),u.ɵɵtext(7,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(8,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(9,"\n "),u.ɵɵelementStart(10,"div",4),u.ɵɵtext(11,"\n "),u.ɵɵelementStart(12,"div",5),u.ɵɵtext(13,"\n "),u.ɵɵelementStart(14,"h1"),u.ɵɵtext(15),u.ɵɵpipe(16,"i18n"),u.ɵɵelementStart(17,"small",6,7),u.ɵɵtext(19,"\n "),u.ɵɵtemplate(20,D,9,6,"ng-container",8),u.ɵɵtext(21,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(22,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(23,"\n "),u.ɵɵelementStart(24,"div",9),u.ɵɵtext(25,"\n "),u.ɵɵelementStart(26,"app-vault-bulk-actions",10),u.ɵɵtext(27,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(28,"\n "),u.ɵɵtemplate(29,B,5,3,"button",11),u.ɵɵtext(30,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(31,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(32,"\n "),u.ɵɵtemplate(33,R,2,1,"app-callout",12),u.ɵɵtext(34,"\n "),u.ɵɵelementStart(35,"app-org-vault-ciphers",13),u.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onEventsClicked",(function(e){return t.viewEvents(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),u.ɵɵtext(36,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(37,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(38,"\n "),u.ɵɵelementEnd(),u.ɵɵtext(39,"\n"),u.ɵɵelementEnd(),u.ɵɵtext(40,"\n"),u.ɵɵtemplate(41,U,0,0,"ng-template",null,14,u.ɵɵtemplateRefExtractor),u.ɵɵtext(43,"\n"),u.ɵɵtemplate(44,V,0,0,"ng-template",null,15,u.ɵɵtemplateRefExtractor),u.ɵɵtext(46,"\n"),u.ɵɵtemplate(47,F,0,0,"ng-template",null,16,u.ɵɵtemplateRefExtractor),u.ɵɵtext(49,"\n"),u.ɵɵtemplate(50,N,0,0,"ng-template",null,17,u.ɵɵtemplateRefExtractor),u.ɵɵtext(52,"\n")),2&e){const e=u.ɵɵreference(18);u.ɵɵadvance(6),u.ɵɵproperty("showFolders",!1)("showFavorites",!1)("showTrash",!0),u.ɵɵadvance(9),u.ɵɵtextInterpolate1("\n ",u.ɵɵpipeBind1(16,11,"vault"),"\n "),u.ɵɵadvance(2),u.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",e.loading),u.ɵɵadvance(6),u.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted",t.deleted)("organization",t.organization),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!t.deleted),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",t.deleted)}},directives:[b.GroupingsComponent,w.ApiActionDirective,I.NgIf,C.BulkActionsComponent,E.CiphersComponent,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2})},41641:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OssRoutingModule=void 0;const i=n(68012),r=n(94113),o=n(47760),a=n(20431),s=n(22707),l=n(11993),c=n(17004),d=n(2402),p=n(78129),u=n(76613),m=n(8938),h=n(875),v=n(66737),f=n(65345),g=n(62194),y=n(27306),x=n(55299),S=n(25197),b=n(11398),w=n(60909),I=n(54605),C=n(66259),E=n(54030),P=n(93263),k=n(22110),A=n(60628),O=n(17456),T=n(10619),M=n(89012),D=n(23817),B=n(94686),R=n(41116),U=n(28922),V=n(14285),F=n(45292),N=n(43554),_=n(23508),j=n(96982),z=n(97140),L=n(35844),K=n(7525),q=n(36055),G=n(99758),W=n(52055),H=n(80897),$=n(44257),Q=n(83034),Y=n(38270),J=n(95507),X=n(70328),Z=n(90211),ee=n(25440),te=n(55671),ne=n(95472),ie=n(1259),re=n(30839),oe=n(95310),ae=n(60537),se=n(61450),le=n(11423),ce=n(15023),de=n(25589),pe=n(9023),ue=n(69031),me=n(86950),he=n(81616),ve=n(22306),fe=n(99819),ge=n(7735),ye=n(49618),xe=n(29511),Se=n(38740),be=n(6308),we=n(32621),Ie=(n(68012),[{path:"",component:r.FrontendLayoutComponent,children:[{path:"",pathMatch:"full",component:p.LoginComponent,canActivate:[ge.UnauthGuardService]},{path:"2fa",component:y.TwoFactorComponent,canActivate:[ge.UnauthGuardService]},{path:"register",component:h.RegisterComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"createAccount"}},{path:"sso",component:g.SsoComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"enterpriseSingleSignOn"}},{path:"set-password",component:f.SetPasswordComponent,data:{titleId:"setMasterPassword"}},{path:"hint",component:c.HintComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"passwordHint"}},{path:"lock",component:d.LockComponent,canActivate:[fe.LockGuardService]},{path:"verify-email",component:b.VerifyEmailTokenComponent},{path:"accept-organization",component:l.AcceptOrganizationComponent,data:{titleId:"joinOrganization"}},{path:"accept-emergency",component:s.AcceptEmergencyComponent,data:{titleId:"acceptEmergency"}},{path:"recover",pathMatch:"full",redirectTo:"recover-2fa"},{path:"recover-2fa",component:m.RecoverTwoFactorComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"recoverAccountTwoStep"}},{path:"recover-delete",component:u.RecoverDeleteComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"verify-recover-delete",component:w.VerifyRecoverDeleteComponent,canActivate:[ge.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"send/:sendId/:key",component:q.AccessComponent,data:{title:"Bitwarden Send"}},{path:"update-temp-password",component:S.UpdateTempPasswordComponent,canActivate:[ve.AuthGuardService],data:{titleId:"updateTempPassword"}},{path:"update-password",component:x.UpdatePasswordComponent,canActivate:[ve.AuthGuardService],data:{titleId:"updatePassword"}},{path:"remove-password",component:v.RemovePasswordComponent,canActivate:[ve.AuthGuardService],data:{titleId:"removeMasterPassword"}}]},{path:"",component:a.UserLayoutComponent,canActivate:[ve.AuthGuardService],children:[{path:"vault",component:ue.VaultComponent,data:{titleId:"myVault"}},{path:"sends",component:G.SendComponent,data:{title:"Send"}},{path:"settings",component:X.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:W.AccountComponent,data:{titleId:"myAccount"}},{path:"options",component:Q.OptionsComponent,data:{titleId:"options"}},{path:"domain-rules",component:$.DomainRulesComponent,data:{titleId:"domainRules"}},{path:"two-factor",component:Z.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"premium",component:J.PremiumComponent,data:{titleId:"goPremium"}},{path:"billing",component:ee.UserBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:te.UserSubscriptionComponent,data:{titleId:"premiumMembership"}},{path:"organizations",component:Y.OrganizationsComponent,data:{titleId:"organizations"}},{path:"create-organization",component:H.CreateOrganizationComponent,data:{titleId:"newOrganization"}},{path:"emergency-access",children:[{path:"",component:Se.EmergencyAccessComponent,data:{titleId:"emergencyAccess"}},{path:":id",component:xe.EmergencyAccessViewComponent,data:{titleId:"emergencyAccess"}}]},{path:"sponsored-families",component:be.SponsoredFamiliesComponent,data:{titleId:"sponsoredFamilies"}}]},{path:"tools",component:ce.ToolsComponent,canActivate:[ve.AuthGuardService],children:[{path:"",pathMatch:"full",redirectTo:"generator"},{path:"import",component:oe.ImportComponent,data:{titleId:"importData"}},{path:"export",component:ie.ExportComponent,data:{titleId:"exportVault"}},{path:"generator",component:se.PasswordGeneratorComponent,data:{titleId:"passwordGenerator"}},{path:"breach-report",component:ne.BreachReportComponent,data:{titleId:"dataBreachReport"}},{path:"reused-passwords-report",component:le.ReusedPasswordsReportComponent,data:{titleId:"reusedPasswordsReport"}},{path:"unsecured-websites-report",component:de.UnsecuredWebsitesReportComponent,data:{titleId:"unsecuredWebsitesReport"}},{path:"weak-passwords-report",component:pe.WeakPasswordsReportComponent,data:{titleId:"weakPasswordsReport"}},{path:"exposed-passwords-report",component:re.ExposedPasswordsReportComponent,data:{titleId:"exposedPasswordsReport"}},{path:"inactive-two-factor-report",component:ae.InactiveTwoFactorReportComponent,data:{titleId:"inactive2faReport"}}]},{path:"setup/families-for-enterprise",component:R.FamiliesForEnterpriseSetupComponent}]},{path:"organizations/:organizationId",component:o.OrganizationLayoutComponent,canActivate:[ve.AuthGuardService,me.OrganizationGuardService],children:[{path:"",pathMatch:"full",redirectTo:"vault"},{path:"vault",component:K.VaultComponent,data:{titleId:"vault"}},{path:"tools",component:j.ToolsComponent,canActivate:[he.OrganizationTypeGuardService],data:{permissions:[ye.Permissions.AccessImportExport,ye.Permissions.AccessReports]},children:[{path:"",pathMatch:"full",redirectTo:"import"},{path:"import",component:F.ImportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"importData",permissions:[ye.Permissions.AccessImportExport]}},{path:"export",component:U.ExportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"exportVault",permissions:[ye.Permissions.AccessImportExport]}},{path:"exposed-passwords-report",component:V.ExposedPasswordsReportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"exposedPasswordsReport",permissions:[ye.Permissions.AccessReports]}},{path:"inactive-two-factor-report",component:N.InactiveTwoFactorReportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"inactive2faReport",permissions:[ye.Permissions.AccessReports]}},{path:"reused-passwords-report",component:_.ReusedPasswordsReportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"reusedPasswordsReport",permissions:[ye.Permissions.AccessReports]}},{path:"unsecured-websites-report",component:z.UnsecuredWebsitesReportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"unsecuredWebsitesReport",permissions:[ye.Permissions.AccessReports]}},{path:"weak-passwords-report",component:L.WeakPasswordsReportComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"weakPasswordsReport",permissions:[ye.Permissions.AccessReports]}}]},{path:"manage",component:P.ManageComponent,canActivate:[he.OrganizationTypeGuardService],data:{permissions:[ye.Permissions.CreateNewCollections,ye.Permissions.EditAnyCollection,ye.Permissions.DeleteAnyCollection,ye.Permissions.EditAssignedCollections,ye.Permissions.DeleteAssignedCollections,ye.Permissions.AccessEventLogs,ye.Permissions.ManageGroups,ye.Permissions.ManageUsers,ye.Permissions.ManagePolicies]},children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"collections",component:I.CollectionsComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"collections",permissions:[ye.Permissions.CreateNewCollections,ye.Permissions.EditAnyCollection,ye.Permissions.DeleteAnyCollection,ye.Permissions.EditAssignedCollections,ye.Permissions.DeleteAssignedCollections]}},{path:"events",component:C.EventsComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"eventLogs",permissions:[ye.Permissions.AccessEventLogs]}},{path:"groups",component:E.GroupsComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"groups",permissions:[ye.Permissions.ManageGroups]}},{path:"people",component:k.PeopleComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"people",permissions:[ye.Permissions.ManageUsers,ye.Permissions.ManageUsersPassword]}},{path:"policies",component:A.PoliciesComponent,canActivate:[he.OrganizationTypeGuardService],data:{titleId:"policies",permissions:[ye.Permissions.ManagePolicies]}}]},{path:"settings",component:D.SettingsComponent,canActivate:[he.OrganizationTypeGuardService],data:{permissions:[ye.Permissions.ManageOrganization]},children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:O.AccountComponent,data:{titleId:"myOrganization"}},{path:"two-factor",component:B.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"billing",component:T.OrganizationBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:M.OrganizationSubscriptionComponent,data:{titleId:"subscription"}}]}]}]);class Ce{}t.OssRoutingModule=Ce,Ce.ɵfac=function(e){return new(e||Ce)},Ce.ɵmod=we.ɵɵdefineNgModule({type:Ce}),Ce.ɵinj=we.ɵɵdefineInjector({imports:[[i.RouterModule.forRoot(Ie,{useHash:!0,paramsInheritanceStrategy:"always"})],i.RouterModule]})},12353:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OssModule=void 0;const i=n(83072),r=n(57490),o=n(57490),a=n(96832),s=n(68012),l=n(37407),c=n(68290),d=n(35734),p=n(68625),u=n(34956),m=n(12352),h=n(59413),v=n(53151),f=n(81114),g=n(78611),y=n(59267),x=n(32406),S=n(31861),b=n(73986),w=n(57548),I=n(77015),C=n(54556),E=n(74299),P=n(66173),k=n(12734),A=n(64273),O=n(80585),T=n(96119),M=n(23806),D=n(96133),B=n(65989),R=n(99643),U=n(17964),V=n(56168),F=n(7972),N=n(99692),_=n(91679),j=n(84782),z=n(98204),L=n(85247),K=n(13418),q=n(22671),G=n(81262),W=n(2487),H=n(72377),$=n(15419),Q=n(32584),Y=n(32621);r.registerLocaleData(u.default,"az"),r.registerLocaleData(m.default,"bg"),r.registerLocaleData(h.default,"ca"),r.registerLocaleData(v.default,"cs"),r.registerLocaleData(f.default,"da"),r.registerLocaleData(g.default,"de"),r.registerLocaleData(y.default,"el"),r.registerLocaleData(x.default,"en-GB"),r.registerLocaleData(S.default,"en-IN"),r.registerLocaleData(w.default,"es"),r.registerLocaleData(I.default,"et"),r.registerLocaleData(b.default,"eo"),r.registerLocaleData(C.default,"fi"),r.registerLocaleData(E.default,"fr"),r.registerLocaleData(P.default,"he"),r.registerLocaleData(k.default,"hr"),r.registerLocaleData(A.default,"hu"),r.registerLocaleData(O.default,"id"),r.registerLocaleData(T.default,"it"),r.registerLocaleData(M.default,"ja"),r.registerLocaleData(D.default,"kn"),r.registerLocaleData(B.default,"ko"),r.registerLocaleData(R.default,"lv"),r.registerLocaleData(U.default,"ml"),r.registerLocaleData(V.default,"nb"),r.registerLocaleData(F.default,"nl"),r.registerLocaleData(N.default,"pl"),r.registerLocaleData(_.default,"pt-BR"),r.registerLocaleData(j.default,"pt-PT"),r.registerLocaleData(z.default,"ro"),r.registerLocaleData(L.default,"ru"),r.registerLocaleData(K.default,"sk"),r.registerLocaleData(q.default,"sr"),r.registerLocaleData(G.default,"sv"),r.registerLocaleData(W.default,"tr"),r.registerLocaleData(H.default,"uk"),r.registerLocaleData($.default,"zh-CN"),r.registerLocaleData(Q.default,"zh-TW");class J{}t.OssModule=J,J.ɵfac=function(e){return new(e||J)},J.ɵmod=Y.ɵɵdefineNgModule({type:J}),J.ɵinj=Y.ɵɵdefineInjector({providers:[r.DatePipe,d.SearchPipe,p.UserNamePipe],imports:[[o.CommonModule,a.FormsModule,l.InfiniteScrollModule,i.DragDropModule,c.ToastrModule,a.ReactiveFormsModule,s.RouterModule]]})},32051:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProvidersComponent=void 0;n(40349),n(85556);const r=n(70829),o=n(32621),a=n(85556),s=n(40349),l=n(57490),c=n(68012),d=n(64052),p=n(14992),u=n(69242),m=n(72596);function h(e,t){1&e&&(o.ɵɵelementStart(0,"p",2),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",3),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function v(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",10),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"providerIsDisabled")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"providerIsDisabled")))}const f=function(e){return["/providers",e]};function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"li"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",8),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",9),o.ɵɵtext(5),o.ɵɵtemplate(6,v,9,6,"ng-container",0),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(2),o.ɵɵproperty("routerLink",o.ɵɵpureFunction1(3,f,e.id)),o.ɵɵadvance(3),o.ɵɵtextInterpolate1(" ",e.name,"\n "),o.ɵɵadvance(1),o.ɵɵproperty("ngIf",!e.enabled)}}function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"ul",6),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,g,9,5,"li",7),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.providers)}}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,4,1,"ul",5),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.providers&&e.providers.length)}}function S(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,h,9,6,"p",1),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,x,4,1,"ng-container",0),o.ɵɵtext(5,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.loaded)}}function b(e,t){1&e&&(o.ɵɵelementStart(0,"p",2),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",3),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",10),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",4),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"providerIsDisabled")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"providerIsDisabled")))}function I(e,t){if(1&e&&(o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",15),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"app-avatar",16),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"a",17),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,w,9,6,"ng-container",0),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(4),o.ɵɵproperty("data",e.name)("circle",!0)("fontSize",14),o.ɵɵadvance(5),o.ɵɵproperty("routerLink",o.ɵɵpureFunction1(6,f,e.id)),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.enabled)}}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,15,8,"tr",7),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.providers)}}function E(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,C,7,1,"table",13),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.providers&&e.providers.length)}}function P(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"app-navbar"),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",11),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",12),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"h1"),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,b,9,6,"p",1),o.ɵɵtext(14,"\n "),o.ɵɵtemplate(15,E,4,1,"ng-container",0),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"app-footer"),o.ɵɵtext(19,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,3,"providers")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.loaded)}}class k{constructor(e,t){this.providerService=e,this.i18nService=t,this.vault=!1,this.loaded=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){document.body.classList.remove("layout_frontend"),yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.providerService.getAll();e.sort(r.Utils.getSortFunction(this.i18nService,"name")),this.providers=e,this.loaded=!0}))}}t.ProvidersComponent=k,k.ɵfac=function(e){return new(e||k)(o.ɵɵdirectiveInject(a.ProviderService),o.ɵɵdirectiveInject(s.I18nService))},k.ɵcmp=o.ɵɵdefineComponent({type:k,selectors:[["app-providers"]],inputs:{vault:"vault"},decls:4,vars:2,consts:[[4,"ngIf"],["class","text-muted",4,"ngIf"],[1,"text-muted"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"sr-only"],["class","bwi-ul card-ul carets",4,"ngIf"],[1,"bwi-ul","card-ul","carets"],[4,"ngFor","ngForOf"],[1,"text-body",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-li","bwi-caret-right"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-danger",3,"title"],[1,"container","page-content"],[1,"page-header","d-flex"],["class","table table-hover table-list",4,"ngIf"],[1,"table","table-hover","table-list"],["width","30"],["size","25",3,"data","circle","fontSize"],["href","#",3,"routerLink"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,S,6,2,"ng-container",0),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,P,20,5,"ng-container",0),o.ɵɵtext(3,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.vault),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.vault))},directives:[l.NgIf,l.NgForOf,c.RouterLinkWithHref,d.NavbarComponent,p.FooterComponent,u.AvatarComponent],pipes:[m.I18nPipe],encapsulation:2})},36055:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccessComponent=void 0;n(68012),n(91092),n(82058),n(39229),n(40349),n(99954);const r=n(70829),o=n(63290),a=n(49538),s=n(18),l=n(25237),c=n(32621),d=n(40349),p=n(39229),u=n(91092),m=n(99954),h=n(68012),v=n(82058),f=n(96832),g=n(637),y=n(57490),x=n(52900),S=n(966),b=n(17302),w=n(72596);function I(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",16),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(4,1,"sendCreatorIdentifier",e.creatorIdentifier))}}function C(e,t){1&e&&(c.ɵɵelementStart(0,"div",17),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"app-callout",18),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4),c.ɵɵpipe(5,"i18n"),c.ɵɵelementStart(6,"a",19),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,".\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"warning")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(5,5,"viewSendHiddenEmailWarning"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,7,"learnMore")))}function E(e,t){1&e&&(c.ɵɵelementStart(0,"div",20),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",21),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",22),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function P(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"div",23),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"p"),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementStart(10,"div",24),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"label",25),c.ɵɵtext(13),c.ɵɵpipe(14,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"input",26),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().password=t})),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"div",27),c.ɵɵtext(20,"\n "),c.ɵɵelementStart(21,"button",28),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"span"),c.ɵɵtext(24,"\n "),c.ɵɵelement(25,"i",29),c.ɵɵtext(26),c.ɵɵpipe(27,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelement(29,"i",30),c.ɵɵpipe(30,"i18n"),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(),t=c.ɵɵreference(1);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,7,"sendProtectedPassword")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,9,"sendProtectedPasswordDontKnow")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(14,11,"password")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",e.password),c.ɵɵadvance(5),c.ɵɵproperty("disabled",t.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(27,13,"continue"),"\n "),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(30,15,"loading"))}}function k(e,t){1&e&&(c.ɵɵelementStart(0,"div",23),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"sendAccessUnavailable"),"\n "))}function A(e,t){1&e&&(c.ɵɵelementStart(0,"div",23),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(2,1,"unexpectedError"),"\n "))}function O(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",38),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"sendHiddenByDefault")))}const T=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function M(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).toggleText()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",39),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(4,T,!e.showText,e.showText)),c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,2,"toggleVisibility"),"\n ")}}function D(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,O,3,3,"app-callout",33),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",24),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"textarea",34),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).sendText=t})),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,M,5,7,"button",35),c.ɵɵtext(10,"\n "),c.ɵɵelementStart(11,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).copyText()})),c.ɵɵtext(12,"\n "),c.ɵɵelement(13,"i",37),c.ɵɵtext(14),c.ɵɵpipe(15,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(16,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.send.text.hidden),c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.sendText),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.send.text.hidden),c.ɵɵadvance(5),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(15,4,"copyValue"),"\n ")}}function B(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",42),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(3).download()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",43),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate2("\n ",c.ɵɵpipeBind1(4,2,"downloadFile")," (",e.send.file.sizeName,")\n ")}}function R(e,t){1&e&&(c.ɵɵelementStart(0,"button",44),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",30),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,1,"loading")))}function U(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵelementEnd(),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,B,5,4,"button",40),c.ɵɵtext(6,"\n "),c.ɵɵtemplate(7,R,5,3,"button",41),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(3),c.ɵɵtextInterpolate(e.send.file.fileName),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.downloading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.downloading)}}function V(e,t){if(1&e&&(c.ɵɵelementStart(0,"p",45),c.ɵɵtext(1),c.ɵɵpipe(2,"date"),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(1),c.ɵɵtextInterpolate1("\n Expires: ",c.ɵɵpipeBind2(2,1,e.expirationDate,"medium"),"\n ")}}function F(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",23),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p",20),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"b"),c.ɵɵtext(5),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelement(8,"hr"),c.ɵɵtext(9,"\n "),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,D,17,6,"ng-container",31),c.ɵɵtext(12,"\n "),c.ɵɵtext(13,"\n "),c.ɵɵtemplate(14,U,9,3,"ng-container",31),c.ɵɵtext(15,"\n "),c.ɵɵtemplate(16,V,3,4,"p",32),c.ɵɵtext(17,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext();c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.send.name),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",e.send.type===e.sendType.Text),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.send.type===e.sendType.File),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.expirationDate)}}class N{constructor(e,t,n,i,r,o){this.i18nService=e,this.cryptoFunctionService=t,this.apiService=n,this.platformUtilsService=i,this.route=r,this.cryptoService=o,this.sendType=a.SendType,this.downloading=!1,this.loading=!0,this.passwordRequired=!1,this.showText=!1,this.unavailable=!1,this.error=!1,this.hideEmail=!1}get sendText(){return null==this.send||null==this.send.text?null:this.showText?this.send.text.text:this.send.text.maskedText}get expirationDate(){return null==this.send||null==this.send.expirationDate?null:this.send.expirationDate}get creatorIdentifier(){return null==this.send||null==this.send.creatorIdentifier?null:this.send.creatorIdentifier}ngOnInit(){this.route.params.subscribe((e=>i(this,void 0,void 0,(function*(){this.id=e.sendId,this.key=e.key,null!=this.key&&null!=this.id&&(yield this.load())}))))}download(){return i(this,void 0,void 0,(function*(){if(null==this.send||null==this.decKey)return;if(this.downloading)return;const e=yield this.apiService.getSendFileDownloadData(this.send,this.accessRequest);if(r.Utils.isNullOrWhitespace(e.url))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("missingSendFile"));this.downloading=!0;const t=yield fetch(new Request(e.url,{cache:"no-store"}));if(200!==t.status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),void(this.downloading=!1);try{const e=yield t.arrayBuffer(),n=yield this.cryptoService.decryptFromBytes(e,this.decKey);this.platformUtilsService.saveFile(window,n,null,this.send.file.fileName)}catch(n){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}this.downloading=!1}))}copyText(){this.platformUtilsService.copyToClipboard(this.send.text.text),this.platformUtilsService.showToast("success",null,this.i18nService.t("valueCopied",this.i18nService.t("sendTypeText")))}toggleText(){this.showText=!this.showText}load(){return i(this,void 0,void 0,(function*(){this.unavailable=!1,this.error=!1,this.hideEmail=!1;const e=r.Utils.fromUrlB64ToArray(this.key);if(this.accessRequest=new s.SendAccessRequest,null!=this.password){const t=yield this.cryptoFunctionService.pbkdf2(this.password,e,"sha256",1e5);this.accessRequest.password=r.Utils.fromBufferToB64(t)}try{let t=null;this.loading?t=yield this.apiService.postSendAccess(this.id,this.accessRequest):(this.formPromise=this.apiService.postSendAccess(this.id,this.accessRequest),t=yield this.formPromise),this.passwordRequired=!1;const n=new o.SendAccess(t);this.decKey=yield this.cryptoService.makeSendKey(e),this.send=yield n.decrypt(this.decKey),this.showText=null==this.send.text||!this.send.text.hidden}catch(t){t instanceof l.ErrorResponse&&(401===t.statusCode?this.passwordRequired=!0:404===t.statusCode?this.unavailable=!0:this.error=!0)}this.loading=!1,this.hideEmail=null==this.creatorIdentifier&&!this.passwordRequired&&!this.loading&&!this.unavailable}))}}t.AccessComponent=N,N.ɵfac=function(e){return new(e||N)(c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(p.CryptoFunctionService),c.ɵɵdirectiveInject(u.ApiService),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(h.ActivatedRoute),c.ɵɵdirectiveInject(v.CryptoService))},N.ɵcmp=c.ɵɵdefineComponent({type:N,selectors:[["app-send-access"]],decls:55,vars:23,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-center","mt-5"],[1,"col-12"],[1,"lead","text-center","mb-4"],["class","col-12 text-center",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"row","justify-content-center"],[1,"col-5"],[1,"card","d-block"],["class","card-body","class","text-center",4,"ngIf"],["class","card-body",4,"ngIf"],[1,"col-12","text-center","mt-5","text-muted"],[1,"mb-0"],["href","https://www.bitwarden.com/products/send?source=web-vault","target","_blank"],["href","https://vault.bitwarden.com/#/register","target","_blank"],[1,"col-12","text-center"],[1,"col-8"],["type","warning",3,"title"],["href","https://bitwarden.com/help/receive-send/","target","_blank"],[1,"text-center"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-2x","text-muted",3,"title"],[1,"sr-only"],[1,"card-body"],[1,"form-group"],["for","password"],["id","password","type","password","name","Password","required","","appInputVerbatim","","appAutofocus","",1,"text-monospace","form-control",3,"ngModel","ngModelChange"],[1,"d-flex"],["type","submit",1,"btn","btn-primary","btn-block","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-sign-in"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[4,"ngIf"],["class","text-center text-muted",4,"ngIf"],["type","tip",4,"ngIf"],["id","text","rows","8","name","Text","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["class","btn btn-block btn-link","type","button",3,"click",4,"ngIf"],["type","button",1,"btn","btn-block","btn-link",3,"click"],["aria-hidden","true",1,"bwi","bwi-copy"],["type","tip"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["class","btn btn-primary btn-block","type","button",3,"click",4,"ngIf"],["class","btn btn-primary btn-block","type","button","disabled","true",4,"ngIf"],["type","button",1,"btn","btn-primary","btn-block",3,"click"],["aria-hidden","true",1,"bwi","bwi-download"],["type","button","disabled","true",1,"btn","btn-primary","btn-block"],[1,"text-center","text-muted"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.load()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"div",3),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"p",4),c.ɵɵtext(8,"Bitwarden Send"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,I,6,4,"div",5),c.ɵɵtext(12,"\n "),c.ɵɵtemplate(13,C,11,9,"div",6),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"div",7),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"div",8),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"div",9),c.ɵɵtext(21,"\n "),c.ɵɵtemplate(22,E,9,6,"div",10),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,P,34,17,"div",11),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,k,3,3,"div",11),c.ɵɵtext(27,"\n "),c.ɵɵtemplate(28,A,3,3,"div",11),c.ɵɵtext(29,"\n "),c.ɵɵtemplate(30,F,18,4,"div",11),c.ɵɵtext(31,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(32,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"div",12),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"p",13),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelement(39,"br"),c.ɵɵtext(40),c.ɵɵpipe(41,"i18n"),c.ɵɵelementStart(42,"a",14),c.ɵɵtext(43,"Bitwarden Send"),c.ɵɵelementEnd(),c.ɵɵtext(44),c.ɵɵpipe(45,"i18n"),c.ɵɵelementStart(46,"a",15),c.ɵɵtext(47),c.ɵɵpipe(48,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(49),c.ɵɵpipe(50,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(53,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(54,"\n")),2&e&&(c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(11),c.ɵɵproperty("ngIf",null!=t.creatorIdentifier),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.hideEmail),c.ɵɵadvance(9),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&t.passwordRequired),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&t.unavailable),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&t.error),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading&&!t.passwordRequired&&t.send),c.ɵɵadvance(7),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(38,13,"sendAccessTaglineProductDesc"),""),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(41,15,"sendAccessTaglineLearnMore"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(45,17,"sendAccessTaglineOr"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(48,19,"sendAccessTaglineSignUp")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(50,21,"sendAccessTaglineTryToday"),"\n "))},directives:[f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.NgIf,x.CalloutComponent,f.DefaultValueAccessor,f.RequiredValidator,S.InputVerbatimDirective,b.AutofocusDirective,f.NgControlStatus,f.NgModel,y.NgClass],pipes:[w.I18nPipe,y.DatePipe],encapsulation:2})},47082:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;n(57490),n(57997),n(40349),n(70143),n(36424),n(99954),n(10685),n(94129),n(77243);const r=n(54484),o=n(32621),a=n(40349),s=n(99954),l=n(57997),c=n(57490),d=n(94129),p=n(77243),u=n(36424),m=n(10685),h=n(70143),v=n(96832),f=n(637),g=n(50553),y=n(80507),x=n(73560),S=n(52900),b=n(72596);function w(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,1,"sendDisabledWarning")))}function I(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"ul",50),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"li"),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"sendOptionsPolicyInEffect")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(10,4,"sendDisableHideEmailInEffect")))}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",25),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",52),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).send.type=t}))("change",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(3).typeChanged(t)})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",53),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("name","Type_",e.value,""),o.ɵɵpropertyInterpolate1("id","type_",e.value,""),o.ɵɵproperty("ngModel",n.send.type)("value",e.value)("checked",n.send.type===e.value),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("for","type_",e.value,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label"),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,C,7,7,"div",51),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,2,"whatTypeOfSend")),o.ɵɵadvance(3),o.ɵɵproperty("ngForOf",e.typeOptions)}}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",24),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",54),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"textarea",55),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.text.text=t})),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"small",20),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",24),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",25),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"input",56),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.text.hidden=t})),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",57),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,7,"sendTypeText")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.text.text)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,9,"sendTextDesc")),o.ɵɵadvance(8),o.ɵɵproperty("ngModel",e.send.text.hidden)("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,11,"textHiddenByDefault"))}}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"strong",58),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"file")),o.ɵɵadvance(2),o.ɵɵtextInterpolate2("\n ",e.send.file.fileName," (",e.send.file.sizeName,")\n ")}}function A(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",59),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",60),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"small",20),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,4,"file")),o.ɵɵadvance(3),o.ɵɵproperty("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate2("",o.ɵɵpipeBind1(10,6,"sendFileDesc")," ",o.ɵɵpipeBind1(11,8,"maxFileSize"),"")}}function O(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",24),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,k,6,5,"div",15),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,A,13,10,"div",15),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.editMode)}}function T(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",24),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",61),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",62),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).link=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"sendLinkLabel")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.link)}}function M(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",17),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",63),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",64),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).send.accessCount=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"currentAccessCount")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.accessCount)}}function D(e,t){1&e&&(o.ɵɵelementStart(0,"label",65),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"password")))}function B(e,t){1&e&&(o.ɵɵelementStart(0,"label",65),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(2,1,"newPassword")))}const R=function(e,t){return{"bwi-angle-down":e,"bwi-chevron-up":t}},U=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function V(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",14),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,w,6,3,"app-callout",15),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,13,6,"app-callout",15),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",17),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"small",20),o.ɵɵtext(17),o.ɵɵpipe(18,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵtemplate(22,E,11,4,"div",21),o.ɵɵtext(23,"\n "),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,P,27,13,"ng-container",15),o.ɵɵtext(26,"\n "),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,O,9,2,"ng-container",15),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"h3",22),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,T,8,4,"div",23),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"div",24),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",25),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"input",26),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().copyLink=t})),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"label",27),o.ɵɵtext(43),o.ɵɵpipe(44,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"div",28),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().toggleOptions()})),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"h3",29),o.ɵɵtext(51),o.ɵɵpipe(52,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelementStart(54,"a",30),o.ɵɵtext(55,"\n "),o.ɵɵelement(56,"i",31),o.ɵɵtext(57,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n "),o.ɵɵelementStart(60,"div",32),o.ɵɵtext(61,"\n "),o.ɵɵelementStart(62,"app-send-efflux-dates",33),o.ɵɵlistener("datesChanged",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().setDates(t)})),o.ɵɵtext(63,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementStart(65,"div",16),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",17),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"label",34),o.ɵɵtext(70),o.ɵɵpipe(71,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementStart(73,"input",35),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.maxAccessCount=t})),o.ɵɵelementEnd(),o.ɵɵtext(74,"\n "),o.ɵɵelementStart(75,"div",36),o.ɵɵtext(76),o.ɵɵpipe(77,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(78,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(79,"\n "),o.ɵɵtemplate(80,M,8,4,"div",37),o.ɵɵtext(81,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(82,"\n "),o.ɵɵelementStart(83,"div",16),o.ɵɵtext(84,"\n "),o.ɵɵelementStart(85,"div",17),o.ɵɵtext(86,"\n "),o.ɵɵtemplate(87,D,3,3,"label",38),o.ɵɵtext(88,"\n "),o.ɵɵtemplate(89,B,3,3,"label",38),o.ɵɵtext(90,"\n "),o.ɵɵelementStart(91,"div",39),o.ɵɵtext(92,"\n "),o.ɵɵelementStart(93,"input",40),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().password=t})),o.ɵɵelementEnd(),o.ɵɵtext(94,"\n "),o.ɵɵelementStart(95,"div",41),o.ɵɵtext(96,"\n "),o.ɵɵelementStart(97,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().togglePasswordVisible()})),o.ɵɵpipe(98,"i18n"),o.ɵɵtext(99,"\n "),o.ɵɵelement(100,"i",43),o.ɵɵtext(101,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(102,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(103,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(104,"\n "),o.ɵɵelementStart(105,"div",36),o.ɵɵtext(106),o.ɵɵpipe(107,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(108,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(109,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(110,"\n "),o.ɵɵelementStart(111,"div",24),o.ɵɵtext(112,"\n "),o.ɵɵelementStart(113,"label",44),o.ɵɵtext(114),o.ɵɵpipe(115,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(116,"\n "),o.ɵɵelementStart(117,"textarea",45),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.notes=t})),o.ɵɵelementEnd(),o.ɵɵtext(118,"\n "),o.ɵɵelementStart(119,"div",36),o.ɵɵtext(120),o.ɵɵpipe(121,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(122,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(123,"\n "),o.ɵɵelementStart(124,"div",24),o.ɵɵtext(125,"\n "),o.ɵɵelementStart(126,"div",25),o.ɵɵtext(127,"\n "),o.ɵɵelementStart(128,"input",46),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.hideEmail=t})),o.ɵɵelementEnd(),o.ɵɵtext(129,"\n "),o.ɵɵelementStart(130,"label",47),o.ɵɵtext(131),o.ɵɵpipe(132,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(133,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(134,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(135,"\n "),o.ɵɵelementStart(136,"div",24),o.ɵɵtext(137,"\n "),o.ɵɵelementStart(138,"div",25),o.ɵɵtext(139,"\n "),o.ɵɵelementStart(140,"input",48),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().send.disabled=t})),o.ɵɵelementEnd(),o.ɵɵtext(141,"\n "),o.ɵɵelementStart(142,"label",49),o.ɵɵtext(143),o.ɵɵpipe(144,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(145,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(146,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(147,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(148,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.disableSend&&e.disableHideEmail),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,43,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.name)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(18,45,"sendNameDesc")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!e.editMode),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.send.type===e.sendType.Text),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.send.type===e.sendType.File),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,47,"share")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.link),o.ɵɵadvance(6),o.ɵɵproperty("ngModel",e.copyLink),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(44,49,"copySendLinkOnSave")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(52,51,"options")),o.ɵɵadvance(5),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(69,R,!e.showOptions,e.showOptions)),o.ɵɵadvance(4),o.ɵɵproperty("hidden",!e.showOptions),o.ɵɵadvance(2),o.ɵɵproperty("initialDeletionDate",e.send.deletionDate)("initialExpirationDate",e.send.expirationDate)("editMode",e.editMode)("disabled",e.disableSend),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(71,53,"maxAccessCount")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.maxAccessCount)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(77,55,"maxAccessCountDesc")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",!e.hasPassword),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasPassword),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),o.ɵɵproperty("ngModel",e.password)("readOnly",e.disableSend),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(98,57,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(72,U,!e.showPassword,e.showPassword)),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(107,59,"sendPasswordDesc")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(115,61,"notes")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.send.notes)("readOnly",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(121,63,"sendNotesDesc")),o.ɵɵadvance(8),o.ɵɵproperty("ngModel",e.send.hideEmail)("disabled",e.disableHideEmail&&!e.send.hideEmail||e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(132,65,"hideEmail"),"\n "),o.ɵɵadvance(9),o.ɵɵproperty("ngModel",e.send.disabled)("disabled",e.disableSend),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(144,67,"disableThisSend"))}}function F(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",68,69),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).delete()})),o.ɵɵpipe(2,"i18n"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",70),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",71),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(2,6,"delete")),o.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function N(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",66),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,F,9,10,"button",67),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode)}}const _=function(e){return{loading:e}};class j extends r.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,r,a,s,l,o)}copyLinkToClipboard(e){const t=Object.create(null,{copyLinkToClipboard:{get:()=>super.copyLinkToClipboard}});return i(this,void 0,void 0,(function*(){return new Promise((n=>{window.setTimeout((()=>n(t.copyLinkToClipboard.call(this,e))),500)}))}))}}t.AddEditComponent=j,j.ɵfac=function(e){return new(e||j)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.EnvironmentService),o.ɵɵdirectiveInject(c.DatePipe),o.ɵɵdirectiveInject(d.SendService),o.ɵɵdirectiveInject(p.StateService),o.ɵɵdirectiveInject(u.MessagingService),o.ɵɵdirectiveInject(m.PolicyService),o.ɵɵdirectiveInject(h.LogService))},j.ɵcmp=o.ɵɵdefineComponent({type:j,selectors:[["app-send-add-edit"]],features:[o.ɵɵInheritDefinitionFeature],decls:44,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","sendAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","sendAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"ngClass","disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],[4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","readOnly","ngModelChange"],[1,"form-text","text-muted"],["class","row",4,"ngIf"],[1,"mt-5"],["class","form-group",4,"ngIf"],[1,"form-group"],[1,"form-check"],["type","checkbox","id","copy-link","name","CopyLink",1,"form-check-input",3,"ngModel","ngModelChange"],["for","copy-link",1,"form-check-label"],["id","options-header",1,"section-header","d-flex","flex-row","align-items-center","mt-5",3,"click"],[1,"mb-0","mr-2"],["href","#","appStopClick","","role","button",1,"mb-1"],["aria-hidden","true",1,"bwi",3,"ngClass"],["id","options",3,"hidden"],[3,"initialDeletionDate","initialExpirationDate","editMode","disabled","datesChanged"],["for","maxAccessCount"],["id","maxAccessCount","type","number","name","MaxAccessCount","min","1",1,"form-control",3,"ngModel","readOnly","ngModelChange"],[1,"form-text","text-muted","small"],["class","col-6 form-group",4,"ngIf"],["for","password",4,"ngIf"],[1,"input-group"],["id","password","name","Password",1,"form-control","text-monospace",3,"type","ngModel","readOnly","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","hideEmail","name","HideEmail",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","hideEmail",1,"form-check-label"],["type","checkbox","id","disabled","name","Disabled",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","disabled",1,"form-check-label"],[1,"mb-0"],["class","form-check",4,"ngFor","ngForOf"],["type","radio",1,"form-check-input",3,"ngModel","name","id","value","checked","ngModelChange","change"],[1,"form-check-label",3,"for"],["for","text"],["id","text","name","Text.Text","rows","6",1,"form-control",3,"ngModel","readOnly","ngModelChange"],["type","checkbox","id","text-hidden","name","Text.Hidden",1,"form-check-input",3,"ngModel","disabled","ngModelChange"],["for","text-hidden",1,"form-check-label"],[1,"d-block"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file",3,"disabled"],["for","link"],["type","text","readonly","","id","link","name","Link",1,"form-control",3,"ngModel","ngModelChange"],["for","accessCount"],["id","accessCount","type","text","name","AccessCount","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["for","password"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",6),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",7),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,V,149,75,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",9),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"button",10),o.ɵɵtext(25,"\n "),o.ɵɵelement(26,"i",11),o.ɵɵpipe(27,"i18n"),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"span"),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",12),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,N,4,1,"div",13),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(t.title),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,10,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",t.send),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(18,_,e.loading))("disabled",e.loading||t.disableSend),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(27,12,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,14,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,16,"cancel"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.send)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.A11yTitleDirective,c.NgIf,c.NgClass,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,v.CheckboxControlValueAccessor,y.StopClickDirective,x.EffluxDatesComponent,v.MinValidator,v.NumberValueAccessor,S.CalloutComponent,c.NgForOf,v.RadioControlValueAccessor],pipes:[b.I18nPipe],encapsulation:2})},73560:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(57490);const i=n(96832),r=(n(40349),n(99954),n(46215)),o=n(32621),a=n(40349),s=n(99954),l=n(57490),c=n(96832),d=n(80507),p=n(72596);function u(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",14),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"input",15),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("readOnly",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disableSend)}}function m(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.twentyFourHour),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.twelveHour,"\n ")}}function h(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",13),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",14),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"select",16),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,m,2,2,"option",17),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("readOnly",e.disableSend),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.safariDeletionTimePresetOptions)}}function v(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",19),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disabled)}}function f(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementContainerStart(1,10),o.ɵɵtext(2,"\n "),o.ɵɵtemplate(3,u,9,2,"ng-container",11),o.ɵɵtext(4,"\n "),o.ɵɵtemplate(5,h,12,3,"ng-container",11),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,v,4,1,"ng-container",12),o.ɵɵtext(8,"\n "),o.ɵɵelementContainerEnd(),o.ɵɵtext(9,"\n ")),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵproperty("ngSwitch",e.browserPath),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","firefox"),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","safari")}}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function y(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function x(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,y,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){o.ɵɵnextContext(2);const e=o.ɵɵreference(9);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function S(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"select",20),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,g,2,2,"option",17),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,x,4,1,"ng-container",4),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.deletionDatePresets),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",0===e.selectedDeletionDatePreset.value)}}function b(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,b,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(9);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",22),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().clearExpiration()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"clear"),"\n "))}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",24),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"input",25),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.twentyFourHour),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.twelveHour,"\n ")}}function P(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",24),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"select",26),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,E,2,2,"option",17),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode)("readOnly",e.disabled),o.ɵɵadvance(2),o.ɵɵproperty("required",!e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.safariExpirationTimePresetOptions)}}function k(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"input",27),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵproperty("readOnly",e.disabled)}}function A(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵelementContainerStart(1,10),o.ɵɵtext(2,"\n "),o.ɵɵtemplate(3,C,6,4,"div",23),o.ɵɵtext(4,"\n "),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,P,9,4,"div",23),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,k,4,1,"ng-container",12),o.ɵɵtext(9,"\n "),o.ɵɵelementContainerEnd(),o.ɵɵtext(10,"\n ")),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵproperty("ngSwitch",e.browserPath),o.ɵɵadvance(2),o.ɵɵproperty("ngSwitchCase","firefox"),o.ɵɵadvance(3),o.ɵɵproperty("ngSwitchCase","safari")}}function O(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function T(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function M(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,T,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){o.ɵɵnextContext(2);const e=o.ɵɵreference(32);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}function D(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"select",28),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,O,2,2,"option",17),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,M,4,1,"ng-container",4),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.expirationDatePresets),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",0===e.selectedExpirationDatePreset.value)}}function B(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1," "),o.ɵɵelementContainerEnd())}function R(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,B,2,0,"ng-container",21),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(32);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",e)}}class U extends r.EffluxDatesComponent{constructor(e,t,n){super(e,t,n),this.i18nService=e,this.platformUtilsService=t,this.datePipe=n}}t.EffluxDatesComponent=U,U.ɵfac=function(e){return new(e||U)(o.ɵɵdirectiveInject(a.I18nService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.DatePipe))},U.ɵcmp=o.ɵɵdefineComponent({type:U,selectors:[["app-send-efflux-dates"]],features:[o.ɵɵProvidersFeature([],[{provide:i.ControlContainer,useExisting:i.NgForm}]),o.ɵɵInheritDefinitionFeature],decls:44,vars:18,consts:[[1,"row",3,"formGroup"],[1,"col-6","form-group"],["for","deletionDate"],["deletionDateCustom",""],[4,"ngIf"],[1,"form-text","text-muted","small"],[1,"d-flex"],["for","expirationDate"],["href","#","appStopClick","","class","ml-auto",3,"click",4,"ngIf"],["expirationDateCustom",""],[3,"ngSwitch"],[4,"ngSwitchCase"],[4,"ngSwitchDefault"],[1,"d-flex","justify-content-around"],["id","deletionDateCustomFallback","type","date","name","DeletionDateFallback","formControlName","fallbackDeletionDate","required","","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"readOnly"],["id","deletionTimeCustomFallback","type","time","name","DeletionTimeDate","formControlName","fallbackDeletionTime","required","","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"readOnly"],["id","deletionTimeCustomFallback","formControlName","fallbackDeletionTime","name","SafariDeletionTime",1,"form-control","mt-1","ml-1",3,"required"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["id","deletionDateCustom","type","datetime-local","name","DeletionDate","formControlName","defaultDeletionDateTime","required","","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","deletionDate","name","SelectedDeletionDatePreset","formControlName","selectedDeletionDatePreset","required","",1,"form-control"],[4,"ngTemplateOutlet"],["href","#","appStopClick","",1,"ml-auto",3,"click"],["class","d-flex justify-content-around",4,"ngSwitchCase"],["id","expirationDateCustomFallback","type","date","name","ExpirationDateFallback","formControlName","fallbackExpirationDate","placeholder","MM/DD/YYYY","data-date-format","mm/dd/yyyy",1,"form-control","mt-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","type","time","name","ExpirationTimeFallback","formControlName","fallbackExpirationTime","placeholder","HH:MM AM/PM",1,"form-control","mt-1","ml-1",3,"required","readOnly"],["id","expirationTimeCustomFallback","formControlName","fallbackExpirationTime","name","SafariExpirationTime",1,"form-control","mt-1","ml-1",3,"required"],["id","expirationDateCustom","type","datetime-local","name","ExpirationDate","formControlName","defaultExpirationDateTime","placeholder","MM/DD/YYYY HH:MM AM/PM",1,"form-control","mt-1",3,"readOnly"],["id","expirationDate","name","SelectedExpirationDatePreset","formControlName","selectedExpirationDatePreset","required","",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",2),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,f,10,3,"ng-template",null,3,o.ɵɵtemplateRefExtractor),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,S,9,2,"div",4),o.ɵɵtext(12,"\n "),o.ɵɵtemplate(13,w,4,1,"div",4),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",5),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",1),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",6),o.ɵɵtext(23,"\n "),o.ɵɵelementStart(24,"label",7),o.ɵɵtext(25),o.ɵɵpipe(26,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,I,3,3,"a",8),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵtemplate(31,A,11,3,"ng-template",null,9,o.ɵɵtemplateRefExtractor),o.ɵɵtext(33,"\n "),o.ɵɵtemplate(34,D,9,2,"div",4),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,R,4,1,"div",4),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",5),o.ɵɵtext(39),o.ɵɵpipe(40,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n")),2&e&&(o.ɵɵproperty("formGroup",t.datesForm),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,10,"deletionDate")),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",!t.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.editMode),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,12,"deletionDateDesc")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(26,14,"expirationDate")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.editMode&&!t.disabled),o.ɵɵadvance(6),o.ɵɵproperty("ngIf",!t.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.editMode),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(40,16,"expirationDateDesc")))},directives:[c.NgControlStatusGroup,c.FormGroupDirective,l.NgIf,l.NgSwitch,l.NgSwitchCase,l.NgSwitchDefault,c.DefaultValueAccessor,c.NgControlStatus,c.FormControlName,c.RequiredValidator,c.SelectControlValueAccessor,l.NgForOf,c.NgSelectOption,c.ɵNgSelectMultipleOption,l.NgTemplateOutlet,d.StopClickDirective],pipes:[p.I18nPipe],encapsulation:2})},99758:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SendComponent=void 0;const r=n(32621),o=n(88154),a=n(47082),s=(n(67569),n(57997),n(40349),n(70143),n(99954),n(10685),n(14170),n(94129),n(29546),n(32621)),l=n(94129),c=n(40349),d=n(99954),p=n(57997),u=n(14170),m=n(10685),h=n(29546),v=n(67569),f=n(70143),g=n(57490),y=n(96832),x=n(17302),S=n(80507),b=n(637),w=n(52900),I=n(92521),C=n(50553),E=n(72596),P=["sendAddEdit"];function k(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",25),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"span"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"sendDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(5,4,"sendDisabledWarning")))}function A(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",26),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function O(e,t){1&e&&s.ɵɵelement(0,"i",47)}function T(e,t){1&e&&s.ɵɵelement(0,"i",48)}function M(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",49),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"disabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"disabled")))}function D(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",50),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"password")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"password")))}function B(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",51),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"maxAccessCountReached")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"maxAccessCountReached")))}function R(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",52),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"expired")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"expired")))}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",53),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"pendingDeletion")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"pendingDeletion")))}function V(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",42),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).removePassword(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",54),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"removePassword"),"\n "))}function F(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",30),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",31),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,O,1,0,"i",32),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,T,1,0,"i",33),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"td",34),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"a",35),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).editSend(t)})),s.ɵɵtext(15),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,M,9,6,"ng-container",18),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,D,9,6,"ng-container",18),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,B,9,6,"ng-container",18),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,R,9,6,"ng-container",18),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,U,9,6,"ng-container",18),s.ɵɵtext(26,"\n "),s.ɵɵelement(27,"br"),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"small",36),s.ɵɵtext(30),s.ɵɵpipe(31,"date"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"td",37),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"div",38),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"button",39),s.ɵɵpipe(39,"i18n"),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",40),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"div",41),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"a",42),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).copy(t)})),s.ɵɵtext(47,"\n "),s.ɵɵelement(48,"i",43),s.ɵɵtext(49),s.ɵɵpipe(50,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵtemplate(52,V,5,3,"a",44),s.ɵɵtext(53,"\n "),s.ɵɵelementStart(54,"a",45),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(2).delete(t)})),s.ɵɵtext(55,"\n "),s.ɵɵelement(56,"i",46),s.ɵɵtext(57),s.ɵɵpipe(58,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(62,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(2);s.ɵɵadvance(6),s.ɵɵproperty("ngIf",e.type==n.sendType.File),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.type==n.sendType.Text),s.ɵɵadvance(7),s.ɵɵtextInterpolate(e.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.disabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.password),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.maxAccessCountReached),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.expired),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.pendingDelete),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(31,13,e.deletionDate,"medium")),s.ɵɵadvance(8),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(39,16,"options")),s.ɵɵadvance(11),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(50,18,"copySendLink"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.password&&!n.disableSend),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(58,20,"delete"),"\n ")}}function N(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",28),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,F,63,22,"tr",29),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.filteredSends)}}function _(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",26),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",27),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"button",56),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).addSend()})),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",57),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"noSendsInList")),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.disableSend),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(10,5,"createSend"),"\n ")}}function z(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",55),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,_,9,6,"ng-container",18),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,j,12,7,"ng-container",18),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.loaded)}}function L(e,t){}const K=function(e){return{active:e}},q="SendComponent";class G extends o.SendComponent{constructor(e,t,n,i,r,o,a,s,l,c){super(e,t,n,i,r,o,a,c),this.modalService=s,this.broadcasterService=l}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){yield e.ngOnInit.call(this),yield this.load(),this.broadcasterService.subscribe(q,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield this.load())}))))}))}))}ngOnDestroy(){this.broadcasterService.unsubscribe(q)}addSend(){return i(this,void 0,void 0,(function*(){if(this.disableSend)return;(yield this.editSend(null)).type=this.type}))}editSend(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(a.AddEditComponent,this.sendAddEditModalRef,(n=>{n.sendId=null==e?null:e.id,n.onSavedSend.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.load()})))),n.onDeletedSend.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.load()}))))}));return n}))}}t.SendComponent=G,G.ɵfac=function(e){return new(e||G)(s.ɵɵdirectiveInject(l.SendService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.EnvironmentService),s.ɵɵdirectiveInject(s.NgZone),s.ɵɵdirectiveInject(u.SearchService),s.ɵɵdirectiveInject(m.PolicyService),s.ɵɵdirectiveInject(h.ModalService),s.ɵɵdirectiveInject(v.BroadcasterService),s.ɵɵdirectiveInject(f.LogService))},G.ɵcmp=s.ɵɵdefineComponent({type:G,selectors:[["app-send"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(P,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.sendAddEditModalRef=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:94,vars:40,consts:[[1,"container","page-content"],["type","warning",3,"title",4,"ngIf"],[1,"row"],[1,"col-3","groupings"],[1,"card","vault-filters"],[1,"card-header","d-flex"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"bwi-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"bwi","bwi-li","bwi-fw","bwi-filter"],[1,"bwi","bwi-li","bwi-fw","bwi-file-text"],[1,"bwi","bwi-li","bwi-fw","bwi-file"],[1,"col-9"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["class","table table-hover table-list",4,"ngIf"],["class","no-items",4,"ngIf"],["sendAddEdit",""],["type","warning",3,"title"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["aria-hidden","true",1,"icon"],["class","bwi bwi-fw bwi-lg bwi-file",4,"ngIf"],["class","bwi bwi-fw bwi-lg bwi-file-text",4,"ngIf"],[1,"reduced-lh","wrap"],["href","#","appStopClick","","appStopProp","",3,"click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],[1,"bwi","bwi-fw","bwi-lg","bwi-file"],[1,"bwi","bwi-fw","bwi-lg","bwi-file-text"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-key",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-ban",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-clock",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-trash",3,"title"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],[1,"no-items"],[1,"btn","btn-outline-primary",3,"disabled","click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,k,7,6,"app-callout",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",4),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",5),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",6),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"ul",8),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"li",9),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"a",10),s.ɵɵlistener("click",(function(){return t.selectAll()})),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"i",11),s.ɵɵtext(26),s.ɵɵpipe(27,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"h3"),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"ul",8),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"li",9),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"a",10),s.ɵɵlistener("click",(function(){return t.selectType(t.sendType.Text)})),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",12),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"li",9),s.ɵɵtext(47,"\n "),s.ɵɵelementStart(48,"a",10),s.ɵɵlistener("click",(function(){return t.selectType(t.sendType.File)})),s.ɵɵtext(49,"\n "),s.ɵɵelement(50,"i",13),s.ɵɵtext(51),s.ɵɵpipe(52,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"div",14),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"div",15),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"h1"),s.ɵɵtext(64),s.ɵɵpipe(65,"i18n"),s.ɵɵelementStart(66,"small",16,17),s.ɵɵtext(68,"\n "),s.ɵɵtemplate(69,A,9,6,"ng-container",18),s.ɵɵtext(70,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(71,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementStart(73,"div",19),s.ɵɵtext(74,"\n "),s.ɵɵelementStart(75,"button",20),s.ɵɵlistener("click",(function(){return t.addSend()})),s.ɵɵtext(76,"\n "),s.ɵɵelement(77,"i",21),s.ɵɵtext(78),s.ɵɵpipe(79,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(80,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(81,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵtext(83,"\n "),s.ɵɵtemplate(84,N,7,1,"table",22),s.ɵɵtext(85,"\n "),s.ɵɵtemplate(86,z,6,2,"div",23),s.ɵɵtext(87,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(88,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(90,"\n"),s.ɵɵtemplate(91,L,0,0,"ng-template",null,24,s.ɵɵtemplateRefExtractor),s.ɵɵtext(93,"\n")),2&e){const e=s.ɵɵreference(67);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.disableSend),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(12,18,"filters"),"\n "),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||s.ɵɵpipeBind1(17,20,"searchSends")),s.ɵɵproperty("ngModel",t.searchText),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(34,K,t.selectedAll)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(27,22,"allSends"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(33,24,"types")),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(36,K,t.selectedType===t.sendType.Text)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(43,26,"sendTypeText"),"\n "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(38,K,t.selectedType===t.sendType.File)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(52,28,"sendTypeFile"),"\n "),s.ɵɵadvance(13),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(65,30,"send"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("appApiAction",t.actionPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.loading),s.ɵɵadvance(6),s.ɵɵproperty("disabled",t.disableSend),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(79,32,"createSend"),"\n "),s.ɵɵadvance(6),s.ɵɵproperty("ngIf",t.filteredSends&&t.filteredSends.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.filteredSends&&!t.filteredSends.length)}},directives:[g.NgIf,y.DefaultValueAccessor,x.AutofocusDirective,y.NgControlStatus,y.NgModel,g.NgClass,S.StopClickDirective,b.ApiActionDirective,w.CalloutComponent,g.NgForOf,I.StopPropDirective,C.A11yTitleDirective],pipes:[E.I18nPipe,g.DatePipe],encapsulation:2})},62858:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EventOptions=t.EventInfo=t.EventService=void 0;n(40349),n(10685);const r=n(83914),o=n(12657),a=n(40251),s=n(32621),l=n(40349),c=n(10685);class d{constructor(e,t){this.i18nService=e,this.policyService=t}getDefaultDateFilters(){const e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate(),23,59);e.setDate(e.getDate()-30);const n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),0,0);return[this.toDateTimeLocalString(n),this.toDateTimeLocalString(t)]}formatDateFilters(e,t){const n=new Date(e),i=new Date(t+":59.999");if(isNaN(n.getTime())||isNaN(i.getTime())||i<n)throw new Error("Invalid date range.");return[n.toISOString(),i.toISOString()]}getEventInfo(e,t=new p){return i(this,void 0,void 0,(function*(){const n=this.getAppInfo(e.deviceType),{message:i,humanReadableMessage:r}=yield this.getEventMessage(e,t);return{message:i,humanReadableMessage:r,appIcon:n[0],appName:n[1]}}))}getEventMessage(e,t){return i(this,void 0,void 0,(function*(){let n="",i="";switch(e.type){case o.EventType.User_LoggedIn:n=i=this.i18nService.t("loggedIn");break;case o.EventType.User_ChangedPassword:n=i=this.i18nService.t("changedPassword");break;case o.EventType.User_Updated2fa:n=i=this.i18nService.t("enabledUpdated2fa");break;case o.EventType.User_Disabled2fa:n=i=this.i18nService.t("disabled2fa");break;case o.EventType.User_Recovered2fa:n=i=this.i18nService.t("recovered2fa");break;case o.EventType.User_FailedLogIn:n=i=this.i18nService.t("failedLogin");break;case o.EventType.User_FailedLogIn2fa:n=i=this.i18nService.t("failedLogin2fa");break;case o.EventType.User_ClientExportedVault:n=i=this.i18nService.t("exportedVault");break;case o.EventType.User_UpdatedTempPassword:n=i=this.i18nService.t("updatedMasterPassword");break;case o.EventType.User_MigratedKeyToKeyConnector:n=i=this.i18nService.t("migratedKeyConnector");break;case o.EventType.Cipher_Created:n=this.i18nService.t("createdItemId",this.formatCipherId(e,t)),i=this.i18nService.t("createdItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_Updated:n=this.i18nService.t("editedItemId",this.formatCipherId(e,t)),i=this.i18nService.t("editedItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_Deleted:n=this.i18nService.t("permanentlyDeletedItemId",this.formatCipherId(e,t)),i=this.i18nService.t("permanentlyDeletedItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_SoftDeleted:n=this.i18nService.t("deletedItemId",this.formatCipherId(e,t)),i=this.i18nService.t("deletedItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_Restored:n=this.i18nService.t("restoredItemId",this.formatCipherId(e,t)),i=this.i18nService.t("restoredItemId",this.formatCipherId(e,t));break;case o.EventType.Cipher_AttachmentCreated:n=this.i18nService.t("createdAttachmentForItem",this.formatCipherId(e,t)),i=this.i18nService.t("createdAttachmentForItem",this.getShortId(e.cipherId));break;case o.EventType.Cipher_AttachmentDeleted:n=this.i18nService.t("deletedAttachmentForItem",this.formatCipherId(e,t)),i=this.i18nService.t("deletedAttachmentForItem",this.getShortId(e.cipherId));break;case o.EventType.Cipher_Shared:n=this.i18nService.t("movedItemIdToOrg",this.formatCipherId(e,t)),i=this.i18nService.t("movedItemIdToOrg",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientViewed:n=this.i18nService.t("viewedItemId",this.formatCipherId(e,t)),i=this.i18nService.t("viewedItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientToggledPasswordVisible:n=this.i18nService.t("viewedPasswordItemId",this.formatCipherId(e,t)),i=this.i18nService.t("viewedPasswordItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientToggledHiddenFieldVisible:n=this.i18nService.t("viewedHiddenFieldItemId",this.formatCipherId(e,t)),i=this.i18nService.t("viewedHiddenFieldItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientToggledCardCodeVisible:n=this.i18nService.t("viewedSecurityCodeItemId",this.formatCipherId(e,t)),i=this.i18nService.t("viewedSecurityCodeItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientCopiedHiddenField:n=this.i18nService.t("copiedHiddenFieldItemId",this.formatCipherId(e,t)),i=this.i18nService.t("copiedHiddenFieldItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientCopiedPassword:n=this.i18nService.t("copiedPasswordItemId",this.formatCipherId(e,t)),i=this.i18nService.t("copiedPasswordItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientCopiedCardCode:n=this.i18nService.t("copiedSecurityCodeItemId",this.formatCipherId(e,t)),i=this.i18nService.t("copiedSecurityCodeItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_ClientAutofilled:n=this.i18nService.t("autofilledItemId",this.formatCipherId(e,t)),i=this.i18nService.t("autofilledItemId",this.getShortId(e.cipherId));break;case o.EventType.Cipher_UpdatedCollections:n=this.i18nService.t("editedCollectionsForItem",this.formatCipherId(e,t)),i=this.i18nService.t("editedCollectionsForItem",this.getShortId(e.cipherId));break;case o.EventType.Collection_Created:n=this.i18nService.t("createdCollectionId",this.formatCollectionId(e)),i=this.i18nService.t("createdCollectionId",this.getShortId(e.collectionId));break;case o.EventType.Collection_Updated:n=this.i18nService.t("editedCollectionId",this.formatCollectionId(e)),i=this.i18nService.t("editedCollectionId",this.getShortId(e.collectionId));break;case o.EventType.Collection_Deleted:n=this.i18nService.t("deletedCollectionId",this.formatCollectionId(e)),i=this.i18nService.t("deletedCollectionId",this.getShortId(e.collectionId));break;case o.EventType.Group_Created:n=this.i18nService.t("createdGroupId",this.formatGroupId(e)),i=this.i18nService.t("createdGroupId",this.getShortId(e.groupId));break;case o.EventType.Group_Updated:n=this.i18nService.t("editedGroupId",this.formatGroupId(e)),i=this.i18nService.t("editedGroupId",this.getShortId(e.groupId));break;case o.EventType.Group_Deleted:n=this.i18nService.t("deletedGroupId",this.formatGroupId(e)),i=this.i18nService.t("deletedGroupId",this.getShortId(e.groupId));break;case o.EventType.OrganizationUser_Invited:n=this.i18nService.t("invitedUserId",this.formatOrgUserId(e)),i=this.i18nService.t("invitedUserId",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_Confirmed:n=this.i18nService.t("confirmedUserId",this.formatOrgUserId(e)),i=this.i18nService.t("confirmedUserId",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_Updated:n=this.i18nService.t("editedUserId",this.formatOrgUserId(e)),i=this.i18nService.t("editedUserId",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_Removed:n=this.i18nService.t("removedUserId",this.formatOrgUserId(e)),i=this.i18nService.t("removedUserId",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_UpdatedGroups:n=this.i18nService.t("editedGroupsForUser",this.formatOrgUserId(e)),i=this.i18nService.t("editedGroupsForUser",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_UnlinkedSso:n=this.i18nService.t("unlinkedSsoUser",this.formatOrgUserId(e)),i=this.i18nService.t("unlinkedSsoUser",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_ResetPassword_Enroll:n=this.i18nService.t("eventEnrollPasswordReset",this.formatOrgUserId(e)),i=this.i18nService.t("eventEnrollPasswordReset",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_ResetPassword_Withdraw:n=this.i18nService.t("eventWithdrawPasswordReset",this.formatOrgUserId(e)),i=this.i18nService.t("eventWithdrawPasswordReset",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_AdminResetPassword:n=this.i18nService.t("eventAdminPasswordReset",this.formatOrgUserId(e)),i=this.i18nService.t("eventAdminPasswordReset",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_ResetSsoLink:n=this.i18nService.t("eventResetSsoLink",this.formatOrgUserId(e)),i=this.i18nService.t("eventResetSsoLink",this.getShortId(e.organizationUserId));break;case o.EventType.OrganizationUser_FirstSsoLogin:n=this.i18nService.t("firstSsoLogin",this.formatOrgUserId(e)),i=this.i18nService.t("firstSsoLogin",this.getShortId(e.organizationUserId));break;case o.EventType.Organization_Updated:n=i=this.i18nService.t("editedOrgSettings");break;case o.EventType.Organization_PurgedVault:n=i=this.i18nService.t("purgedOrganizationVault");break;case o.EventType.Organization_VaultAccessed:n=i=this.i18nService.t("vaultAccessedByProvider");break;case o.EventType.Organization_EnabledSso:n=i=this.i18nService.t("enabledSso");break;case o.EventType.Organization_DisabledSso:n=i=this.i18nService.t("disabledSso");break;case o.EventType.Organization_EnabledKeyConnector:n=i=this.i18nService.t("enabledKeyConnector");break;case o.EventType.Organization_DisabledKeyConnector:n=i=this.i18nService.t("disabledKeyConnector");break;case o.EventType.Policy_Updated:n=this.i18nService.t("modifiedPolicyId",this.formatPolicyId(e));const r=(yield this.policyService.getAll()).filter((t=>t.id===e.policyId))[0];let s=this.getShortId(e.policyId);null!=r&&(s=a.PolicyType[r.type]),i=this.i18nService.t("modifiedPolicyId",s);break;case o.EventType.ProviderUser_Invited:n=this.i18nService.t("invitedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("invitedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Confirmed:n=this.i18nService.t("confirmedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("confirmedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Updated:n=this.i18nService.t("editedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("editedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderUser_Removed:n=this.i18nService.t("removedUserId",this.formatProviderUserId(e)),i=this.i18nService.t("removedUserId",this.getShortId(e.providerUserId));break;case o.EventType.ProviderOrganization_Created:n=this.i18nService.t("createdOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("createdOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_Added:n=this.i18nService.t("addedOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("addedOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_Removed:n=this.i18nService.t("removedOrganizationId",this.formatProviderOrganizationId(e)),i=this.i18nService.t("removedOrganizationId",this.getShortId(e.providerOrganizationId));break;case o.EventType.ProviderOrganization_VaultAccessed:n=this.i18nService.t("accessedClientVault",this.formatProviderOrganizationId(e)),i=this.i18nService.t("accessedClientVault",this.getShortId(e.providerOrganizationId))}return{message:""===n?null:n,humanReadableMessage:""===i?null:i}}))}getAppInfo(e){switch(e){case r.DeviceType.Android:return["bwi-android",this.i18nService.t("mobile")+" - Android"];case r.DeviceType.iOS:return["bwi-apple",this.i18nService.t("mobile")+" - iOS"];case r.DeviceType.UWP:return["bwi-windows",this.i18nService.t("mobile")+" - Windows"];case r.DeviceType.ChromeExtension:return["bwi-chrome",this.i18nService.t("extension")+" - Chrome"];case r.DeviceType.FirefoxExtension:return["bwi-firefox",this.i18nService.t("extension")+" - Firefox"];case r.DeviceType.OperaExtension:return["bwi-opera",this.i18nService.t("extension")+" - Opera"];case r.DeviceType.EdgeExtension:return["bwi-edge",this.i18nService.t("extension")+" - Edge"];case r.DeviceType.VivaldiExtension:return["bwi-puzzle",this.i18nService.t("extension")+" - Vivaldi"];case r.DeviceType.SafariExtension:return["bwi-safari",this.i18nService.t("extension")+" - Safari"];case r.DeviceType.WindowsDesktop:return["bwi-windows",this.i18nService.t("desktop")+" - Windows"];case r.DeviceType.MacOsDesktop:return["bwi-apple",this.i18nService.t("desktop")+" - macOS"];case r.DeviceType.LinuxDesktop:return["bwi-linux",this.i18nService.t("desktop")+" - Linux"];case r.DeviceType.ChromeBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Chrome"];case r.DeviceType.FirefoxBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Firefox"];case r.DeviceType.OperaBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Opera"];case r.DeviceType.SafariBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Safari"];case r.DeviceType.VivaldiBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Vivaldi"];case r.DeviceType.EdgeBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - Edge"];case r.DeviceType.IEBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - IE"];case r.DeviceType.UnknownBrowser:return["bwi-globe",this.i18nService.t("webVault")+" - "+this.i18nService.t("unknown")];default:return["bwi-globe",this.i18nService.t("unknown")]}}formatCipherId(e,t){const n=this.getShortId(e.cipherId);if(null==e.organizationId||!t.cipherInfo)return"<code>"+n+"</code>";const i=this.makeAnchor(n);return i.setAttribute("href","#/organizations/"+e.organizationId+"/vault?search="+n+"&viewEvents="+e.cipherId),i.outerHTML}formatGroupId(e){const t=this.getShortId(e.groupId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/groups?search="+t),n.outerHTML}formatCollectionId(e){const t=this.getShortId(e.collectionId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/collections?search="+t),n.outerHTML}formatOrgUserId(e){const t=this.getShortId(e.organizationUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/people?search="+t+"&viewEvents="+e.organizationUserId),n.outerHTML}formatProviderUserId(e){const t=this.getShortId(e.providerUserId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/manage/people?search="+t+"&viewEvents="+e.providerUserId),n.outerHTML}formatProviderOrganizationId(e){const t=this.getShortId(e.providerOrganizationId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/clients?search="+t),n.outerHTML}formatPolicyId(e){const t=this.getShortId(e.policyId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/policies?policyId="+e.policyId),n.outerHTML}makeAnchor(e){const t=document.createElement("a");return t.title=this.i18nService.t("view"),t.innerHTML="<code>"+e+"</code>",t}getShortId(e){return null==e?void 0:e.substring(0,8)}toDateTimeLocalString(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())+"T"+this.pad(e.getHours())+":"+this.pad(e.getMinutes())}pad(e){const t=Math.floor(Math.abs(e));return(t<10?"0":"")+t}}t.EventService=d,d.ɵfac=function(e){return new(e||d)(s.ɵɵinject(l.I18nService),s.ɵɵinject(c.PolicyService))},d.ɵprov=s.ɵɵdefineInjectable({token:d,factory:d.ɵfac});t.EventInfo=class{};class p{constructor(){this.cipherInfo=!0}}t.EventOptions=p},78893:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModalService=void 0;n(32621);const i=n(19755),r=n(53232),o=(n(36424),n(29546)),a=n(70829),s=n(32621),l=n(36424);class c extends o.ModalService{constructor(e,t,n,i){super(e,t,n),this.messagingService=i,this.el=null,this.modalOpen=!1}setupHandlers(e){e.onCreated.pipe(r.first()).subscribe((()=>{const t=Array.from(document.querySelectorAll(".modal"));t.length>0&&(this.el=i(t[0]),this.el.modal("show"),this.el.on("show.bs.modal",(()=>{e.show(),this.messagingService.send("modalShow")})),this.el.on("shown.bs.modal",(()=>{e.shown(),this.messagingService.send("modalShown"),a.Utils.isMobileBrowser||this.el.find("*[appAutoFocus]").focus()})),this.el.on("hide.bs.modal",(()=>{this.messagingService.send("modalClose")})),this.el.on("hidden.bs.modal",(()=>{e.closed(),this.messagingService.send("modalClosed")})))})),e.onClose.pipe(r.first()).subscribe((()=>{null!=this.el&&this.el.modal("hide")}))}}t.ModalService=c,c.ɵfac=function(e){return new(e||c)(s.ɵɵinject(s.ComponentFactoryResolver),s.ɵɵinject(s.ApplicationRef),s.ɵɵinject(s.Injector),s.ɵɵinject(l.MessagingService))},c.ɵprov=s.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},86950:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationGuardService=void 0;n(68012),n(40349),n(94308),n(99954);const r=n(32621),o=n(68012),a=n(99954),s=n(40349),l=n(94308);class c{constructor(e,t,n,i){this.router=e,this.platformUtilsService=t,this.i18nService=n,this.organizationService=i}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.organizationService.get(e.params.organizationId);return null==t?(this.router.navigate(["/"]),!1):!(!t.isOwner&&!t.enabled)||(this.platformUtilsService.showToast("error",null,this.i18nService.t("organizationIsDisabled")),this.router.navigate(["/"]),!1)}))}}t.OrganizationGuardService=c,c.ɵfac=function(e){return new(e||c)(r.ɵɵinject(o.Router),r.ɵɵinject(a.PlatformUtilsService),r.ɵɵinject(s.I18nService),r.ɵɵinject(l.OrganizationService))},c.ɵprov=r.ɵɵdefineInjectable({token:c,factory:c.ɵfac})},81616:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationTypeGuardService=void 0;n(68012),n(94308);const r=n(49618),o=n(32621),a=n(94308),s=n(68012);class l{constructor(e,t){this.organizationService=e,this.router=t}canActivate(e){return i(this,void 0,void 0,(function*(){const t=yield this.organizationService.get(e.params.organizationId),n=null==e.data?null:e.data.permissions;return!!(-1!==n.indexOf(r.Permissions.AccessEventLogs)&&t.canAccessEventLogs||-1!==n.indexOf(r.Permissions.AccessImportExport)&&t.canAccessImportExport||-1!==n.indexOf(r.Permissions.AccessReports)&&t.canAccessReports||-1!==n.indexOf(r.Permissions.CreateNewCollections)&&t.canCreateNewCollections||-1!==n.indexOf(r.Permissions.EditAnyCollection)&&t.canEditAnyCollection||-1!==n.indexOf(r.Permissions.DeleteAnyCollection)&&t.canDeleteAnyCollection||-1!==n.indexOf(r.Permissions.EditAssignedCollections)&&t.canEditAssignedCollections||-1!==n.indexOf(r.Permissions.DeleteAssignedCollections)&&t.canDeleteAssignedCollections||-1!==n.indexOf(r.Permissions.ManageGroups)&&t.canManageGroups||-1!==n.indexOf(r.Permissions.ManageOrganization)&&t.isOwner||-1!==n.indexOf(r.Permissions.ManagePolicies)&&t.canManagePolicies||-1!==n.indexOf(r.Permissions.ManageUsers)&&t.canManageUsers||-1!==n.indexOf(r.Permissions.ManageUsersPassword)&&t.canManageUsersPassword||-1!==n.indexOf(r.Permissions.ManageSso)&&t.canManageSso)||(this.router.navigate(["/organizations",t.id]),!1)}))}}t.OrganizationTypeGuardService=l,l.ɵfac=function(e){return new(e||l)(o.ɵɵinject(a.OrganizationService),o.ɵɵinject(s.Router))},l.ɵprov=o.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},15524:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyListService=void 0;t.PolicyListService=class{constructor(){this.policies=[]}addPolicies(e){this.policies.push(...e)}getPolicies(){return this.policies}}},16689:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RouterService=void 0;n(61248);const i=n(68012),r=(n(40349),n(32621)),o=n(68012),a=n(61248),s=n(40349);class l{constructor(e,t,n,r){this.router=e,this.activatedRoute=t,this.titleService=n,this.previousUrl=void 0,this.currentUrl=void 0,this.currentUrl=this.router.url,e.events.subscribe((e=>{if(e instanceof i.NavigationEnd){this.previousUrl=this.currentUrl,this.currentUrl=e.url;let t=r.t("pageTitle","Bitwarden"),n=null,i=null,o=this.activatedRoute.firstChild;for(;null!=o;){if(null==o.firstChild){if(null!=o.snapshot.data&&null!=o.snapshot.data.title){i=o.snapshot.data.title;break}if(null!=o.snapshot.data&&null!=o.snapshot.data.titleId){n=o.snapshot.data.titleId;break}n=null,i=null;break}o=o.firstChild}if(null!=n||null!=i){const e=null!=i?i:r.t(n);null!=e&&""!==e&&(t=e+" | "+t)}this.titleService.setTitle(t)}}))}getPreviousUrl(){return this.previousUrl}setPreviousUrl(e){this.previousUrl=e}}t.RouterService=l,l.ɵfac=function(e){return new(e||l)(r.ɵɵinject(o.Router),r.ɵɵinject(o.ActivatedRoute),r.ɵɵinject(a.Title),r.ɵɵinject(s.I18nService))},l.ɵprov=r.ɵɵdefineInjectable({token:l,factory:l.ɵfac})},83681:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ServicesModule=t.initFactory=void 0;const r=n(32621),o=n(68290),a=n(40340),s=n(7540),l=n(15392),c=n(76885),d=n(20174),p=n(54234),u=n(79863),m=n(83208),h=n(62858),v=n(78893),f=n(86950),g=n(81616),y=n(15524),x=n(16689),S=n(1273),b=n(29546),w=n(98274),I=n(68166),C=n(80321),E=n(91092),P=n(26451),k=n(68062),A=n(69050),O=n(82058),T=n(39229),M=n(57997),D=n(98573),B=n(4349),R=n(40349),U=n(58004),V=n(70143),F=n(36424),N=n(90181),_=n(14293),j=n(99954),z=n(77243),L=n(25331),K=n(43081),q=n(88332),G=n(53387),W=n(56788),H=n(19261),$=n(36907),Q=n(85570),Y=n(32621);function J(e,t,n,r,o,a,s,l,c,d){return()=>i(this,void 0,void 0,(function*(){var p;yield l.init();const u={icons:"https://icons.bitwarden.net",notifications:"https://notifications.bitwarden.com"};null!==(p=u.base)&&void 0!==p||(u.base=e.location.origin),t.setUrls(u),setTimeout((()=>n.init()),3e3),r.init(!0);const m=yield l.getLocale();yield o.init(m),a.init(!0),s.init();const h=e.document.documentElement;h.classList.add("locale_"+o.translationLocale),c.onDefaultSystemThemeChange((e=>i(this,void 0,void 0,(function*(){(yield l.getTheme())===G.ThemeType.System&&(h.classList.remove("theme_"+G.ThemeType.Light,"theme_"+G.ThemeType.Dark),h.classList.add("theme_"+e))}))));new w.ContainerService(d).attachToWindow(e)}))}t.initFactory=J;class X{}t.ServicesModule=X,X.ɵfac=function(e){return new(e||X)},X.ɵmod=Y.ɵɵdefineNgModule({type:X}),X.ɵinj=Y.ɵɵdefineInjector({providers:[{provide:r.APP_INITIALIZER,useFactory:J,deps:["WINDOW",M.EnvironmentService,N.NotificationsService,q.VaultTimeoutService,R.I18nService,D.EventService,P.AuthService,Q.StateService,j.PlatformUtilsService,O.CryptoService],multi:!0},f.OrganizationGuardService,g.OrganizationTypeGuardService,x.RouterService,h.EventService,y.PolicyListService,{provide:R.I18nService,useFactory:e=>new l.I18nService(e.navigator.language,"locales"),deps:["WINDOW"]},{provide:K.StorageService,useClass:s.HtmlStorageService},{provide:"SECURE_STORAGE",useClass:c.MemoryStorageService},{provide:j.PlatformUtilsService,useFactory:(e,t,n,i)=>new m.WebPlatformUtilsService(e,t,n,i),deps:[R.I18nService,F.MessagingService,V.LogService,Q.StateService]},{provide:F.MessagingService,useClass:a.BroadcasterMessagingService},{provide:b.ModalService,useClass:v.ModalService},{provide:U.ImportService,useClass:C.ImportService,deps:[k.CipherService,B.FolderService,E.ApiService,R.I18nService,A.CollectionService,j.PlatformUtilsService,O.CryptoService]},{provide:O.CryptoService,useClass:I.CryptoService,deps:[T.CryptoFunctionService,j.PlatformUtilsService,V.LogService,Q.StateService]},{provide:L.StateMigrationService,useFactory:(e,t)=>new u.StateMigrationService(e,t,new $.StateFactory(H.GlobalState,W.Account)),deps:[K.StorageService,"SECURE_STORAGE"]},{provide:Q.StateService,useFactory:(e,t,n,i)=>new p.StateService(e,t,n,i,new $.StateFactory(H.GlobalState,W.Account)),deps:[K.StorageService,"SECURE_STORAGE",V.LogService,L.StateMigrationService]},{provide:z.StateService,useExisting:Q.StateService},{provide:_.PasswordRepromptService,useClass:d.PasswordRepromptService}],imports:[[o.ToastrModule,S.JslibServicesModule]]})},52055:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountComponent=void 0;const r=n(32621),o=n(24406),a=n(54768),s=n(10673),l=n(99422),c=(n(91092),n(34445),n(77243),n(29546),n(32621)),d=n(29546),p=n(91092),u=n(34445),m=n(77243),h=n(96189),v=n(57490),f=n(5286),g=n(43450),y=n(57608),x=n(72596),S=["deauthorizeSessionsTemplate"],b=["purgeVaultTemplate"],w=["deleteAccountTemplate"],I=["viewUserApiKeyTemplate"],C=["rotateUserApiKeyTemplate"];function E(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",13),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h1"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelement(9,"app-change-email"),c.ɵɵtext(10,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,1,"changeEmail")))}function P(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",13),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h1"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelement(9,"app-change-password"),c.ɵɵtext(10,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,1,"changeMasterPassword")))}function k(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",13),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"h1"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelement(9,"app-change-kdf"),c.ɵɵtext(10,"\n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,1,"encKeySettings")))}function A(e,t){}function O(e,t){}function T(e,t){}function M(e,t){}function D(e,t){}class B{constructor(e,t,n,i){this.modalService=e,this.apiService=t,this.keyConnectorService=n,this.stateService=i,this.showChangePassword=!0,this.showChangeKdf=!0,this.showChangeEmail=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showChangeEmail=this.showChangeKdf=this.showChangePassword=!(yield this.keyConnectorService.getUsesKeyConnector())}))}deauthorizeSessions(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(a.DeauthorizeSessionsComponent,this.deauthModalRef)}))}purgeVault(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.PurgeVaultComponent,this.purgeModalRef)}))}deleteAccount(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.DeleteAccountComponent,this.deleteModalRef)}))}viewUserApiKey(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getUserId();yield this.modalService.openViewRef(o.ApiKeyComponent,this.viewUserApiKeyModalRef,(t=>{t.keyType="user",t.entityId=e,t.postKey=this.apiService.postUserApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="userApiKeyDesc"}))}))}rotateUserApiKey(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getUserId();yield this.modalService.openViewRef(o.ApiKeyComponent,this.rotateUserApiKeyModalRef,(t=>{t.keyType="user",t.isRotation=!0,t.entityId=e,t.postKey=this.apiService.postUserRotateApiKey.bind(this.apiService),t.scope="api",t.grantType="client_credentials",t.apiKeyTitle="apiKey",t.apiKeyWarning="userApiKeyWarning",t.apiKeyDescription="apiKeyRotateDesc"}))}))}}t.AccountComponent=B,B.ɵfac=function(e){return new(e||B)(c.ɵɵdirectiveInject(d.ModalService),c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.KeyConnectorService),c.ɵɵdirectiveInject(m.StateService))},B.ɵcmp=c.ɵɵdefineComponent({type:B,selectors:[["app-account"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(S,7,r.ViewContainerRef),c.ɵɵviewQuery(b,7,r.ViewContainerRef),c.ɵɵviewQuery(w,7,r.ViewContainerRef),c.ɵɵviewQuery(I,7,r.ViewContainerRef),c.ɵɵviewQuery(C,7,r.ViewContainerRef)),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.deauthModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.purgeModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.deleteModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.viewUserApiKeyModalRef=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.rotateUserApiKeyModalRef=e.first)}},decls:78,vars:33,consts:[[1,"page-header"],[4,"ngIf"],[1,"secondary-header","border-0","mb-0"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"secondary-header","text-danger","border-0","mb-0"],[1,"card","border-danger"],[1,"card-body"],["type","button",1,"btn","btn-outline-danger",3,"click"],["deauthorizeSessionsTemplate",""],["purgeVaultTemplate",""],["deleteAccountTemplate",""],["viewUserApiKeyTemplate",""],["rotateUserApiKeyTemplate",""],[1,"secondary-header"]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"h1"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n"),c.ɵɵelement(7,"app-profile"),c.ɵɵtext(8,"\n"),c.ɵɵtemplate(9,E,11,3,"ng-container",1),c.ɵɵtext(10,"\n"),c.ɵɵtemplate(11,P,11,3,"ng-container",1),c.ɵɵtext(12,"\n"),c.ɵɵtemplate(13,k,11,3,"ng-container",1),c.ɵɵtext(14,"\n"),c.ɵɵelementStart(15,"div",2),c.ɵɵtext(16,"\n "),c.ɵɵelementStart(17,"h1"),c.ɵɵtext(18),c.ɵɵpipe(19,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n"),c.ɵɵelementStart(22,"p"),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25,"\n"),c.ɵɵelementStart(26,"button",3),c.ɵɵlistener("click",(function(){return t.viewUserApiKey()})),c.ɵɵtext(27),c.ɵɵpipe(28,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n"),c.ɵɵelementStart(30,"button",3),c.ɵɵlistener("click",(function(){return t.rotateUserApiKey()})),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n"),c.ɵɵelementStart(34,"div",4),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"h1"),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(40,"\n"),c.ɵɵelementStart(41,"div",5),c.ɵɵtext(42,"\n "),c.ɵɵelementStart(43,"div",6),c.ɵɵtext(44,"\n "),c.ɵɵelementStart(45,"p"),c.ɵɵtext(46),c.ɵɵpipe(47,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(48,"\n "),c.ɵɵelementStart(49,"button",7),c.ɵɵlistener("click",(function(){return t.deauthorizeSessions()})),c.ɵɵtext(50),c.ɵɵpipe(51,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementStart(53,"button",7),c.ɵɵlistener("click",(function(){return t.purgeVault()})),c.ɵɵtext(54),c.ɵɵpipe(55,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(56,"\n "),c.ɵɵelementStart(57,"button",7),c.ɵɵlistener("click",(function(){return t.deleteAccount()})),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(61,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(62,"\n"),c.ɵɵtemplate(63,A,0,0,"ng-template",null,8,c.ɵɵtemplateRefExtractor),c.ɵɵtext(65,"\n"),c.ɵɵtemplate(66,O,0,0,"ng-template",null,9,c.ɵɵtemplateRefExtractor),c.ɵɵtext(68,"\n"),c.ɵɵtemplate(69,T,0,0,"ng-template",null,10,c.ɵɵtemplateRefExtractor),c.ɵɵtext(71,"\n"),c.ɵɵtemplate(72,M,0,0,"ng-template",null,11,c.ɵɵtemplateRefExtractor),c.ɵɵtext(74,"\n"),c.ɵɵtemplate(75,D,0,0,"ng-template",null,12,c.ɵɵtemplateRefExtractor),c.ɵɵtext(77,"\n")),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,13,"myAccount")),c.ɵɵadvance(6),c.ɵɵproperty("ngIf",t.showChangeEmail),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showChangePassword),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.showChangeKdf),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(19,15,"apiKey")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(24,17,"userApiKeyDesc"),"\n"),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(28,19,"viewApiKey"),"\n"),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(32,21,"rotateApiKey"),"\n"),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(38,23,"dangerZone")),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(47,25,"dangerZoneDesc")),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(51,27,"deauthorizeSessions"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(55,29,"purgeVault"),"\n "),c.ɵɵadvance(4),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(59,31,"deleteAccount"),"\n "))},directives:[h.ProfileComponent,v.NgIf,f.ChangeEmailComponent,g.ChangePasswordComponent,y.ChangeKdfComponent],pipes:[x.I18nPipe],encapsulation:2})},76187:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddCreditComponent=void 0;const r=n(32621),o=(n(91092),n(70143),n(94308),n(99954),n(77243),n(6127)),a=n(15906),s=n(32621),l=n(77243),c=n(91092),d=n(99954),p=n(94308),u=n(70143),m=n(96832),h=n(637),v=n(50553),f=n(57490),g=n(72596),y=["ppButtonForm"];function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",36),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",37),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",38),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",39),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",40),s.ɵɵtext(9," PayPal"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",37),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",41),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"label",42),s.ɵɵtext(17,"\n "),s.ɵɵelement(18,"i",43),s.ɵɵtext(19," Bitcoin"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("value",e.paymentMethodType.PayPal)("ngModel",e.method),s.ɵɵadvance(10),s.ɵɵproperty("value",e.paymentMethodType.BitPay)("ngModel",e.method)}}class S{constructor(e,t,n,i,a){this.stateService=e,this.apiService=t,this.platformUtilsService=n,this.organizationService=i,this.logService=a,this.showOptions=!0,this.method=o.PaymentMethodType.PayPal,this.onAdded=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.paymentMethodType=o.PaymentMethodType,this.ppLoading=!1;const s="4ZDA7DLUUJGMN",l="https://www.paypal.com/cgi-bin/webscr";this.ppButtonFormAction=l,this.ppButtonBusinessId=s}ngOnInit(){return i(this,void 0,void 0,(function*(){if(null!=this.organizationId){null==this.creditAmount&&(this.creditAmount="20.00"),this.ppButtonCustomField="organization_id:"+this.organizationId;const e=yield this.organizationService.get(this.organizationId);null!=e&&(this.subject=e.name,this.name=e.name)}else null==this.creditAmount&&(this.creditAmount="10.00"),this.userId=yield this.stateService.getUserId(),this.subject=yield this.stateService.getEmail(),this.email=this.subject,this.ppButtonCustomField="user_id:"+this.userId;this.ppButtonCustomField+=",account_credit:1",this.returnUrl=window.location.href}))}submit(){return i(this,void 0,void 0,(function*(){if(null!=this.creditAmount&&""!==this.creditAmount){if(this.method===o.PaymentMethodType.PayPal)return this.ppButtonFormRef.nativeElement.submit(),void(this.ppLoading=!0);if(this.method!==o.PaymentMethodType.BitPay)try{this.onAdded.emit()}catch(e){this.logService.error(e)}else try{const e=new a.BitPayInvoiceRequest;e.email=this.email,e.name=this.name,e.credit=!0,e.amount=this.creditAmountNumber,e.organizationId=this.organizationId,e.userId=this.userId,e.returnUrl=this.returnUrl,this.formPromise=this.apiService.postBitPayInvoice(e);const t=yield this.formPromise;this.platformUtilsService.launchUri(t)}catch(e){this.logService.error(e)}}}))}cancel(){this.onCanceled.emit()}formatAmount(){try{if(null!=this.creditAmount&&""!==this.creditAmount){const e=Math.abs(parseFloat(this.creditAmount));if(e>0)return void(this.creditAmount=parseFloat((Math.round(100*e)/100).toString()).toFixed(2).toString())}}catch(e){this.logService.error(e)}this.creditAmount=""}get creditAmountNumber(){if(null!=this.creditAmount&&""!==this.creditAmount)try{return parseFloat(this.creditAmount)}catch(e){this.logService.error(e)}return null}}t.AddCreditComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.StateService),s.ɵɵdirectiveInject(c.ApiService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.OrganizationService),s.ɵɵdirectiveInject(u.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-add-credit"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(y,7,r.ElementRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.ppButtonFormRef=e.first)}},inputs:{creditAmount:"creditAmount",showOptions:"showOptions",method:"method",organizationId:"organizationId"},outputs:{onAdded:"onAdded",onCanceled:"onCanceled"},decls:94,vars:32,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],["class","mb-4 text-lg",4,"ngIf"],[1,"form-group"],[1,"row"],[1,"col-4"],["for","creditAmount"],[1,"input-group"],[1,"input-group-prepend"],[1,"input-group-text"],["id","creditAmount","type","text","name","CreditAmount","required","",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["method","post","target","_top",3,"action"],["ppButtonForm",""],["type","hidden","name","cmd","value","_xclick"],["type","hidden","name","business",3,"value"],["type","hidden","name","button_subtype","value","services"],["type","hidden","name","no_note","value","1"],["type","hidden","name","no_shipping","value","1"],["type","hidden","name","rm","value","1"],["type","hidden","name","return",3,"value"],["type","hidden","name","cancel_return",3,"value"],["type","hidden","name","currency_code","value","USD"],["type","hidden","name","image_url","value","https://bitwarden.com/images/paypal-banner.png"],["type","hidden","name","bn","value","PP-BuyNowBF:btn_buynow_LG.gif:NonHosted"],["type","hidden","name","amount",3,"value"],["type","hidden","name","custom",3,"value"],["type","hidden","name","item_name","value","Bitwarden Account Credit"],["type","hidden","name","item_number",3,"value"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","credit-method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-paypal",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paypal"],["type","radio","name","Method","id","credit-method-bitcoin",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","credit-method-bitcoin",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-bitcoin"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",3),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"span",4),s.ɵɵtext(9,"×"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"h3",5),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,x,22,4,"div",6),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",7),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"div",8),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",9),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label",10),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",11),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",12),s.ɵɵelementStart(31,"span",13),s.ɵɵtext(32,"$USD"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",14),s.ɵɵlistener("ngModelChange",(function(e){return t.creditAmount=e}))("blur",(function(){return t.formatAmount()})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"small",15),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"button",16),s.ɵɵtext(45,"\n "),s.ɵɵelement(46,"i",17),s.ɵɵpipe(47,"i18n"),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"span"),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementStart(54,"button",18),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵtext(55),s.ɵɵpipe(56,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n"),s.ɵɵelementStart(60,"form",19,20),s.ɵɵtext(62,"\n "),s.ɵɵelement(63,"input",21),s.ɵɵtext(64,"\n "),s.ɵɵelement(65,"input",22),s.ɵɵtext(66,"\n "),s.ɵɵelement(67,"input",23),s.ɵɵtext(68,"\n "),s.ɵɵelement(69,"input",24),s.ɵɵtext(70,"\n "),s.ɵɵelement(71,"input",25),s.ɵɵtext(72,"\n "),s.ɵɵelement(73,"input",26),s.ɵɵtext(74,"\n "),s.ɵɵelement(75,"input",27),s.ɵɵtext(76,"\n "),s.ɵɵelement(77,"input",28),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"input",29),s.ɵɵtext(80,"\n "),s.ɵɵelement(81,"input",30),s.ɵɵtext(82,"\n "),s.ɵɵelement(83,"input",31),s.ɵɵtext(84,"\n "),s.ɵɵelement(85,"input",32),s.ɵɵtext(86,"\n "),s.ɵɵelement(87,"input",33),s.ɵɵtext(88,"\n "),s.ɵɵelement(89,"input",34),s.ɵɵtext(90,"\n "),s.ɵɵelement(91,"input",35),s.ɵɵtext(92,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,18,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,20,"addCredit")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showOptions),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,22,"amount")),s.ɵɵadvance(9),s.ɵɵproperty("ngModel",t.creditAmount),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,24,"creditDelayed")),s.ɵɵadvance(4),s.ɵɵproperty("disabled",e.loading||t.ppLoading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(47,26,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,28,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(56,30,"cancel"),"\n "),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("action",t.ppButtonFormAction,s.ɵɵsanitizeUrl),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("value",t.ppButtonBusinessId),s.ɵɵadvance(10),s.ɵɵpropertyInterpolate("value",t.returnUrl),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("value",t.returnUrl),s.ɵɵadvance(8),s.ɵɵpropertyInterpolate("value",t.creditAmount),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("value",t.ppButtonCustomField),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("value",t.subject)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.A11yTitleDirective,f.NgIf,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,m.ɵNgNoValidate,m.RadioControlValueAccessor],pipes:[g.I18nPipe],encapsulation:2})},3068:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustPaymentComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(19582)),a=n(6127),s=n(63410),l=n(28047),c=n(32621),d=n(91092),p=n(40349),u=n(99954),m=n(70143),h=n(96832),v=n(637),f=n(50553),g=n(63410),y=n(28047),x=n(72596);class S{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onAdjusted=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.paymentMethodType=a.PaymentMethodType}submit(){return i(this,void 0,void 0,(function*(){try{const e=new o.PaymentRequest;this.formPromise=this.paymentComponent.createPaymentToken().then((t=>(e.paymentToken=t[0],e.paymentMethodType=t[1],e.postalCode=this.taxInfoComponent.taxInfo.postalCode,e.country=this.taxInfoComponent.taxInfo.country,null==this.organizationId?this.apiService.postAccountPayment(e):(e.taxId=this.taxInfoComponent.taxInfo.taxId,e.state=this.taxInfoComponent.taxInfo.state,e.line1=this.taxInfoComponent.taxInfo.line1,e.line2=this.taxInfoComponent.taxInfo.line2,e.city=this.taxInfoComponent.taxInfo.city,e.state=this.taxInfoComponent.taxInfo.state,this.apiService.postOrganizationPayment(this.organizationId,e))))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedPaymentMethod")),this.onAdjusted.emit()}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}changeCountry(){"US"===this.taxInfoComponent.taxInfo.country?this.paymentComponent.hideBank=!this.organizationId:(this.paymentComponent.hideBank=!0,this.paymentComponent.method===a.PaymentMethodType.BankAccount&&(this.paymentComponent.method=a.PaymentMethodType.Card,this.paymentComponent.changeMethod()))}}t.AdjustPaymentComponent=S,S.ɵfac=function(e){return new(e||S)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.LogService))},S.ɵcmp=c.ɵɵdefineComponent({type:S,selectors:[["app-adjust-payment"]],viewQuery:function(e,t){if(1&e&&(c.ɵɵviewQuery(s.PaymentComponent,7),c.ɵɵviewQuery(l.TaxInfoComponent,7)),2&e){let e;c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.paymentComponent=e.first),c.ɵɵqueryRefresh(e=c.ɵɵloadQuery())&&(t.taxInfoComponent=e.first)}},inputs:{currentType:"currentType",organizationId:"organizationId"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:36,vars:19,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"hideBank","hideCredit"],[3,"onCountryChanged"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"button",3),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵpipe(6,"i18n"),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"span",4),c.ɵɵtext(9,"×"),c.ɵɵelementEnd(),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"h3",5),c.ɵɵtext(13),c.ɵɵpipe(14,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelement(16,"app-payment",6),c.ɵɵtext(17,"\n "),c.ɵɵelementStart(18,"app-tax-info",7),c.ɵɵlistener("onCountryChanged",(function(){return t.changeCountry()})),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementStart(20,"button",8),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"i",9),c.ɵɵpipe(23,"i18n"),c.ɵɵtext(24,"\n "),c.ɵɵelementStart(25,"span"),c.ɵɵtext(26),c.ɵɵpipe(27,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"button",10),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(34,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(35,"\n")),2&e){const e=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,9,"cancel")),c.ɵɵadvance(8),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(14,11,null!=t.currentType?"changePaymentMethod":"addPaymentMethod"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("hideBank",!t.organizationId)("hideCredit",!0),c.ɵɵadvance(4),c.ɵɵproperty("disabled",e.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(23,13,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(27,15,"submit")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(32,17,"cancel"),"\n ")}},directives:[h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,f.A11yTitleDirective,g.PaymentComponent,y.TaxInfoComponent],pipes:[x.I18nPipe],encapsulation:2})},96413:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AdjustStorageComponent=void 0;const r=n(32621),o=(n(68012),n(91092),n(40349),n(70143),n(99954),n(13420)),a=n(63410),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(68012),u=n(70143),m=n(96832),h=n(637),v=n(50553),f=n(57490),g=n(63410),y=n(72596);function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"strong"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5),s.ɵɵpipe(6,"currency"),s.ɵɵpipe(7,"currency"),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,5,"total"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate4(" ",e.storageAdjustment||0," GB ×\n ",s.ɵɵpipeBind2(6,7,e.storageGbPrice,"$")," = ",s.ɵɵpipeBind2(7,10,e.adjustedStorageTotal,"$")," /",s.ɵɵpipeBind1(8,13,e.interval),"\n ")}}class S{constructor(e,t,n,i,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.router=i,this.activatedRoute=o,this.logService=a,this.storageGbPrice=0,this.add=!0,this.interval="year",this.onAdjusted=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.storageAdjustment=0}submit(){return i(this,void 0,void 0,(function*(){try{const e=new o.StorageRequest;e.storageGbAdjustment=this.storageAdjustment,this.add||(e.storageGbAdjustment*=-1);let t=!1;const n=()=>i(this,void 0,void 0,(function*(){let n;n=null==this.organizationId?this.formPromise=this.apiService.postAccountStorage(e):this.formPromise=this.apiService.postOrganizationStorage(this.organizationId,e);const i=yield n;if(null!=i&&null!=i.paymentIntentClientSecret)try{yield this.paymentComponent.handleStripeCardPayment(i.paymentIntentClientSecret,null)}catch(r){t=!0}}));this.formPromise=n(),yield this.formPromise,this.onAdjusted.emit(this.storageAdjustment),t?(this.platformUtilsService.showToast("warning",null,this.i18nService.t("couldNotChargeCardPayInvoice"),{timeout:1e4}),this.router.navigate(["../billing"],{relativeTo:this.activatedRoute})):this.platformUtilsService.showToast("success",null,this.i18nService.t("adjustedStorage",e.storageGbAdjustment.toString()))}catch(e){this.logService.error(e)}}))}cancel(){this.onCanceled.emit()}get adjustedStorageTotal(){return this.storageGbPrice*this.storageAdjustment}}t.AdjustStorageComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.Router),s.ɵɵdirectiveInject(p.ActivatedRoute),s.ɵɵdirectiveInject(u.LogService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-adjust-storage"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(a.PaymentComponent,7),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.paymentComponent=e.first)}},inputs:{storageGbPrice:"storageGbPrice",add:"add",organizationId:"organizationId",interval:"interval"},outputs:{onAdjusted:"onAdjusted",onCanceled:"onCanceled"},decls:52,vars:26,consts:[["ngNativeValidate","",1,"card",3,"appApiAction","ngSubmit"],["form",""],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[1,"row"],[1,"form-group","col-6"],["for","storageAdjustment"],["id","storageAdjustment","type","number","name","StroageGbAdjustment","min","0","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","mb-3",4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"d-block","text-muted","mt-3"],[3,"showMethods"],[1,"mb-3"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",3),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"span",4),s.ɵɵtext(9,"×"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"h3",5),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",6),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",7),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",8),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"input",9),s.ɵɵlistener("ngModelChange",(function(e){return t.storageAdjustment=e})),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵtemplate(28,x,9,15,"div",10),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"button",11),s.ɵɵtext(31,"\n "),s.ɵɵelement(32,"i",12),s.ɵɵpipe(33,"i18n"),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"span"),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"button",13),s.ɵɵlistener("click",(function(){return t.cancel()})),s.ɵɵtext(41),s.ɵɵpipe(42,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"small",14),s.ɵɵtext(45),s.ɵɵpipe(46,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵelement(50,"app-payment",15),s.ɵɵtext(51,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,12,"cancel")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,14,t.add?"addStorage":"removeStorage")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,16,t.add?"gbStorageAdd":"gbStorageRemove")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.storageAdjustment),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.add),s.ɵɵadvance(2),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(33,18,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,20,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(42,22,"cancel"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(46,24,t.add?"storageAddNote":"storageRemoveNote"),"\n "),s.ɵɵadvance(5),s.ɵɵproperty("showMethods",!1)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.A11yTitleDirective,m.MinValidator,m.MaxValidator,m.NumberValueAccessor,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,f.NgIf,g.PaymentComponent],pipes:[y.I18nPipe,f.CurrencyPipe],encapsulation:2})},24406:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ApiKeyComponent=void 0;n(70143),n(61554);const r=n(32621),o=n(61554),a=n(70143),s=n(96832),l=n(637),c=n(50553),d=n(57490),p=n(38287),u=n(52900),m=n(72596);function h(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-verify-master-password",15),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().masterPassword=t})),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("ngModel",e.masterPassword)}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",16),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,e.apiKeyWarning))}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",17),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"p",18),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"strong"),r.ɵɵtext(6,"client_id:"),r.ɵɵelementEnd(),r.ɵɵelement(7,"br"),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"code"),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"p",18),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"strong"),r.ɵɵtext(16,"client_secret:"),r.ɵɵelementEnd(),r.ɵɵelement(17,"br"),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"code"),r.ɵɵtext(20),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p",18),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"strong"),r.ɵɵtext(26,"scope:"),r.ɵɵelementEnd(),r.ɵɵelement(27,"br"),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"code"),r.ɵɵtext(30),r.ɵɵelementEnd(),r.ɵɵtext(31,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"p",19),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"strong"),r.ɵɵtext(36,"grant_type:"),r.ɵɵelementEnd(),r.ɵɵelement(37,"br"),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"code"),r.ɵɵtext(40),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,5,"oauth2ClientCredentials")),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.clientId),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.clientSecret),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.scope),r.ɵɵadvance(10),r.ɵɵtextInterpolate(e.grantType)}}function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"button",20),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",21),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(5);r.ɵɵproperty("disabled",t.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,3,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,5,e.isRotation?"rotateApiKey":"viewApiKey"))}}class y{constructor(e,t){this.userVerificationService=e,this.logService=t}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.postKey(this.entityId,e)));const e=yield this.formPromise;this.clientSecret=e.apiKey,this.clientId=`${this.keyType}.${this.entityId}`}catch(e){this.logService.error(e)}}))}}t.ApiKeyComponent=y,y.ɵfac=function(e){return new(e||y)(r.ɵɵdirectiveInject(o.UserVerificationService),r.ɵɵdirectiveInject(a.LogService))},y.ɵcmp=r.ɵɵdefineComponent({type:y,selectors:[["app-api-key"]],decls:46,vars:17,consts:[["role","dialog","aria-modal","true","aria-labelledby","apiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","apiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange",4,"ngIf"],["type","warning",4,"ngIf"],["type","info","icon","bwi bwi-key",3,"title",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],["type","warning"],["type","info","icon","bwi bwi-key",3,"title"],[1,"mb-1"],[1,"mb-0"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,h,2,1,"app-verify-master-password",9),r.ɵɵtext(28,"\n\n "),r.ɵɵtemplate(29,v,3,3,"app-callout",10),r.ɵɵtext(30,"\n "),r.ɵɵtemplate(31,f,43,7,"app-callout",11),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"div",12),r.ɵɵtext(35,"\n "),r.ɵɵtemplate(36,g,9,7,"button",13),r.ɵɵtext(37,"\n "),r.ɵɵelementStart(38,"button",14),r.ɵɵtext(39),r.ɵɵpipe(40,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(43,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,9,t.apiKeyTitle)),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,11,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,13,t.apiKeyDescription)),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.clientSecret),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.clientSecret),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.clientSecret),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",!t.clientSecret),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(40,15,"close"),"\n "))},directives:[s.NgControlStatusGroup,s.NgForm,l.ApiActionDirective,c.A11yTitleDirective,d.NgIf,p.VerifyMasterPasswordComponent,s.DefaultValueAccessor,s.NgControlStatus,s.NgModel,u.CalloutComponent],pipes:[m.I18nPipe],encapsulation:2})},5286:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeEmailComponent=void 0;n(91092),n(82058),n(40349),n(70143),n(36424),n(99954),n(77243);const r=n(96103),o=n(29565),a=n(57976),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(82058),u=n(36424),m=n(70143),h=n(77243),v=n(96832),f=n(637),g=n(57490),y=n(966),x=n(52900),S=n(72596);function b(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",14),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"changeEmailTwoFactorWarning"),"\n "))}function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"hr"),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"app-callout",14),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"div",3),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",4),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",5),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",15),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",16),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().token=t})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(6,4,"changeEmailDesc",e.newEmail)),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,7,"loggedOutWarning")),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,9,"code")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function I(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"continue")))}function C(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"changeEmail")))}function E(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",17),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().reset()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"cancel"),"\n "))}class P{constructor(e,t,n,i,r,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.messagingService=r,this.logService=o,this.stateService=a,this.tokenSent=!1,this.showTwoFactorEmailWarning=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getTwoFactorProviders();this.showTwoFactorEmailWarning=e.data.some((e=>e.type===a.TwoFactorProviderType.Email&&e.enabled))}))}submit(){return i(this,void 0,void 0,(function*(){if(yield this.cryptoService.hasEncKey())if(this.newEmail=this.newEmail.trim().toLowerCase(),this.tokenSent){const t=new r.EmailRequest;t.token=this.token,t.newEmail=this.newEmail,t.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);const n=yield this.stateService.getKdfType(),i=yield this.stateService.getKdfIterations(),o=yield this.cryptoService.makeKey(this.masterPassword,this.newEmail,n,i);t.newMasterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,o);const a=yield this.cryptoService.remakeEncKey(o);t.key=a[1].encryptedString;try{this.formPromise=this.apiService.postEmail(t),yield this.formPromise,this.reset(),this.platformUtilsService.showToast("success",this.i18nService.t("emailChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}else{const t=new o.EmailTokenRequest;t.newEmail=this.newEmail,t.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);try{this.formPromise=this.apiService.postEmailToken(t),yield this.formPromise,this.tokenSent=!0}catch(e){this.logService.error(e)}}else this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"))}))}reset(){this.token=this.newEmail=this.masterPassword=null,this.tokenSent=!1}}t.ChangeEmailComponent=P,P.ɵfac=function(e){return new(e||P)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.MessagingService),s.ɵɵdirectiveInject(m.LogService),s.ɵɵdirectiveInject(h.StateService))},P.ɵcmp=s.ɵɵdefineComponent({type:P,selectors:[["app-change-email"]],decls:44,vars:20,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],["type","warning",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","readonly","ngModelChange"],["for","newEmail"],["id","newEmail","type","text","name","NewEmail","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","readonly","ngModelChange"],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","warning"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵtemplate(3,b,3,3,"app-callout",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"div",5),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",6),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",5),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",8),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"input",9),s.ɵɵlistener("ngModelChange",(function(e){return t.newEmail=e})),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,w,27,11,"ng-container",10),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"button",11),s.ɵɵtext(32,"\n "),s.ɵɵelement(33,"i",12),s.ɵɵpipe(34,"i18n"),s.ɵɵtext(35,"\n "),s.ɵɵtemplate(36,I,3,3,"span",10),s.ɵɵtext(37,"\n "),s.ɵɵtemplate(38,C,3,3,"span",10),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵtemplate(41,E,3,3,"button",13),s.ɵɵtext(42,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.showTwoFactorEmailWarning),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,14,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.masterPassword)("readonly",t.tokenSent),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,16,"newEmail")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.newEmail)("readonly",t.tokenSent),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(34,18,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.tokenSent),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.tokenSent),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.tokenSent)}},directives:[v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,g.NgIf,v.DefaultValueAccessor,v.RequiredValidator,y.InputVerbatimDirective,v.NgControlStatus,v.NgModel,x.CalloutComponent],pipes:[S.I18nPipe],encapsulation:2})},57608:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangeKdfComponent=void 0;n(91092),n(82058),n(40349),n(70143),n(36424),n(99954),n(77243);const r=n(9974),o=n(25847),a=n(32621),s=n(91092),l=n(40349),c=n(99954),d=n(82058),p=n(36424),u=n(70143),m=n(77243),h=n(52900),v=n(96832),f=n(637),g=n(966),y=n(50553),x=n(57490),S=n(72596);function b(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",21),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.value),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class w{constructor(e,t,n,i,r,a,s){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.messagingService=r,this.logService=a,this.stateService=s,this.kdf=o.KdfType.PBKDF2_SHA256,this.kdfOptions=[],this.kdfOptions=[{name:"PBKDF2 SHA-256",value:o.KdfType.PBKDF2_SHA256}]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.kdf=yield this.stateService.getKdfType(),this.kdfIterations=yield this.stateService.getKdfIterations()}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasEncKey()))return void this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"));const e=new r.KdfRequest;e.kdf=this.kdf,e.kdfIterations=this.kdfIterations,e.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null);const t=yield this.stateService.getEmail(),n=yield this.cryptoService.makeKey(this.masterPassword,t,this.kdf,this.kdfIterations);e.newMasterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,n);const i=yield this.cryptoService.remakeEncKey(n);e.key=i[1].encryptedString;try{this.formPromise=this.apiService.postAccountKdf(e),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("encKeySettingsChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(o){this.logService.error(o)}}))}}t.ChangeKdfComponent=w,w.ɵfac=function(e){return new(e||w)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.CryptoService),a.ɵɵdirectiveInject(p.MessagingService),a.ɵɵdirectiveInject(u.LogService),a.ɵɵdirectiveInject(m.StateService))},w.ɵcmp=a.ɵɵdefineComponent({type:w,selectors:[["app-change-kdf"]],decls:95,vars:45,consts:[["type","warning"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","kdfMasterPassword"],["id","kdfMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-group","mb-0"],["for","kdf"],["href","https://en.wikipedia.org/wiki/Key_derivation_function","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","kdf","name","Kdf","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],["for","kdfIterations"],["href","https://bitwarden.com/help/what-encryption-is-used/#pbkdf2","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["id","kdfIterations","type","number","min","5000","max","2000000","name","KdfIterations","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"col-12"],[1,"small","form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"ngValue"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",0),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n"),a.ɵɵelementStart(4,"form",1,2),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",3),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",4),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"div",5),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"label",6),a.ɵɵtext(14),a.ɵɵpipe(15,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"input",7),a.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"div",3),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"div",4),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"div",8),a.ɵɵtext(27,"\n "),a.ɵɵelementStart(28,"label",9),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"a",10),a.ɵɵpipe(33,"i18n"),a.ɵɵtext(34,"\n "),a.ɵɵelement(35,"i",11),a.ɵɵtext(36,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"select",12),a.ɵɵlistener("ngModelChange",(function(e){return t.kdf=e})),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,b,2,2,"option",13),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n "),a.ɵɵelementStart(45,"div",4),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"div",8),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"label",14),a.ɵɵtext(50),a.ɵɵpipe(51,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n "),a.ɵɵelementStart(53,"a",15),a.ɵɵpipe(54,"i18n"),a.ɵɵtext(55,"\n "),a.ɵɵelement(56,"i",11),a.ɵɵtext(57,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementStart(59,"input",16),a.ɵɵlistener("ngModelChange",(function(e){return t.kdfIterations=e})),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(61,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(62,"\n "),a.ɵɵelementStart(63,"div",17),a.ɵɵtext(64,"\n "),a.ɵɵelementStart(65,"div",5),a.ɵɵtext(66,"\n "),a.ɵɵelementStart(67,"div",18),a.ɵɵtext(68,"\n "),a.ɵɵelementStart(69,"p"),a.ɵɵtext(70),a.ɵɵpipe(71,"i18n"),a.ɵɵpipe(72,"number"),a.ɵɵelementEnd(),a.ɵɵtext(73,"\n "),a.ɵɵelementStart(74,"strong"),a.ɵɵtext(75),a.ɵɵpipe(76,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(77),a.ɵɵpipe(78,"i18n"),a.ɵɵpipe(79,"number"),a.ɵɵelementEnd(),a.ɵɵtext(80,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(81,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(82,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(83,"\n "),a.ɵɵelementStart(84,"button",19),a.ɵɵtext(85,"\n "),a.ɵɵelement(86,"i",20),a.ɵɵpipe(87,"i18n"),a.ɵɵtext(88,"\n "),a.ɵɵelementStart(89,"span"),a.ɵɵtext(90),a.ɵɵpipe(91,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(92,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(93,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(94,"\n")),2&e){const e=a.ɵɵreference(5);a.ɵɵadvance(1),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(2,17,"loggedOutWarning")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(15,19,"masterPass")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.masterPassword),a.ɵɵadvance(12),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(30,21,"kdfAlgorithm")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(33,23,"learnMore")),a.ɵɵadvance(6),a.ɵɵproperty("ngModel",t.kdf),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",t.kdfOptions),a.ɵɵadvance(10),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(51,25,"kdfIterations")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(54,27,"learnMore")),a.ɵɵadvance(6),a.ɵɵproperty("ngModel",t.kdfIterations),a.ɵɵadvance(11),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(71,29,"kdfIterationsDesc",a.ɵɵpipeBind1(72,32,1e5))),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(76,34,"warning")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1(": ",a.ɵɵpipeBind2(78,36,"kdfIterationsWarning",a.ɵɵpipeBind1(79,39,5e4)),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(87,41,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(91,43,"changeKdf"))}},directives:[h.CalloutComponent,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,v.DefaultValueAccessor,v.RequiredValidator,g.InputVerbatimDirective,v.NgControlStatus,v.NgModel,y.A11yTitleDirective,v.SelectControlValueAccessor,x.NgForOf,v.MinValidator,v.MaxValidator,v.NumberValueAccessor,v.NgSelectOption,v.ɵNgSelectMultipleOption],pipes:[S.I18nPipe,x.DecimalPipe],encapsulation:2})},43450:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ChangePasswordComponent=void 0;n(91092),n(68062),n(82058),n(4349),n(40349),n(36424),n(94308),n(86193),n(99954),n(10685),n(94129),n(77243),n(2173);const r=n(48921),o=n(26515),a=n(70829),s=n(57509),l=n(62632),c=n(82041),d=n(63750),p=n(25122),u=n(76171),m=n(45022),h=n(32621),v=n(40349),f=n(82058),g=n(36424),y=n(77243),x=n(86193),S=n(99954),b=n(10685),w=n(4349),I=n(68062),C=n(2173),E=n(91092),P=n(94129),k=n(94308),A=n(52900),O=n(57490),T=n(96832),M=n(637),D=n(966),B=n(14296),R=n(50553),U=n(72596);function V(e,t){if(1&e&&(h.ɵɵelementStart(0,"app-callout",21),h.ɵɵtext(1,"\n"),h.ɵɵelementEnd()),2&e){const e=h.ɵɵnextContext();h.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class F extends r.ChangePasswordComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u){super(e,t,n,r,o,a,i),this.folderService=s,this.cipherService=l,this.syncService=c,this.apiService=d,this.sendService=p,this.organizationService=u,this.rotateEncKey=!1}rotateEncKeyClicked(){return i(this,void 0,void 0,(function*(){if(this.rotateEncKey){const e=yield this.cipherService.getAllDecrypted();let t=!1;if(null!=e)for(let n=0;n<e.length;n++)if(null==e[n].organizationId&&e[n].hasOldAttachments){t=!0;break}if(t){return(yield this.platformUtilsService.showDialog(this.i18nService.t("oldAttachmentsNeedFixDesc"),null,this.i18nService.t("learnMore"),this.i18nService.t("close"),"warning"))&&this.platformUtilsService.launchUri("https://bitwarden.com/help/attachments/#add-storage-space"),void(this.rotateEncKey=!1)}(yield this.platformUtilsService.showDialog(this.i18nService.t("updateEncryptionKeyWarning")+" "+this.i18nService.t("updateEncryptionKeyExportWarning")+" "+this.i18nService.t("rotateEncKeyConfirmation"),this.i18nService.t("rotateEncKeyTitle"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))||(this.rotateEncKey=!1)}}))}submit(){const e=Object.create(null,{submit:{get:()=>super.submit}});return i(this,void 0,void 0,(function*(){(yield this.cryptoService.hasEncKey())?yield e.submit.call(this):this.platformUtilsService.showToast("error",null,this.i18nService.t("updateKey"))}))}setupSubmitActions(){const e=Object.create(null,{setupSubmitActions:{get:()=>super.setupSubmitActions}});return i(this,void 0,void 0,(function*(){return null==this.currentMasterPassword||""===this.currentMasterPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),!1):(this.rotateEncKey&&(yield this.syncService.fullSync(!0)),e.setupSubmitActions.call(this))}))}performSubmitActions(e,t,n){return i(this,void 0,void 0,(function*(){const i=new p.PasswordRequest;i.masterPasswordHash=yield this.cryptoService.hashPassword(this.currentMasterPassword,null),i.newMasterPasswordHash=e,i.key=n[1].encryptedString;try{this.rotateEncKey?this.formPromise=this.apiService.postPassword(i).then((()=>this.updateKey(t,i.newMasterPasswordHash))):this.formPromise=this.apiService.postPassword(i),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("masterPasswordChanged"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(r){this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred"))}}))}updateKey(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.cryptoService.makeEncKey(e),r=yield this.cryptoService.getPrivateKey();let o=null;null!=r&&(o=yield this.cryptoService.encrypt(r,n[0]));const a=new m.UpdateKeyRequest;a.privateKey=null!=o?o.encryptedString:null,a.key=n[1].encryptedString,a.masterPasswordHash=t;const l=yield this.folderService.getAllDecrypted();for(let e=0;e<l.length;e++){if(null==l[e].id)continue;const t=yield this.folderService.encrypt(l[e],n[0]);a.folders.push(new c.FolderWithIdRequest(t))}const d=yield this.cipherService.getAllDecrypted();for(let e=0;e<d.length;e++){if(null!=d[e].organizationId)continue;const t=yield this.cipherService.encrypt(d[e],n[0]);a.ciphers.push(new s.CipherWithIdRequest(t))}const p=yield this.sendService.getAll();yield Promise.all(p.map((e=>i(this,void 0,void 0,(function*(){var t;const i=yield this.cryptoService.decryptToBytes(e.key,null);e.key=null!==(t=yield this.cryptoService.encrypt(i,n[0]))&&void 0!==t?t:e.key,a.sends.push(new u.SendWithIdRequest(e))}))))),yield this.apiService.postAccountKey(a),yield this.updateEmergencyAccesses(n[0]),yield this.updateAllResetPasswordKeys(n[0])}))}updateEmergencyAccesses(e){return i(this,void 0,void 0,(function*(){const t=yield this.apiService.getEmergencyAccessTrusted(),n=[o.EmergencyAccessStatusType.Confirmed,o.EmergencyAccessStatusType.RecoveryInitiated,o.EmergencyAccessStatusType.RecoveryApproved],i=t.data.filter((e=>n.includes(e.status)));for(const r of i){const t=yield this.apiService.getUserPublicKey(r.granteeId),n=a.Utils.fromB64ToArray(t.publicKey),i=yield this.cryptoService.rsaEncrypt(e.key,n.buffer),o=new l.EmergencyAccessUpdateRequest;o.type=r.type,o.waitTimeDays=r.waitTimeDays,o.keyEncrypted=i.encryptedString,yield this.apiService.putEmergencyAccess(r.id,o)}}))}updateAllResetPasswordKeys(e){return i(this,void 0,void 0,(function*(){const t=yield this.organizationService.getAll();for(const n of t){if(!n.resetPasswordEnrolled)continue;const t=yield this.apiService.getOrganizationKeys(n.id),i=a.Utils.fromB64ToArray(null==t?void 0:t.publicKey),r=yield this.cryptoService.rsaEncrypt(e.key,i.buffer),o=new d.OrganizationUserResetPasswordEnrollmentRequest;o.resetPasswordKey=r.encryptedString,yield this.apiService.putOrganizationUserResetPasswordEnrollment(n.id,n.userId,o)}}))}}t.ChangePasswordComponent=F,F.ɵfac=function(e){return new(e||F)(h.ɵɵdirectiveInject(v.I18nService),h.ɵɵdirectiveInject(f.CryptoService),h.ɵɵdirectiveInject(g.MessagingService),h.ɵɵdirectiveInject(y.StateService),h.ɵɵdirectiveInject(x.PasswordGenerationService),h.ɵɵdirectiveInject(S.PlatformUtilsService),h.ɵɵdirectiveInject(b.PolicyService),h.ɵɵdirectiveInject(w.FolderService),h.ɵɵdirectiveInject(I.CipherService),h.ɵɵdirectiveInject(C.SyncService),h.ɵɵdirectiveInject(E.ApiService),h.ɵɵdirectiveInject(P.SendService),h.ɵɵdirectiveInject(k.OrganizationService))},F.ɵcmp=h.ɵɵdefineComponent({type:F,selectors:[["app-change-password"]],features:[h.ɵɵInheritDefinitionFeature],decls:82,vars:33,consts:[["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","currentMasterPassword"],["id","currentMasterPassword","type","password","name","MasterPasswordHash","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","newMasterPassword"],["id","newMasterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check"],["type","checkbox","id","rotateEncKey","name","RotateEncKey",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","rotateEncKey",1,"form-check-label"],["href","https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(h.ɵɵelementStart(0,"app-callout",0),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(3,"\n"),h.ɵɵtemplate(4,V,2,1,"app-callout",1),h.ɵɵtext(5,"\n\n"),h.ɵɵelementStart(6,"form",2,3),h.ɵɵlistener("ngSubmit",(function(){return t.submit()})),h.ɵɵtext(8,"\n "),h.ɵɵelementStart(9,"div",4),h.ɵɵtext(10,"\n "),h.ɵɵelementStart(11,"div",5),h.ɵɵtext(12,"\n "),h.ɵɵelementStart(13,"div",6),h.ɵɵtext(14,"\n "),h.ɵɵelementStart(15,"label",7),h.ɵɵtext(16),h.ɵɵpipe(17,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(18,"\n "),h.ɵɵelementStart(19,"input",8),h.ɵɵlistener("ngModelChange",(function(e){return t.currentMasterPassword=e})),h.ɵɵelementEnd(),h.ɵɵtext(20,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(21,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(22,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(23,"\n "),h.ɵɵelementStart(24,"div",4),h.ɵɵtext(25,"\n "),h.ɵɵelementStart(26,"div",5),h.ɵɵtext(27,"\n "),h.ɵɵelementStart(28,"div",6),h.ɵɵtext(29,"\n "),h.ɵɵelementStart(30,"label",9),h.ɵɵtext(31),h.ɵɵpipe(32,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(33,"\n "),h.ɵɵelementStart(34,"input",10),h.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),h.ɵɵelementEnd(),h.ɵɵtext(35,"\n "),h.ɵɵelement(36,"app-password-strength",11),h.ɵɵtext(37,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(38,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(39,"\n "),h.ɵɵelementStart(40,"div",5),h.ɵɵtext(41,"\n "),h.ɵɵelementStart(42,"div",6),h.ɵɵtext(43,"\n "),h.ɵɵelementStart(44,"label",12),h.ɵɵtext(45),h.ɵɵpipe(46,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(47,"\n "),h.ɵɵelementStart(48,"input",13),h.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),h.ɵɵelementEnd(),h.ɵɵtext(49,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(50,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(51,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(52,"\n "),h.ɵɵelementStart(53,"div",6),h.ɵɵtext(54,"\n "),h.ɵɵelementStart(55,"div",14),h.ɵɵtext(56,"\n "),h.ɵɵelementStart(57,"input",15),h.ɵɵlistener("ngModelChange",(function(e){return t.rotateEncKey=e}))("change",(function(){return t.rotateEncKeyClicked()})),h.ɵɵelementEnd(),h.ɵɵtext(58,"\n "),h.ɵɵelementStart(59,"label",16),h.ɵɵtext(60),h.ɵɵpipe(61,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(62,"\n "),h.ɵɵelementStart(63,"a",17),h.ɵɵpipe(64,"i18n"),h.ɵɵtext(65,"\n "),h.ɵɵelement(66,"i",18),h.ɵɵtext(67,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(68,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(69,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(70,"\n "),h.ɵɵelementStart(71,"button",19),h.ɵɵtext(72,"\n "),h.ɵɵelement(73,"i",20),h.ɵɵpipe(74,"i18n"),h.ɵɵtext(75,"\n "),h.ɵɵelementStart(76,"span"),h.ɵɵtext(77),h.ɵɵpipe(78,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(79,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(80,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(81,"\n")),2&e){const e=h.ɵɵreference(7);h.ɵɵadvance(1),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(2,17,"loggedOutWarning")),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",t.enforcedPolicyOptions),h.ɵɵadvance(2),h.ɵɵproperty("appApiAction",t.formPromise),h.ɵɵadvance(10),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(17,19,"currentMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.currentMasterPassword),h.ɵɵadvance(12),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(32,21,"newMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.masterPassword),h.ɵɵadvance(2),h.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),h.ɵɵadvance(9),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(46,23,"confirmNewMasterPass")),h.ɵɵadvance(3),h.ɵɵproperty("ngModel",t.masterPasswordRetype),h.ɵɵadvance(9),h.ɵɵproperty("ngModel",t.rotateEncKey),h.ɵɵadvance(3),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(61,25,"rotateAccountEncKey"),"\n "),h.ɵɵadvance(3),h.ɵɵpropertyInterpolate("appA11yTitle",h.ɵɵpipeBind1(64,27,"learnMore")),h.ɵɵadvance(8),h.ɵɵproperty("disabled",e.loading),h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(74,29,"loading")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(78,31,"changeMasterPassword"))}},directives:[A.CalloutComponent,O.NgIf,T.NgControlStatusGroup,T.NgForm,M.ApiActionDirective,T.DefaultValueAccessor,T.RequiredValidator,D.InputVerbatimDirective,T.NgControlStatus,T.NgModel,B.PasswordStrengthComponent,T.CheckboxControlValueAccessor,R.A11yTitleDirective],pipes:[U.I18nPipe],encapsulation:2})},80897:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CreateOrganizationComponent=void 0;n(68012);const r=n(53232),o=n(39691),a=n(48155),s=n(13816),l=n(32621),c=n(68012),d=n(13816),p=n(72596);class u{constructor(e){this.route=e}ngOnInit(){this.route.queryParams.pipe(r.first()).subscribe((e=>i(this,void 0,void 0,(function*(){"families"===e.plan?(this.orgPlansComponent.plan=o.PlanType.FamiliesAnnually,this.orgPlansComponent.product=a.ProductType.Families):"teams"===e.plan?(this.orgPlansComponent.plan=o.PlanType.TeamsAnnually,this.orgPlansComponent.product=a.ProductType.Teams):"enterprise"===e.plan&&(this.orgPlansComponent.plan=o.PlanType.EnterpriseAnnually,this.orgPlansComponent.product=a.ProductType.Enterprise)}))))}}t.CreateOrganizationComponent=u,u.ɵfac=function(e){return new(e||u)(l.ɵɵdirectiveInject(c.ActivatedRoute))},u.ɵcmp=l.ɵɵdefineComponent({type:u,selectors:[["app-create-organization"]],viewQuery:function(e,t){if(1&e&&l.ɵɵviewQuery(s.OrganizationPlansComponent,7),2&e){let e;l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.orgPlansComponent=e.first)}},decls:13,vars:6,consts:[[1,"page-header"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n"),l.ɵɵelementStart(7,"p"),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n"),l.ɵɵelement(11,"app-organization-plans"),l.ɵɵtext(12,"\n")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,2,"newOrganization")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(9,4,"newOrganizationDesc")))},directives:[d.OrganizationPlansComponent],pipes:[p.I18nPipe],encapsulation:2})},54768:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeauthorizeSessionsComponent=void 0;n(91092),n(40349),n(70143),n(36424),n(99954),n(61554);const r=n(32621),o=n(91092),a=n(40349),s=n(99954),l=n(61554),c=n(36424),d=n(70143),p=n(96832),u=n(637),m=n(50553),h=n(52900),v=n(38287),f=n(72596);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.messagingService=r,this.logService=o}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.postSecurityStamp(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("sessionsDeauthorized"),this.i18nService.t("logBackIn")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}))}}t.DeauthorizeSessionsComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.MessagingService),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-deauthorize-sessions"]],decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","deAuthTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deAuthTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-verify-master-password",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"deauthorizeSessions")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"deauthorizeSessionsDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"deauthorizeSessionsWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"deauthorizeSessions")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.VerifyMasterPasswordComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},10673:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DeleteAccountComponent=void 0;n(91092),n(40349),n(70143),n(36424),n(99954),n(61554);const r=n(32621),o=n(91092),a=n(40349),s=n(99954),l=n(61554),c=n(36424),d=n(70143),p=n(96832),u=n(637),m=n(50553),h=n(52900),v=n(38287),f=n(72596);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.messagingService=r,this.logService=o}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.deleteAccount(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("accountDeleted"),this.i18nService.t("accountDeletedDesc")),this.messagingService.send("logout")}catch(e){this.logService.error(e)}}))}}t.DeleteAccountComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.MessagingService),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-delete-account"]],decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteAccountTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteAccountTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-verify-master-password",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"deleteAccount")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,"deleteAccountDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"deleteAccountWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"deleteAccount")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.VerifyMasterPasswordComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},44257:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.DomainRulesComponent=void 0;n(91092),n(40349),n(70143),n(99954);const r=n(85402),o=n(32621),a=n(91092),s=n(40349),l=n(99954),c=n(70143),d=n(96832),p=n(637),u=n(57490),m=n(50553),h=n(80507),v=n(72596);function f(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",8),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",9),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function g(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",15),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",16),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"textarea",17),o.ɵɵlistener("ngModelChange",(function(t){const n=o.ɵɵrestoreView(e).index;return o.ɵɵnextContext(2).custom[n]=t})),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",18),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).index;return o.ɵɵnextContext(2).remove(t)})),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelement(15,"i",19),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.index,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("for","customDomain_",e,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(6,7,"customDomainX",e+1)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate1("name","CustomDomain[",e,"]"),o.ɵɵpropertyInterpolate1("id","customDomain_",e,""),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(9,10,"ex")," google.com, gmail.com"),o.ɵɵproperty("ngModel",n.custom[e]),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,12,"remove"))}}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,g,18,14,"div",10),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"button",11),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().add()})),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",12),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"small",13),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.custom)("ngForTrackBy",e.indexTrackBy),o.ɵɵadvance(5),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(8,4,"newCustomDomain"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,6,"newCustomDomainDesc"))}}function x(e,t){1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",8),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",9),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",29),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).toggleExcluded(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",31),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"exclude"),"\n "))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",29),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).toggleExcluded(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",32),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"include"),"\n "))}const w=function(e){return{"table-list-strike":e}};function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",22),o.ɵɵtext(3),o.ɵɵelementEnd(),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"td",23),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",24),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"button",25),o.ɵɵpipe(10,"i18n"),o.ɵɵtext(11,"\n "),o.ɵɵelement(12,"i",26),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"div",27),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,S,5,3,"a",28),o.ɵɵtext(18,"\n "),o.ɵɵtemplate(19,b,5,3,"a",28),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"a",29),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).customize(t)})),o.ɵɵtext(22,"\n "),o.ɵɵelement(23,"i",30),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit;o.ɵɵadvance(2),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(10,w,e.excluded)),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.domains),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(10,6,"options")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!e.excluded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.excluded),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(25,8,"customize"),"\n ")}}function C(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",20),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,I,30,12,"tr",21),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.global)}}class E{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.loading=!0,this.custom=[],this.global=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getSettingsDomains();this.loading=!1,null!=e.equivalentDomains&&(this.custom=e.equivalentDomains.map((e=>e.join(", ")))),null!=e.globalEquivalentDomains&&(this.global=e.globalEquivalentDomains.map((e=>({domains:e.domains.join(", "),excluded:e.excluded,key:e.type}))))}))}toggleExcluded(e){e.excluded=!e.excluded}customize(e){e.excluded=!0,this.custom.push(e.domains)}remove(e){this.custom.splice(e,1)}add(){this.custom.push("")}submit(){return i(this,void 0,void 0,(function*(){const e=new r.UpdateDomainsRequest;e.excludedGlobalEquivalentDomains=this.global.filter((e=>e.excluded)).map((e=>e.key)),0===e.excludedGlobalEquivalentDomains.length&&(e.excludedGlobalEquivalentDomains=null),e.equivalentDomains=this.custom.filter((e=>null!=e&&""!==e.trim())).map((e=>e.split(",").map((e=>e.trim())))),0===e.equivalentDomains.length&&(e.equivalentDomains=null);try{this.formPromise=this.apiService.putSettingsDomains(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("domainsUpdated"))}catch(t){this.logService.error(t)}}))}indexTrackBy(e,t){return e}}t.DomainRulesComponent=E,E.ɵfac=function(e){return new(e||E)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.LogService))},E.ɵcmp=o.ɵɵdefineComponent({type:E,selectors:[["app-domain-rules"]],decls:51,vars:31,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[4,"ngIf"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"spaced-header"],["class","table table-hover table-list",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["class","form-group d-flex",4,"ngFor","ngForOf","ngForTrackBy"],["type","button",1,"btn","btn-outline-secondary","btn-sm","mb-2",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"text-muted","d-block","mb-3"],[1,"form-group","d-flex"],[1,"flex-fill"],[1,"sr-only",3,"for"],["required","",1,"form-control",3,"name","id","ngModel","placeholder","ngModelChange"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[3,"ngClass"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-cut"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-plus"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵelementStart(7,"p"),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n"),o.ɵɵelementStart(11,"form",1,2),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"h2"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵtemplate(18,f,9,6,"p",3),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,y,14,8,"ng-container",3),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"button",4),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"i",5),o.ɵɵpipe(25,"i18n"),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"span"),o.ɵɵtext(28),o.ɵɵpipe(29,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"h2",6),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵtemplate(36,x,9,6,"p",3),o.ɵɵtext(37,"\n "),o.ɵɵtemplate(38,C,7,1,"table",7),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"button",4),o.ɵɵtext(41,"\n "),o.ɵɵelement(42,"i",5),o.ɵɵpipe(43,"i18n"),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"span"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n")),2&e){const e=o.ɵɵreference(12);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,15,"domainRules")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,17,"domainRulesDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,19,"customEqDomains")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(25,21,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(29,23,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(34,25,"globalEqDomains")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading&&t.global.length>0),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(43,27,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,29,"save"))}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.NgIf,u.NgForOf,d.DefaultValueAccessor,d.RequiredValidator,d.NgControlStatus,d.NgModel,m.A11yTitleDirective,u.NgClass,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2})},56301:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAddEditComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(50692)),a=n(78104),s=n(62632),l=n(32621),c=n(91092),d=n(40349),p=n(99954),u=n(70143),m=n(96832),h=n(637),v=n(57490),f=n(50553),g=n(72596);function y(e,t){1&e&&(l.ɵɵelementStart(0,"span",19),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"premium")))}function x(e,t){if(1&e&&(l.ɵɵelementStart(0,"small",20),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function S(e,t){1&e&&(l.ɵɵelementStart(0,"div",21),l.ɵɵtext(1,"\n "),l.ɵɵelement(2,"i",22),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4,"\n "),l.ɵɵelementStart(5,"span",23),l.ɵɵtext(6),l.ɵɵpipe(7,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,2,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",35),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"label",36),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"input",37),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).email=t})),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementContainerEnd()}if(2&e){const e=l.ɵɵnextContext(2);l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,3,"inviteEmergencyContactDesc")),l.ɵɵadvance(6),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(10,5,"email")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",e.email)}}function w(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",38),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){const e=t.$implicit;l.ɵɵproperty("ngValue",e.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"div",21),l.ɵɵtext(1,"\n "),l.ɵɵtemplate(2,b,15,7,"ng-container",15),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"h3"),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementStart(7,"a",24),l.ɵɵpipe(8,"i18n"),l.ɵɵtext(9,"\n "),l.ɵɵelement(10,"i",25),l.ɵɵtext(11,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(12,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(13,"\n "),l.ɵɵelementStart(14,"div",26),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"input",27),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().type=t})),l.ɵɵelementEnd(),l.ɵɵtext(17,"\n "),l.ɵɵelementStart(18,"label",28),l.ɵɵtext(19),l.ɵɵpipe(20,"i18n"),l.ɵɵelementStart(21,"small"),l.ɵɵtext(22),l.ɵɵpipe(23,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(24,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementStart(27,"div",26),l.ɵɵtext(28,"\n "),l.ɵɵelementStart(29,"input",29),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().type=t})),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n "),l.ɵɵelementStart(31,"label",30),l.ɵɵtext(32),l.ɵɵpipe(33,"i18n"),l.ɵɵelementStart(34,"small"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(38,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(39,"\n "),l.ɵɵelementStart(40,"div",31),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"label",32),l.ɵɵtext(43),l.ɵɵpipe(44,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(45,"\n "),l.ɵɵelementStart(46,"select",33),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().waitTime=t})),l.ɵɵtext(47,"\n "),l.ɵɵtemplate(48,w,2,2,"option",34),l.ɵɵtext(49,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n "),l.ɵɵelementStart(51,"small",20),l.ɵɵtext(52),l.ɵɵpipe(53,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(54,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(55,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!e.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(6,17,"userAccess"),"\n "),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(8,19,"learnMore")),l.ɵɵadvance(9),l.ɵɵproperty("value",e.emergencyAccessType.View)("ngModel",e.type),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(20,21,"view"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(23,23,"viewDesc")),l.ɵɵadvance(7),l.ɵɵproperty("value",e.emergencyAccessType.Takeover)("ngModel",e.type)("disabled",e.readOnly),l.ɵɵadvance(3),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(33,25,"takeover"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,27,"takeoverDesc")),l.ɵɵadvance(8),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(44,29,"waitTime")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",e.waitTime)("disabled",e.readOnly),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",e.waitTimes),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(53,31,"waitTimeDesc"))}}function C(e,t){1&e&&(l.ɵɵelement(0,"i",39),l.ɵɵpipe(1,"i18n")),2&e&&l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(1,1,"loading"))}function E(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"save")))}function P(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"button",40,41),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().delete()})),l.ɵɵpipe(2,"i18n"),l.ɵɵtext(3,"\n "),l.ɵɵelement(4,"i",42),l.ɵɵtext(5,"\n "),l.ɵɵelement(6,"i",43),l.ɵɵpipe(7,"i18n"),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵreference(1);l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(2,5,"delete")),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(4),l.ɵɵproperty("hidden",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(7,7,"loading")),l.ɵɵproperty("hidden",!e.loading)}}class k{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onSaved=new r.EventEmitter,this.onDeleted=new r.EventEmitter,this.loading=!0,this.readOnly=!1,this.editMode=!1,this.type=o.EmergencyAccessType.View,this.emergencyAccessType=o.EmergencyAccessType}ngOnInit(){return i(this,void 0,void 0,(function*(){if(this.editMode=this.loading=null!=this.emergencyAccessId,this.waitTimes=[{name:this.i18nService.t("oneDay"),value:1},{name:this.i18nService.t("days","2"),value:2},{name:this.i18nService.t("days","7"),value:7},{name:this.i18nService.t("days","14"),value:14},{name:this.i18nService.t("days","30"),value:30},{name:this.i18nService.t("days","90"),value:90}],this.editMode){this.editMode=!0,this.title=this.i18nService.t("editEmergencyContact");try{const e=yield this.apiService.getEmergencyAccess(this.emergencyAccessId);this.type=e.type,this.waitTime=e.waitTimeDays}catch(e){this.logService.error(e)}}else this.title=this.i18nService.t("inviteEmergencyContact"),this.waitTime=this.waitTimes[2].value;this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){try{if(this.editMode){const e=new s.EmergencyAccessUpdateRequest;e.type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.putEmergencyAccess(this.emergencyAccessId,e)}else{const e=new a.EmergencyAccessInviteRequest;e.email=this.email.trim(),e.type=this.type,e.waitTimeDays=this.waitTime,this.formPromise=this.apiService.postEmergencyAccessInvite(e)}yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSaved.emit()}catch(e){this.logService.error(e)}}))}delete(){return i(this,void 0,void 0,(function*(){this.onDeleted.emit()}))}}t.EmergencyAccessAddEditComponent=k,k.ɵfac=function(e){return new(e||k)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.LogService))},k.ɵcmp=l.ɵɵdefineComponent({type:k,selectors:[["emergency-access-add-edit"]],inputs:{name:"name",emergencyAccessId:"emergencyAccessId"},outputs:{onSaved:"onSaved",onDeleted:"onDeleted"},decls:51,vars:16,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","badge badge-primary",4,"ngIf"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["submitBtn",""],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","click",4,"ngIf"],[1,"badge","badge-primary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/emergency-access/#user-access",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","userType","id","emergencyTypeView",1,"form-check-input",3,"value","ngModel","ngModelChange"],["for","emergencyTypeView",1,"form-check-label"],["type","radio","name","userType","id","emergencyTypeTakeover",1,"form-check-input",3,"value","ngModel","disabled","ngModelChange"],["for","emergencyTypeTakeover",1,"form-check-label"],[1,"form-group","col-6","mt-4"],["for","waitTime"],["id","waitTime","name","waitTime",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-group","mb-4"],["for","email"],["id","email","type","text","name","Email","required","",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8,"\n "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10,"\n "),l.ɵɵtemplate(11,y,3,3,"span",6),l.ɵɵtext(12),l.ɵɵtemplate(13,x,2,1,"small",7),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"button",8),l.ɵɵpipe(17,"i18n"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"span",9),l.ɵɵtext(20,"×"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,S,9,6,"div",10),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,I,56,33,"div",10),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"div",11),l.ɵɵtext(29,"\n "),l.ɵɵelementStart(30,"button",12,13),l.ɵɵtext(32,"\n "),l.ɵɵtemplate(33,C,2,3,"i",14),l.ɵɵtext(34,"\n "),l.ɵɵtemplate(35,E,3,3,"span",15),l.ɵɵtext(36,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"button",16),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"div",17),l.ɵɵtext(43,"\n "),l.ɵɵtemplate(44,P,9,9,"button",18),l.ɵɵtext(45,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(46,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(47,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(48,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(49,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(50,"\n")),2&e){const e=l.ɵɵreference(31);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(7),l.ɵɵproperty("ngIf",t.readOnly),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",t.title,"\n "),l.ɵɵadvance(1),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(17,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",t.loading||e.loading||t.readOnly),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.loading||e.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading&&!e.loading),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(40,14,"cancel"),"\n "),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",t.editMode)}},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,m.RadioControlValueAccessor,m.DefaultValueAccessor,m.NgControlStatus,m.NgModel,m.SelectControlValueAccessor,v.NgForOf,m.RequiredValidator,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[g.I18nPipe],encapsulation:2})},69011:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAttachmentsComponent=void 0;n(91092),n(68062),n(82058),n(40349),n(70143),n(99954),n(77243);const r=n(25885),o=n(32621),a=n(68062),s=n(40349),l=n(82058),c=n(77243),d=n(99954),p=n(91092),u=n(70143),m=n(96832),h=n(637),v=n(57490),f=n(50553),g=n(80507),y=n(72596);function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.cipher.name)}}function S(e,t){1&e&&o.ɵɵelement(0,"i",24)}function b(e,t){1&e&&o.ɵɵelement(0,"i",25)}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",26),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",28),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"span",29),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"button",30,31),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).reupload(t)})),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(12),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(5,5,"attachmentFixDesc")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,7,"attachmentFixDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"td",32),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",33,34),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).delete(t)})),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",35),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",36),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(3),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,6,"delete")),o.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",16),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,S,1,0,"i",17),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,1,0,"i",18),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td",19),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",20),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",21),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).download(t)})),o.ɵɵtext(14),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,16,11,"div",22),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,I,12,10,"td",23),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.downloading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.downloading),o.ɵɵadvance(8),o.ɵɵtextInterpolate(e.fileName),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sizeName),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!n.viewOnly)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,C,25,6,"tr",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.cipher.attachments)}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",37),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",38),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small",39),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newAttachment")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"file")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"maxFileSize")))}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",40),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",41),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(5);o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"save"))}}class A extends r.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,r,o,window,a,i),this.viewOnly=!0,this.canAccessAttachments=!0}init(){return i(this,void 0,void 0,(function*(){}))}showFixOldAttachments(e){return!1}}t.EmergencyAccessAttachmentsComponent=A,A.ɵfac=function(e){return new(e||A)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.CryptoService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.ApiService),o.ɵɵdirectiveInject(u.LogService))},A.ɵcmp=o.ɵɵdefineComponent({type:A,selectors:[["emergency-access-attachments"]],features:[o.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,x,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,7,1,"table",10),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,P,16,9,"div",6),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",11),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,k,9,7,"button",12),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",13),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"attachments"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,v.NgForOf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},76797:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessConfirmComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(70143),n(77243),n(70829)),a=n(32621),s=n(91092),l=n(82058),c=n(77243),d=n(70143),p=n(96832),u=n(637),m=n(57490),h=n(50553),v=n(72596);function f(e,t){if(1&e&&(a.ɵɵelementStart(0,"small",18),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}class g{constructor(e,t,n,i){this.apiService=e,this.cryptoService=t,this.stateService=n,this.logService=i,this.onConfirmed=new r.EventEmitter,this.dontAskAgain=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){try{const e=yield this.apiService.getUserPublicKey(this.userId);if(null!=e){const t=o.Utils.fromB64ToArray(e.publicKey),n=yield this.cryptoService.getFingerprint(this.userId,t.buffer);null!=n&&(this.fingerprint=n.join("-"))}}catch(e){this.logService.error(e)}this.loading=!1}))}submit(){return i(this,void 0,void 0,(function*(){if(!this.loading){this.dontAskAgain&&(yield this.stateService.setAutoConfirmFingerprints(!0));try{this.onConfirmed.emit()}catch(e){this.logService.error(e)}}}))}}t.EmergencyAccessConfirmComponent=g,g.ɵfac=function(e){return new(e||g)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.CryptoService),a.ɵɵdirectiveInject(c.StateService),a.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=a.ɵɵdefineComponent({type:g,selectors:[["emergency-access-confirm"]],inputs:{name:"name",userId:"userId",emergencyAccessId:"emergencyAccessId",formPromise:"formPromise"},outputs:{onConfirmed:"onConfirmed"},decls:69,vars:29,consts:[["role","dialog","aria-modal","true","aria-labelledby","confirmUserTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","confirmUserTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener"],[1,"form-check"],["type","checkbox","id","dontAskAgain","name","DontAskAgain",1,"form-check-input",3,"ngModel","ngModelChange"],["for","dontAskAgain",1,"form-check-label"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵtemplate(12,f,2,1,"small",6),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"button",7),a.ɵɵpipe(16,"i18n"),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"span",8),a.ɵɵtext(19,"×"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"div",9),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"p"),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementStart(28,"a",10),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n "),a.ɵɵelementStart(33,"p"),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"code"),a.ɵɵtext(36),a.ɵɵelementEnd(),a.ɵɵtext(37,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"div",11),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"input",12),a.ɵɵlistener("ngModelChange",(function(e){return t.dontAskAgain=e})),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementStart(43,"label",13),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"div",14),a.ɵɵtext(50,"\n "),a.ɵɵelementStart(51,"button",15),a.ɵɵtext(52,"\n "),a.ɵɵelement(53,"i",16),a.ɵɵpipe(54,"i18n"),a.ɵɵtext(55,"\n "),a.ɵɵelementStart(56,"span"),a.ɵɵtext(57),a.ɵɵpipe(58,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelementStart(61,"button",17),a.ɵɵtext(62),a.ɵɵpipe(63,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(65,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n")),2&e){const e=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,13,"confirmUser"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(16,15,"close")),a.ɵɵadvance(11),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,17,"fingerprintEnsureIntegrityVerify"),"\n "),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(30,19,"learnMore"),""),a.ɵɵadvance(7),a.ɵɵtextInterpolate(t.fingerprint),a.ɵɵadvance(5),a.ɵɵproperty("ngModel",t.dontAskAgain),a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,21,"dontAskFingerprintAgain"),"\n "),a.ɵɵadvance(7),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(54,23,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(58,25,"confirm")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(63,27,"cancel"),"\n ")}},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.NgIf,h.A11yTitleDirective,p.CheckboxControlValueAccessor,p.NgControlStatus,p.NgModel],pipes:[v.I18nPipe],encapsulation:2})},55418:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessTakeoverComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(40349),n(70143),n(36424),n(86193),n(99954),n(10685),n(77243),n(25847),n(79384)),a=n(5784),s=n(61833),l=n(8061),c=n(48921),d=n(32621),p=n(40349),u=n(82058),m=n(36424),h=n(77243),v=n(86193),f=n(99954),g=n(10685),y=n(91092),x=n(70143),S=n(96832),b=n(637),w=n(57490),I=n(50553),C=n(52900),E=n(966),P=n(14296),k=n(72596);function A(e,t){if(1&e&&(d.ɵɵelementStart(0,"small",24),d.ɵɵtext(1),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(1),d.ɵɵtextInterpolate(e.name)}}function O(e,t){if(1&e&&(d.ɵɵelementStart(0,"app-callout",25),d.ɵɵtext(1,"\n "),d.ɵɵelementEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵproperty("enforcedPolicyOptions",e.enforcedPolicyOptions)}}class T extends c.ChangePasswordComponent{constructor(e,t,n,i,o,a,s,l,c){super(e,t,n,o,a,s,i),this.apiService=l,this.logService=c,this.onDone=new r.EventEmitter}ngOnInit(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.getEmergencyGrantorPolicies(this.emergencyAccessId);if(null!=e.data&&e.data.length>0){const t=e.data.map((e=>new a.Policy(new o.PolicyData(e))));this.enforcedPolicyOptions=yield this.policyService.getMasterPasswordPolicyOptions(t)}}))}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.strongPassword()))return;const e=yield this.apiService.postEmergencyAccessTakeover(this.emergencyAccessId),t=yield this.cryptoService.rsaDecrypt(e.keyEncrypted),n=new s.SymmetricCryptoKey(t);if(null==n)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unexpectedError"));const i=yield this.cryptoService.makeKey(this.masterPassword,this.email,e.kdf,e.kdfIterations),r=yield this.cryptoService.hashPassword(this.masterPassword,i),o=yield this.cryptoService.remakeEncKey(i,n),a=new l.EmergencyAccessPasswordRequest;a.newMasterPasswordHash=r,a.key=o[1].encryptedString,this.apiService.postEmergencyAccessPassword(this.emergencyAccessId,a);try{this.onDone.emit()}catch(c){this.logService.error(c)}}))}}t.EmergencyAccessTakeoverComponent=T,T.ɵfac=function(e){return new(e||T)(d.ɵɵdirectiveInject(p.I18nService),d.ɵɵdirectiveInject(u.CryptoService),d.ɵɵdirectiveInject(m.MessagingService),d.ɵɵdirectiveInject(h.StateService),d.ɵɵdirectiveInject(v.PasswordGenerationService),d.ɵɵdirectiveInject(f.PlatformUtilsService),d.ɵɵdirectiveInject(g.PolicyService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(x.LogService))},T.ɵcmp=d.ɵɵdefineComponent({type:T,selectors:[["emergency-access-takeover"]],inputs:{emergencyAccessId:"emergencyAccessId",name:"name",email:"email",kdf:"kdf",kdfIterations:"kdfIterations"},outputs:{onDone:"onDone"},features:[d.ɵɵInheritDefinitionFeature],decls:82,vars:32,consts:[["role","dialog","aria-modal","true","aria-labelledby","userAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","userAddEditTitle",1,"modal-title"],["class","text-muted",4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["type","info",3,"enforcedPolicyOptions",4,"ngIf"],[1,"row"],[1,"col-6"],[1,"form-group"],["for","masterPassword"],["id","masterPassword","type","password","name","NewMasterPasswordHash","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control","mb-1",3,"ngModel","ngModelChange","input"],[3,"score","showText"],["for","masterPasswordRetype"],["id","masterPasswordRetype","type","password","name","MasterPasswordRetype","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info",3,"enforcedPolicyOptions"]],template:function(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"div",1),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"form",2,3),d.ɵɵlistener("ngSubmit",(function(){return t.submit()})),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"div",4),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"h2",5),d.ɵɵtext(10),d.ɵɵpipe(11,"i18n"),d.ɵɵtemplate(12,A,2,1,"small",6),d.ɵɵtext(13,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(14,"\n "),d.ɵɵelementStart(15,"button",7),d.ɵɵpipe(16,"i18n"),d.ɵɵtext(17,"\n "),d.ɵɵelementStart(18,"span",8),d.ɵɵtext(19,"×"),d.ɵɵelementEnd(),d.ɵɵtext(20,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"div",9),d.ɵɵtext(24,"\n "),d.ɵɵelementStart(25,"app-callout",10),d.ɵɵtext(26),d.ɵɵpipe(27,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(28,"\n "),d.ɵɵtemplate(29,O,2,1,"app-callout",11),d.ɵɵtext(30,"\n "),d.ɵɵelementStart(31,"div",12),d.ɵɵtext(32,"\n "),d.ɵɵelementStart(33,"div",13),d.ɵɵtext(34,"\n "),d.ɵɵelementStart(35,"div",14),d.ɵɵtext(36,"\n "),d.ɵɵelementStart(37,"label",15),d.ɵɵtext(38),d.ɵɵpipe(39,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(40,"\n "),d.ɵɵelementStart(41,"input",16),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),d.ɵɵelementEnd(),d.ɵɵtext(42,"\n "),d.ɵɵelementStart(43,"app-password-strength",17),d.ɵɵtext(44,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(45,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(46,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(47,"\n "),d.ɵɵelementStart(48,"div",13),d.ɵɵtext(49,"\n "),d.ɵɵelementStart(50,"div",14),d.ɵɵtext(51,"\n "),d.ɵɵelementStart(52,"label",18),d.ɵɵtext(53),d.ɵɵpipe(54,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(55,"\n "),d.ɵɵelementStart(56,"input",19),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),d.ɵɵelementEnd(),d.ɵɵtext(57,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(58,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(59,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(60,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(61,"\n "),d.ɵɵelementStart(62,"div",20),d.ɵɵtext(63,"\n "),d.ɵɵelementStart(64,"button",21),d.ɵɵtext(65,"\n "),d.ɵɵelement(66,"i",22),d.ɵɵpipe(67,"i18n"),d.ɵɵtext(68,"\n "),d.ɵɵelementStart(69,"span"),d.ɵɵtext(70),d.ɵɵpipe(71,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(72,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(73,"\n "),d.ɵɵelementStart(74,"button",23),d.ɵɵtext(75),d.ɵɵpipe(76,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(77,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(78,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(79,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(80,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(81,"\n")),2&e){const e=d.ɵɵreference(5);d.ɵɵadvance(4),d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(6),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(11,16,"takeover"),"\n "),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.name),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(16,18,"close")),d.ɵɵadvance(11),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(27,20,"loggedOutWarning")),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",t.enforcedPolicyOptions),d.ɵɵadvance(9),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(39,22,"newMasterPass")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.masterPassword),d.ɵɵadvance(2),d.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),d.ɵɵadvance(10),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(54,24,"confirmNewMasterPass")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.masterPasswordRetype),d.ɵɵadvance(8),d.ɵɵproperty("disabled",e.loading),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(67,26,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(71,28,"save")),d.ɵɵadvance(5),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(76,30,"cancel"),"\n ")}},directives:[S.NgControlStatusGroup,S.NgForm,b.ApiActionDirective,w.NgIf,I.A11yTitleDirective,C.CalloutComponent,S.DefaultValueAccessor,S.RequiredValidator,E.InputVerbatimDirective,S.NgControlStatus,S.NgModel,P.PasswordStrengthComponent],pipes:[k.I18nPipe],encapsulation:2})},29511:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewComponent=void 0;const r=n(32621),o=(n(68012),n(91092),n(68062),n(82058),n(29546),n(13886)),a=n(78758),s=n(61833),l=n(69011),c=n(43718),d=n(32621),p=n(68062),u=n(82058),m=n(29546),h=n(68012),v=n(91092),f=n(57490),g=n(52665),y=n(80507),x=n(92521),S=n(50553),b=n(72596),w=["cipherAddEdit"],I=["attachments"];function C(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",13),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"shared")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",15),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"attachments")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",16),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",17),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",18),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",19),d.ɵɵtext(9,"\n "),d.ɵɵelementStart(10,"a",20),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);const t=d.ɵɵnextContext().$implicit;return d.ɵɵnextContext(2).viewAttachments(t)})),d.ɵɵtext(11,"\n "),d.ɵɵelement(12,"i",21),d.ɵɵtext(13),d.ɵɵpipe(14,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(15,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(16,"\n "),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,2,"options")),d.ɵɵadvance(11),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(14,4,"attachments"),"\n "))}function k(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"tr"),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"td",7),d.ɵɵtext(3,"\n "),d.ɵɵelement(4,"app-vault-icon",8),d.ɵɵtext(5,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n "),d.ɵɵelementStart(7,"td",9),d.ɵɵtext(8,"\n "),d.ɵɵelementStart(9,"a",10),d.ɵɵlistener("click",(function(){const t=d.ɵɵrestoreView(e).$implicit;return d.ɵɵnextContext(2).selectCipher(t)})),d.ɵɵpipe(10,"i18n"),d.ɵɵtext(11),d.ɵɵelementEnd(),d.ɵɵtext(12,"\n "),d.ɵɵtemplate(13,C,9,6,"ng-container",2),d.ɵɵtext(14,"\n "),d.ɵɵtemplate(15,E,9,6,"ng-container",2),d.ɵɵtext(16,"\n "),d.ɵɵelement(17,"br"),d.ɵɵtext(18,"\n "),d.ɵɵelementStart(19,"small"),d.ɵɵtext(20),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(22,"\n "),d.ɵɵelementStart(23,"td",11),d.ɵɵtext(24,"\n "),d.ɵɵtemplate(25,P,17,6,"div",12),d.ɵɵtext(26,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(27,"\n "),d.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=d.ɵɵnextContext(2);d.ɵɵadvance(4),d.ɵɵproperty("cipher",e),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(10,7,"editItem")),d.ɵɵadvance(2),d.ɵɵtextInterpolate(e.name),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!n.organization&&e.organizationId),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",e.hasAttachments),d.ɵɵadvance(5),d.ɵɵtextInterpolate(e.subTitle),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",e.hasAttachments)}}function A(e,t){if(1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"table",5),d.ɵɵtext(3,"\n "),d.ɵɵelementStart(4,"tbody"),d.ɵɵtext(5,"\n "),d.ɵɵtemplate(6,k,28,9,"tr",6),d.ɵɵtext(7,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(9,"\n "),d.ɵɵelementContainerEnd()),2&e){const e=d.ɵɵnextContext();d.ɵɵadvance(6),d.ɵɵproperty("ngForOf",e.ciphers)}}function O(e,t){1&e&&(d.ɵɵelementContainerStart(0),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",22),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelementStart(5,"span",14),d.ɵɵtext(6),d.ɵɵpipe(7,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(8,"\n "),d.ɵɵelementContainerEnd()),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(3,2,"loading")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(7,4,"loading")))}function T(e,t){}function M(e,t){}class D{constructor(e,t,n,i,r,o){this.cipherService=e,this.cryptoService=t,this.modalService=n,this.router=i,this.route=r,this.apiService=o,this.ciphers=[],this.loaded=!1}ngOnInit(){this.route.params.subscribe((e=>{if(null==e.id)return this.router.navigate(["settings/emergency-access"]);this.id=e.id,this.load()}))}selectCipher(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(c.EmergencyAddEditComponent,this.cipherAddEditModalRef,(t=>{t.cipherId=null==e?null:e.id,t.cipher=e}));return n}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.apiService.postEmergencyAccessView(this.id);this.ciphers=yield this.getAllCiphers(e),this.loaded=!0}))}viewAttachments(e){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(l.EmergencyAccessAttachmentsComponent,this.attachmentsModalRef,(t=>{t.cipher=e,t.emergencyAccessId=this.id}))}))}getAllCiphers(e){return i(this,void 0,void 0,(function*(){const t=e.ciphers,n=[],i=yield this.cryptoService.rsaDecrypt(e.keyEncrypted),r=new s.SymmetricCryptoKey(i),l=[];return t.forEach((e=>{const t=new o.CipherData(e),i=new a.Cipher(t);l.push(i.decrypt(r).then((e=>n.push(e))))})),yield Promise.all(l),n.sort(this.cipherService.getLocaleSortingFunction()),n}))}}t.EmergencyAccessViewComponent=D,D.ɵfac=function(e){return new(e||D)(d.ɵɵdirectiveInject(p.CipherService),d.ɵɵdirectiveInject(u.CryptoService),d.ɵɵdirectiveInject(m.ModalService),d.ɵɵdirectiveInject(h.Router),d.ɵɵdirectiveInject(h.ActivatedRoute),d.ɵɵdirectiveInject(v.ApiService))},D.ɵcmp=d.ɵɵdefineComponent({type:D,selectors:[["emergency-access-view"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(w,7,r.ViewContainerRef),d.ɵɵviewQuery(I,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first)}},decls:20,vars:5,consts:[[1,"page-header"],[1,"mt-4"],[4,"ngIf"],["cipherAddEdit",""],["attachments",""],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"table-list-options"],["class","dropdown","appListDropdown","",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"h1"),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(5,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(6,"\n"),d.ɵɵelementStart(7,"div",1),d.ɵɵtext(8,"\n "),d.ɵɵtemplate(9,A,10,1,"ng-container",2),d.ɵɵtext(10,"\n "),d.ɵɵtemplate(11,O,9,6,"ng-container",2),d.ɵɵtext(12,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(13,"\n"),d.ɵɵtemplate(14,T,0,0,"ng-template",null,3,d.ɵɵtemplateRefExtractor),d.ɵɵtext(16,"\n"),d.ɵɵtemplate(17,M,0,0,"ng-template",null,4,d.ɵɵtemplateRefExtractor),d.ɵɵtext(19,"\n")),2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(4,3,"vault")),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.ciphers.length),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.loaded))},directives:[f.NgIf,f.NgForOf,g.IconComponent,y.StopClickDirective,x.StopPropDirective,S.A11yTitleDirective],pipes:[b.I18nPipe],encapsulation:2})},38740:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessComponent=void 0;const r=n(32621),o=(n(91092),n(82058),n(40349),n(70143),n(36424),n(94308),n(99954),n(77243),n(93581)),a=n(21531),s=n(26515),l=n(50692),c=n(70829),d=(n(68625),n(56301)),p=n(76797),u=n(55418),m=(n(29546),n(32621)),h=n(91092),v=n(40349),f=n(29546),g=n(99954),y=n(82058),x=n(36424),S=n(68625),b=n(70143),w=n(77243),I=n(94308),C=n(57490),E=n(80507),P=n(69242),k=n(50553),A=n(68012),O=n(72596),T=["addEdit"],M=["takeoverTemplate"],D=["confirmTemplate"];function B(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"b"),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5),m.ɵɵpipe(6,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("",m.ɵɵpipeBind1(4,2,"warning"),":"),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(6,4,"emergencyAccessOwnerWarning"),"\n"))}function R(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",13),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);return m.ɵɵnextContext().premiumRequired()})),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(2,1,"premium"),"\n "))}function U(e,t){1&e&&(m.ɵɵelementStart(0,"span",34),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"invited")))}function V(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"accepted")))}function F(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function N(e,t){1&e&&(m.ɵɵelementStart(0,"span",36),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function _(e,t){1&e&&(m.ɵɵelementStart(0,"span",37),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"view")))}function j(e,t){1&e&&(m.ɵɵelementStart(0,"span",37),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"takeover")))}function z(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",38),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.name)}}function L(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",39),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).reinvite(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"resendInvitation"),"\n "))}function K(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",41),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).confirm(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",42),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"confirm"),"\n "))}function q(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",41),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).approve(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",42),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"approve"),"\n "))}function G(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",43),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).reject(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",44),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"reject"),"\n "))}function W(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"tr"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"td",16),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"app-avatar",17),m.ɵɵpipe(5,"userName"),m.ɵɵtext(6,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(7,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"td"),m.ɵɵtext(10,"\n "),m.ɵɵelementStart(11,"a",18),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).edit(t)})),m.ɵɵtext(12),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵtemplate(14,U,3,3,"span",19),m.ɵɵtext(15,"\n "),m.ɵɵtemplate(16,V,3,3,"span",20),m.ɵɵtext(17,"\n "),m.ɵɵtemplate(18,F,3,3,"span",20),m.ɵɵtext(19,"\n "),m.ɵɵtemplate(20,N,3,3,"span",21),m.ɵɵtext(21,"\n\n "),m.ɵɵtemplate(22,_,3,3,"span",22),m.ɵɵtext(23,"\n "),m.ɵɵtemplate(24,j,3,3,"span",22),m.ɵɵtext(25,"\n\n "),m.ɵɵtemplate(26,z,2,1,"small",23),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵelementStart(29,"td",24),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",25),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"button",26),m.ɵɵpipe(34,"i18n"),m.ɵɵtext(35,"\n "),m.ɵɵelement(36,"i",27),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementStart(39,"div",28),m.ɵɵtext(40,"\n "),m.ɵɵtemplate(41,L,5,3,"a",29),m.ɵɵtext(42,"\n "),m.ɵɵtemplate(43,K,5,3,"a",30),m.ɵɵtext(44,"\n "),m.ɵɵtemplate(45,q,5,3,"a",30),m.ɵɵtext(46,"\n "),m.ɵɵtemplate(47,G,5,3,"a",31),m.ɵɵtext(48,"\n "),m.ɵɵelementStart(49,"a",32),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).remove(t)})),m.ɵɵtext(50,"\n "),m.ɵɵelement(51,"i",33),m.ɵɵtext(52),m.ɵɵpipe(53,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(54,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(55,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(56,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(57,"\n "),m.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵproperty("data",m.ɵɵpipeBind1(5,18,e))("email",e.email)("circle",!0)("fontSize",14),m.ɵɵadvance(8),m.ɵɵtextInterpolate(e.email),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.View),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.name),m.ɵɵadvance(7),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(34,20,"options")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated||e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(53,22,"remove"),"\n ")}}function H(e,t){if(1&e&&(m.ɵɵelementStart(0,"table",14),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"tbody"),m.ɵɵtext(3,"\n "),m.ɵɵtemplate(4,W,58,24,"tr",15),m.ɵɵtext(5,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(4),m.ɵɵproperty("ngForOf",e.trustedContacts)}}function $(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"noTrustedContacts")))}function Q(e,t){1&e&&(m.ɵɵelementStart(0,"span",34),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"invited")))}function Y(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"accepted")))}function J(e,t){1&e&&(m.ɵɵelementStart(0,"span",35),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryInitiated")))}function X(e,t){1&e&&(m.ɵɵelementStart(0,"span",36),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"emergencyAccessRecoveryApproved")))}function Z(e,t){1&e&&(m.ɵɵelementStart(0,"span",37),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"view")))}function ee(e,t){1&e&&(m.ɵɵelementStart(0,"span",37),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"takeover")))}function te(e,t){if(1&e&&(m.ɵɵelementStart(0,"small",38),m.ɵɵtext(1),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵadvance(1),m.ɵɵtextInterpolate(e.name)}}function ne(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",39),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).requestAccess(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"requestAccess"),"\n "))}function ie(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"a",39),m.ɵɵlistener("click",(function(){m.ɵɵrestoreView(e);const t=m.ɵɵnextContext().$implicit;return m.ɵɵnextContext(2).takeover(t)})),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",46),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()}2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,1,"takeover"),"\n "))}function re(e,t){if(1&e&&(m.ɵɵelementStart(0,"a",47),m.ɵɵtext(1,"\n "),m.ɵɵelement(2,"i",48),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext().$implicit;m.ɵɵproperty("routerLink",e.id),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(4,2,"view"),"\n ")}}function oe(e,t){if(1&e){const e=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"tr"),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"td",16),m.ɵɵtext(3,"\n "),m.ɵɵelementStart(4,"app-avatar",17),m.ɵɵpipe(5,"userName"),m.ɵɵtext(6,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(7,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(8,"\n "),m.ɵɵelementStart(9,"td"),m.ɵɵtext(10,"\n "),m.ɵɵelementStart(11,"span"),m.ɵɵtext(12),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n "),m.ɵɵtemplate(14,Q,3,3,"span",19),m.ɵɵtext(15,"\n "),m.ɵɵtemplate(16,Y,3,3,"span",20),m.ɵɵtext(17,"\n "),m.ɵɵtemplate(18,J,3,3,"span",20),m.ɵɵtext(19,"\n "),m.ɵɵtemplate(20,X,3,3,"span",21),m.ɵɵtext(21,"\n\n "),m.ɵɵtemplate(22,Z,3,3,"span",22),m.ɵɵtext(23,"\n "),m.ɵɵtemplate(24,ee,3,3,"span",22),m.ɵɵtext(25,"\n\n "),m.ɵɵtemplate(26,te,2,1,"small",23),m.ɵɵtext(27,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(28,"\n "),m.ɵɵelementStart(29,"td",24),m.ɵɵtext(30,"\n "),m.ɵɵelementStart(31,"div",25),m.ɵɵtext(32,"\n "),m.ɵɵelementStart(33,"button",26),m.ɵɵpipe(34,"i18n"),m.ɵɵtext(35,"\n "),m.ɵɵelement(36,"i",27),m.ɵɵtext(37,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(38,"\n "),m.ɵɵelementStart(39,"div",28),m.ɵɵtext(40,"\n "),m.ɵɵtemplate(41,ne,5,3,"a",29),m.ɵɵtext(42,"\n "),m.ɵɵtemplate(43,ie,5,3,"a",29),m.ɵɵtext(44,"\n "),m.ɵɵtemplate(45,re,5,4,"a",45),m.ɵɵtext(46,"\n "),m.ɵɵelementStart(47,"a",32),m.ɵɵlistener("click",(function(){const t=m.ɵɵrestoreView(e).$implicit;return m.ɵɵnextContext(2).remove(t)})),m.ɵɵtext(48,"\n "),m.ɵɵelement(49,"i",44),m.ɵɵtext(50),m.ɵɵpipe(51,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(52,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(53,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(54,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(55,"\n "),m.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=m.ɵɵnextContext(2);m.ɵɵadvance(4),m.ɵɵproperty("data",m.ɵɵpipeBind1(5,17,e))("email",e.email)("circle",!0)("fontSize",14),m.ɵɵadvance(8),m.ɵɵtextInterpolate(e.email),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Invited),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Accepted),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryInitiated),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.View),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.name),m.ɵɵadvance(7),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(34,19,"options")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.Confirmed),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved&&e.type===n.emergencyAccessType.Takeover),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",e.status===n.emergencyAccessStatusType.RecoveryApproved&&e.type===n.emergencyAccessType.View),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(51,21,"remove"),"\n ")}}function ae(e,t){if(1&e&&(m.ɵɵelementStart(0,"table",14),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"tbody"),m.ɵɵtext(3,"\n "),m.ɵɵtemplate(4,oe,56,23,"tr",15),m.ɵɵtext(5,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementEnd()),2&e){const e=m.ɵɵnextContext();m.ɵɵadvance(4),m.ɵɵproperty("ngForOf",e.grantedContacts)}}function se(e,t){1&e&&(m.ɵɵelementStart(0,"p"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"noGrantedAccess")))}function le(e,t){}function ce(e,t){}function de(e,t){}class pe{constructor(e,t,n,i,r,o,a,c,d,p){this.apiService=e,this.i18nService=t,this.modalService=n,this.platformUtilsService=i,this.cryptoService=r,this.messagingService=o,this.userNamePipe=a,this.logService=c,this.stateService=d,this.organizationService=p,this.emergencyAccessType=l.EmergencyAccessType,this.emergencyAccessStatusType=s.EmergencyAccessStatusType}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();const e=yield this.organizationService.getAll();this.isOrganizationOwner=e.some((e=>e.isOwner)),this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.trustedContacts=(yield this.apiService.getEmergencyAccessTrusted()).data,this.grantedContacts=(yield this.apiService.getEmergencyAccessGranted()).data}))}premiumRequired(){return i(this,void 0,void 0,(function*(){this.canAccessPremium||this.messagingService.send("premiumRequired")}))}edit(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(d.EmergencyAccessAddEditComponent,this.addEditModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.emergencyAccessId=null==e?void 0:e.id,n.readOnly=!this.canAccessPremium,n.onSaved.subscribe((()=>{t.close(),this.load()})),n.onDeleted.subscribe((()=>{t.close(),this.remove(e)}))}))}))}invite(){this.edit(null)}reinvite(e){return i(this,void 0,void 0,(function*(){null==this.actionPromise&&(this.actionPromise=this.apiService.postEmergencyAccessReinvite(e.id),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenReinvited",e.email)),this.actionPromise=null)}))}confirm(e){return i(this,void 0,void 0,(function*(){function t(){e.status=s.EmergencyAccessStatusType.Confirmed}if(null!=this.actionPromise)return;const n=yield this.stateService.getAutoConfirmFingerPrints();if(null!=n&&n)this.actionPromise=this.doConfirmation(e),yield this.actionPromise,t(),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e))),this.actionPromise=null;else{const[n]=yield this.modalService.openViewRef(p.EmergencyAccessConfirmComponent,this.confirmModalRef,(r=>{r.name=this.userNamePipe.transform(e),r.emergencyAccessId=e.id,r.userId=null==e?void 0:e.granteeId,r.onConfirmed.subscribe((()=>i(this,void 0,void 0,(function*(){n.close(),r.formPromise=this.doConfirmation(e),yield r.formPromise,t(),this.platformUtilsService.showToast("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e)))}))))}))}}))}remove(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.userNamePipe.transform(e),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{yield this.apiService.deleteEmergencyAccess(e.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("removedUserId",this.userNamePipe.transform(e))),e instanceof a.EmergencyAccessGranteeDetailsResponse?this.removeGrantee(e):this.removeGrantor(e)}catch(t){this.logService.error(t)}}))}requestAccess(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("requestAccessConfirmation",e.waitTimeDays.toString()),this.userNamePipe.transform(e),this.i18nService.t("requestAccess"),this.i18nService.t("no"),"warning")))return!1;yield this.apiService.postEmergencyAccessInitiate(e.id),e.status=s.EmergencyAccessStatusType.RecoveryInitiated,this.platformUtilsService.showToast("success",null,this.i18nService.t("requestSent",this.userNamePipe.transform(e)))}))}approve(e){return i(this,void 0,void 0,(function*(){const t=this.i18nService.t(e.type===l.EmergencyAccessType.View?"view":"takeover");if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("approveAccessConfirmation",this.userNamePipe.transform(e),t),this.userNamePipe.transform(e),this.i18nService.t("approve"),this.i18nService.t("no"),"warning")))return!1;yield this.apiService.postEmergencyAccessApprove(e.id),e.status=s.EmergencyAccessStatusType.RecoveryApproved,this.platformUtilsService.showToast("success",null,this.i18nService.t("emergencyApproved",this.userNamePipe.transform(e)))}))}reject(e){return i(this,void 0,void 0,(function*(){yield this.apiService.postEmergencyAccessReject(e.id),e.status=s.EmergencyAccessStatusType.Confirmed,this.platformUtilsService.showToast("success",null,this.i18nService.t("emergencyRejected",this.userNamePipe.transform(e)))}))}takeover(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(u.EmergencyAccessTakeoverComponent,this.takeoverModalRef,(n=>{n.name=this.userNamePipe.transform(e),n.email=e.email,n.emergencyAccessId=null!=e?e.id:null,n.onDone.subscribe((()=>{t.close(),this.platformUtilsService.showToast("success",null,this.i18nService.t("passwordResetFor",this.userNamePipe.transform(e)))}))}))}))}removeGrantee(e){const t=this.trustedContacts.indexOf(e);t>-1&&this.trustedContacts.splice(t,1)}removeGrantor(e){const t=this.grantedContacts.indexOf(e);t>-1&&this.grantedContacts.splice(t,1)}doConfirmation(e){return i(this,void 0,void 0,(function*(){const t=yield this.cryptoService.getEncKey(),n=yield this.apiService.getUserPublicKey(e.granteeId),i=c.Utils.fromB64ToArray(n.publicKey);try{this.logService.debug("User's fingerprint: "+(yield this.cryptoService.getFingerprint(e.granteeId,i.buffer)).join("-"))}catch(s){}const r=yield this.cryptoService.rsaEncrypt(t.key,i.buffer),a=new o.EmergencyAccessConfirmRequest;a.key=r.encryptedString,yield this.apiService.postEmergencyAccessConfirm(e.id,a)}))}}t.EmergencyAccessComponent=pe,pe.ɵfac=function(e){return new(e||pe)(m.ɵɵdirectiveInject(h.ApiService),m.ɵɵdirectiveInject(v.I18nService),m.ɵɵdirectiveInject(f.ModalService),m.ɵɵdirectiveInject(g.PlatformUtilsService),m.ɵɵdirectiveInject(y.CryptoService),m.ɵɵdirectiveInject(x.MessagingService),m.ɵɵdirectiveInject(S.UserNamePipe),m.ɵɵdirectiveInject(b.LogService),m.ɵɵdirectiveInject(w.StateService),m.ɵɵdirectiveInject(I.OrganizationService))},pe.ɵcmp=m.ɵɵdefineComponent({type:pe,selectors:[["emergency-access"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(T,7,r.ViewContainerRef),m.ɵɵviewQuery(M,7,r.ViewContainerRef),m.ɵɵviewQuery(D,7,r.ViewContainerRef)),2&e){let e;m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.addEditModalRef=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.takeoverModalRef=e.first),m.ɵɵqueryRefresh(e=m.ɵɵloadQuery())&&(t.confirmModalRef=e.first)}},decls:59,vars:25,consts:[[1,"page-header"],["href","https://bitwarden.com/help/emergency-access/","target","_blank","rel","noopener"],[4,"ngIf"],[1,"page-header","d-flex"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"page-header","spaced-header"],["addEdit",""],["takeoverTemplate",""],["confirmTemplate",""],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"],[1,"table","table-hover","table-list","mb-0"],[4,"ngFor","ngForOf"],["width","30"],["size","25",3,"data","email","circle","fontSize"],["href","#","appStopClick","",3,"click"],["class","badge badge-secondary",4,"ngIf"],["class","badge badge-warning",4,"ngIf"],["class","badge badge-success",4,"ngIf"],["class","badge badge-primary",4,"ngIf"],["class","text-muted d-block",4,"ngIf"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-success","href","#","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item text-warning","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-remove"],[1,"badge","badge-secondary"],[1,"badge","badge-warning"],[1,"badge","badge-success"],[1,"badge","badge-primary"],[1,"text-muted","d-block"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-envelope"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check"],["href","#","appStopClick","",1,"dropdown-item","text-warning",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-close"],["class","dropdown-item",3,"routerLink",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"],[1,"dropdown-item",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-eye"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1,"\n "),m.ɵɵelementStart(2,"h1"),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(5,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(6,"\n"),m.ɵɵelementStart(7,"p"),m.ɵɵtext(8),m.ɵɵpipe(9,"i18n"),m.ɵɵelementStart(10,"a",1),m.ɵɵtext(11),m.ɵɵpipe(12,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(13,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(14,"\n\n"),m.ɵɵtemplate(15,B,7,6,"p",2),m.ɵɵtext(16,"\n\n"),m.ɵɵelementStart(17,"div",3),m.ɵɵtext(18,"\n "),m.ɵɵelementStart(19,"h2"),m.ɵɵtext(20),m.ɵɵpipe(21,"i18n"),m.ɵɵtemplate(22,R,3,3,"a",4),m.ɵɵtext(23,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(24,"\n "),m.ɵɵelementStart(25,"div",5),m.ɵɵtext(26,"\n "),m.ɵɵelementStart(27,"button",6),m.ɵɵlistener("click",(function(){return t.invite()})),m.ɵɵtext(28,"\n "),m.ɵɵelement(29,"i",7),m.ɵɵtext(30),m.ɵɵpipe(31,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(32,"\n "),m.ɵɵelementEnd(),m.ɵɵtext(33,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(34,"\n\n"),m.ɵɵtemplate(35,H,7,1,"table",8),m.ɵɵtext(36,"\n\n"),m.ɵɵtemplate(37,$,3,3,"p",2),m.ɵɵtext(38,"\n\n"),m.ɵɵelementStart(39,"div",9),m.ɵɵtext(40,"\n "),m.ɵɵelementStart(41,"h2"),m.ɵɵtext(42),m.ɵɵpipe(43,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(44,"\n"),m.ɵɵelementEnd(),m.ɵɵtext(45,"\n\n"),m.ɵɵtemplate(46,ae,7,1,"table",8),m.ɵɵtext(47,"\n\n"),m.ɵɵtemplate(48,se,3,3,"p",2),m.ɵɵtext(49,"\n\n"),m.ɵɵtemplate(50,le,0,0,"ng-template",null,10,m.ɵɵtemplateRefExtractor),m.ɵɵtext(52,"\n"),m.ɵɵtemplate(53,ce,0,0,"ng-template",null,11,m.ɵɵtemplateRefExtractor),m.ɵɵtext(55,"\n"),m.ɵɵtemplate(56,de,0,0,"ng-template",null,12,m.ɵɵtemplateRefExtractor),m.ɵɵtext(58,"\n")),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(4,13,"emergencyAccess")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(9,15,"emergencyAccessDesc"),"\n "),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(12,17,"learnMore"),".\n "),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.isOrganizationOwner),m.ɵɵadvance(5),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(21,19,"trustedEmergencyContacts"),"\n "),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.canAccessPremium),m.ɵɵadvance(5),m.ɵɵproperty("disabled",!t.canAccessPremium),m.ɵɵadvance(3),m.ɵɵtextInterpolate1("\n ",m.ɵɵpipeBind1(31,21,"addEmergencyContact"),"\n "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",t.trustedContacts&&t.trustedContacts.length),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.trustedContacts||!t.trustedContacts.length),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(43,23,"designatedEmergencyContacts")),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.grantedContacts&&t.grantedContacts.length),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.grantedContacts||!t.grantedContacts.length))},directives:[C.NgIf,E.StopClickDirective,C.NgForOf,P.AvatarComponent,k.A11yTitleDirective,A.RouterLinkWithHref],pipes:[O.I18nPipe,S.UserNamePipe],encapsulation:2})},43718:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAddEditComponent=void 0;n(22501),n(68062),n(69050),n(98573),n(4349),n(40349),n(70143),n(36424),n(94308),n(86193),n(14293),n(99954),n(10685),n(77243),n(63529);const r=n(58746),o=n(32621),a=n(68062),s=n(4349),l=n(40349),c=n(99954),d=n(22501),p=n(77243),u=n(69050),m=n(63529),h=n(86193),v=n(36424),f=n(98573),g=n(10685),y=n(14293),x=n(94308),S=n(70143),b=n(96832),w=n(637),I=n(50553),C=n(57490),E=n(90958),P=n(52900),k=n(17302),A=n(966),O=n(80507),T=n(72596);function M(e,t){1&e&&(o.ɵɵelementStart(0,"app-callout",26),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function D(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function B(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",17),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",27),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"select",28),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.type=t})),o.ɵɵtext(9,"\n "),o.ɵɵtemplate(10,D,2,2,"option",29),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(6,4,"whatTypeOfItem")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.typeOptions)}}function R(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function U(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",17),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",31),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"select",32),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.folderId=t})),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,R,2,2,"option",29),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,4,"folder")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.folders)}}function V(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",41),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelement(5,"i",44),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(3,1,"copyUsername")))}function F(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",57),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).generatePassword()})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",58),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}2&e&&o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,1,"generatePassword"))}function N(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",51),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,F,5,3,"a",52),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"a",53,54),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).checkPassword()})),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",55),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"i",56),o.ɵɵpipe(11,"i18n"),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(5),t=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher.viewPassword),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,6,"checkPassword")),o.ɵɵproperty("appApiAction",t.checkPasswordPromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(11,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function _(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",61),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).premiumRequired()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"premium"),"\n "))}function j(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",61),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(4).upgradeOrganization()})),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function z(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"img",59),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵtemplate(5,_,3,3,"a",60),o.ɵɵtext(6,"\n "),o.ɵɵtemplate(7,j,3,3,"a",60),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"verificationCodeTotp")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId&&!e.canAccessPremium),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const L=function(e){return{"stroke-dashoffset.px":e}};function K(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",62),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"span",63),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"span",64),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵnamespaceSVG(),o.ɵɵelementStart(7,"svg"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"g"),o.ɵɵtext(10,"\n "),o.ɵɵelement(11,"circle",65),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"circle",66),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵnamespaceHTML(),o.ɵɵelementStart(18,"span",67),o.ɵɵpipe(19,"i18n"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"button",68),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),o.ɵɵpipe(23,"i18n"),o.ɵɵtext(24,"\n "),o.ɵɵelement(25,"i",69),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(5),o.ɵɵtextInterpolate(e.totpSec),o.ɵɵadvance(6),o.ɵɵproperty("ngStyle",o.ɵɵpureFunction1(9,L,e.totpDash)),o.ɵɵadvance(7),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(19,5,"verificationCodeTotp")),o.ɵɵadvance(2),o.ɵɵtextInterpolate(e.totpCodeFormatted),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function q(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function G(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",80),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(4).removeUri(t)})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",81),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}2&e&&o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,1,"remove"))}function W(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",16),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",71),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",72),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",34),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"input",73),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.uri=t})),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",41),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",42),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).launch(t)})),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"i",74),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"button",50),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),o.ɵɵpipe(22,"i18n"),o.ɵɵtext(23,"\n "),o.ɵɵelement(24,"i",44),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",75),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"div",37),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"label",72),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"a",76),o.ɵɵpipe(39,"i18n"),o.ɵɵtext(40,"\n "),o.ɵɵelement(41,"i",77),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"div",37),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"select",78),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).loginUriMatchChanged(t)})),o.ɵɵtext(48,"\n "),o.ɵɵtemplate(49,q,2,2,"option",29),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵtemplate(52,G,5,3,"button",79),o.ɵɵtext(53,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=o.ɵɵnextContext(4);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("for","loginUri",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(6,19,"uriPosition",n+1)),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate1("id","loginUri",n,""),o.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(11,22,"ex")," https://google.com"),o.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,24,"launch")),o.ɵɵproperty("disabled",!e.canLaunch),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(22,26,"copyUri")),o.ɵɵadvance(13),o.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(39,30,"learnMore")),o.ɵɵadvance(9),o.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),o.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),o.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",i.uriMatchOptions),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function H(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,W,56,32,"div",70),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function $(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",82),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).addUri()})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",83),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const Q=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},Y=function(e){return{low:e}};function J(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",33),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"div",34),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"input",35),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.username=t})),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,V,8,3,"div",36),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"div",17),o.ɵɵtext(19,"\n "),o.ɵɵelementStart(20,"div",37),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"label",38),o.ɵɵtext(23),o.ɵɵpipe(24,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵtemplate(26,N,14,10,"div",39),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",34),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"input",40),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.password=t})),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"div",41),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).togglePassword()})),o.ɵɵpipe(36,"i18n"),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"i",43),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"button",42),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),o.ɵɵpipe(42,"i18n"),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"i",44),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(49,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"div",16),o.ɵɵtext(52,"\n "),o.ɵɵelementStart(53,"div",17),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"label",45),o.ɵɵtext(56),o.ɵɵpipe(57,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"input",46),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.login.totp=t})),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(61,"\n "),o.ɵɵelementStart(62,"div",47),o.ɵɵtext(63,"\n "),o.ɵɵtemplate(64,z,9,5,"div",21),o.ɵɵtext(65,"\n "),o.ɵɵtemplate(66,K,28,11,"div",48),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(69,"\n "),o.ɵɵtemplate(70,H,4,2,"ng-container",21),o.ɵɵtext(71,"\n "),o.ɵɵtemplate(72,$,5,3,"a",49),o.ɵɵtext(73,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,23,"username")),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.isDeleted),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(24,25,"password")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(36,27,"toggleVisibility")),o.ɵɵproperty("disabled",!e.cipher.viewPassword),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(33,Q,!e.showPassword,e.showPassword)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(42,29,"copyPassword")),o.ɵɵproperty("disabled",!e.cipher.viewPassword),o.ɵɵadvance(15),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(36,Y,e.totpLow)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.cipher.login.hasUris),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function X(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function Z(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ee(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",17),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",84),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"input",85),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.cardholderName=t})),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"div",17),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"label",86),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"select",87),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.brand=t})),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,X,2,2,"option",29),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"div",16),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",17),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"label",88),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"div",34),o.ɵɵtext(35,"\n "),o.ɵɵelementStart(36,"input",89),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.number=t})),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementStart(38,"div",41),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleCardNumber()})),o.ɵɵpipe(41,"i18n"),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",43),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementStart(46,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),o.ɵɵpipe(47,"i18n"),o.ɵɵtext(48,"\n "),o.ɵɵelement(49,"i",44),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(53,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"div",90),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"label",91),o.ɵɵtext(58),o.ɵɵpipe(59,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(60,"\n "),o.ɵɵelementStart(61,"select",92),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.expMonth=t})),o.ɵɵtext(62,"\n "),o.ɵɵtemplate(63,Z,2,2,"option",29),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementStart(67,"div",90),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"label",93),o.ɵɵtext(70),o.ɵɵpipe(71,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementStart(73,"input",94),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.expYear=t})),o.ɵɵpipe(74,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementStart(78,"div",16),o.ɵɵtext(79,"\n "),o.ɵɵelementStart(80,"div",17),o.ɵɵtext(81,"\n "),o.ɵɵelementStart(82,"label",95),o.ɵɵtext(83),o.ɵɵpipe(84,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(85,"\n "),o.ɵɵelementStart(86,"div",34),o.ɵɵtext(87,"\n "),o.ɵɵelementStart(88,"input",96),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.card.code=t})),o.ɵɵelementEnd(),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"div",41),o.ɵɵtext(91,"\n "),o.ɵɵelementStart(92,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleCardCode()})),o.ɵɵpipe(93,"i18n"),o.ɵɵtext(94,"\n "),o.ɵɵelement(95,"i",43),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"button",50),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),o.ɵɵpipe(99,"i18n"),o.ɵɵtext(100,"\n "),o.ɵɵelement(101,"i",44),o.ɵɵtext(102,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(103,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(104,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(105,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(106,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(107,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,29,"cardholderName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,31,"brand")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cardBrandOptions),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,33,"number")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(41,35,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(51,Q,!e.showCardNumber,e.showCardNumber)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(47,37,"copyNumber")),o.ɵɵadvance(12),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(59,39,"expirationMonth")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cardExpMonthOptions),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(71,41,"expirationYear")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate1("placeholder","",o.ɵɵpipeBind1(74,43,"ex")," 2019"),o.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(84,45,"securityCode")),o.ɵɵadvance(5),o.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),o.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(93,47,"toggleVisibility")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(54,Q,!e.showCardCode,e.showCardCode)),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(99,49,"securityCode"))}}function te(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ne(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",16),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",97),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",98),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"select",99),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.title=t})),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,te,2,2,"option",29),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",16),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"div",97),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"label",100),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"input",101),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.firstName=t})),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",97),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"label",102),o.ɵɵtext(31),o.ɵɵpipe(32,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"input",103),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.middleName=t})),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"div",97),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"label",104),o.ɵɵtext(40),o.ɵɵpipe(41,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"input",105),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.lastName=t})),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(45,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"div",16),o.ɵɵtext(48,"\n "),o.ɵɵelementStart(49,"div",97),o.ɵɵtext(50,"\n "),o.ɵɵelementStart(51,"label",106),o.ɵɵtext(52),o.ɵɵpipe(53,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(54,"\n "),o.ɵɵelementStart(55,"input",107),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.username=t})),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementStart(58,"div",97),o.ɵɵtext(59,"\n "),o.ɵɵelementStart(60,"label",108),o.ɵɵtext(61),o.ɵɵpipe(62,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(63,"\n "),o.ɵɵelementStart(64,"input",109),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.company=t})),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(66,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementStart(68,"div",16),o.ɵɵtext(69,"\n "),o.ɵɵelementStart(70,"div",97),o.ɵɵtext(71,"\n "),o.ɵɵelementStart(72,"label",110),o.ɵɵtext(73),o.ɵɵpipe(74,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵelementStart(76,"input",111),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.ssn=t})),o.ɵɵelementEnd(),o.ɵɵtext(77,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(78,"\n "),o.ɵɵelementStart(79,"div",97),o.ɵɵtext(80,"\n "),o.ɵɵelementStart(81,"label",112),o.ɵɵtext(82),o.ɵɵpipe(83,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(84,"\n "),o.ɵɵelementStart(85,"input",113),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.passportNumber=t})),o.ɵɵelementEnd(),o.ɵɵtext(86,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(87,"\n "),o.ɵɵelementStart(88,"div",97),o.ɵɵtext(89,"\n "),o.ɵɵelementStart(90,"label",114),o.ɵɵtext(91),o.ɵɵpipe(92,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(93,"\n "),o.ɵɵelementStart(94,"input",115),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),o.ɵɵelementEnd(),o.ɵɵtext(95,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(96,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(97,"\n "),o.ɵɵelementStart(98,"div",16),o.ɵɵtext(99,"\n "),o.ɵɵelementStart(100,"div",17),o.ɵɵtext(101,"\n "),o.ɵɵelementStart(102,"label",116),o.ɵɵtext(103),o.ɵɵpipe(104,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(105,"\n "),o.ɵɵelementStart(106,"input",117),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.email=t})),o.ɵɵelementEnd(),o.ɵɵtext(107,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(108,"\n "),o.ɵɵelementStart(109,"div",17),o.ɵɵtext(110,"\n "),o.ɵɵelementStart(111,"label",118),o.ɵɵtext(112),o.ɵɵpipe(113,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(114,"\n "),o.ɵɵelementStart(115,"input",119),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.phone=t})),o.ɵɵelementEnd(),o.ɵɵtext(116,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(117,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(118,"\n "),o.ɵɵelementStart(119,"div",16),o.ɵɵtext(120,"\n "),o.ɵɵelementStart(121,"div",17),o.ɵɵtext(122,"\n "),o.ɵɵelementStart(123,"label",120),o.ɵɵtext(124),o.ɵɵpipe(125,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(126,"\n "),o.ɵɵelementStart(127,"input",121),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address1=t})),o.ɵɵelementEnd(),o.ɵɵtext(128,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(129,"\n "),o.ɵɵelementStart(130,"div",17),o.ɵɵtext(131,"\n "),o.ɵɵelementStart(132,"label",122),o.ɵɵtext(133),o.ɵɵpipe(134,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(135,"\n "),o.ɵɵelementStart(136,"input",123),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address2=t})),o.ɵɵelementEnd(),o.ɵɵtext(137,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(138,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(139,"\n "),o.ɵɵelementStart(140,"div",16),o.ɵɵtext(141,"\n "),o.ɵɵelementStart(142,"div",17),o.ɵɵtext(143,"\n "),o.ɵɵelementStart(144,"label",124),o.ɵɵtext(145),o.ɵɵpipe(146,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(147,"\n "),o.ɵɵelementStart(148,"input",125),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.address3=t})),o.ɵɵelementEnd(),o.ɵɵtext(149,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(150,"\n "),o.ɵɵelementStart(151,"div",17),o.ɵɵtext(152,"\n "),o.ɵɵelementStart(153,"label",126),o.ɵɵtext(154),o.ɵɵpipe(155,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(156,"\n "),o.ɵɵelementStart(157,"input",127),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.city=t})),o.ɵɵelementEnd(),o.ɵɵtext(158,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(159,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(160,"\n "),o.ɵɵelementStart(161,"div",16),o.ɵɵtext(162,"\n "),o.ɵɵelementStart(163,"div",17),o.ɵɵtext(164,"\n "),o.ɵɵelementStart(165,"label",128),o.ɵɵtext(166),o.ɵɵpipe(167,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(168,"\n "),o.ɵɵelementStart(169,"input",129),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.state=t})),o.ɵɵelementEnd(),o.ɵɵtext(170,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(171,"\n "),o.ɵɵelementStart(172,"div",17),o.ɵɵtext(173,"\n "),o.ɵɵelementStart(174,"label",130),o.ɵɵtext(175),o.ɵɵpipe(176,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(177,"\n "),o.ɵɵelementStart(178,"input",131),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.postalCode=t})),o.ɵɵelementEnd(),o.ɵɵtext(179,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(180,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(181,"\n "),o.ɵɵelementStart(182,"div",16),o.ɵɵtext(183,"\n "),o.ɵɵelementStart(184,"div",17),o.ɵɵtext(185,"\n "),o.ɵɵelementStart(186,"label",132),o.ɵɵtext(187),o.ɵɵpipe(188,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(189,"\n "),o.ɵɵelementStart(190,"input",133),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.identity.country=t})),o.ɵɵelementEnd(),o.ɵɵtext(191,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(192,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(193,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,55,"title")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.identityTitleOptions),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,57,"firstName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(32,59,"middleName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(41,61,"lastName")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(53,63,"username")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(62,65,"company")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(74,67,"ssn")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(83,69,"passportNumber")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(92,71,"licenseNumber")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(104,73,"email")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(113,75,"phone")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(125,77,"address1")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(134,79,"address2")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(146,81,"address3")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(155,83,"cityTown")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(167,85,"stateProvince")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(176,87,"zipPostalCode")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(188,89,"country")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function ie(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",30),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function re(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",134),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",135),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",136),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"select",137),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).organizationChanged()})),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,ie,2,2,"option",29),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,5,"ownership")),o.ɵɵadvance(8),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.ownershipOptions)}}function oe(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function ae(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",139),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"input",140),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.checked=t})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"label",141),o.ɵɵtext(5),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=o.ɵɵnextContext(4);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("id","collection-",n,""),o.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),o.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate1("for","collection-",n,""),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function se(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,ae,7,6,"div",138),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.collections)}}function le(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",134),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,oe,3,3,"div",21),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,se,4,1,"ng-container",21),o.ɵɵtext(9,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"collections")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.collections||!e.collections.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function ce(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"b",143),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5),o.ɵɵpipe(6,"date"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function de(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"b",143),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"a",145),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).viewHistory()})),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(4,3,"passwordHistory"),":"),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,5,"view")),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function pe(e,t){if(1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"date"),o.ɵɵelementStart(3,"span",148),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(e.password)}}function ue(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",146),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,pe,6,5,"div",147),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function me(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",142),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div"),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"b",143),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9),o.ɵɵpipe(10,"date"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,ce,7,7,"div",21),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,de,10,7,"div",21),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,ue,4,1,"div",144),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(7),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(8,5,"dateUpdated"),":"),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.showRevisionDate),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.hasPasswordHistory),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function he(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",134),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",139),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"input",149),o.ɵɵlistener("change",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).repromptChanged()})),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",150),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"a",151),o.ɵɵpipe(15,"i18n"),o.ɵɵtext(16,"\n "),o.ɵɵelement(17,"i",77),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,5,"options")),o.ɵɵadvance(5),o.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,7,"passwordPrompt")),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(15,9,"learnMore"))}}function ve(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",13),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,M,3,3,"app-callout",14),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,B,14,6,"div",15),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",16),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",17),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"label",18),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().cipher.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,U,11,6,"div",20),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,J,74,38,"ng-container",21),o.ɵɵtext(22,"\n "),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,ee,108,57,"ng-container",21),o.ɵɵtext(25,"\n "),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,ne,194,91,"ng-container",21),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"div",22),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"label",23),o.ɵɵtext(32),o.ɵɵpipe(33,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n "),o.ɵɵelementStart(35,"textarea",24),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().cipher.notes=t})),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),o.ɵɵtext(39,"\n "),o.ɵɵtemplate(40,re,21,9,"ng-container",21),o.ɵɵtext(41,"\n "),o.ɵɵtemplate(42,le,10,5,"ng-container",21),o.ɵɵtext(43,"\n "),o.ɵɵtemplate(44,me,19,10,"ng-container",21),o.ɵɵtext(45,"\n "),o.ɵɵtemplate(46,he,21,11,"ng-container",21),o.ɵɵtext(47,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,20,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!e.organization),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(33,22,"notes")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),o.ɵɵadvance(3),o.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.canUseReprompt)}}function fe(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",152),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",153),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(),t=o.ɵɵreference(5);o.ɵɵproperty("disabled",t.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const ge=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function ye(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",68),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).toggleFavorite()})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",43),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),o.ɵɵadvance(3),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(4,ge,e.cipher.favorite,!e.cipher.favorite))}}function xe(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"button",157,158),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).delete()})),o.ɵɵpipe(2,"i18n"),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",159),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",160),o.ɵɵpipe(7,"i18n"),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),o.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(7,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function Se(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",154),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,ye,5,7,"button",155),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,xe,9,10,"button",156),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class be extends r.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){super(e,t,n,i,r,o,a,s,l,c,d,p,m,h,u),this.originalCipher=null,this.viewOnly=!0}load(){return i(this,void 0,void 0,(function*(){this.title=this.i18nService.t("viewItem")}))}loadCipher(){return i(this,void 0,void 0,(function*(){return Promise.resolve(this.originalCipher)}))}}t.EmergencyAddEditComponent=be,be.ɵfac=function(e){return new(e||be)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.FolderService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.PlatformUtilsService),o.ɵɵdirectiveInject(d.AuditService),o.ɵɵdirectiveInject(p.StateService),o.ɵɵdirectiveInject(u.CollectionService),o.ɵɵdirectiveInject(m.TotpService),o.ɵɵdirectiveInject(h.PasswordGenerationService),o.ɵɵdirectiveInject(v.MessagingService),o.ɵɵdirectiveInject(f.EventService),o.ɵɵdirectiveInject(g.PolicyService),o.ɵɵdirectiveInject(y.PasswordRepromptService),o.ɵɵdirectiveInject(x.OrganizationService),o.ɵɵdirectiveInject(S.LogService))},be.ɵcmp=o.ɵɵdefineComponent({type:be,selectors:[["app-org-vault-add-edit"]],features:[o.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"button",6),o.ɵɵpipe(13,"i18n"),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"span",7),o.ɵɵtext(16,"×"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,ve,48,24,"div",8),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"div",9),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,fe,9,7,"button",10),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"button",11),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,Se,6,2,"div",12),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(33,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(34,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(t.title),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(13,7,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[b.NgControlStatusGroup,b.NgForm,w.ApiActionDirective,I.A11yTitleDirective,C.NgIf,b.DefaultValueAccessor,b.RequiredValidator,b.NgControlStatus,b.NgModel,E.AddEditCustomFieldsComponent,P.CalloutComponent,b.SelectControlValueAccessor,k.AutofocusDirective,C.NgForOf,b.NgSelectOption,b.ɵNgSelectMultipleOption,A.InputVerbatimDirective,C.NgClass,O.StopClickDirective,C.NgStyle,b.CheckboxControlValueAccessor],pipes:[T.I18nPipe,C.DatePipe],encapsulation:2})},57811:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.LinkSsoComponent=void 0;n(68012),n(91092),n(26451),n(39229),n(57997),n(40349),n(70143),n(86193),n(99954),n(77243);const r=n(11882),o=(n(30608),n(32621)),a=n(99954),s=n(40349),l=n(91092),c=n(26451),d=n(68012),p=n(39229),u=n(86193),m=n(77243),h=n(57997),v=n(70143),f=n(80507),g=n(72596);class y extends r.SsoComponent{constructor(e,t,n,i,r,o,a,s,l,c,d){super(i,r,t,o,l,e,n,a,c,s,d),this.returnUri="/settings/organizations",this.returnUri="/settings/organizations",this.redirectUri=window.location.origin+"/sso-connector.html",this.clientId="web"}ngAfterContentInit(){return i(this,void 0,void 0,(function*(){this.identifier=this.organization.identifier}))}}t.LinkSsoComponent=y,y.ɵfac=function(e){return new(e||y)(o.ɵɵdirectiveInject(a.PlatformUtilsService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.ApiService),o.ɵɵdirectiveInject(c.AuthService),o.ɵɵdirectiveInject(d.Router),o.ɵɵdirectiveInject(d.ActivatedRoute),o.ɵɵdirectiveInject(p.CryptoFunctionService),o.ɵɵdirectiveInject(u.PasswordGenerationService),o.ɵɵdirectiveInject(m.StateService),o.ɵɵdirectiveInject(h.EnvironmentService),o.ɵɵdirectiveInject(v.LogService))},y.ɵcmp=o.ɵɵdefineComponent({type:y,selectors:[["app-link-sso"]],inputs:{organization:"organization"},features:[o.ɵɵInheritDefinitionFeature],decls:6,vars:3,consts:[["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-link"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"a",0),o.ɵɵlistener("click",(function(){return t.submit(t.returnUri,!0)})),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",1),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,1,"linkSso"),"\n"))},directives:[f.StopClickDirective],pipes:[g.I18nPipe],encapsulation:2})},83034:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OptionsComponent=void 0;const r=n(96832),o=(n(40349),n(36424),n(99954),n(77243),n(88332),n(53387)),a=n(70829),s=n(32621),l=n(77243),c=n(40349),d=n(88332),p=n(99954),u=n(36424),m=n(96832),h=n(98781),v=n(50553),f=n(57490),g=n(72596);function y(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",31),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",31),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}class S{constructor(e,t,n,i,s){this.stateService=e,this.i18nService=t,this.vaultTimeoutService=n,this.platformUtilsService=i,this.messagingService=s,this.vaultTimeoutAction="lock",this.vaultTimeout=new r.FormControl(null),this.vaultTimeouts=[{name:t.t("oneMinute"),value:1},{name:t.t("fiveMinutes"),value:5},{name:t.t("fifteenMinutes"),value:15},{name:t.t("thirtyMinutes"),value:30},{name:t.t("oneHour"),value:60},{name:t.t("fourHours"),value:240},{name:t.t("onRefresh"),value:-1}],this.platformUtilsService.isDev()&&this.vaultTimeouts.push({name:t.t("never"),value:null});const l=[];t.supportedTranslationLocales.forEach((e=>{let n=e;t.localeNames.has(e)&&(n+=" - "+t.localeNames.get(e)),l.push({name:n,value:e})})),l.sort(a.Utils.getSortFunction(t,"name")),l.splice(0,0,{name:t.t("default"),value:null}),this.localeOptions=l,this.themeOptions=[{name:t.t("themeLight"),value:o.ThemeType.Light},{name:t.t("themeDark"),value:o.ThemeType.Dark},{name:t.t("themeSystem"),value:o.ThemeType.System}]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.vaultTimeout.setValue(yield this.vaultTimeoutService.getVaultTimeout()),this.vaultTimeoutAction=yield this.stateService.getVaultTimeoutAction(),this.disableIcons=yield this.stateService.getDisableFavicon(),this.enableGravatars=yield this.stateService.getEnableGravitars(),this.enableFullWidth=yield this.stateService.getEnableFullWidth(),this.locale=yield this.stateService.getLocale(),this.startingLocale=this.locale,this.theme=yield this.stateService.getTheme(),this.startingTheme=this.theme}))}submit(){return i(this,void 0,void 0,(function*(){if(this.vaultTimeout.valid){if(yield this.vaultTimeoutService.setVaultTimeoutOptions(this.vaultTimeout.value,this.vaultTimeoutAction),yield this.stateService.setDisableFavicon(this.disableIcons),yield this.stateService.setEnableGravitars(this.enableGravatars),yield this.stateService.setEnableFullWidth(this.enableFullWidth),this.messagingService.send("setFullWidth"),this.theme!==this.startingTheme){yield this.stateService.setTheme(this.theme),this.startingTheme=this.theme;const e=yield this.platformUtilsService.getEffectiveTheme(),t=window.document.documentElement;t.classList.remove("theme_"+o.ThemeType.Light,"theme_"+o.ThemeType.Dark),t.classList.add("theme_"+e)}yield this.stateService.setLocale(this.locale),this.locale!==this.startingLocale?window.location.reload():this.platformUtilsService.showToast("success",null,this.i18nService.t("optionsUpdated"))}else this.platformUtilsService.showToast("error",null,this.i18nService.t("vaultTimeoutToLarge"))}))}vaultTimeoutActionChanged(e){return i(this,void 0,void 0,(function*(){if("logOut"===e){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("vaultTimeoutLogOutConfirmation"),this.i18nService.t("vaultTimeoutLogOutConfirmationTitle"),this.i18nService.t("yes"),this.i18nService.t("cancel"),"warning")))return void(this.vaultTimeoutAction="lock")}this.vaultTimeoutAction=e}))}}t.OptionsComponent=S,S.ɵfac=function(e){return new(e||S)(s.ɵɵdirectiveInject(l.StateService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.VaultTimeoutService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.MessagingService))},S.ɵcmp=s.ɵɵdefineComponent({type:S,selectors:[["app-options"]],decls:173,vars:74,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],[1,"row"],[1,"col-6"],["ngDefaultControl","",3,"vaultTimeouts","formControl"],[1,"form-group"],[1,"form-check","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLock","value","lock",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLock",1,"form-check-label"],[1,"form-check","mt-2","form-check-block"],["type","radio","name","vaultTimeoutAction","id","vaultTimeoutActionLogOut","value","logOut",1,"form-check-input",3,"ngModel","ngModelChange"],["for","vaultTimeoutActionLogOut",1,"form-check-label"],[1,"d-flex"],["for","locale"],["href","https://bitwarden.com/help/localization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","locale","name","Locale",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-text","text-muted"],[1,"form-check"],["type","checkbox","id","disableIcons","name","DisableIcons",1,"form-check-input",3,"ngModel","ngModelChange"],["for","disableIcons",1,"form-check-label"],["href","https://bitwarden.com/help/website-icons/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableGravatars","name","enableGravatars",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableGravatars",1,"form-check-label"],["href","https://gravatar.com/","target","_blank","rel","noopener",3,"appA11yTitle"],["type","checkbox","id","enableFullWidth","name","enableFullWidth",1,"form-check-input",3,"ngModel","ngModelChange"],["for","enableFullWidth",1,"form-check-label"],["for","theme"],["id","theme","name","theme",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary"],[3,"ngValue"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵelementStart(7,"p"),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementStart(11,"form",1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",2),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",3),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"app-vault-timeout-input",4),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",5),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label"),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",6),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"input",7),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e})),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"label",8),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵelementStart(35,"small"),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"div",9),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"input",10),s.ɵɵlistener("ngModelChange",(function(e){return t.vaultTimeoutAction=e}))("ngModelChange",(function(e){return t.vaultTimeoutActionChanged(e)})),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"label",11),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementStart(48,"small"),s.ɵɵtext(49),s.ɵɵpipe(50,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"div",2),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"div",3),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"div",5),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"div",12),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"label",13),s.ɵɵtext(64),s.ɵɵpipe(65,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"a",14),s.ɵɵpipe(68,"i18n"),s.ɵɵtext(69,"\n "),s.ɵɵelement(70,"i",15),s.ɵɵtext(71,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"select",16),s.ɵɵlistener("ngModelChange",(function(e){return t.locale=e})),s.ɵɵtext(75,"\n "),s.ɵɵtemplate(76,y,2,2,"option",17),s.ɵɵtext(77,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelementStart(79,"small",18),s.ɵɵtext(80),s.ɵɵpipe(81,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(83,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(84,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"div",5),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"div",19),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"input",20),s.ɵɵlistener("ngModelChange",(function(e){return t.disableIcons=e})),s.ɵɵelementEnd(),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"label",21),s.ɵɵtext(93),s.ɵɵpipe(94,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(95,"\n "),s.ɵɵelementStart(96,"a",22),s.ɵɵpipe(97,"i18n"),s.ɵɵtext(98,"\n "),s.ɵɵelement(99,"i",15),s.ɵɵtext(100,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(101,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(102,"\n "),s.ɵɵelementStart(103,"small",18),s.ɵɵtext(104),s.ɵɵpipe(105,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementStart(108,"div",5),s.ɵɵtext(109,"\n "),s.ɵɵelementStart(110,"div",19),s.ɵɵtext(111,"\n "),s.ɵɵelementStart(112,"input",23),s.ɵɵlistener("ngModelChange",(function(e){return t.enableGravatars=e})),s.ɵɵelementEnd(),s.ɵɵtext(113,"\n "),s.ɵɵelementStart(114,"label",24),s.ɵɵtext(115),s.ɵɵpipe(116,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(117,"\n "),s.ɵɵelementStart(118,"a",25),s.ɵɵpipe(119,"i18n"),s.ɵɵtext(120,"\n "),s.ɵɵelement(121,"i",15),s.ɵɵtext(122,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(123,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(124,"\n "),s.ɵɵelementStart(125,"small",18),s.ɵɵtext(126),s.ɵɵpipe(127,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(128,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(129,"\n "),s.ɵɵelementStart(130,"div",5),s.ɵɵtext(131,"\n "),s.ɵɵelementStart(132,"div",19),s.ɵɵtext(133,"\n "),s.ɵɵelementStart(134,"input",26),s.ɵɵlistener("ngModelChange",(function(e){return t.enableFullWidth=e})),s.ɵɵelementEnd(),s.ɵɵtext(135,"\n "),s.ɵɵelementStart(136,"label",27),s.ɵɵtext(137),s.ɵɵpipe(138,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(140,"\n "),s.ɵɵelementStart(141,"small",18),s.ɵɵtext(142),s.ɵɵpipe(143,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(144,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(145,"\n "),s.ɵɵelementStart(146,"div",2),s.ɵɵtext(147,"\n "),s.ɵɵelementStart(148,"div",3),s.ɵɵtext(149,"\n "),s.ɵɵelementStart(150,"div",5),s.ɵɵtext(151,"\n "),s.ɵɵelementStart(152,"label",28),s.ɵɵtext(153),s.ɵɵpipe(154,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(155,"\n "),s.ɵɵelementStart(156,"select",29),s.ɵɵlistener("ngModelChange",(function(e){return t.theme=e})),s.ɵɵtext(157,"\n "),s.ɵɵtemplate(158,x,2,2,"option",17),s.ɵɵtext(159,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"small",18),s.ɵɵtext(162),s.ɵɵpipe(163,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(164,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(165,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(166,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(167,"\n "),s.ɵɵelementStart(168,"button",30),s.ɵɵtext(169),s.ɵɵpipe(170,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(171,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(172,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,32,"options")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,34,"optionsDesc")),s.ɵɵadvance(9),s.ɵɵproperty("vaultTimeouts",t.vaultTimeouts)("formControl",t.vaultTimeout),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,36,"vaultTimeoutAction")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(34,38,"lock"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,40,"vaultTimeoutActionLockDesc")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.vaultTimeoutAction),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(47,42,"logOut"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(50,44,"vaultTimeoutActionLogOutDesc")),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(65,46,"language")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(68,48,"learnMore")),s.ɵɵadvance(7),s.ɵɵproperty("ngModel",t.locale),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.localeOptions),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(81,50,"languageDesc")),s.ɵɵadvance(10),s.ɵɵproperty("ngModel",t.disableIcons),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(94,52,"disableIcons"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(97,54,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(105,56,"disableIconsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableGravatars),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(116,58,"enableGravatars"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(119,60,"learnMore")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(127,62,"enableGravatarsDesc")),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",t.enableFullWidth),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(138,64,"enableFullWidth"),"\n "),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(143,66,"enableFullWidthDesc")),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(154,68,"theme")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.theme),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",t.themeOptions),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(163,70,"themeDesc")),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(170,72,"save"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.VaultTimeoutInputComponent,m.DefaultValueAccessor,m.NgControlStatus,m.FormControlDirective,m.RadioControlValueAccessor,m.NgModel,v.A11yTitleDirective,m.SelectControlValueAccessor,f.NgForOf,m.CheckboxControlValueAccessor,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[g.I18nPipe],encapsulation:2})},13816:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationPlansComponent=void 0;const r=n(32621),o=(n(68012),n(91092),n(82058),n(40349),n(70143),n(94308),n(99954),n(10685),n(2173),n(63410)),a=n(28047),s=n(6127),l=n(39691),c=n(40251),d=n(48155),p=n(9207),u=n(93633),m=n(26942),h=n(5328),v=n(32621),f=n(91092),g=n(40349),y=n(99954),x=n(82058),S=n(68012),b=n(2173),w=n(10685),I=n(94308),C=n(70143),E=n(57490),P=n(96832),k=n(637),A=n(28047),O=n(63410),T=n(52900),M=n(72596);function D(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",2),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",3),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n"),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function B(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"p"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().submit()})),v.ɵɵtext(8,"\n "),v.ɵɵelementStart(9,"div",6),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"label",7),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵelement(15,"input",8),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",9),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementStart(22,"button",10),v.ɵɵtext(23,"\n "),v.ɵɵelement(24,"i",11),v.ɵɵpipe(25,"i18n"),v.ɵɵtext(26,"\n "),v.ɵɵelementStart(27,"span"),v.ɵɵtext(28),v.ɵɵpipe(29,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n"),v.ɵɵelementContainerEnd()}if(2&e){const e=v.ɵɵreference(7),t=v.ɵɵnextContext();v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,7,"uploadLicenseFileOrg")),v.ɵɵadvance(3),v.ɵɵproperty("appApiAction",t.formPromise),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(13,9,"licenseFile")),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_organization_license.json")),v.ɵɵadvance(4),v.ɵɵproperty("disabled",e.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(25,14,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(29,16,"submit"))}}function R(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",19),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"label",25),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"input",26),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).clientOwnerEmail=t})),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"small",27),v.ɵɵtext(9),v.ɵɵpipe(10,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,3,"clientOwnerEmail")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.clientOwnerEmail),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(10,5,"clientOwnerDesc","20"))}}function U(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",20),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",21),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).name=t})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"div",19),v.ɵɵtext(12,"\n "),v.ɵɵelementStart(13,"label",22),v.ɵɵtext(14),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"input",23),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).billingEmail=t})),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,R,12,8,"div",24),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,5,"organizationName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.name),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(15,7,"billingEmail")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.billingEmail),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",!!e.providerId)}}function V(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",31),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",32),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).businessName=t})),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,2,"businessName")),v.ɵɵadvance(3),v.ɵɵproperty("ngModel",e.businessName)}}function F(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div"),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",28),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"input",29),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).ownedBusiness=t}))("change",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedOwnedBusiness()})),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"label",30),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,V,11,4,"div",13),v.ɵɵtext(12,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(4),v.ɵɵproperty("ngModel",e.ownedBusiness),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,3,"accountOwnedBusiness")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",e.ownedBusiness)}}function N(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function _(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeSsoAuthentication"),""))}function j(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"includeEnterprisePolicies"),""))}function z(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",e.trialPeriodDays),"\n ")}}function L(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"small"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,N,3,3,"small",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,_,3,3,"small",0),v.ɵɵtext(9,"\n "),v.ɵɵtemplate(10,j,3,3,"small",0),v.ɵɵtext(11,"\n "),v.ɵɵtemplate(12,z,3,4,"small",0),v.ɵɵtext(13,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(3),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(4,5,"includeAllTeamsFeatures"),""),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasSso),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPolicies),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.trialPeriodDays&&t.createOrganization)}}function K(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"limitedUsers",e.maxUsers),"")}}function q(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",e.maxUsers),"")}}function G(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"addShareUnlimitedUsers"),""))}function W(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"limitedCollections",e.maxCollections),"")}}function H(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"addShareLimitedUsers",e.maxAdditionalSeats),"")}}function $(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"createUnlimitedCollections"),""))}function Q(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind2(2,1,"gbEncryptedFileStorage",e.baseStorageGb+"GB"),"")}}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"controlAccessWithGroups"),""))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"trackAuditLogs"),""))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"syncUsersFromDirectory"),""))}function Z(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"onPremHostingOptional"),""))}function ee(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"usersGetPremium"),""))}function te(e,t){1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("• ",v.ɵɵpipeBind1(2,1,"priorityCustomerSupport"),""))}function ne(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate1("•\n ",v.ɵɵpipeBind2(2,1,"xDayFreeTrial",e.trialPeriodDays),"\n ")}}function ie(e,t){if(1&e&&(v.ɵɵtext(0,"\n "),v.ɵɵtemplate(1,K,3,4,"small",0),v.ɵɵtext(2,"\n "),v.ɵɵtemplate(3,q,3,4,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,G,3,3,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,W,3,4,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,H,3,4,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,$,3,3,"small",0),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,Q,3,4,"small",0),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,Y,3,3,"small",0),v.ɵɵtext(16,"\n "),v.ɵɵtemplate(17,J,3,3,"small",0),v.ɵɵtext(18,"\n "),v.ɵɵtemplate(19,X,3,3,"small",0),v.ɵɵtext(20,"\n "),v.ɵɵtemplate(21,Z,3,3,"small",0),v.ɵɵtext(22,"\n "),v.ɵɵtemplate(23,ee,3,3,"small",0),v.ɵɵtext(24,"\n "),v.ɵɵtemplate(25,te,3,3,"small",0),v.ɵɵtext(26,"\n "),v.ɵɵtemplate(27,ne,3,4,"small",0),v.ɵɵtext(28,"\n ")),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(1),v.ɵɵproperty("ngIf",e.product==t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product!=t.productTypes.Free&&e.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.maxUsers),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.maxAdditionalSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.maxCollections),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseStorageGb),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasGroups),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasApi),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasDirectory),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasSelfHost),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.usersGetPremium),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product!=t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.trialPeriodDays&&t.createOrganization)}}function re(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind1(2,3,"additionalUsers").toLowerCase(),"\n ",v.ɵɵpipeBind2(3,5,e.seatPrice/12,"$")," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function oe(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"currency"),v.ɵɵpipe(3,"i18n"),v.ɵɵpipe(4,"i18n"),v.ɵɵtemplate(5,re,5,10,"ng-container",0),v.ɵɵtext(6,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind2(2,4,e.basePrice/12,"$")," /",v.ɵɵpipeBind1(3,7,"month"),",\n ",v.ɵɵpipeBind2(4,9,"includesXUsers",e.baseSeats),"\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption)}}function ae(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,oe,7,12,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice&&!t.acceptingSponsorship)}}function se(e,t){if(1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext().$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(2,2,"costPerUser",v.ɵɵpipeBind2(3,5,e.seatPrice/12,"$"))," /",v.ɵɵpipeBind1(4,8,"month"),"\n ")}}function le(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(2,1,"freeForever")))}function ce(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",33),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",34),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).product=t}))("change",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedProduct()})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",35),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementStart(7,"small",36),v.ɵɵtext(8),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵtemplate(11,L,14,7,"ng-container",37),v.ɵɵtext(12,"\n "),v.ɵɵtemplate(13,ie,29,14,"ng-template",null,38,v.ɵɵtemplateRefExtractor),v.ɵɵtext(15,"\n "),v.ɵɵtemplate(16,ae,4,1,"span",0),v.ɵɵtext(17,"\n "),v.ɵɵtemplate(18,se,5,10,"span",0),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,le,3,3,"span",0),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=v.ɵɵreference(14),i=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","product",e.product,""),v.ɵɵproperty("value",e.product)("ngModel",i.product),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","product",e.product,""),v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,11,e.nameLocalizationKey),"\n "),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(9,13,e.descriptionLocalizationKey,"1")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.product===i.productTypes.Enterprise)("ngIfElse",n),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",e.product!=i.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.basePrice&&e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.product==i.productTypes.Free)}}function de(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"h2",12),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"div",18),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",52),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"label",53),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"input",54),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).additionalSeats=t})),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementStart(17,"small",41),v.ɵɵtext(18),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementContainerEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,5,"users")),v.ɵɵadvance(8),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,7,"userSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(15,9,"userSeatsDesc")),v.ɵɵproperty("ngModel",e.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(19,11,"userSeatsHowManyDesc"))}}function pe(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",18),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",19),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",53),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"input",55),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).additionalSeats=t})),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",41),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵelementEnd(),v.ɵɵtext(15,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,4,"additionalUserSeats")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(9,6,"userSeatsDesc")),v.ɵɵproperty("ngModel",e.additionalSeats),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,8,"userSeatsAdditionalDesc",e.selectedPlan.baseSeats,v.ɵɵpipeBind2(14,12,e.seatPriceMonthly(e.selectedPlan),"$")))}}function ue(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",19),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",56),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"input",57),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).premiumAccessAddon=t})),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"label",58),v.ɵɵtext(7),v.ɵɵpipe(8,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"small",41),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵpipe(14,"currency"),v.ɵɵpipe(15,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(3);v.ɵɵadvance(4),v.ɵɵproperty("ngModel",e.premiumAccessAddon),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(8,3,"premiumAccess")),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind3(13,5,"premiumAccessDesc",v.ɵɵpipeBind2(14,9,3.33,"$"),v.ɵɵpipeBind1(15,12,"month")))}}function me(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"span",61),v.ɵɵtext(3),v.ɵɵpipe(4,"currency"),v.ɵɵelementEnd(),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind2(4,2,e.basePrice,"$")),v.ɵɵadvance(2),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,5,"freeWithSponsorship"),"\n ")}}function he(e,t){if(1&e&&(v.ɵɵtext(0),v.ɵɵpipe(1,"currency"),v.ɵɵpipe(2,"i18n")),2&e){const e=v.ɵɵnextContext(3).$implicit;v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind2(1,2,e.basePrice,"$"),"\n /",v.ɵɵpipeBind1(2,5,"year"),"\n ")}}function ve(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵtemplate(5,me,7,7,"ng-container",37),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,he,3,7,"ng-template",null,60,v.ɵɵtemplateRefExtractor),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd()),2&e){const e=v.ɵɵreference(8),t=v.ɵɵnextContext(2).$implicit,n=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate3("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,t.basePrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",n.acceptingSponsorship)("ngIfElse",e)}}function fe(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function ge(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function ye(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,fe,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,ge,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",t.additionalSeats||0," ×\n ",v.ɵɵpipeBind2(6,7,e.seatPrice/12,"$")," × 12\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,t.seatTotal(e),"$")," /",v.ɵɵpipeBind1(9,15,"year"),"\n ")}}function xe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",t.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,e.additionalStoragePricePerGb/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,11,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,13,t.additionalStorageTotal(e),"$")," /",v.ɵɵpipeBind1(6,16,"year"),"\n ")}}function Se(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,e.premiumAccessOptionCost/12,"$")," × 12\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"year"),"\n ")}}function be(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,ve,10,12,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,ye,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,xe,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,Se,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"annually"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPremiumAccessOption&&t.premiumAccessAddon)}}function we(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"basePrice"),": ",v.ɵɵpipeBind2(3,7,e.basePrice,"$"),"\n ",v.ɵɵpipeBind1(4,10,"monthAbbr"),"\n =\n ",v.ɵɵpipeBind2(5,12,e.basePrice,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function Ie(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"additionalUsers"),":"))}function Ce(e,t){1&e&&(v.ɵɵelementStart(0,"span"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(2,1,"users"),":"))}function Ee(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,Ie,3,3,"span",0),v.ɵɵtext(3,"\n "),v.ɵɵtemplate(4,Ce,3,3,"span",0),v.ɵɵtext(5),v.ɵɵpipe(6,"currency"),v.ɵɵpipe(7,"i18n"),v.ɵɵpipe(8,"currency"),v.ɵɵpipe(9,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.baseSeats),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.baseSeats),v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",t.additionalSeats||0," × ",v.ɵɵpipeBind2(6,7,e.seatPrice,"$"),"\n ",v.ɵɵpipeBind1(7,10,"monthAbbr")," = ",v.ɵɵpipeBind2(8,12,t.seatTotal(e),"$")," /",v.ɵɵpipeBind1(9,15,"month"),"\n ")}}function Pe(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate6("\n ",v.ɵɵpipeBind1(2,6,"additionalStorageGb"),": ",t.additionalStorage||0," ×\n ",v.ɵɵpipeBind2(3,8,e.additionalStoragePricePerGb,"$"),"\n ",v.ɵɵpipeBind1(4,11,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,13,t.additionalStorageTotal(e),"$")," /",v.ɵɵpipeBind1(6,16,"month"),"\n ")}}function ke(e,t){if(1&e&&(v.ɵɵelementStart(0,"small"),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵpipe(3,"currency"),v.ɵɵpipe(4,"i18n"),v.ɵɵpipe(5,"currency"),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext(2).$implicit;v.ɵɵadvance(1),v.ɵɵtextInterpolate5("\n ",v.ɵɵpipeBind1(2,5,"premiumAccess"),":\n ",v.ɵɵpipeBind2(3,7,e.premiumAccessOptionCost,"$")," ",v.ɵɵpipeBind1(4,10,"monthAbbr")," =\n ",v.ɵɵpipeBind2(5,12,40,"$"),"\n /",v.ɵɵpipeBind1(6,15,"month"),"\n ")}}function Ae(e,t){if(1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵtemplate(3,we,7,17,"small",0),v.ɵɵtext(4,"\n "),v.ɵɵtemplate(5,Ee,10,17,"small",0),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,Pe,7,18,"small",0),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,ke,7,17,"small",0),v.ɵɵtext(10,"\n "),v.ɵɵelementContainerEnd()),2&e){const e=v.ɵɵnextContext().$implicit,t=v.ɵɵnextContext(3);v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,5,"monthly"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.basePrice),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalSeatsOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasAdditionalStorageOption),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.hasPremiumAccessOption&&t.premiumAccessAddon)}}function Oe(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",33),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"input",59),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(3).plan=t})),v.ɵɵelementEnd(),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"label",35),v.ɵɵtext(5,"\n "),v.ɵɵtemplate(6,be,11,7,"ng-container",0),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,Ae,11,7,"ng-container",0),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=v.ɵɵnextContext(3);v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("id","interval",e.type,""),v.ɵɵproperty("value",e.type)("ngModel",n.plan),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate1("for","interval",e.type,""),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.isAnnual),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!e.isAnnual)}}function Te(e,t){1&e&&v.ɵɵelement(0,"app-payment",62),2&e&&v.ɵɵproperty("hideCredit",!0)}function Me(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"app-payment",63),v.ɵɵtext(3,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("showMethods",!1))}function De(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div"),v.ɵɵtext(1,"\n "),v.ɵɵtemplate(2,de,23,13,"ng-container",0),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"h2",12),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵtemplate(8,pe,17,15,"div",13),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",18),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",19),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"label",39),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementStart(18,"input",40),v.ɵɵlistener("ngModelChange",(function(t){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).additionalStorage=t})),v.ɵɵpipe(19,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"small",41),v.ɵɵtext(22),v.ɵɵpipe(23,"i18n"),v.ɵɵpipe(24,"currency"),v.ɵɵpipe(25,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(26,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵelementStart(29,"div",18),v.ɵɵtext(30,"\n "),v.ɵɵtemplate(31,ue,17,14,"div",24),v.ɵɵtext(32,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(33,"\n "),v.ɵɵelementStart(34,"h2",42),v.ɵɵtext(35),v.ɵɵpipe(36,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵtemplate(38,Oe,11,6,"div",14),v.ɵɵtext(39,"\n "),v.ɵɵelement(40,"hr",43),v.ɵɵtext(41,"\n "),v.ɵɵelementStart(42,"h2",44),v.ɵɵtext(43),v.ɵɵpipe(44,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(45,"\n "),v.ɵɵelementStart(46,"small",45),v.ɵɵtext(47),v.ɵɵelementEnd(),v.ɵɵtext(48,"\n "),v.ɵɵtemplate(49,Te,1,1,"app-payment",46),v.ɵɵtext(50,"\n "),v.ɵɵelementStart(51,"app-tax-info",47),v.ɵɵlistener("onCountryChanged",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).changedCountry()})),v.ɵɵelementEnd(),v.ɵɵtext(52,"\n "),v.ɵɵelementStart(53,"div",48),v.ɵɵtext(54,"\n "),v.ɵɵelementStart(55,"div",49),v.ɵɵtext(56),v.ɵɵpipe(57,"i18n"),v.ɵɵpipe(58,"currency"),v.ɵɵelement(59,"br"),v.ɵɵtext(60,"\n "),v.ɵɵelementContainerStart(61),v.ɵɵtext(62),v.ɵɵpipe(63,"i18n"),v.ɵɵpipe(64,"currency"),v.ɵɵelementContainerEnd(),v.ɵɵtext(65,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(66,"\n "),v.ɵɵelement(67,"hr",50),v.ɵɵtext(68,"\n "),v.ɵɵelementStart(69,"p",51),v.ɵɵtext(70,"\n "),v.ɵɵelementStart(71,"strong"),v.ɵɵtext(72),v.ɵɵpipe(73,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(74),v.ɵɵpipe(75,"currency"),v.ɵɵpipe(76,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(77,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(78,"\n "),v.ɵɵtemplate(79,Me,4,1,"ng-container",0),v.ɵɵtext(80,"\n "),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵnextContext(2);v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.selectedPlan.hasAdditionalSeatsOption&&!e.selectedPlan.baseSeats),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(6,21,"addons")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.selectedPlan.hasAdditionalSeatsOption&&e.selectedPlan.baseSeats),v.ɵɵadvance(7),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(16,23,"additionalStorageGb")),v.ɵɵadvance(3),v.ɵɵpropertyInterpolate("placeholder",v.ɵɵpipeBind1(19,25,"additionalStorageGbDesc")),v.ɵɵproperty("ngModel",e.additionalStorage),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind4(23,27,"additionalStorageIntervalDesc","1 GB",v.ɵɵpipeBind2(24,32,e.additionalStoragePriceMonthly(e.selectedPlan),"$"),v.ɵɵpipeBind1(25,35,"month"))),v.ɵɵadvance(9),v.ɵɵproperty("ngIf",e.selectedPlan.hasPremiumAccessOption),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(36,37,"summary")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",e.selectablePlans),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(44,39,e.createOrganization?"paymentInformation":"billingInformation"),"\n "),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",e.paymentDesc,"\n "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",e.createOrganization),v.ɵɵadvance(7),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(57,41,"planPrice"),": ",v.ɵɵpipeBind2(58,43,e.subtotal,"USD $"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate2("\n ",v.ɵɵpipeBind1(63,46,"estimatedTax"),": ",v.ɵɵpipeBind2(64,48,e.taxCharges,"USD $"),"\n "),v.ɵɵadvance(10),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(73,51,"total"),":"),v.ɵɵadvance(2),v.ɵɵtextInterpolate2(" ",v.ɵɵpipeBind2(75,53,e.total,"USD $"),"/",v.ɵɵpipeBind1(76,56,e.selectedPlanInterval),"\n "),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",!e.createOrganization)}}function Be(e,t){1&e&&(v.ɵɵelementStart(0,"div",16),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"app-callout",64),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵproperty("type","error"),v.ɵɵadvance(1),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,2,"singleOrgBlockCreateMessage")))}function Re(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",65),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext(2).cancel()})),v.ɵɵtext(1),v.ɵɵpipe(2,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(2,1,"cancel"),"\n "))}function Ue(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"form",4,5),v.ɵɵlistener("ngSubmit",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().submit()})),v.ɵɵtext(2,"\n "),v.ɵɵelementStart(3,"h2",12),v.ɵɵtext(4),v.ɵɵpipe(5,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(6,"\n "),v.ɵɵtemplate(7,U,22,9,"div",13),v.ɵɵtext(8,"\n "),v.ɵɵtemplate(9,F,13,5,"div",0),v.ɵɵtext(10,"\n "),v.ɵɵelementStart(11,"h2",12),v.ɵɵtext(12),v.ɵɵpipe(13,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(14,"\n "),v.ɵɵtemplate(15,ce,23,16,"div",14),v.ɵɵtext(16,"\n "),v.ɵɵtemplate(17,De,81,58,"div",0),v.ɵɵtext(18,"\n "),v.ɵɵtemplate(19,Be,6,4,"div",15),v.ɵɵtext(20,"\n "),v.ɵɵelementStart(21,"div",16),v.ɵɵtext(22,"\n "),v.ɵɵelementStart(23,"button",10),v.ɵɵtext(24,"\n "),v.ɵɵelement(25,"i",11),v.ɵɵpipe(26,"i18n"),v.ɵɵtext(27,"\n "),v.ɵɵelementStart(28,"span"),v.ɵɵtext(29),v.ɵɵpipe(30,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵtemplate(33,Re,3,3,"button",17),v.ɵɵtext(34,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(35,"\n"),v.ɵɵelementEnd()}if(2&e){const e=v.ɵɵreference(1),t=v.ɵɵnextContext();v.ɵɵproperty("appApiAction",t.formPromise),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(5,12,"generalInformation")),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",t.createOrganization),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.providerId&&!t.acceptingSponsorship),v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(13,14,"chooseYourPlan")),v.ɵɵadvance(3),v.ɵɵproperty("ngForOf",t.selectableProducts),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.product!==t.productTypes.Free),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.singleOrgPolicyBlock),v.ɵɵadvance(4),v.ɵɵproperty("disabled",e.loading),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(26,16,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(30,18,"submit")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.showCancel)}}class Ve{constructor(e,t,n,i,o,a,s,c,p){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.router=o,this.syncService=a,this.policyService=s,this.organizationService=c,this.logService=p,this.showFree=!0,this.showCancel=!1,this.acceptingSponsorship=!1,this.product=d.ProductType.Free,this.plan=l.PlanType.Free,this.onSuccess=new r.EventEmitter,this.onCanceled=new r.EventEmitter,this.loading=!0,this.selfHosted=!1,this.ownedBusiness=!1,this.premiumAccessAddon=!1,this.additionalStorage=0,this.additionalSeats=0,this.productTypes=d.ProductType,this.singleOrgPolicyBlock=!1,this.discount=0,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){if(!this.selfHosted){const e=yield this.apiService.getPlans();this.plans=e.data,this.product!==d.ProductType.Enterprise&&this.product!==d.ProductType.Teams||(this.ownedBusiness=!0)}this.providerId&&(this.ownedBusiness=!0,this.changedOwnedBusiness()),this.loading=!1}))}get createOrganization(){return null==this.organizationId}get selectedPlan(){return this.plans.find((e=>e.type===this.plan))}get selectedPlanInterval(){return this.selectedPlan.isAnnual?"year":"month"}get selectableProducts(){let e=this.plans.filter((e=>e.type!==l.PlanType.Custom));if(this.ownedBusiness&&(e=e.filter((e=>e.canBeUsedByBusiness))),this.showFree||(e=e.filter((e=>e.product!==d.ProductType.Free))),e=e.filter((e=>!e.legacyYear&&!e.disabled&&(e.isAnnual||e.product===this.productTypes.Free))),this.acceptingSponsorship){const t=this.plans.find((e=>e.type===l.PlanType.FamiliesAnnually));this.discount=t.basePrice,e=[t]}return e}get selectablePlans(){return this.plans.filter((e=>!e.legacyYear&&!e.disabled&&e.product===this.product))}additionalStoragePriceMonthly(e){return e.isAnnual?e.additionalStoragePricePerGb/12:e.additionalStoragePricePerGb}seatPriceMonthly(e){return e.isAnnual?e.seatPrice/12:e.seatPrice}additionalStorageTotal(e){return e.hasAdditionalStorageOption?e.additionalStoragePricePerGb*Math.abs(this.additionalStorage||0):0}seatTotal(e){return e.hasAdditionalSeatsOption?e.seatPrice*Math.abs(this.additionalSeats||0):0}get subtotal(){let e=this.selectedPlan.basePrice;return this.selectedPlan.hasAdditionalSeatsOption&&this.additionalSeats&&(e+=this.seatTotal(this.selectedPlan)),this.selectedPlan.hasAdditionalStorageOption&&this.additionalStorage&&(e+=this.additionalStorageTotal(this.selectedPlan)),this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon&&(e+=this.selectedPlan.premiumAccessOptionPrice),e-this.discount}get freeTrial(){return null!=this.selectedPlan.trialPeriodDays}get taxCharges(){return null!=this.taxComponent&&null!=this.taxComponent.taxRate?this.taxComponent.taxRate/100*this.subtotal:0}get total(){return this.subtotal+this.taxCharges||0}get paymentDesc(){return this.acceptingSponsorship?this.i18nService.t("paymentSponsored"):this.freeTrial&&this.createOrganization?this.i18nService.t("paymentChargedWithTrial"):this.i18nService.t("paymentCharged",this.i18nService.t(this.selectedPlanInterval))}changedProduct(){this.plan=this.selectablePlans[0].type,this.selectedPlan.hasPremiumAccessOption||(this.premiumAccessAddon=!1),this.selectedPlan.hasAdditionalStorageOption||(this.additionalStorage=0),this.selectedPlan.hasAdditionalSeatsOption?this.additionalSeats||this.selectedPlan.baseSeats||!this.selectedPlan.hasAdditionalSeatsOption||(this.additionalSeats=1):this.additionalSeats=0}changedOwnedBusiness(){this.ownedBusiness&&!this.selectedPlan.canBeUsedByBusiness&&(this.product=d.ProductType.Teams,this.plan=l.PlanType.TeamsAnnually)}changedCountry(){this.paymentComponent.hideBank="US"!==this.taxComponent.taxInfo.country,this.paymentComponent.hideBank&&this.paymentComponent.method===s.PaymentMethodType.BankAccount&&(this.paymentComponent.method=s.PaymentMethodType.Card,this.paymentComponent.changeMethod())}cancel(){this.onCanceled.emit()}submit(){return i(this,void 0,void 0,(function*(){if(this.singleOrgPolicyBlock=yield this.userHasBlockingSingleOrgPolicy(),!this.singleOrgPolicyBlock)try{const e=()=>i(this,void 0,void 0,(function*(){let e=null;if(this.createOrganization){const t=yield this.cryptoService.makeShareKey(),n=t[0].encryptedString,i=(yield this.cryptoService.encrypt(this.i18nService.t("defaultCollection"),t[1])).encryptedString,r=yield this.cryptoService.makeKeyPair(t[1]);e=this.selfHosted?yield this.createSelfHosted(n,i,r):yield this.createCloudHosted(n,i,r,t[1]),this.platformUtilsService.showToast("success",this.i18nService.t("organizationCreated"),this.i18nService.t("organizationReadyToGo"))}else e=yield this.updateOrganization(e),this.platformUtilsService.showToast("success",null,this.i18nService.t("organizationUpgraded"));return yield this.apiService.refreshIdentityToken(),yield this.syncService.fullSync(!0),this.acceptingSponsorship||this.router.navigate(["/organizations/"+e]),e}));this.formPromise=e();const t=yield this.formPromise;this.onSuccess.emit({organizationId:t})}catch(e){this.logService.error(e)}}))}userHasBlockingSingleOrgPolicy(){return i(this,void 0,void 0,(function*(){return this.policyService.policyAppliesToUser(c.PolicyType.SingleOrg)}))}updateOrganization(e){return i(this,void 0,void 0,(function*(){const e=new m.OrganizationUpgradeRequest;e.businessName=this.ownedBusiness?this.businessName:null,e.additionalSeats=this.additionalSeats,e.additionalStorageGb=this.additionalStorage,e.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,e.planType=this.selectedPlan.type,e.billingAddressCountry=this.taxComponent.taxInfo.country,e.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode;if(!(yield this.organizationService.get(this.organizationId)).hasPublicAndPrivateKeys){const t=yield this.cryptoService.getOrgKey(this.organizationId),n=yield this.cryptoService.makeKeyPair(t);e.keys=new u.OrganizationKeysRequest(n[0],n[1].encryptedString)}const t=yield this.apiService.postOrganizationUpgrade(this.organizationId,e);return t.success||null==t.paymentIntentClientSecret||(yield this.paymentComponent.handleStripeCardPayment(t.paymentIntentClientSecret,null)),this.organizationId}))}createCloudHosted(e,t,n,r){return i(this,void 0,void 0,(function*(){const i=new p.OrganizationCreateRequest;if(i.key=e,i.collectionName=t,i.name=this.name,i.billingEmail=this.billingEmail,i.keys=new u.OrganizationKeysRequest(n[0],n[1].encryptedString),this.selectedPlan.type===l.PlanType.Free)i.planType=l.PlanType.Free;else{const e=yield this.paymentComponent.createPaymentToken();i.paymentToken=e[0],i.paymentMethodType=e[1],i.businessName=this.ownedBusiness?this.businessName:null,i.additionalSeats=this.additionalSeats,i.additionalStorageGb=this.additionalStorage,i.premiumAccessAddon=this.selectedPlan.hasPremiumAccessOption&&this.premiumAccessAddon,i.planType=this.selectedPlan.type,i.billingAddressPostalCode=this.taxComponent.taxInfo.postalCode,i.billingAddressCountry=this.taxComponent.taxInfo.country,this.taxComponent.taxInfo.includeTaxId&&(i.taxIdNumber=this.taxComponent.taxInfo.taxId,i.billingAddressLine1=this.taxComponent.taxInfo.line1,i.billingAddressLine2=this.taxComponent.taxInfo.line2,i.billingAddressCity=this.taxComponent.taxInfo.city,i.billingAddressState=this.taxComponent.taxInfo.state)}if(this.providerId){const e=new h.ProviderOrganizationCreateRequest(this.clientOwnerEmail,i),t=yield this.cryptoService.getProviderKey(this.providerId);e.organizationCreateRequest.key=(yield this.cryptoService.encrypt(r.key,t)).encryptedString;return(yield this.apiService.postProviderCreateOrganization(this.providerId,e)).organizationId}return(yield this.apiService.postOrganization(i)).id}))}createSelfHosted(e,t,n){return i(this,void 0,void 0,(function*(){const i=document.getElementById("file").files;if(null==i||0===i.length)throw new Error(this.i18nService.t("selectFile"));const r=new FormData;r.append("license",i[0]),r.append("key",e),r.append("collectionName",t);const o=(yield this.apiService.postOrganizationLicense(r)).id,a=new u.OrganizationKeysRequest(n[0],n[1].encryptedString);return yield this.apiService.postOrganizationKeys(o,a),o}))}}t.OrganizationPlansComponent=Ve,Ve.ɵfac=function(e){return new(e||Ve)(v.ɵɵdirectiveInject(f.ApiService),v.ɵɵdirectiveInject(g.I18nService),v.ɵɵdirectiveInject(y.PlatformUtilsService),v.ɵɵdirectiveInject(x.CryptoService),v.ɵɵdirectiveInject(S.Router),v.ɵɵdirectiveInject(b.SyncService),v.ɵɵdirectiveInject(w.PolicyService),v.ɵɵdirectiveInject(I.OrganizationService),v.ɵɵdirectiveInject(C.LogService))},Ve.ɵcmp=v.ɵɵdefineComponent({type:Ve,selectors:[["app-organization-plans"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(o.PaymentComponent,5),v.ɵɵviewQuery(a.TaxInfoComponent,5)),2&e){let e;v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.paymentComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.taxComponent=e.first)}},inputs:{organizationId:"organizationId",showFree:"showFree",showCancel:"showCancel",acceptingSponsorship:"acceptingSponsorship",product:"product",plan:"plan",providerId:"providerId"},outputs:{onSuccess:"onSuccess",onCanceled:"onCanceled"},decls:6,vars:3,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"mt-5"],["class","row",4,"ngIf"],["class","form-check form-check-block",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-4"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","billingEmail"],["id","billingEmail","type","text","name","BillingEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-group col-6",4,"ngIf"],["for","email"],["id","email","type","text","name","Email","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-muted"],[1,"form-group","form-check"],["id","ownedBusiness","type","checkbox","name","OwnedBusiness",1,"form-check-input",3,"ngModel","ngModelChange","change"],["for","ownedBusiness",1,"form-check-label"],["for","businessName"],["id","businessName","type","text","name","BusinessName",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-check","form-check-block"],["type","radio","name","product",1,"form-check-input",3,"id","value","ngModel","ngModelChange","change"],[1,"form-check-label",3,"for"],[1,"mb-1"],[4,"ngIf","ngIfElse"],["fullFeatureList",""],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[1,"text-muted","font-italic","mb-3","d-block"],[3,"hideCredit",4,"ngIf"],[3,"onCountryChanged"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],[1,"col-6"],["for","additionalSeats"],["id","additionalSeats","type","number","name","AdditionalSeats","min","1","max","100000","required","",1,"form-control",3,"ngModel","placeholder","ngModelChange"],["id","additionalSeats","type","number","name","AdditionalSeats","min","0","max","100000",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"form-check"],["id","premiumAccess","type","checkbox","name","PremiumAccessAddon",1,"form-check-input",3,"ngModel","ngModelChange"],["for","premiumAccess",1,"form-check-label","bold"],["type","radio","name","BillingInterval",1,"form-check-input",3,"id","value","ngModel","ngModelChange"],["notAcceptingSponsorship",""],[2,"text-decoration","line-through"],[3,"hideCredit"],[3,"showMethods"],[3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){1&e&&(v.ɵɵtemplate(0,D,9,6,"ng-container",0),v.ɵɵtext(1,"\n"),v.ɵɵtemplate(2,B,33,18,"ng-container",0),v.ɵɵtext(3,"\n"),v.ɵɵtemplate(4,Ue,36,20,"form",1),v.ɵɵtext(5,"\n")),2&e&&(v.ɵɵproperty("ngIf",t.loading),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.createOrganization&&t.selfHosted),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.loading&&!t.selfHosted&&t.plans))},directives:[E.NgIf,P.NgControlStatusGroup,P.NgForm,k.ApiActionDirective,E.NgForOf,P.DefaultValueAccessor,P.RequiredValidator,P.NgControlStatus,P.NgModel,P.CheckboxControlValueAccessor,P.RadioControlValueAccessor,P.MinValidator,P.MaxValidator,P.NumberValueAccessor,A.TaxInfoComponent,O.PaymentComponent,T.CalloutComponent],pipes:[M.I18nPipe,E.CurrencyPipe],encapsulation:2})},38270:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationsComponent=void 0;n(91092),n(82058),n(40349),n(70143),n(94308),n(99954),n(10685),n(2173);const r=n(63750),o=n(70829),a=n(40251),s=n(32621),l=n(94308),c=n(99954),d=n(40349),p=n(91092),u=n(2173),m=n(82058),h=n(10685),v=n(70143),f=n(57490),g=n(68012),y=n(637),x=n(69242),S=n(50553),b=n(80507),w=n(92521),I=n(57811),C=n(72596);function E(e,t){1&e&&(s.ɵɵelementStart(0,"p",4),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",5),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function P(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",12),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"organizationIsDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"organizationIsDisabled")))}const k=function(e){return["/organizations",e]};function A(e,t){if(1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"a",10),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",11),s.ɵɵtext(5),s.ɵɵtemplate(6,P,9,6,"ng-container",0),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(2),s.ɵɵproperty("routerLink",s.ɵɵpureFunction1(3,k,e.id)),s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",e.name,"\n "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",!e.enabled)}}function O(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",8),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,A,9,5,"li",9),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.organizations)}}function T(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noOrganizationsList")))}function M(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,O,4,1,"ul",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,T,3,3,"p",0),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.organizations&&e.organizations.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.organizations||!e.organizations.length)}}function D(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,E,9,6,"p",1),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,M,6,2,"ng-container",0),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",2),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.loaded),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,3,"newOrganization"),"\n ")}}function B(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",17),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){1&e&&(s.ɵɵelementStart(0,"a",18),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",3),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"newOrganization"),"\n "))}function U(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",17),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function V(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"p"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",20),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"noOrganizationsList")),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,4,"newOrganization"),"\n "))}function F(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",12),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"organizationIsDisabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"organizationIsDisabled")))}function N(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",33),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"enrolledPasswordReset")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"enrolledPasswordReset")))}function _(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).toggleResetPasswordEnrollment(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",35),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"enrollPasswordReset"),"\n "))}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).toggleResetPasswordEnrollment(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",36),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"withdrawPasswordReset"),"\n "))}function z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",34),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2).$implicit;return s.ɵɵnextContext(4).unlinkSso(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",39),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"unlinkSso"),"\n "))}function L(e,t){if(1&e&&(s.ɵɵtext(0,"\n "),s.ɵɵelementStart(1,"app-link-sso",40),s.ɵɵtext(2," "),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n ")),2&e){const e=s.ɵɵnextContext(2).$implicit;s.ɵɵadvance(1),s.ɵɵproperty("organization",e)}}function K(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,z,5,3,"a",37),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,L,4,1,"ng-template",null,38,s.ɵɵtemplateRefExtractor),s.ɵɵtext(6,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵreference(5),t=s.ɵɵnextContext().$implicit;s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.ssoBound)("ngIfElse",e)}}function q(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",22),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"app-avatar",23),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td"),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"a",24),s.ɵɵtext(10),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,F,9,6,"ng-container",0),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,N,9,6,"ng-container",0),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"td",25),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",26),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"button",27),s.ɵɵpipe(22,"i18n"),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"i",28),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",29),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,_,5,3,"a",30),s.ɵɵtext(30,"\n "),s.ɵɵtemplate(31,j,5,3,"a",30),s.ɵɵtext(32,"\n "),s.ɵɵtemplate(33,K,7,2,"ng-container",0),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"a",31),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).leave(t)})),s.ɵɵtext(36,"\n "),s.ɵɵelement(37,"i",32),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(4);s.ɵɵadvance(4),s.ɵɵproperty("data",e.name)("circle",!0)("fontSize",14),s.ɵɵadvance(5),s.ɵɵproperty("routerLink",s.ɵɵpureFunction1(16,k,e.id)),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showEnrolledStatus(e)),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(22,12,"options")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",n.allowEnrollmentChanges(e)&&!e.resetPasswordEnrolled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.allowEnrollmentChanges(e)&&e.resetPasswordEnrolled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.useSso&&e.identifier),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(39,14,"leave"),"\n ")}}function G(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",21),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,q,44,18,"tr",9),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.organizations)}}function W(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,V,12,6,"ng-container",0),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,G,7,1,"table",19),s.ɵɵtext(5,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.organizations||!e.organizations.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.organizations&&e.organizations.length)}}function H(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",13),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"h1"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementStart(7,"small",14,15),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,B,9,6,"ng-container",0),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,R,5,3,"a",16),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,U,9,6,"ng-container",0),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,W,6,2,"ng-container",0),s.ɵɵtext(20,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵreference(8),t=s.ɵɵnextContext();s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(6,6,"organizations"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("appApiAction",t.actionPromise),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.loading),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!t.loaded||t.organizations&&t.organizations.length),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loaded)}}class ${constructor(e,t,n,i,r,o,a,s){this.organizationService=e,this.platformUtilsService=t,this.i18nService=n,this.apiService=i,this.syncService=r,this.cryptoService=o,this.policyService=a,this.logService=s,this.vault=!1,this.loaded=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.vault||(yield this.syncService.fullSync(!0),yield this.load())}))}load(){return i(this,void 0,void 0,(function*(){const e=yield this.organizationService.getAll();e.sort(o.Utils.getSortFunction(this.i18nService,"name")),this.organizations=e,this.policies=yield this.policyService.getAll(a.PolicyType.ResetPassword),this.loaded=!0}))}allowEnrollmentChanges(e){if(e.usePolicies&&e.useResetPassword&&e.hasPublicAndPrivateKeys){const t=this.policies.find((t=>t.organizationId===e.id));if(null!=t&&t.enabled)return!e.resetPasswordEnrolled||!t.data.autoEnrollEnabled}return!1}showEnrolledStatus(e){return e.useResetPassword&&e.resetPasswordEnrolled&&this.policies.some((t=>t.organizationId===e.id&&t.enabled))}unlinkSso(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("unlinkSsoConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.apiService.deleteSsoUser(e.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,"Unlinked SSO"),yield this.load()}catch(t){this.logService.error(t)}}))}leave(e){return i(this,void 0,void 0,(function*(){if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("leaveOrganizationConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.apiService.postLeaveOrganization(e.id).then((()=>this.syncService.fullSync(!0))),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("leftOrganization")),yield this.load()}catch(t){this.logService.error(t)}}))}toggleResetPasswordEnrollment(e){return i(this,void 0,void 0,(function*(){let t=null,n="withdrawPasswordResetSuccess";if(e.resetPasswordEnrolled){const n=new r.OrganizationUserResetPasswordEnrollmentRequest;n.resetPasswordKey=t,this.actionPromise=this.apiService.putOrganizationUserResetPasswordEnrollment(e.id,e.userId,n).then((()=>this.syncService.fullSync(!0)))}else{if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("resetPasswordEnrollmentWarning"),null,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return;this.actionPromise=this.apiService.getOrganizationKeys(e.id).then((a=>i(this,void 0,void 0,(function*(){if(null==a)throw new Error(this.i18nService.t("resetPasswordOrgKeysError"));const i=o.Utils.fromB64ToArray(a.publicKey),s=yield this.cryptoService.getEncKey(),l=yield this.cryptoService.rsaEncrypt(s.key,i.buffer);t=l.encryptedString,n="enrollPasswordResetSuccess";const c=new r.OrganizationUserResetPasswordEnrollmentRequest;return c.resetPasswordKey=t,this.apiService.putOrganizationUserResetPasswordEnrollment(e.id,e.userId,c)})))).then((()=>this.syncService.fullSync(!0)))}try{yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(n)),yield this.load()}catch(a){this.logService.error(a)}}))}}t.OrganizationsComponent=$,$.ɵfac=function(e){return new(e||$)(s.ɵɵdirectiveInject(l.OrganizationService),s.ɵɵdirectiveInject(c.PlatformUtilsService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.ApiService),s.ɵɵdirectiveInject(u.SyncService),s.ɵɵdirectiveInject(m.CryptoService),s.ɵɵdirectiveInject(h.PolicyService),s.ɵɵdirectiveInject(v.LogService))},$.ɵcmp=s.ɵɵdefineComponent({type:$,selectors:[["app-organizations"]],inputs:{vault:"vault"},decls:4,vars:2,consts:[[4,"ngIf"],["class","text-muted",4,"ngIf"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-block","btn-outline-primary"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],[1,"text-muted"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"sr-only"],["class","bwi-ul card-ul carets",4,"ngIf"],[1,"bwi-ul","card-ul","carets"],[4,"ngFor","ngForOf"],[1,"text-body",3,"routerLink"],["aria-hidden","true",1,"bwi","bwi-li","bwi-caret-right"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-danger",3,"title"],[1,"page-header","d-flex"],[3,"appApiAction"],["action",""],["href","#","routerLink","/settings/create-organization","class","btn btn-sm btn-outline-primary ml-auto",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-sm","btn-outline-primary","ml-auto"],["class","table table-hover table-list",4,"ngIf"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-outline-primary"],[1,"table","table-hover","table-list"],["width","30"],["size","25",3,"data","circle","fontSize"],["href","#",3,"routerLink"],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],[1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-sign-out"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-key"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf","ngIfElse"],["linkSso",""],["aria-hidden","true",1,"bwi","bwi-fw","bwi-chain-broken"],[3,"organization"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,D,12,5,"ng-container",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,H,21,8,"ng-container",0),s.ɵɵtext(3,"\n")),2&e&&(s.ɵɵproperty("ngIf",t.vault),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.vault))},directives:[f.NgIf,g.RouterLinkWithHref,f.NgForOf,y.ApiActionDirective,x.AvatarComponent,S.A11yTitleDirective,b.StopClickDirective,w.StopPropDirective,I.LinkSsoComponent],pipes:[C.I18nPipe],encapsulation:2})},63410:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PaymentComponent=void 0;const r=n(6127),o=(n(91092),n(70143),n(99954),n(53387)),a=n(83706),s=n(32621),l=n(99954),c=n(91092),d=n(70143),p=n(57490),u=n(96832),m=n(50553),h=n(52900),v=n(966),f=n(72596);function g(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",3),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",9),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",10),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",11),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.BankAccount)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"bankAccount"),"")}}function y(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",13),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",14),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",15),s.ɵɵtext(7," PayPal"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.PayPal)("ngModel",e.method)}}function x(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",12),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",16),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",17),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",18),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("value",e.paymentMethodType.Credit)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,3,"accountCredit"),"")}}function S(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",2),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",3),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",4),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().method=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().changeMethod()})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",5),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",6),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,g,10,5,"div",7),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,y,9,2,"div",8),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,x,10,5,"div",8),s.ɵɵtext(18,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("value",e.paymentMethodType.Card)("ngModel",e.method),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,6,"creditCard"),""),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!e.hideBank),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.hidePaypal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.hideCredit)}}function b(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",20),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",21),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"div",22),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",23),s.ɵɵtext(14,"\n "),s.ɵɵelement(15,"img",24),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",20),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"label",25),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"div",26),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"div",20),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",27),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"label",28),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"a",29),s.ɵɵpipe(36,"i18n"),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"i",30),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelement(42,"div",31),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"number")),s.ɵɵadvance(14),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,6,"expiration")),s.ɵɵadvance(11),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(33,8,"securityCode"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(36,10,"learnMore")))}function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",32),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",19),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",33),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"label",34),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"input",35),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.routing_number=t})),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",33),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",36),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",37),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_number=t})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",33),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",38),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",39),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_holder_name=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",33),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"label",40),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"select",41),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().bank.account_holder_type=t})),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"option",42),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"option",43),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"option",44),s.ɵɵtext(54),s.ɵɵpipe(55,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,14,"verifyBankAccount")),s.ɵɵadvance(2),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(5,16,"verifyBankAccountInitialDesc")," ",s.ɵɵpipeBind1(6,18,"verifyBankAccountFailureWarning"),"\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,20,"routingNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.routing_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,22,"accountNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_number),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,24,"accountHolderName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_holder_name),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,26,"bankAccountType")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.bank.account_holder_type),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("-- ",s.ɵɵpipeBind1(47,28,"select")," --"),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(51,30,"bankAccountTypeCompany")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(55,32,"bankAccountTypeIndividual"))}}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",45),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"div",46),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"small",47),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,1,"paypalClickSubmit")))}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",48),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"makeSureEnoughCredit"),"\n "))}const E=a.default.lightInputColor,P=a.default.lightInputPlaceholderColor,k=a.default.darkInputColor,A=a.default.darkInputPlaceholderColor;class O{constructor(e,t,n){this.platformUtilsService=e,this.apiService=t,this.logService=n,this.showMethods=!0,this.showOptions=!0,this.method=r.PaymentMethodType.Card,this.hideBank=!1,this.hidePaypal=!1,this.hideCredit=!1,this.bank={routing_number:null,account_number:null,account_holder_name:null,account_holder_type:"",currency:"USD",country:"US"},this.paymentMethodType=r.PaymentMethodType,this.btInstance=null,this.stripe=null,this.stripeElements=null,this.stripeCardNumberElement=null,this.stripeCardExpiryElement=null,this.stripeCardCvcElement=null,this.stripeScript=window.document.createElement("script"),this.stripeScript.src="https://js.stripe.com/v3/",this.stripeScript.async=!0,this.stripeScript.onload=()=>{this.stripe=window.Stripe("pk_live_bpN0P37nMxrMQkcaHXtAybJk"),this.stripeElements=this.stripe.elements(),this.setStripeElement()},this.btScript=window.document.createElement("script"),this.btScript.src="scripts/dropin.js?cache=doiegc",this.btScript.async=!0,this.StripeElementStyle={base:{color:null,fontFamily:'"Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',fontSize:"14px",fontSmoothing:"antialiased","::placeholder":{color:null}},invalid:{color:null}},this.StripeElementClasses={focus:"is-focused",empty:"is-empty",invalid:"is-invalid"}}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showOptions||(this.hidePaypal=this.method!==r.PaymentMethodType.PayPal,this.hideBank=this.method!==r.PaymentMethodType.BankAccount,this.hideCredit=this.method!==r.PaymentMethodType.Credit),yield this.setTheme(),window.document.head.appendChild(this.stripeScript),this.hidePaypal||window.document.head.appendChild(this.btScript)}))}ngOnDestroy(){window.document.head.removeChild(this.stripeScript),window.setTimeout((()=>{Array.from(window.document.querySelectorAll("iframe")).forEach((e=>{if(null!=e.src&&e.src.indexOf("stripe")>-1)try{window.document.body.removeChild(e)}catch(t){this.logService.error(t)}}))}),500),this.hidePaypal||(window.document.head.removeChild(this.btScript),window.setTimeout((()=>{Array.from(window.document.head.querySelectorAll("script")).forEach((e=>{if(null!=e.src&&e.src.indexOf("paypal")>-1)try{window.document.head.removeChild(e)}catch(t){this.logService.error(t)}}));const e=window.document.head.querySelector("#braintree-dropin-stylesheet");if(null!=e)try{window.document.head.removeChild(e)}catch(t){this.logService.error(t)}}),500))}changeMethod(){this.btInstance=null,this.method===r.PaymentMethodType.PayPal?window.setTimeout((()=>{window.braintree.dropin.create({authorization:"production_qfbsv8kc_njj2zjtyngtjmbjd",container:"#bt-dropin-container",paymentOptionPriority:["paypal"],paypal:{flow:"vault",buttonStyle:{label:"pay",size:"medium",shape:"pill",color:"blue",tagline:"false"}}},((e,t)=>{null==e?this.btInstance=t:console.error(e)}))}),250):this.setStripeElement()}createPaymentToken(){return new Promise(((e,t)=>{this.method===r.PaymentMethodType.Credit?e([null,this.method]):this.method===r.PaymentMethodType.PayPal?this.btInstance.requestPaymentMethod().then((t=>{e([t.nonce,this.method])})).catch((e=>{t(e.message)})):this.method!==r.PaymentMethodType.Card&&this.method!==r.PaymentMethodType.BankAccount||(this.method===r.PaymentMethodType.Card?this.apiService.postSetupPayment().then((e=>this.stripe.handleCardSetup(e,this.stripeCardNumberElement))).then((n=>{n.error?t(n.error.message):n.setupIntent&&"succeeded"===n.setupIntent.status?e([n.setupIntent.payment_method,this.method]):t()})):this.stripe.createToken("bank_account",this.bank).then((n=>{n.error?t(n.error.message):n.token&&null!=n.token.id?e([n.token.id,this.method]):t()})))}))}handleStripeCardPayment(e,t){return new Promise(((n,r)=>{if(this.showMethods&&null==this.stripeCardNumberElement)return void r();return(()=>this.showMethods?this.stripe.handleCardSetup(e,this.stripeCardNumberElement):this.stripe.handleCardSetup(e))().then((e=>i(this,void 0,void 0,(function*(){e.error?r(e.error.message):e.paymentIntent&&"succeeded"===e.paymentIntent.status?(null!=t&&(yield t()),n()):r()}))))}))}setStripeElement(){window.setTimeout((()=>{this.showMethods&&this.method===r.PaymentMethodType.Card&&(null==this.stripeCardNumberElement&&(this.stripeCardNumberElement=this.stripeElements.create("cardNumber",{style:this.StripeElementStyle,classes:this.StripeElementClasses,placeholder:""})),null==this.stripeCardExpiryElement&&(this.stripeCardExpiryElement=this.stripeElements.create("cardExpiry",{style:this.StripeElementStyle,classes:this.StripeElementClasses})),null==this.stripeCardCvcElement&&(this.stripeCardCvcElement=this.stripeElements.create("cardCvc",{style:this.StripeElementStyle,classes:this.StripeElementClasses,placeholder:""})),this.stripeCardNumberElement.mount("#stripe-card-number-element"),this.stripeCardExpiryElement.mount("#stripe-card-expiry-element"),this.stripeCardCvcElement.mount("#stripe-card-cvc-element"))}),50)}setTheme(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.getEffectiveTheme())===o.ThemeType.Dark?(this.StripeElementStyle.base.color=k,this.StripeElementStyle.base["::placeholder"].color=A,this.StripeElementStyle.invalid.color=k):(this.StripeElementStyle.base.color=E,this.StripeElementStyle.base["::placeholder"].color=P,this.StripeElementStyle.invalid.color=E)}))}}t.PaymentComponent=O,O.ɵfac=function(e){return new(e||O)(s.ɵɵdirectiveInject(l.PlatformUtilsService),s.ɵɵdirectiveInject(c.ApiService),s.ɵɵdirectiveInject(d.LogService))},O.ɵcmp=s.ɵɵdefineComponent({type:O,selectors:[["app-payment"]],inputs:{showMethods:"showMethods",showOptions:"showOptions",method:"method",hideBank:"hideBank",hidePaypal:"hidePaypal",hideCredit:"hideCredit"},decls:10,vars:5,consts:[["class","mb-4 text-lg",4,"ngIf"],[4,"ngIf"],[1,"mb-4","text-lg"],[1,"form-check","form-check-inline","mr-4"],["type","radio","name","Method","id","method-card",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-card",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-credit-card"],["class","form-check form-check-inline mr-4",4,"ngIf"],["class","form-check form-check-inline",4,"ngIf"],["type","radio","name","Method","id","method-bank",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-bank",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-bank"],[1,"form-check","form-check-inline"],["type","radio","name","Method","id","method-paypal",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-paypal",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paypal"],["type","radio","name","Method","id","method-credit",1,"form-check-input",3,"value","ngModel","ngModelChange","change"],["for","method-credit",1,"form-check-label"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-dollar"],[1,"row"],[1,"form-group","col-4"],["for","stripe-card-number-element"],["id","stripe-card-number-element",1,"form-control","stripe-form-control"],[1,"form-group","col-8","d-flex","align-items-end"],["src","../../images/cards.png","alt","Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay","width","323","height","32"],["for","stripe-card-expiry-element"],["id","stripe-card-expiry-element",1,"form-control","stripe-form-control"],[1,"d-flex"],["for","stripe-card-cvc-element"],["href","https://www.cvvnumber.com/cvv.html","tabindex","-1","target","_blank","rel","noopener noreferrer",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["id","stripe-card-cvc-element",1,"form-control","stripe-form-control"],["type","warning",3,"title"],[1,"form-group","col-6"],["for","routing_number"],["id","routing_number","type","text","name","routing_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_number"],["id","account_number","type","text","name","account_number","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_name"],["id","account_holder_name","type","text","name","account_holder_name","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","account_holder_type"],["id","account_holder_type","name","account_holder_type","required","",1,"form-control",3,"ngModel","ngModelChange"],["value",""],["value","company"],["value","individual"],[1,"mb-3"],["id","bt-dropin-container",1,"mb-1"],[1,"text-muted"],["type","note"]],template:function(e,t){1&e&&(s.ɵɵtemplate(0,S,19,8,"div",0),s.ɵɵtext(1,"\n"),s.ɵɵtemplate(2,b,46,12,"ng-container",1),s.ɵɵtext(3,"\n"),s.ɵɵtemplate(4,w,60,34,"ng-container",1),s.ɵɵtext(5,"\n"),s.ɵɵtemplate(6,I,11,3,"ng-container",1),s.ɵɵtext(7,"\n"),s.ɵɵtemplate(8,C,6,3,"ng-container",1),s.ɵɵtext(9,"\n")),2&e&&(s.ɵɵproperty("ngIf",t.showOptions&&t.showMethods),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Card),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.BankAccount),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.PayPal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Credit))},directives:[p.NgIf,u.RadioControlValueAccessor,u.DefaultValueAccessor,u.NgControlStatus,u.NgModel,m.A11yTitleDirective,h.CalloutComponent,u.RequiredValidator,v.InputVerbatimDirective,u.SelectControlValueAccessor,u.NgSelectOption,u.ɵNgSelectMultipleOption],pipes:[f.I18nPipe],encapsulation:2})},95507:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PremiumComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(36424),n(99954),n(77243),n(2173),n(49613);const r=n(63410),o=n(28047),a=n(32621),s=n(91092),l=n(40349),c=n(99954),d=n(49613),p=n(68012),u=n(36424),m=n(2173),h=n(70143),v=n(77243),f=n(57490),g=n(52900),y=n(96832),x=n(637),S=n(63410),b=n(28047),w=n(72596);function I(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",9),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"youHavePremiumAccess")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"alreadyPremiumFromOrg"),"\n"))}function C(e,t){1&e&&(a.ɵɵelementStart(0,"a",10),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"purchasePremium"),"\n "))}function E(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"p"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementStart(6,"form",11,12),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",13),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",14),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelement(15,"input",15),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"small",16),a.ɵɵtext(18),a.ɵɵpipe(19,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"button",17),a.ɵɵtext(23,"\n "),a.ɵɵelement(24,"i",18),a.ɵɵpipe(25,"i18n"),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"span"),a.ɵɵtext(28),a.ɵɵpipe(29,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(32,"\n"),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵreference(7),t=a.ɵɵnextContext();a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,7,"uploadLicenseFilePremium")),a.ɵɵadvance(3),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,9,"licenseFile")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind2(19,11,"licenseFileDesc","bitwarden_premium_license.json")),a.ɵɵadvance(4),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(25,14,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(29,16,"submit"))}}function P(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"form",11,12),a.ɵɵlistener("ngSubmit",(function(){a.ɵɵrestoreView(e);return a.ɵɵnextContext().submit()})),a.ɵɵtext(2,"\n "),a.ɵɵelementStart(3,"h2",19),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",20),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"div",21),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"label",22),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"input",23),a.ɵɵlistener("ngModelChange",(function(t){a.ɵɵrestoreView(e);return a.ɵɵnextContext().additionalStorage=t})),a.ɵɵpipe(16,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"small",24),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵpipe(21,"currency"),a.ɵɵpipe(22,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"h2",25),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵpipe(31,"currency"),a.ɵɵelement(32,"br"),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵpipe(35,"currency"),a.ɵɵpipe(36,"currency"),a.ɵɵelement(37,"hr",26),a.ɵɵtext(38,"\n "),a.ɵɵelementStart(39,"h2",27),a.ɵɵtext(40),a.ɵɵpipe(41,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelement(43,"app-payment",28),a.ɵɵtext(44,"\n "),a.ɵɵelement(45,"app-tax-info"),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"div",29),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"div",30),a.ɵɵtext(50),a.ɵɵpipe(51,"i18n"),a.ɵɵpipe(52,"currency"),a.ɵɵelement(53,"br"),a.ɵɵtext(54,"\n "),a.ɵɵelementContainerStart(55),a.ɵɵtext(56),a.ɵɵpipe(57,"i18n"),a.ɵɵpipe(58,"currency"),a.ɵɵelementContainerEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(60,"\n "),a.ɵɵelement(61,"hr",31),a.ɵɵtext(62,"\n "),a.ɵɵelementStart(63,"p",32),a.ɵɵtext(64,"\n "),a.ɵɵelementStart(65,"strong"),a.ɵɵtext(66),a.ɵɵpipe(67,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(68),a.ɵɵpipe(69,"currency"),a.ɵɵpipe(70,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(71,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(72,"\n "),a.ɵɵelementStart(73,"small",33),a.ɵɵtext(74),a.ɵɵpipe(75,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(76,"\n "),a.ɵɵelementStart(77,"button",17),a.ɵɵtext(78,"\n "),a.ɵɵelement(79,"i",18),a.ɵɵpipe(80,"i18n"),a.ɵɵtext(81,"\n "),a.ɵɵelementStart(82,"span"),a.ɵɵtext(83),a.ɵɵpipe(84,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(85,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(86,"\n"),a.ɵɵelementEnd()}if(2&e){const e=a.ɵɵreference(1),t=a.ɵɵnextContext();a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(5,26,"addons")),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,28,"additionalStorageGb")),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("placeholder",a.ɵɵpipeBind1(16,30,"additionalStorageGbDesc")),a.ɵɵproperty("ngModel",t.additionalStorage),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind4(20,32,"additionalStorageIntervalDesc","1 GB",a.ɵɵpipeBind2(21,37,t.storageGbPrice,"$"),a.ɵɵpipeBind1(22,40,"year"))),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(28,42,"summary")),a.ɵɵadvance(2),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(30,44,"premiumMembership"),": ",a.ɵɵpipeBind2(31,46,t.premiumPrice,"$")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate4("\n ",a.ɵɵpipeBind1(34,49,"additionalStorageGb"),": ",t.additionalStorage||0," GB ×\n ",a.ɵɵpipeBind2(35,51,t.storageGbPrice,"$")," =\n ",a.ɵɵpipeBind2(36,54,t.additionalStorageTotal,"$"),"\n "),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(41,57,"paymentInformation")),a.ɵɵadvance(3),a.ɵɵproperty("hideBank",!0),a.ɵɵadvance(7),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(51,59,"planPrice"),": ",a.ɵɵpipeBind2(52,61,t.subtotal,"USD $"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate2("\n ",a.ɵɵpipeBind1(57,64,"estimatedTax"),": ",a.ɵɵpipeBind2(58,66,t.taxCharges,"USD $"),"\n "),a.ɵɵadvance(10),a.ɵɵtextInterpolate1("",a.ɵɵpipeBind1(67,69,"total"),":"),a.ɵɵadvance(2),a.ɵɵtextInterpolate2(" ",a.ɵɵpipeBind2(69,71,t.total,"USD $"),"/",a.ɵɵpipeBind1(70,74,"year"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(75,76,"paymentChargedAnnually")),a.ɵɵadvance(3),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(80,78,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(84,80,"submit"))}}const k=function(e){return{"mb-0":e}};class A{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.tokenService=i,this.router=r,this.messagingService=o,this.syncService=a,this.logService=s,this.stateService=l,this.canAccessPremium=!1,this.selfHosted=!1,this.premiumPrice=10,this.storageGbPrice=4,this.additionalStorage=0,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();(yield this.tokenService.getPremium())&&this.router.navigate(["/settings/subscription"])}))}submit(){return i(this,void 0,void 0,(function*(){let e=null;if(this.selfHosted){if(e=document.getElementById("file").files,null==e||0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}try{if(this.selfHosted){if(!this.tokenService.getEmailVerified())return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verifyEmailFirst"));const t=new FormData;t.append("license",e[0]),this.formPromise=this.apiService.postAccountLicense(t).then((()=>this.finalizePremium()))}else this.formPromise=this.paymentComponent.createPaymentToken().then((e=>{const t=new FormData;return t.append("paymentMethodType",e[1].toString()),null!=e[0]&&t.append("paymentToken",e[0]),t.append("additionalStorageGb",(this.additionalStorage||0).toString()),t.append("country",this.taxInfoComponent.taxInfo.country),t.append("postalCode",this.taxInfoComponent.taxInfo.postalCode),this.apiService.postPremium(t)})).then((e=>e.success||null==e.paymentIntentClientSecret?this.finalizePremium():this.paymentComponent.handleStripeCardPayment(e.paymentIntentClientSecret,(()=>this.finalizePremium()))));yield this.formPromise}catch(t){this.logService.error(t)}}))}finalizePremium(){return i(this,void 0,void 0,(function*(){yield this.apiService.refreshIdentityToken(),yield this.syncService.fullSync(!0),this.platformUtilsService.showToast("success",null,this.i18nService.t("premiumUpdated")),this.messagingService.send("purchasedPremium"),this.router.navigate(["/settings/subscription"])}))}get additionalStorageTotal(){return this.storageGbPrice*Math.abs(this.additionalStorage||0)}get subtotal(){return this.premiumPrice+this.additionalStorageTotal}get taxCharges(){return null!=this.taxInfoComponent&&null!=this.taxInfoComponent.taxRate?this.taxInfoComponent.taxRate/100*this.subtotal:0}get total(){return this.subtotal+this.taxCharges||0}}t.PremiumComponent=A,A.ɵfac=function(e){return new(e||A)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(d.TokenService),a.ɵɵdirectiveInject(p.Router),a.ɵɵdirectiveInject(u.MessagingService),a.ɵɵdirectiveInject(m.SyncService),a.ɵɵdirectiveInject(h.LogService),a.ɵɵdirectiveInject(v.StateService))},A.ɵcmp=a.ɵɵdefineComponent({type:A,selectors:[["app-premium"]],viewQuery:function(e,t){if(1&e&&(a.ɵɵviewQuery(r.PaymentComponent,5),a.ɵɵviewQuery(o.TaxInfoComponent,5)),2&e){let e;a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.paymentComponent=e.first),a.ɵɵqueryRefresh(e=a.ɵɵloadQuery())&&(t.taxInfoComponent=e.first)}},decls:72,vars:41,consts:[[1,"page-header"],["type","info","icon","bwi bwi-star-f",3,"title",4,"ngIf"],["type","success"],[1,"bwi-ul"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-li"],[1,"text-lg",3,"ngClass"],["href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener","class","btn btn-outline-secondary",4,"ngIf"],[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["type","info","icon","bwi bwi-star-f",3,"title"],["href","https://vault.bitwarden.com/#/settings/premium","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"mt-5"],[1,"row"],[1,"form-group","col-6"],["for","additionalStorage"],["id","additionalStorage","type","number","name","AdditionalStorageGb","min","0","max","99","step","1",1,"form-control",3,"ngModel","placeholder","ngModelChange"],[1,"text-muted","form-text"],[1,"spaced-header"],[1,"my-3"],[1,"spaced-header","mb-4"],[3,"hideBank"],["id","price",1,"my-4"],[1,"text-muted","text-sm"],[1,"my-1","col-3","ml-0"],[1,"text-lg"],[1,"text-muted","font-italic"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵtemplate(7,I,4,6,"app-callout",1),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"app-callout",2),a.ɵɵtext(10,"\n "),a.ɵɵelementStart(11,"p"),a.ɵɵtext(12),a.ɵɵpipe(13,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementStart(15,"ul",3),a.ɵɵtext(16,"\n "),a.ɵɵelementStart(17,"li"),a.ɵɵtext(18,"\n "),a.ɵɵelement(19,"i",4),a.ɵɵtext(20),a.ɵɵpipe(21,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementStart(23,"li"),a.ɵɵtext(24,"\n "),a.ɵɵelement(25,"i",4),a.ɵɵtext(26),a.ɵɵpipe(27,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementStart(29,"li"),a.ɵɵtext(30,"\n "),a.ɵɵelement(31,"i",4),a.ɵɵtext(32),a.ɵɵpipe(33,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(34,"\n "),a.ɵɵelementStart(35,"li"),a.ɵɵtext(36,"\n "),a.ɵɵelement(37,"i",4),a.ɵɵtext(38),a.ɵɵpipe(39,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementStart(41,"li"),a.ɵɵtext(42,"\n "),a.ɵɵelement(43,"i",4),a.ɵɵtext(44),a.ɵɵpipe(45,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementStart(47,"li"),a.ɵɵtext(48,"\n "),a.ɵɵelement(49,"i",4),a.ɵɵtext(50),a.ɵɵpipe(51,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(52,"\n "),a.ɵɵelementStart(53,"li"),a.ɵɵtext(54,"\n "),a.ɵɵelement(55,"i",4),a.ɵɵtext(56),a.ɵɵpipe(57,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(58,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(59,"\n "),a.ɵɵelementStart(60,"p",5),a.ɵɵtext(61),a.ɵɵpipe(62,"i18n"),a.ɵɵpipe(63,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(64,"\n "),a.ɵɵtemplate(65,C,3,3,"a",6),a.ɵɵtext(66,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n"),a.ɵɵtemplate(68,E,33,18,"ng-container",7),a.ɵɵtext(69,"\n"),a.ɵɵtemplate(70,P,87,82,"form",8),a.ɵɵtext(71,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,15,"goPremium")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.canAccessPremium),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(13,17,"premiumUpgradeUnlockFeatures")),a.ɵɵadvance(8),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(21,19,"premiumSignUpStorage"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(27,21,"premiumSignUpTwoStep"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(33,23,"premiumSignUpEmergency"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(39,25,"premiumSignUpReports"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(45,27,"premiumSignUpTotp"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(51,29,"premiumSignUpSupport"),"\n "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(57,31,"premiumSignUpFuture"),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(39,k,!t.selfHosted)),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(62,33,"premiumPrice",a.ɵɵpipeBind2(63,36,t.premiumPrice,"$")),"\n "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.selfHosted),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",t.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!t.selfHosted))},directives:[f.NgIf,g.CalloutComponent,f.NgClass,y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,y.MinValidator,y.MaxValidator,y.NumberValueAccessor,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,S.PaymentComponent,b.TaxInfoComponent],pipes:[w.I18nPipe,f.CurrencyPipe],encapsulation:2})},96189:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileComponent=void 0;n(91092),n(82058),n(40349),n(34445),n(70143),n(99954),n(77243);const r=n(48816),o=n(32621),a=n(91092),s=n(40349),l=n(99954),c=n(82058),d=n(70143),p=n(34445),u=n(77243),m=n(57490),h=n(96832),v=n(637),f=n(69242),g=n(50553),y=n(72596),x=n(68625);function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",8),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",18),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"input",19),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).profile.masterPasswordHint=t})),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,2,"masterPassHintLabel")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.profile.masterPasswordHint)}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"p"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementStart(3,"a",20),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",21),o.ɵɵelementEnd(),o.ɵɵelement(7,"br"),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"code"),o.ɵɵtext(10),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,3,"yourAccountsFingerprint"),":\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,5,"learnMore")),o.ɵɵadvance(7),o.ɵɵtextInterpolate(e.fingerprint)}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",4,5),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",6),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",7),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",8),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"label",9),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"input",10),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().profile.name=t})),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",8),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"label",11),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"input",12),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext().profile.email=t})),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,b,8,4,"div",13),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementStart(28,"div",7),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",14),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"app-avatar",15),o.ɵɵpipe(33,"userName"),o.ɵɵtext(34,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelement(37,"hr"),o.ɵɵtext(38,"\n "),o.ɵɵtemplate(39,w,12,7,"p",0),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"button",16),o.ɵɵtext(44,"\n "),o.ɵɵelement(45,"i",17),o.ɵɵpipe(46,"i18n"),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"span"),o.ɵɵtext(49),o.ɵɵpipe(50,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(52,"\n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext();o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(11,12,"name")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.profile.name),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,14,"email")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.profile.email),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.hidePasswordHint),o.ɵɵadvance(7),o.ɵɵpropertyInterpolate("data",o.ɵɵpipeBind1(33,16,t.profile)),o.ɵɵproperty("email",t.profile.email),o.ɵɵadvance(7),o.ɵɵproperty("ngIf",t.fingerprint),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(46,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(50,20,"save"))}}class C{constructor(e,t,n,i,r,o,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.logService=r,this.keyConnectorService=o,this.stateService=a,this.loading=!0,this.hidePasswordHint=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.profile=yield this.apiService.getProfile(),this.loading=!1;const e=yield this.cryptoService.getFingerprint(yield this.stateService.getUserId());null!=e&&(this.fingerprint=e.join("-")),this.hidePasswordHint=yield this.keyConnectorService.getUsesKeyConnector()}))}submit(){return i(this,void 0,void 0,(function*(){try{const e=new r.UpdateProfileRequest(this.profile.name,this.profile.masterPasswordHint);this.formPromise=this.apiService.putProfile(e),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("accountUpdated"))}catch(e){this.logService.error(e)}}))}}t.ProfileComponent=C,C.ɵfac=function(e){return new(e||C)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.CryptoService),o.ɵɵdirectiveInject(d.LogService),o.ɵɵdirectiveInject(p.KeyConnectorService),o.ɵɵdirectiveInject(u.StateService))},C.ɵcmp=o.ɵɵdefineComponent({type:C,selectors:[["app-profile"]],decls:4,vars:2,consts:[[4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","ngModelChange"],["for","email"],["id","email","type","text","name","Email","readonly","",1,"form-control",3,"ngModel","ngModelChange"],["class","form-group",4,"ngIf"],[1,"mb-3"],["dynamic","true","size","75","fontSize","35",3,"data","email"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["for","masterPasswordHint"],["id","masterPasswordHint","type","text","name","MasterPasswordHint",1,"form-control",3,"ngModel","ngModelChange"],["href","https://bitwarden.com/help/fingerprint-phrase/","target","_blank","rel","noopener",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,S,9,6,"div",0),o.ɵɵtext(1,"\n"),o.ɵɵtemplate(2,I,53,22,"form",1),o.ɵɵtext(3,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.profile&&!t.loading))},directives:[m.NgIf,h.NgControlStatusGroup,h.NgForm,v.ApiActionDirective,h.DefaultValueAccessor,h.NgControlStatus,h.NgModel,f.AvatarComponent,g.A11yTitleDirective],pipes:[y.I18nPipe,x.UserNamePipe],encapsulation:2})},99422:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PurgeVaultComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954),n(61554);const r=n(32621),o=n(91092),a=n(40349),s=n(99954),l=n(61554),c=n(68012),d=n(70143),p=n(96832),u=n(637),m=n(50553),h=n(52900),v=n(38287),f=n(72596);class g{constructor(e,t,n,i,r,o){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.userVerificationService=i,this.router=r,this.logService=o,this.organizationId=null}submit(){return i(this,void 0,void 0,(function*(){try{this.formPromise=this.userVerificationService.buildRequest(this.masterPassword).then((e=>this.apiService.postPurgeCiphers(e,this.organizationId))),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("vaultPurged")),null!=this.organizationId?this.router.navigate(["organizations",this.organizationId,"vault"]):this.router.navigate(["vault"])}catch(e){this.logService.error(e)}}))}}t.PurgeVaultComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.UserVerificationService),r.ɵɵdirectiveInject(c.Router),r.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-purge-vault"]],inputs:{organizationId:"organizationId"},decls:55,vars:24,consts:[["role","dialog","aria-modal","true","aria-labelledby","purgeVaultTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","purgeVaultTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["type","warning"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",6),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"span",7),r.ɵɵtext(17,"×"),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementStart(21,"div",8),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"p"),r.ɵɵtext(24),r.ɵɵpipe(25,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"app-callout",9),r.ɵɵtext(28),r.ɵɵpipe(29,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-verify-master-password",10),r.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"button",12),r.ɵɵtext(38,"\n "),r.ɵɵelement(39,"i",13),r.ɵɵpipe(40,"i18n"),r.ɵɵtext(41,"\n "),r.ɵɵelementStart(42,"span"),r.ɵɵtext(43),r.ɵɵpipe(44,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementStart(47,"button",14),r.ɵɵtext(48),r.ɵɵpipe(49,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,10,"purgeVault")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(25,14,t.organizationId?"purgeOrgVaultDesc":"purgeVaultDesc")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(29,16,"purgeVaultWarning")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.masterPassword),r.ɵɵadvance(6),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(40,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(44,20,"purgeVault")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(49,22,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective,h.CalloutComponent,v.VerifyMasterPasswordComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[f.I18nPipe],encapsulation:2})},70328:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SettingsComponent=void 0;n(32621),n(67569),n(94308),n(99954),n(49613);const r=n(32621),o=n(49613),a=n(67569),s=n(99954),l=n(94308),c=n(68012),d=n(57490),p=n(72596);function u(e,t){1&e&&(r.ɵɵelementStart(0,"a",17),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"premiumMembership"),"\n "))}function m(e,t){1&e&&(r.ɵɵelementStart(0,"a",18),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"goPremium"),"\n "))}function h(e,t){1&e&&(r.ɵɵelementStart(0,"a",19),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"billing"),"\n "))}function v(e,t){1&e&&(r.ɵɵelementStart(0,"a",20),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"sponsoredFamilies"),"\n "))}const f="SettingsComponent";class g{constructor(e,t,n,i,r){this.tokenService=e,this.broadcasterService=t,this.ngZone=n,this.platformUtilsService=i,this.organizationService=r}ngOnInit(){return i(this,void 0,void 0,(function*(){this.broadcasterService.subscribe(f,(e=>i(this,void 0,void 0,(function*(){this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("purchasedPremium"===e.command)yield this.load()}))))})))),this.selfHosted=yield this.platformUtilsService.isSelfHost(),yield this.load()}))}ngOnDestroy(){this.broadcasterService.unsubscribe(f)}load(){return i(this,void 0,void 0,(function*(){this.premium=yield this.tokenService.getPremium(),this.hasFamilySponsorshipAvailable=yield this.organizationService.canManageSponsorships()}))}}t.SettingsComponent=g,g.ɵfac=function(e){return new(e||g)(r.ɵɵdirectiveInject(o.TokenService),r.ɵɵdirectiveInject(a.BroadcasterService),r.ɵɵdirectiveInject(r.NgZone),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.OrganizationService))},g.ɵcmp=r.ɵɵdefineComponent({type:g,selectors:[["app-settings"]],decls:56,vars:25,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","account","routerLinkActive","active",1,"list-group-item"],["routerLink","options","routerLinkActive","active",1,"list-group-item"],["routerLink","organizations","routerLinkActive","active",1,"list-group-item"],["routerLink","subscription","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","premium","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","billing","class","list-group-item","routerLinkActive","active",4,"ngIf"],["routerLink","two-factor","routerLinkActive","active",1,"list-group-item"],["routerLink","domain-rules","routerLinkActive","active",1,"list-group-item"],["routerLink","emergency-access","routerLinkActive","active",1,"list-group-item"],["routerLink","sponsored-families","class","list-group-item","routerLinkActive","active",4,"ngIf"],[1,"col-9"],["routerLink","subscription","routerLinkActive","active",1,"list-group-item"],["routerLink","premium","routerLinkActive","active",1,"list-group-item"],["routerLink","billing","routerLinkActive","active",1,"list-group-item"],["routerLink","sponsored-families","routerLinkActive","active",1,"list-group-item"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"a",8),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵtemplate(26,u,3,3,"a",9),r.ɵɵtext(27,"\n "),r.ɵɵtemplate(28,m,3,3,"a",10),r.ɵɵtext(29,"\n "),r.ɵɵtemplate(30,h,3,3,"a",11),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"a",12),r.ɵɵtext(33),r.ɵɵpipe(34,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementStart(36,"a",13),r.ɵɵtext(37),r.ɵɵpipe(38,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementStart(40,"a",14),r.ɵɵtext(41),r.ɵɵpipe(42,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(43,"\n "),r.ɵɵtemplate(44,v,3,3,"a",15),r.ɵɵtext(45,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"div",16),r.ɵɵtext(50,"\n "),r.ɵɵelement(51,"router-outlet"),r.ɵɵtext(52,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(55,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,11,"settings")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,13,"myAccount"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,15,"options"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,17,"organizations"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.premium),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.premium),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.selfHosted),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(34,19,"twoStepLogin"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(38,21,"domainRules"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(42,23,"emergencyAccess"),"\n "),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.hasFamilySponsorshipAvailable))},directives:[c.RouterLinkWithHref,c.RouterLinkActive,d.NgIf,c.RouterOutlet],pipes:[p.I18nPipe],encapsulation:2})},6308:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SponsoredFamiliesComponent=void 0;n(91092),n(40349),n(94308),n(99954),n(2173);const r=n(29557),o=n(32621),a=n(91092),s=n(40349),l=n(99954),c=n(2173),d=n(94308),p=n(57490),u=n(96832),m=n(637),h=n(67894),v=n(72596);function f(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",2),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n"),o.ɵɵelementContainerEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}function g(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",18),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function y(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",9),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",14),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"select",15),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).selectedSponsorshipOrgId=t})),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"option",16),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,g,2,2,"option",17),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext(3);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,4,"familiesSponsoringOrgSelect")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",e.selectedSponsorshipOrgId),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("-- ",o.ɵɵpipeBind1(10,6,"select")," --"),o.ɵɵadvance(3),o.ɵɵproperty("ngForOf",e.availableSponsorshipOrgs)}}function x(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"form",6,7),o.ɵɵlistener("ngSubmit",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).submit()})),o.ɵɵtext(2,"\n "),o.ɵɵtemplate(3,y,15,8,"div",8),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"div",9),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"label",10),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"input",11),o.ɵɵlistener("ngModelChange",(function(t){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).sponsorshipEmail=t})),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",12),o.ɵɵtext(14,"\n "),o.ɵɵelement(15,"i",13),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span"),o.ɵɵtext(19),o.ɵɵpipe(20,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(23,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(1),t=o.ɵɵnextContext(2);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.moreThanOneOrgAvailable),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(9,7,"sponsoredFamiliesEmail"),":"),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.sponsorshipEmail),o.ɵɵadvance(2),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(16,9,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(20,11,"redeem"))}}function S(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tr",22),o.ɵɵlistener("sponsorshipRemoved",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(3).load(!0)})),o.ɵɵelementEnd(),o.ɵɵtext(3,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=t.$implicit;o.ɵɵadvance(2),o.ɵɵproperty("sponsoringOrg",e)}}function b(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",19),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"table",20),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"thead"),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"tr"),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"th"),o.ɵɵtext(11),o.ɵɵpipe(12,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"th"),o.ɵɵtext(15),o.ɵɵpipe(16,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"th"),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementStart(22,"tbody"),o.ɵɵtext(23,"\n "),o.ɵɵtemplate(24,S,4,1,"ng-container",21),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"small"),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext(2);o.ɵɵadvance(11),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(12,4,"recipient")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(16,6,"sponsoringOrg")),o.ɵɵadvance(9),o.ɵɵproperty("ngForOf",e.activeSponsorshipOrgs),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,8,"sponsoredFamiliesLeaveCopy"))}}function w(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"p"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div"),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementStart(9,"ul",4),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"li"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"li"),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵtemplate(21,x,24,13,"form",5),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,b,33,10,"ng-container",1),o.ɵɵtext(24,"\n"),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,6,"sponsoredFamiliesEligible"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,8,"sponsoredFamiliesInclude"),":\n "),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,10,"sponsoredFamiliesPremiumAccess")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,12,"sponsoredFamiliesSharedCollections")),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",e.anyOrgsAvailable),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.anyActiveSponsorships)}}class I{constructor(e,t,n,i,r){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.syncService=i,this.organizationService=r,this.loading=!1,this.availableSponsorshipOrgs=[],this.activeSponsorshipOrgs=[],this.selectedSponsorshipOrgId="",this.sponsorshipEmail=""}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load()}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.postCreateSponsorship(this.selectedSponsorshipOrgId,{sponsoredEmail:this.sponsorshipEmail,planSponsorshipType:r.PlanSponsorshipType.FamiliesForEnterprise,friendlyName:this.sponsorshipEmail}),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("sponsorshipCreated")),this.formPromise=null,this.resetForm(),yield this.load(!0)}))}load(e=!1){return i(this,void 0,void 0,(function*(){if(this.loading)return;this.loading=!0,e&&(yield this.syncService.fullSync(!0));const t=yield this.organizationService.getAll();this.availableSponsorshipOrgs=t.filter((e=>e.familySponsorshipAvailable)),this.activeSponsorshipOrgs=t.filter((e=>null!==e.familySponsorshipFriendlyName)),1===this.availableSponsorshipOrgs.length&&(this.selectedSponsorshipOrgId=this.availableSponsorshipOrgs[0].id),this.loading=!1}))}resetForm(){return i(this,void 0,void 0,(function*(){this.sponsorshipEmail="",this.selectedSponsorshipOrgId=""}))}get anyActiveSponsorships(){return this.activeSponsorshipOrgs.length>0}get anyOrgsAvailable(){return this.availableSponsorshipOrgs.length>0}get moreThanOneOrgAvailable(){return this.availableSponsorshipOrgs.length>1}}t.SponsoredFamiliesComponent=I,I.ɵfac=function(e){return new(e||I)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.SyncService),o.ɵɵdirectiveInject(d.OrganizationService))},I.ɵcmp=o.ɵɵdefineComponent({type:I,selectors:[["app-sponsored-families"]],decls:11,vars:5,consts:[[1,"page-header"],[4,"ngIf"],[1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"inset-list"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],["class","form-group col-7",4,"ngIf"],[1,"form-group","col-7"],["for","accountEmail"],["id","accountEmail","inputmode","email","name","sponsorshipEmail","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit","mt-4",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["for","availableSponsorshipOrg"],["id","availableSponsorshipOrg","name","Available Sponsorship Organization","required","",1,"form-control",3,"ngModel","ngModelChange"],["value",""],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],[1,"border-bottom"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],["sponsoring-org-row","",3,"sponsoringOrg","sponsorshipRemoved"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h1"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n"),o.ɵɵtemplate(7,f,9,6,"ng-container",1),o.ɵɵtext(8,"\n"),o.ɵɵtemplate(9,w,25,14,"ng-container",1),o.ɵɵtext(10,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"sponsoredFamilies")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.loading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.loading))},directives:[p.NgIf,u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,u.DefaultValueAccessor,u.RequiredValidator,u.NgControlStatus,u.NgModel,u.SelectControlValueAccessor,u.NgSelectOption,u.ɵNgSelectMultipleOption,p.NgForOf,h.SponsoringOrgRowComponent],pipes:[v.I18nPipe],encapsulation:2})},67894:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.SponsoringOrgRowComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(30608),n(32621)),a=n(91092),s=n(40349),l=n(70143),c=n(99954),d=n(50553),p=n(637),u=n(72596);class m{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.logService=n,this.platformUtilsService=i,this.sponsoringOrg=null,this.sponsorshipRemoved=new r.EventEmitter}revokeSponsorship(){return i(this,void 0,void 0,(function*(){try{this.revokeSponsorshipPromise=this.doRevokeSponsorship(),yield this.revokeSponsorshipPromise}catch(e){this.logService.error(e)}this.revokeSponsorshipPromise=null}))}resendEmail(){return i(this,void 0,void 0,(function*(){this.resendEmailPromise=this.apiService.postResendSponsorshipOffer(this.sponsoringOrg.id),yield this.resendEmailPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("emailSent")),this.resendEmailPromise=null}))}doRevokeSponsorship(){return i(this,void 0,void 0,(function*(){(yield this.platformUtilsService.showDialog(this.i18nService.t("revokeSponsorshipConfirmation"),`${this.i18nService.t("remove")} ${this.sponsoringOrg.familySponsorshipFriendlyName}?`,this.i18nService.t("remove"),this.i18nService.t("cancel"),"warning"))&&(yield this.apiService.deleteRevokeSponsorship(this.sponsoringOrg.id),this.platformUtilsService.showToast("success",null,this.i18nService.t("reclaimedFreePlan")),this.sponsorshipRemoved.emit())}))}}t.SponsoringOrgRowComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.LogService),o.ɵɵdirectiveInject(c.PlatformUtilsService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["","sponsoring-org-row",""]],inputs:{sponsoringOrg:"sponsoringOrg"},outputs:{sponsorshipRemoved:"sponsorshipRemoved"},attrs:["sponsoring-org-row",""],decls:45,vars:29,consts:[[1,"table-action-right"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],[1,"dropdown-item","btn-submit",3,"appApiAction","disabled","click"],["resendEmailBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"dropdown-item","text-danger","btn-submit",3,"appApiAction","disabled","click"],["revokeSponsorshipBtn",""]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"td"),o.ɵɵtext(1),o.ɵɵelementEnd(),o.ɵɵtext(2,"\n"),o.ɵɵelementStart(3,"td"),o.ɵɵtext(4),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n"),o.ɵɵelementStart(6,"td",0),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",1),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"button",2),o.ɵɵpipe(11,"i18n"),o.ɵɵtext(12,"\n "),o.ɵɵelement(13,"i",3),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"div",4),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"button",5,6),o.ɵɵlistener("click",(function(){return t.resendEmail()})),o.ɵɵpipe(20,"i18n"),o.ɵɵtext(21,"\n "),o.ɵɵelement(22,"i",7),o.ɵɵpipe(23,"i18n"),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"span"),o.ɵɵtext(26),o.ɵɵpipe(27,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"button",8,9),o.ɵɵlistener("click",(function(){return t.revokeSponsorship()})),o.ɵɵpipe(32,"i18n"),o.ɵɵtext(33,"\n "),o.ɵɵelement(34,"i",7),o.ɵɵpipe(35,"i18n"),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"span"),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n")),2&e){const e=o.ɵɵreference(19),n=o.ɵɵreference(31);o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",t.sponsoringOrg.familySponsorshipFriendlyName,"\n"),o.ɵɵadvance(3),o.ɵɵtextInterpolate(t.sponsoringOrg.name),o.ɵɵadvance(6),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(11,13,"options")),o.ɵɵadvance(8),o.ɵɵproperty("appApiAction",t.resendEmailPromise)("disabled",e.loading),o.ɵɵattribute("aria-label",o.ɵɵpipeBind2(20,15,"resendEmailLabel",t.sponsoringOrg.familySponsorshipFriendlyName)),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(23,18,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(27,20,"resendEmail")),o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.revokeSponsorshipPromise)("disabled",n.loading),o.ɵɵattribute("aria-label",o.ɵɵpipeBind2(32,22,"revokeAccount",t.sponsoringOrg.familySponsorshipFriendlyName)),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(35,25,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(39,27,"remove"))}},directives:[d.A11yTitleDirective,p.ApiActionDirective],pipes:[u.I18nPipe],encapsulation:2})},28047:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TaxInfoComponent=void 0;const r=n(32621),o=(n(68012),n(91092),n(70143),n(88166)),a=n(15311),s=n(32621),l=n(91092),c=n(68012),d=n(70143),p=n(96832),u=n(57490),m=n(72596);function h(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",1),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",261),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"input",262),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.includeTaxId=t})),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",263),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(4),s.ɵɵproperty("ngModel",e.taxInfo.includeTaxId),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,2,"includeVAT"))}}function v(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",264),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",265),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.taxId=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,2,"taxIdNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.taxId)}}function f(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",266),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",267),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.line1=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"div",1),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"div",2),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"label",268),s.ɵɵtext(19),s.ɵɵpipe(20,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"input",269),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.line2=t})),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",1),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",2),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",270),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",271),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.city=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",1),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"div",2),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"label",272),s.ɵɵtext(43),s.ɵɵpipe(44,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"input",273),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().taxInfo.state=t})),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,8,"address1")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.line1),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(20,10,"address2")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.line2),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,12,"cityTown")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.city),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(44,14,"stateProvince")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.taxInfo.state)}}class g{constructor(e,t,n){this.apiService=e,this.route=t,this.logService=n,this.onCountryChanged=new r.EventEmitter,this.loading=!0,this.taxInfo={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1},this.pristine={taxId:null,line1:null,line2:null,city:null,state:null,postalCode:null,country:"US",includeTaxId:!1}}ngOnInit(){return i(this,void 0,void 0,(function*(){this.route.parent.parent.params.subscribe((e=>i(this,void 0,void 0,(function*(){if(this.organizationId=e.organizationId,this.organizationId)try{const e=yield this.apiService.getOrganizationTaxInfo(this.organizationId);e&&(this.taxInfo.taxId=e.taxId,this.taxInfo.state=e.state,this.taxInfo.line1=e.line1,this.taxInfo.line2=e.line2,this.taxInfo.city=e.city,this.taxInfo.state=e.state,this.taxInfo.postalCode=e.postalCode,this.taxInfo.country=e.country||"US",this.taxInfo.includeTaxId=!("US"===this.taxInfo.country||!e.taxId&&!e.line1&&!e.line2&&!e.city&&!e.state))}catch(t){this.logService.error(t)}else{const e=yield this.apiService.getTaxInfo();e&&(this.taxInfo.postalCode=e.postalCode,this.taxInfo.country=e.country||"US")}this.pristine=Object.assign({},this.taxInfo),"US"!==this.taxInfo.country&&this.onCountryChanged.emit()}))));const e=yield this.apiService.getTaxRates();this.taxRates=e.data,this.loading=!1}))}get taxRate(){var e;if(null!=this.taxRates){const t=this.taxRates.find((e=>e.country===this.taxInfo.country&&e.postalCode===this.taxInfo.postalCode));return null!==(e=null==t?void 0:t.rate)&&void 0!==e?e:null}}getTaxInfoRequest(){if(this.organizationId){const e=new o.OrganizationTaxInfoUpdateRequest;return e.taxId=this.taxInfo.taxId,e.state=this.taxInfo.state,e.line1=this.taxInfo.line1,e.line2=this.taxInfo.line2,e.city=this.taxInfo.city,e.state=this.taxInfo.state,e.postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e}{const e=new a.TaxInfoUpdateRequest;return e.postalCode=this.taxInfo.postalCode,e.country=this.taxInfo.country,e}}submitTaxInfo(){if(!this.hasChanged())return new Promise((e=>{e()}));const e=this.getTaxInfoRequest();return this.organizationId?this.apiService.putOrganizationTaxInfo(this.organizationId,e):this.apiService.putTaxInfo(e)}changeCountry(){"US"===this.taxInfo.country&&(this.taxInfo.includeTaxId=!1,this.taxInfo.taxId=null,this.taxInfo.line1=null,this.taxInfo.line2=null,this.taxInfo.city=null,this.taxInfo.state=null),this.onCountryChanged.emit()}hasChanged(){for(const e in this.taxInfo)if(this.pristine.hasOwnProperty(e)&&this.pristine[e]!==this.taxInfo[e])return!0;return!1}}t.TaxInfoComponent=g,g.ɵfac=function(e){return new(e||g)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.ActivatedRoute),s.ɵɵdirectiveInject(d.LogService))},g.ɵcmp=s.ɵɵdefineComponent({type:g,selectors:[["app-tax-info"]],outputs:{onCountryChanged:"onCountryChanged"},decls:786,vars:12,consts:[[1,"row"],[1,"col-6"],[1,"form-group"],["for","addressCountry"],["id","addressCountry","required","","name","addressCountry","autocomplete","country",1,"form-control",3,"ngModel","ngModelChange","change"],["value",""],["value","US"],["value","CN"],["value","FR"],["value","DE"],["value","CA"],["value","GB"],["value","AU"],["value","IN"],["value","-","disabled",""],["value","AF"],["value","AX"],["value","AL"],["value","DZ"],["value","AS"],["value","AD"],["value","AO"],["value","AI"],["value","AQ"],["value","AG"],["value","AR"],["value","AM"],["value","AW"],["value","AT"],["value","AZ"],["value","BS"],["value","BH"],["value","BD"],["value","BB"],["value","BY"],["value","BE"],["value","BZ"],["value","BJ"],["value","BM"],["value","BT"],["value","BO"],["value","BQ"],["value","BA"],["value","BW"],["value","BV"],["value","BR"],["value","IO"],["value","BN"],["value","BG"],["value","BF"],["value","BI"],["value","KH"],["value","CM"],["value","CV"],["value","KY"],["value","CF"],["value","TD"],["value","CL"],["value","CX"],["value","CC"],["value","CO"],["value","KM"],["value","CG"],["value","CD"],["value","CK"],["value","CR"],["value","CI"],["value","HR"],["value","CU"],["value","CW"],["value","CY"],["value","CZ"],["value","DK"],["value","DJ"],["value","DM"],["value","DO"],["value","EC"],["value","EG"],["value","SV"],["value","GQ"],["value","ER"],["value","EE"],["value","ET"],["value","FK"],["value","FO"],["value","FJ"],["value","FI"],["value","GF"],["value","PF"],["value","TF"],["value","GA"],["value","GM"],["value","GE"],["value","GH"],["value","GI"],["value","GR"],["value","GL"],["value","GD"],["value","GP"],["value","GU"],["value","GT"],["value","GG"],["value","GN"],["value","GW"],["value","GY"],["value","HT"],["value","HM"],["value","VA"],["value","HN"],["value","HK"],["value","HU"],["value","IS"],["value","ID"],["value","IR"],["value","IQ"],["value","IE"],["value","IM"],["value","IL"],["value","IT"],["value","JM"],["value","JP"],["value","JE"],["value","JO"],["value","KZ"],["value","KE"],["value","KI"],["value","KP"],["value","KR"],["value","KW"],["value","KG"],["value","LA"],["value","LV"],["value","LB"],["value","LS"],["value","LR"],["value","LY"],["value","LI"],["value","LT"],["value","LU"],["value","MO"],["value","MK"],["value","MG"],["value","MW"],["value","MY"],["value","MV"],["value","ML"],["value","MT"],["value","MH"],["value","MQ"],["value","MR"],["value","MU"],["value","YT"],["value","MX"],["value","FM"],["value","MD"],["value","MC"],["value","MN"],["value","ME"],["value","MS"],["value","MA"],["value","MZ"],["value","MM"],["value","NA"],["value","NR"],["value","NP"],["value","NL"],["value","NC"],["value","NZ"],["value","NI"],["value","NE"],["value","NG"],["value","NU"],["value","NF"],["value","MP"],["value","NO"],["value","OM"],["value","PK"],["value","PW"],["value","PS"],["value","PA"],["value","PG"],["value","PY"],["value","PE"],["value","PH"],["value","PN"],["value","PL"],["value","PT"],["value","PR"],["value","QA"],["value","RE"],["value","RO"],["value","RU"],["value","RW"],["value","BL"],["value","SH"],["value","KN"],["value","LC"],["value","MF"],["value","PM"],["value","VC"],["value","WS"],["value","SM"],["value","ST"],["value","SA"],["value","SN"],["value","RS"],["value","SC"],["value","SL"],["value","SG"],["value","SX"],["value","SK"],["value","SI"],["value","SB"],["value","SO"],["value","ZA"],["value","GS"],["value","SS"],["value","ES"],["value","LK"],["value","SD"],["value","SR"],["value","SJ"],["value","SZ"],["value","SE"],["value","CH"],["value","SY"],["value","TW"],["value","TJ"],["value","TZ"],["value","TH"],["value","TL"],["value","TG"],["value","TK"],["value","TO"],["value","TT"],["value","TN"],["value","TR"],["value","TM"],["value","TC"],["value","TV"],["value","UG"],["value","UA"],["value","AE"],["value","UM"],["value","UY"],["value","UZ"],["value","VU"],["value","VE"],["value","VN"],["value","VG"],["value","VI"],["value","WF"],["value","EH"],["value","YE"],["value","ZM"],["value","ZW"],[1,"col-3"],["for","addressPostalCode"],["id","addressPostalCode","type","text","name","addressPostalCode","autocomplete","postal-code",1,"form-control",3,"ngModel","required","ngModelChange"],["class","col-6",4,"ngIf"],["class","row",4,"ngIf"],[1,"form-group","form-check"],["id","addressIncludeTaxId","name","addressIncludeTaxId","type","checkbox",1,"form-check-input",3,"ngModel","ngModelChange"],["for","addressIncludeTaxId",1,"form-check-label"],["for","taxId"],["id","taxId","type","text","name","taxId",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine1"],["id","addressLine1","type","text","name","addressLine1","autocomplete","address-line1",1,"form-control",3,"ngModel","ngModelChange"],["for","addressLine2"],["id","addressLine2","type","text","name","addressLine2","autocomplete","address-line2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressCity"],["id","addressCity","type","text","name","addressCity","autocomplete","address-level2",1,"form-control",3,"ngModel","ngModelChange"],["for","addressState"],["id","addressState","type","text","name","addressState","autocomplete","address-level1",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){if(1&e){s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",3),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"select",4),s.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.country=e}))("change",(function(){return t.changeCountry()})),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"option",5),s.ɵɵtext(13,"-- Select --"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"option",6),s.ɵɵtext(16,"United States"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"option",7),s.ɵɵtext(19,"China"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"option",8),s.ɵɵtext(22,"France"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"option",9),s.ɵɵtext(25,"Germany"),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"option",10),s.ɵɵtext(28,"Canada"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"option",11),s.ɵɵtext(31,"United Kingdom"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"option",12),s.ɵɵtext(34,"Australia"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"option",13),s.ɵɵtext(37,"India"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelement(39,"option",14),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"option",15),s.ɵɵtext(42,"Afghanistan"),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"option",16),s.ɵɵtext(45,"Åland Islands"),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"option",17),s.ɵɵtext(48,"Albania"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"option",18),s.ɵɵtext(51,"Algeria"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"option",19),s.ɵɵtext(54,"American Samoa"),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementStart(56,"option",20),s.ɵɵtext(57,"Andorra"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"option",21),s.ɵɵtext(60,"Angola"),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"option",22),s.ɵɵtext(63,"Anguilla"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"option",23),s.ɵɵtext(66,"Antarctica"),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"option",24),s.ɵɵtext(69,"Antigua and Barbuda"),s.ɵɵelementEnd(),s.ɵɵtext(70,"\n "),s.ɵɵelementStart(71,"option",25),s.ɵɵtext(72,"Argentina"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementStart(74,"option",26),s.ɵɵtext(75,"Armenia"),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementStart(77,"option",27),s.ɵɵtext(78,"Aruba"),s.ɵɵelementEnd(),s.ɵɵtext(79,"\n "),s.ɵɵelementStart(80,"option",28),s.ɵɵtext(81,"Austria"),s.ɵɵelementEnd(),s.ɵɵtext(82,"\n "),s.ɵɵelementStart(83,"option",29),s.ɵɵtext(84,"Azerbaijan"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"option",30),s.ɵɵtext(87,"Bahamas"),s.ɵɵelementEnd(),s.ɵɵtext(88,"\n "),s.ɵɵelementStart(89,"option",31),s.ɵɵtext(90,"Bahrain"),s.ɵɵelementEnd(),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"option",32),s.ɵɵtext(93,"Bangladesh"),s.ɵɵelementEnd(),s.ɵɵtext(94,"\n "),s.ɵɵelementStart(95,"option",33),s.ɵɵtext(96,"Barbados"),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"option",34),s.ɵɵtext(99,"Belarus"),s.ɵɵelementEnd(),s.ɵɵtext(100,"\n "),s.ɵɵelementStart(101,"option",35),s.ɵɵtext(102,"Belgium"),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n "),s.ɵɵelementStart(104,"option",36),s.ɵɵtext(105,"Belize"),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementStart(107,"option",37),s.ɵɵtext(108,"Benin"),s.ɵɵelementEnd(),s.ɵɵtext(109,"\n "),s.ɵɵelementStart(110,"option",38),s.ɵɵtext(111,"Bermuda"),s.ɵɵelementEnd(),s.ɵɵtext(112,"\n "),s.ɵɵelementStart(113,"option",39),s.ɵɵtext(114,"Bhutan"),s.ɵɵelementEnd(),s.ɵɵtext(115,"\n "),s.ɵɵelementStart(116,"option",40),s.ɵɵtext(117,"Bolivia, Plurinational State of"),s.ɵɵelementEnd(),s.ɵɵtext(118,"\n "),s.ɵɵelementStart(119,"option",41),s.ɵɵtext(120,"Bonaire, Sint Eustatius and Saba"),s.ɵɵelementEnd(),s.ɵɵtext(121,"\n "),s.ɵɵelementStart(122,"option",42),s.ɵɵtext(123,"Bosnia and Herzegovina"),s.ɵɵelementEnd(),s.ɵɵtext(124,"\n "),s.ɵɵelementStart(125,"option",43),s.ɵɵtext(126,"Botswana"),s.ɵɵelementEnd(),s.ɵɵtext(127,"\n "),s.ɵɵelementStart(128,"option",44),s.ɵɵtext(129,"Bouvet Island"),s.ɵɵelementEnd(),s.ɵɵtext(130,"\n "),s.ɵɵelementStart(131,"option",45),s.ɵɵtext(132,"Brazil"),s.ɵɵelementEnd(),s.ɵɵtext(133,"\n "),s.ɵɵelementStart(134,"option",46),s.ɵɵtext(135,"British Indian Ocean Territory"),s.ɵɵelementEnd(),s.ɵɵtext(136,"\n "),s.ɵɵelementStart(137,"option",47),s.ɵɵtext(138,"Brunei Darussalam"),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementStart(140,"option",48),s.ɵɵtext(141,"Bulgaria"),s.ɵɵelementEnd(),s.ɵɵtext(142,"\n "),s.ɵɵelementStart(143,"option",49),s.ɵɵtext(144,"Burkina Faso"),s.ɵɵelementEnd(),s.ɵɵtext(145,"\n "),s.ɵɵelementStart(146,"option",50),s.ɵɵtext(147,"Burundi"),s.ɵɵelementEnd(),s.ɵɵtext(148,"\n "),s.ɵɵelementStart(149,"option",51),s.ɵɵtext(150,"Cambodia"),s.ɵɵelementEnd(),s.ɵɵtext(151,"\n "),s.ɵɵelementStart(152,"option",52),s.ɵɵtext(153,"Cameroon"),s.ɵɵelementEnd(),s.ɵɵtext(154,"\n "),s.ɵɵelementStart(155,"option",53),s.ɵɵtext(156,"Cape Verde"),s.ɵɵelementEnd(),s.ɵɵtext(157,"\n "),s.ɵɵelementStart(158,"option",54),s.ɵɵtext(159,"Cayman Islands"),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"option",55),s.ɵɵtext(162,"Central African Republic"),s.ɵɵelementEnd(),s.ɵɵtext(163,"\n "),s.ɵɵelementStart(164,"option",56),s.ɵɵtext(165,"Chad"),s.ɵɵelementEnd(),s.ɵɵtext(166,"\n "),s.ɵɵelementStart(167,"option",57),s.ɵɵtext(168,"Chile"),s.ɵɵelementEnd(),s.ɵɵtext(169,"\n "),s.ɵɵelementStart(170,"option",58),s.ɵɵtext(171,"Christmas Island"),s.ɵɵelementEnd(),s.ɵɵtext(172,"\n "),s.ɵɵelementStart(173,"option",59),s.ɵɵtext(174,"Cocos (Keeling) Islands"),s.ɵɵelementEnd(),s.ɵɵtext(175,"\n "),s.ɵɵelementStart(176,"option",60),s.ɵɵtext(177,"Colombia"),s.ɵɵelementEnd(),s.ɵɵtext(178,"\n "),s.ɵɵelementStart(179,"option",61),s.ɵɵtext(180,"Comoros"),s.ɵɵelementEnd(),s.ɵɵtext(181,"\n "),s.ɵɵelementStart(182,"option",62),s.ɵɵtext(183,"Congo"),s.ɵɵelementEnd(),s.ɵɵtext(184,"\n "),s.ɵɵelementStart(185,"option",63),s.ɵɵtext(186,"Congo, the Democratic Republic of the"),s.ɵɵelementEnd(),s.ɵɵtext(187,"\n "),s.ɵɵelementStart(188,"option",64),s.ɵɵtext(189,"Cook Islands"),s.ɵɵelementEnd(),s.ɵɵtext(190,"\n "),s.ɵɵelementStart(191,"option",65),s.ɵɵtext(192,"Costa Rica"),s.ɵɵelementEnd(),s.ɵɵtext(193,"\n "),s.ɵɵelementStart(194,"option",66),s.ɵɵtext(195,"Côte d'Ivoire"),s.ɵɵelementEnd(),s.ɵɵtext(196,"\n "),s.ɵɵelementStart(197,"option",67),s.ɵɵtext(198,"Croatia"),s.ɵɵelementEnd(),s.ɵɵtext(199,"\n "),s.ɵɵelementStart(200,"option",68),s.ɵɵtext(201,"Cuba"),s.ɵɵelementEnd(),s.ɵɵtext(202,"\n "),s.ɵɵelementStart(203,"option",69),s.ɵɵtext(204,"Curaçao"),s.ɵɵelementEnd(),s.ɵɵtext(205,"\n "),s.ɵɵelementStart(206,"option",70),s.ɵɵtext(207,"Cyprus"),s.ɵɵelementEnd(),s.ɵɵtext(208,"\n "),s.ɵɵelementStart(209,"option",71),s.ɵɵtext(210,"Czech Republic"),s.ɵɵelementEnd(),s.ɵɵtext(211,"\n "),s.ɵɵelementStart(212,"option",72),s.ɵɵtext(213,"Denmark"),s.ɵɵelementEnd(),s.ɵɵtext(214,"\n "),s.ɵɵelementStart(215,"option",73),s.ɵɵtext(216,"Djibouti"),s.ɵɵelementEnd(),s.ɵɵtext(217,"\n "),s.ɵɵelementStart(218,"option",74),s.ɵɵtext(219,"Dominica"),s.ɵɵelementEnd(),s.ɵɵtext(220,"\n "),s.ɵɵelementStart(221,"option",75),s.ɵɵtext(222,"Dominican Republic"),s.ɵɵelementEnd(),s.ɵɵtext(223,"\n "),s.ɵɵelementStart(224,"option",76),s.ɵɵtext(225,"Ecuador"),s.ɵɵelementEnd(),s.ɵɵtext(226,"\n "),s.ɵɵelementStart(227,"option",77),s.ɵɵtext(228,"Egypt"),s.ɵɵelementEnd(),s.ɵɵtext(229,"\n "),s.ɵɵelementStart(230,"option",78),s.ɵɵtext(231,"El Salvador"),s.ɵɵelementEnd(),s.ɵɵtext(232,"\n "),s.ɵɵelementStart(233,"option",79),s.ɵɵtext(234,"Equatorial Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(235,"\n "),s.ɵɵelementStart(236,"option",80),s.ɵɵtext(237,"Eritrea"),s.ɵɵelementEnd(),s.ɵɵtext(238,"\n "),s.ɵɵelementStart(239,"option",81),s.ɵɵtext(240,"Estonia"),s.ɵɵelementEnd(),s.ɵɵtext(241,"\n "),s.ɵɵelementStart(242,"option",82),s.ɵɵtext(243,"Ethiopia"),s.ɵɵelementEnd(),s.ɵɵtext(244,"\n "),s.ɵɵelementStart(245,"option",83),s.ɵɵtext(246,"Falkland Islands (Malvinas)"),s.ɵɵelementEnd(),s.ɵɵtext(247,"\n "),s.ɵɵelementStart(248,"option",84),s.ɵɵtext(249,"Faroe Islands"),s.ɵɵelementEnd(),s.ɵɵtext(250,"\n "),s.ɵɵelementStart(251,"option",85),s.ɵɵtext(252,"Fiji"),s.ɵɵelementEnd(),s.ɵɵtext(253,"\n "),s.ɵɵelementStart(254,"option",86),s.ɵɵtext(255,"Finland"),s.ɵɵelementEnd(),s.ɵɵtext(256,"\n "),s.ɵɵelementStart(257,"option",87),s.ɵɵtext(258,"French Guiana"),s.ɵɵelementEnd(),s.ɵɵtext(259,"\n "),s.ɵɵelementStart(260,"option",88),s.ɵɵtext(261,"French Polynesia"),s.ɵɵelementEnd(),s.ɵɵtext(262,"\n "),s.ɵɵelementStart(263,"option",89),s.ɵɵtext(264,"French Southern Territories"),s.ɵɵelementEnd(),s.ɵɵtext(265,"\n "),s.ɵɵelementStart(266,"option",90),s.ɵɵtext(267,"Gabon"),s.ɵɵelementEnd(),s.ɵɵtext(268,"\n "),s.ɵɵelementStart(269,"option",91),s.ɵɵtext(270,"Gambia"),s.ɵɵelementEnd(),s.ɵɵtext(271,"\n "),s.ɵɵelementStart(272,"option",92),s.ɵɵtext(273,"Georgia"),s.ɵɵelementEnd(),s.ɵɵtext(274,"\n "),s.ɵɵelementStart(275,"option",93),s.ɵɵtext(276,"Ghana"),s.ɵɵelementEnd(),s.ɵɵtext(277,"\n "),s.ɵɵelementStart(278,"option",94),s.ɵɵtext(279,"Gibraltar"),s.ɵɵelementEnd(),s.ɵɵtext(280,"\n "),s.ɵɵelementStart(281,"option",95),s.ɵɵtext(282,"Greece"),s.ɵɵelementEnd(),s.ɵɵtext(283,"\n "),s.ɵɵelementStart(284,"option",96),s.ɵɵtext(285,"Greenland"),s.ɵɵelementEnd(),s.ɵɵtext(286,"\n "),s.ɵɵelementStart(287,"option",97),s.ɵɵtext(288,"Grenada"),s.ɵɵelementEnd(),s.ɵɵtext(289,"\n "),s.ɵɵelementStart(290,"option",98),s.ɵɵtext(291,"Guadeloupe"),s.ɵɵelementEnd(),s.ɵɵtext(292,"\n "),s.ɵɵelementStart(293,"option",99),s.ɵɵtext(294,"Guam"),s.ɵɵelementEnd(),s.ɵɵtext(295,"\n "),s.ɵɵelementStart(296,"option",100),s.ɵɵtext(297,"Guatemala"),s.ɵɵelementEnd(),s.ɵɵtext(298,"\n "),s.ɵɵelementStart(299,"option",101),s.ɵɵtext(300,"Guernsey"),s.ɵɵelementEnd(),s.ɵɵtext(301,"\n "),s.ɵɵelementStart(302,"option",102),s.ɵɵtext(303,"Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(304,"\n "),s.ɵɵelementStart(305,"option",103),s.ɵɵtext(306,"Guinea-Bissau"),s.ɵɵelementEnd(),s.ɵɵtext(307,"\n "),s.ɵɵelementStart(308,"option",104),s.ɵɵtext(309,"Guyana"),s.ɵɵelementEnd(),s.ɵɵtext(310,"\n "),s.ɵɵelementStart(311,"option",105),s.ɵɵtext(312,"Haiti"),s.ɵɵelementEnd(),s.ɵɵtext(313,"\n "),s.ɵɵelementStart(314,"option",106),s.ɵɵtext(315,"Heard Island and McDonald Islands"),s.ɵɵelementEnd(),s.ɵɵtext(316,"\n "),s.ɵɵelementStart(317,"option",107),s.ɵɵtext(318,"Holy See (Vatican City State)"),s.ɵɵelementEnd(),s.ɵɵtext(319,"\n "),s.ɵɵelementStart(320,"option",108),s.ɵɵtext(321,"Honduras"),s.ɵɵelementEnd(),s.ɵɵtext(322,"\n "),s.ɵɵelementStart(323,"option",109),s.ɵɵtext(324,"Hong Kong"),s.ɵɵelementEnd(),s.ɵɵtext(325,"\n "),s.ɵɵelementStart(326,"option",110),s.ɵɵtext(327,"Hungary"),s.ɵɵelementEnd(),s.ɵɵtext(328,"\n "),s.ɵɵelementStart(329,"option",111),s.ɵɵtext(330,"Iceland"),s.ɵɵelementEnd(),s.ɵɵtext(331,"\n "),s.ɵɵelementStart(332,"option",112),s.ɵɵtext(333,"Indonesia"),s.ɵɵelementEnd(),s.ɵɵtext(334,"\n "),s.ɵɵelementStart(335,"option",113),s.ɵɵtext(336,"Iran, Islamic Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(337,"\n "),s.ɵɵelementStart(338,"option",114),s.ɵɵtext(339,"Iraq"),s.ɵɵelementEnd(),s.ɵɵtext(340,"\n "),s.ɵɵelementStart(341,"option",115),s.ɵɵtext(342,"Ireland"),s.ɵɵelementEnd(),s.ɵɵtext(343,"\n "),s.ɵɵelementStart(344,"option",116),s.ɵɵtext(345,"Isle of Man"),s.ɵɵelementEnd(),s.ɵɵtext(346,"\n "),s.ɵɵelementStart(347,"option",117),s.ɵɵtext(348,"Israel"),s.ɵɵelementEnd(),s.ɵɵtext(349,"\n "),s.ɵɵelementStart(350,"option",118),s.ɵɵtext(351,"Italy"),s.ɵɵelementEnd(),s.ɵɵtext(352,"\n "),s.ɵɵelementStart(353,"option",119),s.ɵɵtext(354,"Jamaica"),s.ɵɵelementEnd(),s.ɵɵtext(355,"\n "),s.ɵɵelementStart(356,"option",120),s.ɵɵtext(357,"Japan"),s.ɵɵelementEnd(),s.ɵɵtext(358,"\n "),s.ɵɵelementStart(359,"option",121),s.ɵɵtext(360,"Jersey"),s.ɵɵelementEnd(),s.ɵɵtext(361,"\n "),s.ɵɵelementStart(362,"option",122),s.ɵɵtext(363,"Jordan"),s.ɵɵelementEnd(),s.ɵɵtext(364,"\n "),s.ɵɵelementStart(365,"option",123),s.ɵɵtext(366,"Kazakhstan"),s.ɵɵelementEnd(),s.ɵɵtext(367,"\n "),s.ɵɵelementStart(368,"option",124),s.ɵɵtext(369,"Kenya"),s.ɵɵelementEnd(),s.ɵɵtext(370,"\n "),s.ɵɵelementStart(371,"option",125),s.ɵɵtext(372,"Kiribati"),s.ɵɵelementEnd(),s.ɵɵtext(373,"\n "),s.ɵɵelementStart(374,"option",126),s.ɵɵtext(375,"Korea, Democratic People's Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(376,"\n "),s.ɵɵelementStart(377,"option",127),s.ɵɵtext(378,"Korea, Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(379,"\n "),s.ɵɵelementStart(380,"option",128),s.ɵɵtext(381,"Kuwait"),s.ɵɵelementEnd(),s.ɵɵtext(382,"\n "),s.ɵɵelementStart(383,"option",129),s.ɵɵtext(384,"Kyrgyzstan"),s.ɵɵelementEnd(),s.ɵɵtext(385,"\n "),s.ɵɵelementStart(386,"option",130),s.ɵɵtext(387,"Lao People's Democratic Republic"),s.ɵɵelementEnd(),s.ɵɵtext(388,"\n "),s.ɵɵelementStart(389,"option",131),s.ɵɵtext(390,"Latvia"),s.ɵɵelementEnd(),s.ɵɵtext(391,"\n "),s.ɵɵelementStart(392,"option",132),s.ɵɵtext(393,"Lebanon"),s.ɵɵelementEnd(),s.ɵɵtext(394,"\n "),s.ɵɵelementStart(395,"option",133),s.ɵɵtext(396,"Lesotho"),s.ɵɵelementEnd(),s.ɵɵtext(397,"\n "),s.ɵɵelementStart(398,"option",134),s.ɵɵtext(399,"Liberia"),s.ɵɵelementEnd(),s.ɵɵtext(400,"\n "),s.ɵɵelementStart(401,"option",135),s.ɵɵtext(402,"Libya"),s.ɵɵelementEnd(),s.ɵɵtext(403,"\n "),s.ɵɵelementStart(404,"option",136),s.ɵɵtext(405,"Liechtenstein"),s.ɵɵelementEnd(),s.ɵɵtext(406,"\n "),s.ɵɵelementStart(407,"option",137),s.ɵɵtext(408,"Lithuania"),s.ɵɵelementEnd(),s.ɵɵtext(409,"\n "),s.ɵɵelementStart(410,"option",138),s.ɵɵtext(411,"Luxembourg"),s.ɵɵelementEnd(),s.ɵɵtext(412,"\n "),s.ɵɵelementStart(413,"option",139),s.ɵɵtext(414,"Macao"),s.ɵɵelementEnd(),s.ɵɵtext(415,"\n "),s.ɵɵelementStart(416,"option",140),s.ɵɵtext(417,"Macedonia, the former Yugoslav Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(418,"\n "),s.ɵɵelementStart(419,"option",141),s.ɵɵtext(420,"Madagascar"),s.ɵɵelementEnd(),s.ɵɵtext(421,"\n "),s.ɵɵelementStart(422,"option",142),s.ɵɵtext(423,"Malawi"),s.ɵɵelementEnd(),s.ɵɵtext(424,"\n "),s.ɵɵelementStart(425,"option",143),s.ɵɵtext(426,"Malaysia"),s.ɵɵelementEnd(),s.ɵɵtext(427,"\n "),s.ɵɵelementStart(428,"option",144),s.ɵɵtext(429,"Maldives"),s.ɵɵelementEnd(),s.ɵɵtext(430,"\n "),s.ɵɵelementStart(431,"option",145),s.ɵɵtext(432,"Mali"),s.ɵɵelementEnd(),s.ɵɵtext(433,"\n "),s.ɵɵelementStart(434,"option",146),s.ɵɵtext(435,"Malta"),s.ɵɵelementEnd(),s.ɵɵtext(436,"\n "),s.ɵɵelementStart(437,"option",147),s.ɵɵtext(438,"Marshall Islands"),s.ɵɵelementEnd(),s.ɵɵtext(439,"\n "),s.ɵɵelementStart(440,"option",148),s.ɵɵtext(441,"Martinique"),s.ɵɵelementEnd(),s.ɵɵtext(442,"\n "),s.ɵɵelementStart(443,"option",149),s.ɵɵtext(444,"Mauritania"),s.ɵɵelementEnd(),s.ɵɵtext(445,"\n "),s.ɵɵelementStart(446,"option",150),s.ɵɵtext(447,"Mauritius"),s.ɵɵelementEnd(),s.ɵɵtext(448,"\n "),s.ɵɵelementStart(449,"option",151),s.ɵɵtext(450,"Mayotte"),s.ɵɵelementEnd(),s.ɵɵtext(451,"\n "),s.ɵɵelementStart(452,"option",152),s.ɵɵtext(453,"Mexico"),s.ɵɵelementEnd(),s.ɵɵtext(454,"\n "),s.ɵɵelementStart(455,"option",153),s.ɵɵtext(456,"Micronesia, Federated States of"),s.ɵɵelementEnd(),s.ɵɵtext(457,"\n "),s.ɵɵelementStart(458,"option",154),s.ɵɵtext(459,"Moldova, Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(460,"\n "),s.ɵɵelementStart(461,"option",155),s.ɵɵtext(462,"Monaco"),s.ɵɵelementEnd(),s.ɵɵtext(463,"\n "),s.ɵɵelementStart(464,"option",156),s.ɵɵtext(465,"Mongolia"),s.ɵɵelementEnd(),s.ɵɵtext(466,"\n "),s.ɵɵelementStart(467,"option",157),s.ɵɵtext(468,"Montenegro"),s.ɵɵelementEnd(),s.ɵɵtext(469,"\n "),s.ɵɵelementStart(470,"option",158),s.ɵɵtext(471,"Montserrat"),s.ɵɵelementEnd(),s.ɵɵtext(472,"\n "),s.ɵɵelementStart(473,"option",159),s.ɵɵtext(474,"Morocco"),s.ɵɵelementEnd(),s.ɵɵtext(475,"\n "),s.ɵɵelementStart(476,"option",160),s.ɵɵtext(477,"Mozambique"),s.ɵɵelementEnd(),s.ɵɵtext(478,"\n "),s.ɵɵelementStart(479,"option",161),s.ɵɵtext(480,"Myanmar"),s.ɵɵelementEnd(),s.ɵɵtext(481,"\n "),s.ɵɵelementStart(482,"option",162),s.ɵɵtext(483,"Namibia"),s.ɵɵelementEnd(),s.ɵɵtext(484,"\n "),s.ɵɵelementStart(485,"option",163),s.ɵɵtext(486,"Nauru"),s.ɵɵelementEnd(),s.ɵɵtext(487,"\n "),s.ɵɵelementStart(488,"option",164),s.ɵɵtext(489,"Nepal"),s.ɵɵelementEnd(),s.ɵɵtext(490,"\n "),s.ɵɵelementStart(491,"option",165),s.ɵɵtext(492,"Netherlands"),s.ɵɵelementEnd(),s.ɵɵtext(493,"\n "),s.ɵɵelementStart(494,"option",166),s.ɵɵtext(495,"New Caledonia"),s.ɵɵelementEnd(),s.ɵɵtext(496,"\n "),s.ɵɵelementStart(497,"option",167),s.ɵɵtext(498,"New Zealand"),s.ɵɵelementEnd(),s.ɵɵtext(499,"\n "),s.ɵɵelementStart(500,"option",168),s.ɵɵtext(501,"Nicaragua"),s.ɵɵelementEnd(),s.ɵɵtext(502,"\n "),s.ɵɵelementStart(503,"option",169),s.ɵɵtext(504,"Niger"),s.ɵɵelementEnd(),s.ɵɵtext(505,"\n "),s.ɵɵelementStart(506,"option",170),s.ɵɵtext(507,"Nigeria"),s.ɵɵelementEnd(),s.ɵɵtext(508,"\n "),s.ɵɵelementStart(509,"option",171),s.ɵɵtext(510,"Niue"),s.ɵɵelementEnd(),s.ɵɵtext(511,"\n "),s.ɵɵelementStart(512,"option",172),s.ɵɵtext(513,"Norfolk Island"),s.ɵɵelementEnd(),s.ɵɵtext(514,"\n "),s.ɵɵelementStart(515,"option",173),s.ɵɵtext(516,"Northern Mariana Islands"),s.ɵɵelementEnd(),s.ɵɵtext(517,"\n "),s.ɵɵelementStart(518,"option",174),s.ɵɵtext(519,"Norway"),s.ɵɵelementEnd(),s.ɵɵtext(520,"\n "),s.ɵɵelementStart(521,"option",175),s.ɵɵtext(522,"Oman"),s.ɵɵelementEnd(),s.ɵɵtext(523,"\n "),s.ɵɵelementStart(524,"option",176),s.ɵɵtext(525,"Pakistan"),s.ɵɵelementEnd(),s.ɵɵtext(526,"\n "),s.ɵɵelementStart(527,"option",177),s.ɵɵtext(528,"Palau"),s.ɵɵelementEnd(),s.ɵɵtext(529,"\n "),s.ɵɵelementStart(530,"option",178),s.ɵɵtext(531,"Palestinian Territory, Occupied"),s.ɵɵelementEnd(),s.ɵɵtext(532,"\n "),s.ɵɵelementStart(533,"option",179),s.ɵɵtext(534,"Panama"),s.ɵɵelementEnd(),s.ɵɵtext(535,"\n "),s.ɵɵelementStart(536,"option",180),s.ɵɵtext(537,"Papua New Guinea"),s.ɵɵelementEnd(),s.ɵɵtext(538,"\n "),s.ɵɵelementStart(539,"option",181),s.ɵɵtext(540,"Paraguay"),s.ɵɵelementEnd(),s.ɵɵtext(541,"\n "),s.ɵɵelementStart(542,"option",182),s.ɵɵtext(543,"Peru"),s.ɵɵelementEnd(),s.ɵɵtext(544,"\n "),s.ɵɵelementStart(545,"option",183),s.ɵɵtext(546,"Philippines"),s.ɵɵelementEnd(),s.ɵɵtext(547,"\n "),s.ɵɵelementStart(548,"option",184),s.ɵɵtext(549,"Pitcairn"),s.ɵɵelementEnd(),s.ɵɵtext(550,"\n "),s.ɵɵelementStart(551,"option",185),s.ɵɵtext(552,"Poland"),s.ɵɵelementEnd(),s.ɵɵtext(553,"\n "),s.ɵɵelementStart(554,"option",186),s.ɵɵtext(555,"Portugal"),s.ɵɵelementEnd(),s.ɵɵtext(556,"\n "),s.ɵɵelementStart(557,"option",187),s.ɵɵtext(558,"Puerto Rico"),s.ɵɵelementEnd(),s.ɵɵtext(559,"\n "),s.ɵɵelementStart(560,"option",188),s.ɵɵtext(561,"Qatar"),s.ɵɵelementEnd(),s.ɵɵtext(562,"\n "),s.ɵɵelementStart(563,"option",189),s.ɵɵtext(564,"Réunion"),s.ɵɵelementEnd(),s.ɵɵtext(565,"\n "),s.ɵɵelementStart(566,"option",190),s.ɵɵtext(567,"Romania"),s.ɵɵelementEnd(),s.ɵɵtext(568,"\n "),s.ɵɵelementStart(569,"option",191),s.ɵɵtext(570,"Russian Federation"),s.ɵɵelementEnd(),s.ɵɵtext(571,"\n "),s.ɵɵelementStart(572,"option",192),s.ɵɵtext(573,"Rwanda"),s.ɵɵelementEnd(),s.ɵɵtext(574,"\n "),s.ɵɵelementStart(575,"option",193),s.ɵɵtext(576,"Saint Barthélemy"),s.ɵɵelementEnd(),s.ɵɵtext(577,"\n "),s.ɵɵelementStart(578,"option",194),s.ɵɵtext(579,"Saint Helena, Ascension and Tristan da Cunha"),s.ɵɵelementEnd(),s.ɵɵtext(580,"\n "),s.ɵɵelementStart(581,"option",195),s.ɵɵtext(582,"Saint Kitts and Nevis"),s.ɵɵelementEnd(),s.ɵɵtext(583,"\n "),s.ɵɵelementStart(584,"option",196),s.ɵɵtext(585,"Saint Lucia"),s.ɵɵelementEnd(),s.ɵɵtext(586,"\n "),s.ɵɵelementStart(587,"option",197),s.ɵɵtext(588,"Saint Martin (French part)"),s.ɵɵelementEnd(),s.ɵɵtext(589,"\n "),s.ɵɵelementStart(590,"option",198),s.ɵɵtext(591,"Saint Pierre and Miquelon"),s.ɵɵelementEnd(),s.ɵɵtext(592,"\n "),s.ɵɵelementStart(593,"option",199),s.ɵɵtext(594,"Saint Vincent and the Grenadines"),s.ɵɵelementEnd(),s.ɵɵtext(595,"\n "),s.ɵɵelementStart(596,"option",200),s.ɵɵtext(597,"Samoa"),s.ɵɵelementEnd(),s.ɵɵtext(598,"\n "),s.ɵɵelementStart(599,"option",201),s.ɵɵtext(600,"San Marino"),s.ɵɵelementEnd(),s.ɵɵtext(601,"\n ");s.ɵɵelementStart(602,"option",202),s.ɵɵtext(603,"Sao Tome and Principe"),s.ɵɵelementEnd(),s.ɵɵtext(604,"\n "),s.ɵɵelementStart(605,"option",203),s.ɵɵtext(606,"Saudi Arabia"),s.ɵɵelementEnd(),s.ɵɵtext(607,"\n "),s.ɵɵelementStart(608,"option",204),s.ɵɵtext(609,"Senegal"),s.ɵɵelementEnd(),s.ɵɵtext(610,"\n "),s.ɵɵelementStart(611,"option",205),s.ɵɵtext(612,"Serbia"),s.ɵɵelementEnd(),s.ɵɵtext(613,"\n "),s.ɵɵelementStart(614,"option",206),s.ɵɵtext(615,"Seychelles"),s.ɵɵelementEnd(),s.ɵɵtext(616,"\n "),s.ɵɵelementStart(617,"option",207),s.ɵɵtext(618,"Sierra Leone"),s.ɵɵelementEnd(),s.ɵɵtext(619,"\n "),s.ɵɵelementStart(620,"option",208),s.ɵɵtext(621,"Singapore"),s.ɵɵelementEnd(),s.ɵɵtext(622,"\n "),s.ɵɵelementStart(623,"option",209),s.ɵɵtext(624,"Sint Maarten (Dutch part)"),s.ɵɵelementEnd(),s.ɵɵtext(625,"\n "),s.ɵɵelementStart(626,"option",210),s.ɵɵtext(627,"Slovakia"),s.ɵɵelementEnd(),s.ɵɵtext(628,"\n "),s.ɵɵelementStart(629,"option",211),s.ɵɵtext(630,"Slovenia"),s.ɵɵelementEnd(),s.ɵɵtext(631,"\n "),s.ɵɵelementStart(632,"option",212),s.ɵɵtext(633,"Solomon Islands"),s.ɵɵelementEnd(),s.ɵɵtext(634,"\n "),s.ɵɵelementStart(635,"option",213),s.ɵɵtext(636,"Somalia"),s.ɵɵelementEnd(),s.ɵɵtext(637,"\n "),s.ɵɵelementStart(638,"option",214),s.ɵɵtext(639,"South Africa"),s.ɵɵelementEnd(),s.ɵɵtext(640,"\n "),s.ɵɵelementStart(641,"option",215),s.ɵɵtext(642,"South Georgia and the South Sandwich Islands"),s.ɵɵelementEnd(),s.ɵɵtext(643,"\n "),s.ɵɵelementStart(644,"option",216),s.ɵɵtext(645,"South Sudan"),s.ɵɵelementEnd(),s.ɵɵtext(646,"\n "),s.ɵɵelementStart(647,"option",217),s.ɵɵtext(648,"Spain"),s.ɵɵelementEnd(),s.ɵɵtext(649,"\n "),s.ɵɵelementStart(650,"option",218),s.ɵɵtext(651,"Sri Lanka"),s.ɵɵelementEnd(),s.ɵɵtext(652,"\n "),s.ɵɵelementStart(653,"option",219),s.ɵɵtext(654,"Sudan"),s.ɵɵelementEnd(),s.ɵɵtext(655,"\n "),s.ɵɵelementStart(656,"option",220),s.ɵɵtext(657,"Suriname"),s.ɵɵelementEnd(),s.ɵɵtext(658,"\n "),s.ɵɵelementStart(659,"option",221),s.ɵɵtext(660,"Svalbard and Jan Mayen"),s.ɵɵelementEnd(),s.ɵɵtext(661,"\n "),s.ɵɵelementStart(662,"option",222),s.ɵɵtext(663,"Swaziland"),s.ɵɵelementEnd(),s.ɵɵtext(664,"\n "),s.ɵɵelementStart(665,"option",223),s.ɵɵtext(666,"Sweden"),s.ɵɵelementEnd(),s.ɵɵtext(667,"\n "),s.ɵɵelementStart(668,"option",224),s.ɵɵtext(669,"Switzerland"),s.ɵɵelementEnd(),s.ɵɵtext(670,"\n "),s.ɵɵelementStart(671,"option",225),s.ɵɵtext(672,"Syrian Arab Republic"),s.ɵɵelementEnd(),s.ɵɵtext(673,"\n "),s.ɵɵelementStart(674,"option",226),s.ɵɵtext(675,"Taiwan"),s.ɵɵelementEnd(),s.ɵɵtext(676,"\n "),s.ɵɵelementStart(677,"option",227),s.ɵɵtext(678,"Tajikistan"),s.ɵɵelementEnd(),s.ɵɵtext(679,"\n "),s.ɵɵelementStart(680,"option",228),s.ɵɵtext(681,"Tanzania, United Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(682,"\n "),s.ɵɵelementStart(683,"option",229),s.ɵɵtext(684,"Thailand"),s.ɵɵelementEnd(),s.ɵɵtext(685,"\n "),s.ɵɵelementStart(686,"option",230),s.ɵɵtext(687,"Timor-Leste"),s.ɵɵelementEnd(),s.ɵɵtext(688,"\n "),s.ɵɵelementStart(689,"option",231),s.ɵɵtext(690,"Togo"),s.ɵɵelementEnd(),s.ɵɵtext(691,"\n "),s.ɵɵelementStart(692,"option",232),s.ɵɵtext(693,"Tokelau"),s.ɵɵelementEnd(),s.ɵɵtext(694,"\n "),s.ɵɵelementStart(695,"option",233),s.ɵɵtext(696,"Tonga"),s.ɵɵelementEnd(),s.ɵɵtext(697,"\n "),s.ɵɵelementStart(698,"option",234),s.ɵɵtext(699,"Trinidad and Tobago"),s.ɵɵelementEnd(),s.ɵɵtext(700,"\n "),s.ɵɵelementStart(701,"option",235),s.ɵɵtext(702,"Tunisia"),s.ɵɵelementEnd(),s.ɵɵtext(703,"\n "),s.ɵɵelementStart(704,"option",236),s.ɵɵtext(705,"Turkey"),s.ɵɵelementEnd(),s.ɵɵtext(706,"\n "),s.ɵɵelementStart(707,"option",237),s.ɵɵtext(708,"Turkmenistan"),s.ɵɵelementEnd(),s.ɵɵtext(709,"\n "),s.ɵɵelementStart(710,"option",238),s.ɵɵtext(711,"Turks and Caicos Islands"),s.ɵɵelementEnd(),s.ɵɵtext(712,"\n "),s.ɵɵelementStart(713,"option",239),s.ɵɵtext(714,"Tuvalu"),s.ɵɵelementEnd(),s.ɵɵtext(715,"\n "),s.ɵɵelementStart(716,"option",240),s.ɵɵtext(717,"Uganda"),s.ɵɵelementEnd(),s.ɵɵtext(718,"\n "),s.ɵɵelementStart(719,"option",241),s.ɵɵtext(720,"Ukraine"),s.ɵɵelementEnd(),s.ɵɵtext(721,"\n "),s.ɵɵelementStart(722,"option",242),s.ɵɵtext(723,"United Arab Emirates"),s.ɵɵelementEnd(),s.ɵɵtext(724,"\n "),s.ɵɵelementStart(725,"option",243),s.ɵɵtext(726,"United States Minor Outlying Islands"),s.ɵɵelementEnd(),s.ɵɵtext(727,"\n "),s.ɵɵelementStart(728,"option",244),s.ɵɵtext(729,"Uruguay"),s.ɵɵelementEnd(),s.ɵɵtext(730,"\n "),s.ɵɵelementStart(731,"option",245),s.ɵɵtext(732,"Uzbekistan"),s.ɵɵelementEnd(),s.ɵɵtext(733,"\n "),s.ɵɵelementStart(734,"option",246),s.ɵɵtext(735,"Vanuatu"),s.ɵɵelementEnd(),s.ɵɵtext(736,"\n "),s.ɵɵelementStart(737,"option",247),s.ɵɵtext(738,"Venezuela, Bolivarian Republic of"),s.ɵɵelementEnd(),s.ɵɵtext(739,"\n "),s.ɵɵelementStart(740,"option",248),s.ɵɵtext(741,"Viet Nam"),s.ɵɵelementEnd(),s.ɵɵtext(742,"\n "),s.ɵɵelementStart(743,"option",249),s.ɵɵtext(744,"Virgin Islands, British"),s.ɵɵelementEnd(),s.ɵɵtext(745,"\n "),s.ɵɵelementStart(746,"option",250),s.ɵɵtext(747,"Virgin Islands, U.S."),s.ɵɵelementEnd(),s.ɵɵtext(748,"\n "),s.ɵɵelementStart(749,"option",251),s.ɵɵtext(750,"Wallis and Futuna"),s.ɵɵelementEnd(),s.ɵɵtext(751,"\n "),s.ɵɵelementStart(752,"option",252),s.ɵɵtext(753,"Western Sahara"),s.ɵɵelementEnd(),s.ɵɵtext(754,"\n "),s.ɵɵelementStart(755,"option",253),s.ɵɵtext(756,"Yemen"),s.ɵɵelementEnd(),s.ɵɵtext(757,"\n "),s.ɵɵelementStart(758,"option",254),s.ɵɵtext(759,"Zambia"),s.ɵɵelementEnd(),s.ɵɵtext(760,"\n "),s.ɵɵelementStart(761,"option",255),s.ɵɵtext(762,"Zimbabwe"),s.ɵɵelementEnd(),s.ɵɵtext(763,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(764,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(765,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(766,"\n "),s.ɵɵelementStart(767,"div",256),s.ɵɵtext(768,"\n "),s.ɵɵelementStart(769,"div",2),s.ɵɵtext(770,"\n "),s.ɵɵelementStart(771,"label",257),s.ɵɵtext(772),s.ɵɵpipe(773,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(774,"\n "),s.ɵɵelementStart(775,"input",258),s.ɵɵlistener("ngModelChange",(function(e){return t.taxInfo.postalCode=e})),s.ɵɵelementEnd(),s.ɵɵtext(776,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(777,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(778,"\n "),s.ɵɵtemplate(779,h,11,4,"div",259),s.ɵɵtext(780,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(781,"\n"),s.ɵɵtemplate(782,v,14,4,"div",260),s.ɵɵtext(783,"\n"),s.ɵɵtemplate(784,f,50,16,"div",260),s.ɵɵtext(785,"\n")}2&e&&(s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,8,"country")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.taxInfo.country),s.ɵɵadvance(762),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(773,10,"zipPostalCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.taxInfo.postalCode)("required","US"===t.taxInfo.country),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.organizationId&&"US"!==t.taxInfo.country),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.organizationId&&t.taxInfo.includeTaxId))},directives:[p.SelectControlValueAccessor,p.RequiredValidator,p.NgControlStatus,p.NgModel,p.NgSelectOption,p.ɵNgSelectMultipleOption,p.DefaultValueAccessor,u.NgIf,p.CheckboxControlValueAccessor],pipes:[m.I18nPipe],encapsulation:2})},58782:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorAuthenticatorComponent=void 0;n(91092),n(40349),n(70143),n(99954),n(77243),n(61554);const r=n(36797),o=n(57976),a=n(32879),s=n(32621),l=n(91092),c=n(40349),d=n(61554),p=n(99954),u=n(70143),m=n(77243),h=n(50553),v=n(57490),f=n(81918),g=n(96832),y=n(637),x=n(52900),S=n(966),b=n(72596);function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",28),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"p"),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"strong"),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"twoStepAuthenticatorDesc")),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("1. ",s.ɵɵpipeBind1(12,4,"twoStepAuthenticatorDownloadApp"),""))}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",29),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"p"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"img",28),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"p"),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,4,"enabled")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,6,"twoStepLoginProviderEnabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(9,8,"twoStepAuthenticatorReaddDesc"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,10,"twoStepAuthenticatorNeedApp")))}function E(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"strong"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("2. ",s.ɵɵpipeBind1(4,1,"twoStepAuthenticatorScanCode"),""))}function P(e,t){1&e&&s.ɵɵelement(0,"hr")}function k(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",30),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"input",31),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).token=t})),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("3. ",s.ɵɵpipeBind1(4,2,"twoStepAuthenticatorEnterCode"),""),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.token)}}function A(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enable")))}function O(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"disable")))}const T=function(e){return{"mb-0":e}};function M(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,I,15,6,"ng-container",13),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,C,17,12,"ng-container",13),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"ul",14),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"li"),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"i",15),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementStart(16,"a",16),s.ɵɵtext(17,"Authy"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"li"),s.ɵɵtext(21,"\n "),s.ɵɵelement(22,"i",17),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementStart(25,"a",18),s.ɵɵtext(26,"Authy"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"li"),s.ɵɵtext(30,"\n "),s.ɵɵelement(31,"i",19),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementStart(34,"a",20),s.ɵɵtext(35,"Microsoft Authenticator"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"p"),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵtemplate(43,E,6,3,"p",13),s.ɵɵtext(44,"\n "),s.ɵɵtemplate(45,P,1,0,"hr",13),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"p",21),s.ɵɵtext(48,"\n "),s.ɵɵelement(49,"canvas",22),s.ɵɵelement(50,"br"),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"code",23),s.ɵɵpipe(53,"i18n"),s.ɵɵtext(54),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵtemplate(57,k,8,4,"ng-container",13),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"div",24),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"button",25),s.ɵɵtext(63,"\n "),s.ɵɵelement(64,"i",26),s.ɵɵpipe(65,"i18n"),s.ɵɵtext(66,"\n "),s.ɵɵtemplate(67,A,3,3,"span",13),s.ɵɵtext(68,"\n "),s.ɵɵtemplate(69,O,3,3,"span",13),s.ɵɵtext(70,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"button",27),s.ɵɵtext(73),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(15,18,"iosDevices"),":\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(24,20,"androidDevices"),":\n "),s.ɵɵadvance(9),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(33,22,"windowsDevices"),":\n "),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,24,"twoStepAuthenticatorAppsRecommended")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(32,T,t.enabled)),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(53,26,"key")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(t.key),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(65,28,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(74,30,"close"),"\n ")}}class D extends a.TwoFactorBaseComponent{constructor(e,t,n,i,r,a){super(e,t,i,r,n),this.stateService=a,this.type=o.TwoFactorProviderType.Authenticator,this.qrScript=window.document.createElement("script"),this.qrScript.src="scripts/qrious.min.js",this.qrScript.async=!0}ngOnInit(){window.document.body.appendChild(this.qrScript)}ngOnDestroy(){window.document.body.removeChild(this.qrScript)}auth(e){return super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(r.UpdateTwoFactorAuthenticatorRequest);return t.token=this.token,t.key=this.key,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorAuthenticator(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){return i(this,void 0,void 0,(function*(){this.token=null,this.enabled=e.enabled,this.key=e.key;const t=yield this.stateService.getEmail();window.setTimeout((()=>{new window.QRious({element:document.getElementById("qr"),value:"otpauth://totp/Bitwarden:"+encodeURIComponent(t)+"?secret="+encodeURIComponent(this.key)+"&issuer=Bitwarden",size:160})}),100)}))}}t.TwoFactorAuthenticatorComponent=D,D.ɵfac=function(e){return new(e||D)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.UserVerificationService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.StateService))},D.ɵcmp=s.ɵɵdefineComponent({type:D,selectors:[["app-two-factor-authenticator"]],features:[s.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faAuthenticatorTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faAuthenticatorTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"bwi-ul"],[1,"bwi","bwi-li","bwi-apple"],["href","https://itunes.apple.com/us/app/authy/id494168017?mt=8","target","_blank","rel","noopener"],[1,"bwi","bwi-li","bwi-android"],["href","https://play.google.com/store/apps/details?id=com.authy.authy","target","_blank","rel","noopener"],[1,"bwi","bwi-li","bwi-windows"],["href","https://www.microsoft.com/p/authenticator/9wzdncrfj3rj","target","_blank","rel","noopener"],[1,"text-center",3,"ngClass"],["id","qr"],[3,"appA11yTitle"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["alt","Authenticator app logo",1,"float-right","mfaType0"],["type","success","icon","bwi bwi-check-circle",3,"title"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementStart(11,"small"),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"button",5),s.ɵɵpipe(17,"i18n"),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"span",6),s.ɵɵtext(20,"×"),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,w,2,2,"app-two-factor-verify",7),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,M,77,34,"form",8),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(13,7,"authenticatorAppTitle")),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(17,9,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!t.authed),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.authed))},directives:[h.A11yTitleDirective,v.NgIf,f.TwoFactorVerifyComponent,g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,v.NgClass,x.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,S.InputVerbatimDirective,g.NgControlStatus,g.NgModel],pipes:[b.I18nPipe],encapsulation:2})},32879:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorBaseComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(61554),n(57976)),a=n(12263),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(61554);class m{constructor(e,t,n,i,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.userVerificationService=a,this.onUpdated=new r.EventEmitter,this.twoFactorProviderType=o.TwoFactorProviderType,this.enabled=!1,this.authed=!1}auth(e){this.hashedSecret=e.secret,this.verificationType=e.verificationType,this.authed=!0}enable(e){return i(this,void 0,void 0,(function*(){try{yield e(),this.onUpdated.emit(!0)}catch(t){this.logService.error(t)}}))}disable(e){return i(this,void 0,void 0,(function*(){if(yield this.platformUtilsService.showDialog(this.i18nService.t("twoStepDisableDesc"),this.i18nService.t("disable"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{const t=yield this.buildRequestModel(a.TwoFactorProviderRequest);t.type=this.type,e=null!=this.organizationId?this.apiService.putTwoFactorOrganizationDisable(this.organizationId,t):this.apiService.putTwoFactorDisable(t),yield e,this.enabled=!1,this.platformUtilsService.showToast("success",null,this.i18nService.t("twoStepDisabled")),this.onUpdated.emit(!1)}catch(t){this.logService.error(t)}}))}buildRequestModel(e){return i(this,void 0,void 0,(function*(){return this.userVerificationService.buildRequest({secret:this.hashedSecret,type:this.verificationType},e,!0)}))}}t.TwoFactorBaseComponent=m,m.ɵfac=function(e){return new(e||m)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService),s.ɵɵdirectiveInject(u.UserVerificationService))},m.ɵdir=s.ɵɵdefineDirective({type:m,outputs:{onUpdated:"onUpdated"}})},23821:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorDuoComponent=void 0;n(91092),n(40349),n(70143),n(99954),n(61554);const r=n(57976),o=n(20500),a=n(32879),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(61554),m=n(50553),h=n(57490),v=n(81918),f=n(96832),g=n(637),y=n(52900),x=n(966),S=n(72596);function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function w(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",18),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelement(7,"img",19),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"strong"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12),s.ɵɵelement(13,"br"),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"strong"),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18),s.ɵɵelement(19,"br"),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"strong"),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,8,"enabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(5,10,"twoStepLoginProviderEnabled"),"\n "),s.ɵɵadvance(6),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(11,12,"twoFactorDuoIntegrationKey"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.ikey,"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(17,14,"twoFactorDuoSecretKey"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.skey,"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(23,16,"twoFactorDuoApiHostname"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",e.host,"\n ")}}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",20),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",21),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",22),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).ikey=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",20),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"label",23),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"input",24),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).skey=t})),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",20),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"label",25),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"input",26),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).host=t})),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,8,"twoFactorDuoDesc")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,10,"twoFactorDuoIntegrationKey")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.ikey),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(21,12,"twoFactorDuoSecretKey")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.skey),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,14,"twoFactorDuoApiHostname")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(33,16,"ex")," api-xxxxxxxx.duosecurity.com"),s.ɵɵproperty("ngModel",e.host)}}function C(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"enable")))}function E(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"disable")))}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,w,25,18,"ng-container",13),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,I,36,18,"ng-container",13),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",14),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"button",15),s.ɵɵtext(13,"\n "),s.ɵɵelement(14,"i",16),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,C,3,3,"span",13),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,E,3,3,"span",13),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"button",17),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(15,8,"loading")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.enabled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(24,10,"close"),"\n ")}}class k extends a.TwoFactorBaseComponent{constructor(e,t,n,i,o){super(e,t,n,i,o),this.type=r.TwoFactorProviderType.Duo}auth(e){super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(o.UpdateTwoFactorDuoRequest);return t.integrationKey=this.ikey,t.secretKey=this.skey,t.host=this.host,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){null!=this.organizationId?this.formPromise=this.apiService.putTwoFactorOrganizationDuo(this.organizationId,t):this.formPromise=this.apiService.putTwoFactorDuo(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){this.ikey=e.integrationKey,this.skey=e.secretKey,this.host=e.host,this.enabled=e.enabled}}t.TwoFactorDuoComponent=k,k.ɵfac=function(e){return new(e||k)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService),s.ɵɵdirectiveInject(u.UserVerificationService))},k.ɵcmp=s.ɵɵdefineComponent({type:k,selectors:[["app-two-factor-duo"]],features:[s.ɵɵInheritDefinitionFeature],decls:30,vars:8,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faDuoTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["title","2faDuoTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],["alt","Duo logo",1,"float-right","ml-3","mfaType2"],[1,"form-group"],["for","ikey"],["id","ikey","type","text","name","IntegrationKey","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],["for","skey"],["id","skey","type","password","name","SecretKey","required","","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"ngModel","ngModelChange"],["for","host"],["id","host","type","text","name","Host","required","","appInputVerbatim","",1,"form-control",3,"ngModel","placeholder","ngModelChange"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementStart(11,"small"),s.ɵɵtext(12,"Duo"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",5),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",6),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,b,2,2,"app-two-factor-verify",7),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,P,27,12,"form",8),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,4,"twoStepLogin"),"\n "),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,6,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!t.authed),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.authed))},directives:[m.A11yTitleDirective,h.NgIf,v.TwoFactorVerifyComponent,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.CalloutComponent,f.DefaultValueAccessor,f.RequiredValidator,x.InputVerbatimDirective,f.NgControlStatus,f.NgModel],pipes:[S.I18nPipe],encapsulation:2})},19902:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorEmailComponent=void 0;n(91092),n(40349),n(70143),n(99954),n(77243),n(61554);const r=n(3061),o=n(57976),a=n(7442),s=n(32879),l=n(32621),c=n(91092),d=n(40349),p=n(99954),u=n(70143),m=n(61554),h=n(77243),v=n(50553),f=n(57490),g=n(81918),y=n(96832),x=n(637),S=n(52900),b=n(966),w=n(72596);function I(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"app-two-factor-verify",9),l.ɵɵlistener("onAuthed",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext().auth(t)})),l.ɵɵtext(1,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵnextContext();l.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function C(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"app-callout",18),l.ɵɵpipe(3,"i18n"),l.ɵɵtext(4),l.ɵɵpipe(5,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(6,"\n "),l.ɵɵelementStart(7,"strong"),l.ɵɵtext(8),l.ɵɵpipe(9,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(10),l.ɵɵelementContainerEnd()),2&e){const e=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(3,4,"enabled")),l.ɵɵadvance(2),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(5,6,"twoStepLoginProviderEnabled"),"\n "),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("",l.ɵɵpipeBind1(9,8,"email"),":"),l.ɵɵadvance(2),l.ɵɵtextInterpolate1(" ",e.email,"\n ")}}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"span",31),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e){const e=l.ɵɵnextContext(3);l.ɵɵadvance(1),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind2(2,1,"verificationCodeEmailSent",e.sentEmail),"\n ")}}function P(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementContainerStart(0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"p",19),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"span",20),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7,"\n "),l.ɵɵelement(8,"img",21),l.ɵɵtext(9,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(10,"\n "),l.ɵɵelementStart(11,"div",22),l.ɵɵtext(12,"\n "),l.ɵɵelementStart(13,"label",23),l.ɵɵtext(14),l.ɵɵpipe(15,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(16,"\n "),l.ɵɵelementStart(17,"input",24),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).email=t})),l.ɵɵelementEnd(),l.ɵɵtext(18,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(19,"\n "),l.ɵɵelementStart(20,"div",25),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"button",26,27),l.ɵɵlistener("click",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).sendEmail()})),l.ɵɵtext(24,"\n "),l.ɵɵelement(25,"i",16),l.ɵɵpipe(26,"i18n"),l.ɵɵtext(27,"\n "),l.ɵɵelementStart(28,"span"),l.ɵɵtext(29),l.ɵɵpipe(30,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(31,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(32,"\n "),l.ɵɵtemplate(33,E,3,4,"span",28),l.ɵɵtext(34,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(35,"\n "),l.ɵɵelementStart(36,"div",22),l.ɵɵtext(37,"\n "),l.ɵɵelementStart(38,"label",29),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41,"\n "),l.ɵɵelementStart(42,"input",30),l.ɵɵlistener("ngModelChange",(function(t){l.ɵɵrestoreView(e);return l.ɵɵnextContext(2).token=t})),l.ɵɵelementEnd(),l.ɵɵtext(43,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(44,"\n "),l.ɵɵelementContainerEnd()}if(2&e){const e=l.ɵɵreference(23),t=l.ɵɵnextContext(2);l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,10,"twoFactorEmailDesc")),l.ɵɵadvance(9),l.ɵɵtextInterpolate1("1. ",l.ɵɵpipeBind1(15,12,"twoFactorEmailEnterEmail"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.email),l.ɵɵadvance(5),l.ɵɵproperty("appApiAction",t.emailPromise)("disabled",e.loading),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(26,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(30,16,"sendEmail")),l.ɵɵadvance(4),l.ɵɵproperty("ngIf",t.sentEmail),l.ɵɵadvance(6),l.ɵɵtextInterpolate1("2. ",l.ɵɵpipeBind1(40,18,"twoFactorEmailEnterCode"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.token)}}function k(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"enable")))}function A(e,t){1&e&&(l.ɵɵelementStart(0,"span"),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()),2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(2,1,"disable")))}function O(e,t){if(1&e){const e=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"form",10,11),l.ɵɵlistener("ngSubmit",(function(){l.ɵɵrestoreView(e);return l.ɵɵnextContext().submit()})),l.ɵɵtext(2,"\n "),l.ɵɵelementStart(3,"div",12),l.ɵɵtext(4,"\n "),l.ɵɵtemplate(5,C,11,10,"ng-container",13),l.ɵɵtext(6,"\n "),l.ɵɵtemplate(7,P,45,20,"ng-container",13),l.ɵɵtext(8,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(9,"\n "),l.ɵɵelementStart(10,"div",14),l.ɵɵtext(11,"\n "),l.ɵɵelementStart(12,"button",15),l.ɵɵtext(13,"\n "),l.ɵɵelement(14,"i",16),l.ɵɵpipe(15,"i18n"),l.ɵɵtext(16,"\n "),l.ɵɵtemplate(17,k,3,3,"span",13),l.ɵɵtext(18,"\n "),l.ɵɵtemplate(19,A,3,3,"span",13),l.ɵɵtext(20,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementStart(22,"button",17),l.ɵɵtext(23),l.ɵɵpipe(24,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(25,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(26,"\n "),l.ɵɵelementEnd()}if(2&e){const e=l.ɵɵreference(1),t=l.ɵɵnextContext();l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(5),l.ɵɵproperty("ngIf",t.enabled),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.enabled),l.ɵɵadvance(5),l.ɵɵproperty("disabled",e.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(15,8,"loading")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",!t.enabled),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.enabled),l.ɵɵadvance(4),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(24,10,"close"),"\n ")}}class T extends s.TwoFactorBaseComponent{constructor(e,t,n,i,r,a){super(e,t,n,i,r),this.stateService=a,this.type=o.TwoFactorProviderType.Email}auth(e){return super.auth(e),this.processResponse(e.response)}submit(){return this.enabled?super.disable(this.formPromise):this.enable()}sendEmail(){return i(this,void 0,void 0,(function*(){try{const e=yield this.buildRequestModel(r.TwoFactorEmailRequest);e.email=this.email,this.emailPromise=this.apiService.postTwoFactorEmailSetup(e),yield this.emailPromise,this.sentEmail=this.email}catch(e){this.logService.error(e)}}))}enable(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(a.UpdateTwoFactorEmailRequest);return t.email=this.email,t.token=this.token,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorEmail(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}processResponse(e){return i(this,void 0,void 0,(function*(){this.token=null,this.email=e.email,this.enabled=e.enabled,this.enabled||null!=this.email&&""!==this.email||(this.email=yield this.stateService.getEmail())}))}}t.TwoFactorEmailComponent=T,T.ɵfac=function(e){return new(e||T)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(d.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.LogService),l.ɵɵdirectiveInject(m.UserVerificationService),l.ɵɵdirectiveInject(h.StateService))},T.ɵcmp=l.ɵɵdefineComponent({type:T,selectors:[["app-two-factor-email"]],features:[l.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faEmailTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faEmailTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],[1,"d-flex"],[1,"mr-3"],["alt","Email logo",1,"float-right","ml-auto","mfaType1"],[1,"form-group"],["for","email"],["id","email","type","text","name","Email","required","","inputmode","email","appInputVerbatim","false",1,"form-control",3,"ngModel","ngModelChange"],[1,"mb-3","d-flex"],["type","button",1,"btn","btn-outline-primary","btn-sm","btn-submit","align-self-start",3,"appApiAction","disabled","click"],["sendBtn",""],["class","text-success ml-3",4,"ngIf"],["for","token"],["id","token","type","text","name","Token","required","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"text-success","ml-3"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1,"\n "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3,"\n "),l.ɵɵelementStart(4,"div",2),l.ɵɵtext(5,"\n "),l.ɵɵelementStart(6,"div",3),l.ɵɵtext(7,"\n "),l.ɵɵelementStart(8,"h2",4),l.ɵɵtext(9),l.ɵɵpipe(10,"i18n"),l.ɵɵelementStart(11,"small"),l.ɵɵtext(12),l.ɵɵpipe(13,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(14,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(15,"\n "),l.ɵɵelementStart(16,"button",5),l.ɵɵpipe(17,"i18n"),l.ɵɵtext(18,"\n "),l.ɵɵelementStart(19,"span",6),l.ɵɵtext(20,"×"),l.ɵɵelementEnd(),l.ɵɵtext(21,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(22,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(23,"\n "),l.ɵɵtemplate(24,I,2,2,"app-two-factor-verify",7),l.ɵɵtext(25,"\n "),l.ɵɵtemplate(26,O,27,12,"form",8),l.ɵɵtext(27,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(28,"\n "),l.ɵɵelementEnd(),l.ɵɵtext(29,"\n"),l.ɵɵelementEnd(),l.ɵɵtext(30,"\n")),2&e&&(l.ɵɵadvance(9),l.ɵɵtextInterpolate1("\n ",l.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(13,7,"emailTitle")),l.ɵɵadvance(4),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(17,9,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",!t.authed),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.authed))},directives:[v.A11yTitleDirective,f.NgIf,g.TwoFactorVerifyComponent,y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.CalloutComponent,y.DefaultValueAccessor,y.RequiredValidator,b.InputVerbatimDirective,y.NgControlStatus,y.NgModel],pipes:[w.I18nPipe],encapsulation:2})},24648:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorRecoveryComponent=void 0;n(40349);const i=n(57976),r=n(32621),o=n(40349),a=n(50553),s=n(57490),l=n(81918),c=n(72596);function d(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-two-factor-verify",9),r.ɵɵlistener("onAuthed",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().auth(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function p(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"p"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"code",14),r.ɵɵtext(7),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(4,2,"twoFactorRecoveryYourCode"),":"),r.ɵɵadvance(4),r.ɵɵtextInterpolate(e.code)}}function u(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"twoFactorRecoveryNoCode"),"\n "))}function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",15),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).print()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"printCode"),"\n "))}function h(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",10),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,p,9,4,"ng-container",8),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,u,3,3,"ng-container",8),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",11),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,m,3,3,"button",12),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",13),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.code),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.code),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.code),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(15,4,"close"),"\n ")}}class v{constructor(e){this.i18nService=e,this.type=-1,this.twoFactorProviderType=i.TwoFactorProviderType}auth(e){this.authed=!0,this.processResponse(e.response)}print(){const e=window.open();e.document.write('<div style="font-size: 18px; text-align: center;"><p>'+this.i18nService.t("twoFactorRecoveryYourCode")+":</p><code style=\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;\">"+this.code+'</code></div><p style="text-align: center;">'+new Date+"</p>"),e.onafterprint=()=>e.close(),e.print()}formatString(e){return null==e?null:e.replace(/(.{4})/g,"$1 ").trim().toUpperCase()}processResponse(e){this.code=this.formatString(e.code)}}t.TwoFactorRecoveryComponent=v,v.ɵfac=function(e){return new(e||v)(r.ɵɵdirectiveInject(o.I18nService))},v.ɵcmp=r.ɵɵdefineComponent({type:v,selectors:[["app-two-factor-recovery"]],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faRecoveryTitle",1,"modal","fade"],["role","document",1,"modal-dialog"],[1,"modal-content"],[1,"modal-header"],["id","2faRecoveryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],[4,"ngIf"],[3,"organizationId","type","onAuthed"],[1,"modal-body","text-center"],[1,"modal-footer"],["type","button","class","btn btn-primary",3,"click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-lg"],["type","button",1,"btn","btn-primary",3,"click"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementStart(11,"small"),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"button",5),r.ɵɵpipe(17,"i18n"),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"span",6),r.ɵɵtext(20,"×"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,d,2,2,"app-two-factor-verify",7),r.ɵɵtext(25,"\n "),r.ɵɵtemplate(26,h,18,6,"ng-container",8),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(30,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,7,"recoveryCodeTitle")),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(17,9,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.authed),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.authed))},directives:[a.A11yTitleDirective,s.NgIf,l.TwoFactorVerifyComponent],pipes:[c.I18nPipe],encapsulation:2})},90211:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorSetupComponent=void 0;const r=n(32621),o=(n(91092),n(36424),n(10685),n(77243),n(25906)),a=(n(29546),n(40251)),s=n(57976),l=n(58782),c=n(23821),d=n(19902),p=n(24648),u=n(5136),m=n(65091),h=n(32621),v=n(91092),f=n(29546),g=n(36424),y=n(10685),x=n(77243),S=n(57490),b=n(52900),w=n(80507),I=n(72596),C=["recoveryTemplate"],E=["authenticatorTemplate"],P=["yubikeyTemplate"],k=["duoTemplate"],A=["emailTemplate"],O=["webAuthnTemplate"];function T(e,t){1&e&&(h.ɵɵelementStart(0,"p"),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(2,1,"twoStepLoginDesc")))}function M(e,t){1&e&&(h.ɵɵelementStart(0,"p"),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(2,1,"twoStepLoginOrganizationDesc")))}function D(e,t){if(1&e){const e=h.ɵɵgetCurrentView();h.ɵɵelementStart(0,"app-callout",12),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"p"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5,"\n "),h.ɵɵelementStart(6,"button",13),h.ɵɵlistener("click",(function(){h.ɵɵrestoreView(e);return h.ɵɵnextContext().recoveryCode()})),h.ɵɵtext(7),h.ɵɵpipe(8,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(9,"\n"),h.ɵɵelementEnd()}2&e&&(h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,2,"twoStepLoginRecoveryWarning")),h.ɵɵadvance(4),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(8,4,"viewRecoveryCode"),"\n "))}function B(e,t){1&e&&(h.ɵɵelementStart(0,"small"),h.ɵɵtext(1,"\n "),h.ɵɵelement(2,"i",14),h.ɵɵpipe(3,"i18n"),h.ɵɵtext(4,"\n "),h.ɵɵelementStart(5,"span",15),h.ɵɵtext(6),h.ɵɵpipe(7,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(8,"\n "),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(3,2,"loading")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(7,4,"loading")))}function R(e,t){1&e&&(h.ɵɵelementStart(0,"app-callout",12),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()),2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(2,1,"twoStepLoginPolicyUserWarning"),"\n"))}function U(e,t){1&e&&(h.ɵɵelementContainerStart(0),h.ɵɵtext(1,"\n "),h.ɵɵelement(2,"i",24),h.ɵɵpipe(3,"i18n"),h.ɵɵtext(4,"\n "),h.ɵɵelementStart(5,"span",15),h.ɵɵtext(6),h.ɵɵpipe(7,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(8,"\n "),h.ɵɵelementContainerEnd()),2&e&&(h.ɵɵadvance(2),h.ɵɵpropertyInterpolate("title",h.ɵɵpipeBind1(3,2,"enabled")),h.ɵɵadvance(4),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(7,4,"enabled")))}function V(e,t){if(1&e){const e=h.ɵɵgetCurrentView();h.ɵɵelementStart(0,"a",25),h.ɵɵlistener("click",(function(){h.ɵɵrestoreView(e);return h.ɵɵnextContext(2).premiumRequired()})),h.ɵɵtext(1),h.ɵɵpipe(2,"i18n"),h.ɵɵelementEnd()}2&e&&(h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(2,1,"premium"),"\n "))}function F(e,t){if(1&e){const e=h.ɵɵgetCurrentView();h.ɵɵelementStart(0,"li",16),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"div",17),h.ɵɵtext(3,"\n "),h.ɵɵelement(4,"img",18),h.ɵɵtext(5,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(6,"\n "),h.ɵɵelementStart(7,"div",19),h.ɵɵtext(8,"\n "),h.ɵɵelementStart(9,"h3",20),h.ɵɵtext(10),h.ɵɵtemplate(11,U,9,6,"ng-container",1),h.ɵɵtext(12,"\n "),h.ɵɵtemplate(13,V,3,3,"a",21),h.ɵɵtext(14,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(15),h.ɵɵelementEnd(),h.ɵɵtext(16,"\n "),h.ɵɵelementStart(17,"div",22),h.ɵɵtext(18,"\n "),h.ɵɵelementStart(19,"button",23),h.ɵɵlistener("click",(function(){const t=h.ɵɵrestoreView(e).$implicit;return h.ɵɵnextContext().manage(t.type)})),h.ɵɵtext(20),h.ɵɵpipe(21,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(22,"\n "),h.ɵɵelementEnd(),h.ɵɵtext(23,"\n "),h.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=h.ɵɵnextContext();h.ɵɵadvance(4),h.ɵɵclassMap("mfaType"+e.type),h.ɵɵproperty("alt",e.name+" logo"),h.ɵɵadvance(6),h.ɵɵtextInterpolate1("\n ",e.name,"\n "),h.ɵɵadvance(1),h.ɵɵproperty("ngIf",e.enabled),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!n.canAccessPremium&&e.premium),h.ɵɵadvance(2),h.ɵɵtextInterpolate1("\n ",e.description,"\n "),h.ɵɵadvance(4),h.ɵɵproperty("disabled",!n.canAccessPremium&&e.premium),h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(21,9,"manage"),"\n ")}}function N(e,t){}function _(e,t){}function j(e,t){}function z(e,t){}function L(e,t){}function K(e,t){}const q=function(e){return{"mt-5":e}};class G{constructor(e,t,n,i,r){this.apiService=e,this.modalService=t,this.messagingService=n,this.policyService=i,this.stateService=r,this.providers=[],this.showPolicyWarning=!1,this.loading=!0}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium();for(const e in o.TwoFactorProviders){if(!o.TwoFactorProviders.hasOwnProperty(e))continue;const t=o.TwoFactorProviders[e];this.filterProvider(t.type)||this.providers.push({type:t.type,name:t.name,description:t.description,enabled:!1,premium:t.premium,sort:t.sort})}this.providers.sort(((e,t)=>e.sort-t.sort)),yield this.load()}))}load(){return i(this,void 0,void 0,(function*(){this.loading=!0;(yield this.getTwoFactorProviders()).data.forEach((e=>{this.providers.forEach((t=>{e.type===t.type&&(t.enabled=e.enabled)}))})),this.evaluatePolicies(),this.loading=!1}))}manage(e){return i(this,void 0,void 0,(function*(){switch(e){case s.TwoFactorProviderType.Authenticator:(yield this.openModal(this.authenticatorModalRef,l.TwoFactorAuthenticatorComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,s.TwoFactorProviderType.Authenticator)}));break;case s.TwoFactorProviderType.Yubikey:(yield this.openModal(this.yubikeyModalRef,m.TwoFactorYubiKeyComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,s.TwoFactorProviderType.Yubikey)}));break;case s.TwoFactorProviderType.Duo:(yield this.openModal(this.duoModalRef,c.TwoFactorDuoComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,s.TwoFactorProviderType.Duo)}));break;case s.TwoFactorProviderType.Email:(yield this.openModal(this.emailModalRef,d.TwoFactorEmailComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,s.TwoFactorProviderType.Email)}));break;case s.TwoFactorProviderType.WebAuthn:(yield this.openModal(this.webAuthnModalRef,u.TwoFactorWebAuthnComponent)).onUpdated.subscribe((e=>{this.updateStatus(e,s.TwoFactorProviderType.WebAuthn)}))}}))}recoveryCode(){this.openModal(this.recoveryModalRef,p.TwoFactorRecoveryComponent)}premiumRequired(){return i(this,void 0,void 0,(function*(){this.canAccessPremium||this.messagingService.send("premiumRequired")}))}getTwoFactorProviders(){return this.apiService.getTwoFactorProviders()}filterProvider(e){return e===s.TwoFactorProviderType.OrganizationDuo}openModal(e,t){return i(this,void 0,void 0,(function*(){const[n,i]=yield this.modalService.openViewRef(t,e);return this.modal=n,i}))}updateStatus(e,t){e||null==this.modal||this.modal.close(),this.providers.forEach((n=>{n.type===t&&(n.enabled=e)})),this.evaluatePolicies()}evaluatePolicies(){return i(this,void 0,void 0,(function*(){null==this.organizationId&&1===this.providers.filter((e=>e.enabled)).length?this.showPolicyWarning=yield this.policyService.policyAppliesToUser(a.PolicyType.TwoFactorAuthentication):this.showPolicyWarning=!1}))}}t.TwoFactorSetupComponent=G,G.ɵfac=function(e){return new(e||G)(h.ɵɵdirectiveInject(v.ApiService),h.ɵɵdirectiveInject(f.ModalService),h.ɵɵdirectiveInject(g.MessagingService),h.ɵɵdirectiveInject(y.PolicyService),h.ɵɵdirectiveInject(x.StateService))},G.ɵcmp=h.ɵɵdefineComponent({type:G,selectors:[["app-two-factor-setup"]],viewQuery:function(e,t){if(1&e&&(h.ɵɵviewQuery(C,7,r.ViewContainerRef),h.ɵɵviewQuery(E,7,r.ViewContainerRef),h.ɵɵviewQuery(P,7,r.ViewContainerRef),h.ɵɵviewQuery(k,7,r.ViewContainerRef),h.ɵɵviewQuery(A,7,r.ViewContainerRef),h.ɵɵviewQuery(O,7,r.ViewContainerRef)),2&e){let e;h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.recoveryModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.authenticatorModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.yubikeyModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.duoModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.emailModalRef=e.first),h.ɵɵqueryRefresh(e=h.ɵɵloadQuery())&&(t.webAuthnModalRef=e.first)}},decls:44,vars:15,consts:[[1,"page-header"],[4,"ngIf"],["type","warning",4,"ngIf"],[3,"ngClass"],[1,"list-group","list-group-2fa"],["class","list-group-item d-flex align-items-center",4,"ngFor","ngForOf"],["authenticatorTemplate",""],["recoveryTemplate",""],["duoTemplate",""],["emailTemplate",""],["yubikeyTemplate",""],["webAuthnTemplate",""],["type","warning"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-fw","text-muted",3,"title"],[1,"sr-only"],[1,"list-group-item","d-flex","align-items-center"],[1,"logo-2fa","d-flex","justify-content-center"],[3,"alt"],[1,"mx-4"],[1,"mb-0"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary","btn-sm",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-check","text-success","bwi-fw",3,"title"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"]],template:function(e,t){1&e&&(h.ɵɵelementStart(0,"div",0),h.ɵɵtext(1,"\n "),h.ɵɵelementStart(2,"h1"),h.ɵɵtext(3),h.ɵɵpipe(4,"i18n"),h.ɵɵelementEnd(),h.ɵɵtext(5,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(6,"\n"),h.ɵɵtemplate(7,T,3,3,"p",1),h.ɵɵtext(8,"\n"),h.ɵɵtemplate(9,M,3,3,"p",1),h.ɵɵtext(10,"\n"),h.ɵɵtemplate(11,D,10,6,"app-callout",2),h.ɵɵtext(12,"\n"),h.ɵɵelementStart(13,"h2",3),h.ɵɵtext(14),h.ɵɵpipe(15,"i18n"),h.ɵɵtemplate(16,B,9,6,"small",1),h.ɵɵtext(17,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(18,"\n"),h.ɵɵtemplate(19,R,3,3,"app-callout",2),h.ɵɵtext(20,"\n"),h.ɵɵelementStart(21,"ul",4),h.ɵɵtext(22,"\n "),h.ɵɵtemplate(23,F,24,11,"li",5),h.ɵɵtext(24,"\n"),h.ɵɵelementEnd(),h.ɵɵtext(25,"\n\n"),h.ɵɵtemplate(26,N,0,0,"ng-template",null,6,h.ɵɵtemplateRefExtractor),h.ɵɵtext(28,"\n"),h.ɵɵtemplate(29,_,0,0,"ng-template",null,7,h.ɵɵtemplateRefExtractor),h.ɵɵtext(31,"\n"),h.ɵɵtemplate(32,j,0,0,"ng-template",null,8,h.ɵɵtemplateRefExtractor),h.ɵɵtext(34,"\n"),h.ɵɵtemplate(35,z,0,0,"ng-template",null,9,h.ɵɵtemplateRefExtractor),h.ɵɵtext(37,"\n"),h.ɵɵtemplate(38,L,0,0,"ng-template",null,10,h.ɵɵtemplateRefExtractor),h.ɵɵtext(40,"\n"),h.ɵɵtemplate(41,K,0,0,"ng-template",null,11,h.ɵɵtemplateRefExtractor),h.ɵɵtext(43,"\n")),2&e&&(h.ɵɵadvance(3),h.ɵɵtextInterpolate(h.ɵɵpipeBind1(4,9,"twoStepLogin")),h.ɵɵadvance(4),h.ɵɵproperty("ngIf",!t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",!t.organizationId),h.ɵɵadvance(2),h.ɵɵproperty("ngClass",h.ɵɵpureFunction1(13,q,!t.organizationId)),h.ɵɵadvance(1),h.ɵɵtextInterpolate1("\n ",h.ɵɵpipeBind1(15,11,"providers"),"\n "),h.ɵɵadvance(2),h.ɵɵproperty("ngIf",t.loading),h.ɵɵadvance(3),h.ɵɵproperty("ngIf",t.showPolicyWarning),h.ɵɵadvance(4),h.ɵɵproperty("ngForOf",t.providers))},directives:[S.NgIf,S.NgClass,S.NgForOf,b.CalloutComponent,w.StopClickDirective],pipes:[I.I18nPipe],encapsulation:2})},81918:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorVerifyComponent=void 0;const r=n(32621),o=n(57976),a=n(97583),s=(n(91092),n(70143),n(61554),n(32621)),l=n(91092),c=n(70143),d=n(61554),p=n(96832),u=n(637),m=n(38287),h=n(72596);class v{constructor(e,t,n){this.apiService=e,this.logService=t,this.userVerificationService=n,this.onAuthed=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){let e;try{this.formPromise=this.userVerificationService.buildRequest(this.secret).then((t=>(e=this.secret.type===a.VerificationType.MasterPassword?t.masterPasswordHash:t.otp,this.apiCall(t))));const t=yield this.formPromise;this.onAuthed.emit({response:t,secret:e,verificationType:this.secret.type})}catch(t){this.logService.error(t)}}))}apiCall(e){switch(this.type){case-1:return this.apiService.getTwoFactorRecover(e);case o.TwoFactorProviderType.Duo:case o.TwoFactorProviderType.OrganizationDuo:return null!=this.organizationId?this.apiService.getTwoFactorOrganizationDuo(this.organizationId,e):this.apiService.getTwoFactorDuo(e);case o.TwoFactorProviderType.Email:return this.apiService.getTwoFactorEmail(e);case o.TwoFactorProviderType.WebAuthn:return this.apiService.getTwoFactorWebAuthn(e);case o.TwoFactorProviderType.Authenticator:return this.apiService.getTwoFactorAuthenticator(e);case o.TwoFactorProviderType.Yubikey:return this.apiService.getTwoFactorYubiKey(e)}}}t.TwoFactorVerifyComponent=v,v.ɵfac=function(e){return new(e||v)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.LogService),s.ɵɵdirectiveInject(d.UserVerificationService))},v.ɵcmp=s.ɵɵdefineComponent({type:v,selectors:[["app-two-factor-verify"]],inputs:{type:"type",organizationId:"organizationId"},outputs:{onAuthed:"onAuthed"},decls:31,vars:15,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["ngDefaultControl","","name","secret",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"p"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"app-verify-master-password",3),s.ɵɵlistener("ngModelChange",(function(e){return t.secret=e})),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",4),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",5),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"i",6),s.ɵɵpipe(18,"i18n"),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"span"),s.ɵɵtext(21),s.ɵɵpipe(22,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"button",7),s.ɵɵtext(26),s.ɵɵpipe(27,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n")),2&e){const e=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,7,"twoStepLoginAuthDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.secret),s.ɵɵadvance(6),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(18,9,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(22,11,"continue")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(27,13,"close"),"\n ")}},directives:[p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.VerifyMasterPasswordComponent,p.DefaultValueAccessor,p.NgControlStatus,p.NgModel],pipes:[h.I18nPipe],encapsulation:2})},5136:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorWebAuthnComponent=void 0;n(32621),n(91092),n(40349),n(70143),n(99954),n(61554);const r=n(57976),o=n(44980),a=n(62417),s=n(67564),l=n(32879),c=n(32621),d=n(91092),p=n(40349),u=n(99954),m=n(70143),h=n(61554),v=n(50553),f=n(57490),g=n(81918),y=n(96832),x=n(637),S=n(52900),b=n(80507),w=n(72596);function I(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"app-two-factor-verify",9),c.ɵɵlistener("onAuthed",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().auth(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext();c.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function C(e,t){1&e&&(c.ɵɵelementStart(0,"app-callout",31),c.ɵɵpipe(1,"i18n"),c.ɵɵtext(2),c.ɵɵpipe(3,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,2,"enabled")),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function E(e,t){if(1&e&&(c.ɵɵelementStart(0,"strong"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().index;c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind2(2,1,"webAuthnkeyX",e+1))}}function P(e,t){if(1&e&&(c.ɵɵelementStart(0,"strong"),c.ɵɵtext(1),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(1),c.ɵɵtextInterpolate(e.name)}}function k(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"span"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,1,"webAuthnMigrated")))}function A(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,k,6,3,"ng-container",25),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext().$implicit;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.migrated)}}function O(e,t){1&e&&(c.ɵɵelement(0,"i",37),c.ɵɵpipe(1,"i18n")),2&e&&c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,1,"loading"))}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,O,2,3,"i",35),c.ɵɵtext(3,"\n -\n "),c.ɵɵelementStart(4,"a",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(2).remove(t)})),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()}if(2&e){c.ɵɵnextContext();const e=c.ɵɵreference(1);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loading),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,2,"remove"))}}function M(e,t){if(1&e&&(c.ɵɵelementStart(0,"li",32,33),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",34),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,E,3,4,"strong",25),c.ɵɵtext(6,"\n "),c.ɵɵtemplate(7,P,2,1,"strong",25),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,A,4,1,"ng-container",25),c.ɵɵtext(10,"\n "),c.ɵɵtemplate(11,T,8,4,"ng-container",25),c.ɵɵtext(12,"\n "),c.ɵɵelementEnd()),2&e){const e=t.$implicit,n=c.ɵɵreference(1),i=c.ɵɵnextContext(2);c.ɵɵproperty("appApiAction",e.removePromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",!e.configured||!e.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.configured&&e.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.configured&&!n.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",i.keysConfiguredCount>1&&e.configured)}}function D(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",38),c.ɵɵtext(3,"\n "),c.ɵɵelementContainerEnd())}function B(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",38),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fWaiting"),"...\n "))}function R(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",39),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fClickSave"),"\n "))}function U(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",40),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"twoFactorU2fProblemReadingTryAgain"),"\n "))}function V(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,B,5,3,"ng-container",25),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,R,5,3,"ng-container",25),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,U,5,3,"ng-container",25),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnListening),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnResponse),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.webAuthnError)}}function F(e,t){1&e&&(c.ɵɵelement(0,"i",41),c.ɵɵpipe(1,"i18n")),2&e&&c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(1,1,"loading"))}function N(e,t){1&e&&(c.ɵɵelementStart(0,"span"),c.ɵɵtext(1),c.ɵɵpipe(2,"i18n"),c.ɵɵelementEnd()),2&e&&(c.ɵɵadvance(1),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(2,1,"save")))}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",42,43),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).disable()})),c.ɵɵtext(2,"\n "),c.ɵɵelement(3,"i",41),c.ɵɵpipe(4,"i18n"),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"span"),c.ɵɵtext(7),c.ɵɵpipe(8,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(9,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵnextContext(2);c.ɵɵproperty("appApiAction",t.disablePromise)("disabled",e.loading),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(4,4,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"form",10,11),c.ɵɵlistener("ngSubmit",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().submit()})),c.ɵɵtext(2,"\n "),c.ɵɵelementStart(3,"div",12),c.ɵɵtext(4,"\n "),c.ɵɵtemplate(5,C,4,6,"app-callout",13),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"app-callout",14),c.ɵɵtext(8,"\n "),c.ɵɵelementStart(9,"p"),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12,"\n "),c.ɵɵelementStart(13,"ul",15),c.ɵɵtext(14,"\n "),c.ɵɵelementStart(15,"li"),c.ɵɵtext(16),c.ɵɵpipe(17,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(18,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(19,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(20,"\n "),c.ɵɵelement(21,"img",16),c.ɵɵtext(22,"\n "),c.ɵɵelementStart(23,"ul",17),c.ɵɵtext(24,"\n "),c.ɵɵtemplate(25,M,13,5,"li",18),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelement(28,"hr"),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"p"),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33,"\n "),c.ɵɵelementStart(34,"ol"),c.ɵɵtext(35,"\n "),c.ɵɵelementStart(36,"li"),c.ɵɵtext(37),c.ɵɵpipe(38,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(39,"\n "),c.ɵɵelementStart(40,"li"),c.ɵɵtext(41),c.ɵɵpipe(42,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(43,"\n "),c.ɵɵelementStart(44,"li"),c.ɵɵtext(45),c.ɵɵpipe(46,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵelementStart(48,"li"),c.ɵɵtext(49),c.ɵɵpipe(50,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(51,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(52,"\n "),c.ɵɵelementStart(53,"div",19),c.ɵɵtext(54,"\n "),c.ɵɵelementStart(55,"div",20),c.ɵɵtext(56,"\n "),c.ɵɵelementStart(57,"label",21),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60,"\n "),c.ɵɵelementStart(61,"input",22),c.ɵɵlistener("ngModelChange",(function(t){c.ɵɵrestoreView(e);return c.ɵɵnextContext().name=t})),c.ɵɵelementEnd(),c.ɵɵtext(62,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(64,"\n "),c.ɵɵelementStart(65,"button",23,24),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext().readKey()})),c.ɵɵtext(67),c.ɵɵpipe(68,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(69,"\n "),c.ɵɵtemplate(70,D,4,0,"ng-container",25),c.ɵɵtext(71,"\n "),c.ɵɵtemplate(72,V,8,3,"ng-container",25),c.ɵɵtext(73,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(74,"\n "),c.ɵɵelementStart(75,"div",26),c.ɵɵtext(76,"\n "),c.ɵɵelementStart(77,"button",27),c.ɵɵtext(78,"\n "),c.ɵɵtemplate(79,F,2,3,"i",28),c.ɵɵtext(80,"\n "),c.ɵɵtemplate(81,N,3,3,"span",25),c.ɵɵtext(82,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(83,"\n "),c.ɵɵtemplate(84,_,10,8,"button",29),c.ɵɵtext(85,"\n "),c.ɵɵelementStart(86,"button",30),c.ɵɵtext(87),c.ɵɵpipe(88,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(89,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(90,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵreference(1),t=c.ɵɵreference(66),n=c.ɵɵnextContext();c.ɵɵproperty("appApiAction",n.formPromise),c.ɵɵadvance(5),c.ɵɵproperty("ngIf",n.enabled),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,23,"twoFactorWebAuthnWarning")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(17,25,"twoFactorWebAuthnSupportWeb")),c.ɵɵadvance(9),c.ɵɵproperty("ngForOf",n.keys),c.ɵɵadvance(6),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(32,27,"twoFactorWebAuthnAdd"),":"),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(38,29,"twoFactorU2fGiveName")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(42,31,"twoFactorU2fPlugInReadKey")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(46,33,"twoFactorU2fTouchButton")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(50,35,"twoFactorU2fSaveForm")),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,37,"name")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",n.name)("disabled",!n.keyIdAvailable),c.ɵɵadvance(4),c.ɵɵproperty("disabled",t.loading||n.webAuthnListening||!n.keyIdAvailable)("appApiAction",n.challengePromise),c.ɵɵadvance(2),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(68,39,"readKey"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading),c.ɵɵadvance(5),c.ɵɵproperty("disabled",e.loading||!n.webAuthnResponse),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.loading),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",n.enabled),c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(88,41,"close"),"\n ")}}class z extends l.TwoFactorBaseComponent{constructor(e,t,n,i,o,a){super(e,t,n,o,a),this.ngZone=i,this.type=r.TwoFactorProviderType.WebAuthn,this.keyIdAvailable=null,this.keysConfiguredCount=0}auth(e){super.auth(e),this.processResponse(e.response)}submit(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){if(null==this.webAuthnResponse||null==this.keyIdAvailable)return Promise.reject();const t=yield this.buildRequestModel(s.UpdateTwoFactorWebAuthnRequest);return t.deviceResponse=this.webAuthnResponse,t.id=this.keyIdAvailable,t.name=this.name,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorWebAuthn(t);const e=yield this.formPromise;yield this.processResponse(e)}))))}))}disable(){return super.disable(this.formPromise)}remove(e){return i(this,void 0,void 0,(function*(){if(this.keysConfiguredCount<=1||null!=e.removePromise)return;const t=null!=e.name?e.name:this.i18nService.t("webAuthnkeyX",e.id);if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("removeU2fConfirmation"),t,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return;const n=yield this.buildRequestModel(a.UpdateTwoFactorWebAuthnDeleteRequest);n.id=e.id;try{e.removePromise=this.apiService.deleteTwoFactorWebAuthn(n);const t=yield e.removePromise;e.removePromise=null,yield this.processResponse(t)}catch(i){this.logService.error(i)}}))}readKey(){return i(this,void 0,void 0,(function*(){if(null==this.keyIdAvailable)return;const e=yield this.buildRequestModel(o.SecretVerificationRequest);try{this.challengePromise=this.apiService.getTwoFactorWebAuthnChallenge(e);const t=yield this.challengePromise;this.readDevice(t)}catch(t){this.logService.error(t)}}))}readDevice(e){console.log("listening for key..."),this.resetWebAuthn(!0),navigator.credentials.create({publicKey:e}).then((e=>{this.ngZone.run((()=>{this.webAuthnListening=!1,this.webAuthnResponse=e}))})).catch((e=>{console.error(e),this.resetWebAuthn(!1),this.webAuthnError=!0}))}resetWebAuthn(e=!1){this.webAuthnResponse=null,this.webAuthnError=!1,this.webAuthnListening=e}processResponse(e){this.resetWebAuthn(),this.keys=[],this.keyIdAvailable=null,this.name=null,this.keysConfiguredCount=0;for(let t=1;t<=5;t++){if(null!=e.keys){const n=e.keys.filter((e=>e.id===t));if(n.length>0){this.keysConfiguredCount++,this.keys.push({id:t,name:n[0].name,configured:!0,migrated:n[0].migrated,removePromise:null});continue}}this.keys.push({id:t,name:null,configured:!1,removePromise:null}),null==this.keyIdAvailable&&(this.keyIdAvailable=t)}this.enabled=e.enabled}}t.TwoFactorWebAuthnComponent=z,z.ɵfac=function(e){return new(e||z)(c.ɵɵdirectiveInject(d.ApiService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(c.NgZone),c.ɵɵdirectiveInject(m.LogService),c.ɵɵdirectiveInject(h.UserVerificationService))},z.ɵcmp=c.ɵɵdefineComponent({type:z,selectors:[["app-two-factor-webauthn"]],features:[c.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faU2fTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faU2fTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["alt","FIDO2 WebAuthn logo'",1,"float-right","ml-5","mfaType7"],[1,"bwi-ul"],[3,"appApiAction",4,"ngFor","ngForOf"],[1,"row"],[1,"form-group","col-6"],["for","name"],["id","name","type","text","name","Name",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary","mr-2",3,"disabled","appApiAction","click"],["readKeyBtn",""],[4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],[3,"appApiAction"],["removeKeyBtn",""],[1,"bwi","bwi-li","bwi-key"],["class","bwi bwi-spin bwi-spinner text-muted bwi-fw","aria-hidden","true",3,"title",4,"ngIf"],["href","#","appStopClick","",3,"click"],["aria-hidden","true",1,"bwi","bwi-spin","bwi-spinner","text-muted","bwi-fw",3,"title"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted"],["aria-hidden","true",1,"bwi","bwi-check-circle","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-danger"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"div",2),c.ɵɵtext(5,"\n "),c.ɵɵelementStart(6,"div",3),c.ɵɵtext(7,"\n "),c.ɵɵelementStart(8,"h2",4),c.ɵɵtext(9),c.ɵɵpipe(10,"i18n"),c.ɵɵelementStart(11,"small"),c.ɵɵtext(12),c.ɵɵpipe(13,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(14,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(15,"\n "),c.ɵɵelementStart(16,"button",5),c.ɵɵpipe(17,"i18n"),c.ɵɵtext(18,"\n "),c.ɵɵelementStart(19,"span",6),c.ɵɵtext(20,"×"),c.ɵɵelementEnd(),c.ɵɵtext(21,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(22,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(23,"\n "),c.ɵɵtemplate(24,I,2,2,"app-two-factor-verify",7),c.ɵɵtext(25,"\n "),c.ɵɵtemplate(26,j,91,43,"form",8),c.ɵɵtext(27,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(28,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(29,"\n"),c.ɵɵelementEnd(),c.ɵɵtext(30,"\n")),2&e&&(c.ɵɵadvance(9),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(10,5,"twoStepLogin"),"\n "),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(13,7,"webAuthnTitle")),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(17,9,"close")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",!t.authed),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.authed))},directives:[v.A11yTitleDirective,f.NgIf,g.TwoFactorVerifyComponent,y.NgControlStatusGroup,y.NgForm,x.ApiActionDirective,S.CalloutComponent,f.NgForOf,y.DefaultValueAccessor,y.NgControlStatus,y.NgModel,b.StopClickDirective],pipes:[w.I18nPipe],encapsulation:2})},65091:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorYubiKeyComponent=void 0;n(91092),n(40349),n(70143),n(99954),n(61554);const r=n(77186),o=n(57976),a=n(32879),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(61554),m=n(50553),h=n(57490),v=n(81918),f=n(96832),g=n(637),y=n(52900),x=n(966),S=n(72596);function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-two-factor-verify",9),s.ɵɵlistener("onAuthed",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().auth(t)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("organizationId",e.organizationId)("type",e.type)}}function w(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",29),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"enabled")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"twoStepLoginProviderEnabled"),"\n "))}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"input",34),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().$implicit.key=t})),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(),t=e.index,n=e.$implicit;s.ɵɵpropertyInterpolate1("id","key",t+1,""),s.ɵɵpropertyInterpolate1("name","Key",t+1,""),s.ɵɵproperty("ngModel",n.key)}}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",35),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span",36),s.ɵɵtext(3),s.ɵɵelementEnd(),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"button",37),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(2).remove(t)})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",38),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext().$implicit;s.ɵɵadvance(3),s.ɵɵtextInterpolate(e.existingKey),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,2,"remove"))}}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",30),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",31),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,I,1,3,"input",32),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,C,11,4,"div",33),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=t.index;s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","key",n+1,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,4,"yubikeyX",n+1)),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.existingKey),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.existingKey)}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",39,40),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).disable()})),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",26),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"span"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext(2);s.ɵɵproperty("appApiAction",t.disablePromise)("disabled",e.loading),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(4,4,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function k(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"form",10,11),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().submit()})),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"div",12),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,w,4,6,"app-callout",13),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"app-callout",14),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"p"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"ul",15),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"li"),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"li"),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"img",16),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"p"),s.ɵɵtext(28),s.ɵɵpipe(29,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"ol"),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"li"),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"li"),s.ɵɵtext(38),s.ɵɵpipe(39,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"li"),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"li"),s.ɵɵtext(46),s.ɵɵpipe(47,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelement(50,"hr"),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"div",17),s.ɵɵtext(53,"\n "),s.ɵɵtemplate(54,E,10,7,"div",18),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"strong",19),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"div",20),s.ɵɵtext(62,"\n "),s.ɵɵelementStart(63,"input",21),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().nfc=t})),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementStart(65,"label",22),s.ɵɵtext(66),s.ɵɵpipe(67,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(68,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"small",23),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(74,"\n "),s.ɵɵelementStart(75,"div",24),s.ɵɵtext(76,"\n "),s.ɵɵelementStart(77,"button",25),s.ɵɵtext(78,"\n "),s.ɵɵelement(79,"i",26),s.ɵɵpipe(80,"i18n"),s.ɵɵtext(81,"\n "),s.ɵɵelementStart(82,"span"),s.ɵɵtext(83),s.ɵɵpipe(84,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(86,"\n "),s.ɵɵtemplate(87,P,10,8,"button",27),s.ɵɵtext(88,"\n "),s.ɵɵelementStart(89,"button",28),s.ɵɵtext(90),s.ɵɵpipe(91,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(92,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext();s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,20,"twoFactorYubikeyWarning")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,22,"twoFactorYubikeySupportUsb")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(21,24,"twoFactorYubikeySupportMobile")),s.ɵɵadvance(8),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(29,26,"twoFactorYubikeyAdd"),":"),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,28,"twoFactorYubikeyPlugIn")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(39,30,"twoFactorYubikeySelectKey")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,32,"twoFactorYubikeyTouchButton")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(47,34,"twoFactorYubikeySaveForm")),s.ɵɵadvance(8),s.ɵɵproperty("ngForOf",t.keys),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,36,"nfcSupport")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",t.nfc),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(67,38,"twoFactorYubikeySupportsNfc")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(72,40,"twoFactorYubikeySupportsNfcDesc")),s.ɵɵadvance(6),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(80,42,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(84,44,"save")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.enabled),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(91,46,"close"),"\n ")}}class A extends a.TwoFactorBaseComponent{constructor(e,t,n,i,r){super(e,t,n,i,r),this.type=o.TwoFactorProviderType.Yubikey,this.nfc=!1}auth(e){super.auth(e),this.processResponse(e.response)}submit(){const e=Object.create(null,{enable:{get:()=>super.enable}});return i(this,void 0,void 0,(function*(){const t=yield this.buildRequestModel(r.UpdateTwoFactorYubioOtpRequest);return t.key1=null!=this.keys&&this.keys.length>0?this.keys[0].key:null,t.key2=null!=this.keys&&this.keys.length>1?this.keys[1].key:null,t.key3=null!=this.keys&&this.keys.length>2?this.keys[2].key:null,t.key4=null!=this.keys&&this.keys.length>3?this.keys[3].key:null,t.key5=null!=this.keys&&this.keys.length>4?this.keys[4].key:null,t.nfc=this.nfc,e.enable.call(this,(()=>i(this,void 0,void 0,(function*(){this.formPromise=this.apiService.putTwoFactorYubiKey(t);const e=yield this.formPromise;yield this.processResponse(e),this.platformUtilsService.showToast("success",null,this.i18nService.t("yubikeysUpdated"))}))))}))}disable(){return super.disable(this.disablePromise)}remove(e){e.existingKey=null,e.key=null}processResponse(e){this.enabled=e.enabled,this.keys=[{key:e.key1,existingKey:this.padRight(e.key1)},{key:e.key2,existingKey:this.padRight(e.key2)},{key:e.key3,existingKey:this.padRight(e.key3)},{key:e.key4,existingKey:this.padRight(e.key4)},{key:e.key5,existingKey:this.padRight(e.key5)}],this.nfc=e.nfc||!e.enabled}padRight(e,t="•",n=44){if(null==e||null==t||e.length>=n)return e;const i=(n-e.length)/t.length;for(let r=0;r<i;r++)e+=t;return e}}t.TwoFactorYubiKeyComponent=A,A.ɵfac=function(e){return new(e||A)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService),s.ɵɵdirectiveInject(u.UserVerificationService))},A.ɵcmp=s.ɵɵdefineComponent({type:A,selectors:[["app-two-factor-yubikey"]],features:[s.ɵɵInheritDefinitionFeature],decls:30,vars:8,consts:[["role","dialog","aria-modal","true","aria-labelledby","2faYubiKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-lg"],[1,"modal-content"],[1,"modal-header"],["id","2faYubiKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[3,"organizationId","type","onAuthed",4,"ngIf"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit",4,"ngIf"],[3,"organizationId","type","onAuthed"],["ngNativeValidate","","autocomplete","off",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-body"],["type","success","icon","bwi bwi-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["alt","YubiKey OTP security key logo",1,"float-right","mfaType3"],[1,"row"],["class","form-group col-6",4,"ngFor","ngForOf"],[1,"d-block","mb-2"],[1,"form-check"],["type","checkbox","id","nfc","name","Nfc",1,"form-check-input",3,"ngModel","ngModelChange"],["for","nfc",1,"form-check-label"],[1,"form-text","text-muted"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","class","btn btn-outline-secondary btn-submit",3,"appApiAction","disabled","click",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["type","success","icon","bwi bwi-check-circle",3,"title"],[1,"form-group","col-6"],[3,"for"],["type","password","class","form-control","appInputVerbatim","","autocomplete","new-password",3,"id","name","ngModel","ngModelChange",4,"ngIf"],["class","d-flex",4,"ngIf"],["type","password","appInputVerbatim","","autocomplete","new-password",1,"form-control",3,"id","name","ngModel","ngModelChange"],[1,"d-flex"],[1,"mr-2"],["type","button",1,"btn","btn-link","text-danger","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementStart(11,"small"),s.ɵɵtext(12,"YubiKey"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",5),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"span",6),s.ɵɵtext(19,"×"),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵtemplate(23,b,2,2,"app-two-factor-verify",7),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,k,94,48,"form",8),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(10,4,"twoStepLogin"),"\n "),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,6,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",!t.authed),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.authed))},directives:[m.A11yTitleDirective,h.NgIf,v.TwoFactorVerifyComponent,f.NgControlStatusGroup,f.NgForm,g.ApiActionDirective,y.CalloutComponent,h.NgForOf,f.CheckboxControlValueAccessor,f.NgControlStatus,f.NgModel,f.DefaultValueAccessor,x.InputVerbatimDirective],pipes:[S.I18nPipe],encapsulation:2})},61099:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateKeyComponent=void 0;n(91092),n(68062),n(82058),n(4349),n(40349),n(70143),n(36424),n(99954),n(2173);const r=n(57509),o=n(82041),a=n(45022),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(82058),u=n(36424),m=n(2173),h=n(4349),v=n(68062),f=n(70143),g=n(96832),y=n(637),x=n(50553),S=n(52900),b=n(17302),w=n(966),I=n(72596);class C{constructor(e,t,n,i,r,o,a,s,l){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.cryptoService=i,this.messagingService=r,this.syncService=o,this.folderService=a,this.cipherService=s,this.logService=l}submit(){return i(this,void 0,void 0,(function*(){if(!(yield this.cryptoService.hasEncKey()))if(null!=this.masterPassword&&""!==this.masterPassword)try{this.formPromise=this.makeRequest().then((e=>this.apiService.postAccountKey(e))),yield this.formPromise,this.platformUtilsService.showToast("success",this.i18nService.t("keyUpdated"),this.i18nService.t("logBackInOthersToo"),{timeout:15e3}),this.messagingService.send("logout")}catch(e){this.logService.error(e)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired"))}))}makeRequest(){return i(this,void 0,void 0,(function*(){const e=yield this.cryptoService.getKey(),t=yield this.cryptoService.makeEncKey(e),n=yield this.cryptoService.getPrivateKey();let i=null;null!=n&&(i=yield this.cryptoService.encrypt(n,t[0]));const s=new a.UpdateKeyRequest;s.privateKey=null!=i?i.encryptedString:null,s.key=t[1].encryptedString,s.masterPasswordHash=yield this.cryptoService.hashPassword(this.masterPassword,null),yield this.syncService.fullSync(!0);const l=yield this.folderService.getAllDecrypted();for(let r=0;r<l.length;r++){if(null==l[r].id)continue;const e=yield this.folderService.encrypt(l[r],t[0]);s.folders.push(new o.FolderWithIdRequest(e))}const c=yield this.cipherService.getAllDecrypted();for(let o=0;o<c.length;o++){if(null!=c[o].organizationId)continue;const e=yield this.cipherService.encrypt(c[o],t[0]);s.ciphers.push(new r.CipherWithIdRequest(e))}return s}))}}t.UpdateKeyComponent=C,C.ɵfac=function(e){return new(e||C)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.MessagingService),s.ɵɵdirectiveInject(m.SyncService),s.ɵɵdirectiveInject(h.FolderService),s.ɵɵdirectiveInject(v.CipherService),s.ɵɵdirectiveInject(f.LogService))},C.ɵcmp=s.ɵɵdefineComponent({type:C,selectors:[["app-update-key"]],decls:63,vars:33,consts:[["role","dialog","aria-modal","true","aria-labelledby","updateEncKeyTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","updateEncKeyTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["href","https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key","target","_blank","rel","noopener"],["type","warning"],["for","masterPassword"],["id","masterPassword","type","password","name","MasterPasswordHash","required","","appAutofocus","","appInputVerbatim","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"button",6),s.ɵɵpipe(14,"i18n"),s.ɵɵtext(15,"\n "),s.ɵɵelementStart(16,"span",7),s.ɵɵtext(17,"×"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"div",8),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"p"),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵpipe(26,"i18n"),s.ɵɵelementStart(27,"a",9),s.ɵɵtext(28),s.ɵɵpipe(29,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"app-callout",10),s.ɵɵtext(33),s.ɵɵpipe(34,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"label",11),s.ɵɵtext(37),s.ɵɵpipe(38,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"input",12),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"div",13),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"button",14),s.ɵɵtext(46,"\n "),s.ɵɵelement(47,"i",15),s.ɵɵpipe(48,"i18n"),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"span"),s.ɵɵtext(51),s.ɵɵpipe(52,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"button",16),s.ɵɵtext(56),s.ɵɵpipe(57,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(59,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(62,"\n")),2&e){const e=s.ɵɵreference(5);s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,13,"updateEncryptionKey")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(14,15,"close")),s.ɵɵadvance(11),s.ɵɵtextInterpolate2("\n ",s.ɵɵpipeBind1(25,17,"updateEncryptionKeyShortDesc")," ",s.ɵɵpipeBind1(26,19,"updateEncryptionKeyDesc"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(29,21,"learnMore")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(34,23,"updateEncryptionKeyWarning")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(38,25,"masterPass")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.masterPassword),s.ɵɵadvance(5),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(48,27,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(52,29,"updateEncryptionKey")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(57,31,"close"),"\n ")}},directives:[g.NgControlStatusGroup,g.NgForm,y.ApiActionDirective,x.A11yTitleDirective,S.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,b.AutofocusDirective,w.InputVerbatimDirective,g.NgControlStatus,g.NgModel],pipes:[I.I18nPipe],encapsulation:2})},30029:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UpdateLicenseComponent=void 0;const r=n(32621),o=(n(91092),n(40349),n(70143),n(99954),n(32621)),a=n(91092),s=n(40349),l=n(99954),c=n(70143),d=n(96832),p=n(637),u=n(72596);class m{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.onUpdated=new r.EventEmitter,this.onCanceled=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){const e=document.getElementById("file").files;if(null!=e&&0!==e.length)try{const t=new FormData;t.append("license",e[0]);let n=null;n=null==this.organizationId?this.apiService.postAccountLicense(t):this.apiService.postOrganizationLicenseUpdate(this.organizationId,t),this.formPromise=n.then((()=>this.apiService.refreshIdentityToken())),yield this.formPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("updatedLicense")),this.onUpdated.emit()}catch(t){this.logService.error(t)}else this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile"))}))}cancel(){this.onCanceled.emit()}}t.UpdateLicenseComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.ApiService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.PlatformUtilsService),o.ɵɵdirectiveInject(c.LogService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-update-license"]],inputs:{organizationId:"organizationId"},outputs:{onUpdated:"onUpdated",onCanceled:"onCanceled"},decls:31,vars:18,consts:[["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"form-group"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary",3,"click"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"form",0,1),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(2,"\n "),o.ɵɵelementStart(3,"div",2),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"label",3),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelement(9,"input",4),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"small",5),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"button",6),o.ɵɵtext(17,"\n "),o.ɵɵelement(18,"i",7),o.ɵɵpipe(19,"i18n"),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"span"),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementStart(26,"button",8),o.ɵɵlistener("click",(function(){return t.cancel()})),o.ɵɵtext(27),o.ɵɵpipe(28,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n")),2&e){const e=o.ɵɵreference(1);o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,7,"licenseFile")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(13,9,"licenseFileDesc",t.organizationId?"bitwarden_organization_license.json":"bitwarden_premium_license.json")),o.ɵɵadvance(4),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(19,12,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,14,"submit")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(28,16,"cancel"),"\n ")}},directives:[d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective],pipes:[u.I18nPipe],encapsulation:2})},25440:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserBillingComponent=void 0;n(91092),n(40349),n(70143),n(99954);const r=n(6127),o=n(93921),a=n(33885),s=n(32621),l=n(91092),c=n(40349),d=n(99954),p=n(70143),u=n(57490),m=n(76187),h=n(52900),v=n(96832),f=n(637),g=n(3068),y=n(50553),x=n(72596),S=function(e){return{"bwi-spin":e}};function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",3),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().load()})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(5,S,e.loading)),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,3,"refresh"),"\n ")}}function w(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",5),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",6),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",14),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).addCredit()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"addCredit"),"\n "))}function C(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-add-credit",15),s.ɵɵlistener("onAdded",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closeAddCredit(!0)}))("onCanceled",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closeAddCredit(!1)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵproperty("organizationId",e.organizationId)}}function E(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noPaymentMethod")))}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-callout",18),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelementStart(3,"p"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"form",19,20),s.ɵɵlistener("ngSubmit",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyBank()})),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"label",21),s.ɵɵtext(12),s.ɵɵpipe(13,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"div",22),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",23),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",24),s.ɵɵtext(20,"$0."),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"input",25),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyAmount1=t})),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"label",26),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",22),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",23),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",24),s.ɵɵtext(35,"$0."),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"input",27),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).verifyAmount2=t})),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"button",28),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",29),s.ɵɵpipe(44,"i18n"),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"span"),s.ɵɵtext(47),s.ɵɵpipe(48,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(9),t=s.ɵɵnextContext(3);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,11,"verifyBankAccount")),s.ɵɵadvance(4),s.ɵɵtextInterpolate2("",s.ɵɵpipeBind1(5,13,"verifyBankAccountDesc")," ",s.ɵɵpipeBind1(6,15,"verifyBankAccountFailureWarning"),""),s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.verifyBankPromise),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(13,17,"amount","1")),s.ɵɵadvance(11),s.ɵɵproperty("ngModel",t.verifyAmount1),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(28,20,"amount","2")),s.ɵɵadvance(11),s.ɵɵproperty("ngModel",t.verifyAmount2),s.ɵɵadvance(3),s.ɵɵproperty("disabled",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(44,23,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(48,25,"verifyBankAccount"))}}function k(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"inAppPurchase")))}const A=function(e,t,n,i,r,o){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-money":n,"bwi-paypal text-primary":i,"bwi-apple text-muted":r,"bwi-google text-muted":o}};function O(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,P,52,27,"app-callout",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"p"),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",17),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,k,3,3,"span",2),s.ɵɵtext(9),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSource.type===e.paymentMethodType.BankAccount&&e.paymentSource.needsVerification),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction6(4,A,e.paymentSource.type===e.paymentMethodType.Card,e.paymentSource.type===e.paymentMethodType.BankAccount,e.paymentSource.type===e.paymentMethodType.Check,e.paymentSource.type===e.paymentMethodType.PayPal,e.paymentSource.type===e.paymentMethodType.AppleInApp,e.paymentSource.type===e.paymentMethodType.GoogleInApp)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSourceInApp),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.paymentSource.description,"\n ")}}function T(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",14),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).changePayment()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,e.paymentSource?"changePaymentMethod":"addPaymentMethod"),"\n ")}}function M(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-adjust-payment",30),s.ɵɵlistener("onAdjusted",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closePayment(!0)}))("onCanceled",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).closePayment(!1)})),s.ɵɵtext(1,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵproperty("currentType",null!=e.paymentSource?e.paymentSource.type:null)("organizationId",e.organizationId)}}function D(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noInvoices")))}function B(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",36),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"paid"),"\n "))}function R(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",37),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,1,"unpaid"),"\n "))}function U(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td"),s.ɵɵtext(3),s.ɵɵpipe(4,"date"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"td"),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"a",33),s.ɵɵpipe(9,"i18n"),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"i",34),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"a",35),s.ɵɵpipe(14,"i18n"),s.ɵɵtext(15),s.ɵɵpipe(16,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"td"),s.ɵɵtext(20),s.ɵɵpipe(21,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"td"),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,B,5,3,"span",2),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,R,5,3,"span",2),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,9,e.date,"mediumDate")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("href",e.pdfUrl,s.ɵɵsanitizeUrl),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(9,12,"downloadInvoice")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("href",e.url,s.ɵɵsanitizeUrl),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(14,14,"viewInvoice")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(16,16,"invoiceNumber",e.number),""),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(21,19,e.amount,"$")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.paid),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.paid)}}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",31),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,U,30,22,"tr",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.invoices)}}function F(e,t){1&e&&(s.ɵɵelementStart(0,"p"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"noTransactions")))}function N(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"chargeNoun"),"\n "))}function _(e,t){1&e&&(s.ɵɵelementStart(0,"span"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(2,1,"refundNoun")))}const j=function(e,t,n,i){return{"bwi-credit-card":e,"bwi-bank":t,"bwi-bitcoin text-warning":n,"bwi-paypal text-primary":i}};function z(e,t){if(1&e&&s.ɵɵelement(0,"i",40),2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(3);s.ɵɵproperty("ngClass",s.ɵɵpureFunction4(1,j,e.paymentMethodType===t.paymentMethodType.Card,e.paymentMethodType===t.paymentMethodType.BankAccount||e.paymentMethodType===t.paymentMethodType.WireTransfer,e.paymentMethodType===t.paymentMethodType.BitPay,e.paymentMethodType===t.paymentMethodType.PayPal))}}const L=function(e){return{"text-strike":e}};function K(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td"),s.ɵɵtext(3),s.ɵɵpipe(4,"date"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"td"),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,N,3,3,"span",2),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,_,3,3,"span",2),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"td"),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,z,1,6,"i",38),s.ɵɵtext(16),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"td",39),s.ɵɵpipe(19,"i18n"),s.ɵɵtext(20),s.ɵɵpipe(21,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(4,8,e.createdDate,"mediumDate")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.type===n.transactionType.Charge||e.type===n.transactionType.Credit),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.type===n.transactionType.Refund),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",e.paymentMethodType),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.details,"\n "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(19,11,e.refunded?"refunded":"")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(16,L,e.refunded)),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(21,13,e.amount,"$"),"\n ")}}function q(e,t){if(1&e&&(s.ɵɵelementStart(0,"table",31),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"tbody"),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,K,23,18,"tr",32),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngForOf",e.transactions)}}function G(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h2"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"p",7),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"strong"),s.ɵɵtext(9),s.ɵɵpipe(10,"currency"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"p"),s.ɵɵtext(14),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,I,3,3,"button",8),s.ɵɵtext(18,"\n "),s.ɵɵtemplate(19,C,2,1,"app-add-credit",9),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"h2",10),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,E,3,3,"p",2),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,O,11,11,"ng-container",2),s.ɵɵtext(28,"\n "),s.ɵɵtemplate(29,T,3,3,"button",8),s.ɵɵtext(30,"\n "),s.ɵɵtemplate(31,M,2,2,"app-adjust-payment",11),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"h2",10),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵtemplate(37,D,3,3,"p",2),s.ɵɵtext(38,"\n "),s.ɵɵtemplate(39,V,7,1,"table",12),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"h2",10),s.ɵɵtext(42),s.ɵɵpipe(43,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵtemplate(45,F,3,3,"p",2),s.ɵɵtext(46,"\n "),s.ɵɵtemplate(47,q,7,1,"table",12),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"small",13),s.ɵɵtext(50),s.ɵɵpipe(51,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n"),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,17,e.isCreditBalance?"accountCredit":"accountBalance")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(10,19,e.creditOrBalance,"$")),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(15,22,"creditAppliedDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.showAddCredit),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.showAddCredit),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,24,"paymentMethod")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.paymentSource),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.paymentSource),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.showAdjustPayment),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.showAdjustPayment),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,26,"invoices")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.invoices||!e.invoices.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.invoices&&e.invoices.length),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(43,28,"transactions")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.transactions||!e.transactions.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.transactions&&e.transactions.length),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("* ",s.ɵɵpipeBind2(51,30,"chargesStatement","BITWARDEN"),"")}}class W{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i,this.loading=!1,this.firstLoaded=!1,this.showAdjustPayment=!1,this.showAddCredit=!1,this.paymentMethodType=r.PaymentMethodType,this.transactionType=o.TransactionType}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.firstLoaded=!0}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.loading=!0,null!=this.organizationId?this.billing=yield this.apiService.getOrganizationBilling(this.organizationId):this.billing=yield this.apiService.getUserBilling(),this.loading=!1)}))}verifyBank(){return i(this,void 0,void 0,(function*(){if(!this.loading)try{const e=new a.VerifyBankRequest;e.amount1=this.verifyAmount1,e.amount2=this.verifyAmount2,this.verifyBankPromise=this.apiService.postOrganizationVerifyBank(this.organizationId,e),yield this.verifyBankPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("verifiedBankAccount")),this.load()}catch(e){this.logService.error(e)}}))}addCredit(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("addCredit"),null,null,"warning"):this.showAddCredit=!0}closeAddCredit(e){this.showAddCredit=!1,e&&this.load()}changePayment(){this.paymentSourceInApp?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t("changePaymentMethod"),null,null,"warning"):this.showAdjustPayment=!0}closePayment(e){this.showAdjustPayment=!1,e&&this.load()}get isCreditBalance(){return null==this.billing||this.billing.balance<=0}get creditOrBalance(){return Math.abs(null!=this.billing?this.billing.balance:0)}get paymentSource(){return null!=this.billing?this.billing.paymentSource:null}get paymentSourceInApp(){return null!=this.paymentSource&&(this.paymentSource.type===r.PaymentMethodType.AppleInApp||this.paymentSource.type===r.PaymentMethodType.GoogleInApp)}get invoices(){return null!=this.billing?this.billing.invoices:null}get transactions(){return null!=this.billing?this.billing.transactions:null}}t.UserBillingComponent=W,W.ɵfac=function(e){return new(e||W)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(p.LogService))},W.ɵcmp=s.ɵɵdefineComponent({type:W,selectors:[["app-user-billing"]],decls:13,vars:6,consts:[[1,"page-header","d-flex"],["class","btn btn-sm btn-outline-primary ml-auto",3,"disabled","click",4,"ngIf"],[4,"ngIf"],[1,"btn","btn-sm","btn-outline-primary","ml-auto",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-refresh","bwi-fw",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"text-lg"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],[3,"organizationId","onAdded","onCanceled",4,"ngIf"],[1,"spaced-header"],[3,"currentType","organizationId","onAdjusted","onCanceled",4,"ngIf"],["class","table mb-2",4,"ngIf"],[1,"text-muted"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[3,"organizationId","onAdded","onCanceled"],["type","warning",3,"title",4,"ngIf"],[1,"bwi","bwi-fw",3,"ngClass"],["type","warning",3,"title"],["ngNativeValidate","",1,"form-inline",3,"appApiAction","ngSubmit"],["verifyForm",""],["for","verifyAmount1",1,"sr-only"],[1,"input-group","mr-2"],[1,"input-group-prepend"],[1,"input-group-text"],["type","number","id","verifyAmount1","placeholder","xx","name","Amount1","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["for","verifyAmount2",1,"sr-only"],["type","number","id","verifyAmount2","placeholder","xx","name","Amount2","min","1","max","99","step","1","required","",1,"form-control",3,"ngModel","ngModelChange"],["type","submit",1,"btn","btn-outline-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[3,"currentType","organizationId","onAdjusted","onCanceled"],[1,"table","mb-2"],[4,"ngFor","ngForOf"],["target","_blank","rel","noopener",1,"mr-2",3,"href","appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-file-pdf"],["target","_blank","rel","noopener",3,"href","title"],["aria-hidden","true",1,"bwi","bwi-check","text-success"],["aria-hidden","true",1,"bwi","bwi-exclamation-circle","text-muted"],["class","bwi bwi-fw","aria-hidden","true",3,"ngClass",4,"ngIf"],[3,"ngClass","title"],["aria-hidden","true",1,"bwi","bwi-fw",3,"ngClass"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,b,5,7,"button",1),s.ɵɵtext(7,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵtemplate(9,w,9,6,"ng-container",2),s.ɵɵtext(10,"\n"),s.ɵɵtemplate(11,G,53,33,"ng-container",2),s.ɵɵtext(12,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,4,"billing"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.firstLoaded),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.billing))},directives:[u.NgIf,u.NgClass,m.AddCreditComponent,h.CalloutComponent,v.NgControlStatusGroup,v.NgForm,f.ApiActionDirective,v.MinValidator,v.MaxValidator,v.NumberValueAccessor,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,g.AdjustPaymentComponent,u.NgForOf,y.A11yTitleDirective],pipes:[x.I18nPipe,u.CurrencyPipe,u.DatePipe],encapsulation:2})},55671:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UserSubscriptionComponent=void 0;n(68012),n(91092),n(40349),n(70143),n(99954),n(49613);const r=n(32621),o=n(49613),a=n(91092),s=n(99954),l=n(40349),c=n(68012),d=n(70143),p=n(57490),u=n(52900),m=n(637),h=n(50553),v=n(30029),f=n(96413),g=n(72596);function y(e,t){1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",2),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span",3),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n"),r.ɵɵelementContainerEnd()),2&e&&(r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,2,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(r.ɵɵelementStart(0,"app-callout",6),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"canceled")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"subscriptionCanceled"),""))}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-callout",6),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"p"),r.ɵɵtext(4),r.ɵɵpipe(5,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"button",7,8),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).reinstate()})),r.ɵɵtext(9,"\n "),r.ɵɵelement(10,"i",9),r.ɵɵpipe(11,"i18n"),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"span"),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(8),t=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,6,"pendingCancellation")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(5,8,"subscriptionPendingCanceled")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.reinstatePromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(11,10,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(15,12,"reinstateSubscription"))}}function w(e,t){if(1&e&&(r.ɵɵelementStart(0,"dd"),r.ɵɵtext(1),r.ɵɵpipe(2,"date"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(2,1,e.sub.expiration,"mediumDate"))}}function I(e,t){1&e&&(r.ɵɵelementStart(0,"dd"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"neverExpires")))}function C(e,t){if(1&e&&(r.ɵɵelementStart(0,"dl"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"dt"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,w,3,4,"dd",1),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,I,3,3,"dd",1),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,3,"expiration")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.sub.expiration),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.sub.expiration)}}function E(e,t){1&e&&(r.ɵɵelementStart(0,"span",15),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"pendingCancellation")))}function P(e,t){if(1&e&&(r.ɵɵelementStart(0,"tr"),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td"),r.ɵɵtext(3),r.ɵɵpipe(4,"currency"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"td"),r.ɵɵtext(7),r.ɵɵpipe(8,"currency"),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(3),r.ɵɵtextInterpolate3("\n ",e.name," ",e.quantity>1?"×"+e.quantity:""," @\n ",r.ɵɵpipeBind2(4,5,e.amount,"$"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate2("",r.ɵɵpipeBind2(8,8,e.quantity*e.amount,"$")," /",r.ɵɵpipeBind1(9,11,e.interval),"")}}function k(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"strong",17),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"table",18),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"tbody"),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,P,11,13,"tr",19),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,2,"details")),r.ɵɵadvance(7),r.ɵɵproperty("ngForOf",e.subscription.items)}}function A(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",10),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",11),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"dl"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"dt"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"dd"),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"span",12),r.ɵɵtext(13),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵtemplate(15,E,3,3,"span",13),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"dt"),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"dd"),r.ɵɵtext(23),r.ɵɵpipe(24,"date"),r.ɵɵpipe(25,"currency"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,k,14,4,"div",14),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"status")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.subscription&&e.subscription.status||"-"),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,8,"nextCharge")),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.nextInvoice?r.ɵɵpipeBind2(24,10,e.nextInvoice.date,"mediumDate")+", "+r.ɵɵpipeBind2(25,13,e.nextInvoice.amount,"$"):"-","\n "),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.subscription)}}function O(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",23),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",24),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!1)})),r.ɵɵpipe(5,"i18n"),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"span",26),r.ɵɵtext(8,"×"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3",27),r.ɵɵtext(12),r.ɵɵpipe(13,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"app-update-license",28),r.ɵɵlistener("onUpdated",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).closeUpdateLicense(!1)})),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(5,2,"cancel")),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(13,4,"updateLicense")))}function T(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div"),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).updateLicense()})),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"a",21),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵtemplate(13,O,19,6,"div",22),r.ɵɵtext(14,"\n "),r.ɵɵelementContainerEnd()}if(2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(6,3,"updateLicense"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(10,5,"manageSubscription"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.showUpdateLicense)}}function M(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).downloadLicense()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"downloadLicense"),"\n "))}function D(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",35,36),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(3).cancel()})),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",9),r.ɵɵpipe(4,"i18n"),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"span"),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext(3);r.ɵɵproperty("appApiAction",t.cancelPromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(4,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function B(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",29),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",20),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).adjustStorage(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",40),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).adjustStorage(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"addStorage"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"removeStorage"),"\n "))}function R(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"app-adjust-storage",41),r.ɵɵlistener("onAdjusted",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(4).closeStorage(!1)})),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(4);r.ɵɵproperty("storageGbPrice",4)("add",e.adjustStorageAdd)}}function U(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",37),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,B,10,6,"div",38),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,R,1,2,"app-adjust-storage",39),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.showAdjustStorage),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.showAdjustStorage)}}const V=function(e){return{width:e}};function F(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",29),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,M,3,3,"button",30),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,D,10,8,"button",31),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",32),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"p"),r.ɵɵtext(14),r.ɵɵpipe(15,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"div",33),r.ɵɵtext(18,"\n "),r.ɵɵelementStart(19,"div",34),r.ɵɵtext(20),r.ɵɵpipe(21,"percent"),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,U,9,2,"ng-container",1),r.ɵɵtext(25,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!e.subscription||!e.subscription.cancelled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(11,8,"storage")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind3(15,10,"subscriptionStorage",e.sub.maxStorageGb||0,e.sub.storageName||"0 MB")),r.ɵɵadvance(5),r.ɵɵproperty("ngStyle",r.ɵɵpureFunction1(16,V,e.storageProgressWidth+"%")),r.ɵɵattribute("aria-valuenow",e.storagePercentage),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(21,14,e.storagePercentage/100),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",e.subscription&&!e.subscription.cancelled&&!e.subscriptionMarkedForCancel)}}function N(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,S,4,6,"app-callout",4),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,b,18,14,"app-callout",4),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,C,10,5,"dl",1),r.ɵɵtext(7,"\n "),r.ɵɵtemplate(8,A,31,16,"div",5),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,T,15,7,"ng-container",1),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,F,26,18,"ng-container",1),r.ɵɵtext(13,"\n"),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscription&&e.subscription.cancelled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.subscriptionMarkedForCancel),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.selfHosted),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.selfHosted)}}class _{constructor(e,t,n,i,r,o){this.tokenService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=i,this.router=r,this.logService=o,this.loading=!1,this.firstLoaded=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.selfHosted=!1,this.selfHosted=n.isSelfHost()}ngOnInit(){return i(this,void 0,void 0,(function*(){yield this.load(),this.firstLoaded=!0}))}load(){return i(this,void 0,void 0,(function*(){this.loading||(this.tokenService.getPremium()?(this.loading=!0,this.sub=yield this.apiService.getUserSubscription(),this.loading=!1):this.router.navigate(["/settings/premium"]))}))}reinstate(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(this.usingInAppPurchase)return void this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning");if(yield this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel")))try{this.reinstatePromise=this.apiService.postReinstatePremium(),yield this.reinstatePromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("reinstated")),this.load()}catch(e){this.logService.error(e)}}))}cancel(){return i(this,void 0,void 0,(function*(){if(this.loading)return;if(this.usingInAppPurchase)return void this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning");if(yield this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning"))try{this.cancelPromise=this.apiService.postCancelPremium(),yield this.cancelPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("canceledSubscription")),this.load()}catch(e){this.logService.error(e)}}))}downloadLicense(){if(this.loading)return;const e=JSON.stringify(this.sub.license,null,2);this.platformUtilsService.saveFile(window,e,null,"bitwarden_premium_license.json")}updateLicense(){this.loading||(this.showUpdateLicense=!0)}closeUpdateLicense(e){this.showUpdateLicense=!1,e&&this.load()}adjustStorage(e){this.usingInAppPurchase?this.platformUtilsService.showDialog(this.i18nService.t("cannotPerformInAppPurchase"),this.i18nService.t(e?"addStorage":"removeStorage"),null,null,"warning"):(this.adjustStorageAdd=e,this.showAdjustStorage=!0)}closeStorage(e){this.showAdjustStorage=!1,e&&this.load()}get subscriptionMarkedForCancel(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate}get subscription(){return null!=this.sub?this.sub.subscription:null}get nextInvoice(){return null!=this.sub?this.sub.upcomingInvoice:null}get storagePercentage(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0}get storageProgressWidth(){return this.storagePercentage<5?5:0}get usingInAppPurchase(){return null!=this.sub&&this.sub.usingInAppPurchase}}t.UserSubscriptionComponent=_,_.ɵfac=function(e){return new(e||_)(r.ɵɵdirectiveInject(o.TokenService),r.ɵɵdirectiveInject(a.ApiService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.I18nService),r.ɵɵdirectiveInject(c.Router),r.ɵɵdirectiveInject(d.LogService))},_.ɵcmp=r.ɵɵdefineComponent({type:_,selectors:[["app-user-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","warning",3,"title",4,"ngIf"],["class","row",4,"ngIf"],["type","warning",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["reinstateBtn",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"row"],[1,"col-4"],[1,"text-capitalize"],["class","badge badge-warning",4,"ngIf"],["class","col-8",4,"ngIf"],[1,"badge","badge-warning"],[1,"col-8"],[1,"d-block","mb-1"],[1,"table"],[4,"ngFor","ngForOf"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["href","https://vault.bitwarden.com/#/settings/subscription","target","_blank","rel","noopener",1,"btn","btn-outline-secondary"],["class","card mt-3",4,"ngIf"],[1,"card","mt-3"],[1,"card-body"],["type","button",1,"close",3,"appA11yTitle","click"],["aria-hidden","true"],[1,"card-body-header"],[3,"onUpdated","onCanceled"],[1,"d-flex"],["type","button","class","btn btn-outline-secondary",3,"click",4,"ngIf"],["type","button","class","btn btn-outline-danger btn-submit ml-auto",3,"appApiAction","disabled","click",4,"ngIf"],[1,"spaced-header"],[1,"progress"],["role","progressbar","aria-valuemin","0","aria-valuemax","100",1,"progress-bar","bg-success",3,"ngStyle"],["type","button",1,"btn","btn-outline-danger","btn-submit","ml-auto",3,"appApiAction","disabled","click"],["cancelBtn",""],[1,"mt-3"],["class","d-flex",4,"ngIf"],[3,"storageGbPrice","add","onAdjusted","onCanceled",4,"ngIf"],["type","button",1,"ml-1","btn","btn-outline-secondary",3,"click"],[3,"storageGbPrice","add","onAdjusted","onCanceled"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h1"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵtemplate(5,y,9,6,"small",1),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n"),r.ɵɵtemplate(9,x,9,6,"ng-container",1),r.ɵɵtext(10,"\n"),r.ɵɵtemplate(11,N,14,6,"ng-container",1),r.ɵɵtext(12,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,4,"premiumMembership"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.sub))},directives:[p.NgIf,u.CalloutComponent,m.ApiActionDirective,p.NgForOf,h.A11yTitleDirective,v.UpdateLicenseComponent,p.NgStyle,f.AdjustStorageComponent],pipes:[g.I18nPipe,p.DatePipe,p.CurrencyPipe,p.PercentPipe],encapsulation:2})},98781:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutInputComponent=void 0;const i=n(96832),r=n(48701),o=n(32621),a=n(57490),s=n(96832),l=n(52900),c=n(72596);function d(e,t){if(1&e&&(o.ɵɵelementStart(0,"app-callout",8),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind3(2,1,"vaultTimeoutPolicyInEffect",e.vaultTimeoutPolicyHours,e.vaultTimeoutPolicyMinutes),"\n")}}function p(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",9),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.value),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function u(e,t){1&e&&(o.ɵɵelementStart(0,"div",10),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"label",11),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"div",12),o.ɵɵtext(7,"\n "),o.ɵɵelementStart(8,"div",13),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",14),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small"),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"div",13),o.ɵɵtext(18,"\n "),o.ɵɵelement(19,"input",15),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"small"),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(25,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"customVaultTimeout")),o.ɵɵadvance(10),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,5,"hours")),o.ɵɵadvance(9),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(23,7,"minutes")))}class m extends r.VaultTimeoutInputComponent{}t.VaultTimeoutInputComponent=m,m.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(m)))(t||m)}}(),m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-vault-timeout-input"]],features:[o.ɵɵProvidersFeature([{provide:i.NG_VALUE_ACCESSOR,multi:!0,useExisting:m},{provide:i.NG_VALIDATORS,multi:!0,useExisting:m}]),o.ɵɵInheritDefinitionFeature],decls:23,vars:10,consts:[["type","info",4,"ngIf"],[3,"formGroup"],[1,"form-group"],["for","vaultTimeout"],["id","vaultTimeout","name","VaultTimeout","formControlName","vaultTimeout",1,"form-control"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"form-text","text-muted"],["class","form-group","formGroupName","custom",4,"ngIf"],["type","info"],[3,"ngValue"],["formGroupName","custom",1,"form-group"],["for","customVaultTimeout"],[1,"row"],[1,"col-6"],["id","hours","type","number","min","0","name","hours","formControlName","hours",1,"form-control"],["id","minutes","type","number","min","0","name","minutes","formControlName","minutes",1,"form-control"]],template:function(e,t){1&e&&(o.ɵɵtemplate(0,d,3,5,"app-callout",0),o.ɵɵtext(1,"\n\n"),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",3),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementStart(10,"select",4),o.ɵɵtext(11,"\n "),o.ɵɵtemplate(12,p,2,2,"option",5),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"small",6),o.ɵɵtext(16),o.ɵɵpipe(17,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵtemplate(20,u,27,9,"div",7),o.ɵɵtext(21,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n")),2&e&&(o.ɵɵproperty("ngIf",t.vaultTimeoutPolicy),o.ɵɵadvance(2),o.ɵɵproperty("formGroup",t.form),o.ɵɵadvance(5),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,6,"vaultTimeout")),o.ɵɵadvance(5),o.ɵɵproperty("ngForOf",t.vaultTimeouts),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(17,8,"vaultTimeoutDesc")),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.showCustom))},directives:[a.NgIf,s.NgControlStatusGroup,s.FormGroupDirective,s.SelectControlValueAccessor,s.NgControlStatus,s.FormControlName,a.NgForOf,l.CalloutComponent,s.NgSelectOption,s.ɵNgSelectMultipleOption,s.FormGroupName,s.MinValidator,s.NumberValueAccessor,s.DefaultValueAccessor],pipes:[c.I18nPipe],encapsulation:2})},18720:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VerifyEmailComponent=void 0;n(91092),n(40349),n(70143),n(99954);const r=n(32621),o=n(91092),a=n(40349),s=n(99954),l=n(70143),c=n(637),d=n(72596);class p{constructor(e,t,n,i){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.logService=i}send(){return i(this,void 0,void 0,(function*(){if(null==this.actionPromise){try{this.actionPromise=this.apiService.postAccountVerifyEmail(),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("checkInboxForVerification"))}catch(e){this.logService.error(e)}this.actionPromise=null}}))}}t.VerifyEmailComponent=p,p.ɵfac=function(e){return new(e||p)(r.ɵɵdirectiveInject(o.ApiService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.LogService))},p.ɵcmp=r.ɵɵdefineComponent({type:p,selectors:[["app-verify-email"]],decls:27,vars:14,consts:[[1,"card","border-warning"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"bwi","bwi-envelope","bwi-fw"],[1,"card-body"],["type","button",1,"btn","btn-block","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["sendBtn",""],["aria-hidden","true",1,"bwi","bwi-spin","bwi-spinner",3,"title"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",2),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",3),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"p"),r.ɵɵtext(11),r.ɵɵpipe(12,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",4,5),r.ɵɵlistener("click",(function(){return t.send()})),r.ɵɵtext(16,"\n "),r.ɵɵelement(17,"i",6),r.ɵɵpipe(18,"i18n"),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"span"),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n")),2&e){const e=r.ɵɵreference(15);r.ɵɵadvance(5),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(6,6,"verifyEmail"),"\n "),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(12,8,"verifyEmailDesc")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.actionPromise)("disabled",e.loading),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(18,10,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(22,12,"sendEmail"),"\n ")}},directives:[c.ApiActionDirective],pipes:[d.I18nPipe],encapsulation:2})},95472:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BreachReportComponent=void 0;n(22501),n(77243);const r=n(32621),o=n(22501),a=n(77243),s=n(96832),l=n(637),c=n(57490),d=n(52900),p=n(72596);function u(e,t){1&e&&(r.ɵɵelementStart(0,"p"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(2,1,"reportError"),"..."))}function m(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",16),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"goodNews")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind2(3,4,"breachUsernameNotFound",e.checkedUsername),"\n ")}}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"app-callout",17),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"breachFound")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind3(3,4,"breachUsernameFound",e.checkedUsername,e.breachedAccounts.length),"\n ")}}function v(e,t){if(1&e&&(r.ɵɵelementStart(0,"li"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(1),r.ɵɵtextInterpolate(e)}}function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"li",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",3),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"img",22),r.ɵɵtext(7,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"div",23),r.ɵɵtext(10,"\n "),r.ɵɵelementStart(11,"h3",24),r.ɵɵtext(12),r.ɵɵelementEnd(),r.ɵɵtext(13,"\n "),r.ɵɵelement(14,"p",25),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"p",26),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"ul"),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,v,2,1,"li",27),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",28),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"dl"),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"dt"),r.ɵɵtext(31),r.ɵɵpipe(32,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementStart(34,"dd"),r.ɵɵtext(35),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"dt"),r.ɵɵtext(38),r.ɵɵpipe(39,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"dd"),r.ɵɵtext(42),r.ɵɵpipe(43,"number"),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"dt"),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"dd"),r.ɵɵtext(50),r.ɵɵpipe(51,"date"),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementStart(53,"dt"),r.ɵɵtext(54),r.ɵɵpipe(55,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"dd"),r.ɵɵtext(58),r.ɵɵpipe(59,"date"),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(63,"\n "),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵadvance(6),r.ɵɵproperty("src",e.logoPath,r.ɵɵsanitizeUrl),r.ɵɵadvance(6),r.ɵɵtextInterpolate(e.title),r.ɵɵadvance(2),r.ɵɵproperty("innerHTML",e.description,r.ɵɵsanitizeHtml),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("",r.ɵɵpipeBind1(18,13,"compromisedData"),":"),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",e.dataClasses),r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(32,15,"website")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(e.domain),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(39,17,"affectedUsers")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(43,19,e.pwnCount)),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(47,21,"breachOccurred")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(51,23,e.breachDate,"mediumDate")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(55,26,"breachReported")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(59,28,e.addedDate,"mediumDate"))}}function g(e,t){if(1&e&&(r.ɵɵelementStart(0,"ul",18),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,f,64,31,"li",19),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(3);r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.breachedAccounts)}}function y(e,t){if(1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,m,4,7,"app-callout",13),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,h,4,8,"app-callout",14),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,g,4,1,"ul",15),r.ɵɵtext(7,"\n "),r.ɵɵelementContainerEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.breachedAccounts.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.breachedAccounts.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.breachedAccounts.length)}}function x(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",11),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,u,3,3,"p",12),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,y,8,3,"ng-container",12),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.error),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.error)}}class S{constructor(e,t){this.auditService=e,this.stateService=t,this.error=!1,this.breachedAccounts=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.username=yield this.stateService.getEmail()}))}submit(){return i(this,void 0,void 0,(function*(){this.error=!1,this.username=this.username.toLowerCase();try{this.formPromise=this.auditService.breachedAccounts(this.username),this.breachedAccounts=yield this.formPromise}catch(e){this.error=!0}this.checkedUsername=this.username}))}}t.BreachReportComponent=S,S.ɵfac=function(e){return new(e||S)(r.ɵɵdirectiveInject(o.AuditService),r.ɵɵdirectiveInject(a.StateService))},S.ɵcmp=r.ɵɵdefineComponent({type:S,selectors:[["app-breach-report"]],decls:43,vars:22,consts:[[1,"page-header"],["ngNativeValidate","",3,"appApiAction","ngSubmit"],["form",""],[1,"row"],[1,"form-group","col-6"],["for","username"],["id","username","type","text","name","Username","required","",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],[1,"mt-4"],[4,"ngIf"],["type","success",3,"title",4,"ngIf"],["type","danger",3,"title",4,"ngIf"],["class","list-group list-group-breach",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"list-group","list-group-breach"],["class","list-group-item min-height-fix",4,"ngFor","ngForOf"],[1,"list-group-item","min-height-fix"],[1,"col-2","text-center"],["alt","",1,"img-fluid",3,"src"],[1,"col-7"],[1,"text-lg"],[3,"innerHTML"],[1,"mb-1"],[4,"ngFor","ngForOf"],[1,"col-3"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h1"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n"),r.ɵɵelementStart(7,"p"),r.ɵɵtext(8),r.ɵɵpipe(9,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n"),r.ɵɵelementStart(11,"form",1,2),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"div",3),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"div",4),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"label",5),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"input",6),r.ɵɵlistener("ngModelChange",(function(e){return t.username=e})),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"small",7),r.ɵɵtext(25),r.ɵɵpipe(26,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"button",8),r.ɵɵtext(31,"\n "),r.ɵɵelement(32,"i",9),r.ɵɵpipe(33,"i18n"),r.ɵɵtext(34,"\n "),r.ɵɵelementStart(35,"span"),r.ɵɵtext(36),r.ɵɵpipe(37,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n"),r.ɵɵtemplate(41,x,6,2,"div",10),r.ɵɵtext(42,"\n")),2&e){const e=r.ɵɵreference(12);r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,10,"dataBreachReport")),r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(9,12,"breachDesc")),r.ɵɵadvance(3),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(8),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(20,14,"username")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.username),r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(26,16,"breachCheckUsernameEmail")),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(33,18,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(37,20,"checkBreaches")),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",!e.loading&&t.checkedUsername)}},directives:[s.NgControlStatusGroup,s.NgForm,l.ApiActionDirective,s.DefaultValueAccessor,s.RequiredValidator,s.NgControlStatus,s.NgModel,c.NgIf,d.CalloutComponent,c.NgForOf],pipes:[p.I18nPipe,c.DecimalPipe,c.DatePipe],encapsulation:2})},35208:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CipherReportComponent=void 0;const r=n(32621),o=n(72778),a=n(58746),s=(n(36424),n(14293),n(77243),n(2944)),l=(n(29546),n(32621)),c=(n(29546),n(36424),n(77243),n(14293),["cipherAddEdit"]);class d{constructor(e,t,n,i,r){this.modalService=e,this.messagingService=t,this.requiresPaid=n,this.stateService=i,this.passwordRepromptService=r,this.loading=!1,this.hasLoaded=!1,this.ciphers=[]}load(){return i(this,void 0,void 0,(function*(){this.loading=!0,yield this.setCiphers(),this.loading=!1,this.hasLoaded=!0}))}selectCipher(e){return i(this,void 0,void 0,(function*(){if(!(yield this.repromptCipher(e)))return;const t=null!=this.organization?o.AddEditComponent:a.AddEditComponent,[n,r]=yield this.modalService.openViewRef(t,this.cipherAddEditModalRef,(t=>{null!=this.organization&&(t.organization=this.organization,t.organizationId=this.organization.id),t.cipherId=null==e?null:e.id,t.onSavedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()})))),t.onDeletedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()})))),t.onRestoredCipher.subscribe((e=>i(this,void 0,void 0,(function*(){n.close(),yield this.load()}))))}));return r}))}checkAccess(){return i(this,void 0,void 0,(function*(){if(null!=this.organization){if(this.requiresPaid&&!this.organization.useTotp)return this.messagingService.send("upgradeOrganization",{organizationId:this.organization.id}),!1}else{const e=yield this.stateService.getCanAccessPremium();if(this.requiresPaid&&!e)return this.messagingService.send("premiumRequired"),this.loading=!1,!1}return!0}))}setCiphers(){return i(this,void 0,void 0,(function*(){this.ciphers=[]}))}repromptCipher(e){return i(this,void 0,void 0,(function*(){return e.reprompt===s.CipherRepromptType.None||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.CipherReportComponent=d,d.ɵfac=function(e){l.ɵɵinvalidFactory()},d.ɵdir=l.ɵɵdefineDirective({type:d,viewQuery:function(e,t){if(1&e&&l.ɵɵviewQuery(c,7,r.ViewContainerRef),2&e){let e;l.ɵɵqueryRefresh(e=l.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first)}}})},1259:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportComponent=void 0;n(96832),n(82058),n(98573),n(38364),n(40349),n(70143),n(99954),n(10685),n(61554);const i=n(66567),r=n(32621),o=n(82058),a=n(40349),s=n(99954),l=n(38364),c=n(98573),d=n(10685),p=n(70143),u=n(61554),m=n(96832),h=n(637),v=n(57490),f=n(38287),g=n(52900),y=n(72596);function x(e,t){1&e&&(r.ɵɵelementStart(0,"app-callout",13),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,2,"vaultExportDisabled")),r.ɵɵadvance(2),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(3,4,"personalVaultExportPolicyInEffect"),"\n "))}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",14),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("value",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function b(e,t){1&e&&(r.ɵɵelement(0,"i",15),r.ɵɵpipe(1,"i18n")),2&e&&r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(1,1,"loading"))}function w(e,t){1&e&&(r.ɵɵelementStart(0,"span"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(2,1,"exportVault")))}class I extends i.ExportComponent{constructor(e,t,n,i,r,o,a,s,l){super(e,t,n,i,r,o,window,a,s,l)}saved(){super.saved(),this.platformUtilsService.showToast("success",null,this.i18nService.t("exportSuccess"))}}t.ExportComponent=I,I.ɵfac=function(e){return new(e||I)(r.ɵɵdirectiveInject(o.CryptoService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.ExportService),r.ɵɵdirectiveInject(c.EventService),r.ɵɵdirectiveInject(d.PolicyService),r.ɵɵdirectiveInject(p.LogService),r.ɵɵdirectiveInject(u.UserVerificationService),r.ɵɵdirectiveInject(m.FormBuilder))},I.ɵcmp=r.ɵɵdefineComponent({type:I,selectors:[["app-export"]],features:[r.ɵɵInheritDefinitionFeature],decls:44,vars:13,consts:[["ngNativeValidate","",3,"appApiAction","formGroup","ngSubmit"],["form",""],[1,"page-header"],["type","error",3,"title",4,"ngIf"],[1,"row"],[1,"form-group","col-6"],["for","format"],["id","format","name","Format","formControlName","format",1,"form-control"],[3,"value",4,"ngFor","ngForOf"],["ngDefaultControl","","formControlName","secret","name","secret"],["type","submit",1,"btn","btn-primary",3,"disabled"],["class","bwi bwi-spinner bwi-spin","aria-hidden","true",3,"title",4,"ngIf"],[4,"ngIf"],["type","error",3,"title"],[3,"value"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"form",0,1),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(2,"\n "),r.ɵɵelementStart(3,"div",2),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"h1"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n\n "),r.ɵɵtemplate(10,x,4,6,"app-callout",3),r.ɵɵtext(11,"\n\n "),r.ɵɵelementStart(12,"div",4),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"div",5),r.ɵɵtext(15,"\n "),r.ɵɵelementStart(16,"label",6),r.ɵɵtext(17),r.ɵɵpipe(18,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"select",7),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,S,2,2,"option",8),r.ɵɵtext(23,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(24,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"div",4),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",5),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"app-verify-master-password",9),r.ɵɵtext(32,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(33,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(35,"\n "),r.ɵɵelementStart(36,"button",10),r.ɵɵtext(37,"\n "),r.ɵɵtemplate(38,b,2,3,"i",11),r.ɵɵtext(39,"\n "),r.ɵɵtemplate(40,w,3,3,"span",12),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(43,"\n")),2&e){const e=r.ɵɵreference(1);r.ɵɵproperty("appApiAction",t.formPromise)("formGroup",t.exportForm),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,9,"exportVault")),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.disabledByPolicy),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(18,11,"fileFormat")),r.ɵɵadvance(5),r.ɵɵproperty("ngForOf",t.formatOptions),r.ɵɵadvance(14),r.ɵɵproperty("disabled",e.loading||t.exportForm.disabled),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.loading),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!e.loading)}},directives:[m.NgControlStatusGroup,h.ApiActionDirective,m.FormGroupDirective,v.NgIf,m.SelectControlValueAccessor,m.NgControlStatus,m.FormControlName,v.NgForOf,f.VerifyMasterPasswordComponent,m.DefaultValueAccessor,g.CalloutComponent,m.NgSelectOption,m.ɵNgSelectMultipleOption],pipes:[y.I18nPipe],encapsulation:2})},30839:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ExposedPasswordsReportComponent=void 0;n(22501),n(68062),n(36424),n(14293),n(77243),n(29546);const r=n(23635),o=n(35208),a=n(32621),s=n(68062),l=n(22501),c=n(29546),d=n(36424),p=n(77243),u=n(14293),m=n(57490),h=n(52900),v=n(52665),f=n(80507),g=n(92521),y=n(72596);function x(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noExposedPasswords"),"\n "))}function S(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",19),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function w(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",21),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",22),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",21),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function C(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,S,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,b,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,w,9,6,"ng-container",7),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,I,9,6,"ng-container",7),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span",18),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵpipe(29,"number"),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(28,7,"exposedXTimes",a.ɵɵpipeBind1(29,10,i.exposedPasswordMap.get(e.id))),"\n ")}}function E(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,C,32,12,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,4,"exposedPasswordsFound")),a.ɵɵproperty("useAlertRole",!0),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,6,"exposedPasswordsFoundDesc",a.ɵɵpipeBind1(6,9,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",5),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,x,4,6,"app-callout",6),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,E,16,11,"ng-container",7),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function k(e,t){}class A extends o.CipherReportComponent{constructor(e,t,n,i,r,o){super(n,i,!0,r,o),this.cipherService=e,this.auditService=t,this.exposedPasswordMap=new Map}ngOnInit(){this.checkAccess()}load(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&e.load.call(this)}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[],n=[];e.forEach((e=>{if(e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted)return;const i=this.auditService.passwordLeaked(e.login.password).then((n=>{n>0&&(t.push(e),this.exposedPasswordMap.set(e.id,n))}));n.push(i)})),yield Promise.all(n),this.ciphers=t}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}}t.ExposedPasswordsReportComponent=A,A.ɵfac=function(e){return new(e||A)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.AuditService),a.ɵɵdirectiveInject(c.ModalService),a.ɵɵdirectiveInject(d.MessagingService),a.ɵɵdirectiveInject(p.StateService),a.ɵɵdirectiveInject(u.PasswordRepromptService))},A.ɵcmp=a.ɵɵdefineComponent({type:A,selectors:[["app-exposed-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],[4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title","useAlertRole"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵelementStart(7,"p"),a.ɵɵtext(8),a.ɵɵpipe(9,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(10,"\n"),a.ɵɵelementStart(11,"button",1),a.ɵɵlistener("click",(function(){return t.load()})),a.ɵɵtext(12,"\n "),a.ɵɵelement(13,"i",2),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span"),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n"),a.ɵɵtemplate(21,P,6,2,"div",3),a.ɵɵtext(22,"\n"),a.ɵɵtemplate(23,k,0,0,"ng-template",null,4,a.ɵɵtemplateRefExtractor),a.ɵɵtext(25,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("disabled",t.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(14,10,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,12,"checkExposedPasswords")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},95310:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ImportComponent=void 0;n(68012),n(40349),n(58004),n(70143),n(99954),n(10685);const r=n(40251),o=n(86455),a=n(32621),s=n(40349),l=n(58004),c=n(68012),d=n(99954),p=n(10685),u=n(70143),m=n(57490),h=n(96832),v=n(52900),f=n(72596);function g(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",18),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffectImports"),"\n"))}function y(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",19),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.id),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e&&(a.ɵɵelementStart(0,"option",19),a.ɵɵtext(1),a.ɵɵelementEnd()),2&e){const e=t.$implicit;a.ɵɵproperty("ngValue",e.id),a.ɵɵadvance(1),a.ɵɵtextInterpolate(e.name)}}function S(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"option",20),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,x,2,2,"option",9),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(4),a.ɵɵproperty("ngForOf",e.importOptions)}}function b(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(2,"a",22),a.ɵɵtext(3,"\n https://bitwarden.com/help/export-your-data/"),a.ɵɵelementEnd(),a.ɵɵtext(4,"\n "),a.ɵɵelementContainerEnd())}function w(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(2,"a",23),a.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-lastpass/"),a.ɵɵelementEnd(),a.ɵɵtext(4,"\n "),a.ɵɵelementContainerEnd())}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the KeePassX desktop application, navigate to "Database" → "Export to CSV file" and\n save the CSV file.\n '),a.ɵɵelementContainerEnd())}function C(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n In the Avira web vault, go to "Settings" → "My Data" → "Export data" and save the\n CSV file.\n '),a.ɵɵelementContainerEnd())}function E(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n In the Blur web vault, click your username at the top and go to "Settings" → "Export\n Data", then click "Export CSV" for your "Accounts".\n '),a.ɵɵelementContainerEnd())}function P(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the SaveInCloud desktop application, navigate to "File" → "Export" → "As XML"\n and save the XML file.\n '),a.ɵɵelementContainerEnd())}function k(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Padlock desktop application, click the hamburger icon in the top left corner and\n navigate to "Settings" → "Export" button and save the file "As CSV".\n '),a.ɵɵelementContainerEnd())}function A(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the KeePass 2 desktop application, navigate to "File" → "Export" and select the\n "KeePass XML (2.x)" option.\n '),a.ɵɵelementContainerEnd())}function O(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Universal Password Manager desktop application, navigate to "Database" →\n "Export" and save the CSV file.\n '),a.ɵɵelementContainerEnd())}function T(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the SaferPass browser extension, click the hamburger icon in the top left corner and\n navigate to "Settings". Click the "Export accounts" button to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function M(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Meldium web vault, navigate to "Settings". Locate the "Export data" function and\n click "Show me my data" to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function D(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .csv File" option. Click\n "Export" to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function B(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Keeper web vault (keepersecurity.com/vault). Click on your "account email" (top\n right) and select "Settings". Go to "Export" and find the "Export to .json File" option. Click\n "Export" to save the JSON file.\n '),a.ɵɵelementContainerEnd())}function R(e,t){1&e&&(a.ɵɵelementStart(0,"span"),a.ɵɵtext(1,"\n The process is exactly the same as importing from Google Chrome.\n "),a.ɵɵelementEnd())}function U(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,R,2,0,"span",10),a.ɵɵtext(3,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(4,"a",24),a.ɵɵtext(5,"\n https://bitwarden.com/help/import-from-chrome/"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵproperty("ngIf","chromecsv"!==e.format)}}function V(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(2,"a",25),a.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-firefox/"),a.ɵɵelementEnd(),a.ɵɵtext(4,".\n "),a.ɵɵelementContainerEnd())}function F(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(2,"a",26),a.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-safari/"),a.ɵɵelementEnd(),a.ɵɵtext(4,".\n "),a.ɵɵelementContainerEnd())}function N(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n See detailed instructions on our help site at\n "),a.ɵɵelementStart(2,"a",27),a.ɵɵtext(3,"\n https://bitwarden.com/help/import-from-1password/"),a.ɵɵelementEnd(),a.ɵɵtext(4,".\n "),a.ɵɵelementContainerEnd())}function _(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Password Dragon desktop application, navigate to "File" → "Export" → "To\n XML". In the dialog that pops up select "All Rows" and check all fields. Click the "Export"\n button and save the XML file.\n '),a.ɵɵelementContainerEnd())}function j(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Enpass desktop application, navigate to "File" → "Export" → "As CSV".\n Select "OK" to the warning alert and save the CSV file. Note that the importer only supports\n files exported while Enpass is set to the English language, so adjust your settings\n accordingly.\n '),a.ɵɵelementContainerEnd())}function z(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Enpass 6 desktop application, click the menu button and navigate to "File" →\n "Export". Select the ".json" file format option and save the JSON file.\n '),a.ɵɵelementContainerEnd())}function L(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Password Safe desktop application, navigate to "File" → "Export To" → "XML\n format..." and save the XML file.\n '),a.ɵɵelementContainerEnd())}function K(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Dashlane desktop application, navigate to "File" → "Export" → "Unsecured\n archive (readable) in JSON format" and save the JSON file.\n '),a.ɵɵelementContainerEnd())}function q(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the mSecure desktop application, navigate to "File" → "Export" → "CSV File..."\n and save the CSV file.\n '),a.ɵɵelementContainerEnd())}function G(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Sticky Password desktop application, navigate to "Menu" (top right) → "Export"\n → "Export all". Select the unencrypted format XML option and save the XML file.\n '),a.ɵɵelementContainerEnd())}function W(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the True Key desktop application, click the gear icon (top right) and then navigate to\n "App Settings". Click the "Export" button, enter your password and save the CSV file.\n '),a.ɵɵelementContainerEnd())}function H(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Clipperz web application (clipperz.is/app). Click the hamburger menu icon in the\n top right to expand the navigation bar. Navigate to "Data" → "Export". Click the\n "download HTML+JSON" button to save the HTML file.\n '),a.ɵɵelementContainerEnd())}function $(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the RoboForm Editor desktop application, navigate to "RoboForm" (top left) →\n "Options" → "Account & Data" and click the "Export" button. Select all of your data,\n change the "Format" to "CSV file" and then click the "Export" button to save the CSV file.\n Note: RoboForm only allows you to export Logins. Other items will not be exported.\n '),a.ɵɵelementContainerEnd())}function Q(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Passbolt web vault and navigate to the "Passwords" listing. Select all of the\n passwords you would like to export and click the "Export" button at the top of the listing.\n Choose the "csv (lastpass)" export format and click the "Export" button.\n '),a.ɵɵelementContainerEnd())}function Y(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Ascendo DataVault desktop application, navigate to "Tools" → "Export". In the\n dialog that pops up, select the "All Items (DVX, CSV)" option. Click the "Ok" button to save\n the CSV file.\n '),a.ɵɵelementContainerEnd())}function J(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Password Boss desktop application, navigate to "File" → "Export data" →\n "Password Boss JSON - not encrypted" and save the JSON file.\n '),a.ɵɵelementContainerEnd())}function X(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Zoho web vault (vault.zoho.com). Navigate to "Tools" → "Export Secrets".\n Select "All Secrets" and click the "Zoho Vault Format CSV" button. Highlight and copy the data\n from the textarea. Open a text editor like Notepad and paste the data. Save the data from the\n text editor as\n '),a.ɵɵelementStart(2,"code"),a.ɵɵtext(3,"zoho_export.csv"),a.ɵɵelementEnd(),a.ɵɵtext(4,".\n "),a.ɵɵelementContainerEnd())}function Z(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the SplashID Safe desktop application, click on the SplashID blue lock logo in the top\n right corner. Navigate to "Export" → "Export as CSV" and save the CSV file.\n '),a.ɵɵelementContainerEnd())}function ee(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the PassKeep mobile app, navigate to "Backup/Restore". Locate the "CSV Backup/Restore"\n section and click "Backup to CSV" to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function te(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n Make sure you have python-keyring and python-gnomekeyring installed. Save the\n "),a.ɵɵelementStart(2,"a",28),a.ɵɵtext(3,"GNOME Keyring Import/Export"),a.ɵɵelementEnd(),a.ɵɵtext(4,"\n python script to your desktop as "),a.ɵɵelementStart(5,"code"),a.ɵɵtext(6,"pw_helper.py"),a.ɵɵelementEnd(),a.ɵɵtext(7,". Open terminal and run\n "),a.ɵɵelementStart(8,"code"),a.ɵɵtext(9,"chmod +rx Desktop/pw_helper.py"),a.ɵɵelementEnd(),a.ɵɵtext(10," and then\n "),a.ɵɵelementStart(11,"code"),a.ɵɵtext(12,"python Desktop/pw_helper.py export Desktop/my_passwords.json"),a.ɵɵelementEnd(),a.ɵɵtext(13,". Then upload the\n resulting "),a.ɵɵelementStart(14,"code"),a.ɵɵtext(15,"my_passwords.json"),a.ɵɵelementEnd(),a.ɵɵtext(16," file here to Bitwarden.\n "),a.ɵɵelementContainerEnd())}function ne(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Using the Password Agent desktop application navigate to "File" → "Export", select the\n "Fields to export" button and check all of the fields, change the "Output format" to "CSV",\n and then click the "Start" button to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function ie(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Log into the Passpack website vault and navigate to "Settings" → "Export", then click the\n "Download" button to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function re(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open your Passman vault and click on "Settings" in the bottom left corner. In the "Settings"\n window switch to the "Export credentials" tab and choose "JSON" as the export type. Enter your\n vault\'s passphrase and click the "Export" button to save the JSON file.\n '),a.ɵɵelementContainerEnd())}function oe(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to CSV file" option to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function ae(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Avast Passwords desktop application and navigate to "Settings" → "Import/export\n data". Select the "Export" button for the "Export to JSON file" option to save the JSON file.\n '),a.ɵɵelementContainerEnd())}function se(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the F-Secure KEY desktop application and navigate to "Settings" → "Export\n Passwords". Select the "Export" button, enter your master password, and save the FSK file.\n '),a.ɵɵelementContainerEnd())}function le(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Kaspersky Password Manager desktop application and navigate to "Settings" →\n "Import/Export". Locate the "Export to text file" section and select the "Export" button to\n save the TXT file.\n '),a.ɵɵelementContainerEnd())}function ce(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the RememBear desktop application and navigate to "Settings" → "Account" →\n "Export". Enter your master password and select the "Export Anyway" button to save the CSV\n file.\n '),a.ɵɵelementContainerEnd())}function de(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the PasswordWallet desktop application and navigate to "File" → "Export" →\n "Visible entries to text file". Enter your password and select the "Ok" button to save the TXT\n file.\n '),a.ɵɵelementContainerEnd())}function pe(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Myki desktop browser extension and navigate to "Advanced" → "Export Accounts"\n and then scan the QR code with your mobile device. Various CSV files will then be saved to\n your computer\'s downloads folder.\n '),a.ɵɵelementContainerEnd())}function ue(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n Export your SecureSafe password safe to a CSV file with a comma delimiter.\n "),a.ɵɵelementContainerEnd())}function me(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the LogMeOnce browser extension, then navigate to "Open Menu" → "Export To" and\n select "CSV File" to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function he(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the BlackBerry Password Keeper application, then navigate to "Settings" →\n "Import/Export". Select "Export Passwords" and follow the instructions on screen to save the\n unencrypted CSV file.\n '),a.ɵɵelementContainerEnd())}function ve(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Buttercup desktop application and unlock your vault. Right click on your vault\'s icon\n and select "Export" to save the CSV file.\n '),a.ɵɵelementContainerEnd())}function fe(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n Open the Codebook desktop application and log in. Navigate to "File" → "Export all", then\n click "Yes" on the dialog and save the CSV file.\n '),a.ɵɵelementContainerEnd())}function ge(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n Open the newest version of the Encryptr desktop application and allow all of your data to\n sync. Once syncing of your data is complete, the download icon in the top right corner will\n turn pink. Click the download icon and save the CSV file.\n "),a.ɵɵelementContainerEnd())}function ye(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,'\n From the Yoti browser extension, click on "Settings", then "Export Saved Logins" and save the\n CSV file.\n '),a.ɵɵelementContainerEnd())}function xe(e,t){if(1&e&&(a.ɵɵelementStart(0,"app-callout",21),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,b,5,0,"ng-container",10),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,w,5,0,"ng-container",10),a.ɵɵtext(5,"\n "),a.ɵɵtemplate(6,I,2,0,"ng-container",10),a.ɵɵtext(7,"\n "),a.ɵɵtemplate(8,C,2,0,"ng-container",10),a.ɵɵtext(9,"\n "),a.ɵɵtemplate(10,E,2,0,"ng-container",10),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,P,2,0,"ng-container",10),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,k,2,0,"ng-container",10),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,A,2,0,"ng-container",10),a.ɵɵtext(17,"\n "),a.ɵɵtemplate(18,O,2,0,"ng-container",10),a.ɵɵtext(19,"\n "),a.ɵɵtemplate(20,T,2,0,"ng-container",10),a.ɵɵtext(21,"\n "),a.ɵɵtemplate(22,M,2,0,"ng-container",10),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,D,2,0,"ng-container",10),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,B,2,0,"ng-container",10),a.ɵɵtext(27,"\n "),a.ɵɵtemplate(28,U,7,1,"ng-container",10),a.ɵɵtext(29,"\n "),a.ɵɵtemplate(30,V,5,0,"ng-container",10),a.ɵɵtext(31,"\n "),a.ɵɵtemplate(32,F,5,0,"ng-container",10),a.ɵɵtext(33,"\n "),a.ɵɵtemplate(34,N,5,0,"ng-container",10),a.ɵɵtext(35,"\n "),a.ɵɵtemplate(36,_,2,0,"ng-container",10),a.ɵɵtext(37,"\n "),a.ɵɵtemplate(38,j,2,0,"ng-container",10),a.ɵɵtext(39,"\n "),a.ɵɵtemplate(40,z,2,0,"ng-container",10),a.ɵɵtext(41,"\n "),a.ɵɵtemplate(42,L,2,0,"ng-container",10),a.ɵɵtext(43,"\n "),a.ɵɵtemplate(44,K,2,0,"ng-container",10),a.ɵɵtext(45,"\n "),a.ɵɵtemplate(46,q,2,0,"ng-container",10),a.ɵɵtext(47,"\n "),a.ɵɵtemplate(48,G,2,0,"ng-container",10),a.ɵɵtext(49,"\n "),a.ɵɵtemplate(50,W,2,0,"ng-container",10),a.ɵɵtext(51,"\n "),a.ɵɵtemplate(52,H,2,0,"ng-container",10),a.ɵɵtext(53,"\n "),a.ɵɵtemplate(54,$,2,0,"ng-container",10),a.ɵɵtext(55,"\n "),a.ɵɵtemplate(56,Q,2,0,"ng-container",10),a.ɵɵtext(57,"\n "),a.ɵɵtemplate(58,Y,2,0,"ng-container",10),a.ɵɵtext(59,"\n "),a.ɵɵtemplate(60,J,2,0,"ng-container",10),a.ɵɵtext(61,"\n "),a.ɵɵtemplate(62,X,5,0,"ng-container",10),a.ɵɵtext(63,"\n "),a.ɵɵtemplate(64,Z,2,0,"ng-container",10),a.ɵɵtext(65,"\n "),a.ɵɵtemplate(66,ee,2,0,"ng-container",10),a.ɵɵtext(67,"\n "),a.ɵɵtemplate(68,te,17,0,"ng-container",10),a.ɵɵtext(69,"\n "),a.ɵɵtemplate(70,ne,2,0,"ng-container",10),a.ɵɵtext(71,"\n "),a.ɵɵtemplate(72,ie,2,0,"ng-container",10),a.ɵɵtext(73,"\n "),a.ɵɵtemplate(74,re,2,0,"ng-container",10),a.ɵɵtext(75,"\n "),a.ɵɵtemplate(76,oe,2,0,"ng-container",10),a.ɵɵtext(77,"\n "),a.ɵɵtemplate(78,ae,2,0,"ng-container",10),a.ɵɵtext(79,"\n "),a.ɵɵtemplate(80,se,2,0,"ng-container",10),a.ɵɵtext(81,"\n "),a.ɵɵtemplate(82,le,2,0,"ng-container",10),a.ɵɵtext(83,"\n "),a.ɵɵtemplate(84,ce,2,0,"ng-container",10),a.ɵɵtext(85,"\n "),a.ɵɵtemplate(86,de,2,0,"ng-container",10),a.ɵɵtext(87,"\n "),a.ɵɵtemplate(88,pe,2,0,"ng-container",10),a.ɵɵtext(89,"\n "),a.ɵɵtemplate(90,ue,2,0,"ng-container",10),a.ɵɵtext(91,"\n "),a.ɵɵtemplate(92,me,2,0,"ng-container",10),a.ɵɵtext(93,"\n "),a.ɵɵtemplate(94,he,2,0,"ng-container",10),a.ɵɵtext(95,"\n "),a.ɵɵtemplate(96,ve,2,0,"ng-container",10),a.ɵɵtext(97,"\n "),a.ɵɵtemplate(98,fe,2,0,"ng-container",10),a.ɵɵtext(99,"\n "),a.ɵɵtemplate(100,ge,2,0,"ng-container",10),a.ɵɵtext(101,"\n "),a.ɵɵtemplate(102,ye,2,0,"ng-container",10),a.ɵɵtext(103,"\n "),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵpropertyInterpolate("title",e.getFormatInstructionTitle()),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","bitwardencsv"===e.format||"bitwardenjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","lastpasscsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","keepassxcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","aviracsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","blurcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","safeincloudxml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","padlockcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","keepass2xml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","upmcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","saferpasscsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","meldiumcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","keepercsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","keeperjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","chromecsv"===e.format||"operacsv"===e.format||"vivaldicsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","firefoxcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","safaricsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","1password1pif"===e.format||"1passwordwincsv"===e.format||"1passwordmaccsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passworddragonxml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","enpasscsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","enpassjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","pwsafexml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","dashlanejson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","msecurecsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","stickypasswordxml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","truekeycsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","clipperzhtml"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","roboformcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passboltcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","ascendocsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passwordbossjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","zohovaultcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","splashidcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passkeepcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","gnomejson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passwordagentcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passpackcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passmanjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","avastcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","avastjson"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","fsecurefsk"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","kasperskytxt"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","remembearcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","passwordwallettxt"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","mykicsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","securesafecsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","logmeoncecsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","blackberrycsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","buttercupcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","codebookcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","encryptrcsv"===e.format),a.ɵɵadvance(2),a.ɵɵproperty("ngIf","yoticsv"===e.format)}}const Se=function(e){return{manual:e}};class be{constructor(e,t,n,i,r,o){this.i18nService=e,this.importService=t,this.router=n,this.platformUtilsService=i,this.policyService=r,this.logService=o,this.format=null,this.loading=!1,this.importBlockedByPolicy=!1,this.organizationId=null,this.successNavigate=["vault"]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.setImportOptions(),this.importOptions.sort(((e,t)=>null==e.name&&null!=t.name?-1:null!=e.name&&null==t.name?1:null==e.name&&null==t.name?0:this.i18nService.collator?this.i18nService.collator.compare(e.name,t.name):e.name.localeCompare(t.name))),this.importBlockedByPolicy=yield this.policyService.policyAppliesToUser(r.PolicyType.PersonalOwnership)}))}submit(){return i(this,void 0,void 0,(function*(){if(this.importBlockedByPolicy)return void this.platformUtilsService.showToast("error",null,this.i18nService.t("personalOwnershipPolicyInEffectImports"));this.loading=!0;const e=this.importService.getImporter(this.format,this.organizationId);if(null===e)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFormat")),void(this.loading=!1);const t=document.getElementById("file").files;if(!(null!=t&&0!==t.length||null!=this.fileContents&&""!==this.fileContents))return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),void(this.loading=!1);let n=this.fileContents;if(null!=t&&t.length>0)try{const e=yield this.getFileContents(t[0]);null!=e&&(n=e)}catch(i){this.logService.error(i)}if(null==n||""===n)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),void(this.loading=!1);try{this.formPromise=this.importService.import(e,n,this.organizationId);const t=yield this.formPromise;if(null!=t)return this.error(t),void(this.loading=!1);this.platformUtilsService.showToast("success",null,this.i18nService.t("importSuccess")),this.router.navigate(this.successNavigate)}catch(i){this.logService.error(i)}this.loading=!1}))}getFormatInstructionTitle(){if(null==this.format)return null;const e=this.featuredImportOptions.concat(this.importOptions).filter((e=>e.id===this.format));return e.length>0?this.i18nService.t("instructionsFor",e[0].name):null}setImportOptions(){this.featuredImportOptions=[{id:null,name:"-- "+this.i18nService.t("select")+" --"},...this.importService.featuredImportOptions],this.importOptions=this.importService.regularImportOptions}error(e){return i(this,void 0,void 0,(function*(){yield o.default.fire({heightAuto:!1,buttonsStyling:!1,icon:"error",iconHtml:'<i class="swal-custom-icon bwi bwi-error text-danger"></i>',input:"textarea",inputValue:e.message,inputAttributes:{readonly:"true"},titleText:this.i18nService.t("importError"),text:this.i18nService.t("importErrorDesc"),showConfirmButton:!0,confirmButtonText:this.i18nService.t("ok"),onOpen:e=>{e.querySelector(".swal2-textarea").scrollTo(0,0)}})}))}getFileContents(e){return new Promise(((t,n)=>{const i=new FileReader;i.readAsText(e,"utf-8"),i.onload=i=>{if("lastpasscsv"===this.format&&"text/html"===e.type){const e=(new DOMParser).parseFromString(i.target.result,"text/html").querySelector("pre");return null!=e?void t(e.textContent):void n()}t(i.target.result)},i.onerror=()=>{n()}}))}}t.ImportComponent=be,be.ɵfac=function(e){return new(e||be)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.ImportService),a.ɵɵdirectiveInject(c.Router),a.ɵɵdirectiveInject(d.PlatformUtilsService),a.ɵɵdirectiveInject(p.PolicyService),a.ɵɵdirectiveInject(u.LogService))},be.ɵcmp=a.ɵɵdefineComponent({type:be,selectors:[["app-import"]],decls:69,vars:31,consts:[[1,"page-header"],["type","info",4,"ngIf"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[4,"ngIf"],["type","info",3,"title",4,"ngIf"],["for","file"],["type","file","id","file","name","file",1,"form-control-file",3,"disabled"],["for","fileContents"],["id","fileContents","name","FileContents",1,"form-control",3,"ngModel","disabled","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","info"],[3,"ngValue"],["value","-","disabled",""],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/export-your-data/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-firefox/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-safari/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n"),a.ɵɵtemplate(7,g,3,3,"app-callout",1),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(11,"\n "),a.ɵɵelementStart(12,"div",4),a.ɵɵtext(13,"\n "),a.ɵɵelementStart(14,"div",5),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"div",6),a.ɵɵtext(17,"\n "),a.ɵɵelementStart(18,"label",7),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementStart(22,"select",8),a.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),a.ɵɵtext(23,"\n "),a.ɵɵtemplate(24,y,2,2,"option",9),a.ɵɵtext(25,"\n "),a.ɵɵtemplate(26,S,6,1,"ng-container",10),a.ɵɵtext(27,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(28,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(31,"\n "),a.ɵɵtemplate(32,xe,104,52,"app-callout",11),a.ɵɵtext(33,"\n "),a.ɵɵelementStart(34,"div",4),a.ɵɵtext(35,"\n "),a.ɵɵelementStart(36,"div",5),a.ɵɵtext(37,"\n "),a.ɵɵelementStart(38,"div",6),a.ɵɵtext(39,"\n "),a.ɵɵelementStart(40,"label",12),a.ɵɵtext(41),a.ɵɵpipe(42,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n "),a.ɵɵelement(44,"input",13),a.ɵɵtext(45,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(46,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(47,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(48,"\n "),a.ɵɵelementStart(49,"div",6),a.ɵɵtext(50,"\n "),a.ɵɵelementStart(51,"label",14),a.ɵɵtext(52),a.ɵɵpipe(53,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(54,"\n "),a.ɵɵelementStart(55,"textarea",15),a.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),a.ɵɵelementEnd(),a.ɵɵtext(56,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(57,"\n "),a.ɵɵelementStart(58,"button",16),a.ɵɵtext(59,"\n "),a.ɵɵelement(60,"i",17),a.ɵɵpipe(61,"i18n"),a.ɵɵtext(62,"\n "),a.ɵɵelementStart(63,"span"),a.ɵɵtext(64),a.ɵɵpipe(65,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(66,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(67,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(68,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,17,"importData")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.importBlockedByPolicy),a.ɵɵadvance(12),a.ɵɵtextInterpolate1("1. ",a.ɵɵpipeBind1(20,19,"selectFormat"),""),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.format)("disabled",t.importBlockedByPolicy),a.ɵɵadvance(2),a.ɵɵproperty("ngForOf",t.featuredImportOptions),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),a.ɵɵadvance(6),a.ɵɵproperty("ngIf",t.format),a.ɵɵadvance(9),a.ɵɵtextInterpolate1("2. ",a.ɵɵpipeBind1(42,21,"selectImportFile"),""),a.ɵɵadvance(3),a.ɵɵproperty("disabled",t.importBlockedByPolicy),a.ɵɵadvance(8),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(53,23,"orCopyPasteFileContents")),a.ɵɵadvance(3),a.ɵɵproperty("ngModel",t.fileContents)("disabled",t.importBlockedByPolicy),a.ɵɵadvance(3),a.ɵɵproperty("disabled",t.loading||t.importBlockedByPolicy)("ngClass",a.ɵɵpureFunction1(29,Se,t.importBlockedByPolicy)),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(61,25,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(65,27,"importData")))},directives:[m.NgIf,h.NgControlStatusGroup,h.NgForm,h.SelectControlValueAccessor,h.RequiredValidator,h.NgControlStatus,h.NgModel,m.NgForOf,h.DefaultValueAccessor,m.NgClass,v.CalloutComponent,h.NgSelectOption,h.ɵNgSelectMultipleOption],pipes:[f.I18nPipe],encapsulation:2})},60537:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InactiveTwoFactorReportComponent=void 0;n(68062),n(70143),n(36424),n(14293),n(77243),n(29546);const r=n(23635),o=n(70829),a=n(35208),s=n(32621),l=n(68062),c=n(29546),d=n(36424),p=n(77243),u=n(70143),m=n(14293),h=n(57490),v=n(52900),f=n(52665),g=n(80507),y=n(92521),x=n(72596);function S(e,t){1&e&&(s.ɵɵelementStart(0,"small"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",4),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"loading")))}function w(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",8),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2),s.ɵɵpipe(3,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"goodNews")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(3,4,"noInactive2fa"),"\n "))}function I(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",18),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"shared")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",19),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span",5),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementContainerEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"attachments")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"a",20),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext().$implicit,t=s.ɵɵnextContext(3);s.ɵɵpropertyInterpolate("href",t.cipherDocs.get(e.id),s.ɵɵsanitizeUrl),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,2,"instructions"),"")}}function P(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"td",12),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"app-vault-icon",13),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"td",14),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"a",15),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(3).selectCipher(t)})),s.ɵɵpipe(10,"i18n"),s.ɵɵtext(11),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵtemplate(13,I,9,6,"ng-container",1),s.ɵɵtext(14,"\n "),s.ɵɵtemplate(15,C,9,6,"ng-container",1),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"br"),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"small"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"td",16),s.ɵɵtext(24,"\n "),s.ɵɵtemplate(25,E,3,4,"a",17),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("cipher",e),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(10,7,"editItem")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(e.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.organization&&e.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.hasAttachments),s.ɵɵadvance(5),s.ɵɵtextInterpolate(e.subTitle),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",n.cipherDocs.has(e.id))}}function k(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"app-callout",9),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵpipe(6,"number"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"table",10),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"tbody"),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,P,28,9,"tr",11),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"inactive2faFound")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(5,5,"inactive2faFoundDesc",s.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),s.ɵɵadvance(8),s.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",6),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,w,4,6,"app-callout",7),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,k,16,10,"ng-container",1),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.ciphers.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.ciphers.length)}}function O(e,t){}class T extends a.CipherReportComponent{constructor(e,t,n,i,r,o){super(t,n,!0,i,o),this.cipherService=e,this.logService=r,this.services=new Map,this.cipherDocs=new Map}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){try{yield this.load2fa()}catch(e){this.logService.error(e)}if(this.services.size>0){const e=yield this.getAllCiphers(),t=[],n=[],i=new Map;e.forEach((e=>{if(e.type===r.CipherType.Login&&(null==e.login.totp||""===e.login.totp)&&e.login.hasUris&&!e.isDeleted)for(let n=0;n<e.login.uris.length;n++){const r=e.login.uris[n];if(null!=r.uri&&""!==r.uri){const n=r.uri.replace("www.",""),a=o.Utils.getDomain(n);null!=a&&this.services.has(a)&&(null!=this.services.get(a)&&i.set(e.id,this.services.get(a)),t.push(e))}}})),yield Promise.all(n),this.ciphers=t,this.cipherDocs=i}}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}load2fa(){return i(this,void 0,void 0,(function*(){if(this.services.size>0)return;const e=yield fetch(new Request("https://2fa.directory/api/v3/totp.json"));if(200!==e.status)throw new Error;const t=yield e.json();for(const n of t){const e=n[1];if(null!=e.domain&&null!=e.documentation){if(null!=e["additional-domains"])for(const t of e["additional-domains"])this.services.set(t,e.documentation);this.services.set(e.domain,e.documentation)}}}))}}t.InactiveTwoFactorReportComponent=T,T.ɵfac=function(e){return new(e||T)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.ModalService),s.ɵɵdirectiveInject(d.MessagingService),s.ɵɵdirectiveInject(p.StateService),s.ɵɵdirectiveInject(u.LogService),s.ɵɵdirectiveInject(m.PasswordRepromptService))},T.ɵcmp=s.ɵɵdefineComponent({type:T,selectors:[["app-inactive-two-factor-report"]],features:[s.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],[1,"text-right"],["class","badge badge-primary","target","_blank","rel","noopener",3,"href",4,"ngIf"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵtemplate(5,S,9,6,"small",1),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"p"),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n"),s.ɵɵtemplate(13,b,9,6,"div",1),s.ɵɵtext(14,"\n"),s.ɵɵtemplate(15,A,6,2,"div",2),s.ɵɵtext(16,"\n"),s.ɵɵtemplate(17,O,0,0,"ng-template",null,3,s.ɵɵtemplateRefExtractor),s.ɵɵtext(19,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(4,5,"inactive2faReport"),"\n "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,f.IconComponent,g.StopClickDirective,y.StopPropDirective],pipes:[x.I18nPipe,h.DecimalPipe],encapsulation:2})},75124:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorHistoryComponent=void 0;n(40349),n(86193),n(99954);const i=n(33045),r=n(32621),o=n(86193),a=n(99954),s=n(40349),l=n(50553),c=n(57490),d=n(90317),p=n(72596),u=n(24950);function m(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"li",16),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",17),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"div",18),r.ɵɵpipe(5,"colorPassword"),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"small",19),r.ɵɵtext(8),r.ɵɵpipe(9,"date"),r.ɵɵelementEnd(),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",10),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"button",20),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(2).copy(t.password)})),r.ɵɵpipe(15,"i18n"),r.ɵɵtext(16,"\n "),r.ɵɵelement(17,"i",21),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit;r.ɵɵadvance(4),r.ɵɵproperty("innerHTML",r.ɵɵpipeBind1(5,3,e.password),r.ɵɵsanitizeHtml),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind2(9,5,e.date,"medium")),r.ɵɵadvance(6),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(15,8,"copyPassword"))}}function h(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",13),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"ul",14),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,m,21,10,"li",15),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.history)}}function v(e,t){1&e&&(r.ɵɵelementStart(0,"div",13),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noPasswordsInList"),"\n "))}class f extends i.PasswordGeneratorHistoryComponent{constructor(e,t,n){super(e,t,n,window)}}t.PasswordGeneratorHistoryComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.PasswordGenerationService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-password-generator-history"]],features:[r.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","passHistoryTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content"],[1,"modal-header"],["id","passHistoryTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw"],[1,"modal-body"],[1,"list-group","list-group-flush"],["class","list-group-item d-flex",4,"ngFor","ngForOf"],[1,"list-group-item","d-flex"],[1,"password-row"],["appSelectCopy","",1,"text-monospace","password-wrapper",3,"innerHTML"],[1,"text-muted"],[1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"h2",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",5),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",6),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵtemplate(20,h,7,1,"div",7),r.ɵɵtext(21,"\n "),r.ɵɵtemplate(22,v,3,3,"div",7),r.ɵɵtext(23,"\n "),r.ɵɵelementStart(24,"div",8),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"button",9),r.ɵɵtext(27),r.ɵɵpipe(28,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",10),r.ɵɵtext(31,"\n "),r.ɵɵelementStart(32,"button",11),r.ɵɵlistener("click",(function(){return t.clear()})),r.ɵɵpipe(33,"i18n"),r.ɵɵtext(34,"\n "),r.ɵɵelement(35,"i",12),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(41,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,6,"passwordHistory")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,8,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",t.history.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.history.length),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(28,10,"close"),"\n "),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(33,12,"clear")))},directives:[l.A11yTitleDirective,c.NgIf,c.NgForOf,d.SelectCopyDirective],pipes:[p.I18nPipe,u.ColorPasswordPipe,c.DatePipe],encapsulation:2})},61450:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorComponent=void 0;const r=n(32621),o=(n(40349),n(86193),n(99954),n(66326)),a=(n(29546),n(75124)),s=n(32621),l=n(86193),c=n(99954),d=n(40349),p=n(29546),u=n(57490),m=n(90317),h=n(50553),v=n(52900),f=n(96832),g=n(72596),y=n(24950),x=["historyTemplate"];function S(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",15),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"passwordGeneratorPolicyInEffect"),"\n"))}function b(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",17),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.type=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",18),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("name","Type_",e.value,""),s.ɵɵpropertyInterpolate1("id","type_",e.value,""),s.ɵɵproperty("ngModel",n.options.type)("value",e.value)("checked",n.options.type===e.value),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","type_",e.value,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",20),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",21),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",22),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.numWords=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",20),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",23),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"input",24),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.wordSeparator=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()})),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n "),s.ɵɵelementStart(23,"div",5),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"div",25),s.ɵɵtext(26,"\n "),s.ɵɵelementStart(27,"input",26),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.capitalize=t})),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"label",27),s.ɵɵtext(30),s.ɵɵpipe(31,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",25),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",28),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.includeNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"label",29),s.ɵɵtext(39),s.ɵɵpipe(40,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,10,"numWords")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.options.numWords),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,12,"wordSeparator")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.options.wordSeparator),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.options.capitalize)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.capitalize),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(31,14,"capitalize")),s.ɵɵadvance(6),s.ɵɵproperty("ngModel",e.options.includeNumber)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.includeNumber),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(40,16,"includeNumber"))}}function I(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",19),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",20),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",30),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",31),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.length=t}))("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().lengthChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",20),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",32),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"input",33),s.ɵɵlistener("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.minNumber=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().minNumberChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",20),s.ɵɵtext(23,"\n "),s.ɵɵelementStart(24,"label",34),s.ɵɵtext(25),s.ɵɵpipe(26,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"input",35),s.ɵɵlistener("blur",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.minSpecial=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().minSpecialChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(30,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",5),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",25),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",36),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.uppercase=t})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"label",37),s.ɵɵtext(39,"A-Z"),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"div",25),s.ɵɵtext(43,"\n "),s.ɵɵelementStart(44,"input",38),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.lowercase=t})),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"label",39),s.ɵɵtext(47,"a-z"),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementStart(50,"div",25),s.ɵɵtext(51,"\n "),s.ɵɵelementStart(52,"input",40),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.number=t})),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementStart(54,"label",41),s.ɵɵtext(55,"0-9"),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"div",25),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"input",42),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().options.special=t})),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"label",43),s.ɵɵtext(63,"!@#$%^&*"),s.ɵɵelementEnd(),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementStart(66,"div",25),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"input",44),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext().saveOptions()}))("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().avoidAmbiguous=t})),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"label",45),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(74,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n"),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,16,"length")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.options.length),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,18,"minNumbers")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.options.minNumber),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(26,20,"minSpecial")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.options.minSpecial),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.options.uppercase)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.useUppercase),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.options.lowercase)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.useLowercase),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.options.number)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.useNumbers),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.options.special)("disabled",null==e.enforcedPolicyOptions?null:e.enforcedPolicyOptions.useSpecial),s.ɵɵadvance(8),s.ɵɵproperty("ngModel",e.avoidAmbiguous),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(72,22,"ambiguous"))}}function C(e,t){}class E extends o.PasswordGeneratorComponent{constructor(e,t,n,i){super(e,t,n,window),this.modalService=i}history(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(a.PasswordGeneratorHistoryComponent,this.historyModalRef)}))}lengthChanged(){document.getElementById("length").focus()}minNumberChanged(){document.getElementById("min-number").focus()}minSpecialChanged(){document.getElementById("min-special").focus()}}t.PasswordGeneratorComponent=E,E.ɵfac=function(e){return new(e||E)(s.ɵɵdirectiveInject(l.PasswordGenerationService),s.ɵɵdirectiveInject(c.PlatformUtilsService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.ModalService))},E.ɵcmp=s.ɵɵdefineComponent({type:E,selectors:[["app-password-generator"]],viewQuery:function(e,t){if(1&e&&s.ɵɵviewQuery(x,7,r.ViewContainerRef),2&e){let e;s.ɵɵqueryRefresh(e=s.ɵɵloadQuery())&&(t.historyModalRef=e.first)}},features:[s.ɵɵInheritDefinitionFeature],decls:53,vars:19,consts:[[1,"page-header"],["type","info",4,"ngIf"],[1,"card","card-password","bg-light","my-4"],[1,"card-body"],["appSelectCopy","",1,"password-wrapper",3,"innerHTML"],[1,"form-group"],["class","form-check form-check-inline",4,"ngFor","ngForOf"],[4,"ngIf"],[1,"d-flex"],["type","button",1,"btn","btn-primary",3,"click"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"ml-auto"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clock","bwi-lg"],["historyTemplate",""],["type","info"],[1,"form-check","form-check-inline"],["type","radio",1,"form-check-input",3,"ngModel","name","id","value","checked","ngModelChange","change"],[1,"form-check-label",3,"for"],[1,"row"],[1,"form-group","col-4"],["for","num-words"],["id","num-words","type","number","min","3","max","20",1,"form-control",3,"ngModel","ngModelChange","blur"],["for","word-separator"],["id","word-separator","type","text","maxlength","1",1,"form-control",3,"ngModel","ngModelChange","blur"],[1,"form-check"],["id","capitalize","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","capitalize",1,"form-check-label"],["id","include-number","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","include-number",1,"form-check-label"],["for","length"],["id","length","type","number","min","5","max","128",1,"form-control",3,"ngModel","ngModelChange","blur","change"],["for","min-number"],["id","min-number","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["for","min-special"],["id","min-special","type","number","min","0","max","9",1,"form-control",3,"ngModel","blur","ngModelChange","change"],["id","uppercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","uppercase",1,"form-check-label"],["id","lowercase","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","lowercase",1,"form-check-label"],["id","numbers","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","numbers",1,"form-check-label"],["id","special","type","checkbox",1,"form-check-input",3,"ngModel","disabled","change","ngModelChange"],["for","special",1,"form-check-label"],["id","ambiguous","type","checkbox",1,"form-check-input",3,"ngModel","change","ngModelChange"],["for","ambiguous",1,"form-check-label"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h1"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n"),s.ɵɵtemplate(7,S,3,3,"app-callout",1),s.ɵɵtext(8,"\n"),s.ɵɵelementStart(9,"div",2),s.ɵɵtext(10,"\n "),s.ɵɵelementStart(11,"div",3),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"div",4),s.ɵɵpipe(14,"colorPassword"),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n"),s.ɵɵelementStart(18,"div",5),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,b,7,7,"div",6),s.ɵɵtext(21,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(22,"\n"),s.ɵɵtemplate(23,w,44,18,"ng-container",7),s.ɵɵtext(24,"\n"),s.ɵɵtemplate(25,I,76,24,"ng-container",7),s.ɵɵtext(26,"\n"),s.ɵɵelementStart(27,"div",8),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div"),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"button",9),s.ɵɵlistener("click",(function(){return t.regenerate()})),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"button",10),s.ɵɵlistener("click",(function(){return t.copy()})),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"div",11),s.ɵɵtext(41,"\n "),s.ɵɵelementStart(42,"button",12),s.ɵɵlistener("click",(function(){return t.history()})),s.ɵɵpipe(43,"i18n"),s.ɵɵtext(44,"\n "),s.ɵɵelement(45,"i",13),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n"),s.ɵɵtemplate(50,C,0,0,"ng-template",null,14,s.ɵɵtemplateRefExtractor),s.ɵɵtext(52,"\n")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,9,"passwordGenerator")),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",null==t.enforcedPolicyOptions?null:t.enforcedPolicyOptions.inEffect()),s.ɵɵadvance(6),s.ɵɵproperty("innerHTML",s.ɵɵpipeBind1(14,11,t.password),s.ɵɵsanitizeHtml),s.ɵɵadvance(7),s.ɵɵproperty("ngForOf",t.passTypeOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf","passphrase"===t.options.type),s.ɵɵadvance(2),s.ɵɵproperty("ngIf","password"===t.options.type),s.ɵɵadvance(7),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(33,13,"regeneratePassword"),"\n "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(37,15,"copyPassword"),"\n "),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(43,17,"passwordHistory")))},directives:[u.NgIf,m.SelectCopyDirective,u.NgForOf,h.A11yTitleDirective,v.CalloutComponent,f.RadioControlValueAccessor,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,f.MinValidator,f.MaxValidator,f.NumberValueAccessor,f.MaxLengthValidator,f.CheckboxControlValueAccessor],pipes:[g.I18nPipe,y.ColorPasswordPipe],encapsulation:2})},11423:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ReusedPasswordsReportComponent=void 0;n(68062),n(36424),n(14293),n(77243),n(29546);const r=n(23635),o=n(35208),a=n(32621),s=n(68062),l=n(29546),c=n(36424),d=n(77243),p=n(14293),u=n(57490),m=n(52900),h=n(52665),v=n(80507),f=n(92521),g=n(72596);function y(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noReusedPasswords"),"\n "))}function b(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",19),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function w(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function I(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function C(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",21),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,b,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,w,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,I,9,6,"ng-container",1),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,C,9,6,"ng-container",1),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span",18),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(28,7,"reusedXTimes",i.passwordUseMap.get(e.login.password)),"\n ")}}function P(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,E,31,10,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"reusedPasswordsFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"reusedPasswordsFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function k(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,P,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function A(e,t){}class O extends o.CipherReportComponent{constructor(e,t,n,i,r){super(t,n,!0,i,r),this.cipherService=e}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[];this.passwordUseMap=new Map,e.forEach((e=>{e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted||(t.push(e),this.passwordUseMap.has(e.login.password)?this.passwordUseMap.set(e.login.password,this.passwordUseMap.get(e.login.password)+1):this.passwordUseMap.set(e.login.password,1))}));const n=t.filter((e=>this.passwordUseMap.has(e.login.password)&&this.passwordUseMap.get(e.login.password)>1));this.ciphers=n}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}}t.ReusedPasswordsReportComponent=O,O.ɵfac=function(e){return new(e||O)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ModalService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PasswordRepromptService))},O.ɵcmp=a.ɵɵdefineComponent({type:O,selectors:[["app-reused-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],[1,"badge","badge-warning"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,y,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,x,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,k,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,A,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"reusedPasswordsReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[u.NgIf,m.CalloutComponent,u.NgForOf,h.IconComponent,v.StopClickDirective,f.StopPropDirective],pipes:[g.I18nPipe,u.DecimalPipe],encapsulation:2})},15023:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.ToolsComponent=void 0;n(36424),n(77243);const r=n(32621),o=n(77243),a=n(36424),s=n(68012),l=n(57490),c=n(80507),d=n(72596);function p(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",21),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().premiumRequired()})),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"premium"),"\n "))}function u(e,t){1&e&&(r.ɵɵelementStart(0,"span",22),r.ɵɵtext(1),r.ɵɵpipe(2,"uppercase"),r.ɵɵpipe(3,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,r.ɵɵpipeBind1(3,3,"free")),"\n "))}class m{constructor(e,t){this.stateService=e,this.messagingService=t,this.canAccessPremium=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.canAccessPremium=yield this.stateService.getCanAccessPremium()}))}premiumRequired(){this.canAccessPremium||this.messagingService.send("premiumRequired")}}t.ToolsComponent=m,m.ɵfac=function(e){return new(e||m)(r.ɵɵdirectiveInject(o.StateService),r.ɵɵdirectiveInject(a.MessagingService))},m.ɵcmp=r.ɵɵdefineComponent({type:m,selectors:[["app-tools"]],decls:80,vars:35,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[1,"card","mb-4"],[1,"card-header"],[1,"list-group","list-group-flush"],["routerLink","generator","routerLinkActive","active",1,"list-group-item"],["routerLink","import","routerLinkActive","active",1,"list-group-item"],["routerLink","export","routerLinkActive","active",1,"list-group-item"],[1,"card"],[1,"card-header","d-flex"],[1,"ml-auto"],["href","#","appStopClick","","class","badge badge-primary",3,"click",4,"ngIf"],["routerLink","exposed-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","reused-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","weak-passwords-report","routerLinkActive","active",1,"list-group-item"],["routerLink","unsecured-websites-report","routerLinkActive","active",1,"list-group-item"],["routerLink","inactive-two-factor-report","routerLinkActive","active",1,"list-group-item"],["routerLink","breach-report","routerLinkActive","active",1,"list-group-item","d-flex"],["class","badge badge-success",4,"ngIf"],[1,"col-9"],["href","#","appStopClick","",1,"badge","badge-primary",3,"click"],[1,"badge","badge-success"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",2),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",3),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"div",4),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"div",5),r.ɵɵtext(13,"\n "),r.ɵɵelementStart(14,"a",6),r.ɵɵtext(15),r.ɵɵpipe(16,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"a",7),r.ɵɵtext(19),r.ɵɵpipe(20,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"a",8),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementStart(28,"div",9),r.ɵɵtext(29,"\n "),r.ɵɵelementStart(30,"div",10),r.ɵɵtext(31),r.ɵɵpipe(32,"i18n"),r.ɵɵelementStart(33,"div",11),r.ɵɵtext(34,"\n "),r.ɵɵtemplate(35,p,3,3,"a",12),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementStart(39,"div",5),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"a",13),r.ɵɵtext(42),r.ɵɵpipe(43,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"a",14),r.ɵɵtext(46),r.ɵɵpipe(47,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementStart(49,"a",15),r.ɵɵtext(50),r.ɵɵpipe(51,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n "),r.ɵɵelementStart(53,"a",16),r.ɵɵtext(54),r.ɵɵpipe(55,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(56,"\n "),r.ɵɵelementStart(57,"a",17),r.ɵɵtext(58),r.ɵɵpipe(59,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementStart(61,"a",18),r.ɵɵtext(62),r.ɵɵpipe(63,"i18n"),r.ɵɵelementStart(64,"div",11),r.ɵɵtext(65,"\n "),r.ɵɵtemplate(66,u,4,5,"span",19),r.ɵɵtext(67,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(68,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(69,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(70,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(71,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(72,"\n "),r.ɵɵelementStart(73,"div",20),r.ɵɵtext(74,"\n "),r.ɵɵelement(75,"router-outlet"),r.ɵɵtext(76,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(77,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(78,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(79,"\n")),2&e&&(r.ɵɵadvance(9),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,13,"tools")),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(16,15,"passwordGenerator"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(20,17,"importData"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(24,19,"exportVault"),"\n "),r.ɵɵadvance(8),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(32,21,"reports"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!t.canAccessPremium),r.ɵɵadvance(7),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(43,23,"exposedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(47,25,"reusedPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(51,27,"weakPasswordsReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(55,29,"unsecuredWebsitesReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(59,31,"inactive2faReport"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(63,33,"dataBreachReport"),"\n "),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",!t.canAccessPremium))},directives:[s.RouterLinkWithHref,s.RouterLinkActive,l.NgIf,s.RouterOutlet,c.StopClickDirective],pipes:[d.I18nPipe,l.UpperCasePipe],encapsulation:2})},25589:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UnsecuredWebsitesReportComponent=void 0;n(68062),n(36424),n(14293),n(77243),n(29546);const r=n(23635),o=n(35208),a=n(32621),s=n(68062),l=n(29546),c=n(36424),d=n(77243),p=n(14293),u=n(57490),m=n(52900),h=n(52665),v=n(80507),f=n(92521),g=n(72596);function y(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function x(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noUnsecuredWebsites"),"\n "))}function b(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",16),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function w(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",17),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function I(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"a",15),a.ɵɵlistener("click",(function(){const t=a.ɵɵrestoreView(e).$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(10,"i18n"),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵtemplate(13,b,9,6,"ng-container",1),a.ɵɵtext(14,"\n "),a.ɵɵtemplate(15,w,9,6,"ng-container",1),a.ɵɵtext(16,"\n "),a.ɵɵelement(17,"br"),a.ɵɵtext(18,"\n "),a.ɵɵelementStart(19,"small"),a.ɵɵtext(20),a.ɵɵelementEnd(),a.ɵɵtext(21,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(10,6,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle)}}function C(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,I,23,8,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"unsecuredWebsitesFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"unsecuredWebsitesFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function E(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,S,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,C,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function P(e,t){}class k extends o.CipherReportComponent{constructor(e,t,n,i,r){super(t,n,!0,i,r),this.cipherService=e}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=(yield this.getAllCiphers()).filter((e=>!(e.type!==r.CipherType.Login||!e.login.hasUris||e.isDeleted)&&e.login.uris.some((e=>null!=e.uri&&0===e.uri.indexOf("http://")))));this.ciphers=e}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}}t.UnsecuredWebsitesReportComponent=k,k.ɵfac=function(e){return new(e||k)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.ModalService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(d.StateService),a.ɵɵdirectiveInject(p.PasswordRepromptService))},k.ɵcmp=a.ɵɵdefineComponent({type:k,selectors:[["app-unsecured-websites-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,y,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,x,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,E,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,P,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"unsecuredWebsitesReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"unsecuredWebsitesReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[u.NgIf,m.CalloutComponent,u.NgForOf,h.IconComponent,v.StopClickDirective,f.StopPropDirective],pipes:[g.I18nPipe,u.DecimalPipe],encapsulation:2})},9023:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WeakPasswordsReportComponent=void 0;n(68062),n(36424),n(86193),n(14293),n(77243),n(29546);const r=n(23635),o=n(35208),a=n(32621),s=n(68062),l=n(86193),c=n(29546),d=n(36424),p=n(77243),u=n(14293),m=n(57490),h=n(52900),v=n(52665),f=n(80507),g=n(92521),y=n(72596);function x(e,t){1&e&&(a.ɵɵelementStart(0,"small"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function S(e,t){1&e&&(a.ɵɵelementStart(0,"div"),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",4),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"loading")))}function b(e,t){1&e&&(a.ɵɵelementStart(0,"app-callout",8),a.ɵɵpipe(1,"i18n"),a.ɵɵtext(2),a.ɵɵpipe(3,"i18n"),a.ɵɵelementEnd()),2&e&&(a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(1,2,"goodNews")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(3,4,"noWeakPasswords"),"\n "))}function w(e,t){if(1&e){const e=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"a",18),a.ɵɵlistener("click",(function(){a.ɵɵrestoreView(e);const t=a.ɵɵnextContext().$implicit;return a.ɵɵnextContext(3).selectCipher(t)})),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵelementEnd(),a.ɵɵtext(5,"\n "),a.ɵɵelementContainerEnd()}if(2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"editItem")),a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function I(e,t){if(1&e&&(a.ɵɵtext(0,"\n "),a.ɵɵelementStart(1,"span"),a.ɵɵtext(2),a.ɵɵelementEnd(),a.ɵɵtext(3,"\n ")),2&e){const e=a.ɵɵnextContext().$implicit;a.ɵɵadvance(2),a.ɵɵtextInterpolate(e.name)}}function C(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",19),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"shared")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"shared")))}function E(e,t){1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelement(2,"i",20),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4,"\n "),a.ɵɵelementStart(5,"span",5),a.ɵɵtext(6),a.ɵɵpipe(7,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n "),a.ɵɵelementContainerEnd()),2&e&&(a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,2,"attachments")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(7,4,"attachments")))}function P(e,t){if(1&e&&(a.ɵɵelementStart(0,"tr"),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"td",12),a.ɵɵtext(3,"\n "),a.ɵɵelement(4,"app-vault-icon",13),a.ɵɵtext(5,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"td",14),a.ɵɵtext(8,"\n "),a.ɵɵtemplate(9,w,6,4,"ng-container",15),a.ɵɵtext(10,"\n "),a.ɵɵtemplate(11,I,4,1,"ng-template",null,16,a.ɵɵtemplateRefExtractor),a.ɵɵtext(13,"\n "),a.ɵɵtemplate(14,C,9,6,"ng-container",1),a.ɵɵtext(15,"\n "),a.ɵɵtemplate(16,E,9,6,"ng-container",1),a.ɵɵtext(17,"\n "),a.ɵɵelement(18,"br"),a.ɵɵtext(19,"\n "),a.ɵɵelementStart(20,"small"),a.ɵɵtext(21),a.ɵɵelementEnd(),a.ɵɵtext(22,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(23,"\n "),a.ɵɵelementStart(24,"td",17),a.ɵɵtext(25,"\n "),a.ɵɵelementStart(26,"span"),a.ɵɵtext(27),a.ɵɵpipe(28,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(29,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(30,"\n "),a.ɵɵelementEnd()),2&e){const e=t.$implicit,n=a.ɵɵreference(12),i=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("cipher",e),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization||i.canManageCipher(e))("ngIfElse",n),a.ɵɵadvance(5),a.ɵɵproperty("ngIf",!i.organization&&e.organizationId),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.hasAttachments),a.ɵɵadvance(5),a.ɵɵtextInterpolate(e.subTitle),a.ɵɵadvance(5),a.ɵɵclassMapInterpolate1("badge badge-",i.passwordStrengthMap.get(e.id)[1],""),a.ɵɵadvance(1),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(28,10,i.passwordStrengthMap.get(e.id)[0]),"\n ")}}function k(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"app-callout",9),a.ɵɵpipe(3,"i18n"),a.ɵɵtext(4),a.ɵɵpipe(5,"i18n"),a.ɵɵpipe(6,"number"),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n "),a.ɵɵelementStart(8,"table",10),a.ɵɵtext(9,"\n "),a.ɵɵelementStart(10,"tbody"),a.ɵɵtext(11,"\n "),a.ɵɵtemplate(12,P,31,12,"tr",11),a.ɵɵtext(13,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(14,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(15,"\n "),a.ɵɵelementContainerEnd()),2&e){const e=a.ɵɵnextContext(2);a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(3,3,"weakPasswordsFound")),a.ɵɵadvance(2),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(5,5,"weakPasswordsFoundDesc",a.ɵɵpipeBind1(6,8,e.ciphers.length)),"\n "),a.ɵɵadvance(8),a.ɵɵproperty("ngForOf",e.ciphers)}}function A(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",6),a.ɵɵtext(1,"\n "),a.ɵɵtemplate(2,b,4,6,"app-callout",7),a.ɵɵtext(3,"\n "),a.ɵɵtemplate(4,k,16,10,"ng-container",1),a.ɵɵtext(5,"\n"),a.ɵɵelementEnd()),2&e){const e=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!e.ciphers.length),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",e.ciphers.length)}}function O(e,t){}class T extends o.CipherReportComponent{constructor(e,t,n,i,r,o){super(n,i,!0,r,o),this.cipherService=e,this.passwordGenerationService=t,this.passwordStrengthMap=new Map,this.passwordStrengthCache=new Map}ngOnInit(){const e=Object.create(null,{load:{get:()=>super.load}});return i(this,void 0,void 0,(function*(){(yield this.checkAccess())&&(yield e.load.call(this))}))}setCiphers(){return i(this,void 0,void 0,(function*(){const e=yield this.getAllCiphers(),t=[],n=e=>null!=e.login.username&&""!==e.login.username.trim(),i=e=>e.login.password+"_____"+(n(e)?e.login.username:"");e.forEach((e=>{if(e.type!==r.CipherType.Login||null==e.login.password||""===e.login.password||e.isDeleted)return;const o=n(e),a=i(e);if(!this.passwordStrengthCache.has(a)){let t=[];if(o){const n=e.login.username.indexOf("@");t=n>-1?t.concat(e.login.username.substr(0,n).trim().toLowerCase().split(/[^A-Za-z0-9]/)).filter((e=>e.length>=3)):e.login.username.trim().toLowerCase().split(/[^A-Za-z0-9]/).filter((e=>e.length>=3))}const n=this.passwordGenerationService.passwordStrength(e.login.password,t.length>0?t:null);this.passwordStrengthCache.set(a,n.score)}const s=this.passwordStrengthCache.get(a);null!=s&&s<=2&&(this.passwordStrengthMap.set(e.id,this.scoreKey(s)),t.push(e))})),t.sort(((e,t)=>this.passwordStrengthCache.get(i(e))-this.passwordStrengthCache.get(i(t)))),this.ciphers=t}))}getAllCiphers(){return this.cipherService.getAllDecrypted()}canManageCipher(e){return!0}scoreKey(e){switch(e){case 4:return["strong","success"];case 3:return["good","primary"];case 2:return["weak","warning"];default:return["veryWeak","danger"]}}}t.WeakPasswordsReportComponent=T,T.ɵfac=function(e){return new(e||T)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.PasswordGenerationService),a.ɵɵdirectiveInject(c.ModalService),a.ɵɵdirectiveInject(d.MessagingService),a.ɵɵdirectiveInject(p.StateService),a.ɵɵdirectiveInject(u.PasswordRepromptService))},T.ɵcmp=a.ɵɵdefineComponent({type:T,selectors:[["app-weak-passwords-report"]],features:[a.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],[1,"mt-4"],["type","success",3,"title",4,"ngIf"],["type","success",3,"title"],["type","danger",3,"title"],[1,"table","table-hover","table-list","table-ciphers"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],[3,"cipher"],[1,"reduced-lh","wrap"],[4,"ngIf","ngIfElse"],["cantManage",""],[1,"text-right"],["href","#","appStopClick","",3,"title","click"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,x,9,6,"small",1),a.ɵɵtext(6,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(7,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(8,"\n"),a.ɵɵelementStart(9,"p"),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n"),a.ɵɵtemplate(13,S,9,6,"div",1),a.ɵɵtext(14,"\n"),a.ɵɵtemplate(15,A,6,2,"div",2),a.ɵɵtext(16,"\n"),a.ɵɵtemplate(17,O,0,0,"ng-template",null,3,a.ɵɵtemplateRefExtractor),a.ɵɵtext(19,"\n")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(4,5,"weakPasswordsReport"),"\n "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),a.ɵɵadvance(3),a.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.hasLoaded))},directives:[m.NgIf,h.CalloutComponent,m.NgForOf,v.IconComponent,f.StopClickDirective,g.StopPropDirective],pipes:[y.I18nPipe,m.DecimalPipe],encapsulation:2})},90958:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditCustomFieldsComponent=void 0;const i=n(990),r=(n(98573),n(40349),n(32621)),o=n(40349),a=n(98573),s=n(57490),l=n(83072),c=n(50553),d=n(96832),p=n(966),u=n(3057),m=n(80507),h=n(72596);function v(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"input",12),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd(),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",22),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).copy(t.value,"value","Field")})),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelement(9,"i",23),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(7,5,"copyValue"))}}const f=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}};function g(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"input",24),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd(),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",21),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).toggleFieldValue(t)})),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"i",26),r.ɵɵtext(10,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(12,"\n "),r.ɵɵelementStart(13,"button",25),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit,n=r.ɵɵnextContext(2);return n.copy(t.value,"value",t.type===n.fieldType.Hidden?"H_Field":"Field")})),r.ɵɵpipe(14,"i18n"),r.ɵɵtext(15,"\n "),r.ɵɵelement(16,"i",23),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate("type",n.showValue?"text":"password"),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly||!i.cipher.viewPassword&&!n.newField),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(7,10,"toggleVisibility")),r.ɵɵproperty("disabled",!i.cipher.viewPassword&&!n.newField),r.ɵɵadvance(3),r.ɵɵproperty("ngClass",r.ɵɵpureFunction2(14,f,!n.showValue,n.showValue)),r.ɵɵadvance(4),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(14,12,"copyValue")),r.ɵɵproperty("disabled",!i.cipher.viewPassword&&!n.newField)}}function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"select",28),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).$implicit.linkedId=t})),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,y,2,2,"option",29),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(2),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.linkedId)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",i.linkedFieldOptions)}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",20),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,x,4,5,"select",27),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext().$implicit,t=r.ɵɵnextContext(2);r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.type===t.fieldType.Linked&&null!=t.cipher.linkedFieldOptions)}}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"input",31),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().$implicit.value=t})),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext(),t=e.index,n=e.$implicit,i=r.ɵɵnextContext(2);r.ɵɵpropertyInterpolate1("id","fieldValue",t,""),r.ɵɵpropertyInterpolate1("name","Field.Value",t,""),r.ɵɵproperty("ngModel",n.value)("disabled",i.cipher.isDeleted||i.viewOnly)}}function w(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",32),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);const t=r.ɵɵnextContext().$implicit;return r.ɵɵnextContext(2).removeField(t)})),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",33),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()}2&e&&r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(1,1,"remove"))}function I(e,t){1&e&&(r.ɵɵelementStart(0,"button",34),r.ɵɵpipe(1,"i18n"),r.ɵɵtext(2,"\n "),r.ɵɵelement(3,"i",35),r.ɵɵtext(4,"\n "),r.ɵɵelementEnd()),2&e&&r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(1,1,"dragToSort"))}function C(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",6),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",7),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"div",8),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"label",9),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementStart(10,"a",10),r.ɵɵpipe(11,"i18n"),r.ɵɵtext(12,"\n "),r.ɵɵelement(13,"i",11),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementStart(17,"input",12),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.name=t})),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",13),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"label",9),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"div",14),r.ɵɵtext(27,"\n "),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,v,13,7,"div",15),r.ɵɵtext(30,"\n "),r.ɵɵtext(31,"\n "),r.ɵɵtemplate(32,g,20,17,"div",15),r.ɵɵtext(33,"\n "),r.ɵɵtext(34,"\n "),r.ɵɵtemplate(35,S,4,1,"div",15),r.ɵɵtext(36,"\n "),r.ɵɵelementStart(37,"div",16),r.ɵɵtext(38,"\n "),r.ɵɵtext(39,"\n "),r.ɵɵtemplate(40,b,1,4,"input",17),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵtemplate(43,w,5,3,"button",18),r.ɵɵtext(44,"\n "),r.ɵɵtemplate(45,I,5,3,"button",19),r.ɵɵtext(46,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(47,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=r.ɵɵnextContext(2);r.ɵɵadvance(6),r.ɵɵpropertyInterpolate1("for","fieldName",n,""),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(8,15,"name")),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(11,17,"learnMore")),r.ɵɵadvance(7),r.ɵɵpropertyInterpolate1("id","fieldName",n,""),r.ɵɵpropertyInterpolate1("name","Field.Name",n,""),r.ɵɵproperty("ngModel",e.name)("disabled",i.cipher.isDeleted||i.viewOnly),r.ɵɵadvance(5),r.ɵɵpropertyInterpolate1("for","fieldValue",n,""),r.ɵɵadvance(1),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(24,19,"value")),r.ɵɵadvance(6),r.ɵɵproperty("ngIf",e.type===i.fieldType.Text),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.type===i.fieldType.Hidden),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.type===i.fieldType.Linked),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",e.type===i.fieldType.Boolean),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",4),r.ɵɵlistener("cdkDropListDropped",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().drop(t)})),r.ɵɵtext(1,"\n "),r.ɵɵtemplate(2,C,49,21,"div",5),r.ɵɵtext(3,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.cipher.fields)("ngForTrackBy",e.trackByFunction)}}function P(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"a",36),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().addField()})),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",37),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1(" ",r.ɵɵpipeBind1(4,1,"newCustomField"),"\n "))}function k(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function A(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",30),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵproperty("ngValue",e.addFieldLinkedTypeOption.value),r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",e.addFieldLinkedTypeOption.name,"\n ")}}function O(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",38),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",39),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"label",40),r.ɵɵtext(5),r.ɵɵpipe(6,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"select",41),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().addFieldType=t})),r.ɵɵtext(9,"\n "),r.ɵɵtemplate(10,k,2,2,"option",29),r.ɵɵtext(11,"\n "),r.ɵɵtemplate(12,A,2,2,"option",42),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(5),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(6,4,"type")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.addFieldType),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.addFieldTypeOptions),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",null!=e.cipher.linkedFieldOptions)}}class T extends i.AddEditCustomFieldsComponent{constructor(e,t){super(e,t)}}t.AddEditCustomFieldsComponent=T,T.ɵfac=function(e){return new(e||T)(r.ɵɵdirectiveInject(o.I18nService),r.ɵɵdirectiveInject(a.EventService))},T.ɵcmp=r.ɵɵdefineComponent({type:T,selectors:[["app-vault-add-edit-custom-fields"]],inputs:{viewOnly:"viewOnly",copy:"copy"},features:[r.ɵɵInheritDefinitionFeature],decls:14,vars:6,consts:[[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],["class","row",4,"ngIf"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],[1,"col-5","form-group"],[1,"d-flex"],[3,"for"],["href","https://bitwarden.com/help/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],[1,"col-7","form-group"],[1,"d-flex","align-items-center"],["class","input-group",4,"ngIf"],[1,"flex-fill"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-link text-muted cursor-move",3,"appA11yTitle",4,"ngIf"],[1,"input-group"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["class","form-control",3,"id","name","ngModel","disabled","ngModelChange",4,"ngIf"],[1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-hamburger","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],[1,"row"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngIf"]],template:function(e,t){1&e&&(r.ɵɵelementContainerStart(0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"h3",0),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵtemplate(6,E,4,2,"div",1),r.ɵɵtext(7,"\n "),r.ɵɵtext(8,"\n "),r.ɵɵtemplate(9,P,5,3,"a",2),r.ɵɵtext(10,"\n "),r.ɵɵtemplate(11,O,16,6,"div",3),r.ɵɵtext(12,"\n"),r.ɵɵelementContainerEnd(),r.ɵɵtext(13,"\n")),2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,4,"customFields")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.cipher.hasFields),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.cipher.isDeleted&&!t.viewOnly),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.cipher.isDeleted&&!t.viewOnly))},directives:[s.NgIf,l.CdkDropList,s.NgForOf,l.CdkDrag,c.A11yTitleDirective,d.DefaultValueAccessor,p.InputVerbatimDirective,d.NgControlStatus,d.NgModel,s.NgClass,d.SelectControlValueAccessor,d.NgSelectOption,d.ɵNgSelectMultipleOption,u.TrueFalseValueDirective,d.CheckboxControlValueAccessor,m.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2})},58746:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AddEditComponent=void 0;const r=n(23635),o=n(12657),a=(n(22501),n(68062),n(69050),n(98573),n(4349),n(40349),n(70143),n(36424),n(94308),n(86193),n(14293),n(99954),n(10685),n(77243),n(63529),n(53093)),s=n(32621),l=n(68062),c=n(4349),d=n(40349),p=n(99954),u=n(22501),m=n(77243),h=n(69050),v=n(63529),f=n(86193),g=n(36424),y=n(98573),x=n(10685),S=n(94308),b=n(70143),w=n(14293),I=n(96832),C=n(637),E=n(50553),P=n(57490),k=n(90958),A=n(52900),O=n(17302),T=n(966),M=n(80507),D=n(72596);function B(e,t){1&e&&(s.ɵɵelementStart(0,"app-callout",26),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"personalOwnershipPolicyInEffect"),"\n "))}function R(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function U(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",17),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",27),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"select",28),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.type=t})),s.ɵɵtext(9,"\n "),s.ɵɵtemplate(10,R,2,2,"option",29),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,4,"whatTypeOfItem")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.type)("disabled",e.cipher.isDeleted),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.typeOptions)}}function V(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.id),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function F(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",17),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"label",31),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"select",32),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.folderId=t})),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,V,2,2,"option",29),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(10,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,4,"folder")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.folderId)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.folders)}}function N(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",41),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(3);return t.copy(t.cipher.login.username,"username","Username")})),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelement(5,"i",44),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(3,1,"copyUsername")))}function _(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",57),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(4).generatePassword()})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",58),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"generatePassword"))}function j(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",51),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,_,5,3,"a",52),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"a",53,54),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).checkPassword()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7,"\n "),s.ɵɵelement(8,"i",55),s.ɵɵtext(9,"\n "),s.ɵɵelement(10,"i",56),s.ɵɵpipe(11,"i18n"),s.ɵɵtext(12,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(5),t=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.cipher.viewPassword),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,6,"checkPassword")),s.ɵɵproperty("appApiAction",t.checkPasswordPromise),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(11,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",61),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(4).premiumRequired()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"premium"),"\n "))}function L(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",61),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(4).upgradeOrganization()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"upgrade"),"\n "))}function K(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"img",59),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵtemplate(5,z,3,3,"a",60),s.ɵɵtext(6,"\n "),s.ɵɵtemplate(7,L,3,3,"a",60),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"verificationCodeTotp")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.organization&&!e.cipher.organizationId&&!e.canAccessPremium),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.organization&&!e.organization.useTotp||!e.organization&&!e.canAccessPremium&&e.cipher.organizationId&&!e.cipher.organizationUseTotp)}}const q=function(e){return{"stroke-dashoffset.px":e}};function G(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",62),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"span",63),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"span",64),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵnamespaceSVG(),s.ɵɵelementStart(7,"svg"),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"g"),s.ɵɵtext(10,"\n "),s.ɵɵelement(11,"circle",65),s.ɵɵtext(12,"\n "),s.ɵɵelement(13,"circle",66),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵnamespaceHTML(),s.ɵɵelementStart(18,"span",67),s.ɵɵpipe(19,"i18n"),s.ɵɵtext(20),s.ɵɵelementEnd(),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"button",68),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(3);return t.copy(t.totpCode,"verificationCodeTotp","TOTP")})),s.ɵɵpipe(23,"i18n"),s.ɵɵtext(24,"\n "),s.ɵɵelement(25,"i",69),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(e.totpSec),s.ɵɵadvance(6),s.ɵɵproperty("ngStyle",s.ɵɵpureFunction1(9,q,e.totpDash)),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(19,5,"verificationCodeTotp")),s.ɵɵadvance(2),s.ɵɵtextInterpolate(e.totpCodeFormatted),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(23,7,"copyVerificationCode"))}}function W(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function H(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",80),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).removeUri(t)})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",81),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"remove"))}function $(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",16),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",71),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",72),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",34),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",73),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.uri=t})),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",41),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"button",42),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).launch(t)})),s.ɵɵpipe(16,"i18n"),s.ɵɵtext(17,"\n "),s.ɵɵelement(18,"i",74),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"button",50),s.ɵɵlistener("click",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).copy(t.uri,"uri","URI")})),s.ɵɵpipe(22,"i18n"),s.ɵɵtext(23,"\n "),s.ɵɵelement(24,"i",44),s.ɵɵtext(25,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"div",75),s.ɵɵtext(31,"\n "),s.ɵɵelementStart(32,"div",37),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"label",72),s.ɵɵtext(35),s.ɵɵpipe(36,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"a",76),s.ɵɵpipe(39,"i18n"),s.ɵɵtext(40,"\n "),s.ɵɵelement(41,"i",77),s.ɵɵtext(42,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(43,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementStart(45,"div",37),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"select",78),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.match=t}))("change",(function(){const t=s.ɵɵrestoreView(e).$implicit;return s.ɵɵnextContext(4).loginUriMatchChanged(t)})),s.ɵɵtext(48,"\n "),s.ɵɵtemplate(49,W,2,2,"option",29),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵtemplate(52,H,5,3,"button",79),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(55,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=s.ɵɵnextContext(4);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate1("for","loginUri",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(6,19,"uriPosition",n+1)),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate1("id","loginUri",n,""),s.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Uri"),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(11,22,"ex")," https://google.com"),s.ɵɵproperty("ngModel",e.uri)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(16,24,"launch")),s.ɵɵproperty("disabled",!e.canLaunch),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(22,26,"copyUri")),s.ɵɵadvance(13),s.ɵɵpropertyInterpolate1("for","loginUriMatch",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(36,28,"matchDetection"),"\n "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(39,30,"learnMore")),s.ɵɵadvance(9),s.ɵɵpropertyInterpolate1("id","loginUriMatch",n,""),s.ɵɵpropertyInterpolate1("name","Login.Uris[",n,"].Match"),s.ɵɵproperty("ngModel",e.match)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",i.uriMatchOptions),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!i.cipher.isDeleted&&!i.viewOnly)}}function Q(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,$,56,32,"div",70),s.ɵɵtext(3,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cipher.login.uris)("ngForTrackBy",e.trackByFunction)}}function Y(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",82),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).addUri()})),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",83),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,1,"newUri"),"\n "))}const J=function(e,t){return{"bwi-eye":e,"bwi-eye-slash":t}},X=function(e){return{low:e}};function Z(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",17),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",33),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"div",34),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"input",35),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.username=t})),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,N,8,3,"div",36),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementStart(18,"div",17),s.ɵɵtext(19,"\n "),s.ɵɵelementStart(20,"div",37),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"label",38),s.ɵɵtext(23),s.ɵɵpipe(24,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵtemplate(26,j,14,10,"div",39),s.ɵɵtext(27,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",34),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"input",40),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.password=t})),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementStart(33,"div",41),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"button",42),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).togglePassword()})),s.ɵɵpipe(36,"i18n"),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"i",43),s.ɵɵtext(39,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(40,"\n "),s.ɵɵelementStart(41,"button",42),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.login.password,"password","Password")})),s.ɵɵpipe(42,"i18n"),s.ɵɵtext(43,"\n "),s.ɵɵelement(44,"i",44),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(48,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(49,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(50,"\n "),s.ɵɵelementStart(51,"div",16),s.ɵɵtext(52,"\n "),s.ɵɵelementStart(53,"div",17),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"label",45),s.ɵɵtext(56),s.ɵɵpipe(57,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(58,"\n "),s.ɵɵelementStart(59,"input",46),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.login.totp=t})),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(61,"\n "),s.ɵɵelementStart(62,"div",47),s.ɵɵtext(63,"\n "),s.ɵɵtemplate(64,K,9,5,"div",21),s.ɵɵtext(65,"\n "),s.ɵɵtemplate(66,G,28,11,"div",48),s.ɵɵtext(67,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(68,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(69,"\n "),s.ɵɵtemplate(70,Q,4,2,"ng-container",21),s.ɵɵtext(71,"\n "),s.ɵɵtemplate(72,Y,5,3,"a",49),s.ɵɵtext(73,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,23,"username")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",e.cipher.login.username)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.isDeleted),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(24,25,"password")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showPassword?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.login.password)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(36,27,"toggleVisibility")),s.ɵɵproperty("disabled",!e.cipher.viewPassword),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(33,J,!e.showPassword,e.showPassword)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(42,29,"copyPassword")),s.ɵɵproperty("disabled",!e.cipher.viewPassword),s.ɵɵadvance(15),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(57,31,"authenticatorKeyTotp")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("type",e.cipher.viewPassword?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.login.totp)("disabled",e.cipher.isDeleted||!e.cipher.viewPassword||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(36,X,e.totpLow)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.login.totp||!e.totpCode),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.cipher.login.totp&&e.totpCode),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",e.cipher.login.hasUris),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.cipher.isDeleted&&!e.viewOnly)}}function ee(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function te(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function ne(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",17),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",84),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"input",85),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.cardholderName=t})),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(12,"\n "),s.ɵɵelementStart(13,"div",17),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"label",86),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"select",87),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.brand=t})),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,ee,2,2,"option",29),s.ɵɵtext(22,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(23,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"div",16),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",17),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",88),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"div",34),s.ɵɵtext(35,"\n "),s.ɵɵelementStart(36,"input",89),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.number=t})),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelementStart(38,"div",41),s.ɵɵtext(39,"\n "),s.ɵɵelementStart(40,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleCardNumber()})),s.ɵɵpipe(41,"i18n"),s.ɵɵtext(42,"\n "),s.ɵɵelement(43,"i",43),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementStart(46,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.card.number,"number","Number")})),s.ɵɵpipe(47,"i18n"),s.ɵɵtext(48,"\n "),s.ɵɵelement(49,"i",44),s.ɵɵtext(50,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(51,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(52,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(53,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"div",90),s.ɵɵtext(56,"\n "),s.ɵɵelementStart(57,"label",91),s.ɵɵtext(58),s.ɵɵpipe(59,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(60,"\n "),s.ɵɵelementStart(61,"select",92),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.expMonth=t})),s.ɵɵtext(62,"\n "),s.ɵɵtemplate(63,te,2,2,"option",29),s.ɵɵtext(64,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementStart(67,"div",90),s.ɵɵtext(68,"\n "),s.ɵɵelementStart(69,"label",93),s.ɵɵtext(70),s.ɵɵpipe(71,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(72,"\n "),s.ɵɵelementStart(73,"input",94),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.expYear=t})),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(76,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(77,"\n "),s.ɵɵelementStart(78,"div",16),s.ɵɵtext(79,"\n "),s.ɵɵelementStart(80,"div",17),s.ɵɵtext(81,"\n "),s.ɵɵelementStart(82,"label",95),s.ɵɵtext(83),s.ɵɵpipe(84,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(85,"\n "),s.ɵɵelementStart(86,"div",34),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"input",96),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.card.code=t})),s.ɵɵelementEnd(),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"div",41),s.ɵɵtext(91,"\n "),s.ɵɵelementStart(92,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleCardCode()})),s.ɵɵpipe(93,"i18n"),s.ɵɵtext(94,"\n "),s.ɵɵelement(95,"i",43),s.ɵɵtext(96,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"button",50),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);const t=s.ɵɵnextContext(2);return t.copy(t.cipher.card.code,"securityCode","Security Code")})),s.ɵɵpipe(99,"i18n"),s.ɵɵtext(100,"\n "),s.ɵɵelement(101,"i",44),s.ɵɵtext(102,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(103,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(104,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(105,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(106,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,29,"cardholderName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.cardholderName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,31,"brand")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.brand)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cardBrandOptions),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,33,"number")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showCardNumber?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.card.number)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(41,35,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(51,J,!e.showCardNumber,e.showCardNumber)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(47,37,"copyNumber")),s.ɵɵadvance(12),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(59,39,"expirationMonth")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.card.expMonth)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cardExpMonthOptions),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(71,41,"expirationYear")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate1("placeholder","",s.ɵɵpipeBind1(74,43,"ex")," 2019"),s.ɵɵproperty("ngModel",e.cipher.card.expYear)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(84,45,"securityCode")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",e.showCardCode?"text":"password"),s.ɵɵproperty("ngModel",e.cipher.card.code)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(93,47,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(54,J,!e.showCardCode,e.showCardCode)),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(99,49,"securityCode"))}}function ie(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function re(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",16),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div",97),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"label",98),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"select",99),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.title=t})),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,ie,2,2,"option",29),s.ɵɵtext(13,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(14,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵelementStart(17,"div",16),s.ɵɵtext(18,"\n "),s.ɵɵelementStart(19,"div",97),s.ɵɵtext(20,"\n "),s.ɵɵelementStart(21,"label",100),s.ɵɵtext(22),s.ɵɵpipe(23,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(24,"\n "),s.ɵɵelementStart(25,"input",101),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.firstName=t})),s.ɵɵelementEnd(),s.ɵɵtext(26,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(27,"\n "),s.ɵɵelementStart(28,"div",97),s.ɵɵtext(29,"\n "),s.ɵɵelementStart(30,"label",102),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementStart(34,"input",103),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.middleName=t})),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementStart(37,"div",97),s.ɵɵtext(38,"\n "),s.ɵɵelementStart(39,"label",104),s.ɵɵtext(40),s.ɵɵpipe(41,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(42,"\n "),s.ɵɵelementStart(43,"input",105),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.lastName=t})),s.ɵɵelementEnd(),s.ɵɵtext(44,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(45,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(46,"\n "),s.ɵɵelementStart(47,"div",16),s.ɵɵtext(48,"\n "),s.ɵɵelementStart(49,"div",97),s.ɵɵtext(50,"\n "),s.ɵɵelementStart(51,"label",106),s.ɵɵtext(52),s.ɵɵpipe(53,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(54,"\n "),s.ɵɵelementStart(55,"input",107),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.username=t})),s.ɵɵelementEnd(),s.ɵɵtext(56,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(57,"\n "),s.ɵɵelementStart(58,"div",97),s.ɵɵtext(59,"\n "),s.ɵɵelementStart(60,"label",108),s.ɵɵtext(61),s.ɵɵpipe(62,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(63,"\n "),s.ɵɵelementStart(64,"input",109),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.company=t})),s.ɵɵelementEnd(),s.ɵɵtext(65,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(66,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(67,"\n "),s.ɵɵelementStart(68,"div",16),s.ɵɵtext(69,"\n "),s.ɵɵelementStart(70,"div",97),s.ɵɵtext(71,"\n "),s.ɵɵelementStart(72,"label",110),s.ɵɵtext(73),s.ɵɵpipe(74,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(75,"\n "),s.ɵɵelementStart(76,"input",111),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.ssn=t})),s.ɵɵelementEnd(),s.ɵɵtext(77,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(78,"\n "),s.ɵɵelementStart(79,"div",97),s.ɵɵtext(80,"\n "),s.ɵɵelementStart(81,"label",112),s.ɵɵtext(82),s.ɵɵpipe(83,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(84,"\n "),s.ɵɵelementStart(85,"input",113),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.passportNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(86,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(87,"\n "),s.ɵɵelementStart(88,"div",97),s.ɵɵtext(89,"\n "),s.ɵɵelementStart(90,"label",114),s.ɵɵtext(91),s.ɵɵpipe(92,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(93,"\n "),s.ɵɵelementStart(94,"input",115),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.licenseNumber=t})),s.ɵɵelementEnd(),s.ɵɵtext(95,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(96,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(97,"\n "),s.ɵɵelementStart(98,"div",16),s.ɵɵtext(99,"\n "),s.ɵɵelementStart(100,"div",17),s.ɵɵtext(101,"\n "),s.ɵɵelementStart(102,"label",116),s.ɵɵtext(103),s.ɵɵpipe(104,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(105,"\n "),s.ɵɵelementStart(106,"input",117),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.email=t})),s.ɵɵelementEnd(),s.ɵɵtext(107,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(108,"\n "),s.ɵɵelementStart(109,"div",17),s.ɵɵtext(110,"\n "),s.ɵɵelementStart(111,"label",118),s.ɵɵtext(112),s.ɵɵpipe(113,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(114,"\n "),s.ɵɵelementStart(115,"input",119),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.phone=t})),s.ɵɵelementEnd(),s.ɵɵtext(116,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(117,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(118,"\n "),s.ɵɵelementStart(119,"div",16),s.ɵɵtext(120,"\n "),s.ɵɵelementStart(121,"div",17),s.ɵɵtext(122,"\n "),s.ɵɵelementStart(123,"label",120),s.ɵɵtext(124),s.ɵɵpipe(125,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(126,"\n "),s.ɵɵelementStart(127,"input",121),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address1=t})),s.ɵɵelementEnd(),s.ɵɵtext(128,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(129,"\n "),s.ɵɵelementStart(130,"div",17),s.ɵɵtext(131,"\n "),s.ɵɵelementStart(132,"label",122),s.ɵɵtext(133),s.ɵɵpipe(134,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(135,"\n "),s.ɵɵelementStart(136,"input",123),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address2=t})),s.ɵɵelementEnd(),s.ɵɵtext(137,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(138,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(139,"\n "),s.ɵɵelementStart(140,"div",16),s.ɵɵtext(141,"\n "),s.ɵɵelementStart(142,"div",17),s.ɵɵtext(143,"\n "),s.ɵɵelementStart(144,"label",124),s.ɵɵtext(145),s.ɵɵpipe(146,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(147,"\n "),s.ɵɵelementStart(148,"input",125),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.address3=t})),s.ɵɵelementEnd(),s.ɵɵtext(149,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(150,"\n "),s.ɵɵelementStart(151,"div",17),s.ɵɵtext(152,"\n "),s.ɵɵelementStart(153,"label",126),s.ɵɵtext(154),s.ɵɵpipe(155,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(156,"\n "),s.ɵɵelementStart(157,"input",127),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.city=t})),s.ɵɵelementEnd(),s.ɵɵtext(158,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(159,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(160,"\n "),s.ɵɵelementStart(161,"div",16),s.ɵɵtext(162,"\n "),s.ɵɵelementStart(163,"div",17),s.ɵɵtext(164,"\n "),s.ɵɵelementStart(165,"label",128),s.ɵɵtext(166),s.ɵɵpipe(167,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(168,"\n "),s.ɵɵelementStart(169,"input",129),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.state=t})),s.ɵɵelementEnd(),s.ɵɵtext(170,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(171,"\n "),s.ɵɵelementStart(172,"div",17),s.ɵɵtext(173,"\n "),s.ɵɵelementStart(174,"label",130),s.ɵɵtext(175),s.ɵɵpipe(176,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(177,"\n "),s.ɵɵelementStart(178,"input",131),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.postalCode=t})),s.ɵɵelementEnd(),s.ɵɵtext(179,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(180,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(181,"\n "),s.ɵɵelementStart(182,"div",16),s.ɵɵtext(183,"\n "),s.ɵɵelementStart(184,"div",17),s.ɵɵtext(185,"\n "),s.ɵɵelementStart(186,"label",132),s.ɵɵtext(187),s.ɵɵpipe(188,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(189,"\n "),s.ɵɵelementStart(190,"input",133),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.identity.country=t})),s.ɵɵelementEnd(),s.ɵɵtext(191,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(192,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(193,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,55,"title")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.title)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.identityTitleOptions),s.ɵɵadvance(10),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(23,57,"firstName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.firstName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(32,59,"middleName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.middleName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(41,61,"lastName")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.lastName)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(53,63,"username")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.username)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(62,65,"company")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.company)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(74,67,"ssn")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.ssn)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(83,69,"passportNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.passportNumber)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(92,71,"licenseNumber")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.licenseNumber)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(104,73,"email")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.email)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(113,75,"phone")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.phone)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(125,77,"address1")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address1)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(134,79,"address2")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address2)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(146,81,"address3")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.address3)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(155,83,"cityTown")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.city)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(167,85,"stateProvince")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.state)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(176,87,"zipPostalCode")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.postalCode)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(188,89,"country")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.identity.country)("disabled",e.cipher.isDeleted||e.viewOnly)}}function oe(e,t){if(1&e&&(s.ɵɵelementStart(0,"option",30),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵproperty("ngValue",e.value),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function ae(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",134),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",16),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",135),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",136),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"select",137),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).cipher.organizationId=t}))("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).organizationChanged()})),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,oe,2,2,"option",29),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,5,"ownership")),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,7,"whoOwnsThisItem")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.organizationId)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.ownershipOptions)}}function se(e,t){1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function le(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",139),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"input",140),s.ɵɵlistener("ngModelChange",(function(t){return s.ɵɵrestoreView(e).$implicit.checked=t})),s.ɵɵelementEnd(),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"label",141),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6,"\n "),s.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index,i=s.ɵɵnextContext(4);s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("id","collection-",n,""),s.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),s.ɵɵproperty("ngModel",e.checked)("disabled",i.cipher.isDeleted||i.viewOnly),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate1("for","collection-",n,""),s.ɵɵadvance(1),s.ɵɵtextInterpolate(e.name)}}function ce(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,le,7,6,"div",138),s.ɵɵtext(3,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.collections)}}function de(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",134),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵtemplate(6,se,3,3,"div",21),s.ɵɵtext(7,"\n "),s.ɵɵtemplate(8,ce,4,1,"ng-container",21),s.ɵɵtext(9,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"collections")),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.collections||!e.collections.length),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}function pe(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"b",143),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5),s.ɵɵpipe(6,"date"),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,2,"datePasswordUpdated"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(6,4,e.cipher.passwordRevisionDisplayDate,"medium"),"\n ")}}function ue(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div"),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"b",143),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"a",145),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(3).viewHistory()})),s.ɵɵpipe(7,"i18n"),s.ɵɵtext(8),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(4,3,"passwordHistory"),":"),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(7,5,"view")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",e.cipher.passwordHistory.length,"\n ")}}function me(e,t){if(1&e&&(s.ɵɵelementStart(0,"div"),s.ɵɵtext(1),s.ɵɵpipe(2,"date"),s.ɵɵelementStart(3,"span",148),s.ɵɵtext(4),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=t.$implicit;s.ɵɵadvance(1),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(2,2,e.lastUsedDate,"short")," -\n "),s.ɵɵadvance(3),s.ɵɵtextInterpolate(e.password)}}function he(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",146),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,me,6,5,"div",147),s.ɵɵtext(3,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("ngForOf",e.cipher.passwordHistory)}}function ve(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",142),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"div"),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"b",143),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9),s.ɵɵpipe(10,"date"),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵtemplate(12,pe,7,7,"div",21),s.ɵɵtext(13,"\n "),s.ɵɵtemplate(14,ue,10,7,"div",21),s.ɵɵtext(15,"\n "),s.ɵɵtemplate(16,he,4,1,"div",144),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementContainerEnd()),2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(8,5,"dateUpdated"),":"),s.ɵɵadvance(2),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind2(10,7,e.cipher.revisionDate,"medium"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.showRevisionDate),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.hasPasswordHistory),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.viewingPasswordHistory)}}function fe(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"h3",134),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",139),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"input",149),s.ɵɵlistener("change",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).repromptChanged()})),s.ɵɵelementEnd(),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",150),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"a",151),s.ɵɵpipe(15,"i18n"),s.ɵɵtext(16,"\n "),s.ɵɵelement(17,"i",77),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(20,"\n "),s.ɵɵelementContainerEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,5,"options")),s.ɵɵadvance(5),s.ɵɵproperty("ngModel",e.reprompt)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,7,"passwordPrompt")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(15,9,"learnMore"))}}function ge(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",13),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,B,3,3,"app-callout",14),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,U,14,6,"div",15),s.ɵɵtext(5,"\n "),s.ɵɵelementStart(6,"div",16),s.ɵɵtext(7,"\n "),s.ɵɵelementStart(8,"div",17),s.ɵɵtext(9,"\n "),s.ɵɵelementStart(10,"label",18),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13,"\n "),s.ɵɵelementStart(14,"input",19),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().cipher.name=t})),s.ɵɵelementEnd(),s.ɵɵtext(15,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(16,"\n "),s.ɵɵtemplate(17,F,11,6,"div",20),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵtext(20,"\n "),s.ɵɵtemplate(21,Z,74,38,"ng-container",21),s.ɵɵtext(22,"\n "),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,ne,108,57,"ng-container",21),s.ɵɵtext(25,"\n "),s.ɵɵtext(26,"\n "),s.ɵɵtemplate(27,re,194,91,"ng-container",21),s.ɵɵtext(28,"\n "),s.ɵɵelementStart(29,"div",22),s.ɵɵtext(30,"\n "),s.ɵɵelementStart(31,"label",23),s.ɵɵtext(32),s.ɵɵpipe(33,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n "),s.ɵɵelementStart(35,"textarea",24),s.ɵɵlistener("ngModelChange",(function(t){s.ɵɵrestoreView(e);return s.ɵɵnextContext().cipher.notes=t})),s.ɵɵelementEnd(),s.ɵɵtext(36,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(37,"\n "),s.ɵɵelement(38,"app-vault-add-edit-custom-fields",25),s.ɵɵtext(39,"\n "),s.ɵɵtemplate(40,ae,21,9,"ng-container",21),s.ɵɵtext(41,"\n "),s.ɵɵtemplate(42,de,10,5,"ng-container",21),s.ɵɵtext(43,"\n "),s.ɵɵtemplate(44,ve,19,10,"ng-container",21),s.ɵɵtext(45,"\n "),s.ɵɵtemplate(46,fe,21,11,"ng-container",21),s.ɵɵtext(47,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowOwnershipAssignment()&&!e.allowPersonal),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.editMode&&!e.viewOnly),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,20,"name")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.name)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",!e.organization),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Login),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Card),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",e.cipher.type===e.cipherType.Identity),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(33,22,"notes")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",e.cipher.notes)("disabled",e.cipher.isDeleted||e.viewOnly),s.ɵɵadvance(3),s.ɵɵproperty("cipher",e.cipher)("thisCipherType",e.cipher.type)("viewOnly",e.viewOnly)("copy",e.copy.bind(e)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.allowOwnershipAssignment()),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",(!e.editMode||e.cloneMode)&&e.cipher.organizationId),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.editMode),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.canUseReprompt)}}function ye(e,t){if(1&e&&(s.ɵɵelementStart(0,"button",152),s.ɵɵtext(1,"\n "),s.ɵɵelement(2,"i",153),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4,"\n "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext(),t=s.ɵɵreference(5);s.ɵɵproperty("disabled",t.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,null!=e.cipher&&e.cipher.isDeleted?"restore":"save"))}}const xe=function(e,t){return{"bwi-star-f":e,"bwi-star":t}};function Se(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",68),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).toggleFavorite()})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2,"\n "),s.ɵɵelement(3,"i",43),s.ɵɵtext(4,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵnextContext(2);s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,2,e.cipher.favorite?"unfavorite":"favorite")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,xe,e.cipher.favorite,!e.cipher.favorite))}}function be(e,t){if(1&e){const e=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",157,158),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(e);return s.ɵɵnextContext(2).delete()})),s.ɵɵpipe(2,"i18n"),s.ɵɵtext(3,"\n "),s.ɵɵelement(4,"i",159),s.ɵɵtext(5,"\n "),s.ɵɵelement(6,"i",160),s.ɵɵpipe(7,"i18n"),s.ɵɵtext(8,"\n "),s.ɵɵelementEnd()}if(2&e){const e=s.ɵɵreference(1),t=s.ɵɵnextContext(2);s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(2,6,t.cipher.isDeleted?"permanentlyDelete":"delete")),s.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),s.ɵɵadvance(4),s.ɵɵproperty("hidden",e.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(7,8,"loading")),s.ɵɵproperty("hidden",!e.loading)}}function we(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",154),s.ɵɵtext(1,"\n "),s.ɵɵtemplate(2,Se,5,7,"button",155),s.ɵɵtext(3,"\n "),s.ɵɵtemplate(4,be,9,10,"button",156),s.ɵɵtext(5,"\n "),s.ɵɵelementEnd()),2&e){const e=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!e.organization&&!e.cipher.isDeleted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",e.editMode&&!e.cloneMode)}}class Ie extends a.AddEditComponent{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){super(e,t,n,i,r,o,a,c,d,p,m,h,u),this.totpService=s,this.passwordGenerationService=l,this.messagingService=c,this.policyService=p,this.showRevisionDate=!1,this.hasPasswordHistory=!1,this.viewingPasswordHistory=!1,this.viewOnly=!1}ngOnInit(){const e=Object.create(null,{ngOnInit:{get:()=>super.ngOnInit}});return i(this,void 0,void 0,(function*(){if(yield e.ngOnInit.call(this),yield this.load(),this.showRevisionDate=null!=this.cipher.passwordRevisionDisplayDate,this.hasPasswordHistory=this.cipher.hasPasswordHistory,this.cleanUp(),this.canAccessPremium=yield this.stateService.getCanAccessPremium(),this.cipher.type===r.CipherType.Login&&this.cipher.login.totp&&(this.cipher.organizationUseTotp||this.canAccessPremium)){yield this.totpUpdateCode();const e=this.totpService.getTimeInterval(this.cipher.login.totp);yield this.totpTick(e),this.totpInterval=window.setInterval((()=>i(this,void 0,void 0,(function*(){yield this.totpTick(e)}))),1e3)}}))}toggleFavorite(){this.cipher.favorite=!this.cipher.favorite}launch(e){e.canLaunch&&this.platformUtilsService.launchUri(e.launchUri)}copy(e,t,n){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(t))),this.editMode&&("password"===t?this.eventService.collect(o.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipherId):"securityCode"===t?this.eventService.collect(o.EventType.Cipher_ClientCopiedCardCode,this.cipherId):"H_Field"===n&&this.eventService.collect(o.EventType.Cipher_ClientCopiedHiddenField,this.cipherId)))}generatePassword(){const e=Object.create(null,{generatePassword:{get:()=>super.generatePassword}});return i(this,void 0,void 0,(function*(){const t=yield e.generatePassword.call(this);if(t){const e=(yield this.passwordGenerationService.getOptions())[0];this.cipher.login.password=yield this.passwordGenerationService.generatePassword(e)}return t}))}premiumRequired(){this.canAccessPremium||this.messagingService.send("premiumRequired")}upgradeOrganization(){this.messagingService.send("upgradeOrganization",{organizationId:this.cipher.organizationId})}viewHistory(){this.viewingPasswordHistory=!this.viewingPasswordHistory}cleanUp(){this.totpInterval&&window.clearInterval(this.totpInterval)}totpUpdateCode(){return i(this,void 0,void 0,(function*(){if(null!=this.cipher&&this.cipher.type===r.CipherType.Login&&null!=this.cipher.login.totp)if(this.totpCode=yield this.totpService.getCode(this.cipher.login.totp),null!=this.totpCode)if(this.totpCode.length>4){const e=Math.floor(this.totpCode.length/2);this.totpCodeFormatted=this.totpCode.substring(0,e)+" "+this.totpCode.substring(e)}else this.totpCodeFormatted=this.totpCode;else this.totpCodeFormatted=null,this.totpInterval&&window.clearInterval(this.totpInterval);else this.totpInterval&&window.clearInterval(this.totpInterval)}))}allowOwnershipAssignment(){return(!this.editMode||this.cloneMode)&&null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)}totpTick(e){return i(this,void 0,void 0,(function*(){const t=Math.round((new Date).getTime()/1e3)%e;this.totpSec=e-t,this.totpDash=+(Math.round(78.6/e*t+"e+2")+"e-2"),this.totpLow=this.totpSec<=7,0===t&&(yield this.totpUpdateCode())}))}}t.AddEditComponent=Ie,Ie.ɵfac=function(e){return new(e||Ie)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.FolderService),s.ɵɵdirectiveInject(d.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.AuditService),s.ɵɵdirectiveInject(m.StateService),s.ɵɵdirectiveInject(h.CollectionService),s.ɵɵdirectiveInject(v.TotpService),s.ɵɵdirectiveInject(f.PasswordGenerationService),s.ɵɵdirectiveInject(g.MessagingService),s.ɵɵdirectiveInject(y.EventService),s.ɵɵdirectiveInject(x.PolicyService),s.ɵɵdirectiveInject(S.OrganizationService),s.ɵɵdirectiveInject(b.LogService),s.ɵɵdirectiveInject(w.PasswordRepromptService))},Ie.ɵcmp=s.ɵɵdefineComponent({type:Ie,selectors:[["app-vault-add-edit"]],features:[s.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["role","dialog","aria-modal","true","aria-labelledby","cipherAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-lg"],["ngNativeValidate","","autocomplete","off",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","cipherAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["class","ml-auto",4,"ngIf"],[1,"modal-body"],["type","info",4,"ngIf"],["class","row",4,"ngIf"],[1,"row"],[1,"col-6","form-group"],["for","name"],["id","name","type","text","name","Name","required","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","col-6 form-group",4,"ngIf"],[4,"ngIf"],[1,"form-group"],["for","notes"],["id","notes","name","Notes","rows","6",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"cipher","thisCipherType","viewOnly","copy"],["type","info"],["for","type"],["id","type","name","Type","appAutofocus","",1,"form-control",3,"ngModel","disabled","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","loginUsername"],[1,"input-group"],["id","loginUsername","type","text","name","Login.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["class","input-group-append",4,"ngIf"],[1,"d-flex"],["for","loginPassword"],["class","ml-auto d-flex",4,"ngIf"],["id","loginPassword","name","Login.Password","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"input-group-append"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","disabled","click"],["aria-hidden","true",1,"bwi","bwi-lg",3,"ngClass"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-clone"],["for","loginTotp"],["id","loginTotp","name","Login.Totp","appInputVerbatim","",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-6","form-group","totp","d-flex","align-items-end",3,"ngClass"],["class","d-flex align-items-center",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-outline-secondary",3,"appA11yTitle","click"],[1,"ml-auto","d-flex"],["href","#","class","d-block mr-2 bwi-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","bwi-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-check-circle",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-spinner","bwi-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","bwi-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-fw","bwi-generate"],["src","../../images/totp-countdown.png","id","totpImage",1,"ml-2",3,"title"],["href","#","appStopClick","","class","badge badge-primary ml-3",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"badge","badge-primary","ml-3",3,"click"],[1,"d-flex","align-items-center"],[1,"totp-countdown","mr-3","ml-2"],[1,"totp-sec"],["r","12.6","cy","16","cx","16",1,"totp-circle","inner",3,"ngStyle"],["r","14","cy","16","cx","16",1,"totp-circle","outer"],[1,"totp-code","mr-2",3,"title"],["type","button",1,"btn","btn-link",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-clone"],["class","row",4,"ngFor","ngForOf","ngForTrackBy"],[1,"col-7","form-group"],[3,"for"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","placeholder","ngModelChange"],["aria-hidden","true",1,"bwi","bwi-lg","bwi-share-square"],[1,"col-5","form-group"],["href","https://bitwarden.com/help/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"form-control","overflow-hidden",3,"id","name","ngModel","disabled","ngModelChange","change"],["type","button","class","btn btn-link text-danger ml-2",3,"appA11yTitle","click",4,"ngIf"],["type","button",1,"btn","btn-link","text-danger","ml-2",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-minus-circle","bwi-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus-circle","bwi-fw"],["for","cardCardholderName"],["id","cardCardholderName","type","text","name","Card.CardCardholderName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardBrand"],["id","cardBrand","name","Card.Brand",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardNumber"],["id","cardNumber","name","Card.Number","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col","form-group"],["for","cardExpMonth"],["id","cardExpMonth","name","Card.ExpMonth",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","cardExpYear"],["id","cardExpYear","type","text","name","Card.ExpYear",1,"form-control",3,"ngModel","placeholder","disabled","ngModelChange"],["for","cardCode"],["id","cardCode","name","Card.Code","appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"type","ngModel","disabled","ngModelChange"],[1,"col-4","form-group"],["for","idTitle"],["id","idTitle","name","Identity.Title",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idFirstName"],["id","idFirstName","type","text","name","Identity.FirstName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idMiddleName"],["id","idMiddleName","type","text","name","Identity.MiddleName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLastName"],["id","idLastName","type","text","name","Identity.LastName",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idUsername"],["id","idUsername","type","text","name","Identity.Username","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCompany"],["id","idCompany","type","text","name","Identity.Company",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idSsn"],["id","idSsn","type","text","name","Identity.SSN","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPassportNumber"],["id","idPassportNumber","type","text","name","Identity.PassportNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idLicenseNumber"],["id","idLicenseNumber","type","text","name","Identity.LicenseNumber","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idEmail"],["id","idEmail","type","text","inputmode","email","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","inputmode","tel","name","Identity.Phone",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress1"],["id","idAddress1","type","text","name","Identity.Address1",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress2"],["id","idAddress2","type","text","name","Identity.Address2",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idAddress3"],["id","idAddress3","type","text","name","Identity.Address3",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCity"],["id","idCity","type","text","name","Identity.City",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idState"],["id","idState","type","text","name","Identity.State",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPostalCode"],["id","idPostalCode","type","text","name","Identity.PostalCode",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idCountry"],["id","idCountry","type","text","name","Identity.Country",1,"form-control",3,"ngModel","disabled","ngModelChange"],[1,"mt-4"],[1,"col-5"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],[1,"form-check"],["type","checkbox",1,"form-check-input",3,"ngModel","id","name","disabled","ngModelChange"],[1,"form-check-label",3,"for"],[1,"small","text-muted","mt-4"],[1,"font-weight-semibold"],["class","ml-3",4,"ngIf"],["href","#","appStopClick","",3,"title","click"],[1,"ml-3"],[4,"ngFor","ngForOf"],[1,"password-wrapper","text-monospace","ml-2"],["type","checkbox","id","passwordPrompt","name","passwordPrompt",1,"form-check-input",3,"ngModel","disabled","change"],["for","passwordPrompt",1,"form-check-label"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/managing-items/#protect-individual-items",3,"appA11yTitle"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"ml-auto"],["type","button","class","btn btn-link",3,"appA11yTitle","click",4,"ngIf"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1,"\n "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3,"\n "),s.ɵɵelementStart(4,"form",2,3),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(6,"\n "),s.ɵɵelementStart(7,"div",4),s.ɵɵtext(8,"\n "),s.ɵɵelementStart(9,"h2",5),s.ɵɵtext(10),s.ɵɵelementEnd(),s.ɵɵtext(11,"\n "),s.ɵɵelementStart(12,"button",6),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14,"\n "),s.ɵɵelementStart(15,"span",7),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(18,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(19,"\n "),s.ɵɵtemplate(20,ge,48,24,"div",8),s.ɵɵtext(21,"\n "),s.ɵɵelementStart(22,"div",9),s.ɵɵtext(23,"\n "),s.ɵɵtemplate(24,ye,9,7,"button",10),s.ɵɵtext(25,"\n "),s.ɵɵelementStart(26,"button",11),s.ɵɵtext(27),s.ɵɵpipe(28,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(29,"\n "),s.ɵɵtemplate(30,we,6,2,"div",12),s.ɵɵtext(31,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(32,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(33,"\n "),s.ɵɵelementEnd(),s.ɵɵtext(34,"\n"),s.ɵɵelementEnd(),s.ɵɵtext(35,"\n")),2&e&&(s.ɵɵadvance(4),s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(6),s.ɵɵtextInterpolate(t.title),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,7,"close")),s.ɵɵadvance(8),s.ɵɵproperty("ngIf",t.cipher),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!t.viewOnly),s.ɵɵadvance(3),s.ɵɵtextInterpolate1("\n ",s.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel"),"\n "),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[I.NgControlStatusGroup,I.NgForm,C.ApiActionDirective,E.A11yTitleDirective,P.NgIf,I.DefaultValueAccessor,I.RequiredValidator,I.NgControlStatus,I.NgModel,k.AddEditCustomFieldsComponent,A.CalloutComponent,I.SelectControlValueAccessor,O.AutofocusDirective,P.NgForOf,I.NgSelectOption,I.ɵNgSelectMultipleOption,T.InputVerbatimDirective,P.NgClass,M.StopClickDirective,P.NgStyle,I.CheckboxControlValueAccessor],pipes:[D.I18nPipe,P.DatePipe],encapsulation:2})},18641:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentsComponent=void 0;n(91092),n(68062),n(82058),n(40349),n(70143),n(99954),n(77243);const r=n(25885),o=n(32621),a=n(68062),s=n(40349),l=n(82058),c=n(77243),d=n(99954),p=n(91092),u=n(70143),m=n(96832),h=n(637),v=n(57490),f=n(50553),g=n(80507),y=n(72596);function x(e,t){if(1&e&&(o.ɵɵelementStart(0,"small"),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.cipher.name)}}function S(e,t){1&e&&o.ɵɵelement(0,"i",24)}function b(e,t){1&e&&o.ɵɵelement(0,"i",25)}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",26),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",27),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",28),o.ɵɵpipe(5,"i18n"),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"span",29),o.ɵɵtext(8),o.ɵɵpipe(9,"i18n"),o.ɵɵelementEnd(),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"button",30,31),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).reupload(t)})),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(12),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(5,5,"attachmentFixDesc")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(9,7,"attachmentFixDesc")),o.ɵɵadvance(3),o.ɵɵproperty("appApiAction",n.reuploadPromises[t.id])("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(14,9,"fix"),"\n ")}}function I(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"td",32),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",33,34),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(2).delete(t)})),o.ɵɵpipe(4,"i18n"),o.ɵɵtext(5,"\n "),o.ɵɵelement(6,"i",35),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",36),o.ɵɵpipe(9,"i18n"),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵreference(3),t=o.ɵɵnextContext().$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(4,6,"delete")),o.ɵɵproperty("appApiAction",n.deletePromises[t.id])("disabled",e.loading),o.ɵɵadvance(4),o.ɵɵproperty("hidden",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(9,8,"loading")),o.ɵɵproperty("hidden",!e.loading)}}function C(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",16),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,S,1,0,"i",17),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,b,1,0,"i",18),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"td",19),o.ɵɵtext(10,"\n "),o.ɵɵelementStart(11,"div",20),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"a",21),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).download(t)})),o.ɵɵtext(14),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵtemplate(16,w,16,11,"div",22),o.ɵɵtext(17,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"small"),o.ɵɵtext(20),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵtemplate(23,I,12,10,"td",23),o.ɵɵtext(24,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(2);o.ɵɵadvance(4),o.ɵɵproperty("ngIf",!e.downloading),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.downloading),o.ɵɵadvance(8),o.ɵɵtextInterpolate(e.fileName),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",n.showFixOldAttachments(e)),o.ɵɵadvance(4),o.ɵɵtextInterpolate(e.sizeName),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!n.viewOnly)}}function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",14),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,C,25,6,"tr",15),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.cipher.attachments)}}function P(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"label",37),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelement(10,"input",38),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"small",39),o.ɵɵtext(13),o.ɵɵpipe(14,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"newAttachment")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(8,5,"file")),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(14,7,"maxFileSize")))}function k(e,t){if(1&e&&(o.ɵɵelementStart(0,"button",40),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",41),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span"),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e){o.ɵɵnextContext();const e=o.ɵɵreference(5);o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,3,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,5,"save"))}}class A extends r.AttachmentsComponent{constructor(e,t,n,i,r,o,a){super(e,t,n,r,o,window,a,i),this.viewOnly=!1}reupload(e){return i(this,void 0,void 0,(function*(){this.showFixOldAttachments(e)&&(yield this.reuploadCipherAttachment(e,!1))}))}showFixOldAttachments(e){return null==e.key&&null==this.cipher.organizationId}}t.AttachmentsComponent=A,A.ɵfac=function(e){return new(e||A)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.I18nService),o.ɵɵdirectiveInject(l.CryptoService),o.ɵɵdirectiveInject(c.StateService),o.ɵɵdirectiveInject(d.PlatformUtilsService),o.ɵɵdirectiveInject(p.ApiService),o.ɵɵdirectiveInject(u.LogService))},A.ɵcmp=o.ɵɵdefineComponent({type:A,selectors:[["app-vault-attachments"]],features:[o.ɵɵInheritDefinitionFeature],decls:42,vars:14,consts:[["role","dialog","aria-modal","true","aria-labelledby","attachmentsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","attachmentsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["class","table table-hover table-list",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit",3,"disabled",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"table","table-hover","table-list"],[4,"ngFor","ngForOf"],[1,"table-list-icon"],["class","bwi bwi-fw bwi-lg bwi-file","aria-hidden","true",4,"ngIf"],["class","bwi bwi-spinner bwi-lg bwi-fw bwi-spin","aria-hidden","true",4,"ngIf"],[1,"wrap"],[1,"d-flex"],["href","#","appStopClick","",3,"click"],["class","ml-2",4,"ngIf"],["class","table-list-options",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-lg","bwi-file"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-lg","bwi-fw","bwi-spin"],[1,"ml-2"],["href","https://bitwarden.com/help/attachments/#fixing-old-attachments","target","_blank","rel","noopener"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm","m-0","py-0","px-2",3,"appApiAction","disabled","click"],["reuploadBtn",""],[1,"table-list-options"],["type","button","appStopClick","",1,"btn","btn-outline-danger",3,"appA11yTitle","appApiAction","disabled","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"],["for","file",1,"sr-only"],["type","file","id","file","name","file","required","",1,"form-control-file"],[1,"form-text","text-muted"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵtemplate(12,x,2,1,"small",6),o.ɵɵtext(13,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(14,"\n "),o.ɵɵelementStart(15,"button",7),o.ɵɵpipe(16,"i18n"),o.ɵɵtext(17,"\n "),o.ɵɵelementStart(18,"span",8),o.ɵɵtext(19,"×"),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(21,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"div",9),o.ɵɵtext(24,"\n "),o.ɵɵtemplate(25,E,7,1,"table",10),o.ɵɵtext(26,"\n "),o.ɵɵtemplate(27,P,16,9,"div",6),o.ɵɵtext(28,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(29,"\n "),o.ɵɵelementStart(30,"div",11),o.ɵɵtext(31,"\n "),o.ɵɵtemplate(32,k,9,7,"button",12),o.ɵɵtext(33,"\n "),o.ɵɵelementStart(34,"button",13),o.ɵɵtext(35),o.ɵɵpipe(36,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n")),2&e&&(o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"attachments"),"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.cipher),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(16,10,"close")),o.ɵɵadvance(10),o.ɵɵproperty("ngIf",t.cipher&&t.cipher.hasAttachments),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.viewOnly),o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(36,12,"close"),"\n "))},directives:[m.NgControlStatusGroup,m.NgForm,h.ApiActionDirective,v.NgIf,f.A11yTitleDirective,v.NgForOf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},8369:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkActionsComponent=void 0;const r=n(32621),o=(n(40349),n(14293),n(99954),n(2944)),a=(n(29546),n(30608),n(35920)),s=n(60328),l=n(37699),c=n(41075),d=(n(97618),n(32621)),p=n(99954),u=n(40349),m=n(29546),h=n(14293),v=n(50553),f=n(57490),g=n(80507),y=n(72596),x=["bulkDeleteTemplate"],S=["bulkRestoreTemplate"],b=["bulkMoveTemplate"],w=["bulkShareTemplate"];function I(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",9),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkMove()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",16),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"moveSelected"),"\n "))}function C(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",9),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkShare()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",17),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"moveSelectedToOrg"),"\n "))}function E(e,t){if(1&e){const e=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"button",18),d.ɵɵlistener("click",(function(){d.ɵɵrestoreView(e);return d.ɵɵnextContext().bulkRestore()})),d.ɵɵtext(1,"\n "),d.ɵɵelement(2,"i",19),d.ɵɵtext(3),d.ɵɵpipe(4,"i18n"),d.ɵɵelementEnd()}2&e&&(d.ɵɵadvance(3),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(4,1,"restoreSelected"),"\n "))}function P(e,t){}function k(e,t){}function A(e,t){}function O(e,t){}class T{constructor(e,t,n,i){this.platformUtilsService=e,this.i18nService=t,this.modalService=n,this.passwordRepromptService=i}bulkDelete(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(a.BulkDeleteComponent,this.bulkDeleteModalRef,(n=>{n.permanent=this.deleted,n.cipherIds=e,n.organization=this.organization,n.onDeleted.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkRestore(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(l.BulkRestoreComponent,this.bulkRestoreModalRef,(n=>{n.cipherIds=e,n.onRestored.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkShare(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelected();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(c.BulkShareComponent,this.bulkShareModalRef,(n=>{n.ciphers=e,n.onShared.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}bulkMove(){return i(this,void 0,void 0,(function*(){if(!(yield this.promptPassword()))return;const e=this.ciphersComponent.getSelectedIds();if(0===e.length)return void this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nothingSelected"));const[t]=yield this.modalService.openViewRef(s.BulkMoveComponent,this.bulkMoveModalRef,(n=>{n.cipherIds=e,n.onMoved.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}selectAll(e){this.ciphersComponent.selectAll(e)}promptPassword(){return i(this,void 0,void 0,(function*(){return!this.ciphersComponent.getSelected().find((e=>e.reprompt!==o.CipherRepromptType.None))||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.BulkActionsComponent=T,T.ɵfac=function(e){return new(e||T)(d.ɵɵdirectiveInject(p.PlatformUtilsService),d.ɵɵdirectiveInject(u.I18nService),d.ɵɵdirectiveInject(m.ModalService),d.ɵɵdirectiveInject(h.PasswordRepromptService))},T.ɵcmp=d.ɵɵdefineComponent({type:T,selectors:[["app-vault-bulk-actions"]],viewQuery:function(e,t){if(1&e&&(d.ɵɵviewQuery(x,7,r.ViewContainerRef),d.ɵɵviewQuery(S,7,r.ViewContainerRef),d.ɵɵviewQuery(b,7,r.ViewContainerRef),d.ɵɵviewQuery(w,7,r.ViewContainerRef)),2&e){let e;d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkDeleteModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkRestoreModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkMoveModalRef=e.first),d.ɵɵqueryRefresh(e=d.ɵɵloadQuery())&&(t.bulkShareModalRef=e.first)}},inputs:{ciphersComponent:"ciphersComponent",deleted:"deleted",organization:"organization"},decls:50,vars:15,consts:[["appListDropdown","",1,"dropdown","mr-2"],["type","button","id","bulkActionsButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-sm","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["class","dropdown-item","appStopClick","",3,"click",4,"ngIf"],["class","dropdown-item",3,"click",4,"ngIf"],[1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],[1,"dropdown-divider"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-check-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-minus-square"],["bulkDeleteTemplate",""],["bulkRestoreTemplate",""],["bulkMoveTemplate",""],["bulkShareTemplate",""],["aria-hidden","true",1,"bwi","bwi-fw","bwi-folder"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],[1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"]],template:function(e,t){1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1,"\n "),d.ɵɵelementStart(2,"button",1),d.ɵɵpipe(3,"i18n"),d.ɵɵtext(4,"\n "),d.ɵɵelement(5,"i",2),d.ɵɵtext(6,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(7,"\n "),d.ɵɵelementStart(8,"div",3),d.ɵɵtext(9,"\n "),d.ɵɵtemplate(10,I,5,3,"button",4),d.ɵɵtext(11,"\n "),d.ɵɵtemplate(12,C,5,3,"button",4),d.ɵɵtext(13,"\n "),d.ɵɵtemplate(14,E,5,3,"button",5),d.ɵɵtext(15,"\n "),d.ɵɵelementStart(16,"button",6),d.ɵɵlistener("click",(function(){return t.bulkDelete()})),d.ɵɵtext(17,"\n "),d.ɵɵelement(18,"i",7),d.ɵɵtext(19),d.ɵɵpipe(20,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(21,"\n "),d.ɵɵelement(22,"div",8),d.ɵɵtext(23,"\n "),d.ɵɵelementStart(24,"button",9),d.ɵɵlistener("click",(function(){return t.selectAll(!0)})),d.ɵɵtext(25,"\n "),d.ɵɵelement(26,"i",10),d.ɵɵtext(27),d.ɵɵpipe(28,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(29,"\n "),d.ɵɵelementStart(30,"button",9),d.ɵɵlistener("click",(function(){return t.selectAll(!1)})),d.ɵɵtext(31,"\n "),d.ɵɵelement(32,"i",11),d.ɵɵtext(33),d.ɵɵpipe(34,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(35,"\n "),d.ɵɵelementEnd(),d.ɵɵtext(36,"\n"),d.ɵɵelementEnd(),d.ɵɵtext(37,"\n\n"),d.ɵɵtemplate(38,P,0,0,"ng-template",null,12,d.ɵɵtemplateRefExtractor),d.ɵɵtext(40,"\n"),d.ɵɵtemplate(41,k,0,0,"ng-template",null,13,d.ɵɵtemplateRefExtractor),d.ɵɵtext(43,"\n"),d.ɵɵtemplate(44,A,0,0,"ng-template",null,14,d.ɵɵtemplateRefExtractor),d.ɵɵtext(46,"\n"),d.ɵɵtemplate(47,O,0,0,"ng-template",null,15,d.ɵɵtemplateRefExtractor),d.ɵɵtext(49,"\n")),2&e&&(d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(3,7,"options")),d.ɵɵadvance(8),d.ɵɵproperty("ngIf",!t.deleted&&!t.organization),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.deleted&&!t.organization),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",t.deleted&&!t.organization),d.ɵɵadvance(5),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(20,9,t.deleted?"permanentlyDeleteSelected":"deleteSelected"),"\n "),d.ɵɵadvance(8),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(28,11,"selectAll"),"\n "),d.ɵɵadvance(6),d.ɵɵtextInterpolate1("\n ",d.ɵɵpipeBind1(34,13,"unselectAll"),"\n "))},directives:[v.A11yTitleDirective,f.NgIf,g.StopClickDirective],pipes:[y.I18nPipe],encapsulation:2})},35920:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkDeleteComponent=void 0;const r=n(32621),o=(n(91092),n(68062),n(40349),n(99954),n(30608),n(11100)),a=n(32621),s=n(68062),l=n(99954),c=n(40349),d=n(91092),p=n(96832),u=n(637),m=n(50553),h=n(72596);class v{constructor(e,t,n,i){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.apiService=i,this.cipherIds=[],this.permanent=!1,this.onDeleted=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){this.organization&&this.organization.canEditAnyCollection?yield this.deleteCiphersAdmin():yield this.deleteCiphers(),yield this.formPromise,this.onDeleted.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t(this.permanent?"permanentlyDeletedItems":"deletedItems"))}))}deleteCiphers(){return i(this,void 0,void 0,(function*(){this.permanent?this.formPromise=yield this.cipherService.deleteManyWithServer(this.cipherIds):this.formPromise=yield this.cipherService.softDeleteManyWithServer(this.cipherIds)}))}deleteCiphersAdmin(){return i(this,void 0,void 0,(function*(){const e=new o.CipherBulkDeleteRequest(this.cipherIds,this.organization.id);this.permanent?this.formPromise=yield this.apiService.deleteManyCiphersAdmin(e):this.formPromise=yield this.apiService.putDeleteManyCiphersAdmin(e)}))}}t.BulkDeleteComponent=v,v.ɵfac=function(e){return new(e||v)(a.ɵɵdirectiveInject(s.CipherService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(d.ApiService))},v.ɵcmp=a.ɵɵdefineComponent({type:v,selectors:[["app-vault-bulk-delete"]],inputs:{cipherIds:"cipherIds",permanent:"permanent",organization:"organization"},outputs:{onDeleted:"onDeleted"},decls:45,vars:21,consts:[["role","dialog","aria-modal","true","aria-labelledby","deleteSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","deleteSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-danger","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1,"\n "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3,"\n "),a.ɵɵelementStart(4,"form",2,3),a.ɵɵlistener("ngSubmit",(function(){return t.submit()})),a.ɵɵtext(6,"\n "),a.ɵɵelementStart(7,"div",4),a.ɵɵtext(8,"\n "),a.ɵɵelementStart(9,"h2",5),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12,"\n "),a.ɵɵelementStart(13,"button",6),a.ɵɵpipe(14,"i18n"),a.ɵɵtext(15,"\n "),a.ɵɵelementStart(16,"span",7),a.ɵɵtext(17,"×"),a.ɵɵelementEnd(),a.ɵɵtext(18,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(19,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(20,"\n "),a.ɵɵelementStart(21,"div",8),a.ɵɵtext(22),a.ɵɵpipe(23,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(24,"\n "),a.ɵɵelementStart(25,"div",9),a.ɵɵtext(26,"\n "),a.ɵɵelementStart(27,"button",10),a.ɵɵtext(28,"\n "),a.ɵɵelement(29,"i",11),a.ɵɵpipe(30,"i18n"),a.ɵɵtext(31,"\n "),a.ɵɵelementStart(32,"span"),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(36,"\n "),a.ɵɵelementStart(37,"button",12),a.ɵɵtext(38),a.ɵɵpipe(39,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(40,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(41,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(42,"\n "),a.ɵɵelementEnd(),a.ɵɵtext(43,"\n"),a.ɵɵelementEnd(),a.ɵɵtext(44,"\n")),2&e){const e=a.ɵɵreference(5);a.ɵɵadvance(4),a.ɵɵproperty("appApiAction",t.formPromise),a.ɵɵadvance(6),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(11,8,t.permanent?"permanentlyDeleteSelected":"deleteSelected"),"\n "),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(14,10,"close")),a.ɵɵadvance(9),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind2(23,12,t.permanent?"permanentlyDeleteSelectedItemsDesc":"deleteSelectedItemsDesc",t.cipherIds.length),"\n "),a.ɵɵadvance(5),a.ɵɵproperty("disabled",e.loading),a.ɵɵadvance(2),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(30,15,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,17,t.permanent?"permanentlyDelete":"delete")),a.ɵɵadvance(5),a.ɵɵtextInterpolate1("\n ",a.ɵɵpipeBind1(39,19,"cancel"),"\n ")}},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.A11yTitleDirective],pipes:[h.I18nPipe],encapsulation:2})},60328:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkMoveComponent=void 0;const r=n(32621),o=(n(68062),n(4349),n(40349),n(99954),n(32621)),a=n(68062),s=n(99954),l=n(40349),c=n(4349),d=n(96832),p=n(637),u=n(50553),m=n(57490),h=n(72596);function v(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",17),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}class f{constructor(e,t,n,i){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.folderService=i,this.cipherIds=[],this.onMoved=new r.EventEmitter,this.folderId=null,this.folders=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.folders=yield this.folderService.getAllDecrypted(),this.folderId=this.folders[0].id}))}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.cipherService.moveManyWithServer(this.cipherIds,this.folderId),yield this.formPromise,this.onMoved.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItems"))}))}}t.BulkMoveComponent=f,f.ɵfac=function(e){return new(e||f)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.FolderService))},f.ɵcmp=o.ɵɵdefineComponent({type:f,selectors:[["app-vault-bulk-move"]],inputs:{cipherIds:"cipherIds"},outputs:{onMoved:"onMoved"},decls:60,vars:26,consts:[["role","dialog","aria-modal","true","aria-labelledby","moveSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","moveSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","folder"],["id","folder","name","FolderId",1,"form-control",3,"ngModel","ngModelChange"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[3,"ngValue"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"p"),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"div",9),o.ɵɵtext(28,"\n "),o.ɵɵelementStart(29,"label",10),o.ɵɵtext(30),o.ɵɵpipe(31,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"select",11),o.ɵɵlistener("ngModelChange",(function(e){return t.folderId=e})),o.ɵɵtext(34,"\n "),o.ɵɵtemplate(35,v,2,2,"option",12),o.ɵɵtext(36,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(37,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(38,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(39,"\n "),o.ɵɵelementStart(40,"div",13),o.ɵɵtext(41,"\n "),o.ɵɵelementStart(42,"button",14),o.ɵɵtext(43,"\n "),o.ɵɵelement(44,"i",15),o.ɵɵpipe(45,"i18n"),o.ɵɵtext(46,"\n "),o.ɵɵelementStart(47,"span"),o.ɵɵtext(48),o.ɵɵpipe(49,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵelementStart(52,"button",16),o.ɵɵtext(53),o.ɵɵpipe(54,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(57,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(58,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(59,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,11,"moveSelected"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,13,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate(o.ɵɵpipeBind2(25,15,"moveSelectedItemsDesc",t.cipherIds.length)),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(31,18,"folder")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.folderId),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",t.folders),o.ɵɵadvance(7),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(45,20,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(49,22,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(54,24,"cancel"),"\n ")}},directives:[d.ɵNgNoValidate,d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.A11yTitleDirective,d.SelectControlValueAccessor,d.NgControlStatus,d.NgModel,m.NgForOf,d.NgSelectOption,d.ɵNgSelectMultipleOption],pipes:[h.I18nPipe],encapsulation:2})},37699:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkRestoreComponent=void 0;const r=n(32621),o=(n(68062),n(40349),n(99954),n(32621)),a=n(68062),s=n(99954),l=n(40349),c=n(96832),d=n(637),p=n(50553),u=n(72596);class m{constructor(e,t,n){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.cipherIds=[],this.onRestored=new r.EventEmitter}submit(){return i(this,void 0,void 0,(function*(){this.formPromise=this.cipherService.restoreManyWithServer(this.cipherIds),yield this.formPromise,this.onRestored.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItems"))}))}}t.BulkRestoreComponent=m,m.ɵfac=function(e){return new(e||m)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService))},m.ɵcmp=o.ɵɵdefineComponent({type:m,selectors:[["app-vault-bulk-restore"]],inputs:{cipherIds:"cipherIds"},outputs:{onRestored:"onRestored"},decls:45,vars:21,consts:[["role","dialog","aria-modal","true","aria-labelledby","restoreSelectedTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","restoreSelectedTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"modal-footer"],["appAutoFocus","","type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22),o.ɵɵpipe(23,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(24,"\n "),o.ɵɵelementStart(25,"div",9),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"button",10),o.ɵɵtext(28,"\n "),o.ɵɵelement(29,"i",11),o.ɵɵpipe(30,"i18n"),o.ɵɵtext(31,"\n "),o.ɵɵelementStart(32,"span"),o.ɵɵtext(33),o.ɵɵpipe(34,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(35,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"button",12),o.ɵɵtext(38),o.ɵɵpipe(39,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(43,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(44,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,8,"restoreSelected"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,10,"close")),o.ɵɵadvance(9),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind2(23,12,"restoreSelectedItemsDesc",t.cipherIds.length),"\n "),o.ɵɵadvance(5),o.ɵɵproperty("disabled",e.loading),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(30,15,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(34,17,"restore")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(39,19,"cancel"),"\n ")}},directives:[c.ɵNgNoValidate,c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective],pipes:[u.I18nPipe],encapsulation:2})},41075:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BulkShareComponent=void 0;const r=n(32621),o=(n(68062),n(69050),n(40349),n(70143),n(94308),n(99954),n(32621)),a=n(68062),s=n(99954),l=n(40349),c=n(69050),d=n(94308),p=n(70143),u=n(96832),m=n(637),h=n(50553),v=n(57490),f=n(92521),g=n(72596);function y(e,t){if(1&e&&(o.ɵɵelementStart(0,"option",21),o.ɵɵtext(1),o.ɵɵelementEnd()),2&e){const e=t.$implicit;o.ɵɵproperty("ngValue",e.id),o.ɵɵadvance(1),o.ɵɵtextInterpolate(e.name)}}function x(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"div",22),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"button",23),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectAll(!0)})),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"button",23),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectAll(!1)})),o.ɵɵtext(7),o.ɵɵpipe(8,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,2,"selectAll"),"\n "),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function S(e,t){1&e&&(o.ɵɵelementStart(0,"div"),o.ɵɵtext(1),o.ɵɵpipe(2,"i18n"),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(1),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function b(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"tr",26),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(2).check(t)})),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"td",27),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"input",28),o.ɵɵlistener("ngModelChange",(function(t){return o.ɵɵrestoreView(e).$implicit.checked=t})),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"td"),o.ɵɵtext(8),o.ɵɵelementEnd(),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;o.ɵɵadvance(4),o.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),o.ɵɵproperty("ngModel",e.checked),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function w(e,t){if(1&e&&(o.ɵɵelementStart(0,"table",24),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"tbody"),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,b,10,3,"tr",25),o.ɵɵtext(5,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(6,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(4),o.ɵɵproperty("ngForOf",e.collections)}}const I=function(e){return{loading:e}};class C{constructor(e,t,n,i,o,a){this.cipherService=e,this.platformUtilsService=t,this.i18nService=n,this.collectionService=i,this.organizationService=o,this.logService=a,this.ciphers=[],this.onShared=new r.EventEmitter,this.nonShareableCount=0,this.collections=[],this.organizations=[],this.shareableCiphers=[],this.writeableCollections=[]}ngOnInit(){return i(this,void 0,void 0,(function*(){this.shareableCiphers=this.ciphers.filter((e=>!e.hasOldAttachments&&null==e.organizationId)),this.nonShareableCount=this.ciphers.length-this.shareableCiphers.length;const e=yield this.collectionService.getAllDecrypted();this.writeableCollections=e.filter((e=>!e.readOnly)),this.organizations=yield this.organizationService.getAll(),null==this.organizationId&&this.organizations.length>0&&(this.organizationId=this.organizations[0].id),this.filterCollections()}))}ngOnDestroy(){this.selectAll(!1)}filterCollections(){this.selectAll(!1),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((e=>e.organizationId===this.organizationId))}submit(){var e,t;return i(this,void 0,void 0,(function*(){const n=this.collections.filter((e=>e.checked)).map((e=>e.id));try{this.formPromise=this.cipherService.shareManyWithServer(this.shareableCiphers,this.organizationId,n),yield this.formPromise,this.onShared.emit();const i=null!==(t=null===(e=this.organizations.find((e=>e.id===this.organizationId)))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization");this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemsToOrg",i))}catch(i){this.logService.error(i)}}))}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){(e?this.collections:this.writeableCollections).forEach((t=>this.check(t,e)))}get canSave(){if(null!=this.shareableCiphers&&this.shareableCiphers.length>0&&null!=this.collections)for(let e=0;e<this.collections.length;e++)if(this.collections[e].checked)return!0;return!1}}t.BulkShareComponent=C,C.ɵfac=function(e){return new(e||C)(o.ɵɵdirectiveInject(a.CipherService),o.ɵɵdirectiveInject(s.PlatformUtilsService),o.ɵɵdirectiveInject(l.I18nService),o.ɵɵdirectiveInject(c.CollectionService),o.ɵɵdirectiveInject(d.OrganizationService),o.ɵɵdirectiveInject(p.LogService))},C.ɵcmp=o.ɵɵdefineComponent({type:C,selectors:[["app-vault-bulk-share"]],inputs:{ciphers:"ciphers",organizationId:"organizationId"},outputs:{onShared:"onShared"},decls:77,vars:40,consts:[["role","dialog","aria-modal","true","aria-labelledby","moveSelectedToOrgTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","moveSelectedToOrgTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"form-group"],["for","organization"],["id","organization","name","OrganizationId",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],[4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[3,"ngValue"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"form",2,3),o.ɵɵlistener("ngSubmit",(function(){return t.submit()})),o.ɵɵtext(6,"\n "),o.ɵɵelementStart(7,"div",4),o.ɵɵtext(8,"\n "),o.ɵɵelementStart(9,"h2",5),o.ɵɵtext(10),o.ɵɵpipe(11,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(12,"\n "),o.ɵɵelementStart(13,"button",6),o.ɵɵpipe(14,"i18n"),o.ɵɵtext(15,"\n "),o.ɵɵelementStart(16,"span",7),o.ɵɵtext(17,"×"),o.ɵɵelementEnd(),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"div",8),o.ɵɵtext(22,"\n "),o.ɵɵelementStart(23,"p"),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementStart(27,"p"),o.ɵɵtext(28),o.ɵɵpipe(29,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(30,"\n "),o.ɵɵelementStart(31,"div",9),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"label",10),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"select",11),o.ɵɵlistener("ngModelChange",(function(e){return t.organizationId=e}))("change",(function(){return t.filterCollections()})),o.ɵɵtext(38,"\n "),o.ɵɵtemplate(39,y,2,2,"option",12),o.ɵɵtext(40,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(41,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(42,"\n "),o.ɵɵelementStart(43,"div",13),o.ɵɵtext(44,"\n "),o.ɵɵelementStart(45,"h3"),o.ɵɵtext(46),o.ɵɵpipe(47,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(48,"\n "),o.ɵɵtemplate(49,x,10,6,"div",14),o.ɵɵtext(50,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(51,"\n "),o.ɵɵtemplate(52,S,3,3,"div",15),o.ɵɵtext(53,"\n "),o.ɵɵtemplate(54,w,7,1,"table",16),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"div",17),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"button",18),o.ɵɵtext(60,"\n "),o.ɵɵelement(61,"i",19),o.ɵɵpipe(62,"i18n"),o.ɵɵtext(63,"\n "),o.ɵɵelementStart(64,"span"),o.ɵɵtext(65),o.ɵɵpipe(66,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(67,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(68,"\n "),o.ɵɵelementStart(69,"button",20),o.ɵɵtext(70),o.ɵɵpipe(71,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(72,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(74,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(76,"\n")),2&e){const e=o.ɵɵreference(5);o.ɵɵadvance(4),o.ɵɵproperty("appApiAction",t.formPromise),o.ɵɵadvance(6),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(11,17,"moveSelectedToOrg"),"\n "),o.ɵɵadvance(3),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(14,19,"close")),o.ɵɵadvance(11),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(25,21,"moveManyToOrgDesc")),o.ɵɵadvance(4),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind4(29,23,"moveSelectedItemsCountDesc",t.ciphers.length,t.shareableCiphers.length,t.nonShareableCount),"\n "),o.ɵɵadvance(6),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(35,28,"organization")),o.ɵɵadvance(3),o.ɵɵproperty("ngModel",t.organizationId),o.ɵɵadvance(2),o.ɵɵproperty("ngForOf",t.organizations),o.ɵɵadvance(7),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(47,30,"collections")),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",t.collections&&t.collections.length),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",!t.collections||!t.collections.length),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.collections&&t.collections.length),o.ɵɵadvance(5),o.ɵɵproperty("disabled",e.loading||!t.canSave)("ngClass",o.ɵɵpureFunction1(38,I,e.loading)),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(62,32,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(66,34,"save")),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(71,36,"cancel"),"\n ")}},directives:[u.ɵNgNoValidate,u.NgControlStatusGroup,u.NgForm,m.ApiActionDirective,h.A11yTitleDirective,u.SelectControlValueAccessor,u.NgControlStatus,u.NgModel,v.NgForOf,v.NgIf,v.NgClass,u.NgSelectOption,u.ɵNgSelectMultipleOption,u.CheckboxControlValueAccessor,f.StopPropDirective],pipes:[g.I18nPipe],encapsulation:2})},97618:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.CiphersComponent=void 0;const r=n(32621),o=(n(68062),n(98573),n(40349),n(70143),n(14293),n(99954),n(14170),n(77243),n(63529),n(85654)),a=n(2944),s=n(23635),l=n(12657),c=n(32621),d=n(14170),p=n(40349),u=n(99954),m=n(68062),h=n(98573),v=n(63529),f=n(77243),g=n(14293),y=n(70143),x=n(57490),S=n(37407),b=n(96832),w=n(92521),I=n(52665),C=n(80507),E=n(50553),P=n(72596);function k(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",22),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"shared")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"shared")))}function A(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",25),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"attachmentsNeedFix")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"attachmentsNeedFix")))}function O(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",24),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵtemplate(9,A,9,6,"ng-container",0),c.ɵɵtext(10,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext().$implicit,t=c.ɵɵnextContext(3);c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,3,"attachments")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,5,"attachments")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.showFixOldAttachments(e))}}function T(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).copy(t,t.login.password,"password","Password")})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",26),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"copyPassword"),"\n "))}function M(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).copy(t,t.login.totp,"verificationCodeTotp","TOTP")})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",26),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"copyVerificationCode"),"\n "))}function D(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext(2).$implicit;return c.ɵɵnextContext(3).launch(t.login.launchUri)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",27),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"launch"),"\n "))}function B(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).copy(t,t.login.username,"username","Username")})),c.ɵɵtext(3,"\n "),c.ɵɵelement(4,"i",26),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7,"\n "),c.ɵɵtemplate(8,T,5,3,"a",19),c.ɵɵtext(9,"\n "),c.ɵɵtemplate(10,M,5,3,"a",19),c.ɵɵtext(11,"\n "),c.ɵɵtemplate(12,D,5,3,"a",19),c.ɵɵtext(13,"\n "),c.ɵɵelementContainerEnd()}if(2&e){const e=c.ɵɵnextContext().$implicit,t=c.ɵɵnextContext(3);c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(6,4,"copyUsername"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.viewPassword),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.displayTotpCopyButton(e)),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.login.canLaunch)}}function R(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).clone(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",28),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"clone"),"\n "))}function U(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).share(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",29),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"moveToOrganization"),"\n "))}function V(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).collections(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",30),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"collections"),"\n "))}function F(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).events(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",31),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"eventLogs"),"\n "))}function N(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"a",17),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);const t=c.ɵɵnextContext().$implicit;return c.ɵɵnextContext(3).restore(t)})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",32),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(4,1,"restore"),"\n "))}function _(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"tr"),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"td",5),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).checkCipher(t)})),c.ɵɵtext(3,"\n "),c.ɵɵelementStart(4,"input",6),c.ɵɵlistener("ngModelChange",(function(t){return c.ɵɵrestoreView(e).$implicit.checked=t})),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementStart(7,"td",7),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).checkCipher(t)})),c.ɵɵtext(8,"\n "),c.ɵɵelement(9,"app-vault-icon",8),c.ɵɵtext(10,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(11,"\n "),c.ɵɵelementStart(12,"td",9),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).checkCipher(t)})),c.ɵɵtext(13,"\n "),c.ɵɵelementStart(14,"a",10),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).selectCipher(t)})),c.ɵɵpipe(15,"i18n"),c.ɵɵtext(16),c.ɵɵelementEnd(),c.ɵɵtext(17,"\n "),c.ɵɵtemplate(18,k,9,6,"ng-container",0),c.ɵɵtext(19,"\n "),c.ɵɵtemplate(20,O,11,7,"ng-container",0),c.ɵɵtext(21,"\n "),c.ɵɵelement(22,"br"),c.ɵɵtext(23,"\n "),c.ɵɵelementStart(24,"small",11),c.ɵɵtext(25),c.ɵɵelementEnd(),c.ɵɵtext(26,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(27,"\n "),c.ɵɵelementStart(28,"td",12),c.ɵɵtext(29,"\n "),c.ɵɵelementStart(30,"div",13),c.ɵɵtext(31,"\n "),c.ɵɵelementStart(32,"button",14),c.ɵɵpipe(33,"i18n"),c.ɵɵtext(34,"\n "),c.ɵɵelement(35,"i",15),c.ɵɵtext(36,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(37,"\n "),c.ɵɵelementStart(38,"div",16),c.ɵɵtext(39,"\n "),c.ɵɵtemplate(40,B,14,6,"ng-container",0),c.ɵɵtext(41,"\n "),c.ɵɵelementStart(42,"a",17),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).attachments(t)})),c.ɵɵtext(43,"\n "),c.ɵɵelement(44,"i",18),c.ɵɵtext(45),c.ɵɵpipe(46,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(47,"\n "),c.ɵɵtemplate(48,R,5,3,"a",19),c.ɵɵtext(49,"\n "),c.ɵɵtemplate(50,U,5,3,"a",19),c.ɵɵtext(51,"\n "),c.ɵɵtemplate(52,V,5,3,"a",19),c.ɵɵtext(53,"\n "),c.ɵɵtemplate(54,F,5,3,"a",19),c.ɵɵtext(55,"\n "),c.ɵɵtemplate(56,N,5,3,"a",19),c.ɵɵtext(57,"\n "),c.ɵɵelementStart(58,"a",20),c.ɵɵlistener("click",(function(){const t=c.ɵɵrestoreView(e).$implicit;return c.ɵɵnextContext(3).delete(t)})),c.ɵɵtext(59,"\n "),c.ɵɵelement(60,"i",21),c.ɵɵtext(61),c.ɵɵpipe(62,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(63,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(64,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(65,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(66,"\n "),c.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=c.ɵɵnextContext(3);c.ɵɵadvance(4),c.ɵɵproperty("ngModel",e.checked),c.ɵɵadvance(5),c.ɵɵproperty("cipher",e),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(15,16,"editItem")),c.ɵɵadvance(2),c.ɵɵtextInterpolate(e.name),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.organization&&e.organizationId),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.hasAttachments),c.ɵɵadvance(5),c.ɵɵtextInterpolate(e.subTitle),c.ɵɵadvance(7),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(33,18,"options")),c.ɵɵadvance(8),c.ɵɵproperty("ngIf",e.type===n.cipherType.Login&&!e.isDeleted),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(46,20,"attachments"),"\n "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",(!n.organization&&!e.organizationId||n.organization)&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!n.organization&&!e.organizationId&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organizationId&&!e.isDeleted),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.organizationId&&n.accessEvents),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.isDeleted),c.ɵɵadvance(5),c.ɵɵtextInterpolate1("\n ",c.ɵɵpipeBind1(62,22,e.isDeleted?"permanentlyDelete":"delete"),"\n ")}}function j(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"table",3),c.ɵɵlistener("scrolled",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(2).loadMore()})),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"tbody"),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,_,67,24,"tr",4),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd(),c.ɵɵtext(6,"\n "),c.ɵɵelementEnd()}if(2&e){const e=c.ɵɵnextContext().ngIf,t=c.ɵɵnextContext();c.ɵɵproperty("infiniteScrollDistance",1)("infiniteScrollDisabled",!t.isPaging()),c.ɵɵadvance(4),c.ɵɵproperty("ngForOf",e)}}function z(e,t){1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",34),c.ɵɵpipe(3,"i18n"),c.ɵɵtext(4,"\n "),c.ɵɵelementStart(5,"span",23),c.ɵɵtext(6),c.ɵɵpipe(7,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(8,"\n "),c.ɵɵelementContainerEnd()),2&e&&(c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(3,2,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(7,4,"loading")))}function L(e,t){if(1&e){const e=c.ɵɵgetCurrentView();c.ɵɵelementStart(0,"button",36),c.ɵɵlistener("click",(function(){c.ɵɵrestoreView(e);return c.ɵɵnextContext(4).addCipher()})),c.ɵɵtext(1,"\n "),c.ɵɵelement(2,"i",37),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd()}2&e&&(c.ɵɵadvance(3),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function K(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵelementStart(2,"p"),c.ɵɵtext(3),c.ɵɵpipe(4,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(5,"\n "),c.ɵɵtemplate(6,L,5,3,"button",35),c.ɵɵtext(7,"\n "),c.ɵɵelementContainerEnd()),2&e){const e=c.ɵɵnextContext(3);c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(4,2,"noItemsInList")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",e.showAddNew)}}function q(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",33),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,z,9,6,"ng-container",0),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,K,8,4,"ng-container",0),c.ɵɵtext(5,"\n "),c.ɵɵelementEnd()),2&e){const e=c.ɵɵnextContext(2);c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.loaded),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.loaded)}}function G(e,t){if(1&e&&(c.ɵɵelementContainerStart(0),c.ɵɵtext(1,"\n "),c.ɵɵtemplate(2,j,7,3,"table",1),c.ɵɵtext(3,"\n "),c.ɵɵtemplate(4,q,6,2,"div",2),c.ɵɵtext(5,"\n"),c.ɵɵelementContainerEnd()),2&e){const e=t.ngIf;c.ɵɵadvance(2),c.ɵɵproperty("ngIf",e.length),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!e.length)}}class W extends o.CiphersComponent{constructor(e,t,n,i,o,a,l,c,d){super(e),this.i18nService=t,this.platformUtilsService=n,this.cipherService=i,this.eventService=o,this.totpService=a,this.stateService=l,this.passwordRepromptService=c,this.logService=d,this.showAddNew=!0,this.onAttachmentsClicked=new r.EventEmitter,this.onShareClicked=new r.EventEmitter,this.onCollectionsClicked=new r.EventEmitter,this.onCloneClicked=new r.EventEmitter,this.pagedCiphers=[],this.pageSize=200,this.cipherType=s.CipherType,this.userHasPremiumAccess=!1,this.didScroll=!1,this.pagedCiphersCount=0,this.refreshing=!1}ngOnInit(){return i(this,void 0,void 0,(function*(){this.userHasPremiumAccess=yield this.stateService.getCanAccessPremium()}))}ngOnDestroy(){this.selectAll(!1)}loadMore(){if(this.ciphers.length<=this.pageSize)return;const e=this.pagedCiphers.length;let t=this.pageSize;this.refreshing&&0===e&&this.pagedCiphersCount>this.pageSize&&(t=this.pagedCiphersCount),this.ciphers.length>e&&(this.pagedCiphers=this.pagedCiphers.concat(this.ciphers.slice(e,e+t))),this.pagedCiphersCount=this.pagedCiphers.length,this.didScroll=this.pagedCiphers.length>this.pageSize}refresh(){return i(this,void 0,void 0,(function*(){try{this.refreshing=!0,yield this.reload(this.filter,this.deleted)}finally{this.refreshing=!1}}))}isPaging(){const e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.ciphers.length>this.pageSize}resetPaging(){return i(this,void 0,void 0,(function*(){this.pagedCiphers=[],this.loadMore()}))}doSearch(e){return i(this,void 0,void 0,(function*(){this.ciphers=yield this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e),this.resetPaging()}))}launch(e){this.platformUtilsService.launchUri(e)}attachments(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onAttachmentsClicked.emit(e)}))}share(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onShareClicked.emit(e)}))}collections(e){this.onCollectionsClicked.emit(e)}clone(e){return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&this.onCloneClicked.emit(e)}))}delete(e){return i(this,void 0,void 0,(function*(){if(!(yield this.repromptCipher(e)))return;if(null!=this.actionPromise)return;const t=e.isDeleted;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t(t?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t(t?"permanentlyDeleteItem":"deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.deleteCipher(e.id,t),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t(t?"permanentlyDeletedItem":"deletedItem")),this.refresh()}catch(n){this.logService.error(n)}this.actionPromise=null}))}restore(e){return i(this,void 0,void 0,(function*(){if(null!=this.actionPromise||!e.isDeleted)return;if(!(yield this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")))return!1;try{this.actionPromise=this.cipherService.restoreWithServer(e.id),yield this.actionPromise,this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.refresh()}catch(t){this.logService.error(t)}this.actionPromise=null}))}copy(e,t,n,r){return i(this,void 0,void 0,(function*(){this.passwordRepromptService.protectedFields().includes(r)&&!(yield this.repromptCipher(e))||null==t||"TOTP"===r&&!this.displayTotpCopyButton(e)||(t===e.login.totp&&(t=yield this.totpService.getCode(t)),e.viewPassword&&(this.platformUtilsService.copyToClipboard(t,{window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t(n))),"password"===n||"verificationCodeTotp"===n?this.eventService.collect(l.EventType.Cipher_ClientToggledHiddenFieldVisible,e.id):"securityCode"===n&&this.eventService.collect(l.EventType.Cipher_ClientCopiedCardCode,e.id)))}))}selectAll(e){e&&this.selectAll(!1);const t=e&&this.ciphers.length>500?500:this.ciphers.length;for(let n=0;n<t;n++)this.checkCipher(this.ciphers[n],e)}checkCipher(e,t){e.checked=null==t?!e.checked:t}getSelected(){return null==this.ciphers?[]:this.ciphers.filter((e=>!!e.checked))}getSelectedIds(){return this.getSelected().map((e=>e.id))}displayTotpCopyButton(e){var t,n;return null!==(n=null===(t=null==e?void 0:e.login)||void 0===t?void 0:t.hasTotp)&&void 0!==n&&n&&(e.organizationUseTotp||this.userHasPremiumAccess)}selectCipher(e){const t=Object.create(null,{selectCipher:{get:()=>super.selectCipher}});return i(this,void 0,void 0,(function*(){(yield this.repromptCipher(e))&&t.selectCipher.call(this,e)}))}deleteCipher(e,t){return t?this.cipherService.deleteWithServer(e):this.cipherService.softDeleteWithServer(e)}showFixOldAttachments(e){return e.hasOldAttachments&&null==e.organizationId}repromptCipher(e){return i(this,void 0,void 0,(function*(){return e.reprompt===a.CipherRepromptType.None||(yield this.passwordRepromptService.showPasswordPrompt())}))}}t.CiphersComponent=W,W.ɵfac=function(e){return new(e||W)(c.ɵɵdirectiveInject(d.SearchService),c.ɵɵdirectiveInject(p.I18nService),c.ɵɵdirectiveInject(u.PlatformUtilsService),c.ɵɵdirectiveInject(m.CipherService),c.ɵɵdirectiveInject(h.EventService),c.ɵɵdirectiveInject(v.TotpService),c.ɵɵdirectiveInject(f.StateService),c.ɵɵdirectiveInject(g.PasswordRepromptService),c.ɵɵdirectiveInject(y.LogService))},W.ɵcmp=c.ɵɵdefineComponent({type:W,selectors:[["app-vault-ciphers"]],inputs:{showAddNew:"showAddNew"},outputs:{onAttachmentsClicked:"onAttachmentsClicked",onShareClicked:"onShareClicked",onCollectionsClicked:"onCollectionsClicked",onCloneClicked:"onCloneClicked"},features:[c.ɵɵInheritDefinitionFeature],decls:2,vars:1,consts:[[4,"ngIf"],["class","table table-hover table-list table-ciphers","infiniteScroll","",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled",4,"ngIf"],["class","no-items",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list","table-ciphers",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],[1,"table-list-checkbox",3,"click"],["type","checkbox","appStopProp","",3,"ngModel","ngModelChange"],[1,"table-list-icon",3,"click"],[3,"cipher"],[1,"reduced-lh","wrap",3,"click"],["href","#","appStopClick","","appStopProp","",3,"title","click"],["appStopProp",""],[1,"table-list-options"],["appListDropdown","",1,"dropdown"],["type","button","id","dropdownMenuButton","data-toggle","dropdown","aria-haspopup","true","aria-expanded","false",1,"btn","btn-outline-secondary","dropdown-toggle",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-cog","bwi-lg"],["aria-labelledby","dropdownMenuButton",1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-paperclip"],["class","dropdown-item","href","#","appStopClick","",3,"click",4,"ngIf"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-trash"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-collection",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-paperclip",3,"title"],["appStopProp","","aria-hidden","true",1,"bwi","bwi-exclamation-triangle","text-warning",3,"title"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-clone"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-share-square"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-files"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-arrow-circle-right"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-collection"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-file-text"],["aria-hidden","true",1,"bwi","bwi-fw","bwi-undo"],[1,"no-items"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],["class","btn btn-outline-primary",3,"click",4,"ngIf"],[1,"btn","btn-outline-primary",3,"click"],[1,"bwi","bwi-plus","bwi-fw"]],template:function(e,t){1&e&&(c.ɵɵtemplate(0,G,6,2,"ng-container",0),c.ɵɵtext(1,"\n")),2&e&&c.ɵɵproperty("ngIf",t.isPaging()?t.pagedCiphers:t.ciphers)},directives:[x.NgIf,S.InfiniteScrollDirective,x.NgForOf,b.CheckboxControlValueAccessor,w.StopPropDirective,b.NgControlStatus,b.NgModel,I.IconComponent,C.StopClickDirective,E.A11yTitleDirective],pipes:[P.I18nPipe],encapsulation:2})},7702:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionsComponent=void 0;n(68062),n(69050),n(40349),n(70143),n(99954);const i=n(20492),r=n(32621),o=n(69050),a=n(99954),s=n(40349),l=n(68062),c=n(70143),d=n(96832),p=n(637),u=n(57490),m=n(50553),h=n(92521),v=n(72596);function f(e,t){if(1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.cipher.name)}}function g(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",17),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().selectAll(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().selectAll(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"selectAll"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function y(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function x(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"tr",21),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(2).check(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td",22),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"input",23),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.checked=t})),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"td"),r.ɵɵtext(8),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;r.ɵɵadvance(4),r.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),r.ɵɵproperty("ngModel",e.checked),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",19),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"tbody"),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,x,10,3,"tr",20),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.collections)}}class b extends i.CollectionsComponent{constructor(e,t,n,i,r){super(e,t,n,i,r)}ngOnDestroy(){this.selectAll(!1)}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){this.collections.forEach((t=>this.check(t,e)))}}t.CollectionsComponent=b,b.ɵfac=function(e){return new(e||b)(r.ɵɵdirectiveInject(o.CollectionService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.CipherService),r.ɵɵdirectiveInject(c.LogService))},b.ɵcmp=r.ɵɵdefineComponent({type:b,selectors:[["app-vault-collections"]],features:[r.ɵɵInheritDefinitionFeature],decls:63,vars:27,consts:[["role","dialog","aria-modal","true","aria-labelledby","collectionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","collectionsTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵtemplate(12,f,2,1,"small",6),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"button",7),r.ɵɵpipe(16,"i18n"),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"span",8),r.ɵɵtext(19,"×"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵelementStart(23,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵelementStart(25,"p"),r.ɵɵtext(26),r.ɵɵpipe(27,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",10),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"h3"),r.ɵɵtext(32),r.ɵɵpipe(33,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(34,"\n "),r.ɵɵtemplate(35,g,10,6,"div",11),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵtemplate(38,y,3,3,"div",6),r.ɵɵtext(39,"\n "),r.ɵɵtemplate(40,S,7,1,"table",12),r.ɵɵtext(41,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(42,"\n "),r.ɵɵelementStart(43,"div",13),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"button",14),r.ɵɵtext(46,"\n "),r.ɵɵelement(47,"i",15),r.ɵɵpipe(48,"i18n"),r.ɵɵtext(49,"\n "),r.ɵɵelementStart(50,"span"),r.ɵɵtext(51),r.ɵɵpipe(52,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(54,"\n "),r.ɵɵelementStart(55,"button",16),r.ɵɵtext(56),r.ɵɵpipe(57,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(58,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(59,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(60,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(61,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(62,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,13,"collections"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.cipher),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(16,15,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(27,17,"collectionsDesc")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(33,19,"collections")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",t.collections&&t.collections.length),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!t.collections||!t.collections.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.collections&&t.collections.length),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(48,21,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(52,23,"save")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(57,25,"cancel"),"\n ")}},directives:[d.ɵNgNoValidate,d.NgControlStatusGroup,d.NgForm,p.ApiActionDirective,u.NgIf,m.A11yTitleDirective,u.NgForOf,d.CheckboxControlValueAccessor,h.StopPropDirective,d.NgControlStatus,d.NgModel],pipes:[v.I18nPipe],encapsulation:2})},38978:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderAddEditComponent=void 0;n(4349),n(40349),n(70143),n(99954);const i=n(64970),r=n(32621),o=n(4349),a=n(40349),s=n(99954),l=n(70143),c=n(96832),d=n(637),p=n(50553),u=n(17302),m=n(57490),h=n(72596);function v(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"button",17,18),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().delete()})),r.ɵɵpipe(2,"i18n"),r.ɵɵtext(3,"\n "),r.ɵɵelement(4,"i",19),r.ɵɵtext(5,"\n "),r.ɵɵelement(6,"i",20),r.ɵɵpipe(7,"i18n"),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵreference(1),t=r.ɵɵnextContext();r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(2,6,"delete")),r.ɵɵproperty("disabled",e.loading)("appApiAction",t.deletePromise),r.ɵɵadvance(4),r.ɵɵproperty("hidden",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(7,8,"loading")),r.ɵɵproperty("hidden",!e.loading)}}class f extends i.FolderAddEditComponent{constructor(e,t,n,i){super(e,t,n,i)}}t.FolderAddEditComponent=f,f.ɵfac=function(e){return new(e||f)(r.ɵɵdirectiveInject(o.FolderService),r.ɵɵdirectiveInject(a.I18nService),r.ɵɵdirectiveInject(s.PlatformUtilsService),r.ɵɵdirectiveInject(l.LogService))},f.ɵcmp=r.ɵɵdefineComponent({type:f,selectors:[["app-folder-add-edit"]],features:[r.ɵɵInheritDefinitionFeature],decls:54,vars:20,consts:[["role","dialog","aria-modal","true","aria-labelledby","folderAddEditTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable","modal-sm"],["ngNativeValidate","",1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","folderAddEditTitle",1,"modal-title"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],[1,"modal-body"],["for","name"],["id","name","type","text","name","Name","required","","appAutofocus","",1,"form-control",3,"ngModel","ngModelChange"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"ml-auto"],["type","button","class","btn btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click",4,"ngIf"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"bwi","bwi-trash","bwi-lg","bwi-fw",3,"hidden"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","bwi-lg","bwi-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"button",6),r.ɵɵpipe(13,"i18n"),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"span",7),r.ɵɵtext(16,"×"),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(18,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"div",8),r.ɵɵtext(21,"\n "),r.ɵɵelementStart(22,"label",9),r.ɵɵtext(23),r.ɵɵpipe(24,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(25,"\n "),r.ɵɵelementStart(26,"input",10),r.ɵɵlistener("ngModelChange",(function(e){return t.folder.name=e})),r.ɵɵelementEnd(),r.ɵɵtext(27,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(28,"\n "),r.ɵɵelementStart(29,"div",11),r.ɵɵtext(30,"\n "),r.ɵɵelementStart(31,"button",12),r.ɵɵtext(32,"\n "),r.ɵɵelement(33,"i",13),r.ɵɵpipe(34,"i18n"),r.ɵɵtext(35,"\n "),r.ɵɵelementStart(36,"span"),r.ɵɵtext(37),r.ɵɵpipe(38,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n "),r.ɵɵelementStart(41,"button",14),r.ɵɵtext(42),r.ɵɵpipe(43,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(44,"\n "),r.ɵɵelementStart(45,"div",15),r.ɵɵtext(46,"\n "),r.ɵɵtemplate(47,v,9,10,"button",16),r.ɵɵtext(48,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(49,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(50,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(51,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(52,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(53,"\n")),2&e){const e=r.ɵɵreference(5);r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate(t.title),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(13,10,"close")),r.ɵɵadvance(11),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(24,12,"name")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",t.folder.name),r.ɵɵadvance(5),r.ɵɵproperty("disabled",e.loading),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(34,14,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(38,16,"save")),r.ɵɵadvance(5),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(43,18,"cancel"),"\n "),r.ɵɵadvance(5),r.ɵɵproperty("ngIf",t.editMode)}},directives:[c.NgControlStatusGroup,c.NgForm,d.ApiActionDirective,p.A11yTitleDirective,c.DefaultValueAccessor,c.RequiredValidator,u.AutofocusDirective,c.NgControlStatus,c.NgModel,m.NgIf],pipes:[h.I18nPipe],encapsulation:2})},41412:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingsComponent=void 0;const i=n(32621),r=(n(69050),n(4349),n(77243),n(43556)),o=n(32621),a=n(69050),s=n(4349),l=n(77243),c=n(50553),d=n(96832),p=n(17302),u=n(57490),m=n(80507),h=n(72596),v=function(e){return{active:e}};function f(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"li",7),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",8),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectFavorites()})),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",17),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(4,v,e.selectedFavorites)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(6,2,"favorites"),"\n ")}}function g(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"li",7),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"a",8),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext().selectTrash()})),o.ɵɵtext(3,"\n "),o.ɵɵelement(4,"i",18),o.ɵɵtext(5),o.ɵɵpipe(6,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(7,"\n "),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext();o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(4,v,e.selectedTrash)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(6,2,"trash"),"\n ")}}function y(e,t){1&e&&(o.ɵɵelementStart(0,"p",19),o.ɵɵtext(1,"\n "),o.ɵɵelement(2,"i",20),o.ɵɵpipe(3,"i18n"),o.ɵɵtext(4,"\n "),o.ɵɵelementStart(5,"span",21),o.ɵɵtext(6),o.ɵɵpipe(7,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵelementEnd()),2&e&&(o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(3,2,"loading")),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(7,4,"loading")))}const x=function(e,t){return{"bwi-angle-right":e,"bwi-angle-down":t}};function S(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"i",33),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(4).collapse(t.node)})),o.ɵɵpipe(1,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(4);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"toggleCollapse")),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(4,x,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function b(e,t){1&e&&o.ɵɵelement(0,"i",34)}function w(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"a",35),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(4).editFolder(t.node)})),o.ɵɵpipe(1,"i18n"),o.ɵɵtext(2,"\n "),o.ɵɵelement(3,"i",36),o.ɵɵtext(4,"\n "),o.ɵɵelementEnd()}2&e&&o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(1,1,"editFolder"))}function I(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementContainerEnd())}const C=function(e){return{$implicit:e}};function E(e,t){if(1&e&&(o.ɵɵelementStart(0,"ul",37),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,I,2,0,"ng-container",26),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵnextContext(2);const t=o.ɵɵreference(15);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",o.ɵɵpureFunction1(2,C,e.children))}}function P(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"li",7),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",22),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,S,2,7,"i",28),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"a",29),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).selectFolder(t.node)})),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,b,1,0,"i",30),o.ɵɵtext(9),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,w,5,3,"a",31),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,E,4,4,"ul",32),o.ɵɵtext(15,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(4);o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(6,v,n.selectedFolder&&e.node.id===n.selectedFolderId)),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",e.children.length),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",0===e.children.length),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("",e.node.name,"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.node.id),o.ɵɵadvance(3),o.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function k(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵtemplate(1,P,16,8,"li",27),o.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;o.ɵɵadvance(1),o.ɵɵproperty("ngForOf",e)}}function A(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementContainerEnd())}function O(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3",22),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementStart(5,"a",23),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);return o.ɵɵnextContext(2).addFolder()})),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",24),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"ul",6),o.ɵɵtext(13,"\n "),o.ɵɵtemplate(14,k,3,1,"ng-template",null,25,o.ɵɵtemplateRefExtractor),o.ɵɵtext(16,"\n "),o.ɵɵtemplate(17,A,2,0,"ng-container",26),o.ɵɵtext(18,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(19,"\n "),o.ɵɵelementContainerEnd()}if(2&e){const e=o.ɵɵreference(15),t=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,4,"folders"),"\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,6,"addFolder")),o.ɵɵadvance(12),o.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",o.ɵɵpureFunction1(8,C,t.nestedFolders))}}function T(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"i",33),o.ɵɵlistener("click",(function(){o.ɵɵrestoreView(e);const t=o.ɵɵnextContext().$implicit;return o.ɵɵnextContext(4).collapse(t.node)})),o.ɵɵpipe(1,"i18n"),o.ɵɵelementEnd()}if(2&e){const e=o.ɵɵnextContext().$implicit,t=o.ɵɵnextContext(4);o.ɵɵpropertyInterpolate("title",o.ɵɵpipeBind1(1,2,"toggleCollapse")),o.ɵɵproperty("ngClass",o.ɵɵpureFunction2(4,x,t.isCollapsed(e.node),!t.isCollapsed(e.node)))}}function M(e,t){1&e&&o.ɵɵelement(0,"i",40)}function D(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementContainerEnd())}function B(e,t){if(1&e&&(o.ɵɵelementStart(0,"ul",37),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,D,2,0,"ng-container",26),o.ɵɵtext(3,"\n "),o.ɵɵelementEnd()),2&e){const e=o.ɵɵnextContext().$implicit;o.ɵɵnextContext(2);const t=o.ɵɵreference(9);o.ɵɵadvance(2),o.ɵɵproperty("ngTemplateOutlet",t)("ngTemplateOutletContext",o.ɵɵpureFunction1(2,C,e.children))}}function R(e,t){if(1&e){const e=o.ɵɵgetCurrentView();o.ɵɵelementStart(0,"li",7),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,T,2,7,"i",28),o.ɵɵtext(3,"\n "),o.ɵɵelementStart(4,"a",29),o.ɵɵlistener("click",(function(){const t=o.ɵɵrestoreView(e).$implicit;return o.ɵɵnextContext(4).selectCollection(t.node)})),o.ɵɵtext(5,"\n "),o.ɵɵtemplate(6,M,1,0,"i",39),o.ɵɵtext(7),o.ɵɵelementEnd(),o.ɵɵtext(8,"\n "),o.ɵɵtemplate(9,B,4,4,"ul",32),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=o.ɵɵnextContext(4);o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(5,v,e.node.id===n.selectedCollectionId)),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.children.length),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",0===e.children.length),o.ɵɵadvance(1),o.ɵɵtextInterpolate1("",e.node.name,"\n "),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.children.length&&!n.isCollapsed(e.node))}}function U(e,t){if(1&e&&(o.ɵɵtext(0,"\n "),o.ɵɵtemplate(1,R,11,7,"li",27),o.ɵɵtext(2,"\n ")),2&e){const e=t.$implicit;o.ɵɵadvance(1),o.ɵɵproperty("ngForOf",e)}}function V(e,t){1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementContainerEnd())}function F(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"h3"),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(5,"\n "),o.ɵɵelementStart(6,"ul",6),o.ɵɵtext(7,"\n "),o.ɵɵtemplate(8,U,3,1,"ng-template",null,38,o.ɵɵtemplateRefExtractor),o.ɵɵtext(10,"\n "),o.ɵɵtemplate(11,V,2,0,"ng-container",26),o.ɵɵtext(12,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(13,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵreference(9),t=o.ɵɵnextContext(2);o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(4,3,"collections")),o.ɵɵadvance(8),o.ɵɵproperty("ngTemplateOutlet",e)("ngTemplateOutletContext",o.ɵɵpureFunction1(5,C,t.nestedCollections))}}function N(e,t){if(1&e&&(o.ɵɵelementContainerStart(0),o.ɵɵtext(1,"\n "),o.ɵɵtemplate(2,O,20,10,"ng-container",16),o.ɵɵtext(3,"\n "),o.ɵɵtemplate(4,F,14,7,"ng-container",16),o.ɵɵtext(5,"\n "),o.ɵɵelementContainerEnd()),2&e){const e=o.ɵɵnextContext();o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showFolders),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",e.showCollections&&e.collections&&e.collections.length)}}class _ extends r.GroupingsComponent{constructor(e,t,n){super(e,t,n),this.onSearchTextChanged=new i.EventEmitter,this.searchText="",this.searchPlaceholder=null}searchTextChanged(){this.onSearchTextChanged.emit(this.searchText)}}t.GroupingsComponent=_,_.ɵfac=function(e){return new(e||_)(o.ɵɵdirectiveInject(a.CollectionService),o.ɵɵdirectiveInject(s.FolderService),o.ɵɵdirectiveInject(l.StateService))},_.ɵcmp=o.ɵɵdefineComponent({type:_,selectors:[["app-vault-groupings"]],outputs:{onSearchTextChanged:"onSearchTextChanged"},features:[o.ɵɵInheritDefinitionFeature],decls:82,vars:47,consts:[[1,"card","vault-filters"],[1,"card-header","d-flex"],["href","https://bitwarden.com/help/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"bwi-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"bwi","bwi-li","bwi-fw","bwi-filter"],[3,"ngClass",4,"ngIf"],[1,"bwi","bwi-li","bwi-fw","bwi-globe"],[1,"bwi","bwi-li","bwi-fw","bwi-credit-card"],[1,"bwi","bwi-li","bwi-fw","bwi-id-card"],[1,"bwi","bwi-li","bwi-fw","bwi-sticky-note"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"bwi","bwi-li","bwi-fw","bwi-star"],[1,"bwi","bwi-li","bwi-fw","bwi-trash"],[1,"text-muted"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],[1,"sr-only"],[1,"d-flex"],["href","#","appStopClick","",1,"text-muted","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngFor","ngForOf"],["class","bwi-li bwi",3,"title","ngClass","click",4,"ngIf"],["href","#","appStopClick","",1,"text-break",3,"click"],["class","bwi bwi-li bwi-folder","aria-hidden","true",4,"ngIf"],["href","#","class","text-muted ml-auto show-active","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["class","bwi-ul card-ul carets",4,"ngIf"],[1,"bwi-li","bwi",3,"title","ngClass","click"],["aria-hidden","true",1,"bwi","bwi-li","bwi-folder"],["href","#","appStopClick","",1,"text-muted","ml-auto","show-active",3,"appA11yTitle","click"],["aria-hidden","true",1,"bwi","bwi-pencil","bwi-fw"],[1,"bwi-ul","card-ul","carets"],["recursiveCollections",""],["class","bwi bwi-li bwi-collection","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"bwi","bwi-li","bwi-collection"]],template:function(e,t){1&e&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1,"\n "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3),o.ɵɵpipe(4,"i18n"),o.ɵɵelementStart(5,"a",2),o.ɵɵpipe(6,"i18n"),o.ɵɵtext(7,"\n "),o.ɵɵelement(8,"i",3),o.ɵɵtext(9,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(10,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(11,"\n "),o.ɵɵelementStart(12,"div",4),o.ɵɵtext(13,"\n "),o.ɵɵelementStart(14,"input",5),o.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),o.ɵɵpipe(15,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(16,"\n "),o.ɵɵelementStart(17,"ul",6),o.ɵɵtext(18,"\n "),o.ɵɵelementStart(19,"li",7),o.ɵɵtext(20,"\n "),o.ɵɵelementStart(21,"a",8),o.ɵɵlistener("click",(function(){return t.selectAll()})),o.ɵɵtext(22,"\n "),o.ɵɵelement(23,"i",9),o.ɵɵtext(24),o.ɵɵpipe(25,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(26,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(27,"\n "),o.ɵɵtemplate(28,f,8,6,"li",10),o.ɵɵtext(29,"\n "),o.ɵɵtemplate(30,g,8,6,"li",10),o.ɵɵtext(31,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(32,"\n "),o.ɵɵelementStart(33,"h3"),o.ɵɵtext(34),o.ɵɵpipe(35,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(36,"\n "),o.ɵɵelementStart(37,"ul",6),o.ɵɵtext(38,"\n "),o.ɵɵelementStart(39,"li",7),o.ɵɵtext(40,"\n "),o.ɵɵelementStart(41,"a",8),o.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Login)})),o.ɵɵtext(42,"\n "),o.ɵɵelement(43,"i",11),o.ɵɵtext(44),o.ɵɵpipe(45,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(46,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(47,"\n "),o.ɵɵelementStart(48,"li",7),o.ɵɵtext(49,"\n "),o.ɵɵelementStart(50,"a",8),o.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Card)})),o.ɵɵtext(51,"\n "),o.ɵɵelement(52,"i",12),o.ɵɵtext(53),o.ɵɵpipe(54,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(55,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(56,"\n "),o.ɵɵelementStart(57,"li",7),o.ɵɵtext(58,"\n "),o.ɵɵelementStart(59,"a",8),o.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Identity)})),o.ɵɵtext(60,"\n "),o.ɵɵelement(61,"i",13),o.ɵɵtext(62),o.ɵɵpipe(63,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(64,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(65,"\n "),o.ɵɵelementStart(66,"li",7),o.ɵɵtext(67,"\n "),o.ɵɵelementStart(68,"a",8),o.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.SecureNote)})),o.ɵɵtext(69,"\n "),o.ɵɵelement(70,"i",14),o.ɵɵtext(71),o.ɵɵpipe(72,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(73,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(74,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(75,"\n "),o.ɵɵtemplate(76,y,9,6,"p",15),o.ɵɵtext(77,"\n "),o.ɵɵtemplate(78,N,6,2,"ng-container",16),o.ɵɵtext(79,"\n "),o.ɵɵelementEnd(),o.ɵɵtext(80,"\n"),o.ɵɵelementEnd(),o.ɵɵtext(81,"\n")),2&e&&(o.ɵɵadvance(3),o.ɵɵtextInterpolate1("\n ",o.ɵɵpipeBind1(4,19,"filters"),"\n "),o.ɵɵadvance(2),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(6,21,"learnMore")),o.ɵɵadvance(9),o.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||o.ɵɵpipeBind1(15,23,"searchVault")),o.ɵɵproperty("ngModel",t.searchText),o.ɵɵadvance(5),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(37,v,t.selectedAll)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(25,25,"allItems"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngIf",t.showFavorites),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.showTrash),o.ɵɵadvance(4),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(35,27,"types")),o.ɵɵadvance(5),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(39,v,t.selectedType===t.cipherType.Login)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(45,29,"typeLogin"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(41,v,t.selectedType===t.cipherType.Card)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(54,31,"typeCard"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(43,v,t.selectedType===t.cipherType.Identity)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(63,33,"typeIdentity"),"\n "),o.ɵɵadvance(4),o.ɵɵproperty("ngClass",o.ɵɵpureFunction1(45,v,t.selectedType===t.cipherType.SecureNote)),o.ɵɵadvance(5),o.ɵɵtextInterpolate1("",o.ɵɵpipeBind1(72,35,"typeSecureNote"),"\n "),o.ɵɵadvance(5),o.ɵɵproperty("ngIf",!t.loaded),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.loaded))},directives:[c.A11yTitleDirective,d.DefaultValueAccessor,p.AutofocusDirective,d.NgControlStatus,d.NgModel,u.NgClass,m.StopClickDirective,u.NgIf,u.NgTemplateOutlet,u.NgForOf],pipes:[h.I18nPipe],encapsulation:2})},66500:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShareComponent=void 0;n(68062),n(69050),n(40349),n(94308),n(99954);const i=n(39155),r=(n(70143),n(32621)),o=n(69050),a=n(99954),s=n(40349),l=n(68062),c=n(94308),d=n(70143),p=n(96832),u=n(637),m=n(57490),h=n(50553),v=n(92521),f=n(68012),g=n(72596);function y(e,t){if(1&e&&(r.ɵɵelementStart(0,"small"),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.cipher.name)}}function x(e,t){1&e&&(r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noOrganizationsList"),"\n "))}function S(e,t){if(1&e&&(r.ɵɵelementStart(0,"option",22),r.ɵɵtext(1),r.ɵɵelementEnd()),2&e){const e=t.$implicit;r.ɵɵproperty("ngValue",e.id),r.ɵɵadvance(1),r.ɵɵtextInterpolate(e.name)}}function b(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",23),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"button",24),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).selectAll(!0)})),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"button",24),r.ɵɵlistener("click",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext(2).selectAll(!1)})),r.ɵɵtext(7),r.ɵɵpipe(8,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}2&e&&(r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(4,2,"selectAll"),"\n "),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(8,4,"unselectAll"),"\n "))}function w(e,t){1&e&&(r.ɵɵelementStart(0,"div"),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"noCollectionsInList"),"\n "))}function I(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"tr",27),r.ɵɵlistener("click",(function(){const t=r.ɵɵrestoreView(e).$implicit;return r.ɵɵnextContext(3).check(t)})),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"td",28),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"input",29),r.ɵɵlistener("ngModelChange",(function(t){return r.ɵɵrestoreView(e).$implicit.checked=t})),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"td"),r.ɵɵtext(8),r.ɵɵelementEnd(),r.ɵɵtext(9,"\n "),r.ɵɵelementEnd()}if(2&e){const e=t.$implicit,n=t.index;r.ɵɵadvance(4),r.ɵɵpropertyInterpolate1("name","Collection[",n,"].Checked"),r.ɵɵproperty("ngModel",e.checked),r.ɵɵadvance(4),r.ɵɵtextInterpolate1("\n ",e.name,"\n ")}}function C(e,t){if(1&e&&(r.ɵɵelementStart(0,"table",25),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"tbody"),r.ɵɵtext(3,"\n "),r.ɵɵtemplate(4,I,10,3,"tr",26),r.ɵɵtext(5,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(6,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(2);r.ɵɵadvance(4),r.ɵɵproperty("ngForOf",e.collections)}}function E(e,t){if(1&e){const e=r.ɵɵgetCurrentView();r.ɵɵelementStart(0,"div",14),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"p"),r.ɵɵtext(3),r.ɵɵpipe(4,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(5,"\n "),r.ɵɵelementStart(6,"div",15),r.ɵɵtext(7,"\n "),r.ɵɵelementStart(8,"label",16),r.ɵɵtext(9),r.ɵɵpipe(10,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(11,"\n "),r.ɵɵelementStart(12,"select",17),r.ɵɵlistener("ngModelChange",(function(t){r.ɵɵrestoreView(e);return r.ɵɵnextContext().organizationId=t}))("change",(function(){r.ɵɵrestoreView(e);return r.ɵɵnextContext().filterCollections()})),r.ɵɵtext(13,"\n "),r.ɵɵtemplate(14,S,2,2,"option",18),r.ɵɵtext(15,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(16,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"div",19),r.ɵɵtext(19,"\n "),r.ɵɵelementStart(20,"h3"),r.ɵɵtext(21),r.ɵɵpipe(22,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(23,"\n "),r.ɵɵtemplate(24,b,10,6,"div",20),r.ɵɵtext(25,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(26,"\n "),r.ɵɵtemplate(27,w,3,3,"div",6),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,C,7,1,"table",21),r.ɵɵtext(30,"\n "),r.ɵɵelementEnd()}if(2&e){const e=r.ɵɵnextContext();r.ɵɵadvance(3),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(4,8,"moveToOrgDesc")),r.ɵɵadvance(6),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(10,10,"organization")),r.ɵɵadvance(3),r.ɵɵproperty("ngModel",e.organizationId),r.ɵɵadvance(2),r.ɵɵproperty("ngForOf",e.organizations),r.ɵɵadvance(7),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(22,12,"collections")),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",e.collections&&e.collections.length),r.ɵɵadvance(3),r.ɵɵproperty("ngIf",!e.collections||!e.collections.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",e.collections&&e.collections.length)}}const P=function(e){return{loading:e}};function k(e,t){if(1&e&&(r.ɵɵelementStart(0,"button",30),r.ɵɵtext(1,"\n "),r.ɵɵelement(2,"i",31),r.ɵɵpipe(3,"i18n"),r.ɵɵtext(4,"\n "),r.ɵɵelementStart(5,"span"),r.ɵɵtext(6),r.ɵɵpipe(7,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(8,"\n "),r.ɵɵelementEnd()),2&e){const e=r.ɵɵnextContext(),t=r.ɵɵreference(5);r.ɵɵproperty("disabled",t.loading||!e.canSave)("ngClass",r.ɵɵpureFunction1(8,P,t.loading)),r.ɵɵadvance(2),r.ɵɵpropertyInterpolate("title",r.ɵɵpipeBind1(3,4,"loading")),r.ɵɵadvance(4),r.ɵɵtextInterpolate(r.ɵɵpipeBind1(7,6,"save"))}}function A(e,t){1&e&&(r.ɵɵelementStart(0,"a",32),r.ɵɵtext(1),r.ɵɵpipe(2,"i18n"),r.ɵɵelementEnd()),2&e&&(r.ɵɵadvance(1),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(2,1,"newOrganization"),"\n "))}class O extends i.ShareComponent{constructor(e,t,n,i,r,o){super(e,t,n,i,o,r)}ngOnDestroy(){this.selectAll(!1)}check(e,t){e.checked=null==t?!e.checked:t}selectAll(e){(e?this.collections:this.writeableCollections).forEach((t=>this.check(t,e)))}}t.ShareComponent=O,O.ɵfac=function(e){return new(e||O)(r.ɵɵdirectiveInject(o.CollectionService),r.ɵɵdirectiveInject(a.PlatformUtilsService),r.ɵɵdirectiveInject(s.I18nService),r.ɵɵdirectiveInject(l.CipherService),r.ɵɵdirectiveInject(c.OrganizationService),r.ɵɵdirectiveInject(d.LogService))},O.ɵcmp=r.ɵɵdefineComponent({type:O,selectors:[["app-vault-share"]],features:[r.ɵɵInheritDefinitionFeature],decls:41,vars:15,consts:[["role","dialog","aria-modal","true","aria-labelledby","shareTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[1,"modal-content",3,"appApiAction","ngSubmit"],["form",""],[1,"modal-header"],["id","shareTitle",1,"modal-title"],[4,"ngIf"],["type","button","data-dismiss","modal",1,"close",3,"appA11yTitle"],["aria-hidden","true"],["class","modal-body",4,"ngIf"],[1,"modal-footer"],["type","submit","class","btn btn-primary btn-submit manual",3,"disabled","ngClass",4,"ngIf"],["href","#","routerLink","/settings/create-organization","class","btn btn-primary",4,"ngIf"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],[1,"form-group"],["for","organization"],["id","organization","name","OrganizationId",1,"form-control",3,"ngModel","ngModelChange","change"],[3,"ngValue",4,"ngFor","ngForOf"],[1,"d-flex"],["class","ml-auto d-flex",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],[3,"ngValue"],[1,"ml-auto","d-flex"],["type","button",1,"btn","btn-link","btn-sm","py-0",3,"click"],[1,"table","table-hover","table-list","mb-0"],[3,"click",4,"ngFor","ngForOf"],[3,"click"],[1,"table-list-checkbox"],["type","checkbox","appStopProp","",3,"ngModel","name","ngModelChange"],["type","submit",1,"btn","btn-primary","btn-submit","manual",3,"disabled","ngClass"],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin",3,"title"],["href","#","routerLink","/settings/create-organization",1,"btn","btn-primary"]],template:function(e,t){1&e&&(r.ɵɵelementStart(0,"div",0),r.ɵɵtext(1,"\n "),r.ɵɵelementStart(2,"div",1),r.ɵɵtext(3,"\n "),r.ɵɵelementStart(4,"form",2,3),r.ɵɵlistener("ngSubmit",(function(){return t.submit()})),r.ɵɵtext(6,"\n "),r.ɵɵelementStart(7,"div",4),r.ɵɵtext(8,"\n "),r.ɵɵelementStart(9,"h2",5),r.ɵɵtext(10),r.ɵɵpipe(11,"i18n"),r.ɵɵtemplate(12,y,2,1,"small",6),r.ɵɵtext(13,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(14,"\n "),r.ɵɵelementStart(15,"button",7),r.ɵɵpipe(16,"i18n"),r.ɵɵtext(17,"\n "),r.ɵɵelementStart(18,"span",8),r.ɵɵtext(19,"×"),r.ɵɵelementEnd(),r.ɵɵtext(20,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(21,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(22,"\n "),r.ɵɵtemplate(23,x,3,3,"div",9),r.ɵɵtext(24,"\n "),r.ɵɵtemplate(25,E,31,14,"div",9),r.ɵɵtext(26,"\n "),r.ɵɵelementStart(27,"div",10),r.ɵɵtext(28,"\n "),r.ɵɵtemplate(29,k,9,10,"button",11),r.ɵɵtext(30,"\n "),r.ɵɵtemplate(31,A,3,3,"a",12),r.ɵɵtext(32,"\n "),r.ɵɵelementStart(33,"button",13),r.ɵɵtext(34),r.ɵɵpipe(35,"i18n"),r.ɵɵelementEnd(),r.ɵɵtext(36,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(37,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(38,"\n "),r.ɵɵelementEnd(),r.ɵɵtext(39,"\n"),r.ɵɵelementEnd(),r.ɵɵtext(40,"\n")),2&e&&(r.ɵɵadvance(4),r.ɵɵproperty("appApiAction",t.formPromise),r.ɵɵadvance(6),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(11,9,"moveToOrganization"),"\n "),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.cipher),r.ɵɵadvance(3),r.ɵɵpropertyInterpolate("appA11yTitle",r.ɵɵpipeBind1(16,11,"close")),r.ɵɵadvance(8),r.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),r.ɵɵadvance(4),r.ɵɵproperty("ngIf",t.organizations&&t.organizations.length),r.ɵɵadvance(2),r.ɵɵproperty("ngIf",!t.organizations||!t.organizations.length),r.ɵɵadvance(3),r.ɵɵtextInterpolate1("\n ",r.ɵɵpipeBind1(35,13,"cancel"),"\n "))},directives:[p.ɵNgNoValidate,p.NgControlStatusGroup,p.NgForm,u.ApiActionDirective,m.NgIf,h.A11yTitleDirective,p.SelectControlValueAccessor,p.NgControlStatus,p.NgModel,m.NgForOf,p.NgSelectOption,p.ɵNgSelectMultipleOption,p.CheckboxControlValueAccessor,v.StopPropDirective,m.NgClass,f.RouterLinkWithHref],pipes:[g.I18nPipe],encapsulation:2})},69031:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.VaultComponent=void 0;const r=n(32621),o=(n(68012),n(53232)),a=n(38270),s=n(61099),l=n(58746),c=n(18641),d=n(97618),p=n(7702),u=n(38978),m=n(41412),h=n(66500),v=(n(67569),n(82058),n(40349),n(36424),n(94308),n(99954),n(85556),n(77243),n(2173),n(49613),n(29546),n(32621)),f=n(2173),g=n(68012),y=n(40349),x=n(29546),S=n(49613),b=n(82058),w=n(36424),I=n(99954),C=n(67569),E=n(77243),P=n(94308),k=n(85556),A=n(41412),O=n(637),T=n(57490),M=n(8369),D=n(97618),B=n(50553),R=n(38270),U=n(52900),V=n(18720),F=n(32051),N=n(72596),_=["attachments"],j=["folderAddEdit"],z=["cipherAddEdit"],L=["share"],K=["collections"],q=["updateKeyTemplate"];function G(e,t){1&e&&(v.ɵɵelementContainerStart(0),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",30),v.ɵɵpipe(3,"i18n"),v.ɵɵtext(4,"\n "),v.ɵɵelementStart(5,"span",31),v.ɵɵtext(6),v.ɵɵpipe(7,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementContainerEnd()),2&e&&(v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("title",v.ɵɵpipeBind1(3,2,"loading")),v.ɵɵadvance(4),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(7,4,"loading")))}function W(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"button",32),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().addCipher()})),v.ɵɵtext(1,"\n "),v.ɵɵelement(2,"i",33),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("",v.ɵɵpipeBind1(4,1,"addItem"),"\n "))}function H(e,t){if(1&e&&(v.ɵɵelementStart(0,"app-callout",34),v.ɵɵtext(1),v.ɵɵelementEnd()),2&e){const e=v.ɵɵnextContext();v.ɵɵadvance(1),v.ɵɵtextInterpolate1("\n ",e.trashCleanupWarning,"\n ")}}function $(e,t){if(1&e){const e=v.ɵɵgetCurrentView();v.ɵɵelementStart(0,"div",35),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",36),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",37),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",21),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"button",38),v.ɵɵlistener("click",(function(){v.ɵɵrestoreView(e);return v.ɵɵnextContext().updateKey()})),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()}2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,3,"updateKeyTitle"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateEncryptionKeyShortDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateEncryptionKey"),"\n "))}function Q(e,t){1&e&&v.ɵɵelement(0,"app-verify-email",39)}function Y(e,t){1&e&&(v.ɵɵelementStart(0,"div",35),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",36),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",37),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",21),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",40),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(6,3,"updateBrowser"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"updateBrowserDesc")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"updateBrowser"),"\n "))}function J(e,t){1&e&&(v.ɵɵelementStart(0,"div",41),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",42),v.ɵɵtext(3,"\n "),v.ɵɵelement(4,"i",43),v.ɵɵtext(5),v.ɵɵpipe(6,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(7,"\n "),v.ɵɵelementStart(8,"div",21),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"p"),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"a",44),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(17,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(18,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(6,3,"goPremium"),"\n "),v.ɵɵadvance(6),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(12,5,"premiumUpgradeUnlockFeatures")),v.ɵɵadvance(4),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,7,"goPremium"),"\n "))}function X(e,t){1&e&&(v.ɵɵelementStart(0,"div",45),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",18),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementStart(5,"a",46),v.ɵɵpipe(6,"i18n"),v.ɵɵtext(7,"\n "),v.ɵɵelement(8,"i",20),v.ɵɵtext(9,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(10,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",21),v.ɵɵtext(13,"\n "),v.ɵɵelement(14,"app-providers",47),v.ɵɵtext(15,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(16,"\n "),v.ɵɵelementEnd()),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(4,2,"providers"),"\n "),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(6,4,"learnMore")))}function Z(e,t){}function ee(e,t){}function te(e,t){}function ne(e,t){}function ie(e,t){}function re(e,t){}const oe="VaultComponent";class ae{constructor(e,t,n,i,r,o,a,s,l,c,d,p,u,m,h){this.syncService=e,this.route=t,this.router=n,this.changeDetectorRef=i,this.i18nService=r,this.modalService=o,this.tokenService=a,this.cryptoService=s,this.messagingService=l,this.platformUtilsService=c,this.broadcasterService=d,this.ngZone=p,this.stateService=u,this.organizationService=m,this.providerService=h,this.favorites=!1,this.type=null,this.folderId=null,this.collectionId=null,this.showVerifyEmail=!1,this.showBrowserOutdated=!1,this.showUpdateKey=!1,this.showPremiumCallout=!1,this.showProviders=!1,this.deleted=!1,this.trashCleanupWarning=null}ngOnInit(){return i(this,void 0,void 0,(function*(){this.showVerifyEmail=!(yield this.tokenService.getEmailVerified()),this.showBrowserOutdated=-1!==window.navigator.userAgent.indexOf("MSIE"),this.trashCleanupWarning=this.i18nService.t(this.platformUtilsService.isSelfHost()?"trashCleanupWarningSelfHosted":"trashCleanupWarning"),this.route.queryParams.pipe(o.first()).subscribe((e=>i(this,void 0,void 0,(function*(){yield this.syncService.fullSync(!1);const t=yield this.stateService.getCanAccessPremium();if(this.showPremiumCallout=!this.showVerifyEmail&&!t&&!this.platformUtilsService.isSelfHost(),this.showProviders=(yield this.providerService.getAll()).length>0,yield Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load()]),this.showUpdateKey=!(yield this.cryptoService.hasEncKey()),null==e)this.groupingsComponent.selectedAll=!0,yield this.ciphersComponent.reload();else if(e.deleted)this.groupingsComponent.selectedTrash=!0,yield this.filterDeleted();else if(e.favorites)this.groupingsComponent.selectedFavorites=!0,yield this.filterFavorites();else if(e.type){const t=parseInt(e.type,null);this.groupingsComponent.selectedType=t,yield this.filterCipherType(t)}else e.folderId?(this.groupingsComponent.selectedFolder=!0,this.groupingsComponent.selectedFolderId=e.folderId,yield this.filterFolder(e.folderId)):e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,yield this.filterCollection(e.collectionId)):(this.groupingsComponent.selectedAll=!0,yield this.ciphersComponent.reload());this.broadcasterService.subscribe(oe,(e=>{this.ngZone.run((()=>i(this,void 0,void 0,(function*(){if("syncCompleted"===e.command)e.successfully&&(yield Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load(),this.ciphersComponent.load(this.ciphersComponent.filter)]),this.changeDetectorRef.detectChanges())}))))}))}))))}))}ngOnDestroy(){this.broadcasterService.unsubscribe(oe)}clearGroupingFilters(){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),yield this.ciphersComponent.reload(),this.clearFilters(),this.go()}))}filterFavorites(){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFavorites"),yield this.ciphersComponent.reload((e=>e.favorite)),this.clearFilters(),this.favorites=!0,this.go()}))}filterDeleted(){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),yield this.ciphersComponent.reload(null,!0),this.clearFilters(),this.deleted=!0,this.go()}))}filterCipherType(e){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),yield this.ciphersComponent.reload((t=>t.type===e)),this.clearFilters(),this.type=e,this.go()}))}filterFolder(e){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,e="none"===e?null:e,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFolder"),yield this.ciphersComponent.reload((t=>t.folderId===e)),this.clearFilters(),this.folderId=null==e?"none":e,this.go()}))}filterCollection(e){return i(this,void 0,void 0,(function*(){this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),yield this.ciphersComponent.reload((t=>null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1)),this.clearFilters(),this.collectionId=e,this.go()}))}filterSearchText(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)}editCipherAttachments(e){return i(this,void 0,void 0,(function*(){const t=yield this.stateService.getCanAccessPremium();if(null==e.organizationId&&!t)return void this.messagingService.send("premiumRequired");if(null!=e.organizationId){const t=yield this.organizationService.get(e.organizationId);if(null!=t&&(null==t.maxStorageGb||0===t.maxStorageGb))return void this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId})}let n=!1;const[r]=yield this.modalService.openViewRef(c.AttachmentsComponent,this.attachmentsModalRef,(t=>{t.cipherId=e.id,t.onUploadedAttachment.subscribe((()=>n=!0)),t.onDeletedAttachment.subscribe((()=>n=!0)),t.onReuploadedAttachment.subscribe((()=>n=!0))}));r.onClosed.subscribe((()=>i(this,void 0,void 0,(function*(){n&&(yield this.ciphersComponent.refresh()),n=!1}))))}))}shareCipher(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(h.ShareComponent,this.shareModalRef,(n=>{n.cipherId=e.id,n.onSharedCipher.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}editCipherCollections(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(p.CollectionsComponent,this.collectionsModalRef,(n=>{n.cipherId=e.id,n.onSavedCollections.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}))}))}addFolder(){return i(this,void 0,void 0,(function*(){const[e]=yield this.modalService.openViewRef(u.FolderAddEditComponent,this.folderAddEditModalRef,(t=>{t.folderId=null,t.onSavedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){e.close(),yield this.groupingsComponent.loadFolders()}))))}))}))}editFolder(e){return i(this,void 0,void 0,(function*(){const[t]=yield this.modalService.openViewRef(u.FolderAddEditComponent,this.folderAddEditModalRef,(n=>{n.folderId=e,n.onSavedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.groupingsComponent.loadFolders()})))),n.onDeletedFolder.subscribe((()=>i(this,void 0,void 0,(function*(){t.close(),yield this.groupingsComponent.loadFolders(),yield this.filterFolder("none"),this.groupingsComponent.selectedFolderId=null}))))}))}))}addCipher(){return i(this,void 0,void 0,(function*(){const e=yield this.editCipher(null);if(e.type=this.type,e.folderId="none"===this.folderId?null:this.folderId,null!=this.collectionId){const t=this.groupingsComponent.collections.filter((e=>e.id===this.collectionId));t.length>0&&(e.organizationId=t[0].organizationId,e.collectionIds=[this.collectionId])}}))}editCipher(e){return i(this,void 0,void 0,(function*(){const[t,n]=yield this.modalService.openViewRef(l.AddEditComponent,this.cipherAddEditModalRef,(n=>{n.cipherId=null==e?null:e.id,n.onSavedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()})))),n.onDeletedCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()})))),n.onRestoredCipher.subscribe((e=>i(this,void 0,void 0,(function*(){t.close(),yield this.ciphersComponent.refresh()}))))}));return n}))}cloneCipher(e){return i(this,void 0,void 0,(function*(){(yield this.editCipher(e)).cloneMode=!0}))}updateKey(){return i(this,void 0,void 0,(function*(){yield this.modalService.openViewRef(s.UpdateKeyComponent,this.updateKeyModalRef)}))}clearFilters(){this.folderId=null,this.collectionId=null,this.favorites=!1,this.type=null,this.deleted=!1}go(e=null){null==e&&(e={favorites:!!this.favorites||null,type:this.type,folderId:this.folderId,collectionId:this.collectionId,deleted:!!this.deleted||null}),this.router.navigate([],{relativeTo:this.route,queryParams:e,replaceUrl:!0})}}t.VaultComponent=ae,ae.ɵfac=function(e){return new(e||ae)(v.ɵɵdirectiveInject(f.SyncService),v.ɵɵdirectiveInject(g.ActivatedRoute),v.ɵɵdirectiveInject(g.Router),v.ɵɵdirectiveInject(v.ChangeDetectorRef),v.ɵɵdirectiveInject(y.I18nService),v.ɵɵdirectiveInject(x.ModalService),v.ɵɵdirectiveInject(S.TokenService),v.ɵɵdirectiveInject(b.CryptoService),v.ɵɵdirectiveInject(w.MessagingService),v.ɵɵdirectiveInject(I.PlatformUtilsService),v.ɵɵdirectiveInject(C.BroadcasterService),v.ɵɵdirectiveInject(v.NgZone),v.ɵɵdirectiveInject(E.StateService),v.ɵɵdirectiveInject(P.OrganizationService),v.ɵɵdirectiveInject(k.ProviderService))},ae.ɵcmp=v.ɵɵdefineComponent({type:ae,selectors:[["app-vault"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(m.GroupingsComponent,7),v.ɵɵviewQuery(d.CiphersComponent,7),v.ɵɵviewQuery(a.OrganizationsComponent,7),v.ɵɵviewQuery(_,7,r.ViewContainerRef),v.ɵɵviewQuery(j,7,r.ViewContainerRef),v.ɵɵviewQuery(z,7,r.ViewContainerRef),v.ɵɵviewQuery(L,7,r.ViewContainerRef),v.ɵɵviewQuery(K,7,r.ViewContainerRef),v.ɵɵviewQuery(q,7,r.ViewContainerRef)),2&e){let e;v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.groupingsComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.ciphersComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.organizationsComponent=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.attachmentsModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.folderAddEditModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.cipherAddEditModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.shareModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.collectionsModalRef=e.first),v.ɵɵqueryRefresh(e=v.ɵɵloadQuery())&&(t.updateKeyModalRef=e.first)}},decls:90,vars:21,consts:[[1,"container","page-content"],[1,"row"],[1,"col-3"],[3,"onAllClicked","onFavoritesClicked","onCipherTypeClicked","onFolderClicked","onAddFolder","onEditFolder","onCollectionClicked","onSearchTextChanged","onTrashClicked"],[1,"col-6"],[1,"page-header","d-flex"],[3,"appApiAction"],["actionSpinner",""],[4,"ngIf"],[1,"ml-auto","d-flex"],[3,"ciphersComponent","deleted"],["type","button","class","btn btn-outline-primary btn-sm",3,"click",4,"ngIf"],["type","warning","icon","bwi-exclamation-triangle",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onShareClicked","onCollectionsClicked","onCloneClicked"],["class","card border-warning mb-4",4,"ngIf"],["class","d-block mb-4",4,"ngIf"],["class","card border-success mb-4",4,"ngIf"],[1,"card","mb-4"],[1,"card-header","d-flex"],["href","https://bitwarden.com/help/about-organizations/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"bwi","bwi-question-circle"],[1,"card-body"],[3,"vault"],["class","card mt-4",4,"ngIf"],["attachments",""],["folderAddEdit",""],["cipherAddEdit",""],["share",""],["collections",""],["updateKeyTemplate",""],["aria-hidden","true",1,"bwi","bwi-spinner","bwi-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click"],["aria-hidden","true",1,"bwi","bwi-plus","bwi-fw"],["type","warning","icon","bwi-exclamation-triangle"],[1,"card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"bwi","bwi-exclamation-triangle","bwi-fw"],["type","button",1,"btn","btn-block","btn-outline-secondary",3,"click"],[1,"d-block","mb-4"],["target","_blank","href","https://browser-update.org/update-browser.html","rel","noopener",1,"btn","btn-block","btn-outline-secondary"],[1,"card","border-success","mb-4"],[1,"card-header","bg-success","text-white"],["aria-hidden","true",1,"bwi","bwi-star-f","bwi-fw"],["routerLink","/settings/premium",1,"btn","btn-block","btn-outline-secondary"],[1,"card","mt-4"],["href","https://bitwarden.com/help/providers/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["vault","true"]],template:function(e,t){if(1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1,"\n "),v.ɵɵelementStart(2,"div",1),v.ɵɵtext(3,"\n "),v.ɵɵelementStart(4,"div",2),v.ɵɵtext(5,"\n "),v.ɵɵelementStart(6,"app-vault-groupings",3),v.ɵɵlistener("onAllClicked",(function(){return t.clearGroupingFilters()}))("onFavoritesClicked",(function(){return t.filterFavorites()}))("onCipherTypeClicked",(function(e){return t.filterCipherType(e)}))("onFolderClicked",(function(e){return t.filterFolder(e.id)}))("onAddFolder",(function(){return t.addFolder()}))("onEditFolder",(function(e){return t.editFolder(e.id)}))("onCollectionClicked",(function(e){return t.filterCollection(e.id)}))("onSearchTextChanged",(function(e){return t.filterSearchText(e)}))("onTrashClicked",(function(){return t.filterDeleted()})),v.ɵɵtext(7,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(8,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(9,"\n "),v.ɵɵelementStart(10,"div",4),v.ɵɵtext(11,"\n "),v.ɵɵelementStart(12,"div",5),v.ɵɵtext(13,"\n "),v.ɵɵelementStart(14,"h1"),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementStart(17,"small",6,7),v.ɵɵtext(19,"\n "),v.ɵɵtemplate(20,G,9,6,"ng-container",8),v.ɵɵtext(21,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(22,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(23,"\n "),v.ɵɵelementStart(24,"div",9),v.ɵɵtext(25,"\n "),v.ɵɵelementStart(26,"app-vault-bulk-actions",10),v.ɵɵtext(27,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(28,"\n "),v.ɵɵtemplate(29,W,5,3,"button",11),v.ɵɵtext(30,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(31,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(32,"\n "),v.ɵɵtemplate(33,H,2,1,"app-callout",12),v.ɵɵtext(34,"\n "),v.ɵɵelementStart(35,"app-vault-ciphers",13),v.ɵɵlistener("onCipherClicked",(function(e){return t.editCipher(e)}))("onAttachmentsClicked",(function(e){return t.editCipherAttachments(e)}))("onAddCipher",(function(){return t.addCipher()}))("onShareClicked",(function(e){return t.shareCipher(e)}))("onCollectionsClicked",(function(e){return t.editCipherCollections(e)}))("onCloneClicked",(function(e){return t.cloneCipher(e)})),v.ɵɵtext(36,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(37,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(38,"\n "),v.ɵɵelementStart(39,"div",2),v.ɵɵtext(40,"\n "),v.ɵɵtemplate(41,$,19,9,"div",14),v.ɵɵtext(42,"\n "),v.ɵɵtemplate(43,Q,1,0,"app-verify-email",15),v.ɵɵtext(44,"\n "),v.ɵɵtemplate(45,Y,19,9,"div",14),v.ɵɵtext(46,"\n "),v.ɵɵtemplate(47,J,19,9,"div",16),v.ɵɵtext(48,"\n "),v.ɵɵelementStart(49,"div",17),v.ɵɵtext(50,"\n "),v.ɵɵelementStart(51,"div",18),v.ɵɵtext(52),v.ɵɵpipe(53,"i18n"),v.ɵɵelementStart(54,"a",19),v.ɵɵpipe(55,"i18n"),v.ɵɵtext(56,"\n "),v.ɵɵelement(57,"i",20),v.ɵɵtext(58,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(59,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(60,"\n "),v.ɵɵelementStart(61,"div",21),v.ɵɵtext(62,"\n "),v.ɵɵelement(63,"app-organizations",22),v.ɵɵtext(64,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(65,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(66,"\n "),v.ɵɵtemplate(67,X,17,6,"div",23),v.ɵɵtext(68,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(69,"\n "),v.ɵɵelementEnd(),v.ɵɵtext(70,"\n"),v.ɵɵelementEnd(),v.ɵɵtext(71,"\n"),v.ɵɵtemplate(72,Z,0,0,"ng-template",null,24,v.ɵɵtemplateRefExtractor),v.ɵɵtext(74,"\n"),v.ɵɵtemplate(75,ee,0,0,"ng-template",null,25,v.ɵɵtemplateRefExtractor),v.ɵɵtext(77,"\n"),v.ɵɵtemplate(78,te,0,0,"ng-template",null,26,v.ɵɵtemplateRefExtractor),v.ɵɵtext(80,"\n"),v.ɵɵtemplate(81,ne,0,0,"ng-template",null,27,v.ɵɵtemplateRefExtractor),v.ɵɵtext(83,"\n"),v.ɵɵtemplate(84,ie,0,0,"ng-template",null,28,v.ɵɵtemplateRefExtractor),v.ɵɵtext(86,"\n"),v.ɵɵtemplate(87,re,0,0,"ng-template",null,29,v.ɵɵtemplateRefExtractor),v.ɵɵtext(89,"\n")),2&e){const e=v.ɵɵreference(18);v.ɵɵadvance(15),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(16,15,"myVault"),"\n "),v.ɵɵadvance(2),v.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",e.loading),v.ɵɵadvance(6),v.ɵɵproperty("ciphersComponent",t.ciphersComponent)("deleted",t.deleted),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",!t.deleted),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.deleted),v.ɵɵadvance(8),v.ɵɵproperty("ngIf",t.showUpdateKey),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showVerifyEmail),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showBrowserOutdated),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",t.showPremiumCallout),v.ɵɵadvance(5),v.ɵɵtextInterpolate1("\n ",v.ɵɵpipeBind1(53,17,"organizations"),"\n "),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(55,19,"learnMore")),v.ɵɵadvance(9),v.ɵɵproperty("vault",!0),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.showProviders)}},directives:[A.GroupingsComponent,O.ApiActionDirective,T.NgIf,M.BulkActionsComponent,D.CiphersComponent,B.A11yTitleDirective,R.OrganizationsComponent,U.CalloutComponent,V.VerifyEmailComponent,g.RouterLinkWithHref,F.ProvidersComponent],pipes:[N.I18nPipe],encapsulation:2})},2313:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardRoutingModule=void 0;const i=n(68012),r=n(32621);n(68012);class o{}t.WildcardRoutingModule=o,o.ɵfac=function(e){return new(e||o)},o.ɵmod=r.ɵɵdefineNgModule({type:o}),o.ɵinj=r.ɵɵdefineInjector({imports:[[i.RouterModule.forChild([{path:"**",redirectTo:""}])],i.RouterModule]})},56788:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Account=t.AccountSettings=void 0;const i=n(84582);class r extends i.AccountSettings{constructor(){super(...arguments),this.vaultTimeout=15}}t.AccountSettings=r;class o extends i.Account{constructor(e){super(e),this.settings=new r,Object.assign(this.settings,Object.assign(Object.assign({},new r),this.settings))}}t.Account=o},19261:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GlobalState=void 0;const i=n(53387),r=n(51338);class o extends r.GlobalState{constructor(){super(...arguments),this.theme=i.ThemeType.Light,this.rememberEmail=!0}}t.GlobalState=o},40340:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterMessagingService=void 0;n(67569);const i=n(32621),r=n(67569);class o{constructor(e){this.broadcasterService=e}send(e,t={}){const n=Object.assign({},{command:e},t);this.broadcasterService.send(n)}}t.BroadcasterMessagingService=o,o.ɵfac=function(e){return new(e||o)(i.ɵɵinject(r.BroadcasterService))},o.ɵprov=i.ɵɵdefineInjectable({token:o,factory:o.ɵfac})},7540:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.HtmlStorageService=void 0;const r=n(1139),o=n(32621);class a{get defaultOptions(){return{htmlStorageLocation:r.HtmlStorageLocation.Session}}get(e,t=this.defaultOptions){let n=null;switch(t.htmlStorageLocation){case r.HtmlStorageLocation.Local:n=window.localStorage.getItem(e);break;case r.HtmlStorageLocation.Session:default:n=window.sessionStorage.getItem(e)}if(null!=n){const e=JSON.parse(n);return Promise.resolve(e)}return Promise.resolve(null)}has(e,t=this.defaultOptions){return i(this,void 0,void 0,(function*(){return null!=(yield this.get(e,t))}))}save(e,t,n=this.defaultOptions){if(null==t)return this.remove(e,n);t instanceof Set&&(t=Array.from(t));const i=JSON.stringify(t);switch(n.htmlStorageLocation){case r.HtmlStorageLocation.Local:window.localStorage.setItem(e,i);break;case r.HtmlStorageLocation.Session:default:window.sessionStorage.setItem(e,i)}return Promise.resolve()}remove(e,t=this.defaultOptions){switch(t.htmlStorageLocation){case r.HtmlStorageLocation.Local:window.localStorage.removeItem(e);break;case r.HtmlStorageLocation.Session:default:window.sessionStorage.removeItem(e)}return Promise.resolve()}}t.HtmlStorageService=a,a.ɵfac=function(e){return new(e||a)},a.ɵprov=o.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},15392:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.I18nService=void 0;const r=n(75631);class o extends r.I18nService{constructor(e,t){super(e||"en-US",t,(e=>i(this,void 0,void 0,(function*(){const t=this.localesDirectory+"/"+e+"/messages.json?cache=doiegc",n=yield fetch(t);return yield n.json()})))),this.supportedTranslationLocales=["en","az","bg","ca","cs","da","de","el","eo","en-GB","en-IN","es","et","fi","fr","he","hr","hu","id","it","ja","kn","ko","lv","ml","nb","nl","pl","pt-PT","pt-BR","ro","ru","sk","sr","sv","tr","uk","zh-CN","zh-TW"]}}t.I18nService=o},76885:function(e,t){"use strict";var n=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorageService=void 0;t.MemoryStorageService=class{constructor(){this.store=new Map}get(e){if(this.store.has(e)){const t=this.store.get(e);return Promise.resolve(t)}return Promise.resolve(null)}has(e){return n(this,void 0,void 0,(function*(){return null!=this.get(e)}))}save(e,t){return null==t?this.remove(e):(this.store.set(e,t),Promise.resolve())}remove(e){return this.store.delete(e),Promise.resolve()}}},20174:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;const i=n(61853),r=n(51406),o=n(32621);class a extends i.PasswordRepromptService{constructor(){super(...arguments),this.component=r.PasswordRepromptComponent}}t.PasswordRepromptService=a,a.ɵfac=function(){let e;return function(t){return(e||(e=o.ɵɵgetInheritedFactory(a)))(t||a)}}(),a.ɵprov=o.ɵɵdefineInjectable({token:a,factory:a.ɵfac})},54234:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateService=void 0;const r=n(12354),o=n(56788);class a extends r.StateService{addAccount(e){const t=Object.create(null,{addAccount:{get:()=>super.addAccount}});return i(this,void 0,void 0,(function*(){e=new o.Account(e),yield t.addAccount.call(this,e)}))}getRememberEmail(e){var t;return i(this,void 0,void 0,(function*(){return null===(t=yield this.getGlobals(this.reconcileOptions(e,yield this.defaultOnDiskLocalOptions())))||void 0===t?void 0:t.rememberEmail}))}setRememberEmail(e,t){return i(this,void 0,void 0,(function*(){const n=yield this.getGlobals(this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()));n.rememberEmail=e,yield this.saveGlobals(n,this.reconcileOptions(t,yield this.defaultOnDiskLocalOptions()))}))}getEncryptedCiphers(e){const t=Object.create(null,{getEncryptedCiphers:{get:()=>super.getEncryptedCiphers}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedCiphers.call(this,e)}))}setEncryptedCiphers(e,t){const n=Object.create(null,{setEncryptedCiphers:{get:()=>super.setEncryptedCiphers}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedCiphers.call(this,e,t)}))}getEncryptedCollections(e){const t=Object.create(null,{getEncryptedCollections:{get:()=>super.getEncryptedCollections}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedCollections.call(this,e)}))}setEncryptedCollections(e,t){const n=Object.create(null,{setEncryptedCollections:{get:()=>super.setEncryptedCollections}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedCollections.call(this,e,t)}))}getEncryptedFolders(e){const t=Object.create(null,{getEncryptedFolders:{get:()=>super.getEncryptedFolders}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedFolders.call(this,e)}))}setEncryptedFolders(e,t){const n=Object.create(null,{setEncryptedFolders:{get:()=>super.setEncryptedFolders}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedFolders.call(this,e,t)}))}getEncryptedSends(e){const t=Object.create(null,{getEncryptedSends:{get:()=>super.getEncryptedSends}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getEncryptedSends.call(this,e)}))}setEncryptedSends(e,t){const n=Object.create(null,{setEncryptedSends:{get:()=>super.setEncryptedSends}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setEncryptedSends.call(this,e,t)}))}getLastSync(e){const t=Object.create(null,{getLastSync:{get:()=>super.getLastSync}});return i(this,void 0,void 0,(function*(){return e=this.reconcileOptions(e,this.defaultInMemoryOptions),yield t.getLastSync.call(this,e)}))}setLastSync(e,t){const n=Object.create(null,{setLastSync:{get:()=>super.setLastSync}});return i(this,void 0,void 0,(function*(){return t=this.reconcileOptions(t,this.defaultInMemoryOptions),yield n.setLastSync.call(this,e,t)}))}}t.StateService=a},79863:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.StateMigrationService=void 0;const r=n(91656);class o extends r.StateMigrationService{migrationStateFrom1To2(){const e=Object.create(null,{migrateStateFrom1To2:{get:()=>super.migrateStateFrom1To2}});var t,n;return i(this,void 0,void 0,(function*(){yield e.migrateStateFrom1To2.call(this);const i=null!==(t=yield this.get("global"))&&void 0!==t?t:this.stateFactory.createGlobal(null);i.rememberEmail=null!==(n=yield this.get("rememberEmail"))&&void 0!==n?n:i.rememberEmail,yield this.set("global",i)}))}}t.StateMigrationService=o},83208:function(e,t,n){"use strict";var i=this&&this.__awaiter||function(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{l(i.next(e))}catch(t){o(t)}}function s(e){try{l(i.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.WebPlatformUtilsService=void 0;const r=n(86455),o=n(83914),a=n(53387);t.WebPlatformUtilsService=class{constructor(e,t,n,i){this.i18nService=e,this.messagingService=t,this.logService=n,this.stateService=i,this.identityClientId="web",this.browserCache=null,this.prefersColorSchemeDark=window.matchMedia("(prefers-color-scheme: dark)")}getDevice(){return null!=this.browserCache||(-1!==navigator.userAgent.indexOf(" Firefox/")||-1!==navigator.userAgent.indexOf(" Gecko/")?this.browserCache=o.DeviceType.FirefoxBrowser:navigator.userAgent.indexOf(" OPR/")>=0?this.browserCache=o.DeviceType.OperaBrowser:-1!==navigator.userAgent.indexOf(" Edg/")?this.browserCache=o.DeviceType.EdgeBrowser:-1!==navigator.userAgent.indexOf(" Vivaldi/")?this.browserCache=o.DeviceType.VivaldiBrowser:-1!==navigator.userAgent.indexOf(" Safari/")&&-1===navigator.userAgent.indexOf("Chrome")?this.browserCache=o.DeviceType.SafariBrowser:window.chrome&&-1!==navigator.userAgent.indexOf(" Chrome/")?this.browserCache=o.DeviceType.ChromeBrowser:-1!==navigator.userAgent.indexOf(" Trident/")?this.browserCache=o.DeviceType.IEBrowser:this.browserCache=o.DeviceType.UnknownBrowser),this.browserCache}getDeviceString(){return o.DeviceType[this.getDevice()].toLowerCase().replace("browser","")}isFirefox(){return this.getDevice()===o.DeviceType.FirefoxBrowser}isChrome(){return this.getDevice()===o.DeviceType.ChromeBrowser}isEdge(){return this.getDevice()===o.DeviceType.EdgeBrowser}isOpera(){return this.getDevice()===o.DeviceType.OperaBrowser}isVivaldi(){return this.getDevice()===o.DeviceType.VivaldiBrowser}isSafari(){return this.getDevice()===o.DeviceType.SafariBrowser}isIE(){return this.getDevice()===o.DeviceType.IEBrowser}isMacAppStore(){return!1}isViewOpen(){return Promise.resolve(!1)}launchUri(e,t){const n=document.createElement("a");n.href=e,null!=t&&t.sameWindow||(n.target="_blank",n.rel="noreferrer noopener"),n.classList.add("d-none"),document.body.appendChild(n),n.click(),document.body.removeChild(n)}saveFile(e,t,n,i){let r=null,o=null;const a=i.toLowerCase();let s=!0;if(a.endsWith(".pdf")?(o="application/pdf",s=!1):a.endsWith(".xlsx")?o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":a.endsWith(".docx")?o="application/vnd.openxmlformats-officedocument.wordprocessingml.document":a.endsWith(".pptx")?o="application/vnd.openxmlformats-officedocument.presentationml.presentation":a.endsWith(".csv")?o="text/csv":a.endsWith(".png")?o="image/png":a.endsWith(".jpg")||a.endsWith(".jpeg")?o="image/jpeg":a.endsWith(".gif")&&(o="image/gif"),null!=o&&null==(n=n||{}).type&&(n.type=o),r=null==n||this.isIE()?new Blob([t]):new Blob([t],n),navigator.msSaveOrOpenBlob)navigator.msSaveBlob(r,i);else{const t=e.document.createElement("a");s?t.download=i:this.isSafari()||(t.target="_blank"),t.href=URL.createObjectURL(r),t.style.position="fixed",e.document.body.appendChild(t),t.click(),e.document.body.removeChild(t)}}getApplicationVersion(){return Promise.resolve("2.26.1")}supportsWebAuthn(e){return"undefined"!=typeof PublicKeyCredential}supportsDuo(){return!0}showToast(e,t,n,i){this.messagingService.send("showToast",{text:n,title:t,type:e,options:i})}showDialog(e,t,n,o,a,s=!1){return i(this,void 0,void 0,(function*(){let i=null;if(null!=a)switch(a){case"success":i="bwi-check text-success";break;case"warning":i="bwi-exclamation-triangle text-warning";break;case"error":i="bwi-error text-danger";break;case"info":i="bwi-info-circle text-info"}const l=document.querySelector("div.modal");null!=l&&l.removeAttribute("tabindex");const c=null!=i?`<i class="swal-custom-icon bwi ${i}"></i>`:void 0,d=yield r.default.fire({heightAuto:!1,buttonsStyling:!1,icon:a,iconHtml:c,text:s?null:e,html:s?e:null,titleText:t,showCancelButton:null!=o,cancelButtonText:o,showConfirmButton:!0,confirmButtonText:null==n?this.i18nService.t("ok"):n});return null!=l&&l.setAttribute("tabindex","-1"),d.value}))}isDev(){return!1}isSelfHost(){return"selfhosted"==="cloud".toString()}copyToClipboard(e,t){let n=window,i=window.document;if(t&&(t.window||t.win)?(n=t.window||t.win,i=n.document):t&&t.doc&&(i=t.doc),n.clipboardData&&n.clipboardData.setData)n.clipboardData.setData("Text",e);else if(i.queryCommandSupported&&i.queryCommandSupported("copy")){const t=i.createElement("textarea");t.textContent=e,t.style.position="fixed";let n=i.body;i.body.classList.contains("modal-open")&&(n=i.body.querySelector(".modal")),n.appendChild(t),t.select();let o=!1;try{o=i.execCommand("copy"),o||this.logService.debug("Copy command unsupported or disabled.")}catch(r){console.warn("Copy to clipboard failed.",r)}finally{n.removeChild(t)}return o}}readFromClipboard(e){throw new Error("Cannot read from clipboard on web.")}supportsBiometric(){return Promise.resolve(!1)}authenticateBiometric(){return Promise.resolve(!1)}supportsSecureStorage(){return!1}getDefaultSystemTheme(){return Promise.resolve(this.prefersColorSchemeDark.matches?a.ThemeType.Dark:a.ThemeType.Light)}getEffectiveTheme(){return i(this,void 0,void 0,(function*(){const e=yield this.stateService.getTheme();return e===a.ThemeType.Dark?a.ThemeType.Dark:e===a.ThemeType.System?this.getDefaultSystemTheme():a.ThemeType.Light}))}onDefaultSystemThemeChange(e){try{this.prefersColorSchemeDark.addEventListener("change",(({matches:t})=>{e(t?a.ThemeType.Dark:a.ThemeType.Light)}))}catch(t){this.prefersColorSchemeDark.addListener((t=>{e(t.matches?a.ThemeType.Dark:a.ThemeType.Light)}))}}}},83706:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>i});const i={darkInputColor:"#fff",darkInputPlaceholderColor:"#bac0ce",lightInputColor:"#465057",lightInputPlaceholderColor:"#b6b8b8"}},5812:(e,t,n)=>{"use strict";n.r(t)},65971:()=>{},25819:()=>{},52361:()=>{},94616:()=>{}},n={};function i(e){var r=n[e];if(void 0!==r)return r.exports;var o=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(o.exports,o,o.exports,i),o.loaded=!0,o.exports}i.m=t,e=[],i.O=(t,n,r,o)=>{if(!n){var a=1/0;for(d=0;d<e.length;d++){for(var[n,r,o]=e[d],s=!0,l=0;l<n.length;l++)(!1&o||a>=o)&&Object.keys(i.O).every((e=>i.O[e](n[l])))?n.splice(l--,1):(s=!1,o<a&&(a=o));if(s){e.splice(d--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var d=e.length;d>0&&e[d-1][2]>o;d--)e[d]=e[d-1];e[d]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e={148:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);if(l)var d=l(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[a[c]]=0;return i.O(d)},n=self.webpackChunk_bitwarden_web_vault=self.webpackChunk_bitwarden_web_vault||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=i.O(void 0,[734],(()=>i(19471)));r=i.O(r)})();
//# sourceMappingURL=main.6a0d3942239a08208ced.js.map