!function(e){function t(t){for(var r,a,s=t[0],l=t[1],c=t[2],u=0,d=[];u1&&(r+=e.slice(1)),void 0===t[e=r]&&(e=e.toLowerCase()),void 0===t[e]&&(e=e.toUpperCase())}return t[e]},e}();t.BaseResponse=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CalloutComponent=void 0;var r=n(0),i=(n(1),n(0)),o=n(1),a=n(2);function s(e,t){if(1&e&&i.ɵɵelement(0,"i",4),2&e){var n=i.ɵɵnextContext(2);i.ɵɵclassMapInterpolate1("fa ",n.icon,"")}}function l(e,t){if(1&e&&(i.ɵɵelementStart(0,"h3",2),i.ɵɵtext(1," "),i.ɵɵtemplate(2,s,1,3,"i",3),i.ɵɵtext(3),i.ɵɵelementEnd()),2&e){var n=i.ɵɵnextContext();i.ɵɵadvance(2),i.ɵɵproperty("ngIf",n.icon),i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",n.title," ")}}var c=function(e){return{clickable:e}},p=["*"],u=function(){function e(e){this.i18nService=e,this.type="info"}return e.prototype.ngOnInit=function(){this.calloutStyle=this.type,"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="fa-warning")):"error"===this.type?(this.calloutStyle="danger",void 0===this.title&&(this.title=this.i18nService.t("error")),void 0===this.icon&&(this.icon="fa-bolt")):"tip"===this.type&&(this.calloutStyle="success",void 0===this.title&&(this.title=this.i18nService.t("tip")),void 0===this.icon&&(this.icon="fa-lightbulb-o"))},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.I18nService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,selectors:[["app-callout"]],inputs:{type:"type",icon:"icon",title:"title",clickable:"clickable"},ngContentSelectors:p,decls:7,vars:7,consts:[["role","alert",3,"ngClass"],["class","callout-heading",4,"ngIf"],[1,"callout-heading"],["aria-hidden","true",3,"class",4,"ngIf"],["aria-hidden","true"]],template:function(e,t){1&e&&(i.ɵɵprojectionDef(),i.ɵɵelementStart(0,"div",0),i.ɵɵtext(1," "),i.ɵɵtemplate(2,l,4,2,"h3",1),i.ɵɵtext(3," "),i.ɵɵprojection(4),i.ɵɵtext(5," "),i.ɵɵelementEnd(),i.ɵɵtext(6," ")),2&e&&(i.ɵɵclassMapInterpolate1("callout callout-",t.calloutStyle,""),i.ɵɵproperty("ngClass",i.ɵɵpureFunction1(5,c,t.clickable)),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.title))},directives:[a.NgClass,a.NgIf],encapsulation:2}),e}();t.CalloutComponent=u,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(u,[{type:r.Component,args:[{selector:"app-callout",templateUrl:"callout.component.html"}]}],(function(){return[{type:o.I18nService}]}),{type:[{type:r.Input}],icon:[{type:r.Input}],title:[{type:r.Input}],clickable:[{type:r.Input}]})},,function(e,t,n){"use strict";(function(e,r,i){Object.defineProperty(t,"__esModule",{value:!0}),t.Utils=void 0;var o=n(936),a="undefined"==typeof window?n(937):null,s=function(){function t(){}return t.init=function(){t.inited||(t.inited=!0,t.isNode=void 0!==e&&null!=e.release&&"node"===e.release.name,t.isBrowser="undefined"!=typeof window,t.isNativeScript=!t.isNode&&!t.isBrowser,t.isMobileBrowser=t.isBrowser&&this.isMobile(window),t.isAppleMobileBrowser=t.isBrowser&&this.isAppleMobile(window),t.global=t.isNativeScript||t.isNode&&!t.isBrowser?r:window)},t.fromB64ToArray=function(e){if(t.isNode||t.isNativeScript)return new Uint8Array(i.from(e,"base64"));for(var n=window.atob(e),r=new Uint8Array(n.length),o=0;o-1&&(n=t.getUrlObject("http://"+e)));return n},t.validIpAddress=function(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)},t.isMobile=function(e){var t,n=!1;return t=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(t)||/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(t.substr(0,4)))&&(n=!0),n||null!=e.navigator.userAgent.match(/iPad/i)},t.isAppleMobile=function(e){return null!=e.navigator.userAgent.match(/iPhone/i)||null!=e.navigator.userAgent.match(/iPad/i)},t.getUrlObject=function(e){try{if(null!=a)return a.URL?new a.URL(e):a.parse(e);if("function"==typeof URL)return new URL(e);if(null!=window){var t=e.indexOf("://")>-1;if(!t&&e.indexOf(".")>-1)e="http://"+e;else if(!t)return null;var n=window.document.createElement("a");return n.href=e,n}}catch(r){}return null},t.inited=!1,t.isNativeScript=!1,t.isNode=!1,t.isBrowser=!0,t.isMobileBrowser=!1,t.isAppleMobileBrowser=!1,t.global=null,t.tldEndingRegex=/.*\.(com|net|org|edu|uk|gov|ca|de|jp|fr|au|ru|ch|io|es|us|co|xyz|info|ly|mil)$/,t.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,t}();t.Utils=s,s.init()}).call(this,n(124),n(83),n(90).Buffer)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyService=void 0;var r=function(){};t.PolicyService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGenerationService=void 0;var r=function(){};t.PasswordGenerationService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseImporter=void 0;var r=n(657),i=n(125),o=n(154),a=n(230),s=n(23),l=n(194),c=n(126),p=n(142),u=n(88),d=n(35),m=n(118),f=n(89),h=n(655),v=function(){function e(){this.organizationId=null,this.logService=new h.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}}return Object.defineProperty(e.prototype,"organization",{get:function(){return null!=this.organizationId},enumerable:!1,configurable:!0}),e.prototype.parseXml=function(e){var t=(new DOMParser).parseFromString(e,"application/xml");return null!=t&&null==t.querySelector("parsererror")?t:null},e.prototype.parseCsv=function(e,t,n){var i=this;void 0===n&&(n={});var o=Object.assign({header:t},this.parseCsvOptions,n);e=this.splitNewLine(e).join("\n").trim();var a=r.parse(e,o);return null!=a.errors&&a.errors.length>0&&a.errors.forEach((function(e){null!=e.row&&i.logService.warning("Error parsing row "+e.row+": "+e.message)})),a.data&&a.data.length>0?a.data:null},e.prototype.parseSingleRowCsv=function(e){if(this.isNullOrWhitespace(e))return null;var t=this.parseCsv(e,!1);return null!=t&&t.length>0&&t[0].length>0?t[0]:null},e.prototype.makeUriArray=function(e){var t=this;if(null==e)return null;if("string"==typeof e){var n=new a.LoginUriView;return n.uri=this.fixUri(e),this.isNullOrWhitespace(n.uri)?null:(n.match=null,[n])}if(e.length>0){var r=[];return e.forEach((function(e){var n=new a.LoginUriView;n.uri=t.fixUri(e),t.isNullOrWhitespace(n.uri)||(n.match=null,r.push(n))})),0===r.length?null:r}return null},e.prototype.fixUri=function(e){return null==e?null:(-1===(e=e.trim()).indexOf("://")&&e.indexOf(".")>=0&&(e="http://"+e),e.length>1e3?e.substring(0,1e3):e)},e.prototype.nameFromUrl=function(e){var t=s.Utils.getHostname(e);return this.isNullOrWhitespace(t)?null:t.startsWith("www.")?t.replace("www.",""):t},e.prototype.isNullOrWhitespace=function(e){return s.Utils.isNullOrWhitespace(e)},e.prototype.getValueOrDefault=function(e,t){return void 0===t&&(t=null),this.isNullOrWhitespace(e)?t:e},e.prototype.splitNewLine=function(e){return e.split(this.newLineRegex)},e.prototype.getCardBrand=function(e){if(this.isNullOrWhitespace(e))return null;var 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))))))},e.prototype.setCardExpiration=function(e,t){if(!this.isNullOrWhitespace(t)){var n=(t=t.replace(/\s/g,"")).split("/");if(2===n.length){var r=null,i=null;if(1!==n[0].length&&2!==n[0].length||2===(r=n[0]).length&&"0"===r[0]&&(r=r.substr(1,1)),2!==n[1].length&&4!==n[1].length||(i=2===r.length?"20"+n[1]:n[1]),null!=r&&null!=i)return e.card.expMonth=r,e.card.expYear=i,!0}}return!1},e.prototype.moveFoldersToCollections=function(e){e.folderRelationships.forEach((function(t){return e.collectionRelationships.push(t)})),e.collections=e.folders.map((function(e){var t=new o.CollectionView;return t.name=e.name,t})),e.folderRelationships=[],e.folders=[]},e.prototype.querySelectorDirectChild=function(e,t){var n=this.querySelectorAllDirectChild(e,t);return 0===n.length?null:n[0]},e.prototype.querySelectorAllDirectChild=function(e,t){return Array.from(e.querySelectorAll(t)).filter((function(t){return t.parentNode===e}))},e.prototype.initLoginCipher=function(){var e=new i.CipherView;return e.favorite=!1,e.notes="",e.fields=[],e.login=new p.LoginView,e.type=d.CipherType.Login,e},e.prototype.cleanupCipher=function(e){null!=e&&(e.type!==d.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))},e.prototype.processKvp=function(e,t,n,r){if(void 0===r&&(r=m.FieldType.Text),!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=[]);var i=new l.FieldView;i.type=r,i.name=t,i.value=n,e.fields.push(i)}},e.prototype.processFolder=function(e,t){var n=e.folders.length,r=!this.isNullOrWhitespace(t),i=r;if(r)for(var o=0;o0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&(n=this.getFirstLetters(r,this.charCount)),null==n&&(n=this.unicodeSafeSubstring(r,this.charCount)),n.match(a.Utils.regexpEmojiPresentation)&&(n=n.match(a.Utils.regexpEmojiPresentation)[0]),o=this.getCharText(n),s=this.stringToColor(r),(l=this.getSvg(this.size,s)).appendChild(o),c=window.document.createElement("div").appendChild(l).outerHTML,p=window.btoa(unescape(encodeURIComponent(c))),this.src="data:image/svg+xml;base64,"+p,i.label=4;case 4:return[2]}}))}))},e.prototype.stringToColor=function(e){for(var t=0,n=0;n>8*n&255).toString(16)).substr(-2)}return r},e.prototype.getFirstLetters=function(e,t){var n=e.split(" ");if(n.length>1){for(var r="",i=0;i'}]}],(function(){return[{type:l.DomSanitizer},{type:c.CryptoFunctionService},{type:p.StateService}]}),{data:[{type:o.Input}],email:[{type:o.Input}],size:[{type:o.Input}],charCount:[{type:o.Input}],textColor:[{type:o.Input}],fontSize:[{type:o.Input}],fontWeight:[{type:o.Input}],dynamic:[{type:o.Input}],circle:[{type:o.Input}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ModalComponent=void 0;var o=n(260),a=n(0),s=n(944),l=n(23),c=(n(15),n(0)),p=n(15);function u(e,t){}var d=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.el=null,r}return i(t,e),t.prototype.ngOnDestroy=function(){},t.prototype.show=function(e,t,n,r){var i=this;void 0===n&&(n=!0),void 0===r&&(r=null),this.parentContainer=t,this.fade=n;var a=this.componentFactoryResolver.resolveComponentFactory(e),s=this.container.createComponent(a);null!=r&&r(s.instance);var c=Array.from(document.querySelectorAll(".modal"));return c.length>0&&(this.el=o(c[0]),this.el.modal("show"),this.el.on("show.bs.modal",(function(){i.onShow.emit(),i.messagingService.send("modalShow")})),this.el.on("shown.bs.modal",(function(){i.onShown.emit(),i.messagingService.send("modalShown"),l.Utils.isMobileBrowser||i.el.find("*[appAutoFocus]").focus()})),this.el.on("hide.bs.modal",(function(){i.onClose.emit(),i.messagingService.send("modalClose")})),this.el.on("hidden.bs.modal",(function(){i.onClosed.emit(),i.messagingService.send("modalClosed"),null!=i.parentContainer&&i.parentContainer.clear()}))),s.instance},t.prototype.close=function(){null!=this.el&&this.el.modal("hide")},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(p.MessagingService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-modal"]],features:[c.ɵɵInheritDefinitionFeature],decls:2,vars:0,consts:[["container",""]],template:function(e,t){1&e&&c.ɵɵtemplate(0,u,0,0,"ng-template",null,0,c.ɵɵtemplateRefExtractor)},encapsulation:2}),t}(s.ModalComponent);t.ModalComponent=d,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(d,[{type:a.Component,args:[{selector:"app-modal",template:""}]}],(function(){return[{type:c.ComponentFactoryResolver},{type:p.MessagingService}]}),null)},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordVerificationRequest=void 0;var r=function(){};t.PasswordVerificationRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?e[a]=s||null:e[a]=s?new o.EncString(s):null}},e.prototype.buildDataModel=function(e,t,n,r){for(var i in void 0===r&&(r=[]),n)if(n.hasOwnProperty(i)){var o=e[n[i]||i];r.indexOf(i)>-1?t[i]=null!=o?o:null:t[i]=null!=o?o.encryptedString:null}},e.prototype.decryptObj=function(e,t,n,o){return void 0===o&&(o=null),r(this,void 0,void 0,(function(){var r,a,s;return i(this,(function(i){switch(i.label){case 0:for(s in r=[],a=this,t)t.hasOwnProperty(s)&&function(i){var s=Promise.resolve().then((function(){var e=t[i]||i;return a[e]?a[e].decrypt(n,o):null})).then((function(t){e[i]=t}));r.push(s)}(s);return[4,Promise.all(r)];case 1:return i.sent(),[2,e]}}))}))},e}();t.default=a},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LogService=void 0;var r=function(){};t.LogService=r},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=void 0;var r=function(){};t.VaultTimeoutService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AuditService=void 0;var r=function(){};t.AuditService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=4)){null!=this._subTitle&&""!==this._subTitle?this._subTitle+=", ":this._subTitle="";var 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},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expiration",{get:function(){if(!this.expMonth&&!this.expYear)return null;var e=null!=this.expMonth?("0"+this.expMonth).slice(-2):"__";return e+=" / "+(null!=this.expYear?this.formatYear(this.expYear):"____")},enumerable:!1,configurable:!0}),e.prototype.formatYear=function(e){return 2===e.length?"20"+e:e},e}();t.CardView=r},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CryptoFunctionService=void 0;var r=function(){};t.CryptoFunctionService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValidationService=void 0;var r=n(0),i=(n(1),n(3),n(0)),o=n(1),a=n(3),s=function(){function e(e,t){this.i18nService=e,this.platformUtilsService=t}return e.prototype.showError=function(e){var t=this.i18nService.t("unexpectedError"),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},e.ɵfac=function(t){return new(t||e)(i.ɵɵinject(o.I18nService),i.ɵɵinject(a.PlatformUtilsService))},e.ɵprov=i.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.ValidationService=s,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(s,[{type:r.Injectable}],(function(){return[{type:o.I18nService},{type:a.PlatformUtilsService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteView=void 0;var r=function(){function e(e){this.type=null,e&&(this.type=e.type)}return Object.defineProperty(e.prototype,"subTitle",{get:function(){return null},enumerable:!1,configurable:!0}),e}();t.SecureNoteView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteType=void 0,function(e){e[e.Generic=0]="Generic"}(t.SecureNoteType||(t.SecureNoteType={}))},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenService=void 0;var r=function(){};t.TokenService=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?(e="http://"+e,t=!0):this.imageEnabled&&(t=0===e.indexOf("http")&&e.indexOf(".")>-1),this.imageEnabled&&t)try{this.image=this.iconsUrl+"/"+l.Utils.getHostname(e)+"/icon.png",this.fallbackImage="images/fa-globe.png"}catch(n){}}else this.image=null},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.EnvironmentService),c.ɵɵdirectiveInject(u.StateService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-vault-icon"]],inputs:{cipher:"cipher"},features:[c.ɵɵ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&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵtemplate(2,f,1,2,"img",1),c.ɵɵtext(3," "),c.ɵɵtemplate(4,h,1,3,"i",2),c.ɵɵtext(5," "),c.ɵɵelementEnd(),c.ɵɵtext(6," ")),2&e&&(c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.imageEnabled&&t.image),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.imageEnabled||!t.image))},directives:[d.NgIf,m.FallbackSrcDirective],encapsulation:2}),e}();t.IconComponent=y,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(y,[{type:o.Component,args:[{selector:"app-vault-icon",templateUrl:"icon.component.html"}]}],(function(){return[{type:p.EnvironmentService},{type:u.StateService}]}),{cipher:[{type:o.Input}]})},,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ExportService=void 0;var r=function(){};t.ExportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;var o=n(0),a=n(962),s=n(0),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.ɵfac=function(e){return c(e||t)},t.ɵprov=s.ɵɵdefineInjectable({token:t,factory:t.ɵfac}),t}(a.BroadcasterService);t.BroadcasterService=l;var c=s.ɵɵgetInheritedFactory(l);("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(l,[{type:o.Injectable}],null,null)},function(e,t,n){"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={}))},,,,,,,function(e,t,n){"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"}(t.PolicyType||(t.PolicyType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TotpService=void 0;var r=function(){};t.TotpService=r},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchPipe=void 0;var r=n(0),i=n(0),o=function(){function e(){}return e.prototype.transform=function(e,t,n,r,i){return null==e||0===e.length?[]:null==t||t.length<2?e:(t=t.trim().toLowerCase(),e.filter((function(e){return null!=n&&null!=e[n]&&e[n].toString().toLowerCase().indexOf(t)>-1||(null!=r&&null!=e[r]&&e[r].toString().toLowerCase().indexOf(t)>-1||null!=i&&null!=e[i]&&e[i].toString().toLowerCase().indexOf(t)>-1)})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=i.ɵɵdefinePipe({name:"search",type:e,pure:!0}),e}();t.SearchPipe=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Pipe,args:[{name:"search"}]}],null,null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1)try{window.document.body.removeChild(e)}catch(t){}}))}),500),this.hidePaypal||(window.document.head.removeChild(this.btScript),window.setTimeout((function(){Array.from(window.document.head.querySelectorAll("script")).forEach((function(e){if(null!=e.src&&e.src.indexOf("paypal")>-1)try{window.document.head.removeChild(e)}catch(t){}}));var e=window.document.head.querySelector("#braintree-dropin-stylesheet");if(null!=e)try{window.document.head.removeChild(e)}catch(t){}}),500))},e.prototype.changeMethod=function(){var e=this;this.btInstance=null,this.method===a.PaymentMethodType.PayPal?window.setTimeout((function(){window.braintree.dropin.create({authorization:s.WebConstants.btProductionKey,container:"#bt-dropin-container",paymentOptionPriority:["paypal"],paypal:{flow:"vault",buttonStyle:{label:"pay",size:"medium",shape:"pill",color:"blue"}}},(function(t,n){null==t?e.btInstance=n:console.error(t)}))}),250):this.setStripeElement()},e.prototype.createPaymentToken=function(){var e=this;return new Promise((function(t,n){e.method===a.PaymentMethodType.Credit?t([null,e.method]):e.method===a.PaymentMethodType.PayPal?e.btInstance.requestPaymentMethod().then((function(n){t([n.nonce,e.method])})).catch((function(e){n(e.message)})):e.method!==a.PaymentMethodType.Card&&e.method!==a.PaymentMethodType.BankAccount||(e.method===a.PaymentMethodType.Card?e.apiService.postSetupPayment().then((function(t){return e.stripe.handleCardSetup(t,e.stripeCardNumberElement)})).then((function(r){r.error?n(r.error.message):r.setupIntent&&"succeeded"===r.setupIntent.status?t([r.setupIntent.payment_method,e.method]):n()})):e.stripe.createToken("bank_account",e.bank).then((function(r){r.error?n(r.error.message):r.token&&null!=r.token.id?t([r.token.id,e.method]):n()})))}))},e.prototype.handleStripeCardPayment=function(e,t){var n=this;return new Promise((function(o,a){if(!n.showMethods||null!=n.stripeCardNumberElement){return(n.showMethods?n.stripe.handleCardSetup(e,n.stripeCardNumberElement):n.stripe.handleCardSetup(e)).then((function(e){return r(n,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return e.error?(a(e.error.message),[3,5]):[3,1];case 1:return e.paymentIntent&&"succeeded"===e.paymentIntent.status?null==t?[3,3]:[4,t()]:[3,4];case 2:n.sent(),n.label=3;case 3:return o(),[3,5];case 4:a(),n.label=5;case 5:return[2]}}))}))}))}a()}))},e.prototype.setStripeElement=function(){var e=this;window.setTimeout((function(){e.showMethods&&e.method===a.PaymentMethodType.Card&&(null==e.stripeCardNumberElement&&(e.stripeCardNumberElement=e.stripeElements.create("cardNumber",{style:E,classes:P,placeholder:""})),null==e.stripeCardExpiryElement&&(e.stripeCardExpiryElement=e.stripeElements.create("cardExpiry",{style:E,classes:P})),null==e.stripeCardCvcElement&&(e.stripeCardCvcElement=e.stripeElements.create("cardCvc",{style:E,classes:P,placeholder:""})),e.stripeCardNumberElement.mount("#stripe-card-number-element"),e.stripeCardExpiryElement.mount("#stripe-card-expiry-element"),e.stripeCardCvcElement.mount("#stripe-card-cvc-element"))}),50)},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.PlatformUtilsService),l.ɵɵdirectiveInject(p.ApiService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,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,"fa","fa-fw","fa-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,"fa","fa-fw","fa-university"],[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,"fa","fa-fw","fa-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,"fa","fa-fw","fa-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,"fa","fa-question-circle-o"],["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&&(l.ɵɵtemplate(0,b,19,8,"div",0),l.ɵɵtext(1," "),l.ɵɵtemplate(2,S,46,12,"ng-container",1),l.ɵɵtext(3," "),l.ɵɵtemplate(4,w,60,34,"ng-container",1),l.ɵɵtext(5," "),l.ɵɵtemplate(6,C,11,3,"ng-container",1),l.ɵɵtext(7," "),l.ɵɵtemplate(8,I,6,3,"ng-container",1),l.ɵɵtext(9," ")),2&e&&(l.ɵɵproperty("ngIf",t.showOptions&&t.showMethods),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Card),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.BankAccount),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.PayPal),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.showMethods&&t.method===t.paymentMethodType.Credit))},directives:[u.NgIf,d.RadioControlValueAccessor,d.DefaultValueAccessor,d.NgControlStatus,d.NgModel,m.A11yTitleDirective,f.CalloutComponent,d.RequiredValidator,h.InputVerbatimDirective,d.SelectControlValueAccessor,d.NgSelectOption,d.ɵangular_packages_forms_forms_z],pipes:[v.I18nPipe],encapsulation:2}),e}();t.PaymentComponent=k,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(k,[{type:o.Component,args:[{selector:"app-payment",templateUrl:"payment.component.html"}]}],(function(){return[{type:c.PlatformUtilsService},{type:p.ApiService}]}),{showMethods:[{type:o.Input}],showOptions:[{type:o.Input}],method:[{type:o.Input}],hideBank:[{type:o.Input}],hidePaypal:[{type:o.Input}],hideCredit:[{type:o.Input}]})},function(e,t,n){"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"}(t.FieldType||(t.FieldType={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendService=void 0;var r=function(){};t.SendService=r},,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherView=void 0;var r=n(164),i=n(35),o=n(80),a=n(141),s=n(142),l=n(88),c=function(){function e(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=r.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:r.CipherRepromptType.None)}return Object.defineProperty(e.prototype,"subTitle",{get:function(){switch(this.type){case i.CipherType.Login:return this.login.subTitle;case i.CipherType.SecureNote:return this.secureNote.subTitle;case i.CipherType.Card:return this.card.subTitle;case i.CipherType.Identity:return this.identity.subTitle}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasPasswordHistory",{get:function(){return this.passwordHistory&&this.passwordHistory.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasAttachments",{get:function(){return this.attachments&&this.attachments.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasOldAttachments",{get:function(){if(this.hasAttachments)for(var e=0;e0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"passwordRevisionDisplayDate",{get:function(){return this.type!==i.CipherType.Login||null==this.login||null==this.login.password||""===this.login.password?null:this.login.passwordRevisionDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDeleted",{get:function(){return null!=this.deletedDate},enumerable:!1,configurable:!0}),e}();t.CipherView=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FolderView=void 0;var r=function(e){this.id=null,this.name=null,this.revisionDate=null,e&&(this.id=e.id,this.revisionDate=e.revisionDate)};t.FolderView=r},,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"+n+"";var r=this.makeAnchor(n);return r.setAttribute("href","#/organizations/"+e.organizationId+"/vault?search="+n+"&viewEvents="+e.cipherId),r.outerHTML},e.prototype.formatGroupId=function(e){var t=this.getShortId(e.groupId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/groups?search="+t),n.outerHTML},e.prototype.formatCollectionId=function(e){var t=this.getShortId(e.collectionId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/collections?search="+t),n.outerHTML},e.prototype.formatOrgUserId=function(e){var 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},e.prototype.formatProviderUserId=function(e){var 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},e.prototype.formatProviderOrganizationId=function(e){var t=this.getShortId(e.providerOrganizationId),n=this.makeAnchor(t);return n.setAttribute("href","#/providers/"+e.providerId+"/clients?search="+t),n.outerHTML},e.prototype.formatPolicyId=function(e){var t=this.getShortId(e.policyId),n=this.makeAnchor(t);return n.setAttribute("href","#/organizations/"+e.organizationId+"/manage/policies?policyId="+e.policyId),n.outerHTML},e.prototype.makeAnchor=function(e){var t=document.createElement("a");return t.title=this.i18nService.t("view"),t.innerHTML=""+e+"",t},e.prototype.getShortId=function(e){return null==e?void 0:e.substring(0,8)},e.prototype.toDateTimeLocalString=function(e){return e.getFullYear()+"-"+this.pad(e.getMonth()+1)+"-"+this.pad(e.getDate())+"T"+this.pad(e.getHours())+":"+this.pad(e.getMinutes())},e.prototype.pad=function(e){var t=Math.floor(Math.abs(e));return(t<10?"0":"")+t},e.ɵfac=function(t){return new(t||e)(c.ɵɵinject(p.I18nService),c.ɵɵinject(u.PolicyService))},e.ɵprov=c.ɵɵdefineInjectable({token:e,factory:e.ɵfac}),e}();t.EventService=d,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(d,[{type:o.Injectable}],(function(){return[{type:p.I18nService},{type:u.PolicyService}]}),null);var m=function(){};t.EventInfo=m;var f=function(){this.cipherInfo=!0};t.EventOptions=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var o=n(154),a=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{id:null,organizationId:null,name:null,externalId:null,readOnly:null,hidePasswords:null},n,["id","organizationId","externalId","readOnly","hidePasswords"]),r}return i(t,e),t.prototype.decrypt=function(){return this.decryptObj(new o.CollectionView(this),{name:null},this.organizationId)},t}(n(68).default);t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityView=void 0;var r=n(23),i=function(){function e(e){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}return Object.defineProperty(e.prototype,"firstName",{get:function(){return this._firstName},set:function(e){this._firstName=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastName",{get:function(){return this._lastName},set:function(e){this._lastName=e,this._subTitle=null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){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},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullName",{get:function(){if(null!=this.title||null!=this.firstName||null!=this.middleName||null!=this.lastName){var 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},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullAddress",{get:function(){var e=this.address1;return r.Utils.isNullOrWhitespace(this.address2)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address2),r.Utils.isNullOrWhitespace(this.address3)||(r.Utils.isNullOrWhitespace(e)||(e+=", "),e+=this.address3),e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fullAddressPart2",{get:function(){if(null==this.city&&null==this.state&&null==this.postalCode)return null;var e=this.city||"-",t=this.state,n=this.postalCode||"-",i=e;return r.Utils.isNullOrWhitespace(t)||(i+=", "+t),i+=", "+n},enumerable:!1,configurable:!0}),e}();t.IdentityView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginView=void 0;var r=n(23),i=function(){function e(e){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)}return Object.defineProperty(e.prototype,"uri",{get:function(){return this.hasUris?this.uris[0].uri:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maskedPassword",{get:function(){return null!=this.password?"••••••••":null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subTitle",{get:function(){return this.username},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canLaunch",{get:function(){return this.hasUris&&this.uris.some((function(e){return e.canLaunch}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasTotp",{get:function(){return!r.Utils.isNullOrWhitespace(this.totp)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"launchUri",{get:function(){if(this.hasUris){var e=this.uris.find((function(e){return e.canLaunch}));if(null!=e)return e.launchUri}return null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasUris",{get:function(){return null!=this.uris&&this.uris.length>0},enumerable:!1,configurable:!0}),e}();t.LoginView=i},,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionData=void 0;var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.name=e.name,this.externalId=e.externalId,this.readOnly=e.readOnly};t.CollectionData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionView=void 0;var r=n(140),i=function(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 r.Collection&&(this.readOnly=e.readOnly,this.hidePasswords=e.hidePasswords))};t.CollectionView=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherData=void 0;var r=n(35),i=n(372),o=n(373),a=n(374),s=n(375),l=n(376),c=n(555),p=n(378),u=function(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 r.CipherType.Login:this.login=new l.LoginData(e.login);break;case r.CipherType.SecureNote:this.secureNote=new p.SecureNoteData(e.secureNote);break;case r.CipherType.Card:this.card=new o.CardData(e.card);break;case r.CipherType.Identity:this.identity=new s.IdentityData(e.identity)}null!=e.fields&&(this.fields=e.fields.map((function(e){return new a.FieldData(e)}))),null!=e.attachments&&(this.attachments=e.attachments.map((function(e){return new i.AttachmentData(e)}))),null!=e.passwordHistory&&(this.passwordHistory=e.passwordHistory.map((function(e){return new c.PasswordHistoryData(e)})))}};t.CipherData=u},function(e,t,n){"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={}))},,,,,,,,function(e,t,n){"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={}))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PermissionsApi=void 0;var o=function(e){function t(t){void 0===t&&(t=null);var n=e.call(this,t)||this;return null==t||(n.accessBusinessPortal=n.getResponseProperty("AccessBusinessPortal"),n.accessEventLogs=n.getResponseProperty("AccessEventLogs"),n.accessImportExport=n.getResponseProperty("AccessImportExport"),n.accessReports=n.getResponseProperty("AccessReports"),n.manageAllCollections=n.getResponseProperty("ManageAllCollections"),n.manageAssignedCollections=n.getResponseProperty("ManageAssignedCollections"),n.manageCiphers=n.getResponseProperty("ManageCiphers"),n.manageGroups=n.getResponseProperty("ManageGroups"),n.manageSso=n.getResponseProperty("ManageSso"),n.managePolicies=n.getResponseProperty("ManagePolicies"),n.manageUsers=n.getResponseProperty("ManageUsers"),n.manageResetPassword=n.getResponseProperty("ManageResetPassword")),n}return i(t,e),t}(n(20).BaseResponse);t.PermissionsApi=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordStrengthComponent=void 0;var r=n(0),i=(n(1),n(0)),o=n(1),a=n(2);function s(e,t){if(1&e&&(i.ɵɵelementContainerStart(0),i.ɵɵtext(1),i.ɵɵelementContainerEnd()),2&e){var n=i.ɵɵnextContext();i.ɵɵadvance(1),i.ɵɵtextInterpolate1(" ",n.text," ")}}var l=function(e){return{width:e}},c=function(){function e(e){this.i18nService=e,this.showText=!1,this.scoreWidth=0,this.color="bg-danger"}return e.prototype.ngOnChanges=function(){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}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(o.I18nService))},e.ɵcmp=i.ɵɵdefineComponent({type:e,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," "),i.ɵɵelementStart(2,"div",1),i.ɵɵtext(3," "),i.ɵɵtemplate(4,s,2,1,"ng-container",2),i.ɵɵtext(5," "),i.ɵɵelementEnd(),i.ɵɵtext(6," "),i.ɵɵelementEnd(),i.ɵɵtext(7," ")),2&e&&(i.ɵɵadvance(2),i.ɵɵclassMapInterpolate1("progress-bar ",t.color,""),i.ɵɵproperty("ngStyle",i.ɵɵpureFunction1(6,l,t.scoreWidth+"%")),i.ɵɵattribute("aria-valuenow",t.scoreWidth),i.ɵɵadvance(2),i.ɵɵproperty("ngIf",t.showText&&t.text))},directives:[a.NgStyle,a.NgIf],encapsulation:2}),e}();t.PasswordStrengthComponent=c,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(c,[{type:r.Component,args:[{selector:"app-password-strength",templateUrl:"password-strength.component.html"}]}],(function(){return[{type:o.I18nService}]}),{score:[{type:r.Input}],showText:[{type:r.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?(p=[],[4,this.attachments.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){p.push(e)}))}),Promise.resolve())]):[3,13];case 12:a.sent(),t.attachments=p,a.label=13;case 13:return null!=this.fields&&this.fields.length>0?(u=[],[4,this.fields.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){u.push(e)}))}),Promise.resolve())]):[3,15];case 14:a.sent(),t.fields=u,a.label=15;case 15:return null!=this.passwordHistory&&this.passwordHistory.length>0?(d=[],[4,this.passwordHistory.reduce((function(t,n){return t.then((function(){return n.decrypt(l,e)})).then((function(e){d.push(e)}))}),Promise.resolve())]):[3,17];case 16:a.sent(),t.passwordHistory=d,a.label=17;case 17:return[2,t]}}))}))},t.prototype.toCipherData=function(e){var t=new l.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 s.CipherType.Login:t.login=this.login.toLoginData();break;case s.CipherType.SecureNote:t.secureNote=this.secureNote.toSecureNoteData();break;case s.CipherType.Card:t.card=this.card.toCardData();break;case s.CipherType.Identity:t.identity=this.identity.toIdentityData()}return null!=this.fields&&(t.fields=this.fields.map((function(e){return e.toFieldData()}))),null!=this.attachments&&(t.attachments=this.attachments.map((function(e){return e.toAttachmentData()}))),null!=this.passwordHistory&&(t.passwordHistory=this.passwordHistory.map((function(e){return e.toPasswordHistoryData()}))),t},t}(d.default);t.Cipher=g},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordRepromptService=void 0;var r=function(){};t.PasswordRepromptService=r},,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1)}}function w(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",31),a.ɵɵtext(1," "),a.ɵɵelement(2,"app-avatar",32),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"div",33),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"small",34),a.ɵɵtext(11),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("data",n.name)("email",n.email)("circle",!0),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,5,"loggedInAs")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(n.name)}}var C=function(e){return{"bg-secondary-alt":e}},I=function(){function e(e,t,n,r,i){this.messagingService=e,this.platformUtilsService=t,this.tokenService=n,this.userService=r,this.syncService=i,this.selfHosted=!1,this.providers=[],this.selfHosted=this.platformUtilsService.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return e=this,[4,this.tokenService.getName()];case 1:return e.name=r.sent(),t=this,[4,this.tokenService.getEmail()];case 2:return t.email=r.sent(),null!=this.name&&""!==this.name.trim()||(this.name=this.email),[4,this.syncService.getLastSync()];case 3:return null!=r.sent()?[3,5]:[4,this.syncService.fullSync(!1)];case 4:r.sent(),r.label=5;case 5:return n=this,[4,this.userService.getAllProviders()];case 6:return n.providers=r.sent(),[2]}}))}))},e.prototype.lock=function(){this.messagingService.send("lockVault")},e.prototype.logOut=function(){this.messagingService.send("logout")},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.MessagingService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.TokenService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.SyncService))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-navbar"]],decls:98,vars:36,consts:[[1,"navbar","navbar-expand","navbar-dark","bg-primary",3,"ngClass"],[1,"container"],["routerLink","/",1,"navbar-brand",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-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,"fa","fa-user-circle","fa-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,"fa","fa-fw","fa-user"],["href","https://help.bitwarden.com","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-question-circle"],["href","https://bitwarden.com/download/","target","_blank","rel","noopener",1,"dropdown-item"],["aria-hidden","true",1,"fa","fa-fw","fa-download"],["type","button",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-lock"],["aria-hidden","true",1,"fa","fa-fw","fa-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&&(a.ɵɵelementStart(0,"nav",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"a",2),a.ɵɵpipe(5,"i18n"),a.ɵɵtext(6," "),a.ɵɵelement(7,"i",3),a.ɵɵtext(8," "),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"div",4),a.ɵɵtext(11," "),a.ɵɵelementStart(12,"ul",5),a.ɵɵtext(13," "),a.ɵɵelementStart(14,"li",6),a.ɵɵtext(15," "),a.ɵɵelementStart(16,"a",7),a.ɵɵtext(17),a.ɵɵpipe(18,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(19," "),a.ɵɵelementEnd(),a.ɵɵtext(20," "),a.ɵɵelementStart(21,"li",6),a.ɵɵtext(22," "),a.ɵɵelementStart(23,"a",8),a.ɵɵtext(24),a.ɵɵpipe(25,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(26," "),a.ɵɵelementEnd(),a.ɵɵtext(27," "),a.ɵɵtemplate(28,S,6,2,"ng-container",9),a.ɵɵtext(29," "),a.ɵɵelementStart(30,"li",6),a.ɵɵtext(31," "),a.ɵɵelementStart(32,"a",10),a.ɵɵtext(33),a.ɵɵpipe(34,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(35," "),a.ɵɵelementEnd(),a.ɵɵtext(36," "),a.ɵɵelementStart(37,"li",6),a.ɵɵtext(38," "),a.ɵɵelementStart(39,"a",11),a.ɵɵtext(40),a.ɵɵpipe(41,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(42," "),a.ɵɵelementEnd(),a.ɵɵtext(43," "),a.ɵɵelementEnd(),a.ɵɵtext(44," "),a.ɵɵelementEnd(),a.ɵɵtext(45," "),a.ɵɵelementStart(46,"ul",12),a.ɵɵtext(47," "),a.ɵɵelementStart(48,"li",13),a.ɵɵtext(49," "),a.ɵɵelementStart(50,"a",14),a.ɵɵtext(51," "),a.ɵɵelement(52,"i",15),a.ɵɵtext(53," "),a.ɵɵelementEnd(),a.ɵɵtext(54," "),a.ɵɵelementStart(55,"div",16),a.ɵɵtext(56," "),a.ɵɵtemplate(57,w,14,7,"div",17),a.ɵɵtext(58," "),a.ɵɵelement(59,"div",18),a.ɵɵtext(60," "),a.ɵɵelementStart(61,"a",19),a.ɵɵtext(62," "),a.ɵɵelement(63,"i",20),a.ɵɵtext(64),a.ɵɵpipe(65,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(66," "),a.ɵɵelementStart(67,"a",21),a.ɵɵtext(68," "),a.ɵɵelement(69,"i",22),a.ɵɵtext(70),a.ɵɵpipe(71,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(72," "),a.ɵɵelementStart(73,"a",23),a.ɵɵtext(74," "),a.ɵɵelement(75,"i",24),a.ɵɵtext(76),a.ɵɵpipe(77,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(78," "),a.ɵɵelement(79,"div",18),a.ɵɵtext(80," "),a.ɵɵelementStart(81,"button",25),a.ɵɵlistener("click",(function(){return t.lock()})),a.ɵɵtext(82," "),a.ɵɵelement(83,"i",26),a.ɵɵtext(84),a.ɵɵpipe(85,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(86," "),a.ɵɵelementStart(87,"button",25),a.ɵɵlistener("click",(function(){return t.logOut()})),a.ɵɵtext(88," "),a.ɵɵelement(89,"i",27),a.ɵɵtext(90),a.ɵɵpipe(91,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(92," "),a.ɵɵelementEnd(),a.ɵɵtext(93," "),a.ɵɵelementEnd(),a.ɵɵtext(94," "),a.ɵɵelementEnd(),a.ɵɵtext(95," "),a.ɵɵelementEnd(),a.ɵɵtext(96," "),a.ɵɵelementEnd(),a.ɵɵtext(97," ")),2&e&&(a.ɵɵproperty("ngClass",a.ɵɵpureFunction1(34,C,t.selfHosted)),a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind2(5,13,"pageTitle","Bitwarden")),a.ɵɵadvance(13),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(18,16,"myVault")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(25,18,"send")),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",t.providers.length>=1),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(34,20,"tools")),a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(41,22,"settings")),a.ɵɵadvance(17),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(7),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(65,24,"myAccount")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(71,26,"getHelp")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(77,28,"getApps")," "),a.ɵɵadvance(8),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(85,30,"lockNow")," "),a.ɵɵadvance(6),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(91,32,"logOut")," "))},directives:[d.NgClass,m.RouterLinkWithHref,f.A11yTitleDirective,m.RouterLinkActive,d.NgIf,h.StopPropDirective,v.AvatarComponent],pipes:[y.I18nPipe],encapsulation:2}),e}();t.NavbarComponent=I,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(I,[{type:o.Component,args:[{selector:"app-navbar",templateUrl:"navbar.component.html"}]}],(function(){return[{type:s.MessagingService},{type:l.PlatformUtilsService},{type:c.TokenService},{type:p.UserService},{type:u.SyncService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&t.indexOf("]")>-1){var i=t.lastIndexOf(".");r=t.substr(0,i>-1?i:t.length)+": "}e.push(r+n)}))},n=this;for(var r in this.validationErrors)t(r);return e},t}(n(20).BaseResponse);t.ErrorResponse=a},function(e,t,n){"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.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.Organization_Updated=1600]="Organization_Updated",e[e.Organization_PurgedVault=1601]="Organization_PurgedVault",e[e.Organization_VaultAccessed=1603]="Organization_VaultAccessed",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={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VaultTimeoutService=t.UserService=t.TotpService=t.TokenService=t.SyncService=t.StateService=t.StorageService=t.SettingsService=t.SearchService=t.PlatformUtilsService=t.PasswordGenerationService=t.MessagingService=t.LogService=t.I18nService=t.FolderService=t.EnvironmentService=t.CryptoService=t.CollectionService=t.CipherService=t.AuthService=t.AuditService=t.AppIdService=t.ApiService=void 0;var r=n(4);Object.defineProperty(t,"ApiService",{enumerable:!0,get:function(){return r.ApiService}});var i=n(954);Object.defineProperty(t,"AppIdService",{enumerable:!0,get:function(){return i.AppIdService}});var o=n(78);Object.defineProperty(t,"AuditService",{enumerable:!0,get:function(){return o.AuditService}});var a=n(50);Object.defineProperty(t,"AuthService",{enumerable:!0,get:function(){return a.AuthService}});var s=n(19);Object.defineProperty(t,"CipherService",{enumerable:!0,get:function(){return s.CipherService}});var l=n(37);Object.defineProperty(t,"CollectionService",{enumerable:!0,get:function(){return l.CollectionService}});var c=n(14);Object.defineProperty(t,"CryptoService",{enumerable:!0,get:function(){return c.CryptoService}});var p=n(36);Object.defineProperty(t,"EnvironmentService",{enumerable:!0,get:function(){return p.EnvironmentService}});var u=n(51);Object.defineProperty(t,"FolderService",{enumerable:!0,get:function(){return u.FolderService}});var d=n(1);Object.defineProperty(t,"I18nService",{enumerable:!0,get:function(){return d.I18nService}});var m=n(70);Object.defineProperty(t,"LogService",{enumerable:!0,get:function(){return m.LogService}});var f=n(15);Object.defineProperty(t,"MessagingService",{enumerable:!0,get:function(){return f.MessagingService}});var h=n(26);Object.defineProperty(t,"PasswordGenerationService",{enumerable:!0,get:function(){return h.PasswordGenerationService}});var v=n(3);Object.defineProperty(t,"PlatformUtilsService",{enumerable:!0,get:function(){return v.PlatformUtilsService}});var y=n(54);Object.defineProperty(t,"SearchService",{enumerable:!0,get:function(){return y.SearchService}});var g=n(267);Object.defineProperty(t,"SettingsService",{enumerable:!0,get:function(){return g.SettingsService}});var x=n(33);Object.defineProperty(t,"StorageService",{enumerable:!0,get:function(){return x.StorageService}});var b=n(29);Object.defineProperty(t,"StateService",{enumerable:!0,get:function(){return b.StateService}});var S=n(41);Object.defineProperty(t,"SyncService",{enumerable:!0,get:function(){return S.SyncService}});var w=n(94);Object.defineProperty(t,"TokenService",{enumerable:!0,get:function(){return w.TokenService}});var C=n(110);Object.defineProperty(t,"TotpService",{enumerable:!0,get:function(){return C.TotpService}});var I=n(5);Object.defineProperty(t,"UserService",{enumerable:!0,get:function(){return I.UserService}});var E=n(77);Object.defineProperty(t,"VaultTimeoutService",{enumerable:!0,get:function(){return E.VaultTimeoutService}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldView=void 0;var r=function(){function e(e){this.name=null,this.value=null,this.type=null,this.newField=!1,this.showValue=!1,e&&(this.type=e.type)}return Object.defineProperty(e.prototype,"maskedValue",{get:function(){return null!=this.value?"••••••••":null},enumerable:!1,configurable:!0}),e}();t.FieldView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherRequest=void 0;var r=n(35),i=n(473),o=n(474),a=n(475),s=n(476),l=n(477),c=n(478),p=n(1008),u=function(e){var t=this;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 r.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((function(e){var 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 r.CipherType.SecureNote:this.secureNote=new c.SecureNoteApi,this.secureNote.type=e.secureNote.type;break;case r.CipherType.Card:this.card=new i.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 r.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((function(e){var 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}))),null!=e.passwordHistory&&(this.passwordHistory=[],e.passwordHistory.forEach((function(e){t.passwordHistory.push({lastUsedDate:e.lastUsedDate,password:e.password?e.password.encryptedString:null})}))),null!=e.attachments&&(this.attachments={},this.attachments2={},e.attachments.forEach((function(e){var n=e.fileName?e.fileName.encryptedString:null;t.attachments[e.id]=n;var r=new p.AttachmentRequest;r.fileName=n,null!=e.key&&(r.key=e.key.encryptedString),t.attachments2[e.id]=r})))};t.CipherRequest=u},,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]4?(t=Math.floor(this.totpCode.length/2),this.totpCodeFormatted=this.totpCode.substring(0,t)+" "+this.totpCode.substring(t)):this.totpCodeFormatted=this.totpCode:(this.totpCodeFormatted=null,this.totpInterval&&window.clearInterval(this.totpInterval)),[2]}}))}))},t.prototype.allowOwnershipAssignment=function(){return(!this.editMode||this.cloneMode)&&null!=this.ownershipOptions&&(this.ownershipOptions.length>1||!this.allowPersonal)},t.prototype.totpTick=function(e){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return t=Math.round((new Date).getTime()/1e3),n=t%e,this.totpSec=e-n,this.totpDash=+(Math.round(78.6/e*n+"e+2")+"e-2"),this.totpLow=this.totpSec<=7,0!==n?[3,2]:[4,this.totpUpdateCode()];case 1:r.sent(),r.label=2;case 2:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CipherService),u.ɵɵdirectiveInject(m.FolderService),u.ɵɵdirectiveInject(f.I18nService),u.ɵɵdirectiveInject(h.PlatformUtilsService),u.ɵɵdirectiveInject(v.AuditService),u.ɵɵdirectiveInject(y.StateService),u.ɵɵdirectiveInject(g.UserService),u.ɵɵdirectiveInject(x.CollectionService),u.ɵɵdirectiveInject(b.TotpService),u.ɵɵdirectiveInject(S.PasswordGenerationService),u.ɵɵdirectiveInject(w.MessagingService),u.ɵɵdirectiveInject(C.EventService),u.ɵɵdirectiveInject(I.PolicyService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-vault-add-edit"]],features:[u.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","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"],[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],[1,"form-check"],["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/article/managing-items/#protect-individual-items",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["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,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-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 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png",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,"fa","fa-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,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],[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,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-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","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","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"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],["href","https://help.bitwarden.com/article/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],["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-muted cursor-move",3,"appA11yTitle",4,"ngIf"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-bars","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],["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","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1," "),u.ɵɵelementStart(2,"div",1),u.ɵɵtext(3," "),u.ɵɵelementStart(4,"form",2,3),u.ɵɵlistener("ngSubmit",(function(){return t.submit()})),u.ɵɵtext(6," "),u.ɵɵelementStart(7,"div",4),u.ɵɵtext(8," "),u.ɵɵelementStart(9,"h2",5),u.ɵɵtext(10),u.ɵɵelementEnd(),u.ɵɵtext(11," "),u.ɵɵelementStart(12,"button",6),u.ɵɵpipe(13,"i18n"),u.ɵɵtext(14," "),u.ɵɵelementStart(15,"span",7),u.ɵɵtext(16,"×"),u.ɵɵelementEnd(),u.ɵɵtext(17," "),u.ɵɵelementEnd(),u.ɵɵtext(18," "),u.ɵɵelementEnd(),u.ɵɵtext(19," "),u.ɵɵtemplate(20,Ae,73,36,"div",8),u.ɵɵtext(21," "),u.ɵɵelementStart(22,"div",9),u.ɵɵtext(23," "),u.ɵɵtemplate(24,_e,9,7,"button",10),u.ɵɵtext(25," "),u.ɵɵelementStart(26,"button",11),u.ɵɵtext(27),u.ɵɵpipe(28,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(29," "),u.ɵɵtemplate(30,Re,6,2,"div",12),u.ɵɵtext(31," "),u.ɵɵelementEnd(),u.ɵɵtext(32," "),u.ɵɵelementEnd(),u.ɵɵtext(33," "),u.ɵɵelementEnd(),u.ɵɵtext(34," "),u.ɵɵelementEnd(),u.ɵɵtext(35," ")),2&e&&(u.ɵɵadvance(4),u.ɵɵproperty("appApiAction",t.formPromise),u.ɵɵadvance(6),u.ɵɵtextInterpolate(t.title),u.ɵɵadvance(2),u.ɵɵpropertyInterpolate("appA11yTitle",u.ɵɵpipeBind1(13,7,"close")),u.ɵɵadvance(8),u.ɵɵproperty("ngIf",t.cipher),u.ɵɵadvance(4),u.ɵɵproperty("ngIf",!t.viewOnly),u.ɵɵadvance(3),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel")," "),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[E.NgControlStatusGroup,E.NgForm,P.ApiActionDirective,k.A11yTitleDirective,O.NgIf,E.DefaultValueAccessor,E.RequiredValidator,E.NgControlStatus,E.NgModel,E.CheckboxControlValueAccessor,A.CalloutComponent,E.SelectControlValueAccessor,_.AutofocusDirective,O.NgForOf,E.NgSelectOption,E.ɵangular_packages_forms_forms_z,M.InputVerbatimDirective,O.NgClass,T.StopClickDirective,O.NgStyle,D.CdkDropList,D.CdkDrag,R.TrueFalseValueDirective],pipes:[B.I18nPipe,O.DatePipe],encapsulation:2}),t}(p.AddEditComponent);t.AddEditComponent=Be,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(Be,[{type:s.Component,args:[{selector:"app-vault-add-edit",templateUrl:"add-edit.component.html"}]}],(function(){return[{type:d.CipherService},{type:m.FolderService},{type:f.I18nService},{type:h.PlatformUtilsService},{type:v.AuditService},{type:y.StateService},{type:g.UserService},{type:x.CollectionService},{type:b.TotpService},{type:S.PasswordGenerationService},{type:w.MessagingService},{type:C.EventService},{type:I.PolicyService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportService=void 0;var r=function(){};t.ImportService=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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}},t.prototype.refresh=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){switch(e.label){case 0:return e.trys.push([0,,2,3]),this.refreshing=!0,[4,this.reload(this.filter,this.deleted)];case 1:return e.sent(),[3,3];case 2:return this.refreshing=!1,[7];case 3:return[2]}}))}))},t.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.ciphers.length>this.pageSize},t.prototype.resetPaging=function(){return o(this,void 0,void 0,(function(){return a(this,(function(e){return this.pagedCiphers=[],this.loadMore(),[2]}))}))},t.prototype.doSearch=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return t=this,[4,this.searchService.searchCiphers(this.searchText,[this.filter,this.deletedFilter],e)];case 1:return t.ciphers=n.sent(),this.resetPaging(),[2]}}))}))},t.prototype.launch=function(e){this.platformUtilsService.launchUri(e)},t.prototype.attachments=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onAttachmentsClicked.emit(e),[2]):[2]}}))}))},t.prototype.share=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onShareClicked.emit(e),[2]):[2]}}))}))},t.prototype.collections=function(e){this.onCollectionsClicked.emit(e)},t.prototype.clone=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.repromptCipher(e)];case 1:return t.sent()?(this.onCloneClicked.emit(e),[2]):[2]}}))}))},t.prototype.delete=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.repromptCipher(e)];case 1:return n.sent()?null!=this.actionPromise?[2]:(t=e.isDeleted,[4,this.platformUtilsService.showDialog(this.i18nService.t(t?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t(t?"permanentlyDeleteItem":"deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]):[2];case 2:if(!n.sent())return[2,!1];n.label=3;case 3:return n.trys.push([3,5,,6]),this.actionPromise=this.deleteCipher(e.id,t),[4,this.actionPromise];case 4:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(t?"permanentlyDeletedItem":"deletedItem")),this.refresh(),[3,6];case 5:return n.sent(),[3,6];case 6:return this.actionPromise=null,[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.actionPromise&&e.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),this.actionPromise=this.cipherService.restoreWithServer(e.id),[4,this.actionPromise];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("restoredItem")),this.refresh(),[3,5];case 4:return t.sent(),[3,5];case 5:return this.actionPromise=null,[2]}}))}))},t.prototype.copy=function(e,t,n,r){return o(this,void 0,void 0,(function(){var i;return a(this,(function(o){switch(o.label){case 0:return(i=this.passwordRepromptService.protectedFields().includes(r))?[4,this.repromptCipher(e)]:[3,2];case 1:i=!o.sent(),o.label=2;case 2:return i||(null==t||"TOTP"===r&&!this.displayTotpCopyButton(e))?[2]:[3,3];case 3:return t!==e.login.totp?[3,5]:[4,this.totpService.getCode(t)];case 4:t=o.sent(),o.label=5;case 5:return e.viewPassword?(this.platformUtilsService.copyToClipboard(t,{window:window}),this.toasterService.popAsync("info",null,this.i18nService.t("valueCopied",this.i18nService.t(n))),"password"===n||"verificationCodeTotp"===n?this.eventService.collect(u.EventType.Cipher_ClientToggledHiddenFieldVisible,e.id):"securityCode"===n&&this.eventService.collect(u.EventType.Cipher_ClientCopiedCardCode,e.id),[2]):[2]}}))}))},t.prototype.selectAll=function(e){e&&this.selectAll(!1);for(var t=e&&this.ciphers.length>500?500:this.ciphers.length,n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.events=this.events.concat(a):this.events=a,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.ApiService),a.ɵɵdirectiveInject(l.I18nService),a.ɵɵdirectiveInject(c.EventService),a.ɵɵdirectiveInject(p.ToasterService),a.ɵɵdirectiveInject(u.UserNamePipe))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-entity-events"]],inputs:{name:"name",entity:"entity",entityId:"entityId",organizationId:"organizationId",providerId:"providerId",showUser:"showUser"},decls:36,vars:12,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-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,"fa","fa-refresh","fa-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,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",1),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"div",2),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"div",3),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"h2",4),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵtemplate(11,y,2,1,"small",5),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementStart(14,"button",6),a.ɵɵpipe(15,"i18n"),a.ɵɵtext(16," "),a.ɵɵelementStart(17,"span",7),a.ɵɵtext(18,"×"),a.ɵɵelementEnd(),a.ɵɵtext(19," "),a.ɵɵelementEnd(),a.ɵɵtext(20," "),a.ɵɵelementEnd(),a.ɵɵtext(21," "),a.ɵɵtemplate(22,g,9,6,"div",8),a.ɵɵtext(23," "),a.ɵɵtemplate(24,P,40,25,"div",8),a.ɵɵtext(25," "),a.ɵɵelementStart(26,"div",9),a.ɵɵtext(27," "),a.ɵɵelementStart(28,"button",10),a.ɵɵtext(29),a.ɵɵpipe(30,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(31," "),a.ɵɵelementEnd(),a.ɵɵtext(32," "),a.ɵɵelementEnd(),a.ɵɵtext(33," "),a.ɵɵelementEnd(),a.ɵɵtext(34," "),a.ɵɵelementEnd(),a.ɵɵtext(35," ")),2&e&&(a.ɵɵadvance(9),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(10,6,"eventLogs")," "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.name),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(15,8,"close")),a.ɵɵadvance(8),a.ɵɵproperty("ngIf",!t.loaded),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.loaded),a.ɵɵadvance(5),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(30,10,"close")))},directives:[d.NgIf,m.A11yTitleDirective,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,h.ApiActionDirective,d.NgClass,d.NgForOf],pipes:[v.I18nPipe,d.DatePipe],encapsulation:2}),e}();t.EntityEventsComponent=k,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(k,[{type:o.Component,args:[{selector:"app-entity-events",templateUrl:"entity-events.component.html"}]}],(function(){return[{type:s.ApiService},{type:l.I18nService},{type:c.EventService},{type:p.ToasterService},{type:u.UserNamePipe}]}),{name:[{type:o.Input}],entity:[{type:o.Input}],entityId:[{type:o.Input}],organizationId:[{type:o.Input}],providerId:[{type:o.Input}],showUser:[{type:o.Input}]})},function(e,t,n){"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={}))},function(e,t,n){"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={}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PolicyData=void 0;var r=function(e){this.id=e.id,this.organizationId=e.organizationId,this.type=e.type,this.data=e.data,this.enabled=e.enabled};t.PolicyData=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(e=e.concat(this.email.substr(0,t).trim().toLowerCase().split(/[^A-Za-z0-9]/))),e},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.I18nService),a.ɵɵdirectiveInject(l.CryptoService),a.ɵɵdirectiveInject(c.MessagingService),a.ɵɵdirectiveInject(p.UserService),a.ɵɵdirectiveInject(u.PasswordGenerationService),a.ɵɵdirectiveInject(d.PlatformUtilsService),a.ɵɵdirectiveInject(m.PolicyService))},e.ɵdir=a.ɵɵdefineDirective({type:e}),e}();t.ChangePasswordComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:s.I18nService},{type:l.CryptoService},{type:c.MessagingService},{type:p.UserService},{type:u.PasswordGenerationService},{type:d.PlatformUtilsService},{type:m.PolicyService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},o=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]r){if(o===s.TwoFactorProviderType.WebAuthn&&!e)return;n=o,r=a.priority}})),n},e.prototype.makePreloginKey=function(e,t){return i(this,void 0,void 0,(function(){var n,r,i,a;return o(this,(function(o){switch(o.label){case 0:t=t.trim().toLowerCase(),n=null,r=null,o.label=1;case 1:return o.trys.push([1,3,,4]),[4,this.apiService.postPrelogin(new u.PreloginRequest(t))];case 2:return null!=(i=o.sent())&&(n=i.kdf,r=i.kdfIterations),[3,4];case 3:if(null==(a=o.sent())||404!==a.statusCode)throw a;return[3,4];case 4:return[2,this.cryptoService.makeKey(e,t,n,r)]}}))}))},e.prototype.authingWithApiKey=function(){return null!=this.clientId&&null!=this.clientSecret},e.prototype.authingWithSso=function(){return null!=this.code&&null!=this.codeVerifier&&null!=this.ssoRedirectUrl},e.prototype.authingWithPassword=function(){return null!=this.email&&null!=this.masterPasswordHash},e.prototype.logInHelper=function(e,t,n,r,a,u,m,f,h,v,y,g,x){return i(this,void 0,void 0,(function(){var i,b,S,w,C,I,E,P,k,O,A,_,M;return o(this,(function(o){switch(o.label){case 0:return[4,this.tokenService.getTwoFactorToken(e)];case 1:return i=o.sent(),[4,this.appIdService.getAppId()];case 2:return b=o.sent(),S=new c.DeviceRequest(b,this.platformUtilsService),w=[],C=[],I=[null,null],w=null!=e&&null!=t?[e,t]:null,C=null!=r&&null!=a&&null!=u?[r,a,u]:null,I=null!=m&&null!=f?[m,f]:null,E=null!=y&&null!=v?new d.TokenRequest(w,C,I,v,y,g,x,S):null!=i?new d.TokenRequest(w,C,I,s.TwoFactorProviderType.Remember,i,!1,x,S):new d.TokenRequest(w,C,I,null,null,!1,x,S),[4,this.apiService.postIdentityToken(E)];case 3:return P=o.sent(),this.clearState(),(k=new l.AuthResult).captchaSiteKey=P.siteKey,k.captchaSiteKey?[2,k]:(k.twoFactor=!!P.twoFactorProviders2,k.twoFactor?(this.email=e,this.masterPasswordHash=t,this.localMasterPasswordHash=n,this.code=r,this.codeVerifier=a,this.ssoRedirectUrl=u,this.clientId=m,this.clientSecret=f,this.key=this.setCryptoKeys?h:null,O=P,this.twoFactorProvidersData=O.twoFactorProviders2,k.twoFactorProviders=O.twoFactorProviders2,this.captchaToken=O.captchaToken,[2,k]):(A=P,k.resetMasterPassword=A.resetMasterPassword,null==A.twoFactorToken?[3,5]:[4,this.tokenService.setTwoFactorToken(A.twoFactorToken,e)]));case 4:o.sent(),o.label=5;case 5:return[4,this.tokenService.setTokens(A.accessToken,A.refreshToken,I)];case 6:return o.sent(),[4,this.userService.setInformation(this.tokenService.getUserId(),this.tokenService.getEmail(),A.kdf,A.kdfIterations)];case 7:return o.sent(),this.setCryptoKeys?null==h?[3,9]:[4,this.cryptoService.setKey(h)]:[3,19];case 8:o.sent(),o.label=9;case 9:return null==n?[3,11]:[4,this.cryptoService.setKeyHash(n)];case 10:o.sent(),o.label=11;case 11:return null!=r&&null==A.key?[3,19]:[4,this.cryptoService.setEncKey(A.key)];case 12:if(o.sent(),null!=A.privateKey)return[3,17];o.label=13;case 13:return o.trys.push([13,16,,17]),[4,this.cryptoService.makeKeyPair()];case 14:return _=o.sent(),[4,this.apiService.postAccountKeys(new p.KeysRequest(_[0],_[1].encryptedString))];case 15:return o.sent(),A.privateKey=_[1].encryptedString,[3,17];case 16:return M=o.sent(),this.logService.error(M),[3,17];case 17:return[4,this.cryptoService.setEncPrivateKey(A.privateKey)];case 18:o.sent(),o.label=19;case 19:return null!=this.vaultTimeoutService&&(this.vaultTimeoutService.biometricLocked=!1),this.messagingService.send("loggedIn"),[2,k]}}))}))},e.prototype.clearState=function(){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},e}();t.AuthService=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SelectionReadOnlyRequest=void 0;var r=function(e,t,n){this.id=e,this.readOnly=t,this.hidePasswords=n};t.SelectionReadOnlyRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var o=n(373),a=n(68),s=n(80),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},n,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.CardView(this),{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null},e,t)},t.prototype.toCardData=function(){var e=new o.CardData;return this.buildDataModel(this,e,{cardholderName:null,brand:null,number:null,expMonth:null,expYear:null,code:null}),e},t}(a.default);t.Card=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;var o=n(374),a=n(68),s=n(194),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type,r.buildDomainModel(r,t,{name:null,value:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.FieldView(this),{name:null,value:null},e,t)},t.prototype.toFieldData=function(){var e=new o.FieldData;return this.buildDataModel(this,e,{name:null,value:null,type:null},["type"]),e},t}(a.default);t.Field=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;var o=n(375),a=n(68),s=n(141),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||r.buildDomainModel(r,t,{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,[]),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new s.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)},t.prototype.toIdentityData=function(){var e=new o.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}(a.default);t.Identity=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(e.uris=[],this.uris.forEach((function(t){e.uris.push(t.toLoginUriData())}))),e},t}(n(68).default);t.Login=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;var o=n(377),a=n(230),s=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.match=t.match,r.buildDomainModel(r,t,{uri:null},n,[])),r}return i(t,e),t.prototype.decrypt=function(e,t){return this.decryptObj(new a.LoginUriView(this),{uri:null},e,t)},t.prototype.toLoginUriData=function(){var e=new o.LoginUriData;return this.buildDataModel(this,e,{uri:null},["match"]),e},t}(n(68).default);t.LoginUri=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;var o=n(378),a=n(68),s=n(88),l=function(e){function t(t,n){void 0===n&&(n=!1);var r=e.call(this)||this;return null==t||(r.type=t.type),r}return i(t,e),t.prototype.decrypt=function(e,t){return Promise.resolve(new s.SecureNoteView(this))},t.prototype.toSecureNoteData=function(){var e=new o.SecureNoteData;return e.type=this.type,e},t}(a.default);t.SecureNote=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TrueFalseValueDirective=void 0;var r=n(0),i=n(13),o=n(0),a=function(){function e(e,t){this.elementRef=e,this.renderer=t,this.trueValue=!0,this.falseValue=!1,this.propagateChange=function(e){}}return e.prototype.onHostChange=function(e){this.propagateChange(e.target.checked?this.trueValue:this.falseValue)},e.prototype.writeValue=function(e){e===this.trueValue?this.renderer.setProperty(this.elementRef.nativeElement,"checked",!0):this.renderer.setProperty(this.elementRef.nativeElement,"checked",!1)},e.prototype.registerOnChange=function(e){this.propagateChange=e},e.prototype.registerOnTouched=function(e){},e.prototype.setDisabledState=function(e){},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(o.ElementRef),o.ɵɵdirectiveInject(o.Renderer2))},e.ɵdir=o.ɵɵdefineDirective({type:e,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:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return e})),multi:!0}])]}),e}();t.TrueFalseValueDirective=a,("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(a,[{type:r.Directive,args:[{selector:"input[type=checkbox][appTrueFalseValue]",providers:[{provide:i.NG_VALUE_ACCESSOR,useExisting:r.forwardRef((function(){return a})),multi:!0}]}]}],(function(){return[{type:o.ElementRef},{type:o.Renderer2}]}),{trueValue:[{type:r.Input}],falseValue:[{type:r.Input}],onHostChange:[{type:r.HostListener,args:["change",["$event"]]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GroupingsComponent=void 0;var o=n(0),a=(n(37),n(51),n(33),n(5),n(1012)),s=n(0),l=n(37),c=n(51),p=n(33),u=n(5),d=n(16),m=n(13),f=n(56),h=n(2),v=n(32),y=n(9),g=function(e){return{active:e}};function x(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().selectFavorites()})),s.ɵɵtext(3," "),s.ɵɵelement(4,"i",17),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(4,g,r.selectedFavorites)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(6,2,"favorites")," ")}}function b(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"a",8),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().selectTrash()})),s.ɵɵtext(3," "),s.ɵɵelement(4,"i",18),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(4,g,r.selectedTrash)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(6,2,"trash")," ")}}function S(e,t){1&e&&(s.ɵɵelementStart(0,"p",19),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",20),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"span",21),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8," "),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")))}var w=function(e,t){return{"fa-caret-right":e,"fa-caret-down":t}};function C(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"i",33),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).collapse(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext().$implicit,i=s.ɵɵnextContext(4);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"toggleCollapse")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,w,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function I(e,t){1&e&&s.ɵɵelement(0,"i",34)}function E(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",35),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).editFolder(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵtext(2," "),s.ɵɵelement(3,"i",36),s.ɵɵtext(4," "),s.ɵɵelementEnd()}2&e&&s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(1,1,"editFolder"))}function P(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementContainerEnd())}var k=function(e){return{$implicit:e}};function O(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",37),s.ɵɵtext(1," "),s.ɵɵtemplate(2,P,2,0,"ng-container",26),s.ɵɵtext(3," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵnextContext(2);var r=s.ɵɵreference(15);s.ɵɵadvance(2),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(2,k,n.children))}}function A(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",22),s.ɵɵtext(3," "),s.ɵɵtemplate(4,C,2,7,"i",28),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"a",29),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext(4).selectFolder(e.node)})),s.ɵɵtext(7," "),s.ɵɵtemplate(8,I,1,0,"i",30),s.ɵɵtext(9),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵtemplate(11,E,5,3,"a",31),s.ɵɵtext(12," "),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵtemplate(14,O,4,4,"ul",32),s.ɵɵtext(15," "),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=s.ɵɵnextContext(4);s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(6,g,i.selectedFolder&&r.node.id===i.selectedFolderId)),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",r.children.length),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",0===r.children.length),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("",r.node.name," "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.node.id),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function _(e,t){if(1&e&&(s.ɵɵtext(0," "),s.ɵɵtemplate(1,A,16,8,"li",27),s.ɵɵtext(2," ")),2&e){var n=t.$implicit;s.ɵɵadvance(1),s.ɵɵproperty("ngForOf",n)}}function M(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementContainerEnd())}function T(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"h3",22),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementStart(5,"a",23),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).addFolder()})),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7," "),s.ɵɵelement(8,"i",24),s.ɵɵtext(9," "),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"ul",6),s.ɵɵtext(13," "),s.ɵɵtemplate(14,_,3,1,"ng-template",null,25,s.ɵɵtemplateRefExtractor),s.ɵɵtext(16," "),s.ɵɵtemplate(17,M,2,0,"ng-container",26),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵreference(15),i=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,4,"folders")," "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,6,"addFolder")),s.ɵɵadvance(12),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(8,k,i.nestedFolders))}}function D(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"i",33),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=s.ɵɵnextContext().$implicit;return s.ɵɵnextContext(4).collapse(e.node)})),s.ɵɵpipe(1,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext().$implicit,i=s.ɵɵnextContext(4);s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(1,2,"toggleCollapse")),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(4,w,i.isCollapsed(r.node),!i.isCollapsed(r.node)))}}function R(e,t){1&e&&s.ɵɵelement(0,"i",40)}function B(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementContainerEnd())}function U(e,t){if(1&e&&(s.ɵɵelementStart(0,"ul",37),s.ɵɵtext(1," "),s.ɵɵtemplate(2,B,2,0,"ng-container",26),s.ɵɵtext(3," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵnextContext(2);var r=s.ɵɵreference(9);s.ɵɵadvance(2),s.ɵɵproperty("ngTemplateOutlet",r)("ngTemplateOutletContext",s.ɵɵpureFunction1(2,k,n.children))}}function j(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"li",7),s.ɵɵtext(1," "),s.ɵɵtemplate(2,D,2,7,"i",28),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"a",29),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext(4).selectCollection(e.node)})),s.ɵɵtext(5," "),s.ɵɵtemplate(6,R,1,0,"i",39),s.ɵɵtext(7),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵtemplate(9,U,4,4,"ul",32),s.ɵɵtext(10," "),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit,i=s.ɵɵnextContext(4);s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(5,g,r.node.id===i.selectedCollectionId)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.children.length),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",0===r.children.length),s.ɵɵadvance(1),s.ɵɵtextInterpolate1("",r.node.name," "),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",r.children.length&&!i.isCollapsed(r.node))}}function V(e,t){if(1&e&&(s.ɵɵtext(0," "),s.ɵɵtemplate(1,j,11,7,"li",27),s.ɵɵtext(2," ")),2&e){var n=t.$implicit;s.ɵɵadvance(1),s.ɵɵproperty("ngForOf",n)}}function F(e,t){1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementContainerEnd())}function N(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"h3"),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"ul",6),s.ɵɵtext(7," "),s.ɵɵtemplate(8,V,3,1,"ng-template",null,38,s.ɵɵtemplateRefExtractor),s.ɵɵtext(10," "),s.ɵɵtemplate(11,F,2,0,"ng-container",26),s.ɵɵtext(12," "),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵreference(9),r=s.ɵɵnextContext(2);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,3,"collections")),s.ɵɵadvance(8),s.ɵɵproperty("ngTemplateOutlet",n)("ngTemplateOutletContext",s.ɵɵpureFunction1(5,k,r.nestedCollections))}}function z(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵtemplate(2,T,20,10,"ng-container",16),s.ɵɵtext(3," "),s.ɵɵtemplate(4,N,14,7,"ng-container",16),s.ɵɵtext(5," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showFolders),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showCollections&&n.collections&&n.collections.length)}}var L=function(e){function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.onSearchTextChanged=new o.EventEmitter,a.searchText="",a.searchPlaceholder=null,a}return i(t,e),t.prototype.searchTextChanged=function(){this.onSearchTextChanged.emit(this.searchText)},t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.CollectionService),s.ɵɵdirectiveInject(c.FolderService),s.ɵɵdirectiveInject(p.StorageService),s.ɵɵdirectiveInject(u.UserService))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-vault-groupings"]],outputs:{onSearchTextChanged:"onSearchTextChanged"},features:[s.ɵɵInheritDefinitionFeature],decls:82,vars:47,consts:[[1,"card","vault-filters"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/searching-vault/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],["type","search","id","search","autocomplete","off","appAutofocus","",1,"form-control",3,"placeholder","ngModel","ngModelChange","input"],[1,"fa-ul","card-ul"],[3,"ngClass"],["href","#","appStopClick","",3,"click"],[1,"fa-li","fa","fa-fw","fa-th"],[3,"ngClass",4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-globe"],[1,"fa-li","fa","fa-fw","fa-credit-card"],[1,"fa-li","fa","fa-fw","fa-id-card-o"],[1,"fa-li","fa","fa-fw","fa-sticky-note-o"],["class","text-muted",4,"ngIf"],[4,"ngIf"],[1,"fa-li","fa","fa-fw","fa-star"],[1,"fa-li","fa","fa-fw","fa-trash-o"],[1,"text-muted"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],[1,"sr-only"],[1,"d-flex"],["href","#","appStopClick","",1,"text-muted","ml-auto",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["recursiveFolders",""],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[3,"ngClass",4,"ngFor","ngForOf"],["class","fa-li fa",3,"title","ngClass","click",4,"ngIf"],["href","#","appStopClick","",1,"text-break",3,"click"],["class","fa-li fa fa-folder-o","aria-hidden","true",4,"ngIf"],["href","#","class","text-muted ml-auto show-active","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["class","fa-ul card-ul carets",4,"ngIf"],[1,"fa-li","fa",3,"title","ngClass","click"],["aria-hidden","true",1,"fa-li","fa","fa-folder-o"],["href","#","appStopClick","",1,"text-muted","ml-auto","show-active",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-pencil","fa-fw"],[1,"fa-ul","card-ul","carets"],["recursiveCollections",""],["class","fa-li fa fa-cube","aria-hidden","true",4,"ngIf"],["aria-hidden","true",1,"fa-li","fa","fa-cube"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementStart(5,"a",2),s.ɵɵpipe(6,"i18n"),s.ɵɵtext(7," "),s.ɵɵelement(8,"i",3),s.ɵɵtext(9," "),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"div",4),s.ɵɵtext(13," "),s.ɵɵelementStart(14,"input",5),s.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e}))("input",(function(){return t.searchTextChanged()})),s.ɵɵpipe(15,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(16," "),s.ɵɵelementStart(17,"ul",6),s.ɵɵtext(18," "),s.ɵɵelementStart(19,"li",7),s.ɵɵtext(20," "),s.ɵɵelementStart(21,"a",8),s.ɵɵlistener("click",(function(){return t.selectAll()})),s.ɵɵtext(22," "),s.ɵɵelement(23,"i",9),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26," "),s.ɵɵelementEnd(),s.ɵɵtext(27," "),s.ɵɵtemplate(28,x,8,6,"li",10),s.ɵɵtext(29," "),s.ɵɵtemplate(30,b,8,6,"li",10),s.ɵɵtext(31," "),s.ɵɵelementEnd(),s.ɵɵtext(32," "),s.ɵɵelementStart(33,"h3"),s.ɵɵtext(34),s.ɵɵpipe(35,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(36," "),s.ɵɵelementStart(37,"ul",6),s.ɵɵtext(38," "),s.ɵɵelementStart(39,"li",7),s.ɵɵtext(40," "),s.ɵɵelementStart(41,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Login)})),s.ɵɵtext(42," "),s.ɵɵelement(43,"i",11),s.ɵɵtext(44),s.ɵɵpipe(45,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(46," "),s.ɵɵelementEnd(),s.ɵɵtext(47," "),s.ɵɵelementStart(48,"li",7),s.ɵɵtext(49," "),s.ɵɵelementStart(50,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Card)})),s.ɵɵtext(51," "),s.ɵɵelement(52,"i",12),s.ɵɵtext(53),s.ɵɵpipe(54,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(55," "),s.ɵɵelementEnd(),s.ɵɵtext(56," "),s.ɵɵelementStart(57,"li",7),s.ɵɵtext(58," "),s.ɵɵelementStart(59,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.Identity)})),s.ɵɵtext(60," "),s.ɵɵelement(61,"i",13),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64," "),s.ɵɵelementEnd(),s.ɵɵtext(65," "),s.ɵɵelementStart(66,"li",7),s.ɵɵtext(67," "),s.ɵɵelementStart(68,"a",8),s.ɵɵlistener("click",(function(){return t.selectType(t.cipherType.SecureNote)})),s.ɵɵtext(69," "),s.ɵɵelement(70,"i",14),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73," "),s.ɵɵelementEnd(),s.ɵɵtext(74," "),s.ɵɵelementEnd(),s.ɵɵtext(75," "),s.ɵɵtemplate(76,S,9,6,"p",15),s.ɵɵtext(77," "),s.ɵɵtemplate(78,z,6,2,"ng-container",16),s.ɵɵtext(79," "),s.ɵɵelementEnd(),s.ɵɵtext(80," "),s.ɵɵelementEnd(),s.ɵɵtext(81," ")),2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,19,"filters")," "),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(6,21,"learnMore")),s.ɵɵadvance(9),s.ɵɵpropertyInterpolate("placeholder",t.searchPlaceholder||s.ɵɵpipeBind1(15,23,"searchVault")),s.ɵɵproperty("ngModel",t.searchText),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(37,g,t.selectedAll)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(25,25,"allItems")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",t.showFavorites),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.showTrash),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(35,27,"types")),s.ɵɵadvance(5),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(39,g,t.selectedType===t.cipherType.Login)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(45,29,"typeLogin")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(41,g,t.selectedType===t.cipherType.Card)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(54,31,"typeCard")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(43,g,t.selectedType===t.cipherType.Identity)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(63,33,"typeIdentity")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngClass",s.ɵɵpureFunction1(45,g,t.selectedType===t.cipherType.SecureNote)),s.ɵɵadvance(5),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(72,35,"typeSecureNote")," "),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.loaded),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.loaded))},directives:[d.A11yTitleDirective,m.DefaultValueAccessor,f.AutofocusDirective,m.NgControlStatus,m.NgModel,h.NgClass,v.StopClickDirective,h.NgIf,h.NgTemplateOutlet,h.NgForOf],pipes:[y.I18nPipe],encapsulation:2}),t}(a.GroupingsComponent);t.GroupingsComponent=L,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(L,[{type:o.Component,args:[{selector:"app-vault-groupings",templateUrl:"groupings.component.html"}]}],(function(){return[{type:l.CollectionService},{type:c.FolderService},{type:p.StorageService},{type:u.UserService}]}),{onSearchTextChanged:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Organization=void 0;var r=n(138),i=n(223),o=function(){function e(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.useBusinessPortal=e.useBusinessPortal,this.useSso=e.useSso,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)}return Object.defineProperty(e.prototype,"canAccess",{get:function(){return this.type===i.OrganizationUserType.Owner||this.enabled&&this.status===r.OrganizationUserStatusType.Confirmed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isManager",{get:function(){return this.type===i.OrganizationUserType.Manager||this.type===i.OrganizationUserType.Owner||this.type===i.OrganizationUserType.Admin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAdmin",{get:function(){return this.type===i.OrganizationUserType.Owner||this.type===i.OrganizationUserType.Admin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOwner",{get:function(){return this.type===i.OrganizationUserType.Owner},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canAccessBusinessPortal",{get:function(){return this.isAdmin||this.permissions.accessBusinessPortal},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canAccessEventLogs",{get:function(){return this.isAdmin||this.permissions.accessEventLogs},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canAccessImportExport",{get:function(){return this.isAdmin||this.permissions.accessImportExport},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canAccessReports",{get:function(){return this.isAdmin||this.permissions.accessReports},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageAllCollections",{get:function(){return this.isAdmin||this.permissions.manageAllCollections},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageAssignedCollections",{get:function(){return this.isManager||this.permissions.manageAssignedCollections},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageGroups",{get:function(){return this.isAdmin||this.permissions.manageGroups},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageSso",{get:function(){return this.isAdmin||this.permissions.manageSso},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManagePolicies",{get:function(){return this.isAdmin||this.permissions.managePolicies},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageUsers",{get:function(){return this.isAdmin||this.permissions.manageUsers},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageUsersPassword",{get:function(){return this.isAdmin||this.permissions.manageResetPassword},enumerable:!1,configurable:!0}),e}();t.Organization=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileView=void 0;var r=function(){function e(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)}return Object.defineProperty(e.prototype,"fileSize",{get:function(){try{if(null!=this.size)return parseInt(this.size,null)}catch(e){}return 0},enumerable:!1,configurable:!0}),e}();t.SendFileView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextView=void 0;var r=function(){function e(e){this.text=null,e&&(this.hidden=e.hidden)}return Object.defineProperty(e.prototype,"maskedText",{get:function(){return null!=this.text?"••••••••":null},enumerable:!1,configurable:!0}),e}();t.SendTextView=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&!n.error),s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,3,"user")),s.ɵɵadvance(5),s.ɵɵproperty("ngForOf",n.users)}}function w(e,t){if(1&e&&(s.ɵɵelementStart(0,"small",24),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit;s.ɵɵadvance(1),s.ɵɵtextInterpolate(n.name)}}function C(e,t){if(1&e&&(s.ɵɵelementStart(0,"td"),s.ɵɵtext(1),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext().$implicit,r=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",r.statuses.get(n.id)," ")}}function I(e,t){1&e&&(s.ɵɵelementStart(0,"td"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"bulkFilteredMessage")," "))}function E(e,t){if(1&e&&(s.ɵɵelementStart(0,"tr"),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"td",21),s.ɵɵtext(3," "),s.ɵɵelement(4,"app-avatar",22),s.ɵɵpipe(5,"userName"),s.ɵɵtext(6," "),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"td"),s.ɵɵtext(9),s.ɵɵtemplate(10,w,2,1,"small",23),s.ɵɵtext(11," "),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵtemplate(13,C,2,1,"td",10),s.ɵɵtext(14," "),s.ɵɵtemplate(15,I,3,3,"td",10),s.ɵɵtext(16," "),s.ɵɵelementEnd()),2&e){var n=t.$implicit,r=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("data",s.ɵɵpipeBind1(5,8,n))("email",n.email)("circle",!0)("fontSize",14),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",n.email," "),s.ɵɵadvance(1),s.ɵɵproperty("ngIf",n.name),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",r.statuses.has(n.id)),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!r.statuses.has(n.id))}}function P(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"table",17),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"thead"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"tr"),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"th",18),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"th"),s.ɵɵtext(13),s.ɵɵpipe(14,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementEnd(),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵtemplate(18,E,17,10,"tr",19),s.ɵɵtext(19," "),s.ɵɵelementEnd(),s.ɵɵtext(20," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,3,"user")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(14,5,"status")),s.ɵɵadvance(5),s.ɵɵproperty("ngForOf",n.users)}}function k(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",25),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().submit()})),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",26),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"span"),s.ɵɵtext(6),s.ɵɵpipe(7,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext();s.ɵɵproperty("disabled",r.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,3,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(7,5,"removeUsers"))}}var O=function(){function e(e,t){this.apiService=e,this.i18nService=t,this.statuses=new Map,this.loading=!1,this.done=!1}return e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:this.loading=!0,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.deleteUsers()];case 2:return n.sent().data.forEach((function(e){var n=""!==e.error?e.error:t.i18nService.t("bulkRemovedMessage");t.statuses.set(e.id,n)})),this.done=!0,[3,4];case 3:return e=n.sent(),this.error=e.message,[3,4];case 4:return this.loading=!1,[2]}}))}))},e.prototype.deleteUsers=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=new a.OrganizationUserBulkRequest(this.users.map((function(e){return e.id}))),[4,this.apiService.deleteManyOrganizationUsers(this.organizationId,e)];case 1:return[2,t.sent()]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService))},e.ɵcmp=s.ɵɵdefineComponent({type:e,selectors:[["app-bulk-remove"]],inputs:{organizationId:"organizationId",users:"users"},decls:43,vars:14,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"button",5),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"span",6),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"div",7),s.ɵɵtext(21," "),s.ɵɵtemplate(22,v,3,3,"app-callout",8),s.ɵɵtext(23," "),s.ɵɵtemplate(24,y,2,1,"app-callout",9),s.ɵɵtext(25," "),s.ɵɵtemplate(26,S,19,5,"ng-container",10),s.ɵɵtext(27," "),s.ɵɵtemplate(28,P,21,7,"ng-container",10),s.ɵɵtext(29," "),s.ɵɵelementEnd(),s.ɵɵtext(30," "),s.ɵɵelementStart(31,"div",11),s.ɵɵtext(32," "),s.ɵɵtemplate(33,k,9,7,"button",12),s.ɵɵtext(34," "),s.ɵɵelementStart(35,"button",13),s.ɵɵtext(36),s.ɵɵpipe(37,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(38," "),s.ɵɵelementEnd(),s.ɵɵtext(39," "),s.ɵɵelementEnd(),s.ɵɵtext(40," "),s.ɵɵelementEnd(),s.ɵɵtext(41," "),s.ɵɵelementEnd(),s.ɵɵtext(42," ")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,8,"removeUsers")," "),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,10,"close")),s.ɵɵadvance(10),s.ɵɵproperty("ngIf",t.users.length<=0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.error),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.done),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",t.done),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",!t.done&&t.users.length>0),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(37,12,"close")))},directives:[p.A11yTitleDirective,u.NgIf,d.CalloutComponent,u.NgForOf,m.AvatarComponent],pipes:[f.I18nPipe,h.UserNamePipe],encapsulation:2}),e}();t.BulkRemoveComponent=O,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(O,[{type:o.Component,args:[{selector:"app-bulk-remove",templateUrl:"bulk-remove.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService}]}),{organizationId:[{type:o.Input}],users:[{type:o.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t.forEach((function(t){var n=e.data.filter((function(e){return e.id===t}));null!=n&&n.length>0&&(n[0].checked=!0)})),[3,5];case 3:return"collection"!==this.entity?[3,5]:[4,this.apiService.getCollectionUsers(this.organizationId,this.entityId)];case 4:null!=(t=r.sent())&&e.data.length>0&&t.forEach((function(t){var n=e.data.filter((function(e){return!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)})),r.label=5;case 5:return this.allUsers.forEach((function(e){"collection"===n.entity&&e.accessAll&&(e.checked=!0),e.checked&&n.selectedCount++})),[2]}}))}))},e.prototype.check=function(e){"collection"===this.entity&&e.accessAll||(e.checked=!e.checked,this.selectedChanged(e))},e.prototype.selectedChanged=function(e){e.checked?this.selectedCount++:("collection"===this.entity&&(e.readOnly=!1,e.hidePasswords=!1),this.selectedCount--)},e.prototype.filterSelected=function(e){this.showSelected=e},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),"group"===this.entity?(e=this.users.filter((function(e){return e.checked})).map((function(e){return e.id})),this.formPromise=this.apiService.putGroupUsers(this.organizationId,this.entityId,e)):(e=this.users.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),this.formPromise=this.apiService.putCollectionUsers(this.organizationId,this.entityId,e)),[4,this.formPromise];case 1:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("updatedUsers")),this.onEditedUsers.emit(),[3,3];case 2:return t.sent(),[3,3];case 3:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-entity-users"]],inputs:{entity:"entity",entityId:"entityId",entityName:"entityName",organizationId:"organizationId"},outputs:{onEditedUsers:"onEditedUsers"},decls:49,vars:29,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-th",3,"title"],[1,"text-center"],["type","checkbox",3,"ngModel","name","disabled","ngModelChange"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementStart(12,"small"),p.ɵɵtext(13),p.ɵɵelementEnd(),p.ɵɵtext(14," "),p.ɵɵelementEnd(),p.ɵɵtext(15," "),p.ɵɵelementStart(16,"button",6),p.ɵɵpipe(17,"i18n"),p.ɵɵtext(18," "),p.ɵɵelementStart(19,"span",7),p.ɵɵtext(20,"×"),p.ɵɵelementEnd(),p.ɵɵtext(21," "),p.ɵɵelementEnd(),p.ɵɵtext(22," "),p.ɵɵelementEnd(),p.ɵɵtext(23," "),p.ɵɵtemplate(24,C,9,6,"div",8),p.ɵɵtext(25," "),p.ɵɵtemplate(26,G,32,22,"div",8),p.ɵɵpipe(27,"search"),p.ɵɵtext(28," "),p.ɵɵelementStart(29,"div",9),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"button",10),p.ɵɵtext(32," "),p.ɵɵelement(33,"i",11),p.ɵɵpipe(34,"i18n"),p.ɵɵtext(35," "),p.ɵɵelementStart(36,"span"),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementEnd(),p.ɵɵtext(40," "),p.ɵɵelementStart(41,"button",12),p.ɵɵtext(42),p.ɵɵpipe(43,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(44," "),p.ɵɵelementEnd(),p.ɵɵtext(45," "),p.ɵɵelementEnd(),p.ɵɵtext(46," "),p.ɵɵelementEnd(),p.ɵɵtext(47," "),p.ɵɵelementEnd(),p.ɵɵtext(48," ")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(11,10,"userAccess")," "),p.ɵɵadvance(3),p.ɵɵtextInterpolate(t.entityName),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(17,12,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading||!t.users),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&t.users&&p.ɵɵpipeBindV(27,14,p.ɵɵpureFunction2(26,q,t.users,t.searchText))),p.ɵɵadvance(5),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(34,20,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,22,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(43,24,"close"))}},directives:[f.NgControlStatusGroup,f.NgForm,h.ApiActionDirective,v.A11yTitleDirective,y.NgIf,f.DefaultValueAccessor,f.NgControlStatus,f.NgModel,y.NgClass,y.NgForOf,f.CheckboxControlValueAccessor,g.StopPropDirective,x.AvatarComponent],pipes:[b.I18nPipe,S.SearchPipe,w.UserNamePipe],encapsulation:2}),e}();t.EntityUsersComponent=H,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(H,[{type:o.Component,args:[{selector:"app-entity-users",templateUrl:"entity-users.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService}]}),{entity:[{type:o.Input}],entityId:[{type:o.Input}],entityName:[{type:o.Input}],organizationId:[{type:o.Input}],onEditedUsers:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)return void(this.creditAmount=parseFloat((Math.round(100*e)/100).toString()).toFixed(2).toString())}}catch(t){}this.creditAmount=""},Object.defineProperty(e.prototype,"creditAmountNumber",{get:function(){if(null!=this.creditAmount&&""!==this.creditAmount)try{return parseFloat(this.creditAmount)}catch(e){}return null},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.UserService),c.ɵɵdirectiveInject(u.ApiService),c.ɵɵdirectiveInject(d.PlatformUtilsService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-add-credit"]],viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(g,3,o.ElementRef),2&e){var n;c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.ppButtonFormRef=n.first)}},inputs:{creditAmount:"creditAmount",showOptions:"showOptions",method:"method",organizationId:"organizationId"},outputs:{onAdded:"onAdded",onCanceled:"onCanceled"},decls:92,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,"fa","fa-spinner","fa-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,"fa","fa-fw","fa-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,"fa","fa-fw","fa-bitcoin"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2," "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4," "),c.ɵɵelementStart(5,"button",3),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵpipe(6,"i18n"),c.ɵɵelementStart(7,"span",4),c.ɵɵtext(8,"×"),c.ɵɵelementEnd(),c.ɵɵelementEnd(),c.ɵɵtext(9," "),c.ɵɵelementStart(10,"h3",5),c.ɵɵtext(11),c.ɵɵpipe(12,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(13," "),c.ɵɵtemplate(14,x,22,4,"div",6),c.ɵɵtext(15," "),c.ɵɵelementStart(16,"div",7),c.ɵɵtext(17," "),c.ɵɵelementStart(18,"div",8),c.ɵɵtext(19," "),c.ɵɵelementStart(20,"div",9),c.ɵɵtext(21," "),c.ɵɵelementStart(22,"label",10),c.ɵɵtext(23),c.ɵɵpipe(24,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(25," "),c.ɵɵelementStart(26,"div",11),c.ɵɵtext(27," "),c.ɵɵelementStart(28,"div",12),c.ɵɵelementStart(29,"span",13),c.ɵɵtext(30,"$USD"),c.ɵɵelementEnd(),c.ɵɵelementEnd(),c.ɵɵtext(31," "),c.ɵɵelementStart(32,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.creditAmount=e}))("blur",(function(){return t.formatAmount()})),c.ɵɵelementEnd(),c.ɵɵtext(33," "),c.ɵɵelementEnd(),c.ɵɵtext(34," "),c.ɵɵelementEnd(),c.ɵɵtext(35," "),c.ɵɵelementEnd(),c.ɵɵtext(36," "),c.ɵɵelementStart(37,"small",15),c.ɵɵtext(38),c.ɵɵpipe(39,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(40," "),c.ɵɵelementEnd(),c.ɵɵtext(41," "),c.ɵɵelementStart(42,"button",16),c.ɵɵtext(43," "),c.ɵɵelement(44,"i",17),c.ɵɵpipe(45,"i18n"),c.ɵɵtext(46," "),c.ɵɵelementStart(47,"span"),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50," "),c.ɵɵelementEnd(),c.ɵɵtext(51," "),c.ɵɵelementStart(52,"button",18),c.ɵɵlistener("click",(function(){return t.cancel()})),c.ɵɵtext(53),c.ɵɵpipe(54,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(55," "),c.ɵɵelementEnd(),c.ɵɵtext(56," "),c.ɵɵelementEnd(),c.ɵɵtext(57," "),c.ɵɵelementStart(58,"form",19,20),c.ɵɵtext(60," "),c.ɵɵelement(61,"input",21),c.ɵɵtext(62," "),c.ɵɵelement(63,"input",22),c.ɵɵtext(64," "),c.ɵɵelement(65,"input",23),c.ɵɵtext(66," "),c.ɵɵelement(67,"input",24),c.ɵɵtext(68," "),c.ɵɵelement(69,"input",25),c.ɵɵtext(70," "),c.ɵɵelement(71,"input",26),c.ɵɵtext(72," "),c.ɵɵelement(73,"input",27),c.ɵɵtext(74," "),c.ɵɵelement(75,"input",28),c.ɵɵtext(76," "),c.ɵɵelement(77,"input",29),c.ɵɵtext(78," "),c.ɵɵelement(79,"input",30),c.ɵɵtext(80," "),c.ɵɵelement(81,"input",31),c.ɵɵtext(82," "),c.ɵɵelement(83,"input",32),c.ɵɵtext(84," "),c.ɵɵelement(85,"input",33),c.ɵɵtext(86," "),c.ɵɵelement(87,"input",34),c.ɵɵtext(88," "),c.ɵɵelement(89,"input",35),c.ɵɵtext(90," "),c.ɵɵelementEnd(),c.ɵɵtext(91," ")),2&e){var n=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(6,18,"cancel")),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(12,20,"addCredit")),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.showOptions),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(24,22,"amount")),c.ɵɵadvance(9),c.ɵɵproperty("ngModel",t.creditAmount),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(39,24,"creditDelayed")),c.ɵɵadvance(4),c.ɵɵproperty("disabled",n.loading||t.ppLoading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(45,26,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,28,"submit")),c.ɵɵadvance(5),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(54,30,"cancel")," "),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("action",t.ppButtonFormAction,c.ɵɵsanitizeUrl),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("value",t.ppButtonBusinessId),c.ɵɵadvance(10),c.ɵɵpropertyInterpolate("value",t.returnUrl),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("value",t.returnUrl),c.ɵɵadvance(8),c.ɵɵpropertyInterpolate("value",t.creditAmount),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("value",t.ppButtonCustomField),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("value",t.subject)}},directives:[m.NgControlStatusGroup,m.NgForm,f.ApiActionDirective,h.A11yTitleDirective,v.NgIf,m.DefaultValueAccessor,m.RequiredValidator,m.NgControlStatus,m.NgModel,m.ɵangular_packages_forms_forms_ba,m.RadioControlValueAccessor],pipes:[y.I18nPipe],encapsulation:2}),e}();t.AddCreditComponent=b,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(b,[{type:o.Component,args:[{selector:"app-add-credit",templateUrl:"add-credit.component.html"}]}],(function(){return[{type:p.UserService},{type:u.ApiService},{type:d.PlatformUtilsService}]}),{creditAmount:[{type:o.Input}],showOptions:[{type:o.Input}],method:[{type:o.Input}],organizationId:[{type:o.Input}],onAdded:[{type:o.Output}],onCanceled:[{type:o.Output}],ppButtonFormRef:[{type:o.ViewChild,args:["ppButtonForm",{read:o.ElementRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t.push(e),r.exposedPasswordMap.set(e.id,n))}));n.push(i)}})),[4,Promise.all(n)];case 2:return i.sent(),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.AuditService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(m.MessagingService),p.ɵɵdirectiveInject(f.UserService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-exposed-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:26,vars:14,consts:[[1,"page-header"],["type","button",1,"btn","btn-primary","btn-submit",3,"disabled","click"],["aria-hidden","true",1,"fa","fa-spinner","fa-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"],[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,"fa","fa-cube",3,"title"],[1,"sr-only"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5," "),p.ɵɵelementEnd(),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"p"),p.ɵɵtext(8),p.ɵɵpipe(9,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(10," "),p.ɵɵelementStart(11,"button",1),p.ɵɵlistener("click",(function(){return t.load()})),p.ɵɵtext(12," "),p.ɵɵelement(13,"i",2),p.ɵɵpipe(14,"i18n"),p.ɵɵtext(15," "),p.ɵɵelementStart(16,"span"),p.ɵɵtext(17),p.ɵɵpipe(18,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵelementEnd(),p.ɵɵtext(20," "),p.ɵɵtemplate(21,O,6,2,"div",3),p.ɵɵtext(22," "),p.ɵɵtemplate(23,A,0,0,"ng-template",null,4,p.ɵɵtemplateRefExtractor),p.ɵɵtext(25," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,6,"exposedPasswordsReport")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(9,8,"exposedPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("disabled",t.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(14,10,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(18,12,"checkExposedPasswords")),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,y.IconComponent,g.StopClickDirective,x.StopPropDirective],pipes:[b.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.ExposedPasswordsReportComponent=_,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(_,[{type:s.Component,args:[{selector:"app-exposed-passwords-report",templateUrl:"exposed-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:d.AuditService},{type:p.ComponentFactoryResolver},{type:m.MessagingService},{type:f.UserService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1||!this.allowPersonal)&&(null!=this.organization?this.cloneMode&&this.organization.canManageAllCollections:!this.editMode||this.cloneMode)},t.prototype.loadCollections=function(){return this.organization.canManageAllCollections?Promise.resolve(this.collections):e.prototype.loadCollections.call(this)},t.prototype.loadCipher=function(){return o(this,void 0,void 0,(function(){var t,n;return a(this,(function(r){switch(r.label){case 0:return this.organization.canManageAllCollections?[3,2]:[4,e.prototype.loadCipher.call(this)];case 1:return[2,r.sent()];case 2:return[4,this.apiService.getCipherAdmin(this.cipherId)];case 3:return t=r.sent(),n=new l.CipherData(t),this.originalCipher=new c.Cipher(n),[2,new c.Cipher(n)]}}))}))},t.prototype.encryptCipher=function(){return this.organization.canManageAllCollections?this.cipherService.encrypt(this.cipher,null,this.originalCipher):e.prototype.encryptCipher.call(this)},t.prototype.saveCipher=function(t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){return this.organization.canManageAllCollections&&null!=t.organizationId?this.editMode&&!this.cloneMode?(n=new u.CipherRequest(t),[2,this.apiService.putCipherAdmin(this.cipherId,n)]):(n=new p.CipherCreateRequest(t),[2,this.apiService.postCipherAdmin(n)]):[2,e.prototype.saveCipher.call(this,t)]}))}))},t.prototype.deleteCipher=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){return this.organization.canManageAllCollections?[2,this.cipher.isDeleted?this.apiService.deleteCipherAdmin(this.cipherId):this.apiService.putDeleteCipherAdmin(this.cipherId)]:[2,e.prototype.deleteCipher.call(this)]}))}))},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.CipherService),m.ɵɵdirectiveInject(h.FolderService),m.ɵɵdirectiveInject(v.I18nService),m.ɵɵdirectiveInject(y.PlatformUtilsService),m.ɵɵdirectiveInject(g.AuditService),m.ɵɵdirectiveInject(x.StateService),m.ɵɵdirectiveInject(b.UserService),m.ɵɵdirectiveInject(S.CollectionService),m.ɵɵdirectiveInject(w.TotpService),m.ɵɵdirectiveInject(C.PasswordGenerationService),m.ɵɵdirectiveInject(I.ApiService),m.ɵɵdirectiveInject(E.MessagingService),m.ɵɵdirectiveInject(P.EventService),m.ɵɵdirectiveInject(k.PolicyService))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["app-org-vault-add-edit"]],features:[m.ɵɵInheritDefinitionFeature],decls:36,vars:11,consts:[["tabindex","-1","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"],[1,"mt-4"],["cdkDropList","",3,"cdkDropListDropped",4,"ngIf"],["href","#","appStopClick","","class","d-inline-block mb-2",3,"click",4,"ngIf"],[1,"form-check"],["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/article/managing-items/#protect-individual-items",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["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,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-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 fa-icon-above-input","appStopClick","",3,"appA11yTitle","click",4,"ngIf"],["href","#","appStopClick","",1,"d-block","fa-icon-above-input",3,"appA11yTitle","appApiAction","click"],["checkPasswordBtn",""],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-check-circle",3,"hidden"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-spinner","fa-spin",3,"hidden","title"],["href","#","appStopClick","",1,"d-block","mr-2","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-refresh"],["src","images/totp-countdown.png",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,"fa","fa-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,"fa","fa-lg","fa-share"],[1,"col-5","form-group"],["href","https://help.bitwarden.com/article/uri-match-detection/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],[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,"fa","fa-minus-circle","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus-circle","fa-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","name","Identity.Email","appInputVerbatim","",1,"form-control",3,"ngModel","disabled","ngModelChange"],["for","idPhone"],["id","idPhone","type","text","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"],["cdkDropList","",3,"cdkDropListDropped"],["class","row","cdkDrag","",4,"ngFor","ngForOf","ngForTrackBy"],["cdkDrag","",1,"row"],["href","https://help.bitwarden.com/article/custom-fields/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["type","text","appInputVerbatim","",1,"form-control",3,"id","name","ngModel","disabled","ngModelChange"],["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-muted cursor-move",3,"appA11yTitle",4,"ngIf"],["appInputVerbatim","","autocomplete","new-password",1,"form-control","text-monospace",3,"id","type","name","ngModel","disabled","ngModelChange"],["type","checkbox","appTrueFalseValue","","trueValue","true","falseValue","false",3,"id","name","ngModel","disabled","ngModelChange"],["type","button",1,"btn","btn-link","text-muted","cursor-move",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-bars","fa-lg"],["href","#","appStopClick","",1,"d-inline-block","mb-2",3,"click"],[1,"col-5"],["for","addFieldType",1,"sr-only"],["id","addFieldType","name","AddFieldType",1,"form-control",3,"ngModel","ngModelChange"],["for","organizationId"],["id","organizationId","name","OrganizationId",1,"form-control",3,"ngModel","disabled","ngModelChange","change"],["class","form-check",4,"ngFor","ngForOf"],["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","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵelementEnd(),m.ɵɵtext(11," "),m.ɵɵelementStart(12,"button",6),m.ɵɵpipe(13,"i18n"),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"span",7),m.ɵɵtext(16,"×"),m.ɵɵelementEnd(),m.ɵɵtext(17," "),m.ɵɵelementEnd(),m.ɵɵtext(18," "),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵtemplate(20,Te,73,36,"div",8),m.ɵɵtext(21," "),m.ɵɵelementStart(22,"div",9),m.ɵɵtext(23," "),m.ɵɵtemplate(24,De,9,7,"button",10),m.ɵɵtext(25," "),m.ɵɵelementStart(26,"button",11),m.ɵɵtext(27),m.ɵɵpipe(28,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(29," "),m.ɵɵtemplate(30,je,6,2,"div",12),m.ɵɵtext(31," "),m.ɵɵelementEnd(),m.ɵɵtext(32," "),m.ɵɵelementEnd(),m.ɵɵtext(33," "),m.ɵɵelementEnd(),m.ɵɵtext(34," "),m.ɵɵelementEnd(),m.ɵɵtext(35," ")),2&e&&(m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate(t.title),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(13,7,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",t.cipher),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",!t.viewOnly),m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(28,9,t.viewOnly?"close":"cancel")," "),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",t.cipher&&!t.viewOnly))},directives:[O.NgControlStatusGroup,O.NgForm,A.ApiActionDirective,_.A11yTitleDirective,M.NgIf,O.DefaultValueAccessor,O.RequiredValidator,O.NgControlStatus,O.NgModel,O.CheckboxControlValueAccessor,T.CalloutComponent,O.SelectControlValueAccessor,D.AutofocusDirective,M.NgForOf,O.NgSelectOption,O.ɵangular_packages_forms_forms_z,R.InputVerbatimDirective,M.NgClass,B.StopClickDirective,M.NgStyle,U.CdkDropList,U.CdkDrag,j.TrueFalseValueDirective],pipes:[V.I18nPipe,M.DatePipe],encapsulation:2}),t}(d.AddEditComponent);t.AddEditComponent=Ve,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(Ve,[{type:s.Component,args:[{selector:"app-org-vault-add-edit",templateUrl:"../../vault/add-edit.component.html"}]}],(function(){return[{type:f.CipherService},{type:h.FolderService},{type:v.I18nService},{type:y.PlatformUtilsService},{type:g.AuditService},{type:x.StateService},{type:b.UserService},{type:S.CollectionService},{type:w.TotpService},{type:C.PasswordGenerationService},{type:I.ApiService},{type:E.MessagingService},{type:P.EventService},{type:k.PolicyService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentData=void 0;var r=function(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)};t.AttachmentData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CardData=void 0;var r=function(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)};t.CardData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FieldData=void 0;var r=function(e){null!=e&&(this.type=e.type,this.name=e.name,this.value=e.value)};t.FieldData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IdentityData=void 0;var r=function(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)};t.IdentityData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginData=void 0;var r=n(377),i=function(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((function(e){return new r.LoginUriData(e)}))))};t.LoginData=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUriData=void 0;var r=function(e){this.match=null,null!=e&&(this.uri=e.uri,this.match=e.match)};t.LoginUriData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNoteData=void 0;var r=function(e){null!=e&&(this.type=e.type)};t.SecureNoteData=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0))return[3,4];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.getFileContents(n[0])];case 2:return null!=(o=i.sent())&&(r=o),[3,4];case 3:return i.sent(),[3,4];case 4:if(null==r||""===r)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectFile")),this.loading=!1,[2];i.label=5;case 5:return i.trys.push([5,7,,8]),this.formPromise=this.importService.import(e,r,this.organizationId),[4,this.formPromise];case 6:return null!=(a=i.sent())?(this.error(a),this.loading=!1,[2]):(this.toasterService.popAsync("success",null,this.i18nService.t("importSuccess")),this.router.navigate(this.successNavigate),[3,8]);case 7:return i.sent(),[3,8];case 8:return this.loading=!1,[2]}}))}))},e.prototype.getFormatInstructionTitle=function(){var e=this;if(null==this.format)return null;var t=this.featuredImportOptions.concat(this.importOptions).filter((function(t){return t.id===e.format}));return t.length>0?this.i18nService.t("instructionsFor",t[0].name):null},e.prototype.setImportOptions=function(){this.featuredImportOptions=o([{id:null,name:"-- "+this.i18nService.t("select")+" --"}],this.importService.featuredImportOptions),this.importOptions=this.importService.regularImportOptions},e.prototype.error=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,s.default.fire({heightAuto:!1,buttonsStyling:!1,icon:"error",iconHtml:'',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:function(e){e.querySelector(".swal2-textarea").scrollTo(0,0)}})];case 1:return t.sent(),[2]}}))}))},e.prototype.getFileContents=function(e){var t=this;return new Promise((function(n,r){var i=new FileReader;i.readAsText(e,"utf-8"),i.onload=function(i){if("lastpasscsv"===t.format&&"text/html"===e.type){var o=(new DOMParser).parseFromString(i.target.result,"text/html").querySelector("pre");return null!=o?void n(o.textContent):void r()}n(i.target.result)},i.onerror=function(){r()}}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.I18nService),l.ɵɵdirectiveInject(p.ToasterService),l.ɵɵdirectiveInject(u.ImportService),l.ɵɵdirectiveInject(d.Router),l.ɵɵdirectiveInject(m.PlatformUtilsService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-import"]],decls:67,vars:24,consts:[[1,"page-header"],["ngNativeValidate","",3,"ngSubmit"],["form",""],[1,"row"],[1,"col-6"],[1,"form-group"],["for","type"],["id","type","name","Format","required","",1,"form-control",3,"ngModel","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"],["for","fileContents"],["id","fileContents","name","FileContents",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"],[3,"ngValue"],["value","-","disabled","disabled"],["type","info",3,"title"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/export-your-data/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-lastpass/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-chrome/"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/import-from-firefox/"],["target","_blank","rel","noopener","href","https://help.bitwarden.com/article/import-from-1password/"],["target","_blank","rel","noopener","href","https://bit.ly/2GpOMTg"]],template:function(e,t){1&e&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"h1"),l.ɵɵtext(3),l.ɵɵpipe(4,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(5," "),l.ɵɵelementEnd(),l.ɵɵtext(6," "),l.ɵɵelementStart(7,"form",1,2),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(9," "),l.ɵɵelementStart(10,"div",3),l.ɵɵtext(11," "),l.ɵɵelementStart(12,"div",4),l.ɵɵtext(13," "),l.ɵɵelementStart(14,"div",5),l.ɵɵtext(15," "),l.ɵɵelementStart(16,"label",6),l.ɵɵtext(17),l.ɵɵpipe(18,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(19," "),l.ɵɵelementStart(20,"select",7),l.ɵɵlistener("ngModelChange",(function(e){return t.format=e})),l.ɵɵtext(21," "),l.ɵɵtemplate(22,g,2,2,"option",8),l.ɵɵtext(23," "),l.ɵɵtemplate(24,b,6,1,"ng-container",9),l.ɵɵtext(25," "),l.ɵɵelementEnd(),l.ɵɵtext(26," "),l.ɵɵelementEnd(),l.ɵɵtext(27," "),l.ɵɵelementEnd(),l.ɵɵtext(28," "),l.ɵɵelementEnd(),l.ɵɵtext(29," "),l.ɵɵtemplate(30,ye,100,50,"app-callout",10),l.ɵɵtext(31," "),l.ɵɵelementStart(32,"div",3),l.ɵɵtext(33," "),l.ɵɵelementStart(34,"div",4),l.ɵɵtext(35," "),l.ɵɵelementStart(36,"div",5),l.ɵɵtext(37," "),l.ɵɵelementStart(38,"label",11),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41," "),l.ɵɵelement(42,"input",12),l.ɵɵtext(43," "),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementEnd(),l.ɵɵtext(45," "),l.ɵɵelementEnd(),l.ɵɵtext(46," "),l.ɵɵelementStart(47,"div",5),l.ɵɵtext(48," "),l.ɵɵelementStart(49,"label",13),l.ɵɵtext(50),l.ɵɵpipe(51,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(52," "),l.ɵɵelementStart(53,"textarea",14),l.ɵɵlistener("ngModelChange",(function(e){return t.fileContents=e})),l.ɵɵelementEnd(),l.ɵɵtext(54," "),l.ɵɵelementEnd(),l.ɵɵtext(55," "),l.ɵɵelementStart(56,"button",15),l.ɵɵtext(57," "),l.ɵɵelement(58,"i",16),l.ɵɵpipe(59,"i18n"),l.ɵɵtext(60," "),l.ɵɵelementStart(61,"span"),l.ɵɵtext(62),l.ɵɵpipe(63,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(64," "),l.ɵɵelementEnd(),l.ɵɵtext(65," "),l.ɵɵelementEnd(),l.ɵɵtext(66," ")),2&e&&(l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(4,12,"importData")),l.ɵɵadvance(14),l.ɵɵtextInterpolate1("1. ",l.ɵɵpipeBind1(18,14,"selectFormat"),""),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.format),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",t.featuredImportOptions),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.importOptions&&t.importOptions.length),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",t.format),l.ɵɵadvance(9),l.ɵɵtextInterpolate1("2. ",l.ɵɵpipeBind1(40,16,"selectImportFile"),""),l.ɵɵadvance(11),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(51,18,"orCopyPasteFileContents")),l.ɵɵadvance(3),l.ɵɵproperty("ngModel",t.fileContents),l.ɵɵadvance(3),l.ɵɵproperty("disabled",t.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(59,20,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(63,22,"importData")))},directives:[f.NgControlStatusGroup,f.NgForm,f.SelectControlValueAccessor,f.RequiredValidator,f.NgControlStatus,f.NgModel,h.NgForOf,h.NgIf,f.DefaultValueAccessor,f.NgSelectOption,f.ɵangular_packages_forms_forms_z,v.CalloutComponent],pipes:[y.I18nPipe],encapsulation:2}),e}();t.ImportComponent=ge,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(ge,[{type:a.Component,args:[{selector:"app-import",templateUrl:"import.component.html"}]}],(function(){return[{type:c.I18nService},{type:p.ToasterService},{type:u.ImportService},{type:d.Router},{type:m.PlatformUtilsService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?[4,this.getAllCiphers()]:[3,6];case 4:return e=o.sent(),t=[],n=[],r=new Map,e.forEach((function(e){if(e.type===l.CipherType.Login&&(null==e.login.totp||""===e.login.totp)&&e.login.hasUris&&!e.isDeleted)for(var n=0;n0?[2]:[4,fetch(new Request("https://2fa.directory/api/v2/totp.json"))];case 1:if(200!==(e=a.sent()).status)throw new Error;return[4,e.json()];case 2:for(n in t=a.sent())if(t.hasOwnProperty(n))for(i in r=t[n])r.hasOwnProperty(i)&&null!=(o=r[i]).url&&null!=(s=c.Utils.getHostname(o.url))&&this.services.set(s,o.doc);return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(u.ɵɵdirectiveInject(d.CipherService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(m.MessagingService),u.ɵɵdirectiveInject(f.UserService))},t.ɵcmp=u.ɵɵdefineComponent({type:t,selectors:[["app-inactive-two-factor-report"]],features:[u.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"],["target","_blank","rel","noopener",1,"badge","badge-primary",3,"href"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1," "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵtemplate(5,S,9,6,"small",1),u.ɵɵtext(6," "),u.ɵɵelementEnd(),u.ɵɵtext(7," "),u.ɵɵelementEnd(),u.ɵɵtext(8," "),u.ɵɵelementStart(9,"p"),u.ɵɵtext(10),u.ɵɵpipe(11,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(12," "),u.ɵɵtemplate(13,w,9,6,"div",1),u.ɵɵtext(14," "),u.ɵɵtemplate(15,A,6,2,"div",2),u.ɵɵtext(16," "),u.ɵɵtemplate(17,_,0,0,"ng-template",null,3,u.ɵɵtemplateRefExtractor),u.ɵɵtext(19," ")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(4,5,"inactive2faReport")," "),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),u.ɵɵadvance(5),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(11,7,"inactive2faReportDesc")),u.ɵɵadvance(3),u.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,y.IconComponent,g.StopClickDirective,x.StopPropDirective],pipes:[b.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(p.CipherReportComponent);t.InactiveTwoFactorReportComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(M,[{type:s.Component,args:[{selector:"app-inactive-two-factor-report",templateUrl:"inactive-two-factor-report.component.html"}]}],(function(){return[{type:d.CipherService},{type:u.ComponentFactoryResolver},{type:m.MessagingService},{type:f.UserService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1})),this.ciphers=n,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(d.MessagingService),p.ɵɵdirectiveInject(m.UserService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-reused-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,b,9,6,"small",1),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,S,9,6,"div",1),p.ɵɵtext(14," "),p.ɵɵtemplate(15,A,6,2,"div",2),p.ɵɵtext(16," "),p.ɵɵtemplate(17,_,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(19," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,5,"reusedPasswordsReport")," "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,7,"reusedPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[f.NgIf,h.CalloutComponent,f.NgForOf,v.IconComponent,y.StopClickDirective,g.StopPropDirective],pipes:[x.I18nPipe,f.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.ReusedPasswordsReportComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(M,[{type:s.Component,args:[{selector:"app-reused-passwords-report",templateUrl:"reused-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:p.ComponentFactoryResolver},{type:d.MessagingService},{type:m.UserService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?s.concat(e.login.username.substr(0,c).trim().toLowerCase().split(/[^A-Za-z0-9]/)).filter((function(e){return e.length>=3})):e.login.username.trim().toLowerCase().split(/[^A-Za-z0-9]/).filter((function(e){return e.length>=3}))}var p=i.passwordGenerationService.passwordStrength(e.login.password,s.length>0?s:null);i.passwordStrengthCache.set(a,p.score)}var u=i.passwordStrengthCache.get(a);null!=u&&u<=2&&(i.passwordStrengthMap.set(e.id,i.scoreKey(u)),t.push(e))}})),t.sort((function(e,t){return i.passwordStrengthCache.get(r(e))-i.passwordStrengthCache.get(r(t))})),this.ciphers=t,[2]}}))}))},t.prototype.getAllCiphers=function(){return this.cipherService.getAllDecrypted()},t.prototype.canManageCipher=function(e){return!0},t.prototype.scoreKey=function(e){switch(e){case 4:return["strong","success"];case 3:return["good","primary"];case 2:return["weak","warning"];default:return["veryWeak","danger"]}},t.ɵfac=function(e){return new(e||t)(p.ɵɵdirectiveInject(u.CipherService),p.ɵɵdirectiveInject(d.PasswordGenerationService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(m.MessagingService),p.ɵɵdirectiveInject(f.UserService))},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["app-weak-passwords-report"]],features:[p.ɵɵInheritDefinitionFeature],decls:20,vars:9,consts:[[1,"page-header"],[4,"ngIf"],["class","mt-4",4,"ngIf"],["cipherAddEdit",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cube",3,"title"],["appStopProp","","aria-hidden","true",1,"fa","fa-paperclip",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵtemplate(5,S,9,6,"small",1),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"p"),p.ɵɵtext(10),p.ɵɵpipe(11,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,w,9,6,"div",1),p.ɵɵtext(14," "),p.ɵɵtemplate(15,_,6,2,"div",2),p.ɵɵtext(16," "),p.ɵɵtemplate(17,M,0,0,"ng-template",null,3,p.ɵɵtemplateRefExtractor),p.ɵɵtext(19," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(4,5,"weakPasswordsReport")," "),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded&&t.loading),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(11,7,"weakPasswordsReportDesc")),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",!t.hasLoaded&&t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.hasLoaded))},directives:[h.NgIf,v.CalloutComponent,h.NgForOf,y.IconComponent,g.StopClickDirective,x.StopPropDirective],pipes:[b.I18nPipe,h.DecimalPipe],encapsulation:2}),t}(c.CipherReportComponent);t.WeakPasswordsReportComponent=T,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(T,[{type:s.Component,args:[{selector:"app-weak-passwords-report",templateUrl:"weak-passwords-report.component.html"}]}],(function(){return[{type:u.CipherService},{type:d.PasswordGenerationService},{type:p.ComponentFactoryResolver},{type:m.MessagingService},{type:f.UserService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1)""===r.substr(o).trim()&&(i=o);e+=r.substring(0,i)}this.platformUtilsService.copyToClipboard(e,{window:window})}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ElementRef),i.ɵɵdirectiveInject(o.PlatformUtilsService))},e.ɵdir=i.ɵɵdefineDirective({type:e,selectors:[["","appSelectCopy",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("copy",(function(){return t.onCopy()}))}}),e}();t.SelectCopyDirective=a,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(a,[{type:r.Directive,args:[{selector:"[appSelectCopy]"}]}],(function(){return[{type:i.ElementRef},{type:o.PlatformUtilsService}]}),{onCopy:[{type:r.HostListener,args:["copy"]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ColorPasswordPipe=void 0;var r=n(0),i=n(23),o=n(0),a=function(){function e(){}return e.prototype.transform=function(e){for(var t=Array.from(e),n="",r=0;r":o=">",a=!0;break;case" ":o=" ",a=!0}var s="letter";o.match(i.Utils.regexpEmojiPresentation)?s="emoji":a||o.match(/[^\w ]/)?s="special":o.match(/\d/)&&(s="number"),n+=''+o+""}return n},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=o.ɵɵdefinePipe({name:"colorPassword",type:e,pure:!0}),e}();t.ColorPasswordPipe=a,("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(a,[{type:r.Pipe,args:[{name:"colorPassword"}]}],null,null)},,,,,,function(e,t){},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){function n(e){return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}))}n.keys=function(){return[]},n.resolve=n,e.exports=n,n.id=454},,,,,,,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[],t=this,[4,this.userService.getProvider(this.providerId)];case 2:return t.manageOrganizations=i.sent().type===s.ProviderUserType.ProviderAdmin,[4,this.userService.getAllOrganizations()];case 3:return n=i.sent().filter((function(e){return null==e.providerId})),[4,Promise.all(n.map((function(e){return o.apiService.getOrganization(e.id)}))).then((function(e){return e.filter((function(e){return!F.includes(e.planType)})).map((function(e){return e.id}))}))];case 4:return r=i.sent(),this.addableOrganizations=n.filter((function(e){return r.includes(e.id)})),this.showAddExisting=0!=this.addableOrganizations.length,this.loading=!1,[2]}}))}))},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.clients&&this.clients.length>this.pageSize},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedClients=[],this.loadMore(),[2]}))}))},e.prototype.loadMore=function(){if(this.clients&&!(this.clients.length<=this.pageSize)){var e=this.pagedClients.length,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}},e.prototype.addExistingOrganization=function(){var e=this,t=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.addModalRef.createComponent(t).instance;var n=this.modal.show(c.AddOrganizationComponent,this.addModalRef);n.providerId=this.providerId,n.organizations=this.addableOrganizations,n.onAddedOrganization.subscribe((function(){return r(e,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.load()];case 1:return t.sent(),this.modal.close(),[3,3];case 2:return e=t.sent(),this.logService.error("Handled exception: "+e),[3,3];case 3:return[2]}}))}))})),this.modal.onClosed.subscribe((function(){e.modal=null}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("detachOrganizationConfirmation"),e.organizationName,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2,!1];this.actionPromise=this.providerService.detachOrganizastion(this.providerId,e.id),n.label=2;case 2:return n.trys.push([2,5,,6]),[4,this.actionPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("detachedOrganization",e.organizationName)),[4,this.load()];case 4:return n.sent(),[3,6];case 5:return t=n.sent(),this.validationService.showError(t),[3,6];case 6:return this.actionPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ActivatedRoute),p.ɵɵdirectiveInject(d.UserService),p.ɵɵdirectiveInject(m.ApiService),p.ɵɵdirectiveInject(f.SearchService),p.ɵɵdirectiveInject(h.PlatformUtilsService),p.ɵɵdirectiveInject(v.I18nService),p.ɵɵdirectiveInject(y.ToasterService),p.ɵɵdirectiveInject(g.ValidationService),p.ɵɵdirectiveInject(x.ProviderService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(b.LogService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["ng-component"]],viewQuery:function(e,t){if(1&e&&p.ɵɵviewQuery(O,3,o.ViewContainerRef),2&e){var n;p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.addModalRef=n.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,"fa","fa-plus","fa-fw"],[1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"div",1),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"div"),p.ɵɵtext(9," "),p.ɵɵelementStart(10,"label",2),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13," "),p.ɵɵelementStart(14,"input",3),p.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16," "),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵtemplate(18,A,5,3,"a",4),p.ɵɵtext(19," "),p.ɵɵtemplate(20,_,5,3,"button",5),p.ɵɵtext(21," "),p.ɵɵelementEnd(),p.ɵɵtext(22," "),p.ɵɵelementEnd(),p.ɵɵtext(23," "),p.ɵɵtemplate(24,M,9,6,"ng-container",6),p.ɵɵtext(25," "),p.ɵɵtemplate(26,j,6,2,"ng-container",6),p.ɵɵpipe(27,"search"),p.ɵɵtext(28," "),p.ɵɵtemplate(29,V,0,0,"ng-template",null,7,p.ɵɵtemplateRefExtractor),p.ɵɵtext(31," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,8,"clients")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,10,"search")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("placeholder",p.ɵɵpipeBind1(15,12,"search")),p.ɵɵproperty("ngModel",t.searchText),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.manageOrganizations),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.manageOrganizations&&t.showAddExisting),p.ɵɵadvance(4),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&p.ɵɵpipeBind4(27,14,t.clients,t.searchText,"organizationName","id")))},directives:[S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,w.NgIf,u.RouterLinkWithHref,w.NgForOf,C.AvatarComponent,I.A11yTitleDirective,E.StopClickDirective],pipes:[P.I18nPipe,k.SearchPipe],encapsulation:2}),e}();t.ClientsComponent=N,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(N,[{type:o.Component,args:[{templateUrl:"clients.component.html"}]}],(function(){return[{type:u.ActivatedRoute},{type:d.UserService},{type:m.ApiService},{type:f.SearchService},{type:h.PlatformUtilsService},{type:v.I18nService},{type:y.ToasterService},{type:g.ValidationService},{type:x.ProviderService},{type:p.ComponentFactoryResolver},{type:b.LogService}]}),{addModalRef:[{type:o.ViewChild,args:["add",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.events=this.events.concat(n):this.events=n,this.dirtyDates=!1,this.loading=!1,this.morePromise=null,this.refreshPromise=null,[2]}}))}))},e.prototype.loadAndParseEvents=function(e,t,n){return r(this,void 0,void 0,(function(){var o,s,l=this;return i(this,(function(c){switch(c.label){case 0:return[4,this.requestEvents(e,t,n)];case 1:return o=c.sent(),[4,Promise.all(o.data.map((function(e){return r(l,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:return t=null==e.actingUserId?e.userId:e.actingUserId,[4,this.eventService.getEventInfo(e)];case 1:return n=i.sent(),r=this.getUserName(e,t),[2,new a.EventView({message:n.message,humanReadableMessage:n.humanReadableMessage,appIcon:n.appIcon,appName:n.appName,userId:t,userName:null!=r?r.name:this.i18nService.t("unknown"),userEmail:null!=r?r.email:"",date:e.date,ip:e.ipAddress,type:e.type})]}}))}))})))];case 2:return s=c.sent(),[2,{continuationToken:o.continuationToken,events:s}]}}))}))},e.prototype.parseDates=function(){var e=null;try{e=this.eventService.formatDateFilters(this.start,this.end)}catch(t){return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidDateRange")),null}return e},e.prototype.appApiPromiseUnfulfilled=function(){return null!=this.refreshPromise||null!=this.morePromise||null!=this.exportPromise},e.prototype.export=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s;return i(this,(function(i){switch(i.label){case 0:n=this.continuationToken,r=[].concat(this.events),i.label=1;case 1:return null==n?[3,3]:[4,this.loadAndParseEvents(e,t,n)];case 2:return o=i.sent(),n=o.continuationToken,r=r.concat(o.events),[3,1];case 3:return[4,this.exportService.getEventExport(r)];case 4:return a=i.sent(),s=this.exportService.getFileName(this.exportFileName,"csv"),this.platformUtilsService.saveFile(window,a,{type:"text/plain"},s),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.EventService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.ToasterService),s.ɵɵdirectiveInject(u.ExportService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(m.LogService))},e.ɵdir=s.ɵɵdefineDirective({type:e}),e}();t.BaseEventsComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:l.EventService},{type:c.I18nService},{type:p.ToasterService},{type:u.ExportService},{type:d.PlatformUtilsService},{type:m.LogService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t[0].status===c.ProviderUserStatusType.Confirmed&&this.events(t[0]),null!=n&&n.unsubscribe(),[2]}))}))})),[2]}}))}))}))},t.prototype.getUsers=function(){return this.apiService.getProviderUsers(this.providerId)},t.prototype.deleteUser=function(e){return this.apiService.deleteProviderUser(this.providerId,e)},t.prototype.reinviteUser=function(e){return this.apiService.postProviderUserReinvite(this.providerId,e)},t.prototype.confirmUser=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){switch(o.label){case 0:return[4,this.cryptoService.getProviderKey(this.providerId)];case 1:return n=o.sent(),[4,this.cryptoService.rsaEncrypt(n.key,t.buffer)];case 2:return r=o.sent(),(i=new d.ProviderUserConfirmRequest).key=r.encryptedString,[4,this.apiService.postProviderUserConfirm(this.providerId,e.id,i)];case 3:return o.sent(),[2]}}))}))},t.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(f.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(x.UserAddEditComponent,this.addEditModalRef);r.name=this.userNamePipe.transform(e),r.providerId=this.providerId,r.providerUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedUser.subscribe((function(){t.modal.close(),t.removeUser(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},t.prototype.events=function(e){return a(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(f.ModalComponent),this.modal=this.eventsModalRef.createComponent(t).instance,(n=this.modal.show(v.EntityEventsComponent,this.eventsModalRef)).name=this.userNamePipe.transform(e),n.providerId=this.providerId,n.entityId=e.id,n.showUser=!1,n.entity="user",this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},t.prototype.bulkRemove=function(){return a(this,void 0,void 0,(function(){var e,t,n=this;return s(this,(function(r){return null!=this.actionPromise||(null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(f.ModalComponent),this.modal=this.bulkRemoveModalRef.createComponent(e).instance,(t=this.modal.show(g.BulkRemoveComponent,this.bulkRemoveModalRef)).providerId=this.providerId,t.users=this.getCheckedUsers(),this.modal.onClosed.subscribe((function(){return a(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.modal=null,[2]}}))}))}))),[2]}))}))},t.prototype.bulkReinvite=function(){return a(this,void 0,void 0,(function(){var e,t,n,r;return s(this,(function(i){if(null!=this.actionPromise)return[2];if(e=this.getCheckedUsers(),(t=e.filter((function(e){return e.status===c.ProviderUserStatusType.Invited}))).length<=0)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable")),[2];try{n=new u.ProviderUserBulkRequest(t.map((function(e){return e.id}))),r=this.apiService.postManyProviderUserReinvite(this.providerId,n),this.showBulkStatus(e,t,r,this.i18nService.t("bulkReinviteMessage"))}catch(o){this.validationService.showError(o)}return this.actionPromise=null,[2]}))}))},t.prototype.bulkConfirm=function(){return a(this,void 0,void 0,(function(){var e,t,n=this;return s(this,(function(r){return null!=this.actionPromise||(null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(f.ModalComponent),this.modal=this.bulkConfirmModalRef.createComponent(e).instance,(t=this.modal.show(y.BulkConfirmComponent,this.bulkConfirmModalRef)).providerId=this.providerId,t.users=this.getCheckedUsers(),this.modal.onClosed.subscribe((function(){return a(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.modal=null,[2]}}))}))}))),[2]}))}))},t.prototype.showBulkStatus=function(e,t,n,r){return a(this,void 0,void 0,(function(){var i,a,l,c,p,u,d=this;return s(this,(function(s){switch(s.label){case 0:i=this.componentFactoryResolver.resolveComponentFactory(f.ModalComponent),this.modal=this.bulkStatusModalRef.createComponent(i).instance,(a=this.modal.show(h.BulkStatusComponent,this.bulkStatusModalRef)).loading=!0,l=!1,this.modal.onShown.subscribe((function(){l&&d.modal.close()})),this.modal.onClosed.subscribe((function(){d.modal=null})),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n];case 2:return c=s.sent(),this.modal&&(p=c.data.filter((function(e){return""!==e.error})).reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t.error,n))}),{}),u=t.reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t,n))}),{}),a.users=e.map((function(e){var t,n=null!==(t=p[e.id])&&void 0!==t?t:r;return u.hasOwnProperty(e.id)||(n=d.i18nService.t("bulkFilteredMessage")),{user:e,error:p.hasOwnProperty(e.id),message:n}})),a.loading=!1),[3,4];case 3:return s.sent(),l=!0,this.modal&&this.modal.close(),[3,4];case 4:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(b.ɵɵdirectiveInject(S.ApiService),b.ɵɵdirectiveInject(w.ActivatedRoute),b.ɵɵdirectiveInject(C.I18nService),b.ɵɵdirectiveInject(b.ComponentFactoryResolver),b.ɵɵdirectiveInject(I.PlatformUtilsService),b.ɵɵdirectiveInject(E.ToasterService),b.ɵɵdirectiveInject(P.CryptoService),b.ɵɵdirectiveInject(k.UserService),b.ɵɵdirectiveInject(w.Router),b.ɵɵdirectiveInject(O.StorageService),b.ɵɵdirectiveInject(A.SearchService),b.ɵɵdirectiveInject(_.ValidationService),b.ɵɵdirectiveInject(M.LogService),b.ɵɵdirectiveInject(T.SearchPipe),b.ɵɵdirectiveInject(D.UserNamePipe))},t.ɵcmp=b.ɵɵdefineComponent({type:t,selectors:[["provider-people"]],viewQuery:function(e,t){if(1&e&&(b.ɵɵviewQuery(L,3,l.ViewContainerRef),b.ɵɵviewQuery(K,3,l.ViewContainerRef),b.ɵɵviewQuery(G,3,l.ViewContainerRef),b.ɵɵviewQuery(q,3,l.ViewContainerRef),b.ɵɵviewQuery(H,3,l.ViewContainerRef),b.ɵɵviewQuery(W,3,l.ViewContainerRef)),2&e){var n=void 0;b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.addEditModalRef=n.first),b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.groupsModalRef=n.first),b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.eventsModalRef=n.first),b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.bulkStatusModalRef=n.first),b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.bulkConfirmModalRef=n.first),b.ɵɵqueryRefresh(n=b.ɵɵloadQuery())&&(t.bulkRemoveModalRef=n.first)}},features:[b.ɵɵ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,"fa","fa-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"dropdown-divider"],["aria-hidden","true",1,"fa","fa-fw","fa-check-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-minus-square-o"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-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,"fa","fa-fw","fa-check"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","fa-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","fa-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,"fa","fa-cog","fa-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,"fa","fa-lock",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-sitemap"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"]],template:function(e,t){1&e&&(b.ɵɵelementStart(0,"div",0),b.ɵɵtext(1," "),b.ɵɵelementStart(2,"h1"),b.ɵɵtext(3),b.ɵɵpipe(4,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(5," "),b.ɵɵelementStart(6,"div",1),b.ɵɵtext(7," "),b.ɵɵelementStart(8,"div",2),b.ɵɵtext(9," "),b.ɵɵelementStart(10,"button",3),b.ɵɵlistener("click",(function(){return t.filter(null)})),b.ɵɵtext(11),b.ɵɵpipe(12,"i18n"),b.ɵɵtemplate(13,$,2,1,"span",4),b.ɵɵtext(14," "),b.ɵɵelementEnd(),b.ɵɵtext(15," "),b.ɵɵelementStart(16,"button",3),b.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),b.ɵɵtext(17),b.ɵɵpipe(18,"i18n"),b.ɵɵtemplate(19,Q,2,1,"span",4),b.ɵɵtext(20," "),b.ɵɵelementEnd(),b.ɵɵtext(21," "),b.ɵɵelementStart(22,"button",3),b.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),b.ɵɵtext(23),b.ɵɵpipe(24,"i18n"),b.ɵɵtemplate(25,Y,2,1,"span",5),b.ɵɵtext(26," "),b.ɵɵelementEnd(),b.ɵɵtext(27," "),b.ɵɵelementEnd(),b.ɵɵtext(28," "),b.ɵɵelementStart(29,"div",6),b.ɵɵtext(30," "),b.ɵɵelementStart(31,"label",7),b.ɵɵtext(32),b.ɵɵpipe(33,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(34," "),b.ɵɵelementStart(35,"input",8),b.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),b.ɵɵpipe(36,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(37," "),b.ɵɵelementEnd(),b.ɵɵtext(38," "),b.ɵɵelementStart(39,"div",9),b.ɵɵtext(40," "),b.ɵɵelementStart(41,"button",10),b.ɵɵpipe(42,"i18n"),b.ɵɵtext(43," "),b.ɵɵelement(44,"i",11),b.ɵɵtext(45," "),b.ɵɵelementEnd(),b.ɵɵtext(46," "),b.ɵɵelementStart(47,"div",12),b.ɵɵtext(48," "),b.ɵɵelementStart(49,"button",13),b.ɵɵlistener("click",(function(){return t.bulkReinvite()})),b.ɵɵtext(50," "),b.ɵɵelement(51,"i",14),b.ɵɵtext(52),b.ɵɵpipe(53,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(54," "),b.ɵɵtemplate(55,J,5,3,"button",15),b.ɵɵtext(56," "),b.ɵɵelementStart(57,"button",16),b.ɵɵlistener("click",(function(){return t.bulkRemove()})),b.ɵɵtext(58," "),b.ɵɵelement(59,"i",17),b.ɵɵtext(60),b.ɵɵpipe(61,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(62," "),b.ɵɵelement(63,"div",18),b.ɵɵtext(64," "),b.ɵɵelementStart(65,"button",13),b.ɵɵlistener("click",(function(){return t.selectAll(!0)})),b.ɵɵtext(66," "),b.ɵɵelement(67,"i",19),b.ɵɵtext(68),b.ɵɵpipe(69,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(70," "),b.ɵɵelementStart(71,"button",13),b.ɵɵlistener("click",(function(){return t.selectAll(!1)})),b.ɵɵtext(72," "),b.ɵɵelement(73,"i",20),b.ɵɵtext(74),b.ɵɵpipe(75,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(76," "),b.ɵɵelementEnd(),b.ɵɵtext(77," "),b.ɵɵelementEnd(),b.ɵɵtext(78," "),b.ɵɵelementStart(79,"button",21),b.ɵɵlistener("click",(function(){return t.invite()})),b.ɵɵtext(80," "),b.ɵɵelement(81,"i",22),b.ɵɵtext(82),b.ɵɵpipe(83,"i18n"),b.ɵɵelementEnd(),b.ɵɵtext(84," "),b.ɵɵelementEnd(),b.ɵɵtext(85," "),b.ɵɵelementEnd(),b.ɵɵtext(86," "),b.ɵɵtemplate(87,Z,9,6,"ng-container",23),b.ɵɵtext(88," "),b.ɵɵtemplate(89,fe,6,2,"ng-container",23),b.ɵɵpipe(90,"search"),b.ɵɵtext(91," "),b.ɵɵtemplate(92,he,0,0,"ng-template",null,24,b.ɵɵtemplateRefExtractor),b.ɵɵtext(94," "),b.ɵɵtemplate(95,ve,0,0,"ng-template",null,25,b.ɵɵtemplateRefExtractor),b.ɵɵtext(97," "),b.ɵɵtemplate(98,ye,0,0,"ng-template",null,26,b.ɵɵtemplateRefExtractor),b.ɵɵtext(100," "),b.ɵɵtemplate(101,ge,0,0,"ng-template",null,27,b.ɵɵtemplateRefExtractor),b.ɵɵtext(103," "),b.ɵɵtemplate(104,xe,0,0,"ng-template",null,28,b.ɵɵtemplateRefExtractor),b.ɵɵtext(106," "),b.ɵɵtemplate(107,be,0,0,"ng-template",null,29,b.ɵɵtemplateRefExtractor),b.ɵɵtext(109," ")),2&e&&(b.ɵɵadvance(3),b.ɵɵtextInterpolate(b.ɵɵpipeBind1(4,22,"people")),b.ɵɵadvance(7),b.ɵɵproperty("ngClass",b.ɵɵpureFunction1(52,Se,null==t.status)),b.ɵɵadvance(1),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(12,24,"all")," "),b.ɵɵadvance(2),b.ɵɵproperty("ngIf",t.allCount),b.ɵɵadvance(3),b.ɵɵproperty("ngClass",b.ɵɵpureFunction1(54,Se,t.status==t.userStatusType.Invited)),b.ɵɵadvance(1),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(18,26,"invited")," "),b.ɵɵadvance(2),b.ɵɵproperty("ngIf",t.invitedCount),b.ɵɵadvance(3),b.ɵɵproperty("ngClass",b.ɵɵpureFunction1(56,Se,t.status==t.userStatusType.Accepted)),b.ɵɵadvance(1),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(24,28,"accepted")," "),b.ɵɵadvance(2),b.ɵɵproperty("ngIf",t.acceptedCount),b.ɵɵadvance(7),b.ɵɵtextInterpolate(b.ɵɵpipeBind1(33,30,"search")),b.ɵɵadvance(3),b.ɵɵpropertyInterpolate("placeholder",b.ɵɵpipeBind1(36,32,"search")),b.ɵɵproperty("ngModel",t.searchText),b.ɵɵadvance(6),b.ɵɵpropertyInterpolate("appA11yTitle",b.ɵɵpipeBind1(42,34,"options")),b.ɵɵadvance(11),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(53,36,"reinviteSelected")," "),b.ɵɵadvance(3),b.ɵɵproperty("ngIf",t.showBulkConfirmUsers),b.ɵɵadvance(5),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(61,38,"remove")," "),b.ɵɵadvance(8),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(69,40,"selectAll")," "),b.ɵɵadvance(6),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(75,42,"unselectAll")," "),b.ɵɵadvance(8),b.ɵɵtextInterpolate1(" ",b.ɵɵpipeBind1(83,44,"inviteUser")," "),b.ɵɵadvance(5),b.ɵɵproperty("ngIf",t.loading),b.ɵɵadvance(2),b.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:b.ɵɵpipeBindV(90,46,b.ɵɵpureFunction2(58,we,t.users,t.searchText)))))},directives:[R.NgClass,R.NgIf,B.DefaultValueAccessor,B.NgControlStatus,B.NgModel,U.A11yTitleDirective,j.StopClickDirective,R.NgForOf,V.CalloutComponent,B.CheckboxControlValueAccessor,F.StopPropDirective,N.AvatarComponent],pipes:[z.I18nPipe,T.SearchPipe,D.UserNamePipe],encapsulation:2}),t}(m.BasePeopleComponent);t.PeopleComponent=Ce,("undefined"==typeof ngDevMode||ngDevMode)&&b.ɵsetClassMetadata(Ce,[{type:l.Component,args:[{selector:"provider-people",templateUrl:"people.component.html"}]}],(function(){return[{type:S.ApiService},{type:w.ActivatedRoute},{type:C.I18nService},{type:b.ComponentFactoryResolver},{type:I.PlatformUtilsService},{type:E.ToasterService},{type:P.CryptoService},{type:k.UserService},{type:w.Router},{type:O.StorageService},{type:A.SearchService},{type:_.ValidationService},{type:M.LogService},{type:T.SearchPipe},{type:D.UserNamePipe}]}),{addEditModalRef:[{type:l.ViewChild,args:["addEdit",{read:l.ViewContainerRef,static:!0}]}],groupsModalRef:[{type:l.ViewChild,args:["groupsTemplate",{read:l.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:l.ViewChild,args:["eventsTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkStatusModalRef:[{type:l.ViewChild,args:["bulkStatusTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkConfirmModalRef:[{type:l.ViewChild,args:["bulkConfirmTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkRemoveModalRef:[{type:l.ViewChild,args:["bulkRemoveTemplate",{read:l.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&this.confirmedCount>0&&this.confirmedCount<3&&this.acceptedCount>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"showBulkConfirmUsers",{get:function(){return this.acceptedCount>0},enumerable:!1,configurable:!0}),e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t,n,r,o=this;return i(this,(function(i){switch(i.label){case 0:return[4,this.getUsers()];case 1:for(e=i.sent(),this.statusMap.clear(),t=0,n=s.Utils.iterateEnum(this.userStatusType);t0?e.data:[],this.allUsers.sort(s.Utils.getSortFunction(this.i18nService,"email")),this.allUsers.forEach((function(e){o.statusMap.has(e.status)?o.statusMap.get(e.status).push(e):o.statusMap.set(e.status,[e])})),this.filter(this.status),this.loading=!1,[2]}}))}))},e.prototype.filter=function(e){this.status=e,null!=this.status?this.users=this.statusMap.get(this.status):this.users=this.allUsers,this.selectAll(!1),this.resetPaging()},e.prototype.loadMore=function(){if(this.users&&!(this.users.length<=this.pageSize)){var e=this.pagedUsers.length,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}},e.prototype.checkUser=function(e,t){e.checked=null==t?!e.checked:t},e.prototype.selectAll=function(e){e&&this.selectAll(!1);for(var t=this.searchPipe.transform(this.users,this.searchText,"name","email","id"),n=e&&t.length>500?500:t.length,r=0;r-1&&(t.statusMap.get(t.userStatusType.Accepted).splice(n,1),t.statusMap.get(t.userStatusType.Confirmed).push(e))}(this),this.toasterService.popAsync("success",null,this.i18nService.t("hasBeenConfirmed",this.userNamePipe.transform(e))),[3,4];case 2:throw n=r.sent(),this.validationService.showError(n),n;case 3:return this.actionPromise=null,[7];case 4:return[2]}}))}))},null!=this.actionPromise)return[2];v.label=1;case 1:return v.trys.push([1,9,,10]),[4,this.apiService.getUserPublicKey(e.userId)];case 2:return n=v.sent(),o=s.Utils.fromB64ToArray(n.publicKey),[4,this.storageService.get(a.ConstantsService.autoConfirmFingerprints)];case 3:if(null==(p=v.sent())||!p)return null!=this.modal&&this.modal.close(),u=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent),this.modal=this.confirmModalRef.createComponent(u).instance,(d=this.modal.show(c.UserConfirmComponent,this.confirmModalRef)).name=this.userNamePipe.transform(e),d.userId=null!=e?e.userId:null,d.publicKey=o,d.onConfirmedUser.subscribe((function(){return r(h,void 0,void 0,(function(){var e;return i(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,t(o)];case 1:return n.sent(),this.modal.close(),[3,3];case 2:return e=n.sent(),this.logService.error("Handled exception: "+e),[3,3];case 3:return[2]}}))}))})),this.modal.onClosed.subscribe((function(){h.modal=null})),[2];v.label=4;case 4:return v.trys.push([4,6,,7]),[4,this.cryptoService.getFingerprint(e.userId,o.buffer)];case 5:return m=v.sent(),this.logService.info("User's fingerprint: "+m.join("-")),[3,7];case 6:return v.sent(),[3,7];case 7:return[4,t(o)];case 8:return v.sent(),[3,10];case 9:return f=v.sent(),this.logService.error("Handled exception: "+f),[3,10];case 10:return[2]}}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.users&&this.users.length>this.pageSize},e.prototype.getCheckedUsers=function(){return this.users.filter((function(e){return e.checked}))},e.prototype.removeUser=function(e){var 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))>-1&&this.statusMap.get(e.status).splice(t,1)},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.SearchService),p.ɵɵdirectiveInject(m.I18nService),p.ɵɵdirectiveInject(f.PlatformUtilsService),p.ɵɵdirectiveInject(h.ToasterService),p.ɵɵdirectiveInject(v.CryptoService),p.ɵɵdirectiveInject(y.StorageService),p.ɵɵdirectiveInject(g.ValidationService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(x.LogService),p.ɵɵdirectiveInject(b.SearchPipe),p.ɵɵdirectiveInject(S.UserNamePipe))},e.ɵdir=p.ɵɵdefineDirective({type:e,viewQuery:function(e,t){if(1&e&&p.ɵɵviewQuery(w,3,o.ViewContainerRef),2&e){var n;p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.confirmModalRef=n.first)}}}),e}();t.BasePeopleComponent=C,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(C,[{type:o.Directive}],(function(){return[{type:u.ApiService},{type:d.SearchService},{type:m.I18nService},{type:f.PlatformUtilsService},{type:h.ToasterService},{type:v.CryptoService},{type:y.StorageService},{type:g.ValidationService},{type:p.ComponentFactoryResolver},{type:x.LogService},{type:b.SearchPipe},{type:S.UserNamePipe}]}),{confirmModalRef:[{type:o.ViewChild,args:["confirmTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&!n.error),p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,3,"user")),p.ɵɵadvance(5),p.ɵɵproperty("ngForOf",n.users)}}function C(e,t){if(1&e&&(p.ɵɵelementStart(0,"small",24),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit;p.ɵɵadvance(1),p.ɵɵtextInterpolate(n.name)}}function I(e,t){if(1&e&&(p.ɵɵelementStart(0,"td"),p.ɵɵtext(1),p.ɵɵelementEnd()),2&e){var n=p.ɵɵnextContext().$implicit,r=p.ɵɵnextContext(2);p.ɵɵadvance(1),p.ɵɵtextInterpolate1(" ",r.statuses.get(n.id)," ")}}function E(e,t){1&e&&(p.ɵɵelementStart(0,"td"),p.ɵɵtext(1),p.ɵɵpipe(2,"i18n"),p.ɵɵelementEnd()),2&e&&(p.ɵɵadvance(1),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(2,1,"bulkFilteredMessage")," "))}function P(e,t){if(1&e&&(p.ɵɵelementStart(0,"tr"),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"td",21),p.ɵɵtext(3," "),p.ɵɵelement(4,"app-avatar",22),p.ɵɵpipe(5,"userName"),p.ɵɵtext(6," "),p.ɵɵelementEnd(),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"td"),p.ɵɵtext(9),p.ɵɵtemplate(10,C,2,1,"small",23),p.ɵɵtext(11," "),p.ɵɵelementEnd(),p.ɵɵtext(12," "),p.ɵɵtemplate(13,I,2,1,"td",10),p.ɵɵtext(14," "),p.ɵɵtemplate(15,E,3,3,"td",10),p.ɵɵtext(16," "),p.ɵɵelementEnd()),2&e){var n=t.$implicit,r=p.ɵɵnextContext(2);p.ɵɵadvance(4),p.ɵɵproperty("data",p.ɵɵpipeBind1(5,8,n))("email",n.email)("circle",!0)("fontSize",14),p.ɵɵadvance(5),p.ɵɵtextInterpolate1(" ",n.email," "),p.ɵɵadvance(1),p.ɵɵproperty("ngIf",n.name),p.ɵɵadvance(3),p.ɵɵproperty("ngIf",r.statuses.has(n.id)),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!r.statuses.has(n.id))}}function k(e,t){if(1&e&&(p.ɵɵelementContainerStart(0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"table",17),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"thead"),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"tr"),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"th",18),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"th"),p.ɵɵtext(13),p.ɵɵpipe(14,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(15," "),p.ɵɵelementEnd(),p.ɵɵtext(16," "),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵtemplate(18,P,17,10,"tr",19),p.ɵɵtext(19," "),p.ɵɵelementEnd(),p.ɵɵtext(20," "),p.ɵɵelementContainerEnd()),2&e){var n=p.ɵɵnextContext();p.ɵɵadvance(9),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(10,3,"user")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(14,5,"status")),p.ɵɵadvance(5),p.ɵɵproperty("ngForOf",n.users)}}function O(e,t){if(1&e){var n=p.ɵɵgetCurrentView();p.ɵɵelementStart(0,"button",25),p.ɵɵlistener("click",(function(){return p.ɵɵrestoreView(n),p.ɵɵnextContext().submit()})),p.ɵɵtext(1," "),p.ɵɵelement(2,"i",26),p.ɵɵpipe(3,"i18n"),p.ɵɵtext(4," "),p.ɵɵelementStart(5,"span"),p.ɵɵtext(6),p.ɵɵpipe(7,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(8," "),p.ɵɵelementEnd()}if(2&e){var r=p.ɵɵnextContext();p.ɵɵproperty("disabled",r.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(3,3,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(7,5,"removeUsers"))}}var A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.deleteUsers=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return e=new l.ProviderUserBulkRequest(this.users.map((function(e){return e.id}))),[4,this.apiService.deleteManyProviderUsers(this.providerId,e)];case 1:return[2,t.sent()]}}))}))},t.ɵfac=function(e){return _(e||t)},t.ɵcmp=p.ɵɵdefineComponent({type:t,selectors:[["ng-component"]],inputs:{providerId:"providerId"},features:[p.ɵɵInheritDefinitionFeature],decls:43,vars:14,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-spin",3,"title"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"div",2),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"div",3),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"h2",4),p.ɵɵtext(9),p.ɵɵpipe(10,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",5),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",6),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵelementStart(20,"div",7),p.ɵɵtext(21," "),p.ɵɵtemplate(22,y,3,3,"app-callout",8),p.ɵɵtext(23," "),p.ɵɵtemplate(24,g,2,1,"app-callout",9),p.ɵɵtext(25," "),p.ɵɵtemplate(26,w,19,5,"ng-container",10),p.ɵɵtext(27," "),p.ɵɵtemplate(28,k,21,7,"ng-container",10),p.ɵɵtext(29," "),p.ɵɵelementEnd(),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"div",11),p.ɵɵtext(32," "),p.ɵɵtemplate(33,O,9,7,"button",12),p.ɵɵtext(34," "),p.ɵɵelementStart(35,"button",13),p.ɵɵtext(36),p.ɵɵpipe(37,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(38," "),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementEnd(),p.ɵɵtext(40," "),p.ɵɵelementEnd(),p.ɵɵtext(41," "),p.ɵɵelementEnd(),p.ɵɵtext(42," ")),2&e&&(p.ɵɵadvance(9),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(10,8,"removeUsers")," "),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(10),p.ɵɵproperty("ngIf",t.users.length<=0),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.error),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.done),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",t.done),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",!t.done&&t.users.length>0),p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(37,12,"close")))},directives:[u.A11yTitleDirective,d.NgIf,m.CalloutComponent,d.NgForOf,f.AvatarComponent],pipes:[h.I18nPipe,v.UserNamePipe],encapsulation:2}),t}(c.BulkRemoveComponent);t.BulkRemoveComponent=A;var _=p.ɵɵgetInheritedFactory(A);("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(A,[{type:s.Component,args:[{templateUrl:"/src/app/organizations/manage/bulk/bulk-remove.component.html"}]}],null,{providerId:[{type:s.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"+t.sanitizer.sanitize(l.SecurityContext.HTML,e)+"
"})),n.body=r,n.bodyOutputType=s.BodyOutputType.TrustedHtml}null!=e.options&&(!0===e.options.trustedHtml&&(n.bodyOutputType=s.BodyOutputType.TrustedHtml),null!=e.options.timeout&&e.options.timeout>0&&(n.timeout=e.options.timeout)),this.toasterService.popAsync(n)},e.prototype.idleStateChanged=function(){this.isIdle?this.notificationsService.disconnectFromInactivity():this.notificationsService.reconnectFromActivity()},e.prototype.setFullWidth=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get("enableFullWidth")];case 1:return e.sent()?document.body.classList.add("full-width"):document.body.classList.remove("full-width"),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.BroadcasterService),u.ɵɵdirectiveInject(m.UserService),u.ɵɵdirectiveInject(f.TokenService),u.ɵɵdirectiveInject(h.FolderService),u.ɵɵdirectiveInject(v.SettingsService),u.ɵɵdirectiveInject(y.SyncService),u.ɵɵdirectiveInject(g.PasswordGenerationService),u.ɵɵdirectiveInject(x.CipherService),u.ɵɵdirectiveInject(b.AuthService),u.ɵɵdirectiveInject(S.Router),u.ɵɵdirectiveInject(w.ToasterService),u.ɵɵdirectiveInject(C.I18nService),u.ɵɵdirectiveInject(I.PlatformUtilsService),u.ɵɵdirectiveInject(u.NgZone),u.ɵɵdirectiveInject(E.VaultTimeoutService),u.ɵɵdirectiveInject(P.StorageService),u.ɵɵdirectiveInject(k.CryptoService),u.ɵɵdirectiveInject(O.CollectionService),u.ɵɵdirectiveInject(A.DomSanitizer),u.ɵɵdirectiveInject(_.SearchService),u.ɵɵdirectiveInject(M.NotificationsService),u.ɵɵdirectiveInject(T.RouterService),u.ɵɵdirectiveInject(D.StateService),u.ɵɵdirectiveInject(R.EventService),u.ɵɵdirectiveInject(B.PolicyService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-root"]],decls:4,vars:1,consts:[["aria-live","polite",3,"toasterconfig"]],template:function(e,t){1&e&&(u.ɵɵelement(0,"toaster-container",0),u.ɵɵtext(1," "),u.ɵɵelement(2,"router-outlet"),u.ɵɵtext(3," ")),2&e&&u.ɵɵproperty("toasterconfig",t.toasterConfig)},directives:[w.ToasterContainerComponent,S.RouterOutlet],encapsulation:2}),e}();t.AppComponent=j,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(j,[{type:l.Component,args:[{selector:"app-root",templateUrl:"app.component.html"}]}],(function(){return[{type:d.BroadcasterService},{type:m.UserService},{type:f.TokenService},{type:h.FolderService},{type:v.SettingsService},{type:y.SyncService},{type:g.PasswordGenerationService},{type:x.CipherService},{type:b.AuthService},{type:S.Router},{type:w.ToasterService},{type:C.I18nService},{type:I.PlatformUtilsService},{type:u.NgZone},{type:E.VaultTimeoutService},{type:P.StorageService},{type:k.CryptoService},{type:O.CollectionService},{type:A.DomSanitizer},{type:_.SearchService},{type:M.NotificationsService},{type:T.RouterService},{type:D.StateService},{type:R.EventService},{type:B.PolicyService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&(this.email=n.email),null!=n.premium?this.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=n.org&&this.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:n.org}}),[4,e.prototype.ngOnInit.call(this)];case 1:return r.sent(),null!=t&&t.unsubscribe(),[2]}}))}))})),[4,this.stateService.get("orgInvitation")];case 1:if(null==(n=c.sent()))return[3,6];r=null,c.label=2;case 2:return c.trys.push([2,4,,5]),[4,this.apiService.getPoliciesByToken(n.organizationId,n.token,n.email,n.organizationUserId)];case 3:return i=c.sent(),r=this.policyService.mapPoliciesFromToken(i),[3,5];case 4:return c.sent(),[3,5];case 5:null!=r&&(s=this.policyService.getResetPasswordPolicyOptions(r,n.organizationId),this.showResetPasswordAutoEnrollWarning=s[1]&&s[0].autoEnrollEnabled),c.label=6;case 6:return[2]}}))}))},t.prototype.goAfterLogIn=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return[4,this.stateService.get("loginRedirect")];case 1:return null==(e=t.sent())?[3,3]:(this.router.navigate([e.route],{queryParams:e.qParams}),[4,this.stateService.remove("loginRedirect")]);case 2:return t.sent(),[3,4];case 3:this.router.navigate([this.successRoute]),t.label=4;case 4:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(c.ɵɵdirectiveInject(p.AuthService),c.ɵɵdirectiveInject(u.Router),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(u.ActivatedRoute),c.ɵɵdirectiveInject(m.StorageService),c.ɵɵdirectiveInject(f.StateService),c.ɵɵdirectiveInject(h.PlatformUtilsService),c.ɵɵdirectiveInject(v.EnvironmentService),c.ɵɵdirectiveInject(y.PasswordGenerationService),c.ɵɵdirectiveInject(g.CryptoFunctionService),c.ɵɵdirectiveInject(x.ApiService),c.ɵɵdirectiveInject(b.PolicyService))},t.ɵcmp=c.ɵɵdefineComponent({type:t,selectors:[["app-login"]],features:[c.ɵɵInheritDefinitionFeature],decls:102,vars:45,consts:[["ngNativeValidate","",1,"container",3,"appApiAction","ngSubmit"],["form",""],[1,"row","justify-content-md-center","mt-5"],[1,"col-5"],["src","images/logo-dark@2x.png","alt","Bitwarden",1,"logo","mb-2"],[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,"fa","fa-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,"fa","fa-sign-in"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/register",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"queryParams"],["aria-hidden","true",1,"fa","fa-pencil-square-o"],["routerLink","/sso",1,"btn","btn-outline-secondary","btn-block","mt-2"],["aria-hidden","true",1,"fa","fa-bank"],["type","warning",3,"title"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"form",0,1),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(2," "),c.ɵɵelementStart(3,"div",2),c.ɵɵtext(4," "),c.ɵɵelementStart(5,"div",3),c.ɵɵtext(6," "),c.ɵɵelement(7,"img",4),c.ɵɵtext(8," "),c.ɵɵelementStart(9,"p",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(12," "),c.ɵɵelementStart(13,"div",6),c.ɵɵtext(14," "),c.ɵɵelementStart(15,"div",7),c.ɵɵtext(16," "),c.ɵɵtemplate(17,O,4,6,"app-callout",8),c.ɵɵtext(18," "),c.ɵɵelementStart(19,"div",9),c.ɵɵtext(20," "),c.ɵɵelementStart(21,"label",10),c.ɵɵtext(22),c.ɵɵpipe(23,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(24," "),c.ɵɵelementStart(25,"input",11),c.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),c.ɵɵelementEnd(),c.ɵɵtext(26," "),c.ɵɵelementEnd(),c.ɵɵtext(27," "),c.ɵɵelementStart(28,"div",9),c.ɵɵtext(29," "),c.ɵɵelementStart(30,"label",12),c.ɵɵtext(31),c.ɵɵpipe(32,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(33," "),c.ɵɵelementStart(34,"div",13),c.ɵɵtext(35," "),c.ɵɵelementStart(36,"input",14),c.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e})),c.ɵɵelementEnd(),c.ɵɵtext(37," "),c.ɵɵelementStart(38,"button",15),c.ɵɵlistener("click",(function(){return t.togglePassword()})),c.ɵɵpipe(39,"i18n"),c.ɵɵtext(40," "),c.ɵɵelement(41,"i",16),c.ɵɵtext(42," "),c.ɵɵelementEnd(),c.ɵɵtext(43," "),c.ɵɵelementEnd(),c.ɵɵtext(44," "),c.ɵɵelementStart(45,"small",17),c.ɵɵtext(46," "),c.ɵɵelementStart(47,"a",18),c.ɵɵtext(48),c.ɵɵpipe(49,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(50," "),c.ɵɵelementEnd(),c.ɵɵtext(51," "),c.ɵɵelementEnd(),c.ɵɵtext(52," "),c.ɵɵelementStart(53,"div",19),c.ɵɵtext(54," "),c.ɵɵelementStart(55,"input",20),c.ɵɵlistener("ngModelChange",(function(e){return t.rememberEmail=e})),c.ɵɵelementEnd(),c.ɵɵtext(56," "),c.ɵɵelementStart(57,"label",21),c.ɵɵtext(58),c.ɵɵpipe(59,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(60," "),c.ɵɵelementEnd(),c.ɵɵtext(61," "),c.ɵɵelementStart(62,"div",22),c.ɵɵelement(63,"iframe",23),c.ɵɵelementEnd(),c.ɵɵtext(64," "),c.ɵɵelement(65,"hr"),c.ɵɵtext(66," "),c.ɵɵelementStart(67,"div",13),c.ɵɵtext(68," "),c.ɵɵelementStart(69,"button",24),c.ɵɵtext(70," "),c.ɵɵelementStart(71,"span"),c.ɵɵtext(72," "),c.ɵɵelement(73,"i",25),c.ɵɵtext(74),c.ɵɵpipe(75,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(76," "),c.ɵɵelement(77,"i",26),c.ɵɵpipe(78,"i18n"),c.ɵɵtext(79," "),c.ɵɵelementEnd(),c.ɵɵtext(80," "),c.ɵɵelementStart(81,"a",27),c.ɵɵtext(82," "),c.ɵɵelement(83,"i",28),c.ɵɵtext(84),c.ɵɵpipe(85,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(86," "),c.ɵɵelementEnd(),c.ɵɵtext(87," "),c.ɵɵelementStart(88,"div",13),c.ɵɵtext(89," "),c.ɵɵelementStart(90,"a",29),c.ɵɵtext(91," "),c.ɵɵelement(92,"i",30),c.ɵɵtext(93),c.ɵɵpipe(94,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(95," "),c.ɵɵelementEnd(),c.ɵɵtext(96," "),c.ɵɵelementEnd(),c.ɵɵtext(97," "),c.ɵɵelementEnd(),c.ɵɵtext(98," "),c.ɵɵelementEnd(),c.ɵɵtext(99," "),c.ɵɵelementEnd(),c.ɵɵtext(100," "),c.ɵɵelementEnd(),c.ɵɵtext(101," ")),2&e){var n=c.ɵɵreference(1);c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(10),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(11,20,"loginOrCreateNewAccount")),c.ɵɵadvance(7),c.ɵɵproperty("ngIf",t.showResetPasswordAutoEnrollWarning),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(23,22,"emailAddress")),c.ɵɵadvance(3),c.ɵɵproperty("ngModel",t.email),c.ɵɵadvance(6),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(32,24,"masterPass")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.masterPassword),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(39,26,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(40,A,!t.showPassword,t.showPassword)),c.ɵɵadvance(7),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(49,28,"getMasterPasswordHint")),c.ɵɵadvance(7),c.ɵɵproperty("ngModel",t.rememberEmail),c.ɵɵadvance(3),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(59,30,"rememberEmail")),c.ɵɵadvance(4),c.ɵɵproperty("hidden",!t.showCaptcha()),c.ɵɵadvance(7),c.ɵɵproperty("disabled",n.loading),c.ɵɵadvance(5),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(75,32,"logIn")," "),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(78,34,"loading")),c.ɵɵadvance(4),c.ɵɵproperty("queryParams",c.ɵɵpureFunction1(43,_,t.email)),c.ɵɵadvance(3),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(85,36,"createAccount")," "),c.ɵɵadvance(9),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(94,38,"enterpriseSingleSignOn")," ")}},directives:[S.NgControlStatusGroup,S.NgForm,w.ApiActionDirective,C.NgIf,S.DefaultValueAccessor,S.RequiredValidator,I.InputVerbatimDirective,S.NgControlStatus,S.NgModel,E.A11yTitleDirective,C.NgClass,u.RouterLinkWithHref,S.CheckboxControlValueAccessor,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2}),t}(l.LoginComponent);t.LoginComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(M,[{type:s.Component,args:[{selector:"app-login",templateUrl:"login.component.html"}]}],(function(){return[{type:p.AuthService},{type:u.Router},{type:d.I18nService},{type:u.ActivatedRoute},{type:m.StorageService},{type:f.StateService},{type:h.PlatformUtilsService},{type:v.EnvironmentService},{type:y.PasswordGenerationService},{type:g.CryptoFunctionService},{type:x.ApiService},{type:b.PolicyService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}function H(e,t){if(1&e){var n=d.ɵɵgetCurrentView();d.ɵɵelementStart(0,"div",12),d.ɵɵtext(1," "),d.ɵɵelementStart(2,"div",50),d.ɵɵtext(3," "),d.ɵɵelementStart(4,"input",51),d.ɵɵlistener("ngModelChange",(function(e){return d.ɵɵrestoreView(n),d.ɵɵnextContext().acceptPolicies=e})),d.ɵɵelementEnd(),d.ɵɵtext(5," "),d.ɵɵelementStart(6,"label",52),d.ɵɵtext(7),d.ɵɵpipe(8,"i18n"),d.ɵɵelement(9,"br"),d.ɵɵtext(10," "),d.ɵɵelementStart(11,"a",53),d.ɵɵtext(12),d.ɵɵpipe(13,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(14,", "),d.ɵɵelementStart(15,"a",54),d.ɵɵtext(16),d.ɵɵpipe(17,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(18," "),d.ɵɵelementEnd(),d.ɵɵtext(19," "),d.ɵɵelementEnd(),d.ɵɵtext(20," "),d.ɵɵelementEnd()}if(2&e){var r=d.ɵɵnextContext();d.ɵɵadvance(4),d.ɵɵproperty("ngModel",r.acceptPolicies),d.ɵɵadvance(3),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(8,4,"acceptPolicies"),""),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(13,6,"termsOfService")),d.ɵɵadvance(4),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(17,8,"privacyPolicy"))}}var W=function(e){return["layout",e]},$=function(e,t){return{"col-5":e,"col-12":t}},Q=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},Y=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){var d=e.call(this,t,n,r,i,o,s,l,c,u)||this;return d.route=a,d.policyService=p,d.showCreateOrgMessage=!1,d.layout="",d}return i(t,e),t.prototype.getPasswordScoreAlertDisplay=function(){if(null==this.enforcedPolicyOptions)return"";var 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.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var t,n,r,i,o,s=this;return a(this,(function(a){switch(a.label){case 0:return t=this.route.queryParams.subscribe((function(e){s.referenceData=new u.ReferenceEventRequest,null!=e.email&&e.email.indexOf("@")>-1&&(s.email=e.email),null!=e.premium?s.stateService.save("loginRedirect",{route:"/settings/premium"}):null!=e.org&&(s.showCreateOrgMessage=!0,s.referenceData.flow=e.org,s.stateService.save("loginRedirect",{route:"/settings/create-organization",qParams:{plan:e.org}})),null!=e.layout&&(s.layout=s.referenceData.layout=e.layout),null!=e.reference?s.referenceData.id=e.reference:s.referenceData.id=("; "+document.cookie).split("; reference=").pop().split(";").shift(),""===s.referenceData.id&&(s.referenceData.id=null),null!=t&&t.unsubscribe()})),[4,this.stateService.get("orgInvitation")];case 1:if(null==(n=a.sent()))return[3,5];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.apiService.getPoliciesByToken(n.organizationId,n.token,n.email,n.organizationUserId)];case 3:return null!=(r=a.sent()).data&&(i=r.data.map((function(e){return new p.PolicyData(e)})),this.policies=i.map((function(e){return new c.Policy(e)}))),[3,5];case 4:return a.sent(),[3,5];case 5:return null==this.policies?[3,7]:(o=this,[4,this.policyService.getMasterPasswordPolicyOptions(this.policies)]);case 6:o.enforcedPolicyOptions=a.sent(),a.label=7;case 7:return[4,e.prototype.ngOnInit.call(this)];case 8:return a.sent(),[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.masterPassword,this.enforcedPolicyOptions)?[4,e.prototype.submit.call(this)]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),[2]);case 1:return t.sent(),[2]}}))}))},t.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.AuthService),d.ɵɵdirectiveInject(f.Router),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(f.ActivatedRoute),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(x.PlatformUtilsService),d.ɵɵdirectiveInject(b.PasswordGenerationService),d.ɵɵdirectiveInject(S.PolicyService),d.ɵɵdirectiveInject(w.EnvironmentService))},t.ɵcmp=d.ɵɵdefineComponent({type:t,selectors:[["app-register"]],features:[d.ɵɵInheritDefinitionFeature],decls:149,vars:81,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","fa-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",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,"fa","fa-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,"fa","fa-spinner","fa-spin",3,"title"],["routerLink","/",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0"],[1,"header"],[1,"container"],[1,"col-7"],["alt","Bitwarden","src","images/logo-horizontal-white.png",1,"logo","mb-2"],[1,"mt-5"],[4,"ngIf"],[1,"highlight"],["src","images/wired-logo.png","alt","Wired"],[1,"lead","text-center","mb-4"],["type","info","icon","fa-thumb-tack",3,"title"],["type","info"],[1,"mb-0"],[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"]],template:function(e,t){if(1&e&&(d.ɵɵelementStart(0,"div",0),d.ɵɵtext(1," "),d.ɵɵtemplate(2,T,13,0,"header",1),d.ɵɵtext(3," "),d.ɵɵelementStart(4,"form",2,3),d.ɵɵlistener("ngSubmit",(function(){return t.submit()})),d.ɵɵtext(6," "),d.ɵɵelementStart(7,"div",4),d.ɵɵtext(8," "),d.ɵɵtemplate(9,U,11,3,"div",5),d.ɵɵtext(10," "),d.ɵɵelementStart(11,"div",6),d.ɵɵtext(12," "),d.ɵɵelementStart(13,"div",7),d.ɵɵtext(14," "),d.ɵɵelementStart(15,"div",6),d.ɵɵtext(16," "),d.ɵɵtemplate(17,j,3,3,"p",8),d.ɵɵtext(18," "),d.ɵɵelementStart(19,"div",9),d.ɵɵtext(20," "),d.ɵɵelementStart(21,"div",10),d.ɵɵtext(22," "),d.ɵɵtemplate(23,V,4,6,"app-callout",11),d.ɵɵtext(24," "),d.ɵɵelementStart(25,"div",12),d.ɵɵtext(26," "),d.ɵɵelementStart(27,"label",13),d.ɵɵtext(28),d.ɵɵpipe(29,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(30," "),d.ɵɵelementStart(31,"input",14),d.ɵɵlistener("ngModelChange",(function(e){return t.email=e})),d.ɵɵelementEnd(),d.ɵɵtext(32," "),d.ɵɵelementStart(33,"small",15),d.ɵɵtext(34),d.ɵɵpipe(35,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(36," "),d.ɵɵelementEnd(),d.ɵɵtext(37," "),d.ɵɵelementStart(38,"div",12),d.ɵɵtext(39," "),d.ɵɵelementStart(40,"label",16),d.ɵɵtext(41),d.ɵɵpipe(42,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(43," "),d.ɵɵelementStart(44,"input",17),d.ɵɵlistener("ngModelChange",(function(e){return t.name=e})),d.ɵɵelementEnd(),d.ɵɵtext(45," "),d.ɵɵelementStart(46,"small",15),d.ɵɵtext(47),d.ɵɵpipe(48,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(49," "),d.ɵɵelementEnd(),d.ɵɵtext(50," "),d.ɵɵelementStart(51,"div",12),d.ɵɵtext(52," "),d.ɵɵtemplate(53,q,18,9,"app-callout",18),d.ɵɵtext(54," "),d.ɵɵelementStart(55,"label",19),d.ɵɵtext(56),d.ɵɵpipe(57,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(58," "),d.ɵɵelementStart(59,"div",20),d.ɵɵtext(60," "),d.ɵɵelementStart(61,"div",21),d.ɵɵtext(62," "),d.ɵɵelementStart(63,"input",22),d.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),d.ɵɵelementEnd(),d.ɵɵtext(64," "),d.ɵɵelementStart(65,"app-password-strength",23),d.ɵɵtext(66," "),d.ɵɵelementEnd(),d.ɵɵtext(67," "),d.ɵɵelementEnd(),d.ɵɵtext(68," "),d.ɵɵelementStart(69,"div"),d.ɵɵtext(70," "),d.ɵɵelementStart(71,"button",24),d.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),d.ɵɵpipe(72,"i18n"),d.ɵɵtext(73," "),d.ɵɵelement(74,"i",25),d.ɵɵtext(75," "),d.ɵɵelementEnd(),d.ɵɵtext(76," "),d.ɵɵelement(77,"div",26),d.ɵɵtext(78," "),d.ɵɵelementEnd(),d.ɵɵtext(79," "),d.ɵɵelementEnd(),d.ɵɵtext(80," "),d.ɵɵelementStart(81,"small",15),d.ɵɵtext(82),d.ɵɵpipe(83,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(84," "),d.ɵɵelementEnd(),d.ɵɵtext(85," "),d.ɵɵelementStart(86,"div",12),d.ɵɵtext(87," "),d.ɵɵelementStart(88,"label",27),d.ɵɵtext(89),d.ɵɵpipe(90,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(91," "),d.ɵɵelementStart(92,"div",20),d.ɵɵtext(93," "),d.ɵɵelementStart(94,"input",28),d.ɵɵlistener("ngModelChange",(function(e){return t.confirmMasterPassword=e})),d.ɵɵelementEnd(),d.ɵɵtext(95," "),d.ɵɵelementStart(96,"button",24),d.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),d.ɵɵpipe(97,"i18n"),d.ɵɵtext(98," "),d.ɵɵelement(99,"i",25),d.ɵɵtext(100," "),d.ɵɵelementEnd(),d.ɵɵtext(101," "),d.ɵɵelementEnd(),d.ɵɵtext(102," "),d.ɵɵelementEnd(),d.ɵɵtext(103," "),d.ɵɵelementStart(104,"div",12),d.ɵɵtext(105," "),d.ɵɵelementStart(106,"label",29),d.ɵɵtext(107),d.ɵɵpipe(108,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(109," "),d.ɵɵelementStart(110,"input",30),d.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),d.ɵɵelementEnd(),d.ɵɵtext(111," "),d.ɵɵelementStart(112,"small",15),d.ɵɵtext(113),d.ɵɵpipe(114,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(115," "),d.ɵɵelementEnd(),d.ɵɵtext(116," "),d.ɵɵelementStart(117,"div",31),d.ɵɵelement(118,"iframe",32),d.ɵɵelementEnd(),d.ɵɵtext(119," "),d.ɵɵtemplate(120,H,21,10,"div",33),d.ɵɵtext(121," "),d.ɵɵelement(122,"hr"),d.ɵɵtext(123," "),d.ɵɵelementStart(124,"div",34),d.ɵɵtext(125," "),d.ɵɵelementStart(126,"button",35),d.ɵɵtext(127," "),d.ɵɵelementStart(128,"span"),d.ɵɵtext(129),d.ɵɵpipe(130,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(131," "),d.ɵɵelement(132,"i",36),d.ɵɵpipe(133,"i18n"),d.ɵɵtext(134," "),d.ɵɵelementEnd(),d.ɵɵtext(135," "),d.ɵɵelementStart(136,"a",37),d.ɵɵtext(137),d.ɵɵpipe(138,"i18n"),d.ɵɵelementEnd(),d.ɵɵtext(139," "),d.ɵɵelementEnd(),d.ɵɵtext(140," "),d.ɵɵelementEnd(),d.ɵɵtext(141," "),d.ɵɵelementEnd(),d.ɵɵtext(142," "),d.ɵɵelementEnd(),d.ɵɵtext(143," "),d.ɵɵelementEnd(),d.ɵɵtext(144," "),d.ɵɵelementEnd(),d.ɵɵtext(145," "),d.ɵɵelementEnd(),d.ɵɵtext(146," "),d.ɵɵelementEnd(),d.ɵɵtext(147," "),d.ɵɵelementEnd(),d.ɵɵtext(148," ")),2&e){var n=d.ɵɵreference(5);d.ɵɵproperty("ngClass",d.ɵɵpureFunction1(67,W,t.layout)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf","enterprise2"===t.layout),d.ɵɵadvance(2),d.ɵɵproperty("appApiAction",t.formPromise),d.ɵɵadvance(5),d.ɵɵproperty("ngIf",t.layout),d.ɵɵadvance(2),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(69,$,t.layout,!t.layout)),d.ɵɵadvance(4),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(72,$,!t.layout,t.layout)),d.ɵɵadvance(2),d.ɵɵproperty("ngIf",!t.layout),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.showCreateOrgMessage),d.ɵɵadvance(5),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(29,39,"emailAddress")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.email)("appAutofocus",""===t.email),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(35,41,"emailAddressDesc")),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(42,43,"yourName")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.name)("appAutofocus",""!==t.email),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(48,45,"yourNameDesc")),d.ɵɵadvance(6),d.ɵɵproperty("ngIf",t.enforcedPolicyOptions),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(57,47,"masterPass")),d.ɵɵadvance(7),d.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),d.ɵɵproperty("ngModel",t.masterPassword),d.ɵɵadvance(2),d.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),d.ɵɵadvance(6),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(72,49,"toggleVisibility")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(75,Q,!t.showPassword,t.showPassword)),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(83,51,"masterPassDesc")),d.ɵɵadvance(7),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(90,53,"reTypeMasterPass")),d.ɵɵadvance(5),d.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),d.ɵɵproperty("ngModel",t.confirmMasterPassword),d.ɵɵadvance(2),d.ɵɵpropertyInterpolate("appA11yTitle",d.ɵɵpipeBind1(97,55,"toggleVisibility")),d.ɵɵadvance(3),d.ɵɵproperty("ngClass",d.ɵɵpureFunction2(78,Q,!t.showPassword,t.showPassword)),d.ɵɵadvance(8),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(108,57,"masterPassHint")),d.ɵɵadvance(3),d.ɵɵproperty("ngModel",t.hint),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(114,59,"masterPassHintDesc")),d.ɵɵadvance(4),d.ɵɵproperty("hidden",!t.showCaptcha()),d.ɵɵadvance(3),d.ɵɵproperty("ngIf",t.showTerms),d.ɵɵadvance(6),d.ɵɵproperty("disabled",n.loading),d.ɵɵadvance(3),d.ɵɵtextInterpolate(d.ɵɵpipeBind1(130,61,"submit")),d.ɵɵadvance(3),d.ɵɵpropertyInterpolate("title",d.ɵɵpipeBind1(133,63,"loading")),d.ɵɵadvance(5),d.ɵɵtextInterpolate1(" ",d.ɵɵpipeBind1(138,65,"cancel")," ")}},directives:[C.NgClass,C.NgIf,I.NgControlStatusGroup,I.NgForm,E.ApiActionDirective,I.DefaultValueAccessor,I.RequiredValidator,P.InputVerbatimDirective,I.NgControlStatus,I.NgModel,k.AutofocusDirective,O.PasswordStrengthComponent,A.A11yTitleDirective,f.RouterLinkWithHref,_.CalloutComponent,I.CheckboxControlValueAccessor],pipes:[M.I18nPipe],encapsulation:2}),t}(l.RegisterComponent);t.RegisterComponent=Y,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(Y,[{type:s.Component,args:[{selector:"app-register",templateUrl:"register.component.html"}]}],(function(){return[{type:m.AuthService},{type:f.Router},{type:h.I18nService},{type:v.CryptoService},{type:y.ApiService},{type:f.ActivatedRoute},{type:g.StateService},{type:x.PlatformUtilsService},{type:b.PasswordGenerationService},{type:S.PolicyService},{type:w.EnvironmentService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SetPasswordComponent=void 0;var o=n(0),a=(n(6),n(4),n(14),n(1),n(15),n(26),n(3),n(25),n(41),n(5),n(975)),s=n(0),l=n(4),c=n(1),p=n(14),u=n(15),d=n(5),m=n(26),f=n(3),h=n(25),v=n(6),y=n(41),g=n(13),x=n(17),b=n(2),S=n(21),w=n(42),C=n(166),I=n(16),E=n(9);function P(e,t){1&e&&(s.ɵɵelementStart(0,"div",8),s.ɵɵtext(1," "),s.ɵɵelement(2,"i",9),s.ɵɵpipe(3,"i18n"),s.ɵɵtext(4),s.ɵɵpipe(5,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(3,2,"loading")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(5,4,"loading")," "))}function k(e,t){if(1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind2(2,1,"policyInEffectMinComplexity",n.getPasswordScoreAlertDisplay())," ")}}function O(e,t){if(1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind2(2,1,"policyInEffectMinLength",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength.toString())," ")}}function A(e,t){1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"policyInEffectUppercase"),""))}function _(e,t){1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"policyInEffectLowercase"),""))}function M(e,t){1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"policyInEffectNumbers"),""))}function T(e,t){1&e&&(s.ɵɵelementStart(0,"li"),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()),2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind2(2,1,"policyInEffectSpecial","!@#$%^&*"),""))}function D(e,t){if(1&e&&(s.ɵɵelementStart(0,"app-callout",11),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementStart(3,"ul",29),s.ɵɵtext(4," "),s.ɵɵtemplate(5,k,3,4,"li",30),s.ɵɵtext(6," "),s.ɵɵtemplate(7,O,3,4,"li",30),s.ɵɵtext(8," "),s.ɵɵtemplate(9,A,3,3,"li",30),s.ɵɵtext(10," "),s.ɵɵtemplate(11,_,3,3,"li",30),s.ɵɵtext(12," "),s.ɵɵtemplate(13,M,3,3,"li",30),s.ɵɵtext(14," "),s.ɵɵtemplate(15,T,3,4,"li",30),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,7,"masterPasswordPolicyInEffect")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minComplexity)>0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var R=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}};function B(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",10),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"app-callout",11),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"div",12),s.ɵɵtext(7," "),s.ɵɵtemplate(8,D,18,9,"app-callout",13),s.ɵɵtext(9," "),s.ɵɵelementStart(10,"label",14),s.ɵɵtext(11),s.ɵɵpipe(12,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵelementStart(14,"div",15),s.ɵɵtext(15," "),s.ɵɵelementStart(16,"div",16),s.ɵɵtext(17," "),s.ɵɵelementStart(18,"input",17),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().masterPassword=e}))("input",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().updatePasswordStrength()})),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"app-password-strength",18),s.ɵɵtext(21," "),s.ɵɵelementEnd(),s.ɵɵtext(22," "),s.ɵɵelementEnd(),s.ɵɵtext(23," "),s.ɵɵelementStart(24,"div"),s.ɵɵtext(25," "),s.ɵɵelementStart(26,"button",19),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().togglePassword(!1)})),s.ɵɵpipe(27,"i18n"),s.ɵɵtext(28," "),s.ɵɵelement(29,"i",20),s.ɵɵtext(30," "),s.ɵɵelementEnd(),s.ɵɵtext(31," "),s.ɵɵelement(32,"div",21),s.ɵɵtext(33," "),s.ɵɵelementEnd(),s.ɵɵtext(34," "),s.ɵɵelementEnd(),s.ɵɵtext(35," "),s.ɵɵelementStart(36,"small",22),s.ɵɵtext(37),s.ɵɵpipe(38,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(39," "),s.ɵɵelementEnd(),s.ɵɵtext(40," "),s.ɵɵelementStart(41,"div",12),s.ɵɵtext(42," "),s.ɵɵelementStart(43,"label",23),s.ɵɵtext(44),s.ɵɵpipe(45,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(46," "),s.ɵɵelementStart(47,"div",15),s.ɵɵtext(48," "),s.ɵɵelementStart(49,"input",24),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().masterPasswordRetype=e})),s.ɵɵelementEnd(),s.ɵɵtext(50," "),s.ɵɵelementStart(51,"button",19),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().togglePassword(!0)})),s.ɵɵpipe(52,"i18n"),s.ɵɵtext(53," "),s.ɵɵelement(54,"i",20),s.ɵɵtext(55," "),s.ɵɵelementEnd(),s.ɵɵtext(56," "),s.ɵɵelementEnd(),s.ɵɵtext(57," "),s.ɵɵelementEnd(),s.ɵɵtext(58," "),s.ɵɵelementStart(59,"div",12),s.ɵɵtext(60," "),s.ɵɵelementStart(61,"label",25),s.ɵɵtext(62),s.ɵɵpipe(63,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(64," "),s.ɵɵelementStart(65,"input",26),s.ɵɵlistener("ngModelChange",(function(e){return s.ɵɵrestoreView(n),s.ɵɵnextContext().hint=e})),s.ɵɵelementEnd(),s.ɵɵtext(66," "),s.ɵɵelementStart(67,"small",22),s.ɵɵtext(68),s.ɵɵpipe(69,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(70," "),s.ɵɵelementEnd(),s.ɵɵtext(71," "),s.ɵɵelement(72,"hr"),s.ɵɵtext(73," "),s.ɵɵelementStart(74,"div",15),s.ɵɵtext(75," "),s.ɵɵelementStart(76,"button",27),s.ɵɵtext(77," "),s.ɵɵelement(78,"i",9),s.ɵɵpipe(79,"i18n"),s.ɵɵtext(80," "),s.ɵɵelementStart(81,"span"),s.ɵɵtext(82),s.ɵɵpipe(83,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(84," "),s.ɵɵelementEnd(),s.ɵɵtext(85," "),s.ɵɵelementStart(86,"button",28),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext().logOut()})),s.ɵɵtext(87),s.ɵɵpipe(88,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(89," "),s.ɵɵelementEnd(),s.ɵɵtext(90," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(),i=s.ɵɵreference(1);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,22,"ssoCompleteRegistration")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",r.enforcedPolicyOptions),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(12,24,"masterPass")),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),s.ɵɵproperty("ngModel",r.masterPassword),s.ɵɵadvance(2),s.ɵɵproperty("score",r.masterPasswordScore)("showText",!0),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(27,26,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(44,R,!r.showPassword,r.showPassword)),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(38,28,"masterPassDesc")),s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(45,30,"reTypeMasterPass")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",r.showPassword?"text":"password"),s.ɵɵproperty("ngModel",r.masterPasswordRetype),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(52,32,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(47,R,!r.showPassword,r.showPassword)),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(63,34,"masterPassHint")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",r.hint),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(69,36,"masterPassHintDesc")),s.ɵɵadvance(8),s.ɵɵproperty("disabled",i.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(79,38,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(83,40,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(88,42,"logOut")," ")}}var U=function(e){function t(t,n,r,i,o,a,s,l,c,p,u){return e.call(this,n,r,i,o,a,s,l,c,t,p,u)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.ApiService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.MessagingService),s.ɵɵdirectiveInject(d.UserService),s.ɵɵdirectiveInject(m.PasswordGenerationService),s.ɵɵdirectiveInject(f.PlatformUtilsService),s.ɵɵdirectiveInject(h.PolicyService),s.ɵɵdirectiveInject(v.Router),s.ɵɵdirectiveInject(y.SyncService),s.ɵɵdirectiveInject(v.ActivatedRoute))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-set-password"]],features:[s.ɵɵ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,"fa","fa-spinner","fa-spin",3,"title"],[1,"card-body"],["type","info"],[1,"form-group"],["type","info",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,"fa","fa-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"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2," "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6," "),s.ɵɵelementStart(7,"p",4),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementStart(11,"div",5),s.ɵɵtext(12," "),s.ɵɵtemplate(13,P,6,6,"div",6),s.ɵɵtext(14," "),s.ɵɵtemplate(15,B,91,50,"div",7),s.ɵɵtext(16," "),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementEnd(),s.ɵɵtext(20," ")),2&e&&(s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,4,"setMasterPassword")),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.syncLoading),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!t.syncLoading))},directives:[g.NgControlStatusGroup,g.NgForm,x.ApiActionDirective,b.NgIf,S.CalloutComponent,g.DefaultValueAccessor,g.RequiredValidator,w.InputVerbatimDirective,g.NgControlStatus,g.NgModel,C.PasswordStrengthComponent,I.A11yTitleDirective,b.NgClass],pipes:[E.I18nPipe],encapsulation:2}),t}(a.SetPasswordComponent);t.SetPasswordComponent=U,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(U,[{type:o.Component,args:[{selector:"app-set-password",templateUrl:"set-password.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService},{type:p.CryptoService},{type:u.MessagingService},{type:d.UserService},{type:m.PasswordGenerationService},{type:f.PlatformUtilsService},{type:h.PolicyService},{type:v.Router},{type:y.SyncService},{type:v.ActivatedRoute}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?t[1]:null},e.prototype.checkState=function(e,t){if(null==e)return!1;if(null==t)return!1;var n=e.split("_identifier="),r=t.split("_identifier=");return n[0]===r[0]},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.AuthService),l.ɵɵdirectiveInject(p.Router),l.ɵɵdirectiveInject(u.I18nService),l.ɵɵdirectiveInject(p.ActivatedRoute),l.ɵɵdirectiveInject(d.StorageService),l.ɵɵdirectiveInject(m.StateService),l.ɵɵdirectiveInject(f.PlatformUtilsService),l.ɵɵdirectiveInject(h.ApiService),l.ɵɵdirectiveInject(v.CryptoFunctionService),l.ɵɵdirectiveInject(y.EnvironmentService),l.ɵɵdirectiveInject(g.PasswordGenerationService))},e.ɵdir=l.ɵɵdefineDirective({type:e}),e}();t.SsoComponent=x,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(x,[{type:o.Directive}],(function(){return[{type:c.AuthService},{type:p.Router},{type:u.I18nService},{type:p.ActivatedRoute},{type:d.StorageService},{type:m.StateService},{type:f.PlatformUtilsService},{type:h.ApiService},{type:v.CryptoFunctionService},{type:y.EnvironmentService},{type:g.PasswordGenerationService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TwoFactorOptionsComponent=void 0;var o=n(0),a=(n(6),n(50),n(1),n(3),n(977)),s=n(0),l=n(50),c=n(6),p=n(1),u=n(3),d=n(16),m=n(2),f=n(32),h=n(9);function v(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"a",10),s.ɵɵlistener("click",(function(){s.ɵɵrestoreView(n);var e=t.$implicit;return s.ɵɵnextContext().choose(e)})),s.ɵɵtext(1," "),s.ɵɵelement(2,"img",13),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"h3"),s.ɵɵtext(5),s.ɵɵelementEnd(),s.ɵɵtext(6),s.ɵɵelementEnd()}if(2&e){var r=t.$implicit;s.ɵɵadvance(2),s.ɵɵproperty("src","images/two-factor/"+r.type+".png",s.ɵɵsanitizeUrl),s.ɵɵadvance(3),s.ɵɵtextInterpolate(r.name),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",r.description," ")}}var y=function(e){function t(t,n,r,i){return e.call(this,t,n,r,i,window)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.AuthService),s.ɵɵdirectiveInject(c.Router),s.ɵɵdirectiveInject(p.I18nService),s.ɵɵdirectiveInject(u.PlatformUtilsService))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-options"]],features:[s.ɵɵInheritDefinitionFeature],decls:46,vars:16,consts:[["tabindex","-1","role","dialog","aria-modal","true","aria-labelledby","twoStepOptionsTitle",1,"modal","fade"],["role","document",1,"modal-dialog","modal-dialog-scrollable"],[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"],["href","#","appStopClick","","class","list-group-item list-group-item-action",3,"click",4,"ngFor","ngForOf"],["href","#","appStopClick","",1,"list-group-item","list-group-item-action",3,"click"],[1,"modal-footer"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],["alt","",1,"pull-right",3,"src"]],template:function(e,t){1&e&&(s.ɵɵelementStart(0,"div",0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",1),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"div",2),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"div",3),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"h2",4),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementStart(12,"button",5),s.ɵɵpipe(13,"i18n"),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"span",6),s.ɵɵtext(16,"×"),s.ɵɵelementEnd(),s.ɵɵtext(17," "),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementEnd(),s.ɵɵtext(19," "),s.ɵɵelementStart(20,"div",7),s.ɵɵtext(21," "),s.ɵɵelementStart(22,"div",8),s.ɵɵtext(23," "),s.ɵɵtemplate(24,v,7,3,"a",9),s.ɵɵtext(25," "),s.ɵɵelementStart(26,"a",10),s.ɵɵlistener("click",(function(){return t.recover()})),s.ɵɵtext(27," "),s.ɵɵelementStart(28,"h3"),s.ɵɵtext(29),s.ɵɵpipe(30,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(31),s.ɵɵpipe(32,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(33," "),s.ɵɵelementEnd(),s.ɵɵtext(34," "),s.ɵɵelementEnd(),s.ɵɵtext(35," "),s.ɵɵelementStart(36,"div",11),s.ɵɵtext(37," "),s.ɵɵelementStart(38,"button",12),s.ɵɵtext(39),s.ɵɵpipe(40,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(41," "),s.ɵɵelementEnd(),s.ɵɵtext(42," "),s.ɵɵelementEnd(),s.ɵɵtext(43," "),s.ɵɵelementEnd(),s.ɵɵtext(44," "),s.ɵɵelementEnd(),s.ɵɵtext(45," ")),2&e&&(s.ɵɵadvance(9),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(10,6,"twoStepOptions")),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(13,8,"close")),s.ɵɵadvance(12),s.ɵɵproperty("ngForOf",t.providers),s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(30,10,"recoveryCodeTitle")),s.ɵɵadvance(2),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(32,12,"recoveryCodeDesc")," "),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(40,14,"close")))},directives:[d.A11yTitleDirective,m.NgForOf,f.StopClickDirective],pipes:[h.I18nPipe],encapsulation:2}),t}(a.TwoFactorOptionsComponent);t.TwoFactorOptionsComponent=y,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(y,[{type:o.Component,args:[{selector:"app-two-factor-options",templateUrl:"two-factor-options.component.html"}]}],(function(){return[{type:l.AuthService},{type:c.Router},{type:p.I18nService},{type:u.PlatformUtilsService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var M=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},T=function(e){function t(t,n,r,i,o,a,s,l){return e.call(this,t,n,r,i,o,a,s,l)||this}return i(t,e),t.ɵfac=function(e){return new(e||t)(s.ɵɵdirectiveInject(l.I18nService),s.ɵɵdirectiveInject(c.PlatformUtilsService),s.ɵɵdirectiveInject(p.PasswordGenerationService),s.ɵɵdirectiveInject(u.PolicyService),s.ɵɵdirectiveInject(d.CryptoService),s.ɵɵdirectiveInject(m.UserService),s.ɵɵdirectiveInject(f.MessagingService),s.ɵɵdirectiveInject(h.ApiService))},t.ɵcmp=s.ɵɵdefineComponent({type:t,selectors:[["app-update-temp-password"]],features:[s.ɵɵ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",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,"fa","fa-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,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-block","ml-2","mt-0",3,"click"],["type","info"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){if(1&e&&(s.ɵɵelementStart(0,"form",0,1),s.ɵɵlistener("ngSubmit",(function(){return t.submit()})),s.ɵɵtext(2," "),s.ɵɵelementStart(3,"div",2),s.ɵɵtext(4," "),s.ɵɵelementStart(5,"div",3),s.ɵɵtext(6," "),s.ɵɵelementStart(7,"p",4),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵelementStart(11,"div",5),s.ɵɵtext(12," "),s.ɵɵelementStart(13,"div",6),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"app-callout",7),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementStart(19,"div",8),s.ɵɵtext(20," "),s.ɵɵtemplate(21,_,18,9,"app-callout",9),s.ɵɵtext(22," "),s.ɵɵelementStart(23,"label",10),s.ɵɵtext(24),s.ɵɵpipe(25,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(26," "),s.ɵɵelementStart(27,"div",11),s.ɵɵtext(28," "),s.ɵɵelementStart(29,"div",12),s.ɵɵtext(30," "),s.ɵɵelementStart(31,"input",13),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),s.ɵɵelementEnd(),s.ɵɵtext(32," "),s.ɵɵelementStart(33,"app-password-strength",14),s.ɵɵtext(34," "),s.ɵɵelementEnd(),s.ɵɵtext(35," "),s.ɵɵelementEnd(),s.ɵɵtext(36," "),s.ɵɵelementStart(37,"div"),s.ɵɵtext(38," "),s.ɵɵelementStart(39,"button",15),s.ɵɵlistener("click",(function(){return t.togglePassword(!1)})),s.ɵɵpipe(40,"i18n"),s.ɵɵtext(41," "),s.ɵɵelement(42,"i",16),s.ɵɵtext(43," "),s.ɵɵelementEnd(),s.ɵɵtext(44," "),s.ɵɵelement(45,"div",17),s.ɵɵtext(46," "),s.ɵɵelementEnd(),s.ɵɵtext(47," "),s.ɵɵelementEnd(),s.ɵɵtext(48," "),s.ɵɵelementEnd(),s.ɵɵtext(49," "),s.ɵɵelementStart(50,"div",8),s.ɵɵtext(51," "),s.ɵɵelementStart(52,"label",18),s.ɵɵtext(53),s.ɵɵpipe(54,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(55," "),s.ɵɵelementStart(56,"div",11),s.ɵɵtext(57," "),s.ɵɵelementStart(58,"input",19),s.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),s.ɵɵelementEnd(),s.ɵɵtext(59," "),s.ɵɵelementStart(60,"button",15),s.ɵɵlistener("click",(function(){return t.togglePassword(!0)})),s.ɵɵpipe(61,"i18n"),s.ɵɵtext(62," "),s.ɵɵelement(63,"i",16),s.ɵɵtext(64," "),s.ɵɵelementEnd(),s.ɵɵtext(65," "),s.ɵɵelementEnd(),s.ɵɵtext(66," "),s.ɵɵelementEnd(),s.ɵɵtext(67," "),s.ɵɵelementStart(68,"div",8),s.ɵɵtext(69," "),s.ɵɵelementStart(70,"label",20),s.ɵɵtext(71),s.ɵɵpipe(72,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(73," "),s.ɵɵelementStart(74,"input",21),s.ɵɵlistener("ngModelChange",(function(e){return t.hint=e})),s.ɵɵelementEnd(),s.ɵɵtext(75," "),s.ɵɵelementStart(76,"small",22),s.ɵɵtext(77),s.ɵɵpipe(78,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(79," "),s.ɵɵelementEnd(),s.ɵɵtext(80," "),s.ɵɵelement(81,"hr"),s.ɵɵtext(82," "),s.ɵɵelementStart(83,"div",11),s.ɵɵtext(84," "),s.ɵɵelementStart(85,"button",23),s.ɵɵtext(86," "),s.ɵɵelement(87,"i",24),s.ɵɵpipe(88,"i18n"),s.ɵɵtext(89," "),s.ɵɵelementStart(90,"span"),s.ɵɵtext(91),s.ɵɵpipe(92,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(93," "),s.ɵɵelementEnd(),s.ɵɵtext(94," "),s.ɵɵelementStart(95,"button",25),s.ɵɵlistener("click",(function(){return t.logOut()})),s.ɵɵtext(96),s.ɵɵpipe(97,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(98," "),s.ɵɵelementEnd(),s.ɵɵtext(99," "),s.ɵɵelementEnd(),s.ɵɵtext(100," "),s.ɵɵelementEnd(),s.ɵɵtext(101," "),s.ɵɵelementEnd(),s.ɵɵtext(102," "),s.ɵɵelementEnd(),s.ɵɵtext(103," "),s.ɵɵelementEnd(),s.ɵɵtext(104," ")),2&e){var n=s.ɵɵreference(1);s.ɵɵproperty("appApiAction",t.formPromise),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(9,23,"updateMasterPassword")),s.ɵɵadvance(8),s.ɵɵtextInterpolate1("",s.ɵɵpipeBind1(17,25,"updateMasterPasswordWarning")," "),s.ɵɵadvance(5),s.ɵɵproperty("ngIf",t.enforcedPolicyOptions),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(25,27,"masterPass")),s.ɵɵadvance(7),s.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),s.ɵɵproperty("ngModel",t.masterPassword),s.ɵɵadvance(2),s.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),s.ɵɵadvance(6),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(40,29,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(45,M,!t.showPassword,t.showPassword)),s.ɵɵadvance(11),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(54,31,"reTypeMasterPass")),s.ɵɵadvance(5),s.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),s.ɵɵproperty("ngModel",t.masterPasswordRetype),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(61,33,"toggleVisibility")),s.ɵɵadvance(3),s.ɵɵproperty("ngClass",s.ɵɵpureFunction2(48,M,!t.showPassword,t.showPassword)),s.ɵɵadvance(8),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(72,35,"masterPassHint")),s.ɵɵadvance(3),s.ɵɵproperty("ngModel",t.hint),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(78,37,"masterPassHintDesc")),s.ɵɵadvance(8),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(88,39,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(92,41,"submit")),s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(97,43,"logOut")," ")}},directives:[v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.CalloutComponent,x.NgIf,v.DefaultValueAccessor,v.RequiredValidator,b.InputVerbatimDirective,v.NgControlStatus,v.NgModel,S.PasswordStrengthComponent,w.A11yTitleDirective,x.NgClass],pipes:[C.I18nPipe],encapsulation:2}),t}(a.UpdateTempPasswordComponent);t.UpdateTempPasswordComponent=T,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(T,[{type:o.Component,args:[{selector:"app-update-temp-password",templateUrl:"update-temp-password.component.html"}]}],(function(){return[{type:l.I18nService},{type:c.PlatformUtilsService},{type:p.PasswordGenerationService},{type:u.PolicyService},{type:d.CryptoService},{type:m.UserService},{type:f.MessagingService},{type:h.ApiService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserResetPasswordRequest=void 0;var r=function(){};t.OrganizationUserResetPasswordRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&r.groups.forEach((function(e){var t=s.groups.filter((function(t){return!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)})),[3,9];case 8:return i.sent(),[3,9];case 9:return[3,11];case 10:this.title=this.i18nService.t("addCollection"),i.label=11;case 11:return this.groups.forEach((function(e){e.accessAll&&(e.checked=!0)})),this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.accessAll||(e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1,e.hidePasswords=!1))},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null==this.orgKey)throw new Error("No encryption key for this organization.");return e=new s.CollectionRequest,t=e,[4,this.cryptoService.encrypt(this.name,this.orgKey)];case 1:t.name=n.sent().encryptedString,e.externalId=this.externalId,e.groups=this.groups.filter((function(e){return e.checked&&!e.accessAll})).map((function(e){return new l.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)})),n.label=2;case 2:return n.trys.push([2,4,,5]),this.editMode?this.formPromise=this.apiService.putCollection(this.organizationId,this.collectionId,e):this.formPromise=this.apiService.postCollection(this.organizationId,e),[4,this.formPromise];case 3:return n.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedCollectionId":"createdCollectionId",this.name)),this.onSavedCollection.emit(),[3,5];case 4:return n.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteCollection(this.organizationId,this.collectionId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",this.name)),this.onDeletedCollection.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(f.PlatformUtilsService),p.ɵɵdirectiveInject(h.CryptoService),p.ɵɵdirectiveInject(v.UserService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-collection-add-edit"]],inputs:{collectionId:"collectionId",organizationId:"organizationId"},outputs:{onSavedCollection:"onSavedCollection",onDeletedCollection:"onDeletedCollection"},decls:49,vars:18,consts:[["tabindex","-1","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",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-spinner","fa-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","ngModelChange"],["for","externalId"],["id","externalId","type","text","name","ExternalId",1,"form-control",3,"ngModel","ngModelChange"],[1,"form-text","text-muted"],[4,"ngIf"],[1,"mt-4","d-flex","mb-0"],["class","ml-auto",4,"ngIf"],["class","table table-hover table-list mb-0",4,"ngIf"],["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,"fa","fa-th","text-muted","fa-fw",3,"title"],["type","button",1,"btn","btn-outline-danger",3,"appA11yTitle","disabled","appApiAction","click"],["deleteBtn",""],["aria-hidden","true",1,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵtemplate(20,I,9,6,"div",8),p.ɵɵtext(21," "),p.ɵɵtemplate(22,M,26,12,"div",8),p.ɵɵtext(23," "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25," "),p.ɵɵelementStart(26,"button",10),p.ɵɵtext(27," "),p.ɵɵelement(28,"i",11),p.ɵɵpipe(29,"i18n"),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"span"),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34," "),p.ɵɵelementEnd(),p.ɵɵtext(35," "),p.ɵɵelementStart(36,"button",12),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementStart(40,"div",13),p.ɵɵtext(41," "),p.ɵɵtemplate(42,T,9,10,"button",14),p.ɵɵtext(43," "),p.ɵɵelementEnd(),p.ɵɵtext(44," "),p.ɵɵelementEnd(),p.ɵɵtext(45," "),p.ɵɵelementEnd(),p.ɵɵtext(46," "),p.ɵɵelementEnd(),p.ɵɵtext(47," "),p.ɵɵelementEnd(),p.ɵɵtext(48," ")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(29,12,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,14,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,16,"cancel")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.editMode)}},directives:[y.NgControlStatusGroup,y.NgForm,g.ApiActionDirective,x.A11yTitleDirective,b.NgIf,y.DefaultValueAccessor,y.RequiredValidator,S.AutofocusDirective,y.NgControlStatus,y.NgModel,b.NgForOf,y.CheckboxControlValueAccessor,w.StopPropDirective],pipes:[C.I18nPipe],encapsulation:2}),e}();t.CollectionAddEditComponent=D,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(D,[{type:o.Component,args:[{selector:"app-collection-add-edit",templateUrl:"collection-add-edit.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService},{type:f.PlatformUtilsService},{type:h.CryptoService},{type:v.UserService}]}),{collectionId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedCollection:[{type:o.Output}],onDeletedCollection:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionRequest=void 0;var r=function(e){this.groups=[],null!=e&&(this.name=e.name?e.name.encryptedString:null,this.externalId=e.externalId)};t.CollectionRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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}},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(c.CollectionAddEditComponent,this.addEditModalRef);r.organizationId=this.organizationId,r.collectionId=null!=e?e.id:null,r.onSavedCollection.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedCollection.subscribe((function(){t.modal.close(),t.removeCollection(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteCollectionConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteCollection(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedCollectionId",e.name)),this.removeCollection(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(l.ModalComponent);this.modal=this.usersModalRef.createComponent(n).instance;var r=this.modal.show(p.EntityUsersComponent,this.usersModalRef);r.organizationId=this.organizationId,r.entity="collection",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){t.load(),t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedCollections=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.collections&&this.collections.length>this.pageSize},e.prototype.removeCollection=function(e){var t=this.collections.indexOf(e);t>-1&&(this.collections.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.ApiService),u.ɵɵdirectiveInject(m.ActivatedRoute),u.ɵɵdirectiveInject(f.CollectionService),u.ɵɵdirectiveInject(u.ComponentFactoryResolver),u.ɵɵdirectiveInject(h.ToasterService),u.ɵɵdirectiveInject(v.I18nService),u.ɵɵdirectiveInject(y.PlatformUtilsService),u.ɵɵdirectiveInject(g.UserService),u.ɵɵdirectiveInject(x.SearchService))},e.ɵcmp=u.ɵɵdefineComponent({type:e,selectors:[["app-org-manage-collections"]],viewQuery:function(e,t){if(1&e&&(u.ɵɵviewQuery(k,3,o.ViewContainerRef),u.ɵɵviewQuery(O,3,o.ViewContainerRef)),2&e){var n=void 0;u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.addEditModalRef=n.first),u.ɵɵqueryRefresh(n=u.ɵɵloadQuery())&&(t.usersModalRef=n.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,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(u.ɵɵelementStart(0,"div",0),u.ɵɵtext(1," "),u.ɵɵelementStart(2,"h1"),u.ɵɵtext(3),u.ɵɵpipe(4,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(5," "),u.ɵɵelementStart(6,"div",1),u.ɵɵtext(7," "),u.ɵɵelementStart(8,"div"),u.ɵɵtext(9," "),u.ɵɵelementStart(10,"label",2),u.ɵɵtext(11),u.ɵɵpipe(12,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(13," "),u.ɵɵelementStart(14,"input",3),u.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),u.ɵɵpipe(15,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(16," "),u.ɵɵelementEnd(),u.ɵɵtext(17," "),u.ɵɵelementStart(18,"button",4),u.ɵɵlistener("click",(function(){return t.add()})),u.ɵɵtext(19," "),u.ɵɵelement(20,"i",5),u.ɵɵtext(21),u.ɵɵpipe(22,"i18n"),u.ɵɵelementEnd(),u.ɵɵtext(23," "),u.ɵɵelementEnd(),u.ɵɵtext(24," "),u.ɵɵelementEnd(),u.ɵɵtext(25," "),u.ɵɵtemplate(26,A,9,6,"ng-container",6),u.ɵɵtext(27," "),u.ɵɵtemplate(28,D,6,2,"ng-container",6),u.ɵɵpipe(29,"search"),u.ɵɵtext(30," "),u.ɵɵtemplate(31,R,0,0,"ng-template",null,7,u.ɵɵtemplateRefExtractor),u.ɵɵtext(33," "),u.ɵɵtemplate(34,B,0,0,"ng-template",null,8,u.ɵɵtemplateRefExtractor),u.ɵɵtext(36," ")),2&e&&(u.ɵɵadvance(3),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(4,7,"collections")),u.ɵɵadvance(8),u.ɵɵtextInterpolate(u.ɵɵpipeBind1(12,9,"search")),u.ɵɵadvance(3),u.ɵɵpropertyInterpolate("placeholder",u.ɵɵpipeBind1(15,11,"search")),u.ɵɵproperty("ngModel",t.searchText),u.ɵɵadvance(7),u.ɵɵtextInterpolate1(" ",u.ɵɵpipeBind1(22,13,"newCollection")," "),u.ɵɵadvance(5),u.ɵɵproperty("ngIf",t.loading),u.ɵɵadvance(2),u.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedCollections:u.ɵɵpipeBind4(29,15,t.collections,t.searchText,"name","id"))))},directives:[b.DefaultValueAccessor,b.NgControlStatus,b.NgModel,S.NgIf,w.InfiniteScrollDirective,S.NgForOf,C.StopClickDirective,I.A11yTitleDirective],pipes:[E.I18nPipe,P.SearchPipe],encapsulation:2}),e}();t.CollectionsComponent=U,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(U,[{type:o.Component,args:[{selector:"app-org-manage-collections",templateUrl:"collections.component.html"}]}],(function(){return[{type:d.ApiService},{type:m.ActivatedRoute},{type:f.CollectionService},{type:u.ComponentFactoryResolver},{type:h.ToasterService},{type:v.I18nService},{type:y.PlatformUtilsService},{type:g.UserService},{type:x.SearchService}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],usersModalRef:[{type:o.ViewChild,args:["usersTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("addGroup"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new l.GroupRequest).name=this.name,e.externalId=this.externalId,e.accessAll="all"===this.access,e.accessAll||(e.collections=this.collections.filter((function(e){return e.checked})).map((function(e){return new c.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),t.label=1;case 1:return t.trys.push([1,3,,4]),this.editMode?this.formPromise=this.apiService.putGroup(this.organizationId,this.groupId,e):this.formPromise=this.apiService.postGroup(this.organizationId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedGroupId":"createdGroupId",this.name)),this.onSavedGroup.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteGroup(this.organizationId,this.groupId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",this.name)),this.onDeletedGroup.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.I18nService),p.ɵɵdirectiveInject(m.ToasterService),p.ɵɵdirectiveInject(f.CollectionService),p.ɵɵdirectiveInject(h.PlatformUtilsService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-group-add-edit"]],inputs:{groupId:"groupId",organizationId:"organizationId"},outputs:{onSavedGroup:"onSavedGroup",onDeletedGroup:"onDeletedGroup"},decls:49,vars:18,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-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,"fa","fa-spinner","fa-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/article/user-types-access-control/#access-control",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],["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,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"div",1),p.ɵɵtext(3," "),p.ɵɵelementStart(4,"form",2,3),p.ɵɵlistener("ngSubmit",(function(){return t.submit()})),p.ɵɵtext(6," "),p.ɵɵelementStart(7,"div",4),p.ɵɵtext(8," "),p.ɵɵelementStart(9,"h2",5),p.ɵɵtext(10),p.ɵɵelementEnd(),p.ɵɵtext(11," "),p.ɵɵelementStart(12,"button",6),p.ɵɵpipe(13,"i18n"),p.ɵɵtext(14," "),p.ɵɵelementStart(15,"span",7),p.ɵɵtext(16,"×"),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementEnd(),p.ɵɵtext(18," "),p.ɵɵelementEnd(),p.ɵɵtext(19," "),p.ɵɵtemplate(20,w,9,6,"div",8),p.ɵɵtext(21," "),p.ɵɵtemplate(22,A,62,30,"div",8),p.ɵɵtext(23," "),p.ɵɵelementStart(24,"div",9),p.ɵɵtext(25," "),p.ɵɵelementStart(26,"button",10),p.ɵɵtext(27," "),p.ɵɵelement(28,"i",11),p.ɵɵpipe(29,"i18n"),p.ɵɵtext(30," "),p.ɵɵelementStart(31,"span"),p.ɵɵtext(32),p.ɵɵpipe(33,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(34," "),p.ɵɵelementEnd(),p.ɵɵtext(35," "),p.ɵɵelementStart(36,"button",12),p.ɵɵtext(37),p.ɵɵpipe(38,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(39," "),p.ɵɵelementStart(40,"div",13),p.ɵɵtext(41," "),p.ɵɵtemplate(42,_,9,10,"button",14),p.ɵɵtext(43," "),p.ɵɵelementEnd(),p.ɵɵtext(44," "),p.ɵɵelementEnd(),p.ɵɵtext(45," "),p.ɵɵelementEnd(),p.ɵɵtext(46," "),p.ɵɵelementEnd(),p.ɵɵtext(47," "),p.ɵɵelementEnd(),p.ɵɵtext(48," ")),2&e){var n=p.ɵɵreference(5);p.ɵɵadvance(4),p.ɵɵproperty("appApiAction",t.formPromise),p.ɵɵadvance(6),p.ɵɵtextInterpolate(t.title),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("appA11yTitle",p.ɵɵpipeBind1(13,10,"close")),p.ɵɵadvance(8),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading),p.ɵɵadvance(4),p.ɵɵproperty("disabled",n.loading),p.ɵɵadvance(2),p.ɵɵpropertyInterpolate("title",p.ɵɵpipeBind1(29,12,"loading")),p.ɵɵadvance(4),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(33,14,"save")),p.ɵɵadvance(5),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(38,16,"cancel")),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.editMode)}},directives:[v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.A11yTitleDirective,x.NgIf,v.DefaultValueAccessor,v.RequiredValidator,v.NgControlStatus,v.NgModel,x.NgClass,v.RadioControlValueAccessor,x.NgForOf,v.CheckboxControlValueAccessor,b.StopPropDirective],pipes:[S.I18nPipe],encapsulation:2}),e}();t.GroupAddEditComponent=M,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(M,[{type:o.Component,args:[{selector:"app-group-add-edit",templateUrl:"group-add-edit.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.I18nService},{type:m.ToasterService},{type:f.CollectionService},{type:h.PlatformUtilsService}]}),{groupId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedGroup:[{type:o.Output}],onDeletedGroup:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[]).sort(a.Utils.getSortFunction(this.i18nService,"name")),this.groups=t,this.resetPaging(),this.loading=!1,[2]}}))}))},e.prototype.loadMore=function(){if(this.groups&&!(this.groups.length<=this.pageSize)){var e=this.pagedGroups.length,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}},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(c.GroupAddEditComponent,this.addEditModalRef);r.organizationId=this.organizationId,r.groupId=null!=e?e.id:null,r.onSavedGroup.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedGroup.subscribe((function(){t.modal.close(),t.removeGroup(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.add=function(){this.edit(null)},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteGroupConfirmation"),e.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),[4,this.apiService.deleteGroup(this.organizationId,e.id)];case 3:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("deletedGroupId",e.name)),this.removeGroup(e),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.users=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.usersModalRef.createComponent(n).instance;var r=this.modal.show(l.EntityUsersComponent,this.usersModalRef);r.organizationId=this.organizationId,r.entity="group",r.entityId=e.id,r.entityName=e.name,r.onEditedUsers.subscribe((function(){t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.resetPaging=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.pagedGroups=[],this.loadMore(),[2]}))}))},e.prototype.isSearching=function(){return this.searchService.isSearchable(this.searchText)},e.prototype.isPaging=function(){var e=this.isSearching();return e&&this.didScroll&&this.resetPaging(),!e&&this.groups&&this.groups.length>this.pageSize},e.prototype.removeGroup=function(e){var t=this.groups.indexOf(e);t>-1&&(this.groups.splice(t,1),this.resetPaging())},e.ɵfac=function(t){return new(t||e)(p.ɵɵdirectiveInject(u.ApiService),p.ɵɵdirectiveInject(d.ActivatedRoute),p.ɵɵdirectiveInject(m.I18nService),p.ɵɵdirectiveInject(p.ComponentFactoryResolver),p.ɵɵdirectiveInject(f.ToasterService),p.ɵɵdirectiveInject(h.PlatformUtilsService),p.ɵɵdirectiveInject(v.UserService),p.ɵɵdirectiveInject(d.Router),p.ɵɵdirectiveInject(y.SearchService))},e.ɵcmp=p.ɵɵdefineComponent({type:e,selectors:[["app-org-groups"]],viewQuery:function(e,t){if(1&e&&(p.ɵɵviewQuery(E,3,o.ViewContainerRef),p.ɵɵviewQuery(P,3,o.ViewContainerRef)),2&e){var n=void 0;p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.addEditModalRef=n.first),p.ɵɵqueryRefresh(n=p.ɵɵloadQuery())&&(t.usersModalRef=n.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,"fa","fa-plus","fa-fw"],[4,"ngIf"],["addEdit",""],["usersTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-cog","fa-lg"],[1,"dropdown-menu","dropdown-menu-right"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-users"],["href","#","appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-trash-o"]],template:function(e,t){1&e&&(p.ɵɵelementStart(0,"div",0),p.ɵɵtext(1," "),p.ɵɵelementStart(2,"h1"),p.ɵɵtext(3),p.ɵɵpipe(4,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(5," "),p.ɵɵelementStart(6,"div",1),p.ɵɵtext(7," "),p.ɵɵelementStart(8,"div"),p.ɵɵtext(9," "),p.ɵɵelementStart(10,"label",2),p.ɵɵtext(11),p.ɵɵpipe(12,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(13," "),p.ɵɵelementStart(14,"input",3),p.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),p.ɵɵpipe(15,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(16," "),p.ɵɵelementEnd(),p.ɵɵtext(17," "),p.ɵɵelementStart(18,"button",4),p.ɵɵlistener("click",(function(){return t.add()})),p.ɵɵtext(19," "),p.ɵɵelement(20,"i",5),p.ɵɵtext(21),p.ɵɵpipe(22,"i18n"),p.ɵɵelementEnd(),p.ɵɵtext(23," "),p.ɵɵelementEnd(),p.ɵɵtext(24," "),p.ɵɵelementEnd(),p.ɵɵtext(25," "),p.ɵɵtemplate(26,k,9,6,"ng-container",6),p.ɵɵtext(27," "),p.ɵɵtemplate(28,M,6,2,"ng-container",6),p.ɵɵpipe(29,"search"),p.ɵɵtext(30," "),p.ɵɵtemplate(31,T,0,0,"ng-template",null,7,p.ɵɵtemplateRefExtractor),p.ɵɵtext(33," "),p.ɵɵtemplate(34,D,0,0,"ng-template",null,8,p.ɵɵtemplateRefExtractor),p.ɵɵtext(36," ")),2&e&&(p.ɵɵadvance(3),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(4,7,"groups")),p.ɵɵadvance(8),p.ɵɵtextInterpolate(p.ɵɵpipeBind1(12,9,"search")),p.ɵɵadvance(3),p.ɵɵpropertyInterpolate("placeholder",p.ɵɵpipeBind1(15,11,"search")),p.ɵɵproperty("ngModel",t.searchText),p.ɵɵadvance(7),p.ɵɵtextInterpolate1(" ",p.ɵɵpipeBind1(22,13,"newGroup")," "),p.ɵɵadvance(5),p.ɵɵproperty("ngIf",t.loading),p.ɵɵadvance(2),p.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedGroups:p.ɵɵpipeBind4(29,15,t.groups,t.searchText,"name","id"))))},directives:[g.DefaultValueAccessor,g.NgControlStatus,g.NgModel,x.NgIf,b.InfiniteScrollDirective,x.NgForOf,S.StopClickDirective,w.A11yTitleDirective],pipes:[C.I18nPipe,I.SearchPipe],encapsulation:2}),e}();t.GroupsComponent=R,("undefined"==typeof ngDevMode||ngDevMode)&&p.ɵsetClassMetadata(R,[{type:o.Component,args:[{selector:"app-org-groups",templateUrl:"groups.component.html"}]}],(function(){return[{type:u.ApiService},{type:d.ActivatedRoute},{type:m.I18nService},{type:p.ComponentFactoryResolver},{type:f.ToasterService},{type:h.PlatformUtilsService},{type:v.UserService},{type:d.Router},{type:y.SearchService}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],usersModalRef:[{type:o.ViewChild,args:["usersTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&t[0].status===d.OrganizationUserStatusType.Confirmed&&this.events(t[0]),null!=l&&l.unsubscribe(),[2]}))}))})),[2]}}))}))})),[2]}))}))},t.prototype.load=function(){return a(this,void 0,void 0,(function(){var t,n=this;return s(this,(function(r){switch(r.label){case 0:return[4,this.policyService.getAll(f.PolicyType.ResetPassword)];case 1:return t=r.sent(),this.orgResetPasswordPolicyEnabled=t.some((function(e){return e.organizationId===n.organizationId&&e.enabled})),e.prototype.load.call(this),[2]}}))}))},t.prototype.getUsers=function(){return this.apiService.getOrganizationUsers(this.organizationId)},t.prototype.deleteUser=function(e){return this.apiService.deleteOrganizationUser(this.organizationId,e)},t.prototype.reinviteUser=function(e){return this.apiService.postOrganizationUserReinvite(this.organizationId,e)},t.prototype.confirmUser=function(e,t){return a(this,void 0,void 0,(function(){var n,r,i;return s(this,(function(o){switch(o.label){case 0:return[4,this.cryptoService.getOrgKey(this.organizationId)];case 1:return n=o.sent(),[4,this.cryptoService.rsaEncrypt(n.key,t.buffer)];case 2:return r=o.sent(),(i=new u.OrganizationUserConfirmRequest).key=r.encryptedString,[4,this.apiService.postOrganizationUserConfirm(this.organizationId,e.id,i)];case 3:return o.sent(),[2]}}))}))},t.prototype.allowResetPassword=function(e){var t=!1;switch(this.callingUserType){case m.OrganizationUserType.Owner:t=!0;break;case m.OrganizationUserType.Admin:t=e.type!==m.OrganizationUserType.Owner;break;case m.OrganizationUserType.Custom:t=e.type!==m.OrganizationUserType.Owner&&e.type!==m.OrganizationUserType.Admin}return this.canResetPassword&&t&&this.orgUseResetPassword&&this.orgHasKeys&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled&&e.status===d.OrganizationUserStatusType.Confirmed},t.prototype.showEnrolledStatus=function(e){return this.orgUseResetPassword&&e.resetPasswordEnrolled&&this.orgResetPasswordPolicyEnabled},t.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent);this.modal=this.addEditModalRef.createComponent(n).instance;var r=this.modal.show(C.UserAddEditComponent,this.addEditModalRef);r.name=this.userNamePipe.transform(e),r.organizationId=this.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.modal.close(),t.load()})),r.onDeletedUser.subscribe((function(){t.modal.close(),t.removeUser(e)})),this.modal.onClosed.subscribe((function(){t.modal=null}))},t.prototype.groups=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent);this.modal=this.groupsModalRef.createComponent(n).instance;var r=this.modal.show(I.UserGroupsComponent,this.groupsModalRef);r.name=this.userNamePipe.transform(e),r.organizationId=this.organizationId,r.organizationUserId=null!=e?e.id:null,r.onSavedUser.subscribe((function(){t.modal.close()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},t.prototype.bulkRemove=function(){return a(this,void 0,void 0,(function(){var e,t,n=this;return s(this,(function(r){return null!=this.actionPromise||(null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent),this.modal=this.bulkRemoveModalRef.createComponent(e).instance,(t=this.modal.show(x.BulkRemoveComponent,this.bulkRemoveModalRef)).organizationId=this.organizationId,t.users=this.getCheckedUsers(),this.modal.onClosed.subscribe((function(){return a(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.modal=null,[2]}}))}))}))),[2]}))}))},t.prototype.bulkReinvite=function(){return a(this,void 0,void 0,(function(){var e,t,n,r;return s(this,(function(i){if(null!=this.actionPromise)return[2];if(e=this.getCheckedUsers(),(t=e.filter((function(e){return e.status===d.OrganizationUserStatusType.Invited}))).length<=0)return this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("noSelectedUsersApplicable")),[2];try{n=new p.OrganizationUserBulkRequest(t.map((function(e){return e.id}))),r=this.apiService.postManyOrganizationUserReinvite(this.organizationId,n),this.showBulkStatus(e,t,r,this.i18nService.t("bulkReinviteMessage"))}catch(o){this.validationService.showError(o)}return this.actionPromise=null,[2]}))}))},t.prototype.bulkConfirm=function(){return a(this,void 0,void 0,(function(){var e,t,n=this;return s(this,(function(r){return null!=this.actionPromise||(null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent),this.modal=this.bulkConfirmModalRef.createComponent(e).instance,(t=this.modal.show(g.BulkConfirmComponent,this.bulkConfirmModalRef)).organizationId=this.organizationId,t.users=this.getCheckedUsers(),this.modal.onClosed.subscribe((function(){return a(n,void 0,void 0,(function(){return s(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.modal=null,[2]}}))}))}))),[2]}))}))},t.prototype.events=function(e){return a(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent),this.modal=this.eventsModalRef.createComponent(t).instance,(n=this.modal.show(S.EntityEventsComponent,this.eventsModalRef)).name=this.userNamePipe.transform(e),n.organizationId=this.organizationId,n.entityId=e.id,n.showUser=!1,n.entity="user",this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},t.prototype.resetPassword=function(e){return a(this,void 0,void 0,(function(){var t,n,r=this;return s(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent),this.modal=this.resetPasswordModalRef.createComponent(t).instance,(n=this.modal.show(w.ResetPasswordComponent,this.resetPasswordModalRef)).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((function(){r.modal.close(),r.load()})),this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},t.prototype.showBulkStatus=function(e,t,n,r){return a(this,void 0,void 0,(function(){var i,a,l,c,p,u,d=this;return s(this,(function(s){switch(s.label){case 0:i=this.componentFactoryResolver.resolveComponentFactory(y.ModalComponent),this.modal=this.bulkStatusModalRef.createComponent(i).instance,(a=this.modal.show(b.BulkStatusComponent,this.bulkStatusModalRef)).loading=!0,l=!1,this.modal.onShown.subscribe((function(){l&&d.modal.close()})),this.modal.onClosed.subscribe((function(){d.modal=null})),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,n];case 2:return c=s.sent(),this.modal&&(p=c.data.filter((function(e){return""!==e.error})).reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t.error,n))}),{}),u=t.reduce((function(e,t){var n;return o(o({},e),((n={})[t.id]=t,n))}),{}),a.users=e.map((function(e){var t,n=null!==(t=p[e.id])&&void 0!==t?t:r;return u.hasOwnProperty(e.id)||(n=d.i18nService.t("bulkFilteredMessage")),{user:e,error:p.hasOwnProperty(e.id),message:n}})),a.loading=!1),[3,4];case 3:return s.sent(),l=!0,this.modal&&this.modal.close(),[3,4];case 4:return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(E.ɵɵdirectiveInject(P.ApiService),E.ɵɵdirectiveInject(k.ActivatedRoute),E.ɵɵdirectiveInject(O.I18nService),E.ɵɵdirectiveInject(E.ComponentFactoryResolver),E.ɵɵdirectiveInject(A.PlatformUtilsService),E.ɵɵdirectiveInject(_.ToasterService),E.ɵɵdirectiveInject(M.CryptoService),E.ɵɵdirectiveInject(T.UserService),E.ɵɵdirectiveInject(k.Router),E.ɵɵdirectiveInject(D.StorageService),E.ɵɵdirectiveInject(R.SearchService),E.ɵɵdirectiveInject(B.ValidationService),E.ɵɵdirectiveInject(U.PolicyService),E.ɵɵdirectiveInject(j.LogService),E.ɵɵdirectiveInject(V.SearchPipe),E.ɵɵdirectiveInject(F.UserNamePipe),E.ɵɵdirectiveInject(N.SyncService))},t.ɵcmp=E.ɵɵdefineComponent({type:t,selectors:[["app-org-people"]],viewQuery:function(e,t){if(1&e&&(E.ɵɵviewQuery(Y,3,l.ViewContainerRef),E.ɵɵviewQuery(J,3,l.ViewContainerRef),E.ɵɵviewQuery(Z,3,l.ViewContainerRef),E.ɵɵviewQuery(X,3,l.ViewContainerRef),E.ɵɵviewQuery(ee,3,l.ViewContainerRef),E.ɵɵviewQuery(te,3,l.ViewContainerRef),E.ɵɵviewQuery(ne,3,l.ViewContainerRef),E.ɵɵviewQuery(re,3,l.ViewContainerRef)),2&e){var n=void 0;E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.addEditModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.groupsModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.eventsModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.confirmModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.resetPasswordModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.bulkStatusModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.bulkConfirmModalRef=n.first),E.ɵɵqueryRefresh(n=E.ɵɵloadQuery())&&(t.bulkRemoveModalRef=n.first)}},features:[E.ɵɵ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,"fa","fa-cog"],["aria-labelledby","bulkActionsButton",1,"dropdown-menu","dropdown-menu-right"],["appStopClick","",1,"dropdown-item",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-envelope-o"],["class","dropdown-item text-success","appStopClick","",3,"click",4,"ngIf"],["appStopClick","",1,"dropdown-item","text-danger",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-remove"],[1,"dropdown-divider"],["aria-hidden","true",1,"fa","fa-fw","fa-check-square-o"],["aria-hidden","true",1,"fa","fa-fw","fa-minus-square-o"],["type","button",1,"btn","btn-sm","btn-outline-primary","ml-3",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-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,"fa","fa-fw","fa-check"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","info","icon","fa-check-circle",3,"title",4,"ngIf"],["infiniteScroll","",1,"table","table-hover","table-list",3,"infiniteScrollDistance","infiniteScrollDisabled","scrolled"],[4,"ngFor","ngForOf"],["type","info","icon","fa-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,"fa","fa-cog","fa-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,"fa","fa-lock",3,"title"],["aria-hidden","true",1,"fa","fa-key",3,"title"],["href","#","appStopClick","",1,"dropdown-item",3,"click"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-sitemap"],["aria-hidden","true",1,"fa","fa-fw","fa-file-text-o"],["aria-hidden","true",1,"fa","fa-fw","fa-key"]],template:function(e,t){1&e&&(E.ɵɵelementStart(0,"div",0),E.ɵɵtext(1," "),E.ɵɵelementStart(2,"h1"),E.ɵɵtext(3),E.ɵɵpipe(4,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(5," "),E.ɵɵelementStart(6,"div",1),E.ɵɵtext(7," "),E.ɵɵelementStart(8,"div",2),E.ɵɵtext(9," "),E.ɵɵelementStart(10,"button",3),E.ɵɵlistener("click",(function(){return t.filter(null)})),E.ɵɵtext(11),E.ɵɵpipe(12,"i18n"),E.ɵɵtemplate(13,ie,2,1,"span",4),E.ɵɵtext(14," "),E.ɵɵelementEnd(),E.ɵɵtext(15," "),E.ɵɵelementStart(16,"button",3),E.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Invited)})),E.ɵɵtext(17),E.ɵɵpipe(18,"i18n"),E.ɵɵtemplate(19,oe,2,1,"span",4),E.ɵɵtext(20," "),E.ɵɵelementEnd(),E.ɵɵtext(21," "),E.ɵɵelementStart(22,"button",3),E.ɵɵlistener("click",(function(){return t.filter(t.userStatusType.Accepted)})),E.ɵɵtext(23),E.ɵɵpipe(24,"i18n"),E.ɵɵtemplate(25,ae,2,1,"span",5),E.ɵɵtext(26," "),E.ɵɵelementEnd(),E.ɵɵtext(27," "),E.ɵɵelementEnd(),E.ɵɵtext(28," "),E.ɵɵelementStart(29,"div",6),E.ɵɵtext(30," "),E.ɵɵelementStart(31,"label",7),E.ɵɵtext(32),E.ɵɵpipe(33,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(34," "),E.ɵɵelementStart(35,"input",8),E.ɵɵlistener("ngModelChange",(function(e){return t.searchText=e})),E.ɵɵpipe(36,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(37," "),E.ɵɵelementEnd(),E.ɵɵtext(38," "),E.ɵɵelementStart(39,"div",9),E.ɵɵtext(40," "),E.ɵɵelementStart(41,"button",10),E.ɵɵpipe(42,"i18n"),E.ɵɵtext(43," "),E.ɵɵelement(44,"i",11),E.ɵɵtext(45," "),E.ɵɵelementEnd(),E.ɵɵtext(46," "),E.ɵɵelementStart(47,"div",12),E.ɵɵtext(48," "),E.ɵɵelementStart(49,"button",13),E.ɵɵlistener("click",(function(){return t.bulkReinvite()})),E.ɵɵtext(50," "),E.ɵɵelement(51,"i",14),E.ɵɵtext(52),E.ɵɵpipe(53,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(54," "),E.ɵɵtemplate(55,se,5,3,"button",15),E.ɵɵtext(56," "),E.ɵɵelementStart(57,"button",16),E.ɵɵlistener("click",(function(){return t.bulkRemove()})),E.ɵɵtext(58," "),E.ɵɵelement(59,"i",17),E.ɵɵtext(60),E.ɵɵpipe(61,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(62," "),E.ɵɵelement(63,"div",18),E.ɵɵtext(64," "),E.ɵɵelementStart(65,"button",13),E.ɵɵlistener("click",(function(){return t.selectAll(!0)})),E.ɵɵtext(66," "),E.ɵɵelement(67,"i",19),E.ɵɵtext(68),E.ɵɵpipe(69,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(70," "),E.ɵɵelementStart(71,"button",13),E.ɵɵlistener("click",(function(){return t.selectAll(!1)})),E.ɵɵtext(72," "),E.ɵɵelement(73,"i",20),E.ɵɵtext(74),E.ɵɵpipe(75,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(76," "),E.ɵɵelementEnd(),E.ɵɵtext(77," "),E.ɵɵelementEnd(),E.ɵɵtext(78," "),E.ɵɵelementStart(79,"button",21),E.ɵɵlistener("click",(function(){return t.invite()})),E.ɵɵtext(80," "),E.ɵɵelement(81,"i",22),E.ɵɵtext(82),E.ɵɵpipe(83,"i18n"),E.ɵɵelementEnd(),E.ɵɵtext(84," "),E.ɵɵelementEnd(),E.ɵɵtext(85," "),E.ɵɵelementEnd(),E.ɵɵtext(86," "),E.ɵɵtemplate(87,le,9,6,"ng-container",23),E.ɵɵtext(88," "),E.ɵɵtemplate(89,Oe,6,2,"ng-container",23),E.ɵɵpipe(90,"search"),E.ɵɵtext(91," "),E.ɵɵtemplate(92,Ae,0,0,"ng-template",null,24,E.ɵɵtemplateRefExtractor),E.ɵɵtext(94," "),E.ɵɵtemplate(95,_e,0,0,"ng-template",null,25,E.ɵɵtemplateRefExtractor),E.ɵɵtext(97," "),E.ɵɵtemplate(98,Me,0,0,"ng-template",null,26,E.ɵɵtemplateRefExtractor),E.ɵɵtext(100," "),E.ɵɵtemplate(101,Te,0,0,"ng-template",null,27,E.ɵɵtemplateRefExtractor),E.ɵɵtext(103," "),E.ɵɵtemplate(104,De,0,0,"ng-template",null,28,E.ɵɵtemplateRefExtractor),E.ɵɵtext(106," "),E.ɵɵtemplate(107,Re,0,0,"ng-template",null,29,E.ɵɵtemplateRefExtractor),E.ɵɵtext(109," "),E.ɵɵtemplate(110,Be,0,0,"ng-template",null,30,E.ɵɵtemplateRefExtractor),E.ɵɵtext(112," "),E.ɵɵtemplate(113,Ue,0,0,"ng-template",null,31,E.ɵɵtemplateRefExtractor),E.ɵɵtext(115," ")),2&e&&(E.ɵɵadvance(3),E.ɵɵtextInterpolate(E.ɵɵpipeBind1(4,22,"people")),E.ɵɵadvance(7),E.ɵɵproperty("ngClass",E.ɵɵpureFunction1(52,je,null==t.status)),E.ɵɵadvance(1),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(12,24,"all")," "),E.ɵɵadvance(2),E.ɵɵproperty("ngIf",t.allCount),E.ɵɵadvance(3),E.ɵɵproperty("ngClass",E.ɵɵpureFunction1(54,je,t.status==t.userStatusType.Invited)),E.ɵɵadvance(1),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(18,26,"invited")," "),E.ɵɵadvance(2),E.ɵɵproperty("ngIf",t.invitedCount),E.ɵɵadvance(3),E.ɵɵproperty("ngClass",E.ɵɵpureFunction1(56,je,t.status==t.userStatusType.Accepted)),E.ɵɵadvance(1),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(24,28,"accepted")," "),E.ɵɵadvance(2),E.ɵɵproperty("ngIf",t.acceptedCount),E.ɵɵadvance(7),E.ɵɵtextInterpolate(E.ɵɵpipeBind1(33,30,"search")),E.ɵɵadvance(3),E.ɵɵpropertyInterpolate("placeholder",E.ɵɵpipeBind1(36,32,"search")),E.ɵɵproperty("ngModel",t.searchText),E.ɵɵadvance(6),E.ɵɵpropertyInterpolate("appA11yTitle",E.ɵɵpipeBind1(42,34,"options")),E.ɵɵadvance(11),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(53,36,"reinviteSelected")," "),E.ɵɵadvance(3),E.ɵɵproperty("ngIf",t.showBulkConfirmUsers),E.ɵɵadvance(5),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(61,38,"remove")," "),E.ɵɵadvance(8),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(69,40,"selectAll")," "),E.ɵɵadvance(6),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(75,42,"unselectAll")," "),E.ɵɵadvance(8),E.ɵɵtextInterpolate1(" ",E.ɵɵpipeBind1(83,44,"inviteUser")," "),E.ɵɵadvance(5),E.ɵɵproperty("ngIf",t.loading),E.ɵɵadvance(2),E.ɵɵproperty("ngIf",!t.loading&&(t.isPaging()?t.pagedUsers:E.ɵɵpipeBindV(90,46,E.ɵɵpureFunction2(58,Ve,t.users,t.searchText)))))},directives:[z.NgClass,z.NgIf,L.DefaultValueAccessor,L.NgControlStatus,L.NgModel,K.A11yTitleDirective,G.StopClickDirective,q.InfiniteScrollDirective,z.NgForOf,H.CalloutComponent,L.CheckboxControlValueAccessor,W.StopPropDirective,$.AvatarComponent],pipes:[Q.I18nPipe,V.SearchPipe,F.UserNamePipe],encapsulation:2}),t}(v.BasePeopleComponent);t.PeopleComponent=Fe,("undefined"==typeof ngDevMode||ngDevMode)&&E.ɵsetClassMetadata(Fe,[{type:l.Component,args:[{selector:"app-org-people",templateUrl:"people.component.html"}]}],(function(){return[{type:P.ApiService},{type:k.ActivatedRoute},{type:O.I18nService},{type:E.ComponentFactoryResolver},{type:A.PlatformUtilsService},{type:_.ToasterService},{type:M.CryptoService},{type:T.UserService},{type:k.Router},{type:D.StorageService},{type:R.SearchService},{type:B.ValidationService},{type:U.PolicyService},{type:j.LogService},{type:V.SearchPipe},{type:F.UserNamePipe},{type:N.SyncService}]}),{addEditModalRef:[{type:l.ViewChild,args:["addEdit",{read:l.ViewContainerRef,static:!0}]}],groupsModalRef:[{type:l.ViewChild,args:["groupsTemplate",{read:l.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:l.ViewChild,args:["eventsTemplate",{read:l.ViewContainerRef,static:!0}]}],confirmModalRef:[{type:l.ViewChild,args:["confirmTemplate",{read:l.ViewContainerRef,static:!0}]}],resetPasswordModalRef:[{type:l.ViewChild,args:["resetPasswordTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkStatusModalRef:[{type:l.ViewChild,args:["bulkStatusTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkConfirmModalRef:[{type:l.ViewChild,args:["bulkConfirmTemplate",{read:l.ViewContainerRef,static:!0}]}],bulkRemoveModalRef:[{type:l.ViewChild,args:["bulkRemoveTemplate",{read:l.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var R=function(e,t){return{"fa-eye":e,"fa-eye-slash":t}},B=function(){function e(e,t,n,r,i,a){this.apiService=e,this.i18nService=t,this.platformUtilsService=n,this.passwordGenerationService=r,this.policyService=i,this.cryptoService=a,this.onPasswordReset=new o.EventEmitter,this.newPassword=null,this.showPassword=!1}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return e=this,[4,this.policyService.getMasterPasswordPolicyOptions()];case 1:return e.enforcedPolicyOptions=t.sent(),[2]}}))}))},Object.defineProperty(e.prototype,"loggedOutWarningName",{get:function(){return null!=this.name?this.name:this.i18nService.t("thisUser")},enumerable:!1,configurable:!0}),e.prototype.getPasswordScoreAlertDisplay=function(){if(null==this.enforcedPolicyOptions)return"";var 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+")"},e.prototype.generatePassword=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.passwordGenerationService.getOptions()];case 1:return e=n.sent()[0],t=this,[4,this.passwordGenerationService.generatePassword(e)];case 2:return t.newPassword=n.sent(),this.updatePasswordStrength(),[2]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("newPassword").focus()},e.prototype.copy=function(e){null!=e&&(this.platformUtilsService.copyToClipboard(e,{window:window}),this.platformUtilsService.showToast("info",null,this.i18nService.t("valueCopied",this.i18nService.t("password"))))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return null==this.newPassword||""===this.newPassword?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassRequired")),[2,!1]):this.newPassword.length<8?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPassLength")),[2,!1]):null==this.enforcedPolicyOptions||this.policyService.evaluateMasterPassword(this.masterPasswordScore,this.newPassword,this.enforcedPolicyOptions)?this.masterPasswordScore<3?[4,this.platformUtilsService.showDialog(this.i18nService.t("weakMasterPasswordDesc"),this.i18nService.t("weakMasterPassword"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[3,2]:(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("masterPasswordPolicyRequirementsNotMet")),[2]);case 1:if(!t.sent())return[2,!1];t.label=2;case 2:return t.trys.push([2,4,,5]),this.formPromise=this.apiService.getOrganizationUserResetPasswordDetails(this.organizationId,this.id).then((function(t){return r(e,void 0,void 0,(function(){var e,n,r,o,c,p,u,d,m,f,h,v;return i(this,(function(i){switch(i.label){case 0:if(null==t)throw new Error(this.i18nService.t("resetPasswordDetailsError"));return e=t.kdf,n=t.kdfIterations,r=t.resetPasswordKey,o=t.encryptedPrivateKey,[4,this.cryptoService.getOrgKey(this.organizationId)];case 1:return c=i.sent(),[4,this.cryptoService.decryptToBytes(new a.EncString(o),c)];case 2:return p=i.sent(),[4,this.cryptoService.rsaDecrypt(r,p)];case 3:return u=i.sent(),d=new s.SymmetricCryptoKey(u),[4,this.cryptoService.makeKey(this.newPassword,this.email.trim().toLowerCase(),e,n)];case 4:return m=i.sent(),[4,this.cryptoService.hashPassword(this.newPassword,m)];case 5:return f=i.sent(),[4,this.cryptoService.remakeEncKey(m,d)];case 6:return h=i.sent(),(v=new l.OrganizationUserResetPasswordRequest).key=h[1].encryptedString,v.newMasterPasswordHash=f,[2,this.apiService.putOrganizationUserResetPassword(this.organizationId,this.id,v)]}}))}))})),[4,this.formPromise];case 3:return t.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("resetPasswordSuccess")),this.onPasswordReset.emit(),[3,5];case 4:return t.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.updatePasswordStrength=function(){var e=this;null!=this.newPasswordStrengthTimeout&&clearTimeout(this.newPasswordStrengthTimeout),this.newPasswordStrengthTimeout=setTimeout((function(){var t=e.passwordGenerationService.passwordStrength(e.newPassword,e.getPasswordStrengthUserInput());e.masterPasswordScore=null==t?null:t.score}),300)},e.prototype.getPasswordStrengthUserInput=function(){var e=[],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},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.I18nService),c.ɵɵdirectiveInject(d.PlatformUtilsService),c.ɵɵdirectiveInject(m.PasswordGenerationService),c.ɵɵdirectiveInject(f.PolicyService),c.ɵɵdirectiveInject(h.CryptoService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-reset-password"]],inputs:{name:"name",email:"email",id:"id",organizationId:"organizationId"},outputs:{onPasswordReset:"onPasswordReset"},decls:97,vars:43,consts:[["tabindex","-1","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",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","fa-icon-above-input",3,"appA11yTitle","click"],["aria-hidden","true",1,"fa","fa-lg","fa-fw","fa-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,"fa","fa-lg",3,"ngClass"],["aria-hidden","true",1,"fa","fa-lg","fa-clone"],[3,"score","showText"],[1,"modal-footer"],["type","submit",1,"btn","btn-primary","btn-submit",3,"disabled"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){if(1&e&&(c.ɵɵelementStart(0,"div",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3," "),c.ɵɵelementStart(4,"form",2,3),c.ɵɵlistener("ngSubmit",(function(){return t.submit()})),c.ɵɵtext(6," "),c.ɵɵelementStart(7,"div",4),c.ɵɵtext(8," "),c.ɵɵelementStart(9,"h2",5),c.ɵɵtext(10),c.ɵɵpipe(11,"i18n"),c.ɵɵtemplate(12,P,2,1,"small",6),c.ɵɵtext(13," "),c.ɵɵelementEnd(),c.ɵɵtext(14," "),c.ɵɵelementStart(15,"button",7),c.ɵɵpipe(16,"i18n"),c.ɵɵtext(17," "),c.ɵɵelementStart(18,"span",8),c.ɵɵtext(19,"×"),c.ɵɵelementEnd(),c.ɵɵtext(20," "),c.ɵɵelementEnd(),c.ɵɵtext(21," "),c.ɵɵelementEnd(),c.ɵɵtext(22," "),c.ɵɵelementStart(23,"div",9),c.ɵɵtext(24," "),c.ɵɵelementStart(25,"app-callout",10),c.ɵɵtext(26),c.ɵɵpipe(27,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(28," "),c.ɵɵtemplate(29,D,18,9,"app-callout",11),c.ɵɵtext(30," "),c.ɵɵelementStart(31,"div",12),c.ɵɵtext(32," "),c.ɵɵelementStart(33,"div",13),c.ɵɵtext(34," "),c.ɵɵelementStart(35,"div",14),c.ɵɵtext(36," "),c.ɵɵelementStart(37,"label",15),c.ɵɵtext(38),c.ɵɵpipe(39,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(40," "),c.ɵɵelementStart(41,"div",16),c.ɵɵtext(42," "),c.ɵɵelementStart(43,"a",17),c.ɵɵlistener("click",(function(){return t.generatePassword()})),c.ɵɵpipe(44,"i18n"),c.ɵɵtext(45," "),c.ɵɵelement(46,"i",18),c.ɵɵtext(47," "),c.ɵɵelementEnd(),c.ɵɵtext(48," "),c.ɵɵelementEnd(),c.ɵɵtext(49," "),c.ɵɵelementEnd(),c.ɵɵtext(50," "),c.ɵɵelementStart(51,"div",19),c.ɵɵtext(52," "),c.ɵɵelementStart(53,"input",20),c.ɵɵlistener("ngModelChange",(function(e){return t.newPassword=e}))("input",(function(){return t.updatePasswordStrength()})),c.ɵɵelementEnd(),c.ɵɵtext(54," "),c.ɵɵelementStart(55,"div",21),c.ɵɵtext(56," "),c.ɵɵelementStart(57,"button",22),c.ɵɵlistener("click",(function(){return t.togglePassword()})),c.ɵɵpipe(58,"i18n"),c.ɵɵtext(59," "),c.ɵɵelement(60,"i",23),c.ɵɵtext(61," "),c.ɵɵelementEnd(),c.ɵɵtext(62," "),c.ɵɵelementStart(63,"button",22),c.ɵɵlistener("click",(function(){return t.copy(t.newPassword)})),c.ɵɵpipe(64,"i18n"),c.ɵɵtext(65," "),c.ɵɵelement(66,"i",24),c.ɵɵtext(67," "),c.ɵɵelementEnd(),c.ɵɵtext(68," "),c.ɵɵelementEnd(),c.ɵɵtext(69," "),c.ɵɵelementEnd(),c.ɵɵtext(70," "),c.ɵɵelementStart(71,"app-password-strength",25),c.ɵɵtext(72," "),c.ɵɵelementEnd(),c.ɵɵtext(73," "),c.ɵɵelementEnd(),c.ɵɵtext(74," "),c.ɵɵelementEnd(),c.ɵɵtext(75," "),c.ɵɵelementEnd(),c.ɵɵtext(76," "),c.ɵɵelementStart(77,"div",26),c.ɵɵtext(78," "),c.ɵɵelementStart(79,"button",27),c.ɵɵtext(80," "),c.ɵɵelement(81,"i",28),c.ɵɵpipe(82,"i18n"),c.ɵɵtext(83," "),c.ɵɵelementStart(84,"span"),c.ɵɵtext(85),c.ɵɵpipe(86,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(87," "),c.ɵɵelementEnd(),c.ɵɵtext(88," "),c.ɵɵelementStart(89,"button",29),c.ɵɵtext(90),c.ɵɵpipe(91,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(92," "),c.ɵɵelementEnd(),c.ɵɵtext(93," "),c.ɵɵelementEnd(),c.ɵɵtext(94," "),c.ɵɵelementEnd(),c.ɵɵtext(95," "),c.ɵɵelementEnd(),c.ɵɵtext(96," ")),2&e){var n=c.ɵɵreference(5);c.ɵɵadvance(4),c.ɵɵproperty("appApiAction",t.formPromise),c.ɵɵadvance(6),c.ɵɵtextInterpolate1(" ",c.ɵɵpipeBind1(11,19,"resetPassword")," "),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",t.name),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(16,21,"close")),c.ɵɵadvance(11),c.ɵɵtextInterpolate1("",c.ɵɵpipeBind2(27,23,"resetPasswordLoggedOutWarning",t.loggedOutWarningName)," "),c.ɵɵadvance(3),c.ɵɵproperty("ngIf",t.enforcedPolicyOptions),c.ɵɵadvance(9),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(39,26,"newPassword")),c.ɵɵadvance(5),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(44,28,"generatePassword")),c.ɵɵadvance(10),c.ɵɵpropertyInterpolate("type",t.showPassword?"text":"password"),c.ɵɵproperty("ngModel",t.newPassword),c.ɵɵadvance(4),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(58,30,"toggleVisibility")),c.ɵɵadvance(3),c.ɵɵproperty("ngClass",c.ɵɵpureFunction2(40,R,!t.showPassword,t.showPassword)),c.ɵɵadvance(3),c.ɵɵpropertyInterpolate("appA11yTitle",c.ɵɵpipeBind1(64,32,"copyPassword")),c.ɵɵadvance(8),c.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),c.ɵɵadvance(8),c.ɵɵproperty("disabled",n.loading),c.ɵɵadvance(2),c.ɵɵpropertyInterpolate("title",c.ɵɵpipeBind1(82,34,"loading")),c.ɵɵadvance(4),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(86,36,"save")),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(91,38,"cancel"))}},directives:[v.ɵangular_packages_forms_forms_ba,v.NgControlStatusGroup,v.NgForm,y.ApiActionDirective,g.NgIf,x.A11yTitleDirective,b.CalloutComponent,S.StopClickDirective,v.DefaultValueAccessor,w.AutofocusDirective,v.RequiredValidator,C.InputVerbatimDirective,v.NgControlStatus,v.NgModel,g.NgClass,I.PasswordStrengthComponent],pipes:[E.I18nPipe],encapsulation:2}),e}();t.ResetPasswordComponent=B,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(B,[{type:o.Component,args:[{selector:"app-reset-password",templateUrl:"reset-password.component.html"}]}],(function(){return[{type:p.ApiService},{type:u.I18nService},{type:d.PlatformUtilsService},{type:m.PasswordGenerationService},{type:f.PolicyService},{type:h.CryptoService}]}),{name:[{type:o.Input}],email:[{type:o.Input}],id:[{type:o.Input}],organizationId:[{type:o.Input}],onPasswordReset:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(n[0].checked=!0,n[0].readOnly=e.readOnly,n[0].hidePasswords=e.hidePasswords)})),[3,5];case 4:return n.sent(),[3,5];case 5:return[3,7];case 6:this.title=this.i18nService.t("inviteUser"),n.label=7;case 7:return this.loading=!1,[2]}}))}))},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e,t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getCollections(this.organizationId)];case 1:return e=r.sent(),t=e.data.map((function(e){return new s.Collection(new a.CollectionData(e))})),n=this,[4,this.collectionService.decryptMany(t)];case 2:return n.collections=r.sent(),[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.collections.forEach((function(n){return t.check(n,e)}))},e.prototype.setRequestPermissions=function(e,t){return e.accessBusinessPortal=!t&&this.permissions.accessBusinessPortal,e.accessEventLogs=this.permissions.accessEventLogs=!t&&this.permissions.accessEventLogs,e.accessImportExport=!t&&this.permissions.accessImportExport,e.accessReports=!t&&this.permissions.accessReports,e.manageAllCollections=!t&&this.permissions.manageAllCollections,e.manageAssignedCollections=!t&&this.permissions.manageAssignedCollections,e.manageGroups=!t&&this.permissions.manageGroups,e.manageSso=!t&&this.permissions.manageSso,e.managePolicies=!t&&this.permissions.managePolicies,e.manageUsers=!t&&this.permissions.manageUsers,e.manageResetPassword=!t&&this.permissions.manageResetPassword,e},e.prototype.handleDependentPermissions=function(){this.permissions.manageResetPassword&&!this.permissions.manageUsers&&(this.permissions.manageUsers=!0,document.getElementById("manageUsers").checked=!0,this.platformUtilsService.showToast("info",null,this.i18nService.t("resetPasswordManageUsers")))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r;return i(this,(function(i){switch(i.label){case 0:n=null,"all"!==this.access&&(n=this.collections.filter((function(e){return e.checked})).map((function(e){return new p.SelectionReadOnlyRequest(e.id,!!e.readOnly,!!e.hidePasswords)}))),i.label=1;case 1:return i.trys.push([1,3,,4]),this.editMode?((r=new c.OrganizationUserUpdateRequest).accessAll="all"===this.access,r.type=this.type,r.collections=n,r.permissions=this.setRequestPermissions(null!==(e=r.permissions)&&void 0!==e?e:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),this.formPromise=this.apiService.putOrganizationUser(this.organizationId,this.organizationUserId,r)):((r=new l.OrganizationUserInviteRequest).emails=this.emails.trim().split(/\s*,\s*/),r.accessAll="all"===this.access,r.type=this.type,r.permissions=this.setRequestPermissions(null!==(t=r.permissions)&&void 0!==t?t:new d.PermissionsApi,r.type!==u.OrganizationUserType.Custom),r.collections=n,this.formPromise=this.apiService.postOrganizationUserInvite(this.organizationId,r)),[4,this.formPromise];case 2:return i.sent(),this.toasterService.popAsync("success",null,this.i18nService.t(this.editMode?"editedUserId":"invitedUsers",this.name)),this.onSavedUser.emit(),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.editMode?[4,this.platformUtilsService.showDialog(this.i18nService.t("removeUserConfirmation"),this.name,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.apiService.deleteOrganizationUser(this.organizationId,this.organizationUserId),[4,this.deletePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("removedUserId",this.name)),this.onDeletedUser.emit(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(f.ApiService),m.ɵɵdirectiveInject(h.I18nService),m.ɵɵdirectiveInject(v.ToasterService),m.ɵɵdirectiveInject(y.CollectionService),m.ɵɵdirectiveInject(g.PlatformUtilsService))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["app-user-add-edit"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser",onDeletedUser:"onDeletedUser"},decls:51,vars:19,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-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,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],[4,"ngIf"],["target","_blank","rel","noopener","href","https://bitwarden.com/help/article/user-types-access-control/#user-types",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[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/article/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"],[1,"form-group","mb-0"],[1,"form-check","mt-1","form-check-block"],["type","checkbox","name","manageAssignedCollections","id","manageAssignedCollections",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageAssignedCollections",1,"form-check-label","font-weight-normal"],["type","checkbox","name","accessBusinessPortal","id","accessBusinessPortal",1,"form-check-input",3,"ngModel","ngModelChange"],["for","accessBusinessPortal",1,"form-check-label","font-weight-normal"],["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"],["type","checkbox","name","manageAllCollections","id","manageAllCollections",1,"form-check-input",3,"ngModel","ngModelChange"],["for","manageAllCollections",1,"form-check-label","font-weight-normal"],["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,"fa","fa-trash-o","fa-lg","fa-fw",3,"hidden"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","fa-lg","fa-fw",3,"hidden","title"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵtemplate(11,E,2,1,"small",6),m.ɵɵtext(12," "),m.ɵɵelementEnd(),m.ɵɵtext(13," "),m.ɵɵelementStart(14,"button",7),m.ɵɵpipe(15,"i18n"),m.ɵɵtext(16," "),m.ɵɵelementStart(17,"span",8),m.ɵɵtext(18,"×"),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵtemplate(22,P,9,6,"div",9),m.ɵɵtext(23," "),m.ɵɵtemplate(24,B,119,67,"div",9),m.ɵɵtext(25," "),m.ɵɵelementStart(26,"div",10),m.ɵɵtext(27," "),m.ɵɵelementStart(28,"button",11),m.ɵɵtext(29," "),m.ɵɵelement(30,"i",12),m.ɵɵpipe(31,"i18n"),m.ɵɵtext(32," "),m.ɵɵelementStart(33,"span"),m.ɵɵtext(34),m.ɵɵpipe(35,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(36," "),m.ɵɵelementEnd(),m.ɵɵtext(37," "),m.ɵɵelementStart(38,"button",13),m.ɵɵtext(39),m.ɵɵpipe(40,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(41," "),m.ɵɵelementStart(42,"div",14),m.ɵɵtext(43," "),m.ɵɵtemplate(44,U,9,10,"button",15),m.ɵɵtext(45," "),m.ɵɵelementEnd(),m.ɵɵtext(46," "),m.ɵɵelementEnd(),m.ɵɵtext(47," "),m.ɵɵelementEnd(),m.ɵɵtext(48," "),m.ɵɵelementEnd(),m.ɵɵtext(49," "),m.ɵɵelementEnd(),m.ɵɵtext(50," ")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1(" ",t.title," "),m.ɵɵadvance(1),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(15,11,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",t.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!t.loading),m.ɵɵadvance(4),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(31,13,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(35,15,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(40,17,"cancel")," "),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",t.editMode)}},directives:[x.NgControlStatusGroup,x.NgForm,b.ApiActionDirective,S.NgIf,w.A11yTitleDirective,x.RadioControlValueAccessor,x.DefaultValueAccessor,x.NgControlStatus,x.NgModel,S.NgClass,x.RequiredValidator,x.CheckboxControlValueAccessor,S.NgForOf,C.StopPropDirective],pipes:[I.I18nPipe],encapsulation:2}),e}();t.UserAddEditComponent=j,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(j,[{type:o.Component,args:[{selector:"app-user-add-edit",templateUrl:"user-add-edit.component.html"}]}],(function(){return[{type:f.ApiService},{type:h.I18nService},{type:v.ToasterService},{type:y.CollectionService},{type:g.PlatformUtilsService}]}),{name:[{type:o.Input}],organizationUserId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedUser:[{type:o.Output}],onDeletedUser:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(t[0].checked=!0)})),[3,5];case 4:return i.sent(),[3,5];case 5:return this.loading=!1,[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t,e.checked||(e.readOnly=!1)},e.prototype.selectAll=function(e){var t=this;this.groups.forEach((function(n){return t.check(n,e)}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:(e=new a.OrganizationUserUpdateGroupsRequest).groupIds=this.groups.filter((function(e){return e.checked})).map((function(e){return e.id})),t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.apiService.putOrganizationUserGroups(this.organizationId,this.organizationUserId,e),[4,this.formPromise];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("editedGroupsForUser",this.name)),this.onSavedUser.emit(),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.ɵfac=function(t){return new(t||e)(l.ɵɵdirectiveInject(c.ApiService),l.ɵɵdirectiveInject(p.I18nService),l.ɵɵdirectiveInject(u.ToasterService))},e.ɵcmp=l.ɵɵdefineComponent({type:e,selectors:[["app-user-groups"]],inputs:{name:"name",organizationUserId:"organizationUserId",organizationId:"organizationId"},outputs:{onSavedUser:"onSavedUser"},decls:47,vars:20,consts:[["tabindex","-1","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,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],[1,"modal-body"],["aria-hidden","true",1,"fa","fa-spinner","fa-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&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"form",2,3),l.ɵɵlistener("ngSubmit",(function(){return t.submit()})),l.ɵɵtext(6," "),l.ɵɵelementStart(7,"div",4),l.ɵɵtext(8," "),l.ɵɵelementStart(9,"h2",5),l.ɵɵtext(10),l.ɵɵpipe(11,"i18n"),l.ɵɵtemplate(12,g,2,1,"small",6),l.ɵɵtext(13," "),l.ɵɵelementEnd(),l.ɵɵtext(14," "),l.ɵɵelementStart(15,"button",7),l.ɵɵpipe(16,"i18n"),l.ɵɵtext(17," "),l.ɵɵelementStart(18,"span",8),l.ɵɵtext(19,"×"),l.ɵɵelementEnd(),l.ɵɵtext(20," "),l.ɵɵelementEnd(),l.ɵɵtext(21," "),l.ɵɵelementEnd(),l.ɵɵtext(22," "),l.ɵɵtemplate(23,x,9,6,"div",9),l.ɵɵtext(24," "),l.ɵɵtemplate(25,C,10,5,"div",9),l.ɵɵtext(26," "),l.ɵɵelementStart(27,"div",10),l.ɵɵtext(28," "),l.ɵɵelementStart(29,"button",11),l.ɵɵtext(30," "),l.ɵɵelement(31,"i",12),l.ɵɵpipe(32,"i18n"),l.ɵɵtext(33," "),l.ɵɵelementStart(34,"span"),l.ɵɵtext(35),l.ɵɵpipe(36,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(37," "),l.ɵɵelementEnd(),l.ɵɵtext(38," "),l.ɵɵelementStart(39,"button",13),l.ɵɵtext(40),l.ɵɵpipe(41,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(42," "),l.ɵɵelementEnd(),l.ɵɵtext(43," "),l.ɵɵelementEnd(),l.ɵɵtext(44," "),l.ɵɵelementEnd(),l.ɵɵtext(45," "),l.ɵɵelementEnd(),l.ɵɵtext(46," ")),2&e){var n=l.ɵɵreference(5);l.ɵɵadvance(4),l.ɵɵproperty("appApiAction",t.formPromise),l.ɵɵadvance(6),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(11,10,"groupAccess")," "),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.name),l.ɵɵadvance(3),l.ɵɵpropertyInterpolate("appA11yTitle",l.ɵɵpipeBind1(16,12,"close")),l.ɵɵadvance(8),l.ɵɵproperty("ngIf",t.loading),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",!t.loading),l.ɵɵadvance(4),l.ɵɵproperty("disabled",n.loading),l.ɵɵadvance(2),l.ɵɵpropertyInterpolate("title",l.ɵɵpipeBind1(32,14,"loading")),l.ɵɵadvance(4),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(36,16,"save")),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(41,18,"cancel"))}},directives:[d.ɵangular_packages_forms_forms_ba,d.NgControlStatusGroup,d.NgForm,m.ApiActionDirective,f.NgIf,h.A11yTitleDirective,f.NgForOf,d.CheckboxControlValueAccessor,v.StopPropDirective,d.NgControlStatus,d.NgModel],pipes:[y.I18nPipe],encapsulation:2}),e}();t.UserGroupsComponent=I,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(I,[{type:o.Component,args:[{selector:"app-user-groups",templateUrl:"user-groups.component.html"}]}],(function(){return[{type:c.ApiService},{type:p.I18nService},{type:u.ToasterService}]}),{name:[{type:o.Input}],organizationUserId:[{type:o.Input}],organizationId:[{type:o.Input}],onSavedUser:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?e.data:[],this.orgPolicies.forEach((function(e){t.policiesEnabledMap.set(e.type,e.enabled)})),this.policies.forEach((function(e){e.enabled=t.policiesEnabledMap.has(e.type)&&t.policiesEnabledMap.get(e.type)})),this.loading=!1,[2]}}))}))},e.prototype.edit=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(s.ModalComponent);this.modal=this.editModalRef.createComponent(n).instance;var r=this.modal.show(l.PolicyEditComponent,this.editModalRef);r.name=e.name,r.description=e.description,r.type=e.type,r.organizationId=this.organizationId,r.policiesEnabledMap=this.policiesEnabledMap,r.onSavedPolicy.subscribe((function(){t.modal.close(),t.load()})),this.modal.onClosed.subscribe((function(){t.modal=null}))},e.prototype.goToEnterprisePortal=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:if(null!=this.enterpriseTokenPromise)return[2];n.label=1;case 1:return n.trys.push([1,5,,6]),this.enterpriseTokenPromise=this.apiService.getEnterprisePortalSignInToken(),[4,this.enterpriseTokenPromise];case 2:return null==(e=n.sent())?[3,4]:[4,this.userService.getUserId()];case 3:t=n.sent(),this.platformUtilsService.launchUri(this.enterpriseUrl+"/login?userId="+t+"&token="+window.encodeURIComponent(e)+"&organizationId="+this.organizationId),n.label=4;case 4:return[3,6];case 5:return n.sent(),[3,6];case 6:return this.enterpriseTokenPromise=null,[2]}}))}))},e.ɵfac=function(t){return new(t||e)(c.ɵɵdirectiveInject(p.ApiService),c.ɵɵdirectiveInject(u.ActivatedRoute),c.ɵɵdirectiveInject(d.I18nService),c.ɵɵdirectiveInject(c.ComponentFactoryResolver),c.ɵɵdirectiveInject(m.PlatformUtilsService),c.ɵɵdirectiveInject(f.UserService),c.ɵɵdirectiveInject(u.Router),c.ɵɵdirectiveInject(h.EnvironmentService))},e.ɵcmp=c.ɵɵdefineComponent({type:e,selectors:[["app-org-policies"]],viewQuery:function(e,t){if(1&e&&c.ɵɵviewQuery(b,3,o.ViewContainerRef),2&e){var n;c.ɵɵqueryRefresh(n=c.ɵɵloadQuery())&&(t.editModalRef=n.first)}},decls:16,vars:6,consts:[[3,"type",4,"ngIf"],[1,"page-header","d-flex"],[4,"ngIf"],["class","table table-hover table-list",4,"ngIf"],["editTemplate",""],[3,"type"],["type","button",1,"btn","btn-outline-secondary",3,"click"],["aria-hidden","true",1,"fa","fa-spinner","fa-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&&(c.ɵɵtemplate(0,S,10,7,"app-callout",0),c.ɵɵtext(1," "),c.ɵɵelementStart(2,"div",1),c.ɵɵtext(3," "),c.ɵɵelementStart(4,"h1"),c.ɵɵtext(5),c.ɵɵpipe(6,"i18n"),c.ɵɵelementEnd(),c.ɵɵtext(7," "),c.ɵɵelementEnd(),c.ɵɵtext(8," "),c.ɵɵtemplate(9,w,9,6,"ng-container",2),c.ɵɵtext(10," "),c.ɵɵtemplate(11,P,7,1,"table",3),c.ɵɵtext(12," "),c.ɵɵtemplate(13,k,0,0,"ng-template",null,4,c.ɵɵtemplateRefExtractor),c.ɵɵtext(15," ")),2&e&&(c.ɵɵproperty("ngIf",t.userCanAccessBusinessPortal),c.ɵɵadvance(5),c.ɵɵtextInterpolate(c.ɵɵpipeBind1(6,4,"policies")),c.ɵɵadvance(4),c.ɵɵproperty("ngIf",t.loading),c.ɵɵadvance(2),c.ɵɵproperty("ngIf",!t.loading))},directives:[v.NgIf,y.CalloutComponent,v.NgForOf,g.StopClickDirective],pipes:[x.I18nPipe],encapsulation:2}),e}();t.PoliciesComponent=O,("undefined"==typeof ngDevMode||ngDevMode)&&c.ɵsetClassMetadata(O,[{type:o.Component,args:[{selector:"app-org-policies",templateUrl:"policies.component.html"}]}],(function(){return[{type:p.ApiService},{type:u.ActivatedRoute},{type:d.I18nService},{type:c.ComponentFactoryResolver},{type:m.PlatformUtilsService},{type:f.UserService},{type:u.Router},{type:h.EnvironmentService}]}),{editModalRef:[{type:o.ViewChild,args:["editTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?"×"+n.quantity:""," @ ",s.ɵɵpipeBind2(4,5,n.amount,"$")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate2(" ",s.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",s.ɵɵpipeBind1(9,11,n.interval)," ")}}function U(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",20),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"strong",21),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"table",22),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"tbody"),s.ɵɵtext(9," "),s.ɵɵtemplate(10,B,11,13,"tr",23),s.ɵɵtext(11," "),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵelementEnd(),s.ɵɵtext(13," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(4,2,"details")),s.ɵɵadvance(7),s.ɵɵproperty("ngForOf",n.subscription.items)}}function j(e,t){if(1&e&&(s.ɵɵelementStart(0,"div",14),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",15),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"dl"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"dt"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementStart(10,"dd"),s.ɵɵtext(11),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵtemplate(13,R,23,15,"ng-container",1),s.ɵɵtext(14," "),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementEnd(),s.ɵɵtext(16," "),s.ɵɵtemplate(17,U,14,4,"div",16),s.ɵɵtext(18," "),s.ɵɵelementEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(7),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,4,"billingPlan")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(n.sub.plan.name),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",n.subscription)}}function V(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",27),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",28),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"button",29),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!1)})),s.ɵɵpipe(5,"i18n"),s.ɵɵelementStart(6,"span",30),s.ɵɵtext(7,"×"),s.ɵɵelementEnd(),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementStart(9,"h3",31),s.ɵɵtext(10),s.ɵɵpipe(11,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵelementStart(13,"app-update-license",32),s.ɵɵlistener("onUpdated",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeUpdateLicense(!1)})),s.ɵɵelementEnd(),s.ɵɵtext(14," "),s.ɵɵelementEnd(),s.ɵɵtext(15," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵpropertyInterpolate("appA11yTitle",s.ɵɵpipeBind1(5,3,"cancel")),s.ɵɵadvance(6),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(11,5,"updateLicense")),s.ɵɵadvance(3),s.ɵɵproperty("organizationId",r.organizationId)}}function F(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div"),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"button",24),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(2).updateLicense()})),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementStart(8,"a",25),s.ɵɵtext(9),s.ɵɵpipe(10,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(11," "),s.ɵɵelementEnd(),s.ɵɵtext(12," "),s.ɵɵtemplate(13,V,16,7,"div",26),s.ɵɵtext(14," "),s.ɵɵelementContainerEnd()}if(2&e){var r=s.ɵɵnextContext(2);s.ɵɵadvance(5),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(6,3,"updateLicense")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(10,5,"manageSubscription")," "),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",r.showUpdateLicense)}}function N(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",24),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).changePlan()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,1,"changeBillingPlan")," "))}function z(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",42),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).downloadLicense()})),s.ɵɵtext(1),s.ɵɵpipe(2,"i18n"),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵproperty("disabled",r.showDownloadLicense),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(2,2,"downloadLicense")," ")}}function L(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"button",43,44),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).cancel()})),s.ɵɵtext(2," "),s.ɵɵelement(3,"i",10),s.ɵɵpipe(4,"i18n"),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"span"),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵreference(1),i=s.ɵɵnextContext(3);s.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),s.ɵɵadvance(3),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(4,4,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function K(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-change-plan",45),s.ɵɵlistener("onChanged",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeChangePlan(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeChangePlan(!1)})),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵproperty("organizationId",r.organizationId)}}function G(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",46),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"app-download-license",47),s.ɵɵlistener("onDownloaded",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeDownloadLicense()}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(3).closeDownloadLicense()})),s.ɵɵelementEnd(),s.ɵɵtext(3," "),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(3);s.ɵɵadvance(2),s.ɵɵproperty("organizationId",r.organizationId)}}function q(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",33),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"button",24),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustSeats(!0)})),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"button",50),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustSeats(!1)})),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,2,"addSeats")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,4,"removeSeats")," "))}function H(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-adjust-seats",51),s.ɵɵlistener("onAdjusted",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeSeats(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeSeats(!1)})),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(4);s.ɵɵproperty("seatPrice",r.seatPrice)("add",r.adjustSeatsAdd)("organizationId",r.organizationId)("interval",r.billingInterval)}}function W(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",46),s.ɵɵtext(3," "),s.ɵɵtemplate(4,q,10,6,"div",48),s.ɵɵtext(5," "),s.ɵɵtemplate(6,H,1,4,"app-adjust-seats",49),s.ɵɵtext(7," "),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!n.showAdjustSeats),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showAdjustSeats)}}function $(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"div",33),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"button",24),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustStorage(!0)})),s.ɵɵtext(3),s.ɵɵpipe(4,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(5," "),s.ɵɵelementStart(6,"button",50),s.ɵɵlistener("click",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).adjustStorage(!1)})),s.ɵɵtext(7),s.ɵɵpipe(8,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(9," "),s.ɵɵelementEnd()}2&e&&(s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(4,2,"addStorage")," "),s.ɵɵadvance(4),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(8,4,"removeStorage")," "))}function Q(e,t){if(1&e){var n=s.ɵɵgetCurrentView();s.ɵɵelementStart(0,"app-adjust-storage",53),s.ɵɵlistener("onAdjusted",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return s.ɵɵrestoreView(n),s.ɵɵnextContext(4).closeStorage(!1)})),s.ɵɵelementEnd()}if(2&e){var r=s.ɵɵnextContext(4);s.ɵɵproperty("storageGbPrice",r.storageGbPrice)("add",r.adjustStorageAdd)("organizationId",r.organizationId)("interval",r.billingInterval)}}function Y(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",46),s.ɵɵtext(3," "),s.ɵɵtemplate(4,$,10,6,"div",48),s.ɵɵtext(5," "),s.ɵɵtemplate(6,Q,1,4,"app-adjust-storage",52),s.ɵɵtext(7," "),s.ɵɵelementEnd(),s.ɵɵtext(8," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!n.showAdjustStorage),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showAdjustStorage)}}function J(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",54),s.ɵɵtext(3," "),s.ɵɵelementStart(4,"h1"),s.ɵɵtext(5),s.ɵɵpipe(6,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(7," "),s.ɵɵelementEnd(),s.ɵɵtext(8),s.ɵɵpipe(9,"i18n"),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(3);s.ɵɵadvance(5),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(6,2,"provider")),s.ɵɵadvance(3),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind2(9,4,"yourProviderIs",n.userOrg.providerName)," ")}}var Z=function(e){return{width:e}};function X(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵelementStart(2,"div",33),s.ɵɵtext(3," "),s.ɵɵtemplate(4,N,3,3,"button",34),s.ɵɵtext(5," "),s.ɵɵtemplate(6,z,3,4,"button",35),s.ɵɵtext(7," "),s.ɵɵtemplate(8,L,10,8,"button",36),s.ɵɵtext(9," "),s.ɵɵelementEnd(),s.ɵɵtext(10," "),s.ɵɵtemplate(11,K,1,1,"app-change-plan",37),s.ɵɵtext(12," "),s.ɵɵtemplate(13,G,4,1,"div",38),s.ɵɵtext(14," "),s.ɵɵelementStart(15,"h2",39),s.ɵɵtext(16),s.ɵɵpipe(17,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(18," "),s.ɵɵelementStart(19,"p"),s.ɵɵtext(20),s.ɵɵpipe(21,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(22," "),s.ɵɵtemplate(23,W,9,2,"ng-container",1),s.ɵɵtext(24," "),s.ɵɵelementStart(25,"h2",39),s.ɵɵtext(26),s.ɵɵpipe(27,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(28," "),s.ɵɵelementStart(29,"p"),s.ɵɵtext(30),s.ɵɵpipe(31,"i18n"),s.ɵɵelementEnd(),s.ɵɵtext(32," "),s.ɵɵelementStart(33,"div",40),s.ɵɵtext(34," "),s.ɵɵelementStart(35,"div",41),s.ɵɵtext(36),s.ɵɵpipe(37,"percent"),s.ɵɵelementEnd(),s.ɵɵtext(38," "),s.ɵɵelementEnd(),s.ɵɵtext(39," "),s.ɵɵtemplate(40,Y,9,2,"ng-container",1),s.ɵɵtext(41," "),s.ɵɵtemplate(42,J,10,7,"ng-container",1),s.ɵɵtext(43," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext(2);s.ɵɵadvance(4),s.ɵɵproperty("ngIf",!n.showChangePlan),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.canDownloadLicense),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",n.showChangePlan),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.showDownloadLicense),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(17,15,"userSeats")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind2(21,17,"subscriptionUserSeats",n.sub.seats)),s.ɵɵadvance(3),s.ɵɵproperty("ngIf",n.subscription&&n.canAdjustSeats&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(3),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(27,20,"storage")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind3(31,22,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),s.ɵɵadvance(5),s.ɵɵproperty("ngStyle",s.ɵɵpureFunction1(28,Z,n.storageProgressWidth+"%")),s.ɵɵattribute("aria-valuenow",n.storagePercentage),s.ɵɵadvance(1),s.ɵɵtextInterpolate1(" ",s.ɵɵpipeBind1(37,26,n.storagePercentage/100),""),s.ɵɵadvance(4),s.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",null!=(null==n.userOrg?null:n.userOrg.providerId))}}function ee(e,t){if(1&e&&(s.ɵɵelementContainerStart(0),s.ɵɵtext(1," "),s.ɵɵtemplate(2,k,4,6,"app-callout",5),s.ɵɵtext(3," "),s.ɵɵtemplate(4,O,18,14,"app-callout",5),s.ɵɵtext(5," "),s.ɵɵtemplate(6,T,17,9,"dl",1),s.ɵɵtext(7," "),s.ɵɵtemplate(8,j,19,6,"div",6),s.ɵɵtext(9," "),s.ɵɵtemplate(10,F,15,7,"ng-container",1),s.ɵɵtext(11," "),s.ɵɵtemplate(12,X,44,30,"ng-container",1),s.ɵɵtext(13," "),s.ɵɵelementContainerEnd()),2&e){var n=s.ɵɵnextContext();s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.selfHosted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.selfHosted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",n.selfHosted),s.ɵɵadvance(2),s.ɵɵproperty("ngIf",!n.selfHosted)}}var te=function(){function e(e,t,n,r,i,o,a){this.apiService=e,this.platformUtilsService=t,this.i18nService=n,this.toasterService=r,this.messagingService=i,this.route=o,this.userService=a,this.loading=!1,this.firstLoaded=!1,this.adjustSeatsAdd=!0,this.showAdjustSeats=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.showDownloadLicense=!1,this.showChangePlan=!1,this.selfHosted=!1,this.selfHosted=t.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){return this.route.parent.parent.params.subscribe((function(t){return r(e,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.organizationId=t.organizationId,[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))})),[2]}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.loading?[2]:(this.loading=!0,e=this,[4,this.userService.getOrganization(this.organizationId)]);case 1:return e.userOrg=n.sent(),t=this,[4,this.apiService.getOrganizationSubscription(this.organizationId)];case 2:return t.sub=n.sent(),this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postOrganizationReinstate(this.organizationId),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postOrganizationCancel(this.organizationId),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.changePlan=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.subscription&&this.sub.planType===a.PlanType.Free?(this.showChangePlan=!this.showChangePlan,[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("changeBillingPlanDesc"),this.i18nService.t("changeBillingPlan"),this.i18nService.t("contactSupport"),this.i18nService.t("close"))];case 1:return e.sent()&&this.platformUtilsService.launchUri("https://bitwarden.com/contact"),[2]}}))}))},e.prototype.closeChangePlan=function(e){this.showChangePlan=!1},e.prototype.downloadLicense=function(){this.showDownloadLicense=!this.showDownloadLicense},e.prototype.closeDownloadLicense=function(){this.showDownloadLicense=!1},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&(this.load(),this.messagingService.send("updatedOrgLicense"))},e.prototype.adjustSeats=function(e){this.adjustSeatsAdd=e,this.showAdjustSeats=!0},e.prototype.closeSeats=function(e){this.showAdjustSeats=!1,e&&this.load()},e.prototype.adjustStorage=function(e){this.adjustStorageAdd=e,this.showAdjustStorage=!0},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"isExpired",{get:function(){return null!=this.sub&&null!=this.sub.expiration&&new Date(this.sub.expiration)0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]'+this.i18nService.t("twoFactorRecoveryYourCode")+":
"+this.code+''+new Date+"
"),e.onafterprint=function(){return e.close()},e.print()},e.prototype.formatString=function(e){return null==e?null:e.replace(/(.{4})/g,"$1 ").trim().toUpperCase()},e.prototype.processResponse=function(e){this.code=this.formatString(e.code)},e.ɵfac=function(t){return new(t||e)(o.ɵɵdirectiveInject(a.I18nService))},e.ɵcmp=o.ɵɵdefineComponent({type:e,selectors:[["app-two-factor-recovery"]],decls:31,vars:11,consts:[["tabindex","-1","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&&(o.ɵɵelementStart(0,"div",0),o.ɵɵtext(1," "),o.ɵɵelementStart(2,"div",1),o.ɵɵtext(3," "),o.ɵɵelementStart(4,"div",2),o.ɵɵtext(5," "),o.ɵɵelementStart(6,"div",3),o.ɵɵtext(7," "),o.ɵɵelementStart(8,"h2",4),o.ɵɵtext(9),o.ɵɵpipe(10,"i18n"),o.ɵɵelementStart(11,"small"),o.ɵɵtext(12),o.ɵɵpipe(13,"i18n"),o.ɵɵelementEnd(),o.ɵɵtext(14," "),o.ɵɵelementEnd(),o.ɵɵtext(15," "),o.ɵɵelementStart(16,"button",5),o.ɵɵpipe(17,"i18n"),o.ɵɵtext(18," "),o.ɵɵelementStart(19,"span",6),o.ɵɵtext(20,"×"),o.ɵɵelementEnd(),o.ɵɵtext(21," "),o.ɵɵelementEnd(),o.ɵɵtext(22," "),o.ɵɵelementEnd(),o.ɵɵtext(23," "),o.ɵɵtemplate(24,u,2,2,"app-two-factor-verify",7),o.ɵɵtext(25," "),o.ɵɵtemplate(26,h,18,6,"ng-container",8),o.ɵɵtext(27," "),o.ɵɵelementEnd(),o.ɵɵtext(28," "),o.ɵɵelementEnd(),o.ɵɵtext(29," "),o.ɵɵelementEnd(),o.ɵɵtext(30," ")),2&e&&(o.ɵɵadvance(9),o.ɵɵtextInterpolate1(" ",o.ɵɵpipeBind1(10,5,"twoStepLogin")," "),o.ɵɵadvance(3),o.ɵɵtextInterpolate(o.ɵɵpipeBind1(13,7,"recoveryCodeTitle")),o.ɵɵadvance(4),o.ɵɵpropertyInterpolate("appA11yTitle",o.ɵɵpipeBind1(17,9,"close")),o.ɵɵadvance(8),o.ɵɵproperty("ngIf",!t.authed),o.ɵɵadvance(2),o.ɵɵproperty("ngIf",t.authed))},directives:[s.A11yTitleDirective,l.NgIf,c.TwoFactorVerifyComponent],pipes:[p.I18nPipe],encapsulation:2}),e}();t.TwoFactorRecoveryComponent=v,("undefined"==typeof ngDevMode||ngDevMode)&&o.ɵsetClassMetadata(v,[{type:r.Component,args:[{selector:"app-two-factor-recovery",templateUrl:"two-factor-recovery.component.html"}]}],(function(){return[{type:a.I18nService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1&&n.configured)}}function B(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3," "),m.ɵɵelementContainerEnd())}function U(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",38),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fWaiting"),"... "))}function j(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",39),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fClickSave")," "))}function V(e,t){1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵelement(2,"i",40),m.ɵɵtext(3),m.ɵɵpipe(4,"i18n"),m.ɵɵelementContainerEnd()),2&e&&(m.ɵɵadvance(3),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(4,1,"twoFactorU2fProblemReadingTryAgain")," "))}function F(e,t){if(1&e&&(m.ɵɵelementContainerStart(0),m.ɵɵtext(1," "),m.ɵɵtemplate(2,U,5,3,"ng-container",25),m.ɵɵtext(3," "),m.ɵɵtemplate(4,j,5,3,"ng-container",25),m.ɵɵtext(5," "),m.ɵɵtemplate(6,V,5,3,"ng-container",25),m.ɵɵtext(7," "),m.ɵɵelementContainerEnd()),2&e){var n=m.ɵɵnextContext(2);m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnListening),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnResponse),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",n.webAuthnError)}}function N(e,t){1&e&&(m.ɵɵelement(0,"i",41),m.ɵɵpipe(1,"i18n")),2&e&&m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(1,1,"loading"))}function z(e,t){1&e&&(m.ɵɵelementStart(0,"span"),m.ɵɵtext(1),m.ɵɵpipe(2,"i18n"),m.ɵɵelementEnd()),2&e&&(m.ɵɵadvance(1),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(2,1,"save")))}function L(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"button",42,43),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext(2).disable()})),m.ɵɵtext(2," "),m.ɵɵelement(3,"i",41),m.ɵɵpipe(4,"i18n"),m.ɵɵtext(5," "),m.ɵɵelementStart(6,"span"),m.ɵɵtext(7),m.ɵɵpipe(8,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(9," "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵreference(1),i=m.ɵɵnextContext(2);m.ɵɵproperty("appApiAction",i.disablePromise)("disabled",r.loading),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(4,4,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(8,6,"disableAllKeys"))}}function K(e,t){if(1&e){var n=m.ɵɵgetCurrentView();m.ɵɵelementStart(0,"form",10,11),m.ɵɵlistener("ngSubmit",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().submit()})),m.ɵɵtext(2," "),m.ɵɵelementStart(3,"div",12),m.ɵɵtext(4," "),m.ɵɵtemplate(5,k,4,6,"app-callout",13),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"app-callout",14),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"p"),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(12," "),m.ɵɵelementStart(13,"ul",15),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"li"),m.ɵɵtext(16),m.ɵɵpipe(17,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(18," "),m.ɵɵelementEnd(),m.ɵɵtext(19," "),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelement(21,"img",16),m.ɵɵtext(22," "),m.ɵɵelementStart(23,"ul",17),m.ɵɵtext(24," "),m.ɵɵtemplate(25,R,13,5,"li",18),m.ɵɵtext(26," "),m.ɵɵelementEnd(),m.ɵɵtext(27," "),m.ɵɵelement(28,"hr"),m.ɵɵtext(29," "),m.ɵɵelementStart(30,"p"),m.ɵɵtext(31),m.ɵɵpipe(32,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(33," "),m.ɵɵelementStart(34,"ol"),m.ɵɵtext(35," "),m.ɵɵelementStart(36,"li"),m.ɵɵtext(37),m.ɵɵpipe(38,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(39," "),m.ɵɵelementStart(40,"li"),m.ɵɵtext(41),m.ɵɵpipe(42,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(43," "),m.ɵɵelementStart(44,"li"),m.ɵɵtext(45),m.ɵɵpipe(46,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(47," "),m.ɵɵelementStart(48,"li"),m.ɵɵtext(49),m.ɵɵpipe(50,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(51," "),m.ɵɵelementEnd(),m.ɵɵtext(52," "),m.ɵɵelementStart(53,"div",19),m.ɵɵtext(54," "),m.ɵɵelementStart(55,"div",20),m.ɵɵtext(56," "),m.ɵɵelementStart(57,"label",21),m.ɵɵtext(58),m.ɵɵpipe(59,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(60," "),m.ɵɵelementStart(61,"input",22),m.ɵɵlistener("ngModelChange",(function(e){return m.ɵɵrestoreView(n),m.ɵɵnextContext().name=e})),m.ɵɵelementEnd(),m.ɵɵtext(62," "),m.ɵɵelementEnd(),m.ɵɵtext(63," "),m.ɵɵelementEnd(),m.ɵɵtext(64," "),m.ɵɵelementStart(65,"button",23,24),m.ɵɵlistener("click",(function(){return m.ɵɵrestoreView(n),m.ɵɵnextContext().readKey()})),m.ɵɵtext(67),m.ɵɵpipe(68,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(69," "),m.ɵɵtemplate(70,B,4,0,"ng-container",25),m.ɵɵtext(71," "),m.ɵɵtemplate(72,F,8,3,"ng-container",25),m.ɵɵtext(73," "),m.ɵɵelementEnd(),m.ɵɵtext(74," "),m.ɵɵelementStart(75,"div",26),m.ɵɵtext(76," "),m.ɵɵelementStart(77,"button",27),m.ɵɵtext(78," "),m.ɵɵtemplate(79,N,2,3,"i",28),m.ɵɵtext(80," "),m.ɵɵtemplate(81,z,3,3,"span",25),m.ɵɵtext(82," "),m.ɵɵelementEnd(),m.ɵɵtext(83," "),m.ɵɵtemplate(84,L,10,8,"button",29),m.ɵɵtext(85," "),m.ɵɵelementStart(86,"button",30),m.ɵɵtext(87),m.ɵɵpipe(88,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(89," "),m.ɵɵelementEnd(),m.ɵɵtext(90," "),m.ɵɵelementEnd()}if(2&e){var r=m.ɵɵreference(1),i=m.ɵɵreference(66),o=m.ɵɵnextContext();m.ɵɵproperty("appApiAction",o.formPromise),m.ɵɵadvance(5),m.ɵɵproperty("ngIf",o.enabled),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(11,23,"twoFactorWebAuthnWarning")),m.ɵɵadvance(6),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(17,25,"twoFactorWebAuthnSupportWeb")),m.ɵɵadvance(9),m.ɵɵproperty("ngForOf",o.keys),m.ɵɵadvance(6),m.ɵɵtextInterpolate1("",m.ɵɵpipeBind1(32,27,"twoFactorWebAuthnAdd"),":"),m.ɵɵadvance(6),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(38,29,"twoFactorU2fGiveName")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(42,31,"twoFactorU2fPlugInReadKey")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(46,33,"twoFactorU2fTouchButton")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(50,35,"twoFactorU2fSaveForm")),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(59,37,"name")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",o.name)("disabled",!o.keyIdAvailable),m.ɵɵadvance(4),m.ɵɵproperty("disabled",i.loading||o.webAuthnListening||!o.keyIdAvailable)("appApiAction",o.challengePromise),m.ɵɵadvance(2),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(68,39,"readKey")," "),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",i.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!i.loading),m.ɵɵadvance(5),m.ɵɵproperty("disabled",r.loading||!o.webAuthnResponse),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",r.loading),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",!r.loading),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",o.enabled),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(88,41,"close"))}}var G=function(e){function t(t,n,r,i,o){var a=e.call(this,t,n,r,i)||this;return a.ngZone=o,a.type=l.TwoFactorProviderType.WebAuthn,a.keyIdAvailable=null,a.keysConfiguredCount=0,a}return i(t,e),t.prototype.auth=function(t){e.prototype.auth.call(this,t),this.processResponse(t.response)},t.prototype.submit=function(){var t=this;if(null==this.webAuthnResponse||null==this.keyIdAvailable)return Promise.reject();var n=new u.UpdateTwoFactorWebAuthnRequest;return n.masterPasswordHash=this.masterPasswordHash,n.deviceResponse=this.webAuthnResponse,n.id=this.keyIdAvailable,n.name=this.name,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorWebAuthn(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.formPromise)},t.prototype.remove=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return this.keysConfiguredCount<=1||null!=e.removePromise?[2]:(t=null!=e.name?e.name:this.i18nService.t("webAuthnkeyX",e.id),[4,this.platformUtilsService.showDialog(this.i18nService.t("removeU2fConfirmation"),t,this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]);case 1:if(!i.sent())return[2];(n=new p.UpdateTwoFactorWebAuthnDeleteRequest).id=e.id,n.masterPasswordHash=this.masterPasswordHash,i.label=2;case 2:return i.trys.push([2,5,,6]),e.removePromise=this.apiService.deleteTwoFactorWebAuthn(n),[4,e.removePromise];case 3:return r=i.sent(),e.removePromise=null,[4,this.processResponse(r)];case 4:return i.sent(),[3,6];case 5:return i.sent(),[3,6];case 6:return[2]}}))}))},t.prototype.readKey=function(){return o(this,void 0,void 0,(function(){var e,t;return a(this,(function(n){switch(n.label){case 0:if(null==this.keyIdAvailable)return[2];(e=new c.PasswordVerificationRequest).masterPasswordHash=this.masterPasswordHash,n.label=1;case 1:return n.trys.push([1,3,,4]),this.challengePromise=this.apiService.getTwoFactorWebAuthnChallenge(e),[4,this.challengePromise];case 2:return t=n.sent(),this.readDevice(t),[3,4];case 3:return n.sent(),[3,4];case 4:return[2]}}))}))},t.prototype.readDevice=function(e){var t=this;console.log("listening for key..."),this.resetWebAuthn(!0),navigator.credentials.create({publicKey:e}).then((function(e){t.ngZone.run((function(){t.webAuthnListening=!1,t.webAuthnResponse=e}))})).catch((function(e){console.error(e),t.resetWebAuthn(!1),t.webAuthnError=!0}))},t.prototype.resetWebAuthn=function(e){void 0===e&&(e=!1),this.webAuthnResponse=null,this.webAuthnError=!1,this.webAuthnListening=e},t.prototype.processResponse=function(e){this.resetWebAuthn(),this.keys=[],this.keyIdAvailable=null,this.name=null,this.keysConfiguredCount=0;for(var t=function(t){if(null!=e.keys){var r=e.keys.filter((function(e){return e.id===t}));if(r.length>0)return n.keysConfiguredCount++,n.keys.push({id:t,name:r[0].name,configured:!0,migrated:r[0].migrated,removePromise:null}),"continue"}n.keys.push({id:t,name:null,configured:!1,removePromise:null}),null==n.keyIdAvailable&&(n.keyIdAvailable=t)},n=this,r=1;r<=5;r++)t(r);this.enabled=e.enabled},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.ApiService),m.ɵɵdirectiveInject(h.I18nService),m.ɵɵdirectiveInject(v.ToasterService),m.ɵɵdirectiveInject(y.PlatformUtilsService),m.ɵɵdirectiveInject(m.NgZone))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["app-two-factor-webauthn"]],features:[m.ɵɵInheritDefinitionFeature],decls:31,vars:11,consts:[["tabindex","-1","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","fa-check-circle",3,"title",4,"ngIf"],["type","warning"],[1,"mb-0"],["src","images/7.png","alt","",1,"float-right","ml-5"],[1,"fa-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","fa fa-spinner fa-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","fa-check-circle",3,"title"],[3,"appApiAction"],["removeKeyBtn",""],[1,"fa-li","fa","fa-key"],["class","fa fa-spin fa-spinner text-muted fa-fw","aria-hidden","true",3,"title",4,"ngIf"],["href","#","appStopClick","",3,"click"],["aria-hidden","true",1,"fa","fa-spin","fa-spinner","text-muted","fa-fw",3,"title"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted"],["aria-hidden","true",1,"fa","fa-check-circle","text-success"],["aria-hidden","true",1,"fa","fa-warning","text-danger"],["aria-hidden","true",1,"fa","fa-spinner","fa-spin",3,"title"],["type","button",1,"btn","btn-outline-secondary","btn-submit",3,"appApiAction","disabled","click"],["disableBtn",""]],template:function(e,t){1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"div",2),m.ɵɵtext(5," "),m.ɵɵelementStart(6,"div",3),m.ɵɵtext(7," "),m.ɵɵelementStart(8,"h2",4),m.ɵɵtext(9),m.ɵɵpipe(10,"i18n"),m.ɵɵelementStart(11,"small"),m.ɵɵtext(12),m.ɵɵpipe(13,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(14," "),m.ɵɵelementEnd(),m.ɵɵtext(15," "),m.ɵɵelementStart(16,"button",5),m.ɵɵpipe(17,"i18n"),m.ɵɵtext(18," "),m.ɵɵelementStart(19,"span",6),m.ɵɵtext(20,"×"),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵelementEnd(),m.ɵɵtext(22," "),m.ɵɵelementEnd(),m.ɵɵtext(23," "),m.ɵɵtemplate(24,P,2,2,"app-two-factor-verify",7),m.ɵɵtext(25," "),m.ɵɵtemplate(26,K,91,43,"form",8),m.ɵɵtext(27," "),m.ɵɵelementEnd(),m.ɵɵtext(28," "),m.ɵɵelementEnd(),m.ɵɵtext(29," "),m.ɵɵelementEnd(),m.ɵɵtext(30," ")),2&e&&(m.ɵɵadvance(9),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(10,5,"twoStepLogin")," "),m.ɵɵadvance(3),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(13,7,"webAuthnTitle")),m.ɵɵadvance(4),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(17,9,"close")),m.ɵɵadvance(8),m.ɵɵproperty("ngIf",!t.authed),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",t.authed))},directives:[g.A11yTitleDirective,x.NgIf,b.TwoFactorVerifyComponent,S.NgControlStatusGroup,S.NgForm,w.ApiActionDirective,C.CalloutComponent,x.NgForOf,S.DefaultValueAccessor,S.NgControlStatus,S.NgModel,I.StopClickDirective],pipes:[E.I18nPipe],encapsulation:2}),t}(d.TwoFactorBaseComponent);t.TwoFactorWebAuthnComponent=G,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(G,[{type:s.Component,args:[{selector:"app-two-factor-webauthn",templateUrl:"two-factor-webauthn.component.html"}]}],(function(){return[{type:f.ApiService},{type:h.I18nService},{type:v.ToasterService},{type:y.PlatformUtilsService},{type:m.NgZone}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?this.keys[0].key:null,n.key2=null!=this.keys&&this.keys.length>1?this.keys[1].key:null,n.key3=null!=this.keys&&this.keys.length>2?this.keys[2].key:null,n.key4=null!=this.keys&&this.keys.length>3?this.keys[3].key:null,n.key5=null!=this.keys&&this.keys.length>4?this.keys[4].key:null,n.nfc=this.nfc,e.prototype.enable.call(this,(function(){return o(t,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.formPromise=this.apiService.putTwoFactorYubiKey(n),[4,this.formPromise];case 1:return e=t.sent(),[4,this.processResponse(e)];case 2:return t.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("yubikeysUpdated")),[2]}}))}))}))},t.prototype.disable=function(){return e.prototype.disable.call(this,this.disablePromise)},t.prototype.remove=function(e){e.existingKey=null,e.key=null},t.prototype.processResponse=function(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},t.prototype.padRight=function(e,t,n){if(void 0===t&&(t="•"),void 0===n&&(n=44),null==e||null==t||e.length>=n)return e;for(var r=(n-e.length)/t.length,i=0;i0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2];i.label=1;case 1:return i.trys.push([1,4,,5]),this.formPromise=this.saveCipherAttachment(t[0]),n=this,[4,this.formPromise];case 2:return n.cipherDomain=i.sent(),r=this,[4,this.cipherDomain.decrypt()];case 3:return r.cipher=i.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onUploadedAttachment.emit(),[3,5];case 4:return i.sent(),[3,5];case 5:return e.type="",e.type="file",e.value="",[2]}}))}))},e.prototype.delete=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return null!=this.deletePromises[e.id]?[2]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteAttachmentConfirmation"),this.i18nService.t("deleteAttachment"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!n.sent())return[2];n.label=2;case 2:return n.trys.push([2,4,,5]),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 3:return n.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedAttachment")),(t=this.cipher.attachments.indexOf(e))>-1&&this.cipher.attachments.splice(t,1),[3,5];case 4:return n.sent(),[3,5];case 5:return this.deletePromises[e.id]=null,this.onDeletedAttachment.emit(),[2]}}))}))},e.prototype.download=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,s,l,c,p,u;return i(this,(function(i){switch(i.label){case 0:if((t=e).downloading)return[2];if(!this.canAccessAttachments)return this.platformUtilsService.showToast("error",this.i18nService.t("premiumRequired"),this.i18nService.t("premiumRequiredDesc")),[2];i.label=1;case 1:return i.trys.push([1,3,,4]),[4,this.apiService.getAttachmentData(this.cipher.id,e.id,this.emergencyAccessId)];case 2:return r=i.sent(),n=r.url,[3,4];case 3:if(!((o=i.sent())instanceof a.ErrorResponse&&404===o.statusCode))throw o instanceof a.ErrorResponse?new Error(o.getSingleMessage()):o;return n=e.url,[3,4];case 4:return t.downloading=!0,[4,fetch(new Request(n,{cache:"no-store"}))];case 5:if(200!==(s=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),t.downloading=!1,[2];i.label=6;case 6:return i.trys.push([6,12,,13]),[4,s.arrayBuffer()];case 7:return l=i.sent(),null==e.key?[3,8]:(p=e.key,[3,10]);case 8:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 9:p=i.sent(),i.label=10;case 10:return c=p,[4,this.cryptoService.decryptFromBytes(l,c)];case 11:return u=i.sent(),this.platformUtilsService.saveFile(this.win,u,null,e.fileName),[3,13];case 12:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,13];case 13:return t.downloading=!1,[2]}}))}))},e.prototype.init=function(){return r(this,void 0,void 0,(function(){var e,t,n,r;return i(this,(function(i){switch(i.label){case 0:return e=this,[4,this.loadCipher()];case 1:return e.cipherDomain=i.sent(),t=this,[4,this.cipherDomain.decrypt()];case 2:return t.cipher=i.sent(),n=this,[4,this.cryptoService.hasEncKey()];case 3:return n.hasUpdatedKey=i.sent(),[4,this.userService.canAccessPremium()];case 4:return r=i.sent(),this.canAccessAttachments=r||null!=this.cipher.organizationId,this.canAccessAttachments?[3,6]:[4,this.platformUtilsService.showDialog(this.i18nService.t("premiumRequiredDesc"),this.i18nService.t("premiumRequired"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"))];case 5:return i.sent()&&this.platformUtilsService.launchUri("https://vault.bitwarden.com/#/?premium=purchase"),[3,8];case 6:return this.hasUpdatedKey?[3,8]:[4,this.platformUtilsService.showDialog(this.i18nService.t("updateKey"),this.i18nService.t("featureUnavailable"),this.i18nService.t("learnMore"),this.i18nService.t("cancel"),"warning")];case 7:i.sent()&&this.platformUtilsService.launchUri("https://help.bitwarden.com/article/update-encryption-key/"),i.label=8;case 8:return[2]}}))}))},e.prototype.reuploadCipherAttachment=function(e,t){return r(this,void 0,void 0,(function(){var n,o=this;return i(this,(function(a){switch(a.label){case 0:if(n=e,null!=e.key||n.downloading||null!=this.reuploadPromises[e.id])return[2];a.label=1;case 1:return a.trys.push([1,3,,4]),this.reuploadPromises[e.id]=Promise.resolve().then((function(){return r(o,void 0,void 0,(function(){var r,o,a,s,l,c,p,u,d;return i(this,(function(i){switch(i.label){case 0:return n.downloading=!0,[4,fetch(new Request(e.url,{cache:"no-store"}))];case 1:if(200!==(r=i.sent()).status)return this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),n.downloading=!1,[2];i.label=2;case 2:return i.trys.push([2,11,,12]),[4,r.arrayBuffer()];case 3:return o=i.sent(),null==e.key?[3,4]:(s=e.key,[3,6]);case 4:return[4,this.cryptoService.getOrgKey(this.cipher.organizationId)];case 5:s=i.sent(),i.label=6;case 6:return a=s,[4,this.cryptoService.decryptFromBytes(o,a)];case 7:return l=i.sent(),c=this,[4,this.cipherService.saveAttachmentRawWithServer(this.cipherDomain,e.fileName,l,t)];case 8:return c.cipherDomain=i.sent(),p=this,[4,this.cipherDomain.decrypt()];case 9:return p.cipher=i.sent(),this.deletePromises[e.id]=this.deleteCipherAttachment(e.id),[4,this.deletePromises[e.id]];case 10:return i.sent(),(u=this.cipher.attachments.filter((function(t){return t.id===e.id}))).length>0&&(d=this.cipher.attachments.indexOf(u[0]))>-1&&this.cipher.attachments.splice(d,1),this.platformUtilsService.showToast("success",null,this.i18nService.t("attachmentSaved")),this.onReuploadedAttachment.emit(),[3,12];case 11:return i.sent(),this.platformUtilsService.showToast("error",null,this.i18nService.t("errorOccurred")),[3,12];case 12:return n.downloading=!1,[2]}}))}))})),[4,this.reuploadPromises[e.id]];case 2:return a.sent(),[3,4];case 3:return a.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.saveCipherAttachment=function(e){return this.cipherService.saveAttachmentWithServer(this.cipherDomain,e)},e.prototype.deleteCipherAttachment=function(e){return this.cipherService.deleteAttachmentWithServer(this.cipher.id,e)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CipherService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.CryptoService),s.ɵɵdirectiveInject(u.UserService),s.ɵɵdirectiveInject(d.PlatformUtilsService),s.ɵɵdirectiveInject(m.ApiService),s.ɵɵdirectiveInject(Window))},e.ɵdir=s.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId"},outputs:{onUploadedAttachment:"onUploadedAttachment",onDeletedAttachment:"onDeletedAttachment",onReuploadedAttachment:"onReuploadedAttachment"}}),e}();t.AttachmentsComponent=f,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(f,[{type:o.Directive}],(function(){return[{type:l.CipherService},{type:c.I18nService},{type:p.CryptoService},{type:u.UserService},{type:d.PlatformUtilsService},{type:m.ApiService},{type:Window}]}),{cipherId:[{type:o.Input}],onUploadedAttachment:[{type:o.Output}],onDeletedAttachment:[{type:o.Output}],onReuploadedAttachment:[{type:o.Output}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.viewEvents(n[0]),null!=o&&o.unsubscribe(),[2]}}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe(F)},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.applyFilter()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),n=function(t){return t.type===e},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e,t){return void 0===t&&(t=!1),r(this,void 0,void 0,(function(){var n;return i(this,(function(r){switch(r.label){case 0:return this.ciphersComponent.showAddNew=!0,this.ciphersComponent.deleted=!1,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),n=function(t){return"unassigned"===e?null==t.collectionIds||0===t.collectionIds.length:null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1},t?[4,this.ciphersComponent.reload(n)]:[3,2];case 1:return r.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(n)];case 3:r.sent(),r.label=4;case 4:return this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),e?[4,this.ciphersComponent.reload(null,!0)]:[3,2];case 1:return t.sent(),[3,4];case 2:return[4,this.ciphersComponent.applyFilter(null)];case 3:t.sent(),t.label=4;case 4:return this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){var t=this;if(null!=this.organization.maxStorageGb&&0!==this.organization.maxStorageGb){null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.attachmentsModalRef.createComponent(n).instance;var o=this.modal.show(c.AttachmentsComponent,this.attachmentsModalRef);o.organization=this.organization,o.cipherId=e.id;var s=!1;o.onUploadedAttachment.subscribe((function(){return s=!0})),o.onDeletedAttachment.subscribe((function(){return s=!0})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal=null,s?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return s=!1,[2]}}))}))}))}else this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId})},e.prototype.editCipherCollections=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.collectionsModalRef.createComponent(n).instance;var o=this.modal.show(u.CollectionsComponent,this.collectionsModalRef);this.organization.canManageAllCollections&&(o.collectionIds=e.collectionIds,o.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),o.organization=this.organization,o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.addCipher=function(){var e=this.editCipher(null);e.organizationId=this.organization.id,e.type=this.type,this.organization.canManageAllCollections&&(e.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),null!=this.collectionId&&(e.collectionIds=[this.collectionId])},e.prototype.editCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.cipherAddEditModalRef.createComponent(n).instance;var o=this.modal.show(l.AddEditComponent,this.cipherAddEditModalRef);return o.organization=this.organization,o.cipherId=null==e?null:e.id,o.onSavedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onDeletedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onRestoredCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),o},e.prototype.cloneCipher=function(e){var t=this.editCipher(e);t.cloneMode=!0,t.organizationId=this.organization.id,this.organization.canManageAllCollections&&(t.collections=this.groupingsComponent.collections.filter((function(e){return!e.readOnly}))),t.collectionIds=e.collectionIds},e.prototype.viewEvents=function(e){return r(this,void 0,void 0,(function(){var t,n,r=this;return i(this,(function(i){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.eventsModalRef.createComponent(t).instance,(n=this.modal.show(s.EntityEventsComponent,this.eventsModalRef)).name=e.name,n.organizationId=this.organization.id,n.entityId=e.id,n.showUser=!0,n.entity="cipher",this.modal.onClosed.subscribe((function(){r.modal=null})),[2]}))}))},e.prototype.clearFilters=function(){this.collectionId=null,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(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})},e.ɵfac=function(t){return new(t||e)(m.ɵɵdirectiveInject(f.ActivatedRoute),m.ɵɵdirectiveInject(h.UserService),m.ɵɵdirectiveInject(f.Router),m.ɵɵdirectiveInject(m.ChangeDetectorRef),m.ɵɵdirectiveInject(v.SyncService),m.ɵɵdirectiveInject(y.I18nService),m.ɵɵdirectiveInject(m.ComponentFactoryResolver),m.ɵɵdirectiveInject(g.MessagingService),m.ɵɵdirectiveInject(x.BroadcasterService),m.ɵɵdirectiveInject(m.NgZone),m.ɵɵdirectiveInject(b.PlatformUtilsService))},e.ɵcmp=m.ɵɵdefineComponent({type:e,selectors:[["app-org-vault"]],viewQuery:function(e,t){if(1&e&&(m.ɵɵviewQuery(d.GroupingsComponent,3),m.ɵɵviewQuery(p.CiphersComponent,3),m.ɵɵviewQuery(O,3,o.ViewContainerRef),m.ɵɵviewQuery(A,3,o.ViewContainerRef),m.ɵɵviewQuery(_,3,o.ViewContainerRef),m.ɵɵviewQuery(M,3,o.ViewContainerRef)),2&e){var n=void 0;m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.groupingsComponent=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.ciphersComponent=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),m.ɵɵqueryRefresh(n=m.ɵɵloadQuery())&&(t.eventsModalRef=n.first)}},decls:53,vars:14,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","modal","deleted","organization"],["type","button","class","btn btn-outline-primary btn-sm ml-auto",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",4,"ngIf"],[3,"onCipherClicked","onAttachmentsClicked","onAddCipher","onCollectionsClicked","onEventsClicked","onCloneClicked"],["attachments",""],["cipherAddEdit",""],["collections",""],["eventsTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"div",2),m.ɵɵtext(5," "),m.ɵɵelementStart(6,"app-org-vault-groupings",3),m.ɵɵ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()})),m.ɵɵtext(7," "),m.ɵɵelementEnd(),m.ɵɵtext(8," "),m.ɵɵelementEnd(),m.ɵɵtext(9," "),m.ɵɵelementStart(10,"div",4),m.ɵɵtext(11," "),m.ɵɵelementStart(12,"div",5),m.ɵɵtext(13," "),m.ɵɵelementStart(14,"h1"),m.ɵɵtext(15),m.ɵɵpipe(16,"i18n"),m.ɵɵelementStart(17,"small",6,7),m.ɵɵtext(19," "),m.ɵɵtemplate(20,T,9,6,"ng-container",8),m.ɵɵtext(21," "),m.ɵɵelementEnd(),m.ɵɵtext(22," "),m.ɵɵelementEnd(),m.ɵɵtext(23," "),m.ɵɵelementStart(24,"div",9),m.ɵɵtext(25," "),m.ɵɵelementStart(26,"app-vault-bulk-actions",10),m.ɵɵtext(27," "),m.ɵɵelementEnd(),m.ɵɵtext(28," "),m.ɵɵtemplate(29,D,5,3,"button",11),m.ɵɵtext(30," "),m.ɵɵelementEnd(),m.ɵɵtext(31," "),m.ɵɵelementEnd(),m.ɵɵtext(32," "),m.ɵɵtemplate(33,R,2,1,"app-callout",12),m.ɵɵtext(34," "),m.ɵɵelementStart(35,"app-org-vault-ciphers",13),m.ɵɵ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)})),m.ɵɵtext(36," "),m.ɵɵelementEnd(),m.ɵɵtext(37," "),m.ɵɵelementEnd(),m.ɵɵtext(38," "),m.ɵɵelementEnd(),m.ɵɵtext(39," "),m.ɵɵelementEnd(),m.ɵɵtext(40," "),m.ɵɵtemplate(41,B,0,0,"ng-template",null,14,m.ɵɵtemplateRefExtractor),m.ɵɵtext(43," "),m.ɵɵtemplate(44,U,0,0,"ng-template",null,15,m.ɵɵtemplateRefExtractor),m.ɵɵtext(46," "),m.ɵɵtemplate(47,j,0,0,"ng-template",null,16,m.ɵɵtemplateRefExtractor),m.ɵɵtext(49," "),m.ɵɵtemplate(50,V,0,0,"ng-template",null,17,m.ɵɵtemplateRefExtractor),m.ɵɵtext(52," ")),2&e){var n=m.ɵɵreference(18);m.ɵɵadvance(6),m.ɵɵproperty("showFolders",!1)("showFavorites",!1)("showTrash",!0),m.ɵɵadvance(9),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(16,12,"vault")," "),m.ɵɵadvance(2),m.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",n.loading),m.ɵɵadvance(6),m.ɵɵproperty("ciphersComponent",t.ciphersComponent)("modal",t.modal)("deleted",t.deleted)("organization",t.organization),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",!t.deleted),m.ɵɵadvance(4),m.ɵɵproperty("ngIf",t.deleted)}},directives:[S.GroupingsComponent,w.ApiActionDirective,C.NgIf,I.BulkActionsComponent,E.CiphersComponent,P.CalloutComponent],pipes:[k.I18nPipe],encapsulation:2}),e}();t.VaultComponent=N,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(N,[{type:o.Component,args:[{selector:"app-org-vault",templateUrl:"vault.component.html"}]}],(function(){return[{type:f.ActivatedRoute},{type:h.UserService},{type:f.Router},{type:m.ChangeDetectorRef},{type:v.SyncService},{type:y.I18nService},{type:m.ComponentFactoryResolver},{type:g.MessagingService},{type:x.BroadcasterService},{type:m.NgZone},{type:b.PlatformUtilsService}]}),{groupingsComponent:[{type:o.ViewChild,args:[d.GroupingsComponent,{static:!0}]}],ciphersComponent:[{type:o.ViewChild,args:[p.CiphersComponent,{static:!0}]}],attachmentsModalRef:[{type:o.ViewChild,args:["attachments",{read:o.ViewContainerRef,static:!0}]}],cipherAddEditModalRef:[{type:o.ViewChild,args:["cipherAddEdit",{read:o.ViewContainerRef,static:!0}]}],collectionsModalRef:[{type:o.ViewChild,args:["collections",{read:o.ViewContainerRef,static:!0}]}],eventsModalRef:[{type:o.ViewChild,args:["eventsTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.selectAll(!1)},e.prototype.filterCollections=function(){var e=this;this.selectAll(!1),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,r,o=this;return i(this,(function(i){switch(i.label){case 0:n=this.collections.filter((function(e){return e.checked})).map((function(e){return e.id})),i.label=1;case 1:return i.trys.push([1,3,,4]),this.formPromise=this.cipherService.shareManyWithServer(this.shareableCiphers,this.organizationId,n),[4,this.formPromise];case 2:return i.sent(),this.onShared.emit(),r=null!==(t=null===(e=this.organizations.find((function(e){return e.id===o.organizationId})))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization"),this.toasterService.popAsync("success",null,this.i18nService.t("movedItemsToOrg",r)),[3,4];case 3:return i.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.check=function(e,t){e.checked=null==t?!e.checked:t},e.prototype.selectAll=function(e){var t=this;(e?this.collections:this.writeableCollections).forEach((function(n){return t.check(n,e)}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.shareableCiphers&&this.shareableCiphers.length>0&&null!=this.collections)for(var e=0;e0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=this.maxAccessCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expired",{get:function(){return null!=this.expirationDate&&this.expirationDate<=new Date},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pendingDelete",{get:function(){return this.deletionDate<=new Date},enumerable:!1,configurable:!0}),e}();t.SendView=a},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EffluxDatesComponent=void 0;n(2);var o=n(0),a=n(13),s=(n(1),n(3),n(1017)),l=n(0),c=n(1),p=n(3),u=n(2),d=n(13),m=n(32),f=n(9);function h(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",13),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",14),l.ɵɵtext(5," "),l.ɵɵelement(6,"input",15),l.ɵɵtext(7," "),l.ɵɵelementEnd(),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("readOnly",n.disableSend),l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disableSend)}}function v(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.twentyFourHour),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.twelveHour)}}function y(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",13),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",14),l.ɵɵtext(5," "),l.ɵɵelementStart(6,"select",16),l.ɵɵtext(7," "),l.ɵɵtemplate(8,v,2,2,"option",17),l.ɵɵtext(9," "),l.ɵɵelementEnd(),l.ɵɵtext(10," "),l.ɵɵelementEnd(),l.ɵɵtext(11," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(4),l.ɵɵproperty("readOnly",n.disableSend),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.safariDeletionTimePresetOptions)}}function g(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",19),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disabled)}}function x(e,t){if(1&e&&(l.ɵɵtext(0," "),l.ɵɵelementContainerStart(1,10),l.ɵɵtext(2," "),l.ɵɵtemplate(3,h,9,2,"ng-container",11),l.ɵɵtext(4," "),l.ɵɵtemplate(5,y,12,3,"ng-container",11),l.ɵɵtext(6," "),l.ɵɵtemplate(7,g,4,1,"ng-container",12),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd(),l.ɵɵtext(9," ")),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵproperty("ngSwitch",n.browserPath),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","firefox"),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","safari")}}function b(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",n.name," ")}}function S(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function w(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵtemplate(2,S,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){l.ɵɵnextContext(2);var n=l.ɵɵreference(9);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function C(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"select",20),l.ɵɵtext(3," "),l.ɵɵtemplate(4,b,2,2,"option",17),l.ɵɵtext(5," "),l.ɵɵelementEnd(),l.ɵɵtext(6," "),l.ɵɵtemplate(7,w,4,1,"ng-container",4),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.deletionDatePresets),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",0===n.selectedDeletionDatePreset.value)}}function I(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function E(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵtemplate(2,I,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(9);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function P(e,t){if(1&e){var n=l.ɵɵgetCurrentView();l.ɵɵelementStart(0,"a",22),l.ɵɵlistener("click",(function(){return l.ɵɵrestoreView(n),l.ɵɵnextContext().clearExpiration()})),l.ɵɵtext(1),l.ɵɵpipe(2,"i18n"),l.ɵɵelementEnd()}2&e&&(l.ɵɵadvance(1),l.ɵɵtextInterpolate1(" ",l.ɵɵpipeBind1(2,1,"clear")," "))}function k(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",24),l.ɵɵtext(3," "),l.ɵɵelement(4,"input",25),l.ɵɵtext(5," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled)}}function O(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.twentyFourHour),l.ɵɵadvance(1),l.ɵɵtextInterpolate(n.twelveHour)}}function A(e,t){if(1&e&&(l.ɵɵelementStart(0,"div",13),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",24),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"select",26),l.ɵɵtext(5," "),l.ɵɵtemplate(6,O,2,2,"option",17),l.ɵɵtext(7," "),l.ɵɵelementEnd(),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode)("readOnly",n.disabled),l.ɵɵadvance(2),l.ɵɵproperty("required",!n.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngForOf",n.safariExpirationTimePresetOptions)}}function _(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelement(2,"input",27),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){var n=l.ɵɵnextContext(2);l.ɵɵadvance(2),l.ɵɵproperty("readOnly",n.disabled)}}function M(e,t){if(1&e&&(l.ɵɵtext(0," "),l.ɵɵelementContainerStart(1,10),l.ɵɵtext(2," "),l.ɵɵtemplate(3,k,6,4,"div",23),l.ɵɵtext(4," "),l.ɵɵtemplate(5,A,9,4,"div",23),l.ɵɵtext(6," "),l.ɵɵtemplate(7,_,4,1,"ng-container",12),l.ɵɵtext(8," "),l.ɵɵelementContainerEnd(),l.ɵɵtext(9," ")),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(1),l.ɵɵproperty("ngSwitch",n.browserPath),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","firefox"),l.ɵɵadvance(2),l.ɵɵproperty("ngSwitchCase","safari")}}function T(e,t){if(1&e&&(l.ɵɵelementStart(0,"option",18),l.ɵɵtext(1),l.ɵɵelementEnd()),2&e){var n=t.$implicit;l.ɵɵproperty("ngValue",n.value),l.ɵɵadvance(1),l.ɵɵtextInterpolate1("",n.name," ")}}function D(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function R(e,t){if(1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵtemplate(2,D,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementContainerEnd()),2&e){l.ɵɵnextContext(2);var n=l.ɵɵreference(32);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}function B(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"select",28),l.ɵɵtext(3," "),l.ɵɵtemplate(4,T,2,2,"option",17),l.ɵɵtext(5," "),l.ɵɵelementEnd(),l.ɵɵtext(6," "),l.ɵɵtemplate(7,R,4,1,"ng-container",4),l.ɵɵtext(8," "),l.ɵɵelementEnd()),2&e){var n=l.ɵɵnextContext();l.ɵɵadvance(4),l.ɵɵproperty("ngForOf",n.expirationDatePresets),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",0===n.selectedExpirationDatePreset.value)}}function U(e,t){1&e&&(l.ɵɵelementContainerStart(0),l.ɵɵtext(1," "),l.ɵɵelementContainerEnd())}function j(e,t){if(1&e&&(l.ɵɵelementStart(0,"div"),l.ɵɵtext(1," "),l.ɵɵtemplate(2,U,2,0,"ng-container",21),l.ɵɵtext(3," "),l.ɵɵelementEnd()),2&e){l.ɵɵnextContext();var n=l.ɵɵreference(32);l.ɵɵadvance(2),l.ɵɵproperty("ngTemplateOutlet",n)}}var V=function(e){function t(t,n,r){var i=e.call(this,t,n,r)||this;return i.i18nService=t,i.platformUtilsService=n,i.datePipe=r,i}return i(t,e),t.ɵfac=function(e){return new(e||t)(l.ɵɵdirectiveInject(c.I18nService),l.ɵɵdirectiveInject(p.PlatformUtilsService),l.ɵɵdirectiveInject(u.DatePipe))},t.ɵcmp=l.ɵɵdefineComponent({type:t,selectors:[["app-send-efflux-dates"]],features:[l.ɵɵProvidersFeature([],[{provide:a.ControlContainer,useExisting:a.NgForm}]),l.ɵɵ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&&(l.ɵɵelementStart(0,"div",0),l.ɵɵtext(1," "),l.ɵɵelementStart(2,"div",1),l.ɵɵtext(3," "),l.ɵɵelementStart(4,"label",2),l.ɵɵtext(5),l.ɵɵpipe(6,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(7," "),l.ɵɵtemplate(8,x,10,3,"ng-template",null,3,l.ɵɵtemplateRefExtractor),l.ɵɵtext(10," "),l.ɵɵtemplate(11,C,9,2,"div",4),l.ɵɵtext(12," "),l.ɵɵtemplate(13,E,4,1,"div",4),l.ɵɵtext(14," "),l.ɵɵelementStart(15,"div",5),l.ɵɵtext(16),l.ɵɵpipe(17,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(18," "),l.ɵɵelementEnd(),l.ɵɵtext(19," "),l.ɵɵelementStart(20,"div",1),l.ɵɵtext(21," "),l.ɵɵelementStart(22,"div",6),l.ɵɵtext(23," "),l.ɵɵelementStart(24,"label",7),l.ɵɵtext(25),l.ɵɵpipe(26,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(27," "),l.ɵɵtemplate(28,P,3,3,"a",8),l.ɵɵtext(29," "),l.ɵɵelementEnd(),l.ɵɵtext(30," "),l.ɵɵtemplate(31,M,10,3,"ng-template",null,9,l.ɵɵtemplateRefExtractor),l.ɵɵtext(33," "),l.ɵɵtemplate(34,B,9,2,"div",4),l.ɵɵtext(35," "),l.ɵɵtemplate(36,j,4,1,"div",4),l.ɵɵtext(37," "),l.ɵɵelementStart(38,"div",5),l.ɵɵtext(39),l.ɵɵpipe(40,"i18n"),l.ɵɵelementEnd(),l.ɵɵtext(41," "),l.ɵɵelementEnd(),l.ɵɵtext(42," "),l.ɵɵelementEnd(),l.ɵɵtext(43," ")),2&e&&(l.ɵɵproperty("formGroup",t.datesForm),l.ɵɵadvance(5),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(6,10,"deletionDate")),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",!t.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(17,12,"deletionDateDesc")),l.ɵɵadvance(9),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(26,14,"expirationDate")),l.ɵɵadvance(3),l.ɵɵproperty("ngIf",t.editMode&&!t.disabled),l.ɵɵadvance(6),l.ɵɵproperty("ngIf",!t.editMode),l.ɵɵadvance(2),l.ɵɵproperty("ngIf",t.editMode),l.ɵɵadvance(3),l.ɵɵtextInterpolate(l.ɵɵpipeBind1(40,16,"expirationDateDesc")))},directives:[d.NgControlStatusGroup,d.FormGroupDirective,u.NgIf,u.NgSwitch,u.NgSwitchCase,u.NgSwitchDefault,d.DefaultValueAccessor,d.NgControlStatus,d.FormControlName,d.RequiredValidator,d.SelectControlValueAccessor,u.NgForOf,d.NgSelectOption,d.ɵangular_packages_forms_forms_z,u.NgTemplateOutlet,m.StopClickDirective],pipes:[f.I18nPipe],encapsulation:2}),t}(s.EffluxDatesComponent);t.EffluxDatesComponent=V,("undefined"==typeof ngDevMode||ngDevMode)&&l.ɵsetClassMetadata(V,[{type:o.Component,args:[{selector:"app-send-efflux-dates",templateUrl:"efflux-dates.component.html",viewProviders:[{provide:a.ControlContainer,useExisting:a.NgForm}]}]}],(function(){return[{type:c.I18nService},{type:p.PlatformUtilsService},{type:u.DatePipe}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),g.ɵɵadvance(2),g.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),g.ɵɵadvance(2),g.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),g.ɵɵadvance(2),g.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),g.ɵɵadvance(2),g.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),g.ɵɵadvance(2),g.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var H=function(e){function t(t,n,r,i,o,a,s,l,c,p,u,d){var m=e.call(this,t,n,r,i,o,a,s)||this;return m.folderService=l,m.cipherService=c,m.syncService=p,m.apiService=u,m.sendService=d,m.rotateEncKey=!1,m}return i(t,e),t.prototype.rotateEncKeyClicked=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return this.rotateEncKey?[4,this.cipherService.getAllDecrypted()]:[3,5];case 1:if(e=r.sent(),t=!1,null!=e)for(n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),s.ɵɵadvance(2),s.ɵɵproperty("disabled",n.loading),s.ɵɵadvance(2),s.ɵɵpropertyInterpolate("title",s.ɵɵpipeBind1(43,27,"loading")),s.ɵɵadvance(4),s.ɵɵtextInterpolate(s.ɵɵpipeBind1(47,29,"save"))}},directives:[u.NgControlStatusGroup,u.NgForm,d.ApiActionDirective,m.NgIf,m.NgForOf,u.DefaultValueAccessor,u.RequiredValidator,u.NgControlStatus,u.NgModel,f.A11yTitleDirective,m.NgClass,h.StopClickDirective],pipes:[v.I18nPipe],encapsulation:2}),e}();t.DomainRulesComponent=P,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(P,[{type:o.Component,args:[{selector:"app-domain-rules",templateUrl:"domain-rules.component.html"}]}],(function(){return[{type:l.ApiService},{type:c.I18nService},{type:p.ToasterService}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",(null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.minLength)>0),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireUpper),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireLower),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireNumbers),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",null==n.enforcedPolicyOptions?null:n.enforcedPolicyOptions.requireSpecial)}}var F=function(e){function t(t,n,r,i,o,a,l,c,p){var u=e.call(this,t,n,r,i,o,a,l)||this;return u.apiService=c,u.toasterService=p,u.onDone=new s.EventEmitter,u}return i(t,e),t.prototype.ngOnInit=function(){return o(this,void 0,void 0,(function(){var e,t,n;return a(this,(function(r){switch(r.label){case 0:return[4,this.apiService.getEmergencyGrantorPolicies(this.emergencyAccessId)];case 1:return null!=(e=r.sent()).data&&e.data.length>0?(t=e.data.map((function(e){return new c.Policy(new l.PolicyData(e))})),n=this,[4,this.policyService.getMasterPasswordPolicyOptions(t)]):[3,3];case 2:n.enforcedPolicyOptions=r.sent(),r.label=3;case 3:return[2]}}))}))},t.prototype.submit=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i,o,s;return a(this,(function(a){switch(a.label){case 0:return[4,this.strongPassword()];case 1:return a.sent()?[4,this.apiService.postEmergencyAccessTakeover(this.emergencyAccessId)]:[2];case 2:return e=a.sent(),[4,this.cryptoService.rsaDecrypt(e.keyEncrypted)];case 3:return t=a.sent(),null==(n=new p.SymmetricCryptoKey(t))?(this.toasterService.popAsync("error",this.i18nService.t("errorOccurred"),this.i18nService.t("unexpectedError")),[2]):[4,this.cryptoService.makeKey(this.masterPassword,this.email,e.kdf,e.kdfIterations)];case 4:return r=a.sent(),[4,this.cryptoService.hashPassword(this.masterPassword,r)];case 5:return i=a.sent(),[4,this.cryptoService.remakeEncKey(r,n)];case 6:o=a.sent(),(s=new u.EmergencyAccessPasswordRequest).newMasterPasswordHash=i,s.key=o[1].encryptedString,this.apiService.postEmergencyAccessPassword(this.emergencyAccessId,s);try{this.onDone.emit()}catch(l){}return[2]}}))}))},t.ɵfac=function(e){return new(e||t)(m.ɵɵdirectiveInject(f.I18nService),m.ɵɵdirectiveInject(h.CryptoService),m.ɵɵdirectiveInject(v.MessagingService),m.ɵɵdirectiveInject(y.UserService),m.ɵɵdirectiveInject(g.PasswordGenerationService),m.ɵɵdirectiveInject(x.PlatformUtilsService),m.ɵɵdirectiveInject(b.PolicyService),m.ɵɵdirectiveInject(S.ApiService),m.ɵɵdirectiveInject(w.ToasterService))},t.ɵcmp=m.ɵɵdefineComponent({type:t,selectors:[["emergency-access-takeover"]],inputs:{emergencyAccessId:"emergencyAccessId",name:"name",email:"email",kdf:"kdf",kdfIterations:"kdfIterations"},outputs:{onDone:"onDone"},features:[m.ɵɵInheritDefinitionFeature],decls:81,vars:32,consts:[["tabindex","-1","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",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,"fa","fa-spinner","fa-spin",3,"title"],["type","button","data-dismiss","modal",1,"btn","btn-outline-secondary"],[1,"text-muted"],["type","info"],[1,"mb-0"],[4,"ngIf"]],template:function(e,t){if(1&e&&(m.ɵɵelementStart(0,"div",0),m.ɵɵtext(1," "),m.ɵɵelementStart(2,"div",1),m.ɵɵtext(3," "),m.ɵɵelementStart(4,"form",2,3),m.ɵɵlistener("ngSubmit",(function(){return t.submit()})),m.ɵɵtext(6," "),m.ɵɵelementStart(7,"div",4),m.ɵɵtext(8," "),m.ɵɵelementStart(9,"h2",5),m.ɵɵtext(10),m.ɵɵpipe(11,"i18n"),m.ɵɵtemplate(12,M,2,1,"small",6),m.ɵɵtext(13," "),m.ɵɵelementEnd(),m.ɵɵtext(14," "),m.ɵɵelementStart(15,"button",7),m.ɵɵpipe(16,"i18n"),m.ɵɵtext(17," "),m.ɵɵelementStart(18,"span",8),m.ɵɵtext(19,"×"),m.ɵɵelementEnd(),m.ɵɵtext(20," "),m.ɵɵelementEnd(),m.ɵɵtext(21," "),m.ɵɵelementEnd(),m.ɵɵtext(22," "),m.ɵɵelementStart(23,"div",9),m.ɵɵtext(24," "),m.ɵɵelementStart(25,"app-callout",10),m.ɵɵtext(26),m.ɵɵpipe(27,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(28," "),m.ɵɵtemplate(29,V,18,9,"app-callout",11),m.ɵɵtext(30," "),m.ɵɵelementStart(31,"div",12),m.ɵɵtext(32," "),m.ɵɵelementStart(33,"div",13),m.ɵɵtext(34," "),m.ɵɵelementStart(35,"div",14),m.ɵɵtext(36," "),m.ɵɵelementStart(37,"label",15),m.ɵɵtext(38),m.ɵɵpipe(39,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(40," "),m.ɵɵelementStart(41,"input",16),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPassword=e}))("input",(function(){return t.updatePasswordStrength()})),m.ɵɵelementEnd(),m.ɵɵtext(42," "),m.ɵɵelement(43,"app-password-strength",17),m.ɵɵtext(44," "),m.ɵɵelementEnd(),m.ɵɵtext(45," "),m.ɵɵelementEnd(),m.ɵɵtext(46," "),m.ɵɵelementStart(47,"div",13),m.ɵɵtext(48," "),m.ɵɵelementStart(49,"div",14),m.ɵɵtext(50," "),m.ɵɵelementStart(51,"label",18),m.ɵɵtext(52),m.ɵɵpipe(53,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(54," "),m.ɵɵelementStart(55,"input",19),m.ɵɵlistener("ngModelChange",(function(e){return t.masterPasswordRetype=e})),m.ɵɵelementEnd(),m.ɵɵtext(56," "),m.ɵɵelementEnd(),m.ɵɵtext(57," "),m.ɵɵelementEnd(),m.ɵɵtext(58," "),m.ɵɵelementEnd(),m.ɵɵtext(59," "),m.ɵɵelementEnd(),m.ɵɵtext(60," "),m.ɵɵelementStart(61,"div",20),m.ɵɵtext(62," "),m.ɵɵelementStart(63,"button",21),m.ɵɵtext(64," "),m.ɵɵelement(65,"i",22),m.ɵɵpipe(66,"i18n"),m.ɵɵtext(67," "),m.ɵɵelementStart(68,"span"),m.ɵɵtext(69),m.ɵɵpipe(70,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(71," "),m.ɵɵelementEnd(),m.ɵɵtext(72," "),m.ɵɵelementStart(73,"button",23),m.ɵɵtext(74),m.ɵɵpipe(75,"i18n"),m.ɵɵelementEnd(),m.ɵɵtext(76," "),m.ɵɵelementEnd(),m.ɵɵtext(77," "),m.ɵɵelementEnd(),m.ɵɵtext(78," "),m.ɵɵelementEnd(),m.ɵɵtext(79," "),m.ɵɵelementEnd(),m.ɵɵtext(80," ")),2&e){var n=m.ɵɵreference(5);m.ɵɵadvance(4),m.ɵɵproperty("appApiAction",t.formPromise),m.ɵɵadvance(6),m.ɵɵtextInterpolate1(" ",m.ɵɵpipeBind1(11,16,"takeover")," "),m.ɵɵadvance(2),m.ɵɵproperty("ngIf",t.name),m.ɵɵadvance(3),m.ɵɵpropertyInterpolate("appA11yTitle",m.ɵɵpipeBind1(16,18,"close")),m.ɵɵadvance(11),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(27,20,"loggedOutWarning")),m.ɵɵadvance(3),m.ɵɵproperty("ngIf",t.enforcedPolicyOptions),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(39,22,"newMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPassword),m.ɵɵadvance(2),m.ɵɵproperty("score",t.masterPasswordScore)("showText",!0),m.ɵɵadvance(9),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(53,24,"confirmNewMasterPass")),m.ɵɵadvance(3),m.ɵɵproperty("ngModel",t.masterPasswordRetype),m.ɵɵadvance(8),m.ɵɵproperty("disabled",n.loading),m.ɵɵadvance(2),m.ɵɵpropertyInterpolate("title",m.ɵɵpipeBind1(66,26,"loading")),m.ɵɵadvance(4),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(70,28,"save")),m.ɵɵadvance(5),m.ɵɵtextInterpolate(m.ɵɵpipeBind1(75,30,"cancel"))}},directives:[C.NgControlStatusGroup,C.NgForm,I.ApiActionDirective,E.NgIf,P.A11yTitleDirective,k.CalloutComponent,C.DefaultValueAccessor,C.RequiredValidator,O.InputVerbatimDirective,C.NgControlStatus,C.NgModel,A.PasswordStrengthComponent],pipes:[_.I18nPipe],encapsulation:2}),t}(d.ChangePasswordComponent);t.EmergencyAccessTakeoverComponent=F,("undefined"==typeof ngDevMode||ngDevMode)&&m.ɵsetClassMetadata(F,[{type:s.Component,args:[{selector:"emergency-access-takeover",templateUrl:"emergency-access-takeover.component.html"}]}],(function(){return[{type:f.I18nService},{type:h.CryptoService},{type:v.MessagingService},{type:y.UserService},{type:g.PasswordGenerationService},{type:x.PlatformUtilsService},{type:b.PolicyService},{type:S.ApiService},{type:w.ToasterService}]}),{onDone:[{type:s.Output}],emergencyAccessId:[{type:s.Input}],name:[{type:s.Input}],email:[{type:s.Input}],kdf:[{type:s.Input}],kdfIterations:[{type:s.Input}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1&&this.trustedContacts.splice(t,1)},e.prototype.removeGrantor=function(e){var t=this.grantedContacts.indexOf(e);t>-1&&this.grantedContacts.splice(t,1)},e.prototype.doConfirmation=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,s,p,u;return i(this,(function(i){switch(i.label){case 0:return[4,this.cryptoService.getEncKey()];case 1:return t=i.sent(),[4,this.apiService.getUserPublicKey(e.granteeId)];case 2:n=i.sent(),r=l.Utils.fromB64ToArray(n.publicKey),i.label=3;case 3:return i.trys.push([3,5,,6]),a=(o=console).log,s="User's fingerprint: ",[4,this.cryptoService.getFingerprint(e.granteeId,r.buffer)];case 4:return a.apply(o,[s+i.sent().join("-")]),[3,6];case 5:return i.sent(),[3,6];case 6:return[4,this.cryptoService.rsaEncrypt(t.key,r.buffer)];case 7:return p=i.sent(),(u=new c.EmergencyAccessConfirmRequest).key=p.encryptedString,[4,this.apiService.postEmergencyAccessConfirm(e.id,u)];case 8:return i.sent(),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.ApiService),v.ɵɵdirectiveInject(g.I18nService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(x.PlatformUtilsService),v.ɵɵdirectiveInject(b.ToasterService),v.ɵɵdirectiveInject(S.CryptoService),v.ɵɵdirectiveInject(w.StorageService),v.ɵɵdirectiveInject(C.UserService),v.ɵɵdirectiveInject(I.MessagingService),v.ɵɵdirectiveInject(E.UserNamePipe))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["emergency-access"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(T,3,o.ViewContainerRef),v.ɵɵviewQuery(D,3,o.ViewContainerRef),v.ɵɵviewQuery(R,3,o.ViewContainerRef)),2&e){var n=void 0;v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.addEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.takeoverModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.confirmModalRef=n.first)}},decls:59,vars:25,consts:[[1,"page-header"],["href","https://bitwarden.com/help/article/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,"fa","fa-plus","fa-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,"fa","fa-cog","fa-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,"fa","fa-fw","fa-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,"fa","fa-fw","fa-envelope-o"],["href","#","appStopClick","",1,"dropdown-item","text-success",3,"click"],["aria-hidden","true",1,"fa","fa-fw","fa-check"],["href","#","appStopClick","",1,"dropdown-item","text-warning",3,"click"],["class","dropdown-item",3,"routerLink",4,"ngIf"],["aria-hidden","true",1,"fa","fa-fw","fa-key"],[1,"dropdown-item",3,"routerLink"],["aria-hidden","true",1,"fa","fa-fw","fa-eye"]],template:function(e,t){1&e&&(v.ɵɵelementStart(0,"div",0),v.ɵɵtext(1," "),v.ɵɵelementStart(2,"h1"),v.ɵɵtext(3),v.ɵɵpipe(4,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(5," "),v.ɵɵelementEnd(),v.ɵɵtext(6," "),v.ɵɵelementStart(7,"p"),v.ɵɵtext(8),v.ɵɵpipe(9,"i18n"),v.ɵɵelementStart(10,"a",1),v.ɵɵtext(11),v.ɵɵpipe(12,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(13," "),v.ɵɵelementEnd(),v.ɵɵtext(14," "),v.ɵɵtemplate(15,B,7,6,"p",2),v.ɵɵtext(16," "),v.ɵɵelementStart(17,"div",3),v.ɵɵtext(18," "),v.ɵɵelementStart(19,"h2"),v.ɵɵtext(20),v.ɵɵpipe(21,"i18n"),v.ɵɵtemplate(22,U,3,3,"a",4),v.ɵɵtext(23," "),v.ɵɵelementEnd(),v.ɵɵtext(24," "),v.ɵɵelementStart(25,"div",5),v.ɵɵtext(26," "),v.ɵɵelementStart(27,"button",6),v.ɵɵlistener("click",(function(){return t.invite()})),v.ɵɵtext(28," "),v.ɵɵelement(29,"i",7),v.ɵɵtext(30),v.ɵɵpipe(31,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(32," "),v.ɵɵelementEnd(),v.ɵɵtext(33," "),v.ɵɵelementEnd(),v.ɵɵtext(34," "),v.ɵɵtemplate(35,Q,7,1,"table",8),v.ɵɵtext(36," "),v.ɵɵtemplate(37,Y,3,3,"p",2),v.ɵɵtext(38," "),v.ɵɵelementStart(39,"div",9),v.ɵɵtext(40," "),v.ɵɵelementStart(41,"h2"),v.ɵɵtext(42),v.ɵɵpipe(43,"i18n"),v.ɵɵelementEnd(),v.ɵɵtext(44," "),v.ɵɵelementEnd(),v.ɵɵtext(45," "),v.ɵɵtemplate(46,le,7,1,"table",8),v.ɵɵtext(47," "),v.ɵɵtemplate(48,ce,3,3,"p",2),v.ɵɵtext(49," "),v.ɵɵtemplate(50,pe,0,0,"ng-template",null,10,v.ɵɵtemplateRefExtractor),v.ɵɵtext(52," "),v.ɵɵtemplate(53,ue,0,0,"ng-template",null,11,v.ɵɵtemplateRefExtractor),v.ɵɵtext(55," "),v.ɵɵtemplate(56,de,0,0,"ng-template",null,12,v.ɵɵtemplateRefExtractor),v.ɵɵtext(58," ")),2&e&&(v.ɵɵadvance(3),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(4,13,"emergencyAccess")),v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(9,15,"emergencyAccessDesc")," "),v.ɵɵadvance(3),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(12,17,"learnMore"),". "),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.isOrganizationOwner),v.ɵɵadvance(5),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(21,19,"trustedEmergencyContacts")," "),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.canAccessPremium),v.ɵɵadvance(5),v.ɵɵproperty("disabled",!t.canAccessPremium),v.ɵɵadvance(3),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(31,21,"addEmergencyContact")," "),v.ɵɵadvance(5),v.ɵɵproperty("ngIf",t.trustedContacts&&t.trustedContacts.length),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.trustedContacts||!t.trustedContacts.length),v.ɵɵadvance(5),v.ɵɵtextInterpolate(v.ɵɵpipeBind1(43,23,"designatedEmergencyContacts")),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.grantedContacts&&t.grantedContacts.length),v.ɵɵadvance(2),v.ɵɵproperty("ngIf",!t.grantedContacts||!t.grantedContacts.length))},directives:[P.NgIf,k.StopClickDirective,P.NgForOf,O.AvatarComponent,A.A11yTitleDirective,_.RouterLinkWithHref],pipes:[M.I18nPipe,E.UserNamePipe],encapsulation:2}),e}();t.EmergencyAccessComponent=me,("undefined"==typeof ngDevMode||ngDevMode)&&v.ɵsetClassMetadata(me,[{type:o.Component,args:[{selector:"emergency-access",templateUrl:"emergency-access.component.html"}]}],(function(){return[{type:y.ApiService},{type:g.I18nService},{type:v.ComponentFactoryResolver},{type:x.PlatformUtilsService},{type:b.ToasterService},{type:S.CryptoService},{type:w.StorageService},{type:C.UserService},{type:I.MessagingService},{type:E.UserNamePipe}]}),{addEditModalRef:[{type:o.ViewChild,args:["addEdit",{read:o.ViewContainerRef,static:!0}]}],takeoverModalRef:[{type:o.ViewChild,args:["takeoverTemplate",{read:o.ViewContainerRef,static:!0}]}],confirmModalRef:[{type:o.ViewChild,args:["confirmTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessViewResponse=t.EmergencyAccessTakeoverResponse=t.EmergencyAccessGrantorDetailsResponse=t.EmergencyAccessGranteeDetailsResponse=void 0;var o=n(20),a=n(224),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.granteeId=n.getResponseProperty("GranteeId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGranteeDetailsResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.grantorId=n.getResponseProperty("GrantorId"),n.name=n.getResponseProperty("Name"),n.email=n.getResponseProperty("Email"),n.type=n.getResponseProperty("Type"),n.status=n.getResponseProperty("Status"),n.waitTimeDays=n.getResponseProperty("WaitTimeDays"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessGrantorDetailsResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.keyEncrypted=n.getResponseProperty("KeyEncrypted"),n.kdf=n.getResponseProperty("Kdf"),n.kdfIterations=n.getResponseProperty("KdfIterations"),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessTakeoverResponse=c;var p=function(e){function t(t){var n=e.call(this,t)||this;n.ciphers=[],n.keyEncrypted=n.getResponseProperty("KeyEncrypted");var r=n.getResponseProperty("Ciphers");return null!=r&&(n.ciphers=r.map((function(e){return new a.CipherResponse(e)}))),n}return i(t,e),t}(o.BaseResponse);t.EmergencyAccessViewResponse=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?"×"+n.quantity:""," @ ",a.ɵɵpipeBind2(4,5,n.amount,"$")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate2(" ",a.ɵɵpipeBind2(8,8,n.quantity*n.amount,"$")," /",a.ɵɵpipeBind1(9,11,n.interval)," ")}}function A(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",16),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"strong",17),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"table",18),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"tbody"),a.ɵɵtext(9," "),a.ɵɵtemplate(10,O,11,13,"tr",19),a.ɵɵtext(11," "),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementEnd(),a.ɵɵtext(13," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(3),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(4,2,"details")),a.ɵɵadvance(7),a.ɵɵproperty("ngForOf",n.subscription.items)}}function _(e,t){if(1&e&&(a.ɵɵelementStart(0,"div",10),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",11),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"dl"),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"dt"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementStart(10,"dd"),a.ɵɵtext(11," "),a.ɵɵelementStart(12,"span",12),a.ɵɵtext(13),a.ɵɵelementEnd(),a.ɵɵtext(14," "),a.ɵɵtemplate(15,k,3,3,"span",13),a.ɵɵtext(16," "),a.ɵɵelementEnd(),a.ɵɵtext(17," "),a.ɵɵelementStart(18,"dt"),a.ɵɵtext(19),a.ɵɵpipe(20,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(21," "),a.ɵɵelementStart(22,"dd"),a.ɵɵtext(23),a.ɵɵpipe(24,"date"),a.ɵɵpipe(25,"currency"),a.ɵɵelementEnd(),a.ɵɵtext(26," "),a.ɵɵelementEnd(),a.ɵɵtext(27," "),a.ɵɵelementEnd(),a.ɵɵtext(28," "),a.ɵɵtemplate(29,A,14,4,"div",14),a.ɵɵtext(30," "),a.ɵɵelementEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(7),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,6,"status")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(n.subscription&&n.subscription.status||"-"),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(20,8,"nextCharge")),a.ɵɵadvance(4),a.ɵɵtextInterpolate1("",n.nextInvoice?a.ɵɵpipeBind2(24,10,n.nextInvoice.date,"mediumDate")+", "+a.ɵɵpipeBind2(25,13,n.nextInvoice.amount,"$"):"-"," "),a.ɵɵadvance(6),a.ɵɵproperty("ngIf",n.subscription)}}function M(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",23),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",24),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"button",25),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵpipe(5,"i18n"),a.ɵɵelementStart(6,"span",26),a.ɵɵtext(7,"×"),a.ɵɵelementEnd(),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementStart(9,"h3",27),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementStart(13,"app-update-license",28),a.ɵɵlistener("onUpdated",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).closeUpdateLicense(!1)})),a.ɵɵtext(14," "),a.ɵɵelementEnd(),a.ɵɵtext(15," "),a.ɵɵelementEnd(),a.ɵɵtext(16," "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(4),a.ɵɵpropertyInterpolate("appA11yTitle",a.ɵɵpipeBind1(5,2,"cancel")),a.ɵɵadvance(6),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,4,"updateLicense")))}function T(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div"),a.ɵɵtext(3," "),a.ɵɵelementStart(4,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(2).updateLicense()})),a.ɵɵtext(5),a.ɵɵpipe(6,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(7," "),a.ɵɵelementStart(8,"a",21),a.ɵɵtext(9),a.ɵɵpipe(10,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(11," "),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵtemplate(13,M,17,6,"div",22),a.ɵɵtext(14," "),a.ɵɵelementContainerEnd()}if(2&e){var r=a.ɵɵnextContext(2);a.ɵɵadvance(5),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(6,3,"updateLicense")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(10,5,"manageSubscription")," "),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",r.showUpdateLicense)}}function D(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).downloadLicense()})),a.ɵɵtext(1),a.ɵɵpipe(2,"i18n"),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(2,1,"downloadLicense")," "))}function R(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"button",35,36),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(3).cancel()})),a.ɵɵtext(2," "),a.ɵɵelement(3,"i",9),a.ɵɵpipe(4,"i18n"),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"span"),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵreference(1),i=a.ɵɵnextContext(3);a.ɵɵproperty("appApiAction",i.cancelPromise)("disabled",r.loading),a.ɵɵadvance(3),a.ɵɵpropertyInterpolate("title",a.ɵɵpipeBind1(4,4,"loading")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(8,6,"cancelSubscription"))}}function B(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"div",29),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"button",20),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!0)})),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(5," "),a.ɵɵelementStart(6,"button",40),a.ɵɵlistener("click",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).adjustStorage(!1)})),a.ɵɵtext(7),a.ɵɵpipe(8,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(9," "),a.ɵɵelementEnd()}2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(4,2,"addStorage")," "),a.ɵɵadvance(4),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(8,4,"removeStorage")," "))}function U(e,t){if(1&e){var n=a.ɵɵgetCurrentView();a.ɵɵelementStart(0,"app-adjust-storage",41),a.ɵɵlistener("onAdjusted",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!0)}))("onCanceled",(function(){return a.ɵɵrestoreView(n),a.ɵɵnextContext(4).closeStorage(!1)})),a.ɵɵelementEnd()}if(2&e){var r=a.ɵɵnextContext(4);a.ɵɵproperty("storageGbPrice",4)("add",r.adjustStorageAdd)}}function j(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",37),a.ɵɵtext(3," "),a.ɵɵtemplate(4,B,10,6,"div",38),a.ɵɵtext(5," "),a.ɵɵtemplate(6,U,1,2,"app-adjust-storage",39),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(3);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.showAdjustStorage),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.showAdjustStorage)}}var V=function(e){return{width:e}};function F(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"div",29),a.ɵɵtext(3," "),a.ɵɵtemplate(4,D,3,3,"button",30),a.ɵɵtext(5," "),a.ɵɵtemplate(6,R,10,8,"button",31),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵelementStart(9,"h2",32),a.ɵɵtext(10),a.ɵɵpipe(11,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(12," "),a.ɵɵelementStart(13,"p"),a.ɵɵtext(14),a.ɵɵpipe(15,"i18n"),a.ɵɵelementEnd(),a.ɵɵtext(16," "),a.ɵɵelementStart(17,"div",33),a.ɵɵtext(18," "),a.ɵɵelementStart(19,"div",34),a.ɵɵtext(20),a.ɵɵpipe(21,"percent"),a.ɵɵelementEnd(),a.ɵɵtext(22," "),a.ɵɵelementEnd(),a.ɵɵtext(23," "),a.ɵɵtemplate(24,j,9,2,"ng-container",1),a.ɵɵtext(25," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext(2);a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!n.subscription||!n.subscription.cancelled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind1(11,8,"storage")),a.ɵɵadvance(4),a.ɵɵtextInterpolate(a.ɵɵpipeBind3(15,10,"subscriptionStorage",n.sub.maxStorageGb||0,n.sub.storageName||"0 MB")),a.ɵɵadvance(5),a.ɵɵproperty("ngStyle",a.ɵɵpureFunction1(16,V,n.storageProgressWidth+"%")),a.ɵɵattribute("aria-valuenow",n.storagePercentage),a.ɵɵadvance(1),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(21,14,n.storagePercentage/100),""),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",n.subscription&&!n.subscription.cancelled&&!n.subscriptionMarkedForCancel)}}function N(e,t){if(1&e&&(a.ɵɵelementContainerStart(0),a.ɵɵtext(1," "),a.ɵɵtemplate(2,w,4,6,"app-callout",4),a.ɵɵtext(3," "),a.ɵɵtemplate(4,C,18,14,"app-callout",4),a.ɵɵtext(5," "),a.ɵɵtemplate(6,P,10,5,"dl",1),a.ɵɵtext(7," "),a.ɵɵtemplate(8,_,31,16,"div",5),a.ɵɵtext(9," "),a.ɵɵtemplate(10,T,15,7,"ng-container",1),a.ɵɵtext(11," "),a.ɵɵtemplate(12,F,26,18,"ng-container",1),a.ɵɵtext(13," "),a.ɵɵelementContainerEnd()),2&e){var n=a.ɵɵnextContext();a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscription&&n.subscription.cancelled),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.subscriptionMarkedForCancel),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",n.selfHosted),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",!n.selfHosted)}}var z=function(){function e(e,t,n,r,i,o){this.tokenService=e,this.apiService=t,this.platformUtilsService=n,this.i18nService=r,this.toasterService=i,this.router=o,this.loading=!1,this.firstLoaded=!1,this.adjustStorageAdd=!0,this.showAdjustStorage=!1,this.showUpdateLicense=!1,this.selfHosted=!1,this.selfHosted=n.isSelfHost()}return e.prototype.ngOnInit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.load()];case 1:return e.sent(),this.firstLoaded=!0,[2]}}))}))},e.prototype.load=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.loading?[2]:this.tokenService.getPremium()?(this.loading=!0,e=this,[4,this.apiService.getUserSubscription()]):[3,2];case 1:return e.sub=t.sent(),[3,3];case 2:return this.router.navigate(["/settings/premium"]),[2];case 3:return this.loading=!1,[2]}}))}))},e.prototype.reinstate=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("reinstateConfirmation"),this.i18nService.t("reinstateSubscription"),this.i18nService.t("yes"),this.i18nService.t("cancel"))];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.reinstatePromise=this.apiService.postReinstatePremium(),[4,this.reinstatePromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("reinstated")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.cancel=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.loading?[2]:this.usingInAppPurchase?(this.platformUtilsService.showDialog(this.i18nService.t("manageSubscriptionFromStore"),this.i18nService.t("cancelSubscription"),null,null,"warning"),[2]):[4,this.platformUtilsService.showDialog(this.i18nService.t("cancelConfirmation"),this.i18nService.t("cancelSubscription"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2];e.label=2;case 2:return e.trys.push([2,4,,5]),this.cancelPromise=this.apiService.postCancelPremium(),[4,this.cancelPromise];case 3:return e.sent(),this.toasterService.popAsync("success",null,this.i18nService.t("canceledSubscription")),this.load(),[3,5];case 4:return e.sent(),[3,5];case 5:return[2]}}))}))},e.prototype.downloadLicense=function(){if(!this.loading){var e=JSON.stringify(this.sub.license,null,2);this.platformUtilsService.saveFile(window,e,null,"bitwarden_premium_license.json")}},e.prototype.updateLicense=function(){this.loading||(this.showUpdateLicense=!0)},e.prototype.closeUpdateLicense=function(e){this.showUpdateLicense=!1,e&&this.load()},e.prototype.adjustStorage=function(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)},e.prototype.closeStorage=function(e){this.showAdjustStorage=!1,e&&this.load()},Object.defineProperty(e.prototype,"subscriptionMarkedForCancel",{get:function(){return null!=this.subscription&&!this.subscription.cancelled&&this.subscription.cancelAtEndDate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"subscription",{get:function(){return null!=this.sub?this.sub.subscription:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nextInvoice",{get:function(){return null!=this.sub?this.sub.upcomingInvoice:null},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storagePercentage",{get:function(){return null!=this.sub&&this.sub.maxStorageGb?+(this.sub.storageGb/this.sub.maxStorageGb*100).toFixed(2):0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"storageProgressWidth",{get:function(){return this.storagePercentage<5?5:0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"usingInAppPurchase",{get:function(){return null!=this.sub&&this.sub.usingInAppPurchase},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.TokenService),a.ɵɵdirectiveInject(l.ApiService),a.ɵɵdirectiveInject(c.PlatformUtilsService),a.ɵɵdirectiveInject(p.I18nService),a.ɵɵdirectiveInject(u.ToasterService),a.ɵɵdirectiveInject(d.Router))},e.ɵcmp=a.ɵɵdefineComponent({type:e,selectors:[["app-user-subscription"]],decls:13,vars:6,consts:[[1,"page-header"],[4,"ngIf"],["aria-hidden","true",1,"fa","fa-spinner","fa-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,"fa","fa-spinner","fa-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&&(a.ɵɵelementStart(0,"div",0),a.ɵɵtext(1," "),a.ɵɵelementStart(2,"h1"),a.ɵɵtext(3),a.ɵɵpipe(4,"i18n"),a.ɵɵtemplate(5,b,9,6,"small",1),a.ɵɵtext(6," "),a.ɵɵelementEnd(),a.ɵɵtext(7," "),a.ɵɵelementEnd(),a.ɵɵtext(8," "),a.ɵɵtemplate(9,S,9,6,"ng-container",1),a.ɵɵtext(10," "),a.ɵɵtemplate(11,N,14,6,"ng-container",1),a.ɵɵtext(12," ")),2&e&&(a.ɵɵadvance(3),a.ɵɵtextInterpolate1(" ",a.ɵɵpipeBind1(4,4,"premiumMembership")," "),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.firstLoaded&&t.loading),a.ɵɵadvance(4),a.ɵɵproperty("ngIf",!t.firstLoaded&&t.loading),a.ɵɵadvance(2),a.ɵɵproperty("ngIf",t.sub))},directives:[m.NgIf,f.CalloutComponent,h.ApiActionDirective,m.NgForOf,v.A11yTitleDirective,y.UpdateLicenseComponent,m.NgStyle,g.AdjustStorageComponent],pipes:[x.I18nPipe,m.DatePipe,m.CurrencyPipe,m.PercentPipe],encapsulation:2}),e}();t.UserSubscriptionComponent=z,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(z,[{type:o.Component,args:[{selector:"app-user-subscription",templateUrl:"user-subscription.component.html"}]}],(function(){return[{type:s.TokenService},{type:l.ApiService},{type:c.PlatformUtilsService},{type:p.I18nService},{type:u.ToasterService},{type:d.Router}]}),null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0,[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load()])];case 6:return c.sent(),null!=e?[3,8]:(this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()]);case 7:return c.sent(),[3,20];case 8:return e.deleted?(this.groupingsComponent.selectedTrash=!0,[4,this.filterDeleted()]):[3,10];case 9:return c.sent(),[3,20];case 10:return e.favorites?(this.groupingsComponent.selectedFavorites=!0,[4,this.filterFavorites()]):[3,12];case 11:return c.sent(),[3,20];case 12:return e.type?(s=parseInt(e.type,null),this.groupingsComponent.selectedType=s,[4,this.filterCipherType(s)]):[3,14];case 13:return c.sent(),[3,20];case 14:return e.folderId?(this.groupingsComponent.selectedFolder=!0,this.groupingsComponent.selectedFolderId=e.folderId,[4,this.filterFolder(e.folderId)]):[3,16];case 15:return c.sent(),[3,20];case 16:return e.collectionId?(this.groupingsComponent.selectedCollectionId=e.collectionId,[4,this.filterCollection(e.collectionId)]):[3,18];case 17:return c.sent(),[3,20];case 18:return this.groupingsComponent.selectedAll=!0,[4,this.ciphersComponent.reload()];case 19:c.sent(),c.label=20;case 20:return this.broadcasterService.subscribe(re,(function(e){l.ngZone.run((function(){return r(l,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:switch(e.command){case"syncCompleted":return[3,1]}return[3,4];case 1:return e.successfully?[4,Promise.all([this.groupingsComponent.load(),this.organizationsComponent.load(),this.ciphersComponent.load(this.ciphersComponent.filter)])]:[3,3];case 2:t.sent(),this.changeDetectorRef.detectChanges(),t.label=3;case 3:return[3,4];case 4:return[2]}}))}))}))})),null!=t&&t.unsubscribe(),[2]}}))}))})),[2]}}))}))},e.prototype.ngOnDestroy=function(){this.broadcasterService.unsubscribe(re)},e.prototype.clearGroupingFilters=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchVault"),[4,this.ciphersComponent.reload()];case 1:return e.sent(),this.clearFilters(),this.go(),[2]}}))}))},e.prototype.filterFavorites=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFavorites"),[4,this.ciphersComponent.reload((function(e){return e.favorite}))];case 1:return e.sent(),this.clearFilters(),this.favorites=!0,this.go(),[2]}}))}))},e.prototype.filterDeleted=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.ciphersComponent.showAddNew=!1,this.ciphersComponent.deleted=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchTrash"),[4,this.ciphersComponent.reload(null,!0)];case 1:return e.sent(),this.clearFilters(),this.deleted=!0,this.go(),[2]}}))}))},e.prototype.filterCipherType=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchType"),[4,this.ciphersComponent.reload((function(t){return t.type===e}))];case 1:return t.sent(),this.clearFilters(),this.type=e,this.go(),[2]}}))}))},e.prototype.filterFolder=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,e="none"===e?null:e,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchFolder"),[4,this.ciphersComponent.reload((function(t){return t.folderId===e}))];case 1:return t.sent(),this.clearFilters(),this.folderId=null==e?"none":e,this.go(),[2]}}))}))},e.prototype.filterCollection=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.ciphersComponent.showAddNew=!0,this.groupingsComponent.searchPlaceholder=this.i18nService.t("searchCollection"),[4,this.ciphersComponent.reload((function(t){return null!=t.collectionIds&&t.collectionIds.indexOf(e)>-1}))];case 1:return t.sent(),this.clearFilters(),this.collectionId=e,this.go(),[2]}}))}))},e.prototype.filterSearchText=function(e){this.ciphersComponent.searchText=e,this.ciphersComponent.search(200)},e.prototype.editCipherAttachments=function(e){return r(this,void 0,void 0,(function(){var t,n,o,s,l,c=this;return i(this,(function(u){switch(u.label){case 0:return[4,this.userService.canAccessPremium()];case 1:return t=u.sent(),null!=e.organizationId||t?[3,2]:(this.messagingService.send("premiumRequired"),[2]);case 2:return null==e.organizationId?[3,4]:[4,this.userService.getOrganization(e.organizationId)];case 3:if(null!=(n=u.sent())&&(null==n.maxStorageGb||0===n.maxStorageGb))return this.messagingService.send("upgradeOrganization",{organizationId:e.organizationId}),[2];u.label=4;case 4:return null!=this.modal&&this.modal.close(),o=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.attachmentsModalRef.createComponent(o).instance,(s=this.modal.show(p.AttachmentsComponent,this.attachmentsModalRef)).cipherId=e.id,l=!1,s.onUploadedAttachment.subscribe((function(){return l=!0})),s.onDeletedAttachment.subscribe((function(){return l=!0})),s.onReuploadedAttachment.subscribe((function(){return l=!0})),this.modal.onClosed.subscribe((function(){return r(c,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal=null,l?[4,this.ciphersComponent.refresh()]:[3,2];case 1:e.sent(),e.label=2;case 2:return l=!1,[2]}}))}))})),[2]}}))}))},e.prototype.shareCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.shareModalRef.createComponent(n).instance;var o=this.modal.show(h.ShareComponent,this.shareModalRef);o.cipherId=e.id,o.onSharedCipher.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.editCipherCollections=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.collectionsModalRef.createComponent(n).instance;var o=this.modal.show(d.CollectionsComponent,this.collectionsModalRef);o.cipherId=e.id,o.onSavedCollections.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){return r(t,void 0,void 0,(function(){return i(this,(function(e){return this.modal=null,[2]}))}))}))},e.prototype.addFolder=function(){return r(this,void 0,void 0,(function(){var e,t,n=this;return i(this,(function(o){return null!=this.modal&&this.modal.close(),e=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.folderAddEditModalRef.createComponent(e).instance,(t=this.modal.show(m.FolderAddEditComponent,this.folderAddEditModalRef)).folderId=null,t.onSavedFolder.subscribe((function(){return r(n,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){n.modal=null})),[2]}))}))},e.prototype.editFolder=function(e){return r(this,void 0,void 0,(function(){var t,n,o=this;return i(this,(function(s){return null!=this.modal&&this.modal.close(),t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent),this.modal=this.folderAddEditModalRef.createComponent(t).instance,(n=this.modal.show(m.FolderAddEditComponent,this.folderAddEditModalRef)).folderId=e,n.onSavedFolder.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[2]}}))}))})),n.onDeletedFolder.subscribe((function(){return r(o,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.groupingsComponent.loadFolders()];case 1:return e.sent(),[4,this.filterFolder("none")];case 2:return e.sent(),this.groupingsComponent.selectedFolderId=null,[2]}}))}))})),this.modal.onClosed.subscribe((function(){o.modal=null})),[2]}))}))},e.prototype.addCipher=function(){var e=this,t=this.editCipher(null);if(t.type=this.type,t.folderId="none"===this.folderId?null:this.folderId,null!=this.collectionId){var n=this.groupingsComponent.collections.filter((function(t){return t.id===e.collectionId}));n.length>0&&(t.organizationId=n[0].organizationId,t.collectionIds=[this.collectionId])}},e.prototype.editCipher=function(e){var t=this;null!=this.modal&&this.modal.close();var n=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.cipherAddEditModalRef.createComponent(n).instance;var o=this.modal.show(c.AddEditComponent,this.cipherAddEditModalRef);return o.cipherId=null==e?null:e.id,o.onSavedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onDeletedCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),o.onRestoredCipher.subscribe((function(e){return r(t,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.modal.close(),[4,this.ciphersComponent.refresh()];case 1:return e.sent(),[2]}}))}))})),this.modal.onClosed.subscribe((function(){t.modal=null})),o},e.prototype.cloneCipher=function(e){this.editCipher(e).cloneMode=!0},e.prototype.updateKey=function(){var e=this;null!=this.modal&&this.modal.close();var t=this.componentFactoryResolver.resolveComponentFactory(a.ModalComponent);this.modal=this.updateKeyModalRef.createComponent(t).instance,this.modal.show(l.UpdateKeyComponent,this.updateKeyModalRef),this.modal.onClosed.subscribe((function(){e.modal=null}))},e.prototype.clearFilters=function(){this.folderId=null,this.collectionId=null,this.favorites=!1,this.type=null,this.deleted=!1},e.prototype.go=function(e){void 0===e&&(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})},e.ɵfac=function(t){return new(t||e)(v.ɵɵdirectiveInject(y.SyncService),v.ɵɵdirectiveInject(g.ActivatedRoute),v.ɵɵdirectiveInject(g.Router),v.ɵɵdirectiveInject(v.ChangeDetectorRef),v.ɵɵdirectiveInject(x.I18nService),v.ɵɵdirectiveInject(v.ComponentFactoryResolver),v.ɵɵdirectiveInject(b.TokenService),v.ɵɵdirectiveInject(S.CryptoService),v.ɵɵdirectiveInject(w.MessagingService),v.ɵɵdirectiveInject(C.UserService),v.ɵɵdirectiveInject(I.PlatformUtilsService),v.ɵɵdirectiveInject(E.BroadcasterService),v.ɵɵdirectiveInject(v.NgZone))},e.ɵcmp=v.ɵɵdefineComponent({type:e,selectors:[["app-vault"]],viewQuery:function(e,t){if(1&e&&(v.ɵɵviewQuery(f.GroupingsComponent,3),v.ɵɵviewQuery(u.CiphersComponent,3),v.ɵɵviewQuery(s.OrganizationsComponent,3),v.ɵɵviewQuery(j,3,o.ViewContainerRef),v.ɵɵviewQuery(V,3,o.ViewContainerRef),v.ɵɵviewQuery(F,3,o.ViewContainerRef),v.ɵɵviewQuery(N,3,o.ViewContainerRef),v.ɵɵviewQuery(z,3,o.ViewContainerRef),v.ɵɵviewQuery(L,3,o.ViewContainerRef)),2&e){var n=void 0;v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.groupingsComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.ciphersComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.organizationsComponent=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.attachmentsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.folderAddEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.cipherAddEditModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.shareModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.collectionsModalRef=n.first),v.ɵɵqueryRefresh(n=v.ɵɵloadQuery())&&(t.updateKeyModalRef=n.first)}},decls:90,vars:22,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","modal","deleted"],["type","button","class","btn btn-outline-primary btn-sm",3,"click",4,"ngIf"],["type","warning","icon","fa-warning",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"],[1,"card-header","d-flex"],["href","https://help.bitwarden.com/article/what-is-an-organization/","target","_blank","rel","noopener",1,"ml-auto",3,"appA11yTitle"],["aria-hidden","true",1,"fa","fa-question-circle-o"],[1,"card-body"],[3,"vault"],["class","card mt-4",4,"ngIf"],["attachments",""],["folderAddEdit",""],["cipherAddEdit",""],["share",""],["collections",""],["updateKeyTemplate",""],["aria-hidden","true",1,"fa","fa-spinner","fa-spin","text-muted",3,"title"],[1,"sr-only"],["type","button",1,"btn","btn-outline-primary","btn-sm",3,"click"],["aria-hidden","true",1,"fa","fa-plus","fa-fw"],["type","warning","icon","fa-warning"],[1,"card","border-warning","mb-4"],[1,"card-header","bg-warning","text-white"],["aria-hidden","true",1,"fa","fa-warning","fa-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,"fa","fa-star","fa-fw"],["routerLink","/settings/premium",1,"btn","btn-block","btn-outline-secondary"],[1,"card","mt-4"],["href","https://bitwarden.com/help/article/about-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," "),v.ɵɵelementStart(2,"div",1),v.ɵɵtext(3," "),v.ɵɵelementStart(4,"div",2),v.ɵɵtext(5," "),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," "),v.ɵɵelementEnd(),v.ɵɵtext(8," "),v.ɵɵelementEnd(),v.ɵɵtext(9," "),v.ɵɵelementStart(10,"div",4),v.ɵɵtext(11," "),v.ɵɵelementStart(12,"div",5),v.ɵɵtext(13," "),v.ɵɵelementStart(14,"h1"),v.ɵɵtext(15),v.ɵɵpipe(16,"i18n"),v.ɵɵelementStart(17,"small",6,7),v.ɵɵtext(19," "),v.ɵɵtemplate(20,K,9,6,"ng-container",8),v.ɵɵtext(21," "),v.ɵɵelementEnd(),v.ɵɵtext(22," "),v.ɵɵelementEnd(),v.ɵɵtext(23," "),v.ɵɵelementStart(24,"div",9),v.ɵɵtext(25," "),v.ɵɵelementStart(26,"app-vault-bulk-actions",10),v.ɵɵtext(27," "),v.ɵɵelementEnd(),v.ɵɵtext(28," "),v.ɵɵtemplate(29,G,5,3,"button",11),v.ɵɵtext(30," "),v.ɵɵelementEnd(),v.ɵɵtext(31," "),v.ɵɵelementEnd(),v.ɵɵtext(32," "),v.ɵɵtemplate(33,q,2,1,"app-callout",12),v.ɵɵtext(34," "),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," "),v.ɵɵelementEnd(),v.ɵɵtext(37," "),v.ɵɵelementEnd(),v.ɵɵtext(38," "),v.ɵɵelementStart(39,"div",2),v.ɵɵtext(40," "),v.ɵɵtemplate(41,H,19,9,"div",14),v.ɵɵtext(42," "),v.ɵɵtemplate(43,W,1,0,"app-verify-email",15),v.ɵɵtext(44," "),v.ɵɵtemplate(45,$,19,9,"div",14),v.ɵɵtext(46," "),v.ɵɵtemplate(47,Q,19,9,"div",16),v.ɵɵtext(48," "),v.ɵɵelementStart(49,"div",17),v.ɵɵtext(50," "),v.ɵɵelementStart(51,"div",18),v.ɵɵtext(52),v.ɵɵpipe(53,"i18n"),v.ɵɵelementStart(54,"a",19),v.ɵɵpipe(55,"i18n"),v.ɵɵtext(56," "),v.ɵɵelement(57,"i",20),v.ɵɵtext(58," "),v.ɵɵelementEnd(),v.ɵɵtext(59," "),v.ɵɵelementEnd(),v.ɵɵtext(60," "),v.ɵɵelementStart(61,"div",21),v.ɵɵtext(62," "),v.ɵɵelement(63,"app-organizations",22),v.ɵɵtext(64," "),v.ɵɵelementEnd(),v.ɵɵtext(65," "),v.ɵɵelementEnd(),v.ɵɵtext(66," "),v.ɵɵtemplate(67,Y,17,6,"div",23),v.ɵɵtext(68," "),v.ɵɵelementEnd(),v.ɵɵtext(69," "),v.ɵɵelementEnd(),v.ɵɵtext(70," "),v.ɵɵelementEnd(),v.ɵɵtext(71," "),v.ɵɵtemplate(72,J,0,0,"ng-template",null,24,v.ɵɵtemplateRefExtractor),v.ɵɵtext(74," "),v.ɵɵtemplate(75,Z,0,0,"ng-template",null,25,v.ɵɵtemplateRefExtractor),v.ɵɵtext(77," "),v.ɵɵtemplate(78,X,0,0,"ng-template",null,26,v.ɵɵtemplateRefExtractor),v.ɵɵtext(80," "),v.ɵɵtemplate(81,ee,0,0,"ng-template",null,27,v.ɵɵtemplateRefExtractor),v.ɵɵtext(83," "),v.ɵɵtemplate(84,te,0,0,"ng-template",null,28,v.ɵɵtemplateRefExtractor),v.ɵɵtext(86," "),v.ɵɵtemplate(87,ne,0,0,"ng-template",null,29,v.ɵɵtemplateRefExtractor),v.ɵɵtext(89," ")),2&e){var n=v.ɵɵreference(18);v.ɵɵadvance(15),v.ɵɵtextInterpolate1(" ",v.ɵɵpipeBind1(16,16,"myVault")," "),v.ɵɵadvance(2),v.ɵɵproperty("appApiAction",t.ciphersComponent.actionPromise),v.ɵɵadvance(3),v.ɵɵproperty("ngIf",n.loading),v.ɵɵadvance(6),v.ɵɵproperty("ciphersComponent",t.ciphersComponent)("modal",t.modal)("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(" ",v.ɵɵpipeBind1(53,18,"organizations")," "),v.ɵɵadvance(2),v.ɵɵpropertyInterpolate("appA11yTitle",v.ɵɵpipeBind1(55,20,"learnMore")),v.ɵɵadvance(9),v.ɵɵproperty("vault",!0),v.ɵɵadvance(4),v.ɵɵproperty("ngIf",t.showProviders)}},directives:[P.GroupingsComponent,k.ApiActionDirective,O.NgIf,A.BulkActionsComponent,_.CiphersComponent,M.A11yTitleDirective,T.OrganizationsComponent,D.CalloutComponent,R.VerifyEmailComponent,g.RouterLinkWithHref,B.ProvidersComponent],pipes:[U.I18nPipe],encapsulation:2}),e}();t.VaultComponent=ie,("undefined"==typeof ngDevMode||ngDevMode)&&v.ɵsetClassMetadata(ie,[{type:o.Component,args:[{selector:"app-vault",templateUrl:"vault.component.html"}]}],(function(){return[{type:y.SyncService},{type:g.ActivatedRoute},{type:g.Router},{type:v.ChangeDetectorRef},{type:x.I18nService},{type:v.ComponentFactoryResolver},{type:b.TokenService},{type:S.CryptoService},{type:w.MessagingService},{type:C.UserService},{type:I.PlatformUtilsService},{type:E.BroadcasterService},{type:v.NgZone}]}),{groupingsComponent:[{type:o.ViewChild,args:[f.GroupingsComponent,{static:!0}]}],ciphersComponent:[{type:o.ViewChild,args:[u.CiphersComponent,{static:!0}]}],organizationsComponent:[{type:o.ViewChild,args:[s.OrganizationsComponent,{static:!0}]}],attachmentsModalRef:[{type:o.ViewChild,args:["attachments",{read:o.ViewContainerRef,static:!0}]}],folderAddEditModalRef:[{type:o.ViewChild,args:["folderAddEdit",{read:o.ViewContainerRef,static:!0}]}],cipherAddEditModalRef:[{type:o.ViewChild,args:["cipherAddEdit",{read:o.ViewContainerRef,static:!0}]}],shareModalRef:[{type:o.ViewChild,args:["share",{read:o.ViewContainerRef,static:!0}]}],collectionsModalRef:[{type:o.ViewChild,args:["collections",{read:o.ViewContainerRef,static:!0}]}],updateKeyModalRef:[{type:o.ViewChild,args:["updateKeyTemplate",{read:o.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1?"&":"?",e+="end="+n),null!=r&&(e+=e.indexOf("?")>-1?"&":"?",e+="continuationToken="+r),e},e.prototype.isJsonResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("application/json")>-1},e.prototype.isTextResponse=function(e){var t=e.headers.get("content-type");return null!=t&&t.indexOf("text")>-1},e}();t.ApiService=ie},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationResponse=void 0;var o=n(20),a=n(629),s=function(e){function t(t){var n=e.call(this,t)||this;n.id=n.getResponseProperty("Id"),n.identifier=n.getResponseProperty("Identifier"),n.name=n.getResponseProperty("Name"),n.businessName=n.getResponseProperty("BusinessName"),n.businessAddress1=n.getResponseProperty("BusinessAddress1"),n.businessAddress2=n.getResponseProperty("BusinessAddress2"),n.businessAddress3=n.getResponseProperty("BusinessAddress3"),n.businessCountry=n.getResponseProperty("BusinessCountry"),n.businessTaxNumber=n.getResponseProperty("BusinessTaxNumber"),n.billingEmail=n.getResponseProperty("BillingEmail");var r=n.getResponseProperty("Plan");return n.plan=null==r?null:new a.PlanResponse(r),n.planType=n.getResponseProperty("PlanType"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n.useResetPassword=n.getResponseProperty("UseResetPassword"),n.hasPublicAndPrivateKeys=n.getResponseProperty("HasPublicAndPrivateKeys"),n}return i(t,e),t}(o.BaseResponse);t.OrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PlanResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.type=n.getResponseProperty("Type"),n.product=n.getResponseProperty("Product"),n.name=n.getResponseProperty("Name"),n.isAnnual=n.getResponseProperty("IsAnnual"),n.nameLocalizationKey=n.getResponseProperty("NameLocalizationKey"),n.descriptionLocalizationKey=n.getResponseProperty("DescriptionLocalizationKey"),n.canBeUsedByBusiness=n.getResponseProperty("CanBeUsedByBusiness"),n.baseSeats=n.getResponseProperty("BaseSeats"),n.baseStorageGb=n.getResponseProperty("BaseStorageGb"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxUsers=n.getResponseProperty("MaxUsers"),n.hasAdditionalSeatsOption=n.getResponseProperty("HasAdditionalSeatsOption"),n.maxAdditionalSeats=n.getResponseProperty("MaxAdditionalSeats"),n.hasAdditionalStorageOption=n.getResponseProperty("HasAdditionalStorageOption"),n.maxAdditionalStorage=n.getResponseProperty("MaxAdditionalStorage"),n.hasPremiumAccessOption=n.getResponseProperty("HasPremiumAccessOption"),n.trialPeriodDays=n.getResponseProperty("TrialPeriodDays"),n.hasSelfHost=n.getResponseProperty("HasSelfHost"),n.hasPolicies=n.getResponseProperty("HasPolicies"),n.hasGroups=n.getResponseProperty("HasGroups"),n.hasDirectory=n.getResponseProperty("HasDirectory"),n.hasEvents=n.getResponseProperty("HasEvents"),n.hasTotp=n.getResponseProperty("HasTotp"),n.has2fa=n.getResponseProperty("Has2fa"),n.hasApi=n.getResponseProperty("HasApi"),n.hasSso=n.getResponseProperty("HasSso"),n.hasResetPassword=n.getResponseProperty("HasResetPassword"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.upgradeSortOrder=n.getResponseProperty("UpgradeSortOrder"),n.displaySortOrder=n.getResponseProperty("SortOrder"),n.legacyYear=n.getResponseProperty("LegacyYear"),n.disabled=n.getResponseProperty("Disabled"),n.stripePlanId=n.getResponseProperty("StripePlanId"),n.stripeSeatPlanId=n.getResponseProperty("StripeSeatPlanId"),n.stripeStoragePlanId=n.getResponseProperty("StripeStoragePlanId"),n.stripePremiumAccessPlanId=n.getResponseProperty("StripePremiumAccessPlanId"),n.basePrice=n.getResponseProperty("BasePrice"),n.seatPrice=n.getResponseProperty("SeatPrice"),n.additionalStoragePricePerGb=n.getResponseProperty("AdditionalStoragePricePerGb"),n.premiumAccessOptionPrice=n.getResponseProperty("PremiumAccessOptionPrice"),n}return i(t,e),t}(n(20).BaseResponse);t.PlanResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BillingSubscriptionUpcomingInvoiceResponse=t.BillingSubscriptionItemResponse=t.BillingSubscriptionResponse=t.SubscriptionResponse=void 0;var o=n(20),a=function(e){function t(t){var n=e.call(this,t)||this;n.storageName=n.getResponseProperty("StorageName"),n.storageGb=n.getResponseProperty("StorageGb"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.license=n.getResponseProperty("License"),n.expiration=n.getResponseProperty("Expiration"),n.usingInAppPurchase=n.getResponseProperty("UsingInAppPurchase");var r=n.getResponseProperty("Subscription"),i=n.getResponseProperty("UpcomingInvoice");return n.subscription=null==r?null:new s(r),n.upcomingInvoice=null==i?null:new c(i),n}return i(t,e),t}(o.BaseResponse);t.SubscriptionResponse=a;var s=function(e){function t(t){var n=e.call(this,t)||this;n.items=[],n.trialEndDate=n.getResponseProperty("TrialStartDate"),n.trialEndDate=n.getResponseProperty("TrialEndDate"),n.periodStartDate=n.getResponseProperty("PeriodStartDate"),n.periodEndDate=n.getResponseProperty("PeriodEndDate"),n.cancelledDate=n.getResponseProperty("CancelledDate"),n.cancelAtEndDate=n.getResponseProperty("CancelAtEndDate"),n.status=n.getResponseProperty("Status"),n.cancelled=n.getResponseProperty("Cancelled");var r=n.getResponseProperty("Items");return null!=r&&(n.items=r.map((function(e){return new l(e)}))),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.amount=n.getResponseProperty("Amount"),n.quantity=n.getResponseProperty("Quantity"),n.interval=n.getResponseProperty("Interval"),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionItemResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;return n.date=n.getResponseProperty("Date"),n.amount=n.getResponseProperty("Amount"),n}return i(t,e),t}(o.BaseResponse);t.BillingSubscriptionUpcomingInvoiceResponse=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkPublicKeyResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.userId=n.getResponseProperty("UserId"),n.key=n.getResponseProperty("Key"),n}return i(t,e),t}(n(20).BaseResponse);t.OrganizationUserBulkPublicKeyResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChallengeResponse=t.KeyResponse=t.TwoFactorWebAuthnResponse=void 0;var o=n(23),a=n(20),s=function(e){function t(t){var n=e.call(this,t)||this;n.enabled=n.getResponseProperty("Enabled");var r=n.getResponseProperty("Keys");return n.keys=null==r?null:r.map((function(e){return new l(e)})),n}return i(t,e),t}(a.BaseResponse);t.TwoFactorWebAuthnResponse=s;var l=function(e){function t(t){var n=e.call(this,t)||this;return n.name=n.getResponseProperty("Name"),n.id=n.getResponseProperty("Id"),n.migrated=n.getResponseProperty("Migrated"),n}return i(t,e),t}(a.BaseResponse);t.KeyResponse=l;var c=function(e){function t(t){var n=e.call(this,t)||this;n.attestation=n.getResponseProperty("attestation"),n.authenticatorSelection=n.getResponseProperty("authenticatorSelection"),n.challenge=o.Utils.fromUrlB64ToArray(n.getResponseProperty("challenge")),n.excludeCredentials=n.getResponseProperty("excludeCredentials").map((function(e){return e.id=o.Utils.fromUrlB64ToArray(e.id).buffer,e})),n.extensions=n.getResponseProperty("extensions"),n.pubKeyCredParams=n.getResponseProperty("pubKeyCredParams"),n.rp=n.getResponseProperty("rp"),n.timeout=n.getResponseProperty("timeout");var r=n.getResponseProperty("user");return r.id=o.Utils.fromUrlB64ToArray(r.id),n.user=r,n}return i(t,e),t}(a.BaseResponse);t.ChallengeResponse=c},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=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,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=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,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5&&(e.passwordHistory=e.passwordHistory.slice(0,5)),a.label=5;case 5:return(p=new m.Cipher).id=e.id,p.folderId=e.folderId,p.favorite=e.favorite,p.organizationId=e.organizationId,p.type=e.type,p.collectionIds=e.collectionIds,p.revisionDate=e.revisionDate,p.reprompt=e.reprompt,null!=t||null==p.organizationId?[3,7]:[4,this.cryptoService.getOrgKey(p.organizationId)];case 6:if(null==(t=a.sent()))throw new Error("Cannot encrypt cipher for organization. No key.");a.label=7;case 7:return[4,Promise.all([this.encryptObjProperty(e,p,{name:null,notes:null},t),this.encryptCipherData(p,e,t),this.encryptFields(e.fields,t).then((function(e){p.fields=e})),this.encryptPasswordHistories(e.passwordHistory,t).then((function(e){p.passwordHistory=e})),this.encryptAttachments(e.attachments,t).then((function(e){p.attachments=e}))])];case 8:return a.sent(),[2,p]}}))}))},t.prototype.encryptAttachments=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i=this;return a(this,(function(s){switch(s.label){case 0:return null==e||0===e.length?[2,null]:(n=[],r=[],e.forEach((function(e){return o(i,void 0,void 0,(function(){var i,s,l=this;return a(this,(function(c){return(i=new u.Attachment).id=e.id,i.size=e.size,i.sizeName=e.sizeName,i.url=e.url,s=this.encryptObjProperty(e,i,{fileName:null},t).then((function(){return o(l,void 0,void 0,(function(){var n;return a(this,(function(o){switch(o.label){case 0:return null==e.key?[3,2]:(n=i,[4,this.cryptoService.encrypt(e.key.key,t)]);case 1:n.key=o.sent(),o.label=2;case 2:return r.push(i),[2]}}))}))})),n.push(s),[2]}))}))})),[4,Promise.all(n)]);case 1:return s.sent(),[2,r]}}))}))},t.prototype.encryptFields=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptField(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptField=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new f.Field).type=e.type,e.type===l.FieldType.Boolean&&"true"!==e.value&&(e.value="false"),[4,this.encryptObjProperty(e,n,{name:null,value:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.encryptPasswordHistories=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return e&&e.length?(n=this,r=[],[4,e.reduce((function(e,i){return e.then((function(){return n.encryptPasswordHistory(i,t)})).then((function(e){r.push(e)}))}),Promise.resolve())]):[2,null];case 1:return i.sent(),[2,r]}}))}))},t.prototype.encryptPasswordHistory=function(e,t){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return(n=new g.Password).lastUsedDate=e.lastUsedDate,[4,this.encryptObjProperty(e,n,{password:null},t)];case 1:return r.sent(),[2,n]}}))}))},t.prototype.get=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(B)];case 2:return n=i.sent(),[4,this.storageService.get(R+t)];case 3:return null!=(r=i.sent())&&r.hasOwnProperty(e)?[2,new m.Cipher(r[e],!1,n?n[e]:null)]:[2,null]}}))}))},t.prototype.getAll=function(){return o(this,void 0,void 0,(function(){var e,t,n,r,i;return a(this,(function(o){switch(o.label){case 0:return[4,this.userService.getUserId()];case 1:return e=o.sent(),[4,this.storageService.get(B)];case 2:return t=o.sent(),[4,this.storageService.get(R+e)];case 3:for(i in n=o.sent(),r=[],n)n.hasOwnProperty(i)&&r.push(new m.Cipher(n[i],!1,t?t[i]:null));return[2,r]}}))}))},t.prototype.getAllDecrypted=function(){var e;return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return null==this.decryptedCipherCache?[3,4]:[4,this.userService.getUserId()];case 1:return t=i.sent(),null==this.searchService||(null!==(e=this.searchService().indexedEntityId)&&void 0!==e?e:t)===t?[3,3]:[4,this.searchService().indexCiphers(t,this.decryptedCipherCache)];case 2:i.sent(),i.label=3;case 3:return[2,this.decryptedCipherCache];case 4:return n=[],[4,this.cryptoService.hasKey()];case 5:if(!i.sent())throw new Error("No key.");return r=[],[4,this.getAll()];case 6:return i.sent().forEach((function(e){r.push(e.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)];case 7:return i.sent(),n.sort(this.getLocaleSortingFunction()),this.decryptedCipherCache=n,[2,this.decryptedCipherCache]}}))}))},t.prototype.getAllDecryptedForGrouping=function(e,t){return void 0===t&&(t=!0),o(this,void 0,void 0,(function(){return a(this,(function(n){switch(n.label){case 0:return[4,this.getAllDecrypted()];case 1:return[2,n.sent().filter((function(n){return!n.isDeleted&&(!(!t||n.folderId!==e)||!t&&null!=n.collectionIds&&n.collectionIds.indexOf(e)>-1)}))]}}))}))},t.prototype.getAllDecryptedForUrl=function(e,t,n){return void 0===n&&(n=null),o(this,void 0,void 0,(function(){var r,i,o,l,p;return a(this,(function(a){switch(a.label){case 0:return null==e&&null==t?[2,Promise.resolve([])]:(r=D.Utils.getDomain(e),i=null==r?Promise.resolve([]):this.settingsService.getEquivalentDomains().then((function(e){var t=[];return e.forEach((function(e){e.length&&e.indexOf(r)>=0&&(t=t.concat(e))})),t.length||t.push(r),t})),[4,Promise.all([i,this.getAllDecrypted()])]);case 1:return o=a.sent(),l=o[0],p=o[1],null!=n?[3,3]:[4,this.storageService.get(M.ConstantsService.defaultUriMatch)];case 2:null==(n=a.sent())&&(n=c.UriMatchType.Domain),a.label=3;case 3:return[2,p.filter((function(i){if(null!=i.deletedDate)return!1;if(null!=t&&t.indexOf(i.type)>-1)return!0;if(null!=e&&i.type===s.CipherType.Login&&null!=i.login.uris)for(var o=0;o-1){if(!j.has(p.domain))return!0;var u=D.Utils.getHost(e);if(!j.get(p.domain).has(u))return!0}break;case c.UriMatchType.Host:var d=D.Utils.getHost(e);if(null!=d&&d===D.Utils.getHost(p.uri))return!0;break;case c.UriMatchType.Exact:if(e===p.uri)return!0;break;case c.UriMatchType.StartsWith:if(e.startsWith(p.uri))return!0;break;case c.UriMatchType.RegularExpression:try{if(new RegExp(p.uri,"i").test(e))return!0}catch(a){}break;case c.UriMatchType.Never:}}return!1}))]}}))}))},t.prototype.getAllFromApiForOrganization=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.apiService.getCiphersOrganization(e)];case 1:return null!=(t=i.sent())&&null!=t.data&&t.data.length?(n=[],r=[],t.data.forEach((function(e){var t=new p.CipherData(e),i=new m.Cipher(t);r.push(i.decrypt().then((function(e){return n.push(e)})))})),[4,Promise.all(r)]):[3,3];case 2:return i.sent(),n.sort(this.getLocaleSortingFunction()),[2,n];case 3:return[2,[]]}}))}))},t.prototype.getLastUsedForUrl=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.getCipherForUrl(e,!0,!1,t)]}))}))},t.prototype.getLastLaunchedForUrl=function(e,t){return void 0===t&&(t=!1),o(this,void 0,void 0,(function(){return a(this,(function(n){return[2,this.getCipherForUrl(e,!1,!0,t)]}))}))},t.prototype.getNextCipherForUrl=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){return[2,this.getCipherForUrl(e,!1,!1,!1)]}))}))},t.prototype.updateLastUsedIndexForUrl=function(e){this.sortedCiphersCache.updateLastUsedIndex(e)},t.prototype.updateLastUsedDate=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.storageService.get(B)];case 1:return(t=i.sent())||(t={}),t[e]?t[e].lastUsedDate=(new Date).getTime():t[e]={lastUsedDate:(new Date).getTime()},[4,this.storageService.save(B,t)];case 2:if(i.sent(),null==this.decryptedCipherCache)return[2];for(n=0;nr?-1:null!=r&&null==n?1:0},t.prototype.sortCiphersByLastUsedThenName=function(e,t){var n=this.sortCiphersByLastUsed(e,t);return 0!==n?n:this.getLocaleSortingFunction()(e,t)},t.prototype.getLocaleSortingFunction=function(){var e=this;return function(t,n){var r=t.name,i=n.name;if(null==r&&null!=i)return-1;if(null!=r&&null==i)return 1;if(null==r&&null==i)return 0;var o=e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i);return 0!==o||t.type!==s.CipherType.Login||n.type!==s.CipherType.Login?o:(null!=t.login.username&&(r+=t.login.username),null!=n.login.username&&(i+=n.login.username),e.i18nService.collator?e.i18nService.collator.compare(r,i):r.localeCompare(i))}},t.prototype.softDelete=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(R+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e]&&(n[e].deletedDate=(new Date).toISOString())},"string"==typeof e?r(e):e.forEach(r),[4,this.storageService.save(R+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.softDeleteWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteCipher(e)];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.softDeleteManyWithServer=function(e){return o(this,void 0,void 0,(function(){return a(this,(function(t){switch(t.label){case 0:return[4,this.apiService.putDeleteManyCiphers(new b.CipherBulkDeleteRequest(e))];case 1:return t.sent(),[4,this.softDelete(e)];case 2:return t.sent(),[2]}}))}))},t.prototype.restore=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return[4,this.userService.getUserId()];case 1:return t=i.sent(),[4,this.storageService.get(R+t)];case 2:return null==(n=i.sent())?[2]:(r=function(e){null!=n[e.id]&&(n[e.id].deletedDate=null,n[e.id].revisionDate=e.revisionDate)},"Array"===e.constructor.name?e.forEach(r):r(e),[4,this.storageService.save(R+t,n)]);case 3:return i.sent(),this.decryptedCipherCache=null,[2]}}))}))},t.prototype.restoreWithServer=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return[4,this.apiService.putRestoreCipher(e)];case 1:return t=n.sent(),[4,this.restore({id:e,revisionDate:t.revisionDate})];case 2:return n.sent(),[2]}}))}))},t.prototype.restoreManyWithServer=function(e){return o(this,void 0,void 0,(function(){var t,n,r,i,o;return a(this,(function(a){switch(a.label){case 0:return[4,this.apiService.putRestoreManyCiphers(new w.CipherBulkRestoreRequest(e))];case 1:for(t=a.sent(),n=[],r=0,i=t.data;r0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0;s--)(i=e[s])&&(a=(o<3?i(a):o>3?i(t,n,a):i(t,n))||a);return o>3&&a&&Object.defineProperty(t,n,a),a},i=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,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0?[2,this.orgKeys]:[4,this.storageService.get(t.Keys.encOrgKeys)];case 1:if(null==(e=a.sent()))return[2,null];for(o in n=new Map,r=!1,i=[],e)i.push(o);s=0,a.label=2;case 2:return s0?[2,this.providerKeys]:[4,this.storageService.get(t.Keys.encProviderKeys)];case 1:if(null==(e=a.sent()))return[2,null];for(o in n=new Map,r=!1,i=[],e)i.push(o);s=0,a.label=2;case 2:return s53)throw new Error("We cannot generate numbers larger than 53 bits.");return o=Math.ceil(i/8),s=Math.pow(2,i)-1,c=Uint8Array.bind,[4,this.cryptoFunctionService.randomBytes(o)];case 1:for(l=new(c.apply(Uint8Array,[void 0,a.sent()])),p=8*(o-1),u=0;u=r?[2,this.randomNumber(e,t)]:[2,e+n]}}))}))},e.prototype.validateKey=function(e){return o(this,void 0,void 0,(function(){var n,r,i;return a(this,(function(o){switch(o.label){case 0:return o.trys.push([0,5,,6]),[4,this.storageService.get(t.Keys.encPrivateKey)];case 1:return n=o.sent(),[4,this.getEncKey(e)];case 2:return r=o.sent(),null==n||null==r?[2,!1]:[4,this.decryptToBytes(new m.EncString(n),r)];case 3:return i=o.sent(),[4,this.cryptoFunctionService.rsaExtractPublicKey(i)];case 4:return o.sent(),[3,6];case 5:return o.sent(),[2,!1];case 6:return[2,!0]}}))}))},e.prototype.storeKey=function(e){return o(this,void 0,void 0,(function(){var n;return a(this,(function(r){switch(r.label){case 0:return[4,this.shouldStoreKey("auto")];case 1:return(n=r.sent())?[3,3]:[4,this.shouldStoreKey("biometric")];case 2:n=r.sent(),r.label=3;case 3:return n?this.secureStorageService.save(t.Keys.key,e.keyB64):this.secureStorageService.remove(t.Keys.key),[2]}}))}))},e.prototype.shouldStoreKey=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=!1,"auto"!==e?[3,2]:[4,this.storageService.get(h.ConstantsService.vaultTimeoutKey)];case 1:return n=i.sent(),t=null==n,[3,4];case 2:return"biometric"!==e?[3,4]:[4,this.storageService.get(h.ConstantsService.biometricUnlockKey)];case 3:r=i.sent(),t=r&&this.platformUtilService.supportsSecureStorage(),i.label=4;case 4:return[2,t]}}))}))},e.prototype.retrieveKeyFromStorage=function(e){return this.secureStorageService.get(t.Keys.key,{keySuffix:e})},e.prototype.aesEncrypt=function(e,t){return o(this,void 0,void 0,(function(){var n,r,i,o,s,l;return a(this,(function(a){switch(a.label){case 0:return n=new d.EncryptedObject,r=n,[4,this.getKeyForEncryption(t)];case 1:return r.key=a.sent(),i=n,[4,this.cryptoFunctionService.randomBytes(16)];case 2:return i.iv=a.sent(),o=n,[4,this.cryptoFunctionService.aesEncrypt(e,n.iv,n.key.encKey)];case 3:return o.data=a.sent(),null==n.key.macKey?[3,5]:((s=new Uint8Array(n.iv.byteLength+n.data.byteLength)).set(new Uint8Array(n.iv),0),s.set(new Uint8Array(n.data),n.iv.byteLength),l=n,[4,this.cryptoFunctionService.hmac(s.buffer,n.key.macKey,"sha256")]);case 4:l.mac=a.sent(),a.label=5;case 5:return[2,n]}}))}))},e.prototype.aesDecryptToUtf8=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?(this.logService.error("mac required."),[2,null]):s.encType!==e?(this.logService.error("encType unavailable."),[2,null]):null==(l=this.cryptoFunctionService.aesDecryptFastParameters(t,n,r,s)).macKey||null==l.mac?[3,4]:[4,this.cryptoFunctionService.hmacFast(l.macData,l.macKey,"sha256")];case 2:return c=a.sent(),[4,this.cryptoFunctionService.compareFast(l.mac,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[2,this.cryptoFunctionService.aesDecryptFast(l)]}}))}))},e.prototype.aesDecryptToBytes=function(e,t,n,r,i){return o(this,void 0,void 0,(function(){var o,s,l,c;return a(this,(function(a){switch(a.label){case 0:return[4,this.getKeyForEncryption(i)];case 1:return o=a.sent(),null!=(s=this.resolveLegacyKey(e,o)).macKey&&null==r?[2,null]:s.encType!==e?[2,null]:null==s.macKey||null==r?[3,4]:((l=new Uint8Array(n.byteLength+t.byteLength)).set(new Uint8Array(n),0),l.set(new Uint8Array(t),n.byteLength),[4,this.cryptoFunctionService.hmac(l.buffer,s.macKey,"sha256")]);case 2:return null===(c=a.sent())?[2,null]:[4,this.cryptoFunctionService.compare(r,c)];case 3:if(!a.sent())return this.logService.error("mac failed."),[2,null];a.label=4;case 4:return[4,this.cryptoFunctionService.aesDecrypt(t,n,s.encKey)];case 5:return[2,a.sent()]}}))}))},e.prototype.getKeyForEncryption=function(e){return o(this,void 0,void 0,(function(){var t;return a(this,(function(n){switch(n.label){case 0:return null!=e?[2,e]:[4,this.getEncKey()];case 1:return null!=(t=n.sent())?[2,t]:[4,this.getKey()];case 2:return[2,n.sent()]}}))}))},e.prototype.resolveLegacyKey=function(e,t){return e===l.EncryptionType.AesCbc128_HmacSha256_B64&&t.encType===l.EncryptionType.AesCbc256_B64?(null==this.legacyEtmKey&&(this.legacyEtmKey=new f.SymmetricCryptoKey(t.key,l.EncryptionType.AesCbc128_HmacSha256_B64)),this.legacyEtmKey):t},e.prototype.stretchKey=function(e){return o(this,void 0,void 0,(function(){var t,n,r;return a(this,(function(i){switch(i.label){case 0:return t=new Uint8Array(64),[4,this.cryptoFunctionService.hkdfExpand(e.key,"enc",32,"sha256")];case 1:return n=i.sent(),[4,this.cryptoFunctionService.hkdfExpand(e.key,"mac",32,"sha256")];case 2:return r=i.sent(),t.set(new Uint8Array(n)),t.set(new Uint8Array(r),32),[2,new f.SymmetricCryptoKey(t.buffer)]}}))}))},e.prototype.hashPhrase=function(e,t){return void 0===t&&(t=64),o(this,void 0,void 0,(function(){var n,r,i,o,l,c,p;return a(this,(function(a){if(n=Math.log(g.EEFLongWordList.length)/Math.log(2),r=Math.ceil(t/n),i=Array.from(new Uint8Array(e)),o=4*i.length,r*n>o)throw new Error("Output entropy of hash function is too small");for(l=[],c=s.fromArray(i,256);r--;)p=c.mod(g.EEFLongWordList.length),c=c.divide(g.EEFLongWordList.length),l.push(g.EEFLongWordList[p]);return[2,l]}))}))},e.prototype.buildEncKey=function(e,t){return o(this,void 0,void 0,(function(){var n,r;return a(this,(function(i){switch(i.label){case 0:return n=null,32!==e.key.byteLength?[3,3]:[4,this.stretchKey(e)];case 1:return r=i.sent(),[4,this.encrypt(t,r)];case 2:return n=i.sent(),[3,6];case 3:return 64!==e.key.byteLength?[3,5]:[4,this.encrypt(t,e)];case 4:return n=i.sent(),[3,6];case 5:throw new Error("Invalid key size.");case 6:return[2,[new f.SymmetricCryptoKey(t),n]]}}))}))},r([v.sequentialize((function(){return"getEncKey"})),i("design:type",Function),i("design:paramtypes",[f.SymmetricCryptoKey]),i("design:returntype",Promise)],e.prototype,"getEncKey",null),r([v.sequentialize((function(){return"getOrgKeys"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],e.prototype,"getOrgKeys",null),r([v.sequentialize((function(){return"getProviderKeys"})),i("design:type",Function),i("design:paramtypes",[]),i("design:returntype",Promise)],e.prototype,"getProviderKeys",null),e}();t.CryptoService=x},function(e,t,n){"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"]},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.cipherService.upsert(o)}return[2]}}))}))},e.prototype.deleteWithServer=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.apiService.deleteFolder(e)];case 1:return t.sent(),[4,this.delete(e)];case 2:return t.sent(),[2]}}))}))},e}();t.FolderService=m},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0)for(d=0;d0)for(d=0;d0)for(d=0;d0)for(d=0;d1)&&(t.wordSeparator=" "),null==t.capitalize&&(t.capitalize=!1),null==t.includeNumber&&(t.includeNumber=!1),n=c.EEFLongWordList.length-1,r=new Array(t.numWords),o=0,i.label=1;case 1:return oe.length&&(e.minSpecial=e.length-e.minNumber),e.numWordsn.minLength&&(n.minLength=e.data.minLength),e.data.useUpper&&(n.useUppercase=!0),e.data.useLower&&(n.useLowercase=!0),e.data.useNumbers&&(n.useNumbers=!0),null!=e.data.minNumbers&&e.data.minNumbers>n.numberCount&&(n.numberCount=e.data.minNumbers),e.data.useSpecial&&(n.useSpecial=!0),null!=e.data.minSpecial&&e.data.minSpecial>n.specialCount&&(n.specialCount=e.data.minSpecial),null!=e.data.minNumberWords&&e.data.minNumberWords>n.minNumberWords&&(n.minNumberWords=e.data.minNumberWords),e.data.capitalize&&(n.capitalize=!0),e.data.includeNumber&&(n.includeNumber=!0))})),[2,n])}}))}))},e.prototype.saveOptions=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.storageService.save(d,e)];case 1:return t.sent(),this.optionsCache=e,[2]}}))}))},e.prototype.getHistory=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return n.sent()?this.history?[3,4]:[4,this.storageService.get(m)]:[2,new Array];case 2:return e=n.sent(),t=this,[4,this.decryptHistory(e)];case 3:t.history=n.sent(),n.label=4;case 4:return[2,this.history||new Array]}}))}))},e.prototype.addHistory=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return[4,this.cryptoService.hasKey()];case 1:return r.sent()?[4,this.getHistory()]:[2];case 2:return t=r.sent(),this.matchesPrevious(e,t)?[2]:(t.unshift(new s.GeneratedPasswordHistory(e,Date.now())),t.length>100&&t.pop(),[4,this.encryptHistory(t)]);case 3:return n=r.sent(),[4,this.storageService.save(m,n)];case 4:return[2,r.sent()]}}))}))},e.prototype.clear=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.history=[],[4,this.storageService.remove(m)];case 1:return[2,e.sent()]}}))}))},e.prototype.passwordStrength=function(e,t){if(void 0===t&&(t=null),null==e||0===e.length)return null;var n=["bitwarden","bit","warden"];null!=t&&t.length>0&&(n=n.concat(t));var r=Array.from(new Set(n));return o(e,r)},e.prototype.normalizeOptions=function(e,t){e.minLowercase=0,e.minUppercase=0,!e.length||e.length<5?e.length=5:e.length>128&&(e.length=128),e.lengthe.length?e.minNumber=e.length:e.minNumber>9&&(e.minNumber=9):e.minNumber=0,e.minNumbere.length?e.minSpecial=e.length:e.minSpecial>9&&(e.minSpecial=9):e.minSpecial=0,e.minSpeciale.length&&(e.minSpecial=e.length-e.minNumber),null==e.numWords||e.length<3?e.numWords=3:e.numWords>20&&(e.numWords=20),e.numWords1&&(e.wordSeparator=e.wordSeparator[0]),this.sanitizePasswordLength(e,!1)},e.prototype.capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e.prototype.appendRandomNumberToRandomWord=function(e){return r(this,void 0,void 0,(function(){var t,n;return i(this,(function(r){switch(r.label){case 0:return null==e||e.length<=0?[2]:[4,this.cryptoService.randomNumber(0,e.length-1)];case 1:return t=r.sent(),[4,this.cryptoService.randomNumber(0,9)];case 2:return n=r.sent(),e[t]=e[t]+n,[2]}}))}))},e.prototype.encryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.encrypt(e.password)];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t.encryptedString,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.decryptHistory=function(e){return r(this,void 0,void 0,(function(){var t,n=this;return i(this,(function(o){switch(o.label){case 0:return null==e||0===e.length?[2,Promise.resolve([])]:(t=e.map((function(e){return r(n,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.cryptoService.decryptToUtf8(new a.EncString(e.password))];case 1:return t=n.sent(),[2,new s.GeneratedPasswordHistory(t,e.date)]}}))}))})),[4,Promise.all(t)]);case 1:return[2,o.sent()]}}))}))},e.prototype.matchesPrevious=function(e,t){return null!=t&&0!==t.length&&t[t.length-1].password===e},e.prototype.shuffleArray=function(e){return r(this,void 0,void 0,(function(){var t,n,r;return i(this,(function(i){switch(i.label){case 0:t=e.length-1,i.label=1;case 1:return t>0?[4,this.cryptoService.randomNumber(0,t)]:[3,4];case 2:n=i.sent(),r=[e[n],e[t]],e[t]=r[0],e[n]=r[1],i.label=3;case 3:return t--,[3,1];case 4:return[2]}}))}))},e.prototype.sanitizePasswordLength=function(e,t){var n=0,r=0,i=e.minNumber,o=e.minSpecial;e.uppercase&&e.minUppercase<=0?n=1:e.uppercase||(n=0),e.lowercase&&e.minLowercase<=0?r=1:e.lowercase||(r=0),e.number&&e.minNumber<=0?i=1:e.number||(i=0),e.special&&e.minSpecial<=0?o=1:e.special||(o=0),(!e.length||e.length<1)&&(e.length=10);var a=n+r+i+o;e.length0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e.revisionDate&&(n=!1),a=!1,n&&(t?(n=null!=r,a=!0):null==e.collectionIds||null==e.organizationId?n=null==r:(n=!1,a=!0)),!n&&a&&null!=e.organizationId&&null!=e.collectionIds&&e.collectionIds.length>0?[4,this.collectionService.getAll()]:[3,5];case 4:if(null!=(s=i.sent()))for(l=0;l-1){n=!0;break}i.label=5;case 5:return n?[4,this.apiService.getCipher(e.id)]:[3,9];case 6:return null==(c=i.sent())?[3,9]:[4,this.userService.getUserId()];case 7:return p=i.sent(),[4,this.cipherService.upsert(new o.CipherData(c,p))];case 8:return i.sent(),this.messagingService.send("syncedUpsertedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 9:return[3,13];case 10:return null!=(u=i.sent())&&404===u.statusCode&&t?[4,this.cipherService.delete(e.id)]:[3,12];case 11:return i.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 12:return[3,13];case 13:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncDeleteCipher=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:return t.sent()?[4,this.cipherService.delete(e.id)]:[3,3];case 2:return t.sent(),this.messagingService.send("syncedDeletedCipher",{cipherId:e.id}),[2,this.syncCompleted(!0)];case 3:return[2,this.syncCompleted(!1)]}}))}))},e.prototype.syncUpsertSend=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o;return i(this,(function(i){switch(i.label){case 0:return this.syncStarted(),[4,this.userService.isAuthenticated()];case 1:if(!i.sent())return[3,9];i.label=2;case 2:return i.trys.push([2,8,,9]),[4,this.sendService.get(e.id)];case 3:return n=i.sent(),!t&&null==n||t&&null!=n&&n.revisionDate0&&e.push(t.domains)})),[2,this.settingsService.setEquivalentDomains(e)]}))}))},e.prototype.syncPolicies=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return t={},null!=e&&e.forEach((function(e){t[e.id]=new c.PolicyData(e)})),[4,this.policyService.replace(t)];case 1:return[2,n.sent()]}}))}))},e}();t.SyncService=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendData=void 0;var r=n(156),i=n(1126),o=n(1127),a=function(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 r.SendType.Text:this.text=new o.SendTextData(e.text);break;case r.SendType.File:this.file=new i.SendFileData(e.file)}};t.SendData=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]10?r=10:u>0&&(r=u)}catch(I){}if(p.has("period")&&null!=p.get("period"))try{(d=parseInt(p.get("period").trim(),null))>0&&(t=d)}catch(E){}p.has("secret")&&null!=p.get("secret")&&(o=p.get("secret")),p.has("algorithm")&&null!=p.get("algorithm")&&("sha1"!==(m=p.get("algorithm").toLowerCase())&&"sha256"!==m&&"sha512"!==m||(n=m))}else c&&(o=e.substr("steam://".length),r=5);return f=Math.round((new Date).getTime()/1e3),h=this.leftPad(this.decToHex(Math.floor(f/t)),16,"0"),v=a.Utils.fromHexToArray(h),(y=this.b32ToBytes(o)).length&&v.length?[4,this.sign(y,v,n)]:[2,null];case 1:if(0===(g=i.sent()).length)return[2,null];if(x=15&g[g.length-1],b=(127&g[x])<<24|(255&g[x+1])<<16|(255&g[x+2])<<8|255&g[x+3],S="",c)for(w=2147483647&b,C=0;C=e.length&&(e=Array(t+1-e.length).join(n)+e),e},e.prototype.decToHex=function(e){return(e<15.5?"0":"")+Math.round(e).toString(16)},e.prototype.b32ToHex=function(e){e=e.toUpperCase();for(var t="",n=0;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=n?[4,this.storageService.get(o.ConstantsService.vaultTimeoutActionKey)]:[3,12]);case 7:return"logOut"!==r.sent()?[3,9]:[4,this.logOut()];case 8:return r.sent(),[3,11];case 9:return[4,this.lock(!0)];case 10:r.sent(),r.label=11;case 11:r.label=12;case 12:return[2]}}))}))},e.prototype.lock=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.userService.isAuthenticated()];case 1:return e.sent()?(this.biometricLocked=!0,this.everBeenUnlocked=!0,[4,this.cryptoService.clearKey(!1)]):[2];case 2:return e.sent(),[4,this.cryptoService.clearOrgKeys(!0)];case 3:return e.sent(),[4,this.cryptoService.clearKeyPair(!0)];case 4:return e.sent(),[4,this.cryptoService.clearEncKey(!0)];case 5:return e.sent(),this.folderService.clearCache(),this.cipherService.clearCache(),this.collectionService.clearCache(),this.searchService.clearIndex(),this.messagingService.send("locked"),null==this.lockedCallback?[3,7]:[4,this.lockedCallback()];case 6:e.sent(),e.label=7;case 7:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null==this.loggedOutCallback?[3,2]:[4,this.loggedOutCallback()];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.setVaultTimeoutOptions=function(e,t){return r(this,void 0,void 0,(function(){return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.save(o.ConstantsService.vaultTimeoutKey,e)];case 1:return n.sent(),[4,this.storageService.save(o.ConstantsService.vaultTimeoutActionKey,t)];case 2:return n.sent(),[4,this.cryptoService.toggleKey()];case 3:return n.sent(),[4,this.tokenService.toggleTokens()];case 4:return n.sent(),[2]}}))}))},e.prototype.isPinLockSet=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return[4,this.storageService.get(o.ConstantsService.protectedPin)];case 1:return e=n.sent(),[4,this.storageService.get(o.ConstantsService.pinProtectedKey)];case 2:return t=n.sent(),[2,[null!=e,null!=t]]}}))}))},e.prototype.isBiometricLockSet=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.storageService.get(o.ConstantsService.biometricUnlockKey)];case 1:return[2,e.sent()]}}))}))},e.prototype.clear=function(){return this.everBeenUnlocked=!1,this.pinProtectedKey=null,this.storageService.remove(o.ConstantsService.protectedPin)},e}();t.VaultTimeoutService=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleLogService=void 0;var r=n(656),i=n(1132),o=function(){function e(e,t){void 0===t&&(t=null),this.isDev=e,this.filter=t,this.timersMap=new Map}return e.prototype.debug=function(e){this.isDev&&this.write(r.LogLevelType.Debug,e)},e.prototype.info=function(e){this.write(r.LogLevelType.Info,e)},e.prototype.warning=function(e){this.write(r.LogLevelType.Warning,e)},e.prototype.error=function(e){this.write(r.LogLevelType.Error,e)},e.prototype.write=function(e,t){if(null==this.filter||!this.filter(e))switch(e){case r.LogLevelType.Debug:case r.LogLevelType.Info:console.log(t);break;case r.LogLevelType.Warning:console.warn(t);break;case r.LogLevelType.Error:console.error(t)}},e.prototype.time=function(e){void 0===e&&(e="default"),this.timersMap.has(e)||this.timersMap.set(e,i())},e.prototype.timeEnd=function(e){void 0===e&&(e="default");var t=i(this.timersMap.get(e));return this.timersMap.delete(e),this.write(r.LogLevelType.Info,e+": "+(1e3*t[0]+t[1]/1e7)+"ms"),t},e}();t.ConsoleLogService=o},function(e,t,n){"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={}))},,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CipherWithIds=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t),this.collectionIds=t.collectionIds},t}(n(1137).Cipher);t.CipherWithIds=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CollectionWithId=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t)},t}(n(1144).Collection);t.CollectionWithId=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FolderWithId=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.build=function(t){this.id=t.id,e.prototype.build.call(this,t)},t}(n(1146).Folder);t.FolderWithId=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordCsvImporter=t.IgnoredProperties=void 0;var o=n(28),a=n(27),s=n(35),l=n(118),c=n(1186);t.IgnoredProperties=["ainfo","autosubmit","notesplain","ps","scope","tags","title","uuid","notes"];var p=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.loginPropertyParsers=[t.setLoginUsername,t.setLoginPassword,t.setLoginUris],t.creditCardPropertyParsers=[t.setCreditCardNumber,t.setCreditCardVerification,t.setCreditCardCardholderName,t.setCreditCardExpiry],t.identityPropertyParsers=[t.setIdentityFirstName,t.setIdentityInitial,t.setIdentityLastName,t.setIdentityUserName,t.setIdentityEmail,t.setIdentityPhone,t.setIdentityCompany],t}return i(n,e),n.prototype.parse=function(e){var t=this,n=new o.ImportResult,r=this.parseCsv(e,!0,{quoteChar:'"',escapeChar:"\\"});return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(t.getProp(e,"title"))){var r=t.initLoginCipher();r.name=t.getValueOrDefault(t.getProp(e,"title"),"--"),t.setNotes(e,r),t.setCipherType(e,r);var i=null;for(var o in e)if(e.hasOwnProperty(o)&&!t.isNullOrWhitespace(e[o])){var a=new c.CipherImportContext(e,o,r);r.type===s.CipherType.Login&&t.setKnownLoginValue(a)||r.type===s.CipherType.Card&&t.setKnownCreditCardValue(a)||r.type===s.CipherType.Identity&&t.setKnownIdentityValue(a)||(i=t.setUnknownValue(a,i))}r.type===s.CipherType.Login&&!t.isNullOrWhitespace(i)&&t.isNullOrWhitespace(r.login.username)&&-1===i.indexOf("://")&&(r.login.username=i),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},n.prototype.getProp=function(e,t){return Object.entries(e).reduce((function(e,t){return e[t[0].toLowerCase()]=t[1],e}),{})[t.toLowerCase()]},n.prototype.getPropByRegexp=function(e,t){var n=Object.keys(e).reduce((function(e,n){return n.match(t)&&e.push(n),e}),[]);return 0===n.length?null:e[n[0]]},n.prototype.getPropIncluding=function(e,t){var n=Object.keys(e).reduce((function(e,n){return n.toLowerCase().includes(t.toLowerCase())&&e.push(n),e}),[]);return 0===n.length?null:e[n[0]]},n.prototype.setNotes=function(e,t){t.notes=this.getValueOrDefault(this.getProp(e,"notesPlain"),"")+"\n"+this.getValueOrDefault(this.getProp(e,"notes"),"")+"\n",t.notes.trim()},n.prototype.setKnownLoginValue=function(e){var t=this;return this.loginPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setKnownCreditCardValue=function(e){var t=this;return this.creditCardPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setKnownIdentityValue=function(e){var t=this;return this.identityPropertyParsers.reduce((function(n,r){return n||(n=r.bind(t)(e)),n}),!1)},n.prototype.setUnknownValue=function(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){var r=new Date(1e3*parseInt(e.importRecord[e.property],10)).toUTCString();return this.processKvp(e.cipher,"1Password "+e.property,r),null}e.lowerProperty.includes("password")||e.lowerProperty.includes("key")||e.lowerProperty.includes("secret")?this.processKvp(e.cipher,e.property,e.importRecord[e.property],l.FieldType.Hidden):this.processKvp(e.cipher,e.property,e.importRecord[e.property])}return null},n.prototype.setIdentityFirstName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.firstName)||!e.lowerProperty.includes("first name"))&&(e.cipher.identity.firstName=e.importRecord[e.property],!0)},n.prototype.setIdentityInitial=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.middleName)||!e.lowerProperty.includes("initial"))&&(e.cipher.identity.middleName=e.importRecord[e.property],!0)},n.prototype.setIdentityLastName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.lastName)||!e.lowerProperty.includes("last name"))&&(e.cipher.identity.lastName=e.importRecord[e.property],!0)},n.prototype.setIdentityUserName=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.username)||!e.lowerProperty.includes("username"))&&(e.cipher.identity.username=e.importRecord[e.property],!0)},n.prototype.setIdentityCompany=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.company)||!e.lowerProperty.includes("company"))&&(e.cipher.identity.company=e.importRecord[e.property],!0)},n.prototype.setIdentityPhone=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.phone)||!e.lowerProperty.includes("default phone"))&&(e.cipher.identity.phone=e.importRecord[e.property],!0)},n.prototype.setIdentityEmail=function(e){return!(!this.isNullOrWhitespace(e.cipher.identity.email)||!e.lowerProperty.includes("email"))&&(e.cipher.identity.email=e.importRecord[e.property],!0)},n.prototype.setCreditCardNumber=function(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)},n.prototype.setCreditCardVerification=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.code)||!e.lowerProperty.includes("verification number"))&&(e.cipher.card.code=e.importRecord[e.property],!0)},n.prototype.setCreditCardCardholderName=function(e){return!(!this.isNullOrWhitespace(e.cipher.card.cardholderName)||!e.lowerProperty.includes("cardholder name"))&&(e.cipher.card.cardholderName=e.importRecord[e.property],!0)},n.prototype.setCreditCardExpiry=function(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)},n.prototype.setLoginPassword=function(e){return!(!this.isNullOrWhitespace(e.cipher.login.password)||"password"!==e.lowerProperty)&&(e.cipher.login.password=e.importRecord[e.property],!0)},n.prototype.setLoginUsername=function(e){return!(!this.isNullOrWhitespace(e.cipher.login.username)||"username"!==e.lowerProperty)&&(e.cipher.login.username=e.importRecord[e.property],!0)},n.prototype.setLoginUris=function(e){if((null==e.cipher.login.uris||0===e.cipher.login.uris.length)&&"urls"===e.lowerProperty){var 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)},n}(a.BaseImporter);t.OnePasswordCsvImporter=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.View=t.SecureNoteView=t.LoginView=t.LoginUriView=t.IdentityView=t.FieldView=t.CipherView=t.CardView=t.AttachmentView=void 0;var r=n(556);Object.defineProperty(t,"AttachmentView",{enumerable:!0,get:function(){return r.AttachmentView}});var i=n(80);Object.defineProperty(t,"CardView",{enumerable:!0,get:function(){return i.CardView}});var o=n(125);Object.defineProperty(t,"CipherView",{enumerable:!0,get:function(){return o.CipherView}});var a=n(194);Object.defineProperty(t,"FieldView",{enumerable:!0,get:function(){return a.FieldView}});var s=n(141);Object.defineProperty(t,"IdentityView",{enumerable:!0,get:function(){return s.IdentityView}});var l=n(230);Object.defineProperty(t,"LoginUriView",{enumerable:!0,get:function(){return l.LoginUriView}});var c=n(142);Object.defineProperty(t,"LoginView",{enumerable:!0,get:function(){return c.LoginView}});var p=n(88);Object.defineProperty(t,"SecureNoteView",{enumerable:!0,get:function(){return p.SecureNoteView}});var u=n(1187);Object.defineProperty(t,"View",{enumerable:!0,get:function(){return u.View}})},,,,,,,,,,function(e,t,n){"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={}))},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0);n(927),n(260),n(455),n(928);var i=n(929),o=n(66);r.enableProdMode(),o.platformBrowser().bootstrapModule(i.AppModule,{preserveWhitespaces:!0})},,function(e,t,n){"use strict";n.r(t)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppModule=void 0;var r=n(7),i=n(174),o=n(198),a=n(0),s=n(13),l=n(930),c=n(931),p=n(502),u=n(1074),d=n(501),m=n(1075),f=n(0),h=n(7),v=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=f.ɵɵdefineNgModule({type:e,bootstrap:[p.AppComponent]}),e.ɵinj=f.ɵɵdefineInjector({imports:[[d.OssModule,l.BrowserAnimationsModule,s.FormsModule,m.ServicesModule,r.ToasterModule.forRoot(),i.InfiniteScrollModule,o.DragDropModule,c.AppRoutingModule,u.OssRoutingModule]]}),e}();t.AppModule=v,("undefined"==typeof ngJitMode||ngJitMode)&&f.ɵɵsetNgModuleScope(v,{imports:[d.OssModule,l.BrowserAnimationsModule,s.FormsModule,m.ServicesModule,h.ToasterModule,i.InfiniteScrollModule,o.DragDropModule,c.AppRoutingModule,u.OssRoutingModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&f.ɵsetClassMetadata(v,[{type:a.NgModule,args:[{imports:[d.OssModule,l.BrowserAnimationsModule,s.FormsModule,m.ServicesModule,r.ToasterModule.forRoot(),i.InfiniteScrollModule,o.DragDropModule,c.AppRoutingModule,u.OssRoutingModule],bootstrap:[p.AppComponent]}]}],null,null)},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"}]}],(function(){return[{type:i.ComponentFactoryResolver},{type:o.MessagingService}]}),{onClose:[{type:r.Output}],onClosed:[{type:r.Output}],onShow:[{type:r.Output}],onShown:[{type:r.Output}],container:[{type:r.ViewChild,args:["container",{read:r.ViewContainerRef,static:!0}]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationCreateRequest=void 0;var r=function(){};t.OrganizationCreateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUpgradeRequest=void 0;var r=function(){};t.OrganizationUpgradeRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderOrganizationCreateRequest=void 0;var r=function(e,t){this.clientOwnerEmail=e,this.organizationCreateRequest=t};t.ProviderOrganizationCreateRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordHistoryResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.password=n.getResponseProperty("Password"),n.lastUsedDate=n.getResponseProperty("LastUsedDate"),n}return i(t,e),t}(n(20).BaseResponse);t.PasswordHistoryResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceResponse=void 0;var o=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.identifier=n.getResponseProperty("Identifier"),n.type=n.getResponseProperty("Type"),n.creationDate=n.getResponseProperty("CreationDate"),n}return i(t,e),t}(n(20).BaseResponse);t.DeviceResponse=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderOrganizationResponse=void 0;var o=n(20),a=n(165),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.usePolicies=n.getResponseProperty("UsePolicies"),n.useGroups=n.getResponseProperty("UseGroups"),n.useDirectory=n.getResponseProperty("UseDirectory"),n.useEvents=n.getResponseProperty("UseEvents"),n.useTotp=n.getResponseProperty("UseTotp"),n.use2fa=n.getResponseProperty("Use2fa"),n.useApi=n.getResponseProperty("UseApi"),n.useBusinessPortal=n.getResponseProperty("UseBusinessPortal"),n.useSso=n.getResponseProperty("UseSso"),n.useResetPassword=n.getResponseProperty("UseResetPassword"),n.selfHost=n.getResponseProperty("SelfHost"),n.usersGetPremium=n.getResponseProperty("UsersGetPremium"),n.seats=n.getResponseProperty("Seats"),n.maxCollections=n.getResponseProperty("MaxCollections"),n.maxStorageGb=n.getResponseProperty("MaxStorageGb"),n.key=n.getResponseProperty("Key"),n.hasPublicAndPrivateKeys=n.getResponseProperty("HasPublicAndPrivateKeys"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.ssoBound=n.getResponseProperty("SsoBound"),n.identifier=n.getResponseProperty("Identifier"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.resetPasswordEnrolled=n.getResponseProperty("ResetPasswordEnrolled"),n.userId=n.getResponseProperty("UserId"),n.providerId=n.getResponseProperty("ProviderId"),n.providerName=n.getResponseProperty("ProviderName"),n}return i(t,e),t}(o.BaseResponse);t.ProfileProviderOrganizationResponse=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ProfileProviderResponse=void 0;var o=n(20),a=n(165),s=function(e){function t(t){var n=e.call(this,t)||this;return n.id=n.getResponseProperty("Id"),n.name=n.getResponseProperty("Name"),n.key=n.getResponseProperty("Key"),n.status=n.getResponseProperty("Status"),n.type=n.getResponseProperty("Type"),n.enabled=n.getResponseProperty("Enabled"),n.permissions=new a.PermissionsApi(n.getResponseProperty("permissions")),n.userId=n.getResponseProperty("UserId"),n.useEvents=n.getResponseProperty("UseEvents"),n}return i(t,e),t}(o.BaseResponse);t.ProfileProviderResponse=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserAcceptRequest=void 0;var r=function(){};t.ProviderUserAcceptRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventView=void 0;var r=function(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};t.EventView=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AppIdService=void 0;var r=function(){};t.AppIdService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserConfirmRequest=void 0;var r=function(){};t.ProviderUserConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserBulkConfirmRequest=void 0;var r=function(e){this.keys=e};t.ProviderUserBulkConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserBulkConfirmRequest=void 0;var r=function(e){this.keys=e};t.OrganizationUserBulkConfirmRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserInviteRequest=void 0;var r=function(){this.emails=[]};t.ProviderUserInviteRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUserUpdateRequest=void 0;var r=function(){};t.ProviderUserUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderSetupRequest=void 0;var r=function(){};t.ProviderSetupRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderUpdateRequest=void 0;var r=function(){};t.ProviderUpdateRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BroadcasterService=void 0;var r=function(){function e(){this.subscribers=new Map}return e.prototype.send=function(e,t){null==t?this.subscribers.forEach((function(t){t(e)})):this.subscribers.has(t)&&this.subscribers.get(t)(e)},e.prototype.subscribe=function(e,t){this.subscribers.set(e,t)},e.prototype.unsubscribe=function(e){this.subscribers.has(e)&&this.subscribers.delete(e)},e}();t.BroadcasterService=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmergencyAccessAcceptRequest=void 0;var r=function(){};t.EmergencyAccessAcceptRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationUserAcceptRequest=void 0;var r=function(){};t.OrganizationUserAcceptRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=5)return this.messagingService.send("logout"),[2];this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidPin"))}return[3,35];case 16:return[4,this.cryptoService.makeKey(this.masterPassword,this.email,e,t)];case 17:return r=i.sent(),[4,this.cryptoService.getKeyHash()];case 18:return o=i.sent(),c=!1,null==o?[3,20]:[4,this.cryptoService.compareAndUpdateKeyHash(this.masterPassword,r)];case 19:return c=i.sent(),[3,27];case 20:return u=new l.PasswordVerificationRequest,[4,this.cryptoService.hashPassword(this.masterPassword,r,p.HashPurpose.ServerAuthorization)];case 21:d=i.sent(),u.masterPasswordHash=d,i.label=22;case 22:return i.trys.push([22,26,,27]),this.formPromise=this.apiService.postAccountVerifyPassword(u),[4,this.formPromise];case 23:return i.sent(),c=!0,[4,this.cryptoService.hashPassword(this.masterPassword,r,p.HashPurpose.LocalAuthorization)];case 24:return m=i.sent(),[4,this.cryptoService.setKeyHash(m)];case 25:return i.sent(),[3,27];case 26:return i.sent(),[3,27];case 27:return c?this.pinSet[0]?[4,this.storageService.get(a.ConstantsService.protectedPin)]:[3,33]:[3,34];case 28:return f=i.sent(),[4,this.cryptoService.getEncKey(r)];case 29:return h=i.sent(),[4,this.cryptoService.decryptToUtf8(new s.EncString(f),h)];case 30:return v=i.sent(),[4,this.cryptoService.makePinKey(v,this.email,e,t)];case 31:return y=i.sent(),g=this.vaultTimeoutService,[4,this.cryptoService.encrypt(r.key,y)];case 32:g.pinProtectedKey=i.sent(),i.label=33;case 33:return this.setKeyAndContinue(r),[3,35];case 34:this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("invalidMasterPassword")),i.label=35;case 35:return[2]}}))}))},e.prototype.logOut=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t("logOutConfirmation"),this.i18nService.t("logOut"),this.i18nService.t("logOut"),this.i18nService.t("cancel"))];case 1:return e.sent()&&this.messagingService.send("logout"),[2]}}))}))},e.prototype.unlockBiometric=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.biometricLock?[4,this.cryptoService.getKey("biometric")]:[2];case 1:return null!=e.sent()?[4,this.doContinue()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById(this.pinLock?"pin":"masterPassword").focus()},e.prototype.setKeyAndContinue=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,this.cryptoService.setKey(e)];case 1:return t.sent(),this.doContinue(),[2]}}))}))},e.prototype.doContinue=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.vaultTimeoutService.biometricLocked=!1,this.vaultTimeoutService.everBeenUnlocked=!0,[4,this.storageService.get(a.ConstantsService.disableFaviconKey)];case 1:return e=t.sent(),[4,this.stateService.save(a.ConstantsService.disableFaviconKey,!!e)];case 2:return t.sent(),this.messagingService.send("unlocked"),null!=this.onSuccessfulSubmit?this.onSuccessfulSubmit():null!=this.router&&this.router.navigate([this.successRoute]),[2]}}))}))},e.ɵfac=function(t){return new(t||e)(u.ɵɵdirectiveInject(d.Router),u.ɵɵdirectiveInject(m.I18nService),u.ɵɵdirectiveInject(f.PlatformUtilsService),u.ɵɵdirectiveInject(h.MessagingService),u.ɵɵdirectiveInject(v.UserService),u.ɵɵdirectiveInject(y.CryptoService),u.ɵɵdirectiveInject(g.StorageService),u.ɵɵdirectiveInject(x.VaultTimeoutService),u.ɵɵdirectiveInject(b.EnvironmentService),u.ɵɵdirectiveInject(S.StateService),u.ɵɵdirectiveInject(w.ApiService))},e.ɵdir=u.ɵɵdefineDirective({type:e}),e}();t.LockComponent=C,("undefined"==typeof ngDevMode||ngDevMode)&&u.ɵsetClassMetadata(C,[{type:o.Directive}],(function(){return[{type:d.Router},{type:m.I18nService},{type:f.PlatformUtilsService},{type:h.MessagingService},{type:v.UserService},{type:y.CryptoService},{type:g.StorageService},{type:x.VaultTimeoutService},{type:b.EnvironmentService},{type:S.StateService},{type:w.ApiService}]}),null)},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-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.ɵfac=function(e){return new(e||t)(d.ɵɵdirectiveInject(m.AuthService),d.ɵɵdirectiveInject(f.Router),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(v.CryptoService),d.ɵɵdirectiveInject(y.ApiService),d.ɵɵdirectiveInject(g.StateService),d.ɵɵdirectiveInject(x.PlatformUtilsService),d.ɵɵdirectiveInject(b.PasswordGenerationService),d.ɵɵdirectiveInject(S.EnvironmentService))},t.ɵdir=d.ɵɵdefineDirective({type:t,features:[d.ɵɵInheritDefinitionFeature]}),t}(u.CaptchaProtectedComponent);t.RegisterComponent=w,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(w,[{type:s.Directive}],(function(){return[{type:m.AuthService},{type:f.Router},{type:h.I18nService},{type:v.CryptoService},{type:y.ApiService},{type:g.StateService},{type:x.PlatformUtilsService},{type:b.PasswordGenerationService},{type:S.EnvironmentService}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterRequest=void 0;var r=function(e,t,n,r,i,o,a,s,l){this.email=e,this.name=t,this.masterPasswordHash=n,this.key=i,this.kdf=o,this.kdfIterations=a,this.referenceData=s,this.captchaResponse=l,this.masterPasswordHint=r||null};t.RegisterRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReferenceEventRequest=void 0;var r=function(){};t.ReferenceEventRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]1?[4,this.sendEmail(!1)]:[3,5];case 4:n.sent(),n.label=5;case 5:case 6:return[3,7];case 7:return[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:if(null==this.token||""===this.token)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("verificationCodeRequired")),[2];if(this.selectedProviderType===a.TwoFactorProviderType.WebAuthn){if(null==this.webAuthn)return[2];this.webAuthn.stop()}else this.selectedProviderType!==a.TwoFactorProviderType.Email&&this.selectedProviderType!==a.TwoFactorProviderType.Authenticator||(this.token=this.token.replace(" ","").trim());e.label=1;case 1:return e.trys.push([1,3,,4]),[4,this.doSubmit()];case 2:return e.sent(),[3,4];case 3:return e.sent(),this.selectedProviderType===a.TwoFactorProviderType.WebAuthn&&null!=this.webAuthn&&this.webAuthn.start(),[3,4];case 4:return[2]}}))}))},e.prototype.doSubmit=function(){return r(this,void 0,void 0,(function(){var e,t;return i(this,(function(n){switch(n.label){case 0:return this.formPromise=this.authService.logInTwoFactor(this.selectedProviderType,this.token,this.remember),[4,this.formPromise];case 1:return e=n.sent(),[4,this.storageService.get(c.ConstantsService.disableFaviconKey)];case 2:return t=n.sent(),[4,this.stateService.save(c.ConstantsService.disableFaviconKey,!!t)];case 3:return n.sent(),null!=this.onSuccessfulLogin&&this.onSuccessfulLogin(),e.resetMasterPassword&&(this.successRoute="set-password"),null!=this.onSuccessfulLoginNavigate?this.onSuccessfulLoginNavigate():this.router.navigate([this.successRoute],{queryParams:{identifier:this.identifier}}),[2]}}))}))},e.prototype.sendEmail=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:if(this.selectedProviderType!==a.TwoFactorProviderType.Email)return[2];if(null!=this.emailPromise)return[2];n.label=1;case 1:return n.trys.push([1,3,,4]),t=new s.TwoFactorEmailRequest(this.authService.email,this.authService.masterPasswordHash),this.emailPromise=this.apiService.postTwoFactorEmail(t),[4,this.emailPromise];case 2:return n.sent(),e&&this.platformUtilsService.showToast("success",null,this.i18nService.t("verificationCodeEmailSent",this.twoFactorEmail)),[3,4];case 3:return n.sent(),[3,4];case 4:return this.emailPromise=null,[2]}}))}))},e.prototype.authWebAuthn=function(){var e=this.authService.twoFactorProvidersData.get(this.selectedProviderType);this.webAuthnSupported&&null!=this.webAuthn&&this.webAuthn.init(e)},e.prototype.cleanupWebAuthn=function(){null!=this.webAuthn&&(this.webAuthn.stop(),this.webAuthn.cleanup())},Object.defineProperty(e.prototype,"authing",{get:function(){return this.authService.authingWithPassword()||this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsLock",{get:function(){return this.authService.authingWithSso()||this.authService.authingWithApiKey()},enumerable:!1,configurable:!0}),e.ɵfac=function(t){return new(t||e)(d.ɵɵdirectiveInject(m.AuthService),d.ɵɵdirectiveInject(f.Router),d.ɵɵdirectiveInject(h.I18nService),d.ɵɵdirectiveInject(v.ApiService),d.ɵɵdirectiveInject(y.PlatformUtilsService),d.ɵɵdirectiveInject(Window),d.ɵɵdirectiveInject(g.EnvironmentService),d.ɵɵdirectiveInject(x.StateService),d.ɵɵdirectiveInject(b.StorageService),d.ɵɵdirectiveInject(f.ActivatedRoute))},e.ɵdir=d.ɵɵdefineDirective({type:e}),e}();t.TwoFactorComponent=S,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(S,[{type:o.Directive}],(function(){return[{type:m.AuthService},{type:f.Router},{type:h.I18nService},{type:v.ApiService},{type:y.PlatformUtilsService},{type:Window},{type:g.EnvironmentService},{type:x.StateService},{type:b.StorageService},{type:f.ActivatedRoute}]}),null)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DeviceRequest=void 0;var r=function(e,t){this.type=t.getDevice(),this.name=t.getDeviceString(),this.identifier=e,this.pushToken=null};t.DeviceRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PreloginRequest=void 0;var r=function(e){this.email=e};t.PreloginRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRequest=void 0;var r=n(23),i=function(){function e(e,t,n,r,i,o,a,s){this.provider=r,this.token=i,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}return e.prototype.toIdentityToken=function(e){var 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},e.prototype.alterIdentityTokenHeaders=function(e){null==this.clientSecret&&null!=this.masterPasswordHash&&null!=this.email&&e.set("Auth-Email",r.Utils.fromUtf8ToUrlB64(this.email))},e}();t.TokenRequest=i},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnIFrame=void 0;var o=n(511),a=n(23),s=function(e){function t(t,n,r,i,o,a,s,l){var c=e.call(this,t,n,"webauthn-connector.html","webauthn_iframe",a,s,l)||this;return c.webAuthnNewTab=r,c.platformUtilsService=i,c.i18nService=o,c}return i(t,e),t.prototype.init=function(t){var n=this.createParams({data:JSON.stringify(t),btnText:this.i18nService.t("webAuthnAuthenticate")},2);this.webAuthnNewTab?(n.append("locale",this.i18nService.translationLocale),this.platformUtilsService.launchUri(this.webVaultUrl+"/webauthn-fallback-connector.html?"+n)):(e.prototype.initComponent.call(this,n),a.Utils.isNullOrWhitespace(this.iframe.allow)&&(this.iframe.allow="publickey-credentials-get "+new URL(this.webVaultUrl).origin))},t}(o.IFrameComponent);t.WebAuthnIFrame=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"+this.i18nService.t("encExportKeyWarningDesc")+""+this.i18nService.t("encExportAccountWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning",!0)]:[3,2];case 1:return[2,e.sent()];case 2:return[4,this.platformUtilsService.showDialog(this.i18nService.t("exportWarningDesc"),this.i18nService.t("confirmVaultExport"),this.i18nService.t("exportVault"),this.i18nService.t("cancel"),"warning")];case 3:return[2,e.sent()]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("masterPassword").focus()},e.prototype.saved=function(){this.onSaved.emit()},e.prototype.getExportData=function(){return this.exportService.getExport(this.format)},e.prototype.getFileName=function(e){var t=this.format;return"encrypted_json"===this.format&&(e=null==e?"encrypted":"encrypted_"+e,t="json"),this.exportService.getFileName(e,t)},e.prototype.collectEvent=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.eventService.collect(a.EventType.User_ClientExportedVault)];case 1:return e.sent(),[2]}}))}))},e.prototype.downloadFile=function(e){var t=this.getFileName();this.platformUtilsService.saveFile(this.win,e,{type:"text/plain"},t)},e.ɵfac=function(t){return new(t||e)(s.ɵɵdirectiveInject(l.CryptoService),s.ɵɵdirectiveInject(c.I18nService),s.ɵɵdirectiveInject(p.PlatformUtilsService),s.ɵɵdirectiveInject(u.ExportService),s.ɵɵdirectiveInject(d.EventService),s.ɵɵdirectiveInject(Window))},e.ɵdir=s.ɵɵdefineDirective({type:e,outputs:{onSaved:"onSaved"}}),e}();t.ExportComponent=m,("undefined"==typeof ngDevMode||ngDevMode)&&s.ɵsetClassMetadata(m,[{type:o.Directive}],(function(){return[{type:l.CryptoService},{type:c.I18nService},{type:p.PlatformUtilsService},{type:u.ExportService},{type:d.EventService},{type:Window}]}),{onSaved:[{type:o.Output}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AttachmentRequest=void 0;var r=function(){};t.AttachmentRequest=r},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&this.collections.length>0&&this.collections.forEach((function(e){o.collectionIds.indexOf(e.id)>-1&&(e.checked=!0)})),i.label=8;case 8:return r=this,[4,this.folderService.getAllDecrypted()];case 9:return r.folders=i.sent(),this.editMode&&this.previousCipherId!==this.cipherId&&this.eventService.collect(c.EventType.Cipher_ClientViewed,this.cipherId),this.previousCipherId=this.cipherId,this.reprompt=this.cipher.reprompt!==s.CipherRepromptType.None,[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return this.cipher.isDeleted?[2,this.restore()]:null==this.cipher.name||""===this.cipher.name?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("nameRequired")),[2,!1]):this.editMode&&!this.cloneMode||this.allowPersonal||null!=this.cipher.organizationId?(this.editMode&&!this.cloneMode||this.cipher.type!==l.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((function(e){return e.checked})).map((function(e){return e.id}))),this.cloneMode&&(this.cipher.id=null),[4,this.encryptCipher()]):(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("personalOwnershipSubmitError")),[2,!1]);case 1:e=t.sent(),t.label=2;case 2:return t.trys.push([2,4,,5]),this.formPromise=this.saveCipher(e),[4,this.formPromise];case 3:return t.sent(),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"),[2,!0];case 4:return t.sent(),[3,5];case 5:return[2,!1]}}))}))},e.prototype.addUri=function(){this.cipher.type===l.CipherType.Login&&(null==this.cipher.login.uris&&(this.cipher.login.uris=[]),this.cipher.login.uris.push(new x.LoginUriView))},e.prototype.removeUri=function(e){if(this.cipher.type===l.CipherType.Login&&null!=this.cipher.login.uris){var t=this.cipher.login.uris.indexOf(e);t>-1&&this.cipher.login.uris.splice(t,1)}},e.prototype.addField=function(){null==this.cipher.fields&&(this.cipher.fields=[]);var e=new y.FieldView;e.type=this.addFieldType,e.newField=!0,this.cipher.fields.push(e)},e.prototype.removeField=function(e){var t=this.cipher.fields.indexOf(e);t>-1&&this.cipher.fields.splice(t,1)},e.prototype.trackByFunction=function(e,t){return e},e.prototype.cancel=function(){this.onCancelled.emit(this.cipher)},e.prototype.attachments=function(){this.onEditAttachments.emit(this.cipher)},e.prototype.share=function(){this.onShareCipher.emit(this.cipher)},e.prototype.editCollections=function(){this.onEditCollections.emit(this.cipher)},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.platformUtilsService.showDialog(this.i18nService.t(this.cipher.isDeleted?"permanentlyDeleteItemConfirmation":"deleteItemConfirmation"),this.i18nService.t("deleteItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.deletePromise=this.deleteCipher(),[4,this.deletePromise];case 3:return e.sent(),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"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.restore=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return this.cipher.isDeleted?[4,this.platformUtilsService.showDialog(this.i18nService.t("restoreItemConfirmation"),this.i18nService.t("restoreItem"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")]:[2,!1];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,4,,5]),this.restorePromise=this.restoreCipher(),[4,this.restorePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("restoredItem")),this.onRestoredCipher.emit(this.cipher),this.messagingService.send("restoredCipher"),[3,5];case 4:return e.sent(),[3,5];case 5:return[2,!0]}}))}))},e.prototype.generatePassword=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.cipher.login&&null!=this.cipher.login.password&&this.cipher.login.password.length?[4,this.platformUtilsService.showDialog(this.i18nService.t("overwritePasswordConfirmation"),this.i18nService.t("overwritePassword"),this.i18nService.t("yes"),this.i18nService.t("no"))]:[3,2];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return this.onGeneratePassword.emit(),[2,!0]}}))}))},e.prototype.togglePassword=function(){this.showPassword=!this.showPassword,document.getElementById("loginPassword").focus(),this.editMode&&this.showPassword&&this.eventService.collect(c.EventType.Cipher_ClientToggledPasswordVisible,this.cipherId)},e.prototype.toggleCardNumber=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return this.showCardNumber=!this.showCardNumber,this.showCardNumber&&this.eventService.collect(c.EventType.Cipher_ClientToggledCardNumberVisible,this.cipherId),[2]}))}))},e.prototype.toggleCardCode=function(){this.showCardCode=!this.showCardCode,document.getElementById("cardCode").focus(),this.editMode&&this.showCardCode&&this.eventService.collect(c.EventType.Cipher_ClientToggledCardCodeVisible,this.cipherId)},e.prototype.toggleFieldValue=function(e){var t=e;t.showValue=!t.showValue,this.editMode&&t.showValue&&this.eventService.collect(c.EventType.Cipher_ClientToggledHiddenFieldVisible,this.cipherId)},e.prototype.toggleUriOptions=function(e){var t=e;t.showOptions=(null!=t.showOptions||null==e.match)&&!t.showOptions},e.prototype.loginUriMatchChanged=function(e){var t=e;t.showOptions=null==t.showOptions||t.showOptions},e.prototype.drop=function(e){o.moveItemInArray(this.cipher.fields,e.previousIndex,e.currentIndex)},e.prototype.organizationChanged=function(){return r(this,void 0,void 0,(function(){var e,t=this;return i(this,(function(n){switch(n.label){case 0:return null!=this.writeableCollections&&this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.cipher.organizationId?[3,2]:(this.collections=this.writeableCollections.filter((function(e){return e.organizationId===t.cipher.organizationId})),[4,this.userService.getOrganization(this.cipher.organizationId)]);case 1:return null!=(e=n.sent())&&(this.cipher.organizationUseTotp=e.useTotp),[3,3];case 2:this.collections=[],n.label=3;case 3:return[2]}}))}))},e.prototype.checkPassword=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:return null!=this.checkPasswordPromise||(null==this.cipher.login||null==this.cipher.login.password||""===this.cipher.login.password)?[2]:(this.checkPasswordPromise=this.auditService.passwordLeaked(this.cipher.login.password),[4,this.checkPasswordPromise]);case 1:return e=t.sent(),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")),[2]}}))}))},e.prototype.repromptChanged=function(){this.reprompt=!this.reprompt,this.reprompt?this.cipher.reprompt=s.CipherRepromptType.Password:this.cipher.reprompt=s.CipherRepromptType.None},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,e.sent().filter((function(e){return!e.readOnly}))]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.encryptCipher=function(){return this.cipherService.encrypt(this.cipher)},e.prototype.saveCipher=function(e){return this.cipherService.saveWithServer(e)},e.prototype.deleteCipher=function(){return this.cipher.isDeleted?this.cipherService.deleteWithServer(this.cipher.id):this.cipherService.softDeleteWithServer(this.cipher.id)},e.prototype.restoreCipher=function(){return this.cipherService.restoreWithServer(this.cipher.id)},e.ɵfac=function(t){return new(t||e)(C.ɵɵdirectiveInject(I.CipherService),C.ɵɵdirectiveInject(E.FolderService),C.ɵɵdirectiveInject(P.I18nService),C.ɵɵdirectiveInject(k.PlatformUtilsService),C.ɵɵdirectiveInject(O.AuditService),C.ɵɵdirectiveInject(A.StateService),C.ɵɵdirectiveInject(_.UserService),C.ɵɵdirectiveInject(M.CollectionService),C.ɵɵdirectiveInject(T.MessagingService),C.ɵɵdirectiveInject(D.EventService),C.ɵɵdirectiveInject(R.PolicyService))},e.ɵdir=C.ɵɵdefineDirective({type:e,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"}}),e}();t.AddEditComponent=B,("undefined"==typeof ngDevMode||ngDevMode)&&C.ɵsetClassMetadata(B,[{type:a.Directive}],(function(){return[{type:I.CipherService},{type:E.FolderService},{type:P.I18nService},{type:k.PlatformUtilsService},{type:O.AuditService},{type:A.StateService},{type:_.UserService},{type:M.CollectionService},{type:T.MessagingService},{type:D.EventService},{type:R.PolicyService}]}),{cloneMode:[{type:a.Input}],folderId:[{type:a.Input}],cipherId:[{type:a.Input}],type:[{type:a.Input}],collectionIds:[{type:a.Input}],organizationId:[{type:a.Input}],onSavedCipher:[{type:a.Output}],onDeletedCipher:[{type:a.Output}],onRestoredCipher:[{type:a.Output}],onCancelled:[{type:a.Output}],onEditAttachments:[{type:a.Output}],onShareCipher:[{type:a.Output}],onEditCollections:[{type:a.Output}],onGeneratePassword:[{type:a.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1})),[2]}}))}))},e.prototype.submit=function(){return r(this,void 0,void 0,(function(){var e;return i(this,(function(t){switch(t.label){case 0:if(e=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id})),!this.allowSelectNone&&0===e.length)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2];this.cipherDomain.collectionIds=e,t.label=1;case 1:return t.trys.push([1,3,,4]),this.formPromise=this.saveCollections(),[4,this.formPromise];case 2:return t.sent(),this.onSavedCollections.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("editedItem")),[3,4];case 3:return t.sent(),[3,4];case 4:return[2]}}))}))},e.prototype.loadCipher=function(){return this.cipherService.get(this.cipherId)},e.prototype.loadCipherCollections=function(){return this.cipherDomain.collectionIds},e.prototype.loadCollections=function(){return r(this,void 0,void 0,(function(){var e=this;return i(this,(function(t){switch(t.label){case 0:return[4,this.collectionService.getAllDecrypted()];case 1:return[2,t.sent().filter((function(t){return!t.readOnly&&t.organizationId===e.cipher.organizationId}))]}}))}))},e.prototype.saveCollections=function(){return this.cipherService.saveCollectionsWithServer(this.cipherDomain)},e.ɵfac=function(t){return new(t||e)(a.ɵɵdirectiveInject(s.CollectionService),a.ɵɵdirectiveInject(l.PlatformUtilsService),a.ɵɵdirectiveInject(c.I18nService),a.ɵɵdirectiveInject(p.CipherService))},e.ɵdir=a.ɵɵdefineDirective({type:e,inputs:{cipherId:"cipherId",allowSelectNone:"allowSelectNone"},outputs:{onSavedCollections:"onSavedCollections"}}),e}();t.CollectionsComponent=u,("undefined"==typeof ngDevMode||ngDevMode)&&a.ɵsetClassMetadata(u,[{type:o.Directive}],(function(){return[{type:s.CollectionService},{type:l.PlatformUtilsService},{type:c.I18nService},{type:p.CipherService}]}),{cipherId:[{type:o.Input}],allowSelectNone:[{type:o.Input}],onSavedCollections:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]524288e3)return this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("maxFileSize")),[2]}null!=this.password&&""===this.password.trim()&&(this.password=null),this.formPromise=this.encryptSend(e).then((function(e){return r(o,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.sendService.saveWithServer(e)];case 1:return n.sent(),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?[4,this.copyLinkToClipboard(this.link)]:[3,6];case 2:return null==(t=n.sent())||t?(this.platformUtilsService.showToast("success",null,this.i18nService.t(this.editMode?"editedSend":"createdSend")),[3,6]):[3,3];case 3:return[4,this.platformUtilsService.showDialog(this.i18nService.t(this.editMode?"editedSend":"createdSend"),null,this.i18nService.t("ok"),null,"success",null)];case 4:return n.sent(),[4,this.copyLinkToClipboard(this.link)];case 5:n.sent(),n.label=6;case 6:return[2]}}))}))})),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.formPromise];case 2:return a.sent(),[2,!0];case 3:return a.sent(),[3,4];case 4:return[2,!1]}}))}))},e.prototype.copyLinkToClipboard=function(e){return r(this,void 0,void 0,(function(){return i(this,(function(t){return[2,Promise.resolve(this.platformUtilsService.copyToClipboard(e))]}))}))},e.prototype.delete=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){switch(e.label){case 0:return null!=this.deletePromise?[2,!1]:[4,this.platformUtilsService.showDialog(this.i18nService.t("deleteSendConfirmation"),this.i18nService.t("deleteSend"),this.i18nService.t("yes"),this.i18nService.t("no"),"warning")];case 1:if(!e.sent())return[2,!1];e.label=2;case 2:return e.trys.push([2,5,,6]),this.deletePromise=this.sendService.deleteWithServer(this.send.id),[4,this.deletePromise];case 3:return e.sent(),this.platformUtilsService.showToast("success",null,this.i18nService.t("deletedSend")),[4,this.load()];case 4:return e.sent(),this.onDeletedSend.emit(this.send),[2,!0];case 5:return e.sent(),[3,6];case 6:return[2,!1]}}))}))},e.prototype.typeChanged=function(){this.send.type!==l.SendType.File||this.alertShown||(this.canAccessPremium?this.emailVerified||(this.alertShown=!0,this.messagingService.send("emailVerificationRequired")):(this.alertShown=!0,this.messagingService.send("premiumRequired")))},e.prototype.toggleOptions=function(){this.showOptions=!this.showOptions},e.prototype.loadSend=function(){return r(this,void 0,void 0,(function(){return i(this,(function(e){return[2,this.sendService.get(this.sendId)]}))}))},e.prototype.encryptSend=function(e){return r(this,void 0,void 0,(function(){var t;return i(this,(function(n){switch(n.label){case 0:return[4,this.sendService.encrypt(this.send,e,this.password,null)];case 1:t=n.sent();try{t[0].deletionDate=null==this.deletionDate?null:new Date(this.deletionDate)}catch(r){t[0].deletionDate=null}try{t[0].expirationDate=null==this.expirationDate?null:new Date(this.expirationDate)}catch(i){t[0].expirationDate=null}return[2,t]}}))}))},e.prototype.togglePasswordVisible=function(){this.showPassword=!this.showPassword,document.getElementById("password").focus()},e.ɵfac=function(t){return new(t||e)(d.ɵɵdirectiveInject(m.I18nService),d.ɵɵdirectiveInject(f.PlatformUtilsService),d.ɵɵdirectiveInject(h.EnvironmentService),d.ɵɵdirectiveInject(v.DatePipe),d.ɵɵdirectiveInject(y.SendService),d.ɵɵdirectiveInject(g.UserService),d.ɵɵdirectiveInject(x.MessagingService),d.ɵɵdirectiveInject(b.PolicyService))},e.ɵdir=d.ɵɵdefineDirective({type:e,inputs:{sendId:"sendId",type:"type"},outputs:{onSavedSend:"onSavedSend",onDeletedSend:"onDeletedSend",onCancelled:"onCancelled"}}),e}();t.AddEditComponent=S,("undefined"==typeof ngDevMode||ngDevMode)&&d.ɵsetClassMetadata(S,[{type:o.Directive}],(function(){return[{type:m.I18nService},{type:f.PlatformUtilsService},{type:h.EnvironmentService},{type:v.DatePipe},{type:y.SendService},{type:g.UserService},{type:x.MessagingService},{type:b.PolicyService}]}),{sendId:[{type:o.Input}],type:[{type:o.Input}],onSavedSend:[{type:o.Output}],onDeletedSend:[{type:o.Output}],onCancelled:[{type:o.Output}]})},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(this.organizationId=this.organizations[0].id),this.filterCollections(),[2]}}))}))},e.prototype.filterCollections=function(){var e=this;this.writeableCollections.forEach((function(e){return e.checked=!1})),null==this.organizationId||0===this.writeableCollections.length?this.collections=[]:this.collections=this.writeableCollections.filter((function(t){return t.organizationId===e.organizationId}))},e.prototype.submit=function(){var e,t;return r(this,void 0,void 0,(function(){var n,o,a,s=this;return i(this,(function(l){switch(l.label){case 0:return 0===(n=this.collections.filter((function(e){return!!e.checked})).map((function(e){return e.id}))).length?(this.platformUtilsService.showToast("error",this.i18nService.t("errorOccurred"),this.i18nService.t("selectOneCollection")),[2]):[4,this.cipherService.get(this.cipherId)];case 1:return[4,l.sent().decrypt()];case 2:o=l.sent(),a=null!==(t=null===(e=this.organizations.find((function(e){return e.id===s.organizationId})))||void 0===e?void 0:e.name)&&void 0!==t?t:this.i18nService.t("organization"),l.label=3;case 3:return l.trys.push([3,5,,6]),this.formPromise=this.cipherService.shareWithServer(o,this.organizationId,n).then((function(){return r(s,void 0,void 0,(function(){return i(this,(function(e){return this.onSharedCipher.emit(),this.platformUtilsService.showToast("success",null,this.i18nService.t("movedItemToOrg",o.name,a)),[2]}))}))})),[4,this.formPromise];case 4:return l.sent(),[2,!0];case 5:return l.sent(),[3,6];case 6:return[2,!1]}}))}))},Object.defineProperty(e.prototype,"canSave",{get:function(){if(null!=this.collections)for(var e=0;e0){var n=this.formEls[0];if("input"===n.tagName.toLowerCase()){var r=n;if(null!=r.type&&"checkbox"===r.type.toLowerCase())return void r.click()}n.focus()}},e.ɵfac=function(t){return new(t||e)(i.ɵɵdirectiveInject(i.ElementRef))},e.ɵdir=i.ɵɵdefineDirective({type:e,selectors:[["","appBoxRow",""]],hostBindings:function(e,t){1&e&&i.ɵɵlistener("click",(function(e){return t.onClick(e)}))}}),e}();t.BoxRowDirective=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Directive,args:[{selector:"[appBoxRow]"}]}],(function(){return[{type:i.ElementRef}]}),{onClick:[{type:r.HostListener,args:["click",["$event"]]}]})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SearchCiphersPipe=void 0;var r=n(0),i=n(0),o=function(){function e(){}return e.prototype.transform=function(e,t,n){return void 0===n&&(n=!1),null==e||0===e.length?[]:null==t||t.length<2?e.filter((function(e){return n!==e.isDeleted})):(t=t.trim().toLowerCase(),e.filter((function(e){return 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))))})))},e.ɵfac=function(t){return new(t||e)},e.ɵpipe=i.ɵɵdefinePipe({name:"searchCiphers",type:e,pure:!0}),e}();t.SearchCiphersPipe=o,("undefined"==typeof ngDevMode||ngDevMode)&&i.ɵsetClassMetadata(o,[{type:r.Pipe,args:[{name:"searchCiphers"}]}],null,null)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OssRoutingModule=void 0;var r=n(0),i=n(6),o=n(352),a=n(503),s=n(504),l=n(505),c=n(506),p=n(507),u=n(508),d=n(509),m=n(512),f=n(513),h=n(514),v=n(515),y=n(516),g=n(519),x=n(522),b=n(524),S=n(525),w=n(528),C=n(529),I=n(531),E=n(532),P=n(533),k=n(537),O=n(539),A=n(544),_=n(545),M=n(546),T=n(547),D=n(553),R=n(554),B=n(560),U=n(561),j=n(562),V=n(563),F=n(564),N=n(565),z=n(570),L=n(576),K=n(580),G=n(581),q=n(595),H=n(596),W=n(610),$=n(286),Q=n(611),Y=n(612),J=n(368),Z=n(362),X=n(614),ee=n(616),te=n(369),ne=n(370),re=n(381),ie=n(382),oe=n(618),ae=n(383),se=n(619),le=n(384),ce=n(385),pe=n(622),ue=n(623),de=n(624),me=n(336),fe=n(625),he=n(626),ve=n(261),ye=n(602),ge=n(607),xe=n(0),be=n(6),Se=[{path:"",component:o.FrontendLayoutComponent,children:[{path:"",pathMatch:"full",component:d.LoginComponent,canActivate:[he.UnauthGuardService]},{path:"2fa",component:g.TwoFactorComponent,canActivate:[he.UnauthGuardService]},{path:"register",component:h.RegisterComponent,canActivate:[he.UnauthGuardService],data:{titleId:"createAccount"}},{path:"sso",component:y.SsoComponent,canActivate:[he.UnauthGuardService],data:{titleId:"enterpriseSingleSignOn"}},{path:"set-password",component:v.SetPasswordComponent,data:{titleId:"setMasterPassword"}},{path:"hint",component:p.HintComponent,canActivate:[he.UnauthGuardService],data:{titleId:"passwordHint"}},{path:"lock",component:u.LockComponent,canActivate:[fe.LockGuardService]},{path:"verify-email",component:b.VerifyEmailTokenComponent},{path:"accept-organization",component:c.AcceptOrganizationComponent,data:{titleId:"joinOrganization"}},{path:"accept-emergency",component:l.AcceptEmergencyComponent,data:{titleId:"acceptEmergency"}},{path:"recover",pathMatch:"full",redirectTo:"recover-2fa"},{path:"recover-2fa",component:f.RecoverTwoFactorComponent,canActivate:[he.UnauthGuardService],data:{titleId:"recoverAccountTwoStep"}},{path:"recover-delete",component:m.RecoverDeleteComponent,canActivate:[he.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"verify-recover-delete",component:S.VerifyRecoverDeleteComponent,canActivate:[he.UnauthGuardService],data:{titleId:"deleteAccount"}},{path:"send/:sendId/:key",component:L.AccessComponent,data:{title:"Bitwarden Send"}},{path:"update-temp-password",component:x.UpdateTempPasswordComponent,canActivate:[me.AuthGuardService],data:{titleId:"updateTempPassword"}}]},{path:"",component:s.UserLayoutComponent,canActivate:[me.AuthGuardService],children:[{path:"vault",component:pe.VaultComponent,data:{titleId:"myVault"}},{path:"sends",component:K.SendComponent,data:{title:"Send"}},{path:"settings",component:Y.SettingsComponent,children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:G.AccountComponent,data:{titleId:"myAccount"}},{path:"options",component:W.OptionsComponent,data:{titleId:"options"}},{path:"domain-rules",component:H.DomainRulesComponent,data:{titleId:"domainRules"}},{path:"two-factor",component:J.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"premium",component:Q.PremiumComponent,data:{titleId:"goPremium"}},{path:"billing",component:Z.UserBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:X.UserSubscriptionComponent,data:{titleId:"premiumMembership"}},{path:"organizations",component:$.OrganizationsComponent,data:{titleId:"organizations"}},{path:"create-organization",component:q.CreateOrganizationComponent,data:{titleId:"newOrganization"}},{path:"emergency-access",children:[{path:"",component:ge.EmergencyAccessComponent,data:{titleId:"emergencyAccess"}},{path:":id",component:ye.EmergencyAccessViewComponent,data:{titleId:"emergencyAccess"}}]}]},{path:"tools",component:se.ToolsComponent,canActivate:[me.AuthGuardService],children:[{path:"",pathMatch:"full",redirectTo:"generator"},{path:"import",component:re.ImportComponent,data:{titleId:"importData"}},{path:"export",component:te.ExportComponent,data:{titleId:"exportVault"}},{path:"generator",component:oe.PasswordGeneratorComponent,data:{titleId:"passwordGenerator"}},{path:"breach-report",component:ee.BreachReportComponent,data:{titleId:"dataBreachReport"}},{path:"reused-passwords-report",component:ae.ReusedPasswordsReportComponent,data:{titleId:"reusedPasswordsReport"}},{path:"unsecured-websites-report",component:le.UnsecuredWebsitesReportComponent,data:{titleId:"unsecuredWebsitesReport"}},{path:"weak-passwords-report",component:ce.WeakPasswordsReportComponent,data:{titleId:"weakPasswordsReport"}},{path:"exposed-passwords-report",component:ne.ExposedPasswordsReportComponent,data:{titleId:"exposedPasswordsReport"}},{path:"inactive-two-factor-report",component:ie.InactiveTwoFactorReportComponent,data:{titleId:"inactive2faReport"}}]}]},{path:"organizations/:organizationId",component:a.OrganizationLayoutComponent,canActivate:[me.AuthGuardService,ue.OrganizationGuardService],children:[{path:"",pathMatch:"full",redirectTo:"vault"},{path:"vault",component:z.VaultComponent,data:{titleId:"vault"}},{path:"tools",component:V.ToolsComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.AccessImportExport,ve.Permissions.AccessReports]},children:[{path:"",pathMatch:"full",redirectTo:"import"},{path:"import",component:B.ImportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"importData",permissions:[ve.Permissions.AccessImportExport]}},{path:"export",component:D.ExportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"exportVault",permissions:[ve.Permissions.AccessImportExport]}},{path:"exposed-passwords-report",component:R.ExposedPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"exposedPasswordsReport",permissions:[ve.Permissions.AccessReports]}},{path:"inactive-two-factor-report",component:U.InactiveTwoFactorReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"inactive2faReport",permissions:[ve.Permissions.AccessReports]}},{path:"reused-passwords-report",component:j.ReusedPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"reusedPasswordsReport",permissions:[ve.Permissions.AccessReports]}},{path:"unsecured-websites-report",component:F.UnsecuredWebsitesReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"unsecuredWebsitesReport",permissions:[ve.Permissions.AccessReports]}},{path:"weak-passwords-report",component:N.WeakPasswordsReportComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"weakPasswordsReport",permissions:[ve.Permissions.AccessReports]}}]},{path:"manage",component:E.ManageComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.ManageAssignedCollections,ve.Permissions.ManageAllCollections,ve.Permissions.AccessEventLogs,ve.Permissions.ManageGroups,ve.Permissions.ManageUsers,ve.Permissions.ManagePolicies]},children:[{path:"",pathMatch:"full",redirectTo:"people"},{path:"collections",component:w.CollectionsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"collections",permissions:[ve.Permissions.ManageAssignedCollections,ve.Permissions.ManageAllCollections]}},{path:"events",component:C.EventsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"eventLogs",permissions:[ve.Permissions.AccessEventLogs]}},{path:"groups",component:I.GroupsComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"groups",permissions:[ve.Permissions.ManageGroups]}},{path:"people",component:P.PeopleComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"people",permissions:[ve.Permissions.ManageUsers,ve.Permissions.ManageUsersPassword]}},{path:"policies",component:k.PoliciesComponent,canActivate:[de.OrganizationTypeGuardService],data:{titleId:"policies",permissions:[ve.Permissions.ManagePolicies]}}]},{path:"settings",component:M.SettingsComponent,canActivate:[de.OrganizationTypeGuardService],data:{permissions:[ve.Permissions.ManageOrganization]},children:[{path:"",pathMatch:"full",redirectTo:"account"},{path:"account",component:O.AccountComponent,data:{titleId:"myOrganization"}},{path:"two-factor",component:T.TwoFactorSetupComponent,data:{titleId:"twoStepLogin"}},{path:"billing",component:A.OrganizationBillingComponent,data:{titleId:"billing"}},{path:"subscription",component:_.OrganizationSubscriptionComponent,data:{titleId:"subscription"}}]}]},{path:"**",redirectTo:""}],we=function(){function e(){}return e.ɵfac=function(t){return new(t||e)},e.ɵmod=xe.ɵɵdefineNgModule({type:e}),e.ɵinj=xe.ɵɵdefineInjector({imports:[[i.RouterModule.forRoot(Se,{useHash:!0,paramsInheritanceStrategy:"always"})],i.RouterModule]}),e}();t.OssRoutingModule=we,("undefined"==typeof ngJitMode||ngJitMode)&&xe.ɵɵsetNgModuleScope(we,{imports:[be.RouterModule],exports:[i.RouterModule]}),("undefined"==typeof ngDevMode||ngDevMode)&&xe.ɵsetClassMetadata(we,[{type:r.NgModule,args:[{imports:[i.RouterModule.forRoot(Se,{useHash:!0,paramsInheritanceStrategy:"always"})],exports:[i.RouterModule]}]}],null,null)},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=e?p[e-1]():0===p.length&&(l.delete(c),0===l.size&&a.delete(n))};o.apply(n,r).then((function(e){return u(),e})).catch((function(e){throw u(),e})).then(t,i)};p.push(s),p.length<=e&&s()}))}}}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkMoveRequest=void 0;var r=function(e,t){this.ids=null==e?[]:e,this.folderId=t};t.CipherBulkMoveRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkRestoreRequest=void 0;var r=function(e){this.ids=null==e?[]:e};t.CipherBulkRestoreRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherBulkShareRequest=void 0;var r=n(393),i=function(e,t){var n=this;null!=e&&(this.ciphers=[],e.forEach((function(e){n.ciphers.push(new r.CipherWithIdRequest(e))}))),this.collectionIds=t};t.CipherBulkShareRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherShareRequest=void 0;var r=n(195),i=function(e){this.cipher=new r.CipherRequest(e),this.collectionIds=e.collectionIds};t.CipherShareRequest=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SortedCiphersCache=void 0;var r=function(){function e(e){this.comparator=e,this.sortedCiphersByUrl=new Map,this.timeouts=new Map}return e.prototype.isCached=function(e){return this.sortedCiphersByUrl.has(e)},e.prototype.addCiphers=function(e,t){t.sort(this.comparator),this.sortedCiphersByUrl.set(e,new i(t)),this.resetTimer(e)},e.prototype.getLastUsed=function(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastUsed():null},e.prototype.getLastLaunched=function(e){return this.isCached(e)?this.sortedCiphersByUrl.get(e).getLastLaunched():null},e.prototype.getNext=function(e){return this.resetTimer(e),this.isCached(e)?this.sortedCiphersByUrl.get(e).getNext():null},e.prototype.updateLastUsedIndex=function(e){this.isCached(e)&&this.sortedCiphersByUrl.get(e).updateLastUsedIndex()},e.prototype.clear=function(){this.sortedCiphersByUrl.clear(),this.timeouts.clear()},e.prototype.resetTimer=function(e){var t=this;clearTimeout(this.timeouts.get(e)),this.timeouts.set(e,setTimeout((function(){t.sortedCiphersByUrl.delete(e),t.timeouts.delete(e)}),3e3))},e}();t.SortedCiphersCache=r;var i=function(){function e(e){this.ciphers=e,this.lastUsedIndex=-1}return e.prototype.getLastUsed=function(){return this.lastUsedIndex=Math.max(this.lastUsedIndex,0),this.ciphers[this.lastUsedIndex]},e.prototype.getLastLaunched=function(){return this.ciphers.filter((function(e){var t;return null===(t=e.localData)||void 0===t?void 0:t.lastLaunched})).sort((function(e,t){return t.localData.lastLaunched.valueOf()-e.localData.lastLaunched.valueOf()}))[0]},e.prototype.getNextIndex=function(){return(this.lastUsedIndex+1)%this.ciphers.length},e.prototype.getNext=function(){return this.ciphers[this.getNextIndex()]},e.prototype.updateLastUsedIndex=function(){this.lastUsedIndex=this.getNextIndex()},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TreeNode=void 0;var r=function(e,t,n){this.children=[],this.parent=n,this.node=e,this.node.name=t};t.TreeNode=r},,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EncArrayBuffer=void 0;var r=function(e){this.buffer=e};t.EncArrayBuffer=r},,,,,,function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordGeneratorPolicyOptions=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.defaultType="",t.minLength=0,t.useUppercase=!1,t.useLowercase=!1,t.useNumbers=!1,t.numberCount=0,t.useSpecial=!1,t.specialCount=0,t.minNumberWords=0,t.capitalize=!1,t.includeNumber=!1,t}return i(t,e),t.prototype.inEffect=function(){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}(n(68).default);t.PasswordGeneratorPolicyOptions=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OrganizationData=void 0;var r=function(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.useBusinessPortal=e.useBusinessPortal,this.useSso=e.useSso,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};t.OrganizationData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ProviderData=void 0;var r=function(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};t.ProviderData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendFileData=void 0;var r=function(e){null!=e&&(this.id=e.id,this.fileName=e.fileName,this.key=e.key,this.size=e.size,this.sizeName=e.sizeName)};t.SendFileData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SendTextData=void 0;var r=function(e){null!=e&&(this.text=e.text,this.hidden=e.hidden)};t.SendTextData=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0;var r=n(346),i=n(221),o=function(){function e(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)}return Object.defineProperty(e.prototype,"canAccess",{get:function(){return!!this.isProviderAdmin||this.enabled&&this.status===r.ProviderUserStatusType.Confirmed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canCreateOrganizations",{get:function(){return this.enabled&&this.isProviderAdmin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canManageUsers",{get:function(){return this.isProviderAdmin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"canAccessEventLogs",{get:function(){return this.isProviderAdmin},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isProviderAdmin",{get:function(){return this.type===i.ProviderUserType.ProviderAdmin},enumerable:!1,configurable:!0}),e}();t.Provider=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0?this.browserCache=a.DeviceType.OperaBrowser:-1!==navigator.userAgent.indexOf(" Edg/")?this.browserCache=a.DeviceType.EdgeBrowser:-1!==navigator.userAgent.indexOf(" Vivaldi/")?this.browserCache=a.DeviceType.VivaldiBrowser:-1!==navigator.userAgent.indexOf(" Safari/")&&-1===navigator.userAgent.indexOf("Chrome")?this.browserCache=a.DeviceType.SafariBrowser:window.chrome&&-1!==navigator.userAgent.indexOf(" Chrome/")?this.browserCache=a.DeviceType.ChromeBrowser:-1!==navigator.userAgent.indexOf(" Trident/")?this.browserCache=a.DeviceType.IEBrowser:this.browserCache=a.DeviceType.UnknownBrowser),this.browserCache},e.prototype.getDeviceString=function(){return a.DeviceType[this.getDevice()].toLowerCase().replace("browser","")},e.prototype.isFirefox=function(){return this.getDevice()===a.DeviceType.FirefoxBrowser},e.prototype.isChrome=function(){return this.getDevice()===a.DeviceType.ChromeBrowser},e.prototype.isEdge=function(){return this.getDevice()===a.DeviceType.EdgeBrowser},e.prototype.isOpera=function(){return this.getDevice()===a.DeviceType.OperaBrowser},e.prototype.isVivaldi=function(){return this.getDevice()===a.DeviceType.VivaldiBrowser},e.prototype.isSafari=function(){return this.getDevice()===a.DeviceType.SafariBrowser},e.prototype.isIE=function(){return this.getDevice()===a.DeviceType.IEBrowser},e.prototype.isMacAppStore=function(){return!1},e.prototype.isViewOpen=function(){return Promise.resolve(!1)},e.prototype.lockTimeout=function(){return null},e.prototype.launchUri=function(e,t){var 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)},e.prototype.saveFile=function(e,t,n,r){var i=null,o=null,a=r.toLowerCase(),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),i=null==n||this.isIE()?new Blob([t]):new Blob([t],n),navigator.msSaveOrOpenBlob)navigator.msSaveBlob(i,r);else{var l=e.document.createElement("a");s?l.download=r:this.isSafari()||(l.target="_blank"),l.href=URL.createObjectURL(i),l.style.position="fixed",e.document.body.appendChild(l),l.click(),e.document.body.removeChild(l)}},e.prototype.getApplicationVersion=function(){return Promise.resolve("2.22.0")},e.prototype.supportsWebAuthn=function(e){return"undefined"!=typeof PublicKeyCredential},e.prototype.supportsDuo=function(){return!0},e.prototype.showToast=function(e,t,n,r){this.messagingService.send("showToast",{text:n,title:t,type:e,options:r})},e.prototype.showDialog=function(e,t,n,a,s,l){return void 0===l&&(l=!1),r(this,void 0,void 0,(function(){var r,c,p,u;return i(this,(function(i){switch(i.label){case 0:if(r=null,null!=s)switch(s){case"success":r="fa-check text-success";break;case"warning":r="fa-warning text-warning";break;case"error":r="fa-bolt text-danger";break;case"info":r="fa-info-circle text-info"}return null!=(c=document.querySelector("div.modal"))&&c.removeAttribute("tabindex"),p=null!=r?'':void 0,[4,o.default.fire({heightAuto:!1,buttonsStyling:!1,icon:s,iconHtml:p,text:l?null:e,html:l?e:null,titleText:t,showCancelButton:null!=a,cancelButtonText:a,showConfirmButton:!0,confirmButtonText:null==n?this.i18nService.t("ok"):n})];case 1:return u=i.sent(),null!=c&&c.setAttribute("tabindex","-1"),[2,u.value]}}))}))},e.prototype.showPasswordDialog=function(e,t,n){return r(this,void 0,void 0,(function(){var a=this;return i(this,(function(s){switch(s.label){case 0:return[4,o.default.fire({heightAuto:!1,titleText:e,input:"password",text:t,confirmButtonText:this.i18nService.t("ok"),showCancelButton:!0,cancelButtonText:this.i18nService.t("cancel"),inputAttributes:{autocapitalize:"off",autocorrect:"off"},inputValidator:function(e){return r(a,void 0,void 0,(function(){return i(this,(function(t){switch(t.label){case 0:return[4,n(e)];case 1:return t.sent()?[2,!1]:[2,this.i18nService.t("invalidMasterPassword")]}}))}))}})];case 1:return[2,s.sent().isConfirmed]}}))}))},e.prototype.isDev=function(){return!1},e.prototype.isSelfHost=function(){return"true"===(!1).toString()},e.prototype.copyToClipboard=function(e,t){var n=window,r=window.document;if(t&&(t.window||t.win)?r=(n=t.window||t.win).document:t&&t.doc&&(r=t.doc),n.clipboardData&&n.clipboardData.setData)n.clipboardData.setData("Text",e);else if(r.queryCommandSupported&&r.queryCommandSupported("copy")){var i=r.createElement("textarea");i.textContent=e,i.style.position="fixed";var o=r.body;r.body.classList.contains("modal-open")&&(o=r.body.querySelector(".modal")),o.appendChild(i),i.select();var a=!1;try{(a=r.execCommand("copy"))||this.logService.debug("Copy command unsupported or disabled.")}catch(s){console.warn("Copy to clipboard failed.",s)}finally{o.removeChild(i)}return a}},e.prototype.readFromClipboard=function(e){throw new Error("Cannot read from clipboard on web.")},e.prototype.supportsBiometric=function(){return Promise.resolve(!1)},e.prototype.authenticateBiometric=function(){return Promise.resolve(!1)},e.prototype.supportsSecureStorage=function(){return!1},e.prototype.getDefaultSystemTheme=function(){return Promise.resolve(null)},e.prototype.onDefaultSystemThemeChange=function(){},e}();t.WebPlatformUtilsService=s},,function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&e.data.forEach((function(e){var r=new l.Collection(new p.CollectionData(e));t.push(r.decrypt().then((function(e){n.push(e)})))})),Promise.all(t)}))),m.push(this.apiService.getCiphersOrganization(e).then((function(e){var t=[];return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var n=new s.Cipher(new c.CipherData(e));t.push(n.decrypt().then((function(e){r.push(e)})))})),Promise.all(t)}))),[4,Promise.all(m)];case 1:return i.sent(),"csv"===t?(f=new Map,n.forEach((function(e){f.set(e.id,e)})),h=[],r.forEach((function(e){if(e.type===a.CipherType.Login||e.type===a.CipherType.SecureNote){var t={collections:[]};null!=e.collectionIds&&(t.collections=e.collectionIds.filter((function(e){return f.has(e)})).map((function(e){return f.get(e).name}))),y.buildCommonCipher(t,e),h.push(t)}})),[2,o.unparse(h)]):(v={encrypted:!1,collections:[],items:[]},n.forEach((function(e){var t=new d.CollectionWithId;t.build(e),v.collections.push(t)})),r.forEach((function(e){var t=new u.CipherWithIds;t.build(e),v.items.push(t)})),[2,JSON.stringify(v,null," ")])}}))}))},e.prototype.getOrganizationEncryptedExport=function(e){return r(this,void 0,void 0,(function(){var t,n,r,o,a,m;return i(this,(function(i){switch(i.label){case 0:return t=[],n=[],(r=[]).push(this.apiService.getCollections(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.forEach((function(e){var n=new l.Collection(new p.CollectionData(e));t.push(n)})),Promise.all([])}))),r.push(this.apiService.getCiphersOrganization(e).then((function(e){return null!=e&&null!=e.data&&e.data.length>0&&e.data.filter((function(e){return null===e.deletedDate})).forEach((function(e){var t=new s.Cipher(new c.CipherData(e));n.push(t)})),Promise.all([])}))),[4,Promise.all(r)];case 1:return i.sent(),[4,this.cryptoService.getOrgKey(e)];case 2:return o=i.sent(),[4,this.cryptoService.encrypt(h.Utils.newGuid(),o)];case 3:return a=i.sent(),m={encrypted:!0,encKeyValidation_DO_NOT_EDIT:a.encryptedString,collections:[],items:[]},t.forEach((function(e){var t=new d.CollectionWithId;t.build(e),m.collections.push(t)})),n.forEach((function(e){var t=new u.CipherWithIds;t.build(e),m.items.push(t)})),[2,JSON.stringify(m,null," ")]}}))}))},e.prototype.padNumber=function(e,t,n){void 0===n&&(n="0");var r=e.toString();return r.length>=t?r:new Array(t-r.length+1).join(n)+r},e.prototype.buildCommonCipher=function(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((function(t){e.fields?e.fields+="\n":e.fields="",e.fields+=(t.name||"")+": "+t.value})),t.type){case a.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((function(t){e.login_uri.push(t.uri)})));break;case a.CipherType.SecureNote:e.type="note";break;default:return}return e},e}();t.ExportService=v},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cipher=void 0;var r=n(164),i=n(35),o=n(125),a=n(168),s=n(79),l=n(1138),c=n(1139),p=n(1140),u=n(1141),d=n(1143),m=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId=null,t.collectionIds=null,t.folderId=null,t.type=i.CipherType.Login,t.name="Item name",t.notes="Some notes about this item.",t.favorite=!1,t.fields=[],t.login=null,t.secureNote=null,t.card=null,t.identity=null,t.reprompt=r.CipherRepromptType.None,t},e.toView=function(e,t){var n,a,s;if(void 0===t&&(t=new o.CipherView),t.type=e.type,t.folderId=e.folderId,null==t.organizationId&&(t.organizationId=e.organizationId),t.collectionIds||e.collectionIds){var m=new Set((null!==(n=t.collectionIds)&&void 0!==n?n:[]).concat(null!==(a=e.collectionIds)&&void 0!==a?a:[]));t.collectionIds=Array.from(m.values())}switch(t.name=e.name,t.notes=e.notes,t.favorite=e.favorite,t.reprompt=null!==(s=e.reprompt)&&void 0!==s?s:r.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((function(e){return c.Field.toView(e)}))),e.type){case i.CipherType.Login:t.login=u.Login.toView(e.login);break;case i.CipherType.SecureNote:t.secureNote=d.SecureNote.toView(e.secureNote);break;case i.CipherType.Card:t.card=l.Card.toView(e.card);break;case i.CipherType.Identity:t.identity=p.Identity.toView(e.identity)}return t},e.toDomain=function(e,t){var n;switch(void 0===t&&(t=new a.Cipher),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:r.CipherRepromptType.None,null!=e.fields&&(t.fields=e.fields.map((function(e){return c.Field.toDomain(e)}))),e.type){case i.CipherType.Login:t.login=u.Login.toDomain(e.login);break;case i.CipherType.SecureNote:t.secureNote=d.SecureNote.toDomain(e.secureNote);break;case i.CipherType.Card:t.card=l.Card.toDomain(e.card);break;case i.CipherType.Identity:t.identity=p.Identity.toDomain(e.identity)}return t},e.prototype.build=function(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((function(e){return new c.Field(e)}))),e.type){case i.CipherType.Login:this.login=new u.Login(e.login);break;case i.CipherType.SecureNote:this.secureNote=new d.SecureNote(e.secureNote);break;case i.CipherType.Card:this.card=new l.Card(e.card);break;case i.CipherType.Identity:this.identity=new p.Identity(e.identity)}},e}();t.Cipher=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Card=void 0;var r=n(80),i=n(275),o=n(79),a=function(){function e(e){var t,n,i,o,a,s;null!=e&&(e instanceof r.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===(i=e.number)||void 0===i?void 0:i.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))}return e.template=function(){var t=new e;return t.cardholderName="John Doe",t.brand="visa",t.number="4242424242424242",t.expMonth="04",t.expYear="2023",t.code="123",t},e.toView=function(e,t){return void 0===t&&(t=new r.CardView),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},e.toDomain=function(e,t){return void 0===t&&(t=new i.Card),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},e}();t.Card=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Field=void 0;var r=n(118),i=n(194),o=n(79),a=n(276),s=function(){function e(e){var t,n;null!=e&&(e instanceof i.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)}return e.template=function(){var t=new e;return t.name="Field name",t.value="Some value",t.type=r.FieldType.Text,t},e.toView=function(e,t){return void 0===t&&(t=new i.FieldView),t.type=e.type,t.value=e.value,t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Field),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},e}();t.Field=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Identity=void 0;var r=n(141),i=n(79),o=n(277),a=function(){function e(e){var t,n,i,o,a,s,l,c,p,u,d,m,f,h,v,y,g,x;null!=e&&(e instanceof r.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===(i=e.middleName)||void 0===i?void 0:i.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===(p=e.state)||void 0===p?void 0:p.encryptedString,this.postalCode=null===(u=e.postalCode)||void 0===u?void 0:u.encryptedString,this.country=null===(d=e.country)||void 0===d?void 0:d.encryptedString,this.company=null===(m=e.company)||void 0===m?void 0:m.encryptedString,this.email=null===(f=e.email)||void 0===f?void 0:f.encryptedString,this.phone=null===(h=e.phone)||void 0===h?void 0:h.encryptedString,this.ssn=null===(v=e.ssn)||void 0===v?void 0:v.encryptedString,this.username=null===(y=e.username)||void 0===y?void 0:y.encryptedString,this.passportNumber=null===(g=e.passportNumber)||void 0===g?void 0:g.encryptedString,this.licenseNumber=null===(x=e.licenseNumber)||void 0===x?void 0:x.encryptedString))}return e.template=function(){var t=new e;return t.title="Mr",t.firstName="John",t.middleName="William",t.lastName="Doe",t.address1="123 Any St",t.address2="Apt #123",t.address3=null,t.city="New York",t.state="NY",t.postalCode="10001",t.country="US",t.company="Acme Inc.",t.email="john@company.com",t.phone="5555551234",t.ssn="000-123-4567",t.username="jdoe",t.passportNumber="US-123456789",t.licenseNumber="D123-12-123-12333",t},e.toView=function(e,t){return void 0===t&&(t=new r.IdentityView),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},e.toDomain=function(e,t){return void 0===t&&(t=new o.Identity),t.title=null!=e.title?new i.EncString(e.title):null,t.firstName=null!=e.firstName?new i.EncString(e.firstName):null,t.middleName=null!=e.middleName?new i.EncString(e.middleName):null,t.lastName=null!=e.lastName?new i.EncString(e.lastName):null,t.address1=null!=e.address1?new i.EncString(e.address1):null,t.address2=null!=e.address2?new i.EncString(e.address2):null,t.address3=null!=e.address3?new i.EncString(e.address3):null,t.city=null!=e.city?new i.EncString(e.city):null,t.state=null!=e.state?new i.EncString(e.state):null,t.postalCode=null!=e.postalCode?new i.EncString(e.postalCode):null,t.country=null!=e.country?new i.EncString(e.country):null,t.company=null!=e.company?new i.EncString(e.company):null,t.email=null!=e.email?new i.EncString(e.email):null,t.phone=null!=e.phone?new i.EncString(e.phone):null,t.ssn=null!=e.ssn?new i.EncString(e.ssn):null,t.username=null!=e.username?new i.EncString(e.username):null,t.passportNumber=null!=e.passportNumber?new i.EncString(e.passportNumber):null,t.licenseNumber=null!=e.licenseNumber?new i.EncString(e.licenseNumber):null,t},e}();t.Identity=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Login=void 0;var r=n(1142),i=n(142),o=n(79),a=n(278),s=function(){function e(e){var t,n,o;null!=e&&(null!=e.uris&&(i.LoginView,this.uris=e.uris.map((function(e){return new r.LoginUri(e)}))),e instanceof i.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))}return e.template=function(){var t=new e;return t.uris=[],t.username="jdoe",t.password="myp@ssword123",t.totp="JBSWY3DPEHPK3PXP",t},e.toView=function(e,t){return void 0===t&&(t=new i.LoginView),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.LoginUri.toView(e)}))),t.username=e.username,t.password=e.password,t.totp=e.totp,t},e.toDomain=function(e,t){return void 0===t&&(t=new a.Login),null!=e.uris&&(t.uris=e.uris.map((function(e){return r.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},e}();t.Login=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LoginUri=void 0;var r=n(230),i=n(79),o=n(279),a=function(){function e(e){var t;this.match=null,null!=e&&(e instanceof r.LoginUriView?this.uri=e.uri:this.uri=null===(t=e.uri)||void 0===t?void 0:t.encryptedString,this.match=e.match)}return e.template=function(){var t=new e;return t.uri="https://google.com",t.match=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.LoginUriView),t.uri=e.uri,t.match=e.match,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.LoginUri),t.uri=null!=e.uri?new i.EncString(e.uri):null,t.match=e.match,t},e}();t.LoginUri=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SecureNote=void 0;var r=n(89),i=n(88),o=n(280),a=function(){function e(e){null!=e&&(this.type=e.type)}return e.template=function(){var t=new e;return t.type=r.SecureNoteType.Generic,t},e.toView=function(e,t){return void 0===t&&(t=new i.SecureNoteView),t.type=e.type,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.SecureNote),t.type=e.type,t},e}();t.SecureNote=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Collection=void 0;var r=n(154),i=n(140),o=n(79),a=function(){function e(){}return e.template=function(){var t=new e;return t.organizationId="00000000-0000-0000-0000-000000000000",t.name="Collection name",t.externalId=null,t},e.toView=function(e,t){return void 0===t&&(t=new r.CollectionView),t.name=e.name,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.toDomain=function(e,t){return void 0===t&&(t=new i.Collection),t.name=null!=e.name?new o.EncString(e.name):null,t.externalId=e.externalId,null==t.organizationId&&(t.organizationId=e.organizationId),t},e.prototype.build=function(e){var t;this.organizationId=e.organizationId,e instanceof r.CollectionView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString,this.externalId=e.externalId},e}();t.Collection=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=n(192),i=function(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=r.EventType[e.type]};t.Event=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Folder=void 0;var r=n(126),i=n(79),o=n(396),a=function(){function e(){}return e.template=function(){var t=new e;return t.name="Folder name",t},e.toView=function(e,t){return void 0===t&&(t=new r.FolderView),t.name=e.name,t},e.toDomain=function(e,t){return void 0===t&&(t=new o.Folder),t.name=null!=e.name?new i.EncString(e.name):null,t},e.prototype.build=function(e){var t;e instanceof r.FolderView?this.name=e.name:this.name=null===(t=e.name)||void 0===t?void 0:t.encryptedString},e}();t.Folder=a},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5e4)throw new Error("Cannot upload file, exceeds maximum size of "+5e4*a);i.label=1;case 1:i.trys.push([1,12,,13]),i.label=2;case 2:return s"+e+""})),t+=""},e.prototype.getMaxBlockSize=function(e){return s.compare(e,"2019-12-12")>=0?4194304e3:s.compare(e,"2016-05-31")>=0?104857600:4194304},e}();t.AzureFileUploadService=a;var s=function(){function e(e){this.year=0,this.month=0,this.day=0;try{var t=e.split("-").map((function(e){return Number.parseInt(e,10)}));this.year=t[0],this.month=t[1],this.day=t[2]}catch(n){}}return e.compare=function(t,n){return"string"==typeof t&&(t=new e(t)),"string"==typeof n&&(n=new e(n)),t.year!==n.year?t.year-n.year:t.month!==n.month?t.month-n.month:t.day!==n.day?t.day-n.day:0},e.prototype.compare=function(t){return e.compare(this,t)},e}()},function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&(o=Math.floor(r.ciphers.length/2),s=r.ciphers.length-1,this.badData(r.ciphers[0])&&this.badData(r.ciphers[o])&&this.badData(r.ciphers[s])))return[2,new Error(this.i18nService.t("importFormatError"))];i.label=2;case 2:return i.trys.push([2,4,,5]),[4,this.postImport(r,n)];case 3:return i.sent(),[3,5];case 4:return l=i.sent(),c=new m.ErrorResponse(l,400),[2,this.handleServerError(c,r)];case 5:return[2,null];case 6:return a.Utils.isNullOrWhitespace(r.errorMessage)?[2,new Error(this.i18nService.t("importFormatError"))]:[2,new Error(r.errorMessage)];case 7:return[2]}}))}))},e.prototype.getImporter=function(e,t){void 0===t&&(t=null);var n=this.getImporterInstance(e);return null==n?null:(n.organizationId=t,n)},e.prototype.getImporterInstance=function(e){if(null==e||""===e)return null;switch(e){case"bitwardencsv":return new g.BitwardenCsvImporter;case"bitwardenjson":return new x.BitwardenJsonImporter(this.cryptoService,this.i18nService);case"lastpasscsv":case"passboltcsv":return new j.LastPassCsvImporter;case"keepassxcsv":return new B.KeePassXCsvImporter;case"aviracsv":return new y.AviraCsvImporter;case"blurcsv":return new S.BlurCsvImporter;case"safeincloudxml":return new re.SafeInCloudXmlImporter;case"padlockcsv":return new H.PadlockCsvImporter;case"keepass2xml":return new R.KeePass2XmlImporter;case"chromecsv":case"operacsv":case"vivaldicsv":return new C.ChromeCsvImporter;case"firefoxcsv":return new _.FirefoxCsvImporter;case"upmcsv":return new ce.UpmCsvImporter;case"saferpasscsv":return new ie.SaferPassCsvImporter;case"meldiumcsv":return new F.MeldiumCsvImporter;case"1password1pif":return new K.OnePassword1PifImporter;case"1passwordwincsv":return new q.OnePasswordWinCsvImporter;case"1passwordmaccsv":return new G.OnePasswordMacCsvImporter;case"keepercsv":return new U.KeeperCsvImporter;case"passworddragonxml":return new Z.PasswordDragonXmlImporter;case"enpasscsv":return new O.EnpassCsvImporter;case"enpassjson":return new A.EnpassJsonImporter;case"pwsafexml":return new X.PasswordSafeXmlImporter;case"dashlanejson":return new P.DashlaneJsonImporter;case"msecurecsv":return new N.MSecureCsvImporter;case"stickypasswordxml":return new se.StickyPasswordXmlImporter;case"truekeycsv":return new le.TrueKeyCsvImporter;case"clipperzhtml":return new I.ClipperzHtmlImporter;case"roboformcsv":return new ne.RoboFormCsvImporter;case"ascendocsv":return new f.AscendoCsvImporter;case"passwordbossjson":return new J.PasswordBossJsonImporter;case"zohovaultcsv":return new ue.ZohoVaultCsvImporter;case"splashidcsv":return new ae.SplashIdCsvImporter;case"passkeepcsv":return new W.PassKeepCsvImporter;case"gnomejson":return new T.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 M.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 oe.SecureSafeCsvImporter;case"logmeoncecsv":return new V.LogMeOnceCsvImporter;case"blackberrycsv":return new b.BlackBerryCsvImporter;case"buttercupcsv":return new w.ButtercupCsvImporter;case"codebookcsv":return new E.CodebookCsvImporter;case"encryptrcsv":return new k.EncryptrCsvImporter;case"yoticsv":return new pe.YotiCsvImporter;case"nordpasscsv":return new L.NordPassCsvImporter;default:return null}},e.prototype.postImport=function(e,t){return void 0===t&&(t=null),r(this,void 0,void 0,(function(){var n,r,o,a,m;return i(this,(function(i){switch(i.label){case 0:if(null!=t)return[3,10];n=new p.ImportCiphersRequest,a=0,i.label=1;case 1:return a0&&(n+="\n\n"),"Folder"!==a&&"Collection"!==a&&(n+="["+(c+1)+"] "),n+="["+a+'] "'+i.name+'": '+l})),new Error(n)},e}();t.ImportService=de},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportCiphersRequest=void 0;var r=function(){this.ciphers=[],this.folders=[],this.folderRelationships=[]};t.ImportCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ImportOrganizationCiphersRequest=void 0;var r=function(){this.ciphers=[],this.collections=[],this.collectionRelationships=[]};t.ImportOrganizationCiphersRequest=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KvpRequest=void 0;var r=function(e,t){this.key=e,this.value=t};t.KvpRequest=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AscendoCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<2)){var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),e.length>2&&e.length%2==0)for(var i=0;i-1?r.login.password=t.getValueOrDefault(o):null==r.login.username&&t.usernameFieldNames.indexOf(s)>-1?r.login.username=t.getValueOrDefault(o):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(s)>-1?r.login.uris=t.makeUriArray(o):t.processKvp(r,a,o)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AscendoCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AvastCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name),r.login.uris=t.makeUriArray(e.web),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.login),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AvastJsonImporter=void 0;var o=n(27),a=n(28),s=n(35),l=n(89),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r?(n.success=!1,Promise.resolve(n)):(null!=r.logins&&r.logins.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.pwd),r.login.username=t.getValueOrDefault(e.loginName),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.notes&&r.notes.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.SecureNote,r.secureNote.type=l.SecureNoteType.Generic,r.name=t.getValueOrDefault(e.label),r.notes=t.getValueOrDefault(e.text),t.cleanupCipher(r),n.ciphers.push(r)})),null!=r.cards&&r.cards.forEach((function(e){var r=t.initLoginCipher();r.type=s.CipherType.Card,r.name=t.getValueOrDefault(e.custName),r.notes=t.getValueOrDefault(e.note),r.card.cardholderName=t.getValueOrDefault(e.holderName),r.card.number=t.getValueOrDefault(e.cardNumber),r.card.code=t.getValueOrDefault(e.cvv),r.card.brand=t.getCardBrand(r.card.number),null!=e.expirationDate&&(null!=e.expirationDate.month&&(r.card.expMonth=e.expirationDate.month+""),null!=e.expirationDate.year&&(r.card.expYear=e.expirationDate.year+"")),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AvastJsonImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.AviraCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,t.getValueOrDefault(t.nameFromUrl(e.website),"--")),r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.username)&&!t.isNullOrWhitespace(e.secondary_username)?r.login.username=e.secondary_username:(r.login.username=t.getValueOrDefault(e.username),r.notes=t.getValueOrDefault(e.secondary_username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.AviraCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BitwardenCsvImporter=void 0;var o=n(27),a=n(28),s=n(125),l=n(154),c=n(194),p=n(142),u=n(88),d=n(164),m=n(35),f=n(118),h=n(89),v=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.organization&&!t.isNullOrWhitespace(e.collections)?e.collections.split(",").forEach((function(e){for(var t=!0,r=n.collections.length,i=0;ia+2&&(v.value=i[o].substr(a+2)),r.fields.push(v)}}switch(null!=e.type?e.type.toLowerCase():null){case"note":r.type=m.CipherType.SecureNote,r.secureNote=new u.SecureNoteView,r.secureNote.type=h.SecureNoteType.Generic;break;default:r.type=m.CipherType.Login,r.login=new p.LoginView,r.login.totp=t.getValueOrDefault(e.login_totp||e.totp),r.login.username=t.getValueOrDefault(e.login_username||e.username),r.login.password=t.getValueOrDefault(e.login_password||e.password);var y=t.parseSingleRowCsv(e.login_uri||e.uri);r.login.uris=t.makeUriArray(y)}n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BitwardenCsvImporter=v},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},a=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]5&&(g.passwordHistory=g.passwordHistory.slice(0,5)),!this.organization&&null!=y.folderId&&n.has(y.folderId)?this.result.folderRelationships.push([this.result.ciphers.length,n.get(y.folderId)]):this.organization&&null!=y.collectionIds&&y.collectionIds.forEach((function(e){n.has(e)&&b.result.collectionRelationships.push([b.result.ciphers.length,n.get(e)])})),[4,g.decrypt()]):[3,16];case 14:x=a.sent(),this.cleanupCipher(x),this.result.ciphers.push(x),a.label=15;case 15:return h++,[3,13];case 16:return this.result.success=!0,[2]}}))}))},t.prototype.parseDecrypted=function(){var e=this,t=new Map;this.organization&&null!=this.results.collections?this.results.collections.forEach((function(n){var r=u.CollectionWithId.toView(n);null!=r&&(r.id=null,r.organizationId=null,t.set(n.id,e.result.collections.length),e.result.collections.push(r))})):this.organization||null==this.results.folders||this.results.folders.forEach((function(n){var r=d.FolderWithId.toView(n);null!=r&&(r.id=null,t.set(n.id,e.result.folders.length),e.result.folders.push(r))})),this.results.items.forEach((function(n){var r=p.CipherWithIds.toView(n);r.id=null,r.folderId=null,r.organizationId=null,r.collectionIds=null,null!=r.passwordHistory&&r.passwordHistory.length>5&&(r.passwordHistory=r.passwordHistory.slice(0,5)),!e.organization&&null!=n.folderId&&t.has(n.folderId)?e.result.folderRelationships.push([e.result.ciphers.length,t.get(n.folderId)]):e.organization&&null!=n.collectionIds&&n.collectionIds.forEach((function(n){t.has(n)&&e.result.collectionRelationships.push([e.result.ciphers.length,t.get(n)])})),e.cleanupCipher(r),e.result.ciphers.push(r)})),this.result.success=!0},t}(s.BaseImporter);t.BitwardenJsonImporter=m},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlackBerryCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("list"!==e.grouping){var r=t.initLoginCipher();r.favorite="1"===e.fav,r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.extra),"note"!==e.grouping&&(r.login.uris=t.makeUriArray(e.url),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username)),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlackBerryCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.BlurCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){"null"===e.label&&(e.label=null);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.label,t.getValueOrDefault(t.nameFromUrl(e.domain),"--")),r.login.uris=t.makeUriArray(e.domain),r.login.password=t.getValueOrDefault(e.password),t.isNullOrWhitespace(e.email)&&!t.isNullOrWhitespace(e.username)?r.login.username=e.username:(r.login.username=t.getValueOrDefault(e.email),r.notes=t.getValueOrDefault(e.username)),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.BlurCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ButtercupCsvImporter=void 0;var o=n(27),a=n(28),s=["!group_id","!group_name","title","username","password","URL","id"],l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e["!group_name"]));var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.URL);var i=!1;for(var o in e)e.hasOwnProperty(o)&&(i||-1!==s.indexOf(o)||(i=!0),i&&t.processKvp(r,o,e[o]));t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ButtercupCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ChromeCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.name,"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ChromeCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClipperzHtmlImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("textarea");return null==i||this.isNullOrWhitespace(i.textContent)?(n.errorMessage="Missing textarea.",n.success=!1,Promise.resolve(n)):(JSON.parse(i.textContent).forEach((function(e){var r=t.initLoginCipher();if(t.isNullOrWhitespace(e.label)||(r.name=e.label.split(" ")[0]),null==e.data||t.isNullOrWhitespace(e.data.notes)||(r.notes=e.data.notes.split("\\n").join("\n")),null!=e.currentVersion&&null!=e.currentVersion.fields)for(var i in e.currentVersion.fields)if(e.currentVersion.fields.hasOwnProperty(i)){var o=e.currentVersion.fields[i];switch(null!=o.actionType?o.actionType.toLowerCase():null){case"password":r.login.password=t.getValueOrDefault(o.value);break;case"email":case"username":case"user":case"name":r.login.username=t.getValueOrDefault(o.value);break;case"url":r.login.uris=t.makeUriArray(o.value);break;default:var a=null!=o.label?o.label.toLowerCase():null;null==r.login.password&&t.passwordFieldNames.indexOf(a)>-1?r.login.password=t.getValueOrDefault(o.value):null==r.login.username&&t.usernameFieldNames.indexOf(a)>-1?r.login.username=t.getValueOrDefault(o.value):(null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(a)>-1?r.login.uris=t.makeUriArray(o.value):t.processKvp(r,o.label,o.value)}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.ClipperzHtmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.CodebookCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValueOrDefault(e.Category));var r=t.initLoginCipher();r.favorite="True"===t.getValueOrDefault(e.Favorite),r.name=t.getValueOrDefault(e.Entry,"--"),r.notes=t.getValueOrDefault(e.Note),r.login.username=t.getValueOrDefault(e.Username,e.Email),r.login.password=t.getValueOrDefault(e.Password),r.login.totp=t.getValueOrDefault(e.TOTP),r.login.uris=t.makeUriArray(e.Website),t.isNullOrWhitespace(e.Username)||t.processKvp(r,"Email",e.Email),t.processKvp(r,"Phone",e.Phone),t.processKvp(r,"PIN",e.PIN),t.processKvp(r,"Account",e.Account),t.processKvp(r,"Date",e.Date),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.CodebookCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.DashlaneJsonImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(125),c=n(141),p=n(88),u=n(35),d=n(89),m=new Set(["ADDRESS","AUTHENTIFIANT","BANKSTATEMENT","IDCARD","IDENTITY","PAYMENTMEANS_CREDITCARD","PAYMENTMEAN_PAYPAL","EMAIL"]),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){this.result=new a.ImportResult;var t=JSON.parse(e);if(null==t||0===t.length)return this.result.success=!1,Promise.resolve(this.result);for(var n in 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),t)t.hasOwnProperty(n)&&!m.has(n)&&this.processNote(t[n],null,"Generic Note");return this.result.success=!0,Promise.resolve(this.result)},t.prototype.processAuth=function(e){var t=this;e.forEach((function(e){var n=t.initLoginCipher();n.name=t.getValueOrDefault(e.title),n.login.username=t.getValueOrDefault(e.login,t.getValueOrDefault(e.secondaryLogin)),t.isNullOrWhitespace(n.login.username)?n.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(n.notes="Email: "+e.email+"\n"),n.login.password=t.getValueOrDefault(e.password),n.login.uris=t.makeUriArray(e.domain),n.notes+=t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(n),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processIdentity=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.fullName,"");var r=n.name.split(" ");r.length>0&&(n.identity.firstName=t.getValueOrDefault(r[0])),2===r.length?n.identity.lastName=t.getValueOrDefault(r[1]):3===r.length&&(n.identity.middleName=t.getValueOrDefault(r[1]),n.identity.lastName=t.getValueOrDefault(r[2])),n.identity.username=t.getValueOrDefault(e.pseudo),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processAddress=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.identity=new c.IdentityView,n.type=u.CipherType.Identity,n.name=t.getValueOrDefault(e.addressName),n.identity.address1=t.getValueOrDefault(e.addressFull),n.identity.city=t.getValueOrDefault(e.city),n.identity.state=t.getValueOrDefault(e.state),n.identity.postalCode=t.getValueOrDefault(e.zipcode),n.identity.country=t.getValueOrDefault(e.country),null!=n.identity.country&&(n.identity.country=n.identity.country.toUpperCase()),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processCard=function(e){var t=this;e.forEach((function(e){var n=new l.CipherView;n.card=new s.CardView,n.type=u.CipherType.Card,n.name=t.getValueOrDefault(e.bank),n.card.number=t.getValueOrDefault(e.cardNumber),n.card.brand=t.getCardBrand(n.card.number),n.card.cardholderName=t.getValueOrDefault(e.owner),t.isNullOrWhitespace(n.card.brand)||(t.isNullOrWhitespace(n.name)?n.name=n.card.brand:n.name+=" - "+n.card.brand),t.cleanupCipher(n),t.result.ciphers.push(n)}))},t.prototype.processNote=function(e,t,n){var r=this;void 0===n&&(n=null),e.forEach((function(e){var i=new l.CipherView;for(var o in i.secureNote=new p.SecureNoteView,i.type=u.CipherType.SecureNote,i.secureNote.type=d.SecureNoteType.Generic,i.name=null!=n?n:r.getValueOrDefault(e[t]),e)e.hasOwnProperty(o)&&o!==t&&r.processKvp(i,o,e[o].toString());r.cleanupCipher(i),r.result.ciphers.push(i)}))},t}(o.BaseImporter);t.DashlaneJsonImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EncryptrCsvImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(35),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Label,"--"),r.notes=t.getValueOrDefault(e.Notes);var i=t.getValueOrDefault(e.Text);t.isNullOrWhitespace(i)||(t.isNullOrWhitespace(r.notes)?r.notes=i:r.notes+="\n\n"+i);var o=e["Entry Type"];if("Password"===o)r.login.username=t.getValueOrDefault(e.Username),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e["Site URL"]);else if("Credit Card"===o){r.type=l.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e["Name on card"]),r.card.number=t.getValueOrDefault(e["Card Number"]),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.CVV);var a=t.getValueOrDefault(e.Expiry);if(!t.isNullOrWhitespace(a)){var c=a.split("/");c.length>1&&(r.card.expMonth=parseInt(c[0],null).toString(),r.card.expYear=(2e3+parseInt(c[1],null)).toString())}}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.EncryptrCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassCsvImporter=void 0;var o=n(27),a=n(28),s=n(35),l=n(89),c=n(80),p=n(88),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(e.length<2||i&&("Title"===e[0]||"title"===e[0]))i=!1;else{var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[e.length-1]),r.name=t.getValueOrDefault(e[0],"--"),2!==e.length&&(t.containsField(e,"username")||t.containsField(e,"password")||t.containsField(e,"email")||t.containsField(e,"url"))||(r.type=s.CipherType.SecureNote,r.secureNote=new p.SecureNoteView,r.secureNote.type=l.SecureNoteType.Generic),t.containsField(e,"cardholder")&&t.containsField(e,"number")&&t.containsField(e,"expiry date")&&(r.type=s.CipherType.Card,r.card=new c.CardView),e.length>2&&e.length%2==0)for(var o=0;o0},t}(o.BaseImporter);t.EnpassCsvImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.EnpassJsonImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(126),c=n(35),p=n(118),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items||0===r.items.length)return n.success=!1,Promise.resolve(n);var i=new Map,o=new Map,s=this.buildFolderTree(r.folders);return this.flattenFolderTree(null,s,i),i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){null!=e.folders&&e.folders.length>0&&o.has(e.folders[0])&&n.folderRelationships.push([n.ciphers.length,o.get(e.folders[0])]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.title),r.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.")?t.processLogin(r,e.fields):0===e.template_type.indexOf("creditcard.")?t.processCard(r,e.fields):e.template_type.indexOf("identity.")<0&&e.fields.some((function(e){return"password"===e.type&&!t.isNullOrWhitespace(e.value)}))?t.processLogin(r,e.fields):t.processNote(r,e.fields)),r.notes+="\n"+t.getValueOrDefault(e.note,""),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n)},t.prototype.processLogin=function(e,t){var n=this,r=[];t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||("username"!==t.type&&"email"!==t.type||!n.isNullOrWhitespace(e.login.username)?"password"===t.type&&n.isNullOrWhitespace(e.login.password)?e.login.password=t.value:"totp"===t.type&&n.isNullOrWhitespace(e.login.totp)?e.login.totp=t.value:"url"===t.type?r.push(t.value):n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text):e.login.username=t.value)})),e.login.uris=this.makeUriArray(r)},t.prototype.processCard=function(e,t){var n=this;e.card=new s.CardView,e.type=c.CipherType.Card,t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||"ccType"===t.type||("ccName"===t.type&&n.isNullOrWhitespace(e.card.cardholderName)?e.card.cardholderName=t.value:"ccNumber"===t.type&&n.isNullOrWhitespace(e.card.number)?(e.card.number=t.value,e.card.brand=n.getCardBrand(e.card.number)):"ccCvc"===t.type&&n.isNullOrWhitespace(e.card.code)?e.card.code=t.value:"ccExpiry"===t.type&&n.isNullOrWhitespace(e.card.expYear)&&n.setCardExpiration(e,t.value)||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text))}))},t.prototype.processNote=function(e,t){var n=this;t.forEach((function(t){n.isNullOrWhitespace(t.value)||"section"===t.type||n.processKvp(e,t.label,t.value,1===t.sensitive?p.FieldType.Hidden:p.FieldType.Text)}))},t.prototype.buildFolderTree=function(e){if(null==e)return[];var t=[],n=new Map([]);return e.forEach((function(e){n.set(e.uuid,e),e.children=[]})),e.forEach((function(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},t.prototype.flattenFolderTree=function(e,t,n){var r=this;null!=t&&t.forEach((function(t){if(null!=t.title&&""!==t.title.trim()){var i=t.title.trim();null!=e&&""!==e.trim()&&(i=e+"/"+i),n.set(t.uuid,i),null!=t.children&&0!==t.children.length&&r.flattenFolderTree(i,t.children,n)}}))},t}(o.BaseImporter);t.EnpassJsonImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FirefoxCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.filter((function(e){return"chrome://FirefoxAccounts"!==e.url})).forEach((function(e){var r=t.initLoginCipher(),i=t.getValueOrDefault(e.url,t.getValueOrDefault(e.hostname));r.name=t.getValueOrDefault(t.nameFromUrl(i),"--"),r.login.username=t.getValueOrDefault(e.username),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(i),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.FirefoxCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.FSecureFskImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(35),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=new a.ImportResult,n=JSON.parse(e);if(null==n||null==n.data)return t.success=!1,Promise.resolve(t);for(var r in n.data)if(n.data.hasOwnProperty(r)){var i=n.data[r],o=this.initLoginCipher();if(o.name=this.getValueOrDefault(i.service),o.notes=this.getValueOrDefault(i.notes),"website"===i.style)o.login.username=this.getValueOrDefault(i.username),o.login.password=this.getValueOrDefault(i.password),o.login.uris=this.makeUriArray(i.url);else{if("creditcard"!==i.style)continue;o.type=l.CipherType.Card,o.card=new s.CardView,o.card.cardholderName=this.getValueOrDefault(i.username),o.card.number=this.getValueOrDefault(i.creditNumber),o.card.brand=this.getCardBrand(o.card.number),o.card.code=this.getValueOrDefault(i.creditCvv),this.isNullOrWhitespace(i.creditExpiry)||this.setCardExpiration(o,i.creditExpiry)||this.processKvp(o,"Expiration",i.creditExpiry),this.isNullOrWhitespace(i.password)||this.processKvp(o,"PIN",i.password)}this.convertToNoteIfNeeded(o),this.cleanupCipher(o),t.ciphers.push(o)}return t.success=!0,Promise.resolve(t)},t}(o.BaseImporter);t.FSecureFskImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.GnomeJsonImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||0===Object.keys(r).length)return n.success=!1,Promise.resolve(n);var i=function(e){if(!r.hasOwnProperty(e)||o.isNullOrWhitespace(e)||0===r[e].length)return"continue";r[e].forEach((function(r){if(!t.isNullOrWhitespace(r.display_name)&&0===r.display_name.indexOf("http")){t.processFolder(n,e);var i=t.initLoginCipher();if(i.name=r.display_name.replace("http://","").replace("https://",""),i.name.length>30&&(i.name=i.name.substring(0,30)),i.login.password=t.getValueOrDefault(r.secret),i.login.uris=t.makeUriArray(r.display_name),null!=r.attributes)for(var o in i.login.username=null!=r.attributes?t.getValueOrDefault(r.attributes.username_value):null,r.attributes)r.attributes.hasOwnProperty(o)&&"username_value"!==o&&"xdg:schema"!==o&&t.processKvp(i,o,r.attributes[o]);t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)}}))},o=this;for(var s in r)i(s);return this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.GnomeJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KasperskyTxtImporter=void 0;var o=n(27),a=n(28),s="Notes\n\n",l="Applications\n\n",c="Websites\n\n",p="\n---\n",u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t,n,r,i,o=this,p=new a.ImportResult,u=this.splitNewLine(e).join("\n");-1!==u.indexOf(s)&&((i=u.split(s)).length>1&&(u=i[0],t=i[1]));-1!==u.indexOf(l)&&((i=u.split(l)).length>1&&(u=i[0],n=i[1]));0===u.indexOf(c)&&((i=u.split(c)).length>1&&(u=i[0],r=i[1]));var d=this.parseDataCategory(t),m=this.parseDataCategory(n),f=this.parseDataCategory(r);return d.forEach((function(e){var t=o.initLoginCipher();t.name=o.getValueOrDefault(e.get("Name")),t.notes=o.getValueOrDefault(e.get("Text")),o.cleanupCipher(t),p.ciphers.push(t)})),f.concat(m).forEach((function(e){var t=o.initLoginCipher(),n=e.has("Website name")?"Website name":"Application";t.name=o.getValueOrDefault(e.get(n),""),o.isNullOrWhitespace(e.get("Login name"))||(o.isNullOrWhitespace(t.name)||(t.name+=": "),t.name+=e.get("Login name")),t.notes=o.getValueOrDefault(e.get("Comment")),e.has("Website URL")&&(t.login.uris=o.makeUriArray(e.get("Website URL"))),t.login.username=o.getValueOrDefault(e.get("Login")),t.login.password=o.getValueOrDefault(e.get("Password")),o.cleanupCipher(t),p.ciphers.push(t)})),p.success=!0,Promise.resolve(p)},t.prototype.parseDataCategory=function(e){if(this.isNullOrWhitespace(e)||-1===e.indexOf(p))return[];var t=[];return e.split(p).forEach((function(e){if(-1!==e.indexOf("\n")){var n,r,i=new Map;e.split("\n").forEach((function(e){if(null==n){var t,o,a=e.indexOf(":");-1!==a&&(t=e.substring(0,a),e.length>a+1&&(o=e.substring(a+2)),null!=t&&i.set(t,o),"Comment"!==t&&"Text"!==t||(n=o,r=t))}else n+="\n"+e})),null!=n&&null!=r&&i.set(r,n),0!==i.size&&t.push(i)}})),t},t}(o.BaseImporter);t.KasperskyTxtImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeePass2XmlImporter=void 0;var o=n(27),a=n(118),s=n(28),l=n(126),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new s.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this.parseXml(e);if(null==t)return this.result.success=!1,Promise.resolve(this.result);var 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))},t.prototype.traverse=function(e,t,n){var r=this,i=this.result.folders.length,o=n;if(!t){""!==o&&(o+="/");var s=this.querySelectorDirectChild(e,"Name");o+=null==s?"-":s.textContent;var c=new l.FolderView;c.name=o,this.result.folders.push(c)}this.querySelectorAllDirectChild(e,"Entry").forEach((function(e){var n=r.result.ciphers.length,o=r.initLoginCipher();r.querySelectorAllDirectChild(e,"String").forEach((function(e){var t=r.querySelectorDirectChild(e,"Value"),n=null!=t?t.textContent:null;if(!r.isNullOrWhitespace(n)){var i=r.querySelectorDirectChild(e,"Key"),s=null!=i?i.textContent:null;if("URL"===s)o.login.uris=r.makeUriArray(n);else if("UserName"===s)o.login.username=n;else if("Password"===s)o.login.password=n;else if("otp"===s)o.login.totp=n.replace("key=","");else if("Title"===s)o.name=n;else if("Notes"===s)o.notes+=n+"\n";else{var l=a.FieldType.Text,c=t.attributes;c.length>0&&null!=c.ProtectInMemory&&"True"===c.ProtectInMemory.value&&(l=a.FieldType.Hidden),r.processKvp(o,s,n,l)}}})),r.cleanupCipher(o),r.result.ciphers.push(o),t||r.result.folderRelationships.push([n,i])})),this.querySelectorAllDirectChild(e,"Group").forEach((function(e){r.traverse(e,!1,o)}))},t}(o.BaseImporter);t.KeePass2XmlImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeePassXCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e.Title)){e.Group=!t.isNullOrWhitespace(e.Group)&&e.Group.startsWith("Root/")?e.Group.replace("Root/",""):e.Group;var r=t.isNullOrWhitespace(e.Group)?null:e.Group;t.processFolder(n,r);var i=t.initLoginCipher();i.notes=t.getValueOrDefault(e.Notes),i.name=t.getValueOrDefault(e.Title,"--"),i.login.username=t.getValueOrDefault(e.Username),i.login.password=t.getValueOrDefault(e.Password),i.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(i),n.ciphers.push(i)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.KeePassXCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.KeeperCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<6)){t.processFolder(n,e[0]);var r=t.initLoginCipher();if(r.notes=t.getValueOrDefault(e[5])+"\n",r.name=t.getValueOrDefault(e[1],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[4]),e.length>7)for(var i=7;i-1){var 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},t.prototype.parseIdentity=function(e){var t=new p.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},t.prototype.parseSecureNote=function(e,t){var n=this.splitNewLine(e.extra),r=!1;if(n.length){var i=n[0].split(":");if(i.length>1&&"NoteType"===i[0]&&("Credit Card"===i[1]||"Address"===i[1])){if("Credit Card"===i[1]){var o=this.parseSecureNoteMapping(t,n,{Number:"number","Name on Card":"cardholderName","Security Code":"code","Expiration Date":"expMonth"});if(this.isNullOrWhitespace(o.expMonth)||","===o.expMonth)o.expMonth=void 0;else{var a=o.expMonth.split(","),s=a[0],l=a[1];if(this.isNullOrWhitespace(s))o.expMonth=void 0;else{var c=new Date(Date.parse(s.trim()+" 1, 2012")).getMonth()+1;isNaN(c)?o.expMonth=void 0:o.expMonth=c.toString()}this.isNullOrWhitespace(l)||(o.expYear=l)}t.type=m.CipherType.Card,t.card=o}else if("Address"===i[1]){o=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=m.CipherType.Identity,t.identity=o}r=!0}}r||(t.secureNote=new d.SecureNoteView,t.secureNote.type=f.SecureNoteType.Generic,t.notes=this.getValueOrDefault(e.extra))},t.prototype.parseSecureNoteMapping=function(e,t,n){var r=this,i={},o=!1;return t.forEach((function(t){var a=null,s=null;if(!o){if(r.isNullOrWhitespace(t))return;var l=t.indexOf(":");if(-1===l?a=t:(a=t.substring(0,l),t.length>l&&(s=t.substring(l+1))),r.isNullOrWhitespace(a)||r.isNullOrWhitespace(s)||"NoteType"===a)return}o?e.notes+="\n"+t:"Notes"===a?(r.isNullOrWhitespace(e.notes)?e.notes=s:e.notes+="\n"+s,o=!0):n.hasOwnProperty(a)?i[n[a]]=s:r.processKvp(e,a,s)})),i},t}(o.BaseImporter);t.LastPassCsvImporter=h},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.LogMeOnceCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<4)){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.login.username=t.getValueOrDefault(e[2]),r.login.password=t.getValueOrDefault(e[3]),r.login.uris=t.makeUriArray(e[1]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.LogMeOnceCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MeldiumCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.DisplayName,"--"),r.notes=t.getValueOrDefault(e.Notes),r.login.username=t.getValueOrDefault(e.UserName),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.Url),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.MeldiumCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MSecureCsvImporter=void 0;var o=n(27),a=n(28),s=n(35),l=n(89),c=n(88),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<3)){var r="Unassigned"!==t.getValueOrDefault(e[0],"Unassigned")?e[0]:null;t.processFolder(n,r);var i=t.initLoginCipher();if(i.name=t.getValueOrDefault(e[2],"--"),"Web Logins"===e[1]||"Login"===e[1])i.login.uris=t.makeUriArray(e[4]),i.login.username=t.getValueOrDefault(e[5]),i.login.password=t.getValueOrDefault(e[6]),i.notes=t.isNullOrWhitespace(e[3])?null:e[3].split("\\n").join("\n");else if(e.length>3){i.type=s.CipherType.SecureNote,i.secureNote=new c.SecureNoteView,i.secureNote.type=l.SecureNoteType.Generic;for(var o=3;o0&&(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}(o.BaseImporter);t.NordPassCsvImporter=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePassword1PifImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(141),c=n(380),p=n(88),u=n(35),d=n(118),m=n(89),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.result=new a.ImportResult,t}return i(t,e),t.prototype.parse=function(e){var t=this;return e.split(this.newLineRegex).forEach((function(e){if(!t.isNullOrWhitespace(e)&&"{"===e[0]){var n=JSON.parse(e);if(!0!==n.trashed){var r=t.initLoginCipher();t.isNullOrWhitespace(n.hmac)?t.processStandardItem(n,r):t.processWinOpVaultItem(n,r),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),t.result.ciphers.push(r)}}})),this.result.success=!0,Promise.resolve(this.result)},t.prototype.processWinOpVaultItem=function(e,t){var n=this;if(null!=e.overview&&(t.name=this.getValueOrDefault(e.overview.title),null!=e.overview.URLs)){var r=[];e.overview.URLs.forEach((function(e){n.isNullOrWhitespace(e.u)||r.push(e.u)})),t.login.uris=this.makeUriArray(r)}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=u.CipherType.Identity,t.identity=new l.IdentityView):(t.type=u.CipherType.Card,t.card=new s.CardView),t.type!==u.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((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")})))},t.prototype.processStandardItem=function(e,t){var n=this;if(t.favorite=!(!e.openContents||!e.openContents.faveIndex),t.name=this.getValueOrDefault(e.title),"securenotes.SecureNote"===e.typeName?(t.type=u.CipherType.SecureNote,t.secureNote=new p.SecureNoteView,t.secureNote.type=m.SecureNoteType.Generic):"wallet.financial.CreditCard"===e.typeName?(t.type=u.CipherType.Card,t.card=new s.CardView):"identities.Identity"===e.typeName?(t.type=u.CipherType.Identity,t.identity=new l.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===u.CipherType.Login&&(this.isNullOrWhitespace(e.secureContents.password)||(t.login.password=e.secureContents.password),null!=e.secureContents.URLs)){var r=[];e.secureContents.URLs.forEach((function(e){n.isNullOrWhitespace(e.url)||r.push(e.url)})),r.length>0&&(t.login.uris=this.makeUriArray(r))}null!=e.secureContents.fields&&this.parseFields(e.secureContents.fields,t,"designation","value","name"),null!=e.secureContents.sections&&e.secureContents.sections.forEach((function(e){null!=e.fields&&n.parseFields(e.fields,t,"n","v","t")}))}},t.prototype.parsePasswordHistory=function(e,t){var n=this,r=e.length>5?5:e.length;t.passwordHistory=e.filter((function(e){return!n.isNullOrWhitespace(e.value)&&null!=e.time})).sort((function(e,t){return t.time-e.time})).slice(0,r).map((function(e){var t=new c.PasswordHistoryView;return t.password=e.value,t.lastUsedDate=new Date((""+e.time).length>=13?e.time:1e3*e.time),t}))},t.prototype.parseFields=function(e,t,n,r,i){var o=this;e.forEach((function(e){if(null!=e[r]&&""!==e[r].toString().trim()){var a=e[r].toString(),s=null!=e[n]?e[n].toString():null;if(t.type===u.CipherType.Login){if(o.isNullOrWhitespace(t.login.username)&&"username"===s)return void(t.login.username=a);if(o.isNullOrWhitespace(t.login.password)&&"password"===s)return void(t.login.password=a);if(o.isNullOrWhitespace(t.login.totp)&&null!=s&&s.startsWith("TOTP_"))return void(t.login.totp=a)}else if(t.type===u.CipherType.Card){if(o.isNullOrWhitespace(t.card.number)&&"ccnum"===s)return t.card.number=a,void(t.card.brand=o.getCardBrand(a));if(o.isNullOrWhitespace(t.card.code)&&"cvv"===s)return void(t.card.code=a);if(o.isNullOrWhitespace(t.card.cardholderName)&&"cardholder"===s)return void(t.card.cardholderName=a);if(o.isNullOrWhitespace(t.card.expiration)&&"expiry"===s&&6===a.length)return t.card.expMonth=a.substr(4,2),"0"===t.card.expMonth[0]&&(t.card.expMonth=t.card.expMonth.substr(1,1)),void(t.card.expYear=a.substr(0,4));if("type"===s)return}else if(t.type===u.CipherType.Identity){var l=t.identity;if(o.isNullOrWhitespace(l.firstName)&&"firstname"===s)return void(l.firstName=a);if(o.isNullOrWhitespace(l.lastName)&&"lastname"===s)return void(l.lastName=a);if(o.isNullOrWhitespace(l.middleName)&&"initial"===s)return void(l.middleName=a);if(o.isNullOrWhitespace(l.phone)&&"defphone"===s)return void(l.phone=a);if(o.isNullOrWhitespace(l.company)&&"company"===s)return void(l.company=a);if(o.isNullOrWhitespace(l.email)&&"email"===s)return void(l.email=a);if(o.isNullOrWhitespace(l.username)&&"username"===s)return void(l.username=a);if("address"===s){var c=e[r],p=c.street,m=c.city,f=c.country,h=c.zip;return l.address1=o.getValueOrDefault(p),l.city=o.getValueOrDefault(m),o.isNullOrWhitespace(f)||(l.country=f.toUpperCase()),void(l.postalCode=o.getValueOrDefault(h))}}var v=o.isNullOrWhitespace(e[i])?"no_name":e[i];if("password"!==v||null==t.passwordHistory||!t.passwordHistory.some((function(e){return e.password===a}))){var y="concealed"===e.k?d.FieldType.Hidden:d.FieldType.Text;o.processKvp(t,v,a,y)}}}))},t}(o.BaseImporter);t.OnePassword1PifImporter=f},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordMacCsvImporter=void 0;var o=n(661),a=n(35),s=n(662),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.setCipherType=function(e,t){switch(this.getValueOrDefault(this.getProp(e,"type"),"Login")){case"Credit Card":t.type=a.CipherType.Card,t.card=new s.CardView,o.IgnoredProperties.push("type");break;case"Identity":t.type=a.CipherType.Identity,t.identity=new s.IdentityView,o.IgnoredProperties.push("type");break;case"Login":case"Secure Note":o.IgnoredProperties.push("type")}},t}(o.OnePasswordCsvImporter);t.OnePasswordMacCsvImporter=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CipherImportContext=void 0;var r=function(e,t,n){this.importRecord=e,this.property=t,this.cipher=n,this.lowerProperty=t.toLowerCase()};t.CipherImportContext=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;var r=function(){};t.View=r},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.OnePasswordWinCsvImporter=void 0;var o=n(661),a=n(35),s=n(662),l=function(e){function t(){var t=e.call(this)||this;return t.identityPropertyParsers.push(t.setIdentityAddress),t}return i(t,e),t.prototype.setCipherType=function(e,t){t.type=a.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=a.CipherType.Card,t.card=new s.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=a.CipherType.Identity,t.identity=new s.IdentityView)},t.prototype.setIdentityAddress=function(e){return!!e.lowerProperty.match(/address \d+: address/i)&&(this.processKvp(e.cipher,"address",e.importRecord[e.property]),!0)},t.prototype.setCreditCardExpiry=function(e){if(this.isNullOrWhitespace(e.cipher.card.expiration)&&e.lowerProperty.includes("expiry date")){var 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}(o.OnePasswordCsvImporter);t.OnePasswordWinCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PadlockCsvImporter=void 0;var o=n(27),a=n(28),s=n(154),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=null;return r.forEach((function(e){if(null!=i){if(!(e.length<2||e.length!==i.length)){if(!t.isNullOrWhitespace(e[1]))if(t.organization){(r=e[1].split(",")).forEach((function(e){e=e.trim();for(var t=!0,r=n.collections.length,i=0;i0?r[0].trim():null;t.processFolder(n,o)}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e[0],"--");for(var l=2;l-1?a.login.username=e[l]:t.passwordFieldNames.indexOf(c)>-1?a.login.password=e[l]:t.uriFieldNames.indexOf(c)>-1?a.login.uris=t.makeUriArray(e[l]):t.processKvp(a,i[l],e[l]))}t.cleanupCipher(a),n.ciphers.push(a)}}else i=e.map((function(e){return e}))})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PadlockCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PassKeepCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){t.processFolder(n,t.getValue("category",e));var r=t.initLoginCipher();r.notes=t.getValue("description",e),r.name=t.getValueOrDefault(t.getValue("title",e),"--"),r.login.username=t.getValue("username",e),r.login.password=t.getValue("password",e),r.login.uris=t.makeUriArray(t.getValue("site",e)),t.processKvp(r,"Password 2",t.getValue("password2",e)),t.cleanupCipher(r),n.ciphers.push(r)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.getValue=function(e,t){return this.getValueOrDefault(t[e],this.getValueOrDefault(t[" "+e]))},t}(o.BaseImporter);t.PassKeepCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PassmanJsonImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);return null==r||0===r.length?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(null!=e.tags&&e.tags.length>0){var r=e.tags[0].text;t.processFolder(n,r)}var i=t.initLoginCipher();i.name=e.label,i.login.username=t.getValueOrDefault(e.username),t.isNullOrWhitespace(i.login.username)?i.login.username=t.getValueOrDefault(e.email):t.isNullOrWhitespace(e.email)||(i.notes="Email: "+e.email+"\n"),i.login.password=t.getValueOrDefault(e.password),i.login.uris=t.makeUriArray(e.url),i.notes+=t.getValueOrDefault(e.description,""),null!=e.otp&&(i.login.totp=t.getValueOrDefault(e.otp.secret)),null!=e.custom_fields&&e.custom_fields.forEach((function(e){switch(e.field_type){case"text":case"password":t.processKvp(i,e.label,e.value)}})),t.convertToNoteIfNeeded(i),t.cleanupCipher(i),n.ciphers.push(i)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PassmanJsonImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasspackCsvImporter=void 0;var o=n(27),a=n(28),s=n(154),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.isNullOrWhitespace(e.Tags)?null:JSON.parse(e.Tags),i=null!=r&&null!=r.tags&&r.tags.length>0?r.tags.map((function(e){try{var n=JSON.parse(e);return t.getValueOrDefault(n.tag)}catch(r){}return null})).filter((function(e){return!t.isNullOrWhitespace(e)})):null;t.organization&&null!=i&&i.length>0?i.forEach((function(e){for(var t=!0,r=n.collections.length,i=0;i0&&t.processFolder(n,i[0]);var o=t.initLoginCipher();o.notes=t.getValueOrDefault(e.Notes,""),o.notes+="\n\n"+t.getValueOrDefault(e["Shared Notes"],"")+"\n",o.name=t.getValueOrDefault(e["Entry Name"],"--"),o.login.username=t.getValueOrDefault(e["User ID"]),o.login.password=t.getValueOrDefault(e.Password),o.login.uris=t.makeUriArray(e.URL),null!=e.__parsed_extra&&e.__parsed_extra.length>0&&e.__parsed_extra.forEach((function(e){t.isNullOrWhitespace(e)||(o.notes+="\n"+e)}));var a=t.isNullOrWhitespace(e["Extra Fields"])?null:JSON.parse(e["Extra Fields"]),l=null!=a&&null!=a.extraFields&&a.extraFields.length>0?a.extraFields.map((function(e){try{return JSON.parse(e)}catch(t){}return null})):null;null!=l&&l.forEach((function(e){null!=e&&t.processKvp(o,e.name,e.data)})),t.cleanupCipher(o),n.ciphers.push(o)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasspackCsvImporter=l},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordAgentCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);if(null==r)return n.success=!1,Promise.resolve(n);var i=!0;return r.forEach((function(e){if(!(5!==e.length&&e.length<9)){var r=10===e.length&&"0"===e[0],o=t.initLoginCipher();if(o.name=t.getValueOrDefault(e[r?1:0],"--"),o.login.username=t.getValueOrDefault(e[r?2:1]),o.login.password=t.getValueOrDefault(e[r?3:2]),5===e.length)i=!1,o.notes=t.getValueOrDefault(e[4]),o.login.uris=t.makeUriArray(e[3]);else{var a=t.getValueOrDefault(e[r?9:8],"(None)"),s="(None)"!==a?a.split("\\").join("/"):null;null!=s&&(s=a.split(" > ").join("/"),s=a.split(">").join("/")),t.processFolder(n,s),o.notes=t.getValueOrDefault(e[r?5:3]),o.login.uris=t.makeUriArray(e[4])}t.convertToNoteIfNeeded(o),t.cleanupCipher(o),n.ciphers.push(o)}})),i&&this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordAgentCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordBossJsonImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(126),c=n(35),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=JSON.parse(e);if(null==r||null==r.items)return n.success=!1,Promise.resolve(n);var i=new Map;r.folders.forEach((function(e){i.set(e.id,e.name)}));var o=new Map;return i.forEach((function(e,t){o.set(t,n.folders.length);var r=new l.FolderView;r.name=e,n.folders.push(r)})),r.items.forEach((function(e){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name,"--"),r.login.uris=t.makeUriArray(e.login_url),null!=e.folder&&o.has(e.folder)&&n.folderRelationships.push([n.ciphers.length,o.get(e.folder)]),null!=e.identifiers){for(var i in t.isNullOrWhitespace(e.identifiers.notes)||(r.notes=e.identifiers.notes.split("\\r\\n").join("\n").split("\\n").join("\n")),"CreditCard"===e.type&&(r.card=new s.CardView,r.type=c.CipherType.Card),e.identifiers)if(e.identifiers.hasOwnProperty(i)){var a=e.identifiers[i],l=null!=a?a.toString():null;if(!t.isNullOrWhitespace(l)&&"notes"!==i&&"ignoreItemInSecurityScore"!==i)if("custom_fields"!==i){if(r.type===c.CipherType.Card){if("cardNumber"===i){r.card.number=l,r.card.brand=t.getCardBrand(l);continue}if("nameOnCard"===i){r.card.cardholderName=l;continue}if("security_code"===i){r.card.code=l;continue}if("expires"===i){try{var p=new Date(l);r.card.expYear=p.getFullYear().toString(),r.card.expMonth=(p.getMonth()+1).toString()}catch(u){}continue}if("cardType"===i)continue}else{if(("username"===i||"email"===i)&&t.isNullOrWhitespace(r.login.username)){r.login.username=l;continue}if("password"===i){r.login.password=l;continue}if("totp"===i){r.login.totp=l;continue}if((null==r.login.uris||0===r.login.uris.length)&&t.uriFieldNames.indexOf(i)>-1){r.login.uris=t.makeUriArray(l);continue}}t.processKvp(r,i,l)}else a.forEach((function(e){t.processKvp(r,e.name,e.value)}))}t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordBossJsonImporter=p},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordDragonXmlImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelectorAll("PasswordManager > record");return Array.from(i).forEach((function(e){var r=t.querySelectorDirectChild(e,"Category"),i=null==r||t.isNullOrWhitespace(r.textContent)||"Unfiled"===r.textContent?null:r.textContent;t.processFolder(n,i);var o=t.querySelectorDirectChild(e,"Account-Name"),a=t.querySelectorDirectChild(e,"User-Id"),s=t.querySelectorDirectChild(e,"Password"),l=t.querySelectorDirectChild(e,"URL"),c=t.querySelectorDirectChild(e,"Notes"),p=t.initLoginCipher();p.name=null!=o?t.getValueOrDefault(o.textContent,"--"):"--",p.notes=null!=c?t.getValueOrDefault(c.textContent):"",p.login.username=null!=a?t.getValueOrDefault(a.textContent):null,p.login.password=null!=s?t.getValueOrDefault(s.textContent):null,p.login.uris=null!=l?t.makeUriArray(l.textContent):null;for(var u=[],d=1;d<=10;d++)u.push("Attribute-"+d);t.querySelectorAllDirectChild(e,u.join(",")).forEach((function(e){t.isNullOrWhitespace(e.textContent)||"null"===e.textContent||t.processKvp(p,e.tagName,e.textContent)})),t.cleanupCipher(p),n.ciphers.push(p)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordDragonXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordSafeXmlImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);var i=r.querySelector("passwordsafe");if(null==i)return n.errorMessage="Missing `passwordsafe` node.",n.success=!1,Promise.resolve(n);var o=i.getAttribute("delimiter"),s=r.querySelectorAll("passwordsafe > entry");return Array.from(s).forEach((function(e){var r=t.querySelectorDirectChild(e,"group"),i=null==r||t.isNullOrWhitespace(r.textContent)?null:r.textContent.split(".").join("/");t.processFolder(n,i);var a=t.querySelectorDirectChild(e,"title"),s=t.querySelectorDirectChild(e,"username"),l=t.querySelectorDirectChild(e,"email"),c=t.querySelectorDirectChild(e,"password"),p=t.querySelectorDirectChild(e,"url"),u=t.querySelectorDirectChild(e,"notes"),d=t.initLoginCipher();d.name=null!=a?t.getValueOrDefault(a.textContent,"--"):"--",d.notes=null!=u?t.getValueOrDefault(u.textContent,"").split(o).join("\n"):null,d.login.username=null!=s?t.getValueOrDefault(s.textContent):null,d.login.password=null!=c?t.getValueOrDefault(c.textContent):null,d.login.uris=null!=p?t.makeUriArray(p.textContent):null,t.isNullOrWhitespace(d.login.username)&&null!=l?d.login.username=t.getValueOrDefault(l.textContent):null==l||t.isNullOrWhitespace(l.textContent)||(d.notes=t.isNullOrWhitespace(d.notes)?"Email: "+l.textContent:d.notes+"\nEmail: "+l.textContent),t.cleanupCipher(d),n.ciphers.push(d)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.PasswordSafeXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordWalletTxtImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!(e.length<1)){e.length>5&&t.processFolder(n,e[5]);var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),e.length>4&&(r.notes=t.getValueOrDefault(e[4],"").split("¬").join("\n")),e.length>2&&(r.login.username=t.getValueOrDefault(e[2])),e.length>3&&(r.login.password=t.getValueOrDefault(e[3])),e.length>1&&(r.login.uris=t.makeUriArray(e[1])),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.PasswordWalletTxtImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RememBearCsvImporter=void 0;var o=n(27),a=n(35),s=n(28),l=n(80),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new s.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if("true"!==e.trash){var r=t.initLoginCipher();if(r.name=t.getValueOrDefault(e.name),r.notes=t.getValueOrDefault(e.notes),"LoginItem"===e.type)r.login.uris=t.makeUriArray(e.website),r.login.password=t.getValueOrDefault(e.password),r.login.username=t.getValueOrDefault(e.username);else if("CreditCardItem"===e.type){r.type=a.CipherType.Card,r.card=new l.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),r.card.code=t.getValueOrDefault(e.verification);try{var i=t.getValueOrDefault(e.expiryMonth);if(null!=i){var o=parseInt(i,null);null!=o&&o>=1&&o<=12&&(r.card.expMonth=o.toString())}}catch(d){}try{var s=t.getValueOrDefault(e.expiryYear);if(null!=s){var c=parseInt(s,null);null!=c&&(r.card.expYear=c.toString())}}catch(m){}var p=t.getValueOrDefault(e.pin);null!=p&&t.processKvp(r,"PIN",p);var u=t.getValueOrDefault(e.zipCode);null!=u&&t.processKvp(r,"Zip Code",u)}t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.RememBearCsvImporter=c},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.RoboFormCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);if(null==r)return n.success=!1,Promise.resolve(n);var i=1;return r.forEach((function(e){var o=!t.isNullOrWhitespace(e.Folder)&&e.Folder.startsWith("/")?e.Folder.replace("/",""):e.Folder,a=t.isNullOrWhitespace(o)?null:o;t.processFolder(n,a);var s=t.initLoginCipher();if(s.notes=t.getValueOrDefault(e.Note),s.name=t.getValueOrDefault(e.Name,"--"),s.login.username=t.getValueOrDefault(e.Login),s.login.password=t.getValueOrDefault(e.Pwd),s.login.uris=t.makeUriArray(e.Url),!t.isNullOrWhitespace(e.Rf_fields)){var l=[e.Rf_fields];null!=e.__parsed_extra&&e.__parsed_extra.length>0&&(l=l.concat(e.__parsed_extra)),l.forEach((function(e){var n=e.split(":");if(!(n.length<3)){var r="-no-name-"===n[0]?null:n[0],i=4===n.length&&"rck"===n[2]?n[1]:n[2];t.processKvp(s,r,i)}}))}t.convertToNoteIfNeeded(s),t.cleanupCipher(s),i===r.length&&"--"===s.name&&t.isNullOrWhitespace(s.login.password)||(n.ciphers.push(s),i++)})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t}(o.BaseImporter);t.RoboFormCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.SafeInCloudXmlImporter=void 0;var o=n(27),a=n(28),s=n(126),l=n(88),c=n(35),p=n(89),u=n(1201),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseXml(e);if(null==r)return n.success=!1,Promise.resolve(n);if(null==r.querySelector("database"))return n.errorMessage="Missing `database` node.",n.success=!1,Promise.resolve(n);var i=new Map;return Array.from(r.querySelectorAll("database > label")).forEach((function(e){var r=e.getAttribute("name"),o=e.getAttribute("id");if(!t.isNullOrWhitespace(r)&&!t.isNullOrWhitespace(o)){i.set(o,n.folders.length);var a=new s.FolderView;a.name=r,n.folders.push(a)}})),Array.from(r.querySelectorAll("database > card")).forEach((function(e){if("true"!==e.getAttribute("template")&&"true"!==e.getAttribute("deleted")){var r=t.querySelectorDirectChild(e,"label_id");if(null!=r){var o=r.textContent;!t.isNullOrWhitespace(o)&&i.has(o)&&n.folderRelationships.push([n.ciphers.length,i.get(o)])}var a=t.initLoginCipher();a.name=t.getValueOrDefault(e.getAttribute("title"),"--"),"true"===e.getAttribute("star")&&(a.favorite=!0),"note"===e.getAttribute("type")?(a.type=c.CipherType.SecureNote,a.secureNote=new l.SecureNoteView,a.secureNote.type=p.SecureNoteType.Generic):Array.from(t.querySelectorAllDirectChild(e,"field")).forEach((function(e){var n=e.textContent;if(!t.isNullOrWhitespace(n)){var r=e.getAttribute("name"),i=t.getValueOrDefault(e.getAttribute("type"),"").toLowerCase();"login"===i?a.login.username=n:"password"===i||"secret"===i?t.processKvp(a,r,n,u.FieldType.Hidden):"one_time_password"===i?a.login.totp=n:"notes"===i?a.notes+=n+"\n":"weblogin"===i||"website"===i?a.login.uris=t.makeUriArray(n):t.processKvp(a,r,n)}})),Array.from(t.querySelectorAllDirectChild(e,"notes")).forEach((function(e){a.notes+=e.textContent+"\n"})),t.setPassword(a),t.cleanupCipher(a),n.ciphers.push(a)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.setPassword=function(e){var t=e.fields.filter((function(e){return e.type===u.FieldType.Hidden}));if(t.length){for(var n,r=0,i=t;r Database > Logins > Login");return Array.from(i).forEach((function(e){var i=e.getAttribute("ID");if(!t.isNullOrWhitespace(i)){var o=e.getAttribute("Name"),a=e.getAttribute("Password"),s=null,l=null,c=null,p=null,u=null,d=r.querySelector('root > Database > Accounts > Account > LoginLinks > Login[SourceLoginID="'+i+'"]');if(null!=d){var m=d.parentElement.parentElement;null!=m&&(s=m.getAttribute("Name"),l=m.getAttribute("Link"),p=m.getAttribute("ParentID"),c=m.getAttribute("Comments"),t.isNullOrWhitespace(c)||(c=c.split("/n").join("\n")))}t.isNullOrWhitespace(p)||(u=t.buildGroupText(r,p,""),t.processFolder(n,u));var f=t.initLoginCipher();f.name=t.getValueOrDefault(s,"--"),f.notes=t.getValueOrDefault(c),f.login.username=t.getValueOrDefault(o),f.login.password=t.getValueOrDefault(a),f.login.uris=t.makeUriArray(l),t.cleanupCipher(f),n.ciphers.push(f)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n)},t.prototype.buildGroupText=function(e,t,n){var r=e.querySelector('root > Database > Groups > Group[ID="'+t+'"]');return null==r?n:(this.isNullOrWhitespace(n)||(n="/"+n),n=r.getAttribute("Name")+n,this.buildGroupText(e,r.getAttribute("ParentID"),n))},t}(o.BaseImporter);t.StickyPasswordXmlImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.TrueKeyCsvImporter=void 0;var o=n(27),a=n(28),s=n(80),l=n(88),c=n(35),p=n(89),u=["kind","autologin","favorite","hexcolor","protectedwithpassword","subdomainonly","type","tk_export_version","note","title","document_content"],d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();if(r.favorite="true"===t.getValueOrDefault(e.favorite,"").toLowerCase(),r.name=t.getValueOrDefault(e.name,"--"),r.notes=t.getValueOrDefault(e.memo,""),r.login.username=t.getValueOrDefault(e.login),r.login.password=t.getValueOrDefault(e.password),r.login.uris=t.makeUriArray(e.url),"login"!==e.kind&&(r.name=t.getValueOrDefault(e.title,"--"),r.notes=t.getValueOrDefault(e.note,"")),"cc"===e.kind){if(r.type=c.CipherType.Card,r.card=new s.CardView,r.card.cardholderName=t.getValueOrDefault(e.cardholder),r.card.number=t.getValueOrDefault(e.number),r.card.brand=t.getCardBrand(r.card.number),!t.isNullOrWhitespace(e.expiryDate))try{var i=new Date(e.expiryDate);r.card.expYear=i.getFullYear().toString(),r.card.expMonth=(i.getMonth()+1).toString()}catch(a){}}else if("login"!==e.kind)for(var o in r.type=c.CipherType.SecureNote,r.secureNote=new l.SecureNoteView,r.secureNote.type=p.SecureNoteType.Generic,t.isNullOrWhitespace(r.notes)||(r.notes=t.getValueOrDefault(e.document_content,"")),e)e.hasOwnProperty(o)&&u.indexOf(o.toLowerCase())<0&&!t.isNullOrWhitespace(e[o])&&t.processKvp(r,o,e[o]);t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.TrueKeyCsvImporter=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.UpmCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!1);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(5===e.length){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e[0],"--"),r.notes=t.getValueOrDefault(e[4]),r.login.username=t.getValueOrDefault(e[1]),r.login.password=t.getValueOrDefault(e[2]),r.login.uris=t.makeUriArray(e[3]),t.cleanupCipher(r),n.ciphers.push(r)}})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.UpmCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.YotiCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){var r=t.initLoginCipher();r.name=t.getValueOrDefault(e.Name,"--"),r.login.username=t.getValueOrDefault(e["User name"]),r.login.password=t.getValueOrDefault(e.Password),r.login.uris=t.makeUriArray(e.URL),t.cleanupCipher(r),n.ciphers.push(r)})),n.success=!0,Promise.resolve(n))},t}(o.BaseImporter);t.YotiCsvImporter=s},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ZohoVaultCsvImporter=void 0;var o=n(27),a=n(28),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.parse=function(e){var t=this,n=new a.ImportResult,r=this.parseCsv(e,!0);return null==r?(n.success=!1,Promise.resolve(n)):(r.forEach((function(e){if(!t.isNullOrWhitespace(e["Password Name"])||!t.isNullOrWhitespace(e["Secret Name"])){t.processFolder(n,t.getValueOrDefault(e.ChamberName));var r=t.initLoginCipher();r.favorite="1"===t.getValueOrDefault(e.Favorite,"0"),r.notes=t.getValueOrDefault(e.Notes),r.name=t.getValueOrDefault(e["Password Name"],t.getValueOrDefault(e["Secret Name"],"--")),r.login.uris=t.makeUriArray(t.getValueOrDefault(e["Password URL"],t.getValueOrDefault(e["Secret URL"]))),t.parseData(r,e.SecretData),t.parseData(r,e.CustomData),t.convertToNoteIfNeeded(r),t.cleanupCipher(r),n.ciphers.push(r)}})),this.organization&&this.moveFoldersToCollections(n),n.success=!0,Promise.resolve(n))},t.prototype.parseData=function(e,t){var n=this;this.isNullOrWhitespace(t)||this.splitNewLine(t).forEach((function(t){var r=t.indexOf(":");if(!(r<0)){var i=t.substring(0,r),o=t.length>r?t.substring(r+1):null;if(!n.isNullOrWhitespace(i)&&!n.isNullOrWhitespace(o)&&"SecretType"!==i){var a=i.toLowerCase();null==e.login.username&&n.usernameFieldNames.indexOf(a)>-1?e.login.username=o:null==e.login.password&&n.passwordFieldNames.indexOf(a)>-1?e.login.password=o:n.processKvp(e,i,o)}}}))},t}(o.BaseImporter);t.ZohoVaultCsvImporter=s},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]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))})),[2,t]}}))}))},e.prototype.evaluateMasterPassword=function(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))))))},e.prototype.getResetPasswordPolicyOptions=function(e,t){var n,r,i,o=new l.ResetPasswordPolicyOptions;if(null==e||null==t)return[o,!1];var a=e.find((function(e){return e.organizationId===t&&e.type===c.PolicyType.ResetPassword&&e.enabled}));return o.autoEnrollEnabled=null!==(r=null===(n=null==a?void 0:a.data)||void 0===n?void 0:n.autoEnrollEnabled)&&void 0!==r&&r,[o,null!==(i=null==a?void 0:a.enabled)&&void 0!==i&&i]},e.prototype.mapPoliciesFromToken=function(e){return null==e||null==e.data?null:e.data.map((function(e){return new o.PolicyData(e)})).map((function(e){return new s.Policy(e)}))},e}();t.PolicyService=u},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.MasterPasswordPolicyOptions=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.minComplexity=0,t.minLength=0,t.requireUpper=!1,t.requireLower=!1,t.requireNumbers=!1,t.requireSpecial=!1,t}return i(t,e),t}(n(68).default);t.MasterPasswordPolicyOptions=o},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPasswordPolicyOptions=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.autoEnrollEnabled=!1,t}return i(t,e),t}(n(68).default);t.ResetPasswordPolicyOptions=o},function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]"))},e.prototype.indexCiphers=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s=this;return i(this,(function(i){switch(i.label){case 0:return this.indexing?[2]:(this.logService.time("search indexing"),this.indexing=!0,this.indexedEntityId=e,this.index=null,(n=new o.Builder).ref("id"),n.field("shortid",{boost:100,extractor:function(e){return e.id.substr(0,8)}}),n.field("name",{boost:10}),n.field("subtitle",{boost:5,extractor:function(e){return null!=e.subTitle&&e.type===a.CipherType.Card?e.subTitle.replace(/\*/g,""):e.subTitle}}),n.field("notes"),n.field("login.username",{extractor:function(e){return e.type===a.CipherType.Login&&null!=e.login?e.login.username:null}}),n.field("login.uris",{boost:2,extractor:function(e){return s.uriExtractor(e)}}),n.field("fields",{extractor:function(e){return s.fieldExtractor(e,!1)}}),n.field("fields_joined",{extractor:function(e){return s.fieldExtractor(e,!0)}}),n.field("attachments",{extractor:function(e){return s.attachmentExtractor(e,!1)}}),n.field("attachments_joined",{extractor:function(e){return s.attachmentExtractor(e,!0)}}),n.field("organizationid",{extractor:function(e){return e.organizationId}}),(r=t)?[3,2]:[4,this.cipherService.getAllDecrypted()]);case 1:r=i.sent(),i.label=2;case 2:return(t=r).forEach((function(e){return n.add(e)})),this.index=n.build(),this.indexing=!1,this.logService.timeEnd("search indexing"),[2]}}))}))},e.prototype.searchCiphers=function(e,t,n){return void 0===t&&(t=null),void 0===n&&(n=null),r(this,void 0,void 0,(function(){var r,a,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=[],null!=e&&(e=e.trim().toLowerCase()),""===e&&(e=null),null!=n?[3,2]:[4,this.cipherService.getAllDecrypted()];case 1:n=i.sent(),i.label=2;case 2:return null!=t&&Array.isArray(t)&&t.length>0?n=n.filter((function(e){return t.every((function(t){return null==t||t(e)}))})):null!=t&&(n=n.filter(t)),this.isSearchable(e)?this.indexing?[4,new Promise((function(e){return setTimeout(e,250)}))]:[3,5]:[2,n];case 3:return i.sent(),this.indexing?[4,new Promise((function(e){return setTimeout(e,500)}))]:[3,5];case 4:i.sent(),i.label=5;case 5:if(null==(a=this.getIndexForSearch()))return[2,this.searchCiphersBasic(n,e)];if(s=new Map,n.forEach((function(e){return s.set(e.id,e)})),l=null,null!=e&&e.length>1&&0===e.indexOf(">"))try{l=a.search(e.substr(1).trim())}catch(p){}else c=o.Query.wildcard.LEADING|o.Query.wildcard.TRAILING,l=a.query((function(t){o.tokenizer(e).forEach((function(e){var n=e.toString();t.term(n,{fields:["name"],wildcard:c}),t.term(n,{fields:["subtitle"],wildcard:c}),t.term(n,{fields:["login.uris"],wildcard:c}),t.term(n,{})}))}));return null!=l&&l.forEach((function(e){s.has(e.ref)&&r.push(s.get(e.ref))})),[2,r]}}))}))},e.prototype.searchCiphersBasic=function(e,t,n){return void 0===n&&(n=!1),t=t.trim().toLowerCase(),e.filter((function(e){return 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))))}))},e.prototype.searchSends=function(e,t){return t=t.trim().toLocaleLowerCase(),e.filter((function(e){var n,r,i;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===(r=e.text)||void 0===r?void 0:r.text)&&e.text.text.toLowerCase().indexOf(t)>-1||(null!=(null===(i=e.file)||void 0===i?void 0:i.fileName)&&e.file.fileName.toLowerCase().indexOf(t)>-1||void 0))))}))},e.prototype.getIndexForSearch=function(){return this.index},e.prototype.fieldExtractor=function(e,t){if(!e.hasFields)return null;var n=[];return e.fields.forEach((function(e){null!=e.name&&n.push(e.name),e.type===s.FieldType.Text&&null!=e.value&&n.push(e.value)})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.attachmentExtractor=function(e,t){if(!e.hasAttachments)return null;var n=[];return e.attachments.forEach((function(e){null!=e&&null!=e.fileName&&(t&&e.fileName.indexOf(".")>-1?n.push(e.fileName.substr(0,e.fileName.lastIndexOf("."))):n.push(e.fileName))})),0===(n=n.filter((function(e){return""!==e.trim()}))).length?null:t?n.join(" "):n},e.prototype.uriExtractor=function(e){if(e.type!==a.CipherType.Login||null==e.login||!e.login.hasUris)return null;var t=[];return e.login.uris.forEach((function(e){if(null!=e.uri&&""!==e.uri)if(null==e.hostname){var n=e.uri;if(e.match!==l.UriMatchType.RegularExpression){var r=n.indexOf("://");r>-1&&(n=n.substr(r+3));var i=n.search(/\?|&|#/);i>-1&&(n=n.substring(0,i))}t.push(n)}else t.push(e.hostname)})),t.length>0?t:null},e}();t.SearchService=c},,function(e,t,n){"use strict";(function(e){var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(t){o(t)}}function s(e){try{l(r.throw(e))}catch(t){o(t)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]0&&i[i.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]-1||n.indexOf(" Version/9.")>-1)}return e.prototype.pbkdf2=function(e,t,n,s){return r(this,void 0,void 0,(function(){var r,l,c,p,u,d,m,f,h;return i(this,(function(i){switch(i.label){case 0:return this.isIE||this.isOldSafari?(r="sha256"===n?32:64,l=this.toByteString(e),c=this.toByteString(t),p=o.pbkdf2(l,c,s,r,n),[2,a.Utils.fromByteStringToArray(p).buffer]):(u="sha256"===n?256:512,d=this.toBuf(e),m=this.toBuf(t),f={name:"PBKDF2",salt:m,iterations:s,hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",d,{name:"PBKDF2"},!1,["deriveBits"])]);case 1:return h=i.sent(),[4,this.subtle.deriveBits(f,h,u)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdf=function(e,t,n,o,a){return r(this,void 0,void 0,(function(){var r,s,l,c;return i(this,(function(i){switch(i.label){case 0:return r=this.toBuf(t),s=this.toBuf(n),l={name:"HKDF",salt:r,info:s,hash:{name:this.toWebCryptoAlgorithm(a)}},[4,this.subtle.importKey("raw",e,{name:"HKDF"},!1,["deriveBits"])];case 1:return c=i.sent(),[4,this.subtle.deriveBits(l,c,8*o)];case 2:return[2,i.sent()]}}))}))},e.prototype.hkdfExpand=function(e,t,n,o){return r(this,void 0,void 0,(function(){var r,a,s,l,c,p,u,d,m,f;return i(this,(function(i){switch(i.label){case 0:if(n>255*(r="sha256"===o?32:64))throw new Error("outputByteSize is too large.");if(new Uint8Array(e).length=n)return[3,4];i.label=3;case 3:return d++,[3,1];case 4:return[2,u.slice(0,n).buffer]}}))}))},e.prototype.hash=function(e,t){return r(this,void 0,void 0,(function(){var n,r,s;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha1"===t||"md5"===t?(n="md5"===t?o.md.md5.create():o.md.sha1.create(),r=this.toByteString(e),n.update(r,"raw"),[2,a.Utils.fromByteStringToArray(n.digest().data).buffer]):(s=this.toBuf(e),[4,this.subtle.digest({name:this.toWebCryptoAlgorithm(t)},s)]);case 1:return[2,i.sent()]}}))}))},e.prototype.hmac=function(e,t,n){return r(this,void 0,void 0,(function(){var r,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return this.isIE&&"sha512"===n?(r=o.hmac.create(),s=this.toByteString(t),l=this.toByteString(e),r.start(n,s),r.update(l,"raw"),[2,a.Utils.fromByteStringToArray(r.digest().data).buffer]):(c={name:"HMAC",hash:{name:this.toWebCryptoAlgorithm(n)}},[4,this.subtle.importKey("raw",t,c,!1,["sign"])]);case 1:return p=i.sent(),[4,this.subtle.sign(c,p,e)];case 2:return[2,i.sent()]}}))}))},e.prototype.compare=function(e,t){return r(this,void 0,void 0,(function(){var n,r,o,a,s,l,c,p;return i(this,(function(i){switch(i.label){case 0:return[4,this.randomBytes(32)];case 1:return n=i.sent(),r={name:"HMAC",hash:{name:"SHA-256"}},[4,this.subtle.importKey("raw",n,r,!1,["sign"])];case 2:return o=i.sent(),[4,this.subtle.sign(r,o,e)];case 3:return a=i.sent(),[4,this.subtle.sign(r,o,t)];case 4:if(s=i.sent(),a.byteLength!==s.byteLength)return[2,!1];for(l=new Uint8Array(a),c=new Uint8Array(s),p=0;p