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,GACV,mBACA,+CACA,4BACD,CAJD,CAAYA,IAAAA,EAAe,KCA3B,SAAYC,GACV,uCACA,sDACA,4CACA,8CACA,gDACA,8CACA,oDACA,8DACA,8DACA,0EACA,sEACA,0EAEA,0CACA,0CACA,0CACA,8DACA,8DACA,wCACA,gEACA,oDACA,oFACA,0FACA,oFACA,oEACA,0EACA,oEACA,4DACA,kDACA,4CACA,wFACA,oFAEA,kDACA,kDACA,kDAEA,wCACA,wCACA,wCAEA,8DACA,kEACA,8DACA,8DACA,0EACA,sEACA,wFACA,4FACA,oFACA,wEACA,0EACA,8DACA,gEACA,sFACA,sFACA,8DACA,wDAEA,sDACA,8DACA,8EACA,kEACA,4DACA,8DACA,8EACA,gFACA,4EACA,8FAEA,0CAEA,sDACA,0DACA,sDACA,sDAEA,sEACA,kEACA,sEACA,kFAEA,6DACA,kEACA,oEACA,0EAEA,6CACD,CAzFD,CAAYA,IAAAA,EAAS,K,ICDTC,ECAAC,ECAAC,E,YFAZ,SAAYF,GACV,4BACA,YACA,YACA,cACA,cACA,gBACA,iBACD,CARD,CAAYA,IAAAA,EAAe,KCA3B,SAAYC,GACV,iBACA,sBACD,CAHD,CAAYA,IAAAA,EAAsB,KCAlC,SAAYC,GACV,2CACA,2CACA,yCACA,2CACA,iCAEA,6BACA,iCACA,2CACA,2CACA,2CACA,oCAEA,wBAEA,wCACA,wCACA,wCAEA,kCACA,kDAEA,8CACA,sEACA,2FACD,CA1BD,CAAYA,IAAAA,EAAgB,I,+BCA5B,IAAYx/C,E,iBAAZ,SAAYA,GACV,cACA,iBACD,CAHD,CAAYA,IAAAA,EAAkB,I,gDCEvB,MAAey/C,G,gDCSf,MAAMC,EAAmB,CAC9B7vF,OAAQ,EACRC,KAAM,EACNC,WAAY,EACZC,MAAO,EACPpqE,kBAAmB,EACnB6kB,MAAO,E,uGCfF,SAASk1I,EAAczyP,GAC5B,OAAa,MAATA,EACK,KAGW,iBAATA,EACFA,EAEFA,aAAK,EAALA,EAAOyH,eA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AcxB,EAAUr9M,QAAQ,QAAU,EAChD,IAAK6+M,GAAexB,EAAUr9M,QAAQ,MAAQ,EAC5Cq9M,EAAY,UAAYA,OACnB,IAAKwB,EACV,OAAO,KAGT,IACE,OAAe,MAAXnD,EACK,IAAIA,EAAQphO,IAAI+iO,GAGlB,IAAI/iO,IAAI+iO,EACjB,CAAE,MAAOjoP,GAET,CAEA,OAAO,IACT,EA5kBO,EAAA6oF,QAAS,EACT,EAAAtzB,QAAS,EACT,EAAAH,WAAY,EACZ,EAAAy5E,iBAAkB,EAClB,EAAA83G,sBAAuB,EACvB,EAAA91L,OAAwB,KAExB,EAAA64L,wBACL,02BACc,EAAAxB,WAAuB,CAAC,aACxB,EAAAt6E,8BAAgC,EAChC,EAAAnzK,sBAAwB,GACxB,EAAAkvP,qBAAuB,IAAIvoP,IAAyB,CAClE,CAAC,aAAc,IAAIiY,IAAI,CAAC,yBAyNnB,EAAA2uO,UAAY,4EAyWrBzB,EAAMt9J,M,gDC3mBC,MAAM2gK,EAAkB,CAC7B,SACA,UACA,YACA,QACA,UACA,UACA,SACA,OACA,WACA,WACA,WACA,UACA,UACA,SACA,WACA,UACA,WACA,WACA,WACA,WACA,UACA,UACA,WACA,SACA,SACA,UACA,YACA,YACA,UACA,WACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,WACA,UACA,OACA,UACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,WACA,WACA,UACA,OACA,UACA,YACA,WACA,WACA,UACA,YACA,OACA,SACA,WACA,YACA,YACA,YACA,YACA,SACA,QACA,YACA,WACA,SACA,UACA,SACA,SACA,WACA,QACA,SACA,YACA,YACA,YACA,YACA,YACA,OACA,UACA,SACA,SACA,QACA,YACA,SACA,QACA,UACA,QACA,WACA,UACA,YACA,QACA,YACA,YACA,SACA,WACA,YACA,UACA,QACA,OACA,OACA,OACA,MACA,OACA,YACA,QACA,YACA,QACA,UACA,UACA,YACA,QACA,QACA,YACA,WACA,SACA,QACA,QACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,QACA,QACA,YACA,QACA,WACA,UACA,WACA,WACA,OACA,WACA,SACA,SACA,WACA,QACA,YACA,QACA,WACA,YACA,YACA,WACA,YACA,YACA,SACA,YACA,YACA,SACA,UACA,UACA,WACA,OACA,QACA,QACA,QACA,UACA,WACA,UACA,WACA,QACA,SACA,WACA,QACA,YACA,UACA,QACA,QACA,SACA,WACA,SACA,YACA,SACA,UACA,WACA,YACA,UACA,YACA,UACA,SACA,UACA,UACA,UACA,SACA,SACA,WACA,OACA,YACA,UACA,QACA,SACA,SACA,SACA,UACA,UACA,YACA,YACA,UACA,SACA,UACA,YACA,YACA,WACA,QACA,YACA,QACA,QACA,WACA,YACA,WACA,WACA,UACA,WACA,UACA,YACA,UACA,YACA,WACA,WACA,WACA,SACA,UACA,YACA,WACA,SACA,WACA,WACA,YACA,WACA,YACA,WACA,YACA,YACA,YACA,YACA,SACA,UACA,QACA,QACA,UACA,SACA,UACA,SACA,WACA,WACA,UACA,SACA,WACA,QACA,SACA,UACA,YACA,SACA,UACA,YACA,YACA,WACA,WACA,YACA,UACA,WACA,QACA,YACA,YACA,UACA,QACA,YACA,YACA,YACA,YACA,WACA,WACA,UACA,UACA,QACA,QACA,WACA,QACA,OACA,WACA,YACA,YACA,WACA,OACA,QACA,WACA,WACA,QACA,QACA,YACA,UACA,WACA,QACA,SACA,UACA,SACA,UACA,UACA,UACA,SACA,UACA,OACA,QACA,QACA,SACA,UACA,UACA,QACA,SACA,UACA,SACA,YACA,WACA,QACA,MACA,SACA,YACA,SACA,YACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,YACA,SACA,WACA,SACA,UACA,WACA,UACA,UACA,YACA,YACA,YACA,SACA,WACA,QACA,OACA,WACA,OACA,SACA,YACA,UACA,SACA,SACA,UACA,YACA,WACA,YACA,YACA,SACA,QACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,WACA,UACA,UACA,WACA,QACA,WACA,YACA,SACA,YACA,SACA,SACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,SACA,WACA,SACA,UACA,WACA,QACA,WACA,UACA,OACA,QACA,QACA,SACA,QACA,QACA,SACA,UACA,SACA,QACA,OACA,OACA,SACA,WACA,SACA,SACA,WACA,YACA,YACA,WACA,SACA,SACA,YACA,WACA,WACA,UACA,YACA,WACA,WACA,YACA,UACA,UACA,WACA,YACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,YACA,SACA,WACA,WACA,YACA,WACA,QACA,WACA,YACA,SACA,QACA,UACA,QACA,UACA,SACA,WACA,QACA,SACA,UACA,SACA,SACA,YACA,UACA,QACA,UACA,WACA,QACA,SACA,WACA,SACA,UACA,YACA,UACA,QACA,WACA,SACA,SACA,SACA,WACA,QACA,WACA,WACA,SACA,SACA,UACA,WACA,WACA,SACA,YACA,UACA,SACA,WACA,SACA,UACA,SACA,UACA,QACA,WACA,UACA,WACA,SACA,UACA,SACA,OACA,YACA,UACA,YACA,SACA,WACA,YACA,UACA,WACA,YACA,WACA,OACA,YACA,SACA,QACA,QACA,QACA,SACA,SACA,QACA,OACA,QACA,OACA,YACA,WACA,YACA,UACA,UACA,SACA,SACA,UACA,UACA,UACA,QACA,OACA,QACA,UACA,YACA,YACA,QACA,YACA,YACA,QACA,WACA,YACA,SACA,UACA,SACA,QACA,QACA,UACA,QACA,QACA,WACA,QACA,QACA,UACA,UACA,WACA,SACA,OACA,WACA,QACA,WACA,UACA,WACA,OACA,OACA,WACA,WACA,UACA,OACA,SACA,UACA,QACA,SACA,YACA,QACA,QACA,UACA,SACA,QACA,QACA,WACA,UACA,WACA,WACA,OACA,SACA,UACA,SACA,SACA,UACA,UACA,YACA,OACA,SACA,SACA,QACA,OACA,MACA,UACA,OACA,UACA,SACA,UACA,WACA,QACA,WACA,WACA,WACA,QACA,UACA,SACA,SACA,QACA,OACA,YACA,YACA,OACA,YACA,SACA,QACA,SACA,UACA,WACA,UACA,QACA,QACA,QACA,SACA,UACA,WACA,YACA,OACA,YACA,WACA,SACA,QACA,OACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,YACA,YACA,SACA,SACA,QACA,SACA,UACA,OACA,SACA,SACA,WACA,YACA,UACA,WACA,SACA,SACA,WACA,UACA,UACA,QACA,QACA,QACA,QACA,UACA,UACA,SACA,YACA,OACA,QACA,QACA,UACA,UACA,YACA,UACA,UACA,YACA,YACA,UACA,UACA,YACA,YACA,YACA,UACA,WACA,SACA,SACA,YACA,SACA,SACA,WACA,QACA,QACA,UACA,WACA,YACA,SACA,WACA,WACA,SACA,WACA,QACA,QACA,WACA,QACA,YACA,SACA,WACA,SACA,YACA,SACA,SACA,SACA,WACA,WACA,YACA,YACA,WACA,WACA,UACA,QACA,SACA,UACA,SACA,SACA,UACA,UACA,QACA,OACA,QACA,YACA,SACA,OACA,UACA,YACA,YACA,WACA,WACA,UACA,UACA,UACA,WACA,WACA,WACA,QACA,QACA,SACA,SACA,SACA,UACA,YACA,WACA,QACA,OACA,SACA,OACA,SACA,UACA,OACA,WACA,OACA,SACA,UACA,SACA,YACA,QACA,UACA,QACA,SACA,QACA,SACA,SACA,QACA,QACA,WACA,UACA,OACA,UACA,OACA,WACA,WACA,UACA,YACA,WACA,UACA,YACA,OACA,UACA,UACA,UACA,YACA,QACA,SACA,WACA,SACA,WACA,UACA,WACA,SACA,QACA,SACA,SACA,UACA,SACA,QACA,OACA,SACA,WACA,WACA,SACA,UACA,SACA,SACA,SACA,QACA,YACA,SACA,UACA,SACA,UACA,UACA,WACA,OACA,YACA,UACA,UACA,SACA,YACA,UACA,UACA,UACA,YACA,UACA,YACA,UACA,UACA,QACA,UACA,SACA,YACA,SACA,UACA,WACA,WACA,YACA,YACA,YACA,WACA,SACA,YACA,QACA,SACA,UACA,UACA,WACA,UACA,YACA,WACA,YACA,QACA,YACA,YACA,UACA,UACA,UACA,SACA,YACA,QACA,SACA,WACA,SACA,UACA,YACA,YACA,QACA,UACA,UACA,UACA,OACA,OACA,SACA,SACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,WACA,SACA,UACA,WACA,WACA,UACA,YACA,WACA,UACA,SACA,SACA,SACA,UACA,YACA,SACA,QACA,UACA,YACA,SACA,SACA,YACA,QACA,UACA,YACA,UACA,WACA,WACA,UACA,SACA,SACA,QACA,SACA,YACA,WACA,WACA,SACA,SACA,SACA,WACA,WACA,YACA,YACA,YACA,UACA,WACA,WACA,QACA,WACA,QACA,QACA,UACA,YACA,UACA,YACA,WACA,SACA,SACA,UACA,QACA,QACA,YACA,WACA,UACA,QACA,UACA,YACA,YACA,WACA,UACA,WACA,UACA,UACA,QACA,UACA,UACA,WACA,QACA,UACA,SACA,WACA,WACA,WACA,UACA,WACA,SACA,WACA,UACA,QACA,QACA,SACA,SACA,OACA,YACA,UACA,QACA,YACA,SACA,QACA,QACA,UACA,QACA,WACA,SACA,UACA,QACA,QACA,YACA,YACA,YACA,WACA,YACA,YACA,QACA,QACA,QACA,OACA,WACA,SACA,WACA,WACA,QACA,WACA,WACA,SACA,YACA,UACA,QACA,UACA,WACA,SACA,OACA,SACA,UACA,WACA,SACA,SACA,QACA,OACA,SACA,QACA,QACA,QACA,QACA,QACA,WACA,QACA,SACA,WACA,SACA,WACA,WACA,YACA,SACA,UACA,UACA,WACA,UACA,SACA,SACA,OACA,QACA,QACA,OACA,QACA,WACA,SACA,SACA,QACA,YACA,QACA,WACA,UACA,UACA,WACA,UACA,WACA,UACA,QACA,QACA,QACA,UACA,SACA,WACA,OACA,OACA,QACA,QACA,QACA,UACA,QACA,SACA,YACA,WACA,QACA,SACA,UACA,SACA,UACA,WACA,QACA,SACA,WACA,OACA,SACA,QACA,UACA,QACA,QACA,UACA,WACA,UACA,UACA,WACA,QACA,SACA,UACA,WACA,YACA,QACA,WACA,SACA,SACA,YACA,SACA,UACA,QACA,YACA,UACA,UACA,WACA,YACA,YACA,OACA,WACA,SACA,UACA,SACA,QACA,UACA,MACA,WACA,SACA,UACA,SACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,OACA,OACA,OACA,OACA,WACA,WACA,UACA,WACA,SACA,YACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,SACA,WACA,OACA,OACA,OACA,UACA,QACA,QACA,SACA,QACA,WACA,UACA,UACA,WACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,SACA,UACA,SACA,YACA,WACA,WACA,YACA,UACA,YACA,WACA,WACA,YACA,WACA,YACA,UACA,UACA,UACA,WACA,UACA,YACA,UACA,QACA,YACA,UACA,WACA,WACA,SACA,WACA,YACA,YACA,UACA,YACA,YACA,UACA,OACA,UACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,YACA,UACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,WACA,WACA,UACA,YACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,UACA,YACA,YACA,WACA,UACA,UACA,UACA,UACA,WACA,UACA,YACA,UACA,UACA,YACA,OACA,SACA,SACA,UACA,SACA,UACA,SACA,OACA,QACA,OACA,WACA,YACA,UACA,SACA,SACA,SACA,YACA,YACA,WACA,WACA,YACA,QACA,WACA,UACA,WACA,YACA,SACA,UACA,WACA,UACA,YACA,YACA,UACA,SACA,SACA,WACA,YACA,SACA,SACA,YACA,OACA,UACA,SACA,QACA,QACA,QACA,YACA,YACA,WACA,YACA,UACA,SACA,UACA,WACA,QACA,UACA,WACA,UACA,SACA,WACA,OACA,WACA,YACA,WACA,WACA,SACA,WACA,UACA,WACA,YACA,YACA,SACA,QACA,YACA,QACA,UACA,UACA,QACA,QACA,QACA,UACA,WACA,WACA,WACA,WACA,SACA,SACA,UACA,YACA,QACA,UACA,UACA,YACA,SACA,WACA,YACA,SACA,WACA,WACA,WACA,WACA,WACA,SACA,QACA,QACA,SACA,QACA,QACA,WACA,UACA,WACA,YACA,UACA,WACA,UACA,WACA,OACA,UACA,QACA,QACA,QACA,UACA,SACA,WACA,UACA,UACA,UACA,WACA,UACA,YACA,SACA,WACA,UACA,QACA,QACA,QACA,QACA,OACA,QACA,SACA,UACA,UACA,QACA,QACA,UACA,UACA,YACA,UACA,YACA,UACA,QACA,YACA,SACA,UACA,WACA,WACA,YACA,UACA,WACA,YACA,UACA,UACA,WACA,QACA,OACA,SACA,UACA,UACA,YACA,OACA,UACA,UACA,WACA,SACA,SACA,WACA,WACA,YACA,WACA,UACA,YACA,WACA,UACA,YACA,UACA,QACA,SACA,UACA,UACA,UACA,SACA,OACA,SACA,SACA,SACA,SACA,YACA,UACA,QACA,QACA,QACA,UACA,SACA,UACA,SACA,SACA,YACA,QACA,QACA,QACA,OACA,SACA,UACA,YACA,UACA,YACA,WACA,YACA,UACA,MACA,QACA,SACA,UACA,UACA,WACA,SACA,YACA,YACA,MACA,MACA,WACA,SACA,QACA,WACA,SACA,QACA,QACA,WACA,QACA,UACA,YACA,SACA,WACA,QACA,SACA,SACA,WACA,YACA,QACA,WACA,WACA,YACA,UACA,WACA,WACA,UACA,OACA,OACA,YACA,OACA,YACA,OACA,WACA,SACA,WACA,WACA,UACA,OACA,SACA,WACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,WACA,SACA,YACA,WACA,SACA,UACA,YACA,QACA,OACA,YACA,SACA,WACA,QACA,UACA,WACA,SACA,QACA,SACA,SACA,QACA,QACA,YACA,QACA,WACA,SACA,WACA,YACA,WACA,UACA,SACA,YACA,YACA,UACA,YACA,UACA,YACA,WACA,OACA,WACA,UACA,SACA,YACA,YACA,YACA,QACA,WACA,SACA,WACA,YACA,SACA,SACA,OACA,OACA,SACA,SACA,WACA,SACA,WACA,SACA,UACA,SACA,YACA,YACA,YACA,WACA,UACA,YACA,WACA,WACA,WACA,UACA,SACA,WACA,SACA,WACA,UACA,YACA,WACA,YACA,YACA,QACA,WACA,UACA,UACA,SACA,SACA,OACA,WACA,YACA,WACA,SACA,YACA,QACA,WACA,QACA,WACA,YACA,SACA,WACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,UACA,QACA,SACA,WACA,SACA,YACA,YACA,WACA,SACA,YACA,WACA,SACA,WACA,YACA,YACA,WACA,SACA,QACA,SACA,QACA,UACA,SACA,UACA,UACA,OACA,YACA,YACA,WACA,YACA,SACA,UACA,YACA,WACA,SACA,SACA,SACA,WACA,YACA,YACA,UACA,UACA,QACA,WACA,SACA,SACA,WACA,QACA,UACA,YACA,UACA,YACA,YACA,WACA,WACA,YACA,YACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,YACA,WACA,WACA,SACA,YACA,YACA,WACA,YACA,YACA,SACA,WACA,YACA,WACA,UACA,QACA,UACA,WACA,UACA,UACA,YACA,WACA,SACA,UACA,YACA,UACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,YACA,UACA,OACA,WACA,SACA,YACA,QACA,OACA,SACA,UACA,YACA,WACA,YACA,WACA,WACA,YACA,YACA,MACA,WACA,YACA,WACA,OACA,SACA,OACA,WACA,QACA,SACA,SACA,UACA,SACA,QACA,UACA,SACA,YACA,QACA,QACA,SACA,SACA,UACA,UACA,UACA,SACA,SACA,UACA,WACA,YACA,YACA,WACA,YACA,WACA,YACA,WACA,WACA,WACA,SACA,WACA,WACA,UACA,YACA,WACA,UACA,UACA,YACA,WACA,WACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,WACA,OACA,YACA,UACA,OACA,UACA,YACA,YACA,WACA,WACA,YACA,SACA,UACA,WACA,UACA,WACA,SACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,YACA,WACA,UACA,WACA,UACA,YACA,UACA,WACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,WACA,WACA,WACA,QACA,QACA,QACA,YACA,UACA,WACA,WACA,WACA,WACA,SACA,WACA,YACA,YACA,WACA,WACA,WACA,YACA,QACA,SACA,SACA,OACA,WACA,WACA,QACA,QACA,QACA,QACA,OACA,SACA,YACA,SACA,QACA,UACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,QACA,QACA,SACA,WACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,UACA,QACA,OACA,YACA,SACA,SACA,OACA,SACA,WACA,SACA,OACA,OACA,QACA,OACA,OACA,WACA,YACA,YACA,WACA,YACA,WACA,UACA,UACA,YACA,WACA,YACA,QACA,UACA,UACA,OACA,UACA,WACA,YACA,YACA,WACA,YACA,YACA,YACA,SACA,SACA,WACA,SACA,SACA,QACA,OACA,UACA,QACA,QACA,QACA,UACA,WACA,YACA,WACA,WACA,SACA,WACA,SACA,SACA,WACA,UACA,UACA,UACA,QACA,QACA,QACA,YACA,UACA,WACA,UACA,UACA,UACA,QACA,QACA,WACA,SACA,OACA,MACA,SACA,YACA,UACA,WACA,UACA,WACA,WACA,QACA,OACA,OACA,SACA,SACA,MACA,OACA,SACA,WACA,OACA,UACA,WACA,WACA,MACA,OACA,SACA,YACA,YACA,UACA,UACA,WACA,SACA,SACA,OACA,OACA,UACA,OACA,QACA,QACA,QACA,UACA,UACA,WACA,UACA,YACA,UACA,WACA,UACA,WACA,WACA,OACA,QACA,UACA,UACA,UACA,SACA,UACA,QACA,UACA,UACA,WACA,WACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,SACA,UACA,QACA,UACA,SACA,WACA,SACA,YACA,YACA,SACA,WACA,UACA,QACA,SACA,SACA,OACA,OACA,QACA,QACA,QACA,YACA,OACA,SACA,UACA,YACA,UACA,WACA,YACA,UACA,YACA,YACA,OACA,WACA,SACA,OACA,UACA,SACA,WACA,YACA,WACA,MACA,YACA,UACA,YACA,SACA,YACA,SACA,SACA,WACA,WACA,YACA,UACA,YACA,SACA,QACA,YACA,UACA,SACA,QACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,UACA,YACA,YACA,WACA,SACA,MACA,WACA,WACA,YACA,QACA,UACA,SACA,MACA,UACA,WACA,MACA,YACA,QACA,YACA,WACA,YACA,QACA,UACA,QACA,QACA,UACA,SACA,UACA,YACA,YACA,QACA,WACA,UACA,SACA,SACA,WACA,SACA,YACA,QACA,UACA,YACA,WACA,OACA,QACA,WACA,UACA,WACA,UACA,UACA,WACA,WACA,YACA,WACA,YACA,WACA,WACA,WACA,WACA,UACA,UACA,YACA,QACA,MACA,SACA,YACA,SACA,YACA,YACA,WACA,UACA,YACA,SACA,SACA,YACA,YACA,WACA,UACA,UACA,WACA,WACA,YACA,QACA,SACA,UACA,UACA,YACA,YACA,UACA,YACA,WACA,YACA,YACA,WACA,YACA,WACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,WACA,WACA,YACA,UACA,SACA,UACA,YACA,YACA,YACA,UACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,SACA,SACA,SACA,UACA,UACA,SACA,SACA,YACA,WACA,YACA,WACA,SACA,UACA,SACA,SACA,YACA,SACA,SACA,WACA,UACA,WACA,UACA,YACA,WACA,WACA,WACA,UACA,WACA,QACA,OACA,SACA,OACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,WACA,UACA,QACA,SACA,WACA,UACA,UACA,YACA,SACA,YACA,YACA,WACA,SACA,SACA,UACA,YACA,SACA,SACA,UACA,QACA,QACA,WACA,YACA,YACA,WACA,WACA,WACA,SACA,YACA,YACA,WACA,UACA,QACA,UACA,YACA,YACA,SACA,WACA,WACA,YACA,YACA,WACA,UACA,UACA,WACA,UACA,QACA,YACA,SACA,YACA,WACA,UACA,QACA,WACA,YACA,YACA,UACA,UACA,OACA,YACA,YACA,YACA,WACA,WACA,QACA,WACA,UACA,OACA,QACA,YACA,SACA,QACA,UACA,UACA,WACA,YACA,YACA,YACA,SACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SACA,YACA,YACA,YACA,YACA,QACA,OACA,YACA,SACA,UACA,SACA,QACA,WACA,OACA,SACA,YACA,WACA,WACA,SACA,UACA,YACA,YACA,YACA,YACA,YACA,QACA,SACA,WACA,YACA,SACA,SACA,WACA,UACA,YACA,WACA,UACA,UACA,UACA,YACA,WACA,WACA,YACA,SACA,WACA,UACA,YACA,YACA,WACA,YACA,SACA,YACA,WACA,WACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,WACA,YACA,UACA,SACA,WACA,SACA,YACA,UACA,UACA,SACA,YACA,UACA,UACA,OACA,SACA,UACA,SACA,OACA,QACA,UACA,OACA,WACA,SACA,SACA,WACA,UACA,UACA,YACA,QACA,UACA,OACA,UACA,YACA,YACA,UACA,UACA,WACA,SACA,UACA,WACA,SACA,YACA,YACA,UACA,WACA,WACA,MACA,QACA,UACA,SACA,SACA,OACA,OACA,SACA,SACA,WACA,WACA,WACA,WACA,WACA,QACA,QACA,UACA,SACA,UACA,WACA,YACA,WACA,SACA,SACA,QACA,SACA,SACA,WACA,UACA,YACA,QACA,QACA,QACA,QACA,UACA,SACA,WACA,WACA,YACA,UACA,UACA,QACA,WACA,QACA,UACA,SACA,WACA,SACA,SACA,SACA,UACA,OACA,SACA,QACA,WACA,SACA,WACA,WACA,UACA,UACA,YACA,QACA,WACA,QACA,UACA,WACA,WACA,YACA,SACA,UACA,UACA,WACA,MACA,OACA,UACA,UACA,WACA,WACA,YACA,YACA,QACA,UACA,QACA,QACA,YACA,UACA,WACA,WACA,OACA,UACA,YACA,YACA,YACA,WACA,WACA,SACA,QACA,UACA,WACA,SACA,WACA,UACA,YACA,YACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,OACA,UACA,SACA,QACA,QACA,SACA,SACA,QACA,QACA,OACA,QACA,QACA,QACA,WACA,OACA,SACA,UACA,QACA,WACA,UACA,UACA,QACA,SACA,UACA,WACA,OACA,MACA,MACA,OACA,QACA,OACA,WACA,SACA,WACA,SACA,WACA,SACA,OACA,OACA,OACA,UACA,WACA,WACA,YACA,SACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,UACA,WACA,YACA,WACA,UACA,WACA,WACA,WACA,SACA,SACA,UACA,WACA,WACA,MACA,QACA,WACA,WACA,UACA,YACA,WACA,YACA,WACA,QACA,QACA,UACA,UACA,YACA,SACA,UACA,QACA,WACA,WACA,WACA,UACA,UACA,UACA,WACA,WACA,UACA,WACA,SACA,YACA,WACA,YACA,WACA,UACA,WACA,YACA,WACA,UACA,SACA,WACA,SACA,YACA,WACA,QACA,UACA,UACA,WACA,SACA,SACA,QACA,SACA,WACA,YACA,YACA,WACA,QACA,SACA,UACA,QACA,UACA,YACA,SACA,OACA,QACA,YACA,UACA,WACA,WACA,YACA,SACA,QACA,QACA,SACA,WACA,YACA,WACA,QACA,YACA,SACA,MACA,QACA,MACA,YACA,UACA,QACA,OACA,YACA,WACA,UACA,SACA,SACA,UACA,YACA,SACA,YACA,WACA,OACA,SACA,QACA,SACA,SACA,WACA,UACA,MACA,SACA,UACA,SACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,MACA,WACA,YACA,SACA,UACA,WACA,QACA,OACA,OACA,SACA,OACA,QACA,OACA,SACA,MACA,SACA,UACA,WACA,WACA,QACA,UACA,YACA,SACA,QACA,YACA,WACA,YACA,UACA,YACA,WACA,WACA,SACA,YACA,YACA,YACA,WACA,YACA,UACA,YACA,UACA,UACA,UACA,QACA,QACA,YACA,SACA,UACA,YACA,QACA,OACA,WACA,YACA,WACA,SACA,WACA,SACA,SACA,SACA,QACA,UACA,SACA,WACA,QACA,QACA,SACA,QACA,UACA,UACA,UACA,QACA,YACA,SACA,YACA,UACA,SACA,WACA,YACA,QACA,UACA,QACA,WACA,UACA,WACA,UACA,SACA,UACA,UACA,UACA,UACA,SACA,UACA,SACA,UACA,WACA,WACA,SACA,YACA,YACA,UACA,WACA,QACA,QACA,QACA,UACA,WACA,UACA,OACA,SACA,YACA,UACA,SACA,OACA,OACA,WACA,OACA,UACA,QACA,WACA,WACA,YACA,OACA,UACA,QACA,UACA,OACA,OACA,OACA,QACA,WACA,YACA,QACA,SACA,OACA,SACA,OACA,SACA,WACA,OACA,UACA,SACA,SACA,SACA,OACA,OACA,OACA,WACA,YACA,WACA,YACA,SACA,SACA,WACA,UACA,YACA,WACA,WACA,UACA,WACA,QACA,WACA,WACA,UACA,UACA,UACA,WACA,UACA,SACA,UACA,QACA,WACA,QACA,QACA,UACA,YACA,QACA,QACA,YACA,UACA,UACA,YACA,WACA,SACA,YACA,SACA,YACA,YACA,UACA,QACA,OACA,UACA,WACA,WACA,YACA,SACA,QACA,UACA,WACA,OACA,YACA,OACA,QACA,YACA,WACA,WACA,QACA,UACA,YACA,QACA,YACA,QACA,SACA,WACA,OACA,UACA,OACA,WACA,SACA,QACA,QACA,SACA,WACA,SACA,QACA,SACA,UACA,QACA,QACA,SACA,UACA,QACA,OACA,SACA,WACA,WACA,UACA,UACA,YACA,UACA,WACA,SACA,QACA,YACA,WACA,WACA,QACA,UACA,YACA,QACA,OACA,WACA,QACA,OACA,UACA,UACA,YACA,UACA,QACA,SACA,WACA,OACA,OACA,QACA,QACA,UACA,OACA,SACA,MACA,UACA,WACA,YACA,WACA,UACA,WACA,SACA,SACA,UACA,UACA,MACA,UACA,QACA,OACA,UACA,OACA,SACA,SACA,YACA,SACA,UACA,SACA,UACA,YACA,UACA,WACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,SACA,UACA,WACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,SACA,YACA,SACA,QACA,YACA,YACA,UACA,WACA,UACA,YACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,WACA,YACA,UACA,WACA,YACA,SACA,WACA,WACA,WACA,YACA,WACA,QACA,UACA,WACA,YACA,YACA,YACA,UACA,UACA,UACA,QACA,UACA,OACA,SACA,QACA,UACA,YACA,QACA,SACA,YACA,WACA,UACA,WACA,YACA,OACA,UACA,SACA,QACA,QACA,SACA,WACA,SACA,WACA,SACA,OACA,WACA,WACA,YACA,YACA,YACA,SACA,SACA,YACA,WACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,UACA,WACA,YACA,YACA,UACA,WACA,OACA,OACA,QACA,UACA,YACA,UACA,QACA,UACA,YACA,QACA,SACA,SACA,SACA,UACA,UACA,WACA,WACA,UACA,YACA,QACA,WACA,QACA,SACA,SACA,YACA,QACA,WACA,SACA,UACA,UACA,UACA,UACA,QACA,YACA,WACA,WACA,UACA,WACA,SACA,SACA,WACA,OACA,MACA,OACA,OACA,OACA,QACA,SACA,WACA,SACA,QACA,YACA,WACA,UACA,SACA,YACA,WACA,YACA,WACA,WACA,SACA,SACA,YACA,YACA,SACA,WACA,SACA,OACA,SACA,UACA,WACA,WACA,SACA,SACA,SACA,UACA,SACA,YACA,UACA,QACA,OACA,UACA,OACA,SACA,YACA,MACA,SACA,UACA,WACA,YACA,WACA,YACA,YACA,YACA,SACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,MACA,UACA,QACA,OACA,OACA,MACA,WACA,WACA,WACA,UACA,YACA,YACA,WACA,WACA,WACA,SACA,QACA,OACA,QACA,WACA,SACA,SACA,YACA,WACA,WACA,QACA,YACA,WACA,UACA,WACA,UACA,YACA,WACA,UACA,YACA,WACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,SACA,SACA,YACA,UACA,WACA,YACA,YACA,WACA,SACA,UACA,YACA,YACA,WACA,UACA,YACA,YACA,QACA,WACA,YACA,WACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,UACA,WACA,YACA,WACA,UACA,YACA,YACA,YACA,UACA,YACA,SACA,WACA,SACA,SACA,MACA,OACA,SACA,OACA,QACA,MACA,OACA,YACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,WACA,YACA,YACA,UACA,QACA,UACA,YACA,UACA,OACA,YACA,SACA,QACA,MACA,MACA,SACA,SACA,YACA,UACA,WACA,YACA,SACA,YACA,WACA,MACA,UACA,UACA,SACA,UACA,UACA,WACA,QACA,OACA,QACA,UACA,UACA,OACA,UACA,YACA,OACA,OACA,YACA,UACA,QACA,SACA,SACA,MACA,QACA,SACA,QACA,SACA,WACA,OACA,UACA,UACA,MACA,SACA,YACA,SACA,UACA,OACA,UACA,WACA,WACA,YACA,QACA,OACA,MACA,SACA,WACA,YACA,SACA,UACA,WACA,YACA,WACA,QACA,YACA,WACA,YACA,OACA,SACA,WACA,UACA,QACA,YACA,QACA,UACA,UACA,OACA,SACA,QACA,OACA,WACA,WACA,OACA,SACA,UACA,SACA,UACA,WACA,SACA,QACA,OACA,UACA,YACA,UACA,SACA,WACA,WACA,QACA,WACA,UACA,SACA,QACA,QACA,SACA,WACA,OACA,MACA,OACA,SACA,OACA,WACA,WACA,SACA,OACA,OACA,WACA,WACA,YACA,WACA,OACA,SACA,SACA,WACA,SACA,WACA,UACA,UACA,UACA,OACA,UACA,UACA,YACA,WACA,SACA,UACA,UACA,OACA,SACA,QACA,OACA,UACA,WACA,OACA,QACA,WACA,QACA,QACA,QACA,SACA,UACA,QACA,OACA,UACA,UACA,WACA,YACA,WACA,SACA,SACA,QACA,UACA,WACA,SACA,UACA,SACA,OACA,OACA,QACA,SACA,WACA,WACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,YACA,WACA,YACA,WACA,YACA,QACA,UACA,SACA,QACA,SACA,UACA,SACA,OACA,QACA,OACA,OACA,QACA,OACA,QACA,OACA,SACA,WACA,UACA,SACA,WACA,SACA,UACA,UACA,SACA,WACA,SACA,WACA,SACA,WACA,OACA,WACA,OACA,SACA,QACA,SACA,SACA,WACA,UACA,UACA,YACA,OACA,UACA,SACA,YACA,UACA,QACA,OACA,SACA,OACA,OACA,UACA,SACA,UACA,YACA,WACA,SACA,UACA,QACA,WACA,SACA,WACA,YACA,YACA,SACA,UACA,YACA,UACA,UACA,WACA,MACA,OACA,SACA,UACA,UACA,WACA,SACA,WACA,WACA,SACA,QACA,QACA,OACA,OACA,UACA,YACA,QACA,QACA,UACA,WACA,OACA,QACA,WACA,WACA,SACA,SACA,WACA,UACA,OACA,OACA,MACA,UACA,UACA,SACA,OACA,OACA,WACA,YACA,SACA,SACA,SACA,UACA,QACA,SACA,QACA,YACA,UACA,SACA,SACA,YACA,YACA,QACA,UACA,YACA,WACA,YACA,YACA,SACA,WACA,UACA,SACA,YACA,WACA,YACA,UACA,UACA,SACA,QACA,WACA,WACA,YACA,YACA,OACA,QACA,OACA,YACA,OACA,SACA,WACA,SACA,YACA,UACA,YACA,WACA,QACA,YACA,SACA,QACA,YACA,WACA,WACA,SACA,WACA,WACA,QACA,OACA,UACA,YACA,WACA,UACA,SACA,UACA,WACA,QACA,YACA,WACA,YACA,YACA,YACA,UACA,YACA,WACA,WACA,SACA,WACA,UACA,YACA,WACA,WACA,QACA,YACA,SACA,YACA,OACA,OACA,SACA,UACA,YACA,UACA,WACA,UACA,WACA,UACA,YACA,WACA,SACA,SACA,QACA,QACA,YACA,UACA,UACA,UACA,YACA,WACA,YACA,SACA,UACA,UACA,YACA,QACA,UACA,SACA,UACA,QACA,WACA,SACA,SACA,SACA,OACA,MACA,WACA,YACA,UACA,UACA,WACA,QACA,QACA,YACA,YACA,SACA,WACA,SACA,SACA,UACA,WACA,SACA,YACA,SACA,UACA,SACA,QACA,YACA,SACA,YACA,YACA,UACA,SACA,YACA,SACA,UACA,WACA,SACA,UACA,UACA,UACA,YACA,WACA,UACA,WACA,YACA,WACA,WACA,YACA,OACA,SACA,YACA,YACA,SACA,SACA,SACA,SACA,WACA,WACA,WACA,QACA,WACA,WACA,UACA,QACA,SACA,YACA,SACA,UACA,SACA,WACA,WACA,UACA,QACA,SACA,SACA,WACA,SACA,UACA,YACA,SACA,UACA,YACA,WACA,QACA,WACA,OACA,YACA,WACA,WACA,UACA,MACA,YACA,SACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,WACA,WACA,UACA,YACA,UACA,WACA,UACA,YACA,QACA,SACA,WACA,SACA,YACA,WACA,UACA,WACA,YACA,YACA,YACA,WACA,MACA,SACA,WACA,UACA,YACA,WACA,WACA,WACA,QACA,YACA,WACA,YACA,YACA,UACA,WACA,SACA,QACA,OACA,WACA,YACA,SACA,WACA,YACA,SACA,YACA,QACA,QACA,YACA,WACA,UACA,WACA,UACA,WACA,QACA,YACA,YACA,QACA,QACA,UACA,OACA,QACA,SACA,QACA,SACA,OACA,OACA,MACA,MACA,WACA,QACA,OACA,SACA,UACA,WACA,WACA,YACA,YACA,SACA,WACA,QACA,YACA,UACA,QACA,QACA,WACA,UACA,YACA,SACA,QACA,YACA,QACA,YACA,WACA,SACA,UACA,YACA,WACA,QACA,QACA,SACA,YACA,QACA,UACA,UACA,SACA,YACA,QACA,UACA,SACA,WACA,OACA,YACA,YACA,SACA,OACA,SACA,SACA,SACA,UACA,YACA,UACA,OACA,QACA,MACA,OACA,OACA,SACA,QACA,YACA,OACA,SACA,SACA,UACA,QACA,SACA,UACA,YACA,WACA,SACA,WACA,UACA,SACA,WACA,WACA,WACA,YACA,OACA,SACA,UACA,SACA,WACA,SACA,WACA,SACA,YACA,SACA,SACA,WACA,WACA,YACA,WACA,YACA,YACA,UACA,UACA,OACA,SACA,OACA,UACA,QACA,OACA,MACA,YACA,SACA,WACA,WACA,SACA,UACA,QACA,OACA,SACA,WACA,WACA,QACA,QACA,SACA,SACA,WACA,YACA,QACA,WACA,QACA,UACA,SACA,UACA,SACA,UACA,SACA,UACA,SACA,WACA,UACA,WACA,YACA,UACA,WACA,WACA,UACA,UACA,UACA,UACA,UACA,SACA,WACA,WACA,YACA,QACA,SACA,QACA,MACA,MACA,QACA,MACA,YACA,WACA,WACA,SACA,WACA,UACA,WACA,YACA,SACA,YACA,OACA,UACA,YACA,YACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,SACA,YACA,SACA,UACA,YACA,YACA,WACA,WACA,SACA,QACA,SACA,UACA,SACA,UACA,UACA,OACA,MACA,OACA,WACA,OACA,MACA,QACA,WACA,QACA,OACA,UACA,WACA,OACA,WACA,UACA,WACA,UACA,QACA,SACA,WACA,OACA,WACA,QACA,UACA,YACA,UACA,OACA,SACA,OACA,OACA,OACA,OACA,UACA,OACA,OACA,WACA,UACA,YACA,YACA,YACA,WACA,QACA,UACA,WACA,SACA,WACA,WACA,YACA,YACA,MACA,YACA,UACA,QACA,QACA,OACA,QACA,QACA,SACA,UACA,SACA,WACA,WACA,WACA,WACA,UACA,WACA,UACA,WACA,WACA,QACA,WACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,SACA,UACA,UACA,WACA,WACA,UACA,YACA,YACA,UACA,UACA,SACA,UACA,UACA,WACA,WACA,WACA,UACA,WACA,WACA,WACA,YACA,WACA,YACA,YACA,WACA,WACA,UACA,WACA,SACA,OACA,QACA,OACA,UACA,UACA,WACA,UACA,WACA,WACA,YACA,YACA,WACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,UACA,YACA,YACA,YACA,UACA,WACA,WACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,WACA,WACA,WACA,YACA,WACA,YACA,WACA,UACA,UACA,WACA,WACA,WACA,YACA,YACA,WACA,UACA,YACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,WACA,WACA,UACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,UACA,WACA,WACA,WACA,UACA,YACA,WACA,YACA,MACA,SACA,UACA,YACA,UACA,YACA,SACA,WACA,SACA,QACA,QACA,YACA,UACA,WACA,WACA,WACA,SACA,SACA,UACA,SACA,WACA,UACA,QACA,QACA,SACA,UACA,SACA,YACA,OACA,WACA,YACA,SACA,WACA,WACA,UACA,WACA,SACA,UACA,WACA,QACA,WACA,OACA,YACA,QACA,UACA,WACA,YACA,UACA,YACA,SACA,QACA,YACA,YACA,SACA,QACA,UACA,UACA,WACA,YACA,SACA,UACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,WACA,WACA,YACA,SACA,UACA,YACA,SACA,SACA,QACA,UACA,UACA,SACA,WACA,SACA,SACA,UACA,UACA,UACA,SACA,UACA,YACA,SACA,UACA,YACA,QACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,UACA,UACA,YACA,WACA,WACA,WACA,QACA,SACA,SACA,UACA,SACA,WACA,UACA,QACA,YACA,SACA,WACA,YACA,OACA,WACA,UACA,QACA,YACA,UACA,SACA,YACA,YACA,SACA,WACA,QACA,YACA,WACA,SACA,SACA,UACA,UACA,WACA,SACA,QACA,QACA,SACA,UACA,WACA,UACA,SACA,SACA,QACA,SACA,WACA,WACA,YACA,WACA,WACA,YACA,WACA,UACA,SACA,OACA,SACA,WACA,UACA,SACA,UACA,UACA,YACA,WACA,UACA,YACA,QACA,SACA,UACA,WACA,YACA,MACA,WACA,UACA,QACA,YACA,YACA,YACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,QACA,OACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,QACA,OACA,YACA,YACA,SACA,YACA,QACA,SACA,WACA,QACA,YACA,SACA,YACA,YACA,QACA,UACA,UACA,SACA,UACA,YACA,SACA,UACA,YACA,QACA,YACA,QACA,SACA,WACA,UACA,UACA,WACA,QACA,UACA,QACA,SACA,UACA,UACA,SACA,WACA,UACA,WACA,WACA,UACA,WACA,YACA,YACA,WACA,WACA,SACA,UACA,YACA,YACA,UACA,WACA,YACA,WACA,UACA,UACA,WACA,UACA,YACA,WACA,QACA,WACA,QACA,SACA,YACA,SACA,WACA,YACA,UACA,OACA,OACA,OACA,OACA,OACA,QACA,OACA,UACA,WACA,SACA,OACA,YACA,UACA,QACA,MACA,OACA,OACA,OACA,UACA,UACA,WACA,YACA,SACA,QACA,SACA,QACA,SACA,QACA,SACA,SACA,QACA,SACA,WACA,QACA,OACA,YACA,UACA,YACA,UACA,SACA,OACA,OACA,UACA,OACA,SACA,SACA,QACA,WACA,WACA,UACA,WACA,YACA,OACA,SACA,WACA,WACA,SACA,YACA,WACA,UACA,SACA,WACA,QACA,OACA,SACA,WACA,WACA,SACA,UACA,SACA,UACA,WACA,SACA,SACA,UACA,YACA,UACA,UACA,QACA,SACA,WACA,QACA,UACA,OACA,WACA,YACA,UACA,QACA,SACA,MACA,WACA,SACA,WACA,UACA,WACA,YACA,SACA,UACA,WACA,YACA,UACA,WACA,WACA,UACA,YACA,UACA,SACA,WACA,YACA,UACA,UACA,SACA,YACA,YACA,UACA,YACA,WACA,YACA,YACA,SACA,UACA,WACA,WACA,UACA,WACA,YACA,WACA,UACA,SACA,UACA,SACA,YACA,YACA,YACA,SACA,UACA,YACA,UACA,QACA,UACA,YACA,UACA,YACA,YACA,WACA,UACA,SACA,UACA,UACA,YACA,UACA,UACA,WACA,SACA,YACA,WACA,QACA,SACA,YACA,UACA,UACA,SACA,QACA,WACA,QACA,QACA,QACA,SACA,SACA,WACA,UACA,UACA,YACA,QACA,YACA,WACA,WACA,YACA,QACA,UACA,YACA,UACA,YACA,UACA,WACA,YACA,WACA,WACA,UACA,UACA,UACA,UACA,YACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,UACA,WACA,YACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,QACA,QACA,YACA,SACA,WACA,YACA,SACA,YACA,WACA,WACA,YACA,WACA,UACA,QACA,UACA,YACA,WACA,SACA,YACA,YACA,WACA,WACA,QACA,WACA,SACA,SACA,WACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,UACA,UACA,WACA,YACA,QACA,SACA,QACA,YACA,QACA,UACA,MACA,UACA,SACA,YACA,SACA,SACA,MACA,OACA,YACA,OACA,UACA,QACA,YACA,OACA,SACA,SACA,QACA,WACA,YACA,YACA,UACA,WACA,OACA,QACA,SACA,QACA,WACA,YACA,WACA,SACA,WACA,YACA,QACA,UACA,WACA,SACA,SACA,UACA,SACA,SACA,WACA,YACA,OACA,QACA,YACA,WACA,UACA,WACA,WACA,YACA,SACA,YACA,UACA,WACA,UACA,SACA,QACA,UACA,OACA,SACA,WACA,UACA,YACA,SACA,QACA,WACA,QACA,WACA,QACA,UACA,YACA,YACA,UACA,UACA,QACA,UACA,UACA,SACA,YACA,YACA,WACA,UACA,SACA,QACA,UACA,UACA,YACA,YACA,YACA,QACA,QACA,QACA,UACA,YACA,QACA,OACA,SACA,YACA,WACA,YACA,QACA,QACA,OACA,SACA,SACA,OACA,SACA,QACA,SACA,WACA,YACA,WACA,YACA,WACA,QACA,SACA,SACA,OACA,OACA,SACA,SACA,UACA,SACA,UACA,UACA,WACA,UACA,SACA,OACA,SACA,QACA,SACA,WACA,OACA,SACA,QACA,YACA,SACA,SACA,SACA,UACA,SACA,UACA,UACA,UACA,QACA,OACA,SACA,SACA,OACA,UACA,SACA,QACA,SACA,SACA,UACA,YACA,WACA,QACA,YACA,WACA,WACA,UACA,WACA,OACA,YACA,WACA,UACA,YACA,YACA,YACA,WACA,SACA,WACA,WACA,WACA,UACA,YACA,SACA,QACA,UACA,SACA,SACA,UACA,SACA,UACA,UACA,WACA,WACA,SACA,SACA,YACA,SACA,SACA,SACA,SACA,YACA,YACA,UACA,SACA,WACA,UACA,WACA,YACA,UACA,YACA,YACA,SACA,YACA,UACA,YACA,YACA,YACA,SACA,SACA,UACA,SACA,WACA,WACA,SACA,YACA,YACA,UACA,WACA,WACA,YACA,WACA,UACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,YACA,UACA,WACA,WACA,WACA,YACA,YACA,SACA,SACA,UACA,SACA,WACA,WACA,WACA,WACA,YACA,UACA,UACA,WACA,UACA,UACA,YACA,SACA,YACA,YACA,UACA,SACA,WACA,YACA,SACA,SACA,UACA,UACA,SACA,SACA,SACA,WACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,YACA,QACA,SACA,SACA,YACA,YACA,UACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,YACA,UACA,WACA,WACA,QACA,QACA,UACA,UACA,YACA,WACA,WACA,WACA,UACA,QACA,UACA,YACA,UACA,SACA,SACA,SACA,WACA,SACA,YACA,OACA,SACA,SACA,UACA,UACA,WACA,SACA,WACA,WACA,YACA,YACA,QACA,UACA,YACA,SACA,UACA,SACA,YACA,UACA,UACA,UACA,WACA,SACA,WACA,YACA,YACA,WACA,YACA,YACA,UACA,UACA,WACA,WACA,YACA,WACA,SACA,SACA,SACA,WACA,UACA,SACA,UACA,YACA,YACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,WACA,SACA,WACA,UACA,SACA,UACA,QACA,WACA,SACA,YACA,SACA,YACA,YACA,UACA,UACA,WACA,YACA,YACA,YACA,OACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,YACA,UACA,QACA,SACA,WACA,UACA,SACA,WACA,WACA,WACA,WACA,SACA,SACA,QACA,UACA,UACA,YACA,YACA,YACA,WACA,WACA,UACA,WACA,YACA,YACA,YACA,SACA,WACA,WACA,WACA,WACA,SACA,WACA,UACA,WACA,SACA,SACA,WACA,YACA,YACA,SACA,WACA,YACA,SACA,YACA,YACA,UACA,UACA,UACA,UACA,WACA,SACA,SACA,WACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,YACA,YACA,QACA,SACA,UACA,SACA,UACA,UACA,WACA,QACA,SACA,UACA,UACA,UACA,SACA,UACA,YACA,WACA,WACA,UACA,YACA,YACA,SACA,YACA,SACA,WACA,UACA,YACA,UACA,UACA,WACA,YACA,SACA,SACA,WACA,YACA,SACA,SACA,SACA,SACA,SACA,SACA,SACA,UACA,QACA,SACA,UACA,OACA,SACA,SACA,WACA,UACA,UACA,WACA,SACA,OACA,SACA,UACA,OACA,UACA,QACA,QACA,UACA,SACA,OACA,OACA,QACA,UACA,OACA,UACA,WACA,WACA,UACA,SACA,WACA,UACA,OACA,SACA,OACA,UACA,UACA,QACA,QACA,YACA,WACA,YACA,YACA,UACA,WACA,SACA,UACA,QACA,UACA,OACA,QACA,WACA,SACA,WACA,SACA,SACA,WACA,YACA,UACA,WACA,YACA,WACA,QACA,QACA,QACA,OACA,OACA,SACA,SACA,OACA,SACA,UACA,UACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,UACA,QACA,SACA,QACA,SACA,SACA,UACA,SACA,UACA,OACA,SACA,SACA,MACA,SACA,OACA,SACA,WACA,UACA,QACA,YACA,UACA,SACA,UACA,QACA,OACA,SACA,UACA,QACA,OACA,OACA,OACA,MACA,UACA,WACA,YACA,SACA,YACA,SACA,YACA,UACA,WACA,QACA,UACA,SACA,YACA,YACA,SACA,WACA,UACA,OACA,OACA,UACA,QACA,OACA,QACA,OACA,QACA,SACA,WACA,SACA,SACA,QACA,SACA,QACA,OACA,WACA,SACA,UACA,YACA,YACA,OACA,SACA,WACA,WACA,WACA,YACA,SACA,UACA,WACA,UACA,YACA,UACA,SACA,WACA,UACA,UACA,YACA,UACA,YACA,YACA,WACA,QACA,WACA,YACA,OACA,QACA,UACA,YACA,QACA,UACA,YACA,UACA,OACA,YACA,QACA,UACA,WACA,QACA,YACA,YACA,UACA,WACA,WACA,YACA,QACA,QACA,SACA,UACA,QACA,UACA,SACA,QACA,YACA,MACA,UACA,SACA,UACA,WACA,QACA,UACA,WACA,UACA,WACA,OACA,UACA,UACA,WACA,QACA,YACA,SACA,WACA,YACA,SACA,QACA,UACA,YACA,WACA,QACA,YACA,SACA,WACA,YACA,SACA,WACA,YACA,WACA,UACA,UACA,YACA,QACA,QACA,WACA,QACA,QACA,UACA,QACA,SACA,YACA,YACA,SACA,YACA,SACA,UACA,QACA,WACA,SACA,YACA,UACA,WACA,WACA,SACA,WACA,WACA,WACA,YACA,YACA,QACA,UACA,UACA,SACA,WACA,SACA,WACA,YACA,SACA,SACA,UACA,YACA,WACA,WACA,UACA,UACA,WACA,QACA,QACA,WACA,YACA,SACA,UACA,WACA,YACA,YACA,SACA,UACA,SACA,YACA,SACA,UACA,WACA,WACA,QACA,SACA,WACA,WACA,WACA,SACA,WACA,UACA,UACA,UACA,SACA,WACA,YACA,YACA,WACA,OACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,SACA,UACA,OACA,SACA,WACA,YACA,YACA,YACA,YACA,WACA,QACA,YACA,SACA,SACA,SACA,WACA,YACA,SACA,SACA,YACA,UACA,WACA,QACA,UACA,UACA,SACA,WACA,UACA,UACA,SACA,WACA,QACA,YACA,YACA,UACA,UACA,WACA,SACA,QACA,SACA,UACA,YACA,UACA,SACA,QACA,QACA,WACA,UACA,YACA,UACA,QACA,QACA,UACA,UACA,QACA,UACA,WACA,QACA,SACA,QACA,UACA,QACA,YACA,UACA,UACA,UACA,YACA,QACA,SACA,OACA,QACA,QACA,QACA,QACA,UACA,SACA,WACA,SACA,SACA,UACA,WACA,YACA,SACA,UACA,SACA,UACA,QACA,UACA,YACA,UACA,QACA,OACA,QACA,YACA,QACA,QACA,WACA,UACA,WACA,WACA,QACA,WACA,YACA,WACA,UACA,UACA,YACA,YACA,UACA,YACA,SACA,YACA,SACA,QACA,QACA,UACA,WACA,WACA,SACA,WACA,UACA,UACA,QACA,UACA,YACA,YACA,WACA,QACA,SACA,WACA,WACA,YACA,WACA,SACA,SACA,SACA,SACA,SACA,UACA,WACA,YACA,SACA,QACA,SACA,WACA,UACA,UACA,YACA,OACA,QACA,OACA,MACA,UACA,WACA,UACA,SACA,SACA,SACA,OACA,UACA,WACA,WACA,SACA,SACA,UACA,OACA,YACA,QACA,OACA,OACA,SACA,YACA,SACA,YACA,SACA,WACA,SACA,UACA,YACA,SACA,UACA,SACA,WACA,WACA,UACA,SACA,UACA,MACA,QACA,SACA,SACA,SACA,UACA,WACA,YACA,UACA,UACA,QACA,UACA,WACA,YACA,UACA,UACA,OACA,SACA,SACA,WACA,SACA,UACA,YACA,WACA,WACA,UACA,SACA,SACA,SACA,OACA,QACA,QACA,QACA,SACA,UACA,UACA,WACA,UACA,UACA,WACA,WACA,WACA,WACA,WACA,WACA,SACA,YACA,UACA,WACA,WACA,QACA,UACA,WACA,WACA,UACA,QACA,YACA,UACA,OACA,UACA,UACA,WACA,YACA,SACA,QACA,OACA,UACA,QACA,WACA,YACA,UACA,WACA,QACA,UACA,OACA,OACA,QACA,QACA,QACA,SACA,QACA,YACA,SACA,SACA,UACA,QACA,SACA,YACA,UACA,WACA,YACA,WACA,WACA,QACA,WACA,YACA,SACA,OACA,OACA,SACA,WACA,SACA,SACA,UACA,WACA,SACA,OACA,YACA,UACA,SACA,OACA,OACA,QACA,QACA,MACA,QACA,UACA,YACA,UACA,WACA,UACA,QACA,WACA,QACA,YACA,QACA,QACA,QACA,UACA,QACA,OACA,SACA,YACA,YACA,UACA,QACA,UACA,SACA,UACA,SACA,SACA,WACA,YACA,SACA,WACA,QACA,UACA,UACA,OACA,QACA,QACA,SACA,QACA,QACA,SACA,WACA,QACA,QACA,UACA,WACA,SACA,UACA,SACA,QACA,UACA,UACA,QACA,QACA,WACA,YACA,YACA,UACA,YACA,WACA,WACA,YACA,YACA,YACA,WACA,UACA,WACA,WACA,YACA,WACA,QACA,OACA,QACA,UACA,SACA,WACA,QACA,YACA,YACA,WACA,YACA,UACA,WACA,UACA,WACA,SACA,YACA,YACA,WACA,YACA,SACA,QACA,YACA,UACA,WACA,YACA,UACA,WACA,QACA,OACA,SACA,YACA,SACA,SACA,QACA,SACA,QACA,QACA,UACA,SACA,UACA,UACA,WACA,UACA,WACA,QACA,SACA,WACA,YACA,UACA,YACA,WACA,YACA,UACA,WACA,SACA,WACA,WACA,SACA,WACA,WACA,WACA,UACA,WACA,UACA,UACA,WACA,SACA,SACA,YACA,SACA,SACA,UACA,QACA,WACA,SACA,QACA,QACA,QACA,WACA,SACA,SACA,WACA,YACA,UACA,UACA,WACA,SACA,UACA,SACA,QACA,SACA,SACA,SACA,QACA,QACA,QACA,SACA,YACA,YACA,SACA,SACA,SACA,SACA,SACA,OACA,OACA,OACA,UACA,WACA,WACA,QACA,SACA,WACA,SACA,WACA,WACA,YACA,SACA,WACA,YACA,YACA,WACA,UACA,YACA,QACA,WACA,WACA,SACA,SACA,SACA,YACA,UACA,YACA,YACA,SACA,QACA,UACA,QACA,QACA,UACA,WACA,WACA,YACA,UACA,WACA,YACA,YACA,YACA,WACA,WACA,UACA,UACA,QACA,QACA,QACA,SACA,WACA,YACA,SACA,UACA,WACA,WACA,YACA,UACA,QACA,WACA,UACA,YACA,UACA,WACA,SACA,WACA,UACA,WACA,UACA,YACA,UACA,UACA,WACA,QACA,QACA,SACA,YACA,SACA,UACA,SACA,UACA,YACA,UACA,QACA,YACA,WACA,WACA,YACA,QACA,QACA,QACA,YACA,WACA,YACA,YACA,UACA,OACA,SACA,UACA,OACA,SACA,UACA,YACA,YACA,WACA,YACA,UACA,OACA,QACA,UACA,UACA,YACA,SACA,WACA,YACA,QACA,YACA,YACA,UACA,WACA,UACA,WACA,WACA,WACA,SACA,WACA,SACA,UACA,YACA,OACA,SACA,QACA,QACA,QACA,QACA,QACA,YACA,YACA,YACA,UACA,QACA,QACA,SACA,QACA,QACA,YACA,YACA,WACA,UACA,UACA,WACA,YACA,WACA,UACA,YACA,YACA,QACA,QACA,QACA,WACA,UACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,UACA,QACA,QACA,SACA,SACA,SACA,WACA,YACA,QACA,SACA,UACA,SACA,WACA,SACA,SACA,SACA,SACA,WACA,SACA,WACA,SACA,SACA,WACA,YACA,WACA,YACA,SACA,YACA,UACA,WACA,QACA,SACA,QACA,UACA,UACA,UACA,WACA,SACA,QACA,UACA,UACA,SACA,QACA,UACA,WACA,SACA,UACA,YACA,QACA,QACA,UACA,UACA,WACA,QACA,SACA,WACA,SACA,UACA,YACA,UACA,WACA,SACA,QACA,YACA,YACA,YACA,UACA,WACA,WACA,WACA,YACA,UACA,WACA,SACA,WACA,UACA,YACA,WACA,YACA,YACA,WACA,SACA,UACA,WACA,YACA,YACA,YACA,UACA,YACA,YACA,UACA,UACA,WACA,YACA,YACA,UACA,WACA,SACA,WACA,WACA,UACA,SACA,SACA,YACA,UACA,YACA,OACA,UACA,SACA,SACA,OACA,WACA,YACA,UACA,SACA,YACA,WACA,QACA,UACA,QACA,WACA,WACA,WACA,SACA,UACA,UACA,UACA,SACA,OACA,SACA,WACA,YACA,SACA,YACA,YACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,SACA,WACA,SACA,UACA,YACA,UACA,YACA,SACA,WACA,UACA,YACA,YACA,SACA,UACA,WACA,UACA,UACA,UACA,UACA,WACA,UACA,YACA,YACA,WACA,SACA,WACA,UACA,YACA,WACA,QACA,UACA,UACA,WACA,YACA,YACA,OACA,YACA,UACA,YACA,OACA,WACA,QACA,OACA,QACA,QACA,QACA,QACA,QACA,SACA,UACA,UACA,YACA,YACA,UACA,WACA,WACA,WACA,UACA,WACA,QACA,QACA,SACA,SACA,UACA,UACA,QACA,SACA,QACA,QACA,QACA,WACA,WACA,YACA,WACA,UACA,UACA,WACA,UACA,WACA,WACA,YACA,YACA,QACA,SACA,UACA,UACA,QACA,WACA,SACA,SACA,YACA,UACA,YACA,UACA,SACA,WACA,QACA,OACA,UACA,WACA,UACA,UACA,WACA,UACA,YACA,MACA,UACA,OACA,SACA,SACA,WACA,OACA,QACA,SACA,WACA,QACA,SACA,OACA,SACA,UACA,UACA,UACA,WACA,UACA,WACA,WACA,UACA,UACA,OACA,YACA,SACA,SACA,UACA,QACA,SACA,SACA,WACA,OACA,SACA,QACA,YACA,UACA,QACA,WACA,SACA,WACA,SACA,QACA,SACA,QACA,OACA,OACA,UACA,YACA,OACA,QACA,QACA,WACA,WACA,UACA,UACA,YACA,QACA,SACA,WACA,UACA,UACA,YACA,WACA,WACA,QACA,UACA,QACA,QACA,SACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,SACA,QACA,QACA,QACA,WACA,SACA,SACA,WACA,YACA,SACA,SACA,SACA,WACA,SACA,YACA,SACA,WACA,YACA,YACA,UACA,WACA,OACA,QACA,WACA,WACA,OACA,YACA,UACA,QACA,QACA,QACA,SACA,WACA,UACA,OACA,QACA,UACA,UACA,YACA,YACA,WACA,UACA,OACA,SACA,OACA,OACA,QACA,SACA,UACA,YACA,UACA,SACA,WACA,SACA,SACA,WACA,SACA,WACA,OACA,UACA,OACA,SACA,SACA,SACA,UACA,YACA,SACA,SACA,SACA,QACA,UACA,QACA,WACA,UACA,QACA,UACA,YACA,UACA,UACA,WACA,YACA,QACA,UACA,SACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,QACA,QACA,SACA,WACA,WACA,OACA,YACA,WACA,YACA,UACA,QACA,SACA,OACA,UACA,UACA,YACA,SACA,SACA,QACA,WACA,SACA,QACA,WACA,YACA,WACA,UACA,YACA,UACA,UACA,WACA,WACA,WACA,UACA,YACA,SACA,WACA,WACA,UACA,QACA,SACA,YACA,WACA,UACA,YACA,UACA,WACA,WACA,UACA,OACA,SACA,WACA,UACA,UACA,UACA,WACA,WACA,SACA,WACA,UACA,UACA,YACA,SACA,WACA,QACA,SACA,QACA,QACA,UACA,QACA,SACA,YACA,UACA,WACA,WACA,YACA,QACA,MACA,QACA,WACA,UACA,UACA,UACA,MACA,UACA,QACA,SACA,WACA,QACA,SACA,UACA,WACA,WACA,YACA,OACA,SACA,UACA,SACA,SACA,OACA,QACA,OACA,MACA,QACA,QACA,QACA,WACA,SACA,YACA,SACA,QACA,QACA,UACA,YACA,OACA,WACA,QACA,QACA,QACA,YACA,UACA,UACA,WACA,SACA,SACA,UACA,SACA,QACA,OACA,QACA,WACA,YACA,QACA,YACA,WACA,SACA,YACA,SACA,YACA,YACA,WACA,UACA,YACA,YACA,YACA,YACA,YACA,UACA,UACA,UACA,YACA,WACA,SACA,SACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,UACA,WACA,WACA,YACA,UACA,YACA,YACA,UACA,UACA,SACA,YACA,YACA,UACA,QACA,SACA,UACA,SACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,SACA,YACA,YACA,WACA,UACA,UACA,UACA,UACA,YACA,UACA,YACA,WACA,QACA,YACA,UACA,YACA,SACA,YACA,YACA,WACA,WACA,YACA,YACA,WACA,WACA,YACA,WACA,YACA,YACA,UACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,YACA,YACA,YACA,YACA,WACA,WACA,YACA,YACA,YACA,YACA,YACA,YACA,WACA,UACA,SACA,YACA,UACA,YACA,WACA,UACA,WACA,UACA,SACA,WACA,SACA,YACA,UACA,WACA,YACA,WACA,YACA,WACA,UACA,YACA,SACA,YACA,YACA,YACA,SACA,WACA,UACA,YACA,UACA,WACA,WACA,YACA,YACA,UACA,WACA,YACA,SACA,YACA,WACA,WACA,YACA,WACA,WACA,WACA,WACA,SACA,UACA,WACA,YACA,YACA,WACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,YACA,WACA,UACA,YACA,SACA,SACA,UACA,WACA,UACA,UACA,YACA,YACA,QACA,YACA,YACA,YACA,YACA,YACA,QACA,WACA,YACA,SACA,WACA,OACA,YACA,WACA,WACA,UACA,SACA,YACA,YACA,UACA,UACA,UACA,WACA,WACA,YACA,UACA,SACA,YACA,YACA,YACA,YACA,UACA,WACA,WACA,QACA,YACA,WACA,WACA,WACA,YACA,YACA,UACA,WACA,WACA,YACA,UACA,SACA,YACA,WACA,WACA,WACA,WACA,YACA,YACA,YACA,YACA,UACA,WACA,UACA,YACA,UACA,WACA,YACA,UACA,YACA,WACA,UACA,YACA,YACA,WACA,YACA,SACA,WACA,SACA,YACA,WACA,UACA,WACA,WACA,YACA,WACA,YACA,YACA,YACA,YACA,WACA,SACA,YACA,WACA,UACA,WACA,UACA,YACA,YACA,SACA,SACA,YACA,YACA,YACA,WACA,SACA,YACA,YACA,WACA,SACA,YACA,YACA,UACA,SACA,YACA,SACA,WACA,WACA,SACA,SACA,WACA,UACA,WACA,YACA,YACA,UACA,WACA,WACA,YACA,WACA,WACA,SACA,WACA,YACA,SACA,YACA,YACA,WACA,WACA,WACA,YACA,YACA,YACA,WACA,YACA,WACA,WACA,SACA,WACA,WACA,SACA,WACA,WACA,YACA,WACA,WACA,YACA,YACA,WACA,YACA,YACA,WACA,YACA,UACA,YACA,YACA,WACA,WACA,WACA,SACA,UACA,WACA,YACA,UACA,UACA,YACA,WACA,UACA,WACA,WACA,SACA,QACA,QACA,UACA,WACA,WACA,YACA,SACA,YACA,YACA,YACA,YACA,UACA,YACA,SACA,UACA,WACA,UACA,UACA,WACA,SACA,UACA,WACA,WACA,YACA,WACA,YACA,WACA,WACA,YACA,UACA,WACA,YACA,SACA,WACA,YACA,UACA,QACA,YACA,SACA,WACA,YACA,SACA,UACA,YACA,YACA,YACA,SACA,YACA,WACA,UACA,UACA,YACA,YACA,QACA,SACA,UACA,WACA,YACA,SACA,UACA,UACA,WACA,SACA,SACA,SACA,WACA,YACA,SACA,OACA,QACA,UACA,WACA,UACA,SACA,SACA,UACA,SACA,UACA,WACA,UACA,UACA,WACA,WACA,UACA,SACA,UACA,SACA,WACA,SACA,SACA,UACA,QACA,SACA,WACA,UACA,SACA,SACA,YACA,UACA,SACA,QACA,UACA,OACA,YACA,OACA,QACA,QACA,UACA,UACA,UACA,SACA,SACA,QACA,UACA,SACA,SACA,WACA,WACA,WACA,YACA,UACA,YACA,UACA,QACA,SACA,SACA,YACA,QACA,UACA,SACA,SACA,WACA,UACA,YACA,WACA,WACA,SACA,UACA,UACA,UACA,UACA,UACA,UACA,WACA,WACA,SACA,WACA,OACA,QACA,SACA,YACA,SACA,WACA,SACA,WACA,UACA,SACA,YACA,WACA,WACA,YACA,UACA,QACA,QACA,YACA,WACA,UACA,UACA,SACA,QACA,UACA,SACA,YACA,WACA,UACA,OACA,SACA,OACA,UACA,OACA,WACA,YACA,SACA,QACA,OACA,WACA,UACA,QACA,WACA,SACA,UACA,WACA,YACA,WACA,UACA,UACA,YACA,WACA,UACA,UACA,YACA,WACA,SACA,SACA,QACA,QACA,UACA,WACA,QACA,OACA,YACA,UACA,WACA,UACA,UACA,SACA,WACA,UACA,QACA,QACA,WACA,WACA,UACA,WACA,YACA,UACA,YACA,QACA,WACA,WACA,UACA,WACA,QACA,UACA,OACA,WACA,SACA,UACA,UACA,QACA,SACA,UACA,QACA,QACA,SACA,YACA,MACA,QACA,SACA,QACA,QACA,QACA,SACA,QACA,OACA,SACA,OACA,UACA,SACA,SACA,QACA,OACA,UACA,SACA,UACA,SACA,WACA,YACA,YACA,WACA,YACA,UACA,SACA,SACA,YACA,UACA,UACA,WACA,YACA,UACA,OACA,UACA,QACA,QACA,WACA,SACA,OACA,WACA,SACA,OACA,QACA,QACA,WACA,QACA,YACA,SACA,QACA,WACA,UACA,QACA,WACA,UACA,WACA,SACA,MACA,OACA,SACA,QACA,SACA,QACA,QACA,YACA,UACA,OACA,OACA,YACA,WACA,UACA,SACA,WACA,WACA,WACA,WACA,SACA,WACA,SACA,YACA,UACA,SACA,YACA,OACA,OACA,QACA,UACA,OACA,OACA,UACA,SACA,WACA,SACA,OACA,QACA,WACA,SACA,OACA,SACA,OACA,OACA,WACA,QACA,UACA,SACA,SACA,WACA,SACA,MACA,OACA,YACA,YACA,YACA,YACA,YACA,UACA,OACA,OACA,SACA,OACA,QACA,OACA,OACA,UACA,UACA,YACA,QACA,YACA,YACA,QACA,QACA,QACA,MACA,UACA,QACA,SACA,WACA,UACA,WACA,SACA,UACA,UACA,UACA,UACA,QACA,UACA,UACA,YACA,UACA,WACA,UACA,YACA,UACA,OACA,QACA,QACA,MACA,UACA,UACA,OACA,OACA,OACA,WACA,WACA,SACA,WACA,QACA,UACA,OACA,MACA,YACA,UACA,QACA,MACA,SACA,QACA,QACA,OACA,SACA,SACA,OACA,QACA,MACA,UACA,QACA,MACA,WACA,OACA,YACA,QACA,YACA,UACA,UACA,QACA,OACA,MACA,SACA,SACA,OACA,SACA,YACA,YACA,UACA,O,oFCxlPK,MAAMC,EAIX,MAAA7jK,GACE,MAAO,CACLt4B,UAAW9jE,KAAK8jE,UAChBs1C,UACEp5G,KAAKo5G,qBAAqBqW,YACtB,IAAMoQ,uBAAu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B,0HCAN,MAAME,EACX,aAAmCngR,GACjC,MAAO,CAAC,gBACV,CAEA,WAAApH,CAAgCsnR,GAAA,KAAAA,oBAAAA,CAA8C,CAE9E,QAAAnjR,GACMpF,KAAKuoR,sBACPvoR,KAAKuoR,oBAAoBntP,KAAO,QAEpC,E,iCAXWotP,GAAkB,e,mBAAlBA,EAAkB,2EAAlB,kB,oMCEPxH,EAAY,CAMhB,cACA,yBACA,kBACA,qBACA,yBACA,uBACA,uBACA,mBACA,6BACA,yBAGI1B,EAA2C,CAC/CmJ,SAAU,CACR,oBACA,oBACA,wBACA,gCACA,gCACA,6CACA,yBACA,uCACA,sCACGzH,GAEL0H,KAAM,CACJ,oBACA,gBACA,wBACA,gCACA,8BACA,2CACA,kCACA,uCACA,sCACG1H,GAEL2H,MAAO,CACL,oBACA,iBACA,wBACA,iCACA,kCACA,gCACA,8BACA,2CACA,kCACA,0CACA,8CACA,uCACA,sCACG3H,GAELzB,QAAS,CACP,oBACA,oBACA,wBACA,0BACA,8BACA,2CACA,yBACA,uCACA,sCACGyB,GAELxB,UAAW,CACT,oBACA,iBACA,uBACA,0BACA,yBACA,2CACA,yBACA,sCACA,mCACA,mCACGwB,GAELvB,OAAQ,CACN,oBACA,sBACA,wBACA,4BACA,0BACA,8BACA,2CACA,kCACA,uCACA,mCACA,2CACGuB,GAEL4H,MAAO,CACL,oBACA,gBACA,wBACA,gCACA,4BACA,yCACA,yBACA,uCACA,sCACG5H,GAELE,SAAU,IAKN2H,EAA0C,CAC9CvrD,QAAS,CAAC,YAAa,aACvBmgD,MAAO,CAAC,kBAAmB,eAAgB,WAatC,MAAMqL,EAOX,aAA0BzgR,G,MACxB,MAAO,CACL,mBACA,YACA,kBACA,gBACA,gBACA,wBACA,yBAEC2V,OAAOshQ,EAAsB,QAAf,EAAAt/Q,KAAKorJ,kBAAU,QAAI,SACjCptI,OAAO6qQ,EAAM7oR,KAAKo7B,MACvB,CAEA,aAAI6hM,GACF,MAAO,CAACj9N,KAAKme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xBA,GAAwB,s2CD1CrC,kBACE,uCACE,gDACE,oCAAuB,S,gBAA8B,QACvD,0BACA,wCACE,gDACE,6CACE,U,iBACF,QACA,gDACE,yDAMF,+BACF,6BACA,gDACE,6CACE,U,iBACF,QACA,2CACF,6BACA,gDACE,6CACE,U,iBACF,QACA,2CACF,6BACA,gDACE,6CACE,U,iBACF,QACA,2CACF,6BACA,gDACE,6CACE,U,iBACF,QACA,2CACF,6BACA,kDACE,6CACE,U,iBACF,QACA,2CACF,6BACF,2BACF,yBACA,yCACE,kDACE,sCAAuB,U,iBAA6B,QACtD,2BACA,wCACE,gDACE,6CACE,U,iBACF,QACA,4CACA,6CAOF,6BACA,gDACE,6CACE,U,iBACF,QACA,6CACA,+CAOF,8BACA,oDACE,+CACE,W,kBACF,QACA,8CACF,8BACF,4BACF,0BACA,2CACE,oDACE,wCAAuB,W,kBAA0B,QACnD,4BACA,0CACE,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,oDACE,+CACE,W,kBACF,QACA,8CACF,8BACF,4BACF,0BACA,2CACE,oDACE,wCAAuB,W,kBAAsB,QAC/C,4BACA,0CACE,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,kDACE,+CACE,W,kBACF,QACA,8CACF,8BACA,oDACE,+CACE,W,kBACF,QACA,8CACF,8BACF,4BACF,0BACF,wBACA,iB,MA/JM,kCAGuB,8CAKnB,iEAIoB,iDASpB,qEAMA,sEAMA,oEAMA,oEAMA,mEAQmB,+CAKnB,+DAaA,2EAaA,2EAQmB,6CAKnB,kEAMA,kEAQmB,yCAKnB,qEAMA,qEAMA,qEAMA,qEAMA,0EAMA,0EAMA,oE,gBC3HN,KAAY,KACZ,IACA,IAAW,IACX,KAAmB,8BACnB,IACA,IACA,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,EAAE2C,E","sources":["webpack://@bitwarden/web-vault/webpack/runtime/chunk loaded","webpack://@bitwarden/web-vault/webpack/runtime/create fake namespace object","webpack://@bitwarden/web-vault/webpack/runtime/load script","webpack://@bitwarden/web-vault/./src/app/admin-console/core/policy-list.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/core-organization.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/group-details.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/group.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/requests/group.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/requests/organization-group-bulk.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/responses/group.response.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/group/group-api.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/organization-user-admin-view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/services/user-admin.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/core/views/organization-user.view.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-create.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-information.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/create/organization-information.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/org-switcher/org-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/org-switcher/org-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/icons/admin-console-logo.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/layouts/organization-layout.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/layouts/organization-layout.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/rxjs-operators.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-verify-delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/verify-recover-delete-org.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/manage/verify-recover-delete-org.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/policy.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/base-policy.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/disable-send.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/disable-send.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/master-password.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/master-password.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/password-generator.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/password-generator.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/personal-ownership.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/personal-ownership.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/require-sso.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/require-sso.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/reset-password.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/reset-password.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/send-options.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/send-options.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/single-org.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/single-org.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/two-factor-authentication.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/two-factor-authentication.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policy-edit.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policy-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/policies/policies.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/settings/components/delete-organization-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/form-selection-list.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/user-type.pipe.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.models.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/shared/components/access-selector/access-selector.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/login/web-login-component.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/login-decryption-options/web-login-decryption-options.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/webauthn-rotate-credential.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/credential-create-options.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/pending-webauthn-login-credential.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/views/webauthn-login-credential.view.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/rotateable-key-set.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/enable-credential-encryption.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/save-credential.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/webauthn-login-authenticator-response.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/request/webauthn-login-attestation-response.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/response/webauthn-login-credential-create-options.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/response/webauthn-login-credential.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/webauthn-login-admin-api.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/webauthn-login/webauthn-login-admin.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/set-password-jit/web-set-password-jit.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/registration/web-registration-finish.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/emergency-access.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/enums/emergency-access-status-type.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/response/emergency-access.response.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/services/emergency-access-api.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-accept.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-confirm.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-invite.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-password.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/request/emergency-access-update.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/services/emergency-access.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/guards/deep-link.guard.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/webauthn-login-settings/webauthn-login-settings.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/settings.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/auth.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/organization-invite.ts","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/danger-zone.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/danger-zone.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-profile.request.ts","webpack://@bitwarden/web-vault/./src/app/components/selectable-avatar.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-avatar-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-avatar-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/profile.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/profile.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/api-key.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/api-key.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-duo.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-duo.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-duo.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-method-base.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-recovery.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-recovery.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/disable-two-factor-authenticator.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-authenticator.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-authenticator.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-email.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-email.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-web-authn-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-web-authn.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-two-factor-yubikey-otp.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-yubikey.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup-yubikey.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-setup.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-verify.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/two-factor/two-factor-verify.component.html","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/user-verification-prompt.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification-prompt.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification-prompt.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/user-verification.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.component.html","webpack://@bitwarden/web-vault/./src/app/auth/shared/components/user-verification/user-verification.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/organizations/change-plan-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/billing/organizations/change-plan-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/provider/provider-organization-create.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/self-hosting-license-uploader/organization-self-hosting-license-uploader.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/self-hosting-license-uploader/self-hosting-license-uploader.component.html","webpack://@bitwarden/web-vault/./src/app/billing/organizations/organization-plans.component.html","webpack://@bitwarden/web-vault/./src/app/billing/organizations/organization-plans.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/services/free-families-policy.service.ts","webpack://@bitwarden/web-vault/./src/app/billing/services/trial-flow.service.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/add-credit-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/add-credit-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog-v2.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog-v2.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-payment-dialog/adjust-payment-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-storage-dialog/adjust-storage-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/adjust-storage-dialog/adjust-storage-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/billing-shared.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-bank.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment-method.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment-label-v2.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment-label-v2.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/services/billing-services.module.ts","webpack://@bitwarden/web-vault/./src/app/billing/services/braintree.service.ts","webpack://@bitwarden/web-vault/./src/app/billing/services/stripe.service.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment-v2.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment-v2.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/payment/payment.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/self-hosting-license-uploader/abstract-self-hosting-license-uploader.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/secrets-manager-logo.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/sm-subscribe.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/sm-subscribe.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/tax-info.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/tax-info.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/verify-bank-account.request.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/verify-bank-account/verify-bank-account.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/verify-bank-account/verify-bank-account.component.ts","webpack://@bitwarden/web-vault/./src/app/common/base.accept.component.ts","webpack://@bitwarden/web-vault/./src/app/components/dynamic-avatar.component.ts","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/org-domain.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/sso.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing-history.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/api-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/api/sso-config.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/organization-sso.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/payment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/tax-info.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-api-key-information.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-auto-enroll-status.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/keys.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-keys.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization/organization.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/responses/organization-domain-sso-details.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/responses/organization-domain.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/responses/verified-organization-domain-sso-details.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/requests/organization-domain-sso-details.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-management-preferences/default-organization-management-preferences.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/reset-password-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/policy/policy.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/provider.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/user-verification/user-verification-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/account.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/notification.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/update-avatar.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/avatar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-devices-trust.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/device-trust.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/responses/device.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/protected-device.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices/requests/trusted-device-keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/key-connector-user-key.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/set-key-connector-key.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/key-connector.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/master-password/master-password.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/sso-login.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/set-tokens-result.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/token.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/token.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/verify-otp.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/badge-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/account/billing-account-profile-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/payment-source.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/payment-method.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/organization-billing-metadata.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/subscription-suspension.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/provider-subscription-response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/preview-invoice.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/config-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-upload/file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/key-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/sdk/sdk-client-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/storage.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/account-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/global-state-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/factories/state-factory.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/message.listener.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/helpers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/subject-message.sender.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/flags.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/global-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/app-id.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/server-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/response/server-config.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/server-config.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/data/server-config.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/config/default-config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/get-class-initializer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/encrypted-object.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/encrypt.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/default-environment.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/azure-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/bitwarden-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migration-builder.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrator.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/10-move-ever-had-user-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/11-move-org-keys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/12-move-environment-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/13-move-provider-keys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/14-move-biometric-client-key-half-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/15-move-folder-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/16-move-last-sync-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/17-move-enable-passkeys-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/18-move-autofill-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/19-migrate-require-password-on-start.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/20-move-private-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/21-move-collections-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/22-move-collapsed-groupings-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/23-move-biometric-prompts-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/24-move-sm-onboarding-key-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/25-move-clear-clipboard-to-autofill-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/26-revert-move-last-sync-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/27-move-badge-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/28-move-biometric-unlock-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/29-move-user-notification-settings-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/30-move-policy-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/31-move-enable-context-menu-to-autofill-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/32-move-preferred-language.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/33-move-app-id-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/34-move-domain-settings-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/35-move-theme-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/36-move-show-card-and-identity-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/37-move-avatar-color-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/38-migrate-token-svc-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/39-move-billing-account-profile-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/4-remove-ever-been-unlocked.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/40-move-organization-state-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/41-move-event-collection-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/42-move-enable-favicon-to-domain-settings-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/43-move-auto-confirm-finger-prints-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/44-move-user-decryption-options-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/45-merge-environment-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/46-delete-orphaned-biometric-prompt-data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/47-move-desktop-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/48-move-ddg-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/49-move-account-server-configs.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/5-add-key-type-to-org-keys.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/50-move-key-connector-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/51-move-remembered-email-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/52-delete-installed-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/53-migrate-device-trust-svc-to-state-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/54-move-encrypted-sends.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/55-move-master-key-state-to-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/56-move-auth-requests.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/57-move-cipher-service-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/58-remove-refresh-token-migrated-state-provider-flag.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/59-move-kdf-config-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/6-remove-legacy-etm-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/60-known-accounts.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/61-move-pin-state-to-providers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/62-migrate-vault-timeout-settings-svc-to-state-provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/63-migrate-password-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/64-migrate-generator-history.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/65-migrate-forwarder-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/66-move-final-desktop-settings.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/67-remove-unassigned-items-banner-dismissed.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/68-move-last-sync-date.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/7-move-biometric-auto-prompt-to-account.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/8-move-state-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/9-move-browser-settings-to-global.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrations/min-version.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migrate.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/migration-builder.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/state-migrations/migration-helper.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/migration-runner.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/storage-service.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/user-auto-unlock-key.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-active-user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-derived-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-update-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/util.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/state-base.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-global-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-single-user-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/provider.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send-file.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send-text.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/data/send.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/folder.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/sequentialize.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/core-sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/default-sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-connection.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-export.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization-sponsorship-sync-status.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/pre-validate-sponsorship.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user-bulk-public-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user-bulk.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/provider/provider-user.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/auth-request.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/device-verification.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/key-connector-user-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/prelogin.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/register.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/sso-pre-validate.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-authenticator.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-duo.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-email.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-recover.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-yubi-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/billing-payment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/tax-rate.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/collection-bulk-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/breach-account.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/event.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/user-key.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/attachment-upload-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/optional-cipher.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/audit.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/throttle.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/data/event.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/event.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/search.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-access.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-file-download-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send-file-upload-data.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-state.provider.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/file-upload/cipher-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/sorted-ciphers-cache.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-move.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-restore.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-share.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-update-collections.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-collections.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-create.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-partial.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-share.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/ciphers.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/cipher.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/folder.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/totp.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/vault-settings.state.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/logging-error-handler.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/noop-view-cache.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/theming/angular-theming.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/jslib-services.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/auth.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/file-upload/file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/file-upload/cipher-file-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/folder/folder.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/folder/folder-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/account-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/default-broadcaster.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/notifications.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/web-crypto-function.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/multithread-encrypt.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/bulk-encrypt.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/event-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/event/event-collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/policy/policy-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/user-verification/user-verification.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/types/verification.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/password-reset-enrollment.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/form-validation-errors.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/user-verification/user-verification-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization/organization-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/organization/organization-billing-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/account/account-billing-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/config/config-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/anonymous-hub.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/validation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/org-domain.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/organization-domain/org-domain-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices-api.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/devices/devices.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login-prf-key.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/webauthn-login.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-global-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-active-user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-single-user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-derived-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/implementations/default-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/organization-billing.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/vault-settings/vault-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/vault-settings/vault-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/billing-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/services/tax.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/services/provider/provider-api.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/abstractions/view-cache.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/sdk/default-sdk.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/memory-storage.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/storage/window-storage.service.ts","webpack://@bitwarden/web-vault/./src/app/auth/core/services/login/web-sso-component.service.ts","webpack://@bitwarden/web-vault/./src/app/core/html-storage.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/translation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/i18n.service.ts","webpack://@bitwarden/web-vault/./src/translation-constants.ts","webpack://@bitwarden/web-vault/./src/app/key-management/web-biometric.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-environment.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-migration-runner.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-sdk-client-factory.ts","webpack://@bitwarden/web-vault/./src/app/core/event.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/container.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/version.service.ts","webpack://@bitwarden/web-vault/./src/app/core/init.service.ts","webpack://@bitwarden/web-vault/./src/app/core/injection-tokens.ts","webpack://@bitwarden/web-vault/./src/app/core/modal.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-download/file-download.builder.ts","webpack://@bitwarden/web-vault/./src/app/core/web-file-download.service.ts","webpack://@bitwarden/web-vault/./src/app/core/core.module.ts","webpack://@bitwarden/web-vault/./src/app/core/i18n.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/storage/memory-storage.service.ts","webpack://@bitwarden/web-vault/./src/app/platform/web-storage-service.provider.ts","webpack://@bitwarden/web-vault/./src/app/key-management/lock/services/web-lock-component.service.ts","webpack://@bitwarden/web-vault/./src/utils/flags.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts","webpack://@bitwarden/web-vault/./src/app/key-management/services/web-process-reload.service.ts","webpack://@bitwarden/web-vault/./src/app/core/router.service.ts","webpack://@bitwarden/web-vault/./src/app/core/web-platform-utils.service.ts","webpack://@bitwarden/web-vault/./src/app/key-management/key-rotation/user-key-rotation-api.service.ts","webpack://@bitwarden/web-vault/./src/app/key-management/key-rotation/user-key-rotation.module.ts","webpack://@bitwarden/web-vault/./src/app/key-management/key-rotation/request/update-key.request.ts","webpack://@bitwarden/web-vault/./src/app/key-management/key-rotation/user-key-rotation.service.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher-content.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher-content.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/header/header.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/header/web-header.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/header/web-header.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/product-switcher.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/shared/product-switcher.service.ts","webpack://@bitwarden/web-vault/./src/app/billing/shared/billing-free-families-nav-item.component.html","webpack://@bitwarden/web-vault/./src/app/billing/shared/billing-free-families-nav-item.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/password-manager-logo.ts","webpack://@bitwarden/web-vault/./src/app/layouts/user-layout.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/user-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/web-layout.module.ts","webpack://@bitwarden/web-vault/./src/app/layouts/toggle-width.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.html","webpack://@bitwarden/web-vault/./src/app/layouts/product-switcher/navigation-switcher/navigation-switcher.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-side-nav.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/web-side-nav.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/account-fingerprint/account-fingerprint.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/account-fingerprint/account-fingerprint.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.module.ts","webpack://@bitwarden/web-vault/./src/app/shared/loose-components.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/avatar/avatar.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tabs.module.ts","webpack://@bitwarden/web-vault/./src/app/shared/locales.ts","webpack://@bitwarden/web-vault/./src/app/shared/shared.module.ts","webpack://@bitwarden/web-vault/./src/app/core/guards/has-premium.guard.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/breach-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/breach-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-breach.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-exposed-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-inactive-two-factor.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-member-access.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-reused-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-unsecured-websites.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/icons/report-weak-passwords.icon.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/reports-shared.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reports-home.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reports-home.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-layout.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/reports.module.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/cipher-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/exposed-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/exposed-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/inactive-two-factor-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/inactive-two-factor-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reused-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/reused-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/unsecured-websites-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/unsecured-websites-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/weak-passwords-report.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/pages/weak-passwords-report.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/models/report-variant.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-card/report-card.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-card/report-card.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-list/report-list.component.html","webpack://@bitwarden/web-vault/./src/app/tools/reports/shared/report-list/report-list.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/assign-collections/assign-collections-web.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/assign-collections/assign-collections-web.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/bit-validators/forbidden-characters.validator.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/collection-dialog/collection-dialog.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/not-premium.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/premium-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/web-generator-dialog/web-generator-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/web-generator-dialog/web-generator-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/vault/services/web-cipher-form-generation.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-item-dialog/vault-item-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-item-dialog/vault-item-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/get-collection-name.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-name.badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-cipher-row.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-cipher-row.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-name-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-collection-row.component.html","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-collection-row.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/components/vault-items/vault-items.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/add-edit-custom-fields.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/true-false-value.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit-custom-fields.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit-custom-fields.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments-v2.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments-v2.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-badge.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/ellipsis.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-name-badge.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/organization-badge/organization-name-badge.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/get-organization-name.pipe.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/pipes/pipes.module.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/users/enroll-master-password-reset.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/link-sso.directive.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/organization-options.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/organization-options.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/vault-filter.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/components/vault-filter.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/abstractions/vault-filter.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/routed-vault-filter-bridge.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/routed-vault-filter-bridge.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/routed-vault-filter.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/key-state/collapsed-groupings.state.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/services/vault-filter.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/components/vault-filter-section.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/filter-function.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/routed-vault-filter.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/models/vault-filter.model.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/shared/vault-filter-shared.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/view.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/view.component.html","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/collection-badge/collection-badge.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/org-vault/group-badge/group-badge.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/services/web-premium-upgrade-prompt.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/password-history.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/password-history.component.html","webpack://@bitwarden/web-vault/./src/app/vault/services/web-view-password-history.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/settings/purge-vault.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/settings/purge-vault.component.html","webpack://@bitwarden/web-vault/./src/app/vault/utils/collection-utils.ts","webpack://@bitwarden/web-vault/./src/app/app.component.html","webpack://@bitwarden/web-vault/./src/app/app.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-expired.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/functions/unauth-ui-refresh-route-swap.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/services/vault-profile.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/guards/new-device-verification-notice.guard.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/accept-family-sponsorship.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/accept-family-sponsorship.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization/organization-sponsorship-redeem.request.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.html","webpack://@bitwarden/web-vault/./src/app/admin-console/organizations/sponsorships/families-for-enterprise-setup.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/settings/create-organization.component.ts","webpack://@bitwarden/web-vault/./src/app/admin-console/settings/create-organization.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/hint.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/hint.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/hint.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/base-login-decryption-options-v1.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-decryption-options/login-decryption-options-v1.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-decryption-options/login-decryption-options-v1.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/iframe-component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/captcha-iframe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/captcha-protected.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/login-v1.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-v1.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-v1.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/login-via-auth-request-v1.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-auth-request-v1.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-auth-request-v1.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/base-login-via-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/create-passkey-failed.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/create-passkey.icon.ts","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-webauthn/login-via-webauthn.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login-via-webauthn/login-via-webauthn.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/organization-invite/accept-organization.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-delete.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-delete.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-recovery.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-two-factor.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/recover-two-factor.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/remove-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/remove-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/remove-password.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/change-password.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/set-password.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/set-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/set-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/deauthorize-sessions.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/deauthorize-sessions.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/delete-account-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/delete-account-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/email-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-email.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/change-email.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/account.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/account/account.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/enums/emergency-access-type.ts","webpack://@bitwarden/web-vault/./src/app/auth/emergency-access/models/emergency-access.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/confirm/emergency-access-confirm.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/confirm/emergency-access-confirm.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access-add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/takeover/emergency-access-takeover.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/takeover/emergency-access-takeover.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/emergency-access.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/attachments.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/attachments/emergency-access-attachments.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-add-edit-cipher.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-view-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-view-dialog.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-access-view.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/emergency-access/view/emergency-access-view.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/password.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/change-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/change-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/device-management.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/device-management.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/kdf.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf-confirmation.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf-confirmation.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/change-kdf/change-kdf.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-keys.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-keys.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/security/security-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/sso-v1.component.html","webpack://@bitwarden/web-vault/./src/app/auth/sso-v1.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/accounts/trial-initiation/trial-billing-step.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/accounts/trial-initiation/trial-billing-step.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-step-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/confirmation-details.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/confirmation-details.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/complete-trial-initiation/complete-trial-initiation.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/complete-trial-initiation/complete-trial-initiation.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/complete-trial-initiation/resolver/free-trial-text.resolver.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/reference-event.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/register.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/register.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.component.html","webpack://@bitwarden/web-vault/./src/app/auth/register-form/register-form.component.ts","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.component.html","webpack://@bitwarden/web-vault/./src/app/components/environment-selector/environment-selector.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-badges.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-badges.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-forbes.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-forbes.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-us-news.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-us-news.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-company-testimonial.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-company-testimonial.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/default-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/default-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise1-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise1-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise2-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/enterprise2-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams1-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams1-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams2-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams2-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams3-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/teams3-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-cnet.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/logo-cnet.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-individual-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-individual-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/cnet-teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-enterprise-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-enterprise-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-teams-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/abm-teams-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/webauthn-iframe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-webauthn.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-webauthn.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-duo.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-duo.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-auth-duo.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-auth.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-options.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-options.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/two-factor-options.component.html","webpack://@bitwarden/web-vault/./src/app/auth/two-factor.component.html","webpack://@bitwarden/web-vault/./src/app/auth/two-factor.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/update-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/update-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/update-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-tde-offboarding-password.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/update-temp-password.request.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/update-temp-password.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/update-temp-password.component.html","webpack://@bitwarden/web-vault/./src/app/auth/update-temp-password.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-email.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-email-token.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-email-token.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/verify-delete-recover.request.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-recover-delete.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/verify-recover-delete.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/input-strip-spaces.directive.ts","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsoring-org-row.component.html","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsoring-org-row.component.ts","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsored-families.component.html","webpack://@bitwarden/web-vault/./src/app/billing/settings/sponsored-families.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/frontend-layout.component.ts","webpack://@bitwarden/web-vault/./src/app/layouts/frontend-layout.component.html","webpack://@bitwarden/web-vault/./src/app/auth/login/login.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/review-blurb.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/secrets-manager-content.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/review-blurb.component.html","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/content/secrets-manager-content.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/vertical-stepper/vertical-stepper.module.ts","webpack://@bitwarden/web-vault/./src/app/auth/trial-initiation/trial-initiation.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-access.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-access.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/request/send-access.request.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/icons/expired-send.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/icons/no-send.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/icons/send-created.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/abstractions/send-form.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/send-form-container.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/options/send-options.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/options/send-options.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-file-details.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-text-details.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-details/send-details.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-form.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/components/send-form.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/services/default-send-form.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/send-form.module.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-form/services/default-send-form-config.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/new-send-dropdown/new-send-dropdown.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-list-items-container/send-list-items-container.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/services/send-list-filters.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/services/send-items.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-search/send-search.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-search/send-search.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/chip-select/chip-select.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/chip-select/chip-select.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.html","webpack://@bitwarden/web-vault/../../libs/tools/send/send-ui/src/send-list-filters/send-list-filters.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-file.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-file.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-password.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-password.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-text.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-text.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/access.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/access.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-filter/vault-filter.module.ts","webpack://@bitwarden/web-vault/./src/app/oss.module.ts","webpack://@bitwarden/web-vault/./src/app/secrets-manager/models/requests/request-sm-access.request.ts","webpack://@bitwarden/web-vault/./src/app/secrets-manager/secrets-manager-landing/sm-landing-api.service.ts","webpack://@bitwarden/web-vault/./src/app/secrets-manager/secrets-manager-landing/request-sm-access.component.html","webpack://@bitwarden/web-vault/./src/app/secrets-manager/secrets-manager-landing/request-sm-access.component.ts","webpack://@bitwarden/web-vault/./src/app/secrets-manager/secrets-manager-landing/sm-landing.component.html","webpack://@bitwarden/web-vault/./src/app/secrets-manager/secrets-manager-landing/sm-landing.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/update-domains.request.ts","webpack://@bitwarden/web-vault/./src/app/settings/domain-rules.component.html","webpack://@bitwarden/web-vault/./src/app/settings/domain-rules.component.ts","webpack://@bitwarden/web-vault/./src/app/settings/preferences.component.html","webpack://@bitwarden/web-vault/./src/app/settings/preferences.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/credential-generator/credential-generator.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/credential-generator/credential-generator.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/generator/components/generator.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/generator/components/password-generator-history.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/copy-text.directive.ts","webpack://@bitwarden/web-vault/./src/app/tools/password-generator-history.component.html","webpack://@bitwarden/web-vault/./src/app/tools/password-generator-history.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/generator.component.html","webpack://@bitwarden/web-vault/./src/app/tools/generator.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-explainer.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send-access-explainer.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/send/send.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/send/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/tools/send/send.component.html","webpack://@bitwarden/web-vault/./src/app/tools/send/send.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-dialogs.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/attachments.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/folder-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/folder-add-edit.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/folder-add-edit.component.html","webpack://@bitwarden/web-vault/./src/app/auth/settings/verify-email.component.ts","webpack://@bitwarden/web-vault/./src/app/auth/settings/verify-email.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/services/vault-banners.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/vault-banners.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-banners/vault-banners.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-header/vault-header.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-header/vault-header.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/vault-onboarding.enum.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/services/abstraction/vault-onboarding.service.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/services/vault-onboarding.service.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding-task.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding-task.component.ts","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.component.html","webpack://@bitwarden/web-vault/./src/app/shared/components/onboarding/onboarding.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-onboarding/vault-onboarding.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.component.html","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.component.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/vault/individual-vault/vault.module.ts","webpack://@bitwarden/web-vault/./src/app/oss-routing.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/two-factor-component-refactor-route-swap.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/generator/generator-swap.ts","webpack://@bitwarden/web-vault/./src/app/wildcard-routing.module.ts","webpack://@bitwarden/web-vault/./src/app/app.module.ts","webpack://@bitwarden/web-vault/./src/main.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/abstractions/organization-user-api.service.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-bulk.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/responses/organization-user.response.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/responses/organization-user-bulk.response.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/responses/organization-user-bulk-public-key.response.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/responses/organization-user-mini.response.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/services/default-organization-user-api.service.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-accept-init.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-accept.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-bulk-confirm.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-confirm.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-invite.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-reset-password.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-reset-password-enrollment.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/organization-user/models/requests/organization-user-update.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/abstractions/collection-admin.service.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/abstractions/collection.service.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/bulk-collection-access.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/view/view.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection-access-selection.view.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection.response.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection.view.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection-admin.view.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection.data.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/models/collection-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/services/default-collection-admin.service.ts","webpack://@bitwarden/web-vault/../../libs/admin-console/src/common/collections/services/default-collection.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/sso.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/email.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/recovery.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/totp.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/icons/webauthn.icon.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-icon.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/components/two-factor-icon.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/auth.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/lock.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/redirect.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/tde-decryption-required.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/guards/unauth.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/auth/validators/inputs-field-match.validator.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/add-account-credit-dialog/add-account-credit-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/add-account-credit-dialog/add-account-credit-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/invoices.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/invoices.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/invoices/no-invoices.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/manage-tax-information/manage-tax-information.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/billing/components/manage-tax-information/manage-tax-information.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/callout.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/components/callout.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/a11y-title.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/api-action.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/copy-click.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/input-verbatim.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/stop-click.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/stop-prop.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toastr.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/fingerprint.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/jslib.module.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/credit-card-number.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/pluralize.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/search.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/user-name.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/pipes/user-type.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/abstractions/form-validation-errors.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/guard/feature-flag.guard.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/pipes/i18n.pipe.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/services/theming/theming.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/platform/utils/safe-provider.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/injection-tokens.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/modal.ref.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/dynamic-modal.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/components/modal/modal-injector.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/services/modal.service.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/tools/password-strength/password-strength-v2.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/utils/component-route-swap.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/fallback-src.directive.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/icon.component.html","webpack://@bitwarden/web-vault/../../libs/angular/src/vault/components/icon.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/icon/build-cipher-icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/bitwarden-logo.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/bitwarden-shield.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/devices.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/lock.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/user-lock.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/user-verification-biometrics-fingerprint.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/wave.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/vault.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/registration-user-add.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/registration-lock-alt.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/sso-key.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/two-factor-timeout.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/registration-check-email.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/icons/registration-expired-link.icon.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout-wrapper-data.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/anon-layout-wrapper.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/anon-layout/default-anon-layout-wrapper-data.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/fingerprint-dialog/fingerprint-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/fingerprint-dialog/fingerprint-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login/login-component.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login/login.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login/login.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login/login-secondary-content.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login/default-login-component.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-decryption-options/login-decryption-options.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-decryption-options/login-decryption-options.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-decryption-options/login-decryption-options.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-decryption-options/default-login-decryption-options.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-via-auth-request/login-via-auth-request.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-hint/password-hint.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-hint/password-hint.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/registration/register-send-verification-email.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/self-hosted-env-config-dialog/self-hosted-env-config-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/self-hosted-env-config-dialog/self-hosted-env-config-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-env-selector/registration-env-selector.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/registration/register-verification-email-clicked.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/registration-finish.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-link-expired/registration-link-expired.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-link-expired/registration-link-expired.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start-secondary.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-start/registration-start-secondary.component.html","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/registration/register-finish.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/registration/registration-finish/default-registration-finish.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/set-password-jit/set-password-jit.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/set-password-jit/set-password-jit.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/set-password-jit/set-password-jit.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/set-password-jit/default-set-password-jit.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/sso/sso-component.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/sso/sso.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/sso/sso.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/sso/default-sso-component.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-approval/login-approval.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-approval/login-approval.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/login-approval/default-login-approval-component.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/input-password/input-password.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/input-password/input-password.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-callout/password-callout.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/password-callout/password-callout.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/active-client-verification-option.enum.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-form-input.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/user-verification/user-verification-form-input.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/vault-timeout-input/vault-timeout-input.component.html","webpack://@bitwarden/web-vault/../../libs/auth/src/angular/vault-timeout-input/vault-timeout-input.component.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/auth-request-api.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-email.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-strategy.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/user-decryption-options.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/pin.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/auth-request.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-approval-component.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/abstractions/login-success-handler.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/rotateable-key-set.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/login-credentials.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/models/domain/user-decryption-options.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/pin/pin.service.implementation.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-email/login-email.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/prelogin.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/password-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/auth-result.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/auth-request-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/password-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/sso-token.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/sso-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/user-api-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/webauthn-login-token.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/login-strategies/webauthn-login.strategy.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-strategies/login-strategy.state.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-strategies/login-strategy.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/user-decryption-options/user-decryption-options.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/passwordless-auth.request.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/auth-request/auth-request.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/auth-request/auth-request-api.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/register-route.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/services/login-success-handler/default-login-success-handler.service.ts","webpack://@bitwarden/web-vault/../../libs/auth/src/common/utilities/decode-jwt-token-to-json.utility.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/audit.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/event/event-collection.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/event/event-upload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/notifications.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/search.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/vault-timeout/vault-timeout-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/abstractions/vault-timeout/vault-timeout.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization/organization-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/organization/organization.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/policy/policy-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/policy/policy.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/provider.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/abstractions/provider/provider-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-api-key-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-connection-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-user-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/organization-user-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/policy-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-user-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-user-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/scim-provider-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/enums/provider-status-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/api/permissions.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/organization.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/data/policy.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/master-password-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/organization.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/policy.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-create.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/organization-upgrade.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/request/selection-read-only.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/policy.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/selection-read-only.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/account-api.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/account.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/anonymous-hub.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/auth.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/avatar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/device-trust.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/devices.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/devices/views/device.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/key-connector.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/master-password.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/password-reset-enrollment.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/sso-login.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/token.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/two-factor.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/user-verification/user-verification.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login-prf-key.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/abstractions/webauthn/webauthn-login.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/auth-request-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/authentication-status.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/authentication-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/two-factor-provider-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/enums/verification-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/admin-auth-req-storable.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/domain/force-set-password-reason.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/auth.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/device.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/token-two-factor.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/identity-token/user-api-token.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/password-hint.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/secret-verification.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/set-password.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-email.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/request/two-factor-provider.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-captcha.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/key-connector-user-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/trusted-device-user-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/webauthn-prf-decryption-option.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/user-decryption-options/user-decryption-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-token.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/identity-two-factor.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/master-password-policy.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/response/two-factor-web-authn.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/models/view/webauthn-login/webauthn-login-credential-assertion-options.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/two-factor.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/request/webauthn-login-response.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/request/webauthn-login-assertion-response.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/response/assertion-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/auth/services/webauthn-login/response/credential-assertion-options.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/constants/index.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/constants/match-patterns.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/autofill-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/services/domain-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/autofill/utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/account/account-billing-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/account/billing-account-profile-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/billing-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/organization-billing.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/organizations/organization-billing-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/abstractions/tax.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/payment-method-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/plan-sponsorship-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/plan-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/transaction-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/bitwarden-product-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/product-tier-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/product-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/enums/plan-interval.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/domain/tax-information.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/bit-pay-invoice.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/tax-info-update.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/expanded-tax-info-update.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/organization-no-payment-method-create-request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/payment.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/request/update-payment-method.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/invoices.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/organization-subscription.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/plan.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/billing/models/response/subscription.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/device-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/feature-flag.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/http-status-code.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/client-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/event-system-user.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/event-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/integration-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/native-messaging-version.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/notification-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/enums/vault-timeout-action.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/key-management/abstractions/process-reload.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/domain/domain-service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/card.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/field.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/identity.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/fido2-credential.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/login-uri.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/login.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/password-history.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/secure-note.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/ssh-key.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/cipher.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/cipher-with-ids.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/collection.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/collection-with-id.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/folder.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/export/folder-with-id.export.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/keys.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/storage.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/base.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/global-domain.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/domains.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/error.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/list.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-provider-organization.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/response/profile-provider.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/response/profile.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/app-id.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/broadcaster.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/bulk-encrypt.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/config/config.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/crypto-function.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/encrypt.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/environment.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/file-download/file-download.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/translation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/i18n.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/log.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/platform-utils.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/sdk/sdk.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/abstractions/validation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/encryption-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/file-upload-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/hash-purpose.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/html-storage-location.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/key-suffix-options.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/log-level-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/storage-location.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/enums/theme-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/messaging/message.sender.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/compare-values.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/safe-urls.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/wordlist.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/account.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/domain-base.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/enc-array-buffer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/enc-string.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/models/domain/symmetric-crypto-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/task-scheduler.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/default-task-scheduler.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/scheduling/scheduled-task-name.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/console-log.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/cryptography/initializer-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/default-server-settings.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/deserialization-helpers.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/derive-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/derived-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/global-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-state.provider.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-definitions.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-event-registrar.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/state-event-runner.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/state/user-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/sync.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/sync/sync.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/theming/theme-state.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/services/vault-timeout/vault-timeout-settings.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/user-encryptor.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/user-key-encryptor.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/integration/rpc/rest-client.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/password-strength/password-strength.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/password-strength/password-strength.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/rx.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/enums/send-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/api/send-file.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/api/send-text.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-file.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send-text.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/domain/send.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/response/send.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-file.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send-text.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/models/view/send.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/send-kdf.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/send/services/send.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/buffered-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/buffered-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/data-packer.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/padded-data-packer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-key-definition.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/types/vault-timeout.type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/cipher.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/folder/folder-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/folder/folder.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/premium-upgrade-prompt.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/totp.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/abstractions/view-password-history.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/cipher-reprompt-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/cipher-type.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/field-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/linked-id-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/enums/secure-note-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/linked-field-option.decorator.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/card.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/fido2-credential.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/field.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/identity.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/login-uri.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/login.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/secure-note.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/api/ssh-key.api.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/attachment.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/card.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/cipher.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/fido2-credential.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/field.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/identity.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/login-uri.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/login.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/password-history.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/secure-note.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/data/ssh-key.data.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/attachment.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/card.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/cipher.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/fido2-credential.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/field.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/folder.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/identity.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/login-uri.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/login.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/password.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/secure-note.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/ssh-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/domain/tree-node.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher-bulk-delete.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/attachment.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/cipher.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/folder-with-id.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/request/folder.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/attachment.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/password-history.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/cipher.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/response/folder.response.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/attachment.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/card.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/cipher.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/fido2-credential.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/field.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/folder.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/identity.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/item.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/login-uri.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/login.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/password-history.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/secure-note.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/models/view/ssh-key.view.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/service-utils.ts","webpack://@bitwarden/web-vault/../../libs/common/src/vault/services/cipher-authorization.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/a11y/a11y-cell.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/async-actions.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/bit-action.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/bit-submit.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/async-actions/form-button.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/avatar/avatar.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/badge-list/badge-list.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge/badge.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/badge/badge.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/badge/badge.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/banner/banner.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumb.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumb.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/breadcrumbs/breadcrumbs.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/button/button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/callout/callout.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/card/card.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/checkbox/checkbox.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/checkbox/checkbox.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/color-password/color-password.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/color-password/color-password.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/container/container.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/container/container.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/animations.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog/dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/dialog/dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/directives/dialog-close.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/directives/dialog-title-container.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/dialog/simple-dialog/simple-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/form-control.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/hint.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/label.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-control/label.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/error-summary.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field-control.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/error.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/form-field.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/password-input-toggle.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/prefix.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/form-field/suffix.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/icon-button/icon-button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icon.ts","webpack://@bitwarden/web-vault/../../libs/components/src/icon/icons/search.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/autofocus.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/input.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/input/input.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-action.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-content.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-content.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/item/item-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/a11y/a11y-row.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/item/item.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/layout/layout.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/layout/layout.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/link/link.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/link/link.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-divider.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-divider.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-item.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu-trigger-for.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/menu/menu.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/multi-select/multi-select.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-base.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-divider.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-divider.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-item.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-item.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-logo.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/nav-logo.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/navigation.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/navigation/side-nav.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/no-items/no-items.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/popover/default-positions.ts","webpack://@bitwarden/web-vault/../../libs/components/src/popover/popover-trigger-for.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/popover/popover.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/popover/popover.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/popover/popover.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/progress/progress.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-input.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-button.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/radio-button/radio-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.component.ts","webpack://@bitwarden/web-vault/../../libs/platform/src/services/browser-service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/search/search.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/section/section-header.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/section/section-header.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/section/section.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/option.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/select/select.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/button-like.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/focusable-element.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/i18n.pipe.ts","webpack://@bitwarden/web-vault/../../libs/components/src/shared/shared.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/cell.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/row.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/sortable.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table-data-source.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table-scroll.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/table/table-scroll.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/table/table.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-header.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-list-container.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/shared/tab-list-item.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-body.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-body.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab-label.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-group/tab.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-link.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-link.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-nav-bar.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/tabs/tab-nav-bar/tab-nav-bar.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toast/utils.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toast/toast.service.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle-group.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle.component.ts","webpack://@bitwarden/web-vault/../../libs/components/src/toggle-group/toggle.component.html","webpack://@bitwarden/web-vault/../../libs/components/src/typography/typography.directive.ts","webpack://@bitwarden/web-vault/../../libs/components/src/typography/typography.module.ts","webpack://@bitwarden/web-vault/../../libs/components/src/utils/function-to-observable.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-api.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-api.service.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/import-ciphers.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/import-organization-ciphers.request.ts","webpack://@bitwarden/web-vault/../../libs/common/src/models/request/kvp.request.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/models/import-result.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/base-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/ascendo-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avast/avast-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avast/avast-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/avira-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/blackberry-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/chrome-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/bitwarden/bitwarden-password-protected-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/blur-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/buttercup-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/clipperz-html-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/codebook-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/dashlane/dashlane-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/dashlane/dashlane-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/encryptr-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/enpass/enpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/enpass/enpass-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/firefox-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/fsecure/fsecure-fsk-types.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/fsecure/fsecure-fsk-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/gnome-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/kaspersky-txt-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keepass2-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keepassx-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/keeper/keeper-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/lastpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/logmeonce-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/meldium-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/msecure-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/myki-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/netwrix/netwrix-passwordsecure-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/nordpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/types/onepassword-1pux-importer-types.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-1pif-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-1pux-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/cipher-import-context.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-mac-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/onepassword/onepassword-win-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/padlock-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passkeep-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passky/passky-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passman-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passpack-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordagent-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordboss-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passworddragon-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordsafe-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passwordwallet-txt-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passsordxp/dutch-csv-headers.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passsordxp/german-csv-headers.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/passsordxp/passwordxp-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/protonpass/protonpass-import-utils.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/protonpass/types/protonpass-json-type.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/protonpass/protonpass-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/psono/psono-json-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/remembear-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/roboform-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/safari-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/safeincloud-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/saferpass-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/securesafe-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/splashid-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/stickypassword-xml-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/truekey-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/upm-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/yoti-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/importers/zohovault-csv-importer.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/models/import-options.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import.service.ts","webpack://@bitwarden/web-vault/../../libs/importer/src/services/import-collection.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/angular/lock/services/lock-component.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/angular/lock/components/lock.component.html","webpack://@bitwarden/web-vault/../../libs/key-management/src/angular/lock/components/lock.component.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/biometrics/biometric.state.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/biometrics/biometrics-status.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/biometrics/biometrics-commands.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/biometrics/biometric-state.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/biometrics/biometric.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/abstractions/key.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/encrypted-organization-key.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/org-keys.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/provider-keys.state.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/services/key-state/user-key.state.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/enums/kdf-type.enum.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/key.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/convert-values.ts","webpack://@bitwarden/web-vault/../../libs/common/src/platform/misc/range-with-default.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/models/kdf-config.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/abstractions/kdf-config.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/kdf-config.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/user-asymmetric-key-regeneration/abstractions/user-asymmetric-key-regeneration.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/user-asymmetric-key-regeneration/services/default-user-asymmetric-key-regeneration.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/user-asymmetric-key-regeneration/abstractions/user-asymmetric-key-regeneration-api.service.ts","webpack://@bitwarden/web-vault/../../libs/key-management/src/user-asymmetric-key-regeneration/services/default-user-asymmetric-key-regeneration-api.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/export-helper.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/org-vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/base-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/org-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/individual-vault-export.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/export/vault-export/vault-export-core/src/services/individual-vault-export.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/catchall-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/catchall-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/forwarder-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/forwarder-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/organization-encryptor.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/organization-key-encryptor.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/legacy-encryptor-provider.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/generator-services.module.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/cryptography/key-service-legacy-encryptor-provider.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/generator.module.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator-history.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator-history.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/icons/no-credentials.icon.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/empty-credential-history.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/empty-credential-history.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator-history-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/credential-generator-history-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/passphrase-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/passphrase-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/password-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/password-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/subaddress-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/subaddress-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/username-settings.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/username-settings.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/util.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/public-classifier.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/identity-state-constraint.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/key-service-randomizer.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/integration/integration-context.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/forwarder-context.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/types/generated-credential.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/generator-types.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/types/generator-type.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/data.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/email-randomizer.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/email-calculator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/util.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/password-randomizer.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/username-randomizer.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/rpc/create-forwarding-address.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/rpc/get-account-id.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/engine/forwarder.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/default-policy-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/password-policy-constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/dynamic-password-policy-constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/passphrase-generator-options-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/passphrase-policy-constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/password-generator-options-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/catchall-constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/subaddress-constraints.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-catchall-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-eff-username-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-passphrase-boundaries.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-passphrase-generation-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-password-boundaries.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-password-generation-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-subaddress-generator-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/generators.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/passphrase-least-privilege.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/password-least-privilege.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-credential-preferences.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-addy-io-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-duck-duck-go-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-fastmail-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-forward-email-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-firefox-relay-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/forwarders.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/default-simple-login-options.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/private-classifier.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/addy-io.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/duck-duck-go.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/fastmail.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/firefox-relay.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/forward-email.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/integration/simple-login.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/integrations.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/policies.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/data/username-digits.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/factories.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/services/default-generator.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/classified-format.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/state-constraints-dependency.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/user-state-subject.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/object-key.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/rx.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/services/credential-preferences.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/services/credential-generator.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/policies/available-algorithms-policy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/abstractions/generator-strategy.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/options-classifier.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/forwarder-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/storage.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/passphrase-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/password-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/catchall-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/subaddress-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/core/src/strategies/eff-username-generator-strategy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generated-password-history.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generator-history.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/generated-credential.ts","webpack://@bitwarden/web-vault/../../libs/common/src/tools/state/secret-classifier.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/legacy-password-history-decryptor.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/history/src/local-generator-history.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/password-generation.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/default-generator-navigation.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/generator-navigation-evaluator.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/generator-navigation-policy.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/key-definitions.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/navigation/src/default-generator-navigation.service.ts","webpack://@bitwarden/web-vault/../../libs/common/src/admin-console/models/domain/password-generator-policy-options.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/legacy-password-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/create-legacy-password-generation-service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/username-generation.service.abstraction.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/legacy-username-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/extensions/legacy/src/create-legacy-username-generation-service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/abstractions/cipher-form-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/abstractions/cipher-form.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/cipher-form-container.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/custom-fields/add-edit-custom-field-dialog/add-edit-custom-field-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/custom-fields/custom-fields.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/additional-options/additional-options-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/card-details-section/card-details-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/identity/identity.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/identity/identity.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/item-details/item-details-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/item-details/item-details-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/autofill-options/uri-option.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/autofill-options/uri-option.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/autofill-options/autofill-options.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/abstractions/totp-capture.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/login-details-section/login-details-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/sshkey-section/sshkey-section.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-form.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-form.component.ts","webpack://@bitwarden/web-vault/../../libs/angular/src/directives/text-drag.directive.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/additional-options/additional-options.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/additional-options/additional-options.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/attachments/attachments-v2-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/attachments/attachments-v2-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/autofill-options/autofill-options-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/read-only-cipher-card/read-only-cipher-card.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/card-details/card-details-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/card-details/card-details-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/custom-fields/custom-fields-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-details/item-details-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-details/item-details-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-history/item-history-v2.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/item-history/item-history-v2.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/totp-countdown/totp-countdown.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/totp-countdown/totp-countdown.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/login-credentials/login-credentials-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/sshkey-sections/sshkey-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/view-identity-sections/view-identity-sections.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/cipher-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-view/cipher-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/download-attachment/download-attachment.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/download-attachment/download-attachment.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/org-icon.directive.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/services/copy-cipher-field.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/copy-cipher-field.directive.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/can-delete-cipher.directive.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/attachments/delete-attachment/delete-attachment.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/attachments/cipher-attachments.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/services/default-cipher-form-generation.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/services/default-cipher-form.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/cipher-form.module.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/abstractions/cipher-form-config.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/password-generator.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/password-generator.component.ts","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/username-generator.component.html","webpack://@bitwarden/web-vault/../../libs/tools/generator/components/src/username-generator.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/cipher-form/components/cipher-generator/cipher-form-generator.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/assign-collections.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/assign-collections.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-history-view/password-history-view.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-history-view/password-history-view.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-one.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-two.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/new-device-verification-notice/new-device-verification-notice-page-two.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/components/decryption-failure-dialog/decryption-failure-dialog.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/deactivated-org.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/no-folders.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/vault.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/empty-trash.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/exclamation-triangle.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/icons/user-lock.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/services/new-device-verification-notice.service.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-reprompt.component.ts","webpack://@bitwarden/web-vault/../../libs/vault/src/components/password-reprompt.component.html","webpack://@bitwarden/web-vault/../../libs/vault/src/services/password-reprompt.service.ts","webpack://@bitwarden/web-vault/webpack/bootstrap","webpack://@bitwarden/web-vault/webpack/runtime/compat get default export","webpack://@bitwarden/web-vault/webpack/runtime/define property getters","webpack://@bitwarden/web-vault/webpack/runtime/ensure chunk","webpack://@bitwarden/web-vault/webpack/runtime/get javascript chunk filename","webpack://@bitwarden/web-vault/webpack/runtime/get mini-css chunk filename","webpack://@bitwarden/web-vault/webpack/runtime/global","webpack://@bitwarden/web-vault/webpack/runtime/harmony module decorator","webpack://@bitwarden/web-vault/webpack/runtime/hasOwnProperty shorthand","webpack://@bitwarden/web-vault/webpack/runtime/make namespace object","webpack://@bitwarden/web-vault/webpack/runtime/node module decorator","webpack://@bitwarden/web-vault/webpack/runtime/wasm loading","webpack://@bitwarden/web-vault/webpack/runtime/publicPath","webpack://@bitwarden/web-vault/webpack/runtime/jsonp chunk loading","webpack://@bitwarden/web-vault/webpack/startup"],"sourcesContent":["var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"@bitwarden/web-vault:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import { BasePolicy } from \"../organizations/policies\";\n\nexport class PolicyListService {\n  private policies: BasePolicy[] = [];\n\n  addPolicies(policies: BasePolicy[]) {\n    this.policies.push(...policies);\n  }\n\n  getPolicies(): BasePolicy[] {\n    return this.policies;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\n@NgModule({})\nexport class CoreOrganizationModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionAccessSelectionView } from \"@bitwarden/admin-console/common\";\nimport { View } from \"@bitwarden/common/models/view/view\";\n\nimport { GroupDetailsResponse } from \"../services/group/responses/group.response\";\n\nexport class GroupDetailsView implements View {\n  id: string;\n  organizationId: string;\n  name: string;\n  externalId: string;\n  collections: CollectionAccessSelectionView[] = [];\n\n  static fromResponse(response: GroupDetailsResponse): GroupDetailsView {\n    const view: GroupDetailsView = Object.assign(new GroupDetailsView(), response);\n\n    view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c));\n\n    return view;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"@bitwarden/common/models/view/view\";\n\nimport { GroupResponse } from \"../services/group/responses/group.response\";\n\nexport class GroupView implements View {\n  id: string;\n  organizationId: string;\n  name: string;\n  externalId: string;\n\n  static fromResponse(response: GroupResponse): GroupView {\n    return Object.assign(new GroupView(), response);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class GroupRequest {\n  name: string;\n  collections: SelectionReadOnlyRequest[] = [];\n  users: string[] = [];\n}\n","export class OrganizationGroupBulkRequest {\n  ids: string[];\n\n  constructor(ids: string[]) {\n    this.ids = ids == null ? [] : ids;\n  }\n}\n","import { SelectionReadOnlyResponse } from \"@bitwarden/common/admin-console/models/response/selection-read-only.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class GroupResponse extends BaseResponse {\n  id: string;\n  organizationId: string;\n  name: string;\n  externalId: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.externalId = this.getResponseProperty(\"ExternalId\");\n  }\n}\n\nexport class GroupDetailsResponse extends GroupResponse {\n  collections: SelectionReadOnlyResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n    const collections = this.getResponseProperty(\"Collections\");\n    if (collections != null) {\n      this.collections = collections.map((c: any) => new SelectionReadOnlyResponse(c));\n    }\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { CoreOrganizationModule } from \"../../core-organization.module\";\nimport { GroupDetailsView } from \"../../views/group-details.view\";\nimport { GroupView } from \"../../views/group.view\";\n\nimport { AddEditGroupDetail } from \"./../../views/add-edit-group-detail\";\nimport { GroupRequest } from \"./requests/group.request\";\nimport { OrganizationGroupBulkRequest } from \"./requests/organization-group-bulk.request\";\nimport { GroupDetailsResponse, GroupResponse } from \"./responses/group.response\";\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class GroupApiService {\n  constructor(\n    protected apiService: ApiService,\n    protected configService: ConfigService,\n  ) {}\n\n  async get(orgId: string, groupId: string): Promise<GroupDetailsView> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + orgId + \"/groups/\" + groupId + \"/details\",\n      null,\n      true,\n      true,\n    );\n\n    return GroupDetailsView.fromResponse(new GroupDetailsResponse(r));\n  }\n\n  async getAll(orgId: string): Promise<GroupView[]> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + orgId + \"/groups\",\n      null,\n      true,\n      true,\n    );\n\n    const listResponse = new ListResponse(r, GroupDetailsResponse);\n\n    return listResponse.data.map((gr) => GroupView.fromResponse(gr));\n  }\n\n  async getAllDetails(orgId: string): Promise<GroupDetailsView[]> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + orgId + \"/groups/details\",\n      null,\n      true,\n      true,\n    );\n\n    const listResponse = new ListResponse(r, GroupDetailsResponse);\n\n    return listResponse.data.map((gr) => GroupDetailsView.fromResponse(gr));\n  }\n}\n\n@Injectable({ providedIn: CoreOrganizationModule })\nexport class InternalGroupApiService extends GroupApiService {\n  constructor(\n    protected apiService: ApiService,\n    protected configService: ConfigService,\n  ) {\n    super(apiService, configService);\n  }\n\n  async delete(orgId: string, groupId: string): Promise<void> {\n    await this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + orgId + \"/groups/\" + groupId,\n      null,\n      true,\n      false,\n    );\n  }\n\n  async deleteMany(orgId: string, groupIds: string[]): Promise<void> {\n    await this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + orgId + \"/groups\",\n      new OrganizationGroupBulkRequest(groupIds),\n      true,\n      true,\n    );\n  }\n\n  async save(group: AddEditGroupDetail): Promise<GroupView> {\n    const request = new GroupRequest();\n    request.name = group.name;\n    request.users = group.members;\n    request.collections = group.collections.map(\n      (c) => new SelectionReadOnlyRequest(c.id, c.readOnly, c.hidePasswords, c.manage),\n    );\n\n    if (group.id == undefined) {\n      return await this.postGroup(group.organizationId, request);\n    } else {\n      return await this.putGroup(group.organizationId, group.id, request);\n    }\n  }\n\n  private async postGroup(organizationId: string, request: GroupRequest): Promise<GroupView> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/groups\",\n      request,\n      true,\n      true,\n    );\n    return GroupView.fromResponse(new GroupResponse(r));\n  }\n\n  private async putGroup(\n    organizationId: string,\n    id: string,\n    request: GroupRequest,\n  ): Promise<GroupView> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/groups/\" + id,\n      request,\n      true,\n      true,\n    );\n    return GroupView.fromResponse(new GroupResponse(r));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  CollectionAccessSelectionView,\n  OrganizationUserDetailsResponse,\n} from \"@bitwarden/admin-console/common\";\nimport {\n  OrganizationUserStatusType,\n  OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\n\nexport class OrganizationUserAdminView {\n  id: string;\n  userId: string;\n  organizationId: string;\n  type: OrganizationUserType;\n  status: OrganizationUserStatusType;\n  externalId: string;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  hasMasterPassword: boolean;\n  managedByOrganization: boolean;\n\n  collections: CollectionAccessSelectionView[] = [];\n  groups: string[] = [];\n\n  accessSecretsManager: boolean;\n\n  static fromResponse(\n    organizationId: string,\n    response: OrganizationUserDetailsResponse,\n  ): OrganizationUserAdminView {\n    const view = new OrganizationUserAdminView();\n\n    view.id = response.id;\n    view.organizationId = organizationId;\n    view.userId = response.userId;\n    view.type = response.type;\n    view.status = response.status;\n    view.externalId = response.externalId;\n    view.permissions = response.permissions;\n    view.resetPasswordEnrolled = response.resetPasswordEnrolled;\n    view.collections = response.collections.map((c) => ({\n      id: c.id,\n      hidePasswords: c.hidePasswords,\n      readOnly: c.readOnly,\n      manage: c.manage,\n    }));\n    view.groups = response.groups;\n    view.accessSecretsManager = response.accessSecretsManager;\n    view.hasMasterPassword = response.hasMasterPassword;\n    view.managedByOrganization = response.managedByOrganization;\n\n    return view;\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserInviteRequest,\n  OrganizationUserUpdateRequest,\n} from \"@bitwarden/admin-console/common\";\n\nimport { CoreOrganizationModule } from \"../core-organization.module\";\nimport { OrganizationUserAdminView } from \"../views/organization-user-admin-view\";\n\n@Injectable({ providedIn: CoreOrganizationModule })\nexport class UserAdminService {\n  constructor(private organizationUserApiService: OrganizationUserApiService) {}\n\n  async get(\n    organizationId: string,\n    organizationUserId: string,\n  ): Promise<OrganizationUserAdminView | undefined> {\n    const userResponse = await this.organizationUserApiService.getOrganizationUser(\n      organizationId,\n      organizationUserId,\n      {\n        includeGroups: true,\n      },\n    );\n\n    if (userResponse == null) {\n      return undefined;\n    }\n\n    return OrganizationUserAdminView.fromResponse(organizationId, userResponse);\n  }\n\n  async save(user: OrganizationUserAdminView): Promise<void> {\n    const request = new OrganizationUserUpdateRequest();\n    request.permissions = user.permissions;\n    request.type = user.type;\n    request.collections = user.collections;\n    request.groups = user.groups;\n    request.accessSecretsManager = user.accessSecretsManager;\n\n    await this.organizationUserApiService.putOrganizationUser(\n      user.organizationId,\n      user.id,\n      request,\n    );\n  }\n\n  async invite(emails: string[], user: OrganizationUserAdminView): Promise<void> {\n    const request = new OrganizationUserInviteRequest();\n    request.emails = emails;\n    request.permissions = user.permissions;\n    request.type = user.type;\n    request.collections = user.collections;\n    request.groups = user.groups;\n    request.accessSecretsManager = user.accessSecretsManager;\n\n    await this.organizationUserApiService.postOrganizationUserInvite(user.organizationId, request);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  OrganizationUserUserDetailsResponse,\n  CollectionAccessSelectionView,\n} from \"@bitwarden/admin-console/common\";\nimport {\n  OrganizationUserStatusType,\n  OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\n\nexport class OrganizationUserView {\n  id: string;\n  userId: string;\n  type: OrganizationUserType;\n  status: OrganizationUserStatusType;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  name: string;\n  email: string;\n  avatarColor: string;\n  twoFactorEnabled: boolean;\n  usesKeyConnector: boolean;\n  hasMasterPassword: boolean;\n  /**\n   * True if this organizaztion user has been granted access to Secrets Manager, false otherwise.\n   */\n  accessSecretsManager: boolean;\n  managedByOrganization: boolean;\n\n  collections: CollectionAccessSelectionView[] = [];\n  groups: string[] = [];\n\n  groupNames: string[] = [];\n  collectionNames: string[] = [];\n\n  static fromResponse(response: OrganizationUserUserDetailsResponse): OrganizationUserView {\n    const view = Object.assign(new OrganizationUserView(), response) as OrganizationUserView;\n\n    if (response.collections != undefined) {\n      view.collections = response.collections.map((c) => new CollectionAccessSelectionView(c));\n    }\n\n    if (response.groups != undefined) {\n      view.groups = response.groups;\n    }\n\n    return view;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { OrganizationInformationComponent } from \"./organization-information.component\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [OrganizationInformationComponent],\n  exports: [OrganizationInformationComponent],\n})\nexport class OrganizationCreateModule {}\n","<form #form [formGroup]=\"formGroup\" *ngIf=\"nameOnly\">\n  <bit-form-field>\n    <bit-label>{{ \"organizationName\" | i18n }}</bit-label>\n    <input bitInput type=\"text\" formControlName=\"name\" />\n  </bit-form-field>\n</form>\n<form #form [formGroup]=\"formGroup\" *ngIf=\"!nameOnly\">\n  <h2>{{ \"generalInformation\" | i18n }}</h2>\n  <div class=\"tw-flex tw-w-full tw-space-x-4\" *ngIf=\"createOrganization\">\n    <bit-form-field class=\"tw-w-1/2\">\n      <bit-label>{{ \"organizationName\" | i18n }}</bit-label>\n      <input bitInput type=\"text\" formControlName=\"name\" />\n    </bit-form-field>\n    <bit-form-field class=\"tw-w-1/2\">\n      <bit-label>{{ \"email\" | i18n }}</bit-label>\n      <input bitInput type=\"email\" formControlName=\"billingEmail\" />\n    </bit-form-field>\n    <bit-form-field class=\"tw-w-1/2\" *ngIf=\"isProvider\">\n      <bit-label>{{ \"clientOwnerEmail\" | i18n }}</bit-label>\n      <input bitInput type=\"email\" formControlName=\"clientOwnerEmail\" />\n    </bit-form-field>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { UntypedFormGroup } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\n\n@Component({\n  selector: \"app-org-info\",\n  templateUrl: \"organization-information.component.html\",\n})\nexport class OrganizationInformationComponent implements OnInit {\n  @Input() nameOnly = false;\n  @Input() createOrganization = true;\n  @Input() isProvider = false;\n  @Input() acceptingSponsorship = false;\n  @Input() formGroup: UntypedFormGroup;\n  @Output() changedBusinessOwned = new EventEmitter<void>();\n\n  constructor(private accountService: AccountService) {}\n\n  async ngOnInit(): Promise<void> {\n    if (this.formGroup?.controls?.billingEmail?.value) {\n      return;\n    }\n\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n\n    if (activeAccount?.email) {\n      this.formGroup.controls.billingEmail.setValue(activeAccount.email);\n    }\n  }\n}\n","<bit-nav-group\n  *ngIf=\"activeOrganization$ | async as activeOrganization\"\n  [text]=\"activeOrganization.name\"\n  [ariaLabel]=\"['organization' | i18n, activeOrganization.name].join(' ')\"\n  icon=\"bwi-business\"\n  [route]=\"['../', activeOrganization.id]\"\n  [routerLinkActiveOptions]=\"{ exact: true }\"\n  [(open)]=\"open\"\n>\n  <i\n    slot=\"end\"\n    *ngIf=\"!activeOrganization.enabled\"\n    class=\"bwi bwi-exclamation-triangle tw-my-auto !text-alt-2\"\n    [attr.aria-label]=\"'organizationIsDisabled' | i18n\"\n    appA11yTitle=\"{{ 'organizationIsDisabled' | i18n }}\"\n  ></i>\n  <ng-container *ngIf=\"organizations$ | async as organizations\">\n    <bit-nav-item\n      *ngFor=\"let org of organizations\"\n      [text]=\"org.name\"\n      [ariaLabel]=\"['organization' | i18n, org.name].join(' ')\"\n      [route]=\"['../', org.id]\"\n      (mainContentClicked)=\"toggle()\"\n      [routerLinkActiveOptions]=\"{ exact: true }\"\n      (click)=\"handleUnpaidSubscription(org)\"\n    >\n      <i\n        slot=\"end\"\n        *ngIf=\"org.enabled == false\"\n        class=\"bwi bwi-exclamation-triangle !text-alt-2\"\n        [attr.aria-label]=\"'organizationIsDisabled' | i18n\"\n        appA11yTitle=\"{{ 'organizationIsDisabled' | i18n }}\"\n      ></i>\n    </bit-nav-item>\n  </ng-container>\n  <bit-nav-item\n    *ngIf=\"!hideNewButton\"\n    icon=\"bwi-plus\"\n    [text]=\"'newOrganization' | i18n\"\n    route=\"/create-organization\"\n  ></bit-nav-item>\n  <bit-nav-divider></bit-nav-divider>\n</bit-nav-group>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { combineLatest, map, Observable } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport type { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billing-api.service.abstraction\";\nimport { DialogService, NavigationModule } from \"@bitwarden/components\";\n\nimport { TrialFlowService } from \"./../../billing/services/trial-flow.service\";\n\n@Component({\n  selector: \"org-switcher\",\n  templateUrl: \"org-switcher.component.html\",\n  standalone: true,\n  imports: [CommonModule, JslibModule, NavigationModule],\n})\nexport class OrgSwitcherComponent {\n  protected organizations$: Observable<Organization[]> =\n    this.organizationService.organizations$.pipe(\n      map((orgs) =>\n        orgs.filter((org) => this.filter(org)).sort((a, b) => a.name.localeCompare(b.name)),\n      ),\n    );\n\n  protected activeOrganization$: Observable<Organization> = combineLatest([\n    this.route.paramMap,\n    this.organizations$,\n  ]).pipe(map(([params, orgs]) => orgs.find((org) => org.id === params.get(\"organizationId\"))));\n\n  /**\n   * Filter function for displayed organizations in the `org-switcher`\n   * @example\n   * const smFilter = (org: Organization) => org.canAccessSecretsManager\n   * // <org-switcher [filter]=\"smFilter\">\n   */\n  @Input()\n  filter: (org: Organization) => boolean = () => true;\n\n  /**\n   * Is `true` if the expanded content is visible\n   */\n  @Input()\n  open = false;\n  @Output()\n  openChange = new EventEmitter<boolean>();\n\n  /**\n   * Visibility of the New Organization button\n   */\n  @Input()\n  hideNewButton = false;\n\n  constructor(\n    private route: ActivatedRoute,\n    protected dialogService: DialogService,\n    private organizationService: OrganizationService,\n    private trialFlowService: TrialFlowService,\n    protected billingApiService: BillingApiServiceAbstraction,\n  ) {}\n\n  protected toggle(event?: MouseEvent) {\n    event?.stopPropagation();\n    this.open = !this.open;\n    this.openChange.emit(this.open);\n  }\n\n  async handleUnpaidSubscription(org: Organization) {\n    const metaData = await this.billingApiService.getOrganizationBillingMetadata(org.id);\n    await this.trialFlowService.handleUnpaidSubscriptionDialog(org, metaData);\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const AdminConsoleLogo = svgIcon`\n<svg version=\"1.1\" viewBox=\"0 0 800 200\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"tw-fill-text-alt2\" d=\"m457.16 129.39-11.407-36.49q-1.0783-3.3482-4.0292-15.209h-.454q-2.27 9.9313-3.9725 15.322l-11.747 36.377h-10.896l-16.968-62.197h9.8744q6.0158 23.438 9.137 35.696 3.178 12.258 3.632 16.514h.454q.62424-3.2347 1.9863-8.342 1.4188-5.1642 2.4402-8.1717l11.407-35.696h10.215l11.123 35.696q3.178 9.7611 4.313 16.401h.454q.227-2.043 1.1918-6.2993 1.0215-4.2562 11.861-45.797h9.7611l-17.195 62.197zm77.858 0-1.8727-8.8528h-.454q-4.6535 5.8455-9.3072 7.9451-4.5968 2.043-11.52 2.043-9.2503 0-14.528-4.767-5.221-4.767-5.221-13.563 0-18.841 30.134-19.749l10.555-.3405v-3.859q0-7.3209-3.178-10.783-3.1212-3.5185-10.045-3.5185-7.7748 0-17.592 4.767l-2.8943-7.207q4.5968-2.497 10.045-3.9158 5.5048-1.4187 11.009-1.4187 11.123 0 16.457 4.9373 5.3912 4.9373 5.3912 15.833v42.449zm-21.281-6.6399q8.7964 0 13.79-4.8238 5.0508-4.8238 5.0508-13.506v-5.6183l-9.4205.39725q-11.237.39725-16.231 3.5185-4.9372 3.0645-4.9372 9.5908 0 5.1075 3.0645 7.7748 3.1212 2.6672 8.6825 2.6672zm76.045-56.693q4.1428 0 7.4343.68101l-1.3053 8.7395q-3.859-.85122-6.8101-.85122-7.5476 0-12.939 6.1291-5.3345 6.1291-5.3345 15.266v33.369h-9.4205v-62.197h7.7748l1.0783 11.52h.454q3.4617-6.0721 8.3425-9.3636 4.8805-3.2915 10.726-3.2915zm59.077 54.991h-.51081q-6.526 9.4775-19.522 9.4775-12.201 0-19.011-8.342-6.7532-8.342-6.7532-23.721t6.8102-23.892q6.8101-8.5122 18.954-8.5122 12.655 0 19.408 9.1933h.73779l-.39725-4.4832-.22704-4.3697v-25.311h9.4205v88.301h-7.6615zm-18.841 1.589q9.6478 0 13.96-5.221 4.3697-5.2777 4.3697-16.968v-1.9863q0-13.223-4.4264-18.841-4.3698-5.675-14.017-5.675-8.2856 0-12.712 6.4696-4.3698 6.4127-4.3698 18.16 0 11.918 4.3698 17.99 4.3697 6.0721 12.825 6.0721zm74 7.8881q-13.79 0-21.792-8.3989-7.9451-8.3989-7.9451-23.324 0-15.039 7.3773-23.892 7.4343-8.8528 19.919-8.8528 11.69 0 18.501 7.7179 6.8101 7.6615 6.8101 20.26v5.9588h-42.846q.28376 10.953 5.5048 16.628 5.2777 5.675 14.812 5.675 10.045 0 19.863-4.1995v8.3989q-4.994 2.1565-9.4775 3.0645-4.4265.96478-10.726.96478zm-2.5537-56.58q-7.4912 0-11.975 4.8805-4.4265 4.8805-5.221 13.506h32.518q0-8.9097-3.9725-13.62-3.9725-4.767-11.35-4.767zm84.047 55.445v-40.236q0-7.6045-3.4617-11.35-3.4618-3.7455-10.839-3.7455-9.7611 0-14.301 5.2777t-4.54 17.422v32.631h-9.4205v-62.197h7.6615l1.5322 8.5122h.45403q2.8942-4.5968 8.1153-7.0937 5.221-2.5537 11.634-2.5537 11.237 0 16.912 5.448 5.675 5.3912 5.675 17.309v40.576z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m213.24 129.39-3.3482-8.6261h-.454q-4.3697 5.5048-9.023 7.6615-4.5968 2.0998-12.031 2.0998-9.137 0-14.415-5.221-5.221-5.221-5.221-14.869 0-10.102 7.0368-14.869 7.0937-4.8238 21.338-5.3345l11.009-.3405v-2.7808q0-9.6478-9.8744-9.6478-7.6045 0-17.876 4.5968l-5.7318-11.69q10.953-5.7318 24.289-5.7318 12.769 0 19.579 5.5615 6.8102 5.5615 6.8102 16.912v42.279zm-5.1075-29.397-6.6962.227q-7.5476.227-11.237 2.724-3.6888 2.497-3.6888 7.6045 0 7.321 8.3989 7.321 6.0158 0 9.5908-3.4617 3.632-3.4617 3.632-9.1933zm79.962 29.397-2.3268-8.1153h-.908q-2.7808 4.4265-7.8881 6.8665-5.1075 2.3835-11.634 2.3835-11.18 0-16.855-5.9588-5.675-6.0158-5.675-17.252v-41.371h17.309v37.058q0 6.8665 2.4402 10.328 2.4402 3.405 7.7748 3.405 7.264 0 10.499-4.8238 3.2348-4.8805 3.2348-16.117v-29.85h17.309v63.447zm48.748 0h-17.309v-88.301h17.309zm44.889-12.655q4.54 0 10.896-1.9863v12.882q-6.4696 2.8943-15.89 2.8943-10.385 0-15.152-5.221-4.7103-5.2777-4.7103-15.776v-30.588h-8.2856v-7.321l9.5338-5.7885 4.994-13.393h11.066v13.506h17.763v12.996h-17.763v30.588q0 3.6887 2.043 5.448 2.0998 1.7592 5.5047 1.7592z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m51.982 33.947-15.322.002 41.131 115.17h14.518l41.131-115.17h-15.162l-25.971 73.872c-1.7205 4.7315-3.1706 9.1927-4.3535 13.387-1.1829 4.086-2.1516 8.0119-2.9043 11.775-.75272-3.7636-1.7195-7.7417-2.9023-11.936-1.1829-4.1938-2.635-8.7098-4.3555-13.549l-25.809-73.552z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m84.264 5.0749a2.3288 2.3288 0 00-1.2122.99654l-4.145 6.9077c-.72599.06029-1.4502.12529-2.1701.20657l-5.406-5.9599a2.3288 2.3288 0 00-3.9203.77975l-2.7161 7.5796c-.7008.20184-1.4008.40458-2.0929.62653l-6.4616-4.7875a2.3288 2.3288 0 00-3.691 1.53l-1.1884 7.9871c-.63834.33084-1.2749.66363-1.9023 1.0124l-7.297-3.4482a2.3288 2.3288 0 00-3.3222 2.2201l.39272 8.0937c-.55229.44111-1.0997.8874-1.639 1.3438l-7.8588-1.9647a2.3288 2.3288 0 00-2.825 2.825l1.9647 7.8588c-.45646.53923-.90273 1.0867-1.3439 1.639l-8.0937-.39271a2.3288 2.3288 0 00-2.2201 3.3222l3.4482 7.297c-.3488.62737-.68158 1.2639-1.0124 1.9023l-7.9871 1.1884a2.3288 2.3288 0 00-1.53 3.6911l4.7875 6.4616c-.22196.69217-.4247 1.3921-.62653 2.093l-7.5796 2.7161a2.3288 2.3288 0 00-.77976 3.9203l5.9599 5.4061c-.08128.71995-.14628 1.4442-.20657 2.1701l-6.9077 4.1451a2.3288 2.3288 0 000 3.9952l6.9077 4.1439c.06028.72636.12524 1.451.20657 2.1713l-5.9599 5.4061a2.3288 2.3288 0 00.77976 3.9192l7.5796 2.7161c.20188.70099.4045 1.4017.62653 2.0941l-4.7875 6.4605a2.3288 2.3288 0 001.53 3.6922l7.9871 1.1884c.33079.63822.6637 1.275 1.0124 1.9023l-3.4482 7.297a2.3288 2.3288 0 002.2201 3.3222l8.0937-.39272c.44117.55235.88734 1.0997 1.3439 1.639l-1.9647 7.8588a2.3288 2.3288 0 002.825 2.825l7.8588-1.9647c.53923.45647 1.0867.90273 1.639 1.3438l-.39272 8.0926a2.3288 2.3288 0 003.3222 2.2201l7.297-3.447c.62736.34881 1.2639.68158 1.9023 1.0124l1.1884 7.987a2.3288 2.3288 0 003.691 1.5289l6.4616-4.7864c.69217.22197 1.3921.4247 2.0929.62654l2.7161 7.5796a2.3288 2.3288 0 003.9203.7786l5.4049-5.9588c.72031.0813 1.4449.14624 2.1713.20656l4.145 6.9077a2.3288 2.3288 0 003.9952 0l4.1439-6.9077c.72674-.0603 1.4517-.12518 2.1724-.20656l5.4049 5.9588a2.3288 2.3288 0 003.9192-.7786l2.7161-7.5796c.70103-.20189 1.4017-.4045 2.0941-.62654l6.4605 4.7864a2.3288 2.3288 0 003.6922-1.5289l1.1884-7.987c.63823-.33079 1.275-.6637 1.9023-1.0124l7.297 3.447a2.3288 2.3288 0 003.3222-2.2201l-.39271-8.0926c.55234-.44117 1.0997-.88734 1.639-1.3438l7.8588 1.9647a2.3288 2.3288 0 002.825-2.825l-1.9647-7.8588c.4565-.53928.90269-1.0866 1.3438-1.639l8.0926.39272a2.3288 2.3288 0 002.2201-3.3222l-3.447-7.297c.34872-.62723.68163-1.264 1.0124-1.9023l7.987-1.1884a2.3288 2.3288 0 001.5289-3.6922l-4.7863-6.4605c.22202-.69235.42462-1.3931.62652-2.0941l7.5796-2.7161a2.3288 2.3288 0 00.77862-3.9192l-5.9588-5.4049c.0814-.72069.14623-1.4457.20658-2.1724l6.9077-4.1439a2.3288 2.3288 0 000-3.9952l-6.9077-4.1451c-.0603-.72635-.12524-1.451-.20658-2.1713l5.9588-5.4049a2.3288 2.3288 0 00-.77862-3.9203l-7.5796-2.7161c-.20184-.70082-.40457-1.4008-.62652-2.093l4.7863-6.4616a2.3288 2.3288 0 00-1.5289-3.6911l-7.987-1.1884c-.33084-.63836-.66362-1.2749-1.0124-1.9023l3.447-7.297a2.3288 2.3288 0 00-2.2201-3.3222l-8.0926.39271c-.44112-.55229-.8874-1.0997-1.3438-1.639l1.9647-7.8588a2.3288 2.3288 0 00-2.825-2.825l-7.8588 1.9647c-.53927-.4565-1.0866-.9027-1.639-1.3438l.39271-8.0937a2.3288 2.3288 0 00-3.3222-2.2201l-7.297 3.4482c-.62726-.34873-1.264-.68165-1.9023-1.0124l-1.1884-7.9871a2.3288 2.3288 0 00-3.6922-1.53l-6.4605 4.7875c-.69236-.22201-1.3931-.42463-2.0941-.62653l-2.7161-7.5796a2.3288 2.3288 0 00-3.9192-.77975l-5.406 5.9599c-.72032-.08133-1.4449-.14626-2.1713-.20657l-4.1439-6.9077a2.3288 2.3288 0 00-2.783-.99654zm.78543 14.613a4.657 4.657 0 014.6569 4.6569 4.657 4.657 0 01-4.6569 4.6569 4.657 4.657 0 01-4.6569-4.6569 4.657 4.657 0 014.6569-4.6569zm-10.998 8.0064 7.7056 7.7056a4.6575 4.6575 0 006.5853 0l7.7056-7.7056c17.959 3.3214 33.023 14.65 41.468 30.141l-4.943 9.6998a4.6575 4.6575 0 002.0351 6.263l9.7123 4.9486c.32157 2.5182.49487 5.0839.49487 7.692 0 15.934-6.1974 30.369-16.306 41.066l-10.796-1.7093a4.6575 4.6575 0 00-5.3277 3.8704l-1.7116 10.804c-7.7603 3.6739-16.443 5.734-25.624 5.734-9.1812 0-17.864-2.0608-25.625-5.7352l-1.7116-10.803a4.6575 4.6575 0 00-5.3277-3.8715l-10.795 1.7105c-10.108-10.697-16.306-25.132-16.306-41.066 0-2.608.1733-5.1738.49487-7.692l9.7111-4.9486a4.6575 4.6575 0 002.0351-6.263l-4.9418-9.6986c8.4449-15.492 23.508-26.821 41.468-30.142zm-47.923 34.902a4.657 4.657 0 011.3064.22587 4.657 4.657 0 012.9896 5.868 4.657 4.657 0 01-5.868 2.9907 4.657 4.657 0 01-2.9907-5.8691 4.657 4.657 0 014.5627-3.2155zm117.84 0a4.657 4.657 0 014.5616 3.2155 4.657 4.657 0 01-2.9896 5.8691 4.657 4.657 0 01-5.868-2.9907 4.657 4.657 0 012.9896-5.868 4.657 4.657 0 011.3064-.22587zm-95.153 69.428a4.657 4.657 0 012.4709.88189 4.657 4.657 0 011.0306 6.5047 4.657 4.657 0 01-6.5047 1.0306 4.657 4.657 0 01-1.0306-6.5047 4.657 4.657 0 014.0338-1.9125zm72.463 0a4.657 4.657 0 014.0338 1.9125 4.657 4.657 0 01-1.0306 6.5047 4.657 4.657 0 01-6.5047-1.0306 4.657 4.657 0 011.0306-6.5047 4.657 4.657 0 012.4709-.88189z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m406.1 185.44-4.8026-12.342h-15.803l-4.7468 12.342h-5.0817l15.58-40.04h4.5232l15.524 40.04zm-10.778-28.871q-.16753-.44674-.55844-1.6194-.3909-1.1727-.7818-2.4012-.33505-1.2844-.55843-1.9545-.39091 1.7312-.89345 3.4064-.50261 1.6194-.83768 2.5687l-4.5233 12.062h12.62zm31.384 29.429q-5.5844 0-8.9346-3.8532-3.3506-3.9091-3.3506-11.615t3.3506-11.615q3.4064-3.9649 8.9905-3.9649 3.4623 0 5.6402 1.2844 2.2338 1.2844 3.6298 3.1271h.33506q-.0559-.72595-.22337-2.122-.11169-1.4518-.11169-2.2895v-11.951h4.9142v42.441h-3.9649l-.72593-4.0207h-.22339q-1.3403 1.8987-3.574 3.2389-2.2338 1.3402-5.7519 1.3402zm.7818-4.0765q4.7468 0 6.6452-2.5687 1.9545-2.6246 1.9545-7.8738v-.89347q0-5.5844-1.8428-8.544-1.8428-3.0155-6.8127-3.0155-3.9649 0-5.975 3.1831-1.9545 3.1272-1.9545 8.4322 0 5.3609 1.9545 8.3206 2.0103 2.9597 6.0309 2.9597zm55.788-26.972q5.0817 0 7.5946 2.6246 2.5129 2.5687 2.5129 8.3764v19.489h-4.8584v-19.266q0-7.092-6.0867-7.092-4.3558 0-6.2542 2.5129-1.8428 2.5129-1.8428 7.3154v16.529h-4.8584v-19.266q0-7.092-6.1426-7.092-4.5232 0-6.2542 2.7922-1.7312 2.7922-1.7312 8.0414v15.524h-4.9142v-29.933h3.9649l.72595 4.0766h.27922q1.3961-2.3454 3.7416-3.4623 2.4012-1.1727 5.0817-1.1727 7.0362 0 9.1582 5.0258h.27921q1.5078-2.5687 4.0766-3.7974 2.6246-1.2286 5.5284-1.2286zm21.891-10.666q1.1169 0 1.9545.78178.89355.72598.89355 2.3454 0 1.5636-.89355 2.3454-.83765.78179-1.9545.78179-1.2286 0-2.0662-.78179-.83766-.7818-.83766-2.3454 0-1.6194.83766-2.3454.83763-.78178 2.0662-.78178zm2.4012 11.225v29.933h-4.9141v-29.933zm23.901-.55843q5.3609 0 8.0972 2.6246 2.7363 2.5687 2.7363 8.3765v19.489h-4.8584v-19.154q0-7.2037-6.701-7.2037-4.97 0-6.8686 2.7922-1.8987 2.7922-1.8987 8.0414v15.524h-4.9142v-29.933h3.9649l.72596 4.0766h.27921q1.4519-2.3454 4.0207-3.4623 2.5687-1.1727 5.4167-1.1727zm52.381-5.5285q-6.4218 0-10.108 4.3-3.6857 4.3-3.6857 11.783 0 7.4271 3.4064 11.783 3.4623 4.3 10.331 4.3 2.6246 0 4.97-.44675 2.3454-.44675 4.5792-1.1169v4.3558q-2.2337.83766-4.635 1.2286-2.3454.3909-5.6402.3909-6.0867 0-10.163-2.5129-4.0768-2.5129-6.1426-7.1479-2.0103-4.635-2.0103-10.889 0-6.0309 2.1778-10.61 2.2337-4.6351 6.5335-7.2037 4.3-2.6246 10.443-2.6246 6.3101 0 11.001 2.3454l-2.0103 4.2441q-1.8428-.83766-4.1325-1.5078-2.2337-.67011-4.9141-.67011zm43.558 20.997q0 7.4271-3.7974 11.503-3.7416 4.0765-10.163 4.0765-3.9649 0-7.092-1.787-3.0713-1.8428-4.8584-5.3051-1.787-3.5181-1.787-8.4881 0-7.4271 3.7416-11.448 3.7416-4.0207 10.163-4.0207 4.0765 0 7.1479 1.8428 3.1271 1.787 4.8584 5.2492 1.787 3.4064 1.787 8.3764zm-22.617 0q0 5.3051 2.0662 8.4322 2.122 3.0714 6.701 3.0714 4.5233 0 6.6452-3.0714 2.122-3.1271 2.122-8.4322t-2.122-8.3206q-2.122-3.0155-6.701-3.0155-4.5792 0-6.6452 3.0155-2.0662 3.0155-2.0662 8.3206zm44.786-15.468q5.361 0 8.0973 2.6246 2.7363 2.5687 2.7363 8.3765v19.489h-4.8584v-19.154q0-7.2037-6.701-7.2037-4.97 0-6.8685 2.7922-1.8987 2.7922-1.8987 8.0414v15.524h-4.9142v-29.933h3.9649l.72597 4.0765h.2792q1.4519-2.3454 4.0207-3.4623 2.5687-1.1727 5.4168-1.1727zm39.593 22.225q0 4.3558-3.2389 6.5894-3.2389 2.2338-8.7119 2.2338-3.1271 0-5.4168-.5026-2.2338-.50258-3.9649-1.396v-4.4675q1.787.89346 4.3 1.6753 2.5687.72594 5.1934.72594 3.7416 0 5.4168-1.1727 1.6752-1.2286 1.6752-3.2389 0-1.1169-.61424-2.0103-.61426-.89347-2.2337-1.787-1.5636-.89346-4.5233-2.0103-2.9039-1.1169-4.97-2.2337-2.0662-1.1169-3.1831-2.6805-1.1169-1.5636-1.1169-4.0208 0-3.7974 3.0714-5.8635 3.1272-2.0662 8.153-2.0662 2.7363 0 5.0818.55842 2.4012.50259 4.4675 1.4519l-1.6752 3.9091q-1.8987-.78179-3.9649-1.3403-2.0662-.55842-4.2441-.55842-3.0155 0-4.6351 1.0052-1.5636.94937-1.5636 2.6246 0 1.2286.72596 2.122.72595.83764 2.4012 1.6753 1.7311.78179 4.5792 1.8987 2.848 1.061 4.8584 2.1779 2.0104 1.1169 3.0713 2.7363 1.0611 1.5636 1.0611 3.9649zm33.283-6.7569q0 7.4271-3.7974 11.503-3.7416 4.0766-10.163 4.0766-3.9649 0-7.092-1.787-3.0714-1.8428-4.8583-5.3051-1.787-3.5181-1.787-8.4881 0-7.4271 3.7416-11.448 3.7416-4.0207 10.163-4.0207 4.0766 0 7.1479 1.8428 3.1271 1.787 4.8584 5.2492 1.787 3.4064 1.787 8.3764zm-22.617 0q0 5.3051 2.0662 8.4322 2.122 3.0714 6.701 3.0714 4.5233 0 6.6452-3.0714 2.122-3.1271 2.122-8.4322 0-5.3051-2.122-8.3206-2.122-3.0155-6.701-3.0155t-6.6452 3.0155q-2.0662 3.0155-2.0662 8.3206zm35.293 15.022h-4.9142v-42.441h4.9142zm21.053-30.491q3.8532 0 6.5894 1.6753 2.7922 1.6754 4.2441 4.7468 1.5078 3.0155 1.5078 7.092v2.9597h-20.494q.11169 5.0818 2.5687 7.7621 2.5129 2.6246 6.9803 2.6246 2.848 0 5.0259-.50258 2.2337-.55844 4.5792-1.5636v4.3q-2.2895 1.0052-4.5233 1.4519-2.2337.5026-5.3051.5026-4.2441 0-7.5388-1.7312-3.2389-1.7312-5.0817-5.1376-1.787-3.4623-1.787-8.4322 0-4.9142 1.6194-8.4322 1.6754-3.5181 4.635-5.4168 3.0155-1.8986 6.9803-1.8986zm-.0559 4.0207q-3.5181 0-5.5844 2.2895-2.0103 2.2337-2.4012 6.2543h15.245q-.0559-3.7974-1.787-6.1426-1.7311-2.4012-5.4726-2.4012z\" stroke-width=\".93783\"/>\n</svg>\n`;\n","<app-layout>\n  <app-side-nav variant=\"secondary\" *ngIf=\"organization$ | async as organization\">\n    <bit-nav-logo [openIcon]=\"logo\" route=\".\" [label]=\"'adminConsole' | i18n\"></bit-nav-logo>\n    <org-switcher [filter]=\"orgFilter\" [hideNewButton]=\"hideNewOrgButton$ | async\"></org-switcher>\n    <bit-nav-group\n      icon=\"bwi-filter\"\n      *ngIf=\"organization.useRiskInsights\"\n      [text]=\"'accessIntelligence' | i18n\"\n    >\n      <bit-nav-item\n        [text]=\"'riskInsights' | i18n\"\n        route=\"access-intelligence/risk-insights\"\n      ></bit-nav-item>\n    </bit-nav-group>\n    <bit-nav-item\n      icon=\"bwi-collection\"\n      [text]=\"'collections' | i18n\"\n      route=\"vault\"\n      *ngIf=\"canShowVaultTab(organization)\"\n    >\n    </bit-nav-item>\n    <bit-nav-item\n      icon=\"bwi-user\"\n      [text]=\"'members' | i18n\"\n      route=\"members\"\n      *ngIf=\"canShowMembersTab(organization)\"\n    ></bit-nav-item>\n    <bit-nav-item\n      icon=\"bwi-users\"\n      [text]=\"'groups' | i18n\"\n      route=\"groups\"\n      *ngIf=\"canShowGroupsTab(organization)\"\n    ></bit-nav-item>\n    <bit-nav-group\n      icon=\"bwi-sliders\"\n      [text]=\"getReportTabLabel(organization) | i18n\"\n      route=\"reporting\"\n      *ngIf=\"canShowReportsTab(organization)\"\n    >\n      <bit-nav-item\n        [text]=\"'eventLogs' | i18n\"\n        route=\"reporting/events\"\n        *ngIf=\"organization.canAccessEventLogs\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'reports' | i18n\"\n        route=\"reporting/reports\"\n        *ngIf=\"organization.canAccessReports\"\n      ></bit-nav-item>\n    </bit-nav-group>\n    <bit-nav-group\n      icon=\"bwi-billing\"\n      [text]=\"'billing' | i18n\"\n      route=\"billing\"\n      *ngIf=\"canShowBillingTab(organization)\"\n    >\n      <bit-nav-item [text]=\"'subscription' | i18n\" route=\"billing/subscription\"></bit-nav-item>\n      <ng-container *ngIf=\"(showPaymentAndHistory$ | async) && (organizationIsUnmanaged$ | async)\">\n        <bit-nav-item [text]=\"'paymentMethod' | i18n\" route=\"billing/payment-method\"></bit-nav-item>\n        <bit-nav-item [text]=\"'billingHistory' | i18n\" route=\"billing/history\"></bit-nav-item>\n      </ng-container>\n    </bit-nav-group>\n    <bit-nav-item\n      icon=\"bwi-providers\"\n      [text]=\"'integrations' | i18n\"\n      route=\"integrations\"\n      *ngIf=\"integrationPageEnabled$ | async\"\n    ></bit-nav-item>\n    <bit-nav-group\n      icon=\"bwi-cog\"\n      [text]=\"'settings' | i18n\"\n      route=\"settings\"\n      *ngIf=\"canShowSettingsTab(organization)\"\n    >\n      <bit-nav-item\n        [text]=\"'organizationInfo' | i18n\"\n        route=\"settings/account\"\n        *ngIf=\"organization.isOwner\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'policies' | i18n\"\n        route=\"settings/policies\"\n        *ngIf=\"organization.canManagePolicies\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'twoStepLogin' | i18n\"\n        route=\"settings/two-factor\"\n        *ngIf=\"organization.use2fa && organization.isOwner\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'importData' | i18n\"\n        route=\"settings/tools/import\"\n        *ngIf=\"organization.canAccessImport\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'exportVault' | i18n\"\n        route=\"settings/tools/export\"\n        *ngIf=\"canAccessExport$ | async\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"domainVerificationNavigationTextKey | i18n\"\n        route=\"settings/domain-verification\"\n        *ngIf=\"organization?.canManageDomainVerification\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'singleSignOn' | i18n\"\n        route=\"settings/sso\"\n        *ngIf=\"organization.canManageSso\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'deviceApprovals' | i18n\"\n        route=\"settings/device-approvals\"\n        *ngIf=\"organization.canManageDeviceApprovals\"\n      ></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'scim' | i18n\"\n        route=\"settings/scim\"\n        *ngIf=\"organization.canManageScim\"\n      ></bit-nav-item>\n    </bit-nav-group>\n  </app-side-nav>\n\n  <ng-container *ngIf=\"organization$ | async as organization\">\n    <bit-banner\n      *ngIf=\"organization.isProviderUser\"\n      [showClose]=\"false\"\n      class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n    >\n      {{ \"accessingUsingProvider\" | i18n: organization.providerName }}\n    </bit-banner>\n  </ng-container>\n\n  <router-outlet></router-outlet>\n</app-layout>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { combineLatest, filter, map, Observable, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  canAccessBillingTab,\n  canAccessGroupsTab,\n  canAccessMembersTab,\n  canAccessOrgAdmin,\n  canAccessReportingTab,\n  canAccessSettingsTab,\n  canAccessVaultTab,\n  OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { PolicyType, ProviderStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { getById } from \"@bitwarden/common/platform/misc\";\nimport { BannerModule, IconModule } from \"@bitwarden/components\";\n\nimport { OrgSwitcherComponent } from \"../../../layouts/org-switcher/org-switcher.component\";\nimport { WebLayoutModule } from \"../../../layouts/web-layout.module\";\nimport { AdminConsoleLogo } from \"../../icons/admin-console-logo\";\n\n@Component({\n  selector: \"app-organization-layout\",\n  templateUrl: \"organization-layout.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    RouterModule,\n    JslibModule,\n    WebLayoutModule,\n    IconModule,\n    OrgSwitcherComponent,\n    BannerModule,\n  ],\n})\nexport class OrganizationLayoutComponent implements OnInit {\n  protected readonly logo = AdminConsoleLogo;\n\n  protected orgFilter = (org: Organization) => canAccessOrgAdmin(org);\n  protected domainVerificationNavigationTextKey: string;\n\n  protected integrationPageEnabled$: Observable<boolean>;\n\n  organization$: Observable<Organization>;\n  canAccessExport$: Observable<boolean>;\n  showPaymentAndHistory$: Observable<boolean>;\n  hideNewOrgButton$: Observable<boolean>;\n  organizationIsUnmanaged$: Observable<boolean>;\n  enterpriseOrganization$: Observable<boolean>;\n\n  constructor(\n    private route: ActivatedRoute,\n    private organizationService: OrganizationService,\n    private platformUtilsService: PlatformUtilsService,\n    private configService: ConfigService,\n    private policyService: PolicyService,\n    private providerService: ProviderService,\n  ) {}\n\n  async ngOnInit() {\n    document.body.classList.remove(\"layout_frontend\");\n\n    this.organization$ = this.route.params.pipe(\n      map((p) => p.organizationId),\n      switchMap((id) => this.organizationService.organizations$.pipe(getById(id))),\n      filter((org) => org != null),\n    );\n\n    this.canAccessExport$ = combineLatest([\n      this.organization$,\n      this.configService.getFeatureFlag$(FeatureFlag.PM11360RemoveProviderExportPermission),\n    ]).pipe(map(([org, removeProviderExport]) => org.canAccessExport(removeProviderExport)));\n\n    this.showPaymentAndHistory$ = this.organization$.pipe(\n      map(\n        (org) =>\n          !this.platformUtilsService.isSelfHost() &&\n          org.canViewBillingHistory &&\n          org.canEditPaymentMethods,\n      ),\n    );\n\n    this.hideNewOrgButton$ = this.policyService.policyAppliesToActiveUser$(PolicyType.SingleOrg);\n\n    const provider$ = this.organization$.pipe(\n      switchMap((organization) => this.providerService.get$(organization.providerId)),\n    );\n\n    this.organizationIsUnmanaged$ = combineLatest([this.organization$, provider$]).pipe(\n      map(\n        ([organization, provider]) =>\n          !organization.hasProvider ||\n          !provider ||\n          provider.providerStatus !== ProviderStatusType.Billable,\n      ),\n    );\n\n    this.integrationPageEnabled$ = combineLatest(\n      this.organization$,\n      this.configService.getFeatureFlag$(FeatureFlag.PM14505AdminConsoleIntegrationPage),\n    ).pipe(map(([org, featureFlagEnabled]) => featureFlagEnabled && org.canAccessIntegrations));\n\n    this.domainVerificationNavigationTextKey = (await this.configService.getFeatureFlag(\n      FeatureFlag.AccountDeprovisioning,\n    ))\n      ? \"claimedDomains\"\n      : \"domainVerification\";\n  }\n\n  canShowVaultTab(organization: Organization): boolean {\n    return canAccessVaultTab(organization);\n  }\n\n  canShowSettingsTab(organization: Organization): boolean {\n    return canAccessSettingsTab(organization);\n  }\n\n  canShowMembersTab(organization: Organization): boolean {\n    return canAccessMembersTab(organization);\n  }\n\n  canShowGroupsTab(organization: Organization): boolean {\n    return canAccessGroupsTab(organization);\n  }\n\n  canShowReportsTab(organization: Organization): boolean {\n    return canAccessReportingTab(organization);\n  }\n\n  canShowBillingTab(organization: Organization): boolean {\n    return false; // disable billing tab in Vaultwarden\n    return canAccessBillingTab(organization);\n  }\n\n  getReportTabLabel(organization: Organization): string {\n    return organization.useEvents ? \"reporting\" : \"reports\";\n  }\n}\n","import { map } from \"rxjs\";\n\n/**\n * An rxjs operator that extracts an object by ID from an array of objects.\n * @param id The ID of the object to return.\n * @returns The first object with a matching ID, or undefined if no matching object is present.\n */\nexport const getById = <TId, T extends { id: TId }>(id: TId) =>\n  map<T[], T | undefined>((objects) => objects.find((o) => o.id === id));\n\n/**\n * An rxjs operator that extracts a subset of objects by their IDs from an array of objects.\n * @param id The IDs of the objects to return.\n * @returns An array containing objects with matching IDs, or an empty array if there are no matching objects.\n */\nexport const getByIds = <TId, T extends { id: TId }>(ids: TId[]) => {\n  const idSet = new Set(ids);\n  return map<T[], T[]>((objects) => {\n    return objects.filter((o) => idSet.has(o.id));\n  });\n};\n","export class OrganizationVerifyDeleteRecoverRequest {\n  token: string;\n\n  constructor(token: string) {\n    this.token = token;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"@bitwarden/common/admin-console/models/request/organization-verify-delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\n@Component({\n  templateUrl: \"verify-recover-delete-org.component.html\",\n  standalone: true,\n  imports: [SharedModule],\n})\nexport class VerifyRecoverDeleteOrgComponent implements OnInit {\n  loading = true;\n  name: string;\n\n  private orgId: string;\n  private token: string;\n\n  constructor(\n    private router: Router,\n    private apiService: OrganizationApiServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private route: ActivatedRoute,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    const qParams = await firstValueFrom(this.route.queryParams);\n    if (qParams.orgId != null && qParams.token != null && qParams.name != null) {\n      this.orgId = qParams.orgId;\n      this.token = qParams.token;\n      this.name = qParams.name;\n      this.loading = false;\n    } else {\n      await this.router.navigate([\"/\"]);\n    }\n  }\n\n  submit = async () => {\n    const request = new OrganizationVerifyDeleteRecoverRequest(this.token);\n    await this.apiService.deleteUsingToken(this.orgId, request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"organizationDeleted\"),\n      message: this.i18nService.t(\"organizationDeletedDesc\"),\n    });\n    await this.router.navigate([\"/\"]);\n  };\n}\n","<div class=\"tw-flex tw-flex-row tw-justify-center tw-mt-5\">\n  <div class=\"tw-w-1/4\">\n    <p class=\"tw-text-xl tw-text-center tw-mb-4\">{{ \"deleteOrganization\" | i18n }}</p>\n    <div class=\"tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background\">\n      <div class=\"tw-p-5\">\n        <bit-callout type=\"warning\">\n          {{ \"deletingOrganizationIsPermanentWarning\" | i18n: name }}\n        </bit-callout>\n        <p class=\"tw-text-center\">\n          <strong>{{ name }}</strong>\n        </p>\n        <p>{{ \"deleteRecoverOrgConfirmDesc\" | i18n }}</p>\n        <p>{{ \"deletingOrganizationActiveUserAccountsWarning\" | i18n }}</p>\n        <hr />\n        <div class=\"tw-flex\">\n          <button\n            type=\"button\"\n            bitButton\n            buttonType=\"danger\"\n            [bitAction]=\"submit\"\n            [disabled]=\"loading\"\n            [block]=\"true\"\n          >\n            {{ \"deleteOrganization\" | i18n }}\n          </button>\n          <a\n            routerLink=\"/login\"\n            bitButton\n            buttonType=\"secondary\"\n            [block]=\"true\"\n            class=\"tw-ml-2 tw-mt-0\"\n          >\n            {{ \"cancel\" | i18n }}\n          </a>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordRequest,\n  OrganizationUserResetPasswordWithIdRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport {\n  Argon2KdfConfig,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  UserKeyRotationDataProvider,\n  KeyService,\n  KdfType,\n} from \"@bitwarden/key-management\";\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class OrganizationUserResetPasswordService\n  implements UserKeyRotationDataProvider<OrganizationUserResetPasswordWithIdRequest>\n{\n  constructor(\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private organizationService: OrganizationService,\n    private organizationUserApiService: OrganizationUserApiService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private i18nService: I18nService,\n  ) {}\n\n  /**\n   * Returns the user key encrypted by the organization's public key.\n   * Intended for use in enrollment\n   * @param orgId desired organization\n   */\n  async buildRecoveryKey(orgId: string, userKey?: UserKey): Promise<EncryptedString> {\n    // Retrieve Public Key\n    const orgKeys = await this.organizationApiService.getKeys(orgId);\n    if (orgKeys == null) {\n      throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n    }\n\n    const publicKey = Utils.fromB64ToArray(orgKeys.publicKey);\n\n    // RSA Encrypt user key with organization's public key\n    userKey ??= await this.keyService.getUserKey();\n    if (userKey == null) {\n      throw new Error(\"No user key found\");\n    }\n    const encryptedKey = await this.encryptService.rsaEncrypt(userKey.key, publicKey);\n\n    return encryptedKey.encryptedString;\n  }\n\n  /**\n   * Sets a user's master password through account recovery.\n   * Intended for organization admins\n   * @param newMasterPassword user's new master password\n   * @param email user's email\n   * @param orgUserId organization user's id\n   * @param orgId organization id\n   */\n  async resetMasterPassword(\n    newMasterPassword: string,\n    email: string,\n    orgUserId: string,\n    orgId: string,\n  ): Promise<void> {\n    const response = await this.organizationUserApiService.getOrganizationUserResetPasswordDetails(\n      orgId,\n      orgUserId,\n    );\n\n    if (response == null) {\n      throw new Error(this.i18nService.t(\"resetPasswordDetailsError\"));\n    }\n\n    // Decrypt Organization's encrypted Private Key with org key\n    const orgSymKey = await this.keyService.getOrgKey(orgId);\n    if (orgSymKey == null) {\n      throw new Error(\"No org key found\");\n    }\n    const decPrivateKey = await this.encryptService.decryptToBytes(\n      new EncString(response.encryptedPrivateKey),\n      orgSymKey,\n    );\n\n    // Decrypt User's Reset Password Key to get UserKey\n    const decValue = await this.encryptService.rsaDecrypt(\n      new EncString(response.resetPasswordKey),\n      decPrivateKey,\n    );\n    const existingUserKey = new SymmetricCryptoKey(decValue) as UserKey;\n\n    // determine Kdf Algorithm\n    const kdfConfig: KdfConfig =\n      response.kdf === KdfType.PBKDF2_SHA256\n        ? new PBKDF2KdfConfig(response.kdfIterations)\n        : new Argon2KdfConfig(response.kdfIterations, response.kdfMemory, response.kdfParallelism);\n\n    // Create new master key and hash new password\n    const newMasterKey = await this.keyService.makeMasterKey(\n      newMasterPassword,\n      email.trim().toLowerCase(),\n      kdfConfig,\n    );\n    const newMasterKeyHash = await this.keyService.hashMasterKey(newMasterPassword, newMasterKey);\n\n    // Create new encrypted user key for the User\n    const newUserKey = await this.keyService.encryptUserKeyWithMasterKey(\n      newMasterKey,\n      existingUserKey,\n    );\n\n    // Create request\n    const request = new OrganizationUserResetPasswordRequest();\n    request.key = newUserKey[1].encryptedString;\n    request.newMasterPasswordHash = newMasterKeyHash;\n\n    // Change user's password\n    await this.organizationUserApiService.putOrganizationUserResetPassword(\n      orgId,\n      orgUserId,\n      request,\n    );\n  }\n\n  /**\n   * Returns existing account recovery keys re-encrypted with the new user key.\n   * @param originalUserKey the original user key\n   * @param newUserKey the new user key\n   * @param userId the user id\n   * @throws Error if new user key is null\n   * @returns a list of account recovery keys that have been re-encrypted with the new user key\n   */\n  async getRotatedData(\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<OrganizationUserResetPasswordWithIdRequest[] | null> {\n    if (newUserKey == null) {\n      throw new Error(\"New user key is required for rotation.\");\n    }\n\n    const allOrgs = await this.organizationService.getAll();\n\n    if (!allOrgs) {\n      return;\n    }\n\n    const requests: OrganizationUserResetPasswordWithIdRequest[] = [];\n    for (const org of allOrgs) {\n      // If not already enrolled, skip\n      if (!org.resetPasswordEnrolled) {\n        continue;\n      }\n\n      // Re-enroll - encrypt user key with organization public key\n      const encryptedKey = await this.buildRecoveryKey(org.id, newUserKey);\n\n      // Create/Execute request\n      const request = new OrganizationUserResetPasswordWithIdRequest();\n      request.organizationId = org.id;\n      request.resetPasswordKey = encryptedKey;\n      request.masterPasswordHash = \"ignored\";\n\n      requests.push(request);\n    }\n    return requests;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { LooseComponentsModule, SharedModule } from \"../../../shared\";\n\nimport { DisableSendPolicyComponent } from \"./disable-send.component\";\nimport { MasterPasswordPolicyComponent } from \"./master-password.component\";\nimport { PasswordGeneratorPolicyComponent } from \"./password-generator.component\";\nimport { PersonalOwnershipPolicyComponent } from \"./personal-ownership.component\";\nimport { PoliciesComponent } from \"./policies.component\";\nimport { PolicyEditComponent } from \"./policy-edit.component\";\nimport { RequireSsoPolicyComponent } from \"./require-sso.component\";\nimport { ResetPasswordPolicyComponent } from \"./reset-password.component\";\nimport { SendOptionsPolicyComponent } from \"./send-options.component\";\nimport { SingleOrgPolicyComponent } from \"./single-org.component\";\nimport { TwoFactorAuthenticationPolicyComponent } from \"./two-factor-authentication.component\";\n\n@NgModule({\n  imports: [SharedModule, LooseComponentsModule],\n  declarations: [\n    DisableSendPolicyComponent,\n    MasterPasswordPolicyComponent,\n    PasswordGeneratorPolicyComponent,\n    PersonalOwnershipPolicyComponent,\n    RequireSsoPolicyComponent,\n    ResetPasswordPolicyComponent,\n    SendOptionsPolicyComponent,\n    SingleOrgPolicyComponent,\n    TwoFactorAuthenticationPolicyComponent,\n    PoliciesComponent,\n    PolicyEditComponent,\n  ],\n  exports: [\n    DisableSendPolicyComponent,\n    MasterPasswordPolicyComponent,\n    PasswordGeneratorPolicyComponent,\n    PersonalOwnershipPolicyComponent,\n    RequireSsoPolicyComponent,\n    ResetPasswordPolicyComponent,\n    SendOptionsPolicyComponent,\n    SingleOrgPolicyComponent,\n    TwoFactorAuthenticationPolicyComponent,\n    PoliciesComponent,\n    PolicyEditComponent,\n  ],\n})\nexport class PoliciesModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"../../enums\";\n\nexport class PolicyRequest {\n  type: PolicyType;\n  enabled: boolean;\n  data: any;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, Input, OnInit } from \"@angular/core\";\nimport { UntypedFormControl, UntypedFormGroup } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\n\nexport abstract class BasePolicy {\n  abstract name: string;\n  abstract description: string;\n  abstract type: PolicyType;\n  abstract component: any;\n\n  display(organization: Organization) {\n    return true;\n  }\n}\n\n@Directive()\nexport abstract class BasePolicyComponent implements OnInit {\n  @Input() policyResponse: PolicyResponse;\n  @Input() policy: BasePolicy;\n\n  enabled = new UntypedFormControl(false);\n  data: UntypedFormGroup = null;\n\n  ngOnInit(): void {\n    this.enabled.setValue(this.policyResponse.enabled);\n\n    if (this.policyResponse.data != null) {\n      this.loadData();\n    }\n  }\n\n  loadData() {\n    this.data.patchValue(this.policyResponse.data ?? {});\n  }\n\n  buildRequestData() {\n    if (this.data != null) {\n      return this.data.value;\n    }\n\n    return null;\n  }\n\n  buildRequest() {\n    const request = new PolicyRequest();\n    request.enabled = this.enabled.value;\n    request.type = this.policy.type;\n    request.data = this.buildRequestData();\n\n    return Promise.resolve(request);\n  }\n}\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class DisableSendPolicy extends BasePolicy {\n  name = \"disableSend\";\n  description = \"disableSendPolicyDesc\";\n  type = PolicyType.DisableSend;\n  component = DisableSendPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-disable-send\",\n  templateUrl: \"disable-send.component.html\",\n})\nexport class DisableSendPolicyComponent extends BasePolicyComponent {}\n","<bit-callout type=\"warning\">\n  {{ \"disableSendExemption\" | i18n }}\n</bit-callout>\n\n<bit-form-control>\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n","<bit-callout type=\"info\" *ngIf=\"showKeyConnectorInfo\">\n  {{ \"keyConnectorPolicyRestriction\" | i18n }}\n</bit-callout>\n\n<div [formGroup]=\"data\">\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n    <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n  </bit-form-control>\n\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"enforceOnLogin\" id=\"enforceOnLogin\" />\n    <bit-label>{{ \"enforceOnLoginDesc\" | i18n }}</bit-label>\n  </bit-form-control>\n\n  <div class=\"tw-flex tw-space-x-4\">\n    <bit-form-field class=\"tw-flex-auto\">\n      <bit-label>{{ \"minComplexityScore\" | i18n }}</bit-label>\n      <bit-select formControlName=\"minComplexity\" id=\"minComplexity\">\n        <bit-option\n          *ngFor=\"let o of passwordScores\"\n          [value]=\"o.value\"\n          [label]=\"o.name\"\n        ></bit-option>\n      </bit-select>\n    </bit-form-field>\n    <bit-form-field class=\"tw-flex-auto\">\n      <bit-label>{{ \"minLength\" | i18n }}</bit-label>\n      <input\n        bitInput\n        type=\"number\"\n        formControlName=\"minLength\"\n        id=\"minLength\"\n        [min]=\"MinPasswordLength\"\n      />\n    </bit-form-field>\n  </div>\n\n  <bit-form-control class=\"!tw-mb-2\">\n    <input type=\"checkbox\" bitCheckbox formControlName=\"requireUpper\" id=\"requireUpper\" />\n    <bit-label>A-Z</bit-label>\n  </bit-form-control>\n  <bit-form-control class=\"!tw-mb-2\">\n    <input type=\"checkbox\" bitCheckbox formControlName=\"requireLower\" id=\"requireLower\" />\n    <bit-label>a-z</bit-label>\n  </bit-form-control>\n  <bit-form-control class=\"!tw-mb-2\">\n    <input type=\"checkbox\" bitCheckbox formControlName=\"requireNumbers\" id=\"requireNumbers\" />\n    <bit-label>0-9</bit-label>\n  </bit-form-control>\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"requireSpecial\" id=\"requireSpecial\" />\n    <bit-label>!&#64;#$%^&amp;*</bit-label>\n  </bit-form-control>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class MasterPasswordPolicy extends BasePolicy {\n  name = \"masterPassPolicyTitle\";\n  description = \"masterPassPolicyDesc\";\n  type = PolicyType.MasterPassword;\n  component = MasterPasswordPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-master-password\",\n  templateUrl: \"master-password.component.html\",\n})\nexport class MasterPasswordPolicyComponent extends BasePolicyComponent implements OnInit {\n  MinPasswordLength = Utils.minimumPasswordLength;\n\n  data: FormGroup<ControlsOf<MasterPasswordPolicyOptions>> = this.formBuilder.group({\n    minComplexity: [null],\n    minLength: [this.MinPasswordLength, [Validators.min(Utils.minimumPasswordLength)]],\n    requireUpper: [false],\n    requireLower: [false],\n    requireNumbers: [false],\n    requireSpecial: [false],\n    enforceOnLogin: [false],\n  });\n\n  passwordScores: { name: string; value: number }[];\n  showKeyConnectorInfo = false;\n\n  constructor(\n    private formBuilder: FormBuilder,\n    i18nService: I18nService,\n    private organizationService: OrganizationService,\n  ) {\n    super();\n\n    this.passwordScores = [\n      { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n      { name: i18nService.t(\"weak\") + \" (0)\", value: 0 },\n      { name: i18nService.t(\"weak\") + \" (1)\", value: 1 },\n      { name: i18nService.t(\"weak\") + \" (2)\", value: 2 },\n      { name: i18nService.t(\"good\") + \" (3)\", value: 3 },\n      { name: i18nService.t(\"strong\") + \" (4)\", value: 4 },\n    ];\n  }\n\n  async ngOnInit() {\n    super.ngOnInit();\n    const organization = await this.organizationService.get(this.policyResponse.organizationId);\n    this.showKeyConnectorInfo = organization.keyConnectorEnabled;\n  }\n}\n","<div [formGroup]=\"data\">\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n    <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n  </bit-form-control>\n\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n    <bit-form-field class=\"tw-col-span-6 tw-mb-0\">\n      <bit-label>{{ \"overridePasswordTypePolicy\" | i18n }}</bit-label>\n      <bit-select formControlName=\"overridePasswordType\" id=\"overrideType\">\n        <bit-option\n          *ngFor=\"let o of overridePasswordTypeOptions\"\n          [value]=\"o.value\"\n          [label]=\"o.name\"\n        ></bit-option>\n      </bit-select>\n    </bit-form-field>\n  </div>\n\n  <!-- password-specific policies -->\n  <div *ngIf=\"showPasswordPolicies$ | async\">\n    <h3 bitTypography=\"h3\" class=\"tw-mt-4\">{{ \"password\" | i18n }}</h3>\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"minLength\" | i18n }}</bit-label>\n        <input\n          bitInput\n          type=\"number\"\n          [min]=\"minLengthMin\"\n          [max]=\"minLengthMax\"\n          formControlName=\"minLength\"\n        />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"minNumbers\" | i18n }}</bit-label>\n        <input\n          bitInput\n          type=\"number\"\n          [min]=\"minNumbersMin\"\n          [max]=\"minNumbersMax\"\n          formControlName=\"minNumbers\"\n        />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"minSpecial\" | i18n }}</bit-label>\n        <input\n          bitInput\n          type=\"number\"\n          [min]=\"minSpecialMin\"\n          [max]=\"minSpecialMax\"\n          formControlName=\"minSpecial\"\n        />\n      </bit-form-field>\n    </div>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"useUpper\" id=\"useUpper\" />\n      <bit-label>{{ \"uppercaseLabel\" | i18n }}</bit-label>\n    </bit-form-control>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"useLower\" id=\"useLower\" />\n      <bit-label>{{ \"lowercaseLabel\" | i18n }}</bit-label>\n    </bit-form-control>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"useNumbers\" id=\"useNumbers\" />\n      <bit-label>{{ \"numbersLabel\" | i18n }}</bit-label>\n    </bit-form-control>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"useSpecial\" id=\"useSpecial\" />\n      <bit-label>{{ \"specialCharactersLabel\" | i18n }}</bit-label>\n    </bit-form-control>\n  </div>\n\n  <!-- passphrase-specific policies -->\n  <div *ngIf=\"showPassphrasePolicies$ | async\">\n    <h3 bitTypography=\"h3\" class=\"tw-mt-4\">{{ \"passphrase\" | i18n }}</h3>\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"minimumNumberOfWords\" | i18n }}</bit-label>\n        <input\n          bitInput\n          type=\"number\"\n          [min]=\"minNumberWordsMin\"\n          [max]=\"minNumberWordsMax\"\n          formControlName=\"minNumberWords\"\n        />\n      </bit-form-field>\n    </div>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"capitalize\" id=\"capitalize\" />\n      <bit-label>{{ \"capitalize\" | i18n }}</bit-label>\n    </bit-form-control>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"includeNumber\" id=\"includeNumber\" />\n      <bit-label>{{ \"includeNumber\" | i18n }}</bit-label>\n    </bit-form-control>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { BehaviorSubject, map } from \"rxjs\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Generators } from \"@bitwarden/generator-core\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class PasswordGeneratorPolicy extends BasePolicy {\n  name = \"passwordGenerator\";\n  description = \"passwordGeneratorPolicyDesc\";\n  type = PolicyType.PasswordGenerator;\n  component = PasswordGeneratorPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-password-generator\",\n  templateUrl: \"password-generator.component.html\",\n})\nexport class PasswordGeneratorPolicyComponent extends BasePolicyComponent {\n  // these properties forward the application default settings to the UI\n  // for HTML attribute bindings\n  protected readonly minLengthMin = Generators.password.settings.constraints.length.min;\n  protected readonly minLengthMax = Generators.password.settings.constraints.length.max;\n  protected readonly minNumbersMin = Generators.password.settings.constraints.minNumber.min;\n  protected readonly minNumbersMax = Generators.password.settings.constraints.minNumber.max;\n  protected readonly minSpecialMin = Generators.password.settings.constraints.minSpecial.min;\n  protected readonly minSpecialMax = Generators.password.settings.constraints.minSpecial.max;\n  protected readonly minNumberWordsMin = Generators.passphrase.settings.constraints.numWords.min;\n  protected readonly minNumberWordsMax = Generators.passphrase.settings.constraints.numWords.max;\n\n  data = this.formBuilder.group({\n    overridePasswordType: [null],\n    minLength: [null, [Validators.min(this.minLengthMin), Validators.max(this.minLengthMax)]],\n    useUpper: [null],\n    useLower: [null],\n    useNumbers: [null],\n    useSpecial: [null],\n    minNumbers: [null, [Validators.min(this.minNumbersMin), Validators.max(this.minNumbersMax)]],\n    minSpecial: [null, [Validators.min(this.minSpecialMin), Validators.max(this.minSpecialMax)]],\n    minNumberWords: [\n      null,\n      [Validators.min(this.minNumberWordsMin), Validators.max(this.minNumberWordsMax)],\n    ],\n    capitalize: [null],\n    includeNumber: [null],\n  });\n\n  overridePasswordTypeOptions: { name: string; value: string }[];\n\n  // These subjects cache visibility of the sub-options for passwords\n  // and passphrases; without them policy controls don't show up at all.\n  private showPasswordPolicies = new BehaviorSubject<boolean>(true);\n  private showPassphrasePolicies = new BehaviorSubject<boolean>(true);\n\n  /** Emits `true` when the password policy options should be displayed */\n  get showPasswordPolicies$() {\n    return this.showPasswordPolicies.asObservable();\n  }\n\n  /** Emits `true` when the passphrase policy options should be displayed */\n  get showPassphrasePolicies$() {\n    return this.showPassphrasePolicies.asObservable();\n  }\n\n  constructor(\n    private formBuilder: UntypedFormBuilder,\n    i18nService: I18nService,\n  ) {\n    super();\n\n    this.overridePasswordTypeOptions = [\n      { name: i18nService.t(\"userPreference\"), value: null },\n      { name: i18nService.t(\"password\"), value: PASSWORD_POLICY_VALUE },\n      { name: i18nService.t(\"passphrase\"), value: \"passphrase\" },\n    ];\n\n    this.data.valueChanges\n      .pipe(isEnabled(PASSWORD_POLICY_VALUE), takeUntilDestroyed())\n      .subscribe(this.showPasswordPolicies);\n    this.data.valueChanges\n      .pipe(isEnabled(PASSPHRASE_POLICY_VALUE), takeUntilDestroyed())\n      .subscribe(this.showPassphrasePolicies);\n  }\n}\n\nconst PASSWORD_POLICY_VALUE = \"password\";\nconst PASSPHRASE_POLICY_VALUE = \"passphrase\";\n\nfunction isEnabled(enabledValue: string) {\n  return map((d: { overridePasswordType: string }) => {\n    const type = d?.overridePasswordType ?? enabledValue;\n    return type === enabledValue;\n  });\n}\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class PersonalOwnershipPolicy extends BasePolicy {\n  name = \"personalOwnership\";\n  description = \"personalOwnershipPolicyDesc\";\n  type = PolicyType.PersonalOwnership;\n  component = PersonalOwnershipPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-personal-ownership\",\n  templateUrl: \"personal-ownership.component.html\",\n})\nexport class PersonalOwnershipPolicyComponent extends BasePolicyComponent {}\n","<bit-callout type=\"warning\">\n  {{ \"personalOwnershipExemption\" | i18n }}\n</bit-callout>\n\n<bit-form-control>\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class RequireSsoPolicy extends BasePolicy {\n  name = \"requireSso\";\n  description = \"requireSsoPolicyDesc\";\n  type = PolicyType.RequireSso;\n  component = RequireSsoPolicyComponent;\n\n  display(organization: Organization) {\n    return organization.useSso;\n  }\n}\n\n@Component({\n  selector: \"policy-require-sso\",\n  templateUrl: \"require-sso.component.html\",\n})\nexport class RequireSsoPolicyComponent extends BasePolicyComponent {}\n","<bit-callout type=\"info\" title=\"{{ 'prerequisite' | i18n }}\">\n  {{ \"requireSsoPolicyReq\" | i18n }}\n</bit-callout>\n<bit-callout type=\"warning\">\n  {{ \"requireSsoExemption\" | i18n }}\n</bit-callout>\n\n<bit-form-control>\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n","<bit-callout type=\"info\" *ngIf=\"showKeyConnectorInfo\">\n  {{ \"keyConnectorPolicyRestriction\" | i18n }}\n</bit-callout>\n\n<bit-callout type=\"success\" [title]=\"'prerequisite' | i18n\" icon=\"bwi-lightbulb\">\n  {{ \"accountRecoverySingleOrgRequirementDesc\" | i18n }}\n</bit-callout>\n\n<bit-callout type=\"warning\">\n  {{ \"accountRecoveryPolicyWarning\" | i18n }}\n</bit-callout>\n\n<bit-form-control class=\"!tw-mb-1\">\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n\n<ng-container [formGroup]=\"data\">\n  <bit-form-control class=\"!tw-mb-1\">\n    <input type=\"checkbox\" bitCheckbox formControlName=\"autoEnrollEnabled\" id=\"autoEnrollEnabled\" />\n    <bit-label>{{ \"resetPasswordPolicyAutoEnrollCheckbox\" | i18n }}</bit-label>\n  </bit-form-control>\n</ng-container>\n","import { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class ResetPasswordPolicy extends BasePolicy {\n  name = \"accountRecoveryPolicy\";\n  description = \"accountRecoveryPolicyDesc\";\n  type = PolicyType.ResetPassword;\n  component = ResetPasswordPolicyComponent;\n\n  display(organization: Organization) {\n    return organization.useResetPassword;\n  }\n}\n\n@Component({\n  selector: \"policy-reset-password\",\n  templateUrl: \"reset-password.component.html\",\n})\nexport class ResetPasswordPolicyComponent extends BasePolicyComponent implements OnInit {\n  data = this.formBuilder.group({\n    autoEnrollEnabled: false,\n  });\n  showKeyConnectorInfo = false;\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private organizationService: OrganizationService,\n  ) {\n    super();\n  }\n\n  async ngOnInit() {\n    super.ngOnInit();\n    const organization = await this.organizationService.get(this.policyResponse.organizationId);\n    this.showKeyConnectorInfo = organization.keyConnectorEnabled;\n  }\n}\n","import { Component } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class SendOptionsPolicy extends BasePolicy {\n  name = \"sendOptions\";\n  description = \"sendOptionsPolicyDesc\";\n  type = PolicyType.SendOptions;\n  component = SendOptionsPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-send-options\",\n  templateUrl: \"send-options.component.html\",\n})\nexport class SendOptionsPolicyComponent extends BasePolicyComponent {\n  data = this.formBuilder.group({\n    disableHideEmail: false,\n  });\n\n  constructor(private formBuilder: UntypedFormBuilder) {\n    super();\n  }\n}\n","<bit-callout type=\"warning\">\n  {{ \"sendOptionsExemption\" | i18n }}\n</bit-callout>\n\n<bit-form-control>\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n\n<div [formGroup]=\"data\">\n  <h3 bitTypography=\"h3\" class=\"tw-mt-4\">{{ \"options\" | i18n }}</h3>\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"disableHideEmail\" id=\"disableHideEmail\" />\n    <bit-label>{{ \"disableHideEmail\" | i18n }}</bit-label>\n  </bit-form-control>\n</div>\n","<bit-callout *ngIf=\"accountDeprovisioningEnabled$ | async; else disabledBlock\" type=\"warning\">\n  {{ \"singleOrgPolicyMemberWarning\" | i18n }}\n</bit-callout>\n<ng-template #disabledBlock>\n  <bit-callout type=\"warning\">\n    {{ \"singleOrgPolicyWarning\" | i18n }}\n  </bit-callout>\n</ng-template>\n\n<bit-form-control>\n  <input type=\"checkbox\" bitCheckbox [formControl]=\"enabled\" id=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n","import { Component, OnInit } from \"@angular/core\";\nimport { firstValueFrom, Observable } from \"rxjs\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class SingleOrgPolicy extends BasePolicy {\n  name = \"singleOrg\";\n  description = \"singleOrgDesc\";\n  type = PolicyType.SingleOrg;\n  component = SingleOrgPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-single-org\",\n  templateUrl: \"single-org.component.html\",\n})\nexport class SingleOrgPolicyComponent extends BasePolicyComponent implements OnInit {\n  constructor(private configService: ConfigService) {\n    super();\n  }\n\n  protected accountDeprovisioningEnabled$: Observable<boolean> = this.configService.getFeatureFlag$(\n    FeatureFlag.AccountDeprovisioning,\n  );\n\n  async ngOnInit() {\n    super.ngOnInit();\n\n    const isAccountDeprovisioningEnabled = await firstValueFrom(this.accountDeprovisioningEnabled$);\n    this.policy.description = isAccountDeprovisioningEnabled\n      ? \"singleOrgPolicyDesc\"\n      : \"singleOrgDesc\";\n\n    if (!this.policyResponse.canToggleState) {\n      this.enabled.disable();\n    }\n  }\n}\n","import { Component } from \"@angular/core\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n\nimport { BasePolicy, BasePolicyComponent } from \"./base-policy.component\";\n\nexport class TwoFactorAuthenticationPolicy extends BasePolicy {\n  name = \"twoStepLoginPolicyTitle\";\n  description = \"twoStepLoginPolicyDesc\";\n  type = PolicyType.TwoFactorAuthentication;\n  component = TwoFactorAuthenticationPolicyComponent;\n}\n\n@Component({\n  selector: \"policy-two-factor-authentication\",\n  templateUrl: \"two-factor-authentication.component.html\",\n})\nexport class TwoFactorAuthenticationPolicyComponent extends BasePolicyComponent {}\n","<bit-callout type=\"warning\">\n  {{ \"twoStepLoginPolicyWarning\" | i18n }}\n</bit-callout>\n\n<bit-form-control>\n  <input type=\"checkbox\" id=\"enabled\" bitCheckbox [formControl]=\"enabled\" />\n  <bit-label>{{ \"turnOn\" | i18n }}</bit-label>\n</bit-form-control>\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog [loading]=\"loading\" [title]=\"'editPolicy' | i18n\" [subtitle]=\"policy.name | i18n\">\n    <ng-container bitDialogContent>\n      <div *ngIf=\"loading\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </div>\n      <div [hidden]=\"loading\">\n        <p bitTypography=\"body1\">{{ policy.description | i18n }}</p>\n        <ng-template #policyForm></ng-template>\n      </div>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button\n        bitButton\n        buttonType=\"primary\"\n        [disabled]=\"saveDisabled$ | async\"\n        bitFormButton\n        type=\"submit\"\n      >\n        {{ \"save\" | i18n }}\n      </button>\n      <button bitButton buttonType=\"secondary\" bitDialogClose type=\"button\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  Inject,\n  ViewChild,\n  ViewContainerRef,\n} from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { Observable, map } from \"rxjs\";\n\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { PolicyRequest } from \"@bitwarden/common/admin-console/models/request/policy.request\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { BasePolicy, BasePolicyComponent } from \"../policies\";\n\nexport type PolicyEditDialogData = {\n  /** Returns policy abstracts. */\n  policy: BasePolicy;\n  /** Returns a unique organization id  */\n  organizationId: string;\n};\n\nexport enum PolicyEditDialogResult {\n  Saved = \"saved\",\n}\n@Component({\n  selector: \"app-policy-edit\",\n  templateUrl: \"policy-edit.component.html\",\n})\nexport class PolicyEditComponent implements AfterViewInit {\n  @ViewChild(\"policyForm\", { read: ViewContainerRef, static: true })\n  policyFormRef: ViewContainerRef;\n\n  policyType = PolicyType;\n  loading = true;\n  enabled = false;\n  saveDisabled$: Observable<boolean>;\n  defaultTypes: any[];\n  policyComponent: BasePolicyComponent;\n\n  private policyResponse: PolicyResponse;\n  formGroup = this.formBuilder.group({\n    enabled: [this.enabled],\n  });\n  constructor(\n    @Inject(DIALOG_DATA) protected data: PolicyEditDialogData,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private i18nService: I18nService,\n    private cdr: ChangeDetectorRef,\n    private formBuilder: FormBuilder,\n    private dialogRef: DialogRef<PolicyEditDialogResult>,\n    private toastService: ToastService,\n  ) {}\n  get policy(): BasePolicy {\n    return this.data.policy;\n  }\n\n  async ngAfterViewInit() {\n    await this.load();\n    this.loading = false;\n\n    this.policyComponent = this.policyFormRef.createComponent(this.data.policy.component)\n      .instance as BasePolicyComponent;\n    this.policyComponent.policy = this.data.policy;\n    this.policyComponent.policyResponse = this.policyResponse;\n\n    this.saveDisabled$ = this.policyComponent.data.statusChanges.pipe(\n      map((status) => status !== \"VALID\" || !this.policyResponse.canToggleState),\n    );\n\n    this.cdr.detectChanges();\n  }\n\n  async load() {\n    try {\n      this.policyResponse = await this.policyApiService.getPolicy(\n        this.data.organizationId,\n        this.data.policy.type,\n      );\n    } catch (e) {\n      if (e.statusCode === 404) {\n        this.policyResponse = new PolicyResponse({ Enabled: false });\n      } else {\n        throw e;\n      }\n    }\n  }\n\n  submit = async () => {\n    let request: PolicyRequest;\n    try {\n      request = await this.policyComponent.buildRequest();\n    } catch (e) {\n      this.toastService.showToast({ variant: \"error\", title: null, message: e.message });\n      return;\n    }\n    await this.policyApiService.putPolicy(this.data.organizationId, this.data.policy.type, request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"editedPolicyId\", this.i18nService.t(this.data.policy.name)),\n    });\n    this.dialogRef.close(PolicyEditDialogResult.Saved);\n  };\n\n  static open = (dialogService: DialogService, config: DialogConfig<PolicyEditDialogData>) => {\n    return dialogService.open<PolicyEditDialogResult>(PolicyEditComponent, config);\n  };\n}\n","<app-header></app-header>\n\n<bit-container>\n  <ng-container *ngIf=\"loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </ng-container>\n  <bit-table *ngIf=\"!loading\">\n    <ng-template body>\n      <tr bitRow *ngFor=\"let p of policies\">\n        <td bitCell *ngIf=\"p.display(organization)\">\n          <button type=\"button\" bitLink (click)=\"edit(p)\">{{ p.name | i18n }}</button>\n          <span bitBadge variant=\"success\" *ngIf=\"policiesEnabledMap.get(p.type)\">{{\n            \"on\" | i18n\n          }}</span>\n          <small class=\"tw-text-muted tw-block\">{{ p.description | i18n }}</small>\n        </td>\n      </tr>\n    </ng-template>\n  </bit-table>\n  <ng-template #editTemplate></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PolicyListService } from \"../../core/policy-list.service\";\nimport { BasePolicy } from \"../policies\";\n\nimport { PolicyEditComponent, PolicyEditDialogResult } from \"./policy-edit.component\";\n\n@Component({\n  selector: \"app-org-policies\",\n  templateUrl: \"policies.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class PoliciesComponent implements OnInit {\n  @ViewChild(\"editTemplate\", { read: ViewContainerRef, static: true })\n  editModalRef: ViewContainerRef;\n\n  loading = true;\n  organizationId: string;\n  policies: BasePolicy[];\n  organization: Organization;\n\n  private orgPolicies: PolicyResponse[];\n  protected policiesEnabledMap: Map<PolicyType, boolean> = new Map<PolicyType, boolean>();\n\n  constructor(\n    private route: ActivatedRoute,\n    private organizationService: OrganizationService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private policyListService: PolicyListService,\n    private dialogService: DialogService,\n  ) {}\n\n  async ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.parent.parent.params.subscribe(async (params) => {\n      this.organizationId = params.organizationId;\n      this.organization = await this.organizationService.get(this.organizationId);\n      this.policies = this.policyListService.getPolicies();\n\n      await this.load();\n\n      // Handle policies component launch from Event message\n      /* eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe, rxjs/no-nested-subscribe */\n      this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n        if (qParams.policyId != null) {\n          const policyIdFromEvents: string = qParams.policyId;\n          for (const orgPolicy of this.orgPolicies) {\n            if (orgPolicy.id === policyIdFromEvents) {\n              for (let i = 0; i < this.policies.length; i++) {\n                if (this.policies[i].type === orgPolicy.type) {\n                  // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n                  // eslint-disable-next-line @typescript-eslint/no-floating-promises\n                  this.edit(this.policies[i]);\n                  break;\n                }\n              }\n              break;\n            }\n          }\n        }\n      });\n    });\n  }\n\n  async load() {\n    const response = await this.policyApiService.getPolicies(this.organizationId);\n    this.orgPolicies = response.data != null && response.data.length > 0 ? response.data : [];\n    this.orgPolicies.forEach((op) => {\n      this.policiesEnabledMap.set(op.type, op.enabled);\n    });\n\n    this.loading = false;\n  }\n\n  async edit(policy: BasePolicy) {\n    const dialogRef = PolicyEditComponent.open(this.dialogService, {\n      data: {\n        policy: policy,\n        organizationId: this.organizationId,\n      },\n    });\n\n    const result = await lastValueFrom(dialogRef.closed);\n    if (result === PolicyEditDialogResult.Saved) {\n      await this.load();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { combineLatest, Subject, takeUntil } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { UserVerificationModule } from \"../../../../auth/shared/components/user-verification\";\nimport { SharedModule } from \"../../../../shared/shared.module\";\n\nclass CountBasedLocalizationKey {\n  singular: string;\n  plural: string;\n\n  getKey(count: number) {\n    return count == 1 ? this.singular : this.plural;\n  }\n\n  constructor(singular: string, plural: string) {\n    this.singular = singular;\n    this.plural = plural;\n  }\n}\n\nclass OrganizationContentSummaryItem {\n  count: number;\n\n  get localizationKey(): string {\n    return this.localizationKeyOptions.getKey(this.count);\n  }\n\n  private localizationKeyOptions: CountBasedLocalizationKey;\n\n  constructor(count: number, localizationKeyOptions: CountBasedLocalizationKey) {\n    this.count = count;\n    this.localizationKeyOptions = localizationKeyOptions;\n  }\n}\n\nclass OrganizationContentSummary {\n  totalItemCount = 0;\n  itemCountByType: OrganizationContentSummaryItem[] = [];\n}\n\nexport interface DeleteOrganizationDialogParams {\n  organizationId: string;\n\n  requestType: \"InvalidFamiliesForEnterprise\" | \"RegularDelete\";\n}\n\nexport enum DeleteOrganizationDialogResult {\n  Deleted = \"deleted\",\n  Canceled = \"canceled\",\n}\n\n@Component({\n  selector: \"app-delete-organization\",\n  standalone: true,\n  imports: [SharedModule, UserVerificationModule],\n  templateUrl: \"delete-organization-dialog.component.html\",\n})\nexport class DeleteOrganizationDialogComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  loaded: boolean;\n  deleteOrganizationRequestType: \"InvalidFamiliesForEnterprise\" | \"RegularDelete\" = \"RegularDelete\";\n  organization: Organization;\n  organizationContentSummary: OrganizationContentSummary = new OrganizationContentSummary();\n  secret: Verification;\n\n  protected formGroup = this.formBuilder.group({\n    secret: new FormControl<Verification>(null, [Validators.required]),\n  });\n  formPromise: Promise<void>;\n\n  constructor(\n    @Inject(DIALOG_DATA) private params: DeleteOrganizationDialogParams,\n    private dialogRef: DialogRef<DeleteOrganizationDialogResult>,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private userVerificationService: UserVerificationService,\n    private cipherService: CipherService,\n    private organizationService: OrganizationService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private formBuilder: FormBuilder,\n    private toastService: ToastService,\n  ) {}\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async ngOnInit(): Promise<void> {\n    this.deleteOrganizationRequestType = this.params.requestType;\n\n    combineLatest([\n      this.organizationService.get$(this.params.organizationId),\n      this.cipherService.getAllFromApiForOrganization(this.params.organizationId),\n    ])\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(([organization, ciphers]) => {\n        this.organization = organization;\n        this.organizationContentSummary = this.buildOrganizationContentSummary(ciphers);\n        this.loaded = true;\n      });\n  }\n\n  protected submit = async () => {\n    await this.userVerificationService\n      .buildRequest(this.formGroup.value.secret)\n      .then((request) => this.organizationApiService.delete(this.organization.id, request));\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"organizationDeleted\"),\n      message: this.i18nService.t(\"organizationDeletedDesc\"),\n    });\n    this.dialogRef.close(DeleteOrganizationDialogResult.Deleted);\n  };\n\n  private buildOrganizationContentSummary(ciphers: CipherView[]): OrganizationContentSummary {\n    const organizationContentSummary = new OrganizationContentSummary();\n    const organizationItems = ciphers.filter((item) => item.deletedDate == null);\n\n    if (organizationItems.length < 1) {\n      return organizationContentSummary;\n    }\n\n    organizationContentSummary.totalItemCount = organizationItems.length;\n    for (const cipherType of Utils.iterateEnum(CipherType)) {\n      const count = this.getOrganizationItemCountByType(organizationItems, cipherType);\n      if (count > 0) {\n        organizationContentSummary.itemCountByType.push(\n          new OrganizationContentSummaryItem(\n            count,\n            this.getOrganizationItemLocalizationKeysByType(CipherType[cipherType]),\n          ),\n        );\n      }\n    }\n\n    return organizationContentSummary;\n  }\n\n  private getOrganizationItemCountByType(items: CipherView[], type: CipherType) {\n    return items.filter((item) => item.type == type).length;\n  }\n\n  private getOrganizationItemLocalizationKeysByType(type: string): CountBasedLocalizationKey {\n    return new CountBasedLocalizationKey(`type${type}`, `type${type}Plural`);\n  }\n}\n\n/**\n * Strongly typed helper to open a Delete Organization dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openDeleteOrganizationDialog(\n  dialogService: DialogService,\n  config: DialogConfig<DeleteOrganizationDialogParams>,\n) {\n  return dialogService.open<DeleteOrganizationDialogResult, DeleteOrganizationDialogParams>(\n    DeleteOrganizationDialogComponent,\n    config,\n  );\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog [loading]=\"!loaded\">\n    <span bitDialogTitle>{{ \"deleteOrganization\" | i18n }}</span>\n    <div bitDialogContent>\n      <bit-callout type=\"warning\">\n        {{ \"deletingOrganizationIsPermanentWarning\" | i18n: organization?.name }}\n      </bit-callout>\n      <p id=\"organizationDeleteDescription\">\n        <ng-container\n          *ngIf=\"\n            deleteOrganizationRequestType === 'InvalidFamiliesForEnterprise';\n            else regularDelete\n          \"\n        >\n          {{ \"orgCreatedSponsorshipInvalid\" | i18n }}\n        </ng-container>\n        <ng-template #regularDelete>\n          <ng-container *ngIf=\"organizationContentSummary.totalItemCount > 0\">\n            {{ \"deletingOrganizationContentWarning\" | i18n: organization?.name }}\n            <ul>\n              <li *ngFor=\"let type of organizationContentSummary.itemCountByType\">\n                {{ type.count }} {{ type.localizationKey | i18n }}\n              </li>\n            </ul>\n            {{ \"deletingOrganizationActiveUserAccountsWarning\" | i18n }}\n          </ng-container>\n        </ng-template>\n      </p>\n      <app-user-verification formControlName=\"secret\"> </app-user-verification>\n    </div>\n    <div bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"danger\" [disabled]=\"!loaded\">\n        {{ \"deleteOrganization\" | i18n }}\n      </button>\n      <button type=\"button\" bitButton bitFormButton buttonType=\"secondary\" bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n    </div>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AbstractControl, FormArray } from \"@angular/forms\";\n\nexport type SelectionItemId = {\n  id: string;\n};\n\nfunction findSortedIndex<T>(sortedArray: T[], val: T, compareFn: (a: T, b: T) => number) {\n  let low = 0;\n  let high = sortedArray.length || 0;\n  let mid = -1,\n    c = 0;\n  while (low < high) {\n    mid = Math.floor((low + high) / 2);\n    c = compareFn(sortedArray[mid], val);\n    if (c < 0) {\n      low = mid + 1;\n    } else if (c > 0) {\n      high = mid;\n    } else {\n      return mid;\n    }\n  }\n  return low;\n}\n\n/**\n * Utility to help manage a list of selectable items for use with Reactive Angular forms and FormArrays.\n *\n * It supports selecting/deselecting items, keeping items sorted, and synchronizing the selected items\n * with an array of FormControl.\n *\n * The first type parameter TItem represents the item being selected/deselected, it must have an `id`\n * property for identification/comparison. The second type parameter TControlValue represents the value\n * type of the form control.\n */\nexport class FormSelectionList<\n  TItem extends SelectionItemId,\n  TControlValue extends SelectionItemId,\n> {\n  allItems: TItem[] = [];\n  /**\n   * Sorted list of selected items\n   * Immutable and should be recreated whenever a modification is made\n   */\n  selectedItems: TItem[] = [];\n\n  /**\n   * Sorted list of deselected items\n   * Immutable and should be recreated whenever a modification is made\n   */\n  deselectedItems: TItem[] = [];\n\n  /**\n   * Sorted FormArray that corresponds and stays in sync with the selectedItems\n   */\n  formArray: FormArray<AbstractControl<Partial<TControlValue>, TControlValue>> = new FormArray([]);\n\n  /**\n   * Construct a new FormSelectionList\n   * @param controlFactory - Factory responsible for creating initial form controls for each selected item. It is\n   * provided a copy of the selected item for any form control initialization logic. Specify any additional form\n   * control options or validators here.\n   * @param compareFn - Comparison function used for sorting the items.\n   */\n  constructor(\n    private controlFactory: (item: TItem) => AbstractControl<Partial<TControlValue>, TControlValue>,\n    private compareFn: (a: TItem, b: TItem) => number,\n  ) {}\n\n  /**\n   * Select multiple items by their ids at once. Optionally provide an initial form control value.\n   * @param ids - List of ids to select\n   * @param initialValue - Value that will be applied to the corresponding form controls\n   * The provided `id` arguments will be automatically assigned to each form control value\n   */\n  selectItems(ids: string[], initialValue?: Partial<TControlValue> | undefined) {\n    for (const id of ids) {\n      this.selectItem(id, initialValue);\n    }\n  }\n\n  /**\n   * Deselect multiple items by their ids at once\n   * @param ids - List of ids to deselect\n   */\n  deselectItems(ids: string[]) {\n    for (const id of ids) {\n      this.deselectItem(id);\n    }\n  }\n\n  deselectAll() {\n    this.formArray.clear();\n    this.selectedItems = [];\n    this.deselectedItems = [...this.allItems];\n  }\n\n  /**\n   * Select a single item by id.\n   *\n   * Maintains list order for both selected items, deselected items, and the FormArray.\n   *\n   * @param id - Id of the item to select\n   * @param initialValue - Value that will be applied to the corresponding form control for the selected item.\n   * The provided `id` argument will be automatically assigned unless explicitly set in the initialValue.\n   */\n  selectItem(id: string, initialValue?: Partial<TControlValue>) {\n    const index = this.deselectedItems.findIndex((o) => o.id === id);\n\n    if (index === -1) {\n      return;\n    }\n\n    const selectedOption = this.deselectedItems[index];\n\n    // Note: Changes to the deselected/selected arrays must create a new copy of the array\n    // in order for Angular's Change Detection to pick up the modification (i.e. treat the arrays as immutable)\n\n    // Remove from the list of deselected options\n    this.deselectedItems = [\n      ...this.deselectedItems.slice(0, index),\n      ...this.deselectedItems.slice(index + 1),\n    ];\n\n    // Insert into the sorted selected options list\n    const sortedInsertIndex = findSortedIndex(this.selectedItems, selectedOption, this.compareFn);\n\n    this.selectedItems = [\n      ...this.selectedItems.slice(0, sortedInsertIndex),\n      selectedOption,\n      ...this.selectedItems.slice(sortedInsertIndex),\n    ];\n\n    const newControl = this.controlFactory(selectedOption);\n\n    // Patch the value and ensure the `id` is set\n    newControl.patchValue({\n      id,\n      ...initialValue,\n    });\n\n    this.formArray.insert(sortedInsertIndex, newControl);\n  }\n\n  /**\n   * Deselect a single item by id.\n   *\n   * Maintains list order for both selected items, deselected items, and the FormArray.\n   *\n   * @param id - Id of the item to deselect\n   */\n  deselectItem(id: string) {\n    const index = this.selectedItems.findIndex((o) => o.id === id);\n\n    if (index === -1) {\n      return;\n    }\n\n    const deselectedOption = this.selectedItems[index];\n\n    // Note: Changes to the deselected/selected arrays must create a new copy of the array\n    // in order for Angular's Change Detection to pick up the modification (i.e. treat the arrays as immutable)\n\n    // Remove from the list of selected items (and FormArray)\n    this.selectedItems = [\n      ...this.selectedItems.slice(0, index),\n      ...this.selectedItems.slice(index + 1),\n    ];\n    this.formArray.removeAt(index);\n\n    // Insert into the sorted deselected array\n    const sortedInsertIndex = findSortedIndex(\n      this.deselectedItems,\n      deselectedOption,\n      this.compareFn,\n    );\n\n    this.deselectedItems = [\n      ...this.deselectedItems.slice(0, sortedInsertIndex),\n      deselectedOption,\n      ...this.deselectedItems.slice(sortedInsertIndex),\n    ];\n  }\n\n  /**\n   * Populate the list of deselected items, and optional specify which items should be selected and with what initial\n   * value for their Form Control\n   * @param items - A list of all items. (Will be sorted internally)\n   * @param selectedItems - The items to select initially\n   */\n  populateItems(items: TItem[], selectedItems: TControlValue[] = []) {\n    this.formArray.clear();\n    this.allItems = [...items].sort(this.compareFn);\n    this.selectedItems = [];\n    this.deselectedItems = [...this.allItems];\n\n    for (const selectedItem of selectedItems) {\n      this.selectItem(selectedItem.id, selectedItem);\n    }\n  }\n\n  /**\n   * Helper method to iterate over each \"selected\" form control and its corresponding item\n   * @param fn - The function to call for each form control and its corresponding item\n   */\n  forEachControlItem(\n    fn: (control: AbstractControl<Partial<TControlValue>, TControlValue>, value: TItem) => void,\n  ) {\n    for (let i = 0; i < this.formArray.length; i++) {\n      // The selectedItems array and formArray are explicitly kept in sync,\n      // so we can safely assume the index of the form control and item are the same\n      fn(this.formArray.at(i), this.selectedItems[i]);\n    }\n  }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n  name: \"userType\",\n})\nexport class UserTypePipe implements PipeTransform {\n  constructor(private i18nService: I18nService) {}\n\n  transform(value?: OrganizationUserType, unknownText?: string): string {\n    if (value == null) {\n      return unknownText ?? this.i18nService.t(\"unknown\");\n    }\n    switch (value) {\n      case OrganizationUserType.Owner:\n        return this.i18nService.t(\"owner\");\n      case OrganizationUserType.Admin:\n        return this.i18nService.t(\"admin\");\n      case OrganizationUserType.User:\n        return this.i18nService.t(\"user\");\n      case OrganizationUserType.Custom:\n        return this.i18nService.t(\"custom\");\n    }\n  }\n}\n","<!-- Please remove this disable statement when editing this file! -->\n<!-- eslint-disable tailwindcss/no-custom-classname -->\n<div class=\"tw-flex\" *ngIf=\"!hideMultiSelect\">\n  <bit-form-field *ngIf=\"permissionMode == 'edit'\" class=\"tw-mr-3 tw-shrink-0\">\n    <bit-label>{{ \"permission\" | i18n }}</bit-label>\n    <select\n      bitInput\n      [disabled]=\"disabled\"\n      [(ngModel)]=\"initialPermission\"\n      [ngModelOptions]=\"{ standalone: true }\"\n      (blur)=\"handleBlur()\"\n    >\n      <option *ngFor=\"let p of permissionList\" [value]=\"p.perm\">\n        {{ p.labelId | i18n }}\n      </option>\n    </select>\n  </bit-form-field>\n\n  <bit-form-field class=\"tw-grow\" *ngIf=\"!disabled\">\n    <bit-label>{{ selectorLabelText }}</bit-label>\n    <bit-multi-select\n      class=\"tw-w-full\"\n      [baseItems]=\"selectionList.deselectedItems\"\n      [removeSelectedItems]=\"true\"\n      [disabled]=\"disabled\"\n      (onItemsConfirmed)=\"selectItems($event)\"\n      (blur)=\"handleBlur()\"\n    ></bit-multi-select>\n    <bit-hint *ngIf=\"selectorHelpText\">{{ selectorHelpText }}</bit-hint>\n  </bit-form-field>\n</div>\n\n<bit-table [formGroup]=\"formGroup\">\n  <ng-container header>\n    <tr>\n      <th bitCell>{{ columnHeader }}</th>\n      <th bitCell id=\"permissionColHeading\" *ngIf=\"permissionMode != 'hidden'\">\n        <div class=\"tw-border tw-border-solid tw-border-transparent\">\n          {{ \"permission\" | i18n }}\n        </div>\n      </th>\n      <th bitCell id=\"roleColHeading\" *ngIf=\"showMemberRoles\">{{ \"role\" | i18n }}</th>\n      <th bitCell id=\"groupColHeading\" *ngIf=\"showGroupColumn\">{{ \"group\" | i18n }}</th>\n      <th bitCell class=\"tw-w-20\"></th>\n    </tr>\n  </ng-container>\n  <ng-template body formArrayName=\"items\">\n    <tr\n      bitRow\n      *ngFor=\"let item of selectionList.selectedItems; let i = index\"\n      [formGroupName]=\"i\"\n      [ngClass]=\"{ 'tw-text-muted': item.readonly }\"\n    >\n      <td bitCell [ngSwitch]=\"item.type\">\n        <div class=\"tw-flex tw-items-center\" *ngSwitchCase=\"itemType.Member\">\n          <bit-avatar size=\"small\" class=\"tw-mr-3\" text=\"{{ item.labelName }}\"></bit-avatar>\n          <div class=\"tw-flex tw-flex-col\">\n            <div>\n              {{ item.labelName }}\n              <span *ngIf=\"$any(item).status == 0\" bitBadge variant=\"secondary\">\n                {{ \"invited\" | i18n }}\n              </span>\n            </div>\n            <div class=\"tw-text-xs tw-text-muted\" *ngIf=\"$any(item).status != 0\">\n              {{ $any(item).email }}\n            </div>\n          </div>\n        </div>\n\n        <div class=\"tw-flex tw-items-center\" *ngSwitchDefault>\n          <i\n            class=\"bwi tw-mr-3 tw-px-0.5 tw-text-2xl\"\n            [ngClass]=\"item.icon || itemIcon(item)\"\n            aria-hidden=\"true\"\n          ></i>\n          <span>{{ item.labelName }}</span>\n        </div>\n      </td>\n\n      <td bitCell *ngIf=\"permissionMode != 'hidden'\">\n        <ng-container *ngIf=\"canEditItemPermission(item); else readOnlyPerm\">\n          <label class=\"tw-sr-only\" [for]=\"'permission' + i\"\n            >{{ item.labelName }} {{ \"permission\" | i18n }}</label\n          >\n          <div class=\"tw-relative tw-inline-block\">\n            <select\n              bitInput\n              class=\"tw-apperance-none -tw-ml-3 tw-max-w-40 tw-appearance-none tw-overflow-ellipsis !tw-rounded tw-border-transparent !tw-bg-transparent tw-pr-6 tw-font-bold hover:tw-border-primary-700\"\n              formControlName=\"permission\"\n              [id]=\"'permission' + i\"\n              (blur)=\"handleBlur()\"\n            >\n              <option *ngFor=\"let p of permissionList\" [value]=\"p.perm\">\n                {{ p.labelId | i18n }}\n              </option>\n            </select>\n            <label\n              [for]=\"'permission' + i\"\n              class=\"tw-absolute tw-inset-y-0 tw-right-4 tw-mb-0 tw-flex tw-items-center\"\n            >\n              <i class=\"bwi bwi-sm bwi-angle-down tw-leading-[0]\"></i>\n            </label>\n          </div>\n        </ng-container>\n\n        <ng-template #readOnlyPerm>\n          <div\n            *ngIf=\"item.readonly || disabled\"\n            class=\"tw-max-w-40 tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap tw-font-bold tw-text-muted\"\n            [title]=\"permissionLabelId(item.readonlyPermission) | i18n\"\n          >\n            {{ permissionLabelId(item.readonlyPermission) | i18n }}\n          </div>\n        </ng-template>\n      </td>\n\n      <td bitCell *ngIf=\"showMemberRoles\">\n        {{ $any(item).role | userType: \"-\" }}\n      </td>\n\n      <td bitCell *ngIf=\"showGroupColumn\">\n        {{ $any(item).viaGroupName ?? \"-\" }}\n      </td>\n\n      <td bitCell class=\"tw-text-right\">\n        <button\n          *ngIf=\"!disabled && !item.readonly\"\n          type=\"button\"\n          bitIconButton=\"bwi-close\"\n          buttonType=\"muted\"\n          appA11yTitle=\"{{ 'remove' | i18n }} {{ item.labelName }}\"\n          [disabled]=\"disabled\"\n          (click)=\"selectionList.deselectItem(item.id); handleBlur()\"\n        ></button>\n      </td>\n    </tr>\n    <tr *ngIf=\"selectionList.selectedItems.length == 0\">\n      <td bitCell>{{ emptySelectionText }}</td>\n    </tr>\n  </ng-template>\n</bit-table>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, forwardRef, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n  ControlValueAccessor,\n  FormBuilder,\n  FormControl,\n  FormGroup,\n  NG_VALUE_ACCESSOR,\n} from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { FormSelectionList } from \"@bitwarden/angular/utils/form-selection-list\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SelectItemView } from \"@bitwarden/components/src/multi-select/models/select-item-view\";\n\nimport {\n  AccessItemType,\n  AccessItemValue,\n  AccessItemView,\n  CollectionPermission,\n  getPermissionList,\n  Permission,\n} from \"./access-selector.models\";\n\nexport enum PermissionMode {\n  /**\n   * No permission controls or column present. No permission values are emitted.\n   */\n  Hidden = \"hidden\",\n\n  /**\n   * No permission controls. Column rendered an if available on an item. No permission values are emitted\n   */\n  Readonly = \"readonly\",\n\n  /**\n   * Permission Controls and column present. Permission values are emitted.\n   */\n  Edit = \"edit\",\n}\n\n@Component({\n  selector: \"bit-access-selector\",\n  templateUrl: \"access-selector.component.html\",\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => AccessSelectorComponent),\n      multi: true,\n    },\n  ],\n})\nexport class AccessSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n  private notifyOnChange: (v: unknown) => void;\n  private notifyOnTouch: () => void;\n  private pauseChangeNotification: boolean;\n\n  /**\n   * Updates the enabled/disabled state of provided row form group based on the item's readonly state.\n   * If a row is enabled, it also updates the enabled/disabled state of the permission control\n   * based on the current value of `permissionMode`.\n   * @param controlRow - The form group for the row to update\n   * @param item - The access item that is represented by the row\n   */\n  private updateRowControlDisableState = (\n    controlRow: FormGroup<ControlsOf<AccessItemValue>>,\n    item: AccessItemView,\n  ) => {\n    // Disable entire row form group if readonly\n    if (item.readonly) {\n      controlRow.disable();\n    } else {\n      controlRow.enable();\n\n      // The enable() above also enables the permission control, so we need to disable it again\n      // Disable permission control if not in Edit mode\n      if (this.permissionMode != PermissionMode.Edit) {\n        controlRow.controls.permission.disable();\n      }\n    }\n  };\n\n  /**\n   * Updates the enabled/disabled state of ALL row form groups based on each item's readonly state.\n   */\n  private updateAllRowControlDisableStates = () => {\n    this.selectionList.forEachControlItem((controlRow, item) => {\n      this.updateRowControlDisableState(controlRow as FormGroup<ControlsOf<AccessItemValue>>, item);\n    });\n  };\n\n  /**\n   * The internal selection list that tracks the value of this form control / component.\n   * It's responsible for keeping items sorted and synced with the rendered form controls\n   * @protected\n   */\n  protected selectionList = new FormSelectionList<AccessItemView, AccessItemValue>((item) => {\n    const permissionControl = this.formBuilder.control(this.initialPermission);\n\n    const fg = this.formBuilder.group<ControlsOf<AccessItemValue>>({\n      id: new FormControl(item.id),\n      type: new FormControl(item.type),\n      permission: permissionControl,\n    });\n\n    this.updateRowControlDisableState(fg, item);\n\n    return fg;\n  }, this._itemComparator.bind(this));\n\n  /**\n   * Internal form group for this component.\n   * @protected\n   */\n  protected formGroup = this.formBuilder.group({\n    items: this.selectionList.formArray,\n  });\n\n  protected itemType = AccessItemType;\n  protected permissionList: Permission[];\n  protected initialPermission = CollectionPermission.View;\n\n  /**\n   * When disabled, the access selector will make the assumption that a readonly state is desired.\n   * The PermissionMode will be set to Readonly\n   * The Multi-Select control will be hidden\n   * The delete action on each row item will be hidden\n   * The readonly permission label/property needs to configured on the access item views being passed into the component\n   */\n  disabled: boolean;\n\n  /**\n   * List of all selectable items that. Sorted internally.\n   */\n  @Input()\n  get items(): AccessItemView[] {\n    return this.selectionList.allItems;\n  }\n\n  set items(val: AccessItemView[]) {\n    const selected = (this.selectionList.formArray.getRawValue() ?? []).concat(\n      val.filter((m) => m.readonly),\n    );\n    this.selectionList.populateItems(\n      val.map((m) => {\n        m.icon = m.icon ?? this.itemIcon(m); // Ensure an icon is set\n        return m;\n      }),\n      selected,\n    );\n  }\n\n  /**\n   * Permission mode that controls if the permission form controls and column should be present.\n   */\n  @Input()\n  get permissionMode(): PermissionMode {\n    return this._permissionMode;\n  }\n\n  set permissionMode(value: PermissionMode) {\n    this._permissionMode = value;\n    // Update any internal permission controls\n    this.updateAllRowControlDisableStates();\n  }\n  private _permissionMode: PermissionMode = PermissionMode.Hidden;\n\n  /**\n   * Column header for the selected items table\n   */\n  @Input() columnHeader: string;\n\n  /**\n   * Label used for the ng selector\n   */\n  @Input() selectorLabelText: string;\n\n  /**\n   * Helper text displayed under the ng selector\n   */\n  @Input() selectorHelpText: string;\n\n  /**\n   * Text that is shown in the table when no items are selected\n   */\n  @Input() emptySelectionText: string;\n\n  /**\n   * Flag for if the member roles column should be present\n   */\n  @Input() showMemberRoles: boolean;\n\n  /**\n   * Flag for if the group column should be present\n   */\n  @Input() showGroupColumn: boolean;\n\n  /**\n   * Hide the multi-select so that new items cannot be added\n   */\n  @Input() hideMultiSelect = false;\n\n  constructor(\n    private readonly formBuilder: FormBuilder,\n    private readonly i18nService: I18nService,\n  ) {}\n\n  /** Required for NG_VALUE_ACCESSOR */\n  registerOnChange(fn: any): void {\n    this.notifyOnChange = fn;\n  }\n\n  /** Required for NG_VALUE_ACCESSOR */\n  registerOnTouched(fn: any): void {\n    this.notifyOnTouch = fn;\n  }\n\n  /** Required for NG_VALUE_ACCESSOR */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n\n    // Keep the internal FormGroup in sync\n    if (this.disabled) {\n      this.permissionMode = PermissionMode.Readonly;\n      this.formGroup.disable();\n    } else {\n      this.formGroup.enable();\n\n      // The enable() above automatically enables all the row controls,\n      // so we need to disable the readonly ones again\n      this.updateAllRowControlDisableStates();\n    }\n  }\n\n  /** Required for NG_VALUE_ACCESSOR */\n  writeValue(selectedItems: AccessItemValue[]): void {\n    // Modifying the selection list, mistakenly fires valueChanges in the\n    // internal form array, so we need to know to pause external notification\n    this.pauseChangeNotification = true;\n\n    // Always clear the internal selection list on a new value\n    this.selectionList.deselectAll();\n\n    // We need to also select any read only items to appear in the table\n    this.selectionList.selectItems(this.items.filter((m) => m.readonly).map((m) => m.id));\n\n    // If the new value is null, then we're done\n    if (selectedItems == null) {\n      this.pauseChangeNotification = false;\n      return;\n    }\n\n    // Unable to handle other value types, throw\n    if (!Array.isArray(selectedItems)) {\n      throw new Error(\"The access selector component only supports Array form values!\");\n    }\n\n    // Iterate and internally select each item\n    for (const value of selectedItems) {\n      this.selectionList.selectItem(value.id, value);\n    }\n\n    this.pauseChangeNotification = false;\n  }\n\n  async ngOnInit() {\n    this.permissionList = getPermissionList();\n    // Watch the internal formArray for changes and propagate them\n    this.selectionList.formArray.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((v) => {\n      if (!this.notifyOnChange || this.pauseChangeNotification) {\n        return;\n      }\n      // Disabled form arrays emit values for disabled controls, we override this to emit an empty array to avoid\n      // emitting values for disabled controls that are \"readonly\" in the table\n      if (this.selectionList.formArray.disabled) {\n        this.notifyOnChange([]);\n        return;\n      }\n      this.notifyOnChange(v);\n    });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  protected handleBlur() {\n    if (!this.notifyOnTouch) {\n      return;\n    }\n\n    this.notifyOnTouch();\n  }\n\n  protected selectItems(items: SelectItemView[]) {\n    this.pauseChangeNotification = true;\n    this.selectionList.selectItems(items.map((i) => i.id));\n    this.pauseChangeNotification = false;\n    if (this.notifyOnChange != undefined) {\n      this.notifyOnChange(this.selectionList.formArray.value);\n    }\n  }\n\n  protected itemIcon(item: AccessItemView) {\n    switch (item.type) {\n      case AccessItemType.Collection:\n        return \"bwi-collection\";\n      case AccessItemType.Group:\n        return \"bwi-users\";\n      case AccessItemType.Member:\n        return \"bwi-user\";\n    }\n  }\n\n  protected permissionLabelId(perm: CollectionPermission) {\n    return this.permissionList.find((p) => p.perm == perm)?.labelId;\n  }\n\n  protected canEditItemPermission(item: AccessItemView) {\n    return this.permissionMode == PermissionMode.Edit && !item.readonly;\n  }\n\n  private _itemComparator(a: AccessItemView, b: AccessItemView) {\n    return (\n      a.type - b.type ||\n      this.i18nService.collator.compare(a.listName, b.listName) ||\n      this.i18nService.collator.compare(a.labelName, b.labelName) ||\n      Number(b.readonly) - Number(a.readonly)\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  CollectionAccessSelectionView,\n  OrganizationUserUserDetailsResponse,\n} from \"@bitwarden/admin-console/common\";\nimport {\n  OrganizationUserStatusType,\n  OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { SelectItemView } from \"@bitwarden/components\";\n\nimport { GroupView } from \"../../../core\";\n\n/**\n * Permission options that replace/correspond with manage, readOnly, and hidePassword server fields.\n */\nexport enum CollectionPermission {\n  View = \"view\",\n  ViewExceptPass = \"viewExceptPass\",\n  Edit = \"edit\",\n  EditExceptPass = \"editExceptPass\",\n  Manage = \"manage\",\n}\n\nexport enum AccessItemType {\n  Collection,\n  Group,\n  Member,\n}\n\n/**\n * A \"generic\" type that describes an item that can be selected from a\n * ng-select list and have its collection permission modified.\n *\n * Currently, it supports Collections, Groups, and Members. Members require some additional\n * details to render in the AccessSelectorComponent so their type is defined separately\n * and then joined back with the base type.\n *\n */\nexport type AccessItemView = SelectItemView & {\n  /**\n   * Flag that this item cannot be modified.\n   * This will disable the permission editor and will keep\n   * the item always selected.\n   */\n  readonly?: boolean;\n\n  /**\n   * Optional permission that will be rendered for this\n   * item if it set to readonly.\n   */\n  readonlyPermission?: CollectionPermission;\n} & (\n    | {\n        type: AccessItemType.Collection;\n        viaGroupName?: string;\n      }\n    | {\n        type: AccessItemType.Group;\n      }\n    | {\n        type: AccessItemType.Member; // Members have a few extra details required to display, so they're added here\n        email: string;\n        role: OrganizationUserType;\n        status: OrganizationUserStatusType;\n      }\n  );\n\n/**\n * A type that is emitted as a value for the ngControl\n */\nexport type AccessItemValue = {\n  id: string;\n  permission?: CollectionPermission;\n  type: AccessItemType;\n};\n\nexport type Permission = {\n  perm: CollectionPermission;\n  labelId: string;\n};\n\nexport const getPermissionList = (): Permission[] => {\n  const permissions = [\n    { perm: CollectionPermission.View, labelId: \"canView\" },\n    { perm: CollectionPermission.ViewExceptPass, labelId: \"canViewExceptPass\" },\n    { perm: CollectionPermission.Edit, labelId: \"canEdit\" },\n    { perm: CollectionPermission.EditExceptPass, labelId: \"canEditExceptPass\" },\n    { perm: CollectionPermission.Manage, labelId: \"canManage\" },\n  ];\n\n  return permissions;\n};\n\n/**\n * Converts the CollectionAccessSelectionView interface to one of the new CollectionPermission values\n * for the dropdown in the AccessSelectorComponent\n * @param value\n */\nexport const convertToPermission = (\n  value: CollectionAccessSelectionView | undefined,\n): CollectionPermission | undefined => {\n  if (value == null) {\n    return undefined;\n  }\n  if (value.manage) {\n    return CollectionPermission.Manage;\n  } else if (value.readOnly) {\n    return value.hidePasswords ? CollectionPermission.ViewExceptPass : CollectionPermission.View;\n  } else {\n    return value.hidePasswords ? CollectionPermission.EditExceptPass : CollectionPermission.Edit;\n  }\n};\n\n/**\n * Converts an AccessItemValue back into a CollectionAccessView class using the CollectionPermission\n * to determine the values for `manage`, `readOnly`, and `hidePassword`\n * @param value\n */\nexport const convertToSelectionView = (value: AccessItemValue) => {\n  return new CollectionAccessSelectionView({\n    id: value.id,\n    readOnly: readOnly(value.permission),\n    hidePasswords: hidePassword(value.permission),\n    manage: value.permission === CollectionPermission.Manage,\n  });\n};\n\nconst readOnly = (perm: CollectionPermission) =>\n  [CollectionPermission.View, CollectionPermission.ViewExceptPass].includes(perm);\n\nconst hidePassword = (perm: CollectionPermission) =>\n  [CollectionPermission.ViewExceptPass, CollectionPermission.EditExceptPass].includes(perm);\n\nexport function mapGroupToAccessItemView(group: GroupView): AccessItemView {\n  return {\n    id: group.id,\n    type: AccessItemType.Group,\n    listName: group.name,\n    labelName: group.name,\n  };\n}\n\n// TODO: Use view when user apis are migrated to a service\nexport function mapUserToAccessItemView(user: OrganizationUserUserDetailsResponse): AccessItemView {\n  return {\n    id: user.id,\n    type: AccessItemType.Member,\n    email: user.email,\n    role: user.type,\n    listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,\n    labelName: user.name ?? user.email,\n    status: user.status,\n  };\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../../../shared\";\n\nimport { AccessSelectorComponent } from \"./access-selector.component\";\nimport { UserTypePipe } from \"./user-type.pipe\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [AccessSelectorComponent, UserTypePipe],\n  exports: [AccessSelectorComponent],\n})\nexport class AccessSelectorModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  DefaultLoginComponentService,\n  LoginComponentService,\n  PasswordPolicies,\n} from \"@bitwarden/auth/angular\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { RouterService } from \"../../../../core/router.service\";\nimport { AcceptOrganizationInviteService } from \"../../../organization-invite/accept-organization.service\";\n\n@Injectable()\nexport class WebLoginComponentService\n  extends DefaultLoginComponentService\n  implements LoginComponentService\n{\n  constructor(\n    protected acceptOrganizationInviteService: AcceptOrganizationInviteService,\n    protected logService: LogService,\n    protected policyApiService: PolicyApiServiceAbstraction,\n    protected policyService: InternalPolicyService,\n    protected routerService: RouterService,\n    cryptoFunctionService: CryptoFunctionService,\n    environmentService: EnvironmentService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    platformUtilsService: PlatformUtilsService,\n    ssoLoginService: SsoLoginServiceAbstraction,\n  ) {\n    super(\n      cryptoFunctionService,\n      environmentService,\n      passwordGenerationService,\n      platformUtilsService,\n      ssoLoginService,\n    );\n    this.clientType = this.platformUtilsService.getClientType();\n  }\n\n  async getOrgPolicies(): Promise<PasswordPolicies | null> {\n    const orgInvite = await this.acceptOrganizationInviteService.getOrganizationInvite();\n\n    if (orgInvite != null) {\n      let policies: Policy[];\n\n      try {\n        policies = await this.policyApiService.getPoliciesByToken(\n          orgInvite.organizationId,\n          orgInvite.token,\n          orgInvite.email,\n          orgInvite.organizationUserId,\n        );\n      } catch (e) {\n        this.logService.error(e);\n      }\n\n      if (policies == null) {\n        return;\n      }\n\n      const resetPasswordPolicy = this.policyService.getResetPasswordPolicyOptions(\n        policies,\n        orgInvite.organizationId,\n      );\n\n      const isPolicyAndAutoEnrollEnabled =\n        resetPasswordPolicy[1] && resetPasswordPolicy[0].autoEnrollEnabled;\n\n      const enforcedPasswordPolicyOptions = await firstValueFrom(\n        this.policyService.masterPasswordPolicyOptions$(policies),\n      );\n\n      return {\n        policies,\n        isPolicyAndAutoEnrollEnabled,\n        enforcedPasswordPolicyOptions,\n      };\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  LoginDecryptionOptionsService,\n  DefaultLoginDecryptionOptionsService,\n} from \"@bitwarden/auth/angular\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\nimport { RouterService } from \"../../../../core/router.service\";\nimport { AcceptOrganizationInviteService } from \"../../../organization-invite/accept-organization.service\";\n\nexport class WebLoginDecryptionOptionsService\n  extends DefaultLoginDecryptionOptionsService\n  implements LoginDecryptionOptionsService\n{\n  constructor(\n    protected messagingService: MessagingService,\n    private routerService: RouterService,\n    private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n  ) {\n    super(messagingService);\n  }\n\n  override async handleCreateUserSuccess(): Promise<void> {\n    try {\n      // Invites from TDE orgs go through here, but the invite is\n      // accepted while being enrolled in admin recovery. So we need to clear\n      // the redirect and stored org invite.\n      await this.routerService.getAndClearLoginRedirectUrl();\n      await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n    } catch (error) {\n      throw new Error(error);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { RotateableKeySet } from \"../../../../../auth/src/common/models\";\n\nexport class WebauthnRotateCredentialRequest {\n  id: string;\n  encryptedPublicKey: EncString;\n  encryptedUserKey: EncString;\n\n  constructor(id: string, encryptedPublicKey: EncString, encryptedUserKey: EncString) {\n    this.id = id;\n    this.encryptedPublicKey = encryptedPublicKey;\n    this.encryptedUserKey = encryptedUserKey;\n  }\n\n  static fromRotateableKeyset(\n    id: string,\n    keyset: RotateableKeySet,\n  ): WebauthnRotateCredentialRequest {\n    return new WebauthnRotateCredentialRequest(\n      id,\n      keyset.encryptedPublicKey,\n      keyset.encryptedPrivateKey,\n    );\n  }\n}\n","import { ChallengeResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\n\nexport class CredentialCreateOptionsView {\n  constructor(\n    readonly options: ChallengeResponse,\n    readonly token: string,\n  ) {}\n}\n","import { CredentialCreateOptionsView } from \"./credential-create-options.view\";\n\n/**\n * Represents a WebAuthn credential that has been created by an authenticator but not yet saved to the server.\n */\nexport class PendingWebauthnLoginCredentialView {\n  constructor(\n    readonly createOptions: CredentialCreateOptionsView,\n    readonly deviceResponse: PublicKeyCredential,\n    readonly supportsPrf: boolean,\n  ) {}\n}\n","import { WebauthnLoginCredentialPrfStatus } from \"../enums/webauthn-login-credential-prf-status.enum\";\n\nexport class WebauthnLoginCredentialView {\n  constructor(\n    readonly id: string,\n    readonly name: string,\n    readonly prfStatus: WebauthnLoginCredentialPrfStatus,\n  ) {}\n}\n","import { inject, Injectable } from \"@angular/core\";\n\nimport { RotateableKeySet } from \"@bitwarden/auth/common\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Injectable({ providedIn: \"root\" })\nexport class RotateableKeySetService {\n  private readonly keyService = inject(KeyService);\n  private readonly encryptService = inject(EncryptService);\n\n  /**\n   * Create a new rotateable key set for the current user, using the provided external key.\n   * For more information on rotateable key sets, see {@link RotateableKeySet}\n   *\n   * @param externalKey The `ExternalKey` used to encrypt {@link RotateableKeySet.encryptedPrivateKey}\n   * @returns RotateableKeySet containing the current users `UserKey`\n   */\n  async createKeySet<ExternalKey extends SymmetricCryptoKey>(\n    externalKey: ExternalKey,\n  ): Promise<RotateableKeySet<ExternalKey>> {\n    const [publicKey, encryptedPrivateKey] = await this.keyService.makeKeyPair(externalKey);\n\n    const userKey = await this.keyService.getUserKey();\n    const rawPublicKey = Utils.fromB64ToArray(publicKey);\n    const encryptedUserKey = await this.encryptService.rsaEncrypt(userKey.key, rawPublicKey);\n    const encryptedPublicKey = await this.encryptService.encrypt(rawPublicKey, userKey);\n    return new RotateableKeySet(encryptedUserKey, encryptedPublicKey, encryptedPrivateKey);\n  }\n\n  /**\n   * Rotates the current user's `UserKey` and updates the provided `RotateableKeySet` with the new keys.\n   *\n   * @param keySet The current `RotateableKeySet` for the user\n   * @returns The updated `RotateableKeySet` with the new `UserKey`\n   */\n  async rotateKeySet<ExternalKey extends SymmetricCryptoKey>(\n    keySet: RotateableKeySet<ExternalKey>,\n    oldUserKey: SymmetricCryptoKey,\n    newUserKey: SymmetricCryptoKey,\n  ): Promise<RotateableKeySet<ExternalKey>> {\n    // validate parameters\n    if (!keySet) {\n      throw new Error(\"failed to rotate key set: keySet is required\");\n    }\n    if (!oldUserKey) {\n      throw new Error(\"failed to rotate key set: oldUserKey is required\");\n    }\n    if (!newUserKey) {\n      throw new Error(\"failed to rotate key set: newUserKey is required\");\n    }\n\n    const publicKey = await this.encryptService.decryptToBytes(\n      keySet.encryptedPublicKey,\n      oldUserKey,\n    );\n    const newEncryptedPublicKey = await this.encryptService.encrypt(publicKey, newUserKey);\n    const newEncryptedUserKey = await this.encryptService.rsaEncrypt(newUserKey.key, publicKey);\n\n    const newRotateableKeySet = new RotateableKeySet<ExternalKey>(\n      newEncryptedUserKey,\n      newEncryptedPublicKey,\n      keySet.encryptedPrivateKey,\n    );\n\n    return newRotateableKeySet;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { WebAuthnLoginAssertionResponseRequest } from \"@bitwarden/common/auth/services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\n/**\n * Request sent to the server to save a newly created prf key set for a credential.\n */\nexport class EnableCredentialEncryptionRequest {\n  /**\n   * The response received from the authenticator.\n   */\n  deviceResponse: WebAuthnLoginAssertionResponseRequest;\n\n  /**\n   * An encrypted token containing information the server needs to verify the credential.\n   */\n  token: string;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedUserKey } */\n  encryptedUserKey?: string;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedPublicKey } */\n  encryptedPublicKey?: string;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedPrivateKey } */\n  encryptedPrivateKey?: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { WebauthnLoginAttestationResponseRequest } from \"./webauthn-login-attestation-response.request\";\n\n/**\n * Request sent to the server to save a newly created webauthn login credential.\n */\nexport class SaveCredentialRequest {\n  /**\n   * The response received from the authenticator.\n   * This contains all information needed for future authentication flows.\n   */\n  deviceResponse: WebauthnLoginAttestationResponseRequest;\n\n  /** Nickname chosen by the user to identify this credential */\n  name: string;\n\n  /**\n   * Token required by the server to complete the creation.\n   * It contains encrypted information that the server needs to verify the credential.\n   */\n  token: string;\n\n  /**\n   * True if the credential was created with PRF support.\n   */\n  supportsPrf: boolean;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedUserKey } */\n  encryptedUserKey?: string;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedPublicKey } */\n  encryptedPublicKey?: string;\n\n  /** Used for vault encryption. See {@link RotateableKeySet.encryptedPrivateKey } */\n  encryptedPrivateKey?: string;\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n/**\n * An abstract class that represents responses received from the webauthn authenticator.\n * It contains data that is commonly returned during different types of authenticator interactions.\n */\nexport abstract class WebauthnLoginAuthenticatorResponseRequest {\n  id: string;\n  rawId: string;\n  type: string;\n  extensions: Record<string, unknown>;\n\n  constructor(credential: PublicKeyCredential) {\n    this.id = credential.id;\n    this.rawId = Utils.fromBufferToB64(credential.rawId);\n    this.type = credential.type;\n    this.extensions = {}; // Extensions are handled client-side\n  }\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { WebauthnLoginAuthenticatorResponseRequest } from \"./webauthn-login-authenticator-response.request\";\n\n/**\n * The response received from an authenticator after a successful attestation.\n * This request is used to save newly created webauthn login credentials to the server.\n */\nexport class WebauthnLoginAttestationResponseRequest extends WebauthnLoginAuthenticatorResponseRequest {\n  response: {\n    attestationObject: string;\n    clientDataJson: string;\n  };\n\n  constructor(credential: PublicKeyCredential) {\n    super(credential);\n\n    if (!(credential.response instanceof AuthenticatorAttestationResponse)) {\n      throw new Error(\"Invalid authenticator response\");\n    }\n\n    this.response = {\n      attestationObject: Utils.fromBufferToUrlB64(credential.response.attestationObject),\n      clientDataJson: Utils.fromBufferToUrlB64(credential.response.clientDataJSON),\n    };\n  }\n}\n","import { ChallengeResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\n/**\n * Options provided by the server to be used during attestation (i.e. creation of a new webauthn credential)\n */\nexport class WebauthnLoginCredentialCreateOptionsResponse extends BaseResponse {\n  /** Options to be provided to the webauthn authenticator */\n  options: ChallengeResponse;\n\n  /**\n   * Contains an encrypted version of the {@link options}.\n   * Used by the server to validate the attestation response of newly created credentials.\n   */\n  token: string;\n\n  constructor(response: unknown) {\n    super(response);\n    this.options = new ChallengeResponse(this.getResponseProperty(\"options\"));\n    this.token = this.getResponseProperty(\"token\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { RotateableKeySet } from \"@bitwarden/auth/common\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { WebauthnLoginCredentialPrfStatus } from \"../../../enums/webauthn-login-credential-prf-status.enum\";\n\n/**\n * A webauthn login credential received from the server.\n */\nexport class WebauthnLoginCredentialResponse extends BaseResponse {\n  id: string;\n  name: string;\n  prfStatus: WebauthnLoginCredentialPrfStatus;\n  encryptedPublicKey?: string;\n  encryptedUserKey?: string;\n\n  constructor(response: unknown) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.prfStatus = this.getResponseProperty(\"PrfStatus\");\n    this.encryptedPublicKey = this.getResponseProperty(\"EncryptedPublicKey\");\n    this.encryptedUserKey = this.getResponseProperty(\"EncryptedUserKey\");\n  }\n\n  getRotateableKeyset(): RotateableKeySet {\n    if (!EncString.isSerializedEncString(this.encryptedUserKey)) {\n      throw new Error(\"Invalid encrypted user key\");\n    }\n    if (!EncString.isSerializedEncString(this.encryptedPublicKey)) {\n      throw new Error(\"Invalid encrypted public key\");\n    }\n\n    return new RotateableKeySet(\n      new EncString(this.encryptedUserKey),\n      new EncString(this.encryptedPublicKey),\n    );\n  }\n\n  hasPrfKeyset(): boolean {\n    return this.encryptedUserKey != null && this.encryptedPublicKey != null;\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { CredentialAssertionOptionsResponse } from \"@bitwarden/common/auth/services/webauthn-login/response/credential-assertion-options.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { EnableCredentialEncryptionRequest } from \"./request/enable-credential-encryption.request\";\nimport { SaveCredentialRequest } from \"./request/save-credential.request\";\nimport { WebauthnLoginCredentialCreateOptionsResponse } from \"./response/webauthn-login-credential-create-options.response\";\nimport { WebauthnLoginCredentialResponse } from \"./response/webauthn-login-credential.response\";\n\n@Injectable({ providedIn: \"root\" })\nexport class WebAuthnLoginAdminApiService {\n  constructor(private apiService: ApiService) {}\n\n  async getCredentialCreateOptions(\n    request: SecretVerificationRequest,\n  ): Promise<WebauthnLoginCredentialCreateOptionsResponse> {\n    const response = await this.apiService.send(\n      \"POST\",\n      \"/webauthn/attestation-options\",\n      request,\n      true,\n      true,\n    );\n    return new WebauthnLoginCredentialCreateOptionsResponse(response);\n  }\n\n  async getCredentialAssertionOptions(\n    request: SecretVerificationRequest,\n  ): Promise<CredentialAssertionOptionsResponse> {\n    const response = await this.apiService.send(\n      \"POST\",\n      \"/webauthn/assertion-options\",\n      request,\n      true,\n      true,\n    );\n    return new CredentialAssertionOptionsResponse(response);\n  }\n\n  async saveCredential(request: SaveCredentialRequest): Promise<boolean> {\n    await this.apiService.send(\"POST\", \"/webauthn\", request, true, true);\n    return true;\n  }\n\n  async getCredentials(): Promise<ListResponse<WebauthnLoginCredentialResponse>> {\n    const response = await this.apiService.send(\"GET\", \"/webauthn\", null, true, true);\n    return new ListResponse<WebauthnLoginCredentialResponse>(\n      response,\n      WebauthnLoginCredentialResponse,\n    );\n  }\n\n  async deleteCredential(credentialId: string, request: SecretVerificationRequest): Promise<void> {\n    await this.apiService.send(\"POST\", `/webauthn/${credentialId}/delete`, request, true, true);\n  }\n\n  async updateCredential(request: EnableCredentialEncryptionRequest): Promise<void> {\n    await this.apiService.send(\"PUT\", `/webauthn`, request, true, true);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable, Optional } from \"@angular/core\";\nimport { BehaviorSubject, filter, from, map, Observable, shareReplay, switchMap, tap } from \"rxjs\";\n\nimport { PrfKeySet } from \"@bitwarden/auth/common\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { WebAuthnLoginPrfKeyServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-prf-key.service.abstraction\";\nimport { WebauthnRotateCredentialRequest } from \"@bitwarden/common/auth/models/request/webauthn-rotate-credential.request\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { UserKeyRotationDataProvider } from \"@bitwarden/key-management\";\n\nimport { CredentialCreateOptionsView } from \"../../views/credential-create-options.view\";\nimport { PendingWebauthnLoginCredentialView } from \"../../views/pending-webauthn-login-credential.view\";\nimport { WebauthnLoginCredentialView } from \"../../views/webauthn-login-credential.view\";\nimport { RotateableKeySetService } from \"../rotateable-key-set.service\";\n\nimport { EnableCredentialEncryptionRequest } from \"./request/enable-credential-encryption.request\";\nimport { SaveCredentialRequest } from \"./request/save-credential.request\";\nimport { WebauthnLoginAttestationResponseRequest } from \"./request/webauthn-login-attestation-response.request\";\nimport { WebAuthnLoginAdminApiService } from \"./webauthn-login-admin-api.service\";\n\n@Injectable({ providedIn: \"root\" })\n/**\n * Service for managing WebAuthnLogin credentials.\n */\nexport class WebauthnLoginAdminService\n  implements UserKeyRotationDataProvider<WebauthnRotateCredentialRequest>\n{\n  static readonly MaxCredentialCount = 5;\n\n  private navigatorCredentials: CredentialsContainer;\n  private _refresh$ = new BehaviorSubject<void>(undefined);\n  private _loading$ = new BehaviorSubject<boolean>(true);\n  private readonly credentials$ = this._refresh$.pipe(\n    tap(() => this._loading$.next(true)),\n    switchMap(() => this.fetchCredentials$()),\n    tap(() => this._loading$.next(false)),\n    shareReplay({ bufferSize: 1, refCount: true }),\n  );\n\n  /**\n   * An Observable that emits a boolean indicating whether the service is currently fetching\n   * WebAuthnLogin credentials from the server.\n   */\n  readonly loading$ = this._loading$.asObservable();\n\n  constructor(\n    private apiService: WebAuthnLoginAdminApiService,\n    private userVerificationService: UserVerificationService,\n    private rotateableKeySetService: RotateableKeySetService,\n    private webAuthnLoginPrfKeyService: WebAuthnLoginPrfKeyServiceAbstraction,\n    @Optional() navigatorCredentials?: CredentialsContainer,\n    @Optional() private logService?: LogService,\n  ) {\n    // Default parameters don't work when used with Angular DI\n    this.navigatorCredentials = navigatorCredentials ?? navigator.credentials;\n  }\n\n  /**\n   * Get the credential assertion options needed for initiating the WebAuthnLogin credential update process.\n   * The options contains assertion options and other data for the authenticator.\n   * This method requires user verification.\n   *\n   * @param verification User verification data to be used for the request.\n   * @returns The credential assertion options and a token to be used for the credential update request.\n   */\n  async getCredentialAssertOptions(\n    verification: Verification,\n  ): Promise<WebAuthnLoginCredentialAssertionOptionsView> {\n    const request = await this.userVerificationService.buildRequest(verification);\n    const response = await this.apiService.getCredentialAssertionOptions(request);\n    return new WebAuthnLoginCredentialAssertionOptionsView(response.options, response.token);\n  }\n\n  /**\n   * Get the credential attestation options needed for initiating the WebAuthnLogin credential creation process.\n   * The options contains a challenge and other data for the authenticator.\n   * This method requires user verification.\n   *\n   * @param verification User verification data to be used for the request.\n   * @returns The credential attestation options and a token to be used for the credential creation request.\n   */\n\n  async getCredentialAttestationOptions(\n    verification: Verification,\n  ): Promise<CredentialCreateOptionsView> {\n    const request = await this.userVerificationService.buildRequest(verification);\n    const response = await this.apiService.getCredentialCreateOptions(request);\n    return new CredentialCreateOptionsView(response.options, response.token);\n  }\n\n  /**\n   * Create a credential using the given options. This triggers the browsers WebAuthn API to create a credential.\n   *\n   * @param credentialOptions Options received from the server using `getCredentialCreateOptions`.\n   * @returns A pending credential that can be saved to server directly or be used to create a key set.\n   */\n  async createCredential(\n    credentialOptions: CredentialCreateOptionsView,\n  ): Promise<PendingWebauthnLoginCredentialView | undefined> {\n    const nativeOptions: CredentialCreationOptions = {\n      publicKey: credentialOptions.options,\n    };\n    // TODO: Remove `any` when typescript typings add support for PRF\n    nativeOptions.publicKey.extensions = {\n      prf: {},\n    } as any;\n\n    try {\n      const response = await this.navigatorCredentials.create(nativeOptions);\n      if (!(response instanceof PublicKeyCredential)) {\n        return undefined;\n      }\n      // TODO: Remove `any` when typescript typings add support for PRF\n      const supportsPrf = Boolean((response.getClientExtensionResults() as any).prf?.enabled);\n      return new PendingWebauthnLoginCredentialView(credentialOptions, response, supportsPrf);\n    } catch (error) {\n      this.logService?.error(error);\n      return undefined;\n    }\n  }\n\n  /**\n   * Create a key set from the given pending credential. The credential must support PRF.\n   * This will trigger the browsers WebAuthn API to generate a PRF-output.\n   *\n   * @param pendingCredential A credential created using `createCredential`.\n   * @returns A key set that can be saved to the server. Undefined is returned if the credential doesn't support PRF.\n   */\n  async createKeySet(\n    pendingCredential: PendingWebauthnLoginCredentialView,\n  ): Promise<PrfKeySet | undefined> {\n    const nativeOptions: CredentialRequestOptions = {\n      publicKey: {\n        challenge: pendingCredential.createOptions.options.challenge,\n        allowCredentials: [{ id: pendingCredential.deviceResponse.rawId, type: \"public-key\" }],\n        rpId: pendingCredential.createOptions.options.rp.id,\n        timeout: pendingCredential.createOptions.options.timeout,\n        userVerification:\n          pendingCredential.createOptions.options.authenticatorSelection.userVerification,\n        // TODO: Remove `any` when typescript typings add support for PRF\n        extensions: {\n          prf: { eval: { first: await this.webAuthnLoginPrfKeyService.getLoginWithPrfSalt() } },\n        } as any,\n      },\n    };\n\n    try {\n      const response = await this.navigatorCredentials.get(nativeOptions);\n      if (!(response instanceof PublicKeyCredential)) {\n        return undefined;\n      }\n\n      // TODO: Remove `any` when typescript typings add support for PRF\n      const prfResult = (response.getClientExtensionResults() as any).prf?.results?.first;\n\n      if (prfResult === undefined) {\n        return undefined;\n      }\n\n      const symmetricPrfKey =\n        await this.webAuthnLoginPrfKeyService.createSymmetricKeyFromPrf(prfResult);\n      return await this.rotateableKeySetService.createKeySet(symmetricPrfKey);\n    } catch (error) {\n      this.logService?.error(error);\n      return undefined;\n    }\n  }\n\n  /**\n   * Save a pending credential to the server. This will also save the key set if it is provided.\n   *\n   * @param name User provided name for the credential.\n   * @param credential A pending credential created using `createCredential`.\n   * @param prfKeySet A key set created using `createKeySet`.\n   */\n  async saveCredential(\n    name: string,\n    credential: PendingWebauthnLoginCredentialView,\n    prfKeySet?: PrfKeySet,\n  ) {\n    const request = new SaveCredentialRequest();\n    request.deviceResponse = new WebauthnLoginAttestationResponseRequest(credential.deviceResponse);\n    request.token = credential.createOptions.token;\n    request.name = name;\n    request.supportsPrf = credential.supportsPrf;\n    request.encryptedUserKey = prfKeySet?.encryptedUserKey.encryptedString;\n    request.encryptedPublicKey = prfKeySet?.encryptedPublicKey.encryptedString;\n    request.encryptedPrivateKey = prfKeySet?.encryptedPrivateKey.encryptedString;\n    await this.apiService.saveCredential(request);\n    this.refresh();\n  }\n\n  /**\n   * Enable encryption for a credential that has already been saved to the server.\n   * This will update the KeySet associated with the credential in the database.\n   * We short circuit the process here incase the WebAuthnLoginCredential doesn't support PRF or\n   * if there was a problem with the Credential Assertion.\n   *\n   * @param assertionOptions Options received from the server using `getCredentialAssertOptions`.\n   * @returns void\n   */\n  async enableCredentialEncryption(\n    assertionOptions: WebAuthnLoginCredentialAssertionView,\n  ): Promise<void> {\n    if (assertionOptions === undefined || assertionOptions?.prfKey === undefined) {\n      throw new Error(\"invalid credential\");\n    }\n\n    const prfKeySet: PrfKeySet = await this.rotateableKeySetService.createKeySet(\n      assertionOptions.prfKey,\n    );\n\n    const request = new EnableCredentialEncryptionRequest();\n    request.token = assertionOptions.token;\n    request.deviceResponse = assertionOptions.deviceResponse;\n    request.encryptedUserKey = prfKeySet.encryptedUserKey.encryptedString;\n    request.encryptedPublicKey = prfKeySet.encryptedPublicKey.encryptedString;\n    request.encryptedPrivateKey = prfKeySet.encryptedPrivateKey.encryptedString;\n    await this.apiService.updateCredential(request);\n    this.refresh();\n  }\n\n  /**\n   * List of webauthn credentials saved on the server.\n   *\n   * **Note:**\n   *   - Subscribing might trigger a network request if the credentials haven't been fetched yet.\n   *   - The observable is shared and will not create unnecessary duplicate requests.\n   *   - The observable will automatically re-fetch if the user adds or removes a credential.\n   *   - The observable is lazy and will only fetch credentials when subscribed to.\n   *   - Don't subscribe to this in the constructor of a long-running service, as it will keep the observable alive.\n   */\n  getCredentials$(): Observable<WebauthnLoginCredentialView[]> {\n    return this.credentials$;\n  }\n\n  /**\n   * Subscribe to a single credential by id.\n   *\n   * @param credentialId The id of the credential to subscribe to.\n   * @returns An observable that emits the credential with the given id.\n   */\n  getCredential$(credentialId: string): Observable<WebauthnLoginCredentialView> {\n    return this.credentials$.pipe(\n      map((credentials) => credentials.find((c) => c.id === credentialId)),\n      filter((c) => c !== undefined),\n    );\n  }\n\n  /**\n   * Delete a credential from the server. This method requires user verification.\n   *\n   * @param credentialId The id of the credential to delete.\n   * @param verification User verification data to be used for the request.\n   * @returns A promise that resolves when the credential has been deleted.\n   */\n  async deleteCredential(credentialId: string, verification: Verification): Promise<void> {\n    const request = await this.userVerificationService.buildRequest(verification);\n    await this.apiService.deleteCredential(credentialId, request);\n    this.refresh();\n  }\n\n  private fetchCredentials$(): Observable<WebauthnLoginCredentialView[]> {\n    return from(this.apiService.getCredentials()).pipe(\n      map((response) =>\n        response.data.map(\n          (credential) =>\n            new WebauthnLoginCredentialView(credential.id, credential.name, credential.prfStatus),\n        ),\n      ),\n    );\n  }\n\n  private refresh() {\n    this._refresh$.next();\n  }\n\n  /**\n   * Creates rotate credential requests for the purpose of user key rotation.\n   * This works by fetching the current webauthn credentials, filtering out the ones that have a PRF keyset,\n   * and rotating these using the rotateable key set service.\n   *\n   * @param oldUserKey The old user key\n   * @param newUserKey The new user key\n   * @param userId The user id\n   * @returns A promise that returns an array of rotate credential requests when resolved.\n   */\n  async getRotatedData(\n    oldUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<WebauthnRotateCredentialRequest[]> {\n    if (!oldUserKey) {\n      throw new Error(\"oldUserKey is required\");\n    }\n    if (!newUserKey) {\n      throw new Error(\"newUserKey is required\");\n    }\n\n    return Promise.all(\n      (await this.apiService.getCredentials()).data\n        .filter((credential) => credential.hasPrfKeyset())\n        .map(async (response) => {\n          const keyset = response.getRotateableKeyset();\n          const rotatedKeyset = await this.rotateableKeySetService.rotateKeySet(\n            keyset,\n            oldUserKey,\n            newUserKey,\n          );\n          const request = new WebauthnRotateCredentialRequest(\n            response.id,\n            rotatedKeyset.encryptedPublicKey,\n            rotatedKeyset.encryptedUserKey,\n          );\n          return request;\n        }),\n    );\n  }\n}\n","import { inject } from \"@angular/core\";\n\nimport {\n  DefaultSetPasswordJitService,\n  SetPasswordCredentials,\n  SetPasswordJitService,\n} from \"@bitwarden/auth/angular\";\n\nimport { RouterService } from \"../../../../core/router.service\";\nimport { AcceptOrganizationInviteService } from \"../../../organization-invite/accept-organization.service\";\n\nexport class WebSetPasswordJitService\n  extends DefaultSetPasswordJitService\n  implements SetPasswordJitService\n{\n  routerService = inject(RouterService);\n  acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n  override async setPassword(credentials: SetPasswordCredentials) {\n    await super.setPassword(credentials);\n\n    // SSO JIT accepts org invites when setting their MP, meaning\n    // we can clear the deep linked url for accepting it.\n    await this.routerService.getAndClearLoginRedirectUrl();\n    await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  DefaultRegistrationFinishService,\n  PasswordInputResult,\n  RegistrationFinishService,\n} from \"@bitwarden/auth/angular\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterFinishRequest } from \"@bitwarden/common/auth/models/request/registration/register-finish.request\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { AcceptOrganizationInviteService } from \"../../../organization-invite/accept-organization.service\";\n\nexport class WebRegistrationFinishService\n  extends DefaultRegistrationFinishService\n  implements RegistrationFinishService\n{\n  constructor(\n    protected keyService: KeyService,\n    protected accountApiService: AccountApiService,\n    private acceptOrgInviteService: AcceptOrganizationInviteService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private logService: LogService,\n    private policyService: PolicyService,\n  ) {\n    super(keyService, accountApiService);\n  }\n\n  override async getOrgNameFromOrgInvite(): Promise<string | null> {\n    const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n    if (orgInvite == null) {\n      return null;\n    }\n\n    return orgInvite.organizationName;\n  }\n\n  override async getMasterPasswordPolicyOptsFromOrgInvite(): Promise<MasterPasswordPolicyOptions | null> {\n    // If there's a deep linked org invite, use it to get the password policies\n    const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n\n    if (orgInvite == null) {\n      return null;\n    }\n\n    let policies: Policy[] | null = null;\n    try {\n      policies = await this.policyApiService.getPoliciesByToken(\n        orgInvite.organizationId,\n        orgInvite.token,\n        orgInvite.email,\n        orgInvite.organizationUserId,\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (policies == null) {\n      return null;\n    }\n\n    const masterPasswordPolicyOpts: MasterPasswordPolicyOptions = await firstValueFrom(\n      this.policyService.masterPasswordPolicyOptions$(policies),\n    );\n\n    return masterPasswordPolicyOpts;\n  }\n\n  // Note: the org invite token and email verification are mutually exclusive. Only one will be present.\n  override async buildRegisterRequest(\n    email: string,\n    passwordInputResult: PasswordInputResult,\n    encryptedUserKey: EncryptedString,\n    userAsymmetricKeys: [string, EncString],\n    emailVerificationToken?: string,\n    orgSponsoredFreeFamilyPlanToken?: string,\n    acceptEmergencyAccessInviteToken?: string,\n    emergencyAccessId?: string,\n    providerInviteToken?: string,\n    providerUserId?: string,\n  ): Promise<RegisterFinishRequest> {\n    const registerRequest = await super.buildRegisterRequest(\n      email,\n      passwordInputResult,\n      encryptedUserKey,\n      userAsymmetricKeys,\n      emailVerificationToken,\n    );\n\n    // web specific logic\n    // Org invites are deep linked. Non-existent accounts are redirected to the register page.\n    // Org user id and token are included here only for validation and two factor purposes.\n    const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n    if (orgInvite != null) {\n      registerRequest.organizationUserId = orgInvite.organizationUserId;\n      registerRequest.orgInviteToken = orgInvite.token;\n    }\n    // Invite is accepted after login (on deep link redirect).\n\n    if (orgSponsoredFreeFamilyPlanToken) {\n      registerRequest.orgSponsoredFreeFamilyPlanToken = orgSponsoredFreeFamilyPlanToken;\n    }\n\n    if (acceptEmergencyAccessInviteToken && emergencyAccessId) {\n      registerRequest.acceptEmergencyAccessInviteToken = acceptEmergencyAccessInviteToken;\n      registerRequest.acceptEmergencyAccessId = emergencyAccessId;\n    }\n\n    if (providerInviteToken && providerUserId) {\n      registerRequest.providerInviteToken = providerInviteToken;\n      registerRequest.providerUserId = providerUserId;\n    }\n\n    return registerRequest;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { EmergencyAccessApiService } from \"./services/emergency-access-api.service\";\nimport { EmergencyAccessService } from \"./services/emergency-access.service\";\n\n@NgModule({\n  declarations: [],\n  imports: [],\n  providers: [EmergencyAccessApiService, EmergencyAccessService],\n})\nexport class EmergencyAccessModule {}\n","export enum EmergencyAccessStatusType {\n  Invited = 0,\n  Accepted = 1,\n  Confirmed = 2,\n  RecoveryInitiated = 3,\n  RecoveryApproved = 4,\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { CipherResponse } from \"@bitwarden/common/vault/models/response/cipher.response\";\nimport { KdfType } from \"@bitwarden/key-management\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessGranteeDetailsResponse extends BaseResponse {\n  id: string;\n  granteeId: string;\n  name: string;\n  email: string;\n  type: EmergencyAccessType;\n  status: EmergencyAccessStatusType;\n  waitTimeDays: number;\n  creationDate: string;\n  avatarColor: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.granteeId = this.getResponseProperty(\"GranteeId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.waitTimeDays = this.getResponseProperty(\"WaitTimeDays\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n  }\n}\n\nexport class EmergencyAccessGrantorDetailsResponse extends BaseResponse {\n  id: string;\n  grantorId: string;\n  name: string;\n  email: string;\n  type: EmergencyAccessType;\n  status: EmergencyAccessStatusType;\n  waitTimeDays: number;\n  creationDate: string;\n  avatarColor: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.grantorId = this.getResponseProperty(\"GrantorId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.waitTimeDays = this.getResponseProperty(\"WaitTimeDays\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n  }\n}\n\nexport class EmergencyAccessTakeoverResponse extends BaseResponse {\n  keyEncrypted: string;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n\n  constructor(response: any) {\n    super(response);\n\n    this.keyEncrypted = this.getResponseProperty(\"KeyEncrypted\");\n    this.kdf = this.getResponseProperty(\"Kdf\");\n    this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n    this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n    this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n  }\n}\n\nexport class EmergencyAccessViewResponse extends BaseResponse {\n  keyEncrypted: string;\n  ciphers: CipherResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n\n    this.keyEncrypted = this.getResponseProperty(\"KeyEncrypted\");\n\n    const ciphers = this.getResponseProperty(\"Ciphers\");\n    if (ciphers != null) {\n      this.ciphers = ciphers.map((c: any) => new CipherResponse(c));\n    }\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyResponse } from \"@bitwarden/common/admin-console/models/response/policy.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { EmergencyAccessAcceptRequest } from \"../request/emergency-access-accept.request\";\nimport { EmergencyAccessConfirmRequest } from \"../request/emergency-access-confirm.request\";\nimport { EmergencyAccessInviteRequest } from \"../request/emergency-access-invite.request\";\nimport { EmergencyAccessPasswordRequest } from \"../request/emergency-access-password.request\";\nimport { EmergencyAccessUpdateRequest } from \"../request/emergency-access-update.request\";\nimport {\n  EmergencyAccessGranteeDetailsResponse,\n  EmergencyAccessGrantorDetailsResponse,\n  EmergencyAccessTakeoverResponse,\n  EmergencyAccessViewResponse,\n} from \"../response/emergency-access.response\";\n\n@Injectable()\nexport class EmergencyAccessApiService {\n  constructor(private apiService: ApiService) {}\n\n  async getEmergencyAccessTrusted(): Promise<ListResponse<EmergencyAccessGranteeDetailsResponse>> {\n    const r = await this.apiService.send(\"GET\", \"/emergency-access/trusted\", null, true, true);\n    return new ListResponse(r, EmergencyAccessGranteeDetailsResponse);\n  }\n\n  async getEmergencyAccessGranted(): Promise<ListResponse<EmergencyAccessGrantorDetailsResponse>> {\n    const r = await this.apiService.send(\"GET\", \"/emergency-access/granted\", null, true, true);\n    return new ListResponse(r, EmergencyAccessGrantorDetailsResponse);\n  }\n\n  async getEmergencyAccess(id: string): Promise<EmergencyAccessGranteeDetailsResponse> {\n    const r = await this.apiService.send(\"GET\", \"/emergency-access/\" + id, null, true, true);\n    return new EmergencyAccessGranteeDetailsResponse(r);\n  }\n\n  async getEmergencyGrantorPolicies(id: string): Promise<ListResponse<PolicyResponse>> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/emergency-access/\" + id + \"/policies\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, PolicyResponse);\n  }\n\n  putEmergencyAccess(id: string, request: EmergencyAccessUpdateRequest): Promise<void> {\n    return this.apiService.send(\"PUT\", \"/emergency-access/\" + id, request, true, false);\n  }\n\n  deleteEmergencyAccess(id: string): Promise<void> {\n    return this.apiService.send(\"DELETE\", \"/emergency-access/\" + id, null, true, false);\n  }\n\n  postEmergencyAccessInvite(request: EmergencyAccessInviteRequest): Promise<void> {\n    return this.apiService.send(\"POST\", \"/emergency-access/invite\", request, true, false);\n  }\n\n  postEmergencyAccessReinvite(id: string): Promise<void> {\n    return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/reinvite\", null, true, false);\n  }\n\n  postEmergencyAccessAccept(id: string, request: EmergencyAccessAcceptRequest): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/emergency-access/\" + id + \"/accept\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postEmergencyAccessConfirm(id: string, request: EmergencyAccessConfirmRequest): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/emergency-access/\" + id + \"/confirm\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postEmergencyAccessInitiate(id: string): Promise<void> {\n    return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/initiate\", null, true, false);\n  }\n\n  postEmergencyAccessApprove(id: string): Promise<void> {\n    return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/approve\", null, true, false);\n  }\n\n  postEmergencyAccessReject(id: string): Promise<void> {\n    return this.apiService.send(\"POST\", \"/emergency-access/\" + id + \"/reject\", null, true, false);\n  }\n\n  async postEmergencyAccessTakeover(id: string): Promise<EmergencyAccessTakeoverResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/emergency-access/\" + id + \"/takeover\",\n      null,\n      true,\n      true,\n    );\n    return new EmergencyAccessTakeoverResponse(r);\n  }\n\n  async postEmergencyAccessPassword(\n    id: string,\n    request: EmergencyAccessPasswordRequest,\n  ): Promise<void> {\n    await this.apiService.send(\n      \"POST\",\n      \"/emergency-access/\" + id + \"/password\",\n      request,\n      true,\n      true,\n    );\n  }\n\n  async postEmergencyAccessView(id: string): Promise<EmergencyAccessViewResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/emergency-access/\" + id + \"/view\",\n      null,\n      true,\n      true,\n    );\n    return new EmergencyAccessViewResponse(r);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class EmergencyAccessAcceptRequest {\n  token: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class EmergencyAccessConfirmRequest {\n  key: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessInviteRequest {\n  email: string;\n  type: EmergencyAccessType;\n  waitTimeDays: number;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class EmergencyAccessPasswordRequest {\n  newMasterPasswordHash: string;\n  key: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class EmergencyAccessUpdateRequest {\n  type: EmergencyAccessType;\n  waitTimeDays: number;\n  keyEncrypted?: string;\n}\n\nexport class EmergencyAccessWithIdRequest extends EmergencyAccessUpdateRequest {\n  id: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyData } from \"@bitwarden/common/admin-console/models/data/policy.data\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { BulkEncryptService } from \"@bitwarden/common/platform/abstractions/bulk-encrypt.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  Argon2KdfConfig,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  UserKeyRotationDataProvider,\n  KeyService,\n  KdfType,\n} from \"@bitwarden/key-management\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\nimport { GranteeEmergencyAccess, GrantorEmergencyAccess } from \"../models/emergency-access\";\nimport { EmergencyAccessAcceptRequest } from \"../request/emergency-access-accept.request\";\nimport { EmergencyAccessConfirmRequest } from \"../request/emergency-access-confirm.request\";\nimport { EmergencyAccessInviteRequest } from \"../request/emergency-access-invite.request\";\nimport { EmergencyAccessPasswordRequest } from \"../request/emergency-access-password.request\";\nimport {\n  EmergencyAccessUpdateRequest,\n  EmergencyAccessWithIdRequest,\n} from \"../request/emergency-access-update.request\";\n\nimport { EmergencyAccessApiService } from \"./emergency-access-api.service\";\n\n@Injectable()\nexport class EmergencyAccessService\n  implements UserKeyRotationDataProvider<EmergencyAccessWithIdRequest>\n{\n  constructor(\n    private emergencyAccessApiService: EmergencyAccessApiService,\n    private apiService: ApiService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private bulkEncryptService: BulkEncryptService,\n    private cipherService: CipherService,\n    private logService: LogService,\n    private configService: ConfigService,\n  ) {}\n\n  /**\n   * Gets an emergency access by id.\n   * @param id emergency access id\n   */\n  getEmergencyAccess(id: string): Promise<GranteeEmergencyAccess> {\n    return this.emergencyAccessApiService.getEmergencyAccess(id);\n  }\n\n  /**\n   * Gets all emergency access that the user has been granted.\n   */\n  async getEmergencyAccessTrusted(): Promise<GranteeEmergencyAccess[]> {\n    return (await this.emergencyAccessApiService.getEmergencyAccessTrusted()).data;\n  }\n\n  /**\n   * Gets all emergency access that the user has granted.\n   */\n  async getEmergencyAccessGranted(): Promise<GrantorEmergencyAccess[]> {\n    return (await this.emergencyAccessApiService.getEmergencyAccessGranted()).data;\n  }\n\n  /**\n   * Returns policies that apply to the grantor.\n   * Intended for grantee.\n   * @param id emergency access id\n   */\n  async getGrantorPolicies(id: string): Promise<Policy[]> {\n    const response = await this.emergencyAccessApiService.getEmergencyGrantorPolicies(id);\n    let policies: Policy[];\n    if (response.data != null && response.data.length > 0) {\n      policies = response.data.map((policyResponse) => new Policy(new PolicyData(policyResponse)));\n    }\n    return policies;\n  }\n\n  /**\n   * Invites the email address to be an emergency contact.\n   * Step 1 of the 3 step setup flow.\n   * Intended for grantor.\n   * @param email email address of trusted emergency contact\n   * @param type type of emergency access\n   * @param waitTimeDays number of days to wait before granting access\n   */\n  async invite(email: string, type: EmergencyAccessType, waitTimeDays: number): Promise<void> {\n    const request = new EmergencyAccessInviteRequest();\n    request.email = email.trim();\n    request.type = type;\n    request.waitTimeDays = waitTimeDays;\n\n    await this.emergencyAccessApiService.postEmergencyAccessInvite(request);\n  }\n\n  /**\n   * Sends another email for an existing emergency access invitation.\n   * Intended for grantor.\n   * @param id emergency access id\n   */\n  reinvite(id: string): Promise<void> {\n    return this.emergencyAccessApiService.postEmergencyAccessReinvite(id);\n  }\n\n  /**\n   * Edits an existing emergency access.\n   * Intended for grantor.\n   * @param id emergency access id\n   * @param type type of emergency access\n   * @param waitTimeDays number of days to wait before granting access\n   */\n  async update(id: string, type: EmergencyAccessType, waitTimeDays: number) {\n    const request = new EmergencyAccessUpdateRequest();\n    request.type = type;\n    request.waitTimeDays = waitTimeDays;\n\n    await this.emergencyAccessApiService.putEmergencyAccess(id, request);\n  }\n\n  /**\n   * Accepts an emergency access invitation.\n   * Step 2 of the 3 step setup flow.\n   * Intended for grantee.\n   * @param id emergency access id\n   * @param token secret token provided in email\n   */\n  async accept(id: string, token: string): Promise<void> {\n    const request = new EmergencyAccessAcceptRequest();\n    request.token = token;\n\n    await this.emergencyAccessApiService.postEmergencyAccessAccept(id, request);\n  }\n\n  /**\n   * Encrypts user key with grantee's public key and sends to bitwarden.\n   * Step 3 of the 3 step setup flow.\n   * Intended for grantor.\n   * @param id emergency access id\n   * @param token secret token provided in email\n   * @param publicKey public key of grantee\n   */\n  async confirm(id: string, granteeId: string, publicKey: Uint8Array): Promise<void> {\n    const userKey = await this.keyService.getUserKey();\n    if (!userKey) {\n      throw new Error(\"No user key found\");\n    }\n\n    try {\n      this.logService.debug(\n        \"User's fingerprint: \" +\n          (await this.keyService.getFingerprint(granteeId, publicKey)).join(\"-\"),\n      );\n    } catch {\n      // Ignore errors since it's just a debug message\n    }\n\n    const request = new EmergencyAccessConfirmRequest();\n    request.key = await this.encryptKey(userKey, publicKey);\n    await this.emergencyAccessApiService.postEmergencyAccessConfirm(id, request);\n  }\n\n  /**\n   * Deletes an existing emergency access.\n   * Intended for either grantor or grantee.\n   * @param id emergency access id\n   */\n  delete(id: string): Promise<void> {\n    return this.emergencyAccessApiService.deleteEmergencyAccess(id);\n  }\n\n  /**\n   * Requests access to grantor's vault.\n   * Intended for grantee.\n   * @param id emergency access id\n   */\n  requestAccess(id: string): Promise<void> {\n    return this.emergencyAccessApiService.postEmergencyAccessInitiate(id);\n  }\n\n  /**\n   * Approves access to grantor's vault.\n   * Intended for grantor.\n   * @param id emergency access id\n   */\n  approve(id: string): Promise<void> {\n    return this.emergencyAccessApiService.postEmergencyAccessApprove(id);\n  }\n\n  /**\n   * Rejects access to grantor's vault.\n   * Intended for grantor.\n   * @param id emergency access id\n   */\n  reject(id: string): Promise<void> {\n    return this.emergencyAccessApiService.postEmergencyAccessReject(id);\n  }\n\n  /**\n   * Gets the grantor ciphers for an emergency access in view mode.\n   * Intended for grantee.\n   * @param id emergency access id\n   */\n  async getViewOnlyCiphers(id: string): Promise<CipherView[]> {\n    const response = await this.emergencyAccessApiService.postEmergencyAccessView(id);\n\n    const activeUserPrivateKey = await this.keyService.getPrivateKey();\n\n    if (activeUserPrivateKey == null) {\n      throw new Error(\"Active user does not have a private key, cannot get view only ciphers.\");\n    }\n\n    const grantorKeyBuffer = await this.encryptService.rsaDecrypt(\n      new EncString(response.keyEncrypted),\n      activeUserPrivateKey,\n    );\n    const grantorUserKey = new SymmetricCryptoKey(grantorKeyBuffer) as UserKey;\n\n    let ciphers: CipherView[] = [];\n    if (await this.configService.getFeatureFlag(FeatureFlag.PM4154_BulkEncryptionService)) {\n      ciphers = await this.bulkEncryptService.decryptItems(\n        response.ciphers.map((c) => new Cipher(c)),\n        grantorUserKey,\n      );\n    } else {\n      ciphers = await this.encryptService.decryptItems(\n        response.ciphers.map((c) => new Cipher(c)),\n        grantorUserKey,\n      );\n    }\n    return ciphers.sort(this.cipherService.getLocaleSortingFunction());\n  }\n\n  /**\n   * Changes the password for an emergency access.\n   * Intended for grantee.\n   * @param id emergency access id\n   * @param masterPassword new master password\n   * @param email email address of grantee (must be consistent or login will fail)\n   */\n  async takeover(id: string, masterPassword: string, email: string) {\n    const takeoverResponse = await this.emergencyAccessApiService.postEmergencyAccessTakeover(id);\n\n    const activeUserPrivateKey = await this.keyService.getPrivateKey();\n\n    if (activeUserPrivateKey == null) {\n      throw new Error(\"Active user does not have a private key, cannot complete a takeover.\");\n    }\n\n    const grantorKeyBuffer = await this.encryptService.rsaDecrypt(\n      new EncString(takeoverResponse.keyEncrypted),\n      activeUserPrivateKey,\n    );\n    if (grantorKeyBuffer == null) {\n      throw new Error(\"Failed to decrypt grantor key\");\n    }\n\n    const grantorUserKey = new SymmetricCryptoKey(grantorKeyBuffer) as UserKey;\n\n    let config: KdfConfig;\n\n    switch (takeoverResponse.kdf) {\n      case KdfType.PBKDF2_SHA256:\n        config = new PBKDF2KdfConfig(takeoverResponse.kdfIterations);\n        break;\n      case KdfType.Argon2id:\n        config = new Argon2KdfConfig(\n          takeoverResponse.kdfIterations,\n          takeoverResponse.kdfMemory,\n          takeoverResponse.kdfParallelism,\n        );\n        break;\n    }\n\n    const masterKey = await this.keyService.makeMasterKey(masterPassword, email, config);\n    const masterKeyHash = await this.keyService.hashMasterKey(masterPassword, masterKey);\n\n    const encKey = await this.keyService.encryptUserKeyWithMasterKey(masterKey, grantorUserKey);\n\n    const request = new EmergencyAccessPasswordRequest();\n    request.newMasterPasswordHash = masterKeyHash;\n    request.key = encKey[1].encryptedString;\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.emergencyAccessApiService.postEmergencyAccessPassword(id, request);\n  }\n\n  /**\n   * Returns existing emergency access keys re-encrypted with new user key.\n   * Intended for grantor.\n   * @param originalUserKey the original user key\n   * @param newUserKey the new user key\n   * @param userId the user id\n   * @throws Error if newUserKey is nullish\n   * @returns an array of re-encrypted emergency access requests or an empty array if there are no requests\n   */\n  async getRotatedData(\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<EmergencyAccessWithIdRequest[]> {\n    if (newUserKey == null) {\n      throw new Error(\"New user key is required for rotation.\");\n    }\n\n    const requests: EmergencyAccessWithIdRequest[] = [];\n    const existingEmergencyAccess =\n      await this.emergencyAccessApiService.getEmergencyAccessTrusted();\n\n    if (!existingEmergencyAccess || existingEmergencyAccess.data.length === 0) {\n      return requests;\n    }\n\n    // Any Invited or Accepted requests won't have the key yet, so we don't need to update them\n    const allowedStatuses = new Set([\n      EmergencyAccessStatusType.Confirmed,\n      EmergencyAccessStatusType.RecoveryInitiated,\n      EmergencyAccessStatusType.RecoveryApproved,\n    ]);\n    const filteredAccesses = existingEmergencyAccess.data.filter((d) =>\n      allowedStatuses.has(d.status),\n    );\n\n    for (const details of filteredAccesses) {\n      // Get public key of grantee\n      const publicKeyResponse = await this.apiService.getUserPublicKey(details.granteeId);\n      const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n      // Encrypt new user key with public key\n      const encryptedKey = await this.encryptKey(newUserKey, publicKey);\n\n      const updateRequest = new EmergencyAccessWithIdRequest();\n      updateRequest.id = details.id;\n      updateRequest.type = details.type;\n      updateRequest.waitTimeDays = details.waitTimeDays;\n      updateRequest.keyEncrypted = encryptedKey;\n      requests.push(updateRequest);\n    }\n    return requests;\n  }\n\n  private async encryptKey(userKey: UserKey, publicKey: Uint8Array): Promise<EncryptedString> {\n    return (await this.encryptService.rsaEncrypt(userKey.key, publicKey)).encryptedString;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { RouterService } from \"../../core/router.service\";\n\n/**\n * Guard to persist and apply deep links to handle users who are not unlocked.\n * @returns returns true. If user is not Unlocked will store URL to state for redirect once\n * user is unlocked/Authenticated.\n */\nexport function deepLinkGuard(): CanActivateFn {\n  return async (route, routerState) => {\n    // Inject Services\n    const authService = inject(AuthService);\n    const router = inject(Router);\n    const routerService = inject(RouterService);\n\n    // Fetch State\n    const currentUrl = routerState.url;\n    const transientPreviousUrl = routerService.getPreviousUrl();\n    const authStatus = await authService.getAuthStatus();\n\n    // Evaluate State\n    /** before anything else, check if the user is already unlocked. */\n    if (authStatus === AuthenticationStatus.Unlocked) {\n      const persistedPreLoginUrl = await routerService.getAndClearLoginRedirectUrl();\n      if (!Utils.isNullOrEmpty(persistedPreLoginUrl)) {\n        return router.navigateByUrl(persistedPreLoginUrl);\n      }\n      return true;\n    }\n    /**\n     * At this point the user is either `locked` or `loggedOut`, it doesn't matter.\n     * We opt to persist the currentUrl over the transient previousUrl. This supports\n     * the case where a user is locked out of their vault and they deep link from\n     * the \"lock\" page.\n     *\n     * When the user is locked out of their vault the currentUrl contains \"lock\" so it will\n     * not be persisted, the previousUrl will be persisted instead.\n     */\n    if (isValidUrl(currentUrl)) {\n      await routerService.persistLoginRedirectUrl(currentUrl);\n    } else if (isValidUrl(transientPreviousUrl)) {\n      await routerService.persistLoginRedirectUrl(transientPreviousUrl);\n    }\n    return true;\n  };\n\n  function isValidUrl(url: string | null | undefined): boolean {\n    return !Utils.isNullOrEmpty(url) && !url?.toLocaleLowerCase().includes(\"/lock\");\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { AcceptOrganizationComponent } from \"./accept-organization.component\";\nimport { AcceptOrganizationInviteService } from \"./accept-organization.service\";\n\n@NgModule({\n  declarations: [AcceptOrganizationComponent],\n  imports: [SharedModule],\n  providers: [AcceptOrganizationInviteService],\n})\nexport class AcceptOrganizationInviteModule {}\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { CheckboxModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { UserVerificationModule } from \"../../shared/components/user-verification\";\n\nimport { CreateCredentialDialogComponent } from \"./create-credential-dialog/create-credential-dialog.component\";\nimport { DeleteCredentialDialogComponent } from \"./delete-credential-dialog/delete-credential-dialog.component\";\nimport { EnableEncryptionDialogComponent } from \"./enable-encryption-dialog/enable-encryption-dialog.component\";\nimport { WebauthnLoginSettingsComponent } from \"./webauthn-login-settings.component\";\n\n@NgModule({\n  imports: [SharedModule, FormsModule, ReactiveFormsModule, UserVerificationModule, CheckboxModule],\n  declarations: [\n    WebauthnLoginSettingsComponent,\n    CreateCredentialDialogComponent,\n    DeleteCredentialDialogComponent,\n    EnableEncryptionDialogComponent,\n  ],\n  exports: [WebauthnLoginSettingsComponent],\n})\nexport class WebauthnLoginSettingsModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { PasswordCalloutComponent } from \"@bitwarden/auth/angular\";\n\nimport { UserKeyRotationModule } from \"../../key-management/key-rotation/user-key-rotation.module\";\nimport { SharedModule } from \"../../shared\";\nimport { EmergencyAccessModule } from \"../emergency-access\";\n\nimport { ChangePasswordComponent } from \"./change-password.component\";\nimport { WebauthnLoginSettingsModule } from \"./webauthn-login-settings\";\n\n@NgModule({\n  imports: [\n    SharedModule,\n    WebauthnLoginSettingsModule,\n    EmergencyAccessModule,\n    PasswordCalloutComponent,\n    UserKeyRotationModule,\n  ],\n  declarations: [ChangePasswordComponent],\n  providers: [],\n  exports: [ChangePasswordComponent],\n})\nexport class AuthSettingsModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { AcceptOrganizationInviteModule } from \"./organization-invite/accept-organization.module\";\nimport { AuthSettingsModule } from \"./settings/settings.module\";\n\n@NgModule({\n  imports: [AuthSettingsModule, AcceptOrganizationInviteModule],\n  declarations: [],\n  providers: [],\n  exports: [AuthSettingsModule],\n})\nexport class AuthModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { BehaviorSubject, firstValueFrom, map } from \"rxjs\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserAcceptRequest,\n  OrganizationUserAcceptInitRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  GlobalState,\n  GlobalStateProvider,\n  KeyDefinition,\n  ORGANIZATION_INVITE_DISK,\n} from \"@bitwarden/common/platform/state\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { OrganizationInvite } from \"./organization-invite\";\n\n// We're storing the organization invite for 2 reasons:\n// 1. If the org requires a MP policy check, we need to keep track that the user has already been redirected when they return.\n// 2. The MP policy check happens on login/register flows, we need to store the token to retrieve the policies then.\nexport const ORGANIZATION_INVITE = new KeyDefinition<OrganizationInvite | null>(\n  ORGANIZATION_INVITE_DISK,\n  \"organizationInvite\",\n  {\n    deserializer: (invite) => (invite ? OrganizationInvite.fromJSON(invite) : null),\n  },\n);\n\n@Injectable()\nexport class AcceptOrganizationInviteService {\n  private organizationInvitationState: GlobalState<OrganizationInvite | null>;\n  private orgNameSubject: BehaviorSubject<string> = new BehaviorSubject<string>(null);\n  private policyCache: Policy[];\n\n  // Fix URL encoding of space issue with Angular\n  orgName$ = this.orgNameSubject.pipe(map((orgName) => orgName.replace(/\\+/g, \" \")));\n\n  constructor(\n    private readonly apiService: ApiService,\n    private readonly authService: AuthService,\n    private readonly keyService: KeyService,\n    private readonly encryptService: EncryptService,\n    private readonly policyApiService: PolicyApiServiceAbstraction,\n    private readonly policyService: PolicyService,\n    private readonly logService: LogService,\n    private readonly organizationApiService: OrganizationApiServiceAbstraction,\n    private readonly organizationUserApiService: OrganizationUserApiService,\n    private readonly i18nService: I18nService,\n    private readonly globalStateProvider: GlobalStateProvider,\n  ) {\n    this.organizationInvitationState = this.globalStateProvider.get(ORGANIZATION_INVITE);\n  }\n\n  /** Returns the currently stored organization invite */\n  async getOrganizationInvite(): Promise<OrganizationInvite | null> {\n    return await firstValueFrom(this.organizationInvitationState.state$);\n  }\n\n  /**\n   * Stores a new organization invite\n   * @param invite an organization invite\n   * @throws if the invite is nullish\n   */\n  async setOrganizationInvitation(invite: OrganizationInvite): Promise<void> {\n    if (invite == null) {\n      throw new Error(\"Invite cannot be null. Use clearOrganizationInvitation instead.\");\n    }\n    await this.organizationInvitationState.update(() => invite);\n  }\n\n  /** Clears the currently stored organization invite */\n  async clearOrganizationInvitation(): Promise<void> {\n    await this.organizationInvitationState.update(() => null);\n  }\n\n  /**\n   * Validates and accepts the organization invitation if possible.\n   * Note: Users might need to pass a MP policy check before accepting an invite to an existing organization. If the user\n   * has not passed this check, they will be logged out and the invite will be stored for later use.\n   * @param invite an organization invite\n   * @returns a promise that resolves a boolean indicating if the invite was accepted.\n   */\n  async validateAndAcceptInvite(invite: OrganizationInvite): Promise<boolean> {\n    if (invite == null) {\n      throw new Error(\"Invite cannot be null.\");\n    }\n\n    // Creation of a new org\n    if (invite.initOrganization) {\n      await this.acceptAndInitOrganization(invite);\n      return true;\n    }\n\n    // Accepting an org invite from existing org\n    if (await this.masterPasswordPolicyCheckRequired(invite)) {\n      await this.setOrganizationInvitation(invite);\n      this.authService.logOut(() => {\n        /* Do nothing */\n      });\n      return false;\n    }\n\n    // We know the user has already logged in and passed a MP policy check\n    await this.accept(invite);\n    return true;\n  }\n\n  private async acceptAndInitOrganization(invite: OrganizationInvite): Promise<void> {\n    await this.prepareAcceptAndInitRequest(invite).then((request) =>\n      this.organizationUserApiService.postOrganizationUserAcceptInit(\n        invite.organizationId,\n        invite.organizationUserId,\n        request,\n      ),\n    );\n    await this.apiService.refreshIdentityToken();\n    await this.clearOrganizationInvitation();\n  }\n\n  private async prepareAcceptAndInitRequest(\n    invite: OrganizationInvite,\n  ): Promise<OrganizationUserAcceptInitRequest> {\n    const request = new OrganizationUserAcceptInitRequest();\n    request.token = invite.token;\n\n    const [encryptedOrgKey, orgKey] = await this.keyService.makeOrgKey<OrgKey>();\n    const [orgPublicKey, encryptedOrgPrivateKey] = await this.keyService.makeKeyPair(orgKey);\n    const collection = await this.encryptService.encrypt(\n      this.i18nService.t(\"defaultCollection\"),\n      orgKey,\n    );\n\n    request.key = encryptedOrgKey.encryptedString;\n    request.keys = new OrganizationKeysRequest(\n      orgPublicKey,\n      encryptedOrgPrivateKey.encryptedString,\n    );\n    request.collectionName = collection.encryptedString;\n\n    return request;\n  }\n\n  private async accept(invite: OrganizationInvite): Promise<void> {\n    await this.prepareAcceptRequest(invite).then((request) =>\n      this.organizationUserApiService.postOrganizationUserAccept(\n        invite.organizationId,\n        invite.organizationUserId,\n        request,\n      ),\n    );\n\n    await this.apiService.refreshIdentityToken();\n    await this.clearOrganizationInvitation();\n  }\n\n  private async prepareAcceptRequest(\n    invite: OrganizationInvite,\n  ): Promise<OrganizationUserAcceptRequest> {\n    const request = new OrganizationUserAcceptRequest();\n    request.token = invite.token;\n\n    if (await this.resetPasswordEnrollRequired(invite)) {\n      const response = await this.organizationApiService.getKeys(invite.organizationId);\n\n      if (response == null) {\n        throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n      }\n\n      const publicKey = Utils.fromB64ToArray(response.publicKey);\n\n      // RSA Encrypt user's encKey.key with organization public key\n      const userKey = await this.keyService.getUserKey();\n      const encryptedKey = await this.encryptService.rsaEncrypt(userKey.key, publicKey);\n\n      // Add reset password key to accept request\n      request.resetPasswordKey = encryptedKey.encryptedString;\n    }\n    return request;\n  }\n\n  private async resetPasswordEnrollRequired(invite: OrganizationInvite): Promise<boolean> {\n    const policies = await this.getPolicies(invite);\n\n    if (policies == null || policies.length === 0) {\n      return false;\n    }\n\n    const result = this.policyService.getResetPasswordPolicyOptions(\n      policies,\n      invite.organizationId,\n    );\n    // Return true if policy enabled and auto-enroll enabled\n    return result[1] && result[0].autoEnrollEnabled;\n  }\n\n  private async masterPasswordPolicyCheckRequired(invite: OrganizationInvite): Promise<boolean> {\n    const policies = await this.getPolicies(invite);\n\n    if (policies == null || policies.length === 0) {\n      return false;\n    }\n    const hasMasterPasswordPolicy = policies.some(\n      (p) => p.type === PolicyType.MasterPassword && p.enabled,\n    );\n\n    let storedInvite = await this.getOrganizationInvite();\n    if (storedInvite?.email !== invite.email) {\n      // clear stored invites if the email doesn't match\n      await this.clearOrganizationInvitation();\n      storedInvite = null;\n    }\n    // if we don't have an org invite stored, we know the user hasn't been redirected yet to check the MP policy\n    const hasNotCheckedMasterPasswordYet = storedInvite == null;\n    return hasMasterPasswordPolicy && hasNotCheckedMasterPasswordYet;\n  }\n\n  private async getPolicies(invite: OrganizationInvite): Promise<Policy[] | null> {\n    // if policies are not cached, fetch them\n    if (this.policyCache == null) {\n      try {\n        this.policyCache = await this.policyApiService.getPoliciesByToken(\n          invite.organizationId,\n          invite.token,\n          invite.email,\n          invite.organizationUserId,\n        );\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n\n    return this.policyCache;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Params } from \"@angular/router\";\nimport { Jsonify } from \"type-fest\";\n\nexport class OrganizationInvite {\n  email: string;\n  initOrganization: boolean;\n  orgSsoIdentifier: string;\n  orgUserHasExistingUser: boolean;\n  organizationId: string;\n  organizationName: string;\n  organizationUserId: string;\n  token: string;\n\n  static fromJSON(json: Jsonify<OrganizationInvite>): OrganizationInvite | null {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new OrganizationInvite(), json);\n  }\n\n  static fromParams(params: Params): OrganizationInvite | null {\n    if (params == null) {\n      return null;\n    }\n\n    return Object.assign(new OrganizationInvite(), {\n      email: params.email,\n      initOrganization: params.initOrganization?.toLocaleLowerCase() === \"true\",\n      orgSsoIdentifier: params.orgSsoIdentifier,\n      orgUserHasExistingUser: params.orgUserHasExistingUser?.toLocaleLowerCase() === \"true\",\n      organizationId: params.organizationId,\n      organizationName: params.organizationName,\n      organizationUserId: params.organizationUserId,\n      token: params.token,\n    });\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { PasswordCalloutComponent } from \"@bitwarden/auth/angular\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { RegisterFormComponent } from \"./register-form.component\";\n\n@NgModule({\n  imports: [SharedModule, PasswordCalloutComponent],\n  declarations: [RegisterFormComponent],\n  exports: [RegisterFormComponent],\n})\nexport class RegisterFormModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { TypographyModule } from \"@bitwarden/components\";\n\n/**\n * Component for the Danger Zone section of the Account/Organization Settings page.\n */\n@Component({\n  selector: \"app-danger-zone\",\n  templateUrl: \"danger-zone.component.html\",\n  standalone: true,\n  imports: [TypographyModule, JslibModule, CommonModule],\n})\nexport class DangerZoneComponent implements OnInit {\n  constructor(private configService: ConfigService) {}\n  accountDeprovisioningEnabled$: Observable<boolean>;\n\n  ngOnInit(): void {\n    this.accountDeprovisioningEnabled$ = this.configService.getFeatureFlag$(\n      FeatureFlag.AccountDeprovisioning,\n    );\n  }\n}\n","<h1 bitTypography=\"h1\" class=\"tw-mt-16 tw-pb-2.5 !tw-text-danger\">{{ \"dangerZone\" | i18n }}</h1>\n\n<div class=\"tw-rounded tw-border tw-border-solid tw-border-danger-600 tw-p-5\">\n  <p>\n    {{\n      (accountDeprovisioningEnabled$ | async) && content.children.length === 1\n        ? (\"dangerZoneDescSingular\" | i18n)\n        : (\"dangerZoneDesc\" | i18n)\n    }}\n  </p>\n\n  <div #content class=\"tw-flex tw-flex-row tw-gap-2\">\n    <ng-content></ng-content>\n  </div>\n</div>\n","export class UpdateProfileRequest {\n  name: string;\n  culture = \"en-US\"; // deprecated\n\n  constructor(name: string) {\n    this.name = name;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\n@Component({\n  selector: \"selectable-avatar\",\n  template: `<span\n    [title]=\"title\"\n    (click)=\"onFire()\"\n    (keyup.enter)=\"onFire()\"\n    tabindex=\"0\"\n    [ngClass]=\"classList\"\n  >\n    <bit-avatar\n      appStopClick\n      [text]=\"text\"\n      size=\"xlarge\"\n      [text]=\"text\"\n      [color]=\"color\"\n      [border]=\"false\"\n      [id]=\"id\"\n      [border]=\"border\"\n      [title]=\"title\"\n    >\n    </bit-avatar>\n  </span>`,\n})\nexport class SelectableAvatarComponent {\n  @Input() id: string;\n  @Input() text: string;\n  @Input() title: string;\n  @Input() color: string;\n  @Input() border = false;\n  @Input() selected = false;\n  @Output() select = new EventEmitter<string>();\n\n  onFire() {\n    this.select.emit(this.color);\n  }\n\n  get classList() {\n    return [\"tw-rounded-full tw-inline-block\"]\n      .concat([\"tw-cursor-pointer\", \"tw-outline\", \"tw-outline-solid\", \"tw-outline-offset-1\"])\n      .concat(\n        this.selected\n          ? [\"tw-outline-[3px]\", \"tw-outline-primary-600\"]\n          : [\n              \"tw-outline-0\",\n              \"hover:tw-outline-1\",\n              \"hover:tw-outline-primary-300\",\n              \"focus:tw-outline-2\",\n              \"focus:tw-outline-primary-600\",\n            ],\n      );\n  }\n}\n","<bit-dialog dialogSize=\"large\" [title]=\"'customizeAvatar' | i18n\">\n  <ng-container bitDialogContent>\n    <div class=\"tw-text-center\" *ngIf=\"loading\">\n      <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n      {{ \"loading\" | i18n }}\n    </div>\n    <p class=\"tw-text-lg\">{{ \"pickAnAvatarColor\" | i18n }}</p>\n    <div class=\"tw-flex tw-flex-wrap tw-justify-center tw-gap-8\">\n      <ng-container *ngFor=\"let c of defaultColorPalette\">\n        <selectable-avatar\n          appStopClick\n          (select)=\"setSelection(c.color)\"\n          [selected]=\"c.selected\"\n          [title]=\"c.name\"\n          text=\"{{ profile | userName }}\"\n          [color]=\"c.color\"\n          [border]=\"true\"\n        >\n        </selectable-avatar>\n      </ng-container>\n      <span>\n        <span\n          [tabIndex]=\"0\"\n          (keyup.enter)=\"showCustomPicker()\"\n          (click)=\"showCustomPicker()\"\n          title=\"{{ 'customColor' | i18n }}\"\n          [ngClass]=\"{\n            '!tw-outline-[3px] tw-outline-primary-600 hover:tw-outline-[3px] hover:tw-outline-primary-600':\n              customColorSelected,\n          }\"\n          class=\"tw-relative tw-flex tw-h-24 tw-w-24 tw-cursor-pointer tw-place-content-center tw-content-center tw-justify-center tw-rounded-full tw-border tw-border-solid tw-border-secondary-600 tw-outline tw-outline-0 tw-outline-offset-1 hover:tw-outline-1 hover:tw-outline-primary-300 focus:tw-outline-2 focus:tw-outline-primary-600\"\n          [style.background-color]=\"customColor$ | async\"\n        >\n          <i\n            [style.color]=\"customTextColor$ | async\"\n            class=\"bwi bwi-pencil tw-m-auto tw-text-3xl\"\n          ></i>\n          <input\n            tabindex=\"-1\"\n            class=\"tw-absolute tw-bottom-0 tw-right-0 tw-h-px tw-w-px tw-border-none tw-bg-transparent tw-opacity-0\"\n            #colorPicker\n            type=\"color\"\n            [ngModel]=\"customColor$ | async\"\n            (ngModelChange)=\"customColor$.next($event)\"\n          />\n        </span>\n      </span>\n    </div>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"submit\" buttonType=\"primary\" [disabled]=\"loading\" [bitAction]=\"submit\">\n      {{ \"save\" | i18n }}\n    </button>\n    <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport {\n  Component,\n  ElementRef,\n  Inject,\n  OnDestroy,\n  OnInit,\n  ViewChild,\n  ViewEncapsulation,\n} from \"@angular/core\";\nimport { BehaviorSubject, debounceTime, firstValueFrom, Subject, takeUntil } from \"rxjs\";\n\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { ProfileResponse } from \"@bitwarden/common/models/response/profile.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\ntype ChangeAvatarDialogData = {\n  profile: ProfileResponse;\n};\n\n@Component({\n  templateUrl: \"change-avatar-dialog.component.html\",\n  encapsulation: ViewEncapsulation.None,\n})\nexport class ChangeAvatarDialogComponent implements OnInit, OnDestroy {\n  profile: ProfileResponse;\n\n  @ViewChild(\"colorPicker\") colorPickerElement: ElementRef<HTMLElement>;\n\n  loading = false;\n  defaultColorPalette: NamedAvatarColor[] = [\n    { name: \"brightBlue\", color: \"#16cbfc\" },\n    { name: \"green\", color: \"#94cc4b\" },\n    { name: \"orange\", color: \"#ffb520\" },\n    { name: \"lavender\", color: \"#e5beed\" },\n    { name: \"yellow\", color: \"#fcff41\" },\n    { name: \"indigo\", color: \"#acbdf7\" },\n    { name: \"teal\", color: \"#8ecdc5\" },\n    { name: \"salmon\", color: \"#ffa3a3\" },\n    { name: \"pink\", color: \"#ffa2d4\" },\n  ];\n  customColorSelected = false;\n  currentSelection: string;\n\n  protected customColor$ = new BehaviorSubject<string | null>(null);\n  protected customTextColor$ = new BehaviorSubject<string>(\"#000000\");\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: ChangeAvatarDialogData,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private avatarService: AvatarService,\n    private dialogRef: DialogRef,\n    private toastService: ToastService,\n  ) {\n    this.profile = data.profile;\n  }\n\n  async ngOnInit() {\n    //localize the default colors\n    this.defaultColorPalette.forEach((c) => (c.name = this.i18nService.t(c.name)));\n\n    this.customColor$\n      .pipe(debounceTime(200), takeUntil(this.destroy$))\n      .subscribe((color: string | null) => {\n        if (color == null) {\n          return;\n        }\n        this.customTextColor$.next(Utils.pickTextColorBasedOnBgColor(color));\n        this.customColorSelected = true;\n        this.currentSelection = color;\n      });\n\n    await this.setSelection(await firstValueFrom(this.avatarService.avatarColor$));\n  }\n\n  async showCustomPicker() {\n    this.customColorSelected = true;\n    this.colorPickerElement.nativeElement.click();\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.setSelection(this.customColor$.value);\n  }\n\n  async generateAvatarColor() {\n    Utils.stringToColor(this.profile.name.toString());\n  }\n\n  submit = async () => {\n    if (Utils.validateHexColor(this.currentSelection) || this.currentSelection == null) {\n      await this.avatarService.setAvatarColor(this.currentSelection);\n      this.dialogRef.close();\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"avatarUpdated\"),\n      });\n    } else {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n    }\n  };\n\n  async ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async setSelection(color: string | null) {\n    this.defaultColorPalette.filter((x) => x.selected).forEach((c) => (c.selected = false));\n\n    if (color == null) {\n      return;\n    }\n\n    color = color.toLowerCase();\n\n    this.customColorSelected = false;\n    //Allow for toggle\n    if (this.currentSelection === color) {\n      this.currentSelection = null;\n    } else {\n      const selectedColorIndex = this.defaultColorPalette.findIndex((c) => c.color === color);\n      if (selectedColorIndex !== -1) {\n        this.defaultColorPalette[selectedColorIndex].selected = true;\n        this.currentSelection = color;\n      } else {\n        this.customColor$.next(color);\n      }\n    }\n  }\n\n  static open(dialogService: DialogService, config: DialogConfig<ChangeAvatarDialogData>) {\n    return dialogService.open(ChangeAvatarDialogComponent, config);\n  }\n}\n\nexport class NamedAvatarColor {\n  name: string;\n  color: string;\n  selected? = false;\n}\n","<div *ngIf=\"loading\">\n  <i\n    class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n    title=\"{{ 'loading' | i18n }}\"\n    aria-hidden=\"true\"\n  ></i>\n  <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n</div>\n<form *ngIf=\"profile && !loading\" [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-6\">\n    <div class=\"tw-col-span-6\">\n      <bit-form-field>\n        <bit-label>{{ \"name\" | i18n }}</bit-label>\n        <input bitInput formControlName=\"name\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>{{ \"email\" | i18n }}</bit-label>\n        <input bitInput formControlName=\"email\" readonly />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\">\n      <div class=\"tw-mb-3 tw-flex tw-align-middle tw-items-center\">\n        <dynamic-avatar text=\"{{ profile | userName }}\" [id]=\"profile.id\" size=\"large\">\n        </dynamic-avatar>\n        <button\n          class=\"tw-ml-3\"\n          type=\"button\"\n          buttonType=\"secondary\"\n          bitButton\n          bitFormButton\n          appStopClick\n          appStopProp\n          [bitAction]=\"openChangeAvatar\"\n        >\n          <i class=\"bwi bwi-lg bwi-pencil-square\" aria-hidden=\"true\"></i>\n          Customize\n        </button>\n      </div>\n      <div *ngIf=\"managingOrganization$ | async as managingOrganization\">\n        {{ \"accountIsOwnedMessage\" | i18n: managingOrganization?.name }}\n        <a href=\"https://bitwarden.com/help/claimed-accounts\">\n          <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n        </a>\n      </div>\n      <app-account-fingerprint\n        [fingerprintMaterial]=\"fingerprintMaterial\"\n        fingerprintLabel=\"{{ 'yourAccountsFingerprint' | i18n }}\"\n      >\n      </app-account-fingerprint>\n    </div>\n  </div>\n  <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">{{ \"save\" | i18n }}</button>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\nimport { firstValueFrom, map, Observable, of, Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UpdateProfileRequest } from \"@bitwarden/common/auth/models/request/update-profile.request\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ProfileResponse } from \"@bitwarden/common/models/response/profile.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { ChangeAvatarDialogComponent } from \"./change-avatar-dialog.component\";\n\n@Component({\n  selector: \"app-profile\",\n  templateUrl: \"profile.component.html\",\n})\nexport class ProfileComponent implements OnInit, OnDestroy {\n  loading = true;\n  profile: ProfileResponse;\n  fingerprintMaterial: string;\n  managingOrganization$: Observable<Organization>;\n  private destroy$ = new Subject<void>();\n\n  protected formGroup = new FormGroup({\n    name: new FormControl(null),\n    email: new FormControl(null),\n  });\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n    private dialogService: DialogService,\n    private toastService: ToastService,\n    private configService: ConfigService,\n    private organizationService: OrganizationService,\n  ) {}\n\n  async ngOnInit() {\n    this.profile = await this.apiService.getProfile();\n    this.loading = false;\n    this.fingerprintMaterial = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    this.managingOrganization$ = this.configService\n      .getFeatureFlag$(FeatureFlag.AccountDeprovisioning)\n      .pipe(\n        switchMap((isAccountDeprovisioningEnabled) =>\n          isAccountDeprovisioningEnabled\n            ? this.organizationService.organizations$.pipe(\n                map((organizations) =>\n                  organizations.find((o) => o.userIsManagedByOrganization === true),\n                ),\n              )\n            : of(null),\n        ),\n      );\n    this.formGroup.get(\"name\").setValue(this.profile.name);\n    this.formGroup.get(\"email\").setValue(this.profile.email);\n\n    this.formGroup\n      .get(\"name\")\n      .valueChanges.pipe(takeUntil(this.destroy$))\n      .subscribe((name) => {\n        this.profile.name = name;\n      });\n  }\n\n  openChangeAvatar = async () => {\n    ChangeAvatarDialogComponent.open(this.dialogService, {\n      data: { profile: this.profile },\n    });\n  };\n\n  async ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  submit = async () => {\n    const request = new UpdateProfileRequest(this.formGroup.get(\"name\").value);\n    await this.apiService.putProfile(request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"accountUpdated\"),\n    });\n  };\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle>{{ data.apiKeyTitle | i18n }}</span>\n    <div bitDialogContent>\n      <p bitTypography=\"body1\">{{ data.apiKeyDescription | i18n }}</p>\n      <app-user-verification-form-input formControlName=\"masterPassword\" *ngIf=\"!clientSecret\">\n      </app-user-verification-form-input>\n      <bit-callout type=\"warning\" *ngIf=\"clientSecret\">{{ data.apiKeyWarning | i18n }}</bit-callout>\n      <bit-callout\n        type=\"info\"\n        title=\"{{ 'oauth2ClientCredentials' | i18n }}\"\n        icon=\"bwi-key\"\n        *ngIf=\"clientSecret\"\n      >\n        <p bitTypography=\"body1\" class=\"tw-mb-1\">\n          <strong>client_id:</strong><br />\n          <code>{{ clientId }}</code>\n        </p>\n        <p bitTypography=\"body1\" class=\"tw-mb-1\">\n          <strong>client_secret:</strong><br />\n          <code>{{ clientSecret }}</code>\n        </p>\n        <p bitTypography=\"body1\" class=\"tw-mb-1\">\n          <strong>scope:</strong><br />\n          <code>{{ data.scope }}</code>\n        </p>\n        <p bitTypography=\"body1\" class=\"tw-mb-0\">\n          <strong>grant_type:</strong><br />\n          <code>{{ data.grantType }}</code>\n        </p>\n      </bit-callout>\n    </div>\n    <div bitDialogFooter>\n      <button type=\"submit\" buttonType=\"primary\" *ngIf=\"!clientSecret\" bitButton bitFormButton>\n        <span>{{ (data.isRotation ? \"rotateApiKey\" : \"viewApiKey\") | i18n }}</span>\n      </button>\n      <button type=\"button\" bitButton bitFormButton bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </div>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"@bitwarden/common/auth/models/response/api-key.response\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport type ApiKeyDialogData = {\n  keyType: string;\n  isRotation?: boolean;\n  entityId: string;\n  postKey: (entityId: string, request: SecretVerificationRequest) => Promise<ApiKeyResponse>;\n  scope: string;\n  grantType: string;\n  apiKeyTitle: string;\n  apiKeyWarning: string;\n  apiKeyDescription: string;\n};\n@Component({\n  selector: \"app-api-key\",\n  templateUrl: \"api-key.component.html\",\n})\nexport class ApiKeyComponent {\n  clientId: string;\n  clientSecret: string;\n\n  formGroup = this.formBuilder.group({\n    masterPassword: [null as Verification, [Validators.required]],\n  });\n  constructor(\n    @Inject(DIALOG_DATA) protected data: ApiKeyDialogData,\n    private formBuilder: FormBuilder,\n    private userVerificationService: UserVerificationService,\n  ) {}\n\n  submit = async () => {\n    if (this.formGroup.invalid) {\n      this.formGroup.markAllAsTouched();\n      return;\n    }\n    const response = await this.userVerificationService\n      .buildRequest(this.formGroup.value.masterPassword)\n      .then((request) => this.data.postKey(this.data.entityId, request));\n    this.clientSecret = response.apiKey;\n    this.clientId = `${this.data.keyType}.${this.data.entityId}`;\n  };\n  /**\n   * Strongly typed helper to open a ApiKeyComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open = (dialogService: DialogService, config: DialogConfig<ApiKeyDialogData>) => {\n    return dialogService.open(ApiKeyComponent, config);\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorDuoRequest extends SecretVerificationRequest {\n  clientId: string;\n  clientSecret: string;\n  host: string;\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" *ngIf=\"authed\" autocomplete=\"off\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <span bitTypography=\"body1\">Duo</span>\n    </span>\n    <ng-container bitDialogContent>\n      <ng-container *ngIf=\"enabled\">\n        <app-callout type=\"success\" title=\"{{ 'enabled' | i18n }}\" icon=\"bwi bwi-check-circle\">\n          {{ \"twoStepLoginProviderEnabled\" | i18n }}\n        </app-callout>\n        <img class=\"tw-float-right tw-ml-3 mfaType2\" alt=\"Duo logo\" />\n        <strong>{{ \"twoFactorDuoClientId\" | i18n }}:</strong> {{ clientId }}\n        <br />\n        <strong>{{ \"twoFactorDuoClientSecret\" | i18n }}:</strong> {{ clientSecret }}\n        <br />\n        <strong>{{ \"twoFactorDuoApiHostname\" | i18n }}:</strong> {{ host }}\n      </ng-container>\n      <ng-container *ngIf=\"!enabled\">\n        <img class=\"tw-float-right tw-ml-3 mfaType2\" alt=\"Duo logo\" />\n        <p bitTypography=\"body1\">{{ \"twoFactorDuoDesc\" | i18n }}</p>\n        <bit-form-field>\n          <bit-label>{{ \"twoFactorDuoClientId\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"clientId\" appInputVerbatim />\n        </bit-form-field>\n        <bit-form-field>\n          <bit-label>{{ \"twoFactorDuoClientSecret\" | i18n }}</bit-label>\n          <input bitInput type=\"password\" formControlName=\"clientSecret\" appInputVerbatim />\n        </bit-form-field>\n        <bit-form-field>\n          <bit-label>{{ \"twoFactorDuoApiHostname\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"text\"\n            formControlName=\"host\"\n            placeholder=\"{{ 'ex' | i18n }} api-xxxxxxxx.duosecurity.com\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n      </ng-container>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n        <span *ngIf=\"!enabled\">{{ \"enable\" | i18n }}</span>\n        <span *ngIf=\"enabled\">{{ \"disable\" | i18n }}</span>\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { UpdateTwoFactorDuoRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-duo.request\";\nimport { TwoFactorDuoResponse } from \"@bitwarden/common/auth/models/response/two-factor-duo.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorSetupMethodBaseComponent } from \"./two-factor-setup-method-base.component\";\n\n@Component({\n  selector: \"app-two-factor-setup-duo\",\n  templateUrl: \"two-factor-setup-duo.component.html\",\n})\nexport class TwoFactorSetupDuoComponent\n  extends TwoFactorSetupMethodBaseComponent\n  implements OnInit\n{\n  @Output() onChangeStatus: EventEmitter<boolean> = new EventEmitter();\n\n  type = TwoFactorProviderType.Duo;\n  formGroup = this.formBuilder.group({\n    clientId: [\"\", [Validators.required]],\n    clientSecret: [\"\", [Validators.required]],\n    host: [\"\", [Validators.required]],\n  });\n  override componentName = \"app-two-factor-duo\";\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: TwoFactorDuoComponentConfig,\n    apiService: ApiService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    userVerificationService: UserVerificationService,\n    dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    private dialogRef: DialogRef,\n    protected toastService: ToastService,\n  ) {\n    super(\n      apiService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      userVerificationService,\n      dialogService,\n      toastService,\n    );\n  }\n\n  get clientId() {\n    return this.formGroup.get(\"clientId\").value;\n  }\n  get clientSecret() {\n    return this.formGroup.get(\"clientSecret\").value;\n  }\n  get host() {\n    return this.formGroup.get(\"host\").value;\n  }\n  set clientId(value: string) {\n    this.formGroup.get(\"clientId\").setValue(value);\n  }\n  set clientSecret(value: string) {\n    this.formGroup.get(\"clientSecret\").setValue(value);\n  }\n  set host(value: string) {\n    this.formGroup.get(\"host\").setValue(value);\n  }\n\n  async ngOnInit() {\n    if (!this.data?.authResponse) {\n      throw Error(\"TwoFactorDuoComponent requires a TwoFactorDuoResponse to initialize\");\n    }\n\n    super.auth(this.data.authResponse);\n    this.processResponse(this.data.authResponse.response);\n\n    if (this.data.organizationId) {\n      this.type = TwoFactorProviderType.OrganizationDuo;\n      this.organizationId = this.data.organizationId;\n    }\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n    if (this.enabled) {\n      await this.disableMethod();\n    } else {\n      await this.enable();\n    }\n    this.onChangeStatus.emit(this.enabled);\n  };\n\n  protected async enable() {\n    const request = await this.buildRequestModel(UpdateTwoFactorDuoRequest);\n    request.clientId = this.clientId;\n    request.clientSecret = this.clientSecret;\n    request.host = this.host;\n\n    let response: TwoFactorDuoResponse;\n\n    if (this.organizationId != null) {\n      response = await this.apiService.putTwoFactorOrganizationDuo(this.organizationId, request);\n    } else {\n      response = await this.apiService.putTwoFactorDuo(request);\n    }\n\n    this.processResponse(response);\n    this.onUpdated.emit(true);\n  }\n\n  onClose = () => {\n    this.dialogRef.close(this.enabled);\n  };\n\n  private processResponse(response: TwoFactorDuoResponse) {\n    this.clientId = response.clientId;\n    this.clientSecret = response.clientSecret;\n    this.host = response.host;\n    this.enabled = response.enabled;\n  }\n\n  /**\n   * Strongly typed helper to open a TwoFactorDuoComponentComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open = (\n    dialogService: DialogService,\n    config: DialogConfig<TwoFactorDuoComponentConfig>,\n  ) => {\n    return dialogService.open<boolean>(TwoFactorSetupDuoComponent, config);\n  };\n}\n\ntype TwoFactorDuoComponentConfig = {\n  authResponse: AuthResponse<TwoFactorDuoResponse>;\n  organizationId?: string;\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Output } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { TwoFactorProviderRequest } from \"@bitwarden/common/auth/models/request/two-factor-provider.request\";\nimport { AuthResponseBase } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n/**\n * Base class for two-factor setup components (ex: email, yubikey, webauthn, duo).\n */\n@Directive()\nexport abstract class TwoFactorSetupMethodBaseComponent {\n  @Output() onUpdated = new EventEmitter<boolean>();\n\n  type: TwoFactorProviderType;\n  organizationId: string;\n  twoFactorProviderType = TwoFactorProviderType;\n  enabled = false;\n  authed = false;\n\n  protected hashedSecret: string;\n  protected verificationType: VerificationType;\n  protected componentName = \"\";\n\n  constructor(\n    protected apiService: ApiService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected logService: LogService,\n    protected userVerificationService: UserVerificationService,\n    protected dialogService: DialogService,\n    protected toastService: ToastService,\n  ) {}\n\n  protected auth(authResponse: AuthResponseBase) {\n    this.hashedSecret = authResponse.secret;\n    this.verificationType = authResponse.verificationType;\n    this.authed = true;\n  }\n\n  /** @deprecated used for formPromise flows.*/\n  protected async enable(enableFunction: () => Promise<void>) {\n    try {\n      await enableFunction();\n      this.onUpdated.emit(true);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  /**\n   * @deprecated used for formPromise flows.\n   * TODO: Remove this method when formPromises are removed from all flows.\n   * */\n  protected async disable(promise: Promise<unknown>) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"disable\" },\n      content: { key: \"twoStepDisableDesc\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      const request = await this.buildRequestModel(TwoFactorProviderRequest);\n      request.type = this.type;\n      if (this.organizationId != null) {\n        promise = this.apiService.putTwoFactorOrganizationDisable(this.organizationId, request);\n      } else {\n        promise = this.apiService.putTwoFactorDisable(request);\n      }\n      await promise;\n      this.enabled = false;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"twoStepDisabled\"),\n      });\n      this.onUpdated.emit(false);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  protected async disableMethod() {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"disable\" },\n      content: { key: \"twoStepDisableDesc\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    const request = await this.buildRequestModel(TwoFactorProviderRequest);\n    request.type = this.type;\n    if (this.organizationId != null) {\n      await this.apiService.putTwoFactorOrganizationDisable(this.organizationId, request);\n    } else {\n      await this.apiService.putTwoFactorDisable(request);\n    }\n    this.enabled = false;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"twoStepDisabled\"),\n    });\n    this.onUpdated.emit(false);\n  }\n\n  protected async buildRequestModel<T extends SecretVerificationRequest>(\n    requestClass: new () => T,\n  ) {\n    return this.userVerificationService.buildRequest(\n      {\n        secret: this.hashedSecret,\n        type: this.verificationType,\n      },\n      requestClass,\n      true,\n    );\n  }\n}\n","<bit-dialog dialogSize=\"default\">\n  <span bitDialogTitle>\n    {{ \"twoStepLogin\" | i18n }}\n    <span bitTypography=\"body1\">{{ \"recoveryCodeTitle\" | i18n }}</span>\n  </span>\n  <ng-container *ngIf=\"authed\" bitDialogContent>\n    <ng-container *ngIf=\"code\">\n      <p bitTypography=\"body1\" class=\"tw-text-center\">{{ \"twoFactorRecoveryYourCode\" | i18n }}:</p>\n      <code class=\"tw-text-lg tw-w-full tw-flex tw-justify-center\">{{ code }}</code>\n    </ng-container>\n    <ng-container *ngIf=\"!code\">\n      {{ \"twoFactorRecoveryNoCode\" | i18n }}\n    </ng-container>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"button\" buttonType=\"primary\" (click)=\"print()\" *ngIf=\"code\">\n      {{ \"printCode\" | i18n }}\n    </button>\n    <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorRecoverResponse } from \"@bitwarden/common/auth/models/response/two-factor-recover.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-two-factor-recovery\",\n  templateUrl: \"two-factor-recovery.component.html\",\n})\nexport class TwoFactorRecoveryComponent {\n  type = -1;\n  code: string;\n  authed: boolean;\n  twoFactorProviderType = TwoFactorProviderType;\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: any,\n    private i18nService: I18nService,\n  ) {\n    this.auth(data.response);\n  }\n\n  auth(authResponse: any) {\n    this.authed = true;\n    this.processResponse(authResponse.response);\n  }\n\n  print() {\n    const w = window.open();\n    w.document.write(\n      '<div style=\"font-size: 18px; text-align: center;\">' +\n        \"<p>\" +\n        this.i18nService.t(\"twoFactorRecoveryYourCode\") +\n        \":</p>\" +\n        \"<code style=\\\"font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;\\\">\" +\n        this.code +\n        \"</code></div>\" +\n        '<p style=\"text-align: center;\">' +\n        new Date() +\n        \"</p>\",\n    );\n    w.onafterprint = () => w.close();\n    w.print();\n  }\n\n  private formatString(s: string) {\n    if (s == null) {\n      return null;\n    }\n    return s\n      .replace(/(.{4})/g, \"$1 \")\n      .trim()\n      .toUpperCase();\n  }\n\n  private processResponse(response: TwoFactorRecoverResponse) {\n    this.code = this.formatString(response.code);\n  }\n\n  static open(dialogService: DialogService, config: DialogConfig<any>) {\n    return dialogService.open(TwoFactorRecoveryComponent, config);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TwoFactorProviderRequest } from \"./two-factor-provider.request\";\n\nexport class DisableTwoFactorAuthenticatorRequest extends TwoFactorProviderRequest {\n  key: string;\n  userVerificationToken: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorAuthenticatorRequest extends SecretVerificationRequest {\n  token: string;\n  key: string;\n  userVerificationToken: string;\n}\n","<form *ngIf=\"authed\" [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\">\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <span bitTypography=\"body1\">{{ \"authenticatorAppTitle\" | i18n }}</span>\n    </span>\n    <ng-container bitDialogContent>\n      <ng-container *ngIf=\"enabled\">\n        <bit-callout type=\"success\" title=\"{{ 'enabled' | i18n }}\" icon=\"bwi-check-circle\">\n          <p bitTypography=\"body1\">{{ \"twoStepLoginProviderEnabled\" | i18n }}</p>\n          {{ \"twoStepAuthenticatorReaddDesc\" | i18n }}\n        </bit-callout>\n        <p bitTypography=\"body1\">{{ \"twoStepAuthenticatorNeedApp\" | i18n }}</p>\n      </ng-container>\n      <ng-container *ngIf=\"!enabled\">\n        <p>\n          {{ \"twoStepAuthenticatorInstructionPrefix\" | i18n }}\n          <a\n            bitLink\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            (click)=\"launchExternalUrl('https://getaegis.app')\"\n            >Aegis</a\n          >\n          {{ \"twoStepAuthenticatorInstructionInfix1\" | i18n }}\n          <a\n            bitLink\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            (click)=\"launchExternalUrl('https://2fas.com')\"\n            >2FAS</a\n          >\n          {{ \"twoStepAuthenticatorInstructionInfix2\" | i18n }}\n          <a\n            bitLink\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            (click)=\"launchBitwardenUrl('https://bitwarden.com/products/authenticator/')\"\n            >Bitwarden Authenticator</a\n          >\n          {{ \"twoStepAuthenticatorInstructionSuffix\" | i18n }}\n        </p>\n\n        <p class=\"text-center\">\n          <a\n            href=\"https://apps.apple.com/ca/app/bitwarden-authenticator/id6497335175\"\n            target=\"_blank\"\n          >\n            <img\n              src=\"../../../images/download_apple_appstore.svg\"\n              alt=\"Download on App Store\"\n              max-width=\"120\"\n              height=\"40\"\n            />\n          </a>\n\n          <!--Margin to ensure compliance with google play badge usage guidelines (https://partnermarketinghub.withgoogle.com/brands/google-play/visual-identity/badge-guidelines/#:~:text=The%20clear%20space%20surrounding%20the%20badge%20must%20be%20equal%20to%20one%2Dquarter%20of%20the%20height%20of%20the%20badge.)-->\n          <a\n            href=\"https://play.google.com/store/apps/details?id=com.bitwarden.authenticator\"\n            target=\"_blank\"\n          >\n            <img\n              src=\"../../../images/download_google_playstore.svg\"\n              alt=\"Get it on Google Play\"\n              max-width=\"120\"\n              height=\"40\"\n              style=\"margin-left: 10px\"\n            />\n          </a>\n        </p>\n        {{ \"twoStepAuthenticatorScanCodeV2\" | i18n }}\n      </ng-container>\n      <hr *ngIf=\"enabled\" />\n      <p class=\"tw-text-center tw-mb-0\">\n        <ng-container *ngIf=\"qrScriptError\" class=\"tw-mt-2\">\n          <i class=\"bwi bwi-error tw-text-3xl tw-text-danger\" aria-hidden=\"true\"></i>\n          <p>\n            {{ \"twoStepAuthenticatorQRCanvasError\" | i18n }}\n          </p>\n        </ng-container>\n        <canvas *ngIf=\"!qrScriptError\" id=\"qr\"></canvas>\n        <br />\n        <code appA11yTitle=\"{{ 'key' | i18n }}\">{{ key }}</code>\n      </p>\n      <bit-form-field *ngIf=\"!enabled\" [disableMargin]=\"true\">\n        <bit-label>{{ \"twoStepAuthenticatorEnterCodeV2\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"token\" appInputVerbatim />\n      </bit-form-field>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button\n        bitButton\n        bitFormButton\n        type=\"submit\"\n        buttonType=\"primary\"\n        (click)=\"validateTokenControl()\"\n      >\n        {{ (enabled ? \"disable\" : \"enable\") | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { DisableTwoFactorAuthenticatorRequest } from \"@bitwarden/common/auth/models/request/disable-two-factor-authenticator.request\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-authenticator.request\";\nimport { TwoFactorAuthenticatorResponse } from \"@bitwarden/common/auth/models/response/two-factor-authenticator.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorSetupMethodBaseComponent } from \"./two-factor-setup-method-base.component\";\n\n// NOTE: There are additional options available but these are just the ones we are current using.\n// See: https://github.com/neocotic/qrious#examples\ninterface QRiousOptions {\n  element: HTMLElement;\n  value: string;\n  size: number;\n}\n\ndeclare global {\n  interface Window {\n    QRious: new (options: QRiousOptions) => unknown;\n  }\n}\n\n@Component({\n  selector: \"app-two-factor-setup-authenticator\",\n  templateUrl: \"two-factor-setup-authenticator.component.html\",\n})\nexport class TwoFactorSetupAuthenticatorComponent\n  extends TwoFactorSetupMethodBaseComponent\n  implements OnInit, OnDestroy\n{\n  @Output() onChangeStatus = new EventEmitter<boolean>();\n  type = TwoFactorProviderType.Authenticator;\n  key: string;\n  private userVerificationToken: string;\n\n  override componentName = \"app-two-factor-authenticator\";\n  qrScriptError = false;\n  private qrScript: HTMLScriptElement;\n\n  formGroup = this.formBuilder.group({\n    token: new FormControl(null, [Validators.required, Validators.minLength(6)]),\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: AuthResponse<TwoFactorAuthenticatorResponse>,\n    private dialogRef: DialogRef,\n    apiService: ApiService,\n    i18nService: I18nService,\n    userVerificationService: UserVerificationService,\n    private formBuilder: FormBuilder,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    private accountService: AccountService,\n    dialogService: DialogService,\n    private configService: ConfigService,\n    protected toastService: ToastService,\n  ) {\n    super(\n      apiService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      userVerificationService,\n      dialogService,\n      toastService,\n    );\n    this.qrScript = window.document.createElement(\"script\");\n    this.qrScript.src = \"scripts/qrious.min.js\";\n    this.qrScript.async = true;\n  }\n\n  async ngOnInit() {\n    window.document.body.appendChild(this.qrScript);\n    await this.auth(this.data);\n  }\n\n  ngOnDestroy() {\n    window.document.body.removeChild(this.qrScript);\n  }\n\n  validateTokenControl() {\n    this.formGroup.controls.token.markAsTouched();\n  }\n\n  async auth(authResponse: AuthResponse<TwoFactorAuthenticatorResponse>) {\n    super.auth(authResponse);\n    return this.processResponse(authResponse.response);\n  }\n\n  submit = async () => {\n    if (this.formGroup.invalid && !this.enabled) {\n      return;\n    }\n    if (this.enabled) {\n      await this.disableMethod();\n      this.dialogRef.close(this.enabled);\n    } else {\n      await this.enable();\n    }\n    this.onChangeStatus.emit(this.enabled);\n  };\n\n  protected async enable() {\n    const request = await this.buildRequestModel(UpdateTwoFactorAuthenticatorRequest);\n    request.token = this.formGroup.value.token;\n    request.key = this.key;\n    request.userVerificationToken = this.userVerificationToken;\n\n    const response = await this.apiService.putTwoFactorAuthenticator(request);\n    await this.processResponse(response);\n    this.onUpdated.emit(true);\n  }\n\n  protected override async disableMethod() {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"disable\" },\n      content: { key: \"twoStepDisableDesc\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    const request = await this.buildRequestModel(DisableTwoFactorAuthenticatorRequest);\n    request.type = this.type;\n    request.key = this.key;\n    request.userVerificationToken = this.userVerificationToken;\n    await this.apiService.deleteTwoFactorAuthenticator(request);\n    this.enabled = false;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"twoStepDisabled\"),\n    });\n    this.onUpdated.emit(false);\n  }\n\n  private async processResponse(response: TwoFactorAuthenticatorResponse) {\n    this.formGroup.get(\"token\").setValue(null);\n    this.enabled = response.enabled;\n    this.key = response.key;\n    this.userVerificationToken = response.userVerificationToken;\n\n    await this.waitForQRiousToLoadOrError().catch((error) => {\n      this.logService.error(error);\n      this.qrScriptError = true;\n    });\n\n    await this.createQRCode();\n  }\n\n  private async waitForQRiousToLoadOrError(): Promise<void> {\n    // Check if QRious is already loaded or if there was an error loading it either way don't wait for it to try and load again\n    if (typeof window.QRious !== \"undefined\" || this.qrScriptError) {\n      return Promise.resolve();\n    }\n\n    return new Promise((resolve, reject) => {\n      this.qrScript.onload = () => resolve();\n      this.qrScript.onerror = () =>\n        reject(new Error(this.i18nService.t(\"twoStepAuthenticatorQRCanvasError\")));\n    });\n  }\n\n  private async createQRCode() {\n    if (this.qrScriptError) {\n      return;\n    }\n    const email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n    new window.QRious({\n      element: document.getElementById(\"qr\"),\n      value:\n        \"otpauth://totp/Vaultwarden:\" +\n        Utils.encodeRFC3986URIComponent(email) +\n        \"?secret=\" +\n        encodeURIComponent(this.key) +\n        \"&issuer=Vaultwarden\",\n      size: 160,\n    });\n  }\n\n  static open(\n    dialogService: DialogService,\n    config: DialogConfig<AuthResponse<TwoFactorAuthenticatorResponse>>,\n  ) {\n    return dialogService.open<boolean>(TwoFactorSetupAuthenticatorComponent, config);\n  }\n\n  async launchExternalUrl(url: string) {\n    const hostname = new URL(url).hostname;\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.i18nService.t(\"continueToExternalUrlTitle\", hostname),\n      content: this.i18nService.t(\"continueToExternalUrlDesc\"),\n      type: \"info\",\n      acceptButtonText: { key: \"continue\" },\n    });\n    if (confirmed) {\n      this.platformUtilsService.launchUri(url);\n    }\n  }\n\n  async launchBitwardenUrl(url: string) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.i18nService.t(\"twoStepContinueToBitwardenUrlTitle\"),\n      content: this.i18nService.t(\"twoStepContinueToBitwardenUrlDesc\"),\n      type: \"info\",\n      acceptButtonText: { key: \"continue\" },\n    });\n    if (confirmed) {\n      this.platformUtilsService.launchUri(url);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorEmailRequest extends SecretVerificationRequest {\n  token: string;\n  email: string;\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" *ngIf=\"authed\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <span bitTypography=\"body1\">{{ \"emailTitle\" | i18n }}</span>\n    </span>\n    <ng-container bitDialogContent>\n      <ng-container *ngIf=\"enabled\">\n        <bit-callout type=\"success\" title=\"{{ 'enabled' | i18n }}\" icon=\"bwi-check-circle\">\n          {{ \"twoStepLoginProviderEnabled\" | i18n }}\n        </bit-callout>\n        <strong>{{ \"email\" | i18n }}:</strong> {{ email }}\n      </ng-container>\n      <ng-container *ngIf=\"!enabled\">\n        <p class=\"tw-flex\">\n          <span class=\"tw-mr-3\">{{ \"twoFactorEmailDesc\" | i18n }}</span>\n          <img class=\"tw-float-right tw-ml-auto mfaType1\" alt=\"Email logo\" />\n        </p>\n        <bit-form-field>\n          <bit-label>1. {{ \"twoFactorEmailEnterEmail\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"text\"\n            formControlName=\"email\"\n            inputmode=\"email\"\n            appInputVerbatim=\"false\"\n          />\n        </bit-form-field>\n        <div class=\"tw-mb-3 tw-flex tw-items-center\">\n          <button bitButton type=\"button\" buttonType=\"primary\" [bitAction]=\"sendEmail\">\n            {{ \"sendEmail\" | i18n }}\n          </button>\n          <span class=\"tw-text-success tw-ml-3\" *ngIf=\"sentEmail\">\n            {{ \"emailSent\" | i18n }}\n          </span>\n        </div>\n        <bit-form-field>\n          <bit-label>2. {{ \"twoFactorEmailEnterCode\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"token\" appInputVerbatim />\n        </bit-form-field>\n      </ng-container>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n        <span *ngIf=\"!enabled\">{{ \"enable\" | i18n }}</span>\n        <span *ngIf=\"enabled\">{{ \"disable\" | i18n }}</span>\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { UpdateTwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-email.request\";\nimport { TwoFactorEmailResponse } from \"@bitwarden/common/auth/models/response/two-factor-email.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorSetupMethodBaseComponent } from \"./two-factor-setup-method-base.component\";\n\n@Component({\n  selector: \"app-two-factor-setup-email\",\n  templateUrl: \"two-factor-setup-email.component.html\",\n  outputs: [\"onUpdated\"],\n})\nexport class TwoFactorSetupEmailComponent\n  extends TwoFactorSetupMethodBaseComponent\n  implements OnInit\n{\n  @Output() onChangeStatus: EventEmitter<boolean> = new EventEmitter();\n  type = TwoFactorProviderType.Email;\n  sentEmail: string;\n  emailPromise: Promise<unknown>;\n  override componentName = \"app-two-factor-email\";\n  formGroup = this.formBuilder.group({\n    token: [\"\", [Validators.required]],\n    email: [\"\", [Validators.email, Validators.required]],\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: AuthResponse<TwoFactorEmailResponse>,\n    apiService: ApiService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    userVerificationService: UserVerificationService,\n    private accountService: AccountService,\n    dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    private dialogRef: DialogRef,\n    protected toastService: ToastService,\n  ) {\n    super(\n      apiService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      userVerificationService,\n      dialogService,\n      toastService,\n    );\n  }\n  get token() {\n    return this.formGroup.get(\"token\").value;\n  }\n  set token(value: string) {\n    this.formGroup.get(\"token\").setValue(value);\n  }\n  get email() {\n    return this.formGroup.get(\"email\").value;\n  }\n  set email(value: string) {\n    this.formGroup.get(\"email\").setValue(value);\n  }\n\n  async ngOnInit() {\n    await this.auth(this.data);\n  }\n\n  auth(authResponse: AuthResponse<TwoFactorEmailResponse>) {\n    super.auth(authResponse);\n    return this.processResponse(authResponse.response);\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n\n    if (this.enabled) {\n      await this.disableEmail();\n      this.onChangeStatus.emit(false);\n    } else {\n      if (this.formGroup.invalid) {\n        return;\n      }\n      await this.enable();\n      this.onChangeStatus.emit(true);\n    }\n  };\n\n  private disableEmail() {\n    return super.disableMethod();\n  }\n\n  sendEmail = async () => {\n    const request = await this.buildRequestModel(TwoFactorEmailRequest);\n    request.email = this.email;\n    this.emailPromise = this.apiService.postTwoFactorEmailSetup(request);\n    await this.emailPromise;\n    this.sentEmail = this.email;\n  };\n\n  protected async enable() {\n    const request = await this.buildRequestModel(UpdateTwoFactorEmailRequest);\n    request.email = this.email;\n    request.token = this.token;\n\n    const response = await this.apiService.putTwoFactorEmail(request);\n    await this.processResponse(response);\n    this.onUpdated.emit(true);\n  }\n\n  onClose = () => {\n    this.dialogRef.close(this.enabled);\n  };\n\n  private async processResponse(response: TwoFactorEmailResponse) {\n    this.token = null;\n    this.email = response.email;\n    this.enabled = response.enabled;\n    if (!this.enabled && (this.email == null || this.email === \"\")) {\n      this.email = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n      );\n    }\n  }\n  /**\n   * Strongly typed helper to open a TwoFactorEmailComponentComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open(\n    dialogService: DialogService,\n    config: DialogConfig<AuthResponse<TwoFactorEmailResponse>>,\n  ) {\n    return dialogService.open<boolean>(TwoFactorSetupEmailComponent, config);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorWebAuthnDeleteRequest extends SecretVerificationRequest {\n  id: number;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorWebAuthnRequest extends SecretVerificationRequest {\n  deviceResponse: PublicKeyCredential;\n  name: string;\n  id: number;\n}\n","<form *ngIf=\"authed\" [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\">\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <span bitTypography=\"body1\">{{ \"webAuthnTitle\" | i18n }}</span>\n    </span>\n    <ng-container bitDialogContent>\n      <app-callout\n        type=\"success\"\n        title=\"{{ 'enabled' | i18n }}\"\n        icon=\"bwi bwi-check-circle\"\n        *ngIf=\"enabled\"\n      >\n        {{ \"twoStepLoginProviderEnabled\" | i18n }}\n      </app-callout>\n      <app-callout type=\"warning\">\n        <p bitTypography=\"body1\">{{ \"twoFactorWebAuthnWarning\" | i18n }}</p>\n        <ul class=\"tw-mb-0\">\n          <li>{{ \"twoFactorWebAuthnSupportWeb\" | i18n }}</li>\n        </ul>\n      </app-callout>\n      <img class=\"tw-float-right tw-ml-5 mfaType7\" alt=\"FIDO2 WebAuthn logo\" />\n      <ul class=\"bwi-ul\">\n        <li *ngFor=\"let k of keys; let i = index\" #removeKeyBtn [appApiAction]=\"k.removePromise\">\n          <i class=\"bwi bwi-li bwi-key\"></i>\n          <span *ngIf=\"!k.configured || !k.name\" bitTypography=\"body1\" class=\"tw-font-bold\">\n            {{ \"webAuthnkeyX\" | i18n: i + 1 }}\n          </span>\n          <span *ngIf=\"k.configured && k.name\" bitTypography=\"body1\" class=\"tw-font-bold\">\n            {{ k.name }}\n          </span>\n          <ng-container *ngIf=\"k.configured && !$any(removeKeyBtn).loading\">\n            <ng-container *ngIf=\"k.migrated\">\n              <span>{{ \"webAuthnMigrated\" | i18n }}</span>\n            </ng-container>\n          </ng-container>\n          <ng-container *ngIf=\"keysConfiguredCount > 1 && k.configured\">\n            <i\n              class=\"bwi bwi-spin bwi-spinner tw-text-muted bwi-fw\"\n              title=\"{{ 'loading' | i18n }}\"\n              *ngIf=\"$any(removeKeyBtn).loading\"\n              aria-hidden=\"true\"\n            ></i>\n            -\n            <a bitLink href=\"#\" appStopClick (click)=\"remove(k)\">{{ \"remove\" | i18n }}</a>\n          </ng-container>\n        </li>\n      </ul>\n      <hr />\n      <p bitTypography=\"body1\">{{ \"twoFactorWebAuthnAdd\" | i18n }}:</p>\n      <ol bitTypography=\"body1\">\n        <li>{{ \"twoFactorU2fGiveName\" | i18n }}</li>\n        <li>{{ \"twoFactorU2fPlugInReadKey\" | i18n }}</li>\n        <li>{{ \"twoFactorU2fTouchButton\" | i18n }}</li>\n        <li>{{ \"twoFactorU2fSaveForm\" | i18n }}</li>\n      </ol>\n      <div class=\"tw-flex\">\n        <bit-form-field class=\"tw-basis-1/2\">\n          <bit-label>{{ \"name\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"name\" />\n        </bit-form-field>\n      </div>\n      <button\n        bitButton\n        bitFormButton\n        type=\"button\"\n        [bitAction]=\"readKey\"\n        buttonType=\"secondary\"\n        [disabled]=\"$any(readKeyBtn).loading || webAuthnListening || !keyIdAvailable\"\n        class=\"tw-mr-2\"\n        #readKeyBtn\n      >\n        {{ \"readKey\" | i18n }}\n      </button>\n      <ng-container *ngIf=\"$any(readKeyBtn).loading\">\n        <i class=\"bwi bwi-spinner bwi-spin tw-text-muted\" aria-hidden=\"true\"></i>\n      </ng-container>\n      <ng-container *ngIf=\"!$any(readKeyBtn).loading\">\n        <ng-container *ngIf=\"webAuthnListening\">\n          <i class=\"bwi bwi-spinner bwi-spin tw-text-muted\" aria-hidden=\"true\"></i>\n          {{ \"twoFactorU2fWaiting\" | i18n }}...\n        </ng-container>\n        <ng-container *ngIf=\"webAuthnResponse\">\n          <i class=\"bwi bwi-check-circle tw-text-success\" aria-hidden=\"true\"></i>\n          {{ \"twoFactorU2fClickSave\" | i18n }}\n        </ng-container>\n        <ng-container *ngIf=\"webAuthnError\">\n          <i class=\"bwi bwi-exclamation-triangle tw-text-danger\" aria-hidden=\"true\"></i>\n          {{ \"twoFactorU2fProblemReadingTryAgain\" | i18n }}\n        </ng-container>\n      </ng-container>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button\n        bitButton\n        bitFormButton\n        type=\"submit\"\n        buttonType=\"primary\"\n        [disabled]=\"!webAuthnResponse\"\n      >\n        {{ \"save\" | i18n }}\n      </button>\n      <button\n        bitButton\n        bitFormButton\n        *ngIf=\"enabled\"\n        type=\"button\"\n        buttonType=\"secondary\"\n        [bitAction]=\"disable\"\n      >\n        {{ \"disableAllKeys\" | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, NgZone } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-web-authn.request\";\nimport {\n  ChallengeResponse,\n  TwoFactorWebAuthnResponse,\n} from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorSetupMethodBaseComponent } from \"./two-factor-setup-method-base.component\";\n\ninterface Key {\n  id: number;\n  name: string;\n  configured: boolean;\n  migrated?: boolean;\n  removePromise: Promise<TwoFactorWebAuthnResponse> | null;\n}\n\n@Component({\n  selector: \"app-two-factor-setup-webauthn\",\n  templateUrl: \"two-factor-setup-webauthn.component.html\",\n})\nexport class TwoFactorSetupWebAuthnComponent extends TwoFactorSetupMethodBaseComponent {\n  type = TwoFactorProviderType.WebAuthn;\n  name: string;\n  keys: Key[];\n  keyIdAvailable: number = null;\n  keysConfiguredCount = 0;\n  webAuthnError: boolean;\n  webAuthnListening: boolean;\n  webAuthnResponse: PublicKeyCredential;\n  challengePromise: Promise<ChallengeResponse>;\n  formPromise: Promise<TwoFactorWebAuthnResponse>;\n\n  override componentName = \"app-two-factor-webauthn\";\n\n  protected formGroup = new FormGroup({\n    name: new FormControl({ value: \"\", disabled: !this.keyIdAvailable }),\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: AuthResponse<TwoFactorWebAuthnResponse>,\n    private dialogRef: DialogRef,\n    apiService: ApiService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    private ngZone: NgZone,\n    logService: LogService,\n    userVerificationService: UserVerificationService,\n    dialogService: DialogService,\n    toastService: ToastService,\n  ) {\n    super(\n      apiService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      userVerificationService,\n      dialogService,\n      toastService,\n    );\n    this.auth(data);\n  }\n\n  auth(authResponse: AuthResponse<TwoFactorWebAuthnResponse>) {\n    super.auth(authResponse);\n    this.processResponse(authResponse.response);\n  }\n\n  submit = async () => {\n    if (this.webAuthnResponse == null || this.keyIdAvailable == null) {\n      // Should never happen.\n      return Promise.reject();\n    }\n    return this.enable();\n  };\n\n  protected async enable() {\n    const request = await this.buildRequestModel(UpdateTwoFactorWebAuthnRequest);\n    request.deviceResponse = this.webAuthnResponse;\n    request.id = this.keyIdAvailable;\n    request.name = this.formGroup.value.name;\n\n    const response = await this.apiService.putTwoFactorWebAuthn(request);\n    this.processResponse(response);\n    this.toastService.showToast({\n      title: this.i18nService.t(\"success\"),\n      message: this.i18nService.t(\"twoFactorProviderEnabled\"),\n      variant: \"success\",\n    });\n    this.onUpdated.emit(response.enabled);\n  }\n\n  disable = async () => {\n    await this.disableMethod();\n    if (!this.enabled) {\n      this.onUpdated.emit(this.enabled);\n      this.dialogRef.close();\n    }\n  };\n\n  async remove(key: Key) {\n    if (this.keysConfiguredCount <= 1 || key.removePromise != null) {\n      return;\n    }\n    const name = key.name != null ? key.name : this.i18nService.t(\"webAuthnkeyX\", key.id as any);\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: name,\n      content: { key: \"removeU2fConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n    const request = await this.buildRequestModel(UpdateTwoFactorWebAuthnDeleteRequest);\n    request.id = key.id;\n    try {\n      key.removePromise = this.apiService.deleteTwoFactorWebAuthn(request);\n      const response = await key.removePromise;\n      key.removePromise = null;\n      await this.processResponse(response);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  readKey = async () => {\n    if (this.keyIdAvailable == null) {\n      return;\n    }\n    const request = await this.buildRequestModel(SecretVerificationRequest);\n    this.challengePromise = this.apiService.getTwoFactorWebAuthnChallenge(request);\n    const challenge = await this.challengePromise;\n    this.readDevice(challenge);\n  };\n\n  private readDevice(webAuthnChallenge: ChallengeResponse) {\n    // eslint-disable-next-line\n    console.log(\"listening for key...\");\n    this.resetWebAuthn(true);\n\n    navigator.credentials\n      .create({\n        publicKey: webAuthnChallenge,\n      })\n      .then((data: PublicKeyCredential) => {\n        this.ngZone.run(() => {\n          this.webAuthnListening = false;\n          this.webAuthnResponse = data;\n        });\n      })\n      .catch((err) => {\n        // eslint-disable-next-line\n        console.error(err);\n        this.resetWebAuthn(false);\n        // TODO: Should we display the actual error?\n        this.webAuthnError = true;\n      });\n  }\n\n  private resetWebAuthn(listening = false) {\n    this.webAuthnResponse = null;\n    this.webAuthnError = false;\n    this.webAuthnListening = listening;\n  }\n\n  private processResponse(response: TwoFactorWebAuthnResponse) {\n    this.resetWebAuthn();\n    this.keys = [];\n    this.keyIdAvailable = null;\n    this.formGroup.get(\"name\").enable();\n    this.formGroup.get(\"name\").setValue(null);\n    this.keysConfiguredCount = 0;\n    for (let i = 1; i <= 5; i++) {\n      if (response.keys != null) {\n        const key = response.keys.filter((k) => k.id === i);\n        if (key.length > 0) {\n          this.keysConfiguredCount++;\n          this.keys.push({\n            id: i,\n            name: key[0].name,\n            configured: true,\n            migrated: key[0].migrated,\n            removePromise: null,\n          });\n          continue;\n        }\n      }\n      this.keys.push({ id: i, name: null, configured: false, removePromise: null });\n      if (this.keyIdAvailable == null) {\n        this.keyIdAvailable = i;\n      }\n    }\n    this.enabled = response.enabled;\n    this.onUpdated.emit(this.enabled);\n  }\n\n  static open(\n    dialogService: DialogService,\n    config: DialogConfig<AuthResponse<TwoFactorWebAuthnResponse>>,\n  ) {\n    return dialogService.open<boolean>(TwoFactorSetupWebAuthnComponent, config);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateTwoFactorYubikeyOtpRequest extends SecretVerificationRequest {\n  key1: string;\n  key2: string;\n  key3: string;\n  key4: string;\n  key5: string;\n  nfc: boolean;\n}\n","<form *ngIf=\"authed\" [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\">\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <span bitTypography=\"body1\">YubiKey</span>\n    </span>\n    <ng-container bitDialogContent>\n      <app-callout\n        *ngIf=\"enabled\"\n        type=\"success\"\n        title=\"{{ 'enabled' | i18n }}\"\n        icon=\"bwi bwi-check-circle\"\n      >\n        {{ \"twoStepLoginProviderEnabled\" | i18n }}\n      </app-callout>\n      <app-callout type=\"warning\">\n        <p bitTypography=\"body1\">{{ \"twoFactorYubikeyWarning\" | i18n }}</p>\n        <ul class=\"tw-mb-0\" bitTypography=\"body1\">\n          <li>{{ \"twoFactorYubikeySupportUsb\" | i18n }}</li>\n          <li>{{ \"twoFactorYubikeySupportMobile\" | i18n }}</li>\n        </ul>\n      </app-callout>\n      <img class=\"tw-float-right mfaType3\" alt=\"YubiKey OTP security key logo\" />\n      <p bitTypography=\"body1\">{{ \"twoFactorYubikeyAdd\" | i18n }}:</p>\n      <ol bitTypography=\"body1\">\n        <li>{{ \"twoFactorYubikeyPlugIn\" | i18n }}</li>\n        <li>{{ \"twoFactorYubikeySelectKey\" | i18n }}</li>\n        <li>{{ \"twoFactorYubikeyTouchButton\" | i18n }}</li>\n        <li>{{ \"twoFactorYubikeySaveForm\" | i18n }}</li>\n      </ol>\n      <hr />\n      <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\" formArrayName=\"formKeys\">\n        <div class=\"tw-col-span-6\" *ngFor=\"let k of keys; let i = index\">\n          <div [formGroupName]=\"i\">\n            <bit-label>{{ \"yubikeyX\" | i18n: i + 1 }}</bit-label>\n            <bit-form-field *ngIf=\"!keys[i].existingKey\">\n              <input bitInput type=\"password\" formControlName=\"key\" appInputVerbatim />\n            </bit-form-field>\n            <div class=\"tw-flex tw-justify-between tw-mb-6\" *ngIf=\"keys[i].existingKey\">\n              <span class=\"tw-mr-2 tw-self-center\">{{ keys[i].existingKey }}</span>\n              <button\n                bitIconButton=\"bwi-minus-circle\"\n                type=\"button\"\n                buttonType=\"danger\"\n                (click)=\"remove(i)\"\n                appA11yTitle=\"{{ 'remove' | i18n }}\"\n              ></button>\n            </div>\n          </div>\n        </div>\n      </div>\n      <p bitTypography=\"body1\" class=\"tw-font-bold tw-mb-2\">{{ \"nfcSupport\" | i18n }}</p>\n      <bit-form-control [disableMargin]=\"true\">\n        <bit-label>{{ \"twoFactorYubikeySupportsNfc\" | i18n }}</bit-label>\n        <input bitCheckbox type=\"checkbox\" formControlName=\"anyKeyHasNfc\" />\n        <bit-hint class=\"tw-text-sm\">{{ \"twoFactorYubikeySupportsNfcDesc\" | i18n }}</bit-hint>\n      </bit-form-control>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n        {{ \"save\" | i18n }}\n      </button>\n      <button\n        *ngIf=\"enabled\"\n        bitButton\n        bitFormButton\n        type=\"button\"\n        buttonType=\"secondary\"\n        [bitAction]=\"disable\"\n      >\n        {{ \"disableAllKeys\" | i18n }}\n      </button>\n      <button\n        bitButton\n        bitFormButton\n        type=\"button\"\n        buttonType=\"secondary\"\n        [bitDialogClose]=\"this.enabled\"\n      >\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormArray, FormBuilder, FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"@bitwarden/common/auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { TwoFactorYubiKeyResponse } from \"@bitwarden/common/auth/models/response/two-factor-yubi-key.response\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { TwoFactorSetupMethodBaseComponent } from \"./two-factor-setup-method-base.component\";\n\ninterface Key {\n  key: string;\n  existingKey: string;\n}\n\n@Component({\n  selector: \"app-two-factor-setup-yubikey\",\n  templateUrl: \"two-factor-setup-yubikey.component.html\",\n})\nexport class TwoFactorSetupYubiKeyComponent\n  extends TwoFactorSetupMethodBaseComponent\n  implements OnInit\n{\n  type = TwoFactorProviderType.Yubikey;\n  keys: Key[];\n  anyKeyHasNfc = false;\n\n  formPromise: Promise<TwoFactorYubiKeyResponse>;\n  disablePromise: Promise<unknown>;\n\n  override componentName = \"app-two-factor-yubikey\";\n  formGroup: FormGroup<{\n    formKeys: FormArray<FormControl<Key>>;\n    anyKeyHasNfc: FormControl<boolean>;\n  }>;\n\n  get keysFormControl() {\n    return this.formGroup.controls.formKeys.controls;\n  }\n\n  get anyKeyHasNfcFormControl() {\n    return this.formGroup.controls.anyKeyHasNfc;\n  }\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: AuthResponse<TwoFactorYubiKeyResponse>,\n    apiService: ApiService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    userVerificationService: UserVerificationService,\n    dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    protected toastService: ToastService,\n  ) {\n    super(\n      apiService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      userVerificationService,\n      dialogService,\n      toastService,\n    );\n  }\n\n  ngOnInit() {\n    this.auth(this.data);\n    this.formGroup = this.formBuilder.group({\n      formKeys: this.formBuilder.array<Key>([]),\n      anyKeyHasNfc: this.formBuilder.control(this.anyKeyHasNfc),\n    });\n    this.refreshFormArrayData();\n  }\n\n  refreshFormArrayData() {\n    const formKeys = <FormArray>this.formGroup.get(\"formKeys\");\n    formKeys.clear();\n    this.keys.forEach((val) => {\n      const fb = this.formBuilder.group({\n        key: val.key,\n        existingKey: val.existingKey,\n      });\n      formKeys.push(fb);\n    });\n  }\n\n  auth(authResponse: AuthResponse<TwoFactorYubiKeyResponse>) {\n    super.auth(authResponse);\n    this.processResponse(authResponse.response);\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n    await this.enable();\n  };\n\n  disable = async () => {\n    await this.disableMethod();\n\n    if (!this.enabled) {\n      for (let i = 0; i < this.keys.length; i++) {\n        this.remove(i);\n      }\n    }\n  };\n\n  protected async enable() {\n    const keys = this.formGroup.controls.formKeys.value;\n    const request = await this.buildRequestModel(UpdateTwoFactorYubikeyOtpRequest);\n    request.key1 = keys != null && keys.length > 0 ? keys[0].key : null;\n    request.key2 = keys != null && keys.length > 1 ? keys[1].key : null;\n    request.key3 = keys != null && keys.length > 2 ? keys[2].key : null;\n    request.key4 = keys != null && keys.length > 3 ? keys[3].key : null;\n    request.key5 = keys != null && keys.length > 4 ? keys[4].key : null;\n    request.nfc = this.formGroup.value.anyKeyHasNfc;\n\n    this.processResponse(await this.apiService.putTwoFactorYubiKey(request));\n    this.refreshFormArrayData();\n    this.toastService.showToast({\n      title: this.i18nService.t(\"success\"),\n      message: this.i18nService.t(\"yubikeysUpdated\"),\n      variant: \"success\",\n    });\n    this.onUpdated.emit(this.enabled);\n  }\n\n  remove(pos: number) {\n    this.keys[pos].key = null;\n    this.keys[pos].existingKey = null;\n\n    this.keysFormControl[pos].setValue({\n      existingKey: null,\n      key: null,\n    });\n  }\n\n  private processResponse(response: TwoFactorYubiKeyResponse) {\n    this.enabled = response.enabled;\n    this.anyKeyHasNfc = response.nfc || !response.enabled;\n    this.keys = [\n      { key: response.key1, existingKey: this.padRight(response.key1) },\n      { key: response.key2, existingKey: this.padRight(response.key2) },\n      { key: response.key3, existingKey: this.padRight(response.key3) },\n      { key: response.key4, existingKey: this.padRight(response.key4) },\n      { key: response.key5, existingKey: this.padRight(response.key5) },\n    ];\n  }\n\n  private padRight(str: string, character = \"•\", size = 44) {\n    if (str == null || character == null || str.length >= size) {\n      return str;\n    }\n    const max = (size - str.length) / character.length;\n    for (let i = 0; i < max; i++) {\n      str += character;\n    }\n    return str;\n  }\n\n  static open(\n    dialogService: DialogService,\n    config: DialogConfig<AuthResponse<TwoFactorYubiKeyResponse>>,\n  ) {\n    return dialogService.open<boolean>(TwoFactorSetupYubiKeyComponent, config);\n  }\n}\n","<app-header *ngIf=\"organizationId != null\"></app-header>\n\n<bit-container>\n  <div class=\"tabbed-header\" *ngIf=\"organizationId == null\">\n    <h1 *ngIf=\"!organizationId || !isEnterpriseOrg\">{{ \"twoStepLogin\" | i18n }}</h1>\n    <h1 *ngIf=\"organizationId && isEnterpriseOrg\">{{ \"twoStepLoginEnforcement\" | i18n }}</h1>\n  </div>\n\n  <p *ngIf=\"!organizationId\">{{ \"twoStepLoginDesc\" | i18n }}</p>\n  <ng-container *ngIf=\"organizationId\">\n    <p>\n      <ng-container *ngIf=\"isEnterpriseOrg; else teamsDescription\">\n        {{ \"twoStepLoginEnterpriseDescStart\" | i18n }}\n        <a bitLink routerLink=\"../policies\">{{ \"twoStepLoginPolicy\" | i18n }}.</a>\n        <br />\n        {{ \"twoStepLoginOrganizationDuoDesc\" | i18n }}\n        <br />\n        <br />\n        <p>{{ \"twoStepLoginOrganizationSsoDesc\" | i18n }}</p>\n      </ng-container>\n      <ng-template #teamsDescription>\n        {{ \"twoStepLoginTeamsDesc\" | i18n }}\n        <br />\n        {{ \"twoStepLoginOrganizationDuoDesc\" | i18n }}\n      </ng-template>\n    </p>\n  </ng-container>\n  <bit-callout type=\"warning\" *ngIf=\"!organizationId\">\n    <p>{{ \"twoStepLoginRecoveryWarning\" | i18n }}</p>\n    <button type=\"button\" bitButton buttonType=\"secondary\" (click)=\"recoveryCode()\">\n      {{ \"viewRecoveryCode\" | i18n }}\n    </button>\n  </bit-callout>\n  <h2 [ngClass]=\"{ 'mt-5': !organizationId }\">\n    {{ \"providers\" | i18n }}\n    <small *ngIf=\"loading\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-fw text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </small>\n  </h2>\n  <bit-callout type=\"warning\" *ngIf=\"showPolicyWarning\">\n    {{ \"twoStepLoginPolicyUserWarning\" | i18n }}\n  </bit-callout>\n  <ul class=\"list-group list-group-2fa\">\n    <li *ngFor=\"let p of providers\" class=\"list-group-item d-flex align-items-center\">\n      <div class=\"logo-2fa d-flex justify-content-center\">\n        <auth-two-factor-icon [provider]=\"p.type\" [name]=\"p.name\" />\n      </div>\n      <div class=\"mx-4\">\n        <h3 class=\"mb-0\">\n          <div\n            class=\"font-weight-semibold tw-text-base\"\n            [style]=\"p.enabled || p.premium ? 'display:inline-block' : ''\"\n          >\n            {{ p.name }}\n          </div>\n          <ng-container *ngIf=\"p.enabled\">\n            <i\n              class=\"bwi bwi-check text-success bwi-fw\"\n              title=\"{{ 'enabled' | i18n }}\"\n              aria-hidden=\"true\"\n            ></i>\n            <span class=\"tw-sr-only\">{{ \"enabled\" | i18n }}</span>\n          </ng-container>\n          <app-premium-badge *ngIf=\"p.premium\"></app-premium-badge>\n        </h3>\n        {{ p.description }}\n      </div>\n      <div class=\"ml-auto\">\n        <button\n          type=\"button\"\n          bitButton\n          buttonType=\"secondary\"\n          [disabled]=\"!(canAccessPremium$ | async) && p.premium\"\n          (click)=\"manage(p.type)\"\n        >\n          {{ \"manage\" | i18n }}\n        </button>\n      </div>\n    </li>\n  </ul>\n</bit-container>\n\n<ng-template #duoTemplate></ng-template>\n<ng-template #emailTemplate></ng-template>\n<ng-template #yubikeyTemplate></ng-template>\n<ng-template #webAuthnTemplate></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, OnDestroy, OnInit, Type, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport {\n  first,\n  firstValueFrom,\n  lastValueFrom,\n  Observable,\n  Subject,\n  Subscription,\n  takeUntil,\n  switchMap,\n} from \"rxjs\";\n\nimport { ModalRef } from \"@bitwarden/angular/components/modal/modal.ref\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorAuthenticatorResponse } from \"@bitwarden/common/auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"@bitwarden/common/auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"@bitwarden/common/auth/models/response/two-factor-email.response\";\nimport { TwoFactorWebAuthnResponse } from \"@bitwarden/common/auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"@bitwarden/common/auth/models/response/two-factor-yubi-key.response\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TwoFactorRecoveryComponent } from \"./two-factor-recovery.component\";\nimport { TwoFactorSetupAuthenticatorComponent } from \"./two-factor-setup-authenticator.component\";\nimport { TwoFactorSetupDuoComponent } from \"./two-factor-setup-duo.component\";\nimport { TwoFactorSetupEmailComponent } from \"./two-factor-setup-email.component\";\nimport { TwoFactorSetupWebAuthnComponent } from \"./two-factor-setup-webauthn.component\";\nimport { TwoFactorSetupYubiKeyComponent } from \"./two-factor-setup-yubikey.component\";\nimport { TwoFactorVerifyComponent } from \"./two-factor-verify.component\";\n\n@Component({\n  selector: \"app-two-factor-setup\",\n  templateUrl: \"two-factor-setup.component.html\",\n})\nexport class TwoFactorSetupComponent implements OnInit, OnDestroy {\n  @ViewChild(\"yubikeyTemplate\", { read: ViewContainerRef, static: true })\n  yubikeyModalRef: ViewContainerRef;\n\n  organizationId: string;\n  organization: Organization;\n  providers: any[] = [];\n  canAccessPremium$: Observable<boolean>;\n  showPolicyWarning = false;\n  loading = true;\n  modal: ModalRef;\n  formPromise: Promise<any>;\n\n  tabbedHeader = true;\n\n  protected destroy$ = new Subject<void>();\n  private twoFactorAuthPolicyAppliesToActiveUser: boolean;\n  protected twoFactorSetupSubscription: Subscription;\n\n  constructor(\n    protected dialogService: DialogService,\n    protected apiService: ApiService,\n    protected modalService: ModalService,\n    protected messagingService: MessagingService,\n    protected policyService: PolicyService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {\n    this.canAccessPremium$ = this.accountService.activeAccount$.pipe(\n      switchMap((account) =>\n        billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n      ),\n    );\n  }\n\n  async ngOnInit() {\n    for (const key in TwoFactorProviders) {\n      // eslint-disable-next-line\n      if (!TwoFactorProviders.hasOwnProperty(key)) {\n        continue;\n      }\n\n      const p = (TwoFactorProviders as any)[key];\n      if (this.filterProvider(p.type)) {\n        continue;\n      }\n\n      this.providers.push({\n        type: p.type,\n        name: p.name,\n        description: p.description,\n        enabled: false,\n        premium: p.premium,\n        sort: p.sort,\n      });\n    }\n\n    this.providers.sort((a: any, b: any) => a.sort - b.sort);\n\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.TwoFactorAuthentication)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((policyAppliesToActiveUser) => {\n        this.twoFactorAuthPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n      });\n\n    await this.load();\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async load() {\n    this.loading = true;\n    const providerList = await this.getTwoFactorProviders();\n    providerList.data.forEach((p) => {\n      this.providers.forEach((p2) => {\n        if (p.type === p2.type) {\n          p2.enabled = p.enabled;\n        }\n      });\n    });\n    this.evaluatePolicies();\n    this.loading = false;\n  }\n\n  async callTwoFactorVerifyDialog(type?: TwoFactorProviderType) {\n    const twoFactorVerifyDialogRef = TwoFactorVerifyComponent.open(this.dialogService, {\n      data: { type: type, organizationId: this.organizationId },\n    });\n    return await lastValueFrom(twoFactorVerifyDialogRef.closed);\n  }\n\n  async manage(type: TwoFactorProviderType) {\n    // clear any existing subscriptions before creating a new one\n    this.twoFactorSetupSubscription?.unsubscribe();\n\n    switch (type) {\n      case TwoFactorProviderType.Authenticator: {\n        const result: AuthResponse<TwoFactorAuthenticatorResponse> =\n          await this.callTwoFactorVerifyDialog(type);\n        if (!result) {\n          return;\n        }\n        const authComp: DialogRef<boolean, any> = TwoFactorSetupAuthenticatorComponent.open(\n          this.dialogService,\n          { data: result },\n        );\n        this.twoFactorSetupSubscription = authComp.componentInstance.onChangeStatus\n          .pipe(first(), takeUntil(this.destroy$))\n          .subscribe((enabled: boolean) => {\n            authComp.close();\n            this.updateStatus(enabled, TwoFactorProviderType.Authenticator);\n          });\n        break;\n      }\n      case TwoFactorProviderType.Yubikey: {\n        const result: AuthResponse<TwoFactorYubiKeyResponse> =\n          await this.callTwoFactorVerifyDialog(type);\n        if (!result) {\n          return;\n        }\n        const yubiComp: DialogRef<boolean, any> = TwoFactorSetupYubiKeyComponent.open(\n          this.dialogService,\n          { data: result },\n        );\n        yubiComp.componentInstance.onUpdated\n          .pipe(takeUntil(this.destroy$))\n          .subscribe((enabled: boolean) => {\n            this.updateStatus(enabled, TwoFactorProviderType.Yubikey);\n          });\n        break;\n      }\n      case TwoFactorProviderType.Duo: {\n        const result: AuthResponse<TwoFactorDuoResponse> =\n          await this.callTwoFactorVerifyDialog(type);\n        if (!result) {\n          return;\n        }\n        const duoComp: DialogRef<boolean, any> = TwoFactorSetupDuoComponent.open(\n          this.dialogService,\n          {\n            data: {\n              authResponse: result,\n            },\n          },\n        );\n        this.twoFactorSetupSubscription = duoComp.componentInstance.onChangeStatus\n          .pipe(first(), takeUntil(this.destroy$))\n          .subscribe((enabled: boolean) => {\n            duoComp.close();\n            this.updateStatus(enabled, TwoFactorProviderType.Duo);\n          });\n        break;\n      }\n      case TwoFactorProviderType.Email: {\n        const result: AuthResponse<TwoFactorEmailResponse> =\n          await this.callTwoFactorVerifyDialog(type);\n        if (!result) {\n          return;\n        }\n        const emailComp: DialogRef<boolean, any> = TwoFactorSetupEmailComponent.open(\n          this.dialogService,\n          {\n            data: result,\n          },\n        );\n        this.twoFactorSetupSubscription = emailComp.componentInstance.onChangeStatus\n          .pipe(first(), takeUntil(this.destroy$))\n          .subscribe((enabled: boolean) => {\n            emailComp.close();\n            this.updateStatus(enabled, TwoFactorProviderType.Email);\n          });\n        break;\n      }\n      case TwoFactorProviderType.WebAuthn: {\n        const result: AuthResponse<TwoFactorWebAuthnResponse> =\n          await this.callTwoFactorVerifyDialog(type);\n        if (!result) {\n          return;\n        }\n        const webAuthnComp: DialogRef<boolean, any> = TwoFactorSetupWebAuthnComponent.open(\n          this.dialogService,\n          { data: result },\n        );\n        this.twoFactorSetupSubscription = webAuthnComp.componentInstance.onUpdated\n          .pipe(first(), takeUntil(this.destroy$))\n          .subscribe((enabled: boolean) => {\n            webAuthnComp.close();\n            this.updateStatus(enabled, TwoFactorProviderType.WebAuthn);\n          });\n        break;\n      }\n      default:\n        break;\n    }\n  }\n\n  async recoveryCode() {\n    const result = await this.callTwoFactorVerifyDialog(-1 as TwoFactorProviderType);\n    if (result) {\n      const recoverComp = TwoFactorRecoveryComponent.open(this.dialogService, { data: result });\n      await lastValueFrom(recoverComp.closed);\n    }\n  }\n\n  async premiumRequired() {\n    if (!(await firstValueFrom(this.canAccessPremium$))) {\n      this.messagingService.send(\"premiumRequired\");\n      return;\n    }\n  }\n\n  protected getTwoFactorProviders() {\n    return this.apiService.getTwoFactorProviders();\n  }\n\n  protected filterProvider(type: TwoFactorProviderType) {\n    return type === TwoFactorProviderType.OrganizationDuo;\n  }\n\n  protected async openModal<T>(ref: ViewContainerRef, type: Type<T>): Promise<T> {\n    const [modal, childComponent] = await this.modalService.openViewRef(type, ref);\n    this.modal = modal;\n\n    return childComponent;\n  }\n\n  protected updateStatus(enabled: boolean, type: TwoFactorProviderType) {\n    if (!enabled && this.modal != null) {\n      this.modal.close();\n    }\n    this.providers.forEach((p) => {\n      if (p.type === type && enabled !== undefined) {\n        p.enabled = enabled;\n      }\n    });\n    this.evaluatePolicies();\n  }\n\n  private evaluatePolicies() {\n    if (this.organizationId == null && this.providers.filter((p) => p.enabled).length === 1) {\n      this.showPolicyWarning = this.twoFactorAuthPolicyAppliesToActiveUser;\n    } else {\n      this.showPolicyWarning = false;\n    }\n  }\n\n  get isEnterpriseOrg() {\n    return this.organization?.productTierType === ProductTierType.Enterprise;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, EventEmitter, Inject, Output } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\nimport { AuthResponse } from \"@bitwarden/common/auth/types/auth-response\";\nimport { TwoFactorResponse } from \"@bitwarden/common/auth/types/two-factor-response\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\ntype TwoFactorVerifyDialogData = {\n  type: TwoFactorProviderType;\n  organizationId: string;\n};\n\n@Component({\n  selector: \"app-two-factor-verify\",\n  templateUrl: \"two-factor-verify.component.html\",\n})\nexport class TwoFactorVerifyComponent {\n  type: TwoFactorProviderType;\n  organizationId: string;\n  @Output() onAuthed = new EventEmitter<AuthResponse<TwoFactorResponse>>();\n\n  formPromise: Promise<TwoFactorResponse>;\n\n  protected formGroup = new FormGroup({\n    secret: new FormControl<Verification | null>(null),\n  });\n  invalidSecret: boolean = false;\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: TwoFactorVerifyDialogData,\n    private dialogRef: DialogRef,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private userVerificationService: UserVerificationService,\n  ) {\n    this.type = data.type;\n    this.organizationId = data.organizationId;\n  }\n\n  submit = async () => {\n    try {\n      let hashedSecret: string;\n      this.formPromise = this.userVerificationService\n        .buildRequest(this.formGroup.value.secret)\n        .then((request) => {\n          hashedSecret =\n            this.formGroup.value.secret.type === VerificationType.MasterPassword\n              ? request.masterPasswordHash\n              : request.otp;\n          return this.apiCall(request);\n        });\n\n      const response = await this.formPromise;\n      this.dialogRef.close({\n        response: response,\n        secret: hashedSecret,\n        verificationType: this.formGroup.value.secret.type,\n      });\n    } catch (e) {\n      if (e instanceof ErrorResponse && e.statusCode === 400) {\n        this.invalidSecret = true;\n      }\n      throw e;\n    }\n  };\n\n  get dialogTitle(): string {\n    switch (this.type) {\n      case -1 as TwoFactorProviderType:\n        return this.i18nService.t(\"recoveryCodeTitle\");\n      case TwoFactorProviderType.Duo:\n        return \"Duo\";\n      case TwoFactorProviderType.Email:\n        return this.i18nService.t(\"emailTitle\");\n      case TwoFactorProviderType.WebAuthn:\n        return this.i18nService.t(\"webAuthnTitle\");\n      case TwoFactorProviderType.Authenticator:\n        return this.i18nService.t(\"authenticatorAppTitle\");\n      case TwoFactorProviderType.Yubikey:\n        return \"Yubikey\";\n    }\n  }\n\n  private apiCall(request: SecretVerificationRequest): Promise<TwoFactorResponse> {\n    switch (this.type) {\n      case -1 as TwoFactorProviderType:\n        return this.apiService.getTwoFactorRecover(request);\n      case TwoFactorProviderType.Duo:\n      case TwoFactorProviderType.OrganizationDuo:\n        if (this.organizationId != null) {\n          return this.apiService.getTwoFactorOrganizationDuo(this.organizationId, request);\n        } else {\n          return this.apiService.getTwoFactorDuo(request);\n        }\n      case TwoFactorProviderType.Email:\n        return this.apiService.getTwoFactorEmail(request);\n      case TwoFactorProviderType.WebAuthn:\n        return this.apiService.getTwoFactorWebAuthn(request);\n      case TwoFactorProviderType.Authenticator:\n        return this.apiService.getTwoFactorAuthenticator(request);\n      case TwoFactorProviderType.Yubikey:\n        return this.apiService.getTwoFactorYubiKey(request);\n    }\n  }\n\n  static open(dialogService: DialogService, config: DialogConfig<TwoFactorVerifyDialogData>) {\n    return dialogService.open<AuthResponse<any>>(TwoFactorVerifyComponent, config);\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\">\n    <span bitDialogTitle>\n      {{ \"twoStepLogin\" | i18n }}\n      <small class=\"tw-text-muted\">{{ dialogTitle }}</small>\n    </span>\n    <ng-container bitDialogContent>\n      <app-user-verification-form-input\n        formControlName=\"secret\"\n        name=\"secret\"\n        [(invalidSecret)]=\"invalidSecret\"\n      ></app-user-verification-form-input>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n        {{ \"continue\" | i18n }}\n      </button>\n      <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","import { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { SharedModule } from \"../../../../shared/shared.module\";\n\nimport { UserVerificationPromptComponent } from \"./user-verification-prompt.component\";\nimport { UserVerificationComponent } from \"./user-verification.component\";\n\n@NgModule({\n  imports: [SharedModule, FormsModule, ReactiveFormsModule],\n  declarations: [UserVerificationComponent, UserVerificationPromptComponent],\n  exports: [UserVerificationComponent, UserVerificationPromptComponent],\n})\nexport class UserVerificationModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { ModalRef } from \"../../components/modal/modal.ref\";\n\nexport interface UserVerificationPromptParams {\n  confirmDescription: string;\n  confirmButtonText: string;\n  modalTitle: string;\n}\n\n/**\n * Used to verify the user's identity (using their master password or email-based OTP for Key Connector users). You can customize all of the text in the modal.\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent instead.\n */\n@Directive()\nexport class UserVerificationPromptComponent {\n  confirmDescription = this.config.confirmDescription;\n  confirmButtonText = this.config.confirmButtonText;\n  modalTitle = this.config.modalTitle;\n\n  formGroup = this.formBuilder.group({\n    secret: this.formBuilder.control<Verification | null>(null),\n  });\n\n  protected invalidSecret = false;\n\n  constructor(\n    private modalRef: ModalRef,\n    protected config: UserVerificationPromptParams,\n    protected userVerificationService: UserVerificationService,\n    private formBuilder: FormBuilder,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n  ) {}\n\n  get secret() {\n    return this.formGroup.controls.secret;\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    try {\n      //Incorrect secret will throw an invalid password error.\n      await this.userVerificationService.verifyUser(this.secret.value);\n      this.invalidSecret = false;\n    } catch (e) {\n      this.invalidSecret = true;\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"error\"),\n        message: e.message,\n      });\n      return;\n    }\n\n    this.close(true);\n  };\n\n  close(success: boolean) {\n    this.modalRef.close(success);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport {\n  UserVerificationPromptComponent as BaseUserVerificationPrompt,\n  UserVerificationPromptParams,\n} from \"@bitwarden/angular/auth/components/user-verification-prompt.component\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n/**\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent instead.\n */\n@Component({\n  templateUrl: \"user-verification-prompt.component.html\",\n})\nexport class UserVerificationPromptComponent extends BaseUserVerificationPrompt {\n  constructor(\n    @Inject(DIALOG_DATA) data: UserVerificationPromptParams,\n    private dialogRef: DialogRef<boolean>,\n    userVerificationService: UserVerificationService,\n    formBuilder: FormBuilder,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    toastService: ToastService,\n  ) {\n    super(\n      null,\n      data,\n      userVerificationService,\n      formBuilder,\n      platformUtilsService,\n      i18nService,\n      toastService,\n    );\n  }\n\n  override close(success: boolean) {\n    this.dialogRef.close(success);\n  }\n}\n\n/**\n * Strongly typed helper to open a UserVerificationPrompt\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openUserVerificationPrompt = (\n  dialogService: DialogService,\n  config: DialogConfig<UserVerificationPromptParams>,\n) => {\n  return dialogService.open<boolean, UserVerificationPromptParams>(\n    UserVerificationPromptComponent,\n    config,\n  );\n};\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle>{{ modalTitle | i18n }}</span>\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">{{ confirmDescription | i18n }}</p>\n      <app-user-verification\n        [(invalidSecret)]=\"invalidSecret\"\n        formControlName=\"secret\"\n      ></app-user-verification>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ confirmButtonText | i18n }}\n      </button>\n      <button type=\"button\" bitButton bitFormButton buttonType=\"secondary\" bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ControlValueAccessor, FormControl, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Collects the user's master password, or if they are not using a password, prompts for an OTP via email.\n * This is exposed to the parent component via the ControlValueAccessor interface (e.g. bind it to a FormControl).\n * Use UserVerificationService to verify the user's input.\n *\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent or UserVerificationFormInputComponent instead.\n * Each client specific component should eventually be converted over to use one of these new components.\n */\n@Directive({\n  selector: \"app-user-verification\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class UserVerificationComponent implements ControlValueAccessor, OnInit, OnDestroy {\n  private _invalidSecret = false;\n  @Input()\n  get invalidSecret() {\n    return this._invalidSecret;\n  }\n  set invalidSecret(value: boolean) {\n    this._invalidSecret = value;\n    this.invalidSecretChange.emit(value);\n\n    // ISSUE: This is pretty hacky but unfortunately there is no way of knowing if the parent\n    // control has been marked as touched, see: https://github.com/angular/angular/issues/10887\n    // When that functionality has been added we should also look into forwarding reactive form\n    // controls errors so that we don't need a separate input/output `invalidSecret`.\n    if (value) {\n      this.secret.markAsTouched();\n    }\n    this.secret.updateValueAndValidity({ emitEvent: false });\n  }\n  @Output() invalidSecretChange = new EventEmitter<boolean>();\n\n  hasMasterPassword = true;\n  disableRequestOTP = false;\n  sentCode = false;\n\n  secret = new FormControl(\"\", [\n    Validators.required,\n    () => {\n      if (this.invalidSecret) {\n        return {\n          invalidSecret: {\n            message: this.hasMasterPassword\n              ? this.i18nService.t(\"incorrectPassword\")\n              : this.i18nService.t(\"incorrectCode\"),\n          },\n        };\n      }\n    },\n  ]);\n\n  private onChange: (value: Verification) => void;\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private keyService: KeyService,\n    private userVerificationService: UserVerificationService,\n    private i18nService: I18nService,\n  ) {}\n\n  async ngOnInit() {\n    this.hasMasterPassword = await this.userVerificationService.hasMasterPasswordAndMasterKeyHash();\n    this.processChanges(this.secret.value);\n\n    this.secret.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((secret: string) => this.processChanges(secret));\n  }\n\n  requestOTP = async () => {\n    if (!this.hasMasterPassword) {\n      this.disableRequestOTP = true;\n      try {\n        await this.userVerificationService.requestOTP();\n        this.sentCode = true;\n      } finally {\n        this.disableRequestOTP = false;\n      }\n    }\n  };\n\n  writeValue(obj: any): void {\n    this.secret.setValue(obj);\n  }\n\n  registerOnChange(fn: any): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: any): void {\n    // Not implemented\n  }\n\n  setDisabledState?(isDisabled: boolean): void {\n    this.disableRequestOTP = isDisabled;\n    if (isDisabled) {\n      this.secret.disable();\n    } else {\n      this.secret.enable();\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  protected processChanges(secret: string) {\n    this.invalidSecret = false;\n\n    if (this.onChange == null) {\n      return;\n    }\n\n    this.onChange({\n      type: this.hasMasterPassword ? VerificationType.MasterPassword : VerificationType.OTP,\n      secret: Utils.isNullOrWhitespace(secret) ? null : secret,\n    });\n  }\n}\n","<ng-container *ngIf=\"hasMasterPassword\">\n  <bit-form-field disableMargin>\n    <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n    <input\n      bitInput\n      id=\"masterPassword\"\n      type=\"password\"\n      name=\"MasterPasswordHash\"\n      [formControl]=\"secret\"\n      appAutofocus\n      appInputVerbatim\n    />\n    <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n    <bit-hint>{{ \"confirmIdentity\" | i18n }}</bit-hint>\n  </bit-form-field>\n</ng-container>\n<ng-container *ngIf=\"!hasMasterPassword\">\n  <div class=\"tw-mb-6\">\n    <label class=\"tw-block\">{{ \"sendVerificationCode\" | i18n }}</label>\n    <button type=\"button\" bitButton buttonType=\"secondary\" [bitAction]=\"requestOTP\" appAutofocus>\n      {{ \"sendCode\" | i18n }}\n    </button>\n    <span class=\"tw-ml-2 tw-text-success\" role=\"alert\" @sent *ngIf=\"sentCode\">\n      <i class=\"bwi bwi-check-circle\" aria-hidden=\"true\"></i>\n      {{ \"codeSent\" | i18n }}\n    </span>\n  </div>\n\n  <bit-form-field disableMargin>\n    <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n    <input\n      bitInput\n      type=\"text\"\n      id=\"verificationCode\"\n      name=\"verificationCode\"\n      [formControl]=\"secret\"\n      appInputVerbatim\n    />\n    <bit-hint>{{ \"confirmIdentity\" | i18n }}</bit-hint>\n  </bit-form-field>\n</ng-container>\n","import { animate, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\nimport { UserVerificationComponent as BaseComponent } from \"@bitwarden/angular/auth/components/user-verification.component\";\n\n/**\n * @deprecated Jan 24, 2024: Use new libs/auth UserVerificationDialogComponent or UserVerificationFormInputComponent instead.\n * Each client specific component should eventually be converted over to use one of these new components.\n */\n@Component({\n  selector: \"app-user-verification\",\n  templateUrl: \"user-verification.component.html\",\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      multi: true,\n      useExisting: UserVerificationComponent,\n    },\n  ],\n  animations: [\n    trigger(\"sent\", [\n      transition(\":enter\", [style({ opacity: 0 }), animate(\"100ms\", style({ opacity: 1 }))]),\n    ]),\n  ],\n})\nexport class UserVerificationComponent extends BaseComponent {}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\" [loading]=\"loading\">\n    <span bitDialogTitle class=\"tw-font-semibold\">\n      {{ dialogHeaderName }}\n    </span>\n    <div bitDialogContent>\n      <p>{{ \"upgradePlans\" | i18n }}</p>\n      <div class=\"tw-mb-3 tw-flex tw-justify-between\">\n        <span [hidden]=\"isSubscriptionCanceled\" class=\"tw-text-lg tw-pr-1 tw-font-bold\">{{\n          \"selectAPlan\" | i18n\n        }}</span>\n        <!-- Discount Badge -->\n        <div class=\"tw-flex tw-items-center tw-gap-2\">\n          <span\n            class=\"tw-mr-1\"\n            [hidden]=\"isSubscriptionCanceled\"\n            *ngIf=\"\n              this.discountPercentageFromSub > 0\n                ? discountPercentageFromSub\n                : this.discountPercentage && selectedInterval === planIntervals.Annually\n            \"\n            bitBadge\n            variant=\"success\"\n            >{{\n              \"upgradeDiscount\"\n                | i18n\n                  : (selectedInterval === planIntervals.Annually && discountPercentageFromSub == 0\n                      ? this.discountPercentage\n                      : this.discountPercentageFromSub)\n            }}</span\n          >\n          <!-- Plan Interval Toggle -->\n          <div class=\"tw-inline-block\">\n            <bit-toggle-group\n              [selected]=\"selectedInterval\"\n              (selectedChange)=\"updateInterval($event)\"\n            >\n              <bit-toggle\n                *ngFor=\"\n                  let planInterval of getPlanIntervals();\n                  trackBy: optimizedNgForRender;\n                  let i = index\n                \"\n                [value]=\"planInterval.value\"\n              >\n                {{ planInterval.name }}\n              </bit-toggle>\n            </bit-toggle-group>\n          </div>\n        </div>\n      </div>\n      <!-- Plan Selection Cards -->\n      <ng-container *ngIf=\"!loading && !selfHosted && this.passwordManagerPlans\">\n        <div\n          class=\"tw-grid tw-grid-flow-col tw-gap-4 tw-mb-4\"\n          [class]=\"'tw-grid-cols-' + selectableProducts.length\"\n        >\n          <div\n            *ngFor=\"\n              let selectableProduct of selectableProducts;\n              trackBy: manageSelectableProduct;\n              let i = index\n            \"\n            [ngClass]=\"getPlanCardContainerClasses(selectableProduct, i)\"\n            (click)=\"selectPlan(selectableProduct)\"\n            [attr.tabindex]=\"focusedIndex !== i || isCardDisabled(i) ? '-1' : '0'\"\n            class=\"product-card\"\n            (keyup)=\"onKeydown($event, i)\"\n            (focus)=\"onFocus(i)\"\n            [attr.aria-disabled]=\"isCardDisabled(i)\"\n            [id]=\"i + 'a_plan_card'\"\n          >\n            <div class=\"tw-relative\">\n              <div\n                *ngIf=\"\n                  selectableProduct.productTier === productTypes.Enterprise &&\n                  !isSubscriptionCanceled\n                \"\n                class=\"tw-bg-secondary-100 tw-text-center !tw-border-0 tw-text-sm tw-font-bold tw-py-1\"\n                [ngClass]=\"{\n                  'tw-bg-primary-700 !tw-text-contrast': selectableProduct === selectedPlan,\n                  'tw-bg-secondary-100': !(selectableProduct === selectedPlan),\n                }\"\n              >\n                {{ \"recommended\" | i18n }}\n              </div>\n              <div\n                class=\"tw-px-2 tw-pb-[4px]\"\n                [ngClass]=\"{\n                  'tw-py-1': !(selectableProduct === selectedPlan),\n                  'tw-py-0': selectableProduct === selectedPlan,\n                }\"\n              >\n                <h3\n                  class=\"tw-text-[1.25rem] tw-mt-[6px] tw-font-bold tw-mb-0 tw-leading-[2rem] tw-flex tw-items-center\"\n                >\n                  <span class=\"tw-capitalize tw-whitespace-nowrap\">{{\n                    selectableProduct.nameLocalizationKey | i18n\n                  }}</span>\n                  <span\n                    bitBadge\n                    variant=\"secondary\"\n                    *ngIf=\"selectableProduct === currentPlan\"\n                    class=\"tw-ml-2 tw-align-middle\"\n                  >\n                    {{ \"current\" | i18n }}</span\n                  >\n                </h3>\n                <span *ngIf=\"selectableProduct.productTier != productTypes.Free\">\n                  <ng-container\n                    *ngIf=\"selectableProduct.PasswordManager.basePrice && !acceptingSponsorship\"\n                  >\n                    <b class=\"tw-text-lg tw-font-semibold\">\n                      {{\n                        (selectableProduct.isAnnual\n                          ? selectableProduct.PasswordManager.basePrice / 12\n                          : selectableProduct.PasswordManager.basePrice\n                        ) | currency: \"$\"\n                      }}\n                    </b>\n                    <span class=\"tw-text-xs tw-px-0\"> /{{ \"monthPerMember\" | i18n }}</span>\n                    <b class=\"tw-text-sm tw-font-semibold\">\n                      <ng-container\n                        *ngIf=\"selectableProduct.PasswordManager.hasAdditionalSeatsOption\"\n                      >\n                        {{ (\"additionalUsers\" | i18n).toLowerCase() }}\n                        {{\n                          (selectableProduct.isAnnual\n                            ? selectableProduct.PasswordManager.seatPrice / 12\n                            : selectableProduct.PasswordManager.seatPrice\n                          ) | currency: \"$\"\n                        }}\n                        /{{ \"month\" | i18n }}\n                      </ng-container>\n                    </b>\n                  </ng-container>\n                </span>\n                <span\n                  *ngIf=\"\n                    !selectableProduct.PasswordManager.basePrice &&\n                    selectableProduct.PasswordManager.hasAdditionalSeatsOption\n                  \"\n                >\n                  <b class=\"tw-text-lg tw-font-semibold\"\n                    >{{\n                      \"costPerMember\"\n                        | i18n\n                          : ((selectableProduct.isAnnual\n                              ? selectableProduct.PasswordManager.seatPrice / 12\n                              : selectableProduct.PasswordManager.seatPrice\n                            )\n                              | currency: \"$\")\n                    }}\n                  </b>\n                  <span class=\"tw-text-xs tw-px-0\"> /{{ \"monthPerMember\" | i18n }}</span>\n                </span>\n                <span *ngIf=\"selectableProduct.productTier == productTypes.Free\"\n                  >{{ \"freeForever\" | i18n }}\n                </span>\n              </div>\n            </div>\n\n            <ng-container\n              *ngIf=\"\n                selectableProduct.productTier === productTypes.Enterprise;\n                else nonEnterprisePlans\n              \"\n            >\n              <p\n                class=\"tw-text-xs tw-px-2 tw-font-semibold tw-mb-1\"\n                *ngIf=\"organization.useSecretsManager\"\n              >\n                {{ \"bitwardenPasswordManager\" | i18n }}\n              </p>\n              <p class=\"tw-text-xs tw-px-2 tw-mb-1\">{{ \"enterprisePlanUpgradeMessage\" | i18n }}</p>\n\n              <ul class=\"bwi-ul tw-text-xs\">\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"includeEnterprisePolicies\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"passwordLessSso\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"accountRecovery\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"customRoles\" | i18n }}\n                </li>\n              </ul>\n\n              <p\n                class=\"tw-text-xs tw-px-2 tw-font-semibold tw-mb-1\"\n                *ngIf=\"organization.useSecretsManager\"\n              >\n                {{ \"bitwardenSecretsManager\" | i18n }}\n              </p>\n              <ul class=\"bwi-ul tw-text-xs\" *ngIf=\"organization.useSecretsManager\">\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"unlimitedSecretsStorage\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"unlimitedUsers\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"unlimitedProjects\" | i18n }}\n                </li>\n                <li>\n                  <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                  {{ \"UpTo50MachineAccounts\" | i18n }}\n                </li>\n              </ul>\n            </ng-container>\n            <ng-template #nonEnterprisePlans>\n              <ng-container\n                *ngIf=\"\n                  selectableProduct.productTier === productTypes.Teams &&\n                    teamsStarterPlanIsAvailable;\n                  else fullFeatureList\n                \"\n              >\n                <ul class=\"tw-px-2 tw-pb-2 tw-list-inside tw-mb-0 tw-text-xs\">\n                  <li>{{ \"includeAllTeamsStarterFeatures\" | i18n }}</li>\n                  <li>{{ \"chooseMonthlyOrAnnualBilling\" | i18n }}</li>\n                  <li>{{ \"abilityToAddMoreThanNMembers\" | i18n: 10 }}</li>\n                </ul>\n              </ng-container>\n              <ng-template #fullFeatureList>\n                <p\n                  class=\"tw-text-xs tw-px-2 tw-font-semibold tw-mb-1\"\n                  *ngIf=\"organization.useSecretsManager\"\n                >\n                  {{ \"bitwardenPasswordManager\" | i18n }}\n                </p>\n                <p\n                  *ngIf=\"selectableProduct.productTier === productTypes.Teams\"\n                  class=\"tw-text-xs tw-px-2 tw-mb-1\"\n                >\n                  {{ \"teamsPlanUpgradeMessage\" | i18n }}\n                </p>\n                <p\n                  *ngIf=\"selectableProduct.productTier === productTypes.Families\"\n                  class=\"tw-text-xs tw-px-2 tw-mb-1\"\n                >\n                  {{ \"familyPlanUpgradeMessage\" | i18n }}\n                </p>\n                <ul\n                  class=\"bwi-ul tw-text-xs tw-mb-1\"\n                  *ngIf=\"selectableProduct.productTier == productTypes.Families\"\n                >\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"premiumAccounts\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"unlimitedSharing\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"unlimitedCollections\" | i18n }}\n                  </li>\n                </ul>\n                <ul\n                  class=\"bwi-ul tw-text-xs\"\n                  *ngIf=\"selectableProduct.productTier == productTypes.Teams\"\n                >\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"secureDataSharing\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"eventLogMonitoring\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"directoryIntegration\" | i18n }}\n                  </li>\n                </ul>\n                <p\n                  class=\"tw-text-xs tw-px-2 tw-font-semibold tw-mb-1\"\n                  *ngIf=\"\n                    organization.useSecretsManager &&\n                    selectableProduct.productTier !== productTypes.Families\n                  \"\n                >\n                  {{ \"bitwardenSecretsManager\" | i18n }}\n                </p>\n                <ul\n                  class=\"bwi-ul tw-text-xs\"\n                  *ngIf=\"\n                    organization.useSecretsManager &&\n                    selectableProduct.productTier == productTypes.Teams\n                  \"\n                >\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"unlimitedSecretsStorage\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"unlimitedProjects\" | i18n }}\n                  </li>\n                  <li>\n                    <i class=\"bwi bwi-check tw-text-success bwi-li\" aria-hidden=\"true\"></i>\n                    {{ \"UpTo20MachineAccounts\" | i18n }}\n                  </li>\n                </ul>\n              </ng-template>\n            </ng-template>\n          </div>\n        </div>\n        <br />\n        <bit-callout\n          *ngIf=\"organization.useSecretsManager && !isSecretsManagerTrial()\"\n          type=\"info\"\n          title=\"SECRETS MANAGER SUBSCRIPTION\"\n        >\n          {{ \"secretsManagerSubscriptionInfo\" | i18n }}\n        </bit-callout>\n        <bit-callout\n          *ngIf=\"organization.useSecretsManager && isSecretsManagerTrial()\"\n          type=\"info\"\n          title=\"PASSWORD MANAGER SUBSCRIPTION\"\n        >\n          {{ \"secretsManagerComplimentaryPasswordManager\" | i18n }}\n        </bit-callout>\n        <br />\n      </ng-container>\n      <!-- Payment info -->\n      <ng-container\n        *ngIf=\"formGroup.value.productTier !== productTypes.Free || isSubscriptionCanceled\"\n      >\n        <h2 bitTypography=\"h4\">{{ \"paymentMethod\" | i18n }}</h2>\n        <p\n          *ngIf=\"\n            !showPayment && (paymentSource || billing?.paymentSource) && !isSubscriptionCanceled\n          \"\n        >\n          <i class=\"bwi bwi-fw\" [ngClass]=\"paymentSourceClasses\"></i>\n          {{\n            deprecateStripeSourcesAPI\n              ? paymentSource?.description\n              : billing?.paymentSource?.description\n          }}\n          <span class=\"ml-2 tw-text-primary-600 tw-cursor-pointer\" (click)=\"toggleShowPayment()\">\n            {{ \"changePaymentMethod\" | i18n }}\n          </span>\n          <a></a>\n        </p>\n        <ng-container *ngIf=\"canUpdatePaymentInformation()\">\n          <app-payment *ngIf=\"!deprecateStripeSourcesAPI\" [hideCredit]=\"true\" />\n          <app-payment-v2 *ngIf=\"deprecateStripeSourcesAPI\" [showAccountCredit]=\"false\" />\n          <app-manage-tax-information\n            [startWith]=\"taxInformation\"\n            (taxInformationChanged)=\"taxInformationChanged($event)\"\n          ></app-manage-tax-information>\n        </ng-container>\n        <div id=\"price\" class=\"tw-mt-4\">\n          <p class=\"tw-text-lg tw-mb-1\">\n            <span class=\"tw-font-semibold\"\n              >{{ \"total\" | i18n }}:\n              {{ total - calculateTotalAppliedDiscount(total) | currency: \"USD\" : \"$\" }} USD</span\n            >\n            <span class=\"tw-text-xs tw-font-light\"> / {{ selectedPlanInterval | i18n }}</span>\n            <button\n              (click)=\"toggleTotalOpened()\"\n              type=\"button\"\n              [bitIconButton]=\"totalOpened ? 'bwi-angle-down' : 'bwi-angle-up'\"\n              size=\"small\"\n              aria-hidden=\"true\"\n            ></button>\n          </p>\n        </div>\n        <!-- SM + PM and PM only cost summary -->\n        <div *ngIf=\"totalOpened && !isSecretsManagerTrial()\" class=\"row\">\n          <bit-hint class=\"col-6\" *ngIf=\"selectedInterval == planIntervals.Annually\">\n            <p class=\"tw-font-semibold tw-mb-1\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"passwordManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-1 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.basePrice\"\n            >\n              <span>\n                {{ passwordManagerSeats }}\n                {{ \"members\" | i18n }} &times;\n                {{\n                  (selectedPlan.isAnnual\n                    ? selectedPlan.PasswordManager.basePrice / 12\n                    : selectedPlan.PasswordManager.basePrice\n                  ) | currency: \"$\"\n                }}\n                /{{ \"year\" | i18n }}\n              </span>\n              <span>\n                <ng-container *ngIf=\"acceptingSponsorship; else notAcceptingSponsorship\">\n                  <span class=\"tw-line-through\">{{\n                    selectedPlan.PasswordManager.basePrice | currency: \"$\"\n                  }}</span>\n                  {{ \"freeWithSponsorship\" | i18n }}\n                </ng-container>\n                <ng-template #notAcceptingSponsorship>\n                  {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n                </ng-template>\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalSeatsOption\"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ passwordManagerSeats || 0 }}&nbsp;\n                <span *ngIf=\"!selectedPlan.PasswordManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.PasswordManager.seatPrice | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n\n              <span>\n                {{ passwordManagerSeatTotal(selectedPlan) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalStorageOption && storageGb > 0\"\n            >\n              <span>\n                {{ storageGb }}\n                {{ \"additionalStorageGbMessage\" | i18n }}\n                &times;\n                {{ additionalStoragePriceMonthly(selectedPlan) | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n              <span>{{ additionalStorageTotal(selectedPlan) | currency: \"$\" }}</span>\n            </p>\n            <!--Discount PM Annual-->\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"organization.useSecretsManager && !isSecretsManagerTrial()\"\n            >\n              <ng-container\n                *ngIf=\"selectedInterval == planIntervals.Annually && discountPercentageFromSub > 0\"\n              >\n                <span class=\"tw-text-xs\">\n                  {{ \"providerDiscount\" | i18n: this.discountPercentageFromSub | lowercase }}\n                </span>\n                <span class=\"tw-line-through tw-text-xs\">{{\n                  calculateTotalAppliedDiscount(\n                    passwordManagerSeatTotal(selectedPlan) + additionalStorageTotal(selectedPlan)\n                  ) | currency: \"$\"\n                }}</span>\n              </ng-container>\n            </p>\n            <!-- secrets manager summary for annual -->\n            <p class=\"tw-font-semibold tw-mt-3 tw-mb-1\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"secretsManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-1 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan?.SecretsManager?.basePrice && organization.useSecretsManager\"\n            >\n              <span>\n                {{ sub?.smSeats }}\n                {{ \"members\" | i18n }} &times;\n                {{\n                  (selectedPlan.isAnnual\n                    ? selectedPlan.SecretsManager.basePrice / 12\n                    : selectedPlan.SecretsManager.basePrice\n                  ) | currency: \"$\"\n                }}\n                /{{ \"year\" | i18n }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan?.SecretsManager?.hasAdditionalSeatsOption &&\n                organization.useSecretsManager\n              \"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.SecretsManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.smSeats || 0 }}&nbsp;\n                <span *ngIf=\"!selectedPlan.SecretsManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.SecretsManager.seatPrice | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n\n              <span>\n                {{ secretsManagerSeatTotal(selectedPlan, sub.smSeats) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan?.SecretsManager?.hasAdditionalServiceAccountOption &&\n                additionalServiceAccount > 0\n              \"\n            >\n              <span>\n                {{ additionalServiceAccount }}\n                {{ \"serviceAccounts\" | i18n | lowercase }}\n                &times;\n                {{ selectedPlan?.SecretsManager?.additionalPricePerServiceAccount | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n              <span>{{ additionalServiceAccountTotal(selectedPlan) | currency: \"$\" }}</span>\n            </p>\n            <!--Discount SM annual-->\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"organization.useSecretsManager && !isSecretsManagerTrial()\"\n            >\n              <ng-container\n                *ngIf=\"selectedInterval == planIntervals.Annually && discountPercentageFromSub > 0\"\n              >\n                <span class=\"tw-text-xs\">\n                  {{ \"providerDiscount\" | i18n: this.discountPercentageFromSub | lowercase }}\n                </span>\n                <span class=\"tw-line-through tw-text-xs\">{{\n                  calculateTotalAppliedDiscount(\n                    additionalServiceAccountTotal(selectedPlan) +\n                      secretsManagerSeatTotal(selectedPlan, sub.smSeats)\n                  ) | currency: \"$\"\n                }}</span>\n              </ng-container>\n            </p>\n          </bit-hint>\n          <bit-hint class=\"col-6\" *ngIf=\"selectedInterval == planIntervals.Monthly\">\n            <p class=\"tw-font-semibold tw-mb-1\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"passwordManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.basePrice\"\n            >\n              <span>\n                {{ \"basePrice\" | i18n }}:\n                {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }}\n              </span>\n              <span>\n                {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalSeatsOption\"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ passwordManagerSeats }}&nbsp;\n                <span *ngIf=\"!selectedPlan.PasswordManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.PasswordManager.seatPrice | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>\n                {{ passwordManagerSeatTotal(selectedPlan) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalStorageOption && storageGb > 0\"\n            >\n              <span>\n                {{ storageGb }}\n                {{ \"additionalStorageGbMessage\" | i18n }}\n                &times;\n                {{ additionalStoragePriceMonthly(selectedPlan) | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>{{\n                storageGb * selectedPlan.PasswordManager.additionalStoragePricePerGb | currency: \"$\"\n              }}</span>\n            </p>\n            <!--Discount PM Monthly-->\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"organization.useSecretsManager && !isSecretsManagerTrial()\"\n            >\n              <ng-container *ngIf=\"selectedInterval == planIntervals.Monthly\">\n                <span\n                  class=\"tw-text-xs\"\n                  [style.display]=\"discountPercentageFromSub > 0 ? 'block' : 'none'\"\n                >\n                  {{ \"providerDiscount\" | i18n: this.discountPercentageFromSub | lowercase }}\n                </span>\n                <span\n                  [style.display]=\"discountPercentageFromSub > 0 ? 'block' : 'none'\"\n                  class=\"tw-line-through tw-text-xs\"\n                  >{{ calculateTotalAppliedDiscount(total) | currency: \"$\" }}</span\n                >\n              </ng-container>\n            </p>\n            <!-- secrets manager summary for monthly -->\n            <p class=\"tw-font-semibold tw-mt-3 tw-mb-1\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"secretsManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.SecretsManager.basePrice && organization.useSecretsManager\"\n            >\n              <span>\n                {{ \"basePrice\" | i18n }}:\n                {{ selectedPlan.SecretsManager.basePrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }}\n              </span>\n              <span>\n                {{ selectedPlan.SecretsManager.basePrice | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalSeatsOption &&\n                organization.useSecretsManager\n              \"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.SecretsManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.smSeats }}&nbsp;\n                <span *ngIf=\"!selectedPlan.SecretsManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.SecretsManager.seatPrice | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>\n                {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalServiceAccountOption &&\n                additionalServiceAccount > 0\n              \"\n            >\n              <span>\n                {{ additionalServiceAccount }}\n                {{ \"serviceAccounts\" | i18n | lowercase }}\n                &times;\n                {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>{{ additionalServiceAccountTotal(selectedPlan) | currency: \"$\" }}</span>\n            </p>\n            <!--Discount SM Monthly-->\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"organization.useSecretsManager && !isSecretsManagerTrial()\"\n            >\n              <ng-container *ngIf=\"selectedInterval == planIntervals.Monthly\">\n                <span\n                  class=\"tw-text-xs\"\n                  [style.display]=\"discountPercentageFromSub > 0 ? 'block' : 'none'\"\n                >\n                  {{ \"providerDiscount\" | i18n: this.discountPercentageFromSub | lowercase }}\n                </span>\n                <span\n                  [style.display]=\"discountPercentageFromSub > 0 ? 'block' : 'none'\"\n                  class=\"tw-line-through tw-text-xs\"\n                  >{{\n                    additionalServiceAccountTotal(selectedPlan) +\n                      secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: \"$\"\n                  }}</span\n                >\n              </ng-container>\n            </p>\n          </bit-hint>\n        </div>\n        <!-- SM + Free PM cost summary -->\n        <div *ngIf=\"totalOpened && isSecretsManagerTrial()\" class=\"row\">\n          <bit-hint class=\"col-6\" *ngIf=\"selectedInterval == planIntervals.Annually\">\n            <!-- secrets manager summary for annual -->\n            <p class=\"tw-font-semibold tw-mt-2 tw-mb-0\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"secretsManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-1 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.SecretsManager.basePrice && organization.useSecretsManager\"\n            >\n              <span>\n                {{ sub?.smSeats }}\n                {{ \"members\" | i18n }} &times;\n                {{\n                  (selectedPlan.isAnnual\n                    ? selectedPlan.SecretsManager.basePrice / 12\n                    : selectedPlan.SecretsManager.basePrice\n                  ) | currency: \"$\"\n                }}\n                /{{ \"year\" | i18n }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalSeatsOption &&\n                organization.useSecretsManager\n              \"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.SecretsManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.smSeats || 0 }}&nbsp;\n                <span *ngIf=\"!selectedPlan.SecretsManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.SecretsManager.seatPrice | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n\n              <span>\n                {{ secretsManagerSeatTotal(selectedPlan, sub.smSeats) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalServiceAccountOption &&\n                additionalServiceAccount > 0\n              \"\n            >\n              <span>\n                {{ additionalServiceAccount }}\n                {{ \"serviceAccounts\" | i18n }}\n                &times;\n                {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n              <span>{{ additionalServiceAccountTotal(selectedPlan) | currency: \"$\" }}</span>\n            </p>\n            <!-- password manager summary for annual -->\n            <p class=\"tw-font-semibold tw-mt-3 tw-mb-0\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"passwordManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.basePrice\"\n            >\n              <span>\n                {{ sub?.seats }}\n                {{ \"members\" | i18n }} &times;\n                {{\n                  (selectedPlan.isAnnual\n                    ? selectedPlan.PasswordManager.basePrice / 12\n                    : selectedPlan.PasswordManager.basePrice\n                  ) | currency: \"$\"\n                }}\n                /{{ \"year\" | i18n }}\n              </span>\n              <span>\n                <ng-container *ngIf=\"acceptingSponsorship; else notAcceptingSponsorship\">\n                  <span class=\"tw-line-through\">{{\n                    selectedPlan.PasswordManager.basePrice | currency: \"$\"\n                  }}</span>\n                  {{ \"freeWithSponsorship\" | i18n }}\n                </ng-container>\n                <ng-template #notAcceptingSponsorship>\n                  {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n                </ng-template>\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalSeatsOption\"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.seats || 0 }}&nbsp;\n                <span *ngIf=\"!selectedPlan.PasswordManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.PasswordManager.seatPrice | currency: \"$\" }}\n                /{{ \"year\" | i18n }}\n              </span>\n\n              <span *ngIf=\"isSecretsManagerTrial()\">\n                {{ \"freeForOneYear\" | i18n }}\n              </span>\n\n              <span *ngIf=\"!isSecretsManagerTrial()\">\n                {{ passwordManagerSeatTotal(selectedPlan) | currency: \"$\" }}\n              </span>\n            </p>\n          </bit-hint>\n          <bit-hint class=\"col-6\" *ngIf=\"selectedInterval == planIntervals.Monthly\">\n            <!-- secrets manager summary for monthly -->\n            <p class=\"tw-font-semibold tw-mt-2 tw-mb-0\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"secretsManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.SecretsManager.basePrice && organization.useSecretsManager\"\n            >\n              <span>\n                {{ \"basePrice\" | i18n }}:\n                {{ selectedPlan.SecretsManager.basePrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }}\n              </span>\n              <span>\n                {{ selectedPlan.SecretsManager.basePrice | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalSeatsOption &&\n                organization.useSecretsManager\n              \"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.SecretsManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.smSeats }}&nbsp;\n                <span *ngIf=\"!selectedPlan.SecretsManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.SecretsManager.seatPrice | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>\n                {{ secretsManagerSeatTotal(selectedPlan, sub?.smSeats) | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"\n                selectedPlan.SecretsManager.hasAdditionalServiceAccountOption &&\n                additionalServiceAccount > 0\n              \"\n            >\n              <span>\n                {{ additionalServiceAccount }}\n                {{ \"serviceAccounts\" | i18n }}\n                &times;\n                {{ selectedPlan.SecretsManager.additionalPricePerServiceAccount | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span>{{ additionalServiceAccountTotal(selectedPlan) | currency: \"$\" }}</span>\n            </p>\n            <!-- password manager summary for monthly -->\n            <p class=\"tw-font-semibold tw-mt-3 tw-mb-0\" *ngIf=\"organization.useSecretsManager\">\n              {{ \"passwordManager\" | i18n }}\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.basePrice\"\n            >\n              <span>\n                {{ \"basePrice\" | i18n }}:\n                {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }}\n              </span>\n              <span>\n                {{ selectedPlan.PasswordManager.basePrice | currency: \"$\" }}\n              </span>\n            </p>\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"selectedPlan.PasswordManager.hasAdditionalSeatsOption\"\n            >\n              <span>\n                <span *ngIf=\"selectedPlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                {{ sub?.seats }}&nbsp;\n                <span *ngIf=\"!selectedPlan.PasswordManager.baseSeats\">{{ \"members\" | i18n }}</span>\n                &times;\n                {{ selectedPlan.PasswordManager.seatPrice | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </span>\n              <span *ngIf=\"isSecretsManagerTrial()\">\n                {{ \"freeForOneYear\" | i18n }}\n              </span>\n\n              <span *ngIf=\"!isSecretsManagerTrial()\">\n                {{ passwordManagerSeatTotal(selectedPlan) | currency: \"$\" }}\n              </span>\n            </p>\n          </bit-hint>\n        </div>\n        <!-- discountPercentage to PM Only -->\n        <div\n          *ngIf=\"totalOpened && discountPercentage && !organization.useSecretsManager\"\n          class=\"row\"\n        >\n          <bit-hint class=\"col-6\">\n            <p\n              class=\"tw-mb-0 tw-flex tw-justify-between\"\n              bitTypography=\"body2\"\n              *ngIf=\"discountPercentageFromSub > 0\"\n            >\n              <ng-container>\n                <span class=\"tw-text-xs\">\n                  {{ \"providerDiscount\" | i18n: this.discountPercentageFromSub | lowercase }}\n                </span>\n                <span class=\"tw-line-through tw-text-xs\">{{\n                  calculateTotalAppliedDiscount(total) | currency: \"$\"\n                }}</span>\n              </ng-container>\n            </p>\n          </bit-hint>\n        </div>\n        <div *ngIf=\"totalOpened\" class=\"row tw-mt-4\">\n          <bit-hint class=\"col-6\">\n            <p\n              class=\"tw-flex tw-justify-between tw-border-0 tw-border-solid tw-border-t tw-border-secondary-300 tw-pt-2 tw-mb-0\"\n            >\n              <span class=\"tw-font-semibold\">\n                {{ \"estimatedTax\" | i18n }}\n              </span>\n              <span>\n                {{ estimatedTax | currency: \"USD\" : \"$\" }}\n              </span>\n            </p>\n          </bit-hint>\n        </div>\n        <div *ngIf=\"totalOpened\" id=\"price\" class=\"row tw-mt-4\">\n          <bit-hint class=\"col-6\">\n            <p\n              class=\"tw-flex tw-justify-between tw-border-0 tw-border-solid tw-border-t tw-border-secondary-300 tw-pt-2 tw-mb-0\"\n            >\n              <span class=\"tw-font-semibold\">\n                {{ \"total\" | i18n }}\n              </span>\n              <span>\n                {{ total - calculateTotalAppliedDiscount(total) | currency: \"USD\" : \"$\" }}\n                <span class=\"tw-text-xs tw-font-semibold\">\n                  / {{ selectedPlanInterval | i18n }}</span\n                >\n              </span>\n            </p>\n          </bit-hint>\n        </div>\n      </ng-container>\n    </div>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton buttonType=\"primary\" type=\"submit\">\n        {{ \"upgrade\" | i18n }}\n      </button>\n      <button bitButton buttonType=\"secondary\" type=\"button\" [bitDialogClose]=\"ResultType.Closed\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport {\n  Component,\n  EventEmitter,\n  Inject,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ManageTaxInformationComponent } from \"@bitwarden/angular/billing/components\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { OrganizationUpgradeRequest } from \"@bitwarden/common/admin-console/models/request/organization-upgrade.request\";\nimport {\n  BillingApiServiceAbstraction,\n  BillingInformation,\n  OrganizationInformation,\n  PaymentInformation,\n  PlanInformation,\n  OrganizationBillingServiceAbstraction as OrganizationBillingService,\n} from \"@bitwarden/common/billing/abstractions\";\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport {\n  PaymentMethodType,\n  PlanInterval,\n  PlanType,\n  ProductTierType,\n} from \"@bitwarden/common/billing/enums\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { PreviewOrganizationInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-organization-invoice.request\";\nimport { UpdatePaymentMethodRequest } from \"@bitwarden/common/billing/models/request/update-payment-method.request\";\nimport { BillingResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PaymentSourceResponse } from \"@bitwarden/common/billing/models/response/payment-source.response\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { BillingSharedModule } from \"../shared/billing-shared.module\";\nimport { PaymentV2Component } from \"../shared/payment/payment-v2.component\";\nimport { PaymentComponent } from \"../shared/payment/payment.component\";\n\ntype ChangePlanDialogParams = {\n  organizationId: string;\n  subscription: OrganizationSubscriptionResponse;\n  productTierType: ProductTierType;\n};\n\nexport enum ChangePlanDialogResultType {\n  Closed = \"closed\",\n  Submitted = \"submitted\",\n}\n\nexport enum PlanCardState {\n  Selected = \"selected\",\n  NotSelected = \"not_selected\",\n  Disabled = \"disabled\",\n}\n\nexport const openChangePlanDialog = (\n  dialogService: DialogService,\n  dialogConfig: DialogConfig<ChangePlanDialogParams>,\n) =>\n  dialogService.open<ChangePlanDialogResultType, ChangePlanDialogParams>(\n    ChangePlanDialogComponent,\n    dialogConfig,\n  );\n\ntype PlanCard = {\n  name: string;\n  selected: boolean;\n};\n\ninterface OnSuccessArgs {\n  organizationId: string;\n}\n\n@Component({\n  templateUrl: \"./change-plan-dialog.component.html\",\n  standalone: true,\n  imports: [BillingSharedModule],\n})\nexport class ChangePlanDialogComponent implements OnInit, OnDestroy {\n  @ViewChild(PaymentComponent) paymentComponent: PaymentComponent;\n  @ViewChild(PaymentV2Component) paymentV2Component: PaymentV2Component;\n  @ViewChild(ManageTaxInformationComponent) taxComponent: ManageTaxInformationComponent;\n\n  @Input() acceptingSponsorship = false;\n  @Input() organizationId: string;\n  @Input() showFree = false;\n  @Input() showCancel = false;\n\n  @Input()\n  get productTier(): ProductTierType {\n    return this._productTier;\n  }\n\n  set productTier(product: ProductTierType) {\n    this._productTier = product;\n    this.formGroup?.controls?.productTier?.setValue(product);\n  }\n\n  protected estimatedTax: number = 0;\n  private _productTier = ProductTierType.Free;\n\n  @Input()\n  get plan(): PlanType {\n    return this._plan;\n  }\n\n  set plan(plan: PlanType) {\n    this._plan = plan;\n    this.formGroup?.controls?.plan?.setValue(plan);\n  }\n\n  private _plan = PlanType.Free;\n  @Input() providerId?: string;\n  @Output() onSuccess = new EventEmitter<OnSuccessArgs>();\n  @Output() onCanceled = new EventEmitter<void>();\n  @Output() onTrialBillingSuccess = new EventEmitter();\n\n  protected discountPercentage: number = 20;\n  protected discountPercentageFromSub: number;\n  protected loading = true;\n  protected planCards: PlanCard[];\n  protected ResultType = ChangePlanDialogResultType;\n\n  selfHosted = false;\n  productTypes = ProductTierType;\n  formPromise: Promise<string>;\n  singleOrgPolicyAppliesToActiveUser = false;\n  isInTrialFlow = false;\n  discount = 0;\n\n  formGroup = this.formBuilder.group({\n    name: [\"\"],\n    billingEmail: [\"\", [Validators.email]],\n    businessOwned: [false],\n    premiumAccessAddon: [false],\n    additionalSeats: [0, [Validators.min(0), Validators.max(100000)]],\n    clientOwnerEmail: [\"\", [Validators.email]],\n    plan: [this.plan],\n    productTier: [this.productTier],\n    // planInterval: [1],\n  });\n\n  planType: string;\n  selectedPlan: PlanResponse;\n  selectedInterval: number = 1;\n  planIntervals = PlanInterval;\n  passwordManagerPlans: PlanResponse[];\n  secretsManagerPlans: PlanResponse[];\n  organization: Organization;\n  sub: OrganizationSubscriptionResponse;\n  billing: BillingResponse;\n  dialogHeaderName: string;\n  currentPlanName: string;\n  showPayment: boolean = false;\n  totalOpened: boolean = false;\n  currentPlan: PlanResponse;\n  currentFocusIndex = 0;\n  isCardStateDisabled = false;\n  focusedIndex: number | null = null;\n  accountCredit: number;\n  paymentSource?: PaymentSourceResponse;\n\n  deprecateStripeSourcesAPI: boolean;\n  isSubscriptionCanceled: boolean = false;\n\n  private destroy$ = new Subject<void>();\n\n  protected taxInformation: TaxInformation;\n\n  constructor(\n    @Inject(DIALOG_DATA) private dialogParams: ChangePlanDialogParams,\n    private dialogRef: DialogRef<ChangePlanDialogResultType>,\n    private toastService: ToastService,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private keyService: KeyService,\n    private router: Router,\n    private syncService: SyncService,\n    private policyService: PolicyService,\n    private organizationService: OrganizationService,\n    private messagingService: MessagingService,\n    private formBuilder: FormBuilder,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private configService: ConfigService,\n    private billingApiService: BillingApiServiceAbstraction,\n    private taxService: TaxServiceAbstraction,\n    private organizationBillingService: OrganizationBillingService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.deprecateStripeSourcesAPI = await this.configService.getFeatureFlag(\n      FeatureFlag.AC2476_DeprecateStripeSourcesAPI,\n    );\n\n    if (this.dialogParams.organizationId) {\n      this.currentPlanName = this.resolvePlanName(this.dialogParams.productTierType);\n      this.sub =\n        this.dialogParams.subscription ??\n        (await this.organizationApiService.getSubscription(this.dialogParams.organizationId));\n      this.dialogHeaderName = this.resolveHeaderName(this.sub);\n      this.organizationId = this.dialogParams.organizationId;\n      this.currentPlan = this.sub?.plan;\n      this.selectedPlan = this.sub?.plan;\n      this.organization = await this.organizationService.get(this.organizationId);\n      if (this.deprecateStripeSourcesAPI) {\n        const { accountCredit, paymentSource } =\n          await this.billingApiService.getOrganizationPaymentMethod(this.organizationId);\n        this.accountCredit = accountCredit;\n        this.paymentSource = paymentSource;\n      } else {\n        this.billing = await this.organizationApiService.getBilling(this.organizationId);\n      }\n    }\n\n    if (!this.selfHosted) {\n      const plans = await this.apiService.getPlans();\n      this.passwordManagerPlans = plans.data.filter((plan) => !!plan.PasswordManager);\n      this.secretsManagerPlans = plans.data.filter((plan) => !!plan.SecretsManager);\n\n      if (\n        this.productTier === ProductTierType.Enterprise ||\n        this.productTier === ProductTierType.Teams\n      ) {\n        this.formGroup.controls.businessOwned.setValue(true);\n      }\n    }\n\n    if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n      const upgradedPlan = this.passwordManagerPlans.find((plan) =>\n        this.currentPlan.productTier === ProductTierType.Free\n          ? plan.type === PlanType.FamiliesAnnually\n          : plan.upgradeSortOrder == this.currentPlan.upgradeSortOrder + 1,\n      );\n\n      this.plan = upgradedPlan.type;\n      this.productTier = upgradedPlan.productTier;\n    }\n    this.upgradeFlowPrefillForm();\n\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.SingleOrg)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((policyAppliesToActiveUser) => {\n        this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n      });\n\n    if (!this.selfHosted) {\n      this.changedProduct();\n    }\n\n    this.planCards = [\n      {\n        name: this.i18nService.t(\"planNameTeams\"),\n        selected: true,\n      },\n      {\n        name: this.i18nService.t(\"planNameEnterprise\"),\n        selected: false,\n      },\n    ];\n    this.discountPercentageFromSub = this.isSecretsManagerTrial()\n      ? 0\n      : (this.sub?.customerDiscount?.percentOff ?? 0);\n\n    this.setInitialPlanSelection();\n    this.loading = false;\n\n    const taxInfo = await this.organizationApiService.getTaxInfo(this.organizationId);\n    this.taxInformation = TaxInformation.from(taxInfo);\n\n    this.refreshSalesTax();\n  }\n\n  resolveHeaderName(subscription: OrganizationSubscriptionResponse): string {\n    if (subscription.subscription != null) {\n      this.isSubscriptionCanceled = subscription.subscription.cancelled;\n      if (subscription.subscription.cancelled) {\n        return this.i18nService.t(\"restartSubscription\");\n      }\n    }\n\n    return this.i18nService.t(\n      \"upgradeFreeOrganization\",\n      this.resolvePlanName(this.dialogParams.productTierType),\n    );\n  }\n\n  setInitialPlanSelection() {\n    this.focusedIndex = this.selectableProducts.length - 1;\n    if (!this.isSubscriptionCanceled) {\n      this.selectPlan(this.getPlanByType(ProductTierType.Enterprise));\n    }\n  }\n\n  getPlanByType(productTier: ProductTierType) {\n    return this.selectableProducts.find((product) => product.productTier === productTier);\n  }\n\n  secretsManagerTrialDiscount() {\n    return this.sub?.customerDiscount?.appliesTo?.includes(\"sm-standalone\")\n      ? this.discountPercentage\n      : this.discountPercentageFromSub + this.discountPercentage;\n  }\n\n  isPaymentSourceEmpty() {\n    return this.deprecateStripeSourcesAPI\n      ? this.paymentSource === null || this.paymentSource === undefined\n      : this.billing?.paymentSource === null || this.billing?.paymentSource === undefined;\n  }\n\n  isSecretsManagerTrial(): boolean {\n    return (\n      this.sub?.subscription?.items?.some((item) =>\n        this.sub?.customerDiscount?.appliesTo?.includes(item.productId),\n      ) ?? false\n    );\n  }\n\n  planTypeChanged() {\n    this.selectPlan(this.getPlanByType(ProductTierType.Enterprise));\n  }\n\n  updateInterval(event: number) {\n    this.selectedInterval = event;\n    this.planTypeChanged();\n  }\n\n  protected getPlanIntervals() {\n    return [\n      {\n        name: PlanInterval[PlanInterval.Annually],\n        value: PlanInterval.Annually,\n      },\n      {\n        name: PlanInterval[PlanInterval.Monthly],\n        value: PlanInterval.Monthly,\n      },\n    ];\n  }\n\n  optimizedNgForRender(index: number) {\n    return index;\n  }\n\n  protected getPlanCardContainerClasses(plan: PlanResponse, index: number) {\n    let cardState: PlanCardState;\n\n    if (plan == this.currentPlan) {\n      cardState = PlanCardState.Disabled;\n      this.isCardStateDisabled = true;\n      this.focusedIndex = index;\n    } else if (plan == this.selectedPlan) {\n      cardState = PlanCardState.Selected;\n      this.isCardStateDisabled = false;\n      this.focusedIndex = index;\n    } else if (\n      this.selectedInterval === PlanInterval.Monthly &&\n      plan.productTier == ProductTierType.Families\n    ) {\n      cardState = PlanCardState.Disabled;\n      this.isCardStateDisabled = true;\n      this.focusedIndex = this.selectableProducts.length - 1;\n    } else {\n      cardState = PlanCardState.NotSelected;\n      this.isCardStateDisabled = false;\n    }\n\n    switch (cardState) {\n      case PlanCardState.Selected: {\n        return [\n          \"tw-cursor-pointer\",\n          \"tw-block\",\n          \"tw-rounded\",\n          \"tw-border\",\n          \"tw-border-solid\",\n          \"tw-border-primary-600\",\n          \"hover:tw-border-primary-700\",\n          \"focus:tw-border-2\",\n          \"focus:tw-border-primary-700\",\n          \"focus:tw-rounded-lg\",\n        ];\n      }\n      case PlanCardState.NotSelected: {\n        return [\n          \"tw-cursor-pointer\",\n          \"tw-block\",\n          \"tw-rounded\",\n          \"tw-border\",\n          \"tw-border-solid\",\n          \"tw-border-secondary-300\",\n          \"hover:tw-border-text-main\",\n          \"focus:tw-border-2\",\n          \"focus:tw-border-primary-700\",\n        ];\n      }\n      case PlanCardState.Disabled: {\n        if (this.isSubscriptionCanceled) {\n          return [\n            \"tw-cursor-not-allowed\",\n            \"tw-bg-secondary-100\",\n            \"tw-font-normal\",\n            \"tw-bg-blur\",\n            \"tw-text-muted\",\n            \"tw-block\",\n            \"tw-rounded\",\n            \"tw-w-80\",\n          ];\n        }\n\n        return [\n          \"tw-cursor-not-allowed\",\n          \"tw-bg-secondary-100\",\n          \"tw-font-normal\",\n          \"tw-bg-blur\",\n          \"tw-text-muted\",\n          \"tw-block\",\n          \"tw-rounded\",\n        ];\n      }\n    }\n  }\n\n  protected selectPlan(plan: PlanResponse) {\n    if (\n      this.selectedInterval === PlanInterval.Monthly &&\n      plan.productTier == ProductTierType.Families\n    ) {\n      return;\n    }\n\n    if (plan === this.currentPlan && !this.isSubscriptionCanceled) {\n      return;\n    }\n    this.selectedPlan = plan;\n    this.formGroup.patchValue({ productTier: plan.productTier });\n\n    try {\n      this.refreshSalesTax();\n    } catch {\n      this.estimatedTax = 0;\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  get upgradeRequiresPaymentMethod() {\n    const isFreeTier = this.organization?.productTierType === ProductTierType.Free;\n    const shouldHideFree = !this.showFree;\n    const hasNoPaymentSource = this.deprecateStripeSourcesAPI\n      ? !this.paymentSource\n      : !this.billing?.paymentSource;\n\n    return isFreeTier && shouldHideFree && hasNoPaymentSource;\n  }\n\n  get selectedSecretsManagerPlan() {\n    return this.secretsManagerPlans.find((plan) => plan.type === this.selectedPlan.type);\n  }\n\n  get selectedPlanInterval() {\n    return this.selectedPlan.isAnnual ? \"year\" : \"month\";\n  }\n\n  get selectableProducts() {\n    if (this.isSubscriptionCanceled) {\n      // Return only the current plan if the subscription is canceled\n      return [this.currentPlan];\n    }\n\n    if (this.acceptingSponsorship) {\n      const familyPlan = this.passwordManagerPlans.find(\n        (plan) => plan.type === PlanType.FamiliesAnnually,\n      );\n      this.discount = familyPlan.PasswordManager.basePrice;\n      return [familyPlan];\n    }\n\n    const businessOwnedIsChecked = this.formGroup.controls.businessOwned.value;\n\n    const result = this.passwordManagerPlans.filter(\n      (plan) =>\n        plan.type !== PlanType.Custom &&\n        (!businessOwnedIsChecked || plan.canBeUsedByBusiness) &&\n        (this.showFree || plan.productTier !== ProductTierType.Free) &&\n        (plan.productTier === ProductTierType.Free ||\n          plan.productTier === ProductTierType.TeamsStarter ||\n          (this.selectedInterval === PlanInterval.Annually && plan.isAnnual) ||\n          (this.selectedInterval === PlanInterval.Monthly && !plan.isAnnual)) &&\n        (!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&\n        this.planIsEnabled(plan),\n    );\n\n    if (\n      this.currentPlan.productTier === ProductTierType.Free &&\n      this.selectedInterval === PlanInterval.Monthly &&\n      !this.organization.useSecretsManager\n    ) {\n      const familyPlan = this.passwordManagerPlans.find(\n        (plan) => plan.productTier == ProductTierType.Families,\n      );\n      result.push(familyPlan);\n    }\n\n    if (\n      this.organization.useSecretsManager &&\n      this.currentPlan.productTier === ProductTierType.Free\n    ) {\n      const familyPlanIndex = result.findIndex(\n        (plan) => plan.productTier === ProductTierType.Families,\n      );\n\n      if (familyPlanIndex !== -1) {\n        result.splice(familyPlanIndex, 1);\n      }\n    }\n\n    if (this.currentPlan.productTier !== ProductTierType.Free) {\n      result.push(this.currentPlan);\n    }\n\n    result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n\n    return result;\n  }\n\n  get selectablePlans() {\n    const selectedProductTierType = this.formGroup.controls.productTier.value;\n    const result =\n      this.passwordManagerPlans?.filter(\n        (plan) => plan.productTier === selectedProductTierType && this.planIsEnabled(plan),\n      ) || [];\n\n    result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n    return result;\n  }\n\n  get storageGb() {\n    return this.sub?.maxStorageGb ? this.sub?.maxStorageGb - 1 : 0;\n  }\n\n  passwordManagerSeatTotal(plan: PlanResponse): number {\n    if (!plan.PasswordManager.hasAdditionalSeatsOption || this.isSecretsManagerTrial()) {\n      return 0;\n    }\n\n    const result = plan.PasswordManager.seatPrice * Math.abs(this.sub?.seats || 0);\n    return result;\n  }\n\n  secretsManagerSeatTotal(plan: PlanResponse, seats: number): number {\n    if (!plan.SecretsManager.hasAdditionalSeatsOption) {\n      return 0;\n    }\n\n    return plan.SecretsManager.seatPrice * Math.abs(seats || 0);\n  }\n\n  additionalStorageTotal(plan: PlanResponse): number {\n    if (!plan.PasswordManager.hasAdditionalStorageOption) {\n      return 0;\n    }\n\n    return (\n      plan.PasswordManager.additionalStoragePricePerGb *\n      Math.abs(this.sub?.maxStorageGb ? this.sub?.maxStorageGb - 1 : 0 || 0)\n    );\n  }\n\n  additionalStoragePriceMonthly(selectedPlan: PlanResponse) {\n    return selectedPlan.PasswordManager.additionalStoragePricePerGb;\n  }\n\n  additionalServiceAccountTotal(plan: PlanResponse): number {\n    if (\n      !plan.SecretsManager.hasAdditionalServiceAccountOption ||\n      this.additionalServiceAccount == 0\n    ) {\n      return 0;\n    }\n\n    return plan.SecretsManager.additionalPricePerServiceAccount * this.additionalServiceAccount;\n  }\n\n  get passwordManagerSubtotal() {\n    let subTotal = this.selectedPlan.PasswordManager.basePrice;\n    if (this.selectedPlan.PasswordManager.hasAdditionalSeatsOption) {\n      subTotal += this.passwordManagerSeatTotal(this.selectedPlan);\n    }\n    if (this.selectedPlan.PasswordManager.hasPremiumAccessOption) {\n      subTotal += this.selectedPlan.PasswordManager.premiumAccessOptionPrice;\n    }\n    return subTotal - this.discount;\n  }\n\n  get secretsManagerSubtotal() {\n    const plan = this.selectedSecretsManagerPlan;\n\n    if (!this.organization.useSecretsManager) {\n      return 0;\n    }\n\n    return (\n      plan.SecretsManager.basePrice +\n      this.secretsManagerSeatTotal(plan, this.sub?.smSeats) +\n      this.additionalServiceAccountTotal(plan)\n    );\n  }\n\n  get passwordManagerSeats() {\n    if (this.selectedPlan.productTier === ProductTierType.Families) {\n      return this.selectedPlan.PasswordManager.baseSeats;\n    }\n    return this.sub?.seats;\n  }\n\n  get total() {\n    if (this.organization.useSecretsManager) {\n      return (\n        this.passwordManagerSubtotal +\n        this.additionalStorageTotal(this.selectedPlan) +\n        this.secretsManagerSubtotal +\n        this.estimatedTax\n      );\n    }\n    return (\n      this.passwordManagerSubtotal +\n      this.additionalStorageTotal(this.selectedPlan) +\n      this.estimatedTax\n    );\n  }\n\n  get teamsStarterPlanIsAvailable() {\n    return this.selectablePlans.some((plan) => plan.type === PlanType.TeamsStarter);\n  }\n\n  get additionalServiceAccount() {\n    const baseServiceAccount = this.currentPlan.SecretsManager?.baseServiceAccount || 0;\n    const usedServiceAccounts = this.sub?.smServiceAccounts || 0;\n\n    const additionalServiceAccounts = baseServiceAccount - usedServiceAccounts;\n\n    return additionalServiceAccounts <= 0 ? Math.abs(additionalServiceAccounts) : 0;\n  }\n\n  changedProduct() {\n    const selectedPlan = this.selectablePlans[0];\n\n    this.setPlanType(selectedPlan.type);\n    this.handlePremiumAddonAccess(selectedPlan.PasswordManager.hasPremiumAccessOption);\n    this.handleAdditionalSeats(selectedPlan.PasswordManager.hasAdditionalSeatsOption);\n  }\n\n  setPlanType(planType: PlanType) {\n    this.formGroup.controls.plan.setValue(planType);\n  }\n\n  handlePremiumAddonAccess(hasPremiumAccessOption: boolean) {\n    this.formGroup.controls.premiumAccessAddon.setValue(!hasPremiumAccessOption);\n  }\n\n  handleAdditionalSeats(selectedPlanHasAdditionalSeatsOption: boolean) {\n    if (!selectedPlanHasAdditionalSeatsOption) {\n      this.formGroup.controls.additionalSeats.setValue(0);\n      return;\n    }\n\n    if (this.currentPlan && !this.currentPlan.PasswordManager.hasAdditionalSeatsOption) {\n      this.formGroup.controls.additionalSeats.setValue(this.currentPlan.PasswordManager.baseSeats);\n      return;\n    }\n\n    if (this.organization) {\n      this.formGroup.controls.additionalSeats.setValue(this.organization.seats);\n      return;\n    }\n\n    this.formGroup.controls.additionalSeats.setValue(1);\n  }\n\n  changedCountry() {\n    if (this.deprecateStripeSourcesAPI && this.paymentV2Component) {\n      this.paymentV2Component.showBankAccount = this.taxInformation.country === \"US\";\n\n      if (\n        !this.paymentV2Component.showBankAccount &&\n        this.paymentV2Component.selected === PaymentMethodType.BankAccount\n      ) {\n        this.paymentV2Component.select(PaymentMethodType.Card);\n      }\n    } else if (this.paymentComponent && this.taxInformation) {\n      this.paymentComponent!.hideBank = this.taxInformation.country !== \"US\";\n      // Bank Account payments are only available for US customers\n      if (\n        this.paymentComponent.hideBank &&\n        this.paymentComponent.method === PaymentMethodType.BankAccount\n      ) {\n        this.paymentComponent.method = PaymentMethodType.Card;\n        this.paymentComponent.changeMethod();\n      }\n    }\n  }\n\n  protected taxInformationChanged(event: TaxInformation): void {\n    this.taxInformation = event;\n    this.changedCountry();\n    this.refreshSalesTax();\n  }\n\n  submit = async () => {\n    if (this.taxComponent !== undefined && !this.taxComponent.validate()) {\n      return;\n    }\n\n    const doSubmit = async (): Promise<string> => {\n      let orgId: string = null;\n      if (this.isSubscriptionCanceled) {\n        await this.restartSubscription();\n        orgId = this.organizationId;\n      } else {\n        orgId = await this.updateOrganization();\n      }\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.isSubscriptionCanceled\n          ? this.i18nService.t(\"restartOrganizationSubscription\")\n          : this.i18nService.t(\"organizationUpgraded\"),\n      });\n\n      await this.apiService.refreshIdentityToken();\n      await this.syncService.fullSync(true);\n\n      if (!this.acceptingSponsorship && !this.isInTrialFlow) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/organizations/\" + orgId + \"/billing/subscription\"]);\n      }\n\n      if (this.isInTrialFlow) {\n        this.onTrialBillingSuccess.emit({\n          orgId: orgId,\n          subLabelText: this.billingSubLabelText(),\n        });\n      }\n\n      return orgId;\n    };\n\n    this.formPromise = doSubmit();\n    const organizationId = await this.formPromise;\n    this.onSuccess.emit({ organizationId: organizationId });\n    // TODO: No one actually listening to this message?\n    this.messagingService.send(\"organizationCreated\", { organizationId });\n    this.dialogRef.close();\n  };\n\n  private async restartSubscription() {\n    const org = await this.organizationApiService.get(this.organizationId);\n    const organization: OrganizationInformation = {\n      name: org.name,\n      billingEmail: org.billingEmail,\n    };\n\n    const plan: PlanInformation = {\n      type: this.selectedPlan.type,\n      passwordManagerSeats: org.seats,\n    };\n\n    if (org.useSecretsManager) {\n      plan.subscribeToSecretsManager = true;\n      plan.secretsManagerSeats = org.smSeats;\n    }\n\n    let paymentMethod: [string, PaymentMethodType];\n\n    if (this.deprecateStripeSourcesAPI) {\n      const { type, token } = await this.paymentV2Component.tokenize();\n      paymentMethod = [token, type];\n    } else {\n      paymentMethod = await this.paymentComponent.createPaymentToken();\n    }\n\n    const payment: PaymentInformation = {\n      paymentMethod,\n      billing: this.getBillingInformationFromTaxInfoComponent(),\n    };\n\n    await this.organizationBillingService.restartSubscription(this.organization.id, {\n      organization,\n      plan,\n      payment,\n    });\n  }\n\n  private async updateOrganization() {\n    const request = new OrganizationUpgradeRequest();\n    if (this.selectedPlan.productTier !== ProductTierType.Families) {\n      request.additionalSeats = this.sub?.seats;\n    }\n    if (this.sub?.maxStorageGb > this.selectedPlan.PasswordManager.baseStorageGb) {\n      request.additionalStorageGb =\n        this.sub?.maxStorageGb - this.selectedPlan.PasswordManager.baseStorageGb;\n    }\n    request.premiumAccessAddon =\n      this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n      this.formGroup.controls.premiumAccessAddon.value;\n    request.planType = this.selectedPlan.type;\n    if (this.showPayment) {\n      request.billingAddressCountry = this.taxInformation.country;\n      request.billingAddressPostalCode = this.taxInformation.postalCode;\n    }\n\n    // Secrets Manager\n    this.buildSecretsManagerRequest(request);\n\n    if (this.upgradeRequiresPaymentMethod || this.showPayment || this.isPaymentSourceEmpty()) {\n      if (this.deprecateStripeSourcesAPI) {\n        const tokenizedPaymentSource = await this.paymentV2Component.tokenize();\n        const updatePaymentMethodRequest = new UpdatePaymentMethodRequest();\n        updatePaymentMethodRequest.paymentSource = tokenizedPaymentSource;\n        updatePaymentMethodRequest.taxInformation = ExpandedTaxInfoUpdateRequest.From(\n          this.taxInformation,\n        );\n\n        await this.billingApiService.updateOrganizationPaymentMethod(\n          this.organizationId,\n          updatePaymentMethodRequest,\n        );\n      } else {\n        const tokenResult = await this.paymentComponent.createPaymentToken();\n        const paymentRequest = new PaymentRequest();\n        paymentRequest.paymentToken = tokenResult[0];\n        paymentRequest.paymentMethodType = tokenResult[1];\n        paymentRequest.country = this.taxInformation.country;\n        paymentRequest.postalCode = this.taxInformation.postalCode;\n        await this.organizationApiService.updatePayment(this.organizationId, paymentRequest);\n      }\n    }\n\n    // Backfill pub/priv key if necessary\n    if (!this.organization.hasPublicAndPrivateKeys) {\n      const orgShareKey = await this.keyService.getOrgKey(this.organizationId);\n      const orgKeys = await this.keyService.makeKeyPair(orgShareKey);\n      request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n    }\n\n    const result = await this.organizationApiService.upgrade(this.organizationId, request);\n    if (!result.success && result.paymentIntentClientSecret != null) {\n      await this.paymentComponent.handleStripeCardPayment(result.paymentIntentClientSecret, null);\n    }\n    return this.organizationId;\n  }\n\n  private billingSubLabelText(): string {\n    const selectedPlan = this.selectedPlan;\n    const price =\n      selectedPlan.PasswordManager.basePrice === 0\n        ? selectedPlan.PasswordManager.seatPrice\n        : selectedPlan.PasswordManager.basePrice;\n    let text = \"\";\n\n    if (selectedPlan.isAnnual) {\n      text += `${this.i18nService.t(\"annual\")} ($${price}/${this.i18nService.t(\"yr\")})`;\n    } else {\n      text += `${this.i18nService.t(\"monthly\")} ($${price}/${this.i18nService.t(\"monthAbbr\")})`;\n    }\n\n    return text;\n  }\n\n  private getBillingInformationFromTaxInfoComponent(): BillingInformation {\n    return {\n      country: this.taxInformation.country,\n      postalCode: this.taxInformation.postalCode,\n      taxId: this.taxInformation.taxId,\n      addressLine1: this.taxInformation.line1,\n      addressLine2: this.taxInformation.line2,\n      city: this.taxInformation.city,\n      state: this.taxInformation.state,\n    };\n  }\n\n  private buildSecretsManagerRequest(request: OrganizationUpgradeRequest): void {\n    request.useSecretsManager = this.organization.useSecretsManager;\n    if (!this.organization.useSecretsManager) {\n      return;\n    }\n\n    if (\n      this.selectedPlan.SecretsManager.hasAdditionalSeatsOption &&\n      this.currentPlan.productTier === ProductTierType.Free\n    ) {\n      request.additionalSmSeats = this.organization.seats;\n    } else {\n      request.additionalSmSeats = this.sub?.smSeats;\n      request.additionalServiceAccounts = this.additionalServiceAccount;\n    }\n  }\n\n  private upgradeFlowPrefillForm() {\n    if (this.acceptingSponsorship) {\n      this.formGroup.controls.productTier.setValue(ProductTierType.Families);\n      this.changedProduct();\n      return;\n    }\n\n    if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n      const upgradedPlan = this.passwordManagerPlans.find((plan) => {\n        if (this.currentPlan.productTier === ProductTierType.Free) {\n          return plan.type === PlanType.FamiliesAnnually;\n        }\n\n        if (\n          this.currentPlan.productTier === ProductTierType.Families &&\n          !this.teamsStarterPlanIsAvailable\n        ) {\n          return plan.type === PlanType.TeamsAnnually;\n        }\n\n        return plan.upgradeSortOrder === this.currentPlan.upgradeSortOrder + 1;\n      });\n\n      this.plan = upgradedPlan.type;\n      this.productTier = upgradedPlan.productTier;\n      this.changedProduct();\n    }\n  }\n\n  private planIsEnabled(plan: PlanResponse) {\n    return !plan.disabled && !plan.legacyYear;\n  }\n\n  toggleShowPayment() {\n    this.showPayment = true;\n  }\n\n  toggleTotalOpened() {\n    this.totalOpened = !this.totalOpened;\n  }\n\n  calculateTotalAppliedDiscount(total: number) {\n    const discountedTotal = total * (this.discountPercentageFromSub / 100);\n    return discountedTotal;\n  }\n\n  get paymentSourceClasses() {\n    if (this.deprecateStripeSourcesAPI) {\n      if (this.paymentSource == null) {\n        return [];\n      }\n      switch (this.paymentSource.type) {\n        case PaymentMethodType.Card:\n          return [\"bwi-credit-card\"];\n        case PaymentMethodType.BankAccount:\n          return [\"bwi-bank\"];\n        case PaymentMethodType.Check:\n          return [\"bwi-money\"];\n        case PaymentMethodType.PayPal:\n          return [\"bwi-paypal text-primary\"];\n        default:\n          return [];\n      }\n    } else {\n      if (this.billing.paymentSource == null) {\n        return [];\n      }\n      switch (this.billing.paymentSource.type) {\n        case PaymentMethodType.Card:\n          return [\"bwi-credit-card\"];\n        case PaymentMethodType.BankAccount:\n          return [\"bwi-bank\"];\n        case PaymentMethodType.Check:\n          return [\"bwi-money\"];\n        case PaymentMethodType.PayPal:\n          return [\"bwi-paypal text-primary\"];\n        default:\n          return [];\n      }\n    }\n  }\n\n  resolvePlanName(productTier: ProductTierType) {\n    switch (productTier) {\n      case ProductTierType.Enterprise:\n        return this.i18nService.t(\"planNameEnterprise\");\n      case ProductTierType.Free:\n        return this.i18nService.t(\"planNameFree\");\n      case ProductTierType.Families:\n        return this.i18nService.t(\"planNameFamilies\");\n      case ProductTierType.Teams:\n        return this.i18nService.t(\"planNameTeams\");\n      case ProductTierType.TeamsStarter:\n        return this.i18nService.t(\"planNameTeamsStarter\");\n    }\n  }\n\n  onKeydown(event: KeyboardEvent, index: number) {\n    const cardElements = Array.from(document.querySelectorAll(\".product-card\")) as HTMLElement[];\n    let newIndex = index;\n    const direction = event.key === \"ArrowRight\" || event.key === \"ArrowDown\" ? 1 : -1;\n\n    if ([\"ArrowRight\", \"ArrowDown\", \"ArrowLeft\", \"ArrowUp\"].includes(event.key)) {\n      do {\n        newIndex = (newIndex + direction + cardElements.length) % cardElements.length;\n      } while (this.isCardDisabled(newIndex) && newIndex !== index);\n\n      event.preventDefault();\n\n      setTimeout(() => {\n        const card = cardElements[newIndex];\n        if (\n          !(\n            card.classList.contains(\"tw-bg-secondary-100\") &&\n            card.classList.contains(\"tw-text-muted\")\n          )\n        ) {\n          card?.focus();\n        }\n      }, 0);\n    }\n  }\n\n  onFocus(index: number) {\n    this.focusedIndex = index;\n    this.selectPlan(this.selectableProducts[index]);\n  }\n\n  isCardDisabled(index: number): boolean {\n    const card = this.selectableProducts[index];\n    return card === (this.currentPlan || this.isCardStateDisabled);\n  }\n\n  manageSelectableProduct(index: number) {\n    return index;\n  }\n\n  private refreshSalesTax(): void {\n    if (\n      this.taxInformation === undefined ||\n      !this.taxInformation.country ||\n      !this.taxInformation.postalCode\n    ) {\n      return;\n    }\n\n    const request: PreviewOrganizationInvoiceRequest = {\n      organizationId: this.organizationId,\n      passwordManager: {\n        additionalStorage: 0,\n        plan: this.selectedPlan?.type,\n        seats: this.sub.seats,\n      },\n      taxInformation: {\n        postalCode: this.taxInformation.postalCode,\n        country: this.taxInformation.country,\n        taxId: this.taxInformation.taxId,\n      },\n    };\n\n    if (this.organization.useSecretsManager) {\n      request.secretsManager = {\n        seats: this.sub.smSeats,\n        additionalMachineAccounts: this.sub.smServiceAccounts,\n      };\n    }\n\n    this.taxService\n      .previewOrganizationInvoice(request)\n      .then((invoice) => {\n        this.estimatedTax = invoice.taxAmount;\n      })\n      .catch((error) => {\n        this.toastService.showToast({\n          title: \"\",\n          variant: \"error\",\n          message: this.i18nService.t(error.message),\n        });\n      });\n  }\n\n  protected canUpdatePaymentInformation(): boolean {\n    return (\n      this.upgradeRequiresPaymentMethod ||\n      this.showPayment ||\n      this.isPaymentSourceEmpty() ||\n      this.isSubscriptionCanceled\n    );\n  }\n}\n","import { OrganizationCreateRequest } from \"../../../models/request/organization-create.request\";\n\nexport class ProviderOrganizationCreateRequest {\n  constructor(\n    public clientOwnerEmail: string,\n    public organizationCreateRequest: OrganizationCreateRequest,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { AbstractSelfHostingLicenseUploaderComponent } from \"../../shared/self-hosting-license-uploader/abstract-self-hosting-license-uploader.component\";\n\n/**\n * Processes license file uploads for organizations.\n * @remarks Requires self-hosting.\n */\n@Component({\n  selector: \"organization-self-hosting-license-uploader\",\n  templateUrl: \"./self-hosting-license-uploader.component.html\",\n})\nexport class OrganizationSelfHostingLicenseUploaderComponent extends AbstractSelfHostingLicenseUploaderComponent {\n  /**\n   * Notifies the parent component of the `organizationId` the license was created for.\n   */\n  @Output() onLicenseFileUploaded: EventEmitter<string> = new EventEmitter<string>();\n\n  constructor(\n    protected readonly formBuilder: FormBuilder,\n    protected readonly i18nService: I18nService,\n    protected readonly platformUtilsService: PlatformUtilsService,\n    protected readonly toastService: ToastService,\n    protected readonly tokenService: TokenService,\n    private readonly apiService: ApiService,\n    private readonly encryptService: EncryptService,\n    private readonly keyService: KeyService,\n    private readonly organizationApiService: OrganizationApiServiceAbstraction,\n    private readonly syncService: SyncService,\n  ) {\n    super(formBuilder, i18nService, platformUtilsService, toastService, tokenService);\n  }\n\n  protected async submit(): Promise<void> {\n    await super.submit();\n\n    const orgKey = await this.keyService.makeOrgKey<OrgKey>();\n    const key = orgKey[0].encryptedString;\n    const collection = await this.encryptService.encrypt(\n      this.i18nService.t(\"defaultCollection\"),\n      orgKey[1],\n    );\n    const collectionCt = collection.encryptedString;\n    const orgKeys = await this.keyService.makeKeyPair(orgKey[1]);\n\n    const fd = new FormData();\n    fd.append(\"license\", this.formValue.file);\n    fd.append(\"key\", key);\n    fd.append(\"collectionName\", collectionCt);\n    const response = await this.organizationApiService.createLicense(fd);\n    const orgId = response.id;\n\n    await this.apiService.refreshIdentityToken();\n\n    // Org Keys live outside of the OrganizationLicense - add the keys to the org here\n    const request = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n    await this.organizationApiService.updateKeys(orgId, request);\n\n    await this.apiService.refreshIdentityToken();\n    await this.syncService.fullSync(true);\n\n    this.onLicenseFileUploaded.emit(orgId);\n  }\n\n  get description(): string {\n    return \"uploadLicenseFileOrg\";\n  }\n\n  get hintFileName(): string {\n    return \"bitwarden_organization_license.json\";\n  }\n}\n","<p bitTypography=\"body1\">{{ \"uploadLicenseFileOrg\" | i18n }}</p>\n<form [formGroup]=\"form\" [bitSubmit]=\"submit\">\n  <bit-form-field>\n    <bit-label>{{ description | i18n }}</bit-label>\n    <div>\n      <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"fileSelector.click()\">\n        {{ \"chooseFile\" | i18n }}\n      </button>\n      {{ form.value.file ? form.value.file.name : (\"noFileChosen\" | i18n) }}\n    </div>\n    <input\n      #fileSelector\n      bitInput\n      type=\"file\"\n      formControlName=\"file\"\n      (change)=\"onLicenseFileSelectedChanged($event)\"\n      accept=\"application/JSON\"\n      hidden\n      class=\"tw-hidden\"\n    />\n    <bit-hint>{{ \"licenseFileDesc\" | i18n: hintFileName }}</bit-hint>\n  </bit-form-field>\n  <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n    {{ \"submit\" | i18n }}\n  </button>\n</form>\n","<ng-container *ngIf=\"loading\">\n  <i\n    class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n    title=\"{{ 'loading' | i18n }}\"\n    aria-hidden=\"true\"\n  ></i>\n  <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n</ng-container>\n<ng-container *ngIf=\"createOrganization && false\">\n  <ng-container *ngIf=\"!(useLicenseUploaderComponent$ | async)\">\n    <p bitTypography=\"body1\">{{ \"uploadLicenseFileOrg\" | i18n }}</p>\n    <form [formGroup]=\"selfHostedForm\" [bitSubmit]=\"submit\">\n      <bit-form-field>\n        <bit-label>{{ \"licenseFile\" | i18n }}</bit-label>\n        <div class=\"tw-pt-2 tw-pb-1\">\n          <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"fileSelector.click()\">\n            {{ \"chooseFile\" | i18n }}\n          </button>\n          {{ selectedFile?.name ?? (\"noFileChosen\" | i18n) }}\n        </div>\n        <input\n          #fileSelector\n          bitInput\n          type=\"file\"\n          formControlName=\"file\"\n          (change)=\"setSelectedFile($event)\"\n          accept=\"application/JSON\"\n          hidden\n          class=\"tw-hidden\"\n        />\n        <bit-hint>{{ \"licenseFileDesc\" | i18n: \"bitwarden_organization_license.json\" }}</bit-hint>\n      </bit-form-field>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"submit\" | i18n }}\n      </button>\n    </form>\n  </ng-container>\n  <organization-self-hosting-license-uploader\n    *ngIf=\"useLicenseUploaderComponent$ | async\"\n    (onLicenseFileUploaded)=\"onLicenseFileUploaded($event)\"\n  />\n</ng-container>\n<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" *ngIf=\"!loading\" class=\"tw-pt-6\">\n  <bit-section [ngClass]=\"{ 'tw-hidden': !createOrganization }\">\n    <app-org-info\n      (changedBusinessOwned)=\"changedOwnedBusiness()\"\n      [formGroup]=\"formGroup\"\n      [createOrganization]=\"createOrganization\"\n      [isProvider]=\"!!providerId\"\n      [acceptingSponsorship]=\"acceptingSponsorship\"\n    >\n    </app-org-info>\n  </bit-section>\n  <bit-section>\n    <h2 bitTypography=\"h2\">{{ \"chooseYourPlan\" | i18n }}</h2>\n    <bit-radio-group formControlName=\"productTier\" [block]=\"true\">\n      <div *ngFor=\"let selectableProduct of selectableProducts\" class=\"tw-mb-3\">\n        <bit-radio-button [value]=\"selectableProduct.productTier\" (change)=\"changedProduct()\">\n          <bit-label>{{ selectableProduct.nameLocalizationKey | i18n }}</bit-label>\n          <bit-hint class=\"tw-text-sm\"\n            >{{ selectableProduct.descriptionLocalizationKey | i18n: \"1\" }}\n            <ng-container\n              *ngIf=\"\n                selectableProduct.productTier === productTypes.Enterprise;\n                else nonEnterprisePlans\n              \"\n            >\n              <ul class=\"tw-pl-0 tw-list-inside tw-mb-0\">\n                <li>{{ \"includeAllTeamsFeatures\" | i18n }}</li>\n                <li *ngIf=\"selectableProduct.hasSelfHost\">{{ \"onPremHostingOptional\" | i18n }}</li>\n                <li *ngIf=\"selectableProduct.hasSso\">{{ \"includeSsoAuthentication\" | i18n }}</li>\n                <li *ngIf=\"selectableProduct.hasPolicies\">\n                  {{ \"includeEnterprisePolicies\" | i18n }}\n                </li>\n                <li *ngIf=\"selectableProduct.trialPeriodDays && createOrganization\">\n                  {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n                </li>\n              </ul>\n            </ng-container>\n            <ng-template #nonEnterprisePlans>\n              <ng-container\n                *ngIf=\"\n                  selectableProduct.productTier === productTypes.Teams &&\n                    teamsStarterPlanIsAvailable;\n                  else fullFeatureList\n                \"\n              >\n                <ul class=\"tw-pl-0 tw-list-inside tw-mb-0\">\n                  <li>{{ \"includeAllTeamsStarterFeatures\" | i18n }}</li>\n                  <li>{{ \"chooseMonthlyOrAnnualBilling\" | i18n }}</li>\n                  <li>{{ \"abilityToAddMoreThanNMembers\" | i18n: 10 }}</li>\n                  <li *ngIf=\"selectableProduct.trialPeriodDays && createOrganization\">\n                    {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n                  </li>\n                </ul>\n              </ng-container>\n              <ng-template #fullFeatureList>\n                <ul class=\"tw-pl-0 tw-list-inside tw-mb-0\">\n                  <li *ngIf=\"selectableProduct.productTier == productTypes.Free\">\n                    {{ \"limitedUsers\" | i18n: selectableProduct.PasswordManager.maxSeats }}\n                  </li>\n                  <li\n                    *ngIf=\"\n                      selectableProduct.productTier != productTypes.Free &&\n                      selectableProduct.productTier != productTypes.TeamsStarter &&\n                      selectableProduct.PasswordManager.maxSeats\n                    \"\n                  >\n                    {{ \"addShareLimitedUsers\" | i18n: selectableProduct.PasswordManager.maxSeats }}\n                  </li>\n                  <li *ngIf=\"!selectableProduct.PasswordManager.maxSeats\">\n                    {{ \"addShareUnlimitedUsers\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.PasswordManager.maxCollections\">\n                    {{\n                      \"limitedCollections\" | i18n: selectableProduct.PasswordManager.maxCollections\n                    }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.PasswordManager.maxAdditionalSeats\">\n                    {{\n                      \"addShareLimitedUsers\"\n                        | i18n: selectableProduct.PasswordManager.maxAdditionalSeats\n                    }}\n                  </li>\n                  <li *ngIf=\"!selectableProduct.PasswordManager.maxCollections\">\n                    {{ \"createUnlimitedCollections\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.PasswordManager.baseStorageGb\">\n                    {{\n                      \"gbEncryptedFileStorage\"\n                        | i18n: selectableProduct.PasswordManager.baseStorageGb + \"GB\"\n                    }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.hasGroups\">\n                    {{ \"controlAccessWithGroups\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.hasApi\">{{ \"trackAuditLogs\" | i18n }}</li>\n                  <li *ngIf=\"selectableProduct.hasDirectory\">\n                    {{ \"syncUsersFromDirectory\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.hasSelfHost\">\n                    {{ \"onPremHostingOptional\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.usersGetPremium\">{{ \"usersGetPremium\" | i18n }}</li>\n                  <li *ngIf=\"selectableProduct.productTier != productTypes.Free\">\n                    {{ \"priorityCustomerSupport\" | i18n }}\n                  </li>\n                  <li *ngIf=\"selectableProduct.trialPeriodDays && createOrganization\">\n                    {{ \"xDayFreeTrial\" | i18n: selectableProduct.trialPeriodDays }}\n                  </li>\n                </ul>\n              </ng-template>\n            </ng-template>\n          </bit-hint>\n        </bit-radio-button>\n        <span *ngIf=\"selectableProduct.productTier != productTypes.Free\" class=\"tw-pl-4\">\n          <ng-container\n            *ngIf=\"selectableProduct.PasswordManager.basePrice && !acceptingSponsorship\"\n          >\n            {{\n              (selectableProduct.isAnnual\n                ? selectableProduct.PasswordManager.basePrice / 12\n                : selectableProduct.PasswordManager.basePrice\n              ) | currency: \"$\"\n            }}\n            /{{ \"month\" | i18n }},\n            {{ \"includesXUsers\" | i18n: selectableProduct.PasswordManager.baseSeats }}\n            <ng-container *ngIf=\"selectableProduct.PasswordManager.hasAdditionalSeatsOption\">\n              {{ (\"additionalUsers\" | i18n).toLowerCase() }}\n              {{\n                (selectableProduct.isAnnual\n                  ? selectableProduct.PasswordManager.seatPrice / 12\n                  : selectableProduct.PasswordManager.seatPrice\n                ) | currency: \"$\"\n              }}\n              /{{ \"month\" | i18n }}\n            </ng-container>\n          </ng-container>\n        </span>\n        <span\n          *ngIf=\"\n            !selectableProduct.PasswordManager.basePrice &&\n            selectableProduct.PasswordManager.hasAdditionalSeatsOption\n          \"\n          class=\"tw-pl-4\"\n        >\n          {{\n            \"costPerUser\"\n              | i18n\n                : ((selectableProduct.isAnnual\n                    ? selectableProduct.PasswordManager.seatPrice / 12\n                    : selectableProduct.PasswordManager.seatPrice\n                  )\n                    | currency: \"$\")\n          }}\n          /{{ \"month\" | i18n }}\n        </span>\n        <span *ngIf=\"selectableProduct.productTier == productTypes.Free\" class=\"tw-pl-4\">{{\n          \"freeForever\" | i18n\n        }}</span>\n      </div>\n    </bit-radio-group>\n  </bit-section>\n  <bit-section *ngIf=\"formGroup.value.productTier !== productTypes.Free\">\n    <bit-section\n      *ngIf=\"\n        selectedPlan.PasswordManager.hasAdditionalSeatsOption &&\n        !selectedPlan.PasswordManager.baseSeats\n      \"\n    >\n      <h2 bitTypography=\"h2\">{{ \"users\" | i18n }}</h2>\n      <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n        <bit-form-field class=\"tw-col-span-6\">\n          <bit-label>{{ \"userSeats\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"number\"\n            formControlName=\"additionalSeats\"\n            placeholder=\"{{ 'userSeatsDesc' | i18n }}\"\n            required\n          />\n          <bit-hint class=\"tw-text-sm\">{{ \"userSeatsHowManyDesc\" | i18n }}</bit-hint>\n        </bit-form-field>\n      </div>\n    </bit-section>\n    <bit-section>\n      <h2 bitTypography=\"h2\">{{ \"addons\" | i18n }}</h2>\n      <div\n        class=\"tw-grid tw-grid-cols-12 tw-gap-4\"\n        *ngIf=\"\n          selectedPlan.PasswordManager.hasAdditionalSeatsOption &&\n          selectedPlan.PasswordManager.baseSeats\n        \"\n      >\n        <bit-form-field class=\"tw-col-span-6\">\n          <bit-label>{{ \"additionalUserSeats\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"number\"\n            formControlName=\"additionalSeats\"\n            placeholder=\"{{ 'userSeatsDesc' | i18n }}\"\n          />\n          <bit-hint class=\"tx-text-sm\"\n            >{{\n              \"userSeatsAdditionalDesc\"\n                | i18n\n                  : selectedPlan.PasswordManager.baseSeats\n                  : (seatPriceMonthly(selectedPlan) | currency: \"$\")\n            }}\n          </bit-hint>\n        </bit-form-field>\n      </div>\n      <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n        <bit-form-field class=\"tw-col-span-6\">\n          <bit-label>{{ \"additionalStorageGb\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"number\"\n            formControlName=\"additionalStorage\"\n            step=\"1\"\n            placeholder=\"{{ 'additionalStorageGbDesc' | i18n }}\"\n          />\n          <bit-hint class=\"tw-text-sm\">{{\n            \"additionalStorageIntervalDesc\"\n              | i18n\n                : \"1 GB\"\n                : (additionalStoragePriceMonthly(selectedPlan) | currency: \"$\")\n                : (\"month\" | i18n)\n          }}</bit-hint>\n        </bit-form-field>\n      </div>\n    </bit-section>\n    <bit-section>\n      <div\n        class=\"tw-grid tw-grid-cols-12 tw-gap-4\"\n        *ngIf=\"selectedPlan.PasswordManager.hasPremiumAccessOption\"\n      >\n        <bit-form-control class=\"tw-col-span-6\">\n          <bit-label>{{ \"premiumAccess\" | i18n }}</bit-label>\n          <input type=\"checkbox\" bitCheckbox formControlName=\"premiumAccessAddon\" />\n          <bit-hint class=\"tw-text-sm\">{{\n            \"premiumAccessDesc\" | i18n: (3.33 | currency: \"$\") : (\"month\" | i18n)\n          }}</bit-hint>\n        </bit-form-control>\n      </div>\n    </bit-section>\n    <bit-section>\n      <h2 bitTypography=\"h2\">{{ \"summary\" | i18n }}</h2>\n      <bit-radio-group formControlName=\"plan\">\n        <div *ngFor=\"let selectablePlan of selectablePlans\">\n          <bit-radio-button\n            type=\"radio\"\n            id=\"interval{{ selectablePlan.type }}\"\n            [value]=\"selectablePlan.type\"\n          >\n            <bit-label>{{ (selectablePlan.isAnnual ? \"annually\" : \"monthly\") | i18n }}</bit-label>\n            <bit-hint *ngIf=\"selectablePlan.isAnnual\">\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.basePrice\"\n              >\n                {{ \"basePrice\" | i18n }}:\n                {{\n                  (selectablePlan.isAnnual\n                    ? selectablePlan.PasswordManager.basePrice / 12\n                    : selectablePlan.PasswordManager.basePrice\n                  ) | currency: \"$\"\n                }}\n                &times; 12\n                {{ \"monthAbbr\" | i18n }}\n                =\n                <ng-container *ngIf=\"acceptingSponsorship; else notAcceptingSponsorship\">\n                  <span class=\"tw-line-through\">{{\n                    selectablePlan.PasswordManager.basePrice | currency: \"$\"\n                  }}</span>\n                  {{ \"freeWithSponsorship\" | i18n }}\n                </ng-container>\n                <ng-template #notAcceptingSponsorship>\n                  {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n                  /{{ \"year\" | i18n }}\n                </ng-template>\n              </p>\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.hasAdditionalSeatsOption\"\n              >\n                <span *ngIf=\"selectablePlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                <span *ngIf=\"!selectablePlan.PasswordManager.baseSeats\">{{ \"users\" | i18n }}:</span>\n                {{ formGroup.controls.additionalSeats.value || 0 }} &times;\n                {{\n                  (selectablePlan.isAnnual\n                    ? selectablePlan.PasswordManager.seatPrice / 12\n                    : selectablePlan.PasswordManager.seatPrice\n                  ) | currency: \"$\"\n                }}\n                &times; 12 {{ \"monthAbbr\" | i18n }} =\n                {{\n                  passwordManagerSeatTotal(selectablePlan, formGroup.value.additionalSeats)\n                    | currency: \"$\"\n                }}\n                /{{ \"year\" | i18n }}\n              </p>\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.hasAdditionalStorageOption\"\n              >\n                {{ \"additionalStorageGb\" | i18n }}:\n                {{ formGroup.controls.additionalStorage.value || 0 }} &times;\n                {{\n                  (selectablePlan.isAnnual\n                    ? selectablePlan.PasswordManager.additionalStoragePricePerGb / 12\n                    : selectablePlan.PasswordManager.additionalStoragePricePerGb\n                  ) | currency: \"$\"\n                }}\n                &times; 12 {{ \"monthAbbr\" | i18n }} =\n                {{ additionalStorageTotal(selectablePlan) | currency: \"$\" }} /{{ \"year\" | i18n }}\n              </p>\n            </bit-hint>\n            <bit-hint *ngIf=\"!selectablePlan.isAnnual\">\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.basePrice\"\n              >\n                {{ \"basePrice\" | i18n }}:\n                {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }}\n                =\n                {{ selectablePlan.PasswordManager.basePrice | currency: \"$\" }}\n                /{{ \"month\" | i18n }}\n              </p>\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.hasAdditionalSeatsOption\"\n              >\n                <span *ngIf=\"selectablePlan.PasswordManager.baseSeats\"\n                  >{{ \"additionalUsers\" | i18n }}:</span\n                >\n                <span *ngIf=\"!selectablePlan.PasswordManager.baseSeats\">{{ \"users\" | i18n }}:</span>\n                {{ formGroup.controls.additionalSeats.value || 0 }} &times;\n                {{ selectablePlan.PasswordManager.seatPrice | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }} =\n                {{\n                  passwordManagerSeatTotal(selectablePlan, formGroup.value.additionalSeats)\n                    | currency: \"$\"\n                }}\n                /{{ \"month\" | i18n }}\n              </p>\n              <p\n                class=\"tw-mb-0\"\n                bitTypography=\"body2\"\n                *ngIf=\"selectablePlan.PasswordManager.hasAdditionalStorageOption\"\n              >\n                {{ \"additionalStorageGb\" | i18n }}:\n                {{ formGroup.controls.additionalStorage.value || 0 }} &times;\n                {{ selectablePlan.PasswordManager.additionalStoragePricePerGb | currency: \"$\" }}\n                {{ \"monthAbbr\" | i18n }} =\n                {{ additionalStorageTotal(selectablePlan) | currency: \"$\" }} /{{ \"month\" | i18n }}\n              </p>\n            </bit-hint>\n          </bit-radio-button>\n        </div>\n      </bit-radio-group>\n    </bit-section>\n  </bit-section>\n\n  <!-- Secrets Manager -->\n  <bit-section>\n    <sm-subscribe\n      *ngIf=\"planOffersSecretsManager && !hasProvider\"\n      [formGroup]=\"formGroup.controls.secretsManager\"\n      [selectedPlan]=\"selectedSecretsManagerPlan\"\n      [upgradeOrganization]=\"!createOrganization\"\n    ></sm-subscribe>\n  </bit-section>\n\n  <!-- Payment info -->\n  <bit-section *ngIf=\"formGroup.value.productTier !== productTypes.Free\">\n    <h2 bitTypography=\"h2\">\n      {{ (createOrganization ? \"paymentInformation\" : \"billingInformation\") | i18n }}\n    </h2>\n    <p class=\"tw-text-muted tw-italic tw-mb-3 tw-block\" bitTypography=\"body2\">\n      {{ paymentDesc }}\n    </p>\n    <app-payment\n      *ngIf=\"!deprecateStripeSourcesAPI && (createOrganization || upgradeRequiresPaymentMethod)\"\n      [hideCredit]=\"true\"\n    ></app-payment>\n    <app-payment-v2\n      *ngIf=\"deprecateStripeSourcesAPI && (createOrganization || upgradeRequiresPaymentMethod)\"\n    ></app-payment-v2>\n    <app-manage-tax-information\n      class=\"tw-my-4\"\n      [showTaxIdField]=\"showTaxIdField\"\n      [startWith]=\"taxInformation\"\n      (taxInformationChanged)=\"onTaxInformationChanged($event)\"\n    />\n    <div id=\"price\" class=\"tw-my-4\">\n      <div class=\"tw-text-muted tw-text-base\">\n        {{ \"passwordManagerPlanPrice\" | i18n }}: {{ passwordManagerSubtotal | currency: \"USD $\" }}\n        <br />\n        <span *ngIf=\"planOffersSecretsManager && formGroup.value.secretsManager.enabled\">\n          {{ \"secretsManagerPlanPrice\" | i18n }}: {{ secretsManagerSubtotal | currency: \"USD $\" }}\n          <br />\n        </span>\n        <ng-container>\n          {{ \"estimatedTax\" | i18n }}: {{ estimatedTax | currency: \"USD $\" }}\n        </ng-container>\n      </div>\n      <hr class=\"tw-my-1 tw-grid tw-grid-cols-3 tw-ml-0\" />\n      <p class=\"tw-text-lg\">\n        <strong>{{ \"total\" | i18n }}:</strong> {{ total | currency: \"USD $\" }}/{{\n          selectedPlanInterval | i18n\n        }}\n      </p>\n    </div>\n    <ng-container *ngIf=\"!createOrganization\">\n      <app-payment [showMethods]=\"false\"></app-payment>\n    </ng-container>\n  </bit-section>\n  <bit-section *ngIf=\"singleOrgPolicyBlock\">\n    <bit-callout type=\"danger\" [title]=\"'error' | i18n\">\n      {{ \"singleOrgBlockCreateMessage\" | i18n }}\n    </bit-callout>\n  </bit-section>\n  <bit-section>\n    <button\n      type=\"submit\"\n      buttonType=\"primary\"\n      bitButton\n      bitFormButton\n      [disabled]=\"!formGroup.valid\"\n    >\n      {{ \"submit\" | i18n }}\n    </button>\n    <button\n      type=\"button\"\n      buttonType=\"secondary\"\n      bitButton\n      bitFormButton\n      (click)=\"cancel()\"\n      *ngIf=\"showCancel\"\n    >\n      {{ \"cancel\" | i18n }}\n    </button>\n    <bit-error-summary [formGroup]=\"formGroup\"></bit-error-summary>\n  </bit-section>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Component,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\nimport { debounceTime } from \"rxjs/operators\";\n\nimport { ManageTaxInformationComponent } from \"@bitwarden/angular/billing/components\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { OrganizationCreateRequest } from \"@bitwarden/common/admin-console/models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\nimport { OrganizationUpgradeRequest } from \"@bitwarden/common/admin-console/models/request/organization-upgrade.request\";\nimport { ProviderOrganizationCreateRequest } from \"@bitwarden/common/admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider.response\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport { PaymentMethodType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { PreviewOrganizationInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-organization-invoice.request\";\nimport { UpdatePaymentMethodRequest } from \"@bitwarden/common/billing/models/request/update-payment-method.request\";\nimport { BillingResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { OrganizationCreateModule } from \"../../admin-console/organizations/create/organization-create.module\";\nimport { BillingSharedModule, secretsManagerSubscribeFormFactory } from \"../shared\";\nimport { PaymentV2Component } from \"../shared/payment/payment-v2.component\";\nimport { PaymentComponent } from \"../shared/payment/payment.component\";\n\ninterface OnSuccessArgs {\n  organizationId: string;\n}\n\nconst Allowed2020PlansForLegacyProviders = [\n  PlanType.TeamsMonthly2020,\n  PlanType.TeamsAnnually2020,\n  PlanType.EnterpriseAnnually2020,\n  PlanType.EnterpriseMonthly2020,\n];\n\n@Component({\n  selector: \"app-organization-plans\",\n  templateUrl: \"organization-plans.component.html\",\n  standalone: true,\n  imports: [BillingSharedModule, OrganizationCreateModule],\n})\nexport class OrganizationPlansComponent implements OnInit, OnDestroy {\n  @ViewChild(PaymentComponent) paymentComponent: PaymentComponent;\n  @ViewChild(PaymentV2Component) paymentV2Component: PaymentV2Component;\n  @ViewChild(ManageTaxInformationComponent) taxComponent: ManageTaxInformationComponent;\n\n  @Input() organizationId?: string;\n  @Input() showFree = true;\n  @Input() showCancel = false;\n  @Input() acceptingSponsorship = false;\n  @Input() currentPlan: PlanResponse;\n\n  selectedFile: File;\n\n  @Input()\n  get productTier(): ProductTierType {\n    return this._productTier;\n  }\n\n  set productTier(product: ProductTierType) {\n    this._productTier = product;\n    this.formGroup?.controls?.productTier?.setValue(product);\n  }\n\n  private _productTier = ProductTierType.Free;\n\n  protected taxInformation: TaxInformation;\n\n  @Input()\n  get plan(): PlanType {\n    return this._plan;\n  }\n\n  set plan(plan: PlanType) {\n    this._plan = plan;\n    this.formGroup?.controls?.plan?.setValue(plan);\n  }\n\n  private _plan = PlanType.Free;\n  @Input() providerId?: string;\n  @Input() preSelectedProductTier?: ProductTierType;\n  @Output() onSuccess = new EventEmitter<OnSuccessArgs>();\n  @Output() onCanceled = new EventEmitter<void>();\n  @Output() onTrialBillingSuccess = new EventEmitter();\n\n  loading = true;\n  selfHosted = false;\n  productTypes = ProductTierType;\n  formPromise: Promise<string>;\n  singleOrgPolicyAppliesToActiveUser = false;\n  isInTrialFlow = false;\n  discount = 0;\n  deprecateStripeSourcesAPI: boolean;\n\n  protected useLicenseUploaderComponent$ = this.configService.getFeatureFlag$(\n    FeatureFlag.PM11901_RefactorSelfHostingLicenseUploader,\n  );\n\n  secretsManagerSubscription = secretsManagerSubscribeFormFactory(this.formBuilder);\n\n  selfHostedForm = this.formBuilder.group({\n    file: [null, [Validators.required]],\n  });\n\n  formGroup = this.formBuilder.group({\n    name: [\"\"],\n    billingEmail: [\"\", [Validators.email]],\n    businessOwned: [false],\n    premiumAccessAddon: [false],\n    additionalStorage: [0, [Validators.min(0), Validators.max(99)]],\n    additionalSeats: [0, [Validators.min(0), Validators.max(100000)]],\n    clientOwnerEmail: [\"\", [Validators.email]],\n    plan: [this.plan],\n    productTier: [this.productTier],\n    secretsManager: this.secretsManagerSubscription,\n  });\n\n  passwordManagerPlans: PlanResponse[];\n  secretsManagerPlans: PlanResponse[];\n  organization: Organization;\n  sub: OrganizationSubscriptionResponse;\n  billing: BillingResponse;\n  provider: ProviderResponse;\n\n  protected estimatedTax: number = 0;\n  protected total: number = 0;\n\n  private destroy$: Subject<void> = new Subject<void>();\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private router: Router,\n    private syncService: SyncService,\n    private policyService: PolicyService,\n    private organizationService: OrganizationService,\n    private messagingService: MessagingService,\n    private formBuilder: FormBuilder,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private providerApiService: ProviderApiServiceAbstraction,\n    private toastService: ToastService,\n    private configService: ConfigService,\n    private billingApiService: BillingApiServiceAbstraction,\n    private taxService: TaxServiceAbstraction,\n  ) {\n    this.selfHosted = this.platformUtilsService.isSelfHost();\n  }\n\n  async ngOnInit() {\n    this.deprecateStripeSourcesAPI = await this.configService.getFeatureFlag(\n      FeatureFlag.AC2476_DeprecateStripeSourcesAPI,\n    );\n\n    if (this.organizationId) {\n      this.organization = await this.organizationService.get(this.organizationId);\n      this.billing = null; // no billing in Vaultwarden\n      this.sub = null; // no subscriptions in Vaultwarden;\n      this.taxInformation = null; // no taxes in Vaultwarden;\n    }\n\n    /* no need to ask /api/plans because Vaultwarden only supports the free plan\n    if (!this.selfHosted) {\n      const plans = await this.apiService.getPlans();\n      this.passwordManagerPlans = plans.data.filter((plan) => !!plan.PasswordManager);\n      this.secretsManagerPlans = plans.data.filter((plan) => !!plan.SecretsManager);\n\n      if (\n        this.productTier === ProductTierType.Enterprise ||\n        this.productTier === ProductTierType.Teams\n      ) {\n        this.formGroup.controls.businessOwned.setValue(true);\n      }\n    }\n\n    if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n      const upgradedPlan = this.passwordManagerPlans.find((plan) =>\n        this.currentPlan.productTier === ProductTierType.Free\n          ? plan.type === PlanType.FamiliesAnnually\n          : plan.upgradeSortOrder == this.currentPlan.upgradeSortOrder + 1,\n      );\n\n      this.plan = upgradedPlan.type;\n      this.productTier = upgradedPlan.productTier;\n    }\n\n    if (this.hasProvider) {\n      this.formGroup.controls.businessOwned.setValue(true);\n      this.formGroup.controls.clientOwnerEmail.addValidators(Validators.required);\n      this.changedOwnedBusiness();\n      this.provider = await this.providerApiService.getProvider(this.providerId);\n      const providerDefaultPlan = this.passwordManagerPlans.find(\n        (plan) => plan.type === PlanType.TeamsAnnually,\n      );\n      this.plan = providerDefaultPlan.type;\n      this.productTier = providerDefaultPlan.productTier;\n    }\n    end of asking /api/plans in Vaultwarden */\n\n    if (!this.createOrganization) {\n      this.upgradeFlowPrefillForm();\n    } else {\n      this.formGroup.controls.name.addValidators([Validators.required, Validators.maxLength(50)]);\n      this.formGroup.controls.billingEmail.addValidators(Validators.required);\n    }\n\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.SingleOrg)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((policyAppliesToActiveUser) => {\n        this.singleOrgPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n      });\n\n    if (this.preSelectedProductTier != null && this.productTier < this.preSelectedProductTier) {\n      this.productTier = this.preSelectedProductTier;\n    }\n    if (!this.selfHosted) {\n      this.changedProduct();\n    }\n\n    this.loading = false;\n\n    this.formGroup.valueChanges.pipe(debounceTime(1000), takeUntil(this.destroy$)).subscribe(() => {\n      this.refreshSalesTax();\n    });\n\n    this.secretsManagerForm.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.refreshSalesTax();\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  get singleOrgPolicyBlock() {\n    return this.singleOrgPolicyAppliesToActiveUser && !this.hasProvider;\n  }\n\n  get createOrganization() {\n    return this.organizationId == null;\n  }\n\n  get upgradeRequiresPaymentMethod() {\n    return (\n      this.organization?.productTierType === ProductTierType.Free &&\n      !this.showFree &&\n      !this.billing?.paymentSource\n    );\n  }\n\n  get selectedPlan() {\n    return this.passwordManagerPlans.find(\n      (plan) => plan.type === this.formGroup.controls.plan.value,\n    );\n  }\n\n  get selectedSecretsManagerPlan() {\n    return this.secretsManagerPlans.find(\n      (plan) => plan.type === this.formGroup.controls.plan.value,\n    );\n  }\n\n  get selectedPlanInterval() {\n    return this.selectedPlan.isAnnual ? \"year\" : \"month\";\n  }\n\n  isProviderQualifiedFor2020Plan() {\n    const targetDate = new Date(\"2023-11-06\");\n\n    if (!this.provider || !this.provider.creationDate) {\n      return false;\n    }\n\n    const creationDate = new Date(this.provider.creationDate);\n    return creationDate < targetDate;\n  }\n\n  get selectableProducts() {\n    return null; // there are no products to select in Vaultwarden\n    if (this.acceptingSponsorship) {\n      const familyPlan = this.passwordManagerPlans.find(\n        (plan) => plan.type === PlanType.FamiliesAnnually,\n      );\n      this.discount = familyPlan.PasswordManager.basePrice;\n      return [familyPlan];\n    }\n\n    const businessOwnedIsChecked = this.formGroup.controls.businessOwned.value;\n\n    const result = this.passwordManagerPlans.filter(\n      (plan) =>\n        plan.type !== PlanType.Custom &&\n        (!businessOwnedIsChecked || plan.canBeUsedByBusiness) &&\n        (this.showFree || plan.productTier !== ProductTierType.Free) &&\n        (plan.isAnnual ||\n          plan.productTier === ProductTierType.Free ||\n          plan.productTier === ProductTierType.TeamsStarter) &&\n        (!this.currentPlan || this.currentPlan.upgradeSortOrder < plan.upgradeSortOrder) &&\n        (!this.hasProvider || plan.productTier !== ProductTierType.TeamsStarter) &&\n        ((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||\n          (this.isProviderQualifiedFor2020Plan() &&\n            Allowed2020PlansForLegacyProviders.includes(plan.type))),\n    );\n\n    result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n\n    return result;\n  }\n\n  get selectablePlans() {\n    return null; // no plans to select in Vaultwarden\n    const selectedProductTierType = this.formGroup.controls.productTier.value;\n    const result =\n      this.passwordManagerPlans?.filter(\n        (plan) =>\n          plan.productTier === selectedProductTierType &&\n          ((!this.isProviderQualifiedFor2020Plan() && this.planIsEnabled(plan)) ||\n            (this.isProviderQualifiedFor2020Plan() &&\n              Allowed2020PlansForLegacyProviders.includes(plan.type))),\n      ) || [];\n\n    result.sort((planA, planB) => planA.displaySortOrder - planB.displaySortOrder);\n    return result;\n  }\n\n  get hasProvider() {\n    return this.providerId != null;\n  }\n\n  additionalStoragePriceMonthly(selectedPlan: PlanResponse) {\n    if (!selectedPlan.isAnnual) {\n      return selectedPlan.PasswordManager.additionalStoragePricePerGb;\n    }\n    return selectedPlan.PasswordManager.additionalStoragePricePerGb / 12;\n  }\n\n  seatPriceMonthly(selectedPlan: PlanResponse) {\n    if (!selectedPlan.isAnnual) {\n      return selectedPlan.PasswordManager.seatPrice;\n    }\n    return selectedPlan.PasswordManager.seatPrice / 12;\n  }\n\n  additionalStorageTotal(plan: PlanResponse): number {\n    if (!plan.PasswordManager.hasAdditionalStorageOption) {\n      return 0;\n    }\n\n    return (\n      plan.PasswordManager.additionalStoragePricePerGb *\n      Math.abs(this.formGroup.controls.additionalStorage.value || 0)\n    );\n  }\n\n  passwordManagerSeatTotal(plan: PlanResponse, seats: number): number {\n    if (!plan.PasswordManager.hasAdditionalSeatsOption) {\n      return 0;\n    }\n\n    return plan.PasswordManager.seatPrice * Math.abs(seats || 0);\n  }\n\n  secretsManagerSeatTotal(plan: PlanResponse, seats: number): number {\n    if (!plan.SecretsManager.hasAdditionalSeatsOption) {\n      return 0;\n    }\n\n    return plan.SecretsManager.seatPrice * Math.abs(seats || 0);\n  }\n\n  additionalServiceAccountTotal(plan: PlanResponse): number {\n    if (!plan.SecretsManager.hasAdditionalServiceAccountOption) {\n      return 0;\n    }\n\n    return (\n      plan.SecretsManager.additionalPricePerServiceAccount *\n      Math.abs(this.secretsManagerForm.value.additionalServiceAccounts || 0)\n    );\n  }\n\n  get passwordManagerSubtotal() {\n    let subTotal = this.selectedPlan.PasswordManager.basePrice;\n    if (\n      this.selectedPlan.PasswordManager.hasAdditionalSeatsOption &&\n      this.formGroup.controls.additionalSeats.value\n    ) {\n      subTotal += this.passwordManagerSeatTotal(\n        this.selectedPlan,\n        this.formGroup.value.additionalSeats,\n      );\n    }\n    if (\n      this.selectedPlan.PasswordManager.hasAdditionalStorageOption &&\n      this.formGroup.controls.additionalStorage.value\n    ) {\n      subTotal += this.additionalStorageTotal(this.selectedPlan);\n    }\n    if (\n      this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n      this.formGroup.controls.premiumAccessAddon.value\n    ) {\n      subTotal += this.selectedPlan.PasswordManager.premiumAccessOptionPrice;\n    }\n    return subTotal - this.discount;\n  }\n\n  get secretsManagerSubtotal() {\n    const plan = this.selectedSecretsManagerPlan;\n    const formValues = this.secretsManagerForm.value;\n\n    if (!this.planOffersSecretsManager || !formValues.enabled) {\n      return 0;\n    }\n\n    return (\n      plan.SecretsManager.basePrice +\n      this.secretsManagerSeatTotal(plan, formValues.userSeats) +\n      this.additionalServiceAccountTotal(plan)\n    );\n  }\n\n  get freeTrial() {\n    return this.selectedPlan.trialPeriodDays != null;\n  }\n\n  get paymentDesc() {\n    if (this.acceptingSponsorship) {\n      return this.i18nService.t(\"paymentSponsored\");\n    } else if (this.freeTrial && this.createOrganization) {\n      return this.i18nService.t(\"paymentChargedWithTrial\");\n    } else {\n      return this.i18nService.t(\"paymentCharged\", this.i18nService.t(this.selectedPlanInterval));\n    }\n  }\n\n  get secretsManagerForm() {\n    return this.formGroup.controls.secretsManager;\n  }\n\n  get planOffersSecretsManager() {\n    return false; // no support for secrets manager in Vaultwarden\n    return this.selectedSecretsManagerPlan != null;\n  }\n\n  get teamsStarterPlanIsAvailable() {\n    return this.selectablePlans.some((plan) => plan.type === PlanType.TeamsStarter);\n  }\n\n  changedProduct() {\n    return; // no choice of products in Vaultwarden\n    const selectedPlan = this.selectablePlans[0];\n\n    this.setPlanType(selectedPlan.type);\n    this.handlePremiumAddonAccess(selectedPlan.PasswordManager.hasPremiumAccessOption);\n    this.handleAdditionalStorage(selectedPlan.PasswordManager.hasAdditionalStorageOption);\n    this.handleAdditionalSeats(selectedPlan.PasswordManager.hasAdditionalSeatsOption);\n    this.handleSecretsManagerForm();\n  }\n\n  setPlanType(planType: PlanType) {\n    this.formGroup.controls.plan.setValue(planType);\n  }\n\n  handlePremiumAddonAccess(hasPremiumAccessOption: boolean) {\n    this.formGroup.controls.premiumAccessAddon.setValue(!hasPremiumAccessOption);\n  }\n\n  handleAdditionalStorage(selectedPlanHasAdditionalStorageOption: boolean) {\n    if (!selectedPlanHasAdditionalStorageOption || !this.currentPlan) {\n      this.formGroup.controls.additionalStorage.setValue(0);\n      return;\n    }\n\n    if (this.organization?.maxStorageGb) {\n      this.formGroup.controls.additionalStorage.setValue(\n        this.organization.maxStorageGb - this.currentPlan.PasswordManager.baseStorageGb,\n      );\n    }\n  }\n\n  handleAdditionalSeats(selectedPlanHasAdditionalSeatsOption: boolean) {\n    if (!selectedPlanHasAdditionalSeatsOption) {\n      this.formGroup.controls.additionalSeats.setValue(0);\n      return;\n    }\n\n    if (this.currentPlan && !this.currentPlan.PasswordManager.hasAdditionalSeatsOption) {\n      this.formGroup.controls.additionalSeats.setValue(this.currentPlan.PasswordManager.baseSeats);\n      return;\n    }\n\n    if (this.organization) {\n      this.formGroup.controls.additionalSeats.setValue(this.organization.seats);\n      return;\n    }\n\n    this.formGroup.controls.additionalSeats.setValue(1);\n  }\n\n  handleSecretsManagerForm() {\n    if (this.planOffersSecretsManager) {\n      this.secretsManagerForm.enable();\n    }\n\n    if (this.organization?.useSecretsManager) {\n      this.secretsManagerForm.controls.enabled.setValue(true);\n    }\n\n    if (this.secretsManagerForm.controls.enabled.value) {\n      this.secretsManagerForm.controls.userSeats.setValue(this.sub?.smSeats || 1);\n      this.secretsManagerForm.controls.additionalServiceAccounts.setValue(\n        this.sub?.smServiceAccounts - this.currentPlan.SecretsManager?.baseServiceAccount || 0,\n      );\n    }\n\n    this.secretsManagerForm.updateValueAndValidity();\n  }\n\n  changedOwnedBusiness() {\n    if (!this.formGroup.controls.businessOwned.value || this.selectedPlan.canBeUsedByBusiness) {\n      return;\n    }\n    if (this.teamsStarterPlanIsAvailable) {\n      this.formGroup.controls.productTier.setValue(ProductTierType.TeamsStarter);\n      this.formGroup.controls.plan.setValue(PlanType.TeamsStarter);\n    } else {\n      this.formGroup.controls.productTier.setValue(ProductTierType.Teams);\n      this.formGroup.controls.plan.setValue(PlanType.TeamsAnnually);\n    }\n    this.changedProduct();\n  }\n\n  protected changedCountry(): void {\n    if (this.deprecateStripeSourcesAPI) {\n      this.paymentV2Component.showBankAccount = this.taxInformation?.country === \"US\";\n      if (\n        !this.paymentV2Component.showBankAccount &&\n        this.paymentV2Component.selected === PaymentMethodType.BankAccount\n      ) {\n        this.paymentV2Component.select(PaymentMethodType.Card);\n      }\n    } else {\n      this.paymentComponent.hideBank = this.taxInformation?.country !== \"US\";\n      if (\n        this.paymentComponent.hideBank &&\n        this.paymentComponent.method === PaymentMethodType.BankAccount\n      ) {\n        this.paymentComponent.method = PaymentMethodType.Card;\n        this.paymentComponent.changeMethod();\n      }\n    }\n  }\n\n  protected onTaxInformationChanged(event: TaxInformation): void {\n    this.taxInformation = event;\n    this.changedCountry();\n    this.refreshSalesTax();\n  }\n\n  protected cancel(): void {\n    this.onCanceled.emit();\n  }\n\n  protected setSelectedFile(event: Event): void {\n    const fileInputEl = <HTMLInputElement>event.target;\n    this.selectedFile = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;\n  }\n\n  submit = async () => {\n    if (this.taxComponent && !this.taxComponent.validate()) {\n      this.taxComponent.markAllAsTouched();\n      return;\n    }\n\n    if (this.singleOrgPolicyBlock) {\n      return;\n    }\n    const doSubmit = async (): Promise<string> => {\n      let orgId: string;\n      if (this.createOrganization) {\n        const orgKey = await this.keyService.makeOrgKey<OrgKey>();\n        const key = orgKey[0].encryptedString;\n        const collection = await this.encryptService.encrypt(\n          this.i18nService.t(\"defaultCollection\"),\n          orgKey[1],\n        );\n        const collectionCt = collection.encryptedString;\n        const orgKeys = await this.keyService.makeKeyPair(orgKey[1]);\n\n        // always use createCloudHosted() to disable license file upload\n        orgId = await this.createCloudHosted(key, collectionCt, orgKeys, orgKey[1]);\n\n        this.toastService.showToast({\n          variant: \"success\",\n          title: this.i18nService.t(\"organizationCreated\"),\n          message: this.i18nService.t(\"organizationReadyToGo\"),\n        });\n      } else {\n        orgId = await this.updateOrganization();\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"organizationUpgraded\"),\n        });\n      }\n\n      await this.apiService.refreshIdentityToken();\n      await this.syncService.fullSync(true);\n\n      if (!this.acceptingSponsorship && !this.isInTrialFlow) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/organizations/\" + orgId]);\n      }\n\n      if (this.isInTrialFlow) {\n        this.onTrialBillingSuccess.emit({\n          orgId: orgId,\n          subLabelText: this.billingSubLabelText(),\n        });\n      }\n\n      return orgId;\n    };\n\n    this.formPromise = doSubmit();\n    const organizationId = await this.formPromise;\n    this.onSuccess.emit({ organizationId: organizationId });\n    // TODO: No one actually listening to this message?\n    this.messagingService.send(\"organizationCreated\", { organizationId });\n  };\n\n  protected get showTaxIdField(): boolean {\n    switch (this.formGroup.controls.productTier.value) {\n      case ProductTierType.Free:\n      case ProductTierType.Families:\n        return false;\n      default:\n        return true;\n    }\n  }\n\n  private refreshSalesTax(): void {\n    if (this.formGroup.controls.plan.value == PlanType.Free) {\n      this.estimatedTax = 0;\n      return;\n    }\n\n    if (!this.taxComponent.validate()) {\n      return;\n    }\n\n    const request: PreviewOrganizationInvoiceRequest = {\n      organizationId: this.organizationId,\n      passwordManager: {\n        additionalStorage: this.formGroup.controls.additionalStorage.value,\n        plan: this.formGroup.controls.plan.value,\n        seats: this.formGroup.controls.additionalSeats.value,\n      },\n      taxInformation: {\n        postalCode: this.taxInformation.postalCode,\n        country: this.taxInformation.country,\n        taxId: this.taxInformation.taxId,\n      },\n    };\n\n    if (this.secretsManagerForm.controls.enabled.value === true) {\n      request.secretsManager = {\n        seats: this.secretsManagerForm.controls.userSeats.value,\n        additionalMachineAccounts: this.secretsManagerForm.controls.additionalServiceAccounts.value,\n      };\n    }\n\n    this.taxService\n      .previewOrganizationInvoice(request)\n      .then((invoice) => {\n        this.estimatedTax = invoice.taxAmount;\n        this.total = invoice.totalAmount;\n      })\n      .catch((error) => {\n        this.toastService.showToast({\n          title: \"\",\n          variant: \"error\",\n          message: this.i18nService.t(error.message),\n        });\n      });\n  }\n\n  private async updateOrganization() {\n    const request = new OrganizationUpgradeRequest();\n    request.additionalSeats = this.formGroup.controls.additionalSeats.value;\n    request.additionalStorageGb = this.formGroup.controls.additionalStorage.value;\n    request.premiumAccessAddon =\n      this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n      this.formGroup.controls.premiumAccessAddon.value;\n    request.planType = this.selectedPlan.type;\n    request.billingAddressCountry = this.taxInformation?.country;\n    request.billingAddressPostalCode = this.taxInformation?.postalCode;\n\n    // Secrets Manager\n    this.buildSecretsManagerRequest(request);\n\n    if (this.upgradeRequiresPaymentMethod) {\n      if (this.deprecateStripeSourcesAPI) {\n        const updatePaymentMethodRequest = new UpdatePaymentMethodRequest();\n        updatePaymentMethodRequest.paymentSource = await this.paymentV2Component.tokenize();\n        updatePaymentMethodRequest.taxInformation = ExpandedTaxInfoUpdateRequest.From(\n          this.taxInformation,\n        );\n        await this.billingApiService.updateOrganizationPaymentMethod(\n          this.organizationId,\n          updatePaymentMethodRequest,\n        );\n      } else {\n        const [paymentToken, paymentMethodType] = await this.paymentComponent.createPaymentToken();\n        const paymentRequest = new PaymentRequest();\n        paymentRequest.paymentToken = paymentToken;\n        paymentRequest.paymentMethodType = paymentMethodType;\n        paymentRequest.country = this.taxInformation?.country;\n        paymentRequest.postalCode = this.taxInformation?.postalCode;\n        await this.organizationApiService.updatePayment(this.organizationId, paymentRequest);\n      }\n    }\n\n    // Backfill pub/priv key if necessary\n    if (!this.organization.hasPublicAndPrivateKeys) {\n      const orgShareKey = await this.keyService.getOrgKey(this.organizationId);\n      const orgKeys = await this.keyService.makeKeyPair(orgShareKey);\n      request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n    }\n\n    const result = await this.organizationApiService.upgrade(this.organizationId, request);\n    if (!result.success && result.paymentIntentClientSecret != null) {\n      await this.paymentComponent.handleStripeCardPayment(result.paymentIntentClientSecret, null);\n    }\n    return this.organizationId;\n  }\n\n  private async createCloudHosted(\n    key: string,\n    collectionCt: string,\n    orgKeys: [string, EncString],\n    orgKey: SymmetricCryptoKey,\n  ): Promise<string> {\n    const request = new OrganizationCreateRequest();\n    request.key = key;\n    request.collectionName = collectionCt;\n    request.name = this.formGroup.controls.name.value;\n    request.billingEmail = this.formGroup.controls.billingEmail.value;\n    request.initiationPath = \"New organization creation in-product\";\n    request.keys = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n    request.planType = PlanType.Free; // always select the free plan in Vaultwarden\n\n    /* there is no plan to select in Vaultwarden\n    if (this.selectedPlan.type === PlanType.Free) {\n      request.planType = PlanType.Free;\n    } else {\n      let type: PaymentMethodType;\n      let token: string;\n\n      if (this.deprecateStripeSourcesAPI) {\n        ({ type, token } = await this.paymentV2Component.tokenize());\n      } else {\n        [token, type] = await this.paymentComponent.createPaymentToken();\n      }\n\n      request.paymentToken = token;\n      request.paymentMethodType = type;\n      request.additionalSeats = this.formGroup.controls.additionalSeats.value;\n      request.additionalStorageGb = this.formGroup.controls.additionalStorage.value;\n      request.premiumAccessAddon =\n        this.selectedPlan.PasswordManager.hasPremiumAccessOption &&\n        this.formGroup.controls.premiumAccessAddon.value;\n      request.planType = this.selectedPlan.type;\n      request.billingAddressPostalCode = this.taxInformation?.postalCode;\n      request.billingAddressCountry = this.taxInformation?.country;\n      request.taxIdNumber = this.taxInformation?.taxId;\n      request.billingAddressLine1 = this.taxInformation?.line1;\n      request.billingAddressLine2 = this.taxInformation?.line2;\n      request.billingAddressCity = this.taxInformation?.city;\n      request.billingAddressState = this.taxInformation?.state;\n    }\n\n    // Secrets Manager\n    this.buildSecretsManagerRequest(request);\n    end plan selection and no support for secret manager in Vaultwarden */\n\n    if (this.hasProvider) {\n      const providerRequest = new ProviderOrganizationCreateRequest(\n        this.formGroup.controls.clientOwnerEmail.value,\n        request,\n      );\n      const providerKey = await this.keyService.getProviderKey(this.providerId);\n      providerRequest.organizationCreateRequest.key = (\n        await this.encryptService.encrypt(orgKey.key, providerKey)\n      ).encryptedString;\n      const orgId = (\n        await this.apiService.postProviderCreateOrganization(this.providerId, providerRequest)\n      ).organizationId;\n\n      return orgId;\n    } else {\n      return (await this.organizationApiService.create(request)).id;\n    }\n  }\n\n  private async createSelfHosted(key: string, collectionCt: string, orgKeys: [string, EncString]) {\n    if (!this.selectedFile) {\n      throw new Error(this.i18nService.t(\"selectFile\"));\n    }\n\n    const fd = new FormData();\n    fd.append(\"license\", this.selectedFile);\n    fd.append(\"key\", key);\n    fd.append(\"collectionName\", collectionCt);\n    const response = await this.organizationApiService.createLicense(fd);\n    const orgId = response.id;\n\n    await this.apiService.refreshIdentityToken();\n\n    // Org Keys live outside of the OrganizationLicense - add the keys to the org here\n    const request = new OrganizationKeysRequest(orgKeys[0], orgKeys[1].encryptedString);\n    await this.organizationApiService.updateKeys(orgId, request);\n\n    return orgId;\n  }\n\n  private billingSubLabelText(): string {\n    const selectedPlan = this.selectedPlan;\n    const price =\n      selectedPlan.PasswordManager.basePrice === 0\n        ? selectedPlan.PasswordManager.seatPrice\n        : selectedPlan.PasswordManager.basePrice;\n    let text = \"\";\n\n    if (selectedPlan.isAnnual) {\n      text += `${this.i18nService.t(\"annual\")} ($${price}/${this.i18nService.t(\"yr\")})`;\n    } else {\n      text += `${this.i18nService.t(\"monthly\")} ($${price}/${this.i18nService.t(\"monthAbbr\")})`;\n    }\n\n    return text;\n  }\n\n  private buildSecretsManagerRequest(\n    request: OrganizationCreateRequest | OrganizationUpgradeRequest,\n  ): void {\n    const formValues = this.secretsManagerForm.value;\n\n    request.useSecretsManager = this.planOffersSecretsManager && formValues.enabled;\n\n    if (!request.useSecretsManager) {\n      return;\n    }\n\n    if (this.selectedSecretsManagerPlan.SecretsManager.hasAdditionalSeatsOption) {\n      request.additionalSmSeats = formValues.userSeats;\n    }\n\n    if (this.selectedSecretsManagerPlan.SecretsManager.hasAdditionalServiceAccountOption) {\n      request.additionalServiceAccounts = formValues.additionalServiceAccounts;\n    }\n  }\n\n  private upgradeFlowPrefillForm() {\n    return; // Vaultwarden only supports free plan\n    if (this.acceptingSponsorship) {\n      this.formGroup.controls.productTier.setValue(ProductTierType.Families);\n      this.changedProduct();\n      return;\n    }\n\n    if (this.currentPlan && this.currentPlan.productTier !== ProductTierType.Enterprise) {\n      const upgradedPlan = this.passwordManagerPlans.find((plan) => {\n        if (this.currentPlan.productTier === ProductTierType.Free) {\n          return plan.type === PlanType.FamiliesAnnually;\n        }\n\n        if (\n          this.currentPlan.productTier === ProductTierType.Families &&\n          !this.teamsStarterPlanIsAvailable\n        ) {\n          return plan.type === PlanType.TeamsAnnually;\n        }\n\n        return plan.upgradeSortOrder === this.currentPlan.upgradeSortOrder + 1;\n      });\n\n      this.plan = upgradedPlan.type;\n      this.productTier = upgradedPlan.productTier;\n      this.changedProduct();\n    }\n  }\n\n  private planIsEnabled(plan: PlanResponse) {\n    return !plan.disabled && !plan.legacyYear;\n  }\n\n  protected async onLicenseFileUploaded(organizationId: string): Promise<void> {\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"organizationCreated\"),\n      message: this.i18nService.t(\"organizationReadyToGo\"),\n    });\n\n    if (!this.acceptingSponsorship && !this.isInTrialFlow) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"/organizations/\" + organizationId]);\n    }\n\n    if (this.isInTrialFlow) {\n      this.onTrialBillingSuccess.emit({\n        orgId: organizationId,\n        subLabelText: this.billingSubLabelText(),\n      });\n    }\n\n    this.onSuccess.emit({ organizationId: organizationId });\n\n    // TODO: No one actually listening to this message?\n    this.messagingService.send(\"organizationCreated\", { organizationId: organizationId });\n  }\n}\n","import { Injectable } from \"@angular/core\";\nimport { combineLatest, filter, from, map, Observable, of, switchMap } from \"rxjs\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\ninterface EnterpriseOrgStatus {\n  isFreeFamilyPolicyEnabled: boolean;\n  belongToOneEnterpriseOrgs: boolean;\n  belongToMultipleEnterpriseOrgs: boolean;\n}\n\n@Injectable({ providedIn: \"root\" })\nexport class FreeFamiliesPolicyService {\n  protected enterpriseOrgStatus: EnterpriseOrgStatus = {\n    isFreeFamilyPolicyEnabled: false,\n    belongToOneEnterpriseOrgs: false,\n    belongToMultipleEnterpriseOrgs: false,\n  };\n\n  constructor(\n    private policyService: PolicyService,\n    private organizationService: OrganizationService,\n    private configService: ConfigService,\n  ) {}\n\n  get showFreeFamilies$(): Observable<boolean> {\n    return this.isFreeFamilyFlagEnabled$.pipe(\n      switchMap((isFreeFamilyFlagEnabled) =>\n        isFreeFamilyFlagEnabled\n          ? this.getFreeFamiliesVisibility$()\n          : this.organizationService.canManageSponsorships$,\n      ),\n    );\n  }\n\n  private getFreeFamiliesVisibility$(): Observable<boolean> {\n    return combineLatest([\n      this.checkEnterpriseOrganizationsAndFetchPolicy(),\n      this.organizationService.canManageSponsorships$,\n    ]).pipe(\n      map(([orgStatus, canManageSponsorships]) =>\n        this.shouldShowFreeFamilyLink(orgStatus, canManageSponsorships),\n      ),\n    );\n  }\n\n  private shouldShowFreeFamilyLink(\n    orgStatus: EnterpriseOrgStatus | null,\n    canManageSponsorships: boolean,\n  ): boolean {\n    if (!orgStatus) {\n      return false;\n    }\n    const { belongToOneEnterpriseOrgs, isFreeFamilyPolicyEnabled } = orgStatus;\n    return canManageSponsorships && !(belongToOneEnterpriseOrgs && isFreeFamilyPolicyEnabled);\n  }\n\n  checkEnterpriseOrganizationsAndFetchPolicy(): Observable<EnterpriseOrgStatus> {\n    return this.organizationService.organizations$.pipe(\n      filter((organizations) => Array.isArray(organizations) && organizations.length > 0),\n      switchMap((organizations) => this.fetchEnterpriseOrganizationPolicy(organizations)),\n    );\n  }\n\n  private fetchEnterpriseOrganizationPolicy(\n    organizations: Organization[],\n  ): Observable<EnterpriseOrgStatus> {\n    const { belongToOneEnterpriseOrgs, belongToMultipleEnterpriseOrgs } =\n      this.evaluateEnterpriseOrganizations(organizations);\n\n    if (!belongToOneEnterpriseOrgs) {\n      return of({\n        isFreeFamilyPolicyEnabled: false,\n        belongToOneEnterpriseOrgs,\n        belongToMultipleEnterpriseOrgs,\n      });\n    }\n\n    const organizationId = this.getOrganizationIdForOneEnterprise(organizations);\n    if (!organizationId) {\n      return of({\n        isFreeFamilyPolicyEnabled: false,\n        belongToOneEnterpriseOrgs,\n        belongToMultipleEnterpriseOrgs,\n      });\n    }\n\n    return this.policyService.getAll$(PolicyType.FreeFamiliesSponsorshipPolicy).pipe(\n      map((policies) => ({\n        isFreeFamilyPolicyEnabled: policies.some(\n          (policy) => policy.organizationId === organizationId && policy.enabled,\n        ),\n        belongToOneEnterpriseOrgs,\n        belongToMultipleEnterpriseOrgs,\n      })),\n    );\n  }\n\n  private evaluateEnterpriseOrganizations(organizations: any[]): {\n    belongToOneEnterpriseOrgs: boolean;\n    belongToMultipleEnterpriseOrgs: boolean;\n  } {\n    const enterpriseOrganizations = organizations.filter((org) => org.canManageSponsorships);\n    const count = enterpriseOrganizations.length;\n\n    return {\n      belongToOneEnterpriseOrgs: count === 1,\n      belongToMultipleEnterpriseOrgs: count > 1,\n    };\n  }\n\n  private getOrganizationIdForOneEnterprise(organizations: any[]): string | null {\n    const enterpriseOrganizations = organizations.filter((org) => org.canManageSponsorships);\n    return enterpriseOrganizations.length === 1 ? enterpriseOrganizations[0].id : null;\n  }\n\n  private get isFreeFamilyFlagEnabled$(): Observable<boolean> {\n    return from(this.configService.getFeatureFlag(FeatureFlag.DisableFreeFamiliesSponsorship));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billing-api.service.abstraction\";\nimport { BillingSourceResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { OrganizationBillingMetadataResponse } from \"@bitwarden/common/billing/models/response/organization-billing-metadata.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PaymentSourceResponse } from \"@bitwarden/common/billing/models/response/payment-source.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { FreeTrial } from \"../../core/types/free-trial\";\nimport {\n  ChangePlanDialogResultType,\n  openChangePlanDialog,\n} from \"../organizations/change-plan-dialog.component\";\n\n@Injectable({ providedIn: \"root\" })\nexport class TrialFlowService {\n  private resellerManagedOrgAlert: boolean;\n\n  constructor(\n    private i18nService: I18nService,\n    protected dialogService: DialogService,\n    private router: Router,\n    protected billingApiService: BillingApiServiceAbstraction,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private configService: ConfigService,\n  ) {}\n  checkForOrgsWithUpcomingPaymentIssues(\n    organization: Organization,\n    organizationSubscription: OrganizationSubscriptionResponse,\n    paymentSource: BillingSourceResponse | PaymentSourceResponse,\n  ): FreeTrial {\n    const trialEndDate = organizationSubscription?.subscription?.trialEndDate;\n    const displayBanner =\n      !paymentSource &&\n      organization?.isOwner &&\n      organizationSubscription?.subscription?.status === \"trialing\";\n    const trialRemainingDays = trialEndDate ? this.calculateTrialRemainingDays(trialEndDate) : 0;\n    const freeTrialMessage = this.getFreeTrialMessage(trialRemainingDays);\n\n    return {\n      remainingDays: trialRemainingDays,\n      message: freeTrialMessage,\n      shownBanner: displayBanner,\n      organizationId: organization.id,\n      organizationName: organization.name,\n    };\n  }\n\n  calculateTrialRemainingDays(trialEndDate: string): number | undefined {\n    const today = new Date();\n    const trialEnd = new Date(trialEndDate);\n    const timeDifference = trialEnd.getTime() - today.getTime();\n\n    return Math.ceil(timeDifference / (1000 * 60 * 60 * 24));\n  }\n\n  getFreeTrialMessage(trialRemainingDays: number): string {\n    if (trialRemainingDays >= 2) {\n      return this.i18nService.t(\"freeTrialEndPromptCount\", trialRemainingDays);\n    } else if (trialRemainingDays === 1) {\n      return this.i18nService.t(\"freeTrialEndPromptTomorrowNoOrgName\");\n    } else {\n      return this.i18nService.t(\"freeTrialEndingTodayWithoutOrgName\");\n    }\n  }\n\n  async handleUnpaidSubscriptionDialog(\n    org: Organization,\n    organizationBillingMetadata: OrganizationBillingMetadataResponse,\n  ): Promise<void> {\n    if (\n      organizationBillingMetadata.isSubscriptionUnpaid ||\n      organizationBillingMetadata.isSubscriptionCanceled\n    ) {\n      const confirmed = await this.promptForPaymentNavigation(\n        org,\n        organizationBillingMetadata.isSubscriptionCanceled,\n        organizationBillingMetadata.isSubscriptionUnpaid,\n      );\n      if (confirmed) {\n        await this.navigateToPaymentMethod(org?.id);\n      }\n    }\n  }\n\n  private async promptForPaymentNavigation(\n    org: Organization,\n    isCanceled: boolean,\n    isUnpaid: boolean,\n  ): Promise<boolean> {\n    this.resellerManagedOrgAlert = await this.configService.getFeatureFlag(\n      FeatureFlag.ResellerManagedOrgAlert,\n    );\n\n    if (!org?.isOwner && !org.providerId) {\n      await this.dialogService.openSimpleDialog({\n        title: this.i18nService.t(\"suspendedOrganizationTitle\", org?.name),\n        content: { key: \"suspendedUserOrgMessage\" },\n        type: \"danger\",\n        acceptButtonText: this.i18nService.t(\"close\"),\n        cancelButtonText: null,\n      });\n      return false;\n    }\n\n    if (org.providerId && this.resellerManagedOrgAlert) {\n      await this.dialogService.openSimpleDialog({\n        title: this.i18nService.t(\"suspendedOrganizationTitle\", org.name),\n        content: { key: \"suspendedManagedOrgMessage\", placeholders: [org.providerName] },\n        type: \"danger\",\n        acceptButtonText: this.i18nService.t(\"close\"),\n        cancelButtonText: null,\n      });\n      return false;\n    }\n\n    if (org.isOwner && isUnpaid) {\n      return await this.dialogService.openSimpleDialog({\n        title: this.i18nService.t(\"suspendedOrganizationTitle\", org.name),\n        content: { key: \"suspendedOwnerOrgMessage\" },\n        type: \"danger\",\n        acceptButtonText: this.i18nService.t(\"continue\"),\n        cancelButtonText: this.i18nService.t(\"close\"),\n      });\n    }\n\n    if (org.isOwner && isCanceled && this.resellerManagedOrgAlert) {\n      await this.changePlan(org);\n    }\n  }\n\n  private async navigateToPaymentMethod(orgId: string) {\n    await this.router.navigate([\"organizations\", `${orgId}`, \"billing\", \"payment-method\"], {\n      state: { launchPaymentModalAutomatically: true },\n    });\n  }\n\n  private async changePlan(org: Organization) {\n    const subscription = await this.organizationApiService.getSubscription(org.id);\n    const reference = openChangePlanDialog(this.dialogService, {\n      data: {\n        organizationId: org.id,\n        subscription: subscription,\n        productTierType: org.productTierType,\n      },\n    });\n\n    const result = await lastValueFrom(reference.closed);\n    if (result === ChangePlanDialogResultType.Closed) {\n      return;\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, ElementRef, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BitPayInvoiceRequest } from \"@bitwarden/common/billing/models/request/bit-pay-invoice.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface AddCreditDialogData {\n  organizationId: string;\n}\n\nexport enum AddCreditDialogResult {\n  Added = \"added\",\n  Cancelled = \"cancelled\",\n}\n\nexport type PayPalConfig = {\n  businessId?: string;\n  buttonAction?: string;\n};\n\n@Component({\n  templateUrl: \"add-credit-dialog.component.html\",\n})\nexport class AddCreditDialogComponent implements OnInit {\n  @ViewChild(\"ppButtonForm\", { read: ElementRef, static: true }) ppButtonFormRef: ElementRef;\n\n  paymentMethodType = PaymentMethodType;\n  ppButtonFormAction: string;\n  ppButtonBusinessId: string;\n  ppButtonCustomField: string;\n  ppLoading = false;\n  subject: string;\n  returnUrl: string;\n  organizationId: string;\n\n  private userId: string;\n  private name: string;\n  private email: string;\n  private region: string;\n\n  protected DialogResult = AddCreditDialogResult;\n  protected formGroup = new FormGroup({\n    method: new FormControl(PaymentMethodType.PayPal),\n    creditAmount: new FormControl(null, [Validators.required]),\n  });\n\n  constructor(\n    private dialogRef: DialogRef,\n    @Inject(DIALOG_DATA) protected data: AddCreditDialogData,\n    private accountService: AccountService,\n    private apiService: ApiService,\n    private platformUtilsService: PlatformUtilsService,\n    private organizationService: OrganizationService,\n    private logService: LogService,\n    private configService: ConfigService,\n  ) {\n    this.organizationId = data.organizationId;\n    const payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;\n    this.ppButtonFormAction = payPalConfig.buttonAction;\n    this.ppButtonBusinessId = payPalConfig.businessId;\n  }\n\n  async ngOnInit() {\n    if (this.organizationId != null) {\n      if (this.creditAmount == null) {\n        this.creditAmount = \"20.00\";\n      }\n      this.ppButtonCustomField = \"organization_id:\" + this.organizationId;\n      const org = await this.organizationService.get(this.organizationId);\n      if (org != null) {\n        this.subject = org.name;\n        this.name = org.name;\n      }\n    } else {\n      if (this.creditAmount == null) {\n        this.creditAmount = \"10.00\";\n      }\n      const [userId, email] = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n      );\n      this.userId = userId;\n      this.subject = email;\n      this.email = this.subject;\n      this.ppButtonCustomField = \"user_id:\" + this.userId;\n    }\n    this.region = await firstValueFrom(this.configService.cloudRegion$);\n    this.ppButtonCustomField += \",account_credit:1\";\n    this.ppButtonCustomField += `,region:${this.region}`;\n    this.returnUrl = window.location.href;\n  }\n\n  get creditAmount() {\n    return this.formGroup.value.creditAmount;\n  }\n  set creditAmount(value: string) {\n    this.formGroup.get(\"creditAmount\").setValue(value);\n  }\n\n  get method() {\n    return this.formGroup.value.method;\n  }\n\n  submit = async () => {\n    if (this.creditAmount == null || this.creditAmount === \"\") {\n      return;\n    }\n\n    if (this.method === PaymentMethodType.PayPal) {\n      this.ppButtonFormRef.nativeElement.submit();\n      this.ppLoading = true;\n      return;\n    }\n    if (this.method === PaymentMethodType.BitPay) {\n      const req = new BitPayInvoiceRequest();\n      req.email = this.email;\n      req.name = this.name;\n      req.credit = true;\n      req.amount = this.creditAmountNumber;\n      req.organizationId = this.organizationId;\n      req.userId = this.userId;\n      req.returnUrl = this.returnUrl;\n      const bitPayUrl: string = await this.apiService.postBitPayInvoice(req);\n      this.platformUtilsService.launchUri(bitPayUrl);\n      return;\n    }\n    this.dialogRef.close(AddCreditDialogResult.Added);\n  };\n\n  formatAmount() {\n    try {\n      if (this.creditAmount != null && this.creditAmount !== \"\") {\n        const floatAmount = Math.abs(parseFloat(this.creditAmount));\n        if (floatAmount > 0) {\n          this.creditAmount = parseFloat((Math.round(floatAmount * 100) / 100).toString())\n            .toFixed(2)\n            .toString();\n          return;\n        }\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n    this.creditAmount = \"\";\n  }\n\n  get creditAmountNumber(): number {\n    if (this.creditAmount != null && this.creditAmount !== \"\") {\n      try {\n        return parseFloat(this.creditAmount);\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n    return null;\n  }\n}\n\n/**\n * Strongly typed helper to open a AddCreditDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAddCreditDialog(\n  dialogService: DialogService,\n  config: DialogConfig<AddCreditDialogData>,\n) {\n  return dialogService.open<AddCreditDialogResult>(AddCreditDialogComponent, config);\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\" [title]=\"'addCredit' | i18n\">\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">{{ \"creditDelayed\" | i18n }}</p>\n      <div class=\"tw-grid tw-grid-cols-2\">\n        <bit-radio-group formControlName=\"method\">\n          <bit-radio-button id=\"credit-method-paypal\" [value]=\"paymentMethodType.PayPal\">\n            <bit-label> <i class=\"bwi bwi-paypal\"></i>PayPal</bit-label>\n          </bit-radio-button>\n          <bit-radio-button id=\"credit-method-bitcoin\" [value]=\"paymentMethodType.BitPay\">\n            <bit-label> <i class=\"bwi bwi-bitcoin\"></i>Bitcoin</bit-label>\n          </bit-radio-button>\n        </bit-radio-group>\n      </div>\n      <div class=\"tw-grid tw-grid-cols-2\">\n        <bit-form-field>\n          <bit-label>{{ \"amount\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"text\"\n            formControlName=\"creditAmount\"\n            (blur)=\"formatAmount()\"\n            required\n          />\n          <span bitPrefix>$USD</span>\n        </bit-form-field>\n      </div>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"submit\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        [bitDialogClose]=\"DialogResult.Cancelled\"\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n<form #ppButtonForm action=\"{{ ppButtonFormAction }}\" method=\"post\" target=\"_top\">\n  <input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n  <input type=\"hidden\" name=\"business\" value=\"{{ ppButtonBusinessId }}\" />\n  <input type=\"hidden\" name=\"button_subtype\" value=\"services\" />\n  <input type=\"hidden\" name=\"no_note\" value=\"1\" />\n  <input type=\"hidden\" name=\"no_shipping\" value=\"1\" />\n  <input type=\"hidden\" name=\"rm\" value=\"1\" />\n  <input type=\"hidden\" name=\"return\" value=\"{{ returnUrl }}\" />\n  <input type=\"hidden\" name=\"cancel_return\" value=\"{{ returnUrl }}\" />\n  <input type=\"hidden\" name=\"currency_code\" value=\"USD\" />\n  <input type=\"hidden\" name=\"image_url\" value=\"https://bitwarden.com/images/paypal-banner.png\" />\n  <input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF:btn_buynow_LG.gif:NonHosted\" />\n  <input type=\"hidden\" name=\"amount\" value=\"{{ formGroup.get('creditAmount').value }}\" />\n  <input type=\"hidden\" name=\"custom\" value=\"{{ ppButtonCustomField }}\" />\n  <input type=\"hidden\" name=\"item_name\" value=\"Bitwarden Account Credit\" />\n  <input type=\"hidden\" name=\"item_number\" value=\"{{ subject }}\" />\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, forwardRef, Inject, OnInit, ViewChild } from \"@angular/core\";\n\nimport { ManageTaxInformationComponent } from \"@bitwarden/angular/billing/components\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { PaymentMethodType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { UpdatePaymentMethodRequest } from \"@bitwarden/common/billing/models/request/update-payment-method.request\";\nimport { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { PaymentV2Component } from \"../payment/payment-v2.component\";\n\nexport interface AdjustPaymentDialogV2Params {\n  initialPaymentMethod?: PaymentMethodType;\n  organizationId?: string;\n  productTier?: ProductTierType;\n}\n\nexport enum AdjustPaymentDialogV2ResultType {\n  Closed = \"closed\",\n  Submitted = \"submitted\",\n}\n\n@Component({\n  templateUrl: \"./adjust-payment-dialog-v2.component.html\",\n})\nexport class AdjustPaymentDialogV2Component implements OnInit {\n  @ViewChild(PaymentV2Component) paymentComponent: PaymentV2Component;\n  @ViewChild(forwardRef(() => ManageTaxInformationComponent))\n  taxInfoComponent: ManageTaxInformationComponent;\n\n  protected readonly PaymentMethodType = PaymentMethodType;\n  protected readonly ResultType = AdjustPaymentDialogV2ResultType;\n\n  protected dialogHeader: string;\n  protected initialPaymentMethod: PaymentMethodType;\n  protected organizationId?: string;\n  protected productTier?: ProductTierType;\n\n  protected taxInformation: TaxInformation;\n\n  constructor(\n    private apiService: ApiService,\n    private billingApiService: BillingApiServiceAbstraction,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    @Inject(DIALOG_DATA) protected dialogParams: AdjustPaymentDialogV2Params,\n    private dialogRef: DialogRef<AdjustPaymentDialogV2ResultType>,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n  ) {\n    const key = this.dialogParams.initialPaymentMethod ? \"changePaymentMethod\" : \"addPaymentMethod\";\n    this.dialogHeader = this.i18nService.t(key);\n    this.initialPaymentMethod = this.dialogParams.initialPaymentMethod ?? PaymentMethodType.Card;\n    this.organizationId = this.dialogParams.organizationId;\n    this.productTier = this.dialogParams.productTier;\n  }\n\n  ngOnInit(): void {\n    if (this.organizationId) {\n      this.organizationApiService\n        .getTaxInfo(this.organizationId)\n        .then((response: TaxInfoResponse) => {\n          this.taxInformation = TaxInformation.from(response);\n        })\n        .catch(() => {\n          this.taxInformation = new TaxInformation();\n        });\n    } else {\n      this.apiService\n        .getTaxInfo()\n        .then((response: TaxInfoResponse) => {\n          this.taxInformation = TaxInformation.from(response);\n        })\n        .catch(() => {\n          this.taxInformation = new TaxInformation();\n        });\n    }\n  }\n\n  taxInformationChanged(event: TaxInformation) {\n    this.taxInformation = event;\n    if (event.country === \"US\") {\n      this.paymentComponent.showBankAccount = !!this.organizationId;\n    } else {\n      this.paymentComponent.showBankAccount = false;\n      if (this.paymentComponent.selected === PaymentMethodType.BankAccount) {\n        this.paymentComponent.select(PaymentMethodType.Card);\n      }\n    }\n  }\n\n  submit = async (): Promise<void> => {\n    if (!this.taxInfoComponent.validate()) {\n      return;\n    }\n\n    try {\n      if (!this.organizationId) {\n        await this.updatePremiumUserPaymentMethod();\n      } else {\n        await this.updateOrganizationPaymentMethod();\n      }\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"updatedPaymentMethod\"),\n      });\n\n      this.dialogRef.close(AdjustPaymentDialogV2ResultType.Submitted);\n    } catch (error) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(error.message) || error.message,\n      });\n    }\n  };\n\n  private updateOrganizationPaymentMethod = async () => {\n    const paymentSource = await this.paymentComponent.tokenize();\n\n    const request = new UpdatePaymentMethodRequest();\n    request.paymentSource = paymentSource;\n    request.taxInformation = ExpandedTaxInfoUpdateRequest.From(this.taxInformation);\n\n    await this.billingApiService.updateOrganizationPaymentMethod(this.organizationId, request);\n  };\n\n  protected get showTaxIdField(): boolean {\n    if (!this.organizationId) {\n      return false;\n    }\n\n    switch (this.productTier) {\n      case ProductTierType.Free:\n      case ProductTierType.Families:\n        return false;\n      default:\n        return true;\n    }\n  }\n\n  private updatePremiumUserPaymentMethod = async () => {\n    const { type, token } = await this.paymentComponent.tokenize();\n\n    const request = new PaymentRequest();\n    request.paymentMethodType = type;\n    request.paymentToken = token;\n    request.country = this.taxInformation.country;\n    request.postalCode = this.taxInformation.postalCode;\n    request.taxId = this.taxInformation.taxId;\n    request.state = this.taxInformation.state;\n    request.line1 = this.taxInformation.line1;\n    request.line2 = this.taxInformation.line2;\n    request.city = this.taxInformation.city;\n    request.state = this.taxInformation.state;\n    await this.apiService.postAccountPayment(request);\n  };\n\n  static open = (\n    dialogService: DialogService,\n    dialogConfig: DialogConfig<AdjustPaymentDialogV2Params>,\n  ) =>\n    dialogService.open<AdjustPaymentDialogV2ResultType>(\n      AdjustPaymentDialogV2Component,\n      dialogConfig,\n    );\n}\n","<bit-dialog dialogSize=\"large\" [title]=\"dialogHeader\">\n  <ng-container bitDialogContent>\n    <app-payment-v2\n      [showAccountCredit]=\"false\"\n      [showBankAccount]=\"!!organizationId\"\n      [initialPaymentMethod]=\"initialPaymentMethod\"\n    ></app-payment-v2>\n    <app-manage-tax-information\n      *ngIf=\"taxInformation\"\n      [showTaxIdField]=\"showTaxIdField\"\n      [startWith]=\"taxInformation\"\n      (taxInformationChanged)=\"taxInformationChanged($event)\"\n    />\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [bitAction]=\"submit\">\n      {{ \"submit\" | i18n }}\n    </button>\n    <button\n      type=\"button\"\n      bitButton\n      bitFormButton\n      buttonType=\"secondary\"\n      [bitDialogClose]=\"ResultType.Closed\"\n    >\n      {{ \"cancel\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\n\nimport { ManageTaxInformationComponent } from \"@bitwarden/angular/billing/components\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain\";\nimport { PaymentRequest } from \"@bitwarden/common/billing/models/request/payment.request\";\nimport { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { PaymentComponent } from \"../payment/payment.component\";\n\nexport interface AdjustPaymentDialogData {\n  organizationId: string;\n  currentType: PaymentMethodType;\n}\n\nexport enum AdjustPaymentDialogResult {\n  Adjusted = \"adjusted\",\n  Cancelled = \"cancelled\",\n}\n\n@Component({\n  templateUrl: \"adjust-payment-dialog.component.html\",\n})\nexport class AdjustPaymentDialogComponent implements OnInit {\n  @ViewChild(PaymentComponent, { static: true }) paymentComponent: PaymentComponent;\n  @ViewChild(ManageTaxInformationComponent) taxInfoComponent: ManageTaxInformationComponent;\n\n  organizationId: string;\n  currentType: PaymentMethodType;\n  paymentMethodType = PaymentMethodType;\n\n  protected DialogResult = AdjustPaymentDialogResult;\n  protected formGroup = new FormGroup({});\n\n  protected taxInformation: TaxInformation;\n\n  constructor(\n    private dialogRef: DialogRef,\n    @Inject(DIALOG_DATA) protected data: AdjustPaymentDialogData,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private configService: ConfigService,\n    private toastService: ToastService,\n  ) {\n    this.organizationId = data.organizationId;\n    this.currentType = data.currentType;\n  }\n\n  ngOnInit(): void {\n    if (this.organizationId) {\n      this.organizationApiService\n        .getTaxInfo(this.organizationId)\n        .then((response: TaxInfoResponse) => {\n          this.taxInformation = TaxInformation.from(response);\n        })\n        .catch(() => {\n          this.taxInformation = new TaxInformation();\n        });\n    } else {\n      this.apiService\n        .getTaxInfo()\n        .then((response: TaxInfoResponse) => {\n          this.taxInformation = TaxInformation.from(response);\n        })\n        .catch(() => {\n          this.taxInformation = new TaxInformation();\n        });\n    }\n  }\n\n  submit = async () => {\n    if (!this.taxInfoComponent?.validate()) {\n      return;\n    }\n\n    const request = new PaymentRequest();\n    const response = this.paymentComponent.createPaymentToken().then((result) => {\n      request.paymentToken = result[0];\n      request.paymentMethodType = result[1];\n      request.postalCode = this.taxInformation?.postalCode;\n      request.country = this.taxInformation?.country;\n      request.taxId = this.taxInformation?.taxId;\n      if (this.organizationId == null) {\n        return this.apiService.postAccountPayment(request);\n      } else {\n        request.taxId = this.taxInformation?.taxId;\n        request.state = this.taxInformation?.state;\n        request.line1 = this.taxInformation?.line1;\n        request.line2 = this.taxInformation?.line2;\n        request.city = this.taxInformation?.city;\n        request.state = this.taxInformation?.state;\n        return this.organizationApiService.updatePayment(this.organizationId, request);\n      }\n    });\n    await response;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"updatedPaymentMethod\"),\n    });\n    this.dialogRef.close(AdjustPaymentDialogResult.Adjusted);\n  };\n\n  taxInformationChanged(event: TaxInformation) {\n    this.taxInformation = event;\n    if (event.country === \"US\") {\n      this.paymentComponent.hideBank = !this.organizationId;\n    } else {\n      this.paymentComponent.hideBank = true;\n      if (this.paymentComponent.method === PaymentMethodType.BankAccount) {\n        this.paymentComponent.method = PaymentMethodType.Card;\n        this.paymentComponent.changeMethod();\n      }\n    }\n  }\n\n  protected get showTaxIdField(): boolean {\n    return !!this.organizationId;\n  }\n}\n\n/**\n * Strongly typed helper to open a AdjustPaymentDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAdjustPaymentDialog(\n  dialogService: DialogService,\n  config: DialogConfig<AdjustPaymentDialogData>,\n) {\n  return dialogService.open<AdjustPaymentDialogResult>(AdjustPaymentDialogComponent, config);\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog\n    dialogSize=\"large\"\n    [title]=\"(currentType != null ? 'changePaymentMethod' : 'addPaymentMethod') | i18n\"\n  >\n    <ng-container bitDialogContent>\n      <app-payment [hideBank]=\"!organizationId\" [hideCredit]=\"true\"></app-payment>\n      <app-manage-tax-information\n        *ngIf=\"taxInformation\"\n        [showTaxIdField]=\"showTaxIdField\"\n        [startWith]=\"taxInformation\"\n        (taxInformationChanged)=\"taxInformationChanged($event)\"\n      />\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"submit\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        [bitDialogClose]=\"DialogResult.Cancelled\"\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PaymentResponse } from \"@bitwarden/common/billing/models/response/payment.response\";\nimport { StorageRequest } from \"@bitwarden/common/models/request/storage.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { PaymentComponent } from \"../payment/payment.component\";\n\nexport interface AdjustStorageDialogData {\n  storageGbPrice: number;\n  add: boolean;\n  organizationId?: string;\n  interval?: string;\n}\n\nexport enum AdjustStorageDialogResult {\n  Adjusted = \"adjusted\",\n  Cancelled = \"cancelled\",\n}\n\n@Component({\n  templateUrl: \"adjust-storage-dialog.component.html\",\n})\nexport class AdjustStorageDialogComponent {\n  storageGbPrice: number;\n  add: boolean;\n  organizationId: string;\n  interval: string;\n\n  @ViewChild(PaymentComponent, { static: true }) paymentComponent: PaymentComponent;\n\n  protected DialogResult = AdjustStorageDialogResult;\n  protected formGroup = new FormGroup({\n    storageAdjustment: new FormControl(0, [\n      Validators.required,\n      Validators.min(0),\n      Validators.max(99),\n    ]),\n  });\n\n  constructor(\n    private dialogRef: DialogRef,\n    @Inject(DIALOG_DATA) protected data: AdjustStorageDialogData,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private router: Router,\n    private activatedRoute: ActivatedRoute,\n    private logService: LogService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private toastService: ToastService,\n  ) {\n    this.storageGbPrice = data.storageGbPrice;\n    this.add = data.add;\n    this.organizationId = data.organizationId;\n    this.interval = data.interval || \"year\";\n  }\n\n  submit = async () => {\n    const request = new StorageRequest();\n    request.storageGbAdjustment = this.formGroup.value.storageAdjustment;\n    if (!this.add) {\n      request.storageGbAdjustment *= -1;\n    }\n\n    let paymentFailed = false;\n    const action = async () => {\n      let response: Promise<PaymentResponse>;\n      if (this.organizationId == null) {\n        response = this.apiService.postAccountStorage(request);\n      } else {\n        response = this.organizationApiService.updateStorage(this.organizationId, request);\n      }\n      const result = await response;\n      if (result != null && result.paymentIntentClientSecret != null) {\n        try {\n          await this.paymentComponent.handleStripeCardPayment(\n            result.paymentIntentClientSecret,\n            null,\n          );\n        } catch {\n          paymentFailed = true;\n        }\n      }\n    };\n    await action();\n    this.dialogRef.close(AdjustStorageDialogResult.Adjusted);\n    if (paymentFailed) {\n      this.toastService.showToast({\n        variant: \"warning\",\n        title: null,\n        message: this.i18nService.t(\"couldNotChargeCardPayInvoice\"),\n        timeout: 10000,\n      });\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"../billing\"], { relativeTo: this.activatedRoute });\n    } else {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"adjustedStorage\", request.storageGbAdjustment.toString()),\n      });\n    }\n  };\n\n  get adjustedStorageTotal(): number {\n    return this.storageGbPrice * this.formGroup.value.storageAdjustment;\n  }\n}\n\n/**\n * Strongly typed helper to open an AdjustStorageDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openAdjustStorageDialog(\n  dialogService: DialogService,\n  config: DialogConfig<AdjustStorageDialogData>,\n) {\n  return dialogService.open<AdjustStorageDialogResult>(AdjustStorageDialogComponent, config);\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\" [title]=\"(add ? 'addStorage' : 'removeStorage') | i18n\">\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">{{ (add ? \"storageAddNote\" : \"storageRemoveNote\") | i18n }}</p>\n      <div class=\"tw-grid tw-grid-cols-12\">\n        <bit-form-field class=\"tw-col-span-7\">\n          <bit-label>{{ (add ? \"gbStorageAdd\" : \"gbStorageRemove\") | i18n }}</bit-label>\n          <input bitInput type=\"number\" formControlName=\"storageAdjustment\" />\n          <bit-hint *ngIf=\"add\">\n            <strong>{{ \"total\" | i18n }}:</strong>\n            {{ formGroup.get(\"storageAdjustment\").value || 0 }} GB &times;\n            {{ storageGbPrice | currency: \"$\" }} = {{ adjustedStorageTotal | currency: \"$\" }} /{{\n              interval | i18n\n            }}\n          </bit-hint>\n        </bit-form-field>\n      </div>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"submit\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        [bitDialogClose]=\"DialogResult.Cancelled\"\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n<app-payment [showMethods]=\"false\"></app-payment>\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerModule } from \"@bitwarden/components\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { AddCreditDialogComponent } from \"./add-credit-dialog.component\";\nimport { AdjustPaymentDialogV2Component } from \"./adjust-payment-dialog/adjust-payment-dialog-v2.component\";\nimport { AdjustPaymentDialogComponent } from \"./adjust-payment-dialog/adjust-payment-dialog.component\";\nimport { AdjustStorageDialogV2Component } from \"./adjust-storage-dialog/adjust-storage-dialog-v2.component\";\nimport { AdjustStorageDialogComponent } from \"./adjust-storage-dialog/adjust-storage-dialog.component\";\nimport { BillingHistoryComponent } from \"./billing-history.component\";\nimport { OffboardingSurveyComponent } from \"./offboarding-survey.component\";\nimport { PaymentV2Component } from \"./payment/payment-v2.component\";\nimport { PaymentComponent } from \"./payment/payment.component\";\nimport { PaymentMethodComponent } from \"./payment-method.component\";\nimport { IndividualSelfHostingLicenseUploaderComponent } from \"./self-hosting-license-uploader/individual-self-hosting-license-uploader.component\";\nimport { OrganizationSelfHostingLicenseUploaderComponent } from \"./self-hosting-license-uploader/organization-self-hosting-license-uploader.component\";\nimport { SecretsManagerSubscribeComponent } from \"./sm-subscribe.component\";\nimport { TaxInfoComponent } from \"./tax-info.component\";\nimport { UpdateLicenseDialogComponent } from \"./update-license-dialog.component\";\nimport { UpdateLicenseComponent } from \"./update-license.component\";\nimport { VerifyBankAccountComponent } from \"./verify-bank-account/verify-bank-account.component\";\n\n@NgModule({\n  imports: [\n    SharedModule,\n    PaymentComponent,\n    TaxInfoComponent,\n    HeaderModule,\n    BannerModule,\n    PaymentV2Component,\n    VerifyBankAccountComponent,\n  ],\n  declarations: [\n    AddCreditDialogComponent,\n    AdjustPaymentDialogComponent,\n    AdjustStorageDialogComponent,\n    BillingHistoryComponent,\n    PaymentMethodComponent,\n    SecretsManagerSubscribeComponent,\n    UpdateLicenseComponent,\n    UpdateLicenseDialogComponent,\n    OffboardingSurveyComponent,\n    AdjustPaymentDialogV2Component,\n    AdjustStorageDialogV2Component,\n    IndividualSelfHostingLicenseUploaderComponent,\n    OrganizationSelfHostingLicenseUploaderComponent,\n  ],\n  exports: [\n    SharedModule,\n    PaymentComponent,\n    TaxInfoComponent,\n    AdjustStorageDialogComponent,\n    BillingHistoryComponent,\n    SecretsManagerSubscribeComponent,\n    UpdateLicenseComponent,\n    UpdateLicenseDialogComponent,\n    OffboardingSurveyComponent,\n    VerifyBankAccountComponent,\n    PaymentV2Component,\n    IndividualSelfHostingLicenseUploaderComponent,\n    OrganizationSelfHostingLicenseUploaderComponent,\n  ],\n})\nexport class BillingSharedModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class VerifyBankRequest {\n  amount1: number;\n  amount2: number;\n}\n","<bit-banner\n  id=\"free-trial-banner\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  bannerType=\"premium\"\n  icon=\"bwi-billing\"\n  [showClose]=\"false\"\n  *ngIf=\"freeTrialData?.shownBanner\"\n>\n  {{ freeTrialData?.message }}\n  <a\n    bitLink\n    linkType=\"secondary\"\n    (click)=\"changePayment()\"\n    class=\"tw-cursor-pointer\"\n    rel=\"noreferrer noopener\"\n  >\n    {{ \"clickHereToAddPaymentMethod\" | i18n }}\n  </a>\n</bit-banner>\n\n<app-header *ngIf=\"organizationId\">\n  <button\n    type=\"button\"\n    bitButton\n    buttonType=\"secondary\"\n    [bitAction]=\"load\"\n    class=\"tw-ml-auto\"\n    *ngIf=\"firstLoaded\"\n    [disabled]=\"loading\"\n  >\n    <i class=\"bwi bwi-refresh bwi-fw\" [ngClass]=\"{ 'bwi-spin': loading }\" aria-hidden=\"true\"></i>\n    {{ \"refresh\" | i18n }}\n  </button>\n</app-header>\n\n<bit-container>\n  <!-- TODO: Organization and individual should use different \"page\" components -->\n  <h2 bitTypography=\"h1\" *ngIf=\"!organizationId\">{{ \"paymentMethod\" | i18n }}</h2>\n\n  <ng-container *ngIf=\"!firstLoaded && loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </ng-container>\n  <ng-container *ngIf=\"billing\">\n    <bit-section>\n      <h2 bitTypography=\"h2\">\n        {{ (isCreditBalance ? \"accountCredit\" : \"accountBalance\") | i18n }}\n      </h2>\n      <p class=\"tw-text-lg tw-font-bold\">{{ creditOrBalance | currency: \"$\" }}</p>\n      <p bitTypography=\"body1\">{{ \"creditAppliedDesc\" | i18n }}</p>\n      <button type=\"button\" bitButton buttonType=\"secondary\" [bitAction]=\"addCredit\">\n        {{ \"addCredit\" | i18n }}\n      </button>\n    </bit-section>\n    <bit-section>\n      <h2 bitTypography=\"h2\">{{ \"paymentMethod\" | i18n }}</h2>\n      <p *ngIf=\"!paymentSource\" bitTypography=\"body1\">{{ \"noPaymentMethod\" | i18n }}</p>\n      <ng-container *ngIf=\"paymentSource\">\n        <bit-callout\n          type=\"warning\"\n          title=\"{{ 'verifyBankAccount' | i18n }}\"\n          *ngIf=\"\n            forOrganization &&\n            paymentSource.type === paymentMethodType.BankAccount &&\n            paymentSource.needsVerification\n          \"\n        >\n          <p bitTypography=\"body1\">\n            {{ \"verifyBankAccountDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}\n          </p>\n          <form\n            [formGroup]=\"verifyBankForm\"\n            [bitSubmit]=\"verifyBank\"\n            class=\"tw-flex tw-flex-wrap tw-items-center tw-space-x-2\"\n          >\n            <bit-form-field class=\"tw-w-40\">\n              <bit-label>{{ \"amountX\" | i18n: \"1\" }}</bit-label>\n              <input bitInput type=\"number\" step=\"1\" placeholder=\"xx\" formControlName=\"amount1\" />\n              <span bitPrefix>$0.</span>\n            </bit-form-field>\n            <bit-form-field class=\"tw-w-40\">\n              <bit-label>{{ \"amountX\" | i18n: \"2\" }}</bit-label>\n              <input bitInput type=\"number\" step=\"1\" placeholder=\"xx\" formControlName=\"amount2\" />\n              <span bitPrefix>$0.</span>\n            </bit-form-field>\n            <button bitButton bitFormButton buttonType=\"primary\" type=\"submit\">\n              {{ \"verifyBankAccount\" | i18n }}\n            </button>\n          </form>\n        </bit-callout>\n        <p>\n          <i class=\"bwi bwi-fw\" [ngClass]=\"paymentSourceClasses\"></i>\n          {{ paymentSource.description }}\n        </p>\n      </ng-container>\n      <button\n        type=\"button\"\n        bitButton\n        buttonType=\"secondary\"\n        class=\"payment_trigger_button\"\n        [bitAction]=\"changePayment\"\n      >\n        {{ (paymentSource ? \"changePaymentMethod\" : \"addPaymentMethod\") | i18n }}\n      </button>\n      <p *ngIf=\"isUnpaid\" bitTypography=\"body1\">\n        {{ \"paymentChargedWithUnpaidSubscription\" | i18n }}\n      </p>\n    </bit-section>\n  </ng-container>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Location } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BillingPaymentResponse } from \"@bitwarden/common/billing/models/response/billing-payment.response\";\nimport { OrganizationSubscriptionResponse } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { SubscriptionResponse } from \"@bitwarden/common/billing/models/response/subscription.response\";\nimport { VerifyBankRequest } from \"@bitwarden/common/models/request/verify-bank.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { FreeTrial } from \"../../core/types/free-trial\";\nimport { TrialFlowService } from \"../services/trial-flow.service\";\n\nimport { AddCreditDialogResult, openAddCreditDialog } from \"./add-credit-dialog.component\";\nimport {\n  AdjustPaymentDialogResult,\n  openAdjustPaymentDialog,\n} from \"./adjust-payment-dialog/adjust-payment-dialog.component\";\n\n@Component({\n  templateUrl: \"payment-method.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class PaymentMethodComponent implements OnInit, OnDestroy {\n  loading = false;\n  firstLoaded = false;\n  billing: BillingPaymentResponse;\n  org: OrganizationSubscriptionResponse;\n  sub: SubscriptionResponse;\n  paymentMethodType = PaymentMethodType;\n  organizationId: string;\n  isUnpaid = false;\n  organization: Organization;\n\n  verifyBankForm = this.formBuilder.group({\n    amount1: new FormControl<number>(null, [\n      Validators.required,\n      Validators.max(99),\n      Validators.min(0),\n    ]),\n    amount2: new FormControl<number>(null, [\n      Validators.required,\n      Validators.max(99),\n      Validators.min(0),\n    ]),\n  });\n\n  launchPaymentModalAutomatically = false;\n  protected freeTrialData: FreeTrial;\n\n  constructor(\n    protected apiService: ApiService,\n    protected organizationApiService: OrganizationApiServiceAbstraction,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    private router: Router,\n    private location: Location,\n    private route: ActivatedRoute,\n    private formBuilder: FormBuilder,\n    private dialogService: DialogService,\n    private toastService: ToastService,\n    private trialFlowService: TrialFlowService,\n    private organizationService: OrganizationService,\n    protected syncService: SyncService,\n  ) {\n    const state = this.router.getCurrentNavigation()?.extras?.state;\n    // incase the above state is undefined or null we use redundantState\n    const redundantState: any = location.getState();\n    if (state && Object.prototype.hasOwnProperty.call(state, \"launchPaymentModalAutomatically\")) {\n      this.launchPaymentModalAutomatically = state.launchPaymentModalAutomatically;\n    } else if (\n      redundantState &&\n      Object.prototype.hasOwnProperty.call(redundantState, \"launchPaymentModalAutomatically\")\n    ) {\n      this.launchPaymentModalAutomatically = redundantState.launchPaymentModalAutomatically;\n    } else {\n      this.launchPaymentModalAutomatically = false;\n    }\n  }\n\n  async ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.params.subscribe(async (params) => {\n      if (params.organizationId) {\n        this.organizationId = params.organizationId;\n      } else if (this.platformUtilsService.isSelfHost()) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/settings/subscription\"]);\n        return;\n      }\n\n      await this.load();\n      this.firstLoaded = true;\n    });\n  }\n\n  load = async () => {\n    if (this.loading) {\n      return;\n    }\n    this.loading = true;\n    if (this.forOrganization) {\n      const billingPromise = this.organizationApiService.getBilling(this.organizationId);\n      const organizationSubscriptionPromise = this.organizationApiService.getSubscription(\n        this.organizationId,\n      );\n      const organizationPromise = this.organizationService.get(this.organizationId);\n\n      [this.billing, this.org, this.organization] = await Promise.all([\n        billingPromise,\n        organizationSubscriptionPromise,\n        organizationPromise,\n      ]);\n      this.determineOrgsWithUpcomingPaymentIssues();\n    } else {\n      const billingPromise = this.apiService.getUserBillingPayment();\n      const subPromise = this.apiService.getUserSubscription();\n\n      [this.billing, this.sub] = await Promise.all([billingPromise, subPromise]);\n    }\n    this.isUnpaid = this.subscription?.status === \"unpaid\" ?? false;\n    this.loading = false;\n    // If the flag `launchPaymentModalAutomatically` is set to true,\n    // we schedule a timeout (delay of 800ms) to automatically launch the payment modal.\n    // This delay ensures that any prior UI/rendering operations complete before triggering the modal.\n    if (this.launchPaymentModalAutomatically) {\n      window.setTimeout(async () => {\n        await this.changePayment();\n        this.launchPaymentModalAutomatically = false;\n        this.location.replaceState(this.location.path(), \"\", {});\n      }, 800);\n    }\n  };\n\n  addCredit = async () => {\n    const dialogRef = openAddCreditDialog(this.dialogService, {\n      data: {\n        organizationId: this.organizationId,\n      },\n    });\n    const result = await lastValueFrom(dialogRef.closed);\n    if (result === AddCreditDialogResult.Added) {\n      await this.load();\n    }\n  };\n\n  changePayment = async () => {\n    const dialogRef = openAdjustPaymentDialog(this.dialogService, {\n      data: {\n        organizationId: this.organizationId,\n        currentType: this.paymentSource !== null ? this.paymentSource.type : null,\n      },\n    });\n    const result = await lastValueFrom(dialogRef.closed);\n    if (result === AdjustPaymentDialogResult.Adjusted) {\n      this.location.replaceState(this.location.path(), \"\", {});\n      if (this.launchPaymentModalAutomatically && !this.organization.enabled) {\n        await this.syncService.fullSync(true);\n      }\n      this.launchPaymentModalAutomatically = false;\n      await this.load();\n    }\n  };\n\n  verifyBank = async () => {\n    if (this.loading || !this.forOrganization) {\n      return;\n    }\n\n    const request = new VerifyBankRequest();\n    request.amount1 = this.verifyBankForm.value.amount1;\n    request.amount2 = this.verifyBankForm.value.amount2;\n    await this.organizationApiService.verifyBank(this.organizationId, request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"verifiedBankAccount\"),\n    });\n    await this.load();\n  };\n\n  determineOrgsWithUpcomingPaymentIssues() {\n    this.freeTrialData = this.trialFlowService.checkForOrgsWithUpcomingPaymentIssues(\n      this.organization,\n      this.org,\n      this.billing?.paymentSource,\n    );\n  }\n\n  get isCreditBalance() {\n    return this.billing == null || this.billing.balance <= 0;\n  }\n\n  get creditOrBalance() {\n    return Math.abs(this.billing != null ? this.billing.balance : 0);\n  }\n\n  get paymentSource() {\n    return this.billing != null ? this.billing.paymentSource : null;\n  }\n\n  get forOrganization() {\n    return this.organizationId != null;\n  }\n\n  get paymentSourceClasses() {\n    if (this.paymentSource == null) {\n      return [];\n    }\n    switch (this.paymentSource.type) {\n      case PaymentMethodType.Card:\n        return [\"bwi-credit-card\"];\n      case PaymentMethodType.BankAccount:\n        return [\"bwi-bank\"];\n      case PaymentMethodType.Check:\n        return [\"bwi-money\"];\n      case PaymentMethodType.PayPal:\n        return [\"bwi-paypal text-primary\"];\n      default:\n        return [];\n    }\n  }\n\n  get subscription() {\n    return this.sub?.subscription ?? this.org?.subscription ?? null;\n  }\n\n  ngOnDestroy(): void {\n    this.launchPaymentModalAutomatically = false;\n  }\n}\n","<ng-template #defaultContent>\n  <ng-content></ng-content>\n</ng-template>\n\n<ng-container *ngIf=\"extensionRefreshFlag; else defaultLabel\">\n  <div class=\"tw-relative tw-mt-2\">\n    <bit-label\n      [attr.for]=\"for\"\n      class=\"tw-absolute tw-bg-background tw-px-1 tw-text-sm tw-text-muted -tw-top-2.5 tw-left-3 tw-mb-0 tw-max-w-full tw-pointer-events-auto\"\n    >\n      <ng-container *ngTemplateOutlet=\"defaultContent\"></ng-container>\n      <span class=\"tw-text-xs tw-font-normal\">({{ \"required\" | i18n }})</span>\n    </bit-label>\n  </div>\n</ng-container>\n\n<ng-template #defaultLabel>\n  <label [attr.for]=\"for\">\n    <ng-container *ngTemplateOutlet=\"defaultContent\"></ng-container>\n    <span class=\"tw-text-xs tw-font-normal\">({{ \"required\" | i18n }})</span>\n  </label>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { booleanAttribute, Component, Input, OnInit } from \"@angular/core\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { FormFieldModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared\";\n\n/**\n * Label that should be used for elements loaded via Stripe API.\n *\n * Applies the same label styles from CL form-field component when\n * the `ExtensionRefresh` flag is set.\n */\n@Component({\n  selector: \"app-payment-label-v2\",\n  templateUrl: \"./payment-label-v2.component.html\",\n  standalone: true,\n  imports: [FormFieldModule, SharedModule],\n})\nexport class PaymentLabelV2 implements OnInit {\n  /** `id` of the associated input */\n  @Input({ required: true }) for: string;\n  /** Displays required text on the label */\n  @Input({ transform: booleanAttribute }) required = false;\n\n  protected extensionRefreshFlag = false;\n\n  constructor(private configService: ConfigService) {}\n\n  async ngOnInit(): Promise<void> {\n    this.extensionRefreshFlag = await this.configService.getFeatureFlag(\n      FeatureFlag.ExtensionRefresh,\n    );\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\n@NgModule({})\nexport class BillingServicesModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { BillingServicesModule } from \"./billing-services.module\";\n\n@Injectable({ providedIn: BillingServicesModule })\nexport class BraintreeService {\n  private braintree: any;\n  private containerId: string;\n\n  constructor(private logService: LogService) {}\n\n  /**\n   * Utilizes the Braintree SDK to create a [Braintree drop-in]{@link https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html} instance attached to the container ID specified as part of the {@link loadBraintree} method.\n   */\n  createDropin() {\n    window.setTimeout(() => {\n      const window$ = window as any;\n      window$.braintree.dropin.create(\n        {\n          authorization: process.env.BRAINTREE_KEY,\n          container: this.containerId,\n          paymentOptionPriority: [\"paypal\"],\n          paypal: {\n            flow: \"vault\",\n            buttonStyle: {\n              label: \"pay\",\n              size: \"medium\",\n              shape: \"pill\",\n              color: \"blue\",\n              tagline: \"false\",\n            },\n          },\n        },\n        (error: any, instance: any) => {\n          if (error != null) {\n            this.logService.error(error);\n            return;\n          }\n          this.braintree = instance;\n        },\n      );\n    }, 250);\n  }\n\n  /**\n   * Loads the Bitwarden dropin.js script in the <head> element of the current page.\n   * This script attaches the Braintree SDK to the window.\n   * @param containerId - The ID of the HTML element where the Braintree drop-in will be loaded at.\n   * @param autoCreateDropin - Specifies whether the Braintree drop-in should be created when dropin.js loads.\n   */\n  loadBraintree(containerId: string, autoCreateDropin: boolean) {\n    const script = window.document.createElement(\"script\");\n    script.id = \"dropin-script\";\n    script.src = `scripts/dropin.js?cache=${process.env.CACHE_TAG}`;\n    script.async = true;\n    if (autoCreateDropin) {\n      script.onload = () => this.createDropin();\n    }\n    this.containerId = containerId;\n    window.document.head.appendChild(script);\n  }\n\n  /**\n   * Invokes the Braintree [requestPaymentMethod]{@link https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#requestPaymentMethod} method\n   * in order to generate a payment method token using the active Braintree drop-in.\n   */\n  requestPaymentMethod(): Promise<string> {\n    return new Promise((resolve, reject) => {\n      this.braintree.requestPaymentMethod((error: any, payload: any) => {\n        if (error) {\n          this.logService.error(error);\n          reject(error.message);\n        } else {\n          resolve(payload.nonce as string);\n        }\n      });\n    });\n  }\n\n  /**\n   * Removes the following elements from the <head> of the current page:\n   * - The Bitwarden dropin.js script\n   * - Any <script> elements that contain the word \"paypal\"\n   * - The Braintree drop-in stylesheet\n   */\n  unloadBraintree() {\n    const script = window.document.getElementById(\"dropin-script\");\n    window.document.head.removeChild(script);\n    window.setTimeout(() => {\n      const scripts = Array.from(window.document.head.querySelectorAll(\"script\")).filter(\n        (script) => script.src != null && script.src.indexOf(\"paypal\") > -1,\n      );\n      scripts.forEach((script) => {\n        try {\n          window.document.head.removeChild(script);\n        } catch (error) {\n          this.logService.error(error);\n        }\n      });\n      const stylesheet = window.document.head.querySelector(\"#braintree-dropin-stylesheet\");\n      if (stylesheet != null) {\n        try {\n          window.document.head.removeChild(stylesheet);\n        } catch (error) {\n          this.logService.error(error);\n        }\n      }\n    }, 500);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport { BankAccount } from \"@bitwarden/common/billing/models/domain\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { BillingServicesModule } from \"./billing-services.module\";\n\n@Injectable({ providedIn: BillingServicesModule })\nexport class StripeService {\n  private stripe: any;\n  private elements: any;\n  private elementIds: {\n    cardNumber: string;\n    cardExpiry: string;\n    cardCvc: string;\n  };\n\n  constructor(\n    private logService: LogService,\n    private configService: ConfigService,\n  ) {}\n\n  /**\n   * Loads [Stripe JS]{@link https://docs.stripe.com/js} in the <head> element of the current page and mounts\n   * Stripe credit card [elements]{@link https://docs.stripe.com/js/elements_object/create} into the HTML elements with the provided element IDS.\n   * We do this to avoid having to load the Stripe JS SDK on every page of the Web Vault given many pages contain sensitive information.\n   * @param elementIds - The ID attributes of the HTML elements used to load the Stripe JS credit card elements.\n   * @param autoMount - A flag indicating whether you want to immediately mount the Stripe credit card elements.\n   */\n  loadStripe(\n    elementIds: { cardNumber: string; cardExpiry: string; cardCvc: string },\n    autoMount: boolean,\n  ) {\n    this.elementIds = elementIds;\n    const script = window.document.createElement(\"script\");\n    script.id = \"stripe-script\";\n    script.src = \"https://js.stripe.com/v3?advancedFraudSignals=false\";\n    script.onload = async () => {\n      const window$ = window as any;\n      this.stripe = window$.Stripe(process.env.STRIPE_KEY);\n      this.elements = this.stripe.elements();\n      const isExtensionRefresh = await this.configService.getFeatureFlag(\n        FeatureFlag.ExtensionRefresh,\n      );\n      setTimeout(() => {\n        this.elements.create(\n          \"cardNumber\",\n          this.getElementOptions(\"cardNumber\", isExtensionRefresh),\n        );\n        this.elements.create(\n          \"cardExpiry\",\n          this.getElementOptions(\"cardExpiry\", isExtensionRefresh),\n        );\n        this.elements.create(\"cardCvc\", this.getElementOptions(\"cardCvc\", isExtensionRefresh));\n        if (autoMount) {\n          this.mountElements();\n        }\n      }, 50);\n    };\n\n    window.document.head.appendChild(script);\n  }\n\n  /**\n   * Re-mounts previously created Stripe credit card [elements]{@link https://docs.stripe.com/js/elements_object/create} into the HTML elements\n   * specified during the {@link loadStripe} call. This is useful for when those HTML elements are removed from the DOM by Angular.\n   */\n  mountElements() {\n    setTimeout(() => {\n      const cardNumber = this.elements.getElement(\"cardNumber\");\n      const cardExpiry = this.elements.getElement(\"cardExpiry\");\n      const cardCvc = this.elements.getElement(\"cardCvc\");\n      cardNumber.mount(this.elementIds.cardNumber);\n      cardExpiry.mount(this.elementIds.cardExpiry);\n      cardCvc.mount(this.elementIds.cardCvc);\n    });\n  }\n\n  /**\n   * Creates a Stripe [SetupIntent]{@link https://docs.stripe.com/api/setup_intents} and uses the resulting client secret\n   * to invoke the Stripe JS [confirmUsBankAccountSetup]{@link https://docs.stripe.com/js/setup_intents/confirm_us_bank_account_setup} method,\n   * thereby creating and storing a Stripe [PaymentMethod]{@link https://docs.stripe.com/api/payment_methods}.\n   * @returns The ID of the newly created PaymentMethod.\n   */\n  async setupBankAccountPaymentMethod(\n    clientSecret: string,\n    { accountHolderName, routingNumber, accountNumber, accountHolderType }: BankAccount,\n  ): Promise<string> {\n    const result = await this.stripe.confirmUsBankAccountSetup(clientSecret, {\n      payment_method: {\n        us_bank_account: {\n          routing_number: routingNumber,\n          account_number: accountNumber,\n          account_holder_type: accountHolderType,\n        },\n        billing_details: {\n          name: accountHolderName,\n        },\n      },\n    });\n    if (result.error || (result.setupIntent && result.setupIntent.status !== \"requires_action\")) {\n      this.logService.error(result.error);\n      throw result.error;\n    }\n    return result.setupIntent.payment_method as string;\n  }\n\n  /**\n   * Creates a Stripe [SetupIntent]{@link https://docs.stripe.com/api/setup_intents} and uses the resulting client secret\n   * to invoke the Stripe JS [confirmCardSetup]{@link https://docs.stripe.com/js/setup_intents/confirm_card_setup} method,\n   * thereby creating and storing a Stripe [PaymentMethod]{@link https://docs.stripe.com/api/payment_methods}.\n   * @returns The ID of the newly created PaymentMethod.\n   */\n  async setupCardPaymentMethod(clientSecret: string): Promise<string> {\n    const cardNumber = this.elements.getElement(\"cardNumber\");\n    const result = await this.stripe.confirmCardSetup(clientSecret, {\n      payment_method: {\n        card: cardNumber,\n      },\n    });\n    if (result.error || (result.setupIntent && result.setupIntent.status !== \"succeeded\")) {\n      this.logService.error(result.error);\n      throw result.error;\n    }\n    return result.setupIntent.payment_method as string;\n  }\n\n  /**\n   * Removes {@link https://docs.stripe.com/js} from the <head> element of the current page as well as all\n   * Stripe-managed <iframe> elements.\n   */\n  unloadStripe() {\n    const script = window.document.getElementById(\"stripe-script\");\n    window.document.head.removeChild(script);\n    window.setTimeout(() => {\n      const iFrames = Array.from(window.document.querySelectorAll(\"iframe\")).filter(\n        (element) => element.src != null && element.src.indexOf(\"stripe\") > -1,\n      );\n      iFrames.forEach((iFrame) => {\n        try {\n          window.document.body.removeChild(iFrame);\n        } catch (error) {\n          this.logService.error(error);\n        }\n      });\n    }, 500);\n  }\n\n  private getElementOptions(\n    element: \"cardNumber\" | \"cardExpiry\" | \"cardCvc\",\n    isExtensionRefresh: boolean,\n  ): any {\n    const options: any = {\n      style: {\n        base: {\n          color: null,\n          fontFamily:\n            '\"DM Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif, ' +\n            '\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"',\n          fontSize: \"16px\",\n          fontSmoothing: \"antialiased\",\n          \"::placeholder\": {\n            color: null,\n          },\n        },\n        invalid: {\n          color: null,\n        },\n      },\n      classes: {\n        focus: \"is-focused\",\n        empty: \"is-empty\",\n        invalid: \"is-invalid\",\n      },\n    };\n\n    // Unique settings that should only be applied when the extension refresh flag is active\n    if (isExtensionRefresh) {\n      options.style.base.fontWeight = \"500\";\n      options.classes.base = \"v2\";\n\n      // Remove the placeholder for number and CVC fields\n      if ([\"cardNumber\", \"cardCvc\"].includes(element)) {\n        options.placeholder = \"\";\n      }\n    }\n\n    const style = getComputedStyle(document.documentElement);\n    options.style.base.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n    options.style.base[\"::placeholder\"].color = `rgb(${style.getPropertyValue(\n      \"--color-text-muted\",\n    )})`;\n    options.style.invalid.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n    options.style.invalid.borderColor = `rgb(${style.getPropertyValue(\"--color-danger-600\")})`;\n\n    return options;\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <div class=\"tw-mb-4 tw-text-lg\">\n    <bit-radio-group formControlName=\"paymentMethod\">\n      <bit-radio-button id=\"card-payment-method\" [value]=\"PaymentMethodType.Card\">\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-credit-card\" aria-hidden=\"true\"></i>\n          {{ \"creditCard\" | i18n }}\n        </bit-label>\n      </bit-radio-button>\n      <bit-radio-button\n        id=\"bank-payment-method\"\n        [value]=\"PaymentMethodType.BankAccount\"\n        *ngIf=\"showBankAccount\"\n      >\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-bank\" aria-hidden=\"true\"></i>\n          {{ \"bankAccount\" | i18n }}\n        </bit-label>\n      </bit-radio-button>\n      <bit-radio-button\n        id=\"paypal-payment-method\"\n        [value]=\"PaymentMethodType.PayPal\"\n        *ngIf=\"showPayPal\"\n      >\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-paypal\" aria-hidden=\"true\"></i>\n          {{ \"payPal\" | i18n }}\n        </bit-label>\n      </bit-radio-button>\n      <bit-radio-button\n        id=\"credit-payment-method\"\n        [value]=\"PaymentMethodType.Credit\"\n        *ngIf=\"showAccountCredit\"\n      >\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-dollar\" aria-hidden=\"true\"></i>\n          {{ \"accountCredit\" | i18n }}\n        </bit-label>\n      </bit-radio-button>\n    </bit-radio-group>\n  </div>\n  <!-- Card -->\n  <ng-container *ngIf=\"usingCard\">\n    <div class=\"tw-grid tw-grid-cols-2 tw-gap-4 tw-mb-4\">\n      <div class=\"tw-col-span-1\">\n        <app-payment-label-v2 for=\"stripe-card-number\" required>\n          {{ \"number\" | i18n }}\n        </app-payment-label-v2>\n        <div id=\"stripe-card-number\" class=\"form-control stripe-form-control\"></div>\n      </div>\n      <div class=\"tw-col-span-1 tw-flex tw-items-end\">\n        <img\n          src=\"../../../images/cards.png\"\n          alt=\"Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay\"\n          class=\"tw-max-w-full\"\n        />\n      </div>\n      <div class=\"tw-col-span-1\">\n        <app-payment-label-v2 for=\"stripe-card-expiry\" required>\n          {{ \"expiration\" | i18n }}\n        </app-payment-label-v2>\n        <div id=\"stripe-card-expiry\" class=\"form-control stripe-form-control\"></div>\n      </div>\n      <div class=\"tw-col-span-1\">\n        <app-payment-label-v2 for=\"stripe-card-cvc\" required>\n          {{ \"securityCodeSlashCVV\" | i18n }}\n          <a\n            href=\"https://www.cvvnumber.com/cvv.html\"\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            appA11yTitle=\"{{ 'learnMore' | i18n }}\"\n            class=\"hover:tw-no-underline\"\n          >\n            <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n          </a>\n        </app-payment-label-v2>\n        <div id=\"stripe-card-cvc\" class=\"form-control stripe-form-control\"></div>\n      </div>\n    </div>\n  </ng-container>\n  <!-- Bank Account -->\n  <ng-container *ngIf=\"showBankAccount && usingBankAccount\">\n    <bit-callout type=\"warning\" title=\"{{ 'verifyBankAccount' | i18n }}\">\n      {{ \"verifyBankAccountWithStatementDescriptorWarning\" | i18n }}\n    </bit-callout>\n    <div class=\"tw-grid tw-grid-cols-2 tw-gap-4 tw-mb-4\" formGroupName=\"bankInformation\">\n      <bit-form-field class=\"tw-col-span-1\" disableMargin>\n        <bit-label>{{ \"routingNumber\" | i18n }}</bit-label>\n        <input\n          bitInput\n          id=\"routingNumber\"\n          type=\"text\"\n          formControlName=\"routingNumber\"\n          required\n          appInputVerbatim\n        />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-1\" disableMargin>\n        <bit-label>{{ \"accountNumber\" | i18n }}</bit-label>\n        <input\n          bitInput\n          id=\"accountNumber\"\n          type=\"text\"\n          formControlName=\"accountNumber\"\n          required\n          appInputVerbatim\n        />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-1\" disableMargin>\n        <bit-label>{{ \"accountHolderName\" | i18n }}</bit-label>\n        <input\n          id=\"accountHolderName\"\n          bitInput\n          type=\"text\"\n          formControlName=\"accountHolderName\"\n          required\n          appInputVerbatim\n        />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-1\" disableMargin>\n        <bit-label>{{ \"bankAccountType\" | i18n }}</bit-label>\n        <bit-select id=\"accountHolderType\" formControlName=\"accountHolderType\" required>\n          <bit-option [value]=\"''\" label=\"-- {{ 'select' | i18n }} --\"></bit-option>\n          <bit-option\n            [value]=\"'company'\"\n            label=\"{{ 'bankAccountTypeCompany' | i18n }}\"\n          ></bit-option>\n          <bit-option\n            [value]=\"'individual'\"\n            label=\"{{ 'bankAccountTypeIndividual' | i18n }}\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n    </div>\n  </ng-container>\n  <!-- PayPal -->\n  <ng-container *ngIf=\"showPayPal && usingPayPal\">\n    <div class=\"tw-mb-3\">\n      <div id=\"braintree-container\" class=\"tw-mb-1 tw-content-center\"></div>\n      <small class=\"tw-text-muted\">{{ \"paypalClickSubmit\" | i18n }}</small>\n    </div>\n  </ng-container>\n  <!-- Account Credit -->\n  <ng-container *ngIf=\"showAccountCredit && usingAccountCredit\">\n    <app-callout type=\"info\">\n      {{ \"makeSureEnoughCredit\" | i18n }}\n    </app-callout>\n  </ng-container>\n  <button *ngIf=\"!!onSubmit\" bitButton bitFormButton buttonType=\"primary\" type=\"submit\">\n    {{ \"submit\" | i18n }}\n  </button>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\nimport { takeUntil } from \"rxjs/operators\";\n\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { TokenizedPaymentSourceRequest } from \"@bitwarden/common/billing/models/request/tokenized-payment-source.request\";\n\nimport { SharedModule } from \"../../../shared\";\nimport { BillingServicesModule, BraintreeService, StripeService } from \"../../services\";\n\nimport { PaymentLabelV2 } from \"./payment-label-v2.component\";\n\n/**\n * Render a form that allows the user to enter their payment method, tokenize it against one of our payment providers and,\n * optionally, submit it using the {@link onSubmit} function if it is provided.\n *\n * This component is meant to replace the existing {@link PaymentComponent} which is using the deprecated Stripe Sources API.\n */\n@Component({\n  selector: \"app-payment-v2\",\n  templateUrl: \"./payment-v2.component.html\",\n  standalone: true,\n  imports: [BillingServicesModule, SharedModule, PaymentLabelV2],\n})\nexport class PaymentV2Component implements OnInit, OnDestroy {\n  /** Show account credit as a payment option. */\n  @Input() showAccountCredit: boolean = true;\n  /** Show bank account as a payment option. */\n  @Input() showBankAccount: boolean = true;\n  /** Show PayPal as a payment option. */\n  @Input() showPayPal: boolean = true;\n\n  /** The payment method selected by default when the component renders. */\n  @Input() private initialPaymentMethod: PaymentMethodType = PaymentMethodType.Card;\n  /** If provided, will be invoked with the tokenized payment source during form submission. */\n  @Input() protected onSubmit?: (request: TokenizedPaymentSourceRequest) => Promise<void>;\n\n  @Output() submitted = new EventEmitter<PaymentMethodType>();\n\n  private destroy$ = new Subject<void>();\n\n  protected formGroup = new FormGroup({\n    paymentMethod: new FormControl<PaymentMethodType>(null),\n    bankInformation: new FormGroup({\n      routingNumber: new FormControl<string>(\"\", [Validators.required]),\n      accountNumber: new FormControl<string>(\"\", [Validators.required]),\n      accountHolderName: new FormControl<string>(\"\", [Validators.required]),\n      accountHolderType: new FormControl<string>(\"\", [Validators.required]),\n    }),\n  });\n\n  protected PaymentMethodType = PaymentMethodType;\n\n  constructor(\n    private billingApiService: BillingApiServiceAbstraction,\n    private braintreeService: BraintreeService,\n    private stripeService: StripeService,\n  ) {}\n\n  ngOnInit(): void {\n    this.formGroup.controls.paymentMethod.patchValue(this.initialPaymentMethod);\n\n    this.stripeService.loadStripe(\n      {\n        cardNumber: \"#stripe-card-number\",\n        cardExpiry: \"#stripe-card-expiry\",\n        cardCvc: \"#stripe-card-cvc\",\n      },\n      this.initialPaymentMethod === PaymentMethodType.Card,\n    );\n\n    if (this.showPayPal) {\n      this.braintreeService.loadBraintree(\n        \"#braintree-container\",\n        this.initialPaymentMethod === PaymentMethodType.PayPal,\n      );\n    }\n\n    this.formGroup\n      .get(\"paymentMethod\")\n      .valueChanges.pipe(takeUntil(this.destroy$))\n      .subscribe((type) => {\n        this.onPaymentMethodChange(type);\n      });\n  }\n\n  /** Programmatically select the provided payment method. */\n  select = (paymentMethod: PaymentMethodType) => {\n    this.formGroup.get(\"paymentMethod\").patchValue(paymentMethod);\n  };\n\n  protected submit = async () => {\n    const { type, token } = await this.tokenize();\n    await this.onSubmit?.({ type, token });\n    this.submitted.emit(type);\n  };\n\n  /**\n   * Tokenize the payment method information entered by the user against one of our payment providers.\n   *\n   * - {@link PaymentMethodType.Card} => [Stripe.confirmCardSetup]{@link https://docs.stripe.com/js/setup_intents/confirm_card_setup}\n   * - {@link PaymentMethodType.BankAccount} => [Stripe.confirmUsBankAccountSetup]{@link https://docs.stripe.com/js/setup_intents/confirm_us_bank_account_setup}\n   * - {@link PaymentMethodType.PayPal} => [Braintree.requestPaymentMethod]{@link https://braintree.github.io/braintree-web-drop-in/docs/current/Dropin.html#requestPaymentMethod}\n   * */\n  async tokenize(): Promise<{ type: PaymentMethodType; token: string }> {\n    const type = this.selected;\n\n    if (this.usingStripe) {\n      const clientSecret = await this.billingApiService.createSetupIntent(type);\n\n      if (this.usingBankAccount) {\n        this.formGroup.markAllAsTouched();\n        if (this.formGroup.valid) {\n          const token = await this.stripeService.setupBankAccountPaymentMethod(clientSecret, {\n            accountHolderName: this.formGroup.value.bankInformation.accountHolderName,\n            routingNumber: this.formGroup.value.bankInformation.routingNumber,\n            accountNumber: this.formGroup.value.bankInformation.accountNumber,\n            accountHolderType: this.formGroup.value.bankInformation.accountHolderType,\n          });\n          return {\n            type,\n            token,\n          };\n        } else {\n          throw \"Invalid input provided, Please ensure all required fields are filled out correctly and try again.\";\n        }\n      }\n\n      if (this.usingCard) {\n        const token = await this.stripeService.setupCardPaymentMethod(clientSecret);\n        return {\n          type,\n          token,\n        };\n      }\n    }\n\n    if (this.usingPayPal) {\n      const token = await this.braintreeService.requestPaymentMethod();\n      return {\n        type,\n        token,\n      };\n    }\n\n    if (this.usingAccountCredit) {\n      return {\n        type: PaymentMethodType.Credit,\n        token: null,\n      };\n    }\n\n    return null;\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n    this.stripeService.unloadStripe();\n    if (this.showPayPal) {\n      this.braintreeService.unloadBraintree();\n    }\n  }\n\n  private onPaymentMethodChange(type: PaymentMethodType): void {\n    switch (type) {\n      case PaymentMethodType.Card: {\n        this.stripeService.mountElements();\n        break;\n      }\n      case PaymentMethodType.PayPal: {\n        this.braintreeService.createDropin();\n        break;\n      }\n    }\n  }\n\n  get selected(): PaymentMethodType {\n    return this.formGroup.value.paymentMethod;\n  }\n\n  protected get usingAccountCredit(): boolean {\n    return this.selected === PaymentMethodType.Credit;\n  }\n\n  protected get usingBankAccount(): boolean {\n    return this.selected === PaymentMethodType.BankAccount;\n  }\n\n  protected get usingCard(): boolean {\n    return this.selected === PaymentMethodType.Card;\n  }\n\n  protected get usingPayPal(): boolean {\n    return this.selected === PaymentMethodType.PayPal;\n  }\n\n  private get usingStripe(): boolean {\n    return this.usingBankAccount || this.usingCard;\n  }\n}\n","<div [formGroup]=\"paymentForm\">\n  <div class=\"tw-mb-4 tw-text-lg\" *ngIf=\"showOptions && showMethods\">\n    <bit-radio-group formControlName=\"method\">\n      <bit-radio-button id=\"method-card\" [value]=\"paymentMethodType.Card\">\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-credit-card\" aria-hidden=\"true\"></i>\n          {{ \"creditCard\" | i18n }}</bit-label\n        >\n      </bit-radio-button>\n      <bit-radio-button id=\"method-bank\" [value]=\"paymentMethodType.BankAccount\" *ngIf=\"!hideBank\">\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-bank\" aria-hidden=\"true\"></i>\n          {{ \"bankAccount\" | i18n }}</bit-label\n        >\n      </bit-radio-button>\n      <bit-radio-button id=\"method-paypal\" [value]=\"paymentMethodType.PayPal\" *ngIf=\"!hidePaypal\">\n        <bit-label> <i class=\"bwi bwi-fw bwi-paypal\" aria-hidden=\"true\"></i> PayPal</bit-label>\n      </bit-radio-button>\n      <bit-radio-button id=\"method-credit\" [value]=\"paymentMethodType.Credit\" *ngIf=\"!hideCredit\">\n        <bit-label>\n          <i class=\"bwi bwi-fw bwi-dollar\" aria-hidden=\"true\"></i>\n          {{ \"accountCredit\" | i18n }}</bit-label\n        >\n      </bit-radio-button>\n    </bit-radio-group>\n  </div>\n  <ng-container *ngIf=\"showMethods && method === paymentMethodType.Card\">\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4 tw-mb-4\">\n      <div [ngClass]=\"trialFlow ? 'tw-col-span-12' : 'tw-col-span-6'\">\n        <app-payment-label-v2 for=\"stripe-card-number-element\">{{\n          \"number\" | i18n\n        }}</app-payment-label-v2>\n        <div id=\"stripe-card-number-element\" class=\"form-control stripe-form-control\"></div>\n      </div>\n      <div *ngIf=\"!trialFlow\" class=\"tw-col-span-8 tw-flex tw-items-end\">\n        <img\n          src=\"../../images/cards.png\"\n          alt=\"Visa, MasterCard, Discover, AmEx, JCB, Diners Club, UnionPay\"\n          width=\"323\"\n          height=\"32\"\n        />\n      </div>\n      <div [ngClass]=\"trialFlow ? 'tw-col-span-6' : 'tw-col-span-6'\">\n        <app-payment-label-v2 for=\"stripe-card-expiry-element\">{{\n          \"expiration\" | i18n\n        }}</app-payment-label-v2>\n        <div id=\"stripe-card-expiry-element\" class=\"form-control stripe-form-control\"></div>\n      </div>\n      <div [ngClass]=\"trialFlow ? 'tw-col-span-6' : 'tw-col-span-6'\">\n        <app-payment-label-v2 for=\"stripe-card-cvc-element\">\n          {{ \"securityCodeSlashCVV\" | i18n }}\n          <a\n            href=\"https://www.cvvnumber.com/cvv.html\"\n            tabindex=\"-1\"\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            class=\"hover:tw-no-underline\"\n            appA11yTitle=\"{{ 'whatIsACvvNumber' | i18n }}\"\n          >\n            <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n          </a>\n        </app-payment-label-v2>\n        <div id=\"stripe-card-cvc-element\" class=\"form-control stripe-form-control\"></div>\n      </div>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"showMethods && method === paymentMethodType.BankAccount\">\n    <bit-callout type=\"warning\" title=\"{{ 'verifyBankAccount' | i18n }}\">\n      {{ \"verifyBankAccountInitialDesc\" | i18n }} {{ \"verifyBankAccountFailureWarning\" | i18n }}\n    </bit-callout>\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\" formGroupName=\"bank\">\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"routingNumber\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"routing_number\" required appInputVerbatim />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"accountNumber\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"account_number\" required appInputVerbatim />\n      </bit-form-field>\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"accountHolderName\" | i18n }}</bit-label>\n        <input\n          bitInput\n          type=\"text\"\n          formControlName=\"account_holder_name\"\n          required\n          appInputVerbatim\n        />\n      </bit-form-field>\n\n      <bit-form-field class=\"tw-col-span-6\">\n        <bit-label>{{ \"bankAccountType\" | i18n }}</bit-label>\n        <bit-select formControlName=\"account_holder_type\" required>\n          <bit-option value=\"\" label=\"-- {{ 'select' | i18n }} --\"></bit-option>\n          <bit-option value=\"company\" label=\"{{ 'bankAccountTypeCompany' | i18n }}\"></bit-option>\n          <bit-option\n            value=\"individual\"\n            label=\"{{ 'bankAccountTypeIndividual' | i18n }}\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"showMethods && method === paymentMethodType.PayPal\">\n    <div class=\"tw-mb-3\">\n      <div id=\"bt-dropin-container\" class=\"tw-mb-1\"></div>\n      <small class=\"tw-text-muted\">{{ \"paypalClickSubmit\" | i18n }}</small>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"showMethods && method === paymentMethodType.Credit\">\n    <bit-callout>\n      {{ \"makeSureEnoughCredit\" | i18n }}\n    </bit-callout>\n  </ng-container>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { AbstractThemingService } from \"@bitwarden/angular/platform/services/theming/theming.service.abstraction\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { PaymentLabelV2 } from \"./payment-label-v2.component\";\n\n@Component({\n  selector: \"app-payment\",\n  templateUrl: \"payment.component.html\",\n  standalone: true,\n  imports: [SharedModule, PaymentLabelV2],\n})\nexport class PaymentComponent implements OnInit, OnDestroy {\n  @Input() showMethods = true;\n  @Input() showOptions = true;\n  @Input() hideBank = false;\n  @Input() hidePaypal = false;\n  @Input() hideCredit = false;\n  @Input() trialFlow = false;\n\n  @Input()\n  set method(value: PaymentMethodType) {\n    this._method = value;\n    this.paymentForm?.controls.method.setValue(value, { emitEvent: false });\n  }\n\n  get method(): PaymentMethodType {\n    return this._method;\n  }\n  private _method: PaymentMethodType = PaymentMethodType.Card;\n\n  private destroy$ = new Subject<void>();\n  protected paymentForm = new FormGroup({\n    method: new FormControl(this.method),\n    bank: new FormGroup({\n      routing_number: new FormControl(null, [Validators.required]),\n      account_number: new FormControl(null, [Validators.required]),\n      account_holder_name: new FormControl(null, [Validators.required]),\n      account_holder_type: new FormControl(\"\", [Validators.required]),\n      currency: new FormControl(\"USD\"),\n      country: new FormControl(\"US\"),\n    }),\n  });\n  paymentMethodType = PaymentMethodType;\n\n  private btScript: HTMLScriptElement;\n  private btInstance: any = null;\n  private stripeScript: HTMLScriptElement;\n  private stripe: any = null;\n  private stripeElements: any = null;\n  private stripeCardNumberElement: any = null;\n  private stripeCardExpiryElement: any = null;\n  private stripeCardCvcElement: any = null;\n  private StripeElementStyle: any;\n  private StripeElementClasses: any;\n\n  constructor(\n    private apiService: ApiService,\n    private logService: LogService,\n    private themingService: AbstractThemingService,\n    private configService: ConfigService,\n  ) {\n    this.stripeScript = window.document.createElement(\"script\");\n    this.stripeScript.src = \"https://js.stripe.com/v3/?advancedFraudSignals=false\";\n    this.stripeScript.async = true;\n    this.stripeScript.onload = async () => {\n      this.stripe = (window as any).Stripe(process.env.STRIPE_KEY);\n      this.stripeElements = this.stripe.elements();\n      await this.setStripeElement();\n    };\n    this.btScript = window.document.createElement(\"script\");\n    this.btScript.src = `scripts/dropin.js?cache=${process.env.CACHE_TAG}`;\n    this.btScript.async = true;\n    this.StripeElementStyle = {\n      base: {\n        color: null,\n        fontFamily:\n          '\"DM Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif, ' +\n          '\"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\"',\n        fontSize: \"16px\",\n        fontSmoothing: \"antialiased\",\n        \"::placeholder\": {\n          color: null,\n        },\n      },\n      invalid: {\n        color: null,\n      },\n    };\n    this.StripeElementClasses = {\n      focus: \"is-focused\",\n      empty: \"is-empty\",\n      invalid: \"is-invalid\",\n    };\n  }\n  async ngOnInit() {\n    if (!this.showOptions) {\n      this.hidePaypal = this.method !== PaymentMethodType.PayPal;\n      this.hideBank = this.method !== PaymentMethodType.BankAccount;\n      this.hideCredit = this.method !== PaymentMethodType.Credit;\n    }\n    this.subscribeToTheme();\n    window.document.head.appendChild(this.stripeScript);\n    if (!this.hidePaypal) {\n      window.document.head.appendChild(this.btScript);\n    }\n    this.paymentForm\n      .get(\"method\")\n      .valueChanges.pipe(takeUntil(this.destroy$))\n      .subscribe((v) => {\n        this.method = v;\n        this.changeMethod();\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n    window.document.head.removeChild(this.stripeScript);\n    window.setTimeout(() => {\n      Array.from(window.document.querySelectorAll(\"iframe\")).forEach((el) => {\n        if (el.src != null && el.src.indexOf(\"stripe\") > -1) {\n          try {\n            window.document.body.removeChild(el);\n          } catch (e) {\n            this.logService.error(e);\n          }\n        }\n      });\n    }, 500);\n    if (!this.hidePaypal) {\n      window.document.head.removeChild(this.btScript);\n      window.setTimeout(() => {\n        Array.from(window.document.head.querySelectorAll(\"script\")).forEach((el) => {\n          if (el.src != null && el.src.indexOf(\"paypal\") > -1) {\n            try {\n              window.document.head.removeChild(el);\n            } catch (e) {\n              this.logService.error(e);\n            }\n          }\n        });\n        const btStylesheet = window.document.head.querySelector(\"#braintree-dropin-stylesheet\");\n        if (btStylesheet != null) {\n          try {\n            window.document.head.removeChild(btStylesheet);\n          } catch (e) {\n            this.logService.error(e);\n          }\n        }\n      }, 500);\n    }\n  }\n\n  changeMethod() {\n    this.btInstance = null;\n    if (this.method === PaymentMethodType.PayPal) {\n      window.setTimeout(() => {\n        (window as any).braintree.dropin.create(\n          {\n            authorization: process.env.BRAINTREE_KEY,\n            container: \"#bt-dropin-container\",\n            paymentOptionPriority: [\"paypal\"],\n            paypal: {\n              flow: \"vault\",\n              buttonStyle: {\n                label: \"pay\",\n                size: \"medium\",\n                shape: \"pill\",\n                color: \"blue\",\n                tagline: \"false\",\n              },\n            },\n          },\n          (createErr: any, instance: any) => {\n            if (createErr != null) {\n              // eslint-disable-next-line\n              console.error(createErr);\n              return;\n            }\n            this.btInstance = instance;\n          },\n        );\n      }, 250);\n    } else {\n      void this.setStripeElement();\n    }\n  }\n\n  createPaymentToken(): Promise<[string, PaymentMethodType]> {\n    return new Promise((resolve, reject) => {\n      if (this.method === PaymentMethodType.Credit) {\n        resolve([null, this.method]);\n      } else if (this.method === PaymentMethodType.PayPal) {\n        this.btInstance\n          .requestPaymentMethod()\n          .then((payload: any) => {\n            resolve([payload.nonce, this.method]);\n          })\n          .catch((err: any) => {\n            reject(err.message);\n          });\n      } else if (\n        this.method === PaymentMethodType.Card ||\n        this.method === PaymentMethodType.BankAccount\n      ) {\n        if (this.method === PaymentMethodType.Card) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.apiService\n            .postSetupPayment()\n            .then((clientSecret) =>\n              this.stripe.handleCardSetup(clientSecret, this.stripeCardNumberElement),\n            )\n            .then((result: any) => {\n              if (result.error) {\n                reject(result.error.message);\n              } else if (result.setupIntent && result.setupIntent.status === \"succeeded\") {\n                resolve([result.setupIntent.payment_method, this.method]);\n              } else {\n                reject();\n              }\n            });\n        } else {\n          this.stripe\n            .createToken(\"bank_account\", this.paymentForm.get(\"bank\").value)\n            .then((result: any) => {\n              if (result.error) {\n                reject(result.error.message);\n              } else if (result.token && result.token.id != null) {\n                resolve([result.token.id, this.method]);\n              } else {\n                reject();\n              }\n            });\n        }\n      }\n    });\n  }\n\n  handleStripeCardPayment(clientSecret: string, successCallback: () => Promise<any>): Promise<any> {\n    return new Promise<void>((resolve, reject) => {\n      if (this.showMethods && this.stripeCardNumberElement == null) {\n        reject();\n        return;\n      }\n      const handleCardPayment = () =>\n        this.showMethods\n          ? this.stripe.handleCardSetup(clientSecret, this.stripeCardNumberElement)\n          : this.stripe.handleCardSetup(clientSecret);\n      return handleCardPayment().then(async (result: any) => {\n        if (result.error) {\n          reject(result.error.message);\n        } else if (result.paymentIntent && result.paymentIntent.status === \"succeeded\") {\n          if (successCallback != null) {\n            await successCallback();\n          }\n          resolve();\n        } else {\n          reject();\n        }\n      });\n    });\n  }\n\n  private async setStripeElement() {\n    const extensionRefreshFlag = await this.configService.getFeatureFlag(\n      FeatureFlag.ExtensionRefresh,\n    );\n\n    // Apply unique styles for extension refresh\n    if (extensionRefreshFlag) {\n      this.StripeElementStyle.base.fontWeight = \"500\";\n      this.StripeElementClasses.base = \"v2\";\n    }\n\n    window.setTimeout(() => {\n      if (this.showMethods && this.method === PaymentMethodType.Card) {\n        if (this.stripeCardNumberElement == null) {\n          this.stripeCardNumberElement = this.stripeElements.create(\"cardNumber\", {\n            style: this.StripeElementStyle,\n            classes: this.StripeElementClasses,\n            placeholder: \"\",\n          });\n        }\n        if (this.stripeCardExpiryElement == null) {\n          this.stripeCardExpiryElement = this.stripeElements.create(\"cardExpiry\", {\n            style: this.StripeElementStyle,\n            classes: this.StripeElementClasses,\n          });\n        }\n        if (this.stripeCardCvcElement == null) {\n          this.stripeCardCvcElement = this.stripeElements.create(\"cardCvc\", {\n            style: this.StripeElementStyle,\n            classes: this.StripeElementClasses,\n            placeholder: \"\",\n          });\n        }\n        this.stripeCardNumberElement.mount(\"#stripe-card-number-element\");\n        this.stripeCardExpiryElement.mount(\"#stripe-card-expiry-element\");\n        this.stripeCardCvcElement.mount(\"#stripe-card-cvc-element\");\n      }\n    }, 50);\n  }\n\n  private subscribeToTheme() {\n    this.themingService.theme$.pipe(takeUntil(this.destroy$)).subscribe(() => {\n      const style = getComputedStyle(document.documentElement);\n      this.StripeElementStyle.base.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n      this.StripeElementStyle.base[\"::placeholder\"].color = `rgb(${style.getPropertyValue(\n        \"--color-text-muted\",\n      )})`;\n      this.StripeElementStyle.invalid.color = `rgb(${style.getPropertyValue(\"--color-text-main\")})`;\n      this.StripeElementStyle.invalid.borderColor = `rgb(${style.getPropertyValue(\n        \"--color-danger-600\",\n      )})`;\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\n\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { LicenseUploaderFormModel } from \"./license-uploader-form-model\";\n\n/**\n * Shared implementation for processing license file uploads.\n * @remarks Requires self-hosting.\n */\nexport abstract class AbstractSelfHostingLicenseUploaderComponent {\n  protected form: FormGroup;\n\n  protected constructor(\n    protected readonly formBuilder: FormBuilder,\n    protected readonly i18nService: I18nService,\n    protected readonly platformUtilsService: PlatformUtilsService,\n    protected readonly toastService: ToastService,\n    protected readonly tokenService: TokenService,\n  ) {\n    const isSelfHosted = this.platformUtilsService.isSelfHost();\n\n    if (!isSelfHosted) {\n      throw new Error(\"This component should only be used in self-hosted environments\");\n    }\n\n    this.form = this.formBuilder.group({\n      file: [null, [Validators.required]],\n    });\n    this.submit = this.submit.bind(this);\n  }\n\n  /**\n   * Gets the submitted license upload form model.\n   * @protected\n   */\n  protected get formValue(): LicenseUploaderFormModel {\n    return this.form.value as LicenseUploaderFormModel;\n  }\n\n  /**\n   * Triggered when a different license file is selected.\n   * @param event\n   */\n  onLicenseFileSelectedChanged(event: Event): void {\n    const element = event.target as HTMLInputElement;\n    this.form.value.file = element.files.length > 0 ? element.files[0] : null;\n  }\n\n  /**\n   * Submits the license upload form.\n   * @protected\n   */\n  protected async submit(): Promise<void> {\n    this.form.markAllAsTouched();\n\n    if (this.form.invalid) {\n      return this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"selectFile\"),\n      });\n    }\n\n    const emailVerified = await this.tokenService.getEmailVerified();\n    if (!emailVerified) {\n      return this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"verifyEmailFirst\"),\n      });\n    }\n  }\n\n  abstract get description(): string;\n\n  abstract get hintFileName(): string;\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const SecretsManagerLogo = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 580 104\" fill=\"none\"><path fill=\"#fff\" d=\"M102.539 52.27c0 28.315-22.954 51.269-51.27 51.269C22.955 103.539 0 80.585 0 52.269 0 23.955 22.954 1 51.27 1c28.315 0 51.269 22.954 51.269 51.27Z\"/><path fill=\"#175DDC\" fill-rule=\"evenodd\" d=\"M75.971 26.765c-.516-.49-1.111-.777-1.786-.777H28.39c-.675 0-1.31.287-1.786.777-.516.49-.754 1.145-.754 1.84v31.47c0 2.371.437 4.66 1.31 6.95.873 2.288 1.984 4.332 3.294 6.13s2.897 3.515 4.682 5.232a62.036 62.036 0 0 0 5 4.25 82.731 82.731 0 0 0 4.802 3.188c1.667.981 2.857 1.676 3.572 2.003.714.368 1.27.613 1.706.817a2.26 2.26 0 0 0 1.032.246 2.26 2.26 0 0 0 1.032-.246c.436-.204.992-.45 1.706-.817.715-.368 1.905-1.022 3.572-2.003a54.848 54.848 0 0 0 4.801-3.188c1.548-1.103 3.215-2.534 5.04-4.25 1.826-1.717 3.373-3.434 4.683-5.232 1.31-1.798 2.42-3.842 3.294-6.13.912-2.29 1.31-4.62 1.31-6.95v-31.47c.04-.695-.239-1.309-.715-1.84Zm-5.913 33.597c0 11.403-18.77 21.172-18.77 21.172V32.732h18.77v27.63Z\" clip-rule=\"evenodd\"/><path fill=\"#fff\" d=\"M142.208 70.81c-2.804 0-5.243-.511-7.319-1.533-2.075-1.023-3.678-2.447-4.806-4.272-1.129-1.826-1.694-3.943-1.694-6.353h4.807c0 1.497.346 2.884 1.038 4.162.692 1.241 1.693 2.246 3.004 3.012 1.347.73 3.004 1.096 4.97 1.096 2.585 0 4.588-.621 6.008-1.862 1.42-1.242 2.13-2.794 2.13-4.656 0-1.533-.327-2.756-.983-3.669-.655-.95-1.547-1.716-2.676-2.3-1.092-.585-2.367-1.096-3.823-1.534a126.43 126.43 0 0 1-4.479-1.479c-2.95-1.022-5.134-2.281-6.555-3.778-1.42-1.534-2.13-3.524-2.13-5.97-.036-2.045.437-3.852 1.42-5.422.984-1.607 2.367-2.848 4.151-3.724 1.821-.913 3.969-1.37 6.446-1.37 2.439 0 4.551.457 6.335 1.37 1.821.913 3.223 2.172 4.206 3.779 1.02 1.606 1.548 3.432 1.584 5.476h-4.806c0-1.058-.274-2.099-.82-3.121-.546-1.06-1.383-1.917-2.512-2.574-1.093-.658-2.476-.986-4.151-.986-2.076-.037-3.787.493-5.135 1.588-1.31 1.095-1.966 2.61-1.966 4.546 0 1.643.455 2.903 1.366 3.779.946.876 2.257 1.606 3.932 2.19 1.675.548 3.605 1.187 5.79 1.917 1.821.657 3.459 1.424 4.916 2.3 1.456.877 2.585 2.009 3.386 3.396.838 1.388 1.256 3.158 1.256 5.313 0 1.825-.473 3.56-1.42 5.203-.946 1.606-2.385 2.92-4.315 3.943-1.893 1.022-4.278 1.533-7.155 1.533ZM172.42 70.81c-2.586 0-4.88-.584-6.882-1.752-2.003-1.205-3.587-2.867-4.752-4.984-1.129-2.118-1.694-4.619-1.694-7.503 0-2.848.565-5.331 1.694-7.449 1.128-2.154 2.694-3.815 4.697-4.983 2.039-1.205 4.388-1.808 7.046-1.808 2.622 0 4.879.603 6.773 1.807 1.93 1.169 3.404 2.72 4.424 4.656a13.201 13.201 0 0 1 1.529 6.243c0 .402-.018.803-.054 1.205v1.37h-21.575c.109 2.08.582 3.815 1.42 5.202.874 1.351 1.948 2.373 3.222 3.067a8.754 8.754 0 0 0 4.152 1.04c1.893 0 3.477-.437 4.751-1.314 1.275-.876 2.203-2.063 2.786-3.56h4.533c-.728 2.52-2.13 4.62-4.205 6.299-2.039 1.643-4.661 2.464-7.865 2.464Zm0-24.59c-2.185 0-4.133.675-5.845 2.026-1.675 1.314-2.64 3.25-2.895 5.805h17.042c-.11-2.446-.947-4.363-2.513-5.75-1.566-1.388-3.495-2.081-5.789-2.081ZM202.697 70.81c-2.585 0-4.916-.584-6.991-1.752-2.039-1.205-3.66-2.867-4.861-4.984-1.166-2.154-1.748-4.655-1.748-7.503s.582-5.331 1.748-7.449c1.201-2.154 2.822-3.815 4.861-4.983 2.075-1.205 4.406-1.808 6.991-1.808 3.204 0 5.899.84 8.084 2.52 2.221 1.679 3.623 3.924 4.206 6.736h-4.698c-.364-1.68-1.256-2.976-2.676-3.889-1.42-.949-3.077-1.424-4.97-1.424-1.53 0-2.968.384-4.315 1.15-1.348.767-2.44 1.917-3.278 3.45-.837 1.534-1.256 3.433-1.256 5.697 0 2.263.419 4.162 1.256 5.696.838 1.533 1.93 2.701 3.278 3.505a8.584 8.584 0 0 0 4.315 1.15c1.893 0 3.55-.457 4.97-1.37 1.42-.949 2.312-2.282 2.676-3.998h4.698c-.547 2.739-1.93 4.966-4.152 6.682-2.221 1.716-4.934 2.574-8.138 2.574ZM220.302 70.153V42.988h4.151l.382 5.203c.838-1.789 2.112-3.213 3.823-4.272 1.712-1.058 3.824-1.588 6.336-1.588v4.82h-1.256c-1.602 0-3.077.292-4.424.876-1.347.548-2.422 1.497-3.223 2.848-.801 1.35-1.201 3.213-1.201 5.586v13.692h-4.588ZM250.218 70.81c-2.585 0-4.879-.584-6.882-1.752-2.003-1.205-3.587-2.867-4.752-4.984-1.129-2.118-1.693-4.619-1.693-7.503 0-2.848.564-5.331 1.693-7.449 1.129-2.154 2.695-3.815 4.698-4.983 2.039-1.205 4.387-1.808 7.045-1.808 2.622 0 4.88.603 6.773 1.807 1.93 1.169 3.405 2.72 4.424 4.656 1.02 1.935 1.53 4.016 1.53 6.243 0 .402-.018.803-.055 1.205v1.37h-21.575c.11 2.08.583 3.815 1.421 5.202.874 1.351 1.948 2.373 3.222 3.067a8.753 8.753 0 0 0 4.151 1.04c1.894 0 3.478-.437 4.752-1.314 1.275-.876 2.203-2.063 2.786-3.56h4.533c-.728 2.52-2.13 4.62-4.206 6.299-2.039 1.643-4.66 2.464-7.865 2.464Zm0-24.59c-2.185 0-4.133.675-5.844 2.026-1.675 1.314-2.64 3.25-2.895 5.805h17.041c-.109-2.446-.946-4.363-2.512-5.75-1.566-1.388-3.496-2.081-5.79-2.081ZM277.841 70.153c-2.476 0-4.424-.603-5.844-1.807-1.42-1.205-2.13-3.378-2.13-6.518V46.877h-4.698v-3.889h4.698l.601-6.517h3.987v6.517h7.974v3.889h-7.974v14.951c0 1.716.346 2.885 1.038 3.505.691.585 1.911.877 3.659.877h2.84v3.943h-4.151ZM297.544 70.81c-3.241 0-5.936-.821-8.084-2.464-2.149-1.643-3.405-3.87-3.769-6.682h4.697c.292 1.424 1.038 2.665 2.24 3.724 1.238 1.022 2.895 1.534 4.97 1.534 1.93 0 3.35-.402 4.26-1.205.911-.84 1.366-1.826 1.366-2.958 0-1.643-.601-2.738-1.803-3.286-1.165-.547-2.822-1.04-4.97-1.478a28.114 28.114 0 0 1-4.369-1.26c-1.457-.548-2.677-1.315-3.66-2.3-.983-1.023-1.475-2.355-1.475-3.998 0-2.373.874-4.309 2.622-5.806 1.784-1.533 4.188-2.3 7.21-2.3 2.876 0 5.225.73 7.046 2.19 1.857 1.425 2.931 3.47 3.222 6.135h-4.533c-.182-1.388-.783-2.465-1.803-3.231-.983-.804-2.312-1.205-3.987-1.205-1.638 0-2.913.346-3.823 1.04-.874.694-1.311 1.607-1.311 2.739 0 1.095.564 1.953 1.693 2.574 1.165.62 2.731 1.15 4.697 1.588 1.675.365 3.259.821 4.752 1.37 1.53.51 2.768 1.295 3.714 2.354.984 1.022 1.475 2.52 1.475 4.491.037 2.446-.892 4.473-2.785 6.08-1.857 1.57-4.388 2.354-7.592 2.354ZM327.019 70.153V31.816h5.353l13.764 26.726 13.655-26.726h5.407v38.337h-4.588V40.031l-12.781 24.645h-3.441l-12.781-24.59v30.067h-4.588ZM380.911 70.81c-2.258 0-4.133-.383-5.626-1.15-1.493-.767-2.604-1.789-3.332-3.067a8.266 8.266 0 0 1-1.092-4.162c0-2.775 1.056-4.911 3.168-6.408 2.112-1.497 4.988-2.245 8.63-2.245h7.319v-.33c0-2.372-.619-4.161-1.857-5.366-1.238-1.242-2.895-1.862-4.971-1.862-1.784 0-3.332.456-4.642 1.369-1.275.876-2.076 2.172-2.404 3.888h-4.697c.182-1.971.838-3.633 1.966-4.983 1.166-1.352 2.604-2.374 4.315-3.068 1.712-.73 3.532-1.095 5.462-1.095 3.787 0 6.627 1.022 8.521 3.067 1.93 2.008 2.895 4.692 2.895 8.05v16.705h-4.097l-.273-4.874c-.765 1.533-1.893 2.848-3.386 3.943-1.457 1.059-3.423 1.588-5.899 1.588Zm.71-3.888c1.748 0 3.241-.457 4.479-1.37a8.66 8.66 0 0 0 2.895-3.56c.655-1.46.983-2.993.983-4.6v-.055h-6.937c-2.695 0-4.606.475-5.735 1.424-1.092.913-1.639 2.063-1.639 3.45 0 1.425.51 2.575 1.53 3.451 1.056.84 2.53 1.26 4.424 1.26ZM400.356 70.153V42.988h4.151l.273 4.875a9.86 9.86 0 0 1 3.769-4.053c1.639-.986 3.496-1.479 5.571-1.479 3.205 0 5.754.986 7.647 2.958 1.93 1.935 2.895 4.929 2.895 8.981v15.883h-4.588v-15.39c0-5.659-2.331-8.489-6.991-8.489-2.331 0-4.279.858-5.845 2.575-1.529 1.679-2.294 4.089-2.294 7.229v14.075h-4.588ZM439.533 70.81c-2.258 0-4.133-.383-5.626-1.15-1.493-.767-2.603-1.789-3.332-3.067a8.266 8.266 0 0 1-1.092-4.162c0-2.775 1.056-4.911 3.168-6.408 2.112-1.497 4.988-2.245 8.63-2.245h7.319v-.33c0-2.372-.619-4.161-1.857-5.366-1.238-1.242-2.895-1.862-4.971-1.862-1.784 0-3.331.456-4.642 1.369-1.275.876-2.076 2.172-2.404 3.888h-4.697c.182-1.971.838-3.633 1.966-4.983 1.166-1.352 2.604-2.374 4.315-3.068 1.712-.73 3.532-1.095 5.462-1.095 3.787 0 6.627 1.022 8.521 3.067 1.93 2.008 2.895 4.692 2.895 8.05v16.705h-4.097l-.273-4.874c-.764 1.533-1.893 2.848-3.386 3.943-1.457 1.059-3.423 1.588-5.899 1.588Zm.71-3.888c1.748 0 3.241-.457 4.479-1.37a8.66 8.66 0 0 0 2.895-3.56c.655-1.46.983-2.993.983-4.6v-.055h-6.937c-2.694 0-4.606.475-5.735 1.424-1.092.913-1.639 2.063-1.639 3.45 0 1.425.51 2.575 1.53 3.451 1.056.84 2.531 1.26 4.424 1.26ZM469.684 61.61c-1.53 0-2.931-.202-4.206-.603l-2.731 2.574c.401.292.892.548 1.475.767.619.182 1.493.365 2.622.547 1.128.146 2.712.31 4.751.493 3.642.256 6.245 1.096 7.811 2.52 1.566 1.424 2.349 3.286 2.349 5.586 0 1.57-.437 3.067-1.311 4.49-.838 1.425-2.149 2.593-3.933 3.506-1.748.913-4.005 1.369-6.773 1.369-2.439 0-4.606-.329-6.499-.986-1.894-.62-3.369-1.588-4.425-2.903-1.055-1.277-1.583-2.902-1.583-4.874 0-1.022.273-2.136.819-3.34.546-1.169 1.566-2.282 3.059-3.341a13.725 13.725 0 0 1-2.076-1.041 13.173 13.173 0 0 1-1.529-1.314V63.8l4.642-4.6c-2.148-1.826-3.222-4.236-3.222-7.23 0-1.789.418-3.414 1.256-4.874.837-1.46 2.057-2.61 3.66-3.45 1.602-.877 3.55-1.315 5.844-1.315 1.566 0 2.986.22 4.26.657h9.995v3.45l-5.079.22c1.056 1.533 1.584 3.304 1.584 5.312 0 1.79-.437 3.414-1.311 4.874-.838 1.461-2.057 2.63-3.66 3.506-1.565.84-3.495 1.26-5.789 1.26Zm0-3.78c1.93 0 3.459-.493 4.588-1.478 1.165-1.023 1.748-2.483 1.748-4.382 0-1.862-.583-3.286-1.748-4.272-1.129-1.022-2.658-1.533-4.588-1.533-1.967 0-3.532.511-4.698 1.533-1.128.986-1.693 2.41-1.693 4.272 0 1.899.565 3.36 1.693 4.382 1.166.985 2.731 1.478 4.698 1.478Zm-7.975 15.828c0 1.826.765 3.177 2.294 4.053 1.53.913 3.441 1.37 5.735 1.37 2.258 0 4.06-.494 5.408-1.48 1.383-.986 2.075-2.3 2.075-3.943 0-1.168-.473-2.19-1.42-3.067-.947-.84-2.694-1.332-5.243-1.479-2.003-.146-3.733-.328-5.189-.547-1.493.803-2.476 1.661-2.95 2.574-.473.95-.71 1.789-.71 2.52ZM499.136 70.81c-2.585 0-4.879-.584-6.882-1.752-2.003-1.205-3.587-2.867-4.752-4.984-1.129-2.118-1.693-4.619-1.693-7.503 0-2.848.564-5.331 1.693-7.449 1.129-2.154 2.695-3.815 4.697-4.983 2.04-1.205 4.388-1.808 7.046-1.808 2.622 0 4.88.603 6.773 1.807 1.93 1.169 3.405 2.72 4.424 4.656 1.02 1.935 1.53 4.016 1.53 6.243 0 .402-.019.803-.055 1.205v1.37h-21.575c.11 2.08.583 3.815 1.42 5.202.874 1.351 1.949 2.373 3.223 3.067a8.753 8.753 0 0 0 4.151 1.04c1.894 0 3.478-.437 4.752-1.314 1.274-.876 2.203-2.063 2.786-3.56h4.533c-.728 2.52-2.13 4.62-4.206 6.299-2.039 1.643-4.661 2.464-7.865 2.464Zm0-24.59c-2.185 0-4.133.675-5.844 2.026-1.675 1.314-2.64 3.25-2.895 5.805h17.041c-.109-2.446-.947-4.363-2.512-5.75-1.566-1.388-3.496-2.081-5.79-2.081ZM516.96 70.153V42.988h4.151l.383 5.203c.837-1.789 2.112-3.213 3.823-4.272 1.712-1.058 3.824-1.588 6.336-1.588v4.82h-1.256c-1.602 0-3.077.292-4.424.876-1.348.548-2.422 1.497-3.223 2.848-.801 1.35-1.202 3.213-1.202 5.586v13.692h-4.588Z\"/></svg>\n`;\n","<div *ngIf=\"formGroup && selectedPlan != null\" [formGroup]=\"formGroup\">\n  <h3 bitTypography=\"h3\">{{ \"moreFromBitwarden\" | i18n }}</h3>\n  <div class=\"tw-rounded-t tw-bg-background-alt3 tw-p-5\">\n    <div class=\"tw-w-72\">\n      <bit-icon [icon]=\"logo\"></bit-icon>\n    </div>\n  </div>\n  <div\n    class=\"tw-rounded-b tw-border-x tw-border-b tw-border-t-0 tw-border-solid tw-border-secondary-300 tw-p-5\"\n  >\n    <h4 bitTypography=\"h4\">{{ \"secretsManagerForPlan\" | i18n: planName }}</h4>\n    <div class=\"tw-text-muted\">\n      {{ \"secretsManagerForPlanDesc\" | i18n }}\n      <ul>\n        <li *ngIf=\"product == productTypes.Free\">{{ \"limitedUsers\" | i18n: maxUsers }}</li>\n        <li>{{ \"unlimitedSecrets\" | i18n }}</li>\n        <li *ngIf=\"product == productTypes.Free; else unlimitedProjects\">\n          {{ \"projectsIncluded\" | i18n: maxProjects }}\n        </li>\n        <ng-template #unlimitedProjects>\n          <li>{{ \"unlimitedProjects\" | i18n }}</li>\n        </ng-template>\n        <li>{{ \"machineAccountsIncluded\" | i18n: serviceAccountsIncluded }}</li>\n        <li *ngIf=\"product != productTypes.Free\">\n          {{\n            \"additionalMachineAccountCost\" | i18n: (monthlyCostPerServiceAccount | currency: \"$\")\n          }}\n        </li>\n      </ul>\n    </div>\n\n    <div class=\"tw-mb-5\">\n      <span *ngIf=\"product != productTypes.Free; else freeForever\">\n        {{ \"costPerUser\" | i18n: (monthlyCostPerUser | currency: \"$\") }} /{{ \"month\" | i18n }}\n      </span>\n      <ng-template #freeForever>\n        <span>{{ \"freeForever\" | i18n }}</span>\n      </ng-template>\n    </div>\n\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"enabled\" />\n      <bit-label>{{ \"subscribeToSecretsManager\" | i18n }}</bit-label>\n      <bit-hint *ngIf=\"upgradeOrganization\">{{ \"addSecretsManagerUpgradeDesc\" | i18n }}</bit-hint>\n    </bit-form-control>\n\n    <ng-container *ngIf=\"formGroup.value.enabled\">\n      <div *ngIf=\"selectedPlan.SecretsManager.hasAdditionalSeatsOption\" class=\"tw-w-1/2\">\n        <bit-form-field>\n          <bit-label>{{ \"userSeats\" | i18n }}</bit-label>\n          <input bitInput formControlName=\"userSeats\" type=\"number\" />\n          <bit-hint>{{ \"userSeatsHowManyDesc\" | i18n }}</bit-hint>\n        </bit-form-field>\n      </div>\n      <div *ngIf=\"selectedPlan.SecretsManager.hasAdditionalServiceAccountOption\" class=\"tw-w-1/2\">\n        <bit-form-field>\n          <bit-label>{{ \"additionalMachineAccounts\" | i18n }}</bit-label>\n          <input bitInput formControlName=\"additionalServiceAccounts\" type=\"number\" />\n          <bit-hint>\n            {{ \"includedMachineAccounts\" | i18n: serviceAccountsIncluded }}\n            {{\n              \"addAdditionalMachineAccounts\" | i18n: (monthlyCostPerServiceAccount | currency: \"$\")\n            }}\n          </bit-hint>\n        </bit-form-field>\n      </div>\n\n      <button *ngIf=\"showSubmitButton\" type=\"submit\" bitButton buttonType=\"primary\" bitFormButton>\n        {{ \"save\" | i18n }}\n      </button>\n    </ng-container>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormGroup, Validators } from \"@angular/forms\";\nimport { Subject, startWith, takeUntil } from \"rxjs\";\n\nimport { ControlsOf } from \"@bitwarden/angular/types/controls-of\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { BillingCustomerDiscount } from \"@bitwarden/common/billing/models/response/organization-subscription.response\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { SecretsManagerLogo } from \"../../layouts/secrets-manager-logo\";\n\nexport interface SecretsManagerSubscription {\n  enabled: boolean;\n  userSeats: number;\n  additionalServiceAccounts: number;\n}\n\nexport const secretsManagerSubscribeFormFactory = (\n  formBuilder: FormBuilder,\n): FormGroup<ControlsOf<SecretsManagerSubscription>> =>\n  formBuilder.group({\n    enabled: [false],\n    userSeats: [1, [Validators.required, Validators.min(1), Validators.max(100000)]],\n    additionalServiceAccounts: [\n      0,\n      [Validators.required, Validators.min(0), Validators.max(100000)],\n    ],\n  });\n\n@Component({\n  selector: \"sm-subscribe\",\n  templateUrl: \"sm-subscribe.component.html\",\n})\nexport class SecretsManagerSubscribeComponent implements OnInit, OnDestroy {\n  @Input() formGroup: FormGroup<ControlsOf<SecretsManagerSubscription>>;\n  @Input() upgradeOrganization: boolean;\n  @Input() showSubmitButton = false;\n  @Input() selectedPlan: PlanResponse;\n  @Input() customerDiscount: BillingCustomerDiscount;\n\n  logo = SecretsManagerLogo;\n  productTypes = ProductTierType;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(private i18nService: I18nService) {}\n\n  ngOnInit() {\n    this.formGroup.controls.enabled.valueChanges\n      .pipe(startWith(this.formGroup.value.enabled), takeUntil(this.destroy$))\n      .subscribe((enabled) => {\n        if (enabled) {\n          this.formGroup.controls.userSeats.enable();\n          this.formGroup.controls.additionalServiceAccounts.enable();\n        } else {\n          this.formGroup.controls.userSeats.disable();\n          this.formGroup.controls.additionalServiceAccounts.disable();\n        }\n      });\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  discountPrice = (price: number) => {\n    const discount =\n      !!this.customerDiscount && this.customerDiscount.active\n        ? price * (this.customerDiscount.percentOff / 100)\n        : 0;\n\n    return price - discount;\n  };\n\n  get product() {\n    return this.selectedPlan.productTier;\n  }\n\n  get planName() {\n    switch (this.product) {\n      case ProductTierType.Free:\n        return this.i18nService.t(\"free2PersonOrganization\");\n      case ProductTierType.Teams:\n      case ProductTierType.TeamsStarter:\n        return this.i18nService.t(\"planNameTeams\");\n      case ProductTierType.Enterprise:\n        return this.i18nService.t(\"planNameEnterprise\");\n    }\n  }\n\n  get serviceAccountsIncluded() {\n    return this.selectedPlan.SecretsManager.baseServiceAccount;\n  }\n\n  get monthlyCostPerServiceAccount() {\n    return this.selectedPlan.isAnnual\n      ? this.discountPrice(this.selectedPlan.SecretsManager.additionalPricePerServiceAccount) / 12\n      : this.discountPrice(this.selectedPlan.SecretsManager.additionalPricePerServiceAccount);\n  }\n\n  get maxUsers() {\n    return this.selectedPlan.SecretsManager.maxSeats;\n  }\n\n  get maxProjects() {\n    return this.selectedPlan.SecretsManager.maxProjects;\n  }\n\n  get monthlyCostPerUser() {\n    return this.selectedPlan.isAnnual\n      ? this.discountPrice(this.selectedPlan.SecretsManager.seatPrice) / 12\n      : this.discountPrice(this.selectedPlan.SecretsManager.seatPrice);\n  }\n}\n","<form [formGroup]=\"taxFormGroup\">\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n    <div class=\"tw-col-span-6\">\n      <bit-form-field>\n        <bit-label>{{ \"country\" | i18n }}</bit-label>\n        <bit-select formControlName=\"country\" autocomplete=\"country\">\n          <bit-option\n            *ngFor=\"let country of countryList\"\n            [value]=\"country.value\"\n            [disabled]=\"country.disabled\"\n            [label]=\"country.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\">\n      <bit-form-field>\n        <bit-label>{{ \"zipPostalCode\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"postalCode\" autocomplete=\"postal-code\" />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\" *ngIf=\"isTaxSupported\">\n      <bit-form-field>\n        <bit-label>{{ \"address1\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"line1\" autocomplete=\"address-line1\" />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\" *ngIf=\"isTaxSupported\">\n      <bit-form-field>\n        <bit-label>{{ \"address2\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"line2\" autocomplete=\"address-line2\" />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\" *ngIf=\"isTaxSupported\">\n      <bit-form-field>\n        <bit-label for=\"addressCity\">{{ \"cityTown\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"city\" autocomplete=\"address-level2\" />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\" *ngIf=\"isTaxSupported\">\n      <bit-form-field>\n        <bit-label>{{ \"stateProvince\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"state\" autocomplete=\"address-level1\" />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\" *ngIf=\"isTaxSupported && showTaxIdField\">\n      <bit-form-field>\n        <bit-label>{{ \"taxIdNumber\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"taxId\" />\n      </bit-form-field>\n    </div>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\nimport { debounceTime } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport { CountryListItem } from \"@bitwarden/common/billing/models/domain\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  selector: \"app-tax-info\",\n  templateUrl: \"tax-info.component.html\",\n  standalone: true,\n  imports: [SharedModule],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class TaxInfoComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  @Input() trialFlow = false;\n  @Output() countryChanged = new EventEmitter();\n  @Output() taxInformationChanged: EventEmitter<void> = new EventEmitter<void>();\n\n  taxFormGroup = new FormGroup({\n    country: new FormControl<string>(null, [Validators.required]),\n    postalCode: new FormControl<string>(null, [Validators.required]),\n    taxId: new FormControl<string>(null),\n    line1: new FormControl<string>(null),\n    line2: new FormControl<string>(null),\n    city: new FormControl<string>(null),\n    state: new FormControl<string>(null),\n  });\n\n  protected isTaxSupported: boolean;\n\n  loading = true;\n  organizationId: string;\n  providerId: string;\n  countryList: CountryListItem[] = this.taxService.getCountries();\n\n  constructor(\n    private apiService: ApiService,\n    private route: ActivatedRoute,\n    private logService: LogService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private taxService: TaxServiceAbstraction,\n  ) {}\n\n  get country(): string {\n    return this.taxFormGroup.controls.country.value;\n  }\n\n  get postalCode(): string {\n    return this.taxFormGroup.controls.postalCode.value;\n  }\n\n  get taxId(): string {\n    return this.taxFormGroup.controls.taxId.value;\n  }\n\n  get line1(): string {\n    return this.taxFormGroup.controls.line1.value;\n  }\n\n  get line2(): string {\n    return this.taxFormGroup.controls.line2.value;\n  }\n\n  get city(): string {\n    return this.taxFormGroup.controls.city.value;\n  }\n\n  get state(): string {\n    return this.taxFormGroup.controls.state.value;\n  }\n\n  get showTaxIdField(): boolean {\n    return !!this.organizationId;\n  }\n\n  async ngOnInit() {\n    // Provider setup\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.subscribe((params) => {\n      this.providerId = params.providerId;\n    });\n\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.parent?.parent?.params.subscribe(async (params) => {\n      this.organizationId = params.organizationId;\n      if (this.organizationId) {\n        try {\n          const taxInfo = await this.organizationApiService.getTaxInfo(this.organizationId);\n          if (taxInfo) {\n            this.taxFormGroup.controls.taxId.setValue(taxInfo.taxId);\n            this.taxFormGroup.controls.state.setValue(taxInfo.state);\n            this.taxFormGroup.controls.line1.setValue(taxInfo.line1);\n            this.taxFormGroup.controls.line2.setValue(taxInfo.line2);\n            this.taxFormGroup.controls.city.setValue(taxInfo.city);\n            this.taxFormGroup.controls.postalCode.setValue(taxInfo.postalCode);\n            this.taxFormGroup.controls.country.setValue(taxInfo.country);\n          }\n        } catch (e) {\n          this.logService.error(e);\n        }\n      } else {\n        try {\n          const taxInfo = await this.apiService.getTaxInfo();\n          if (taxInfo) {\n            this.taxFormGroup.controls.postalCode.setValue(taxInfo.postalCode);\n            this.taxFormGroup.controls.country.setValue(taxInfo.country);\n          }\n        } catch (e) {\n          this.logService.error(e);\n        }\n      }\n\n      this.isTaxSupported = await this.taxService.isCountrySupported(\n        this.taxFormGroup.controls.country.value,\n      );\n\n      this.countryChanged.emit();\n    });\n\n    this.taxFormGroup.controls.country.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe((value) => {\n        this.taxService\n          .isCountrySupported(this.taxFormGroup.controls.country.value)\n          .then((isSupported) => {\n            this.isTaxSupported = isSupported;\n          })\n          .catch(() => {\n            this.isTaxSupported = false;\n          })\n          .finally(() => {\n            if (!this.isTaxSupported) {\n              this.taxFormGroup.controls.taxId.setValue(null);\n              this.taxFormGroup.controls.line1.setValue(null);\n              this.taxFormGroup.controls.line2.setValue(null);\n              this.taxFormGroup.controls.city.setValue(null);\n              this.taxFormGroup.controls.state.setValue(null);\n            }\n\n            this.countryChanged.emit();\n          });\n        this.taxInformationChanged.emit();\n      });\n\n    this.taxFormGroup.controls.postalCode.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.taxInformationChanged.emit();\n      });\n\n    this.taxFormGroup.controls.taxId.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.taxInformationChanged.emit();\n      });\n\n    this.loading = false;\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  submitTaxInfo(): Promise<any> {\n    this.taxFormGroup.updateValueAndValidity();\n    this.taxFormGroup.markAllAsTouched();\n\n    const request = new ExpandedTaxInfoUpdateRequest();\n    request.country = this.country;\n    request.postalCode = this.postalCode;\n    request.taxId = this.taxId;\n    request.line1 = this.line1;\n    request.line2 = this.line2;\n    request.city = this.city;\n    request.state = this.state;\n\n    return this.organizationId\n      ? this.organizationApiService.updateTaxInfo(\n          this.organizationId,\n          request as ExpandedTaxInfoUpdateRequest,\n        )\n      : this.apiService.putTaxInfo(request);\n  }\n}\n","export class VerifyBankAccountRequest {\n  descriptorCode: string;\n\n  constructor(descriptorCode: string) {\n    this.descriptorCode = descriptorCode;\n  }\n}\n","<bit-callout type=\"warning\" title=\"{{ 'verifyBankAccount' | i18n }}\">\n  <p>{{ \"verifyBankAccountWithStatementDescriptorInstructions\" | i18n }}</p>\n  <form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n    <bit-form-field class=\"tw-mr-2 tw-w-48\">\n      <bit-label>{{ \"descriptorCode\" | i18n }}</bit-label>\n      <input bitInput type=\"text\" placeholder=\"SMAB12\" formControlName=\"descriptorCode\" />\n    </bit-form-field>\n    <button *ngIf=\"onSubmit\" type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n      {{ \"submit\" | i18n }}\n    </button>\n  </form>\n</bit-callout>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, Validators } from \"@angular/forms\";\n\nimport { VerifyBankAccountRequest } from \"@bitwarden/common/billing/models/request/verify-bank-account.request\";\n\nimport { SharedModule } from \"../../../shared\";\n\n@Component({\n  selector: \"app-verify-bank-account\",\n  templateUrl: \"./verify-bank-account.component.html\",\n  standalone: true,\n  imports: [SharedModule],\n})\nexport class VerifyBankAccountComponent {\n  @Input() onSubmit?: (request: VerifyBankAccountRequest) => Promise<void>;\n  @Output() submitted = new EventEmitter();\n\n  protected formGroup = this.formBuilder.group({\n    descriptorCode: new FormControl<string>(null, [\n      Validators.required,\n      Validators.minLength(6),\n      Validators.maxLength(6),\n    ]),\n  });\n\n  constructor(private formBuilder: FormBuilder) {}\n\n  submit = async () => {\n    const request = new VerifyBankAccountRequest(this.formGroup.value.descriptorCode);\n    await this.onSubmit?.(request);\n    this.submitted.emit();\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom } from \"rxjs\";\nimport { first, switchMap, takeUntil } from \"rxjs/operators\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive()\nexport abstract class BaseAcceptComponent implements OnInit {\n  loading = true;\n  authed = false;\n  email: string;\n  actionPromise: Promise<any>;\n\n  protected requiredParameters: string[] = [];\n  protected failedShortMessage = \"inviteAcceptFailedShort\";\n  protected failedMessage = \"inviteAcceptFailed\";\n\n  // TODO: remove when email verification flag is removed\n  registerRoute$ = this.registerRouteService.registerRoute$();\n\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    protected router: Router,\n    protected platformUtilService: PlatformUtilsService,\n    protected i18nService: I18nService,\n    protected route: ActivatedRoute,\n    protected authService: AuthService,\n    protected registerRouteService: RegisterRouteService,\n  ) {}\n\n  abstract authedHandler(qParams: Params): Promise<void>;\n  abstract unauthedHandler(qParams: Params): Promise<void>;\n\n  async ngOnInit() {\n    this.route.queryParams\n      .pipe(\n        first(),\n        switchMap(async (qParams) => {\n          let error = this.requiredParameters.some(\n            (e) => qParams?.[e] == null || qParams[e] === \"\",\n          );\n          let errorMessage: string = null;\n          if (!error) {\n            this.email = qParams.email;\n\n            const status = await firstValueFrom(this.authService.activeAccountStatus$);\n            if (status !== AuthenticationStatus.LoggedOut) {\n              try {\n                await this.authedHandler(qParams);\n              } catch (e) {\n                error = true;\n                errorMessage = e.message;\n              }\n            } else {\n              await this.unauthedHandler(qParams);\n            }\n          }\n\n          if (error) {\n            const message =\n              errorMessage != null\n                ? this.i18nService.t(this.failedShortMessage, errorMessage)\n                : this.i18nService.t(this.failedMessage);\n            this.platformUtilService.showToast(\"error\", null, message, { timeout: 10000 });\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.router.navigate([\"/\"]);\n          }\n\n          this.loading = false;\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnDestroy } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\n\nimport { SharedModule } from \"../shared\";\n\ntype SizeTypes = \"xlarge\" | \"large\" | \"default\" | \"small\" | \"xsmall\";\n@Component({\n  selector: \"dynamic-avatar\",\n  standalone: true,\n  imports: [SharedModule],\n  template: `<span [title]=\"title\">\n    <bit-avatar\n      appStopClick\n      [text]=\"text\"\n      [size]=\"size\"\n      [color]=\"color$ | async\"\n      [border]=\"border\"\n      [id]=\"id\"\n      [title]=\"title\"\n    >\n    </bit-avatar>\n  </span>`,\n})\nexport class DynamicAvatarComponent implements OnDestroy {\n  @Input() border = false;\n  @Input() id: string;\n  @Input() text: string;\n  @Input() title: string;\n  @Input() size: SizeTypes = \"default\";\n  private destroy$ = new Subject<void>();\n\n  color$ = this.avatarService.avatarColor$;\n\n  constructor(private avatarService: AvatarService) {\n    if (this.text) {\n      this.text = this.text.toUpperCase();\n    }\n  }\n\n  async ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../app/shared\";\n\nimport { EnvironmentSelectorComponent } from \"./environment-selector.component\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [EnvironmentSelectorComponent],\n  exports: [EnvironmentSelectorComponent],\n})\nexport class EnvironmentSelectorModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { OrganizationDomainResponse } from \"./responses/organization-domain.response\";\n\nexport abstract class OrgDomainServiceAbstraction {\n  orgDomains$: Observable<OrganizationDomainResponse[]>;\n\n  get: (orgDomainId: string) => OrganizationDomainResponse;\n\n  copyDnsTxt: (dnsTxt: string) => void;\n}\n\n// Note: this separate class is designed to hold methods that are not\n// meant to be used in components (e.g., data write methods)\nexport abstract class OrgDomainInternalServiceAbstraction extends OrgDomainServiceAbstraction {\n  upsert: (orgDomains: OrganizationDomainResponse[]) => void;\n  replace: (orgDomains: OrganizationDomainResponse[]) => void;\n  clearCache: () => void;\n  delete: (orgDomainIds: string[]) => void;\n}\n","export enum SsoType {\n  None = 0,\n  OpenIdConnect = 1,\n  Saml2 = 2,\n}\n\nexport enum MemberDecryptionType {\n  MasterPassword = 0,\n  KeyConnector = 1,\n  TrustedDeviceEncryption = 2,\n}\n\nexport enum OpenIdConnectRedirectBehavior {\n  RedirectGet = 0,\n  FormPost = 1,\n}\n\nexport enum Saml2BindingType {\n  HttpRedirect = 1,\n  HttpPost = 2,\n}\n\nexport enum Saml2NameIdFormat {\n  NotConfigured = 0,\n  Unspecified = 1,\n  EmailAddress = 2,\n  X509SubjectName = 3,\n  WindowsDomainQualifiedName = 4,\n  KerberosPrincipalName = 5,\n  EntityIdentifier = 6,\n  Persistent = 7,\n  Transient = 8,\n}\n\nexport enum Saml2SigningBehavior {\n  IfIdpWantAuthnRequestsSigned = 0,\n  Always = 1,\n  Never = 3,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { PaymentMethodType, TransactionType } from \"../../enums\";\n\nexport class BillingResponse extends BaseResponse {\n  balance: number;\n  paymentSource: BillingSourceResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.balance = this.getResponseProperty(\"Balance\");\n    const paymentSource = this.getResponseProperty(\"PaymentSource\");\n    this.paymentSource = paymentSource == null ? null : new BillingSourceResponse(paymentSource);\n  }\n}\n\nexport class BillingSourceResponse extends BaseResponse {\n  type: PaymentMethodType;\n  cardBrand: string;\n  description: string;\n  needsVerification: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.type = this.getResponseProperty(\"Type\");\n    this.cardBrand = this.getResponseProperty(\"CardBrand\");\n    this.description = this.getResponseProperty(\"Description\");\n    this.needsVerification = this.getResponseProperty(\"NeedsVerification\");\n  }\n}\n\nexport class BillingInvoiceResponse extends BaseResponse {\n  id: string;\n  url: string;\n  pdfUrl: string;\n  number: string;\n  paid: boolean;\n  date: string;\n  amount: number;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.url = this.getResponseProperty(\"Url\");\n    this.pdfUrl = this.getResponseProperty(\"PdfUrl\");\n    this.number = this.getResponseProperty(\"Number\");\n    this.paid = this.getResponseProperty(\"Paid\");\n    this.date = this.getResponseProperty(\"Date\");\n    this.amount = this.getResponseProperty(\"Amount\");\n  }\n}\n\nexport class BillingTransactionResponse extends BaseResponse {\n  createdDate: string;\n  amount: number;\n  refunded: boolean;\n  partiallyRefunded: boolean;\n  refundedAmount: number;\n  type: TransactionType;\n  paymentMethodType: PaymentMethodType;\n  details: string;\n\n  constructor(response: any) {\n    super(response);\n    this.createdDate = this.getResponseProperty(\"CreatedDate\");\n    this.amount = this.getResponseProperty(\"Amount\");\n    this.refunded = this.getResponseProperty(\"Refunded\");\n    this.partiallyRefunded = this.getResponseProperty(\"PartiallyRefunded\");\n    this.refundedAmount = this.getResponseProperty(\"RefundedAmount\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.paymentMethodType = this.getResponseProperty(\"PaymentMethodType\");\n    this.details = this.getResponseProperty(\"Details\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { BillingInvoiceResponse, BillingTransactionResponse } from \"./billing.response\";\n\nexport class BillingHistoryResponse extends BaseResponse {\n  invoices: BillingInvoiceResponse[] = [];\n  transactions: BillingTransactionResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n    const transactions = this.getResponseProperty(\"Transactions\");\n    const invoices = this.getResponseProperty(\"Invoices\");\n    if (transactions != null) {\n      this.transactions = transactions.map((t: any) => new BillingTransactionResponse(t));\n    }\n    if (invoices != null) {\n      this.invoices = invoices.map((i: any) => new BillingInvoiceResponse(i));\n    }\n  }\n\n  get hasNoHistory() {\n    return this.invoices.length == 0 && this.transactions.length == 0;\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class ApiKeyResponse extends BaseResponse {\n  apiKey: string;\n  revisionDate: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.apiKey = this.getResponseProperty(\"ApiKey\");\n    this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport {\n  MemberDecryptionType,\n  OpenIdConnectRedirectBehavior,\n  Saml2BindingType,\n  Saml2NameIdFormat,\n  Saml2SigningBehavior,\n  SsoType,\n} from \"../../enums/sso\";\nimport { SsoConfigView } from \"../view/sso-config.view\";\n\nexport class SsoConfigApi extends BaseResponse {\n  static fromView(view: SsoConfigView, api = new SsoConfigApi()) {\n    api.configType = view.configType;\n    api.memberDecryptionType = view.memberDecryptionType;\n\n    api.keyConnectorUrl = view.keyConnectorUrl;\n\n    if (api.configType === SsoType.OpenIdConnect) {\n      api.authority = view.openId.authority;\n      api.clientId = view.openId.clientId;\n      api.clientSecret = view.openId.clientSecret;\n      api.metadataAddress = view.openId.metadataAddress;\n      api.redirectBehavior = view.openId.redirectBehavior;\n      api.getClaimsFromUserInfoEndpoint = view.openId.getClaimsFromUserInfoEndpoint;\n      api.additionalScopes = view.openId.additionalScopes;\n      api.additionalUserIdClaimTypes = view.openId.additionalUserIdClaimTypes;\n      api.additionalEmailClaimTypes = view.openId.additionalEmailClaimTypes;\n      api.additionalNameClaimTypes = view.openId.additionalNameClaimTypes;\n      api.acrValues = view.openId.acrValues;\n      api.expectedReturnAcrValue = view.openId.expectedReturnAcrValue;\n    } else if (api.configType === SsoType.Saml2) {\n      api.spUniqueEntityId = view.saml.spUniqueEntityId;\n      api.spNameIdFormat = view.saml.spNameIdFormat;\n      api.spOutboundSigningAlgorithm = view.saml.spOutboundSigningAlgorithm;\n      api.spSigningBehavior = view.saml.spSigningBehavior;\n      api.spMinIncomingSigningAlgorithm = view.saml.spMinIncomingSigningAlgorithm;\n      api.spWantAssertionsSigned = view.saml.spWantAssertionsSigned;\n      api.spValidateCertificates = view.saml.spValidateCertificates;\n\n      api.idpEntityId = view.saml.idpEntityId;\n      api.idpBindingType = view.saml.idpBindingType;\n      api.idpSingleSignOnServiceUrl = view.saml.idpSingleSignOnServiceUrl;\n      api.idpSingleLogoutServiceUrl = view.saml.idpSingleLogoutServiceUrl;\n      api.idpX509PublicCert = view.saml.idpX509PublicCert;\n      api.idpOutboundSigningAlgorithm = view.saml.idpOutboundSigningAlgorithm;\n      api.idpAllowUnsolicitedAuthnResponse = view.saml.idpAllowUnsolicitedAuthnResponse;\n      api.idpWantAuthnRequestsSigned = view.saml.idpWantAuthnRequestsSigned;\n\n      // Value is inverted in the api model (disable instead of allow)\n      api.idpDisableOutboundLogoutRequests = !view.saml.idpAllowOutboundLogoutRequests;\n    }\n\n    return api;\n  }\n  configType: SsoType;\n  memberDecryptionType: MemberDecryptionType;\n\n  keyConnectorUrl: string;\n\n  // OpenId\n  authority: string;\n  clientId: string;\n  clientSecret: string;\n  metadataAddress: string;\n  redirectBehavior: OpenIdConnectRedirectBehavior;\n  getClaimsFromUserInfoEndpoint: boolean;\n  additionalScopes: string;\n  additionalUserIdClaimTypes: string;\n  additionalEmailClaimTypes: string;\n  additionalNameClaimTypes: string;\n  acrValues: string;\n  expectedReturnAcrValue: string;\n\n  // SAML\n  spUniqueEntityId: boolean;\n  spNameIdFormat: Saml2NameIdFormat;\n  spOutboundSigningAlgorithm: string;\n  spSigningBehavior: Saml2SigningBehavior;\n  spMinIncomingSigningAlgorithm: string;\n  spWantAssertionsSigned: boolean;\n  spValidateCertificates: boolean;\n\n  idpEntityId: string;\n  idpBindingType: Saml2BindingType;\n  idpSingleSignOnServiceUrl: string;\n  idpSingleLogoutServiceUrl: string;\n  idpX509PublicCert: string;\n  idpOutboundSigningAlgorithm: string;\n  idpAllowUnsolicitedAuthnResponse: boolean;\n  idpDisableOutboundLogoutRequests: boolean;\n  idpWantAuthnRequestsSigned: boolean;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n\n    this.configType = this.getResponseProperty(\"ConfigType\");\n    this.memberDecryptionType = this.getResponseProperty(\"MemberDecryptionType\");\n\n    this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n\n    this.authority = this.getResponseProperty(\"Authority\");\n    this.clientId = this.getResponseProperty(\"ClientId\");\n    this.clientSecret = this.getResponseProperty(\"ClientSecret\");\n    this.metadataAddress = this.getResponseProperty(\"MetadataAddress\");\n    this.redirectBehavior = this.getResponseProperty(\"RedirectBehavior\");\n    this.getClaimsFromUserInfoEndpoint = this.getResponseProperty(\"GetClaimsFromUserInfoEndpoint\");\n    this.additionalScopes = this.getResponseProperty(\"AdditionalScopes\");\n    this.additionalUserIdClaimTypes = this.getResponseProperty(\"AdditionalUserIdClaimTypes\");\n    this.additionalEmailClaimTypes = this.getResponseProperty(\"AdditionalEmailClaimTypes\");\n    this.additionalNameClaimTypes = this.getResponseProperty(\"AdditionalNameClaimTypes\");\n    this.acrValues = this.getResponseProperty(\"AcrValues\");\n    this.expectedReturnAcrValue = this.getResponseProperty(\"ExpectedReturnAcrValue\");\n\n    this.spUniqueEntityId = this.getResponseProperty(\"SpUniqueEntityId\");\n    this.spNameIdFormat = this.getResponseProperty(\"SpNameIdFormat\");\n    this.spOutboundSigningAlgorithm = this.getResponseProperty(\"SpOutboundSigningAlgorithm\");\n    this.spSigningBehavior = this.getResponseProperty(\"SpSigningBehavior\");\n    this.spMinIncomingSigningAlgorithm = this.getResponseProperty(\"SpMinIncomingSigningAlgorithm\");\n    this.spWantAssertionsSigned = this.getResponseProperty(\"SpWantAssertionsSigned\");\n    this.spValidateCertificates = this.getResponseProperty(\"SpValidateCertificates\");\n\n    this.idpEntityId = this.getResponseProperty(\"IdpEntityId\");\n    this.idpBindingType = this.getResponseProperty(\"IdpBindingType\");\n    this.idpSingleSignOnServiceUrl = this.getResponseProperty(\"IdpSingleSignOnServiceUrl\");\n    this.idpSingleLogoutServiceUrl = this.getResponseProperty(\"IdpSingleLogoutServiceUrl\");\n    this.idpX509PublicCert = this.getResponseProperty(\"IdpX509PublicCert\");\n    this.idpOutboundSigningAlgorithm = this.getResponseProperty(\"IdpOutboundSigningAlgorithm\");\n    this.idpAllowUnsolicitedAuthnResponse = this.getResponseProperty(\n      \"IdpAllowUnsolicitedAuthnResponse\",\n    );\n    this.idpDisableOutboundLogoutRequests = this.getResponseProperty(\n      \"IdpDisableOutboundLogoutRequests\",\n    );\n    this.idpWantAuthnRequestsSigned = this.getResponseProperty(\"IdpWantAuthnRequestsSigned\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { SsoConfigApi } from \"../api/sso-config.api\";\n\nexport class OrganizationSsoResponse extends BaseResponse {\n  enabled: boolean;\n  identifier: string;\n  data: SsoConfigApi;\n  urls: SsoUrls;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.identifier = this.getResponseProperty(\"Identifier\");\n    this.data =\n      this.getResponseProperty(\"Data\") != null\n        ? new SsoConfigApi(this.getResponseProperty(\"Data\"))\n        : null;\n    this.urls = new SsoUrls(this.getResponseProperty(\"Urls\"));\n  }\n}\n\nclass SsoUrls extends BaseResponse {\n  callbackPath: string;\n  signedOutCallbackPath: string;\n  spEntityId: string;\n  spEntityIdStatic: string;\n  spMetadataUrl: string;\n  spAcsUrl: string;\n\n  constructor(response: any) {\n    super(response);\n    this.callbackPath = this.getResponseProperty(\"CallbackPath\");\n    this.signedOutCallbackPath = this.getResponseProperty(\"SignedOutCallbackPath\");\n    this.spEntityId = this.getResponseProperty(\"SpEntityId\");\n    this.spEntityIdStatic = this.getResponseProperty(\"SpEntityIdStatic\");\n    this.spMetadataUrl = this.getResponseProperty(\"SpMetadataUrl\");\n    this.spAcsUrl = this.getResponseProperty(\"SpAcsUrl\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { ProfileResponse } from \"../../../models/response/profile.response\";\n\nexport class PaymentResponse extends BaseResponse {\n  userProfile: ProfileResponse;\n  paymentIntentClientSecret: string;\n  success: boolean;\n\n  constructor(response: any) {\n    super(response);\n    const userProfile = this.getResponseProperty(\"UserProfile\");\n    if (userProfile != null) {\n      this.userProfile = new ProfileResponse(userProfile);\n    }\n    this.paymentIntentClientSecret = this.getResponseProperty(\"PaymentIntentClientSecret\");\n    this.success = this.getResponseProperty(\"Success\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TaxInfoResponse extends BaseResponse {\n  taxId: string;\n  taxIdType: string;\n  line1: string;\n  line2: string;\n  city: string;\n  state: string;\n  country: string;\n  postalCode: string;\n\n  constructor(response: any) {\n    super(response);\n    this.taxId = this.getResponseProperty(\"TaxIdNumber\");\n    if (!this.taxId) {\n      this.taxId = this.getResponseProperty(\"TaxId\");\n    }\n    this.taxIdType = this.getResponseProperty(\"TaxIdType\");\n    this.line1 = this.getResponseProperty(\"Line1\");\n    this.line2 = this.getResponseProperty(\"Line2\");\n    this.city = this.getResponseProperty(\"City\");\n    this.state = this.getResponseProperty(\"State\");\n    this.postalCode = this.getResponseProperty(\"PostalCode\");\n    this.country = this.getResponseProperty(\"Country\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationApiKeyType } from \"../../enums\";\n\nexport class OrganizationApiKeyInformationResponse extends BaseResponse {\n  keyType: OrganizationApiKeyType;\n\n  constructor(response: any) {\n    super(response);\n    this.keyType = this.getResponseProperty(\"KeyType\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationAutoEnrollStatusResponse extends BaseResponse {\n  id: string;\n  resetPasswordEnabled: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.resetPasswordEnabled = this.getResponseProperty(\"ResetPasswordEnabled\");\n  }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class KeysResponse extends BaseResponse {\n  privateKey: string;\n  publicKey: string;\n\n  constructor(response: any) {\n    super(response);\n    this.privateKey = this.getResponseProperty(\"PrivateKey\");\n    this.publicKey = this.getResponseProperty(\"PublicKey\");\n  }\n}\n","import { KeysResponse } from \"../../../models/response/keys.response\";\n\nexport class OrganizationKeysResponse extends KeysResponse {\n  constructor(response: any) {\n    super(response);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable, firstValueFrom } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { ORGANIZATIONS_DISK, StateProvider, UserKeyDefinition } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { InternalOrganizationServiceAbstraction } from \"../../abstractions/organization/organization.service.abstraction\";\nimport { OrganizationData } from \"../../models/data/organization.data\";\nimport { Organization } from \"../../models/domain/organization\";\n\n/**\n * The `KeyDefinition` for accessing organization lists in application state.\n * @todo Ideally this wouldn't require a `fromJSON()` call, but `OrganizationData`\n * has some properties that contain functions. This should probably get\n * cleaned up.\n */\nexport const ORGANIZATIONS = UserKeyDefinition.record<OrganizationData>(\n  ORGANIZATIONS_DISK,\n  \"organizations\",\n  {\n    deserializer: (obj: Jsonify<OrganizationData>) => OrganizationData.fromJSON(obj),\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * Filter out organizations from an observable that __do not__ offer a\n * families-for-enterprise sponsorship to members.\n * @returns a function that can be used in `Observable<Organization[]>` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToExcludeOrganizationsWithoutFamilySponsorshipSupport() {\n  return map<Organization[], Organization[]>((orgs) => orgs.filter((o) => o.canManageSponsorships));\n}\n\n/**\n * Filter out organizations from an observable that the organization user\n * __is not__ a direct member of. This will exclude organizations only\n * accessible as a provider.\n * @returns a function that can be used in `Observable<Organization[]>` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToExcludeProviderOrganizations() {\n  return map<Organization[], Organization[]>((orgs) => orgs.filter((o) => o.isMember));\n}\n\n/**\n * Map an observable stream of organizations down to a boolean indicating\n * if any organizations exist (`orgs.length > 0`).\n * @returns a function that can be used in `Observable<Organization[]>` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToBooleanHasAnyOrganizations() {\n  return map<Organization[], boolean>((orgs) => orgs.length > 0);\n}\n\n/**\n * Map an observable stream of organizations down to a single organization.\n * @param `organizationId` The ID of the organization you'd like to subscribe to\n * @returns a function that can be used in `Observable<Organization[]>` pipes,\n * like `organizationService.organizations$`\n */\nfunction mapToSingleOrganization(organizationId: string) {\n  return map<Organization[], Organization>((orgs) => orgs?.find((o) => o.id === organizationId));\n}\n\nexport class OrganizationService implements InternalOrganizationServiceAbstraction {\n  organizations$: Observable<Organization[]> = this.getOrganizationsFromState$();\n  memberOrganizations$: Observable<Organization[]> = this.organizations$.pipe(\n    mapToExcludeProviderOrganizations(),\n  );\n\n  constructor(private stateProvider: StateProvider) {}\n\n  get$(id: string): Observable<Organization | undefined> {\n    return this.organizations$.pipe(mapToSingleOrganization(id));\n  }\n\n  getAll$(userId?: UserId): Observable<Organization[]> {\n    return this.getOrganizationsFromState$(userId);\n  }\n\n  async getAll(userId?: string): Promise<Organization[]> {\n    return await firstValueFrom(this.getOrganizationsFromState$(userId as UserId));\n  }\n\n  canManageSponsorships$ = this.organizations$.pipe(\n    mapToExcludeOrganizationsWithoutFamilySponsorshipSupport(),\n    mapToBooleanHasAnyOrganizations(),\n  );\n\n  familySponsorshipAvailable$ = this.organizations$.pipe(\n    map((orgs) => orgs.some((o) => o.familySponsorshipAvailable)),\n  );\n\n  async hasOrganizations(): Promise<boolean> {\n    return await firstValueFrom(this.organizations$.pipe(mapToBooleanHasAnyOrganizations()));\n  }\n\n  async upsert(organization: OrganizationData, userId?: UserId): Promise<void> {\n    await this.stateFor(userId).update((existingOrganizations) => {\n      const organizations = existingOrganizations ?? {};\n      organizations[organization.id] = organization;\n      return organizations;\n    });\n  }\n\n  async get(id: string): Promise<Organization> {\n    return await firstValueFrom(this.organizations$.pipe(mapToSingleOrganization(id)));\n  }\n\n  /**\n   * @deprecated For the CLI only\n   * @param id id of the organization\n   */\n  async getFromState(id: string): Promise<Organization> {\n    return await firstValueFrom(this.organizations$.pipe(mapToSingleOrganization(id)));\n  }\n\n  async replace(organizations: { [id: string]: OrganizationData }, userId?: UserId): Promise<void> {\n    await this.stateFor(userId).update(() => organizations);\n  }\n\n  // Ideally this method would be renamed to organizations$() and the\n  // $organizations observable as it stands would be removed. This will\n  // require updates to callers, and so this method exists as a temporary\n  // workaround until we have time & a plan to update callers.\n  //\n  // It can be thought of as \"organizations$ but with a userId option\".\n  private getOrganizationsFromState$(userId?: UserId): Observable<Organization[] | undefined> {\n    return this.stateFor(userId).state$.pipe(this.mapOrganizationRecordToArray());\n  }\n\n  /**\n   * Accepts a record of `OrganizationData`, which is how we store the\n   * organization list as a JSON object on disk, to an array of\n   * `Organization`, which is how the data is published to callers of the\n   * service.\n   * @returns a function that can be used to pipe organization data from\n   * stored state to an exposed object easily consumable by others.\n   */\n  private mapOrganizationRecordToArray() {\n    return map<Record<string, OrganizationData>, Organization[]>((orgs) =>\n      Object.values(orgs ?? {})?.map((o) => new Organization(o)),\n    );\n  }\n\n  /**\n   * Fetches the organization list from on disk state for the specified user.\n   * @param userId the user ID to fetch the organization list for. Defaults to\n   * the currently active user.\n   * @returns an observable of organization state as it is stored on disk.\n   */\n  private stateFor(userId?: UserId) {\n    return userId\n      ? this.stateProvider.getUser(userId, ORGANIZATIONS)\n      : this.stateProvider.getActive(ORGANIZATIONS);\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationDomainSsoDetailsResponse extends BaseResponse {\n  id: string;\n  organizationIdentifier: string;\n  ssoAvailable: boolean;\n  domainName: string;\n  verifiedDate?: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"id\");\n    this.organizationIdentifier = this.getResponseProperty(\"organizationIdentifier\");\n    this.ssoAvailable = this.getResponseProperty(\"ssoAvailable\");\n    this.domainName = this.getResponseProperty(\"domainName\");\n    this.verifiedDate = this.getResponseProperty(\"verifiedDate\");\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class OrganizationDomainResponse extends BaseResponse {\n  id: string;\n  organizationId: string;\n  txt: string;\n  domainName: string;\n  creationDate: string;\n  nextRunDate: string;\n  jobRunCount: number;\n  verifiedDate?: string;\n  lastCheckedDate?: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"id\");\n    this.organizationId = this.getResponseProperty(\"organizationId\");\n    this.txt = this.getResponseProperty(\"txt\");\n    this.domainName = this.getResponseProperty(\"domainName\");\n    this.creationDate = this.getResponseProperty(\"creationDate\");\n    this.nextRunDate = this.getResponseProperty(\"nextRunDate\");\n    this.jobRunCount = this.getResponseProperty(\"jobRunCount\");\n    this.verifiedDate = this.getResponseProperty(\"verifiedDate\");\n    this.lastCheckedDate = this.getResponseProperty(\"lastCheckedDate\");\n  }\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class VerifiedOrganizationDomainSsoDetailsResponse extends BaseResponse {\n  organizationName: string;\n  organizationIdentifier: string;\n  domainName: string;\n\n  constructor(response: any) {\n    super(response);\n\n    this.organizationName = this.getResponseProperty(\"organizationName\");\n    this.organizationIdentifier = this.getResponseProperty(\"organizationIdentifier\");\n    this.domainName = this.getResponseProperty(\"domainName\");\n  }\n}\n","export class OrganizationDomainSsoDetailsRequest {\n  constructor(public email: string) {}\n}\n","import { map } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport {\n  ORGANIZATION_MANAGEMENT_PREFERENCES_DISK,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../../platform/state\";\nimport {\n  OrganizationManagementPreference,\n  OrganizationManagementPreferencesService,\n} from \"../../abstractions/organization-management-preferences/organization-management-preferences.service\";\n\n/**\n * This helper function can be used to quickly create `KeyDefinitions` that\n * target the `ORGANIZATION_MANAGEMENT_PREFERENCES_DISK` `StateDefinition`\n * and that have the default deserializer and `clearOn` options. Any\n * contenders for options to add to this service will likely use these same\n * options.\n */\nfunction buildKeyDefinition<T>(key: string): UserKeyDefinition<T> {\n  return new UserKeyDefinition<T>(ORGANIZATION_MANAGEMENT_PREFERENCES_DISK, key, {\n    deserializer: (obj: Jsonify<T>) => obj as T,\n    clearOn: [\"logout\"],\n  });\n}\n\nexport const AUTO_CONFIRM_FINGERPRINTS = buildKeyDefinition<boolean>(\"autoConfirmFingerPrints\");\n\nexport class DefaultOrganizationManagementPreferencesService\n  implements OrganizationManagementPreferencesService\n{\n  constructor(private stateProvider: StateProvider) {}\n\n  autoConfirmFingerPrints = this.buildOrganizationManagementPreference(\n    AUTO_CONFIRM_FINGERPRINTS,\n    false,\n  );\n\n  /**\n   * Returns an `OrganizationManagementPreference` object for the provided\n   * `KeyDefinition`. This object can then be used by callers to subscribe to\n   * a given key, or set its value in state.\n   */\n  private buildOrganizationManagementPreference<T>(\n    keyDefinition: UserKeyDefinition<T>,\n    defaultValue: T,\n  ) {\n    return new OrganizationManagementPreference<T>(\n      this.getKeyFromState(keyDefinition).state$.pipe(map((x) => x ?? defaultValue)),\n      this.setKeyInStateFn(keyDefinition),\n    );\n  }\n\n  /**\n   * Returns the full `ActiveUserState` value for a given `keyDefinition`\n   * The returned value can then be called for subscription || set operations\n   */\n  private getKeyFromState<T>(keyDefinition: UserKeyDefinition<T>) {\n    return this.stateProvider.getActive(keyDefinition);\n  }\n\n  /**\n   * Returns a function that can be called to set the given `keyDefinition` in state\n   */\n  private setKeyInStateFn<T>(keyDefinition: UserKeyDefinition<T>) {\n    return async (value: T) => {\n      await this.getKeyFromState(keyDefinition).update(() => value);\n    };\n  }\n}\n","import Domain from \"../../../platform/models/domain/domain-base\";\n\nexport class ResetPasswordPolicyOptions extends Domain {\n  autoEnrollEnabled = false;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { combineLatest, firstValueFrom, map, Observable, of } from \"rxjs\";\n\nimport { UserKeyDefinition, POLICIES_DISK, StateProvider } from \"../../../platform/state\";\nimport { PolicyId, UserId } from \"../../../types/guid\";\nimport { OrganizationService } from \"../../abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService as InternalPolicyServiceAbstraction } from \"../../abstractions/policy/policy.service.abstraction\";\nimport { OrganizationUserStatusType, PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Organization } from \"../../models/domain/organization\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { ResetPasswordPolicyOptions } from \"../../models/domain/reset-password-policy-options\";\n\nconst policyRecordToArray = (policiesMap: { [id: string]: PolicyData }) =>\n  Object.values(policiesMap || {}).map((f) => new Policy(f));\n\nexport const POLICIES = UserKeyDefinition.record<PolicyData, PolicyId>(POLICIES_DISK, \"policies\", {\n  deserializer: (policyData) => policyData,\n  clearOn: [\"logout\"],\n});\n\nexport class PolicyService implements InternalPolicyServiceAbstraction {\n  private activeUserPolicyState = this.stateProvider.getActive(POLICIES);\n  private activeUserPolicies$ = this.activeUserPolicyState.state$.pipe(\n    map((policyData) => policyRecordToArray(policyData)),\n  );\n\n  policies$ = this.activeUserPolicies$;\n\n  constructor(\n    private stateProvider: StateProvider,\n    private organizationService: OrganizationService,\n  ) {}\n\n  get$(policyType: PolicyType): Observable<Policy> {\n    const filteredPolicies$ = this.activeUserPolicies$.pipe(\n      map((policies) => policies.filter((p) => p.type === policyType)),\n    );\n\n    return combineLatest([filteredPolicies$, this.organizationService.organizations$]).pipe(\n      map(\n        ([policies, organizations]) =>\n          this.enforcedPolicyFilter(policies, organizations)?.at(0) ?? null,\n      ),\n    );\n  }\n\n  getAll$(policyType: PolicyType, userId?: UserId) {\n    const filteredPolicies$ = this.stateProvider.getUserState$(POLICIES, userId).pipe(\n      map((policyData) => policyRecordToArray(policyData)),\n      map((policies) => policies.filter((p) => p.type === policyType)),\n    );\n\n    return combineLatest([filteredPolicies$, this.organizationService.getAll$(userId)]).pipe(\n      map(([policies, organizations]) => this.enforcedPolicyFilter(policies, organizations)),\n    );\n  }\n\n  async getAll(policyType: PolicyType) {\n    return await firstValueFrom(\n      this.policies$.pipe(map((policies) => policies.filter((p) => p.type === policyType))),\n    );\n  }\n\n  policyAppliesToActiveUser$(policyType: PolicyType) {\n    return this.get$(policyType).pipe(map((policy) => policy != null));\n  }\n\n  async policyAppliesToUser(policyType: PolicyType) {\n    return await firstValueFrom(this.policyAppliesToActiveUser$(policyType));\n  }\n\n  private enforcedPolicyFilter(policies: Policy[], organizations: Organization[]) {\n    const orgDict = Object.fromEntries(organizations.map((o) => [o.id, o]));\n    return policies.filter((policy) => {\n      const organization = orgDict[policy.organizationId];\n\n      // This shouldn't happen, i.e. the user should only have policies for orgs they are a member of\n      // But if it does, err on the side of enforcing the policy\n      if (organization == null) {\n        return true;\n      }\n\n      return (\n        policy.enabled &&\n        organization.status >= OrganizationUserStatusType.Accepted &&\n        organization.usePolicies &&\n        !this.isExemptFromPolicy(policy.type, organization)\n      );\n    });\n  }\n\n  masterPasswordPolicyOptions$(policies?: Policy[]): Observable<MasterPasswordPolicyOptions> {\n    const observable = policies ? of(policies) : this.policies$;\n    return observable.pipe(\n      map((obsPolicies) => {\n        let enforcedOptions: MasterPasswordPolicyOptions = null;\n        const filteredPolicies = obsPolicies.filter((p) => p.type === PolicyType.MasterPassword);\n\n        if (filteredPolicies == null || filteredPolicies.length === 0) {\n          return enforcedOptions;\n        }\n\n        filteredPolicies.forEach((currentPolicy) => {\n          if (!currentPolicy.enabled || currentPolicy.data == null) {\n            return;\n          }\n\n          if (enforcedOptions == null) {\n            enforcedOptions = new MasterPasswordPolicyOptions();\n          }\n\n          if (\n            currentPolicy.data.minComplexity != null &&\n            currentPolicy.data.minComplexity > enforcedOptions.minComplexity\n          ) {\n            enforcedOptions.minComplexity = currentPolicy.data.minComplexity;\n          }\n\n          if (\n            currentPolicy.data.minLength != null &&\n            currentPolicy.data.minLength > enforcedOptions.minLength\n          ) {\n            enforcedOptions.minLength = currentPolicy.data.minLength;\n          }\n\n          if (currentPolicy.data.requireUpper) {\n            enforcedOptions.requireUpper = true;\n          }\n\n          if (currentPolicy.data.requireLower) {\n            enforcedOptions.requireLower = true;\n          }\n\n          if (currentPolicy.data.requireNumbers) {\n            enforcedOptions.requireNumbers = true;\n          }\n\n          if (currentPolicy.data.requireSpecial) {\n            enforcedOptions.requireSpecial = true;\n          }\n\n          if (currentPolicy.data.enforceOnLogin) {\n            enforcedOptions.enforceOnLogin = true;\n          }\n        });\n\n        return enforcedOptions;\n      }),\n    );\n  }\n\n  evaluateMasterPassword(\n    passwordStrength: number,\n    newPassword: string,\n    enforcedPolicyOptions: MasterPasswordPolicyOptions,\n  ): boolean {\n    if (enforcedPolicyOptions == null) {\n      return true;\n    }\n\n    if (\n      enforcedPolicyOptions.minComplexity > 0 &&\n      enforcedPolicyOptions.minComplexity > passwordStrength\n    ) {\n      return false;\n    }\n\n    if (\n      enforcedPolicyOptions.minLength > 0 &&\n      enforcedPolicyOptions.minLength > newPassword.length\n    ) {\n      return false;\n    }\n\n    if (enforcedPolicyOptions.requireUpper && newPassword.toLocaleLowerCase() === newPassword) {\n      return false;\n    }\n\n    if (enforcedPolicyOptions.requireLower && newPassword.toLocaleUpperCase() === newPassword) {\n      return false;\n    }\n\n    if (enforcedPolicyOptions.requireNumbers && !/[0-9]/.test(newPassword)) {\n      return false;\n    }\n\n    // eslint-disable-next-line\n    if (enforcedPolicyOptions.requireSpecial && !/[!@#$%\\^&*]/g.test(newPassword)) {\n      return false;\n    }\n\n    return true;\n  }\n\n  getResetPasswordPolicyOptions(\n    policies: Policy[],\n    orgId: string,\n  ): [ResetPasswordPolicyOptions, boolean] {\n    const resetPasswordPolicyOptions = new ResetPasswordPolicyOptions();\n\n    if (policies == null || orgId == null) {\n      return [resetPasswordPolicyOptions, false];\n    }\n\n    const policy = policies.find(\n      (p) => p.organizationId === orgId && p.type === PolicyType.ResetPassword && p.enabled,\n    );\n    resetPasswordPolicyOptions.autoEnrollEnabled = policy?.data?.autoEnrollEnabled ?? false;\n\n    return [resetPasswordPolicyOptions, policy?.enabled ?? false];\n  }\n\n  async upsert(policy: PolicyData): Promise<void> {\n    await this.activeUserPolicyState.update((policies) => {\n      policies ??= {};\n      policies[policy.id] = policy;\n      return policies;\n    });\n  }\n\n  async replace(policies: { [id: string]: PolicyData }, userId: UserId): Promise<void> {\n    await this.stateProvider.setUserState(POLICIES, policies, userId);\n  }\n\n  /**\n   * Determines whether an orgUser is exempt from a specific policy because of their role\n   * Generally orgUsers who can manage policies are exempt from them, but some policies are stricter\n   */\n  private isExemptFromPolicy(policyType: PolicyType, organization: Organization) {\n    switch (policyType) {\n      case PolicyType.MaximumVaultTimeout:\n        // Max Vault Timeout applies to everyone except owners\n        return organization.isOwner;\n      case PolicyType.PasswordGenerator:\n        // password generation policy applies to everyone\n        return false;\n      case PolicyType.PersonalOwnership:\n        // individual vault policy applies to everyone except admins and owners\n        return organization.isAdmin;\n      case PolicyType.FreeFamiliesSponsorshipPolicy:\n        // free Bitwarden families policy applies to everyone\n        return false;\n      default:\n        return organization.canManagePolicies;\n    }\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { ProviderType } from \"../../../enums\";\n\nexport class ProviderResponse extends BaseResponse {\n  id: string;\n  name: string;\n  businessName: string;\n  billingEmail: string;\n  creationDate: Date;\n  type: ProviderType;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.businessName = this.getResponseProperty(\"BusinessName\");\n    this.billingEmail = this.getResponseProperty(\"BillingEmail\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.type = this.getResponseProperty(\"Type\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ProviderStatusType, ProviderUserStatusType, ProviderUserType } from \"../../enums\";\nimport { ProviderData } from \"../data/provider.data\";\n\nexport class Provider {\n  id: string;\n  name: string;\n  status: ProviderUserStatusType;\n  type: ProviderUserType;\n  enabled: boolean;\n  userId: string;\n  useEvents: boolean;\n  providerStatus: ProviderStatusType;\n\n  constructor(obj?: ProviderData) {\n    if (obj == null) {\n      return;\n    }\n\n    this.id = obj.id;\n    this.name = obj.name;\n    this.status = obj.status;\n    this.type = obj.type;\n    this.enabled = obj.enabled;\n    this.userId = obj.userId;\n    this.useEvents = obj.useEvents;\n    this.providerStatus = obj.providerStatus;\n  }\n\n  get canAccess() {\n    if (this.isProviderAdmin) {\n      return true;\n    }\n    return this.enabled && this.status === ProviderUserStatusType.Confirmed;\n  }\n\n  get canCreateOrganizations() {\n    return this.enabled && this.isProviderAdmin;\n  }\n\n  get canManageUsers() {\n    return this.isProviderAdmin;\n  }\n\n  get canAccessEventLogs() {\n    return this.isProviderAdmin;\n  }\n\n  get isProviderAdmin() {\n    return this.type === ProviderUserType.ProviderAdmin;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map, Observable, of, switchMap, take } from \"rxjs\";\n\nimport { PROVIDERS_DISK, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { ProviderService as ProviderServiceAbstraction } from \"../abstractions/provider.service\";\nimport { ProviderData } from \"../models/data/provider.data\";\nimport { Provider } from \"../models/domain/provider\";\n\nexport const PROVIDERS = UserKeyDefinition.record<ProviderData>(PROVIDERS_DISK, \"providers\", {\n  deserializer: (obj: ProviderData) => obj,\n  clearOn: [\"logout\"],\n});\n\nfunction mapToSingleProvider(providerId: string) {\n  return map<Provider[], Provider>((providers) => providers?.find((p) => p.id === providerId));\n}\n\nexport class ProviderService implements ProviderServiceAbstraction {\n  constructor(private stateProvider: StateProvider) {}\n\n  private providers$(userId?: UserId): Observable<Provider[] | undefined> {\n    // FIXME: Can be replaced with `getUserStateOrDefault$` if we weren't trying to pick this.\n    return (\n      userId != null\n        ? this.stateProvider.getUser(userId, PROVIDERS).state$\n        : this.stateProvider.activeUserId$.pipe(\n            take(1),\n            switchMap((userId) =>\n              userId != null ? this.stateProvider.getUser(userId, PROVIDERS).state$ : of(null),\n            ),\n          )\n    ).pipe(this.mapProviderRecordToArray());\n  }\n\n  private mapProviderRecordToArray() {\n    return map<Record<string, ProviderData>, Provider[]>((providers) =>\n      Object.values(providers ?? {})?.map((o) => new Provider(o)),\n    );\n  }\n\n  get$(id: string): Observable<Provider> {\n    return this.providers$().pipe(mapToSingleProvider(id));\n  }\n\n  async get(id: string): Promise<Provider> {\n    return await firstValueFrom(this.providers$().pipe(mapToSingleProvider(id)));\n  }\n\n  async getAll(): Promise<Provider[]> {\n    return await firstValueFrom(this.providers$());\n  }\n\n  async save(providers: { [id: string]: ProviderData }, userId?: UserId) {\n    await this.stateProvider.setUserState(PROVIDERS, providers, userId);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\n\nexport abstract class UserVerificationApiServiceAbstraction {\n  postAccountVerifyOTP: (request: VerifyOTPRequest) => Promise<void>;\n  postAccountRequestOTP: () => Promise<void>;\n  postAccountVerifyPassword: (\n    request: SecretVerificationRequest,\n  ) => Promise<MasterPasswordPolicyResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CredentialAssertionOptionsResponse } from \"../../services/webauthn-login/response/credential-assertion-options.response\";\n\nexport class WebAuthnLoginApiServiceAbstraction {\n  getCredentialAssertionOptions: () => Promise<CredentialAssertionOptionsResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  combineLatestWith,\n  map,\n  distinctUntilChanged,\n  shareReplay,\n  combineLatest,\n  Observable,\n} from \"rxjs\";\n\nimport {\n  Account,\n  AccountInfo,\n  InternalAccountService,\n  accountInfoEqual,\n} from \"../../auth/abstractions/account.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { MessagingService } from \"../../platform/abstractions/messaging.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport {\n  ACCOUNT_DISK,\n  GlobalState,\n  GlobalStateProvider,\n  KeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\n\nexport const ACCOUNT_ACCOUNTS = KeyDefinition.record<AccountInfo, UserId>(\n  ACCOUNT_DISK,\n  \"accounts\",\n  {\n    deserializer: (accountInfo) => accountInfo,\n  },\n);\n\nexport const ACCOUNT_ACTIVE_ACCOUNT_ID = new KeyDefinition(ACCOUNT_DISK, \"activeAccountId\", {\n  deserializer: (id: UserId) => id,\n});\n\nexport const ACCOUNT_ACTIVITY = KeyDefinition.record<Date, UserId>(ACCOUNT_DISK, \"activity\", {\n  deserializer: (activity) => new Date(activity),\n});\n\nconst LOGGED_OUT_INFO: AccountInfo = {\n  email: \"\",\n  emailVerified: false,\n  name: undefined,\n};\n\n/**\n * An rxjs map operator that extracts the UserId from an account, or throws if the account or UserId are null.\n */\nexport const getUserId = map<Account | null, UserId>((account) => {\n  if (account == null) {\n    throw new Error(\"Null or undefined account\");\n  }\n\n  return account.id;\n});\n\n/**\n * An rxjs map operator that extracts the UserId from an account, or returns undefined if the account or UserId are null.\n */\nexport const getOptionalUserId = map<Account | null, UserId | null>(\n  (account) => account?.id ?? null,\n);\n\nexport class AccountServiceImplementation implements InternalAccountService {\n  private accountsState: GlobalState<Record<UserId, AccountInfo>>;\n  private activeAccountIdState: GlobalState<UserId | undefined>;\n\n  accounts$: Observable<Record<UserId, AccountInfo>>;\n  activeAccount$: Observable<Account | null>;\n  accountActivity$: Observable<Record<UserId, Date>>;\n  sortedUserIds$: Observable<UserId[]>;\n  nextUpAccount$: Observable<Account>;\n\n  constructor(\n    private messagingService: MessagingService,\n    private logService: LogService,\n    private globalStateProvider: GlobalStateProvider,\n  ) {\n    this.accountsState = this.globalStateProvider.get(ACCOUNT_ACCOUNTS);\n    this.activeAccountIdState = this.globalStateProvider.get(ACCOUNT_ACTIVE_ACCOUNT_ID);\n\n    this.accounts$ = this.accountsState.state$.pipe(\n      map((accounts) => (accounts == null ? {} : accounts)),\n    );\n    this.activeAccount$ = this.activeAccountIdState.state$.pipe(\n      combineLatestWith(this.accounts$),\n      map(([id, accounts]) => (id ? ({ id, ...(accounts[id] as AccountInfo) } as Account) : null)),\n      distinctUntilChanged((a, b) => a?.id === b?.id && accountInfoEqual(a, b)),\n      shareReplay({ bufferSize: 1, refCount: false }),\n    );\n    this.accountActivity$ = this.globalStateProvider\n      .get(ACCOUNT_ACTIVITY)\n      .state$.pipe(map((activity) => activity ?? {}));\n    this.sortedUserIds$ = this.accountActivity$.pipe(\n      map((activity) => {\n        return Object.entries(activity)\n          .map(([userId, lastActive]: [UserId, Date]) => ({ userId, lastActive }))\n          .sort((a, b) => b.lastActive.getTime() - a.lastActive.getTime()) // later dates first\n          .map((a) => a.userId);\n      }),\n    );\n    this.nextUpAccount$ = combineLatest([\n      this.accounts$,\n      this.activeAccount$,\n      this.sortedUserIds$,\n    ]).pipe(\n      map(([accounts, activeAccount, sortedUserIds]) => {\n        const nextId = sortedUserIds.find((id) => id !== activeAccount?.id && accounts[id] != null);\n        return nextId ? { id: nextId, ...accounts[nextId] } : null;\n      }),\n    );\n  }\n\n  async addAccount(userId: UserId, accountData: AccountInfo): Promise<void> {\n    if (!Utils.isGuid(userId)) {\n      throw new Error(\"userId is required\");\n    }\n\n    await this.accountsState.update((accounts) => {\n      accounts ||= {};\n      accounts[userId] = accountData;\n      return accounts;\n    });\n    await this.setAccountActivity(userId, new Date());\n  }\n\n  async setAccountName(userId: UserId, name: string): Promise<void> {\n    await this.setAccountInfo(userId, { name });\n  }\n\n  async setAccountEmail(userId: UserId, email: string): Promise<void> {\n    await this.setAccountInfo(userId, { email });\n  }\n\n  async setAccountEmailVerified(userId: UserId, emailVerified: boolean): Promise<void> {\n    await this.setAccountInfo(userId, { emailVerified });\n  }\n\n  async clean(userId: UserId) {\n    await this.setAccountInfo(userId, LOGGED_OUT_INFO);\n    await this.removeAccountActivity(userId);\n  }\n\n  async switchAccount(userId: UserId | null): Promise<void> {\n    let updateActivity = false;\n    await this.activeAccountIdState.update(\n      (_, accounts) => {\n        if (userId == null) {\n          // indicates no account is active\n          return null;\n        }\n\n        if (accounts?.[userId] == null) {\n          throw new Error(\"Account does not exist\");\n        }\n        updateActivity = true;\n        return userId;\n      },\n      {\n        combineLatestWith: this.accounts$,\n        shouldUpdate: (id) => {\n          // update only if userId changes\n          return id !== userId;\n        },\n      },\n    );\n\n    if (updateActivity) {\n      await this.setAccountActivity(userId, new Date());\n    }\n  }\n\n  async setAccountActivity(userId: UserId, lastActivity: Date): Promise<void> {\n    if (!Utils.isGuid(userId)) {\n      // only store for valid userIds\n      return;\n    }\n\n    await this.globalStateProvider.get(ACCOUNT_ACTIVITY).update(\n      (activity) => {\n        activity ||= {};\n        activity[userId] = lastActivity;\n        return activity;\n      },\n      {\n        shouldUpdate: (oldActivity) => oldActivity?.[userId]?.getTime() !== lastActivity?.getTime(),\n      },\n    );\n  }\n\n  async removeAccountActivity(userId: UserId): Promise<void> {\n    await this.globalStateProvider.get(ACCOUNT_ACTIVITY).update(\n      (activity) => {\n        if (activity == null) {\n          return activity;\n        }\n        delete activity[userId];\n        return activity;\n      },\n      { shouldUpdate: (oldActivity) => oldActivity?.[userId] != null },\n    );\n  }\n\n  // TODO: update to use our own account status settings. Requires inverting direction of state service accounts flow\n  async delete(): Promise<void> {\n    try {\n      this.messagingService?.send(\"logout\");\n    } catch (e) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  private async setAccountInfo(userId: UserId, update: Partial<AccountInfo>): Promise<void> {\n    function newAccountInfo(oldAccountInfo: AccountInfo): AccountInfo {\n      return { ...oldAccountInfo, ...update };\n    }\n    await this.accountsState.update(\n      (accounts) => {\n        accounts[userId] = newAccountInfo(accounts[userId]);\n        return accounts;\n      },\n      {\n        // Avoid unnecessary updates\n        // TODO: Faster comparison, maybe include a hash on the objects?\n        shouldUpdate: (accounts) => {\n          if (accounts?.[userId] == null) {\n            throw new Error(\"Account does not exist\");\n          }\n\n          return !accountInfoEqual(accounts[userId], newAccountInfo(accounts[userId]));\n        },\n      },\n    );\n  }\n}\n","import { NotificationType } from \"../../enums\";\n\nimport { BaseResponse } from \"./base.response\";\n\nexport class NotificationResponse extends BaseResponse {\n  contextId: string;\n  type: NotificationType;\n  payload: any;\n\n  constructor(response: any) {\n    super(response);\n    this.contextId = this.getResponseProperty(\"ContextId\");\n    this.type = this.getResponseProperty(\"Type\");\n\n    const payload = this.getResponseProperty(\"Payload\");\n    switch (this.type) {\n      case NotificationType.SyncCipherCreate:\n      case NotificationType.SyncCipherDelete:\n      case NotificationType.SyncCipherUpdate:\n      case NotificationType.SyncLoginDelete:\n        this.payload = new SyncCipherNotification(payload);\n        break;\n      case NotificationType.SyncFolderCreate:\n      case NotificationType.SyncFolderDelete:\n      case NotificationType.SyncFolderUpdate:\n        this.payload = new SyncFolderNotification(payload);\n        break;\n      case NotificationType.SyncVault:\n      case NotificationType.SyncCiphers:\n      case NotificationType.SyncOrganizations:\n      case NotificationType.SyncOrgKeys:\n      case NotificationType.SyncSettings:\n      case NotificationType.LogOut:\n        this.payload = new UserNotification(payload);\n        break;\n      case NotificationType.SyncSendCreate:\n      case NotificationType.SyncSendUpdate:\n      case NotificationType.SyncSendDelete:\n        this.payload = new SyncSendNotification(payload);\n        break;\n      case NotificationType.AuthRequest:\n      case NotificationType.AuthRequestResponse:\n        this.payload = new AuthRequestPushNotification(payload);\n        break;\n      case NotificationType.SyncOrganizationStatusChanged:\n        this.payload = new OrganizationStatusPushNotification(payload);\n        break;\n      case NotificationType.SyncOrganizationCollectionSettingChanged:\n        this.payload = new OrganizationCollectionSettingChangedPushNotification(payload);\n        break;\n      default:\n        break;\n    }\n  }\n}\n\nexport class SyncCipherNotification extends BaseResponse {\n  id: string;\n  userId: string;\n  organizationId: string;\n  collectionIds: string[];\n  revisionDate: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.collectionIds = this.getResponseProperty(\"CollectionIds\");\n    this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n  }\n}\n\nexport class SyncFolderNotification extends BaseResponse {\n  id: string;\n  userId: string;\n  revisionDate: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n  }\n}\n\nexport class UserNotification extends BaseResponse {\n  userId: string;\n  date: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.date = new Date(this.getResponseProperty(\"Date\"));\n  }\n}\n\nexport class SyncSendNotification extends BaseResponse {\n  id: string;\n  userId: string;\n  revisionDate: Date;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.revisionDate = new Date(this.getResponseProperty(\"RevisionDate\"));\n  }\n}\n\nexport class AuthRequestPushNotification extends BaseResponse {\n  id: string;\n  userId: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n  }\n}\n\nexport class OrganizationStatusPushNotification extends BaseResponse {\n  organizationId: string;\n  enabled: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.enabled = this.getResponseProperty(\"Enabled\");\n  }\n}\n\nexport class OrganizationCollectionSettingChangedPushNotification extends BaseResponse {\n  organizationId: string;\n  limitCollectionCreation: boolean;\n  limitCollectionDeletion: boolean;\n\n  constructor(response: any) {\n    super(response);\n\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.limitCollectionCreation = this.getResponseProperty(\"LimitCollectionCreation\");\n    this.limitCollectionDeletion = this.getResponseProperty(\"LimitCollectionDeletion\");\n  }\n}\n","export class UpdateAvatarRequest {\n  avatarColor: string;\n\n  constructor(avatarColor: string) {\n    this.avatarColor = avatarColor;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { UpdateAvatarRequest } from \"../../models/request/update-avatar.request\";\nimport { AVATAR_DISK, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { AvatarService as AvatarServiceAbstraction } from \"../abstractions/avatar.service\";\n\nconst AVATAR_COLOR = new UserKeyDefinition<string>(AVATAR_DISK, \"avatarColor\", {\n  deserializer: (value) => value,\n  clearOn: [],\n});\n\nexport class AvatarService implements AvatarServiceAbstraction {\n  avatarColor$: Observable<string>;\n\n  constructor(\n    private apiService: ApiService,\n    private stateProvider: StateProvider,\n  ) {\n    this.avatarColor$ = this.stateProvider.getActive(AVATAR_COLOR).state$;\n  }\n\n  async setAvatarColor(color: string): Promise<void> {\n    const { avatarColor } = await this.apiService.putAvatar(new UpdateAvatarRequest(color));\n\n    await this.stateProvider.setUserState(AVATAR_COLOR, avatarColor);\n  }\n\n  async setSyncAvatarColor(userId: UserId, color: string): Promise<void> {\n    await this.stateProvider.getUser(userId, AVATAR_COLOR).update(() => color);\n  }\n\n  getUserAvatarColor$(userId: UserId): Observable<string | null> {\n    return this.stateProvider.getUser(userId, AVATAR_COLOR).state$;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class UpdateDevicesTrustRequest extends SecretVerificationRequest {\n  currentDevice: DeviceKeysUpdateRequest;\n  otherDevices: OtherDeviceKeysUpdateRequest[];\n}\n\nexport class DeviceKeysUpdateRequest {\n  encryptedPublicKey: string | undefined;\n  encryptedUserKey: string | undefined;\n}\n\nexport class OtherDeviceKeysUpdateRequest extends DeviceKeysUpdateRequest {\n  id: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { AppIdService } from \"../../platform/abstractions/app-id.service\";\nimport { ConfigService } from \"../../platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"../../platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { AbstractStorageService } from \"../../platform/abstractions/storage.service\";\nimport { StorageLocation } from \"../../platform/enums\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { StorageOptions } from \"../../platform/models/domain/storage-options\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport { DEVICE_TRUST_DISK_LOCAL, StateProvider, UserKeyDefinition } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { UserKey, DeviceKey } from \"../../types/key\";\nimport { DeviceTrustServiceAbstraction } from \"../abstractions/device-trust.service.abstraction\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { DevicesApiServiceAbstraction } from \"../abstractions/devices-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport {\n  DeviceKeysUpdateRequest,\n  UpdateDevicesTrustRequest,\n} from \"../models/request/update-devices-trust.request\";\n\n/** Uses disk storage so that the device key can persist after log out and tab removal. */\nexport const DEVICE_KEY = new UserKeyDefinition<DeviceKey | null>(\n  DEVICE_TRUST_DISK_LOCAL,\n  \"deviceKey\",\n  {\n    deserializer: (deviceKey) =>\n      deviceKey ? (SymmetricCryptoKey.fromJSON(deviceKey) as DeviceKey) : null,\n    clearOn: [], // Device key is needed to log back into device, so we can't clear it automatically during lock or logout\n    cleanupDelayMs: 0,\n    debug: {\n      enableRetrievalLogging: true,\n      enableUpdateLogging: true,\n    },\n  },\n);\n\n/** Uses disk storage so that the shouldTrustDevice bool can persist across login. */\nexport const SHOULD_TRUST_DEVICE = new UserKeyDefinition<boolean | null>(\n  DEVICE_TRUST_DISK_LOCAL,\n  \"shouldTrustDevice\",\n  {\n    deserializer: (shouldTrustDevice) => shouldTrustDevice,\n    clearOn: [], // Need to preserve the user setting, so we can't clear it automatically during lock or logout\n  },\n);\n\nexport class DeviceTrustService implements DeviceTrustServiceAbstraction {\n  private readonly platformSupportsSecureStorage =\n    this.platformUtilsService.supportsSecureStorage();\n  private readonly deviceKeySecureStorageKey: string = \"_deviceKey\";\n\n  supportsDeviceTrust$: Observable<boolean>;\n\n  constructor(\n    private keyGenerationService: KeyGenerationService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private appIdService: AppIdService,\n    private devicesApiService: DevicesApiServiceAbstraction,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private stateProvider: StateProvider,\n    private secureStorageService: AbstractStorageService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private logService: LogService,\n    private configService: ConfigService,\n  ) {\n    this.supportsDeviceTrust$ = this.userDecryptionOptionsService.userDecryptionOptions$.pipe(\n      map((options) => options?.trustedDeviceOption != null ?? false),\n    );\n  }\n\n  /**\n   * @description Retrieves the users choice to trust the device which can only happen after decryption\n   * Note: this value should only be used once and then reset\n   */\n  async getShouldTrustDevice(userId: UserId): Promise<boolean> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot get should trust device.\");\n    }\n\n    const shouldTrustDevice = await firstValueFrom(\n      this.stateProvider.getUserState$(SHOULD_TRUST_DEVICE, userId),\n    );\n\n    return shouldTrustDevice;\n  }\n\n  async setShouldTrustDevice(userId: UserId, value: boolean): Promise<void> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot set should trust device.\");\n    }\n\n    await this.stateProvider.setUserState(SHOULD_TRUST_DEVICE, value, userId);\n  }\n\n  async trustDeviceIfRequired(userId: UserId): Promise<void> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot trust device if required.\");\n    }\n\n    const shouldTrustDevice = await this.getShouldTrustDevice(userId);\n    if (shouldTrustDevice) {\n      await this.trustDevice(userId);\n      // reset the trust choice\n      await this.setShouldTrustDevice(userId, null);\n    }\n  }\n\n  async trustDevice(userId: UserId): Promise<DeviceResponse> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot trust device.\");\n    }\n\n    // Attempt to get user key\n    const userKey: UserKey = await this.keyService.getUserKey(userId);\n\n    // If user key is not found, throw error\n    if (!userKey) {\n      throw new Error(\"User symmetric key not found\");\n    }\n\n    // Generate deviceKey\n    const deviceKey = await this.makeDeviceKey();\n\n    // Generate asymmetric RSA key pair: devicePrivateKey, devicePublicKey\n    const [devicePublicKey, devicePrivateKey] =\n      await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n\n    const [\n      devicePublicKeyEncryptedUserKey,\n      userKeyEncryptedDevicePublicKey,\n      deviceKeyEncryptedDevicePrivateKey,\n    ] = await Promise.all([\n      // Encrypt user key with the DevicePublicKey\n      this.encryptService.rsaEncrypt(userKey.key, devicePublicKey),\n\n      // Encrypt devicePublicKey with user key\n      this.encryptService.encrypt(devicePublicKey, userKey),\n\n      // Encrypt devicePrivateKey with deviceKey\n      this.encryptService.encrypt(devicePrivateKey, deviceKey),\n    ]);\n\n    // Send encrypted keys to server\n    const deviceIdentifier = await this.appIdService.getAppId();\n    const deviceResponse = await this.devicesApiService.updateTrustedDeviceKeys(\n      deviceIdentifier,\n      devicePublicKeyEncryptedUserKey.encryptedString,\n      userKeyEncryptedDevicePublicKey.encryptedString,\n      deviceKeyEncryptedDevicePrivateKey.encryptedString,\n    );\n\n    // store device key in local/secure storage if enc keys posted to server successfully\n    await this.setDeviceKey(userId, deviceKey);\n\n    this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deviceTrusted\"));\n\n    return deviceResponse;\n  }\n\n  async rotateDevicesTrust(\n    userId: UserId,\n    newUserKey: UserKey,\n    masterPasswordHash: string,\n  ): Promise<void> {\n    this.logService.info(\"[Device trust rotation] Rotating device trust...\");\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot rotate device's trust.\");\n    }\n\n    const currentDeviceKey = await this.getDeviceKey(userId);\n    if (currentDeviceKey == null) {\n      // If the current device doesn't have a device key available to it, then we can't\n      // rotate any trust at all, so early return.\n      this.logService.info(\"[Device trust rotation] No device key available to rotate trust!\");\n      return;\n    }\n\n    // At this point of rotating their keys, they should still have their old user key in state\n    const oldUserKey = await firstValueFrom(this.keyService.userKey$(userId));\n    if (oldUserKey == newUserKey) {\n      this.logService.info(\"[Device trust rotation] Old user key is the same as the new user key.\");\n    }\n\n    const deviceIdentifier = await this.appIdService.getAppId();\n    const secretVerificationRequest = new SecretVerificationRequest();\n    secretVerificationRequest.masterPasswordHash = masterPasswordHash;\n\n    // Get the keys that are used in rotating a devices keys from the server\n    const currentDeviceKeys = await this.devicesApiService.getDeviceKeys(\n      deviceIdentifier,\n      secretVerificationRequest,\n    );\n\n    // Decrypt the existing device public key with the old user key\n    const decryptedDevicePublicKey = await this.encryptService.decryptToBytes(\n      currentDeviceKeys.encryptedPublicKey,\n      oldUserKey,\n    );\n\n    // Encrypt the brand new user key with the now-decrypted public key for the device\n    const encryptedNewUserKey = await this.encryptService.rsaEncrypt(\n      newUserKey.key,\n      decryptedDevicePublicKey,\n    );\n\n    // Re-encrypt the device public key with the new user key\n    const encryptedDevicePublicKey = await this.encryptService.encrypt(\n      decryptedDevicePublicKey,\n      newUserKey,\n    );\n\n    const currentDeviceUpdateRequest = new DeviceKeysUpdateRequest();\n    currentDeviceUpdateRequest.encryptedUserKey = encryptedNewUserKey.encryptedString;\n    currentDeviceUpdateRequest.encryptedPublicKey = encryptedDevicePublicKey.encryptedString;\n\n    // TODO: For device management, allow this method to take an array of device ids that can be looped over and individually rotated\n    // then it can be added to trustRequest.otherDevices.\n\n    const trustRequest = new UpdateDevicesTrustRequest();\n    trustRequest.masterPasswordHash = masterPasswordHash;\n    trustRequest.currentDevice = currentDeviceUpdateRequest;\n    trustRequest.otherDevices = [];\n\n    this.logService.info(\n      \"[Device trust rotation] Posting device trust update with current device:\",\n      deviceIdentifier,\n    );\n    await this.devicesApiService.updateTrust(trustRequest, deviceIdentifier);\n    this.logService.info(\"[Device trust rotation] Device trust update posted successfully.\");\n  }\n\n  async getDeviceKey(userId: UserId): Promise<DeviceKey | null> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot get device key.\");\n    }\n\n    try {\n      if (this.platformSupportsSecureStorage) {\n        const deviceKeyB64 = await this.secureStorageService.get<\n          ReturnType<SymmetricCryptoKey[\"toJSON\"]>\n        >(`${userId}${this.deviceKeySecureStorageKey}`, this.getSecureStorageOptions(userId));\n\n        const deviceKey = SymmetricCryptoKey.fromJSON(deviceKeyB64) as DeviceKey;\n\n        return deviceKey;\n      }\n\n      const deviceKey = await firstValueFrom(this.stateProvider.getUserState$(DEVICE_KEY, userId));\n\n      return deviceKey;\n    } catch (e) {\n      this.logService.error(\"Failed to get device key\", e);\n    }\n  }\n\n  private async setDeviceKey(userId: UserId, deviceKey: DeviceKey | null): Promise<void> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot set device key.\");\n    }\n\n    try {\n      if (this.platformSupportsSecureStorage) {\n        await this.secureStorageService.save<DeviceKey>(\n          `${userId}${this.deviceKeySecureStorageKey}`,\n          deviceKey,\n          this.getSecureStorageOptions(userId),\n        );\n        return;\n      }\n\n      await this.stateProvider.setUserState(DEVICE_KEY, deviceKey?.toJSON(), userId);\n    } catch (e) {\n      this.logService.error(\"Failed to set device key\", e);\n    }\n  }\n\n  private async makeDeviceKey(): Promise<DeviceKey> {\n    // Create 512-bit device key\n    const deviceKey = (await this.keyGenerationService.createKey(512)) as DeviceKey;\n\n    return deviceKey;\n  }\n\n  async decryptUserKeyWithDeviceKey(\n    userId: UserId,\n    encryptedDevicePrivateKey: EncString,\n    encryptedUserKey: EncString,\n    deviceKey: DeviceKey,\n  ): Promise<UserKey | null> {\n    if (!userId) {\n      throw new Error(\"UserId is required. Cannot decrypt user key with device key.\");\n    }\n\n    if (!encryptedDevicePrivateKey) {\n      throw new Error(\n        \"Encrypted device private key is required. Cannot decrypt user key with device key.\",\n      );\n    }\n\n    if (!encryptedUserKey) {\n      throw new Error(\"Encrypted user key is required. Cannot decrypt user key with device key.\");\n    }\n\n    if (!deviceKey) {\n      // User doesn't have a device key anymore so device is untrusted\n      return null;\n    }\n\n    try {\n      // attempt to decrypt encryptedDevicePrivateKey with device key\n      const devicePrivateKey = await this.encryptService.decryptToBytes(\n        encryptedDevicePrivateKey,\n        deviceKey,\n      );\n\n      // Attempt to decrypt encryptedUserDataKey with devicePrivateKey\n      const userKey = await this.encryptService.rsaDecrypt(\n        new EncString(encryptedUserKey.encryptedString),\n        devicePrivateKey,\n      );\n\n      return new SymmetricCryptoKey(userKey) as UserKey;\n    } catch (e) {\n      // If either decryption effort fails, we want to remove the device key\n      this.logService.error(\"Failed to decrypt using device key. Removing device key.\");\n      await this.setDeviceKey(userId, null);\n\n      return null;\n    }\n  }\n\n  async recordDeviceTrustLoss(): Promise<void> {\n    const deviceIdentifier = await this.appIdService.getAppId();\n    await this.devicesApiService.postDeviceTrustLoss(deviceIdentifier);\n  }\n\n  private getSecureStorageOptions(userId: UserId): StorageOptions {\n    return {\n      storageLocation: StorageLocation.Disk,\n      useSecureStorage: true,\n      userId: userId,\n    };\n  }\n}\n","import { DeviceType } from \"../../../../enums\";\nimport { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport interface DevicePendingAuthRequest {\n  id: string;\n  creationDate: string;\n}\n\nexport class DeviceResponse extends BaseResponse {\n  id: string;\n  userId: string;\n  name: string;\n  identifier: string;\n  type: DeviceType;\n  creationDate: string;\n  revisionDate: string;\n  isTrusted: boolean;\n  devicePendingAuthRequest: DevicePendingAuthRequest | null;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.identifier = this.getResponseProperty(\"Identifier\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n    this.isTrusted = this.getResponseProperty(\"IsTrusted\");\n    this.devicePendingAuthRequest = this.getResponseProperty(\"DevicePendingAuthRequest\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceType } from \"../../../enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\n\nexport class ProtectedDeviceResponse extends BaseResponse {\n  constructor(response: Jsonify<ProtectedDeviceResponse>) {\n    super(response);\n    this.id = this.getResponseProperty(\"id\");\n    this.name = this.getResponseProperty(\"name\");\n    this.identifier = this.getResponseProperty(\"identifier\");\n    this.type = this.getResponseProperty(\"type\");\n    this.creationDate = new Date(this.getResponseProperty(\"creationDate\"));\n    if (response.encryptedUserKey) {\n      this.encryptedUserKey = new EncString(this.getResponseProperty(\"encryptedUserKey\"));\n    }\n    if (response.encryptedPublicKey) {\n      this.encryptedPublicKey = new EncString(this.getResponseProperty(\"encryptedPublicKey\"));\n    }\n  }\n\n  id: string;\n  name: string;\n  type: DeviceType;\n  identifier: string;\n  creationDate: Date;\n  /**\n   * Intended to be the users symmetric key that is encrypted in some form, the current way to encrypt this is with\n   * the devices public key.\n   */\n  encryptedUserKey: EncString;\n  /**\n   * Intended to be the public key that was generated for a device upon trust and encrypted. Currenly encrypted using\n   * a users symmetric key so that when trusted and unlocked a user can decrypt the public key for all their devices.\n   * This enabled a user to rotate the keys for all of their devices.\n   */\n  encryptedPublicKey: EncString;\n}\n","export class TrustedDeviceKeysRequest {\n  constructor(\n    public encryptedUserKey: string,\n    public encryptedPublicKey: string,\n    public encryptedPrivateKey: string,\n  ) {}\n}\n","export class KeyConnectorUserKeyRequest {\n  key: string;\n\n  constructor(key: string) {\n    this.key = key;\n  }\n}\n","import { KdfConfig, KdfType } from \"@bitwarden/key-management\";\n\nimport { KeysRequest } from \"../../../models/request/keys.request\";\n\nexport class SetKeyConnectorKeyRequest {\n  key: string;\n  keys: KeysRequest;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n  orgIdentifier: string;\n\n  constructor(key: string, kdfConfig: KdfConfig, orgIdentifier: string, keys: KeysRequest) {\n    this.key = key;\n    this.kdf = kdfConfig.kdfType;\n    this.kdfIterations = kdfConfig.iterations;\n    if (kdfConfig.kdfType === KdfType.Argon2id) {\n      this.kdfMemory = kdfConfig.memory;\n      this.kdfParallelism = kdfConfig.parallelism;\n    }\n    this.orgIdentifier = orgIdentifier;\n    this.keys = keys;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport {\n  Argon2KdfConfig,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  KeyService,\n  KdfType,\n} from \"@bitwarden/key-management\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { OrganizationService } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserType } from \"../../admin-console/enums\";\nimport { Organization } from \"../../admin-console/models/domain/organization\";\nimport { KeysRequest } from \"../../models/request/keys.request\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport {\n  ActiveUserState,\n  KEY_CONNECTOR_DISK,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { MasterKey } from \"../../types/key\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { KeyConnectorService as KeyConnectorServiceAbstraction } from \"../abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"../abstractions/token.service\";\nimport { KeyConnectorUserKeyRequest } from \"../models/request/key-connector-user-key.request\";\nimport { SetKeyConnectorKeyRequest } from \"../models/request/set-key-connector-key.request\";\nimport { IdentityTokenResponse } from \"../models/response/identity-token.response\";\n\nexport const USES_KEY_CONNECTOR = new UserKeyDefinition<boolean | null>(\n  KEY_CONNECTOR_DISK,\n  \"usesKeyConnector\",\n  {\n    deserializer: (usesKeyConnector) => usesKeyConnector,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const CONVERT_ACCOUNT_TO_KEY_CONNECTOR = new UserKeyDefinition<boolean | null>(\n  KEY_CONNECTOR_DISK,\n  \"convertAccountToKeyConnector\",\n  {\n    deserializer: (convertAccountToKeyConnector) => convertAccountToKeyConnector,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport class KeyConnectorService implements KeyConnectorServiceAbstraction {\n  private usesKeyConnectorState: ActiveUserState<boolean>;\n  private convertAccountToKeyConnectorState: ActiveUserState<boolean>;\n  constructor(\n    private accountService: AccountService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private keyService: KeyService,\n    private apiService: ApiService,\n    private tokenService: TokenService,\n    private logService: LogService,\n    private organizationService: OrganizationService,\n    private keyGenerationService: KeyGenerationService,\n    private logoutCallback: (logoutReason: LogoutReason, userId?: string) => Promise<void>,\n    private stateProvider: StateProvider,\n  ) {\n    this.usesKeyConnectorState = this.stateProvider.getActive(USES_KEY_CONNECTOR);\n    this.convertAccountToKeyConnectorState = this.stateProvider.getActive(\n      CONVERT_ACCOUNT_TO_KEY_CONNECTOR,\n    );\n  }\n\n  async setUsesKeyConnector(usesKeyConnector: boolean, userId: UserId) {\n    await this.stateProvider.getUser(userId, USES_KEY_CONNECTOR).update(() => usesKeyConnector);\n  }\n\n  getUsesKeyConnector(userId: UserId): Promise<boolean> {\n    return firstValueFrom(this.stateProvider.getUserState$(USES_KEY_CONNECTOR, userId));\n  }\n\n  async userNeedsMigration(userId: UserId) {\n    const loggedInUsingSso = await this.tokenService.getIsExternal(userId);\n    const requiredByOrganization = (await this.getManagingOrganization(userId)) != null;\n    const userIsNotUsingKeyConnector = !(await this.getUsesKeyConnector(userId));\n\n    return loggedInUsingSso && requiredByOrganization && userIsNotUsingKeyConnector;\n  }\n\n  async migrateUser(userId?: UserId) {\n    userId ??= (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    const organization = await this.getManagingOrganization(userId);\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    const keyConnectorRequest = new KeyConnectorUserKeyRequest(masterKey.encKeyB64);\n\n    try {\n      await this.apiService.postUserKeyToKeyConnector(\n        organization.keyConnectorUrl,\n        keyConnectorRequest,\n      );\n    } catch (e) {\n      this.handleKeyConnectorError(e);\n    }\n\n    await this.apiService.postConvertToKeyConnector();\n  }\n\n  // TODO: UserKey should be renamed to MasterKey and typed accordingly\n  async setMasterKeyFromUrl(url: string, userId: UserId) {\n    try {\n      const masterKeyResponse = await this.apiService.getMasterKeyFromKeyConnector(url);\n      const keyArr = Utils.fromB64ToArray(masterKeyResponse.key);\n      const masterKey = new SymmetricCryptoKey(keyArr) as MasterKey;\n      await this.masterPasswordService.setMasterKey(masterKey, userId);\n    } catch (e) {\n      this.handleKeyConnectorError(e);\n    }\n  }\n\n  async getManagingOrganization(userId?: UserId): Promise<Organization> {\n    const orgs = await this.organizationService.getAll(userId);\n    return orgs.find(\n      (o) =>\n        o.keyConnectorEnabled &&\n        o.type !== OrganizationUserType.Admin &&\n        o.type !== OrganizationUserType.Owner &&\n        !o.isProviderUser,\n    );\n  }\n\n  async convertNewSsoUserToKeyConnector(\n    tokenResponse: IdentityTokenResponse,\n    orgId: string,\n    userId: UserId,\n  ) {\n    // TODO: Remove after tokenResponse.keyConnectorUrl is deprecated in 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n    const {\n      kdf,\n      kdfIterations,\n      kdfMemory,\n      kdfParallelism,\n      keyConnectorUrl: legacyKeyConnectorUrl,\n      userDecryptionOptions,\n    } = tokenResponse;\n    const password = await this.keyGenerationService.createKey(512);\n    const kdfConfig: KdfConfig =\n      kdf === KdfType.PBKDF2_SHA256\n        ? new PBKDF2KdfConfig(kdfIterations)\n        : new Argon2KdfConfig(kdfIterations, kdfMemory, kdfParallelism);\n\n    const masterKey = await this.keyService.makeMasterKey(\n      password.keyB64,\n      await this.tokenService.getEmail(),\n      kdfConfig,\n    );\n    const keyConnectorRequest = new KeyConnectorUserKeyRequest(masterKey.encKeyB64);\n    await this.masterPasswordService.setMasterKey(masterKey, userId);\n\n    const userKey = await this.keyService.makeUserKey(masterKey);\n    await this.keyService.setUserKey(userKey[0], userId);\n    await this.keyService.setMasterKeyEncryptedUserKey(userKey[1].encryptedString, userId);\n\n    const [pubKey, privKey] = await this.keyService.makeKeyPair(userKey[0]);\n\n    try {\n      const keyConnectorUrl =\n        legacyKeyConnectorUrl ?? userDecryptionOptions?.keyConnectorOption?.keyConnectorUrl;\n      await this.apiService.postUserKeyToKeyConnector(keyConnectorUrl, keyConnectorRequest);\n    } catch (e) {\n      this.handleKeyConnectorError(e);\n    }\n\n    const keys = new KeysRequest(pubKey, privKey.encryptedString);\n    const setPasswordRequest = new SetKeyConnectorKeyRequest(\n      userKey[1].encryptedString,\n      kdfConfig,\n      orgId,\n      keys,\n    );\n    await this.apiService.postSetKeyConnectorKey(setPasswordRequest);\n  }\n\n  async setConvertAccountRequired(status: boolean, userId?: UserId) {\n    await this.stateProvider.setUserState(CONVERT_ACCOUNT_TO_KEY_CONNECTOR, status, userId);\n  }\n\n  getConvertAccountRequired(): Promise<boolean> {\n    return firstValueFrom(this.convertAccountToKeyConnectorState.state$);\n  }\n\n  async removeConvertAccountRequired(userId?: UserId) {\n    await this.setConvertAccountRequired(null, userId);\n  }\n\n  private handleKeyConnectorError(e: any) {\n    this.logService.error(e);\n    if (this.logoutCallback != null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.logoutCallback(\"keyConnectorError\");\n    }\n    throw new Error(\"Key Connector error\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"../../../platform/abstractions/key-generation.service\";\nimport { StateService } from \"../../../platform/abstractions/state.service\";\nimport { EncryptionType } from \"../../../platform/enums\";\nimport { EncryptedString, EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport {\n  MASTER_PASSWORD_DISK,\n  MASTER_PASSWORD_MEMORY,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { MasterKey, UserKey } from \"../../../types/key\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../abstractions/master-password.service.abstraction\";\nimport { ForceSetPasswordReason } from \"../../models/domain/force-set-password-reason\";\n\n/** Memory since master key shouldn't be available on lock */\nconst MASTER_KEY = new UserKeyDefinition<MasterKey>(MASTER_PASSWORD_MEMORY, \"masterKey\", {\n  deserializer: (masterKey) => SymmetricCryptoKey.fromJSON(masterKey) as MasterKey,\n  clearOn: [\"lock\", \"logout\"],\n});\n\n/** Disk since master key hash is used for unlock */\nconst MASTER_KEY_HASH = new UserKeyDefinition<string>(MASTER_PASSWORD_DISK, \"masterKeyHash\", {\n  deserializer: (masterKeyHash) => masterKeyHash,\n  clearOn: [\"logout\"],\n});\n\n/** Disk to persist through lock */\nconst MASTER_KEY_ENCRYPTED_USER_KEY = new UserKeyDefinition<EncryptedString>(\n  MASTER_PASSWORD_DISK,\n  \"masterKeyEncryptedUserKey\",\n  {\n    deserializer: (key) => key,\n    clearOn: [\"logout\"],\n  },\n);\n\n/** Disk to persist through lock and account switches */\nconst FORCE_SET_PASSWORD_REASON = new UserKeyDefinition<ForceSetPasswordReason>(\n  MASTER_PASSWORD_DISK,\n  \"forceSetPasswordReason\",\n  {\n    deserializer: (reason) => reason,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport class MasterPasswordService implements InternalMasterPasswordServiceAbstraction {\n  constructor(\n    private stateProvider: StateProvider,\n    private stateService: StateService,\n    private keyGenerationService: KeyGenerationService,\n    private encryptService: EncryptService,\n    private logService: LogService,\n  ) {}\n\n  masterKey$(userId: UserId): Observable<MasterKey> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    return this.stateProvider.getUser(userId, MASTER_KEY).state$;\n  }\n\n  masterKeyHash$(userId: UserId): Observable<string> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    return this.stateProvider.getUser(userId, MASTER_KEY_HASH).state$;\n  }\n\n  forceSetPasswordReason$(userId: UserId): Observable<ForceSetPasswordReason> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    return this.stateProvider\n      .getUser(userId, FORCE_SET_PASSWORD_REASON)\n      .state$.pipe(map((reason) => reason ?? ForceSetPasswordReason.None));\n  }\n\n  // TODO: Remove this method and decrypt directly in the service instead\n  async getMasterKeyEncryptedUserKey(userId: UserId): Promise<EncString> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    const key = await firstValueFrom(\n      this.stateProvider.getUser(userId, MASTER_KEY_ENCRYPTED_USER_KEY).state$,\n    );\n    return EncString.fromJSON(key);\n  }\n\n  async setMasterKey(masterKey: MasterKey, userId: UserId): Promise<void> {\n    if (masterKey == null) {\n      throw new Error(\"Master key is required.\");\n    }\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider.getUser(userId, MASTER_KEY).update((_) => masterKey);\n  }\n\n  async clearMasterKey(userId: UserId): Promise<void> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider.getUser(userId, MASTER_KEY).update((_) => null);\n  }\n\n  async setMasterKeyHash(masterKeyHash: string, userId: UserId): Promise<void> {\n    if (masterKeyHash == null) {\n      throw new Error(\"Master key hash is required.\");\n    }\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider.getUser(userId, MASTER_KEY_HASH).update((_) => masterKeyHash);\n  }\n\n  async clearMasterKeyHash(userId: UserId): Promise<void> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider.getUser(userId, MASTER_KEY_HASH).update((_) => null);\n  }\n\n  async setMasterKeyEncryptedUserKey(encryptedKey: EncString, userId: UserId): Promise<void> {\n    if (encryptedKey == null) {\n      throw new Error(\"Encrypted Key is required.\");\n    }\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider\n      .getUser(userId, MASTER_KEY_ENCRYPTED_USER_KEY)\n      .update((_) => encryptedKey.toJSON() as EncryptedString);\n  }\n\n  async setForceSetPasswordReason(reason: ForceSetPasswordReason, userId: UserId): Promise<void> {\n    if (reason == null) {\n      throw new Error(\"Reason is required.\");\n    }\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n    await this.stateProvider.getUser(userId, FORCE_SET_PASSWORD_REASON).update((_) => reason);\n  }\n\n  async decryptUserKeyWithMasterKey(\n    masterKey: MasterKey,\n    userId: UserId,\n    userKey?: EncString,\n  ): Promise<UserKey> {\n    userKey ??= await this.getMasterKeyEncryptedUserKey(userId);\n    masterKey ??= await firstValueFrom(this.masterKey$(userId));\n\n    if (masterKey == null) {\n      throw new Error(\"No master key found.\");\n    }\n\n    // Try one more way to get the user key if it still wasn't found.\n    if (userKey == null) {\n      const deprecatedKey = await this.stateService.getEncryptedCryptoSymmetricKey({\n        userId: userId,\n      });\n\n      if (deprecatedKey == null) {\n        throw new Error(\"No encrypted user key found.\");\n      }\n\n      userKey = new EncString(deprecatedKey);\n    }\n\n    let decUserKey: Uint8Array;\n\n    if (userKey.encryptionType === EncryptionType.AesCbc256_B64) {\n      decUserKey = await this.encryptService.decryptToBytes(\n        userKey,\n        masterKey,\n        \"Content: User Key; Encrypting Key: Master Key\",\n      );\n    } else if (userKey.encryptionType === EncryptionType.AesCbc256_HmacSha256_B64) {\n      const newKey = await this.keyGenerationService.stretchKey(masterKey);\n      decUserKey = await this.encryptService.decryptToBytes(\n        userKey,\n        newKey,\n        \"Content: User Key; Encrypting Key: Stretched Master Key\",\n      );\n    } else {\n      throw new Error(\"Unsupported encryption type.\");\n    }\n\n    if (decUserKey == null) {\n      this.logService.warning(\"Failed to decrypt user key with master key.\");\n      return null;\n    }\n\n    return new SymmetricCryptoKey(decUserKey) as UserKey;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  ActiveUserState,\n  GlobalState,\n  KeyDefinition,\n  SSO_DISK,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\nimport { SsoLoginServiceAbstraction } from \"../abstractions/sso-login.service.abstraction\";\n\n/**\n * Uses disk storage so that the code verifier can be persisted across sso redirects.\n */\nconst CODE_VERIFIER = new KeyDefinition<string>(SSO_DISK, \"ssoCodeVerifier\", {\n  deserializer: (codeVerifier) => codeVerifier,\n});\n\n/**\n * Uses disk storage so that the sso state can be persisted across sso redirects.\n */\nconst SSO_STATE = new KeyDefinition<string>(SSO_DISK, \"ssoState\", {\n  deserializer: (state) => state,\n});\n\n/**\n * Uses disk storage so that the organization sso identifier can be persisted across sso redirects.\n */\nconst USER_ORGANIZATION_SSO_IDENTIFIER = new UserKeyDefinition<string>(\n  SSO_DISK,\n  \"organizationSsoIdentifier\",\n  {\n    deserializer: (organizationIdentifier) => organizationIdentifier,\n    clearOn: [\"logout\"], // Used for login, so not needed past logout\n  },\n);\n\n/**\n * Uses disk storage so that the organization sso identifier can be persisted across sso redirects.\n */\nconst GLOBAL_ORGANIZATION_SSO_IDENTIFIER = new KeyDefinition<string>(\n  SSO_DISK,\n  \"organizationSsoIdentifier\",\n  {\n    deserializer: (organizationIdentifier) => organizationIdentifier,\n  },\n);\n\n/**\n * Uses disk storage so that the user's email can be persisted across sso redirects.\n */\nconst SSO_EMAIL = new KeyDefinition<string>(SSO_DISK, \"ssoEmail\", {\n  deserializer: (state) => state,\n});\n\nexport class SsoLoginService implements SsoLoginServiceAbstraction {\n  private codeVerifierState: GlobalState<string>;\n  private ssoState: GlobalState<string>;\n  private orgSsoIdentifierState: GlobalState<string>;\n  private ssoEmailState: GlobalState<string>;\n  private activeUserOrgSsoIdentifierState: ActiveUserState<string>;\n\n  constructor(private stateProvider: StateProvider) {\n    this.codeVerifierState = this.stateProvider.getGlobal(CODE_VERIFIER);\n    this.ssoState = this.stateProvider.getGlobal(SSO_STATE);\n    this.orgSsoIdentifierState = this.stateProvider.getGlobal(GLOBAL_ORGANIZATION_SSO_IDENTIFIER);\n    this.ssoEmailState = this.stateProvider.getGlobal(SSO_EMAIL);\n    this.activeUserOrgSsoIdentifierState = this.stateProvider.getActive(\n      USER_ORGANIZATION_SSO_IDENTIFIER,\n    );\n  }\n\n  getCodeVerifier(): Promise<string> {\n    return firstValueFrom(this.codeVerifierState.state$);\n  }\n\n  async setCodeVerifier(codeVerifier: string): Promise<void> {\n    await this.codeVerifierState.update((_) => codeVerifier);\n  }\n\n  getSsoState(): Promise<string> {\n    return firstValueFrom(this.ssoState.state$);\n  }\n\n  async setSsoState(ssoState: string): Promise<void> {\n    await this.ssoState.update((_) => ssoState);\n  }\n\n  getOrganizationSsoIdentifier(): Promise<string> {\n    return firstValueFrom(this.orgSsoIdentifierState.state$);\n  }\n\n  async setOrganizationSsoIdentifier(organizationIdentifier: string): Promise<void> {\n    await this.orgSsoIdentifierState.update((_) => organizationIdentifier);\n  }\n\n  getSsoEmail(): Promise<string> {\n    return firstValueFrom(this.ssoEmailState.state$);\n  }\n\n  async setSsoEmail(email: string): Promise<void> {\n    await this.ssoEmailState.update((_) => email);\n  }\n\n  getActiveUserOrganizationSsoIdentifier(): Promise<string> {\n    return firstValueFrom(this.activeUserOrgSsoIdentifierState.state$);\n  }\n\n  async setActiveUserOrganizationSsoIdentifier(organizationIdentifier: string): Promise<void> {\n    await this.activeUserOrgSsoIdentifierState.update((_) => organizationIdentifier);\n  }\n}\n","export class SetTokensResult {\n  constructor(accessToken: string, refreshToken?: string, clientIdSecretPair?: [string, string]) {\n    this.accessToken = accessToken;\n    this.refreshToken = refreshToken;\n    this.clientIdSecretPair = clientIdSecretPair;\n  }\n  accessToken: string;\n  refreshToken?: string;\n  clientIdSecretPair?: [string, string];\n}\n","import {\n  KeyDefinition,\n  TOKEN_DISK,\n  TOKEN_DISK_LOCAL,\n  TOKEN_MEMORY,\n  UserKeyDefinition,\n} from \"../../platform/state\";\n\n// Note: all tokens / API key information must be cleared on logout.\n// because we are using secure storage, we must manually call to clean up our tokens.\n// See stateService.deAuthenticateAccount for where we call clearTokens(...)\n\nexport const ACCESS_TOKEN_DISK = new UserKeyDefinition<string>(TOKEN_DISK, \"accessToken\", {\n  deserializer: (accessToken) => accessToken,\n  clearOn: [], // Manually handled\n});\n\nexport const ACCESS_TOKEN_MEMORY = new UserKeyDefinition<string>(TOKEN_MEMORY, \"accessToken\", {\n  deserializer: (accessToken) => accessToken,\n  clearOn: [], // Manually handled\n});\n\nexport const REFRESH_TOKEN_DISK = new UserKeyDefinition<string>(TOKEN_DISK, \"refreshToken\", {\n  deserializer: (refreshToken) => refreshToken,\n  clearOn: [], // Manually handled\n});\n\nexport const REFRESH_TOKEN_MEMORY = new UserKeyDefinition<string>(TOKEN_MEMORY, \"refreshToken\", {\n  deserializer: (refreshToken) => refreshToken,\n  clearOn: [], // Manually handled\n});\n\nexport const EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL = KeyDefinition.record<string, string>(\n  TOKEN_DISK_LOCAL,\n  \"emailTwoFactorTokenRecord\",\n  {\n    deserializer: (emailTwoFactorTokenRecord) => emailTwoFactorTokenRecord,\n  },\n);\n\nexport const API_KEY_CLIENT_ID_DISK = new UserKeyDefinition<string>(TOKEN_DISK, \"apiKeyClientId\", {\n  deserializer: (apiKeyClientId) => apiKeyClientId,\n  clearOn: [], // Manually handled\n});\n\nexport const API_KEY_CLIENT_ID_MEMORY = new UserKeyDefinition<string>(\n  TOKEN_MEMORY,\n  \"apiKeyClientId\",\n  {\n    deserializer: (apiKeyClientId) => apiKeyClientId,\n    clearOn: [], // Manually handled\n  },\n);\n\nexport const API_KEY_CLIENT_SECRET_DISK = new UserKeyDefinition<string>(\n  TOKEN_DISK,\n  \"apiKeyClientSecret\",\n  {\n    deserializer: (apiKeyClientSecret) => apiKeyClientSecret,\n    clearOn: [], // Manually handled\n  },\n);\n\nexport const API_KEY_CLIENT_SECRET_MEMORY = new UserKeyDefinition<string>(\n  TOKEN_MEMORY,\n  \"apiKeyClientSecret\",\n  {\n    deserializer: (apiKeyClientSecret) => apiKeyClientSecret,\n    clearOn: [], // Manually handled\n  },\n);\n\nexport const SECURITY_STAMP_MEMORY = new UserKeyDefinition<string>(TOKEN_MEMORY, \"securityStamp\", {\n  deserializer: (securityStamp) => securityStamp,\n  clearOn: [\"logout\"],\n});\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, combineLatest, firstValueFrom, map } from \"rxjs\";\nimport { Opaque } from \"type-fest\";\n\nimport { LogoutReason, decodeJwtTokenToJson } from \"@bitwarden/auth/common\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"../../platform/abstractions/key-generation.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { AbstractStorageService } from \"../../platform/abstractions/storage.service\";\nimport { StorageLocation } from \"../../platform/enums\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { EncString, EncryptedString } from \"../../platform/models/domain/enc-string\";\nimport { StorageOptions } from \"../../platform/models/domain/storage-options\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport {\n  GlobalState,\n  GlobalStateProvider,\n  SingleUserStateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"../../types/vault-timeout.type\";\nimport { TokenService as TokenServiceAbstraction } from \"../abstractions/token.service\";\nimport { SetTokensResult } from \"../models/domain/set-tokens-result\";\n\nimport { ACCOUNT_ACTIVE_ACCOUNT_ID } from \"./account.service\";\nimport {\n  ACCESS_TOKEN_DISK,\n  ACCESS_TOKEN_MEMORY,\n  API_KEY_CLIENT_ID_DISK,\n  API_KEY_CLIENT_ID_MEMORY,\n  API_KEY_CLIENT_SECRET_DISK,\n  API_KEY_CLIENT_SECRET_MEMORY,\n  EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n  REFRESH_TOKEN_DISK,\n  REFRESH_TOKEN_MEMORY,\n  SECURITY_STAMP_MEMORY,\n} from \"./token.state\";\n\nexport enum TokenStorageLocation {\n  Disk = \"disk\",\n  SecureStorage = \"secureStorage\",\n  Memory = \"memory\",\n}\n\n/**\n * Type representing the structure of a standard Bitwarden decoded access token.\n * src: https://datatracker.ietf.org/doc/html/rfc7519#section-4.1\n * Note: all claims are technically optional so we must verify their existence before using them.\n * Note 2: NumericDate is a number representing a date in seconds since the Unix epoch.\n */\nexport type DecodedAccessToken = {\n  /** Issuer  - the issuer of the token, typically the URL of the authentication server */\n  iss?: string;\n\n  /** Not Before - a timestamp defining when the token starts being valid */\n  nbf?: number;\n\n  /** Issued At - a timestamp of when the token was issued */\n  iat?: number;\n\n  /** Expiration Time - a NumericDate timestamp of when the token will expire */\n  exp?: number;\n\n  /** Scope - the scope of the access request, such as the permissions the token grants */\n  scope?: string[];\n\n  /** Authentication Method Reference - the methods used in the authentication */\n  amr?: string[];\n\n  /** Client ID - the identifier for the client that requested the token */\n  client_id?: string;\n\n  /** Subject - the unique identifier for the user */\n  sub?: string;\n\n  /** Authentication Time - a timestamp of when the user authentication occurred */\n  auth_time?: number;\n\n  /** Identity Provider - the system or service that authenticated the user */\n  idp?: string;\n\n  /** Premium - a boolean flag indicating whether the account is premium */\n  premium?: boolean;\n\n  /** Email - the user's email address */\n  email?: string;\n\n  /** Email Verified - a boolean flag indicating whether the user's email address has been verified */\n  email_verified?: boolean;\n\n  /**\n   * Security Stamp - a unique identifier which invalidates the access token if it changes in the db\n   * (typically after critical account changes like a password change)\n   */\n  sstamp?: string;\n\n  /** Name - the name of the user */\n  name?: string;\n\n  /** Organization Owners - a list of organization owner identifiers */\n  orgowner?: string[];\n\n  /** Device - the identifier of the device used */\n  device?: string;\n\n  /** JWT ID - a unique identifier for the JWT */\n  jti?: string;\n};\n\n/**\n * A symmetric key for encrypting the access token before the token is stored on disk.\n * This key should be stored in secure storage.\n * */\nexport type AccessTokenKey = Opaque<SymmetricCryptoKey, \"AccessTokenKey\">;\n\nexport class TokenService implements TokenServiceAbstraction {\n  private readonly accessTokenKeySecureStorageKey: string = \"_accessTokenKey\";\n\n  private readonly refreshTokenSecureStorageKey: string = \"_refreshToken\";\n\n  private emailTwoFactorTokenRecordGlobalState: GlobalState<Record<string, string>>;\n\n  private activeUserIdGlobalState: GlobalState<UserId>;\n\n  constructor(\n    // Note: we cannot use ActiveStateProvider because if we ever want to inject\n    // this service into the AccountService, we will make a circular dependency\n    private singleUserStateProvider: SingleUserStateProvider,\n    private globalStateProvider: GlobalStateProvider,\n    private readonly platformSupportsSecureStorage: boolean,\n    private secureStorageService: AbstractStorageService,\n    private keyGenerationService: KeyGenerationService,\n    private encryptService: EncryptService,\n    private logService: LogService,\n    private logoutCallback: (logoutReason: LogoutReason, userId?: string) => Promise<void>,\n  ) {\n    this.initializeState();\n  }\n\n  hasAccessToken$(userId: UserId): Observable<boolean> {\n    // FIXME Once once vault timeout action is observable, we can use it to determine storage location\n    // and avoid the need to check both disk and memory.\n    return combineLatest([\n      this.singleUserStateProvider.get(userId, ACCESS_TOKEN_DISK).state$,\n      this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).state$,\n    ]).pipe(map(([disk, memory]) => Boolean(disk || memory)));\n  }\n\n  private initializeState(): void {\n    this.emailTwoFactorTokenRecordGlobalState = this.globalStateProvider.get(\n      EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n    );\n\n    this.activeUserIdGlobalState = this.globalStateProvider.get(ACCOUNT_ACTIVE_ACCOUNT_ID);\n  }\n\n  async setTokens(\n    accessToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    refreshToken?: string,\n    clientIdClientSecret?: [string, string],\n  ): Promise<SetTokensResult> {\n    if (!accessToken) {\n      throw new Error(\"Access token is required.\");\n    }\n\n    // Can't check for falsey b/c 0 is a valid value\n    if (vaultTimeout == null) {\n      throw new Error(\"Vault Timeout is required.\");\n    }\n\n    if (vaultTimeoutAction == null) {\n      throw new Error(\"Vault Timeout Action is required.\");\n    }\n\n    // get user id the access token\n    const userId: UserId = await this.getUserIdFromAccessToken(accessToken);\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot set tokens.\");\n    }\n\n    const newAccessToken = await this._setAccessToken(\n      accessToken,\n      vaultTimeoutAction,\n      vaultTimeout,\n      userId,\n    );\n\n    const newTokens = new SetTokensResult(newAccessToken);\n\n    if (refreshToken) {\n      newTokens.refreshToken = await this.setRefreshToken(\n        refreshToken,\n        vaultTimeoutAction,\n        vaultTimeout,\n        userId,\n      );\n    }\n\n    if (clientIdClientSecret != null) {\n      const clientId = await this.setClientId(\n        clientIdClientSecret[0],\n        vaultTimeoutAction,\n        vaultTimeout,\n        userId,\n      );\n      const clientSecret = await this.setClientSecret(\n        clientIdClientSecret[1],\n        vaultTimeoutAction,\n        vaultTimeout,\n        userId,\n      );\n      newTokens.clientIdSecretPair = [clientId, clientSecret];\n    }\n    return newTokens;\n  }\n\n  private async getAccessTokenKey(userId: UserId): Promise<AccessTokenKey | null> {\n    const accessTokenKeyB64 = await this.secureStorageService.get<\n      ReturnType<SymmetricCryptoKey[\"toJSON\"]>\n    >(`${userId}${this.accessTokenKeySecureStorageKey}`, this.getSecureStorageOptions(userId));\n\n    if (!accessTokenKeyB64) {\n      return null;\n    }\n\n    const accessTokenKey = SymmetricCryptoKey.fromJSON(accessTokenKeyB64) as AccessTokenKey;\n    return accessTokenKey;\n  }\n\n  private async createAndSaveAccessTokenKey(userId: UserId): Promise<AccessTokenKey> {\n    const newAccessTokenKey = (await this.keyGenerationService.createKey(512)) as AccessTokenKey;\n\n    await this.secureStorageService.save<AccessTokenKey>(\n      `${userId}${this.accessTokenKeySecureStorageKey}`,\n      newAccessTokenKey,\n      this.getSecureStorageOptions(userId),\n    );\n\n    // We are having intermittent issues with access token keys not saving into secure storage on windows 10/11.\n    // So, let's add a check to ensure we can read the value after writing it.\n    const accessTokenKey = await this.getAccessTokenKey(userId);\n\n    if (!accessTokenKey) {\n      throw new Error(\"New Access token key unable to be retrieved from secure storage.\");\n    }\n\n    return newAccessTokenKey;\n  }\n\n  private async clearAccessTokenKey(userId: UserId): Promise<void> {\n    await this.secureStorageService.remove(\n      `${userId}${this.accessTokenKeySecureStorageKey}`,\n      this.getSecureStorageOptions(userId),\n    );\n  }\n\n  private async getOrCreateAccessTokenKey(userId: UserId): Promise<AccessTokenKey> {\n    if (!this.platformSupportsSecureStorage) {\n      throw new Error(\"Platform does not support secure storage. Cannot obtain access token key.\");\n    }\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot obtain access token key.\");\n    }\n\n    // First see if we have an accessTokenKey in secure storage and return it if we do\n    // Note: retrieving/saving data from/to secure storage on linux will throw if the\n    // distro doesn't have a secure storage provider\n    let accessTokenKey: AccessTokenKey = await this.getAccessTokenKey(userId);\n\n    if (!accessTokenKey) {\n      // Otherwise, create a new one and save it to secure storage, then return it\n      accessTokenKey = await this.createAndSaveAccessTokenKey(userId);\n    }\n\n    return accessTokenKey;\n  }\n\n  private async encryptAccessToken(accessToken: string, userId: UserId): Promise<EncString> {\n    const accessTokenKey = await this.getOrCreateAccessTokenKey(userId);\n\n    return await this.encryptService.encrypt(accessToken, accessTokenKey);\n  }\n\n  private async decryptAccessToken(\n    accessTokenKey: AccessTokenKey,\n    encryptedAccessToken: EncString,\n  ): Promise<string | null> {\n    if (!accessTokenKey) {\n      throw new Error(\n        \"decryptAccessToken: Access token key required. Cannot decrypt access token.\",\n      );\n    }\n\n    const decryptedAccessToken = await this.encryptService.decryptToUtf8(\n      encryptedAccessToken,\n      accessTokenKey,\n    );\n\n    return decryptedAccessToken;\n  }\n\n  /**\n   * Internal helper for set access token which always requires user id.\n   * This is useful because setTokens always will have a user id from the access token whereas\n   * the public setAccessToken method does not.\n   */\n  private async _setAccessToken(\n    accessToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId: UserId,\n  ): Promise<string> {\n    const storageLocation = await this.determineStorageLocation(\n      vaultTimeoutAction,\n      vaultTimeout,\n      true,\n    );\n\n    switch (storageLocation) {\n      case TokenStorageLocation.SecureStorage: {\n        // Secure storage implementations have variable length limitations (Windows), so we cannot\n        // store the access token directly. Instead, we encrypt with accessTokenKey and store that\n        // in secure storage.\n\n        let decryptedAccessToken: string = null;\n\n        try {\n          const encryptedAccessToken: EncString = await this.encryptAccessToken(\n            accessToken,\n            userId,\n          );\n\n          // Save the encrypted access token to disk\n          await this.singleUserStateProvider\n            .get(userId, ACCESS_TOKEN_DISK)\n            .update((_) => encryptedAccessToken.encryptedString);\n\n          // If we've successfully stored the encrypted access token to disk, we can return the decrypted access token\n          // so that the caller can use it immediately.\n          decryptedAccessToken = accessToken;\n\n          // TODO: PM-6408\n          // 2024-02-20: Remove access token from memory so that we migrate to encrypt the access token over time.\n          // Remove this call to remove the access token from memory after 3 months.\n          await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).update((_) => null);\n        } catch (error) {\n          this.logService.error(\n            `SetAccessToken: storing encrypted access token in secure storage failed. Falling back to disk storage.`,\n            error,\n          );\n\n          // Fall back to disk storage for unecrypted access token\n          decryptedAccessToken = await this.singleUserStateProvider\n            .get(userId, ACCESS_TOKEN_DISK)\n            .update((_) => accessToken);\n        }\n\n        return decryptedAccessToken;\n      }\n      case TokenStorageLocation.Disk:\n        // Access token stored on disk unencrypted as platform does not support secure storage\n        return await this.singleUserStateProvider\n          .get(userId, ACCESS_TOKEN_DISK)\n          .update((_) => accessToken);\n      case TokenStorageLocation.Memory:\n        // Access token stored in memory due to vault timeout settings\n        return await this.singleUserStateProvider\n          .get(userId, ACCESS_TOKEN_MEMORY)\n          .update((_) => accessToken);\n    }\n  }\n\n  async setAccessToken(\n    accessToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n  ): Promise<string> {\n    if (!accessToken) {\n      throw new Error(\"Access token is required.\");\n    }\n    const userId: UserId = await this.getUserIdFromAccessToken(accessToken);\n\n    // If we don't have a user id, we can't save the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot save access token.\");\n    }\n\n    // Can't check for falsey b/c 0 is a valid value\n    if (vaultTimeout == null) {\n      throw new Error(\"Vault Timeout is required.\");\n    }\n\n    if (vaultTimeoutAction == null) {\n      throw new Error(\"Vault Timeout Action is required.\");\n    }\n\n    return await this._setAccessToken(accessToken, vaultTimeoutAction, vaultTimeout, userId);\n  }\n\n  async clearAccessToken(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    // If we don't have a user id, we can't clear the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot clear access token.\");\n    }\n\n    // TODO: re-eval this implementation once we get shared key definitions for vault timeout and vault timeout action data.\n    // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n    // but we can simply clear all locations to avoid the need to require those parameters.\n\n    if (this.platformSupportsSecureStorage) {\n      // Always clear the access token key when clearing the access token\n      // The next set of the access token will create a new access token key\n      await this.clearAccessTokenKey(userId);\n    }\n\n    // Platform doesn't support secure storage, so use state provider implementation\n    await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_DISK).update((_) => null);\n    await this.singleUserStateProvider.get(userId, ACCESS_TOKEN_MEMORY).update((_) => null);\n  }\n\n  async getAccessToken(userId?: UserId): Promise<string | null> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      return null;\n    }\n\n    // Try to get the access token from memory\n    const accessTokenMemory = await this.getStateValueByUserIdAndKeyDef(\n      userId,\n      ACCESS_TOKEN_MEMORY,\n    );\n    if (accessTokenMemory != null) {\n      return accessTokenMemory;\n    }\n\n    // If memory is null, read from disk\n    const accessTokenDisk = await this.getStateValueByUserIdAndKeyDef(userId, ACCESS_TOKEN_DISK);\n    if (!accessTokenDisk) {\n      return null;\n    }\n\n    if (this.platformSupportsSecureStorage) {\n      let accessTokenKey: AccessTokenKey;\n      try {\n        accessTokenKey = await this.getAccessTokenKey(userId);\n      } catch (error) {\n        if (EncString.isSerializedEncString(accessTokenDisk)) {\n          this.logService.error(\n            \"Access token key retrieval failed. Unable to decrypt encrypted access token. Logging user out.\",\n            error,\n          );\n          await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n          return null;\n        }\n\n        // If the access token key is not found, but the access token is unencrypted then\n        // this indicates that this is the pre-migration state where the access token\n        // was stored unencrypted on disk. We can return the access token as is.\n        // Note: this is likely to only be hit for linux users who don't\n        // have a secure storage provider configured.\n        return accessTokenDisk;\n      }\n\n      if (!accessTokenKey) {\n        if (EncString.isSerializedEncString(accessTokenDisk)) {\n          // The access token is encrypted but we don't have the key to decrypt it for\n          // whatever reason so we have to log the user out.\n          this.logService.error(\n            \"Access token key not found to decrypt encrypted access token. Logging user out.\",\n          );\n\n          await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n\n          return null;\n        }\n\n        // We know this is an unencrypted access token\n        return accessTokenDisk;\n      }\n\n      try {\n        const encryptedAccessTokenEncString = new EncString(accessTokenDisk as EncryptedString);\n\n        const decryptedAccessToken = await this.decryptAccessToken(\n          accessTokenKey,\n          encryptedAccessTokenEncString,\n        );\n        return decryptedAccessToken;\n      } catch (error) {\n        // If an error occurs during decryption, logout and then return null.\n        // We don't try to recover here since we'd like to know\n        // if access token and key are getting out of sync.\n        this.logService.error(`Failed to decrypt access token`, error);\n\n        await this.logoutCallback(\"accessTokenUnableToBeDecrypted\", userId);\n\n        return null;\n      }\n    }\n    return accessTokenDisk;\n  }\n\n  // Private because we only ever set the refresh token when also setting the access token\n  // and we need the user id from the access token to save to secure storage\n  private async setRefreshToken(\n    refreshToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId: UserId,\n  ): Promise<string> {\n    // If we don't have a user id, we can't save the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot save refresh token.\");\n    }\n\n    // Can't check for falsey b/c 0 is a valid value\n    if (vaultTimeout == null) {\n      throw new Error(\"Vault Timeout is required.\");\n    }\n\n    if (vaultTimeoutAction == null) {\n      throw new Error(\"Vault Timeout Action is required.\");\n    }\n\n    const storageLocation = await this.determineStorageLocation(\n      vaultTimeoutAction,\n      vaultTimeout,\n      true,\n    );\n\n    switch (storageLocation) {\n      case TokenStorageLocation.SecureStorage: {\n        let decryptedRefreshToken: string = null;\n\n        try {\n          await this.saveStringToSecureStorage(\n            userId,\n            this.refreshTokenSecureStorageKey,\n            refreshToken,\n          );\n\n          // Check if the refresh token was able to be saved to secure storage by reading it\n          // immediately after setting it. This is needed due to intermittent silent failures on Windows 10/11.\n          const refreshTokenSecureStorage = await this.getStringFromSecureStorage(\n            userId,\n            this.refreshTokenSecureStorageKey,\n          );\n\n          // Only throw if the refresh token was not saved to secure storage\n          // If we only check for a nullish value out of secure storage without considering the input value,\n          // then we would end up falling back to disk storage if the input value was null.\n          if (refreshToken !== null && !refreshTokenSecureStorage) {\n            throw new Error(\"Refresh token failed to save to secure storage.\");\n          }\n\n          // If we've successfully stored the encrypted refresh token, we can return the decrypted refresh token\n          // so that the caller can use it immediately.\n          decryptedRefreshToken = refreshToken;\n\n          // TODO: PM-6408\n          // 2024-02-20: Remove refresh token from memory and disk so that we migrate to secure storage over time.\n          // Remove these 2 calls to remove the refresh token from memory and disk after 3 months.\n          await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_DISK).update((_) => null);\n          await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_MEMORY).update((_) => null);\n        } catch (error) {\n          // This case could be hit for both Linux users who don't have secure storage configured\n          // or for Windows users who have intermittent issues with secure storage.\n          this.logService.error(\n            `SetRefreshToken: storing refresh token in secure storage failed. Falling back to disk storage.`,\n            error,\n          );\n\n          // Fall back to disk storage for refresh token\n          decryptedRefreshToken = await this.singleUserStateProvider\n            .get(userId, REFRESH_TOKEN_DISK)\n            .update((_) => refreshToken);\n        }\n\n        return decryptedRefreshToken;\n      }\n      case TokenStorageLocation.Disk:\n        return await this.singleUserStateProvider\n          .get(userId, REFRESH_TOKEN_DISK)\n          .update((_) => refreshToken);\n\n      case TokenStorageLocation.Memory:\n        return await this.singleUserStateProvider\n          .get(userId, REFRESH_TOKEN_MEMORY)\n          .update((_) => refreshToken);\n    }\n  }\n\n  async getRefreshToken(userId?: UserId): Promise<string | null> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      return null;\n    }\n\n    // pre-secure storage migration:\n    // Always read memory first b/c faster\n    const refreshTokenMemory = await this.getStateValueByUserIdAndKeyDef(\n      userId,\n      REFRESH_TOKEN_MEMORY,\n    );\n\n    if (refreshTokenMemory != null) {\n      return refreshTokenMemory;\n    }\n\n    // if memory is null, read from disk and then secure storage\n    const refreshTokenDisk = await this.getStateValueByUserIdAndKeyDef(userId, REFRESH_TOKEN_DISK);\n\n    if (refreshTokenDisk != null) {\n      // This handles the scenario pre-secure storage migration where the refresh token was stored on disk.\n      return refreshTokenDisk;\n    }\n\n    if (this.platformSupportsSecureStorage) {\n      try {\n        const refreshTokenSecureStorage = await this.getStringFromSecureStorage(\n          userId,\n          this.refreshTokenSecureStorageKey,\n        );\n\n        if (refreshTokenSecureStorage != null) {\n          return refreshTokenSecureStorage;\n        }\n\n        this.logService.error(\n          \"Refresh token not found in secure storage. Access token will fail to refresh upon expiration or manual refresh.\",\n        );\n      } catch (error) {\n        // This case will be hit for Linux users who don't have secure storage configured.\n\n        this.logService.error(`Failed to retrieve refresh token from secure storage`, error);\n\n        await this.logoutCallback(\"refreshTokenSecureStorageRetrievalFailure\", userId);\n      }\n    }\n\n    return null;\n  }\n\n  private async clearRefreshToken(userId: UserId): Promise<void> {\n    // If we don't have a user id, we can't clear the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot clear refresh token.\");\n    }\n\n    // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n    // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n    // but we can simply clear all locations to avoid the need to require those parameters\n\n    if (this.platformSupportsSecureStorage) {\n      await this.secureStorageService.remove(\n        `${userId}${this.refreshTokenSecureStorageKey}`,\n        this.getSecureStorageOptions(userId),\n      );\n    }\n\n    // Platform doesn't support secure storage, so use state provider implementation\n    await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_MEMORY).update((_) => null);\n    await this.singleUserStateProvider.get(userId, REFRESH_TOKEN_DISK).update((_) => null);\n  }\n\n  async setClientId(\n    clientId: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId?: UserId,\n  ): Promise<string> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    // If we don't have a user id, we can't save the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot save client id.\");\n    }\n\n    // Can't check for falsey b/c 0 is a valid value\n    if (vaultTimeout == null) {\n      throw new Error(\"Vault Timeout is required.\");\n    }\n\n    if (vaultTimeoutAction == null) {\n      throw new Error(\"Vault Timeout Action is required.\");\n    }\n\n    const storageLocation = await this.determineStorageLocation(\n      vaultTimeoutAction,\n      vaultTimeout,\n      false, // don't use secure storage for client id\n    );\n\n    if (storageLocation === TokenStorageLocation.Disk) {\n      return await this.singleUserStateProvider\n        .get(userId, API_KEY_CLIENT_ID_DISK)\n        .update((_) => clientId);\n    } else if (storageLocation === TokenStorageLocation.Memory) {\n      return await this.singleUserStateProvider\n        .get(userId, API_KEY_CLIENT_ID_MEMORY)\n        .update((_) => clientId);\n    }\n  }\n\n  async getClientId(userId?: UserId): Promise<string | undefined> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      return undefined;\n    }\n\n    // Always read memory first b/c faster\n    const apiKeyClientIdMemory = await this.getStateValueByUserIdAndKeyDef(\n      userId,\n      API_KEY_CLIENT_ID_MEMORY,\n    );\n\n    if (apiKeyClientIdMemory != null) {\n      return apiKeyClientIdMemory;\n    }\n\n    // if memory is null, read from disk\n    return await this.getStateValueByUserIdAndKeyDef(userId, API_KEY_CLIENT_ID_DISK);\n  }\n\n  private async clearClientId(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    // If we don't have a user id, we can't clear the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot clear client id.\");\n    }\n\n    // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n    // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n    // but we can simply clear both locations to avoid the need to require those parameters\n\n    // Platform doesn't support secure storage, so use state provider implementation\n    await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_ID_MEMORY).update((_) => null);\n    await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_ID_DISK).update((_) => null);\n  }\n\n  async setClientSecret(\n    clientSecret: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId?: UserId,\n  ): Promise<string> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot save client secret.\");\n    }\n\n    // Can't check for falsey b/c 0 is a valid value\n    if (vaultTimeout == null) {\n      throw new Error(\"Vault Timeout is required.\");\n    }\n\n    if (vaultTimeoutAction == null) {\n      throw new Error(\"Vault Timeout Action is required.\");\n    }\n\n    const storageLocation = await this.determineStorageLocation(\n      vaultTimeoutAction,\n      vaultTimeout,\n      false, // don't use secure storage for client secret\n    );\n\n    if (storageLocation === TokenStorageLocation.Disk) {\n      return await this.singleUserStateProvider\n        .get(userId, API_KEY_CLIENT_SECRET_DISK)\n        .update((_) => clientSecret);\n    } else if (storageLocation === TokenStorageLocation.Memory) {\n      return await this.singleUserStateProvider\n        .get(userId, API_KEY_CLIENT_SECRET_MEMORY)\n        .update((_) => clientSecret);\n    }\n  }\n\n  async getClientSecret(userId?: UserId): Promise<string | undefined> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      return undefined;\n    }\n\n    // Always read memory first b/c faster\n    const apiKeyClientSecretMemory = await this.getStateValueByUserIdAndKeyDef(\n      userId,\n      API_KEY_CLIENT_SECRET_MEMORY,\n    );\n\n    if (apiKeyClientSecretMemory != null) {\n      return apiKeyClientSecretMemory;\n    }\n\n    // if memory is null, read from disk\n    return await this.getStateValueByUserIdAndKeyDef(userId, API_KEY_CLIENT_SECRET_DISK);\n  }\n\n  private async clearClientSecret(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    // If we don't have a user id, we can't clear the value\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot clear client secret.\");\n    }\n\n    // TODO: re-eval this once we get shared key definitions for vault timeout and vault timeout action data.\n    // we can't determine storage location w/out vaultTimeoutAction and vaultTimeout\n    // but we can simply clear both locations to avoid the need to require those parameters\n\n    // Platform doesn't support secure storage, so use state provider implementation\n    await this.singleUserStateProvider\n      .get(userId, API_KEY_CLIENT_SECRET_MEMORY)\n      .update((_) => null);\n    await this.singleUserStateProvider.get(userId, API_KEY_CLIENT_SECRET_DISK).update((_) => null);\n  }\n\n  async setTwoFactorToken(email: string, twoFactorToken: string): Promise<void> {\n    await this.emailTwoFactorTokenRecordGlobalState.update((emailTwoFactorTokenRecord) => {\n      emailTwoFactorTokenRecord ??= {};\n\n      emailTwoFactorTokenRecord[email] = twoFactorToken;\n      return emailTwoFactorTokenRecord;\n    });\n  }\n\n  async getTwoFactorToken(email: string): Promise<string | null> {\n    const emailTwoFactorTokenRecord: Record<string, string> = await firstValueFrom(\n      this.emailTwoFactorTokenRecordGlobalState.state$,\n    );\n\n    if (!emailTwoFactorTokenRecord) {\n      return null;\n    }\n\n    return emailTwoFactorTokenRecord[email];\n  }\n\n  async clearTwoFactorToken(email: string): Promise<void> {\n    await this.emailTwoFactorTokenRecordGlobalState.update((emailTwoFactorTokenRecord) => {\n      emailTwoFactorTokenRecord ??= {};\n      delete emailTwoFactorTokenRecord[email];\n      return emailTwoFactorTokenRecord;\n    });\n  }\n\n  // TODO: stop accepting optional userIds\n  async clearTokens(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot clear tokens.\");\n    }\n\n    await Promise.all([\n      this.clearAccessToken(userId),\n      this.clearRefreshToken(userId),\n      this.clearClientId(userId),\n      this.clearClientSecret(userId),\n    ]);\n  }\n\n  // jwthelper methods\n  // ref https://github.com/auth0/angular-jwt/blob/master/src/angularJwt/services/jwt.js\n\n  async decodeAccessToken(tokenOrUserId?: string | UserId): Promise<DecodedAccessToken> {\n    let token = tokenOrUserId as string;\n    if (Utils.isGuid(tokenOrUserId)) {\n      token = await this.getAccessToken(tokenOrUserId as UserId);\n    } else {\n      token ??= await this.getAccessToken();\n    }\n\n    if (token == null) {\n      throw new Error(\"Access token not found.\");\n    }\n\n    return decodeJwtTokenToJson(token) as DecodedAccessToken;\n  }\n\n  // TODO: PM-6678- tech debt - consider consolidating the return types of all these access\n  // token data retrieval methods to return null if something goes wrong instead of throwing an error.\n\n  async getTokenExpirationDate(): Promise<Date | null> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    // per RFC, exp claim is optional but if it exists, it should be a number\n    if (!decoded || typeof decoded.exp !== \"number\") {\n      return null;\n    }\n\n    // The 0 in Date(0) is the key; it sets the date to the epoch\n    const expirationDate = new Date(0);\n    expirationDate.setUTCSeconds(decoded.exp);\n    return expirationDate;\n  }\n\n  async tokenSecondsRemaining(offsetSeconds = 0): Promise<number> {\n    const date = await this.getTokenExpirationDate();\n    if (date == null) {\n      return 0;\n    }\n\n    const msRemaining = date.valueOf() - (new Date().valueOf() + offsetSeconds * 1000);\n    return Math.round(msRemaining / 1000);\n  }\n\n  async tokenNeedsRefresh(minutes = 5): Promise<boolean> {\n    const sRemaining = await this.tokenSecondsRemaining();\n    return sRemaining < 60 * minutes;\n  }\n\n  async getUserId(): Promise<UserId> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.sub !== \"string\") {\n      throw new Error(\"No user id found\");\n    }\n\n    return decoded.sub as UserId;\n  }\n\n  private async getUserIdFromAccessToken(accessToken: string): Promise<UserId> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken(accessToken);\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.sub !== \"string\") {\n      throw new Error(\"No user id found\");\n    }\n\n    return decoded.sub as UserId;\n  }\n\n  async getEmail(): Promise<string> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.email !== \"string\") {\n      throw new Error(\"No email found\");\n    }\n\n    return decoded.email;\n  }\n\n  async getEmailVerified(): Promise<boolean> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.email_verified !== \"boolean\") {\n      throw new Error(\"No email verification found\");\n    }\n\n    return decoded.email_verified;\n  }\n\n  async getName(): Promise<string> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.name !== \"string\") {\n      return null;\n    }\n\n    return decoded.name;\n  }\n\n  async getIssuer(): Promise<string> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken();\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    if (!decoded || typeof decoded.iss !== \"string\") {\n      throw new Error(\"No issuer found\");\n    }\n\n    return decoded.iss;\n  }\n\n  async getIsExternal(userId: UserId): Promise<boolean> {\n    let decoded: DecodedAccessToken;\n    try {\n      decoded = await this.decodeAccessToken(userId);\n    } catch (error) {\n      throw new Error(\"Failed to decode access token: \" + error.message);\n    }\n\n    return Array.isArray(decoded.amr) && decoded.amr.includes(\"external\");\n  }\n\n  async getSecurityStamp(userId?: UserId): Promise<string | null> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot get security stamp.\");\n    }\n\n    const securityStamp = await this.getStateValueByUserIdAndKeyDef(userId, SECURITY_STAMP_MEMORY);\n\n    return securityStamp;\n  }\n\n  async setSecurityStamp(securityStamp: string, userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.activeUserIdGlobalState.state$);\n\n    if (!userId) {\n      throw new Error(\"User id not found. Cannot set security stamp.\");\n    }\n\n    await this.singleUserStateProvider\n      .get(userId, SECURITY_STAMP_MEMORY)\n      .update((_) => securityStamp);\n  }\n\n  private async getStateValueByUserIdAndKeyDef(\n    userId: UserId,\n    storageLocation: UserKeyDefinition<string>,\n  ): Promise<string | undefined> {\n    // read from single user state provider\n    return await firstValueFrom(this.singleUserStateProvider.get(userId, storageLocation).state$);\n  }\n\n  private async determineStorageLocation(\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    useSecureStorage: boolean,\n  ): Promise<TokenStorageLocation> {\n    if (vaultTimeoutAction == null) {\n      throw new Error(\n        \"TokenService - determineStorageLocation: We expect the vault timeout action to always exist at this point.\",\n      );\n    }\n\n    if (vaultTimeout == null) {\n      throw new Error(\n        \"TokenService - determineStorageLocation: We expect the vault timeout to always exist at this point.\",\n      );\n    }\n\n    if (\n      vaultTimeoutAction === VaultTimeoutAction.LogOut &&\n      vaultTimeout !== VaultTimeoutStringType.Never\n    ) {\n      return TokenStorageLocation.Memory;\n    } else {\n      if (useSecureStorage && this.platformSupportsSecureStorage) {\n        return TokenStorageLocation.SecureStorage;\n      }\n\n      return TokenStorageLocation.Disk;\n    }\n  }\n\n  private async saveStringToSecureStorage(\n    userId: UserId,\n    storageKey: string,\n    value: string,\n  ): Promise<void> {\n    await this.secureStorageService.save<string>(\n      `${userId}${storageKey}`,\n      value,\n      this.getSecureStorageOptions(userId),\n    );\n  }\n\n  private async getStringFromSecureStorage(\n    userId: UserId,\n    storageKey: string,\n  ): Promise<string | null> {\n    // If we have a user ID, read from secure storage.\n    return await this.secureStorageService.get<string>(\n      `${userId}${storageKey}`,\n      this.getSecureStorageOptions(userId),\n    );\n  }\n\n  private getSecureStorageOptions(userId: UserId): StorageOptions {\n    return {\n      storageLocation: StorageLocation.Disk,\n      useSecureStorage: true,\n      userId: userId,\n    };\n  }\n}\n","export class VerifyOTPRequest {\n  OTP: string;\n\n  constructor(OTP: string) {\n    this.OTP = OTP;\n  }\n}\n","import { PrfKey } from \"../../../../types/key\";\nimport { WebAuthnLoginAssertionResponseRequest } from \"../../../services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\nexport class WebAuthnLoginCredentialAssertionView {\n  constructor(\n    readonly token: string,\n    readonly deviceResponse: WebAuthnLoginAssertionResponseRequest,\n    readonly prfKey?: PrfKey,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable } from \"rxjs\";\n\nimport {\n  BADGE_SETTINGS_DISK,\n  ActiveUserState,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\n\nconst ENABLE_BADGE_COUNTER = new UserKeyDefinition(BADGE_SETTINGS_DISK, \"enableBadgeCounter\", {\n  deserializer: (value: boolean) => value ?? true,\n  clearOn: [],\n});\n\nexport abstract class BadgeSettingsServiceAbstraction {\n  enableBadgeCounter$: Observable<boolean>;\n  setEnableBadgeCounter: (newValue: boolean) => Promise<void>;\n}\n\nexport class BadgeSettingsService implements BadgeSettingsServiceAbstraction {\n  private enableBadgeCounterState: ActiveUserState<boolean>;\n  readonly enableBadgeCounter$: Observable<boolean>;\n\n  constructor(private stateProvider: StateProvider) {\n    this.enableBadgeCounterState = this.stateProvider.getActive(ENABLE_BADGE_COUNTER);\n    this.enableBadgeCounter$ = this.enableBadgeCounterState.state$.pipe(map((x) => x ?? true));\n  }\n\n  async setEnableBadgeCounter(newValue: boolean): Promise<void> {\n    await this.enableBadgeCounterState.update(() => newValue);\n  }\n}\n","import { map, Observable, combineLatest, concatMap } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { BILLING_DISK, StateProvider, UserKeyDefinition } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport {\n  BillingAccountProfile,\n  BillingAccountProfileStateService,\n} from \"../../abstractions/account/billing-account-profile-state.service\";\n\nexport const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION = new UserKeyDefinition<BillingAccountProfile>(\n  BILLING_DISK,\n  \"accountProfile\",\n  {\n    deserializer: (billingAccountProfile) => billingAccountProfile,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport class DefaultBillingAccountProfileStateService implements BillingAccountProfileStateService {\n  constructor(\n    private readonly stateProvider: StateProvider,\n    private readonly platformUtilsService: PlatformUtilsService,\n    private readonly apiService: ApiService,\n  ) {}\n\n  hasPremiumFromAnyOrganization$(userId: UserId): Observable<boolean> {\n    return this.stateProvider\n      .getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)\n      .state$.pipe(map((profile) => !!profile?.hasPremiumFromAnyOrganization));\n  }\n\n  hasPremiumPersonally$(userId: UserId): Observable<boolean> {\n    return this.stateProvider\n      .getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)\n      .state$.pipe(map((profile) => !!profile?.hasPremiumPersonally));\n  }\n\n  hasPremiumFromAnySource$(userId: UserId): Observable<boolean> {\n    return this.stateProvider\n      .getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION)\n      .state$.pipe(\n        map(\n          (profile) =>\n            profile?.hasPremiumFromAnyOrganization === true ||\n            profile?.hasPremiumPersonally === true,\n        ),\n      );\n  }\n\n  async setHasPremium(\n    hasPremiumPersonally: boolean,\n    hasPremiumFromAnyOrganization: boolean,\n    userId: UserId,\n  ): Promise<void> {\n    await this.stateProvider.getUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION).update((_) => {\n      return {\n        hasPremiumPersonally: hasPremiumPersonally,\n        hasPremiumFromAnyOrganization: hasPremiumFromAnyOrganization,\n      };\n    });\n  }\n\n  canViewSubscription$(userId: UserId): Observable<boolean> {\n    return combineLatest([\n      this.hasPremiumPersonally$(userId),\n      this.hasPremiumFromAnyOrganization$(userId),\n    ]).pipe(\n      concatMap(async ([hasPremiumPersonally, hasPremiumFromOrg]) => {\n        const isCloud = !this.platformUtilsService.isSelfHost();\n\n        let billing = null;\n        if (isCloud) {\n          billing = await this.apiService.getUserBillingHistory();\n        }\n\n        const cloudAndBillingHistory = isCloud && !billing?.hasNoHistory;\n        return hasPremiumPersonally || !hasPremiumFromOrg || cloudAndBillingHistory;\n      }),\n    );\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class ProviderOrganizationResponse extends BaseResponse {\n  id: string;\n  providerId: string;\n  organizationId: string;\n  key: string;\n  settings: string;\n  creationDate: string;\n  revisionDate: string;\n  userCount: number;\n  seats?: number;\n  occupiedSeats?: number;\n  remainingSeats?: number;\n  plan?: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.providerId = this.getResponseProperty(\"ProviderId\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.settings = this.getResponseProperty(\"Settings\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n    this.userCount = this.getResponseProperty(\"UserCount\");\n    this.seats = this.getResponseProperty(\"Seats\");\n    this.occupiedSeats = this.getResponseProperty(\"OccupiedSeats\");\n    this.remainingSeats = this.getResponseProperty(\"RemainingSeats\");\n    this.plan = this.getResponseProperty(\"Plan\");\n  }\n}\n\nexport class ProviderOrganizationOrganizationDetailsResponse extends ProviderOrganizationResponse {\n  organizationName: string;\n\n  constructor(response: any) {\n    super(response);\n    this.organizationName = this.getResponseProperty(\"OrganizationName\");\n  }\n}\n","import { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class PaymentSourceResponse extends BaseResponse {\n  type: PaymentMethodType;\n  description: string;\n  needsVerification: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.type = this.getResponseProperty(\"Type\");\n    this.description = this.getResponseProperty(\"Description\");\n    this.needsVerification = this.getResponseProperty(\"NeedsVerification\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { PaymentSourceResponse } from \"./payment-source.response\";\nimport { TaxInfoResponse } from \"./tax-info.response\";\n\nexport class PaymentMethodResponse extends BaseResponse {\n  accountCredit: number;\n  paymentSource?: PaymentSourceResponse;\n  subscriptionStatus?: string;\n  taxInformation?: TaxInfoResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.accountCredit = this.getResponseProperty(\"AccountCredit\");\n\n    const paymentSource = this.getResponseProperty(\"PaymentSource\");\n    if (paymentSource) {\n      this.paymentSource = new PaymentSourceResponse(paymentSource);\n    }\n\n    this.subscriptionStatus = this.getResponseProperty(\"SubscriptionStatus\");\n\n    const taxInformation = this.getResponseProperty(\"TaxInformation\");\n    if (taxInformation) {\n      this.taxInformation = new TaxInfoResponse(taxInformation);\n    }\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationBillingMetadataResponse extends BaseResponse {\n  isEligibleForSelfHost: boolean;\n  isManaged: boolean;\n  isOnSecretsManagerStandalone: boolean;\n  isSubscriptionUnpaid: boolean;\n  hasSubscription: boolean;\n  hasOpenInvoice: boolean;\n  invoiceDueDate: Date | null;\n  invoiceCreatedDate: Date | null;\n  subPeriodEndDate: Date | null;\n  isSubscriptionCanceled: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.isEligibleForSelfHost = this.getResponseProperty(\"IsEligibleForSelfHost\");\n    this.isManaged = this.getResponseProperty(\"IsManaged\");\n    this.isOnSecretsManagerStandalone = this.getResponseProperty(\"IsOnSecretsManagerStandalone\");\n    this.isSubscriptionUnpaid = this.getResponseProperty(\"IsSubscriptionUnpaid\");\n    this.hasSubscription = this.getResponseProperty(\"HasSubscription\");\n    this.hasOpenInvoice = this.getResponseProperty(\"HasOpenInvoice\");\n\n    this.invoiceDueDate = this.parseDate(this.getResponseProperty(\"InvoiceDueDate\"));\n    this.invoiceCreatedDate = this.parseDate(this.getResponseProperty(\"InvoiceCreatedDate\"));\n    this.subPeriodEndDate = this.parseDate(this.getResponseProperty(\"SubPeriodEndDate\"));\n    this.isSubscriptionCanceled = this.getResponseProperty(\"IsSubscriptionCanceled\");\n  }\n\n  private parseDate(dateString: any): Date | null {\n    return dateString ? new Date(dateString) : null;\n  }\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class SubscriptionSuspensionResponse extends BaseResponse {\n  suspensionDate: string;\n  unpaidPeriodEndDate: string;\n  gracePeriod: number;\n\n  constructor(response: any) {\n    super(response);\n\n    this.suspensionDate = this.getResponseProperty(\"suspensionDate\");\n    this.unpaidPeriodEndDate = this.getResponseProperty(\"unpaidPeriodEndDate\");\n    this.gracePeriod = this.getResponseProperty(\"gracePeriod\");\n  }\n}\n","import { ProviderType } from \"@bitwarden/common/admin-console/enums\";\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { SubscriptionSuspensionResponse } from \"@bitwarden/common/billing/models/response/subscription-suspension.response\";\nimport { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\n\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class ProviderSubscriptionResponse extends BaseResponse {\n  status: string;\n  currentPeriodEndDate: string;\n  discountPercentage?: number | null;\n  collectionMethod: string;\n  plans: ProviderPlanResponse[] = [];\n  accountCredit: number;\n  taxInformation?: TaxInfoResponse;\n  cancelAt?: string;\n  suspension?: SubscriptionSuspensionResponse;\n  providerType: ProviderType;\n\n  constructor(response: any) {\n    super(response);\n    this.status = this.getResponseProperty(\"status\");\n    this.currentPeriodEndDate = this.getResponseProperty(\"currentPeriodEndDate\");\n    this.discountPercentage = this.getResponseProperty(\"discountPercentage\");\n    this.collectionMethod = this.getResponseProperty(\"collectionMethod\");\n    const plans = this.getResponseProperty(\"plans\");\n    if (plans != null) {\n      this.plans = plans.map((plan: any) => new ProviderPlanResponse(plan));\n    }\n    this.accountCredit = this.getResponseProperty(\"accountCredit\");\n    const taxInformation = this.getResponseProperty(\"taxInformation\");\n    if (taxInformation != null) {\n      this.taxInformation = new TaxInfoResponse(taxInformation);\n    }\n    this.cancelAt = this.getResponseProperty(\"cancelAt\");\n    const suspension = this.getResponseProperty(\"suspension\");\n    if (suspension != null) {\n      this.suspension = new SubscriptionSuspensionResponse(suspension);\n    }\n    this.providerType = this.getResponseProperty(\"providerType\");\n  }\n}\n\nexport class ProviderPlanResponse extends BaseResponse {\n  planName: string;\n  seatMinimum: number;\n  assignedSeats: number;\n  purchasedSeats: number;\n  cost: number;\n  cadence: string;\n  type: PlanType;\n  productTier: ProductTierType;\n\n  constructor(response: any) {\n    super(response);\n    this.planName = this.getResponseProperty(\"PlanName\");\n    this.seatMinimum = this.getResponseProperty(\"SeatMinimum\");\n    this.assignedSeats = this.getResponseProperty(\"AssignedSeats\");\n    this.purchasedSeats = this.getResponseProperty(\"PurchasedSeats\");\n    this.cost = this.getResponseProperty(\"Cost\");\n    this.cadence = this.getResponseProperty(\"Cadence\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.productTier = this.getResponseProperty(\"ProductTier\");\n  }\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class PreviewInvoiceResponse extends BaseResponse {\n  effectiveTaxRate: number;\n  taxableBaseAmount: number;\n  taxAmount: number;\n  totalAmount: number;\n\n  constructor(response: any) {\n    super(response);\n    this.effectiveTaxRate = this.getResponseProperty(\"EffectiveTaxRate\");\n    this.taxableBaseAmount = this.getResponseProperty(\"TaxableBaseAmount\");\n    this.taxAmount = this.getResponseProperty(\"TaxAmount\");\n    this.totalAmount = this.getResponseProperty(\"TotalAmount\");\n  }\n}\n","import { UserId } from \"../../../types/guid\";\nimport { ServerConfigResponse } from \"../../models/response/server-config.response\";\n\nexport abstract class ConfigApiServiceAbstraction {\n  /**\n   * Fetches the server configuration for the given user. If no user is provided, the configuration will not contain user-specific context.\n   */\n  abstract get(userId: UserId | undefined): Promise<ServerConfigResponse>;\n}\n","import { FileUploadType } from \"../../enums\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\n\nexport abstract class FileUploadService {\n  abstract upload(\n    uploadData: { url: string; fileUploadType: FileUploadType },\n    fileName: EncString,\n    encryptedFileData: EncArrayBuffer,\n    fileUploadMethods: FileUploadApiMethods,\n  ): Promise<void>;\n}\n\nexport type FileUploadApiMethods = {\n  postDirect: (fileData: FormData) => Promise<void>;\n  renewFileUploadUrl: () => Promise<string>;\n  rollback: () => Promise<void>;\n};\n","import { KdfConfig } from \"@bitwarden/key-management\";\n\nimport { CsprngArray } from \"../../types/csprng\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport abstract class KeyGenerationService {\n  /**\n   * Generates a key of the given length suitable for use in AES encryption\n   * @param bitLength Length of key.\n   * 256 bits = 32 bytes\n   * 512 bits = 64 bytes\n   * @returns Generated key.\n   */\n  abstract createKey(bitLength: 256 | 512): Promise<SymmetricCryptoKey>;\n  /**\n   * Generates key material from CSPRNG and derives a 64 byte key from it.\n   * Uses HKDF, see {@link https://datatracker.ietf.org/doc/html/rfc5869 RFC 5869}\n   * for details.\n   * @param bitLength Length of key material.\n   * @param purpose Purpose for the key derivation function.\n   * Different purposes results in different keys, even with the same material.\n   * @param salt Optional. If not provided will be generated from CSPRNG.\n   * @returns An object containing the salt, key material, and derived key.\n   */\n  abstract createKeyWithPurpose(\n    bitLength: 128 | 192 | 256 | 512,\n    purpose: string,\n    salt?: string,\n  ): Promise<{ salt: string; material: CsprngArray; derivedKey: SymmetricCryptoKey }>;\n  /**\n   * Derives a 64 byte key from key material.\n   * @remark The key material should be generated from {@link createKey}, or {@link createKeyWithPurpose}.\n   * Uses HKDF, see {@link https://datatracker.ietf.org/doc/html/rfc5869 RFC 5869} for details.\n   * @param material key material.\n   * @param salt Salt for the key derivation function.\n   * @param purpose Purpose for the key derivation function.\n   * Different purposes results in different keys, even with the same material.\n   * @returns 64 byte derived key.\n   */\n  abstract deriveKeyFromMaterial(\n    material: CsprngArray,\n    salt: string,\n    purpose: string,\n  ): Promise<SymmetricCryptoKey>;\n  /**\n   * Derives a 32 byte key from a password using a key derivation function.\n   * @param password Password to derive the key from.\n   * @param salt Salt for the key derivation function.\n   * @param kdfConfig Configuration for the key derivation function.\n   * @returns 32 byte derived key.\n   */\n  abstract deriveKeyFromPassword(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    kdfConfig: KdfConfig,\n  ): Promise<SymmetricCryptoKey>;\n\n  /**\n   * Derives a 64 byte key from a 32 byte key using a key derivation function.\n   * @param key 32 byte key.\n   * @returns 64 byte derived key.\n   */\n  abstract stretchKey(key: SymmetricCryptoKey): Promise<SymmetricCryptoKey>;\n}\n","import type { BitwardenClient } from \"@bitwarden/sdk-internal\";\n\n/**\n * Factory for creating SDK clients.\n */\nexport abstract class SdkClientFactory {\n  abstract createSdkClient(\n    ...args: ConstructorParameters<typeof BitwardenClient>\n  ): Promise<BitwardenClient>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\nexport type StorageUpdateType = \"save\" | \"remove\";\nexport type StorageUpdate = {\n  key: string;\n  updateType: StorageUpdateType;\n};\n\nexport interface ObservableStorageService {\n  /**\n   * Provides an {@link Observable} that represents a stream of updates that\n   * have happened in this storage service or in the storage this service provides\n   * an interface to.\n   */\n  get updates$(): Observable<StorageUpdate>;\n}\n\nexport abstract class AbstractStorageService {\n  abstract get valuesRequireDeserialization(): boolean;\n  abstract get<T>(key: string, options?: StorageOptions): Promise<T>;\n  abstract has(key: string, options?: StorageOptions): Promise<boolean>;\n  abstract save<T>(key: string, obj: T, options?: StorageOptions): Promise<void>;\n  abstract remove(key: string, options?: StorageOptions): Promise<void>;\n}\n","import { Account } from \"../models/domain/account\";\n\nexport class AccountFactory<T extends Account = Account> {\n  private accountConstructor: new (init: Partial<T>) => T;\n\n  constructor(accountConstructor: new (init: Partial<T>) => T) {\n    this.accountConstructor = accountConstructor;\n  }\n\n  create(args: Partial<T>) {\n    return new this.accountConstructor(args);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { GlobalState } from \"../models/domain/global-state\";\n\nexport class GlobalStateFactory<T extends GlobalState = GlobalState> {\n  private globalStateConstructor: new (init: Partial<T>) => T;\n\n  constructor(globalStateConstructor: new (init: Partial<T>) => T) {\n    this.globalStateConstructor = globalStateConstructor;\n  }\n\n  create(args?: Partial<T>) {\n    return new this.globalStateConstructor(args);\n  }\n}\n","import { Account } from \"../models/domain/account\";\nimport { GlobalState } from \"../models/domain/global-state\";\n\nimport { AccountFactory } from \"./account-factory\";\nimport { GlobalStateFactory } from \"./global-state-factory\";\n\nexport class StateFactory<\n  TGlobal extends GlobalState = GlobalState,\n  TAccount extends Account = Account,\n> {\n  private globalStateFactory: GlobalStateFactory<TGlobal>;\n  private accountFactory: AccountFactory<TAccount>;\n\n  constructor(\n    globalStateConstructor: new (init: Partial<TGlobal>) => TGlobal,\n    accountConstructor: new (init: Partial<TAccount>) => TAccount,\n  ) {\n    this.globalStateFactory = new GlobalStateFactory(globalStateConstructor);\n    this.accountFactory = new AccountFactory(accountConstructor);\n  }\n\n  createGlobal(args: Partial<TGlobal>): TGlobal {\n    return this.globalStateFactory.create(args);\n  }\n\n  createAccount(args: Partial<TAccount>): TAccount {\n    return this.accountFactory.create(args);\n  }\n}\n","import { EMPTY, Observable, filter } from \"rxjs\";\n\nimport { Message, CommandDefinition } from \"./types\";\n\n/**\n * A class that allows for listening to messages coming through the application,\n * allows for listening of all messages or just the messages you care about.\n *\n * @note Consider NOT using messaging at all if you can. State Providers offer an observable stream of\n * data that is persisted. This can serve messages that might have been used to notify of settings changes\n * or vault data changes and those observables should be preferred over messaging.\n */\nexport class MessageListener {\n  constructor(private readonly messageStream: Observable<Message<Record<string, unknown>>>) {}\n\n  /**\n   * A stream of all messages sent through the application. It does not contain type information for the\n   * other properties on the messages. You are encouraged to instead subscribe to an individual message\n   * through {@link messages$}.\n   */\n  allMessages$ = this.messageStream;\n\n  /**\n   * Creates an observable stream filtered to just the command given via the {@link CommandDefinition} and typed\n   * to the generic contained in the CommandDefinition. Be careful using this method unless all your messages are being\n   * sent through `MessageSender.send`, if that isn't the case you should have lower confidence in the message\n   * payload being the expected type.\n   *\n   * @param commandDefinition The CommandDefinition containing the information about the message type you care about.\n   */\n  messages$<T extends Record<string, unknown>>(\n    commandDefinition: CommandDefinition<T>,\n  ): Observable<T> {\n    return this.allMessages$.pipe(\n      filter((msg) => msg?.command === commandDefinition.command),\n    ) as Observable<T>;\n  }\n\n  /**\n   * A helper property for returning a MessageListener that will never emit any messages and will immediately complete.\n   */\n  static readonly EMPTY = new MessageListener(EMPTY);\n}\n","import { map } from \"rxjs\";\n\nimport { CommandDefinition } from \"./types\";\n\nexport const getCommand = (\n  commandDefinition: CommandDefinition<Record<string, unknown>> | string,\n) => {\n  if (typeof commandDefinition === \"string\") {\n    return commandDefinition;\n  } else {\n    return commandDefinition.command;\n  }\n};\n\nexport const EXTERNAL_SOURCE_TAG = Symbol(\"externalSource\");\n\nexport const isExternalMessage = (message: Record<PropertyKey, unknown>) => {\n  return message?.[EXTERNAL_SOURCE_TAG] === true;\n};\n\nexport const tagAsExternal = <T extends Record<PropertyKey, unknown>>() => {\n  return map((message: T) => {\n    return Object.assign(message, { [EXTERNAL_SOURCE_TAG]: true });\n  });\n};\n","import { Subject } from \"rxjs\";\n\nimport { getCommand } from \"./internal\";\nimport { MessageSender } from \"./message.sender\";\nimport { Message, CommandDefinition } from \"./types\";\n\nexport class SubjectMessageSender implements MessageSender {\n  constructor(private readonly messagesSubject: Subject<Message<Record<string, unknown>>>) {}\n\n  send<T extends Record<string, unknown>>(\n    commandDefinition: string | CommandDefinition<T>,\n    payload: Record<string, unknown> | T = {},\n  ): void {\n    const command = getCommand(commandDefinition);\n    this.messagesSubject.next(Object.assign(payload ?? {}, { command: command }));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type SharedFlags = {\n  sdk?: boolean;\n  prereleaseBuild?: boolean;\n};\n\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type SharedDevFlags = {\n  noopNotifications: boolean;\n  skipWelcomeOnInstall: boolean;\n  configRetrievalIntervalMs: number;\n  showRiskInsightsDebug: boolean;\n};\n\nfunction getFlags<T>(envFlags: string | T): T {\n  if (typeof envFlags === \"string\") {\n    return JSON.parse(envFlags) as T;\n  } else {\n    return envFlags as T;\n  }\n}\n\n/**\n * Gets the value of a feature flag from environment.\n * All flags default to \"on\" (true).\n * Only use for shared code in `libs`, otherwise use the client-specific function.\n * @param flag The name of the feature flag to check\n * @returns The value of the flag\n */\nexport function flagEnabled<Flags extends SharedFlags>(flag: keyof Flags): boolean {\n  const flags = getFlags<Flags>(process.env.FLAGS) ?? ({} as Flags);\n  return flags[flag] == null || !!flags[flag];\n}\n\n/**\n * Gets the value of a dev flag from environment.\n * Will always return false unless in development.\n * Only use for shared code in `libs`, otherwise use the client-specific function.\n * @param flag The name of the dev flag to check\n * @returns The value of the flag\n */\nexport function devFlagEnabled<DevFlags extends SharedDevFlags>(flag: keyof DevFlags): boolean {\n  if (process.env.ENV !== \"development\") {\n    return false;\n  }\n\n  const devFlags = getFlags<DevFlags>(process.env.DEV_FLAGS);\n  return devFlags?.[flag] == null ? false : !!devFlags[flag];\n}\n\n/**\n * Gets the value of a dev flag from environment.\n * Will always return false unless in development.\n * @param flag The name of the dev flag to check\n * @returns The value of the flag\n * @throws Error if the flag is not enabled\n */\nexport function devFlagValue<DevFlags extends SharedDevFlags>(\n  flag: keyof DevFlags,\n): DevFlags[keyof DevFlags] {\n  if (!devFlagEnabled(flag)) {\n    throw new Error(`This method should not be called, it is protected by a disabled dev flag.`);\n  }\n\n  const devFlags = getFlags<DevFlags>(process.env.DEV_FLAGS);\n  return devFlags[flag];\n}\n","export class GlobalState {\n  enableDuckDuckGoBrowserIntegration?: boolean;\n}\n","import { AppIdService as AppIdServiceAbstraction } from \"../abstractions/app-id.service\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { AbstractStorageService } from \"../abstractions/storage.service\";\nimport { Utils } from \"../misc/utils\";\n\nexport const APP_ID_KEY = \"global_applicationId_appId\";\nexport const ANONYMOUS_APP_ID_KEY = \"global_applicationId_appId\";\n\nexport class AppIdService implements AppIdServiceAbstraction {\n  constructor(\n    private readonly storageService: AbstractStorageService,\n    private readonly logService: LogService,\n  ) {}\n\n  async getAppId(): Promise<string> {\n    this.logService.info(\"Retrieving application id\");\n    return await this.getEnsuredValue(APP_ID_KEY);\n  }\n\n  async getAnonymousAppId(): Promise<string> {\n    return await this.getEnsuredValue(ANONYMOUS_APP_ID_KEY);\n  }\n\n  private async getEnsuredValue(key: string) {\n    let value = await this.storageService.get<string | null>(key);\n\n    if (value == null) {\n      value = Utils.newGuid();\n      await this.storageService.save(key, value);\n    }\n\n    return value;\n  }\n}\n","export class ServerSettings {\n  disableUserRegistration: boolean;\n\n  constructor(data?: ServerSettings) {\n    this.disableUserRegistration = data?.disableUserRegistration ?? false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AllowedFeatureFlagTypes } from \"../../../enums/feature-flag.enum\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { Region } from \"../../abstractions/environment.service\";\nimport { ServerSettings } from \"../domain/server-settings\";\n\nexport class ServerConfigResponse extends BaseResponse {\n  version: string;\n  gitHash: string;\n  server: ThirdPartyServerConfigResponse;\n  environment: EnvironmentServerConfigResponse;\n  featureStates: { [key: string]: AllowedFeatureFlagTypes } = {};\n  settings: ServerSettings;\n\n  constructor(response: any) {\n    super(response);\n\n    if (response == null) {\n      return;\n    }\n\n    this.version = this.getResponseProperty(\"Version\");\n    this.gitHash = this.getResponseProperty(\"GitHash\");\n    this.server = new ThirdPartyServerConfigResponse(this.getResponseProperty(\"Server\"));\n    this.environment = new EnvironmentServerConfigResponse(this.getResponseProperty(\"Environment\"));\n    this.featureStates = this.getResponseProperty(\"FeatureStates\");\n    this.settings = new ServerSettings(this.getResponseProperty(\"Settings\"));\n  }\n}\n\nexport class EnvironmentServerConfigResponse extends BaseResponse {\n  cloudRegion: Region;\n  vault: string;\n  api: string;\n  identity: string;\n  notifications: string;\n  sso: string;\n\n  constructor(data: any = null) {\n    super(data);\n\n    if (data == null) {\n      return;\n    }\n\n    this.cloudRegion = this.getResponseProperty(\"CloudRegion\");\n    this.vault = this.getResponseProperty(\"Vault\");\n    this.api = this.getResponseProperty(\"Api\");\n    this.identity = this.getResponseProperty(\"Identity\");\n    this.notifications = this.getResponseProperty(\"Notifications\");\n    this.sso = this.getResponseProperty(\"Sso\");\n  }\n}\n\nexport class ThirdPartyServerConfigResponse extends BaseResponse {\n  name: string;\n  url: string;\n\n  constructor(data: any = null) {\n    super(data);\n\n    if (data == null) {\n      return;\n    }\n\n    this.name = this.getResponseProperty(\"Name\");\n    this.url = this.getResponseProperty(\"Url\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { AllowedFeatureFlagTypes } from \"../../../enums/feature-flag.enum\";\nimport {\n  ServerConfigData,\n  ThirdPartyServerConfigData,\n  EnvironmentServerConfigData,\n} from \"../../models/data/server-config.data\";\nimport { ServerSettings } from \"../../models/domain/server-settings\";\n\nconst dayInMilliseconds = 24 * 3600 * 1000;\n\nexport class ServerConfig {\n  version: string;\n  gitHash: string;\n  server?: ThirdPartyServerConfigData;\n  environment?: EnvironmentServerConfigData;\n  utcDate: Date;\n  featureStates: { [key: string]: AllowedFeatureFlagTypes } = {};\n  settings: ServerSettings;\n\n  constructor(serverConfigData: ServerConfigData) {\n    this.version = serverConfigData.version;\n    this.gitHash = serverConfigData.gitHash;\n    this.server = serverConfigData.server;\n    this.utcDate = new Date(serverConfigData.utcDate);\n    this.environment = serverConfigData.environment;\n    this.featureStates = serverConfigData.featureStates;\n    this.settings = serverConfigData.settings;\n\n    if (this.server?.name == null && this.server?.url == null) {\n      this.server = null;\n    }\n  }\n\n  private getAgeInMilliseconds(): number {\n    return new Date().getTime() - this.utcDate?.getTime();\n  }\n\n  isValid(): boolean {\n    return this.getAgeInMilliseconds() <= dayInMilliseconds;\n  }\n\n  static fromJSON(obj: Jsonify<ServerConfig>): ServerConfig {\n    if (obj == null) {\n      return null;\n    }\n\n    return new ServerConfig(obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { AllowedFeatureFlagTypes } from \"../../../enums/feature-flag.enum\";\nimport { Region } from \"../../abstractions/environment.service\";\nimport { ServerSettings } from \"../domain/server-settings\";\nimport {\n  ServerConfigResponse,\n  ThirdPartyServerConfigResponse,\n  EnvironmentServerConfigResponse,\n} from \"../response/server-config.response\";\n\nexport class ServerConfigData {\n  version: string;\n  gitHash: string;\n  server?: ThirdPartyServerConfigData;\n  environment?: EnvironmentServerConfigData;\n  utcDate: string;\n  featureStates: { [key: string]: AllowedFeatureFlagTypes } = {};\n  settings: ServerSettings;\n\n  constructor(serverConfigResponse: Partial<ServerConfigResponse>) {\n    this.version = serverConfigResponse?.version;\n    this.gitHash = serverConfigResponse?.gitHash;\n    this.server = serverConfigResponse?.server\n      ? new ThirdPartyServerConfigData(serverConfigResponse.server)\n      : null;\n    this.utcDate = new Date().toISOString();\n    this.environment = serverConfigResponse?.environment\n      ? new EnvironmentServerConfigData(serverConfigResponse.environment)\n      : null;\n    this.featureStates = serverConfigResponse?.featureStates;\n    this.settings = new ServerSettings(serverConfigResponse.settings);\n  }\n\n  static fromJSON(obj: Jsonify<ServerConfigData>): ServerConfigData {\n    return Object.assign(new ServerConfigData({}), obj, {\n      server: obj?.server ? ThirdPartyServerConfigData.fromJSON(obj.server) : null,\n      environment: obj?.environment ? EnvironmentServerConfigData.fromJSON(obj.environment) : null,\n    });\n  }\n}\n\nexport class ThirdPartyServerConfigData {\n  name: string;\n  url: string;\n\n  constructor(response: Partial<ThirdPartyServerConfigResponse>) {\n    this.name = response.name;\n    this.url = response.url;\n  }\n\n  static fromJSON(obj: Jsonify<ThirdPartyServerConfigData>): ThirdPartyServerConfigData {\n    return Object.assign(new ThirdPartyServerConfigData({}), obj);\n  }\n}\n\nexport class EnvironmentServerConfigData {\n  cloudRegion: Region;\n  vault: string;\n  api: string;\n  identity: string;\n  notifications: string;\n  sso: string;\n\n  constructor(response: Partial<EnvironmentServerConfigResponse>) {\n    this.cloudRegion = response.cloudRegion;\n    this.vault = response.vault;\n    this.api = response.api;\n    this.identity = response.identity;\n    this.notifications = response.notifications;\n    this.sso = response.sso;\n  }\n\n  static fromJSON(obj: Jsonify<EnvironmentServerConfigData>): EnvironmentServerConfigData {\n    return Object.assign(new EnvironmentServerConfigData({}), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  combineLatest,\n  firstValueFrom,\n  map,\n  mergeWith,\n  NEVER,\n  Observable,\n  of,\n  shareReplay,\n  Subject,\n  switchMap,\n  tap,\n} from \"rxjs\";\nimport { SemVer } from \"semver\";\n\nimport { AuthService } from \"../../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../../auth/enums/authentication-status\";\nimport {\n  DefaultFeatureFlagValue,\n  FeatureFlag,\n  FeatureFlagValueType,\n} from \"../../../enums/feature-flag.enum\";\nimport { UserId } from \"../../../types/guid\";\nimport { ConfigApiServiceAbstraction } from \"../../abstractions/config/config-api.service.abstraction\";\nimport { ConfigService } from \"../../abstractions/config/config.service\";\nimport { ServerConfig } from \"../../abstractions/config/server-config\";\nimport { Environment, EnvironmentService, Region } from \"../../abstractions/environment.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { devFlagEnabled, devFlagValue } from \"../../misc/flags\";\nimport { ServerConfigData } from \"../../models/data/server-config.data\";\nimport { ServerSettings } from \"../../models/domain/server-settings\";\nimport { CONFIG_DISK, KeyDefinition, StateProvider, UserKeyDefinition } from \"../../state\";\n\nexport const RETRIEVAL_INTERVAL = devFlagEnabled(\"configRetrievalIntervalMs\")\n  ? (devFlagValue(\"configRetrievalIntervalMs\") as number)\n  : 3_600_000; // 1 hour\n\nexport const SLOW_EMISSION_GUARD = 800;\n\nexport type ApiUrl = string;\n\nexport const USER_SERVER_CONFIG = new UserKeyDefinition<ServerConfig>(CONFIG_DISK, \"serverConfig\", {\n  deserializer: (data) => (data == null ? null : ServerConfig.fromJSON(data)),\n  clearOn: [\"logout\"],\n});\n\nexport const GLOBAL_SERVER_CONFIGURATIONS = KeyDefinition.record<ServerConfig, ApiUrl>(\n  CONFIG_DISK,\n  \"byServer\",\n  {\n    deserializer: (data) => (data == null ? null : ServerConfig.fromJSON(data)),\n  },\n);\n\n// FIXME: currently we are limited to api requests for active users. Update to accept a UserId and APIUrl once ApiService supports it.\nexport class DefaultConfigService implements ConfigService {\n  private failedFetchFallbackSubject = new Subject<ServerConfig>();\n\n  serverConfig$: Observable<ServerConfig>;\n\n  serverSettings$: Observable<ServerSettings>;\n\n  cloudRegion$: Observable<Region>;\n\n  constructor(\n    private configApiService: ConfigApiServiceAbstraction,\n    private environmentService: EnvironmentService,\n    private logService: LogService,\n    private stateProvider: StateProvider,\n    private authService: AuthService,\n  ) {\n    const userId$ = this.stateProvider.activeUserId$;\n    const authStatus$ = userId$.pipe(\n      switchMap((userId) => (userId == null ? of(null) : this.authService.authStatusFor$(userId))),\n    );\n\n    this.serverConfig$ = combineLatest([\n      userId$,\n      this.environmentService.environment$,\n      authStatus$,\n    ]).pipe(\n      switchMap(([userId, environment, authStatus]) => {\n        if (userId == null || authStatus !== AuthenticationStatus.Unlocked) {\n          return this.globalConfigFor$(environment.getApiUrl()).pipe(\n            map((config) => [config, null, environment] as const),\n          );\n        }\n\n        return this.userConfigFor$(userId).pipe(\n          map((config) => [config, userId, environment] as const),\n        );\n      }),\n      tap(async (rec) => {\n        const [existingConfig, userId, environment] = rec;\n        // Grab new config if older retrieval interval\n        if (!existingConfig || this.olderThanRetrievalInterval(existingConfig.utcDate)) {\n          await this.renewConfig(existingConfig, userId, environment);\n        }\n      }),\n      switchMap(([existingConfig]) => {\n        // If we needed to fetch, stop this emit, we'll get a new one after update\n        // This is split up with the above tap because we need to return an observable from a failed promise,\n        // which isn't very doable since promises are converted to observables in switchMap\n        if (!existingConfig || this.olderThanRetrievalInterval(existingConfig.utcDate)) {\n          return NEVER;\n        }\n        return of(existingConfig);\n      }),\n      // If fetch fails, we'll emit on this subject to fallback to the existing config\n      mergeWith(this.failedFetchFallbackSubject),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    this.cloudRegion$ = this.serverConfig$.pipe(\n      map((config) => config?.environment?.cloudRegion ?? Region.US),\n    );\n\n    this.serverSettings$ = this.serverConfig$.pipe(\n      map((config) => config?.settings ?? new ServerSettings()),\n    );\n  }\n\n  getFeatureFlag$<Flag extends FeatureFlag>(key: Flag) {\n    return this.serverConfig$.pipe(\n      map((serverConfig) => this.getFeatureFlagValue(serverConfig, key)),\n    );\n  }\n\n  private getFeatureFlagValue<Flag extends FeatureFlag>(\n    serverConfig: ServerConfig | null,\n    flag: Flag,\n  ) {\n    if (serverConfig?.featureStates == null || serverConfig.featureStates[flag] == null) {\n      return DefaultFeatureFlagValue[flag];\n    }\n\n    return serverConfig.featureStates[flag] as FeatureFlagValueType<Flag>;\n  }\n\n  userCachedFeatureFlag$<Flag extends FeatureFlag>(key: Flag, userId: UserId) {\n    return this.stateProvider\n      .getUser(userId, USER_SERVER_CONFIG)\n      .state$.pipe(map((config) => this.getFeatureFlagValue(config, key)));\n  }\n\n  async getFeatureFlag<Flag extends FeatureFlag>(key: Flag) {\n    return await firstValueFrom(this.getFeatureFlag$(key));\n  }\n\n  checkServerMeetsVersionRequirement$(minimumRequiredServerVersion: SemVer) {\n    return this.serverConfig$.pipe(\n      map((serverConfig) => {\n        if (serverConfig == null) {\n          return false;\n        }\n        const serverVersion = new SemVer(serverConfig.version);\n        return serverVersion.compare(minimumRequiredServerVersion) >= 0;\n      }),\n    );\n  }\n\n  async ensureConfigFetched() {\n    // Triggering a retrieval for the given user ensures that the config is less than RETRIEVAL_INTERVAL old\n    await firstValueFrom(this.serverConfig$);\n  }\n\n  private olderThanRetrievalInterval(date: Date) {\n    return new Date().getTime() - date.getTime() > RETRIEVAL_INTERVAL;\n  }\n\n  // Updates the on-disk configuration with a newly retrieved configuration\n  private async renewConfig(\n    existingConfig: ServerConfig,\n    userId: UserId,\n    environment: Environment,\n  ): Promise<void> {\n    try {\n      // Feature flags often have a big impact on user experience, lets ensure we return some value\n      // somewhat quickly even though it may not be accurate, we won't cancel the HTTP request\n      // though so that hopefully it can have finished and hydrated a more accurate value.\n      const handle = setTimeout(() => {\n        this.logService.info(\n          \"Self-host environment did not respond in time, emitting previous config.\",\n        );\n        this.failedFetchFallbackSubject.next(existingConfig);\n      }, SLOW_EMISSION_GUARD);\n      const response = await this.configApiService.get(userId);\n      clearTimeout(handle);\n      const newConfig = new ServerConfig(new ServerConfigData(response));\n\n      // Update the environment region\n      if (\n        newConfig?.environment?.cloudRegion != null &&\n        existingConfig?.environment?.cloudRegion != newConfig.environment.cloudRegion\n      ) {\n        // Null userId sets global, otherwise sets to the given user\n        await this.environmentService.setCloudRegion(userId, newConfig?.environment?.cloudRegion);\n      }\n\n      if (userId == null) {\n        // update global state with new pulled config\n        await this.stateProvider.getGlobal(GLOBAL_SERVER_CONFIGURATIONS).update((configs) => {\n          return { ...configs, [environment.getApiUrl()]: newConfig };\n        });\n      } else {\n        // update state with new pulled config\n        await this.stateProvider.setUserState(USER_SERVER_CONFIG, newConfig, userId);\n      }\n    } catch (e) {\n      // mutate error to be handled by catchError\n      this.logService.error(`Unable to fetch ServerConfig from ${environment.getApiUrl()}`, e);\n      // Emit the existing config\n      this.failedFetchFallbackSubject.next(existingConfig);\n    }\n  }\n\n  private globalConfigFor$(apiUrl: string): Observable<ServerConfig> {\n    return this.stateProvider\n      .getGlobal(GLOBAL_SERVER_CONFIGURATIONS)\n      .state$.pipe(map((configs) => configs?.[apiUrl]));\n  }\n\n  private userConfigFor$(userId: UserId): Observable<ServerConfig> {\n    return this.stateProvider.getUser(userId, USER_SERVER_CONFIG).state$;\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Cipher } from \"../../../vault/models/domain/cipher\";\nimport { CipherView } from \"../../../vault/models/view/cipher.view\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\n\nimport { InitializerKey } from \"./initializer-key\";\n\n/**\n * Internal reference of classes so we can reconstruct objects properly.\n * Each entry should be keyed using the Decryptable.initializerKey property\n */\nconst classInitializers: Record<InitializerKey, (obj: any) => any> = {\n  [InitializerKey.Cipher]: Cipher.fromJSON,\n  [InitializerKey.CipherView]: CipherView.fromJSON,\n};\n\nexport function getClassInitializer<T extends InitializerMetadata>(\n  className: InitializerKey,\n): (obj: Jsonify<T>) => T {\n  return classInitializers[className];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\n\nexport class EncryptedObject {\n  iv: Uint8Array;\n  data: Uint8Array;\n  mac: Uint8Array;\n  key: SymmetricCryptoKey;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { CryptoFunctionService } from \"../../abstractions/crypto-function.service\";\nimport { EncryptService } from \"../../abstractions/encrypt.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { EncryptionType, encryptionTypeToString as encryptionTypeName } from \"../../enums\";\nimport { Decryptable } from \"../../interfaces/decryptable.interface\";\nimport { Encrypted } from \"../../interfaces/encrypted\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\nimport { EncryptedObject } from \"../../models/domain/encrypted-object\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\n\nexport class EncryptServiceImplementation implements EncryptService {\n  constructor(\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected logService: LogService,\n    protected logMacFailures: boolean,\n  ) {}\n\n  async encrypt(plainValue: string | Uint8Array, key: SymmetricCryptoKey): Promise<EncString> {\n    if (key == null) {\n      throw new Error(\"No encryption key provided.\");\n    }\n\n    if (plainValue == null) {\n      return Promise.resolve(null);\n    }\n\n    let plainBuf: Uint8Array;\n    if (typeof plainValue === \"string\") {\n      plainBuf = Utils.fromUtf8ToArray(plainValue);\n    } else {\n      plainBuf = plainValue;\n    }\n\n    const encObj = await this.aesEncrypt(plainBuf, key);\n    const iv = Utils.fromBufferToB64(encObj.iv);\n    const data = Utils.fromBufferToB64(encObj.data);\n    const mac = encObj.mac != null ? Utils.fromBufferToB64(encObj.mac) : null;\n    return new EncString(encObj.key.encType, data, iv, mac);\n  }\n\n  async encryptToBytes(plainValue: Uint8Array, key: SymmetricCryptoKey): Promise<EncArrayBuffer> {\n    if (key == null) {\n      throw new Error(\"No encryption key provided.\");\n    }\n\n    const encValue = await this.aesEncrypt(plainValue, key);\n    let macLen = 0;\n    if (encValue.mac != null) {\n      macLen = encValue.mac.byteLength;\n    }\n\n    const encBytes = new Uint8Array(1 + encValue.iv.byteLength + macLen + encValue.data.byteLength);\n    encBytes.set([encValue.key.encType]);\n    encBytes.set(new Uint8Array(encValue.iv), 1);\n    if (encValue.mac != null) {\n      encBytes.set(new Uint8Array(encValue.mac), 1 + encValue.iv.byteLength);\n    }\n\n    encBytes.set(new Uint8Array(encValue.data), 1 + encValue.iv.byteLength + macLen);\n    return new EncArrayBuffer(encBytes);\n  }\n\n  async decryptToUtf8(\n    encString: EncString,\n    key: SymmetricCryptoKey,\n    decryptContext: string = \"no context\",\n  ): Promise<string> {\n    if (key == null) {\n      throw new Error(\"No key provided for decryption.\");\n    }\n\n    key = this.resolveLegacyKey(key, encString);\n\n    // DO NOT REMOVE OR MOVE. This prevents downgrade to mac-less CBC, which would compromise integrity and confidentiality.\n    if (key.macKey != null && encString?.mac == null) {\n      this.logService.error(\n        \"[Encrypt service] Key has mac key but payload is missing mac bytes. Key type \" +\n          encryptionTypeName(key.encType) +\n          \"Payload type \" +\n          encryptionTypeName(encString.encryptionType),\n        \"Decrypt context: \" + decryptContext,\n      );\n      return null;\n    }\n\n    if (key.encType !== encString.encryptionType) {\n      this.logService.error(\n        \"[Encrypt service] Key encryption type does not match payload encryption type. Key type \" +\n          encryptionTypeName(key.encType) +\n          \"Payload type \" +\n          encryptionTypeName(encString.encryptionType),\n        \"Decrypt context: \" + decryptContext,\n      );\n      return null;\n    }\n\n    const fastParams = this.cryptoFunctionService.aesDecryptFastParameters(\n      encString.data,\n      encString.iv,\n      encString.mac,\n      key,\n    );\n    if (fastParams.macKey != null && fastParams.mac != null) {\n      const computedMac = await this.cryptoFunctionService.hmacFast(\n        fastParams.macData,\n        fastParams.macKey,\n        \"sha256\",\n      );\n      const macsEqual = await this.cryptoFunctionService.compareFast(fastParams.mac, computedMac);\n      if (!macsEqual) {\n        this.logMacFailed(\n          \"[Encrypt service] decryptToUtf8 MAC comparison failed. Key or payload has changed. Key type \" +\n            encryptionTypeName(key.encType) +\n            \"Payload type \" +\n            encryptionTypeName(encString.encryptionType) +\n            \" Decrypt context: \" +\n            decryptContext,\n        );\n        return null;\n      }\n    }\n\n    return await this.cryptoFunctionService.aesDecryptFast({ mode: \"cbc\", parameters: fastParams });\n  }\n\n  async decryptToBytes(\n    encThing: Encrypted,\n    key: SymmetricCryptoKey,\n    decryptContext: string = \"no context\",\n  ): Promise<Uint8Array> {\n    if (key == null) {\n      throw new Error(\"No encryption key provided.\");\n    }\n\n    if (encThing == null) {\n      throw new Error(\"Nothing provided for decryption.\");\n    }\n\n    key = this.resolveLegacyKey(key, encThing);\n\n    // DO NOT REMOVE OR MOVE. This prevents downgrade to mac-less CBC, which would compromise integrity and confidentiality.\n    if (key.macKey != null && encThing.macBytes == null) {\n      this.logService.error(\n        \"[Encrypt service] Key has mac key but payload is missing mac bytes. Key type \" +\n          encryptionTypeName(key.encType) +\n          \" Payload type \" +\n          encryptionTypeName(encThing.encryptionType) +\n          \" Decrypt context: \" +\n          decryptContext,\n      );\n      return null;\n    }\n\n    if (key.encType !== encThing.encryptionType) {\n      this.logService.error(\n        \"[Encrypt service] Key encryption type does not match payload encryption type. Key type \" +\n          encryptionTypeName(key.encType) +\n          \" Payload type \" +\n          encryptionTypeName(encThing.encryptionType) +\n          \" Decrypt context: \" +\n          decryptContext,\n      );\n      return null;\n    }\n\n    if (key.macKey != null && encThing.macBytes != null) {\n      const macData = new Uint8Array(encThing.ivBytes.byteLength + encThing.dataBytes.byteLength);\n      macData.set(new Uint8Array(encThing.ivBytes), 0);\n      macData.set(new Uint8Array(encThing.dataBytes), encThing.ivBytes.byteLength);\n      const computedMac = await this.cryptoFunctionService.hmac(macData, key.macKey, \"sha256\");\n      if (computedMac === null) {\n        this.logMacFailed(\n          \"[Encrypt service#decryptToBytes] Failed to compute MAC.\" +\n            \" Key type \" +\n            encryptionTypeName(key.encType) +\n            \" Payload type \" +\n            encryptionTypeName(encThing.encryptionType) +\n            \" Decrypt context: \" +\n            decryptContext,\n        );\n        return null;\n      }\n\n      const macsMatch = await this.cryptoFunctionService.compare(encThing.macBytes, computedMac);\n      if (!macsMatch) {\n        this.logMacFailed(\n          \"[Encrypt service#decryptToBytes]: MAC comparison failed. Key or payload has changed.\" +\n            \" Key type \" +\n            encryptionTypeName(key.encType) +\n            \" Payload type \" +\n            encryptionTypeName(encThing.encryptionType) +\n            \" Decrypt context: \" +\n            decryptContext,\n        );\n        return null;\n      }\n    }\n\n    const result = await this.cryptoFunctionService.aesDecrypt(\n      encThing.dataBytes,\n      encThing.ivBytes,\n      key.encKey,\n      \"cbc\",\n    );\n\n    return result ?? null;\n  }\n\n  async rsaEncrypt(data: Uint8Array, publicKey: Uint8Array): Promise<EncString> {\n    if (data == null) {\n      throw new Error(\"No data provided for encryption.\");\n    }\n\n    if (publicKey == null) {\n      throw new Error(\"No public key provided for encryption.\");\n    }\n    const encrypted = await this.cryptoFunctionService.rsaEncrypt(data, publicKey, \"sha1\");\n    return new EncString(EncryptionType.Rsa2048_OaepSha1_B64, Utils.fromBufferToB64(encrypted));\n  }\n\n  async rsaDecrypt(data: EncString, privateKey: Uint8Array): Promise<Uint8Array> {\n    if (data == null) {\n      throw new Error(\"[Encrypt service] rsaDecrypt: No data provided for decryption.\");\n    }\n\n    let algorithm: \"sha1\" | \"sha256\";\n    switch (data.encryptionType) {\n      case EncryptionType.Rsa2048_OaepSha1_B64:\n      case EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:\n        algorithm = \"sha1\";\n        break;\n      case EncryptionType.Rsa2048_OaepSha256_B64:\n      case EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:\n        algorithm = \"sha256\";\n        break;\n      default:\n        throw new Error(\"Invalid encryption type.\");\n    }\n\n    if (privateKey == null) {\n      throw new Error(\"[Encrypt service] rsaDecrypt: No private key provided for decryption.\");\n    }\n\n    return this.cryptoFunctionService.rsaDecrypt(data.dataBytes, privateKey, algorithm);\n  }\n\n  /**\n   * @deprecated Replaced by BulkEncryptService (PM-4154)\n   */\n  async decryptItems<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]> {\n    if (items == null || items.length < 1) {\n      return [];\n    }\n\n    // don't use promise.all because this task is not io bound\n    const results = [];\n    for (let i = 0; i < items.length; i++) {\n      results.push(await items[i].decrypt(key));\n    }\n    return results;\n  }\n\n  async hash(value: string | Uint8Array, algorithm: \"sha1\" | \"sha256\" | \"sha512\"): Promise<string> {\n    const hashArray = await this.cryptoFunctionService.hash(value, algorithm);\n    return Utils.fromBufferToB64(hashArray);\n  }\n\n  private async aesEncrypt(data: Uint8Array, key: SymmetricCryptoKey): Promise<EncryptedObject> {\n    const obj = new EncryptedObject();\n    obj.key = key;\n    obj.iv = await this.cryptoFunctionService.randomBytes(16);\n    obj.data = await this.cryptoFunctionService.aesEncrypt(data, obj.iv, obj.key.encKey);\n\n    if (obj.key.macKey != null) {\n      const macData = new Uint8Array(obj.iv.byteLength + obj.data.byteLength);\n      macData.set(new Uint8Array(obj.iv), 0);\n      macData.set(new Uint8Array(obj.data), obj.iv.byteLength);\n      obj.mac = await this.cryptoFunctionService.hmac(macData, obj.key.macKey, \"sha256\");\n    }\n\n    return obj;\n  }\n\n  private logMacFailed(msg: string) {\n    if (this.logMacFailures) {\n      this.logService.error(msg);\n    }\n  }\n\n  /**\n   * Transform into new key for the old encrypt-then-mac scheme if required, otherwise return the current key unchanged\n   * @param encThing The encrypted object (e.g. encString or encArrayBuffer) that you want to decrypt\n   */\n  resolveLegacyKey(key: SymmetricCryptoKey, encThing: Encrypted): SymmetricCryptoKey {\n    if (\n      encThing.encryptionType === EncryptionType.AesCbc128_HmacSha256_B64 &&\n      key.encType === EncryptionType.AesCbc256_B64\n    ) {\n      return new SymmetricCryptoKey(key.key, EncryptionType.AesCbc128_HmacSha256_B64);\n    }\n\n    return key;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { distinctUntilChanged, firstValueFrom, map, Observable, switchMap } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { UserId } from \"../../types/guid\";\nimport {\n  EnvironmentService,\n  Environment,\n  Region,\n  RegionConfig,\n  Urls,\n  CloudRegion,\n} from \"../abstractions/environment.service\";\nimport { Utils } from \"../misc/utils\";\nimport {\n  ENVIRONMENT_DISK,\n  ENVIRONMENT_MEMORY,\n  GlobalState,\n  KeyDefinition,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../state\";\n\nexport class EnvironmentUrls {\n  base: string = null;\n  api: string = null;\n  identity: string = null;\n  icons: string = null;\n  notifications: string = null;\n  events: string = null;\n  webVault: string = null;\n  keyConnector: string = null;\n}\n\nclass EnvironmentState {\n  region: Region;\n  urls: EnvironmentUrls;\n\n  static fromJSON(obj: Jsonify<EnvironmentState>): EnvironmentState {\n    return Object.assign(new EnvironmentState(), obj);\n  }\n}\n\nexport const GLOBAL_ENVIRONMENT_KEY = new KeyDefinition<EnvironmentState>(\n  ENVIRONMENT_DISK,\n  \"environment\",\n  {\n    deserializer: EnvironmentState.fromJSON,\n  },\n);\n\nexport const USER_ENVIRONMENT_KEY = new UserKeyDefinition<EnvironmentState>(\n  ENVIRONMENT_DISK,\n  \"environment\",\n  {\n    deserializer: EnvironmentState.fromJSON,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const GLOBAL_CLOUD_REGION_KEY = new KeyDefinition<CloudRegion>(\n  ENVIRONMENT_MEMORY,\n  \"cloudRegion\",\n  {\n    deserializer: (b) => b,\n  },\n);\n\nexport const USER_CLOUD_REGION_KEY = new UserKeyDefinition<CloudRegion>(\n  ENVIRONMENT_MEMORY,\n  \"cloudRegion\",\n  {\n    deserializer: (b) => b,\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * The production regions available for selection.\n *\n * In the future we desire to load these urls from the config endpoint.\n */\nexport const PRODUCTION_REGIONS: RegionConfig[] = [\n  {\n    key: Region.US,\n    domain: \"bitwarden.com\",\n    urls: {\n      base: null,\n      api: \"https://api.bitwarden.com\",\n      identity: \"https://identity.bitwarden.com\",\n      icons: \"https://icons.bitwarden.net\",\n      webVault: \"https://vault.bitwarden.com\",\n      notifications: \"https://notifications.bitwarden.com\",\n      events: \"https://events.bitwarden.com\",\n      scim: \"https://scim.bitwarden.com\",\n    },\n  },\n  {\n    key: Region.EU,\n    domain: \"bitwarden.eu\",\n    urls: {\n      base: null,\n      api: \"https://api.bitwarden.eu\",\n      identity: \"https://identity.bitwarden.eu\",\n      icons: \"https://icons.bitwarden.eu\",\n      webVault: \"https://vault.bitwarden.eu\",\n      notifications: \"https://notifications.bitwarden.eu\",\n      events: \"https://events.bitwarden.eu\",\n      scim: \"https://scim.bitwarden.eu\",\n    },\n  },\n];\n\n/**\n * The default region when starting the app.\n */\nconst DEFAULT_REGION = Region.US;\n\n/**\n * The default region configuration.\n */\nconst DEFAULT_REGION_CONFIG = PRODUCTION_REGIONS.find((r) => r.key === DEFAULT_REGION);\n\nexport class DefaultEnvironmentService implements EnvironmentService {\n  private globalState: GlobalState<EnvironmentState | null>;\n  private globalCloudRegionState: GlobalState<CloudRegion | null>;\n\n  // We intentionally don't want the helper on account service, we want the null back if there is no active user\n  private activeAccountId$: Observable<UserId | null> = this.accountService.activeAccount$.pipe(\n    map((a) => a?.id),\n  );\n\n  environment$: Observable<Environment>;\n  cloudWebVaultUrl$: Observable<string>;\n\n  constructor(\n    private stateProvider: StateProvider,\n    private accountService: AccountService,\n    private additionalRegionConfigs: RegionConfig[] = [],\n  ) {\n    this.globalState = this.stateProvider.getGlobal(GLOBAL_ENVIRONMENT_KEY);\n    this.globalCloudRegionState = this.stateProvider.getGlobal(GLOBAL_CLOUD_REGION_KEY);\n\n    const account$ = this.activeAccountId$.pipe(\n      // Use == here to not trigger on undefined -> null transition\n      distinctUntilChanged((oldUserId: UserId, newUserId: UserId) => oldUserId == newUserId),\n    );\n\n    this.environment$ = account$.pipe(\n      switchMap((userId) => {\n        const t = userId\n          ? this.stateProvider.getUser(userId, USER_ENVIRONMENT_KEY).state$\n          : this.stateProvider.getGlobal(GLOBAL_ENVIRONMENT_KEY).state$;\n        return t;\n      }),\n      map((state) => {\n        return this.buildEnvironment(state?.region, state?.urls);\n      }),\n    );\n    this.cloudWebVaultUrl$ = account$.pipe(\n      switchMap((userId) => {\n        const t = userId\n          ? this.stateProvider.getUser(userId, USER_CLOUD_REGION_KEY).state$\n          : this.stateProvider.getGlobal(GLOBAL_CLOUD_REGION_KEY).state$;\n        return t;\n      }),\n      map((region) => {\n        if (region != null) {\n          const config = this.getRegionConfig(region);\n\n          if (config != null) {\n            return config.urls.webVault;\n          }\n        }\n        return DEFAULT_REGION_CONFIG.urls.webVault;\n      }),\n    );\n  }\n\n  availableRegions(): RegionConfig[] {\n    return PRODUCTION_REGIONS.concat(this.additionalRegionConfigs);\n  }\n\n  /**\n   * Get the region configuration for the given region.\n   */\n  private getRegionConfig(region: Region): RegionConfig | undefined {\n    return this.availableRegions().find((r) => r.key === region);\n  }\n\n  async setEnvironment(region: Region, urls?: Urls): Promise<Urls> {\n    // Unknown regions are treated as self-hosted\n    if (this.getRegionConfig(region) == null) {\n      region = Region.SelfHosted;\n    }\n\n    // If self-hosted ensure urls are valid else fallback to default region\n    if (region == Region.SelfHosted && isEmpty(urls)) {\n      region = DEFAULT_REGION;\n    }\n\n    if (region != Region.SelfHosted) {\n      await this.globalState.update(() => ({\n        region: region,\n        urls: null,\n      }));\n\n      return null;\n    } else {\n      // Clean the urls\n      urls.base = formatUrl(urls.base);\n      urls.webVault = formatUrl(urls.webVault);\n      urls.api = formatUrl(urls.api);\n      urls.identity = formatUrl(urls.identity);\n      urls.icons = formatUrl(urls.icons);\n      urls.notifications = formatUrl(urls.notifications);\n      urls.events = formatUrl(urls.events);\n      urls.keyConnector = formatUrl(urls.keyConnector);\n      urls.scim = null;\n\n      await this.globalState.update(() => ({\n        region: region,\n        urls: {\n          base: urls.base,\n          api: urls.api,\n          identity: urls.identity,\n          webVault: urls.webVault,\n          icons: urls.icons,\n          notifications: urls.notifications,\n          events: urls.events,\n          keyConnector: urls.keyConnector,\n        },\n      }));\n\n      return urls;\n    }\n  }\n\n  /**\n   * Helper for building the environment from state. Performs some general sanitization to avoid invalid regions and urls.\n   */\n  protected buildEnvironment(region: Region, urls: Urls) {\n    // Unknown regions are treated as self-hosted\n    if (this.getRegionConfig(region) == null) {\n      region = Region.SelfHosted;\n    }\n\n    // If self-hosted ensure urls are valid else fallback to default region\n    if (region == Region.SelfHosted && isEmpty(urls)) {\n      region = DEFAULT_REGION;\n    }\n\n    // Load urls from region config\n    if (region != Region.SelfHosted) {\n      const regionConfig = this.getRegionConfig(region);\n      if (regionConfig != null) {\n        return new CloudEnvironment(regionConfig);\n      }\n    }\n\n    return new SelfHostedEnvironment(urls);\n  }\n\n  async setCloudRegion(userId: UserId, region: CloudRegion) {\n    if (userId == null) {\n      await this.globalCloudRegionState.update(() => region);\n    } else {\n      await this.stateProvider.getUser(userId, USER_CLOUD_REGION_KEY).update(() => region);\n    }\n  }\n\n  getEnvironment$(userId?: UserId): Observable<Environment | undefined> {\n    if (userId == null) {\n      return this.environment$;\n    }\n\n    return this.activeAccountId$.pipe(\n      switchMap((activeUserId) => {\n        // Previous rules dictated that we only get from user scoped state if there is an active user.\n        if (activeUserId == null) {\n          return this.globalState.state$;\n        }\n        return this.stateProvider.getUser(userId ?? activeUserId, USER_ENVIRONMENT_KEY).state$;\n      }),\n      map((state) => {\n        return this.buildEnvironment(state?.region, state?.urls);\n      }),\n    );\n  }\n\n  /**\n   * @deprecated Use getEnvironment$ instead.\n   */\n  async getEnvironment(userId?: UserId): Promise<Environment | undefined> {\n    return firstValueFrom(this.getEnvironment$(userId));\n  }\n\n  async seedUserEnvironment(userId: UserId) {\n    const global = await firstValueFrom(this.globalState.state$);\n    await this.stateProvider.getUser(userId, USER_ENVIRONMENT_KEY).update(() => global);\n  }\n}\n\nfunction formatUrl(url: string): string {\n  if (url == null || url === \"\") {\n    return null;\n  }\n\n  url = url.replace(/\\/+$/g, \"\");\n  if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n    url = \"https://\" + url;\n  }\n\n  return url.trim();\n}\n\nfunction isEmpty(u?: Urls): boolean {\n  if (u == null) {\n    return true;\n  }\n\n  return (\n    u.base == null &&\n    u.webVault == null &&\n    u.api == null &&\n    u.identity == null &&\n    u.icons == null &&\n    u.notifications == null &&\n    u.events == null\n  );\n}\n\nabstract class UrlEnvironment implements Environment {\n  constructor(\n    protected region: Region,\n    protected urls: Urls,\n  ) {\n    // Scim is always null for self-hosted\n    if (region == Region.SelfHosted) {\n      this.urls.scim = null;\n    }\n  }\n\n  abstract getHostname(): string;\n\n  getRegion() {\n    return this.region;\n  }\n\n  getUrls() {\n    return {\n      base: this.urls.base,\n      webVault: this.urls.webVault,\n      api: this.urls.api,\n      identity: this.urls.identity,\n      icons: this.urls.icons,\n      notifications: this.urls.notifications,\n      events: this.urls.events,\n      keyConnector: this.urls.keyConnector,\n      scim: this.urls.scim,\n    };\n  }\n\n  hasBaseUrl() {\n    return this.urls.base != null;\n  }\n\n  getWebVaultUrl() {\n    return this.getUrl(\"webVault\", \"\");\n  }\n\n  getApiUrl() {\n    return this.getUrl(\"api\", \"/api\");\n  }\n\n  getEventsUrl() {\n    return this.getUrl(\"events\", \"/events\");\n  }\n\n  getIconsUrl() {\n    return this.getUrl(\"icons\", \"/icons\");\n  }\n\n  getIdentityUrl() {\n    return this.getUrl(\"identity\", \"/identity\");\n  }\n\n  getKeyConnectorUrl() {\n    return this.urls.keyConnector;\n  }\n\n  getNotificationsUrl() {\n    return this.getUrl(\"notifications\", \"/notifications\");\n  }\n\n  getScimUrl() {\n    if (this.urls.scim != null) {\n      return this.urls.scim + \"/v2\";\n    }\n\n    return this.getWebVaultUrl() === \"https://vault.bitwarden.com\"\n      ? \"https://scim.bitwarden.com/v2\"\n      : this.getWebVaultUrl() + \"/scim/v2\";\n  }\n\n  getSendUrl() {\n    return this.getWebVaultUrl() === \"https://vault.bitwarden.com\"\n      ? \"https://send.bitwarden.com/#\"\n      : this.getWebVaultUrl() + \"/#/send/\";\n  }\n\n  /**\n   * Presume that if the region is not self-hosted, it is cloud.\n   */\n  isCloud(): boolean {\n    return this.region !== Region.SelfHosted;\n  }\n\n  /**\n   * Helper for getting an URL.\n   *\n   * @param key Key of the URL to get from URLs\n   * @param baseSuffix Suffix to append to the base URL if the url is not set\n   * @returns\n   */\n  private getUrl(key: keyof Urls, baseSuffix: string) {\n    if (this.urls[key] != null) {\n      return this.urls[key];\n    }\n\n    if (this.urls.base) {\n      return this.urls.base + baseSuffix;\n    }\n\n    return DEFAULT_REGION_CONFIG.urls[key];\n  }\n}\n\n/**\n * Denote a cloud environment.\n */\nexport class CloudEnvironment extends UrlEnvironment {\n  constructor(private config: RegionConfig) {\n    super(config.key, config.urls);\n  }\n\n  /**\n   * Cloud always returns nice urls, i.e. bitwarden.com instead of vault.bitwarden.com.\n   */\n  getHostname() {\n    return this.config.domain;\n  }\n}\n\nexport class SelfHostedEnvironment extends UrlEnvironment {\n  constructor(urls: Urls) {\n    super(Region.SelfHosted, urls);\n  }\n\n  getHostname() {\n    return Utils.getHost(this.getWebVaultUrl());\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { Utils } from \"../../misc/utils\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\n\nconst MAX_SINGLE_BLOB_UPLOAD_SIZE = 256 * 1024 * 1024; // 256 MiB\nconst MAX_BLOCKS_PER_BLOB = 50000;\n\nexport class AzureFileUploadService {\n  constructor(\n    private logService: LogService,\n    private apiService: ApiService,\n  ) {}\n\n  async upload(url: string, data: EncArrayBuffer, renewalCallback: () => Promise<string>) {\n    if (data.buffer.byteLength <= MAX_SINGLE_BLOB_UPLOAD_SIZE) {\n      return await this.azureUploadBlob(url, data);\n    } else {\n      return await this.azureUploadBlocks(url, data, renewalCallback);\n    }\n  }\n  private async azureUploadBlob(url: string, data: EncArrayBuffer) {\n    const urlObject = Utils.getUrl(url);\n    const headers = new Headers({\n      \"x-ms-date\": new Date().toUTCString(),\n      \"x-ms-version\": urlObject.searchParams.get(\"sv\"),\n      \"Content-Length\": data.buffer.byteLength.toString(),\n      \"x-ms-blob-type\": \"BlockBlob\",\n    });\n\n    const request = new Request(url, {\n      body: data.buffer,\n      cache: \"no-store\",\n      method: \"PUT\",\n      headers: headers,\n    });\n\n    const blobResponse = await this.apiService.nativeFetch(request);\n\n    if (blobResponse.status !== 201) {\n      throw new Error(`Failed to create Azure blob: ${blobResponse.status}`);\n    }\n  }\n  private async azureUploadBlocks(\n    url: string,\n    data: EncArrayBuffer,\n    renewalCallback: () => Promise<string>,\n  ) {\n    const baseUrl = Utils.getUrl(url);\n    const blockSize = this.getMaxBlockSize(baseUrl.searchParams.get(\"sv\"));\n    let blockIndex = 0;\n    const numBlocks = Math.ceil(data.buffer.byteLength / blockSize);\n    const blocksStaged: string[] = [];\n\n    if (numBlocks > MAX_BLOCKS_PER_BLOB) {\n      throw new Error(\n        `Cannot upload file, exceeds maximum size of ${blockSize * MAX_BLOCKS_PER_BLOB}`,\n      );\n    }\n\n    // eslint-disable-next-line\n    try {\n      while (blockIndex < numBlocks) {\n        url = await this.renewUrlIfNecessary(url, renewalCallback);\n        const blockUrl = Utils.getUrl(url);\n        const blockId = this.encodedBlockId(blockIndex);\n        blockUrl.searchParams.append(\"comp\", \"block\");\n        blockUrl.searchParams.append(\"blockid\", blockId);\n        const start = blockIndex * blockSize;\n        const blockData = data.buffer.slice(start, start + blockSize);\n        const blockHeaders = new Headers({\n          \"x-ms-date\": new Date().toUTCString(),\n          \"x-ms-version\": blockUrl.searchParams.get(\"sv\"),\n          \"Content-Length\": blockData.byteLength.toString(),\n        });\n\n        const blockRequest = new Request(blockUrl.toString(), {\n          body: blockData,\n          cache: \"no-store\",\n          method: \"PUT\",\n          headers: blockHeaders,\n        });\n\n        const blockResponse = await this.apiService.nativeFetch(blockRequest);\n\n        if (blockResponse.status !== 201) {\n          const message = `Unsuccessful block PUT. Received status ${blockResponse.status}`;\n          this.logService.error(message + \"\\n\" + (await blockResponse.json()));\n          throw new Error(message);\n        }\n\n        blocksStaged.push(blockId);\n        blockIndex++;\n      }\n\n      url = await this.renewUrlIfNecessary(url, renewalCallback);\n      const blockListUrl = Utils.getUrl(url);\n      const blockListXml = this.blockListXml(blocksStaged);\n      blockListUrl.searchParams.append(\"comp\", \"blocklist\");\n      const headers = new Headers({\n        \"x-ms-date\": new Date().toUTCString(),\n        \"x-ms-version\": blockListUrl.searchParams.get(\"sv\"),\n        \"Content-Length\": blockListXml.length.toString(),\n      });\n\n      const request = new Request(blockListUrl.toString(), {\n        body: blockListXml,\n        cache: \"no-store\",\n        method: \"PUT\",\n        headers: headers,\n      });\n\n      const response = await this.apiService.nativeFetch(request);\n\n      if (response.status !== 201) {\n        const message = `Unsuccessful block list PUT. Received status ${response.status}`;\n        this.logService.error(message + \"\\n\" + (await response.json()));\n        throw new Error(message);\n      }\n    } catch (e) {\n      throw e;\n    }\n  }\n\n  private async renewUrlIfNecessary(\n    url: string,\n    renewalCallback: () => Promise<string>,\n  ): Promise<string> {\n    const urlObject = Utils.getUrl(url);\n    const expiry = new Date(urlObject.searchParams.get(\"se\") ?? \"\");\n\n    if (isNaN(expiry.getTime())) {\n      expiry.setTime(Date.now() + 3600000);\n    }\n\n    if (expiry.getTime() < Date.now() + 1000) {\n      return await renewalCallback();\n    }\n    return url;\n  }\n\n  private encodedBlockId(blockIndex: number) {\n    // Encoded blockId max size is 64, so pre-encoding max size is 48\n    const utfBlockId = (\n      \"000000000000000000000000000000000000000000000000\" + blockIndex.toString()\n    ).slice(-48);\n    return Utils.fromUtf8ToB64(utfBlockId);\n  }\n\n  private blockListXml(blockIdList: string[]) {\n    let xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?><BlockList>';\n    blockIdList.forEach((blockId) => {\n      xml += `<Latest>${blockId}</Latest>`;\n    });\n    xml += \"</BlockList>\";\n    return xml;\n  }\n\n  private getMaxBlockSize(version: string) {\n    if (Version.compare(version, \"2019-12-12\") >= 0) {\n      return 4000 * 1024 * 1024; // 4000 MiB\n    } else if (Version.compare(version, \"2016-05-31\") >= 0) {\n      return 100 * 1024 * 1024; // 100 MiB\n    } else {\n      return 4 * 1024 * 1024; // 4 MiB\n    }\n  }\n}\n\nclass Version {\n  /**\n   * Compares two Azure Versions against each other\n   * @param a Version to compare\n   * @param b Version to compare\n   * @returns a number less than zero if b is newer than a, 0 if equal,\n   * and greater than zero if a is newer than b\n   */\n  static compare(a: Required<Version> | string, b: Required<Version> | string) {\n    if (typeof a === \"string\") {\n      a = new Version(a);\n    }\n\n    if (typeof b === \"string\") {\n      b = new Version(b);\n    }\n\n    return a.year !== b.year\n      ? a.year - b.year\n      : a.month !== b.month\n        ? a.month - b.month\n        : a.day !== b.day\n          ? a.day - b.day\n          : 0;\n  }\n  year = 0;\n  month = 0;\n  day = 0;\n\n  constructor(version: string) {\n    try {\n      const parts = version.split(\"-\").map((v) => Number.parseInt(v, 10));\n      this.year = parts[0];\n      this.month = parts[1];\n      this.day = parts[2];\n    } catch {\n      // Ignore error\n    }\n  }\n  /**\n   * Compares two Azure Versions against each other\n   * @param compareTo Version to compare against\n   * @returns a number less than zero if compareTo is newer, 0 if equal,\n   * and greater than zero if this is greater than compareTo\n   */\n  compare(compareTo: Required<Version> | string) {\n    return Version.compare(this, compareTo);\n  }\n}\n","import { Utils } from \"../../misc/utils\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\n\nexport class BitwardenFileUploadService {\n  async upload(\n    encryptedFileName: string,\n    encryptedFileData: EncArrayBuffer,\n    apiCall: (fd: FormData) => Promise<any>,\n  ) {\n    const fd = new FormData();\n\n    if (Utils.isBrowser) {\n      const blob = new Blob([encryptedFileData.buffer], { type: \"application/octet-stream\" });\n      fd.append(\"data\", blob, encryptedFileName);\n    } else if (Utils.isNode) {\n      fd.append(\n        \"data\",\n        Buffer.from(encryptedFileData.buffer) as any,\n        {\n          filename: encryptedFileName,\n          contentType: \"application/octet-stream\",\n        } as any,\n      );\n    } else {\n      throw new Error(\"Unsupported environment\");\n    }\n\n    await apiCall(fd);\n  }\n}\n","import { MigrationHelper } from \"./migration-helper\";\nimport { Direction, Migrator, VersionFrom, VersionTo } from \"./migrator\";\n\nexport class MigrationBuilder<TCurrent extends number = 0> {\n  /** Create a new MigrationBuilder with an empty buffer of migrations to perform.\n   *\n   * Add migrations to the buffer with {@link with} and {@link rollback}.\n   * @returns A new MigrationBuilder.\n   */\n  static create(): MigrationBuilder<0> {\n    return new MigrationBuilder([]);\n  }\n\n  private constructor(\n    private migrations: readonly { migrator: Migrator<number, number>; direction: Direction }[],\n  ) {}\n\n  /** Add a migrator to the MigrationBuilder. Types are updated such that the chained MigrationBuilder must currently be\n   * at state version equal to the from version of the migrator. Return as MigrationBuilder<TTo> where TTo is the to\n   * version of the migrator, so that the next migrator can be chained.\n   *\n   * @param migrate A migrator class or a tuple of a migrator class, the from version, and the to version. A tuple is\n   * required to instantiate version numbers unless a default constructor is defined.\n   * @returns A new MigrationBuilder with the to version of the migrator as the current version.\n   */\n  with<\n    TMigrator extends Migrator<number, number>,\n    TFrom extends VersionFrom<TMigrator> & TCurrent,\n    TTo extends VersionTo<TMigrator>,\n  >(\n    ...migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TFrom, TTo]\n  ): MigrationBuilder<TTo> {\n    return this.addMigrator(migrate, \"up\");\n  }\n\n  /** Add a migrator to rollback on the MigrationBuilder's list of migrations. As with {@link with}, types of\n   * MigrationBuilder and Migrator must align. However, this time the migration is reversed so TCurrent of the\n   * MigrationBuilder must be equal to the to version of the migrator. Return as MigrationBuilder<TFrom> where TFrom\n   * is the from version of the migrator, so that the next migrator can be chained.\n   *\n   * @param migrate A migrator class or a tuple of a migrator class, the from version, and the to version. A tuple is\n   * required to instantiate version numbers unless a default constructor is defined.\n   * @returns A new MigrationBuilder with the from version of the migrator as the current version.\n   */\n  rollback<\n    TMigrator extends Migrator<number, number>,\n    TFrom extends VersionFrom<TMigrator>,\n    TTo extends VersionTo<TMigrator> & TCurrent,\n  >(\n    ...migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TTo, TFrom]\n  ): MigrationBuilder<TFrom> {\n    if (migrate.length === 3) {\n      migrate = [migrate[0], migrate[2], migrate[1]];\n    }\n    return this.addMigrator(migrate, \"down\");\n  }\n\n  /** Execute the migrations as defined in the MigrationBuilder's migrator buffer */\n  migrate(helper: MigrationHelper): Promise<void> {\n    return this.migrations.reduce(\n      (promise, migrator) =>\n        promise.then(async () => {\n          await this.runMigrator(migrator.migrator, helper, migrator.direction);\n        }),\n      Promise.resolve(),\n    );\n  }\n\n  private addMigrator<\n    TMigrator extends Migrator<number, number>,\n    TFrom extends VersionFrom<TMigrator> & TCurrent,\n    TTo extends VersionTo<TMigrator>,\n  >(\n    migrate: [new () => TMigrator] | [new (from: TFrom, to: TTo) => TMigrator, TFrom, TTo],\n    direction: Direction = \"up\",\n  ) {\n    const newMigration =\n      migrate.length === 1\n        ? { migrator: new migrate[0](), direction }\n        : { migrator: new migrate[0](migrate[1], migrate[2]), direction };\n\n    return new MigrationBuilder<TTo>([...this.migrations, newMigration]);\n  }\n\n  private async runMigrator(\n    migrator: Migrator<number, number>,\n    helper: MigrationHelper,\n    direction: Direction,\n  ): Promise<void> {\n    const shouldMigrate = await migrator.shouldMigrate(helper, direction);\n    helper.info(\n      `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) should migrate: ${shouldMigrate} - ${direction}`,\n    );\n    if (shouldMigrate) {\n      const method = direction === \"up\" ? migrator.migrate : migrator.rollback;\n      await method.bind(migrator)(helper);\n      helper.info(\n        `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) migrated - ${direction}`,\n      );\n      await migrator.updateVersion(helper, direction);\n      helper.info(\n        `Migrator ${migrator.constructor.name} (to version ${migrator.toVersion}) updated version - ${direction}`,\n      );\n    }\n  }\n}\n","import { NonNegativeInteger } from \"type-fest\";\n\nimport { MigrationHelper } from \"./migration-helper\";\n\nexport const IRREVERSIBLE = new Error(\"Irreversible migration\");\n\nexport type VersionFrom<T> =\n  T extends Migrator<infer TFrom, number>\n    ? TFrom extends NonNegativeInteger<TFrom>\n      ? TFrom\n      : never\n    : never;\nexport type VersionTo<T> =\n  T extends Migrator<number, infer TTo>\n    ? TTo extends NonNegativeInteger<TTo>\n      ? TTo\n      : never\n    : never;\nexport type Direction = \"up\" | \"down\";\n\nexport abstract class Migrator<TFrom extends number, TTo extends number> {\n  constructor(\n    public fromVersion: TFrom,\n    public toVersion: TTo,\n  ) {\n    if (fromVersion == null || toVersion == null) {\n      throw new Error(\"Invalid migration\");\n    }\n    if (fromVersion > toVersion) {\n      throw new Error(\"Invalid migration\");\n    }\n  }\n\n  shouldMigrate(helper: MigrationHelper, direction: Direction): Promise<boolean> {\n    const startVersion = direction === \"up\" ? this.fromVersion : this.toVersion;\n    return Promise.resolve(helper.currentVersion === startVersion);\n  }\n  abstract migrate(helper: MigrationHelper): Promise<void>;\n  abstract rollback(helper: MigrationHelper): Promise<void>;\n  async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    await helper.set(\"stateVersion\", endVersion);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  profile?: {\n    everHadUserKey?: boolean;\n  };\n};\n\nconst USER_EVER_HAD_USER_KEY: KeyDefinitionLike = {\n  key: \"everHadUserKey\",\n  stateDefinition: {\n    name: \"crypto\",\n  },\n};\n\nexport class EverHadUserKeyMigrator extends Migrator<9, 10> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.profile?.everHadUserKey;\n      await helper.setToUser(userId, USER_EVER_HAD_USER_KEY, value ?? false);\n      if (value != null) {\n        delete account.profile.everHadUserKey;\n      }\n      await helper.set(userId, account);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, USER_EVER_HAD_USER_KEY);\n      if (account) {\n        account.profile = Object.assign(account.profile ?? {}, {\n          everHadUserKey: value,\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_EVER_HAD_USER_KEY, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype OrgKeyDataType = {\n  type: \"organization\" | \"provider\";\n  key: string;\n  providerId?: string;\n};\n\ntype ExpectedAccountType = {\n  keys?: {\n    organizationKeys?: {\n      encrypted?: Record<string, OrgKeyDataType>;\n    };\n  };\n};\n\nconst USER_ENCRYPTED_ORGANIZATION_KEYS: KeyDefinitionLike = {\n  key: \"organizationKeys\",\n  stateDefinition: {\n    name: \"crypto\",\n  },\n};\n\nexport class OrganizationKeyMigrator extends Migrator<10, 11> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.keys?.organizationKeys?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS, value);\n        delete account.keys.organizationKeys;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser<Record<string, OrgKeyDataType>>(\n        userId,\n        USER_ENCRYPTED_ORGANIZATION_KEYS,\n      );\n      if (account && value) {\n        account.keys = Object.assign(account.keys ?? {}, {\n          organizationKeys: {\n            encrypted: value,\n          },\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype EnvironmentUrls = Record<string, string>;\n\ntype ExpectedAccountType = {\n  settings?: { region?: string; environmentUrls?: EnvironmentUrls };\n};\n\ntype ExpectedGlobalType = { region?: string; environmentUrls?: EnvironmentUrls };\n\nconst ENVIRONMENT_STATE: StateDefinitionLike = { name: \"environment\" };\n\nconst REGION_KEY: KeyDefinitionLike = { key: \"region\", stateDefinition: ENVIRONMENT_STATE };\nconst URLS_KEY: KeyDefinitionLike = { key: \"urls\", stateDefinition: ENVIRONMENT_STATE };\n\nexport class MoveEnvironmentStateToProviders extends Migrator<11, 12> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobal = await helper.get<ExpectedGlobalType>(\"global\");\n\n    // Move global data\n    if (legacyGlobal?.region != null) {\n      await helper.setToGlobal(REGION_KEY, legacyGlobal.region);\n    }\n\n    if (legacyGlobal?.environmentUrls != null) {\n      await helper.setToGlobal(URLS_KEY, legacyGlobal.environmentUrls);\n    }\n\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        // Move account data\n        if (account?.settings?.region != null) {\n          await helper.setToUser(userId, REGION_KEY, account.settings.region);\n        }\n\n        if (account?.settings?.environmentUrls != null) {\n          await helper.setToUser(userId, URLS_KEY, account.settings.environmentUrls);\n        }\n\n        // Delete old account data\n        delete account?.settings?.region;\n        delete account?.settings?.environmentUrls;\n        await helper.set(userId, account);\n      }),\n    );\n\n    // Delete legacy global data\n    delete legacyGlobal?.region;\n    delete legacyGlobal?.environmentUrls;\n    await helper.set(\"global\", legacyGlobal);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    let legacyGlobal = await helper.get<ExpectedGlobalType>(\"global\");\n\n    let updatedLegacyGlobal = false;\n\n    const globalRegion = await helper.getFromGlobal<string>(REGION_KEY);\n\n    if (globalRegion) {\n      if (!legacyGlobal) {\n        legacyGlobal = {};\n      }\n\n      updatedLegacyGlobal = true;\n      legacyGlobal.region = globalRegion;\n      await helper.setToGlobal(REGION_KEY, null);\n    }\n\n    const globalUrls = await helper.getFromGlobal<EnvironmentUrls>(URLS_KEY);\n\n    if (globalUrls) {\n      if (!legacyGlobal) {\n        legacyGlobal = {};\n      }\n\n      updatedLegacyGlobal = true;\n      legacyGlobal.environmentUrls = globalUrls;\n      await helper.setToGlobal(URLS_KEY, null);\n    }\n\n    if (updatedLegacyGlobal) {\n      await helper.set(\"global\", legacyGlobal);\n    }\n\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      let updatedAccount = false;\n      const userRegion = await helper.getFromUser<string>(userId, REGION_KEY);\n\n      if (userRegion) {\n        if (!account) {\n          account = {};\n        }\n\n        if (!account.settings) {\n          account.settings = {};\n        }\n\n        updatedAccount = true;\n        account.settings.region = userRegion;\n        await helper.setToUser(userId, REGION_KEY, null);\n      }\n\n      const userUrls = await helper.getFromUser<EnvironmentUrls>(userId, URLS_KEY);\n\n      if (userUrls) {\n        if (!account) {\n          account = {};\n        }\n\n        if (!account.settings) {\n          account.settings = {};\n        }\n\n        updatedAccount = true;\n        account.settings.environmentUrls = userUrls;\n        await helper.setToUser(userId, URLS_KEY, null);\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  keys?: {\n    providerKeys?: {\n      encrypted?: Record<string, string>; // Record<ProviderId, EncryptedString> where EncryptedString is the ProviderKey encrypted by the UserKey.\n    };\n  };\n};\n\nconst USER_ENCRYPTED_PROVIDER_KEYS: KeyDefinitionLike = {\n  key: \"providerKeys\",\n  stateDefinition: {\n    name: \"crypto\",\n  },\n};\n\nexport class ProviderKeyMigrator extends Migrator<12, 13> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.keys?.providerKeys?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ENCRYPTED_PROVIDER_KEYS, value);\n        delete account.keys.providerKeys;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser<Record<string, string>>(\n        userId,\n        USER_ENCRYPTED_PROVIDER_KEYS,\n      );\n      if (account && value) {\n        account.keys = Object.assign(account.keys ?? {}, {\n          providerKeys: {\n            encrypted: value,\n          },\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ENCRYPTED_PROVIDER_KEYS, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    disableAutoBiometricsPrompt?: boolean;\n    biometricUnlock?: boolean;\n    dismissedBiometricRequirePasswordOnStartCallout?: boolean;\n  };\n  keys?: { biometricEncryptionClientKeyHalf?: string };\n};\n\n// Biometric text, no auto prompt text, fingerprint validated, and prompt cancelled are refreshed on every app start, so we don't need to migrate them\nexport const CLIENT_KEY_HALF: KeyDefinitionLike = {\n  key: \"clientKeyHalf\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricClientKeyHalfToStateProviders extends Migrator<13, 14> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        // Move account data\n        if (account?.keys?.biometricEncryptionClientKeyHalf != null) {\n          await helper.setToUser(\n            userId,\n            CLIENT_KEY_HALF,\n            account.keys.biometricEncryptionClientKeyHalf,\n          );\n\n          // Delete old account data\n          delete account?.keys?.biometricEncryptionClientKeyHalf;\n          await helper.set(userId, account);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      let updatedAccount = false;\n\n      const userKeyHalf = await helper.getFromUser<string>(userId, CLIENT_KEY_HALF);\n\n      if (userKeyHalf) {\n        account ??= {};\n        account.keys ??= {};\n\n        updatedAccount = true;\n        account.keys.biometricEncryptionClientKeyHalf = userKeyHalf;\n        await helper.setToUser(userId, CLIENT_KEY_HALF, null);\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype FolderDataType = {\n  id: string;\n  name: string;\n  revisionDate: string;\n};\n\ntype ExpectedAccountType = {\n  data?: {\n    folders?: {\n      encrypted?: Record<string, FolderDataType>;\n    };\n  };\n};\n\nconst USER_ENCRYPTED_FOLDERS: KeyDefinitionLike = {\n  key: \"folders\",\n  stateDefinition: {\n    name: \"folder\",\n  },\n};\n\nexport class FolderMigrator extends Migrator<14, 15> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.data?.folders?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ENCRYPTED_FOLDERS, value);\n        delete account.data.folders;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, USER_ENCRYPTED_FOLDERS);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          folders: {\n            encrypted: value,\n          },\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ENCRYPTED_FOLDERS, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  profile?: {\n    lastSync?: string;\n  };\n};\n\nconst LAST_SYNC_KEY: KeyDefinitionLike = {\n  key: \"lastSync\",\n  stateDefinition: {\n    name: \"sync\",\n  },\n};\n\nexport class LastSyncMigrator extends Migrator<15, 16> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.profile?.lastSync;\n      await helper.setToUser(userId, LAST_SYNC_KEY, value ?? null);\n      if (value != null) {\n        delete account.profile.lastSync;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, LAST_SYNC_KEY);\n      if (account) {\n        account.profile = Object.assign(account.profile ?? {}, {\n          lastSync: value,\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, LAST_SYNC_KEY, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalType = {\n  enablePasskeys?: boolean;\n};\n\nconst USER_ENABLE_PASSKEYS: KeyDefinitionLike = {\n  key: \"enablePasskeys\",\n  stateDefinition: {\n    name: \"vaultSettings\",\n  },\n};\n\nexport class EnablePasskeysMigrator extends Migrator<16, 17> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const global = await helper.get<ExpectedGlobalType>(\"global\");\n\n    if (global?.enablePasskeys != null) {\n      await helper.setToGlobal(USER_ENABLE_PASSKEYS, global.enablePasskeys);\n      delete global?.enablePasskeys;\n      await helper.set(\"global\", global);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    let global = await helper.get<ExpectedGlobalType>(\"global\");\n    const globalEnablePasskeys = await helper.getFromGlobal<boolean>(USER_ENABLE_PASSKEYS);\n\n    if (globalEnablePasskeys != null) {\n      global = Object.assign(global ?? {}, { enablePasskeys: globalEnablePasskeys });\n      await helper.set(\"global\", global);\n      await helper.setToGlobal(USER_ENABLE_PASSKEYS, undefined);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { StateDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst AutofillOverlayVisibility = {\n  Off: 0,\n  OnButtonClick: 1,\n  OnFieldFocus: 2,\n} as const;\n\ntype InlineMenuVisibilitySetting =\n  (typeof AutofillOverlayVisibility)[keyof typeof AutofillOverlayVisibility];\n\ntype ExpectedAccountState = {\n  settings?: {\n    autoFillOnPageLoadDefault?: boolean;\n    enableAutoFillOnPageLoad?: boolean;\n    dismissedAutoFillOnPageLoadCallout?: boolean;\n    disableAutoTotpCopy?: boolean;\n    activateAutoFillOnPageLoadFromPolicy?: InlineMenuVisibilitySetting;\n  };\n};\n\ntype ExpectedGlobalState = { autoFillOverlayVisibility?: InlineMenuVisibilitySetting };\n\nconst autofillSettingsStateDefinition: {\n  stateDefinition: StateDefinitionLike;\n} = {\n  stateDefinition: {\n    name: \"autofillSettings\",\n  },\n};\n\nexport class AutofillSettingsKeyMigrator extends Migrator<17, 18> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // global state (e.g. \"autoFillOverlayVisibility -> inlineMenuVisibility\")\n    const globalState = await helper.get<ExpectedGlobalState>(\"global\");\n\n    if (globalState?.autoFillOverlayVisibility != null) {\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"autofillSettingsLocal\",\n          },\n          key: \"inlineMenuVisibility\",\n        },\n        globalState.autoFillOverlayVisibility,\n      );\n\n      // delete `autoFillOverlayVisibility` from state global\n      delete globalState.autoFillOverlayVisibility;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n\n    // account state (e.g. account settings -> state provider framework keys)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    // migrate account state\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let updateAccount = false;\n      const accountSettings = account?.settings;\n\n      if (accountSettings?.autoFillOnPageLoadDefault != null) {\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadDefault\" },\n          accountSettings.autoFillOnPageLoadDefault,\n        );\n        delete account.settings.autoFillOnPageLoadDefault;\n        updateAccount = true;\n      }\n\n      if (accountSettings?.enableAutoFillOnPageLoad != null) {\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoad\" },\n          accountSettings?.enableAutoFillOnPageLoad,\n        );\n        delete account.settings.enableAutoFillOnPageLoad;\n        updateAccount = true;\n      }\n\n      if (accountSettings?.dismissedAutoFillOnPageLoadCallout != null) {\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadCalloutIsDismissed\" },\n          accountSettings?.dismissedAutoFillOnPageLoadCallout,\n        );\n        delete account.settings.dismissedAutoFillOnPageLoadCallout;\n        updateAccount = true;\n      }\n\n      if (accountSettings?.disableAutoTotpCopy != null) {\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autoCopyTotp\" },\n          // invert the value to match the new naming convention\n          !accountSettings?.disableAutoTotpCopy,\n        );\n        delete account.settings.disableAutoTotpCopy;\n        updateAccount = true;\n      }\n\n      if (accountSettings?.activateAutoFillOnPageLoadFromPolicy != null) {\n        await helper.setToUser(\n          userId,\n          {\n            stateDefinition: {\n              name: \"autofillSettingsLocal\",\n            },\n            key: \"activateAutofillOnPageLoadFromPolicy\",\n          },\n          accountSettings?.activateAutoFillOnPageLoadFromPolicy,\n        );\n        delete account.settings.activateAutoFillOnPageLoadFromPolicy;\n        updateAccount = true;\n      }\n\n      if (updateAccount) {\n        // update the state account settings with the migrated values deleted\n        await helper.set(userId, account);\n      }\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // global state (e.g. \"inlineMenuVisibility -> autoFillOverlayVisibility\")\n    const globalState = (await helper.get<ExpectedGlobalState>(\"global\")) || {};\n    const inlineMenuVisibility: InlineMenuVisibilitySetting = await helper.getFromGlobal({\n      stateDefinition: {\n        name: \"autofillSettingsLocal\",\n      },\n      key: \"inlineMenuVisibility\",\n    });\n\n    if (inlineMenuVisibility) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        autoFillOverlayVisibility: inlineMenuVisibility,\n      });\n\n      // remove the global state provider framework key for `inlineMenuVisibility`\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"autofillSettingsLocal\",\n          },\n          key: \"inlineMenuVisibility\",\n        },\n        null,\n      );\n    }\n\n    // account state (e.g. state provider framework keys -> account settings)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    // rollback account state\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let updateAccount = false;\n      let settings = account?.settings || {};\n\n      const autoFillOnPageLoadDefault: boolean = await helper.getFromUser(userId, {\n        ...autofillSettingsStateDefinition,\n        key: \"autofillOnPageLoadDefault\",\n      });\n\n      const enableAutoFillOnPageLoad: boolean = await helper.getFromUser(userId, {\n        ...autofillSettingsStateDefinition,\n        key: \"autofillOnPageLoad\",\n      });\n\n      const dismissedAutoFillOnPageLoadCallout: boolean = await helper.getFromUser(userId, {\n        ...autofillSettingsStateDefinition,\n        key: \"autofillOnPageLoadCalloutIsDismissed\",\n      });\n\n      const autoCopyTotp: boolean = await helper.getFromUser(userId, {\n        ...autofillSettingsStateDefinition,\n        key: \"autoCopyTotp\",\n      });\n\n      const activateAutoFillOnPageLoadFromPolicy: InlineMenuVisibilitySetting =\n        await helper.getFromUser(userId, {\n          stateDefinition: {\n            name: \"autofillSettingsLocal\",\n          },\n          key: \"activateAutofillOnPageLoadFromPolicy\",\n        });\n\n      // update new settings and remove the account state provider framework keys for the rolled back values\n      if (autoFillOnPageLoadDefault != null) {\n        settings = { ...settings, autoFillOnPageLoadDefault };\n\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadDefault\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (enableAutoFillOnPageLoad != null) {\n        settings = { ...settings, enableAutoFillOnPageLoad };\n\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoad\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (dismissedAutoFillOnPageLoadCallout != null) {\n        settings = { ...settings, dismissedAutoFillOnPageLoadCallout };\n\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autofillOnPageLoadCalloutIsDismissed\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (autoCopyTotp != null) {\n        // invert the value to match the new naming convention\n        settings = { ...settings, disableAutoTotpCopy: !autoCopyTotp };\n\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsStateDefinition, key: \"autoCopyTotp\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (activateAutoFillOnPageLoadFromPolicy != null) {\n        settings = { ...settings, activateAutoFillOnPageLoadFromPolicy };\n\n        await helper.setToUser(\n          userId,\n          {\n            stateDefinition: {\n              name: \"autofillSettingsLocal\",\n            },\n            key: \"activateAutofillOnPageLoadFromPolicy\",\n          },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (updateAccount) {\n        // commit updated settings to state\n        await helper.set(userId, {\n          ...account,\n          settings,\n        });\n      }\n    }\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    requirePasswordOnStart?: boolean;\n  };\n};\n\n// Biometric text, no auto prompt text, fingerprint validated, and prompt cancelled are refreshed on every app start, so we don't need to migrate them\nexport const REQUIRE_PASSWORD_ON_START: KeyDefinitionLike = {\n  key: \"requirePasswordOnStart\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class RequirePasswordOnStartMigrator extends Migrator<18, 19> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        // Move account data\n        if (account?.settings?.requirePasswordOnStart != null) {\n          await helper.setToUser(\n            userId,\n            REQUIRE_PASSWORD_ON_START,\n            account.settings.requirePasswordOnStart,\n          );\n\n          // Delete old account data\n          delete account.settings.requirePasswordOnStart;\n          await helper.set(userId, account);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      const requirePassword = await helper.getFromUser<boolean>(userId, REQUIRE_PASSWORD_ON_START);\n\n      if (requirePassword) {\n        account ??= {};\n        account.settings ??= {};\n\n        account.settings.requirePasswordOnStart = requirePassword;\n        await helper.setToUser(userId, REQUIRE_PASSWORD_ON_START, null);\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  keys?: {\n    privateKey?: {\n      encrypted?: string; // EncryptedString\n    };\n  };\n};\n\nconst USER_ENCRYPTED_PRIVATE_KEY: KeyDefinitionLike = {\n  key: \"privateKey\",\n  stateDefinition: {\n    name: \"crypto\",\n  },\n};\n\nexport class PrivateKeyMigrator extends Migrator<19, 20> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.keys?.privateKey?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ENCRYPTED_PRIVATE_KEY, value);\n        delete account.keys.privateKey;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser<Record<string, string>>(\n        userId,\n        USER_ENCRYPTED_PRIVATE_KEY,\n      );\n      if (account && value) {\n        account.keys = Object.assign(account.keys ?? {}, {\n          privateKey: {\n            encrypted: value,\n          },\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ENCRYPTED_PRIVATE_KEY, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype CollectionDataType = {\n  id: string;\n  organizationId: string;\n  name: string;\n  externalId: string;\n  readOnly: boolean;\n  manage: boolean;\n  hidePasswords: boolean;\n};\n\ntype ExpectedAccountType = {\n  data?: {\n    collections?: {\n      encrypted?: Record<string, CollectionDataType>;\n    };\n  };\n};\n\nconst USER_ENCRYPTED_COLLECTIONS: KeyDefinitionLike = {\n  key: \"collections\",\n  stateDefinition: {\n    name: \"collection\",\n  },\n};\n\nexport class CollectionMigrator extends Migrator<20, 21> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.data?.collections?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ENCRYPTED_COLLECTIONS, value);\n        delete account.data.collections;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, USER_ENCRYPTED_COLLECTIONS);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          collections: {\n            encrypted: value,\n          },\n        });\n\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ENCRYPTED_COLLECTIONS, null);\n    }\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    collapsedGroupings?: string[];\n  };\n};\n\nconst COLLAPSED_GROUPINGS: KeyDefinitionLike = {\n  key: \"collapsedGroupings\",\n  stateDefinition: {\n    name: \"vaultFilter\",\n  },\n};\n\nexport class CollapsedGroupingsMigrator extends Migrator<21, 22> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.settings?.collapsedGroupings;\n      if (value != null) {\n        await helper.setToUser(userId, COLLAPSED_GROUPINGS, value);\n        delete account.settings.collapsedGroupings;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, COLLAPSED_GROUPINGS);\n      if (account) {\n        account.settings = Object.assign(account.settings ?? {}, {\n          collapsedGroupings: value,\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, COLLAPSED_GROUPINGS, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    disableAutoBiometricsPrompt?: boolean;\n    dismissedBiometricRequirePasswordOnStartCallout?: boolean;\n  };\n};\n\n// prompt cancelled is refreshed on every app start/quit/unlock, so we don't need to migrate it\n\nexport const DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT: KeyDefinitionLike = {\n  key: \"dismissedBiometricRequirePasswordOnStartCallout\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport const PROMPT_AUTOMATICALLY: KeyDefinitionLike = {\n  key: \"promptAutomatically\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricPromptsToStateProviders extends Migrator<22, 23> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        if (account == null) {\n          return;\n        }\n        // Move account data\n\n        if (account?.settings?.dismissedBiometricRequirePasswordOnStartCallout != null) {\n          await helper.setToUser(\n            userId,\n            DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT,\n            account.settings.dismissedBiometricRequirePasswordOnStartCallout,\n          );\n        }\n\n        if (account?.settings?.disableAutoBiometricsPrompt != null) {\n          await helper.setToUser(\n            userId,\n            PROMPT_AUTOMATICALLY,\n            !account.settings.disableAutoBiometricsPrompt,\n          );\n        }\n\n        // Delete old account data\n        delete account?.settings?.dismissedBiometricRequirePasswordOnStartCallout;\n        delete account?.settings?.disableAutoBiometricsPrompt;\n        await helper.set(userId, account);\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      let updatedAccount = false;\n\n      const userDismissed = await helper.getFromUser<boolean>(\n        userId,\n        DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT,\n      );\n\n      if (userDismissed) {\n        account ??= {};\n        account.settings ??= {};\n\n        updatedAccount = true;\n        account.settings.dismissedBiometricRequirePasswordOnStartCallout = userDismissed;\n        await helper.setToUser(userId, DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT, null);\n      }\n\n      const userPromptAutomatically = await helper.getFromUser<boolean>(\n        userId,\n        PROMPT_AUTOMATICALLY,\n      );\n\n      if (userPromptAutomatically != null) {\n        account ??= {};\n        account.settings ??= {};\n\n        updatedAccount = true;\n        account.settings.disableAutoBiometricsPrompt = !userPromptAutomatically;\n        await helper.setToUser(userId, PROMPT_AUTOMATICALLY, null);\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    smOnboardingTasks?: Record<string, Record<string, boolean>>;\n  };\n};\n\nexport const SM_ONBOARDING_TASKS: KeyDefinitionLike = {\n  key: \"tasks\",\n  stateDefinition: { name: \"smOnboarding\" },\n};\n\nexport class SmOnboardingTasksMigrator extends Migrator<23, 24> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        // Move account data\n        if (account?.settings?.smOnboardingTasks != null) {\n          await helper.setToUser(userId, SM_ONBOARDING_TASKS, account.settings.smOnboardingTasks);\n\n          // Delete old account data\n          delete account.settings.smOnboardingTasks;\n          await helper.set(userId, account);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      const smOnboardingTasks = await helper.getFromUser<Record<string, Record<string, boolean>>>(\n        userId,\n        SM_ONBOARDING_TASKS,\n      );\n      if (smOnboardingTasks) {\n        account ??= {};\n        account.settings ??= {};\n\n        account.settings.smOnboardingTasks = smOnboardingTasks;\n        await helper.setToUser(userId, SM_ONBOARDING_TASKS, null);\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { StateDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst ClearClipboardDelay = {\n  Never: null as null,\n  TenSeconds: 10,\n  TwentySeconds: 20,\n  ThirtySeconds: 30,\n  OneMinute: 60,\n  TwoMinutes: 120,\n  FiveMinutes: 300,\n} as const;\n\ntype ClearClipboardDelaySetting = (typeof ClearClipboardDelay)[keyof typeof ClearClipboardDelay];\n\ntype ExpectedAccountState = {\n  settings?: {\n    clearClipboard?: ClearClipboardDelaySetting;\n  };\n};\n\nconst autofillSettingsLocalStateDefinition: {\n  stateDefinition: StateDefinitionLike;\n} = {\n  stateDefinition: {\n    name: \"autofillSettingsLocal\",\n  },\n};\n\nexport class ClearClipboardDelayMigrator extends Migrator<24, 25> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // account state (e.g. account settings -> state provider framework keys)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    // migrate account state\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      const accountSettings = account?.settings;\n\n      if (accountSettings?.clearClipboard !== undefined) {\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsLocalStateDefinition, key: \"clearClipboardDelay\" },\n          accountSettings.clearClipboard,\n        );\n        delete account.settings.clearClipboard;\n\n        // update the state account settings with the migrated values deleted\n        await helper.set(userId, account);\n      }\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // account state (e.g. state provider framework keys -> account settings)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    // rollback account state\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let settings = account?.settings || {};\n\n      const clearClipboardDelay: ClearClipboardDelaySetting = await helper.getFromUser(userId, {\n        ...autofillSettingsLocalStateDefinition,\n        key: \"clearClipboardDelay\",\n      });\n\n      // update new settings and remove the account state provider framework keys for the rolled back values\n      if (clearClipboardDelay !== undefined) {\n        settings = { ...settings, clearClipboard: clearClipboardDelay };\n\n        await helper.setToUser(\n          userId,\n          { ...autofillSettingsLocalStateDefinition, key: \"clearClipboardDelay\" },\n          null,\n        );\n\n        // commit updated settings to state\n        await helper.set(userId, {\n          ...account,\n          settings,\n        });\n      }\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  profile?: {\n    lastSync?: string;\n  };\n};\n\nconst LAST_SYNC_KEY: KeyDefinitionLike = {\n  key: \"lastSync\",\n  stateDefinition: {\n    name: \"sync\",\n  },\n};\n\nexport class RevertLastSyncMigrator extends Migrator<25, 26> {\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.profile?.lastSync;\n      await helper.setToUser(userId, LAST_SYNC_KEY, value ?? null);\n      if (value != null) {\n        delete account.profile.lastSync;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, LAST_SYNC_KEY);\n      if (account) {\n        account.profile = Object.assign(account.profile ?? {}, {\n          lastSync: value,\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, LAST_SYNC_KEY, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  settings?: {\n    disableBadgeCounter?: boolean;\n  };\n};\n\nconst enableBadgeCounterKeyDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"badgeSettings\",\n  },\n  key: \"enableBadgeCounter\",\n};\n\nexport class BadgeSettingsMigrator extends Migrator<26, 27> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // account state (e.g. account settings -> state provider framework keys)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    // migrate account state\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      const accountSettings = account?.settings;\n\n      if (accountSettings?.disableBadgeCounter != undefined) {\n        await helper.setToUser(\n          userId,\n          enableBadgeCounterKeyDefinition,\n          !accountSettings.disableBadgeCounter,\n        );\n        delete account.settings.disableBadgeCounter;\n\n        // update the state account settings with the migrated values deleted\n        await helper.set(userId, account);\n      }\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // account state (e.g. state provider framework keys -> account settings)\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    // rollback account state\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let settings = account?.settings || {};\n\n      const enableBadgeCounter: boolean = await helper.getFromUser(\n        userId,\n        enableBadgeCounterKeyDefinition,\n      );\n\n      // update new settings and remove the account state provider framework keys for the rolled back values\n      if (enableBadgeCounter != undefined) {\n        settings = { ...settings, disableBadgeCounter: !enableBadgeCounter };\n\n        await helper.setToUser(userId, enableBadgeCounterKeyDefinition, null);\n\n        // commit updated settings to state\n        await helper.set(userId, {\n          ...account,\n          settings,\n        });\n      }\n    }\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  settings?: {\n    biometricUnlock?: boolean;\n  };\n};\n\nexport const BIOMETRIC_UNLOCK_ENABLED: KeyDefinitionLike = {\n  key: \"biometricUnlockEnabled\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class MoveBiometricUnlockToStateProviders extends Migrator<27, 28> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        if (account == null) {\n          return;\n        }\n        // Move account data\n        if (account?.settings?.biometricUnlock != null) {\n          await helper.setToUser(\n            userId,\n            BIOMETRIC_UNLOCK_ENABLED,\n            account.settings.biometricUnlock,\n          );\n        }\n\n        // Delete old account data\n        delete account?.settings?.biometricUnlock;\n        await helper.set(userId, account);\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountType) {\n      const biometricUnlock = await helper.getFromUser<boolean>(userId, BIOMETRIC_UNLOCK_ENABLED);\n\n      if (biometricUnlock != null) {\n        account ??= {};\n        account.settings ??= {};\n\n        account.settings.biometricUnlock = biometricUnlock;\n        await helper.setToUser(userId, BIOMETRIC_UNLOCK_ENABLED, null);\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n  disableAddLoginNotification?: boolean;\n  disableChangedPasswordNotification?: boolean;\n};\n\nexport class UserNotificationSettingsKeyMigrator extends Migrator<28, 29> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const globalState = await helper.get<ExpectedGlobalState>(\"global\");\n\n    // disableAddLoginNotification -> enableAddedLoginPrompt\n    if (globalState?.disableAddLoginNotification != null) {\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"userNotificationSettings\",\n          },\n          key: \"enableAddedLoginPrompt\",\n        },\n        !globalState.disableAddLoginNotification,\n      );\n\n      // delete `disableAddLoginNotification` from state global\n      delete globalState.disableAddLoginNotification;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n\n    // disableChangedPasswordNotification -> enableChangedPasswordPrompt\n    if (globalState?.disableChangedPasswordNotification != null) {\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"userNotificationSettings\",\n          },\n          key: \"enableChangedPasswordPrompt\",\n        },\n        !globalState.disableChangedPasswordNotification,\n      );\n\n      // delete `disableChangedPasswordNotification` from state global\n      delete globalState.disableChangedPasswordNotification;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const globalState = (await helper.get<ExpectedGlobalState>(\"global\")) || {};\n\n    const enableAddedLoginPrompt: boolean = await helper.getFromGlobal({\n      stateDefinition: {\n        name: \"userNotificationSettings\",\n      },\n      key: \"enableAddedLoginPrompt\",\n    });\n\n    const enableChangedPasswordPrompt: boolean = await helper.getFromGlobal({\n      stateDefinition: {\n        name: \"userNotificationSettings\",\n      },\n      key: \"enableChangedPasswordPrompt\",\n    });\n\n    // enableAddedLoginPrompt -> disableAddLoginNotification\n    if (enableAddedLoginPrompt) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        disableAddLoginNotification: !enableAddedLoginPrompt,\n      });\n\n      // remove the global state provider framework key for `enableAddedLoginPrompt`\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"userNotificationSettings\",\n          },\n          key: \"enableAddedLoginPrompt\",\n        },\n        null,\n      );\n    }\n\n    // enableChangedPasswordPrompt -> disableChangedPasswordNotification\n    if (enableChangedPasswordPrompt) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        disableChangedPasswordNotification: !enableChangedPasswordPrompt,\n      });\n\n      // remove the global state provider framework key for `enableChangedPasswordPrompt`\n      await helper.setToGlobal(\n        {\n          stateDefinition: {\n            name: \"userNotificationSettings\",\n          },\n          key: \"enableChangedPasswordPrompt\",\n        },\n        null,\n      );\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nenum PolicyType {\n  TwoFactorAuthentication = 0, // Requires users to have 2fa enabled\n  MasterPassword = 1, // Sets minimum requirements for master password complexity\n  PasswordGenerator = 2, // Sets minimum requirements/default type for generated passwords/passphrases\n  SingleOrg = 3, // Allows users to only be apart of one organization\n  RequireSso = 4, // Requires users to authenticate with SSO\n  PersonalOwnership = 5, // Disables personal vault ownership for adding/cloning items\n  DisableSend = 6, // Disables the ability to create and edit Bitwarden Sends\n  SendOptions = 7, // Sets restrictions or defaults for Bitwarden Sends\n  ResetPassword = 8, // Allows orgs to use reset password : also can enable auto-enrollment during invite flow\n  MaximumVaultTimeout = 9, // Sets the maximum allowed vault timeout\n  DisablePersonalVaultExport = 10, // Disable personal vault export\n  ActivateAutofill = 11, // Activates autofill with page load on the browser extension\n}\n\ntype PolicyDataType = {\n  id: string;\n  organizationId: string;\n  type: PolicyType;\n  data: Record<string, string | number | boolean>;\n  enabled: boolean;\n};\n\ntype ExpectedAccountType = {\n  data?: {\n    policies?: {\n      encrypted?: Record<string, PolicyDataType>;\n    };\n  };\n};\n\nconst POLICIES_KEY: KeyDefinitionLike = {\n  key: \"policies\",\n  stateDefinition: {\n    name: \"policies\",\n  },\n};\n\nexport class PolicyMigrator extends Migrator<29, 30> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.data?.policies?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, POLICIES_KEY, value);\n        delete account.data.policies;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, POLICIES_KEY);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          policies: {\n            encrypted: value,\n          },\n        });\n\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, POLICIES_KEY, null);\n    }\n    await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n  disableContextMenuItem?: boolean;\n};\n\nconst enableContextMenuKeyDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"autofillSettings\",\n  },\n  key: \"enableContextMenu\",\n};\n\nexport class EnableContextMenuMigrator extends Migrator<30, 31> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const globalState = await helper.get<ExpectedGlobalState>(\"global\");\n\n    // disableContextMenuItem -> enableContextMenu\n    if (globalState?.disableContextMenuItem != null) {\n      await helper.setToGlobal(enableContextMenuKeyDefinition, !globalState.disableContextMenuItem);\n\n      // delete `disableContextMenuItem` from state global\n      delete globalState.disableContextMenuItem;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const globalState = (await helper.get<ExpectedGlobalState>(\"global\")) || {};\n\n    const enableContextMenu: boolean = await helper.getFromGlobal(enableContextMenuKeyDefinition);\n\n    // enableContextMenu -> disableContextMenuItem\n    if (enableContextMenu != null) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        disableContextMenuItem: !enableContextMenu,\n      });\n\n      // remove the global state provider framework key for `enableContextMenu`\n      await helper.setToGlobal(enableContextMenuKeyDefinition, null);\n    }\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n  locale?: string;\n};\n\nexport const LOCALE_KEY = {\n  key: \"locale\",\n  stateDefinition: {\n    name: \"translation\",\n  },\n};\n\nexport class PreferredLanguageMigrator extends Migrator<31, 32> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // global state\n    const global = await helper.get<ExpectedGlobal>(\"global\");\n    if (!global?.locale) {\n      return;\n    }\n\n    await helper.setToGlobal(LOCALE_KEY, global.locale);\n    delete global.locale;\n    await helper.set(\"global\", global);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const locale = await helper.getFromGlobal<string>(LOCALE_KEY);\n\n    if (!locale) {\n      return;\n    }\n    const global = (await helper.get<ExpectedGlobal>(\"global\")) ?? {};\n    global.locale = locale;\n    await helper.set(\"global\", global);\n    await helper.setToGlobal(LOCALE_KEY, null);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport const APP_ID_STORAGE_KEY = \"appId\";\nexport const ANONYMOUS_APP_ID_STORAGE_KEY = \"anonymousAppId\";\n\nexport const APP_ID_KEY: KeyDefinitionLike = {\n  key: APP_ID_STORAGE_KEY,\n  stateDefinition: { name: \"applicationId\" },\n};\n\nexport const ANONYMOUS_APP_ID_KEY: KeyDefinitionLike = {\n  key: ANONYMOUS_APP_ID_STORAGE_KEY,\n  stateDefinition: { name: \"applicationId\" },\n};\n\nexport class AppIdMigrator extends Migrator<32, 33> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const appId = await helper.get<string>(APP_ID_STORAGE_KEY);\n    const anonymousAppId = await helper.get<string>(ANONYMOUS_APP_ID_STORAGE_KEY);\n\n    if (appId != null) {\n      await helper.setToGlobal(APP_ID_KEY, appId);\n      await helper.set(APP_ID_STORAGE_KEY, null);\n    }\n\n    if (anonymousAppId != null) {\n      await helper.setToGlobal(ANONYMOUS_APP_ID_KEY, anonymousAppId);\n      await helper.set(ANONYMOUS_APP_ID_STORAGE_KEY, null);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const appId = await helper.getFromGlobal<string>(APP_ID_KEY);\n    const anonymousAppId = await helper.getFromGlobal<string>(ANONYMOUS_APP_ID_KEY);\n\n    if (appId != null) {\n      await helper.set(APP_ID_STORAGE_KEY, appId);\n      await helper.setToGlobal(APP_ID_KEY, null);\n    }\n    if (anonymousAppId != null) {\n      await helper.set(ANONYMOUS_APP_ID_STORAGE_KEY, anonymousAppId);\n      await helper.setToGlobal(ANONYMOUS_APP_ID_KEY, null);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst UriMatchStrategy = {\n  Domain: 0,\n  Host: 1,\n  StartsWith: 2,\n  Exact: 3,\n  RegularExpression: 4,\n  Never: 5,\n} as const;\n\ntype UriMatchStrategySetting = (typeof UriMatchStrategy)[keyof typeof UriMatchStrategy];\n\ntype ExpectedAccountState = {\n  settings?: {\n    defaultUriMatch?: UriMatchStrategySetting;\n    settings?: {\n      equivalentDomains?: string[][];\n    };\n  };\n};\n\ntype ExpectedGlobalState = {\n  neverDomains?: { [key: string]: null };\n};\n\nconst defaultUriMatchStrategyDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"domainSettings\",\n  },\n  key: \"defaultUriMatchStrategy\",\n};\n\nconst equivalentDomainsDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"domainSettings\",\n  },\n  key: \"equivalentDomains\",\n};\n\nconst neverDomainsDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"domainSettings\",\n  },\n  key: \"neverDomains\",\n};\n\nexport class DomainSettingsMigrator extends Migrator<33, 34> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    let updateAccount = false;\n\n    // global state (\"neverDomains\")\n    const globalState = await helper.get<ExpectedGlobalState>(\"global\");\n\n    if (globalState?.neverDomains != null) {\n      await helper.setToGlobal(neverDomainsDefinition, globalState.neverDomains);\n\n      // delete `neverDomains` from state global\n      delete globalState.neverDomains;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n\n    // account state (\"defaultUriMatch\" and \"settings.equivalentDomains\")\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    // migrate account state\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      const accountSettings = account?.settings;\n\n      if (accountSettings?.defaultUriMatch != undefined) {\n        await helper.setToUser(\n          userId,\n          defaultUriMatchStrategyDefinition,\n          accountSettings.defaultUriMatch,\n        );\n        delete account.settings.defaultUriMatch;\n\n        updateAccount = true;\n      }\n\n      if (accountSettings?.settings?.equivalentDomains != undefined) {\n        await helper.setToUser(\n          userId,\n          equivalentDomainsDefinition,\n          accountSettings.settings.equivalentDomains,\n        );\n        delete account.settings.settings.equivalentDomains;\n        delete account.settings.settings;\n\n        updateAccount = true;\n      }\n\n      if (updateAccount) {\n        // update the state account settings with the migrated values deleted\n        await helper.set(userId, account);\n      }\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    let updateAccount = false;\n\n    // global state (\"neverDomains\")\n    const globalState = (await helper.get<ExpectedGlobalState>(\"global\")) || {};\n    const neverDomains: { [key: string]: null } =\n      await helper.getFromGlobal(neverDomainsDefinition);\n\n    if (neverDomains != null) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        neverDomains: neverDomains,\n      });\n\n      // remove the global state provider framework key for `neverDomains`\n      await helper.setToGlobal(neverDomainsDefinition, null);\n    }\n\n    // account state (\"defaultUriMatchStrategy\" and \"equivalentDomains\")\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    // rollback account state\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let settings = account?.settings || {};\n\n      const defaultUriMatchStrategy: UriMatchStrategySetting = await helper.getFromUser(\n        userId,\n        defaultUriMatchStrategyDefinition,\n      );\n\n      const equivalentDomains: string[][] = await helper.getFromUser(\n        userId,\n        equivalentDomainsDefinition,\n      );\n\n      // update new settings and remove the account state provider framework keys for the rolled back values\n      if (defaultUriMatchStrategy != null) {\n        settings = { ...settings, defaultUriMatch: defaultUriMatchStrategy };\n\n        await helper.setToUser(userId, defaultUriMatchStrategyDefinition, null);\n\n        updateAccount = true;\n      }\n\n      if (equivalentDomains != null) {\n        settings = { ...settings, settings: { equivalentDomains } };\n\n        await helper.setToUser(userId, equivalentDomainsDefinition, null);\n\n        updateAccount = true;\n      }\n\n      // commit updated settings to state\n      if (updateAccount) {\n        await helper.set(userId, {\n          ...account,\n          settings,\n        });\n      }\n    }\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = { theme?: string };\n\nconst THEME_SELECTION: KeyDefinitionLike = {\n  key: \"selection\",\n  stateDefinition: { name: \"theming\" },\n};\n\nexport class MoveThemeToStateProviderMigrator extends Migrator<34, 35> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobalState = await helper.get<ExpectedGlobal>(\"global\");\n    const theme = legacyGlobalState?.theme;\n    if (theme != null) {\n      await helper.setToGlobal(THEME_SELECTION, theme);\n      delete legacyGlobalState.theme;\n      await helper.set(\"global\", legacyGlobalState);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const theme = await helper.getFromGlobal<string>(THEME_SELECTION);\n    if (theme != null) {\n      const legacyGlobal = (await helper.get<ExpectedGlobal>(\"global\")) ?? {};\n      legacyGlobal.theme = theme;\n      await helper.set(\"global\", legacyGlobal);\n      await helper.removeFromGlobal(THEME_SELECTION);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  settings?: {\n    dontShowCardsCurrentTab?: boolean;\n    dontShowIdentitiesCurrentTab?: boolean;\n  };\n};\n\nconst vaultSettingsStateDefinition: {\n  stateDefinition: StateDefinitionLike;\n} = {\n  stateDefinition: {\n    name: \"vaultSettings\",\n  },\n};\n\nexport class VaultSettingsKeyMigrator extends Migrator<35, 36> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let updateAccount = false;\n      const accountSettings = account?.settings;\n\n      if (accountSettings?.dontShowCardsCurrentTab != null) {\n        await helper.setToUser(\n          userId,\n          { ...vaultSettingsStateDefinition, key: \"showCardsCurrentTab\" },\n          !accountSettings.dontShowCardsCurrentTab,\n        );\n        delete account.settings.dontShowCardsCurrentTab;\n        updateAccount = true;\n      }\n\n      if (accountSettings?.dontShowIdentitiesCurrentTab != null) {\n        await helper.setToUser(\n          userId,\n          { ...vaultSettingsStateDefinition, key: \"showIdentitiesCurrentTab\" },\n          !accountSettings.dontShowIdentitiesCurrentTab,\n        );\n        delete account.settings.dontShowIdentitiesCurrentTab;\n        updateAccount = true;\n      }\n\n      if (updateAccount) {\n        await helper.set(userId, account);\n      }\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      let updateAccount = false;\n      let settings = account?.settings ?? {};\n\n      const showCardsCurrentTab = await helper.getFromUser<boolean>(userId, {\n        ...vaultSettingsStateDefinition,\n        key: \"showCardsCurrentTab\",\n      });\n\n      const showIdentitiesCurrentTab = await helper.getFromUser<boolean>(userId, {\n        ...vaultSettingsStateDefinition,\n        key: \"showIdentitiesCurrentTab\",\n      });\n\n      if (showCardsCurrentTab != null) {\n        // invert the value to match the new naming convention\n        settings = { ...settings, dontShowCardsCurrentTab: !showCardsCurrentTab };\n\n        await helper.setToUser(\n          userId,\n          { ...vaultSettingsStateDefinition, key: \"showCardsCurrentTab\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (showIdentitiesCurrentTab != null) {\n        // invert the value to match the new naming convention\n        settings = { ...settings, dontShowIdentitiesCurrentTab: !showIdentitiesCurrentTab };\n\n        await helper.setToUser(\n          userId,\n          { ...vaultSettingsStateDefinition, key: \"showIdentitiesCurrentTab\" },\n          null,\n        );\n\n        updateAccount = true;\n      }\n\n      if (updateAccount) {\n        await helper.set(userId, { ...account, settings });\n      }\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  settings?: { avatarColor?: string };\n};\n\nconst AVATAR_COLOR_STATE: StateDefinitionLike = { name: \"avatar\" };\n\nconst AVATAR_COLOR_KEY: KeyDefinitionLike = {\n  key: \"avatarColor\",\n  stateDefinition: AVATAR_COLOR_STATE,\n};\n\nexport class AvatarColorMigrator extends Migrator<36, 37> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        // Move account avatarColor\n        if (account?.settings?.avatarColor != null) {\n          await helper.setToUser(userId, AVATAR_COLOR_KEY, account.settings.avatarColor);\n\n          // Delete old account avatarColor property\n          delete account?.settings?.avatarColor;\n          await helper.set(userId, account);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountState) {\n      let updatedAccount = false;\n      const userAvatarColor = await helper.getFromUser<string>(userId, AVATAR_COLOR_KEY);\n\n      if (userAvatarColor) {\n        if (!account) {\n          account = {};\n        }\n\n        updatedAccount = true;\n        account.settings.avatarColor = userAvatarColor;\n        await helper.setToUser(userId, AVATAR_COLOR_KEY, null);\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype ExpectedAccountType = {\n  tokens?: {\n    accessToken?: string;\n    refreshToken?: string;\n  };\n  profile?: {\n    apiKeyClientId?: string;\n    email?: string;\n  };\n  keys?: {\n    apiKeyClientSecret?: string;\n  };\n};\n\ntype ExpectedGlobalType = {\n  twoFactorToken?: string;\n};\n\nexport const EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL: KeyDefinitionLike = {\n  key: \"emailTwoFactorTokenRecord\",\n  stateDefinition: {\n    name: \"tokenDiskLocal\",\n  },\n};\n\nconst TOKEN_STATE_DEF_LIKE: StateDefinitionLike = {\n  name: \"token\",\n};\n\nexport const ACCESS_TOKEN_DISK: KeyDefinitionLike = {\n  key: \"accessToken\", // matches KeyDefinition.key\n  stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const REFRESH_TOKEN_DISK: KeyDefinitionLike = {\n  key: \"refreshToken\",\n  stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const API_KEY_CLIENT_ID_DISK: KeyDefinitionLike = {\n  key: \"apiKeyClientId\",\n  stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport const API_KEY_CLIENT_SECRET_DISK: KeyDefinitionLike = {\n  key: \"apiKeyClientSecret\",\n  stateDefinition: TOKEN_STATE_DEF_LIKE,\n};\n\nexport class TokenServiceStateProviderMigrator extends Migrator<37, 38> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // Move global data\n    const globalData = await helper.get<ExpectedGlobalType>(\"global\");\n\n    // Create new global record for 2FA token that we can accumulate data in\n    const emailTwoFactorTokenRecord = {};\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(\n      userId: string,\n      account: ExpectedAccountType | undefined,\n      globalTwoFactorToken: string | undefined,\n      emailTwoFactorTokenRecord: Record<string, string>,\n    ): Promise<void> {\n      let updatedAccount = false;\n\n      // migrate 2FA token from global to user state\n      // Due to the existing implmentation, n users on the same device share the same global state value for 2FA token.\n      // So, we will just migrate it to all users to keep it valid for whichever was the user that set it previously.\n      // Note: don't bother migrating 2FA Token if user account or email is undefined\n      const email = account?.profile?.email;\n      if (globalTwoFactorToken != undefined && account != undefined && email != undefined) {\n        emailTwoFactorTokenRecord[email] = globalTwoFactorToken;\n        // Note: don't set updatedAccount to true here as we aren't updating\n        // the legacy user state, just migrating a global state to a new user state\n      }\n\n      // Migrate access token\n      const existingAccessToken = account?.tokens?.accessToken;\n\n      if (existingAccessToken != null) {\n        // Only migrate data that exists\n        if (helper.type !== \"web-disk-local\") {\n          // only migrate access token to session storage - never local.\n          await helper.setToUser(userId, ACCESS_TOKEN_DISK, existingAccessToken);\n        }\n        delete account.tokens.accessToken;\n        updatedAccount = true;\n      }\n\n      // Migrate refresh token\n      const existingRefreshToken = account?.tokens?.refreshToken;\n\n      if (existingRefreshToken != null) {\n        if (helper.type !== \"web-disk-local\") {\n          // only migrate refresh token to session storage - never local.\n          await helper.setToUser(userId, REFRESH_TOKEN_DISK, existingRefreshToken);\n        }\n        delete account.tokens.refreshToken;\n        updatedAccount = true;\n      }\n\n      // Migrate API key client id\n      const existingApiKeyClientId = account?.profile?.apiKeyClientId;\n\n      if (existingApiKeyClientId != null) {\n        if (helper.type !== \"web-disk-local\") {\n          // only migrate client id to session storage - never local.\n          await helper.setToUser(userId, API_KEY_CLIENT_ID_DISK, existingApiKeyClientId);\n        }\n        delete account.profile.apiKeyClientId;\n        updatedAccount = true;\n      }\n\n      // Migrate API key client secret\n      const existingApiKeyClientSecret = account?.keys?.apiKeyClientSecret;\n      if (existingApiKeyClientSecret != null) {\n        if (helper.type !== \"web-disk-local\") {\n          // only migrate client secret to session storage - never local.\n          await helper.setToUser(userId, API_KEY_CLIENT_SECRET_DISK, existingApiKeyClientSecret);\n        }\n        delete account.keys.apiKeyClientSecret;\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        // Save the migrated account only if it was updated\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([\n      ...accounts.map(({ userId, account }) =>\n        migrateAccount(userId, account, globalData?.twoFactorToken, emailTwoFactorTokenRecord),\n      ),\n    ]);\n\n    // Save the global 2FA token record\n    await helper.setToGlobal(EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL, emailTwoFactorTokenRecord);\n\n    // Delete global data\n    delete globalData?.twoFactorToken;\n    await helper.set(\"global\", globalData);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    // Since we migrated the global 2FA token to all users, we need to rollback the 2FA token for all users\n    // but we only need to set it to the global state once\n\n    // Go through accounts and find the first user that has a non-null email and 2FA token\n    let migratedTwoFactorToken: string | null = null;\n    for (const { account } of accounts) {\n      const email = account?.profile?.email;\n      if (email == null) {\n        continue;\n      }\n      const emailTwoFactorTokenRecord: Record<string, string> = await helper.getFromGlobal(\n        EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL,\n      );\n\n      migratedTwoFactorToken = emailTwoFactorTokenRecord[email];\n\n      if (migratedTwoFactorToken != null) {\n        break;\n      }\n    }\n\n    if (migratedTwoFactorToken != null) {\n      let legacyGlobal = await helper.get<ExpectedGlobalType>(\"global\");\n      if (!legacyGlobal) {\n        legacyGlobal = {};\n      }\n      legacyGlobal.twoFactorToken = migratedTwoFactorToken;\n      await helper.set(\"global\", legacyGlobal);\n    }\n\n    // delete global 2FA token record\n    await helper.setToGlobal(EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL, null);\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedLegacyAccount = false;\n\n      // Rollback access token\n      const migratedAccessToken = await helper.getFromUser<string>(userId, ACCESS_TOKEN_DISK);\n\n      if (account?.tokens && migratedAccessToken != null) {\n        account.tokens.accessToken = migratedAccessToken;\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, ACCESS_TOKEN_DISK, null);\n\n      // Rollback refresh token\n      const migratedRefreshToken = await helper.getFromUser<string>(userId, REFRESH_TOKEN_DISK);\n\n      if (account?.tokens && migratedRefreshToken != null) {\n        account.tokens.refreshToken = migratedRefreshToken;\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, REFRESH_TOKEN_DISK, null);\n\n      // Rollback API key client id\n\n      const migratedApiKeyClientId = await helper.getFromUser<string>(\n        userId,\n        API_KEY_CLIENT_ID_DISK,\n      );\n\n      if (account?.profile && migratedApiKeyClientId != null) {\n        account.profile.apiKeyClientId = migratedApiKeyClientId;\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, API_KEY_CLIENT_ID_DISK, null);\n\n      // Rollback API key client secret\n      const migratedApiKeyClientSecret = await helper.getFromUser<string>(\n        userId,\n        API_KEY_CLIENT_SECRET_DISK,\n      );\n\n      if (account?.keys && migratedApiKeyClientSecret != null) {\n        account.keys.apiKeyClientSecret = migratedApiKeyClientSecret;\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, API_KEY_CLIENT_SECRET_DISK, null);\n\n      if (updatedLegacyAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  profile?: {\n    hasPremiumPersonally?: boolean;\n    hasPremiumFromOrganization?: boolean;\n  };\n};\n\ntype ExpectedBillingAccountProfileType = {\n  hasPremiumPersonally: boolean;\n  hasPremiumFromOrganization: boolean;\n};\n\nexport const BILLING_ACCOUNT_PROFILE_KEY_DEFINITION: KeyDefinitionLike = {\n  key: \"accountProfile\",\n  stateDefinition: {\n    name: \"billing\",\n  },\n};\n\nexport class MoveBillingAccountProfileMigrator extends Migrator<38, 39> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    const migrateAccount = async (userId: string, account: ExpectedAccountType): Promise<void> => {\n      const hasPremiumPersonally = account?.profile?.hasPremiumPersonally;\n      const hasPremiumFromOrganization = account?.profile?.hasPremiumFromOrganization;\n\n      if (hasPremiumPersonally != null || hasPremiumFromOrganization != null) {\n        await helper.setToUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION, {\n          hasPremiumPersonally: hasPremiumPersonally,\n          hasPremiumFromOrganization: hasPremiumFromOrganization,\n        });\n\n        delete account?.profile?.hasPremiumPersonally;\n        delete account?.profile?.hasPremiumFromOrganization;\n        await helper.set(userId, account);\n      }\n    };\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    const rollbackAccount = async (userId: string, account: ExpectedAccountType): Promise<void> => {\n      const value = await helper.getFromUser<ExpectedBillingAccountProfileType>(\n        userId,\n        BILLING_ACCOUNT_PROFILE_KEY_DEFINITION,\n      );\n\n      if (account && value) {\n        account.profile = Object.assign(account.profile ?? {}, {\n          hasPremiumPersonally: value?.hasPremiumPersonally,\n          hasPremiumFromOrganization: value?.hasPremiumFromOrganization,\n        });\n        await helper.set(userId, account);\n      }\n\n      await helper.setToUser(userId, BILLING_ACCOUNT_PROFILE_KEY_DEFINITION, null);\n    };\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { profile?: { everBeenUnlocked?: boolean } };\n\nexport class RemoveEverBeenUnlockedMigrator extends Migrator<3, 4> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function removeEverBeenUnlocked(userId: string, account: ExpectedAccountType) {\n      if (account?.profile?.everBeenUnlocked != null) {\n        delete account.profile.everBeenUnlocked;\n        return helper.set(userId, account);\n      }\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    Promise.all(accounts.map(({ userId, account }) => removeEverBeenUnlocked(userId, account)));\n  }\n\n  rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n\n  // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n  // it is nested inside a global object.\n  override async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n    await helper.set(\"global\", { ...global, stateVersion: endVersion });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Local declarations of `OrganizationData` and the types of it's properties.\n// Duplicated to remain frozen in time when migration occurs.\nenum OrganizationUserStatusType {\n  Invited = 0,\n  Accepted = 1,\n  Confirmed = 2,\n  Revoked = -1,\n}\n\nenum OrganizationUserType {\n  Owner = 0,\n  Admin = 1,\n  User = 2,\n  Manager = 3,\n  Custom = 4,\n}\n\ntype PermissionsApi = {\n  accessEventLogs: boolean;\n  accessImportExport: boolean;\n  accessReports: boolean;\n  createNewCollections: boolean;\n  editAnyCollection: boolean;\n  deleteAnyCollection: boolean;\n  editAssignedCollections: boolean;\n  deleteAssignedCollections: boolean;\n  manageCiphers: boolean;\n  manageGroups: boolean;\n  manageSso: boolean;\n  managePolicies: boolean;\n  manageUsers: boolean;\n  manageResetPassword: boolean;\n  manageScim: boolean;\n};\n\nenum ProviderType {\n  Msp = 0,\n  Reseller = 1,\n}\n\nenum ProductType {\n  Free = 0,\n  Families = 1,\n  Teams = 2,\n  Enterprise = 3,\n  TeamsStarter = 4,\n}\n\ntype OrganizationData = {\n  id: string;\n  name: string;\n  status: OrganizationUserStatusType;\n  type: OrganizationUserType;\n  enabled: boolean;\n  usePolicies: boolean;\n  useGroups: boolean;\n  useDirectory: boolean;\n  useEvents: boolean;\n  useTotp: boolean;\n  use2fa: boolean;\n  useApi: boolean;\n  useSso: boolean;\n  useKeyConnector: boolean;\n  useScim: boolean;\n  useCustomPermissions: boolean;\n  useResetPassword: boolean;\n  useSecretsManager: boolean;\n  usePasswordManager: boolean;\n  useActivateAutofillPolicy: boolean;\n  selfHost: boolean;\n  usersGetPremium: boolean;\n  seats: number;\n  maxCollections: number;\n  maxStorageGb?: number;\n  ssoBound: boolean;\n  identifier: string;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  userId: string;\n  hasPublicAndPrivateKeys: boolean;\n  providerId: string;\n  providerName: string;\n  providerType?: ProviderType;\n  isProviderUser: boolean;\n  isMember: boolean;\n  familySponsorshipFriendlyName: string;\n  familySponsorshipAvailable: boolean;\n  planProductType: ProductType;\n  keyConnectorEnabled: boolean;\n  keyConnectorUrl: string;\n  familySponsorshipLastSyncDate?: Date;\n  familySponsorshipValidUntil?: Date;\n  familySponsorshipToDelete?: boolean;\n  accessSecretsManager: boolean;\n  limitCollectionCreationDeletion: boolean;\n  allowAdminAccessToAllCollectionItems: boolean;\n  flexibleCollections: boolean;\n};\n\ntype ExpectedAccountType = {\n  data?: {\n    organizations?: Record<string, Jsonify<OrganizationData>>;\n  };\n};\n\nconst USER_ORGANIZATIONS: KeyDefinitionLike = {\n  key: \"organizations\",\n  stateDefinition: {\n    name: \"organizations\",\n  },\n};\n\nexport class OrganizationMigrator extends Migrator<39, 40> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.data?.organizations;\n      if (value != null) {\n        await helper.setToUser(userId, USER_ORGANIZATIONS, value);\n        delete account.data.organizations;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = await helper.getFromUser(userId, USER_ORGANIZATIONS);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          organizations: value,\n        });\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_ORGANIZATIONS, null);\n    }\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  data?: {\n    eventCollection?: [];\n  };\n};\n\nconst EVENT_COLLECTION: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"eventCollection\",\n  },\n  key: \"eventCollection\",\n};\n\nexport class EventCollectionMigrator extends Migrator<40, 41> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      const value = account?.data?.eventCollection;\n      if (value != null) {\n        await helper.setToUser(userId, EVENT_COLLECTION, value);\n        delete account.data.eventCollection;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountState): Promise<void> {\n      const value = await helper.getFromUser(userId, EVENT_COLLECTION);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          eventCollection: value,\n        });\n\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, EVENT_COLLECTION, null);\n    }\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = {\n  disableFavicon?: boolean;\n};\n\nconst ShowFaviconDefinition: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"domainSettings\",\n  },\n  key: \"showFavicons\",\n};\n\nexport class EnableFaviconMigrator extends Migrator<41, 42> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // global state (\"disableFavicon\" -> \"showFavicons\")\n    const globalState = await helper.get<ExpectedGlobalState>(\"global\");\n\n    if (globalState?.disableFavicon != null) {\n      await helper.setToGlobal(ShowFaviconDefinition, !globalState.disableFavicon);\n\n      // delete `disableFavicon` from state global\n      delete globalState.disableFavicon;\n\n      await helper.set<ExpectedGlobalState>(\"global\", globalState);\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // global state (\"showFavicons\" -> \"disableFavicon\")\n    const globalState = (await helper.get<ExpectedGlobalState>(\"global\")) || {};\n    const showFavicons: boolean = await helper.getFromGlobal(ShowFaviconDefinition);\n\n    if (showFavicons != null) {\n      await helper.set<ExpectedGlobalState>(\"global\", {\n        ...globalState,\n        disableFavicon: !showFavicons,\n      });\n\n      // remove the global state provider framework key for `showFavicons`\n      await helper.setToGlobal(ShowFaviconDefinition, null);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  settings?: { autoConfirmFingerPrints?: boolean };\n};\n\nconst ORGANIZATION_MANAGEMENT_PREFERENCES: StateDefinitionLike = {\n  name: \"organizationManagementPreferences\",\n};\n\nconst AUTO_CONFIRM_FINGERPRINTS: KeyDefinitionLike = {\n  key: \"autoConfirmFingerPrints\",\n  stateDefinition: ORGANIZATION_MANAGEMENT_PREFERENCES,\n};\n\nexport class AutoConfirmFingerPrintsMigrator extends Migrator<42, 43> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all(\n      legacyAccounts.map(async ({ userId, account }) => {\n        if (account?.settings?.autoConfirmFingerPrints != null) {\n          await helper.setToUser(\n            userId,\n            AUTO_CONFIRM_FINGERPRINTS,\n            account.settings.autoConfirmFingerPrints,\n          );\n          delete account?.settings?.autoConfirmFingerPrints;\n          await helper.set(userId, account);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackUser(userId: string, account: ExpectedAccountState) {\n      let updatedAccount = false;\n      const autoConfirmFingerPrints = await helper.getFromUser<boolean>(\n        userId,\n        AUTO_CONFIRM_FINGERPRINTS,\n      );\n\n      if (autoConfirmFingerPrints) {\n        if (!account) {\n          account = {};\n        }\n\n        updatedAccount = true;\n        account.settings.autoConfirmFingerPrints = autoConfirmFingerPrints;\n        await helper.setToUser(userId, AUTO_CONFIRM_FINGERPRINTS, null);\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackUser(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype DecryptionOptionsType = {\n  hasMasterPassword: boolean;\n  trustedDeviceOption?: {\n    hasAdminApproval: boolean;\n    hasLoginApprovingDevice: boolean;\n    hasManageResetPasswordPermission: boolean;\n  };\n  keyConnectorOption?: {\n    keyConnectorUrl: string;\n  };\n};\n\ntype ExpectedAccountType = {\n  decryptionOptions?: DecryptionOptionsType;\n};\n\nconst USER_DECRYPTION_OPTIONS: KeyDefinitionLike = {\n  key: \"decryptionOptions\",\n  stateDefinition: {\n    name: \"userDecryptionOptions\",\n  },\n};\n\nexport class UserDecryptionOptionsMigrator extends Migrator<43, 44> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value = account?.decryptionOptions;\n      if (value != null) {\n        await helper.setToUser(userId, USER_DECRYPTION_OPTIONS, value);\n        delete account.decryptionOptions;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const value: DecryptionOptionsType = await helper.getFromUser(\n        userId,\n        USER_DECRYPTION_OPTIONS,\n      );\n      if (account) {\n        account.decryptionOptions = Object.assign(account.decryptionOptions, value);\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, USER_DECRYPTION_OPTIONS, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst ENVIRONMENT_STATE: StateDefinitionLike = { name: \"environment\" };\n\nconst ENVIRONMENT_REGION: KeyDefinitionLike = {\n  key: \"region\",\n  stateDefinition: ENVIRONMENT_STATE,\n};\n\nconst ENVIRONMENT_URLS: KeyDefinitionLike = {\n  key: \"urls\",\n  stateDefinition: ENVIRONMENT_STATE,\n};\n\nconst ENVIRONMENT_ENVIRONMENT: KeyDefinitionLike = {\n  key: \"environment\",\n  stateDefinition: ENVIRONMENT_STATE,\n};\n\nexport class MergeEnvironmentState extends Migrator<44, 45> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<unknown>();\n\n    async function migrateAccount(userId: string, account: unknown): Promise<void> {\n      const region = await helper.getFromUser(userId, ENVIRONMENT_REGION);\n      const urls = await helper.getFromUser(userId, ENVIRONMENT_URLS);\n\n      if (region == null && urls == null) {\n        return;\n      }\n\n      await helper.setToUser(userId, ENVIRONMENT_ENVIRONMENT, {\n        region,\n        urls,\n      });\n      await helper.removeFromUser(userId, ENVIRONMENT_REGION);\n      await helper.removeFromUser(userId, ENVIRONMENT_URLS);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    const region = await helper.getFromGlobal(ENVIRONMENT_REGION);\n    const urls = await helper.getFromGlobal(ENVIRONMENT_URLS);\n\n    if (region == null && urls == null) {\n      return;\n    }\n\n    await helper.setToGlobal(ENVIRONMENT_ENVIRONMENT, {\n      region,\n      urls,\n    });\n    await helper.removeFromGlobal(ENVIRONMENT_REGION);\n    await helper.removeFromGlobal(ENVIRONMENT_URLS);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<unknown>();\n\n    async function rollbackAccount(userId: string, account: unknown): Promise<void> {\n      const state = (await helper.getFromUser(userId, ENVIRONMENT_ENVIRONMENT)) as {\n        region: string;\n        urls: string;\n      } | null;\n\n      await helper.setToUser(userId, ENVIRONMENT_REGION, state?.region);\n      await helper.setToUser(userId, ENVIRONMENT_URLS, state?.urls);\n      await helper.removeFromUser(userId, ENVIRONMENT_ENVIRONMENT);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n\n    const state = (await helper.getFromGlobal(ENVIRONMENT_ENVIRONMENT)) as {\n      region: string;\n      urls: string;\n    } | null;\n\n    await helper.setToGlobal(ENVIRONMENT_REGION, state?.region);\n    await helper.setToGlobal(ENVIRONMENT_URLS, state?.urls);\n    await helper.removeFromGlobal(ENVIRONMENT_ENVIRONMENT);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\nexport const PROMPT_CANCELLED: KeyDefinitionLike = {\n  key: \"promptCancelled\",\n  stateDefinition: { name: \"biometricSettings\" },\n};\n\nexport class DeleteBiometricPromptCancelledData extends Migrator<45, 46> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    await Promise.all(\n      (await helper.getAccounts()).map(async ({ userId }) => {\n        if (helper.getFromUser(userId, PROMPT_CANCELLED) != null) {\n          await helper.removeFromUser(userId, PROMPT_CANCELLED);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedGlobalType = {\n  window?: object;\n  enableTray?: boolean;\n  enableMinimizeToTray?: boolean;\n  enableCloseToTray?: boolean;\n  enableStartToTray?: boolean;\n  openAtLogin?: boolean;\n  alwaysShowDock?: boolean;\n  enableAlwaysOnTop?: boolean;\n};\n\ntype ExpectedAccountType = {\n  settings?: {\n    enableAlwaysOnTop?: boolean;\n  };\n};\n\nconst DESKTOP_SETTINGS_STATE: StateDefinitionLike = { name: \"desktopSettings\" };\n\nconst WINDOW_KEY: KeyDefinitionLike = { key: \"window\", stateDefinition: DESKTOP_SETTINGS_STATE };\n\nconst CLOSE_TO_TRAY_KEY: KeyDefinitionLike = {\n  key: \"closeToTray\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst MINIMIZE_TO_TRAY_KEY: KeyDefinitionLike = {\n  key: \"minimizeToTray\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst START_TO_TRAY_KEY: KeyDefinitionLike = {\n  key: \"startToTray\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst TRAY_ENABLED_KEY: KeyDefinitionLike = {\n  key: \"trayEnabled\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst OPEN_AT_LOGIN_KEY: KeyDefinitionLike = {\n  key: \"openAtLogin\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\nconst ALWAYS_SHOW_DOCK_KEY: KeyDefinitionLike = {\n  key: \"alwaysShowDock\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\n\nconst ALWAYS_ON_TOP_KEY: KeyDefinitionLike = {\n  key: \"alwaysOnTop\",\n  stateDefinition: DESKTOP_SETTINGS_STATE,\n};\n\nexport class MoveDesktopSettingsMigrator extends Migrator<46, 47> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobal = await helper.get<ExpectedGlobalType>(\"global\");\n\n    let updatedGlobal = false;\n    if (legacyGlobal?.window !== undefined) {\n      await helper.setToGlobal(WINDOW_KEY, legacyGlobal.window);\n      updatedGlobal = true;\n      delete legacyGlobal.window;\n    }\n\n    if (legacyGlobal?.enableCloseToTray != null) {\n      await helper.setToGlobal(CLOSE_TO_TRAY_KEY, legacyGlobal.enableCloseToTray);\n      updatedGlobal = true;\n      delete legacyGlobal.enableCloseToTray;\n    }\n\n    if (legacyGlobal?.enableMinimizeToTray != null) {\n      await helper.setToGlobal(MINIMIZE_TO_TRAY_KEY, legacyGlobal.enableMinimizeToTray);\n      updatedGlobal = true;\n      delete legacyGlobal.enableMinimizeToTray;\n    }\n\n    if (legacyGlobal?.enableStartToTray != null) {\n      await helper.setToGlobal(START_TO_TRAY_KEY, legacyGlobal.enableStartToTray);\n      updatedGlobal = true;\n      delete legacyGlobal.enableStartToTray;\n    }\n\n    if (legacyGlobal?.enableTray != null) {\n      await helper.setToGlobal(TRAY_ENABLED_KEY, legacyGlobal.enableTray);\n      updatedGlobal = true;\n      delete legacyGlobal.enableTray;\n    }\n\n    if (legacyGlobal?.openAtLogin != null) {\n      await helper.setToGlobal(OPEN_AT_LOGIN_KEY, legacyGlobal.openAtLogin);\n      updatedGlobal = true;\n      delete legacyGlobal.openAtLogin;\n    }\n\n    if (legacyGlobal?.alwaysShowDock != null) {\n      await helper.setToGlobal(ALWAYS_SHOW_DOCK_KEY, legacyGlobal.alwaysShowDock);\n      updatedGlobal = true;\n      delete legacyGlobal.alwaysShowDock;\n    }\n\n    if (legacyGlobal?.enableAlwaysOnTop != null) {\n      await helper.setToGlobal(ALWAYS_ON_TOP_KEY, legacyGlobal.enableAlwaysOnTop);\n      updatedGlobal = true;\n      delete legacyGlobal.enableAlwaysOnTop;\n    }\n\n    if (updatedGlobal) {\n      await helper.set(\"global\", legacyGlobal);\n    }\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType) {\n      // We only migrate the global setting for this, if we find it on the account object\n      // just delete it.\n      if (account?.settings?.enableAlwaysOnTop != null) {\n        delete account.settings.enableAlwaysOnTop;\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n  }\n\n  rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n  enableDuckDuckGoBrowserIntegration?: boolean;\n};\n\nexport const DDG_KEY: KeyDefinitionLike = {\n  key: \"enableDuckDuckGoBrowserIntegration\",\n  stateDefinition: {\n    name: \"autofillSettings\",\n  },\n};\n\nexport class MoveDdgToStateProviderMigrator extends Migrator<47, 48> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    // global state\n    const global = await helper.get<ExpectedGlobal>(\"global\");\n    if (global?.enableDuckDuckGoBrowserIntegration == null) {\n      return;\n    }\n\n    await helper.setToGlobal(DDG_KEY, global.enableDuckDuckGoBrowserIntegration);\n    delete global.enableDuckDuckGoBrowserIntegration;\n    await helper.set(\"global\", global);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const enableDdg = await helper.getFromGlobal<boolean>(DDG_KEY);\n\n    if (!enableDdg) {\n      return;\n    }\n\n    const global = (await helper.get<ExpectedGlobal>(\"global\")) ?? {};\n    global.enableDuckDuckGoBrowserIntegration = enableDdg;\n    await helper.set(\"global\", global);\n    await helper.removeFromGlobal(DDG_KEY);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nconst CONFIG_DISK: StateDefinitionLike = { name: \"config\" };\nexport const USER_SERVER_CONFIG: KeyDefinitionLike = {\n  stateDefinition: CONFIG_DISK,\n  key: \"serverConfig\",\n};\n\n// Note: no need to migrate global configs, they don't currently exist\n\ntype ExpectedAccountType = {\n  settings?: {\n    serverConfig?: unknown;\n  };\n};\n\nexport class AccountServerConfigMigrator extends Migrator<48, 49> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      if (account?.settings?.serverConfig != null) {\n        await helper.setToUser(userId, USER_SERVER_CONFIG, account.settings.serverConfig);\n        delete account.settings.serverConfig;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const serverConfig = await helper.getFromUser(userId, USER_SERVER_CONFIG);\n\n      if (serverConfig) {\n        account ??= {};\n        account.settings ??= {};\n\n        account.settings.serverConfig = serverConfig;\n        await helper.setToUser(userId, USER_SERVER_CONFIG, null);\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MigrationHelper } from \"../migration-helper\";\nimport { Direction, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { keys?: { organizationKeys?: { encrypted: Record<string, string> } } };\ntype NewAccountType = {\n  keys?: {\n    organizationKeys?: { encrypted: Record<string, { type: \"organization\"; key: string }> };\n  };\n};\n\nexport class AddKeyTypeToOrgKeysMigrator extends Migrator<4, 5> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts();\n\n    async function updateOrgKey(userId: string, account: ExpectedAccountType) {\n      const encryptedOrgKeys = account?.keys?.organizationKeys?.encrypted;\n      if (encryptedOrgKeys == null) {\n        return;\n      }\n\n      const newOrgKeys: Record<string, { type: \"organization\"; key: string }> = {};\n\n      Object.entries(encryptedOrgKeys).forEach(([orgId, encKey]) => {\n        newOrgKeys[orgId] = {\n          type: \"organization\",\n          key: encKey,\n        };\n      });\n      (account as any).keys.organizationKeys.encrypted = newOrgKeys;\n\n      await helper.set(userId, account);\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    Promise.all(accounts.map(({ userId, account }) => updateOrgKey(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts();\n\n    async function updateOrgKey(userId: string, account: NewAccountType) {\n      const encryptedOrgKeys = account?.keys?.organizationKeys?.encrypted;\n      if (encryptedOrgKeys == null) {\n        return;\n      }\n\n      const newOrgKeys: Record<string, string> = {};\n\n      Object.entries(encryptedOrgKeys).forEach(([orgId, encKey]) => {\n        newOrgKeys[orgId] = encKey.key;\n      });\n      (account as any).keys.organizationKeys.encrypted = newOrgKeys;\n\n      await helper.set(userId, account);\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    Promise.all(accounts.map(async ({ userId, account }) => updateOrgKey(userId, account)));\n  }\n\n  // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n  // it is nested inside a global object.\n  override async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n    await helper.set(\"global\", { ...global, stateVersion: endVersion });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  profile?: {\n    usesKeyConnector?: boolean;\n    convertAccountToKeyConnector?: boolean;\n  };\n};\n\nconst usesKeyConnectorKeyDefinition: KeyDefinitionLike = {\n  key: \"usesKeyConnector\",\n  stateDefinition: {\n    name: \"keyConnector\",\n  },\n};\n\nconst convertAccountToKeyConnectorKeyDefinition: KeyDefinitionLike = {\n  key: \"convertAccountToKeyConnector\",\n  stateDefinition: {\n    name: \"keyConnector\",\n  },\n};\n\nexport class KeyConnectorMigrator extends Migrator<49, 50> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const usesKeyConnector = account?.profile?.usesKeyConnector;\n      const convertAccountToKeyConnector = account?.profile?.convertAccountToKeyConnector;\n      if (usesKeyConnector == null && convertAccountToKeyConnector == null) {\n        return;\n      }\n      if (usesKeyConnector != null) {\n        await helper.setToUser(userId, usesKeyConnectorKeyDefinition, usesKeyConnector);\n        delete account.profile.usesKeyConnector;\n      }\n      if (convertAccountToKeyConnector != null) {\n        await helper.setToUser(\n          userId,\n          convertAccountToKeyConnectorKeyDefinition,\n          convertAccountToKeyConnector,\n        );\n        delete account.profile.convertAccountToKeyConnector;\n      }\n      await helper.set(userId, account);\n    }\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const usesKeyConnector: boolean = await helper.getFromUser(\n        userId,\n        usesKeyConnectorKeyDefinition,\n      );\n      const convertAccountToKeyConnector: boolean = await helper.getFromUser(\n        userId,\n        convertAccountToKeyConnectorKeyDefinition,\n      );\n      if (usesKeyConnector == null && convertAccountToKeyConnector == null) {\n        return;\n      }\n      if (usesKeyConnector != null) {\n        account.profile.usesKeyConnector = usesKeyConnector;\n        await helper.setToUser(userId, usesKeyConnectorKeyDefinition, null);\n      }\n      if (convertAccountToKeyConnector != null) {\n        account.profile.convertAccountToKeyConnector = convertAccountToKeyConnector;\n        await helper.setToUser(userId, convertAccountToKeyConnectorKeyDefinition, null);\n      }\n      await helper.set(userId, account);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobalState = { rememberedEmail?: string };\n\nconst LOGIN_EMAIL_STATE: StateDefinitionLike = { name: \"loginEmail\" };\n\nconst STORED_EMAIL: KeyDefinitionLike = {\n  key: \"storedEmail\",\n  stateDefinition: LOGIN_EMAIL_STATE,\n};\n\nexport class RememberedEmailMigrator extends Migrator<50, 51> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobal = await helper.get<ExpectedGlobalState>(\"global\");\n\n    // Move global data\n    if (legacyGlobal?.rememberedEmail != null) {\n      await helper.setToGlobal(STORED_EMAIL, legacyGlobal.rememberedEmail);\n    }\n\n    // Delete legacy global data\n    delete legacyGlobal?.rememberedEmail;\n    await helper.set(\"global\", legacyGlobal);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    let legacyGlobal = await helper.get<ExpectedGlobalState>(\"global\");\n    let updatedLegacyGlobal = false;\n    const globalStoredEmail = await helper.getFromGlobal<string>(STORED_EMAIL);\n\n    if (globalStoredEmail) {\n      if (!legacyGlobal) {\n        legacyGlobal = {};\n      }\n\n      updatedLegacyGlobal = true;\n      legacyGlobal.rememberedEmail = globalStoredEmail;\n      await helper.setToGlobal(STORED_EMAIL, null);\n    }\n\n    if (updatedLegacyGlobal) {\n      await helper.set(\"global\", legacyGlobal);\n    }\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n  installedVersion?: string;\n};\n\nexport class DeleteInstalledVersion extends Migrator<51, 52> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobal = await helper.get<ExpectedGlobal>(\"global\");\n    if (legacyGlobal?.installedVersion != null) {\n      delete legacyGlobal.installedVersion;\n      await helper.set(\"global\", legacyGlobal);\n    }\n  }\n  rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype DeviceKeyJsonType = {\n  keyB64: string;\n};\n\ntype ExpectedAccountType = {\n  keys?: {\n    deviceKey?: DeviceKeyJsonType;\n  };\n  settings?: {\n    trustDeviceChoiceForDecryption?: boolean;\n  };\n};\n\nexport const DEVICE_KEY: KeyDefinitionLike = {\n  key: \"deviceKey\", // matches KeyDefinition.key in DeviceTrustService\n  stateDefinition: {\n    name: \"deviceTrust\", // matches StateDefinition.name in StateDefinitions\n  },\n};\n\nexport const SHOULD_TRUST_DEVICE: KeyDefinitionLike = {\n  key: \"shouldTrustDevice\",\n  stateDefinition: {\n    name: \"deviceTrust\",\n  },\n};\n\nexport class DeviceTrustServiceStateProviderMigrator extends Migrator<52, 53> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedAccount = false;\n\n      // Migrate deviceKey\n      const existingDeviceKey = account?.keys?.deviceKey;\n\n      if (existingDeviceKey != null) {\n        // Only migrate data that exists\n        await helper.setToUser(userId, DEVICE_KEY, existingDeviceKey);\n        delete account.keys.deviceKey;\n        updatedAccount = true;\n      }\n\n      // Migrate shouldTrustDevice\n      const existingShouldTrustDevice = account?.settings?.trustDeviceChoiceForDecryption;\n\n      if (existingShouldTrustDevice != null) {\n        await helper.setToUser(userId, SHOULD_TRUST_DEVICE, existingShouldTrustDevice);\n        delete account.settings.trustDeviceChoiceForDecryption;\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        // Save the migrated account\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      // Rollback deviceKey\n      const migratedDeviceKey: DeviceKeyJsonType = await helper.getFromUser(userId, DEVICE_KEY);\n\n      if (account?.keys && migratedDeviceKey != null) {\n        account.keys.deviceKey = migratedDeviceKey;\n        await helper.set(userId, account);\n      }\n\n      await helper.setToUser(userId, DEVICE_KEY, null);\n\n      // Rollback shouldTrustDevice\n      const migratedShouldTrustDevice = await helper.getFromUser<boolean>(\n        userId,\n        SHOULD_TRUST_DEVICE,\n      );\n\n      if (account?.settings && migratedShouldTrustDevice != null) {\n        account.settings.trustDeviceChoiceForDecryption = migratedShouldTrustDevice;\n        await helper.set(userId, account);\n      }\n\n      await helper.setToUser(userId, SHOULD_TRUST_DEVICE, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport enum SendType {\n  Text = 0,\n  File = 1,\n}\n\ntype SendData = {\n  id: string;\n  accessId: string;\n};\n\ntype ExpectedSendState = {\n  data?: {\n    sends?: {\n      encrypted?: Record<string, SendData>;\n    };\n  };\n};\n\nconst ENCRYPTED_SENDS: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"send\",\n  },\n  key: \"sends\",\n};\n\n/**\n * Only encrypted sends are stored on disk. Only the encrypted items need to be\n * migrated from the previous sends state data.\n */\nexport class SendMigrator extends Migrator<53, 54> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedSendState>();\n\n    async function migrateAccount(userId: string, account: ExpectedSendState): Promise<void> {\n      const value = account?.data?.sends?.encrypted;\n      if (value != null) {\n        await helper.setToUser(userId, ENCRYPTED_SENDS, value);\n        delete account.data.sends;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedSendState>();\n\n    async function rollbackAccount(userId: string, account: ExpectedSendState): Promise<void> {\n      const value = await helper.getFromUser(userId, ENCRYPTED_SENDS);\n      if (account) {\n        account.data = Object.assign(account.data ?? {}, {\n          sends: {\n            encrypted: value,\n          },\n        });\n\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, ENCRYPTED_SENDS, null);\n    }\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  keys?: {\n    masterKeyEncryptedUserKey?: string;\n  };\n  profile?: {\n    forceSetPasswordReason?: number;\n    keyHash?: string;\n  };\n};\n\nexport const FORCE_SET_PASSWORD_REASON_DEFINITION: KeyDefinitionLike = {\n  key: \"forceSetPasswordReason\",\n  stateDefinition: {\n    name: \"masterPassword\",\n  },\n};\n\nexport const MASTER_KEY_HASH_DEFINITION: KeyDefinitionLike = {\n  key: \"masterKeyHash\",\n  stateDefinition: {\n    name: \"masterPassword\",\n  },\n};\n\nexport const MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION: KeyDefinitionLike = {\n  key: \"masterKeyEncryptedUserKey\",\n  stateDefinition: {\n    name: \"masterPassword\",\n  },\n};\n\nexport class MoveMasterKeyStateToProviderMigrator extends Migrator<54, 55> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const forceSetPasswordReason = account?.profile?.forceSetPasswordReason;\n      if (forceSetPasswordReason != null) {\n        await helper.setToUser(\n          userId,\n          FORCE_SET_PASSWORD_REASON_DEFINITION,\n          forceSetPasswordReason,\n        );\n\n        delete account.profile.forceSetPasswordReason;\n        await helper.set(userId, account);\n      }\n\n      const masterKeyHash = account?.profile?.keyHash;\n      if (masterKeyHash != null) {\n        await helper.setToUser(userId, MASTER_KEY_HASH_DEFINITION, masterKeyHash);\n\n        delete account.profile.keyHash;\n        await helper.set(userId, account);\n      }\n\n      const masterKeyEncryptedUserKey = account?.keys?.masterKeyEncryptedUserKey;\n      if (masterKeyEncryptedUserKey != null) {\n        await helper.setToUser(\n          userId,\n          MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION,\n          masterKeyEncryptedUserKey,\n        );\n\n        delete account.keys.masterKeyEncryptedUserKey;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const forceSetPasswordReason = await helper.getFromUser(\n        userId,\n        FORCE_SET_PASSWORD_REASON_DEFINITION,\n      );\n      const masterKeyHash = await helper.getFromUser(userId, MASTER_KEY_HASH_DEFINITION);\n      const masterKeyEncryptedUserKey = await helper.getFromUser(\n        userId,\n        MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION,\n      );\n      if (account != null) {\n        if (forceSetPasswordReason != null) {\n          account.profile = Object.assign(account.profile ?? {}, {\n            forceSetPasswordReason,\n          });\n        }\n        if (masterKeyHash != null) {\n          account.profile = Object.assign(account.profile ?? {}, {\n            keyHash: masterKeyHash,\n          });\n        }\n        if (masterKeyEncryptedUserKey != null) {\n          account.keys = Object.assign(account.keys ?? {}, {\n            masterKeyEncryptedUserKey,\n          });\n        }\n        await helper.set(userId, account);\n      }\n\n      await helper.setToUser(userId, FORCE_SET_PASSWORD_REASON_DEFINITION, null);\n      await helper.setToUser(userId, MASTER_KEY_HASH_DEFINITION, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype AdminAuthRequestStorable = {\n  id: string;\n  privateKey: string;\n};\n\ntype ExpectedAccountType = {\n  adminAuthRequest?: AdminAuthRequestStorable;\n  settings?: {\n    approveLoginRequests?: boolean;\n  };\n};\n\nconst ADMIN_AUTH_REQUEST_KEY: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"authRequestLocal\",\n  },\n  key: \"adminAuthRequest\",\n};\n\nconst ACCEPT_AUTH_REQUESTS_KEY: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"authRequestLocal\",\n  },\n  key: \"acceptAuthRequests\",\n};\n\nexport class AuthRequestMigrator extends Migrator<55, 56> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedAccount = false;\n\n      // Migrate admin auth request\n      const existingAdminAuthRequest = account?.adminAuthRequest;\n\n      if (existingAdminAuthRequest != null) {\n        await helper.setToUser(userId, ADMIN_AUTH_REQUEST_KEY, existingAdminAuthRequest);\n        delete account.adminAuthRequest;\n        updatedAccount = true;\n      }\n\n      // Migrate approve login requests\n      const existingApproveLoginRequests = account?.settings?.approveLoginRequests;\n\n      if (existingApproveLoginRequests != null) {\n        await helper.setToUser(userId, ACCEPT_AUTH_REQUESTS_KEY, existingApproveLoginRequests);\n        delete account.settings.approveLoginRequests;\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        // Save the migrated account\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedAccount = false;\n      // Rollback admin auth request\n      const migratedAdminAuthRequest: AdminAuthRequestStorable = await helper.getFromUser(\n        userId,\n        ADMIN_AUTH_REQUEST_KEY,\n      );\n\n      if (migratedAdminAuthRequest != null) {\n        account.adminAuthRequest = migratedAdminAuthRequest;\n        updatedAccount = true;\n      }\n\n      await helper.setToUser(userId, ADMIN_AUTH_REQUEST_KEY, null);\n\n      // Rollback approve login requests\n      const migratedAcceptAuthRequest: boolean = await helper.getFromUser(\n        userId,\n        ACCEPT_AUTH_REQUESTS_KEY,\n      );\n\n      if (migratedAcceptAuthRequest != null) {\n        account.settings = Object.assign(account.settings ?? {}, {\n          approveLoginRequests: migratedAcceptAuthRequest,\n        });\n        updatedAccount = true;\n      }\n\n      await helper.setToUser(userId, ACCEPT_AUTH_REQUESTS_KEY, null);\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = {\n  data: {\n    localData?: unknown;\n    ciphers?: {\n      encrypted: unknown;\n    };\n  };\n};\n\nexport const CIPHERS_DISK_LOCAL: KeyDefinitionLike = {\n  key: \"localData\",\n  stateDefinition: {\n    name: \"ciphersLocal\",\n  },\n};\n\nexport const CIPHERS_DISK: KeyDefinitionLike = {\n  key: \"ciphers\",\n  stateDefinition: {\n    name: \"ciphers\",\n  },\n};\n\nexport class CipherServiceMigrator extends Migrator<56, 57> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedAccount = false;\n\n      //Migrate localData\n      const localData = account?.data?.localData;\n      if (localData != null) {\n        await helper.setToUser(userId, CIPHERS_DISK_LOCAL, localData);\n        delete account.data.localData;\n        updatedAccount = true;\n      }\n\n      //Migrate ciphers\n      const ciphers = account?.data?.ciphers?.encrypted;\n      if (ciphers != null) {\n        await helper.setToUser(userId, CIPHERS_DISK, ciphers);\n        delete account.data.ciphers;\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      //rollback localData\n      const localData = await helper.getFromUser(userId, CIPHERS_DISK_LOCAL);\n\n      if (account.data && localData != null) {\n        account.data.localData = localData;\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, CIPHERS_DISK_LOCAL, null);\n\n      //rollback ciphers\n      const ciphers = await helper.getFromUser(userId, CIPHERS_DISK);\n\n      if (account.data && ciphers != null) {\n        account.data.ciphers ||= { encrypted: null };\n        account.data.ciphers.encrypted = ciphers;\n        await helper.set(userId, account);\n      }\n      await helper.setToUser(userId, CIPHERS_DISK, null);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = NonNullable<unknown>;\n\nexport const REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE: KeyDefinitionLike = {\n  key: \"refreshTokenMigratedToSecureStorage\", // matches KeyDefinition.key\n  stateDefinition: {\n    name: \"token\", // matches StateDefinition.name in StateDefinitions\n  },\n};\n\nexport class RemoveRefreshTokenMigratedFlagMigrator extends Migrator<57, 58> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const refreshTokenMigratedFlag = await helper.getFromUser(\n        userId,\n        REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE,\n      );\n\n      if (refreshTokenMigratedFlag != null) {\n        // Only delete the flag if it exists\n        await helper.removeFromUser(userId, REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nenum KdfType {\n  PBKDF2_SHA256 = 0,\n  Argon2id = 1,\n}\n\nclass KdfConfig {\n  iterations: number;\n  kdfType: KdfType;\n  memory?: number;\n  parallelism?: number;\n}\n\ntype ExpectedAccountType = {\n  profile?: {\n    kdfIterations: number;\n    kdfType: KdfType;\n    kdfMemory?: number;\n    kdfParallelism?: number;\n  };\n};\n\nconst kdfConfigKeyDefinition: KeyDefinitionLike = {\n  key: \"kdfConfig\",\n  stateDefinition: {\n    name: \"kdfConfig\",\n  },\n};\n\nexport class KdfConfigMigrator extends Migrator<58, 59> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const iterations = account?.profile?.kdfIterations;\n      const kdfType = account?.profile?.kdfType;\n      const memory = account?.profile?.kdfMemory;\n      const parallelism = account?.profile?.kdfParallelism;\n\n      const kdfConfig: KdfConfig = {\n        iterations: iterations,\n        kdfType: kdfType,\n        memory: memory,\n        parallelism: parallelism,\n      };\n\n      if (kdfConfig != null) {\n        await helper.setToUser(userId, kdfConfigKeyDefinition, kdfConfig);\n        delete account?.profile?.kdfIterations;\n        delete account?.profile?.kdfType;\n        delete account?.profile?.kdfMemory;\n        delete account?.profile?.kdfParallelism;\n      }\n\n      await helper.set(userId, account);\n    }\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      const kdfConfig: KdfConfig = await helper.getFromUser(userId, kdfConfigKeyDefinition);\n\n      if (kdfConfig != null) {\n        account.profile.kdfIterations = kdfConfig.iterations;\n        account.profile.kdfType = kdfConfig.kdfType;\n        account.profile.kdfMemory = kdfConfig.memory;\n        account.profile.kdfParallelism = kdfConfig.parallelism;\n        await helper.setToUser(userId, kdfConfigKeyDefinition, null);\n      }\n      await helper.set(userId, account);\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { keys?: { legacyEtmKey?: string } };\n\nexport class RemoveLegacyEtmKeyMigrator extends Migrator<5, 6> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function updateAccount(userId: string, account: ExpectedAccountType) {\n      if (account?.keys?.legacyEtmKey) {\n        delete account.keys.legacyEtmKey;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all(accounts.map(({ userId, account }) => updateAccount(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n\n  // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n  // it is nested inside a global object.\n  override async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n    await helper.set(\"global\", { ...global, stateVersion: endVersion });\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\nexport const ACCOUNT_ACCOUNTS: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"account\",\n  },\n  key: \"accounts\",\n};\n\nexport const ACCOUNT_ACTIVE_ACCOUNT_ID: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"account\",\n  },\n  key: \"activeAccountId\",\n};\n\nexport const ACCOUNT_ACTIVITY: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"account\",\n  },\n  key: \"activity\",\n};\n\ntype ExpectedAccountType = {\n  profile?: {\n    email?: string;\n    name?: string;\n    emailVerified?: boolean;\n  };\n};\n\nexport class KnownAccountsMigrator extends Migrator<59, 60> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    await this.migrateAuthenticatedAccounts(helper);\n    await this.migrateActiveAccountId(helper);\n    await this.migrateAccountActivity(helper);\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // authenticated account are removed, but the accounts record also contains logged out accounts. Best we can do is to add them all back\n    const userIds = (await helper.getKnownUserIds()) ?? [];\n    await helper.set(\"authenticatedAccounts\", userIds);\n    await helper.removeFromGlobal(ACCOUNT_ACCOUNTS);\n\n    // Active Account Id\n    const activeAccountId = await helper.getFromGlobal<string>(ACCOUNT_ACTIVE_ACCOUNT_ID);\n    if (activeAccountId) {\n      await helper.set(\"activeUserId\", activeAccountId);\n    }\n    await helper.removeFromGlobal(ACCOUNT_ACTIVE_ACCOUNT_ID);\n\n    // Account Activity\n    const accountActivity = await helper.getFromGlobal<Record<string, string>>(ACCOUNT_ACTIVITY);\n    if (accountActivity) {\n      const toStore = Object.entries(accountActivity).reduce(\n        (agg, [userId, dateString]) => {\n          agg[userId] = new Date(dateString).getTime();\n          return agg;\n        },\n        {} as Record<string, number>,\n      );\n      await helper.set(\"accountActivity\", toStore);\n    }\n    await helper.removeFromGlobal(ACCOUNT_ACTIVITY);\n  }\n\n  private async migrateAuthenticatedAccounts(helper: MigrationHelper) {\n    const authenticatedAccounts = (await helper.get<string[]>(\"authenticatedAccounts\")) ?? [];\n    const accounts = await Promise.all(\n      authenticatedAccounts.map(async (userId) => {\n        const account = await helper.get<ExpectedAccountType>(userId);\n        return { userId, account };\n      }),\n    );\n    const accountsToStore = accounts.reduce(\n      (agg, { userId, account }) => {\n        if (account?.profile) {\n          agg[userId] = {\n            email: account.profile.email ?? \"\",\n            emailVerified: account.profile.emailVerified ?? false,\n            name: account.profile.name,\n          };\n        }\n        return agg;\n      },\n      {} as Record<string, { email: string; emailVerified: boolean; name: string | undefined }>,\n    );\n\n    await helper.setToGlobal(ACCOUNT_ACCOUNTS, accountsToStore);\n    await helper.remove(\"authenticatedAccounts\");\n  }\n\n  private async migrateAccountActivity(helper: MigrationHelper) {\n    const stored = await helper.get<Record<string, Date>>(\"accountActivity\");\n    const accountActivity = Object.entries(stored ?? {}).reduce(\n      (agg, [userId, dateMs]) => {\n        agg[userId] = JSON.stringify(new Date(dateMs));\n        return agg;\n      },\n      {} as Record<string, string>,\n    );\n    await helper.setToGlobal(ACCOUNT_ACTIVITY, accountActivity);\n    await helper.remove(\"accountActivity\");\n  }\n\n  private async migrateActiveAccountId(helper: MigrationHelper) {\n    const activeAccountId = await helper.get<string>(\"activeUserId\");\n    await helper.setToGlobal(ACCOUNT_ACTIVE_ACCOUNT_ID, activeAccountId);\n    await helper.remove(\"activeUserId\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccountState = {\n  settings?: {\n    pinKeyEncryptedUserKey?: string; // EncryptedString\n    protectedPin?: string; // EncryptedString\n    pinProtected?: {\n      encrypted?: string;\n    };\n  };\n};\n\nexport const PIN_STATE: StateDefinitionLike = { name: \"pinUnlock\" };\n\nexport const PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT: KeyDefinitionLike = {\n  stateDefinition: PIN_STATE,\n  key: \"pinKeyEncryptedUserKeyPersistent\",\n};\n\nexport const USER_KEY_ENCRYPTED_PIN: KeyDefinitionLike = {\n  stateDefinition: PIN_STATE,\n  key: \"userKeyEncryptedPin\",\n};\n\nexport const OLD_PIN_KEY_ENCRYPTED_MASTER_KEY: KeyDefinitionLike = {\n  stateDefinition: PIN_STATE,\n  key: \"oldPinKeyEncryptedMasterKey\",\n};\n\nexport class PinStateMigrator extends Migrator<60, 61> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyAccounts = await helper.getAccounts<ExpectedAccountState>();\n    let updatedAccount = false;\n\n    async function migrateAccount(userId: string, account: ExpectedAccountState) {\n      // Migrate pinKeyEncryptedUserKey (to `pinKeyEncryptedUserKeyPersistent`)\n      if (account?.settings?.pinKeyEncryptedUserKey != null) {\n        await helper.setToUser(\n          userId,\n          PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n          account.settings.pinKeyEncryptedUserKey,\n        );\n        delete account.settings.pinKeyEncryptedUserKey;\n        updatedAccount = true;\n      }\n\n      // Migrate protectedPin (to `userKeyEncryptedPin`)\n      if (account?.settings?.protectedPin != null) {\n        await helper.setToUser(userId, USER_KEY_ENCRYPTED_PIN, account.settings.protectedPin);\n        delete account.settings.protectedPin;\n        updatedAccount = true;\n      }\n\n      // Migrate pinProtected (to `oldPinKeyEncryptedMasterKey`)\n      if (account?.settings?.pinProtected?.encrypted != null) {\n        await helper.setToUser(\n          userId,\n          OLD_PIN_KEY_ENCRYPTED_MASTER_KEY,\n          account.settings.pinProtected.encrypted,\n        );\n        delete account.settings.pinProtected;\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([\n      ...legacyAccounts.map(({ userId, account }) => migrateAccount(userId, account)),\n    ]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountState>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountState) {\n      let updatedAccount = false;\n\n      const accountPinKeyEncryptedUserKeyPersistent = await helper.getFromUser<string>(\n        userId,\n        PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n      );\n      const accountUserKeyEncryptedPin = await helper.getFromUser<string>(\n        userId,\n        USER_KEY_ENCRYPTED_PIN,\n      );\n      const accountOldPinKeyEncryptedMasterKey = await helper.getFromUser<string>(\n        userId,\n        OLD_PIN_KEY_ENCRYPTED_MASTER_KEY,\n      );\n\n      if (!account) {\n        account = {};\n      }\n\n      if (accountPinKeyEncryptedUserKeyPersistent != null) {\n        account.settings.pinKeyEncryptedUserKey = accountPinKeyEncryptedUserKeyPersistent;\n        await helper.setToUser(userId, PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, null);\n        updatedAccount = true;\n      }\n\n      if (accountUserKeyEncryptedPin != null) {\n        account.settings.protectedPin = accountUserKeyEncryptedPin;\n        await helper.setToUser(userId, USER_KEY_ENCRYPTED_PIN, null);\n        updatedAccount = true;\n      }\n\n      if (accountOldPinKeyEncryptedMasterKey != null) {\n        account.settings = Object.assign(account.settings ?? {}, {\n          pinProtected: {\n            encrypted: accountOldPinKeyEncryptedMasterKey,\n          },\n        });\n\n        await helper.setToUser(userId, OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, null);\n        updatedAccount = true;\n      }\n\n      if (updatedAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n// Types to represent data as it is stored in JSON\ntype ExpectedAccountType = {\n  settings?: {\n    vaultTimeout?: number;\n    vaultTimeoutAction?: string;\n  };\n};\n\ntype ExpectedGlobalType = {\n  vaultTimeout?: number;\n  vaultTimeoutAction?: string;\n};\n\nconst VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE: StateDefinitionLike = {\n  name: \"vaultTimeoutSettings\",\n};\n\nexport const VAULT_TIMEOUT: KeyDefinitionLike = {\n  key: \"vaultTimeout\", // matches KeyDefinition.key\n  stateDefinition: VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE,\n};\n\nexport const VAULT_TIMEOUT_ACTION: KeyDefinitionLike = {\n  key: \"vaultTimeoutAction\", // matches KeyDefinition.key\n  stateDefinition: VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE,\n};\n\n// Migrations are supposed to be frozen so we have to copy the type here.\nexport type VaultTimeout =\n  | number // 0 for immediately; otherwise positive numbers\n  | \"never\" // null\n  | \"onRestart\" // -1\n  | \"onLocked\" // -2\n  | \"onSleep\" // -3\n  | \"onIdle\"; // -4\n\n// Define mapping of old values to new values for migration purposes\nconst vaultTimeoutTypeMigrateRecord: Record<any, VaultTimeout> = {\n  null: \"never\",\n  \"-1\": \"onRestart\",\n  \"-2\": \"onLocked\",\n  \"-3\": \"onSleep\",\n  \"-4\": \"onIdle\",\n};\n\n// define mapping of new values to old values for rollback purposes\nconst vaultTimeoutTypeRollbackRecord: Record<VaultTimeout, any> = {\n  never: null,\n  onRestart: -1,\n  onLocked: -2,\n  onSleep: -3,\n  onIdle: -4,\n};\n\nexport enum ClientType {\n  Web = \"web\",\n  Browser = \"browser\",\n  Desktop = \"desktop\",\n  Cli = \"cli\",\n}\n\nexport class VaultTimeoutSettingsServiceStateProviderMigrator extends Migrator<61, 62> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const globalData = await helper.get<ExpectedGlobalType>(\"global\");\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function migrateAccount(\n      userId: string,\n      account: ExpectedAccountType | undefined,\n    ): Promise<void> {\n      let updatedAccount = false;\n\n      // Migrate vault timeout\n      let existingVaultTimeout = account?.settings?.vaultTimeout;\n\n      if (helper.clientType === ClientType.Cli && existingVaultTimeout === undefined) {\n        // The CLI does not set a vault timeout by default so we need to set it to null\n        // so that the migration can migrate null to \"never\" as the CLI does not have a vault timeout.\n        existingVaultTimeout = null;\n      }\n\n      if (existingVaultTimeout !== undefined) {\n        // check undefined so that we allow null values (previously meant never timeout)\n        // Only migrate data that exists\n\n        if (existingVaultTimeout === null || existingVaultTimeout < 0) {\n          // Map null or negative values to new string values\n          const newVaultTimeout = vaultTimeoutTypeMigrateRecord[existingVaultTimeout];\n          await helper.setToUser(userId, VAULT_TIMEOUT, newVaultTimeout);\n        } else {\n          // Persist positive numbers as is\n          await helper.setToUser(userId, VAULT_TIMEOUT, existingVaultTimeout);\n        }\n\n        delete account?.settings?.vaultTimeout;\n        updatedAccount = true;\n      }\n\n      // Migrate vault timeout action\n      const existingVaultTimeoutAction = account?.settings?.vaultTimeoutAction;\n\n      if (existingVaultTimeoutAction != null) {\n        // Only migrate data that exists\n        await helper.setToUser(userId, VAULT_TIMEOUT_ACTION, existingVaultTimeoutAction);\n\n        delete account?.settings?.vaultTimeoutAction;\n        updatedAccount = true;\n      }\n\n      // Note: we are explicitly not worrying about mapping over the global fallback vault timeout / action\n      // into the new state provider framework.  It was originally a fallback but hasn't been used for years\n      // so this migration will clean up the global properties fully.\n\n      if (updatedAccount) {\n        // Save the migrated account only if it was updated\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n\n    // Delete global data (works for browser extension and web; CLI doesn't have these as global settings).\n    delete globalData?.vaultTimeout;\n    delete globalData?.vaultTimeoutAction;\n    await helper.set(\"global\", globalData);\n\n    // Remove desktop only settings. These aren't found by the above global key removal b/c of\n    // the different storage key format. This removal does not cause any issues on migrating for other clients.\n    await helper.remove(\"global\\\\.vaultTimeout\");\n    await helper.remove(\"global\\\\.vaultTimeoutAction\");\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    async function rollbackAccount(userId: string, account: ExpectedAccountType): Promise<void> {\n      let updatedLegacyAccount = false;\n\n      // Rollback vault timeout\n      const migratedVaultTimeout = await helper.getFromUser<VaultTimeout>(userId, VAULT_TIMEOUT);\n\n      if (account?.settings && migratedVaultTimeout != null) {\n        if (typeof migratedVaultTimeout === \"string\") {\n          // Map new string values back to old values\n          account.settings.vaultTimeout = vaultTimeoutTypeRollbackRecord[migratedVaultTimeout];\n        } else {\n          // persist numbers as is\n          account.settings.vaultTimeout = migratedVaultTimeout;\n        }\n\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, VAULT_TIMEOUT, null);\n\n      // Rollback vault timeout action\n      const migratedVaultTimeoutAction = await helper.getFromUser<string>(\n        userId,\n        VAULT_TIMEOUT_ACTION,\n      );\n\n      if (account?.settings && migratedVaultTimeoutAction != null) {\n        account.settings.vaultTimeoutAction = migratedVaultTimeoutAction;\n        updatedLegacyAccount = true;\n      }\n\n      await helper.setToUser(userId, VAULT_TIMEOUT_ACTION, null);\n\n      if (updatedLegacyAccount) {\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => rollbackAccount(userId, account))]);\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n  settings?: {\n    passwordGenerationOptions?: ExpectedOptions;\n  };\n};\n\nexport type GeneratorType = \"password\" | \"passphrase\" | \"username\";\n\n/** username generation options prior to refactoring */\nexport type ExpectedOptions = {\n  type?: GeneratorType;\n  length?: number;\n  minLength?: number;\n  ambiguous?: boolean;\n  uppercase?: boolean;\n  minUppercase?: number;\n  lowercase?: boolean;\n  minLowercase?: number;\n  number?: boolean;\n  minNumber?: number;\n  special?: boolean;\n  minSpecial?: number;\n  numWords?: number;\n  wordSeparator?: string;\n  capitalize?: boolean;\n  includeNumber?: boolean;\n};\n\n/** username generation options after refactoring */\ntype ConvertedOptions = {\n  generator: GeneratorNavigation;\n  password: PasswordGenerationOptions;\n  passphrase: PassphraseGenerationOptions;\n};\n\nexport const NAVIGATION: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"generatorSettings\",\n};\n\nexport const PASSWORD: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"passwordGeneratorSettings\",\n};\n\nexport const PASSPHRASE: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"passphraseGeneratorSettings\",\n};\n\nexport type GeneratorNavigation = {\n  type?: string;\n};\n\nexport type PassphraseGenerationOptions = {\n  numWords?: number;\n  wordSeparator?: string;\n  capitalize?: boolean;\n  includeNumber?: boolean;\n};\n\nexport type PasswordGenerationOptions = {\n  length?: number;\n  minLength?: number;\n  ambiguous?: boolean;\n  uppercase?: boolean;\n  minUppercase?: number;\n  lowercase?: boolean;\n  minLowercase?: number;\n  number?: boolean;\n  minNumber?: number;\n  special?: boolean;\n  minSpecial?: number;\n};\n\nexport class PasswordOptionsMigrator extends Migrator<62, 63> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<AccountType>();\n\n    async function migrateAccount(userId: string, account: AccountType) {\n      const legacyOptions = account?.settings?.passwordGenerationOptions;\n\n      if (legacyOptions) {\n        const converted = convertSettings(legacyOptions);\n        await storeSettings(helper, userId, converted);\n        await deleteSettings(helper, userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // not supported\n  }\n}\n\nfunction convertSettings(options: ExpectedOptions): ConvertedOptions {\n  const password = {\n    length: options.length,\n    ambiguous: options.ambiguous,\n    uppercase: options.uppercase,\n    minUppercase: options.minUppercase,\n    lowercase: options.lowercase,\n    minLowercase: options.minLowercase,\n    number: options.number,\n    minNumber: options.minNumber,\n    special: options.special,\n    minSpecial: options.minSpecial,\n  };\n\n  const generator = {\n    type: options.type,\n  };\n\n  const passphrase = {\n    numWords: options.numWords,\n    wordSeparator: options.wordSeparator,\n    capitalize: options.capitalize,\n    includeNumber: options.includeNumber,\n  };\n\n  return { generator, password, passphrase };\n}\n\nasync function storeSettings(helper: MigrationHelper, userId: string, converted: ConvertedOptions) {\n  const existing = (await helper.getFromUser(userId, NAVIGATION)) ?? {};\n  const updated = Object.assign(existing, converted.generator);\n\n  await Promise.all([\n    helper.setToUser(userId, NAVIGATION, updated),\n    helper.setToUser(userId, PASSPHRASE, converted.passphrase),\n    helper.setToUser(userId, PASSWORD, converted.password),\n  ]);\n}\n\nasync function deleteSettings(helper: MigrationHelper, userId: string, account: AccountType) {\n  delete account?.settings?.passwordGenerationOptions;\n  await helper.set(userId, account);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n  data?: {\n    passwordGenerationHistory?: {\n      encrypted: EncryptedHistory;\n    };\n  };\n};\n\n/** the actual data stored in the history is opaque to the migrator */\nexport type EncryptedHistory = Array<unknown>;\n\nexport const HISTORY: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"localGeneratorHistoryBuffer\",\n};\n\nexport class GeneratorHistoryMigrator extends Migrator<63, 64> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<AccountType>();\n\n    async function migrateAccount(userId: string, account: AccountType) {\n      const data = account?.data?.passwordGenerationHistory;\n      if (data && data.encrypted) {\n        await helper.setToUser(userId, HISTORY, data.encrypted);\n        delete account.data.passwordGenerationHistory;\n        await helper.set(userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // not supported\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\n/** settings targeted by migrator */\nexport type AccountType = {\n  settings?: {\n    usernameGenerationOptions?: ExpectedOptions;\n  };\n};\n\n/** username generation options prior to refactoring */\nexport type ExpectedOptions = {\n  type?: \"word\" | \"subaddress\" | \"catchall\" | \"forwarded\";\n  wordCapitalize?: boolean;\n  wordIncludeNumber?: boolean;\n  subaddressType?: \"random\" | \"website-name\";\n  subaddressEmail?: string;\n  catchallType?: \"random\" | \"website-name\";\n  catchallDomain?: string;\n  forwardedService?: string;\n  forwardedAnonAddyApiToken?: string;\n  forwardedAnonAddyDomain?: string;\n  forwardedAnonAddyBaseUrl?: string;\n  forwardedDuckDuckGoToken?: string;\n  forwardedFirefoxApiToken?: string;\n  forwardedFastmailApiToken?: string;\n  forwardedForwardEmailApiToken?: string;\n  forwardedForwardEmailDomain?: string;\n  forwardedSimpleLoginApiKey?: string;\n  forwardedSimpleLoginBaseUrl?: string;\n};\n\n/** username generation options after refactoring */\ntype ConvertedOptions = {\n  generator: GeneratorNavigation;\n  algorithms: {\n    catchall: CatchallGenerationOptions;\n    effUsername: EffUsernameGenerationOptions;\n    subaddress: SubaddressGenerationOptions;\n  };\n  forwarders: {\n    addyIo: SelfHostedApiOptions & EmailDomainOptions;\n    duckDuckGo: ApiOptions;\n    fastmail: ApiOptions;\n    firefoxRelay: ApiOptions;\n    forwardEmail: ApiOptions & EmailDomainOptions;\n    simpleLogin: SelfHostedApiOptions;\n  };\n};\n\nexport const NAVIGATION: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"generatorSettings\",\n};\n\nexport const CATCHALL: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"catchallGeneratorSettings\",\n};\n\nexport const EFF_USERNAME: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"effUsernameGeneratorSettings\",\n};\n\nexport const SUBADDRESS: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"subaddressGeneratorSettings\",\n};\n\nexport const ADDY_IO: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"addyIoBuffer\",\n};\n\nexport const DUCK_DUCK_GO: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"duckDuckGoBuffer\",\n};\n\nexport const FASTMAIL: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"fastmailBuffer\",\n};\n\nexport const FIREFOX_RELAY: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"firefoxRelayBuffer\",\n};\n\nexport const FORWARD_EMAIL: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"forwardEmailBuffer\",\n};\n\nexport const SIMPLE_LOGIN: KeyDefinitionLike = {\n  stateDefinition: {\n    name: \"generator\",\n  },\n  key: \"simpleLoginBuffer\",\n};\n\nexport type GeneratorNavigation = {\n  type?: string;\n  username?: string;\n  forwarder?: string;\n};\n\ntype UsernameGenerationMode = \"random\" | \"website-name\";\n\ntype CatchallGenerationOptions = {\n  catchallType?: UsernameGenerationMode;\n  catchallDomain?: string;\n};\n\ntype EffUsernameGenerationOptions = {\n  wordCapitalize?: boolean;\n  wordIncludeNumber?: boolean;\n};\n\ntype SubaddressGenerationOptions = {\n  subaddressType?: UsernameGenerationMode;\n  subaddressEmail?: string;\n};\n\ntype ApiOptions = {\n  token?: string;\n};\n\ntype SelfHostedApiOptions = ApiOptions & {\n  baseUrl: string;\n};\n\ntype EmailDomainOptions = {\n  domain: string;\n};\n\nexport class ForwarderOptionsMigrator extends Migrator<64, 65> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const accounts = await helper.getAccounts<AccountType>();\n\n    async function migrateAccount(userId: string, account: AccountType) {\n      const legacyOptions = account?.settings?.usernameGenerationOptions;\n\n      if (legacyOptions) {\n        const converted = convertSettings(legacyOptions);\n        await storeSettings(helper, userId, converted);\n        await deleteSettings(helper, userId, account);\n      }\n    }\n\n    await Promise.all([...accounts.map(({ userId, account }) => migrateAccount(userId, account))]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    // not supported\n  }\n}\n\nfunction convertSettings(options: ExpectedOptions): ConvertedOptions {\n  const forwarders = {\n    addyIo: {\n      baseUrl: options.forwardedAnonAddyBaseUrl,\n      token: options.forwardedAnonAddyApiToken,\n      domain: options.forwardedAnonAddyDomain,\n    },\n    duckDuckGo: {\n      token: options.forwardedDuckDuckGoToken,\n    },\n    fastmail: {\n      token: options.forwardedFastmailApiToken,\n    },\n    firefoxRelay: {\n      token: options.forwardedFirefoxApiToken,\n    },\n    forwardEmail: {\n      token: options.forwardedForwardEmailApiToken,\n      domain: options.forwardedForwardEmailDomain,\n    },\n    simpleLogin: {\n      token: options.forwardedSimpleLoginApiKey,\n      baseUrl: options.forwardedSimpleLoginBaseUrl,\n    },\n  };\n\n  const generator = {\n    username: options.type,\n    forwarder: options.forwardedService,\n  };\n\n  const algorithms = {\n    effUsername: {\n      wordCapitalize: options.wordCapitalize,\n      wordIncludeNumber: options.wordIncludeNumber,\n    },\n    subaddress: {\n      subaddressType: options.subaddressType,\n      subaddressEmail: options.subaddressEmail,\n    },\n    catchall: {\n      catchallType: options.catchallType,\n      catchallDomain: options.catchallDomain,\n    },\n  };\n\n  return { generator, algorithms, forwarders };\n}\n\nasync function storeSettings(helper: MigrationHelper, userId: string, converted: ConvertedOptions) {\n  await Promise.all([\n    helper.setToUser(userId, NAVIGATION, converted.generator),\n    helper.setToUser(userId, CATCHALL, converted.algorithms.catchall),\n    helper.setToUser(userId, EFF_USERNAME, converted.algorithms.effUsername),\n    helper.setToUser(userId, SUBADDRESS, converted.algorithms.subaddress),\n    helper.setToUser(userId, ADDY_IO, converted.forwarders.addyIo),\n    helper.setToUser(userId, DUCK_DUCK_GO, converted.forwarders.duckDuckGo),\n    helper.setToUser(userId, FASTMAIL, converted.forwarders.fastmail),\n    helper.setToUser(userId, FIREFOX_RELAY, converted.forwarders.firefoxRelay),\n    helper.setToUser(userId, FORWARD_EMAIL, converted.forwarders.forwardEmail),\n    helper.setToUser(userId, SIMPLE_LOGIN, converted.forwarders.simpleLogin),\n  ]);\n}\n\nasync function deleteSettings(helper: MigrationHelper, userId: string, account: AccountType) {\n  delete account?.settings?.usernameGenerationOptions;\n  await helper.set(userId, account);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper, StateDefinitionLike } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedGlobal = {\n  enableBrowserIntegration?: boolean;\n  enableBrowserIntegrationFingerprint?: boolean;\n};\n\ntype ExpectedAccount = {\n  settings?: {\n    minimizeOnCopyToClipboard?: boolean;\n  };\n};\n\nconst DESKTOP_SETTINGS_DISK: StateDefinitionLike = {\n  name: \"desktopSettings\",\n};\n\nconst BROWSER_INTEGRATION_ENABLED: KeyDefinitionLike = {\n  key: \"browserIntegrationEnabled\",\n  stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nconst BROWSER_INTEGRATION_FINGERPRINT_ENABLED: KeyDefinitionLike = {\n  key: \"browserIntegrationFingerprintEnabled\",\n  stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nconst MINIMIZE_ON_COPY: KeyDefinitionLike = {\n  key: \"minimizeOnCopy\",\n  stateDefinition: DESKTOP_SETTINGS_DISK,\n};\n\nexport class MoveFinalDesktopSettingsMigrator extends Migrator<65, 66> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const legacyGlobal = await helper.get<ExpectedGlobal>(\"global\");\n    const enableBrowserIntegrationValue = legacyGlobal?.enableBrowserIntegration;\n    const enableBrowserIntegrationFingerprintValue =\n      legacyGlobal?.enableBrowserIntegrationFingerprint;\n\n    let updatedGlobal = false;\n\n    if (enableBrowserIntegrationValue != null) {\n      await helper.setToGlobal(BROWSER_INTEGRATION_ENABLED, enableBrowserIntegrationValue);\n      delete legacyGlobal.enableBrowserIntegration;\n      updatedGlobal = true;\n    }\n\n    if (enableBrowserIntegrationFingerprintValue != null) {\n      await helper.setToGlobal(\n        BROWSER_INTEGRATION_FINGERPRINT_ENABLED,\n        enableBrowserIntegrationFingerprintValue,\n      );\n      delete legacyGlobal.enableBrowserIntegrationFingerprint;\n      updatedGlobal = true;\n    }\n\n    if (updatedGlobal) {\n      await helper.set(\"global\", legacyGlobal);\n    }\n\n    async function migrateAccount(userId: string, account: ExpectedAccount) {\n      const minimizeOnCopyToClipboardValue = account?.settings?.minimizeOnCopyToClipboard;\n\n      if (minimizeOnCopyToClipboardValue != null) {\n        await helper.setToUser(userId, MINIMIZE_ON_COPY, minimizeOnCopyToClipboardValue);\n        delete account.settings.minimizeOnCopyToClipboard;\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccount>();\n\n    await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const browserIntegrationEnabledValue = await helper.getFromGlobal<boolean>(\n      BROWSER_INTEGRATION_ENABLED,\n    );\n\n    const browserIntegrationFingerprintEnabled = await helper.getFromGlobal<boolean>(\n      BROWSER_INTEGRATION_FINGERPRINT_ENABLED,\n    );\n\n    if (browserIntegrationEnabledValue != null) {\n      let legacyGlobal = await helper.get<ExpectedGlobal>(\"global\");\n      legacyGlobal ??= {};\n      legacyGlobal.enableBrowserIntegration = browserIntegrationEnabledValue;\n      await helper.set(\"global\", legacyGlobal);\n      await helper.removeFromGlobal(BROWSER_INTEGRATION_ENABLED);\n    }\n\n    if (browserIntegrationFingerprintEnabled != null) {\n      let legacyGlobal = await helper.get<ExpectedGlobal>(\"global\");\n      legacyGlobal ??= {};\n      legacyGlobal.enableBrowserIntegrationFingerprint = browserIntegrationFingerprintEnabled;\n      await helper.set(\"global\", legacyGlobal);\n      await helper.removeFromGlobal(BROWSER_INTEGRATION_FINGERPRINT_ENABLED);\n    }\n\n    async function rollbackAccount(userId: string, account: ExpectedAccount) {\n      const minimizeOnCopyToClipboardValue = await helper.getFromUser<boolean>(\n        userId,\n        MINIMIZE_ON_COPY,\n      );\n\n      if (minimizeOnCopyToClipboardValue != null) {\n        account ??= { settings: {} };\n        account.settings.minimizeOnCopyToClipboard = minimizeOnCopyToClipboardValue;\n        await helper.set(userId, account);\n        await helper.removeFromUser(userId, MINIMIZE_ON_COPY);\n      }\n    }\n\n    const accounts = await helper.getAccounts();\n    await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n  }\n}\n","import { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\nexport const SHOW_BANNER: KeyDefinitionLike = {\n  key: \"showBanner\",\n  stateDefinition: { name: \"unassignedItemsBanner\" },\n};\n\nexport class RemoveUnassignedItemsBannerDismissed extends Migrator<66, 67> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    await Promise.all(\n      (await helper.getAccounts()).map(async ({ userId }) => {\n        if (helper.getFromUser(userId, SHOW_BANNER) != null) {\n          await helper.removeFromUser(userId, SHOW_BANNER);\n        }\n      }),\n    );\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KeyDefinitionLike, MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype ExpectedAccount = {\n  profile?: {\n    lastSync?: string;\n  };\n};\n\nconst LAST_SYNC_KEY: KeyDefinitionLike = {\n  key: \"lastSync\",\n  stateDefinition: {\n    name: \"sync\",\n  },\n};\n\nexport class MoveLastSyncDate extends Migrator<67, 68> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    async function migrateAccount(userId: string, account: ExpectedAccount) {\n      const value = account?.profile?.lastSync;\n      if (value != null) {\n        await helper.setToUser(userId, LAST_SYNC_KEY, value);\n\n        delete account.profile.lastSync;\n        await helper.set(userId, account);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccount>();\n    await Promise.all(accounts.map(({ userId, account }) => migrateAccount(userId, account)));\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    async function rollbackAccount(userId: string, account: ExpectedAccount) {\n      const value = await helper.getFromUser<string>(userId, LAST_SYNC_KEY);\n\n      if (value != null) {\n        account ??= {};\n        account.profile ??= {};\n        account.profile.lastSync = value;\n        await helper.set(userId, account);\n        await helper.removeFromUser(userId, LAST_SYNC_KEY);\n      }\n    }\n\n    const accounts = await helper.getAccounts<ExpectedAccount>();\n    await Promise.all(accounts.map(({ userId, account }) => rollbackAccount(userId, account)));\n  }\n}\n","import { MigrationHelper } from \"../migration-helper\";\nimport { Direction, IRREVERSIBLE, Migrator } from \"../migrator\";\n\ntype ExpectedAccountType = { settings?: { disableAutoBiometricsPrompt?: boolean } };\n\nexport class MoveBiometricAutoPromptToAccount extends Migrator<6, 7> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const global = await helper.get<{ noAutoPromptBiometrics?: boolean }>(\"global\");\n    const noAutoPromptBiometrics = global?.noAutoPromptBiometrics ?? false;\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n    async function updateAccount(userId: string, account: ExpectedAccountType) {\n      if (account == null) {\n        return;\n      }\n\n      if (noAutoPromptBiometrics) {\n        account.settings = Object.assign(account?.settings ?? {}, {\n          disableAutoBiometricsPrompt: true,\n        });\n        await helper.set(userId, account);\n      }\n    }\n\n    delete global.noAutoPromptBiometrics;\n\n    await Promise.all([\n      ...accounts.map(({ userId, account }) => updateAccount(userId, account)),\n      helper.set(\"global\", global),\n    ]);\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n\n  // Override is necessary because default implementation assumes `stateVersion` at the root, but for this version\n  // it is nested inside a global object.\n  override async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n    await helper.set(\"global\", { ...global, stateVersion: endVersion });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { JsonObject } from \"type-fest\";\n\nimport { MigrationHelper } from \"../migration-helper\";\nimport { Direction, Migrator } from \"../migrator\";\n\nexport class MoveStateVersionMigrator extends Migrator<7, 8> {\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const global = await helper.get<{ stateVersion: number }>(\"global\");\n    if (global.stateVersion) {\n      await helper.set(\"stateVersion\", global.stateVersion);\n      delete global.stateVersion;\n      await helper.set(\"global\", global);\n    } else {\n      throw new Error(\"Migration failed, state version not found\");\n    }\n  }\n\n  async rollback(helper: MigrationHelper): Promise<void> {\n    const version = await helper.get<number>(\"stateVersion\");\n    const global = await helper.get<JsonObject>(\"global\");\n    await helper.set(\"global\", { ...global, stateVersion: version });\n    await helper.set(\"stateVersion\", undefined);\n  }\n\n  // Override is necessary because default implementation assumes `stateVersion` at the root, but this migration moves\n  // it from a `global` object to root.This makes for unique rollback versioning.\n  override async updateVersion(helper: MigrationHelper, direction: Direction): Promise<void> {\n    const endVersion = direction === \"up\" ? this.toVersion : this.fromVersion;\n    helper.currentVersion = endVersion;\n    if (direction === \"up\") {\n      await helper.set(\"stateVersion\", endVersion);\n    } else {\n      const global: { stateVersion: number } = (await helper.get(\"global\")) || ({} as any);\n      await helper.set(\"global\", { ...global, stateVersion: endVersion });\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MigrationHelper } from \"../migration-helper\";\nimport { Migrator } from \"../migrator\";\n\ntype NeverDomains = { [id: string]: unknown };\n\ntype ExpectedAccountType = {\n  settings?: {\n    neverDomains?: NeverDomains;\n    disableAddLoginNotification?: boolean;\n    disableChangedPasswordNotification?: boolean;\n    disableContextMenuItem?: boolean;\n  };\n};\n\ntype TargetGlobalState = {\n  neverDomains?: NeverDomains;\n  disableAddLoginNotification?: boolean;\n  disableChangedPasswordNotification?: boolean;\n  disableContextMenuItem?: boolean;\n};\n\nexport class MoveBrowserSettingsToGlobal extends Migrator<8, 9> {\n  // Will first check if any of the accounts have a value from the given accountSelector\n  // if they do have a value it will set that value into global state but if multiple\n  // users have differing values it will prefer the false setting,\n  // if all users have true then it will take true.\n  tryAddSetting(\n    accounts: { userId: string; account: ExpectedAccountType }[],\n    accountSelector: (account: ExpectedAccountType) => boolean | undefined,\n    globalSetter: (value: boolean | undefined) => void,\n  ): void {\n    const hasValue = accounts.some(({ account }) => {\n      return accountSelector(account) !== undefined;\n    });\n\n    if (hasValue) {\n      const value = !accounts.some(({ account }) => {\n        return (accountSelector(account) ?? false) === false;\n      });\n\n      globalSetter(value);\n    }\n  }\n\n  async migrate(helper: MigrationHelper): Promise<void> {\n    const global = await helper.get<object>(\"global\");\n\n    const accounts = await helper.getAccounts<ExpectedAccountType>();\n\n    const globalNeverDomainsValue = accounts.reduce((accumulator, { account }) => {\n      const normalizedNeverDomains = account.settings?.neverDomains ?? {};\n      for (const [id, value] of Object.entries(normalizedNeverDomains)) {\n        accumulator ??= {};\n        accumulator[id] = value;\n      }\n      return accumulator;\n    }, undefined as NeverDomains);\n\n    const targetGlobalState: TargetGlobalState = {};\n\n    if (globalNeverDomainsValue != null) {\n      targetGlobalState.neverDomains = globalNeverDomainsValue;\n    }\n\n    this.tryAddSetting(\n      accounts,\n      (a) => a.settings?.disableAddLoginNotification,\n      (v) => (targetGlobalState.disableAddLoginNotification = v),\n    );\n\n    this.tryAddSetting(\n      accounts,\n      (a) => a.settings?.disableChangedPasswordNotification,\n      (v) => (targetGlobalState.disableChangedPasswordNotification = v),\n    );\n\n    this.tryAddSetting(\n      accounts,\n      (a) => a.settings?.disableContextMenuItem,\n      (v) => (targetGlobalState.disableContextMenuItem = v),\n    );\n\n    await helper.set<TargetGlobalState>(\"global\", {\n      ...global,\n      ...targetGlobalState,\n    });\n\n    await Promise.all(\n      accounts.map(async ({ userId, account }) => {\n        delete account.settings?.disableAddLoginNotification;\n        delete account.settings?.disableChangedPasswordNotification;\n        delete account.settings?.disableContextMenuItem;\n        delete account.settings?.neverDomains;\n        await helper.set(userId, account);\n      }),\n    );\n  }\n\n  rollback(helper: MigrationHelper): Promise<void> {\n    throw new Error(\"Method not implemented.\");\n  }\n}\n","import { MinVersion, MIN_VERSION } from \"../migrate\";\nimport { MigrationHelper } from \"../migration-helper\";\nimport { IRREVERSIBLE, Migrator } from \"../migrator\";\n\nexport function minVersionError(current: number) {\n  return `Your local data is too old to be migrated. Your current state version is ${current}, but minimum version is ${MIN_VERSION}.`;\n}\n\nexport class MinVersionMigrator extends Migrator<0, MinVersion> {\n  constructor() {\n    super(0, MIN_VERSION);\n  }\n\n  // Overrides the default implementation to catch any version that may be passed in.\n  override shouldMigrate(helper: MigrationHelper): Promise<boolean> {\n    return Promise.resolve(helper.currentVersion < MIN_VERSION);\n  }\n  async migrate(helper: MigrationHelper): Promise<void> {\n    if (helper.currentVersion < MIN_VERSION) {\n      throw new Error(minVersionError(helper.currentVersion));\n    }\n  }\n  async rollback(helper: MigrationHelper): Promise<void> {\n    throw IRREVERSIBLE;\n  }\n}\n","// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages\nimport { LogService } from \"../platform/abstractions/log.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to interface with storage locations\nimport { AbstractStorageService } from \"../platform/abstractions/storage.service\";\n\nimport { MigrationBuilder } from \"./migration-builder\";\nimport { EverHadUserKeyMigrator } from \"./migrations/10-move-ever-had-user-key-to-state-providers\";\nimport { OrganizationKeyMigrator } from \"./migrations/11-move-org-keys-to-state-providers\";\nimport { MoveEnvironmentStateToProviders } from \"./migrations/12-move-environment-state-to-providers\";\nimport { ProviderKeyMigrator } from \"./migrations/13-move-provider-keys-to-state-providers\";\nimport { MoveBiometricClientKeyHalfToStateProviders } from \"./migrations/14-move-biometric-client-key-half-state-to-providers\";\nimport { FolderMigrator } from \"./migrations/15-move-folder-state-to-state-provider\";\nimport { LastSyncMigrator } from \"./migrations/16-move-last-sync-to-state-provider\";\nimport { EnablePasskeysMigrator } from \"./migrations/17-move-enable-passkeys-to-state-providers\";\nimport { AutofillSettingsKeyMigrator } from \"./migrations/18-move-autofill-settings-to-state-providers\";\nimport { RequirePasswordOnStartMigrator } from \"./migrations/19-migrate-require-password-on-start\";\nimport { PrivateKeyMigrator } from \"./migrations/20-move-private-key-to-state-providers\";\nimport { CollectionMigrator } from \"./migrations/21-move-collections-state-to-state-provider\";\nimport { CollapsedGroupingsMigrator } from \"./migrations/22-move-collapsed-groupings-to-state-provider\";\nimport { MoveBiometricPromptsToStateProviders } from \"./migrations/23-move-biometric-prompts-to-state-providers\";\nimport { SmOnboardingTasksMigrator } from \"./migrations/24-move-sm-onboarding-key-to-state-providers\";\nimport { ClearClipboardDelayMigrator } from \"./migrations/25-move-clear-clipboard-to-autofill-settings-state-provider\";\nimport { RevertLastSyncMigrator } from \"./migrations/26-revert-move-last-sync-to-state-provider\";\nimport { BadgeSettingsMigrator } from \"./migrations/27-move-badge-settings-to-state-providers\";\nimport { MoveBiometricUnlockToStateProviders } from \"./migrations/28-move-biometric-unlock-to-state-providers\";\nimport { UserNotificationSettingsKeyMigrator } from \"./migrations/29-move-user-notification-settings-to-state-provider\";\nimport { PolicyMigrator } from \"./migrations/30-move-policy-state-to-state-provider\";\nimport { EnableContextMenuMigrator } from \"./migrations/31-move-enable-context-menu-to-autofill-settings-state-provider\";\nimport { PreferredLanguageMigrator } from \"./migrations/32-move-preferred-language\";\nimport { AppIdMigrator } from \"./migrations/33-move-app-id-to-state-providers\";\nimport { DomainSettingsMigrator } from \"./migrations/34-move-domain-settings-to-state-providers\";\nimport { MoveThemeToStateProviderMigrator } from \"./migrations/35-move-theme-to-state-providers\";\nimport { VaultSettingsKeyMigrator } from \"./migrations/36-move-show-card-and-identity-to-state-provider\";\nimport { AvatarColorMigrator } from \"./migrations/37-move-avatar-color-to-state-providers\";\nimport { TokenServiceStateProviderMigrator } from \"./migrations/38-migrate-token-svc-to-state-provider\";\nimport { MoveBillingAccountProfileMigrator } from \"./migrations/39-move-billing-account-profile-to-state-providers\";\nimport { RemoveEverBeenUnlockedMigrator } from \"./migrations/4-remove-ever-been-unlocked\";\nimport { OrganizationMigrator } from \"./migrations/40-move-organization-state-to-state-provider\";\nimport { EventCollectionMigrator } from \"./migrations/41-move-event-collection-to-state-provider\";\nimport { EnableFaviconMigrator } from \"./migrations/42-move-enable-favicon-to-domain-settings-state-provider\";\nimport { AutoConfirmFingerPrintsMigrator } from \"./migrations/43-move-auto-confirm-finger-prints-to-state-provider\";\nimport { UserDecryptionOptionsMigrator } from \"./migrations/44-move-user-decryption-options-to-state-provider\";\nimport { MergeEnvironmentState } from \"./migrations/45-merge-environment-state\";\nimport { DeleteBiometricPromptCancelledData } from \"./migrations/46-delete-orphaned-biometric-prompt-data\";\nimport { MoveDesktopSettingsMigrator } from \"./migrations/47-move-desktop-settings\";\nimport { MoveDdgToStateProviderMigrator } from \"./migrations/48-move-ddg-to-state-provider\";\nimport { AccountServerConfigMigrator } from \"./migrations/49-move-account-server-configs\";\nimport { AddKeyTypeToOrgKeysMigrator } from \"./migrations/5-add-key-type-to-org-keys\";\nimport { KeyConnectorMigrator } from \"./migrations/50-move-key-connector-to-state-provider\";\nimport { RememberedEmailMigrator } from \"./migrations/51-move-remembered-email-to-state-providers\";\nimport { DeleteInstalledVersion } from \"./migrations/52-delete-installed-version\";\nimport { DeviceTrustServiceStateProviderMigrator } from \"./migrations/53-migrate-device-trust-svc-to-state-providers\";\nimport { SendMigrator } from \"./migrations/54-move-encrypted-sends\";\nimport { MoveMasterKeyStateToProviderMigrator } from \"./migrations/55-move-master-key-state-to-provider\";\nimport { AuthRequestMigrator } from \"./migrations/56-move-auth-requests\";\nimport { CipherServiceMigrator } from \"./migrations/57-move-cipher-service-to-state-provider\";\nimport { RemoveRefreshTokenMigratedFlagMigrator } from \"./migrations/58-remove-refresh-token-migrated-state-provider-flag\";\nimport { KdfConfigMigrator } from \"./migrations/59-move-kdf-config-to-state-provider\";\nimport { RemoveLegacyEtmKeyMigrator } from \"./migrations/6-remove-legacy-etm-key\";\nimport { KnownAccountsMigrator } from \"./migrations/60-known-accounts\";\nimport { PinStateMigrator } from \"./migrations/61-move-pin-state-to-providers\";\nimport { VaultTimeoutSettingsServiceStateProviderMigrator } from \"./migrations/62-migrate-vault-timeout-settings-svc-to-state-provider\";\nimport { PasswordOptionsMigrator } from \"./migrations/63-migrate-password-settings\";\nimport { GeneratorHistoryMigrator } from \"./migrations/64-migrate-generator-history\";\nimport { ForwarderOptionsMigrator } from \"./migrations/65-migrate-forwarder-settings\";\nimport { MoveFinalDesktopSettingsMigrator } from \"./migrations/66-move-final-desktop-settings\";\nimport { RemoveUnassignedItemsBannerDismissed } from \"./migrations/67-remove-unassigned-items-banner-dismissed\";\nimport { MoveLastSyncDate } from \"./migrations/68-move-last-sync-date\";\nimport { MoveBiometricAutoPromptToAccount } from \"./migrations/7-move-biometric-auto-prompt-to-account\";\nimport { MoveStateVersionMigrator } from \"./migrations/8-move-state-version\";\nimport { MoveBrowserSettingsToGlobal } from \"./migrations/9-move-browser-settings-to-global\";\nimport { MinVersionMigrator } from \"./migrations/min-version\";\n\nexport const MIN_VERSION = 3;\nexport const CURRENT_VERSION = 68;\nexport type MinVersion = typeof MIN_VERSION;\n\nexport function createMigrationBuilder() {\n  return MigrationBuilder.create()\n    .with(MinVersionMigrator)\n    .with(RemoveEverBeenUnlockedMigrator, 3, 4)\n    .with(AddKeyTypeToOrgKeysMigrator, 4, 5)\n    .with(RemoveLegacyEtmKeyMigrator, 5, 6)\n    .with(MoveBiometricAutoPromptToAccount, 6, 7)\n    .with(MoveStateVersionMigrator, 7, 8)\n    .with(MoveBrowserSettingsToGlobal, 8, 9)\n    .with(EverHadUserKeyMigrator, 9, 10)\n    .with(OrganizationKeyMigrator, 10, 11)\n    .with(MoveEnvironmentStateToProviders, 11, 12)\n    .with(ProviderKeyMigrator, 12, 13)\n    .with(MoveBiometricClientKeyHalfToStateProviders, 13, 14)\n    .with(FolderMigrator, 14, 15)\n    .with(LastSyncMigrator, 15, 16)\n    .with(EnablePasskeysMigrator, 16, 17)\n    .with(AutofillSettingsKeyMigrator, 17, 18)\n    .with(RequirePasswordOnStartMigrator, 18, 19)\n    .with(PrivateKeyMigrator, 19, 20)\n    .with(CollectionMigrator, 20, 21)\n    .with(CollapsedGroupingsMigrator, 21, 22)\n    .with(MoveBiometricPromptsToStateProviders, 22, 23)\n    .with(SmOnboardingTasksMigrator, 23, 24)\n    .with(ClearClipboardDelayMigrator, 24, 25)\n    .with(RevertLastSyncMigrator, 25, 26)\n    .with(BadgeSettingsMigrator, 26, 27)\n    .with(MoveBiometricUnlockToStateProviders, 27, 28)\n    .with(UserNotificationSettingsKeyMigrator, 28, 29)\n    .with(PolicyMigrator, 29, 30)\n    .with(EnableContextMenuMigrator, 30, 31)\n    .with(PreferredLanguageMigrator, 31, 32)\n    .with(AppIdMigrator, 32, 33)\n    .with(DomainSettingsMigrator, 33, 34)\n    .with(MoveThemeToStateProviderMigrator, 34, 35)\n    .with(VaultSettingsKeyMigrator, 35, 36)\n    .with(AvatarColorMigrator, 36, 37)\n    .with(TokenServiceStateProviderMigrator, 37, 38)\n    .with(MoveBillingAccountProfileMigrator, 38, 39)\n    .with(OrganizationMigrator, 39, 40)\n    .with(EventCollectionMigrator, 40, 41)\n    .with(EnableFaviconMigrator, 41, 42)\n    .with(AutoConfirmFingerPrintsMigrator, 42, 43)\n    .with(UserDecryptionOptionsMigrator, 43, 44)\n    .with(MergeEnvironmentState, 44, 45)\n    .with(DeleteBiometricPromptCancelledData, 45, 46)\n    .with(MoveDesktopSettingsMigrator, 46, 47)\n    .with(MoveDdgToStateProviderMigrator, 47, 48)\n    .with(AccountServerConfigMigrator, 48, 49)\n    .with(KeyConnectorMigrator, 49, 50)\n    .with(RememberedEmailMigrator, 50, 51)\n    .with(DeleteInstalledVersion, 51, 52)\n    .with(DeviceTrustServiceStateProviderMigrator, 52, 53)\n    .with(SendMigrator, 53, 54)\n    .with(MoveMasterKeyStateToProviderMigrator, 54, 55)\n    .with(AuthRequestMigrator, 55, 56)\n    .with(CipherServiceMigrator, 56, 57)\n    .with(RemoveRefreshTokenMigratedFlagMigrator, 57, 58)\n    .with(KdfConfigMigrator, 58, 59)\n    .with(KnownAccountsMigrator, 59, 60)\n    .with(PinStateMigrator, 60, 61)\n    .with(VaultTimeoutSettingsServiceStateProviderMigrator, 61, 62)\n    .with(PasswordOptionsMigrator, 62, 63)\n    .with(GeneratorHistoryMigrator, 63, 64)\n    .with(ForwarderOptionsMigrator, 64, 65)\n    .with(MoveFinalDesktopSettingsMigrator, 65, 66)\n    .with(RemoveUnassignedItemsBannerDismissed, 66, 67)\n    .with(MoveLastSyncDate, 67, CURRENT_VERSION);\n}\n\nexport async function currentVersion(\n  storageService: AbstractStorageService,\n  logService: LogService,\n) {\n  let state = await storageService.get<number>(\"stateVersion\");\n  if (state == null) {\n    // Pre v8\n    state = (await storageService.get<{ stateVersion: number }>(\"global\"))?.stateVersion;\n  }\n  if (state == null) {\n    logService.info(\"No state version found, assuming empty state.\");\n    return -1;\n  }\n  logService.info(`State version: ${state}`);\n  return state;\n}\n\n/**\n * Waits for migrations to have a chance to run and will resolve the promise once they are.\n *\n * @param storageService Disk storage where the `stateVersion` will or is already saved in.\n * @param logService Log service\n */\nexport async function waitForMigrations(\n  storageService: AbstractStorageService,\n  logService: LogService,\n) {\n  const isReady = async () => {\n    const version = await currentVersion(storageService, logService);\n    // The saved version is what we consider the latest\n    // migrations should be complete, the state version\n    // shouldn't become larger than `CURRENT_VERSION` in\n    // any normal usage of the application but it is common\n    // enough in dev scenarios where we want to consider that\n    // ready as well and return true in that scenario.\n    return version >= CURRENT_VERSION;\n  };\n\n  const wait = async (time: number) => {\n    // Wait exponentially\n    const nextTime = time * 2;\n    if (nextTime > 8192) {\n      // Don't wait longer than ~8 seconds in a single wait,\n      // if the migrations still haven't happened. They aren't\n      // likely to.\n      return;\n    }\n    return new Promise<void>((resolve) => {\n      setTimeout(async () => {\n        if (!(await isReady())) {\n          logService.info(`Waiting for migrations to finish, waiting for ${nextTime}ms`);\n          await wait(nextTime);\n        }\n        resolve();\n      }, time);\n    });\n  };\n\n  if (!(await isReady())) {\n    // Wait for 2ms to start with\n    await wait(2);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { createMigrationBuilder } from \"../../state-migrations\";\nimport { MigrationBuilder } from \"../../state-migrations/migration-builder\";\n\nexport class MigrationBuilderService {\n  private migrationBuilderCache: MigrationBuilder;\n\n  build() {\n    return (this.migrationBuilderCache ??= createMigrationBuilder());\n  }\n}\n","// eslint-disable-next-line import/no-restricted-paths -- Needed to provide client type to migrations\nimport { ClientType } from \"../enums\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to print log messages\nimport { LogService } from \"../platform/abstractions/log.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Needed to interface with storage locations\nimport { AbstractStorageService } from \"../platform/abstractions/storage.service\";\n\nexport type StateDefinitionLike = { name: string };\nexport type KeyDefinitionLike = {\n  stateDefinition: StateDefinitionLike;\n  key: string;\n};\n\nexport type MigrationHelperType = \"general\" | \"web-disk-local\";\n\nexport class MigrationHelper {\n  constructor(\n    public currentVersion: number,\n    private storageService: AbstractStorageService,\n    public logService: LogService,\n    type: MigrationHelperType,\n    public clientType: ClientType,\n  ) {\n    this.type = type;\n  }\n\n  /**\n   * On some clients, migrations are ran multiple times without direct action from the migration writer.\n   *\n   * All clients will run through migrations at least once, this run is referred to as `\"general\"`. If a migration is\n   * ran more than that single time, they will get a unique name if that the write can make conditional logic based on which\n   * migration run this is.\n   *\n   * @remarks The preferrable way of writing migrations is ALWAYS to be defensive and reflect on the data you are given back. This\n   * should really only be used when reflecting on the data given isn't enough.\n   */\n  type: MigrationHelperType;\n\n  /**\n   * Gets a value from the storage service at the given key.\n   *\n   * This is a brute force method to just get a value from the storage service. If you can use {@link getFromGlobal} or {@link getFromUser}, you should.\n   * @param key location\n   * @returns the value at the location\n   */\n  get<T>(key: string): Promise<T> {\n    return this.storageService.get<T>(key);\n  }\n\n  /**\n   * Sets a value in the storage service at the given key.\n   *\n   * This is a brute force method to just set a value in the storage service. If you can use {@link setToGlobal} or {@link setToUser}, you should.\n   * @param key location\n   * @param value the value to set\n   * @returns\n   */\n  set<T>(key: string, value: T): Promise<void> {\n    this.logService.info(`Setting ${key}`);\n    return this.storageService.save(key, value);\n  }\n\n  /**\n   * Remove a value in the storage service at the given key.\n   *\n   * This is a brute force method to just remove a value in the storage service. If you can use {@link removeFromGlobal} or {@link removeFromUser}, you should.\n   * @param key location\n   * @returns void\n   */\n  remove(key: string): Promise<void> {\n    this.logService.info(`Removing ${key}`);\n    return this.storageService.remove(key);\n  }\n\n  /**\n   * Gets a globally scoped value from a location derived through the key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link get} for those.\n   * @param keyDefinition unique key definition\n   * @returns value from store\n   */\n  getFromGlobal<T>(keyDefinition: KeyDefinitionLike): Promise<T> {\n    return this.get<T>(this.getGlobalKey(keyDefinition));\n  }\n\n  /**\n   * Sets a globally scoped value to a location derived through the key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link set} for those.\n   * @param keyDefinition unique key definition\n   * @param value value to store\n   * @returns void\n   */\n  setToGlobal<T>(keyDefinition: KeyDefinitionLike, value: T): Promise<void> {\n    return this.set(this.getGlobalKey(keyDefinition), value);\n  }\n\n  /**\n   * Remove a globally scoped location derived through the key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link remove} for those.\n   * @param keyDefinition unique key definition\n   * @returns void\n   */\n  removeFromGlobal(keyDefinition: KeyDefinitionLike): Promise<void> {\n    return this.remove(this.getGlobalKey(keyDefinition));\n  }\n\n  /**\n   * Gets a user scoped value from a location derived through the user id and key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link get} for those.\n   * @param userId userId to use in the key\n   * @param keyDefinition unique key definition\n   * @returns value from store\n   */\n  getFromUser<T>(userId: string, keyDefinition: KeyDefinitionLike): Promise<T> {\n    return this.get<T>(this.getUserKey(userId, keyDefinition));\n  }\n\n  /**\n   * Sets a user scoped value to a location derived through the user id and key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link set} for those.\n   * @param userId userId to use in the key\n   * @param keyDefinition unique key definition\n   * @param value value to store\n   * @returns void\n   */\n  setToUser<T>(userId: string, keyDefinition: KeyDefinitionLike, value: T): Promise<void> {\n    return this.set(this.getUserKey(userId, keyDefinition), value);\n  }\n\n  /**\n   * Remove a user scoped location derived through the key definition\n   *\n   * This is for use with the state providers framework, DO NOT use for values stored with {@link StateService},\n   * use {@link remove} for those.\n   * @param keyDefinition unique key definition\n   * @returns void\n   */\n  removeFromUser(userId: string, keyDefinition: KeyDefinitionLike): Promise<void> {\n    return this.remove(this.getUserKey(userId, keyDefinition));\n  }\n\n  info(message: string): void {\n    this.logService.info(message);\n  }\n\n  /**\n   * Helper method to read all Account objects stored by the State Service.\n   *\n   * This is useful from creating migrations off of this paradigm, but should not be used once a value is migrated to a state provider.\n   *\n   * @returns a list of all accounts that have been authenticated with state service, cast the expected type.\n   */\n  async getAccounts<ExpectedAccountType>(): Promise<\n    { userId: string; account: ExpectedAccountType }[]\n  > {\n    const userIds = await this.getKnownUserIds();\n    return Promise.all(\n      userIds.map(async (userId) => ({\n        userId,\n        account: await this.get<ExpectedAccountType>(userId),\n      })),\n    );\n  }\n\n  /**\n   * Helper method to read known users ids.\n   */\n  async getKnownUserIds(): Promise<string[]> {\n    if (this.currentVersion < 60) {\n      return knownAccountUserIdsBuilderPre60(this.storageService);\n    } else {\n      return knownAccountUserIdsBuilder(this.storageService);\n    }\n  }\n\n  /**\n   * Builds a user storage key appropriate for the current version.\n   *\n   * @param userId userId to use in the key\n   * @param keyDefinition state and key to use in the key\n   * @returns\n   */\n  private getUserKey(userId: string, keyDefinition: KeyDefinitionLike): string {\n    if (this.currentVersion < 9) {\n      return userKeyBuilderPre9();\n    } else {\n      return userKeyBuilder(userId, keyDefinition);\n    }\n  }\n\n  /**\n   * Builds a global storage key appropriate for the current version.\n   *\n   * @param keyDefinition state and key to use in the key\n   * @returns\n   */\n  private getGlobalKey(keyDefinition: KeyDefinitionLike): string {\n    if (this.currentVersion < 9) {\n      return globalKeyBuilderPre9();\n    } else {\n      return globalKeyBuilder(keyDefinition);\n    }\n  }\n}\n\n/**\n * When this is updated, rename this function to `userKeyBuilderXToY` where `X` is the version number it\n * became relevant, and `Y` prior to the version it was updated.\n *\n * Be sure to update the map in `MigrationHelper` to point to the appropriate function for the current version.\n * @param userId The userId of the user you want the key to be for.\n * @param keyDefinition the key definition of which data the key should point to.\n * @returns\n */\nfunction userKeyBuilder(userId: string, keyDefinition: KeyDefinitionLike): string {\n  return `user_${userId}_${keyDefinition.stateDefinition.name}_${keyDefinition.key}`;\n}\n\nfunction userKeyBuilderPre9(): string {\n  throw Error(\"No key builder should be used for versions prior to 9.\");\n}\n\n/**\n * When this is updated, rename this function to `globalKeyBuilderXToY` where `X` is the version number\n * it became relevant, and `Y` prior to the version it was updated.\n *\n * Be sure to update the map in `MigrationHelper` to point to the appropriate function for the current version.\n * @param keyDefinition the key definition of which data the key should point to.\n * @returns\n */\nfunction globalKeyBuilder(keyDefinition: KeyDefinitionLike): string {\n  return `global_${keyDefinition.stateDefinition.name}_${keyDefinition.key}`;\n}\n\nfunction globalKeyBuilderPre9(): string {\n  throw Error(\"No key builder should be used for versions prior to 9.\");\n}\n\nasync function knownAccountUserIdsBuilderPre60(\n  storageService: AbstractStorageService,\n): Promise<string[]> {\n  return (await storageService.get<string[]>(\"authenticatedAccounts\")) ?? [];\n}\n\nasync function knownAccountUserIdsBuilder(\n  storageService: AbstractStorageService,\n): Promise<string[]> {\n  const accounts = await storageService.get<Record<string, unknown>>(\n    globalKeyBuilder({ stateDefinition: { name: \"account\" }, key: \"accounts\" }),\n  );\n  return Object.keys(accounts ?? {});\n}\n","import { ClientType } from \"../../enums\";\nimport { waitForMigrations } from \"../../state-migrations\";\nimport { CURRENT_VERSION, currentVersion } from \"../../state-migrations/migrate\";\nimport { MigrationHelper } from \"../../state-migrations/migration-helper\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { AbstractStorageService } from \"../abstractions/storage.service\";\n\nimport { MigrationBuilderService } from \"./migration-builder.service\";\n\nexport class MigrationRunner {\n  constructor(\n    protected diskStorage: AbstractStorageService,\n    protected logService: LogService,\n    protected migrationBuilderService: MigrationBuilderService,\n    private clientType: ClientType,\n  ) {}\n\n  async run(): Promise<void> {\n    const migrationHelper = new MigrationHelper(\n      await currentVersion(this.diskStorage, this.logService),\n      this.diskStorage,\n      this.logService,\n      \"general\",\n      this.clientType,\n    );\n\n    if (migrationHelper.currentVersion < 0) {\n      // Cannot determine state, assuming empty so we don't repeatedly apply a migration.\n      await this.diskStorage.save(\"stateVersion\", CURRENT_VERSION);\n      return;\n    }\n\n    const migrationBuilder = this.migrationBuilderService.build();\n\n    await migrationBuilder.migrate(migrationHelper);\n  }\n\n  async waitForCompletion(): Promise<void> {\n    await waitForMigrations(this.diskStorage, this.logService);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Account } from \"./account\";\nimport { GlobalState } from \"./global-state\";\n\nexport class State<\n  TGlobalState extends GlobalState = GlobalState,\n  TAccount extends Account = Account,\n> {\n  accounts: { [userId: string]: TAccount } = {};\n  globals: TGlobalState;\n\n  constructor(globals: TGlobalState) {\n    this.globals = globals;\n  }\n\n  // TODO, make Jsonify<State,TGlobalState,TAccount> work. It currently doesn't because Globals doesn't implement Jsonify.\n  static fromJSON<TGlobalState extends GlobalState, TAccount extends Account>(\n    obj: any,\n    accountDeserializer: (json: Jsonify<TAccount>) => TAccount,\n  ): State<TGlobalState, TAccount> {\n    if (obj == null) {\n      return null;\n    }\n\n    return Object.assign(new State(null), obj, {\n      accounts: State.buildAccountMapFromJSON(obj?.accounts, accountDeserializer),\n    });\n  }\n\n  private static buildAccountMapFromJSON<TAccount extends Account>(\n    jsonAccounts: { [userId: string]: Jsonify<TAccount> },\n    accountDeserializer: (json: Jsonify<TAccount>) => TAccount,\n  ) {\n    if (!jsonAccounts) {\n      return {};\n    }\n    const accounts: { [userId: string]: TAccount } = {};\n    for (const userId in jsonAccounts) {\n      accounts[userId] = accountDeserializer(jsonAccounts[userId]);\n    }\n    return accounts;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\nimport { Jsonify, JsonValue } from \"type-fest\";\n\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { BiometricKey } from \"../../auth/types/biometric-key\";\nimport { UserId } from \"../../types/guid\";\nimport { EnvironmentService } from \"../abstractions/environment.service\";\nimport { LogService } from \"../abstractions/log.service\";\nimport {\n  InitOptions,\n  StateService as StateServiceAbstraction,\n} from \"../abstractions/state.service\";\nimport { AbstractStorageService } from \"../abstractions/storage.service\";\nimport { HtmlStorageLocation, StorageLocation } from \"../enums\";\nimport { StateFactory } from \"../factories/state-factory\";\nimport { Account } from \"../models/domain/account\";\nimport { GlobalState } from \"../models/domain/global-state\";\nimport { State } from \"../models/domain/state\";\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\nimport { MigrationRunner } from \"./migration-runner\";\n\nconst keys = {\n  state: \"state\",\n  stateVersion: \"stateVersion\",\n  global: \"global\",\n  tempAccountSettings: \"tempAccountSettings\", // used to hold account specific settings (i.e clear clipboard) between initial migration and first account authentication\n};\n\nconst partialKeys = {\n  userAutoKey: \"_user_auto\",\n  userBiometricKey: \"_user_biometric\",\n\n  autoKey: \"_masterkey_auto\",\n  masterKey: \"_masterkey\",\n};\n\nconst DDG_SHARED_KEY = \"DuckDuckGoSharedKey\";\n\nexport class StateService<\n  TGlobalState extends GlobalState = GlobalState,\n  TAccount extends Account = Account,\n> implements StateServiceAbstraction<TAccount>\n{\n  private hasBeenInited = false;\n  protected isRecoveredSession = false;\n\n  // default account serializer, must be overridden by child class\n  protected accountDeserializer = Account.fromJSON as (json: Jsonify<TAccount>) => TAccount;\n\n  constructor(\n    protected storageService: AbstractStorageService,\n    protected secureStorageService: AbstractStorageService,\n    protected memoryStorageService: AbstractStorageService,\n    protected logService: LogService,\n    protected stateFactory: StateFactory<TGlobalState, TAccount>,\n    protected accountService: AccountService,\n    protected environmentService: EnvironmentService,\n    protected tokenService: TokenService,\n    private migrationRunner: MigrationRunner,\n  ) {}\n\n  async init(initOptions: InitOptions = {}): Promise<void> {\n    // Deconstruct and apply defaults\n    const { runMigrations = true } = initOptions;\n    if (this.hasBeenInited) {\n      return;\n    }\n\n    if (runMigrations) {\n      await this.migrationRunner.run();\n    } else {\n      // It may have been requested to not run the migrations but we should defensively not\n      // continue this method until migrations have a chance to be completed elsewhere.\n      await this.migrationRunner.waitForCompletion();\n    }\n\n    await this.state().then(async (state) => {\n      if (state == null) {\n        await this.setState(new State<TGlobalState, TAccount>(this.createGlobals()));\n      } else {\n        this.isRecoveredSession = true;\n      }\n    });\n    await this.initAccountState();\n\n    this.hasBeenInited = true;\n  }\n\n  async initAccountState() {\n    if (this.isRecoveredSession) {\n      return;\n    }\n\n    // Get all likely authenticated accounts\n    const authenticatedAccounts = await firstValueFrom(\n      this.accountService.accounts$.pipe(map((accounts) => Object.keys(accounts))),\n    );\n\n    await this.updateState(async (state) => {\n      for (const i in authenticatedAccounts) {\n        state = await this.syncAccountFromDisk(authenticatedAccounts[i]);\n      }\n\n      return state;\n    });\n  }\n\n  async syncAccountFromDisk(userId: string): Promise<State<TGlobalState, TAccount>> {\n    if (userId == null) {\n      return;\n    }\n    const diskAccount = await this.getAccountFromDisk({ userId: userId });\n    const state = await this.updateState(async (state) => {\n      if (state.accounts == null) {\n        state.accounts = {};\n      }\n      state.accounts[userId] = this.createAccount();\n\n      if (diskAccount == null) {\n        // Return early because we can't set the diskAccount.profile\n        // if diskAccount itself is null\n        return state;\n      }\n\n      state.accounts[userId].profile = diskAccount.profile;\n      return state;\n    });\n\n    return state;\n  }\n\n  async addAccount(account: TAccount) {\n    await this.environmentService.seedUserEnvironment(account.profile.userId as UserId);\n    await this.updateState(async (state) => {\n      state.accounts[account.profile.userId] = account;\n      return state;\n    });\n    await this.scaffoldNewAccountStorage(account);\n  }\n\n  async clean(options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(options, await this.defaultInMemoryOptions());\n    await this.deAuthenticateAccount(options.userId);\n\n    await this.removeAccountFromDisk(options?.userId);\n    await this.removeAccountFromMemory(options?.userId);\n  }\n\n  /**\n   * user key when using the \"never\" option of vault timeout\n   */\n  async getUserKeyAutoUnlock(options?: StorageOptions): Promise<string> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"auto\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return null;\n    }\n    return await this.secureStorageService.get<string>(\n      `${options.userId}${partialKeys.userAutoKey}`,\n      options,\n    );\n  }\n\n  /**\n   * user key when using the \"never\" option of vault timeout\n   */\n  async setUserKeyAutoUnlock(value: string, options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"auto\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return;\n    }\n    await this.saveSecureStorageKey(partialKeys.userAutoKey, value, options);\n  }\n\n  /**\n   * User's encrypted symmetric key when using biometrics\n   */\n  async getUserKeyBiometric(options?: StorageOptions): Promise<string> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return null;\n    }\n    return await this.secureStorageService.get<string>(\n      `${options.userId}${partialKeys.userBiometricKey}`,\n      options,\n    );\n  }\n\n  async hasUserKeyBiometric(options?: StorageOptions): Promise<boolean> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return false;\n    }\n    return await this.secureStorageService.has(\n      `${options.userId}${partialKeys.userBiometricKey}`,\n      options,\n    );\n  }\n\n  async setUserKeyBiometric(value: BiometricKey, options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"biometric\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return;\n    }\n    await this.saveSecureStorageKey(partialKeys.userBiometricKey, value, options);\n  }\n\n  /**\n   * @deprecated Use UserKeyAuto instead\n   */\n  async setCryptoMasterKeyAuto(value: string, options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(\n      this.reconcileOptions(options, { keySuffix: \"auto\" }),\n      await this.defaultSecureStorageOptions(),\n    );\n    if (options?.userId == null) {\n      return;\n    }\n    await this.saveSecureStorageKey(partialKeys.autoKey, value, options);\n  }\n\n  /**\n   * @deprecated I don't see where this is even used\n   */\n  async getCryptoMasterKeyB64(options?: StorageOptions): Promise<string> {\n    options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n    if (options?.userId == null) {\n      return null;\n    }\n    return await this.secureStorageService.get<string>(\n      `${options?.userId}${partialKeys.masterKey}`,\n      options,\n    );\n  }\n\n  /**\n   * @deprecated I don't see where this is even used\n   */\n  async setCryptoMasterKeyB64(value: string, options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n    if (options?.userId == null) {\n      return;\n    }\n    await this.saveSecureStorageKey(partialKeys.masterKey, value, options);\n  }\n\n  async getDuckDuckGoSharedKey(options?: StorageOptions): Promise<string> {\n    options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n    if (options?.userId == null) {\n      return null;\n    }\n    return await this.secureStorageService.get<string>(DDG_SHARED_KEY, options);\n  }\n\n  async setDuckDuckGoSharedKey(value: string, options?: StorageOptions): Promise<void> {\n    options = this.reconcileOptions(options, await this.defaultSecureStorageOptions());\n    if (options?.userId == null) {\n      return;\n    }\n    value == null\n      ? await this.secureStorageService.remove(DDG_SHARED_KEY, options)\n      : await this.secureStorageService.save(DDG_SHARED_KEY, value, options);\n  }\n\n  async setEnableDuckDuckGoBrowserIntegration(\n    value: boolean,\n    options?: StorageOptions,\n  ): Promise<void> {\n    const globals = await this.getGlobals(\n      this.reconcileOptions(options, await this.defaultOnDiskOptions()),\n    );\n    globals.enableDuckDuckGoBrowserIntegration = value;\n    await this.saveGlobals(\n      globals,\n      this.reconcileOptions(options, await this.defaultOnDiskOptions()),\n    );\n  }\n\n  /**\n   * @deprecated Use UserKey instead\n   */\n  async getEncryptedCryptoSymmetricKey(options?: StorageOptions): Promise<string> {\n    return (\n      await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))\n    )?.keys.cryptoSymmetricKey.encrypted;\n  }\n\n  async getIsAuthenticated(options?: StorageOptions): Promise<boolean> {\n    return (\n      (await this.tokenService.getAccessToken(options?.userId as UserId)) != null &&\n      (await this.getUserId(options)) != null\n    );\n  }\n\n  async getUserId(options?: StorageOptions): Promise<string> {\n    return (\n      await this.getAccount(this.reconcileOptions(options, await this.defaultOnDiskOptions()))\n    )?.profile?.userId;\n  }\n\n  protected async getGlobals(options: StorageOptions): Promise<TGlobalState> {\n    let globals: TGlobalState;\n    if (this.useMemory(options.storageLocation)) {\n      globals = await this.getGlobalsFromMemory();\n    }\n\n    if (this.useDisk && globals == null) {\n      globals = await this.getGlobalsFromDisk(options);\n    }\n\n    if (globals == null) {\n      globals = this.createGlobals();\n    }\n\n    return globals;\n  }\n\n  protected async saveGlobals(globals: TGlobalState, options: StorageOptions) {\n    return this.useMemory(options.storageLocation)\n      ? this.saveGlobalsToMemory(globals)\n      : await this.saveGlobalsToDisk(globals, options);\n  }\n\n  protected async getGlobalsFromMemory(): Promise<TGlobalState> {\n    return (await this.state()).globals;\n  }\n\n  protected async getGlobalsFromDisk(options: StorageOptions): Promise<TGlobalState> {\n    return await this.storageService.get<TGlobalState>(keys.global, options);\n  }\n\n  protected async saveGlobalsToMemory(globals: TGlobalState): Promise<void> {\n    await this.updateState(async (state) => {\n      state.globals = globals;\n      return state;\n    });\n  }\n\n  protected async saveGlobalsToDisk(globals: TGlobalState, options: StorageOptions): Promise<void> {\n    if (options.useSecureStorage) {\n      await this.secureStorageService.save(keys.global, globals, options);\n    } else {\n      await this.storageService.save(keys.global, globals, options);\n    }\n  }\n\n  protected async getAccount(options: StorageOptions): Promise<TAccount> {\n    try {\n      let account: TAccount;\n      if (this.useMemory(options.storageLocation)) {\n        account = await this.getAccountFromMemory(options);\n      }\n\n      if (this.useDisk(options.storageLocation) && account == null) {\n        account = await this.getAccountFromDisk(options);\n      }\n\n      return account;\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  protected async getAccountFromMemory(options: StorageOptions): Promise<TAccount> {\n    const userId =\n      options.userId ??\n      (await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n      ));\n\n    return await this.state().then(async (state) => {\n      if (state.accounts == null) {\n        return null;\n      }\n      return state.accounts[userId];\n    });\n  }\n\n  protected async getAccountFromDisk(options: StorageOptions): Promise<TAccount> {\n    const userId =\n      options.userId ??\n      (await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n      ));\n\n    if (userId == null) {\n      return null;\n    }\n\n    const account = options?.useSecureStorage\n      ? ((await this.secureStorageService.get<TAccount>(options.userId, options)) ??\n        (await this.storageService.get<TAccount>(\n          options.userId,\n          this.reconcileOptions(options, { htmlStorageLocation: HtmlStorageLocation.Local }),\n        )))\n      : await this.storageService.get<TAccount>(options.userId, options);\n    return account;\n  }\n\n  protected useMemory(storageLocation: StorageLocation) {\n    return storageLocation === StorageLocation.Memory || storageLocation === StorageLocation.Both;\n  }\n\n  protected useDisk(storageLocation: StorageLocation) {\n    return storageLocation === StorageLocation.Disk || storageLocation === StorageLocation.Both;\n  }\n\n  protected async saveAccount(\n    account: TAccount,\n    options: StorageOptions = {\n      storageLocation: StorageLocation.Both,\n      useSecureStorage: false,\n    },\n  ) {\n    return this.useMemory(options.storageLocation)\n      ? await this.saveAccountToMemory(account)\n      : await this.saveAccountToDisk(account, options);\n  }\n\n  protected async saveAccountToDisk(account: TAccount, options: StorageOptions): Promise<void> {\n    const storageLocation = options.useSecureStorage\n      ? this.secureStorageService\n      : this.storageService;\n\n    await storageLocation.save(`${options.userId}`, account, options);\n  }\n\n  protected async saveAccountToMemory(account: TAccount): Promise<void> {\n    if ((await this.getAccountFromMemory({ userId: account.profile.userId })) !== null) {\n      await this.updateState((state) => {\n        return new Promise((resolve) => {\n          state.accounts[account.profile.userId] = account;\n          resolve(state);\n        });\n      });\n    }\n  }\n\n  protected async scaffoldNewAccountStorage(account: TAccount): Promise<void> {\n    // We don't want to manipulate the referenced in memory account\n    const deepClone = JSON.parse(JSON.stringify(account));\n    await this.scaffoldNewAccountLocalStorage(deepClone);\n    await this.scaffoldNewAccountSessionStorage(deepClone);\n    await this.scaffoldNewAccountMemoryStorage(deepClone);\n  }\n\n  // TODO: There is a tech debt item for splitting up these methods - only Web uses multiple storage locations in its storageService.\n  // For now these methods exist with some redundancy to facilitate this special web requirement.\n  protected async scaffoldNewAccountLocalStorage(account: TAccount): Promise<void> {\n    await this.saveAccount(\n      account,\n      this.reconcileOptions(\n        { userId: account.profile.userId },\n        await this.defaultOnDiskLocalOptions(),\n      ),\n    );\n  }\n\n  protected async scaffoldNewAccountMemoryStorage(account: TAccount): Promise<void> {\n    await this.storageService.save(\n      account.profile.userId,\n      account,\n      await this.defaultOnDiskMemoryOptions(),\n    );\n    await this.saveAccount(\n      account,\n      this.reconcileOptions(\n        { userId: account.profile.userId },\n        await this.defaultOnDiskMemoryOptions(),\n      ),\n    );\n  }\n\n  protected async scaffoldNewAccountSessionStorage(account: TAccount): Promise<void> {\n    await this.storageService.save(\n      account.profile.userId,\n      account,\n      await this.defaultOnDiskMemoryOptions(),\n    );\n    await this.saveAccount(\n      account,\n      this.reconcileOptions({ userId: account.profile.userId }, await this.defaultOnDiskOptions()),\n    );\n  }\n\n  protected reconcileOptions(\n    requestedOptions: StorageOptions,\n    defaultOptions: StorageOptions,\n  ): StorageOptions {\n    if (requestedOptions == null) {\n      return defaultOptions;\n    }\n    requestedOptions.userId = requestedOptions?.userId ?? defaultOptions.userId;\n    requestedOptions.storageLocation =\n      requestedOptions?.storageLocation ?? defaultOptions.storageLocation;\n    requestedOptions.useSecureStorage =\n      requestedOptions?.useSecureStorage ?? defaultOptions.useSecureStorage;\n    requestedOptions.htmlStorageLocation =\n      requestedOptions?.htmlStorageLocation ?? defaultOptions.htmlStorageLocation;\n    requestedOptions.keySuffix = requestedOptions?.keySuffix ?? defaultOptions.keySuffix;\n    return requestedOptions;\n  }\n\n  protected async defaultInMemoryOptions(): Promise<StorageOptions> {\n    const userId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    return {\n      storageLocation: StorageLocation.Memory,\n      userId,\n    };\n  }\n\n  protected async defaultOnDiskOptions(): Promise<StorageOptions> {\n    const userId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    return {\n      storageLocation: StorageLocation.Disk,\n      htmlStorageLocation: HtmlStorageLocation.Session,\n      userId,\n      useSecureStorage: false,\n    };\n  }\n\n  protected async defaultOnDiskLocalOptions(): Promise<StorageOptions> {\n    const userId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    return {\n      storageLocation: StorageLocation.Disk,\n      htmlStorageLocation: HtmlStorageLocation.Local,\n      userId,\n      useSecureStorage: false,\n    };\n  }\n\n  protected async defaultOnDiskMemoryOptions(): Promise<StorageOptions> {\n    const userId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    return {\n      storageLocation: StorageLocation.Disk,\n      htmlStorageLocation: HtmlStorageLocation.Memory,\n      userId,\n      useSecureStorage: false,\n    };\n  }\n\n  protected async defaultSecureStorageOptions(): Promise<StorageOptions> {\n    const userId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    return {\n      storageLocation: StorageLocation.Disk,\n      useSecureStorage: true,\n      userId,\n    };\n  }\n\n  protected async getActiveUserIdFromStorage(): Promise<string> {\n    return await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n  }\n\n  protected async removeAccountFromLocalStorage(userId: string = null): Promise<void> {\n    userId ??= await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    const storedAccount = await this.getAccount(\n      this.reconcileOptions({ userId: userId }, await this.defaultOnDiskLocalOptions()),\n    );\n    await this.saveAccount(\n      this.resetAccount(storedAccount),\n      this.reconcileOptions({ userId: userId }, await this.defaultOnDiskLocalOptions()),\n    );\n  }\n\n  protected async removeAccountFromSessionStorage(userId: string = null): Promise<void> {\n    userId ??= await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    const storedAccount = await this.getAccount(\n      this.reconcileOptions({ userId: userId }, await this.defaultOnDiskOptions()),\n    );\n    await this.saveAccount(\n      this.resetAccount(storedAccount),\n      this.reconcileOptions({ userId: userId }, await this.defaultOnDiskOptions()),\n    );\n  }\n\n  protected async removeAccountFromSecureStorage(userId: string = null): Promise<void> {\n    userId ??= await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    await this.setUserKeyAutoUnlock(null, { userId: userId });\n    await this.setUserKeyBiometric(null, { userId: userId });\n    await this.setCryptoMasterKeyAuto(null, { userId: userId });\n    await this.setCryptoMasterKeyB64(null, { userId: userId });\n  }\n\n  protected async removeAccountFromMemory(userId: string = null): Promise<void> {\n    userId ??= await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((account) => account?.id)),\n    );\n\n    await this.updateState(async (state) => {\n      delete state.accounts[userId];\n      return state;\n    });\n  }\n\n  // settings persist even on reset, and are not affected by this method\n  protected resetAccount(account: TAccount) {\n    // All settings have been moved to StateProviders\n    return this.createAccount();\n  }\n\n  protected createAccount(init: Partial<TAccount> = null): TAccount {\n    return this.stateFactory.createAccount(init);\n  }\n\n  protected createGlobals(init: Partial<TGlobalState> = null): TGlobalState {\n    return this.stateFactory.createGlobal(init);\n  }\n\n  protected async deAuthenticateAccount(userId: string): Promise<void> {\n    // We must have a manual call to clear tokens as we can't leverage state provider to clean\n    // up our data as we have secure storage in the mix.\n    await this.tokenService.clearTokens(userId as UserId);\n  }\n\n  protected async removeAccountFromDisk(userId: string) {\n    await this.removeAccountFromSessionStorage(userId);\n    await this.removeAccountFromLocalStorage(userId);\n    await this.removeAccountFromSecureStorage(userId);\n  }\n\n  protected async saveSecureStorageKey<T extends JsonValue>(\n    key: string,\n    value: T,\n    options?: StorageOptions,\n  ) {\n    return value == null\n      ? await this.secureStorageService.remove(`${options.userId}${key}`, options)\n      : await this.secureStorageService.save(`${options.userId}${key}`, value, options);\n  }\n\n  protected async state(): Promise<State<TGlobalState, TAccount>> {\n    let state = await this.memoryStorageService.get<State<TGlobalState, TAccount>>(keys.state);\n    if (this.memoryStorageService.valuesRequireDeserialization) {\n      state = State.fromJSON(state, this.accountDeserializer);\n    }\n    return state;\n  }\n\n  private async setState(\n    state: State<TGlobalState, TAccount>,\n  ): Promise<State<TGlobalState, TAccount>> {\n    await this.memoryStorageService.save(keys.state, state);\n    return state;\n  }\n\n  protected async updateState(\n    stateUpdater: (state: State<TGlobalState, TAccount>) => Promise<State<TGlobalState, TAccount>>,\n  ): Promise<State<TGlobalState, TAccount>> {\n    return await this.state().then(async (state) => {\n      const updatedState = await stateUpdater(state);\n      if (updatedState == null) {\n        throw new Error(\"Attempted to update state to null value\");\n      }\n\n      return await this.setState(updatedState);\n    });\n  }\n}\n","import { AbstractStorageService, ObservableStorageService } from \"../abstractions/storage.service\";\n// eslint-disable-next-line import/no-restricted-paths\nimport { ClientLocations, StorageLocation } from \"../state/state-definition\";\n\nexport type PossibleLocation = StorageLocation | ClientLocations[keyof ClientLocations];\n\n/**\n * A provider for getting client specific computed storage locations and services.\n */\nexport class StorageServiceProvider {\n  constructor(\n    protected readonly diskStorageService: AbstractStorageService & ObservableStorageService,\n    protected readonly memoryStorageService: AbstractStorageService & ObservableStorageService,\n  ) {}\n\n  /**\n   * Computes the location and corresponding service for a given client.\n   *\n   * **NOTE** The default implementation does not respect client overrides and if clients\n   * have special overrides they are responsible for implementing this service.\n   * @param defaultLocation The default location to use if no client specific override is preferred.\n   * @param overrides Client specific overrides\n   * @returns The computed storage location and corresponding storage service to use to get/store state.\n   * @throws If there is no configured storage service for the given inputs.\n   */\n  get(\n    defaultLocation: PossibleLocation,\n    overrides: Partial<ClientLocations>,\n  ): [location: PossibleLocation, service: AbstractStorageService & ObservableStorageService] {\n    switch (defaultLocation) {\n      case \"disk\":\n        return [defaultLocation, this.diskStorageService];\n      case \"memory\":\n        return [defaultLocation, this.memoryStorageService];\n      default:\n        throw new Error(`Unexpected location: ${defaultLocation}`);\n    }\n  }\n}\n","// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { UserId } from \"../../types/guid\";\nimport { KeySuffixOptions } from \"../enums\";\n\n// TODO: this is a half measure improvement which allows us to reduce some side effects today (keyService.getUserKey setting user key in memory if auto key exists)\n// but ideally, in the future, we would be able to put this logic into the keyService\n// after the vault timeout settings service is transitioned to state provider so that\n// the getUserKey logic can simply go to the correct location based on the vault timeout settings\n// similar to the TokenService (it would either go to secure storage for the auto user key or memory for the user key)\n\nexport class UserAutoUnlockKeyService {\n  constructor(private keyService: KeyService) {}\n\n  /**\n   * The presence of the user key in memory dictates whether the user's vault is locked or unlocked.\n   * However, for users that have the auto unlock user key set, we need to set the user key in memory\n   * on application bootstrap and on active account changes so that the user's vault loads unlocked.\n   * @param userId - The user id to check for an auto user key.\n   * @returns True if the auto user key is set successfully, false otherwise.\n   */\n  async setUserKeyInMemoryIfAutoUserKeySet(userId: UserId): Promise<boolean> {\n    if (userId == null) {\n      return false;\n    }\n\n    const autoUserKey = await this.keyService.getUserKeyFromStorage(KeySuffixOptions.Auto, userId);\n\n    if (autoUserKey == null) {\n      return false;\n    }\n\n    await this.keyService.setUserKey(autoUserKey, userId);\n    return true;\n  }\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nimport { StateUpdateOptions } from \"./state-update-options\";\n\nexport type CombinedState<T> = readonly [userId: UserId, state: T];\n\n/** A helper object for interacting with state that is scoped to a specific user. */\nexport interface UserState<T> {\n  /** Emits a stream of data. Emits null if the user does not have specified state. */\n  readonly state$: Observable<T | null>;\n\n  /** Emits a stream of tuples, with the first element being a user id and the second element being the data for that user. */\n  readonly combinedState$: Observable<CombinedState<T>>;\n}\n\nexport const activeMarker: unique symbol = Symbol(\"active\");\nexport interface ActiveUserState<T> extends UserState<T> {\n  readonly [activeMarker]: true;\n\n  /**\n   * Emits a stream of data. Emits null if the user does not have specified state.\n   * Note: Will not emit if there is no active user.\n   */\n  readonly state$: Observable<T | null>;\n\n  /**\n   * Updates backing stores for the active user.\n   * @param configureState function that takes the current state and returns the new state\n   * @param options Defaults to @see {module:state-update-options#DEFAULT_OPTIONS}\n   * @param options.shouldUpdate A callback for determining if you want to update state. Defaults to () => true\n   * @param options.combineLatestWith An observable that you want to combine with the current state for callbacks. Defaults to null\n   * @param options.msTimeout A timeout for how long you are willing to wait for a `combineLatestWith` option to complete. Defaults to 1000ms. Only applies if `combineLatestWith` is set.\n\n   * @returns A promise that must be awaited before your next action to ensure the update has been written to state.\n   * Resolves to the new state. If `shouldUpdate` returns false, the promise will resolve to the current state.\n   */\n  readonly update: <TCombine>(\n    configureState: (state: T, dependencies: TCombine) => T,\n    options?: StateUpdateOptions<T, TCombine>,\n  ) => Promise<[UserId, T]>;\n}\nexport interface SingleUserState<T> extends UserState<T> {\n  readonly userId: UserId;\n\n  /**\n   * Updates backing stores for the active user.\n   * @param configureState function that takes the current state and returns the new state\n   * @param options Defaults to @see {module:state-update-options#DEFAULT_OPTIONS}\n   * @param options.shouldUpdate A callback for determining if you want to update state. Defaults to () => true\n   * @param options.combineLatestWith An observable that you want to combine with the current state for callbacks. Defaults to null\n   * @param options.msTimeout A timeout for how long you are willing to wait for a `combineLatestWith` option to complete. Defaults to 1000ms. Only applies if `combineLatestWith` is set.\n\n   * @returns A promise that must be awaited before your next action to ensure the update has been written to state.\n   * Resolves to the new state. If `shouldUpdate` returns false, the promise will resolve to the current state.\n   */\n  readonly update: <TCombine>(\n    configureState: (state: T, dependencies: TCombine) => T,\n    options?: StateUpdateOptions<T, TCombine>,\n  ) => Promise<T>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, map, switchMap, firstValueFrom, timeout, throwError, NEVER } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { StateUpdateOptions } from \"../state-update-options\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserState, CombinedState, activeMarker } from \"../user-state\";\nimport { SingleUserStateProvider } from \"../user-state.provider\";\n\nexport class DefaultActiveUserState<T> implements ActiveUserState<T> {\n  [activeMarker]: true;\n  combinedState$: Observable<CombinedState<T>>;\n  state$: Observable<T>;\n\n  constructor(\n    protected keyDefinition: UserKeyDefinition<T>,\n    private activeUserId$: Observable<UserId | null>,\n    private singleUserStateProvider: SingleUserStateProvider,\n  ) {\n    this.combinedState$ = this.activeUserId$.pipe(\n      switchMap((userId) =>\n        userId != null\n          ? this.singleUserStateProvider.get(userId, this.keyDefinition).combinedState$\n          : NEVER,\n      ),\n    );\n\n    // State should just be combined state without the user id\n    this.state$ = this.combinedState$.pipe(map(([_userId, state]) => state));\n  }\n\n  async update<TCombine>(\n    configureState: (state: T, dependency: TCombine) => T,\n    options: StateUpdateOptions<T, TCombine> = {},\n  ): Promise<[UserId, T]> {\n    const userId = await firstValueFrom(\n      this.activeUserId$.pipe(\n        timeout({\n          first: 1000,\n          with: () =>\n            throwError(\n              () =>\n                new Error(\n                  `Timeout while retrieving active user for key ${this.keyDefinition.fullName}.`,\n                ),\n            ),\n        }),\n      ),\n    );\n    if (userId == null) {\n      throw new Error(\n        `Error storing ${this.keyDefinition.fullName} for the active user: No active user at this time.`,\n      );\n    }\n\n    return [\n      userId,\n      await this.singleUserStateProvider\n        .get(userId, this.keyDefinition)\n        .update(configureState, options),\n    ];\n  }\n}\n","import { Observable, ReplaySubject, Subject, concatMap, merge, share, timer } from \"rxjs\";\n\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\n\n/**\n * Default derived state\n */\nexport class DefaultDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>\n  implements DerivedState<TTo>\n{\n  private readonly storageKey: string;\n  private forcedValueSubject = new Subject<TTo>();\n\n  state$: Observable<TTo>;\n\n  constructor(\n    private parentState$: Observable<TFrom>,\n    protected deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,\n    private dependencies: TDeps,\n  ) {\n    this.storageKey = deriveDefinition.storageKey;\n\n    const derivedState$ = this.parentState$.pipe(\n      concatMap(async (state) => {\n        let derivedStateOrPromise = this.deriveDefinition.derive(state, this.dependencies);\n        if (derivedStateOrPromise instanceof Promise) {\n          derivedStateOrPromise = await derivedStateOrPromise;\n        }\n        const derivedState = derivedStateOrPromise;\n        return derivedState;\n      }),\n    );\n\n    this.state$ = merge(this.forcedValueSubject, derivedState$).pipe(\n      share({\n        connector: () => {\n          return new ReplaySubject<TTo>(1);\n        },\n        resetOnRefCountZero: () => timer(this.deriveDefinition.cleanupDelayMs),\n      }),\n    );\n  }\n\n  async forceValue(value: TTo) {\n    this.forcedValueSubject.next(value);\n    return value;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nexport const DEFAULT_OPTIONS = {\n  shouldUpdate: () => true,\n  combineLatestWith: null as Observable<unknown>,\n  msTimeout: 1000,\n};\n\ntype DefinitelyTypedDefault<T, TCombine> = Omit<\n  typeof DEFAULT_OPTIONS,\n  \"shouldUpdate\" | \"combineLatestWith\"\n> & {\n  shouldUpdate: (state: T, dependency: TCombine) => boolean;\n  combineLatestWith?: Observable<TCombine>;\n};\n\nexport type StateUpdateOptions<T, TCombine> = Partial<DefinitelyTypedDefault<T, TCombine>>;\n\nexport function populateOptionsWithDefault<T, TCombine>(\n  options: StateUpdateOptions<T, TCombine>,\n): StateUpdateOptions<T, TCombine> {\n  return {\n    ...(DEFAULT_OPTIONS as StateUpdateOptions<T, TCombine>),\n    ...options,\n  };\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { AbstractStorageService } from \"../../abstractions/storage.service\";\n\nexport async function getStoredValue<T>(\n  key: string,\n  storage: AbstractStorageService,\n  deserializer: (jsonValue: Jsonify<T>) => T,\n) {\n  if (storage.valuesRequireDeserialization) {\n    const jsonValue = await storage.get<Jsonify<T>>(key);\n    const value = deserializer(jsonValue);\n    return value;\n  } else {\n    const value = await storage.get<T>(key);\n    return value ?? null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Observable,\n  ReplaySubject,\n  defer,\n  filter,\n  firstValueFrom,\n  merge,\n  share,\n  switchMap,\n  tap,\n  timeout,\n  timer,\n} from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { StorageKey } from \"../../../types/state\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { DebugOptions } from \"../key-definition\";\nimport { StateUpdateOptions, populateOptionsWithDefault } from \"../state-update-options\";\n\nimport { getStoredValue } from \"./util\";\n\n// The parts of a KeyDefinition this class cares about to make it work\ntype KeyDefinitionRequirements<T> = {\n  deserializer: (jsonState: Jsonify<T>) => T;\n  cleanupDelayMs: number;\n  debug: Required<DebugOptions>;\n};\n\nexport abstract class StateBase<T, KeyDef extends KeyDefinitionRequirements<T>> {\n  private updatePromise: Promise<T>;\n\n  readonly state$: Observable<T>;\n\n  constructor(\n    protected readonly key: StorageKey,\n    protected readonly storageService: AbstractStorageService & ObservableStorageService,\n    protected readonly keyDefinition: KeyDef,\n    protected readonly logService: LogService,\n  ) {\n    const storageUpdate$ = storageService.updates$.pipe(\n      filter((storageUpdate) => storageUpdate.key === key),\n      switchMap(async (storageUpdate) => {\n        if (storageUpdate.updateType === \"remove\") {\n          return null;\n        }\n\n        return await getStoredValue(key, storageService, keyDefinition.deserializer);\n      }),\n    );\n\n    let state$ = merge(\n      defer(() => getStoredValue(key, storageService, keyDefinition.deserializer)),\n      storageUpdate$,\n    );\n\n    if (keyDefinition.debug.enableRetrievalLogging) {\n      state$ = state$.pipe(\n        tap({\n          next: (v) => {\n            this.logService.info(\n              `Retrieving '${key}' from storage, value is ${v == null ? \"null\" : \"non-null\"}`,\n            );\n          },\n        }),\n      );\n    }\n\n    // If 0 cleanup is chosen, treat this as absolutely no cache\n    if (keyDefinition.cleanupDelayMs !== 0) {\n      state$ = state$.pipe(\n        share({\n          connector: () => new ReplaySubject(1),\n          resetOnRefCountZero: () => timer(keyDefinition.cleanupDelayMs),\n        }),\n      );\n    }\n\n    this.state$ = state$;\n  }\n\n  async update<TCombine>(\n    configureState: (state: T, dependency: TCombine) => T,\n    options: StateUpdateOptions<T, TCombine> = {},\n  ): Promise<T> {\n    options = populateOptionsWithDefault(options);\n    if (this.updatePromise != null) {\n      await this.updatePromise;\n    }\n\n    try {\n      this.updatePromise = this.internalUpdate(configureState, options);\n      const newState = await this.updatePromise;\n      return newState;\n    } finally {\n      this.updatePromise = null;\n    }\n  }\n\n  private async internalUpdate<TCombine>(\n    configureState: (state: T, dependency: TCombine) => T,\n    options: StateUpdateOptions<T, TCombine>,\n  ): Promise<T> {\n    const currentState = await this.getStateForUpdate();\n    const combinedDependencies =\n      options.combineLatestWith != null\n        ? await firstValueFrom(options.combineLatestWith.pipe(timeout(options.msTimeout)))\n        : null;\n\n    if (!options.shouldUpdate(currentState, combinedDependencies)) {\n      return currentState;\n    }\n\n    const newState = configureState(currentState, combinedDependencies);\n    await this.doStorageSave(newState, currentState);\n    return newState;\n  }\n\n  protected async doStorageSave(newState: T, oldState: T) {\n    if (this.keyDefinition.debug.enableUpdateLogging) {\n      this.logService.info(\n        `Updating '${this.key}' from ${oldState == null ? \"null\" : \"non-null\"} to ${newState == null ? \"null\" : \"non-null\"}`,\n      );\n    }\n    await this.storageService.save(this.key, newState);\n  }\n\n  /** For use in update methods, does not wait for update to complete before yielding state.\n   * The expectation is that that await is already done\n   */\n  private async getStateForUpdate() {\n    return await getStoredValue(this.key, this.storageService, this.keyDefinition.deserializer);\n  }\n}\n","import { LogService } from \"../../abstractions/log.service\";\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { GlobalState } from \"../global-state\";\nimport { KeyDefinition, globalKeyBuilder } from \"../key-definition\";\n\nimport { StateBase } from \"./state-base\";\n\nexport class DefaultGlobalState<T>\n  extends StateBase<T, KeyDefinition<T>>\n  implements GlobalState<T>\n{\n  constructor(\n    keyDefinition: KeyDefinition<T>,\n    chosenLocation: AbstractStorageService & ObservableStorageService,\n    logService: LogService,\n  ) {\n    super(globalKeyBuilder(keyDefinition), chosenLocation, keyDefinition, logService);\n  }\n}\n","import { Observable, combineLatest, of } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n} from \"../../abstractions/storage.service\";\nimport { StateEventRegistrarService } from \"../state-event-registrar.service\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { CombinedState, SingleUserState } from \"../user-state\";\n\nimport { StateBase } from \"./state-base\";\n\nexport class DefaultSingleUserState<T>\n  extends StateBase<T, UserKeyDefinition<T>>\n  implements SingleUserState<T>\n{\n  readonly combinedState$: Observable<CombinedState<T>>;\n\n  constructor(\n    readonly userId: UserId,\n    keyDefinition: UserKeyDefinition<T>,\n    chosenLocation: AbstractStorageService & ObservableStorageService,\n    private stateEventRegistrarService: StateEventRegistrarService,\n    logService: LogService,\n  ) {\n    super(keyDefinition.buildKey(userId), chosenLocation, keyDefinition, logService);\n    this.combinedState$ = combineLatest([of(userId), this.state$]);\n  }\n\n  protected override async doStorageSave(newState: T, oldState: T): Promise<void> {\n    await super.doStorageSave(newState, oldState);\n    if (newState != null && oldState == null) {\n      await this.stateEventRegistrarService.registerEvents(this.keyDefinition);\n    }\n  }\n}\n","import { ProviderStatusType, ProviderUserStatusType, ProviderUserType } from \"../../enums\";\nimport { ProfileProviderResponse } from \"../response/profile-provider.response\";\n\nexport class ProviderData {\n  id: string;\n  name: string;\n  status: ProviderUserStatusType;\n  type: ProviderUserType;\n  enabled: boolean;\n  userId: string;\n  useEvents: boolean;\n  providerStatus: ProviderStatusType;\n\n  constructor(response: ProfileProviderResponse) {\n    this.id = response.id;\n    this.name = response.name;\n    this.status = response.status;\n    this.type = response.type;\n    this.enabled = response.enabled;\n    this.userId = response.userId;\n    this.useEvents = response.useEvents;\n    this.providerStatus = response.providerStatus;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SendFileApi } from \"../api/send-file.api\";\n\nexport class SendFileData {\n  id: string;\n  fileName: string;\n  size: string;\n  sizeName: string;\n\n  constructor(data?: SendFileApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.id = data.id;\n    this.fileName = data.fileName;\n    this.size = data.size;\n    this.sizeName = data.sizeName;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SendTextApi } from \"../api/send-text.api\";\n\nexport class SendTextData {\n  text: string;\n  hidden: boolean;\n\n  constructor(data?: SendTextApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.text = data.text;\n    this.hidden = data.hidden;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SendType } from \"../../enums/send-type\";\nimport { SendResponse } from \"../response/send.response\";\n\nimport { SendFileData } from \"./send-file.data\";\nimport { SendTextData } from \"./send-text.data\";\n\nexport class SendData {\n  id: string;\n  accessId: string;\n  type: SendType;\n  name: string;\n  notes: string;\n  file: SendFileData;\n  text: SendTextData;\n  key: string;\n  maxAccessCount?: number;\n  accessCount: number;\n  revisionDate: string;\n  expirationDate: string;\n  deletionDate: string;\n  password: string;\n  disabled: boolean;\n  hideEmail: boolean;\n\n  constructor(response?: SendResponse) {\n    if (response == null) {\n      return;\n    }\n\n    this.id = response.id;\n    this.accessId = response.accessId;\n    this.type = response.type;\n    this.name = response.name;\n    this.notes = response.notes;\n    this.key = response.key;\n    this.maxAccessCount = response.maxAccessCount;\n    this.accessCount = response.accessCount;\n    this.revisionDate = response.revisionDate;\n    this.expirationDate = response.expirationDate;\n    this.deletionDate = response.deletionDate;\n    this.password = response.password;\n    this.disabled = response.disable;\n    this.hideEmail = response.hideEmail;\n\n    switch (this.type) {\n      case SendType.Text:\n        this.text = new SendTextData(response.text);\n        break;\n      case SendType.File:\n        this.file = new SendFileData(response.file);\n        break;\n      default:\n        break;\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { FolderResponse } from \"../response/folder.response\";\n\nexport class FolderData {\n  id: string;\n  name: string;\n  revisionDate: string;\n\n  constructor(response: Partial<FolderResponse>) {\n    this.name = response?.name;\n    this.id = response?.id;\n    this.revisionDate = response?.revisionDate;\n  }\n\n  static fromJSON(obj: Jsonify<FolderData>) {\n    return Object.assign(new FolderData({}), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nconst caches = new Map<any, Map<string, Promise<any>>>();\n\nconst getCache = (obj: any) => {\n  let cache = caches.get(obj);\n  if (cache != null) {\n    return cache;\n  }\n  cache = new Map<string, Promise<any>>();\n  caches.set(obj, cache);\n  return cache;\n};\n\nexport function clearCaches() {\n  caches.clear();\n}\n\n/**\n * Use as a Decorator on async functions, it will prevent multiple 'active' calls as the same time\n *\n * If a promise was returned from a previous call to this function, that hasn't yet resolved it will\n * be returned, instead of calling the original function again\n *\n * Results are not cached, once the promise has returned, the next call will result in a fresh call\n *\n * Read more at https://github.com/bitwarden/jslib/pull/7\n */\nexport function sequentialize(cacheKey: (args: any[]) => string) {\n  return (target: any, propertyKey: string | symbol, descriptor: PropertyDescriptor) => {\n    const originalMethod: () => Promise<any> = descriptor.value;\n\n    return {\n      value: function (...args: any[]) {\n        const cache = getCache(this);\n        const argsCacheKey = cacheKey(args);\n        let response = cache.get(argsCacheKey);\n        if (response != null) {\n          return response;\n        }\n\n        const onFinally = () => {\n          cache.delete(argsCacheKey);\n          if (cache.size === 0) {\n            caches.delete(this);\n          }\n        };\n        response = originalMethod\n          .apply(this, args)\n          .then((val: any) => {\n            onFinally();\n            return val;\n          })\n          .catch((err: any) => {\n            onFinally();\n            throw err;\n          });\n\n        cache.set(argsCacheKey, response);\n        return response;\n      },\n    };\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map, Observable, of, switchMap } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport {\n  SyncCipherNotification,\n  SyncFolderNotification,\n  SyncSendNotification,\n} from \"../../models/response/notification.response\";\nimport { SendData } from \"../../tools/send/models/data/send.data\";\nimport { SendApiService } from \"../../tools/send/services/send-api.service.abstraction\";\nimport { InternalSendService } from \"../../tools/send/services/send.service.abstraction\";\nimport { UserId } from \"../../types/guid\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { FolderApiServiceAbstraction } from \"../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\nimport { SyncService } from \"../../vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherData } from \"../../vault/models/data/cipher.data\";\nimport { FolderData } from \"../../vault/models/data/folder.data\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { StateService } from \"../abstractions/state.service\";\nimport { MessageSender } from \"../messaging\";\nimport { StateProvider, SYNC_DISK, UserKeyDefinition } from \"../state\";\n\nconst LAST_SYNC_DATE = new UserKeyDefinition<Date>(SYNC_DISK, \"lastSync\", {\n  deserializer: (d) => (d != null ? new Date(d) : null),\n  clearOn: [\"logout\"],\n});\n\n/**\n * Core SyncService Logic EXCEPT for fullSync so that implementations can differ.\n */\nexport abstract class CoreSyncService implements SyncService {\n  syncInProgress = false;\n\n  constructor(\n    protected readonly stateService: StateService,\n    protected readonly folderService: InternalFolderService,\n    protected readonly folderApiService: FolderApiServiceAbstraction,\n    protected readonly messageSender: MessageSender,\n    protected readonly logService: LogService,\n    protected readonly cipherService: CipherService,\n    protected readonly collectionService: CollectionService,\n    protected readonly apiService: ApiService,\n    protected readonly accountService: AccountService,\n    protected readonly authService: AuthService,\n    protected readonly sendService: InternalSendService,\n    protected readonly sendApiService: SendApiService,\n    protected readonly stateProvider: StateProvider,\n  ) {}\n\n  abstract fullSync(forceSync: boolean, allowThrowOnError?: boolean): Promise<boolean>;\n\n  async getLastSync(): Promise<Date> {\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    if (userId == null) {\n      return null;\n    }\n\n    return await firstValueFrom(this.lastSync$(userId));\n  }\n\n  lastSync$(userId: UserId) {\n    return this.stateProvider.getUser(userId, LAST_SYNC_DATE).state$;\n  }\n\n  activeUserLastSync$(): Observable<Date | null> {\n    return this.accountService.activeAccount$.pipe(\n      switchMap((a) => {\n        if (a == null) {\n          return of(null);\n        }\n        return this.lastSync$(a.id);\n      }),\n    );\n  }\n\n  async setLastSync(date: Date, userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, LAST_SYNC_DATE).update(() => date);\n  }\n\n  async syncUpsertFolder(\n    notification: SyncFolderNotification,\n    isEdit: boolean,\n    userId: UserId,\n  ): Promise<boolean> {\n    this.syncStarted();\n\n    const authStatus = await firstValueFrom(this.authService.authStatusFor$(userId));\n\n    if (authStatus >= AuthenticationStatus.Locked) {\n      try {\n        const localFolder = await this.folderService.get(notification.id, userId);\n        if (\n          (!isEdit && localFolder == null) ||\n          (isEdit && localFolder != null && localFolder.revisionDate < notification.revisionDate)\n        ) {\n          const remoteFolder = await this.folderApiService.get(notification.id);\n          if (remoteFolder != null) {\n            await this.folderService.upsert(new FolderData(remoteFolder), userId);\n            this.messageSender.send(\"syncedUpsertedFolder\", { folderId: notification.id });\n            return this.syncCompleted(true);\n          }\n        }\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n    return this.syncCompleted(false);\n  }\n\n  async syncDeleteFolder(notification: SyncFolderNotification, userId: UserId): Promise<boolean> {\n    this.syncStarted();\n\n    const authStatus = await firstValueFrom(this.authService.authStatusFor$(userId));\n\n    if (authStatus >= AuthenticationStatus.Locked) {\n      await this.folderService.delete(notification.id, userId);\n      this.messageSender.send(\"syncedDeletedFolder\", { folderId: notification.id });\n      this.syncCompleted(true);\n      return true;\n    }\n    return this.syncCompleted(false);\n  }\n\n  async syncUpsertCipher(notification: SyncCipherNotification, isEdit: boolean): Promise<boolean> {\n    this.syncStarted();\n    if (await this.stateService.getIsAuthenticated()) {\n      try {\n        let shouldUpdate = true;\n        const localCipher = await this.cipherService.get(notification.id);\n        if (localCipher != null && localCipher.revisionDate >= notification.revisionDate) {\n          shouldUpdate = false;\n        }\n\n        let checkCollections = false;\n        if (shouldUpdate) {\n          if (isEdit) {\n            shouldUpdate = localCipher != null;\n            checkCollections = true;\n          } else {\n            if (notification.collectionIds == null || notification.organizationId == null) {\n              shouldUpdate = localCipher == null;\n            } else {\n              shouldUpdate = false;\n              checkCollections = true;\n            }\n          }\n        }\n\n        if (\n          !shouldUpdate &&\n          checkCollections &&\n          notification.organizationId != null &&\n          notification.collectionIds != null &&\n          notification.collectionIds.length > 0\n        ) {\n          const collections = await this.collectionService.getAll();\n          if (collections != null) {\n            for (let i = 0; i < collections.length; i++) {\n              if (notification.collectionIds.indexOf(collections[i].id) > -1) {\n                shouldUpdate = true;\n                break;\n              }\n            }\n          }\n        }\n\n        if (shouldUpdate) {\n          const remoteCipher = await this.apiService.getFullCipherDetails(notification.id);\n          if (remoteCipher != null) {\n            await this.cipherService.upsert(new CipherData(remoteCipher));\n            this.messageSender.send(\"syncedUpsertedCipher\", { cipherId: notification.id });\n            return this.syncCompleted(true);\n          }\n        }\n      } catch (e) {\n        if (e != null && e.statusCode === 404 && isEdit) {\n          await this.cipherService.delete(notification.id);\n          this.messageSender.send(\"syncedDeletedCipher\", { cipherId: notification.id });\n          return this.syncCompleted(true);\n        }\n      }\n    }\n    return this.syncCompleted(false);\n  }\n\n  async syncDeleteCipher(notification: SyncCipherNotification): Promise<boolean> {\n    this.syncStarted();\n    if (await this.stateService.getIsAuthenticated()) {\n      await this.cipherService.delete(notification.id);\n      this.messageSender.send(\"syncedDeletedCipher\", { cipherId: notification.id });\n      return this.syncCompleted(true);\n    }\n    return this.syncCompleted(false);\n  }\n\n  async syncUpsertSend(notification: SyncSendNotification, isEdit: boolean): Promise<boolean> {\n    this.syncStarted();\n    const [activeUserId, status] = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(\n        switchMap((a) => {\n          if (a == null) {\n            of([null, AuthenticationStatus.LoggedOut]);\n          }\n          return this.authService.authStatusFor$(a.id).pipe(map((s) => [a.id, s]));\n        }),\n      ),\n    );\n    // Process only notifications for currently active user when user is not logged out\n    // TODO: once send service allows data manipulation of non-active users, this should process any received notification\n    if (activeUserId === notification.userId && status !== AuthenticationStatus.LoggedOut) {\n      try {\n        const localSend = await firstValueFrom(this.sendService.get$(notification.id));\n        if (\n          (!isEdit && localSend == null) ||\n          (isEdit && localSend != null && localSend.revisionDate < notification.revisionDate)\n        ) {\n          const remoteSend = await this.sendApiService.getSend(notification.id);\n          if (remoteSend != null) {\n            await this.sendService.upsert(new SendData(remoteSend));\n            this.messageSender.send(\"syncedUpsertedSend\", { sendId: notification.id });\n            return this.syncCompleted(true);\n          }\n        }\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n    return this.syncCompleted(false);\n  }\n\n  async syncDeleteSend(notification: SyncSendNotification): Promise<boolean> {\n    this.syncStarted();\n    if (await this.stateService.getIsAuthenticated()) {\n      await this.sendService.delete(notification.id);\n      this.messageSender.send(\"syncedDeletedSend\", { sendId: notification.id });\n      this.syncCompleted(true);\n      return true;\n    }\n    return this.syncCompleted(false);\n  }\n\n  // Helpers\n\n  protected syncStarted() {\n    this.syncInProgress = true;\n    this.messageSender.send(\"syncStarted\");\n  }\n\n  protected syncCompleted(successfully: boolean): boolean {\n    this.syncInProgress = false;\n    this.messageSender.send(\"syncCompleted\", { successfully: successfully });\n    return successfully;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport {\n  CollectionService,\n  CollectionData,\n  CollectionDetailsResponse,\n} from \"@bitwarden/admin-console/common\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { UserDecryptionOptionsServiceAbstraction } from \"../../../../auth/src/common/abstractions\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { LogoutReason } from \"../../../../auth/src/common/types\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { InternalOrganizationServiceAbstraction } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderService } from \"../../admin-console/abstractions/provider.service\";\nimport { OrganizationUserType } from \"../../admin-console/enums\";\nimport { OrganizationData } from \"../../admin-console/models/data/organization.data\";\nimport { PolicyData } from \"../../admin-console/models/data/policy.data\";\nimport { ProviderData } from \"../../admin-console/models/data/provider.data\";\nimport { PolicyResponse } from \"../../admin-console/models/response/policy.response\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AvatarService } from \"../../auth/abstractions/avatar.service\";\nimport { KeyConnectorService } from \"../../auth/abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { ForceSetPasswordReason } from \"../../auth/models/domain/force-set-password-reason\";\nimport { DomainSettingsService } from \"../../autofill/services/domain-settings.service\";\nimport { BillingAccountProfileStateService } from \"../../billing/abstractions\";\nimport { DomainsResponse } from \"../../models/response/domains.response\";\nimport { ProfileResponse } from \"../../models/response/profile.response\";\nimport { SendData } from \"../../tools/send/models/data/send.data\";\nimport { SendResponse } from \"../../tools/send/models/response/send.response\";\nimport { SendApiService } from \"../../tools/send/services/send-api.service.abstraction\";\nimport { InternalSendService } from \"../../tools/send/services/send.service.abstraction\";\nimport { UserId } from \"../../types/guid\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { FolderApiServiceAbstraction } from \"../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherData } from \"../../vault/models/data/cipher.data\";\nimport { FolderData } from \"../../vault/models/data/folder.data\";\nimport { CipherResponse } from \"../../vault/models/response/cipher.response\";\nimport { FolderResponse } from \"../../vault/models/response/folder.response\";\nimport { LogService } from \"../abstractions/log.service\";\nimport { StateService } from \"../abstractions/state.service\";\nimport { MessageSender } from \"../messaging\";\nimport { sequentialize } from \"../misc/sequentialize\";\nimport { StateProvider } from \"../state\";\n\nimport { CoreSyncService } from \"./core-sync.service\";\n\nexport class DefaultSyncService extends CoreSyncService {\n  syncInProgress = false;\n\n  constructor(\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    apiService: ApiService,\n    private domainSettingsService: DomainSettingsService,\n    folderService: InternalFolderService,\n    cipherService: CipherService,\n    private keyService: KeyService,\n    collectionService: CollectionService,\n    messageSender: MessageSender,\n    private policyService: InternalPolicyService,\n    sendService: InternalSendService,\n    logService: LogService,\n    private keyConnectorService: KeyConnectorService,\n    stateService: StateService,\n    private providerService: ProviderService,\n    folderApiService: FolderApiServiceAbstraction,\n    private organizationService: InternalOrganizationServiceAbstraction,\n    sendApiService: SendApiService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private avatarService: AvatarService,\n    private logoutCallback: (logoutReason: LogoutReason, userId?: UserId) => Promise<void>,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private tokenService: TokenService,\n    authService: AuthService,\n    stateProvider: StateProvider,\n  ) {\n    super(\n      stateService,\n      folderService,\n      folderApiService,\n      messageSender,\n      logService,\n      cipherService,\n      collectionService,\n      apiService,\n      accountService,\n      authService,\n      sendService,\n      sendApiService,\n      stateProvider,\n    );\n  }\n\n  @sequentialize(() => \"fullSync\")\n  override async fullSync(forceSync: boolean, allowThrowOnError = false): Promise<boolean> {\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    this.syncStarted();\n    const authStatus = await firstValueFrom(this.authService.authStatusFor$(userId));\n    if (authStatus === AuthenticationStatus.LoggedOut) {\n      return this.syncCompleted(false);\n    }\n\n    const now = new Date();\n    let needsSync = false;\n    try {\n      needsSync = await this.needsSyncing(forceSync);\n    } catch (e) {\n      if (allowThrowOnError) {\n        this.syncCompleted(false);\n        throw e;\n      }\n    }\n\n    if (!needsSync) {\n      await this.setLastSync(now, userId);\n      return this.syncCompleted(false);\n    }\n\n    try {\n      await this.apiService.refreshIdentityToken();\n      const response = await this.apiService.getSync();\n\n      await this.syncProfile(response.profile);\n      await this.syncFolders(response.folders, response.profile.id);\n      await this.syncCollections(response.collections, response.profile.id);\n      await this.syncCiphers(response.ciphers, response.profile.id);\n      await this.syncSends(response.sends, response.profile.id);\n      await this.syncSettings(response.domains, response.profile.id);\n      await this.syncPolicies(response.policies, response.profile.id);\n\n      await this.setLastSync(now, userId);\n      return this.syncCompleted(true);\n    } catch (e) {\n      if (allowThrowOnError) {\n        this.syncCompleted(false);\n        throw e;\n      } else {\n        return this.syncCompleted(false);\n      }\n    }\n  }\n\n  private async needsSyncing(forceSync: boolean) {\n    if (forceSync) {\n      return true;\n    }\n\n    const lastSync = await this.getLastSync();\n    if (lastSync == null || lastSync.getTime() === 0) {\n      return true;\n    }\n\n    const response = await this.apiService.getAccountRevisionDate();\n    if (response < 0 && this.logoutCallback) {\n      // Account was deleted, log out now\n      await this.logoutCallback(\"accountDeleted\");\n    }\n\n    if (new Date(response) <= lastSync) {\n      return false;\n    }\n    return true;\n  }\n\n  private async syncProfile(response: ProfileResponse) {\n    const stamp = await this.tokenService.getSecurityStamp(response.id);\n    if (stamp != null && stamp !== response.securityStamp) {\n      if (this.logoutCallback != null) {\n        await this.logoutCallback(\"invalidSecurityStamp\");\n      }\n\n      throw new Error(\"Stamp has changed\");\n    }\n\n    await this.keyService.setMasterKeyEncryptedUserKey(response.key, response.id);\n    await this.keyService.setPrivateKey(response.privateKey, response.id);\n    await this.keyService.setProviderKeys(response.providers, response.id);\n    await this.keyService.setOrgKeys(\n      response.organizations,\n      response.providerOrganizations,\n      response.id,\n    );\n    await this.avatarService.setSyncAvatarColor(response.id, response.avatarColor);\n    await this.tokenService.setSecurityStamp(response.securityStamp, response.id);\n    await this.accountService.setAccountEmailVerified(response.id, response.emailVerified);\n\n    await this.billingAccountProfileStateService.setHasPremium(\n      response.premiumPersonally,\n      response.premiumFromOrganization,\n      response.id,\n    );\n    await this.keyConnectorService.setUsesKeyConnector(response.usesKeyConnector, response.id);\n\n    await this.setForceSetPasswordReasonIfNeeded(response);\n\n    const providers: { [id: string]: ProviderData } = {};\n    response.providers.forEach((p) => {\n      providers[p.id] = new ProviderData(p);\n    });\n\n    await this.providerService.save(providers, response.id);\n\n    await this.syncProfileOrganizations(response, response.id);\n\n    if (await this.keyConnectorService.userNeedsMigration(response.id)) {\n      await this.keyConnectorService.setConvertAccountRequired(true, response.id);\n      this.messageSender.send(\"convertAccountToKeyConnector\");\n    } else {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.keyConnectorService.removeConvertAccountRequired(response.id);\n    }\n  }\n\n  private async setForceSetPasswordReasonIfNeeded(profileResponse: ProfileResponse) {\n    // The `forcePasswordReset` flag indicates an admin has reset the user's password and must be updated\n    if (profileResponse.forcePasswordReset) {\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.AdminForcePasswordReset,\n        profileResponse.id,\n      );\n    }\n\n    const userDecryptionOptions = await firstValueFrom(\n      this.userDecryptionOptionsService.userDecryptionOptionsById$(profileResponse.id),\n    );\n\n    if (userDecryptionOptions === null || userDecryptionOptions === undefined) {\n      this.logService.error(\"Sync: Account decryption options are null or undefined.\");\n    }\n\n    // Even though TDE users should only be in a single org (per single org policy), check\n    // through all orgs for the manageResetPassword permission. If they have it in any org,\n    // they should be forced to set a password.\n    let hasManageResetPasswordPermission = false;\n    for (const org of profileResponse.organizations) {\n      const isAdmin = org.type === OrganizationUserType.Admin;\n      const isOwner = org.type === OrganizationUserType.Owner;\n\n      // Note: apparently permissions only come down populated for custom roles.\n      if (isAdmin || isOwner || (org.permissions && org.permissions.manageResetPassword)) {\n        hasManageResetPasswordPermission = true;\n        break;\n      }\n    }\n\n    if (\n      userDecryptionOptions.trustedDeviceOption !== undefined &&\n      !userDecryptionOptions.hasMasterPassword &&\n      hasManageResetPasswordPermission\n    ) {\n      // TDE user w/out MP went from having no password reset permission to having it.\n      // Must set the force password reset reason so the auth guard will redirect to the set password page.\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n        userId,\n      );\n    }\n  }\n\n  private async syncProfileOrganizations(response: ProfileResponse, userId: UserId) {\n    const organizations: { [id: string]: OrganizationData } = {};\n    response.organizations.forEach((o) => {\n      organizations[o.id] = new OrganizationData(o, {\n        isMember: true,\n        isProviderUser: false,\n      });\n    });\n\n    response.providerOrganizations.forEach((o) => {\n      if (organizations[o.id] == null) {\n        organizations[o.id] = new OrganizationData(o, {\n          isMember: false,\n          isProviderUser: true,\n        });\n      } else {\n        organizations[o.id].isProviderUser = true;\n      }\n    });\n\n    await this.organizationService.replace(organizations, userId);\n  }\n\n  private async syncFolders(response: FolderResponse[], userId: UserId) {\n    const folders: { [id: string]: FolderData } = {};\n    response.forEach((f) => {\n      folders[f.id] = new FolderData(f);\n    });\n    return await this.folderService.replace(folders, userId);\n  }\n\n  private async syncCollections(response: CollectionDetailsResponse[], userId: UserId) {\n    const collections: { [id: string]: CollectionData } = {};\n    response.forEach((c) => {\n      collections[c.id] = new CollectionData(c);\n    });\n    return await this.collectionService.replace(collections, userId);\n  }\n\n  private async syncCiphers(response: CipherResponse[], userId: UserId) {\n    const ciphers: { [id: string]: CipherData } = {};\n    response.forEach((c) => {\n      ciphers[c.id] = new CipherData(c);\n    });\n    return await this.cipherService.replace(ciphers, userId);\n  }\n\n  private async syncSends(response: SendResponse[], userId: UserId) {\n    const sends: { [id: string]: SendData } = {};\n    response.forEach((s) => {\n      sends[s.id] = new SendData(s);\n    });\n    return await this.sendService.replace(sends, userId);\n  }\n\n  private async syncSettings(response: DomainsResponse, userId: UserId) {\n    let eqDomains: string[][] = [];\n    if (response != null && response.equivalentDomains != null) {\n      eqDomains = eqDomains.concat(response.equivalentDomains);\n    }\n\n    if (response != null && response.globalEquivalentDomains != null) {\n      response.globalEquivalentDomains.forEach((global) => {\n        if (global.domains.length > 0) {\n          eqDomains.push(global.domains);\n        }\n      });\n    }\n\n    return this.domainSettingsService.setEquivalentDomains(eqDomains, userId);\n  }\n\n  private async syncPolicies(response: PolicyResponse[], userId: UserId) {\n    const policies: { [id: string]: PolicyData } = {};\n    if (response != null) {\n      response.forEach((p) => {\n        policies[p.id] = new PolicyData(p);\n      });\n    }\n    return await this.policyService.replace(policies, userId);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BillingSyncConfigApi } from \"../../../billing/models/api/billing-sync-config.api\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationConnectionType } from \"../../enums\";\nimport { ScimConfigApi } from \"../api/scim-config.api\";\n\n/**API response config types for OrganizationConnectionResponse */\nexport type OrganizationConnectionConfigApis = BillingSyncConfigApi | ScimConfigApi;\n\nexport class OrganizationConnectionResponse<\n  TConfig extends OrganizationConnectionConfigApis,\n> extends BaseResponse {\n  id: string;\n  type: OrganizationConnectionType;\n  organizationId: string;\n  enabled: boolean;\n  config: TConfig;\n\n  constructor(response: any, configType: { new (response: any): TConfig }) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    const rawConfig = this.getResponseProperty(\"Config\");\n    this.config = rawConfig == null ? null : new configType(rawConfig);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionResponse } from \"@bitwarden/admin-console/common\";\n\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { CipherResponse } from \"../../../vault/models/response/cipher.response\";\n\nexport class OrganizationExportResponse extends BaseResponse {\n  collections: CollectionResponse[];\n  ciphers: CipherResponse[];\n\n  constructor(response: any) {\n    super(response);\n    const collections = this.getResponseProperty(\"Collections\");\n    if (collections != null) {\n      this.collections = collections.map((c: any) => new CollectionResponse(c));\n    }\n    const ciphers = this.getResponseProperty(\"Ciphers\");\n    if (ciphers != null) {\n      this.ciphers = ciphers.map((c: any) => new CipherResponse(c));\n    }\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationSponsorshipSyncStatusResponse extends BaseResponse {\n  lastSyncDate?: Date;\n\n  constructor(response: any) {\n    super(response);\n    const lastSyncDate = this.getResponseProperty(\"LastSyncDate\");\n    if (lastSyncDate) {\n      this.lastSyncDate = new Date(lastSyncDate);\n    }\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PreValidateSponsorshipResponse extends BaseResponse {\n  isTokenValid: boolean;\n  isFreeFamilyPolicyEnabled: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.isTokenValid = this.getResponseProperty(\"IsTokenValid\");\n    this.isFreeFamilyPolicyEnabled = this.getResponseProperty(\"IsFreeFamilyPolicyEnabled\");\n  }\n}\n","import { OrganizationUserBulkPublicKeyResponse } from \"@bitwarden/admin-console/common\";\n\nexport class ProviderUserBulkPublicKeyResponse extends OrganizationUserBulkPublicKeyResponse {}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class ProviderUserBulkResponse extends BaseResponse {\n  id: string;\n  error: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.error = this.getResponseProperty(\"Error\");\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { ProviderUserStatusType, ProviderUserType } from \"../../../enums\";\nimport { PermissionsApi } from \"../../api/permissions.api\";\n\nexport class ProviderUserResponse extends BaseResponse {\n  id: string;\n  userId: string;\n  type: ProviderUserType;\n  status: ProviderUserStatusType;\n  permissions: PermissionsApi;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.permissions = new PermissionsApi(this.getResponseProperty(\"Permissions\"));\n  }\n}\n\nexport class ProviderUserUserDetailsResponse extends ProviderUserResponse {\n  name: string;\n  email: string;\n\n  constructor(response: any) {\n    super(response);\n    this.name = this.getResponseProperty(\"Name\");\n    this.email = this.getResponseProperty(\"Email\");\n  }\n}\n","import { DeviceType } from \"../../../enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nconst RequestTimeOut = 60000 * 15; //15 Minutes\n\nexport class AuthRequestResponse extends BaseResponse {\n  id: string;\n  publicKey: string;\n  requestDeviceType: DeviceType;\n  requestIpAddress: string;\n  key: string; // could be either an encrypted MasterKey or an encrypted UserKey\n  masterPasswordHash: string; // if hash is present, the `key` above is an encrypted MasterKey (else `key` is an encrypted UserKey)\n  creationDate: string;\n  requestApproved?: boolean;\n  responseDate?: string;\n  isAnswered: boolean;\n  isExpired: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.publicKey = this.getResponseProperty(\"PublicKey\");\n    this.requestDeviceType = this.getResponseProperty(\"RequestDeviceType\");\n    this.requestIpAddress = this.getResponseProperty(\"RequestIpAddress\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.masterPasswordHash = this.getResponseProperty(\"MasterPasswordHash\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.requestApproved = this.getResponseProperty(\"RequestApproved\");\n    this.responseDate = this.getResponseProperty(\"ResponseDate\");\n\n    const requestDate = new Date(this.creationDate);\n    const requestDateUTC = Date.UTC(\n      requestDate.getUTCFullYear(),\n      requestDate.getUTCMonth(),\n      requestDate.getDate(),\n      requestDate.getUTCHours(),\n      requestDate.getUTCMinutes(),\n      requestDate.getUTCSeconds(),\n      requestDate.getUTCMilliseconds(),\n    );\n\n    const dateNow = new Date(Date.now());\n    const dateNowUTC = Date.UTC(\n      dateNow.getUTCFullYear(),\n      dateNow.getUTCMonth(),\n      dateNow.getDate(),\n      dateNow.getUTCHours(),\n      dateNow.getUTCMinutes(),\n      dateNow.getUTCSeconds(),\n      dateNow.getUTCMilliseconds(),\n    );\n\n    this.isExpired = dateNowUTC - requestDateUTC >= RequestTimeOut;\n    this.isAnswered = this.requestApproved != null && this.responseDate != null;\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class DeviceVerificationResponse extends BaseResponse {\n  isDeviceVerificationSectionEnabled: boolean;\n  unknownDeviceVerificationEnabled: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.isDeviceVerificationSectionEnabled = this.getResponseProperty(\n      \"IsDeviceVerificationSectionEnabled\",\n    );\n    this.unknownDeviceVerificationEnabled = this.getResponseProperty(\n      \"UnknownDeviceVerificationEnabled\",\n    );\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class KeyConnectorUserKeyResponse extends BaseResponse {\n  key: string;\n\n  constructor(response: any) {\n    super(response);\n    this.key = this.getResponseProperty(\"Key\");\n  }\n}\n","import { KdfType } from \"@bitwarden/key-management\";\n\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PreloginResponse extends BaseResponse {\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n\n  constructor(response: any) {\n    super(response);\n    this.kdf = this.getResponseProperty(\"Kdf\");\n    this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n    this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n    this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { ICaptchaProtectedResponse } from \"./captcha-protected.response\";\n\nexport class RegisterResponse extends BaseResponse implements ICaptchaProtectedResponse {\n  captchaBypassToken: string;\n\n  constructor(response: any) {\n    super(response);\n    this.captchaBypassToken = this.getResponseProperty(\"CaptchaBypassToken\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SsoPreValidateResponse extends BaseResponse {\n  token: string;\n\n  constructor(response: any) {\n    super(response);\n    this.token = this.getResponseProperty(\"Token\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorAuthenticatorResponse extends BaseResponse {\n  enabled: boolean;\n  key: string;\n  userVerificationToken: string;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.userVerificationToken = this.getResponseProperty(\"UserVerificationToken\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorDuoResponse extends BaseResponse {\n  enabled: boolean;\n  host: string;\n  clientSecret: string;\n  clientId: string;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.host = this.getResponseProperty(\"Host\");\n    this.clientSecret = this.getResponseProperty(\"ClientSecret\");\n    this.clientId = this.getResponseProperty(\"ClientId\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorEmailResponse extends BaseResponse {\n  enabled: boolean;\n  email: string;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.email = this.getResponseProperty(\"Email\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nexport class TwoFactorProviderResponse extends BaseResponse {\n  enabled: boolean;\n  type: TwoFactorProviderType;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.type = this.getResponseProperty(\"Type\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorRecoverResponse extends BaseResponse {\n  code: string;\n\n  constructor(response: any) {\n    super(response);\n    this.code = this.getResponseProperty(\"Code\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TwoFactorYubiKeyResponse extends BaseResponse {\n  enabled: boolean;\n  key1: string;\n  key2: string;\n  key3: string;\n  key4: string;\n  key5: string;\n  nfc: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.key1 = this.getResponseProperty(\"Key1\");\n    this.key2 = this.getResponseProperty(\"Key2\");\n    this.key3 = this.getResponseProperty(\"Key3\");\n    this.key4 = this.getResponseProperty(\"Key4\");\n    this.key5 = this.getResponseProperty(\"Key5\");\n    this.nfc = this.getResponseProperty(\"Nfc\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { BillingSourceResponse } from \"./billing.response\";\n\nexport class BillingPaymentResponse extends BaseResponse {\n  balance: number;\n  paymentSource: BillingSourceResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.balance = this.getResponseProperty(\"Balance\");\n    const paymentSource = this.getResponseProperty(\"PaymentSource\");\n    this.paymentSource = paymentSource == null ? null : new BillingSourceResponse(paymentSource);\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class TaxRateResponse extends BaseResponse {\n  id: string;\n  country: string;\n  state: string;\n  postalCode: string;\n  rate: number;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.country = this.getResponseProperty(\"Country\");\n    this.state = this.getResponseProperty(\"State\");\n    this.postalCode = this.getResponseProperty(\"PostalCode\");\n    this.rate = this.getResponseProperty(\"Rate\");\n  }\n}\n","export class CollectionBulkDeleteRequest {\n  ids: string[];\n\n  constructor(ids: string[]) {\n    this.ids = ids == null ? [] : ids;\n  }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class BreachAccountResponse extends BaseResponse {\n  addedDate: string;\n  breachDate: string;\n  dataClasses: string[];\n  description: string;\n  domain: string;\n  isActive: boolean;\n  isVerified: boolean;\n  logoPath: string;\n  modifiedDate: string;\n  name: string;\n  pwnCount: number;\n  title: string;\n\n  constructor(response: any) {\n    super(response);\n    this.addedDate = this.getResponseProperty(\"AddedDate\");\n    this.breachDate = this.getResponseProperty(\"BreachDate\");\n    this.dataClasses = this.getResponseProperty(\"DataClasses\");\n    this.description = this.getResponseProperty(\"Description\");\n    this.domain = this.getResponseProperty(\"Domain\");\n    this.isActive = this.getResponseProperty(\"IsActive\");\n    this.isVerified = this.getResponseProperty(\"IsVerified\");\n    this.logoPath = this.getResponseProperty(\"LogoPath\");\n    this.modifiedDate = this.getResponseProperty(\"ModifiedDate\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.pwnCount = this.getResponseProperty(\"PwnCount\");\n    this.title = this.getResponseProperty(\"Title\");\n  }\n}\n","import { DeviceType, EventSystemUser, EventType } from \"../../enums\";\n\nimport { BaseResponse } from \"./base.response\";\n\nexport class EventResponse extends BaseResponse {\n  type: EventType;\n  userId: string;\n  organizationId: string;\n  providerId: string;\n  cipherId: string;\n  collectionId: string;\n  groupId: string;\n  policyId: string;\n  organizationUserId: string;\n  providerUserId: string;\n  providerOrganizationId: string;\n  actingUserId: string;\n  date: string;\n  deviceType: DeviceType;\n  ipAddress: string;\n  installationId: string;\n  systemUser: EventSystemUser;\n  domainName: string;\n  secretId: string;\n  serviceAccountId: string;\n\n  constructor(response: any) {\n    super(response);\n    this.type = this.getResponseProperty(\"Type\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.providerId = this.getResponseProperty(\"ProviderId\");\n    this.cipherId = this.getResponseProperty(\"CipherId\");\n    this.collectionId = this.getResponseProperty(\"CollectionId\");\n    this.groupId = this.getResponseProperty(\"GroupId\");\n    this.policyId = this.getResponseProperty(\"PolicyId\");\n    this.organizationUserId = this.getResponseProperty(\"OrganizationUserId\");\n    this.providerUserId = this.getResponseProperty(\"ProviderUserId\");\n    this.providerOrganizationId = this.getResponseProperty(\"ProviderOrganizationId\");\n    this.actingUserId = this.getResponseProperty(\"ActingUserId\");\n    this.date = this.getResponseProperty(\"Date\");\n    this.deviceType = this.getResponseProperty(\"DeviceType\");\n    this.ipAddress = this.getResponseProperty(\"IpAddress\");\n    this.installationId = this.getResponseProperty(\"InstallationId\");\n    this.systemUser = this.getResponseProperty(\"SystemUser\");\n    this.domainName = this.getResponseProperty(\"DomainName\");\n    this.secretId = this.getResponseProperty(\"SecretId\");\n    this.serviceAccountId = this.getResponseProperty(\"ServiceAccountId\");\n  }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class UserKeyResponse extends BaseResponse {\n  userId: string;\n  publicKey: string;\n\n  constructor(response: any) {\n    super(response);\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.publicKey = this.getResponseProperty(\"PublicKey\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { FileUploadType } from \"../../../platform/enums\";\n\nimport { CipherResponse } from \"./cipher.response\";\n\nexport class AttachmentUploadDataResponse extends BaseResponse {\n  attachmentId: string;\n  fileUploadType: FileUploadType;\n  cipherResponse: CipherResponse;\n  cipherMiniResponse: CipherResponse;\n  url: string = null;\n  constructor(response: any) {\n    super(response);\n    this.attachmentId = this.getResponseProperty(\"AttachmentId\");\n    this.fileUploadType = this.getResponseProperty(\"FileUploadType\");\n    const cipherResponse = this.getResponseProperty(\"CipherResponse\");\n    const cipherMiniResponse = this.getResponseProperty(\"CipherMiniResponse\");\n    this.cipherResponse = cipherResponse == null ? null : new CipherResponse(cipherResponse);\n    this.cipherMiniResponse =\n      cipherMiniResponse == null ? null : new CipherResponse(cipherMiniResponse);\n    this.url = this.getResponseProperty(\"Url\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { CipherResponse } from \"./cipher.response\";\n\nexport class OptionalCipherResponse extends BaseResponse {\n  unavailable: boolean;\n  cipher?: CipherResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.unavailable = this.getResponseProperty(\"Unavailable\");\n    this.cipher = new CipherResponse(this.getResponseProperty(\"Cipher\"));\n  }\n}\n","import { ApiService } from \"../abstractions/api.service\";\nimport { AuditService as AuditServiceAbstraction } from \"../abstractions/audit.service\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { ErrorResponse } from \"../models/response/error.response\";\nimport { CryptoFunctionService } from \"../platform/abstractions/crypto-function.service\";\nimport { throttle } from \"../platform/misc/throttle\";\nimport { Utils } from \"../platform/misc/utils\";\n\nconst PwnedPasswordsApi = \"https://api.pwnedpasswords.com/range/\";\n\nexport class AuditService implements AuditServiceAbstraction {\n  constructor(\n    private cryptoFunctionService: CryptoFunctionService,\n    private apiService: ApiService,\n  ) {}\n\n  @throttle(100, () => \"passwordLeaked\")\n  async passwordLeaked(password: string): Promise<number> {\n    const hashBytes = await this.cryptoFunctionService.hash(password, \"sha1\");\n    const hash = Utils.fromBufferToHex(hashBytes).toUpperCase();\n    const hashStart = hash.substr(0, 5);\n    const hashEnding = hash.substr(5);\n\n    const response = await this.apiService.nativeFetch(new Request(PwnedPasswordsApi + hashStart));\n    const leakedHashes = await response.text();\n    const match = leakedHashes.split(/\\r?\\n/).find((v) => {\n      return v.split(\":\")[0] === hashEnding;\n    });\n\n    return match != null ? parseInt(match.split(\":\")[1], 10) : 0;\n  }\n\n  async breachedAccounts(username: string): Promise<BreachAccountResponse[]> {\n    try {\n      return await this.apiService.getHibpBreach(username);\n    } catch (e) {\n      const error = e as ErrorResponse;\n      if (error.statusCode === 404) {\n        return [];\n      }\n      throw new Error();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\n/**\n * Use as a Decorator on async functions, it will limit how many times the function can be\n * in-flight at a time.\n *\n * Calls beyond the limit will be queued, and run when one of the active calls finishes\n */\nexport function throttle(limit: number, throttleKey: (args: any[]) => string) {\n  return <T>(\n    target: any,\n    propertyKey: string | symbol,\n    descriptor: TypedPropertyDescriptor<(...args: any[]) => Promise<T>>,\n  ) => {\n    const originalMethod: () => Promise<T> = descriptor.value;\n    const allThrottles = new Map<any, Map<string, (() => void)[]>>();\n\n    const getThrottles = (obj: any) => {\n      let throttles = allThrottles.get(obj);\n      if (throttles != null) {\n        return throttles;\n      }\n      throttles = new Map<string, (() => void)[]>();\n      allThrottles.set(obj, throttles);\n      return throttles;\n    };\n\n    return {\n      value: function (...args: any[]) {\n        const throttles = getThrottles(this);\n        const argsThrottleKey = throttleKey(args);\n        let queue = throttles.get(argsThrottleKey);\n        if (queue == null) {\n          queue = [];\n          throttles.set(argsThrottleKey, queue);\n        }\n\n        return new Promise<T>((resolve, reject) => {\n          const exec = () => {\n            const onFinally = () => {\n              queue.splice(queue.indexOf(exec), 1);\n              if (queue.length >= limit) {\n                queue[limit - 1]();\n              } else if (queue.length === 0) {\n                throttles.delete(argsThrottleKey);\n                if (throttles.size === 0) {\n                  allThrottles.delete(this);\n                }\n              }\n            };\n            originalMethod\n              .apply(this, args)\n              .then((val: any) => {\n                onFinally();\n                return val;\n              })\n              .catch((err: any) => {\n                onFinally();\n                throw err;\n              })\n              .then(resolve, reject);\n          };\n          queue.push(exec);\n          if (queue.length <= limit) {\n            exec();\n          }\n        });\n      },\n    };\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { EventType } from \"../../enums\";\n\nexport class EventData {\n  type: EventType;\n  cipherId: string;\n  date: string;\n  organizationId: string;\n\n  static fromJSON(obj: Jsonify<EventData>): EventData {\n    return Object.assign(new EventData(), obj);\n  }\n}\n","import { EventData } from \"../../models/data/event.data\";\nimport { EVENT_COLLECTION_DISK, UserKeyDefinition } from \"../../platform/state\";\n\nexport const EVENT_COLLECTION = UserKeyDefinition.array<EventData>(\n  EVENT_COLLECTION_DISK,\n  \"events\",\n  {\n    deserializer: (s) => EventData.fromJSON(s),\n    clearOn: [\"logout\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EventType } from \"../../enums\";\n\nexport class EventRequest {\n  type: EventType;\n  cipherId: string;\n  date: string;\n  organizationId: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as lunr from \"lunr\";\nimport { Observable, firstValueFrom, map } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { SearchService as SearchServiceAbstraction } from \"../abstractions/search.service\";\nimport { UriMatchStrategy } from \"../models/domain/domain-service\";\nimport { I18nService } from \"../platform/abstractions/i18n.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport {\n  ActiveUserState,\n  StateProvider,\n  UserKeyDefinition,\n  VAULT_SEARCH_MEMORY,\n} from \"../platform/state\";\nimport { SendView } from \"../tools/send/models/view/send.view\";\nimport { IndexedEntityId } from \"../types/guid\";\nimport { FieldType } from \"../vault/enums\";\nimport { CipherType } from \"../vault/enums/cipher-type\";\nimport { CipherView } from \"../vault/models/view/cipher.view\";\n\nexport type SerializedLunrIndex = {\n  version: string;\n  fields: string[];\n  fieldVectors: [string, number[]];\n  invertedIndex: any[];\n  pipeline: string[];\n};\n\n/**\n * The `KeyDefinition` for accessing the search index in application state.\n * The key definition is configured to clear the index when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEX = new UserKeyDefinition<SerializedLunrIndex>(\n  VAULT_SEARCH_MEMORY,\n  \"searchIndex\",\n  {\n    deserializer: (obj: Jsonify<SerializedLunrIndex>) => obj,\n    clearOn: [\"lock\", \"logout\"],\n  },\n);\n\n/**\n * The `KeyDefinition` for accessing the ID of the entity currently indexed by Lunr search.\n * The key definition is configured to clear the indexed entity ID when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEXED_ENTITY_ID = new UserKeyDefinition<IndexedEntityId>(\n  VAULT_SEARCH_MEMORY,\n  \"searchIndexedEntityId\",\n  {\n    deserializer: (obj: Jsonify<IndexedEntityId>) => obj,\n    clearOn: [\"lock\", \"logout\"],\n  },\n);\n\n/**\n * The `KeyDefinition` for accessing the state of Lunr search indexing, indicating whether the Lunr search index is currently being built or updating.\n * The key definition is configured to clear the indexing state when the user locks the vault.\n */\nexport const LUNR_SEARCH_INDEXING = new UserKeyDefinition<boolean>(\n  VAULT_SEARCH_MEMORY,\n  \"isIndexing\",\n  {\n    deserializer: (obj: Jsonify<boolean>) => obj,\n    clearOn: [\"lock\", \"logout\"],\n  },\n);\n\nexport class SearchService implements SearchServiceAbstraction {\n  private static registeredPipeline = false;\n\n  private searchIndexState: ActiveUserState<SerializedLunrIndex> =\n    this.stateProvider.getActive(LUNR_SEARCH_INDEX);\n  private readonly index$: Observable<lunr.Index | null> = this.searchIndexState.state$.pipe(\n    map((searchIndex) => (searchIndex ? lunr.Index.load(searchIndex) : null)),\n  );\n\n  private searchIndexEntityIdState: ActiveUserState<IndexedEntityId> = this.stateProvider.getActive(\n    LUNR_SEARCH_INDEXED_ENTITY_ID,\n  );\n  readonly indexedEntityId$: Observable<IndexedEntityId | null> =\n    this.searchIndexEntityIdState.state$.pipe(map((id) => id));\n\n  private searchIsIndexingState: ActiveUserState<boolean> =\n    this.stateProvider.getActive(LUNR_SEARCH_INDEXING);\n  private readonly searchIsIndexing$: Observable<boolean> = this.searchIsIndexingState.state$.pipe(\n    map((indexing) => indexing ?? false),\n  );\n\n  private readonly immediateSearchLocales: string[] = [\"zh-CN\", \"zh-TW\", \"ja\", \"ko\", \"vi\"];\n  private readonly defaultSearchableMinLength: number = 2;\n  private searchableMinLength: number = this.defaultSearchableMinLength;\n\n  constructor(\n    private logService: LogService,\n    private i18nService: I18nService,\n    private stateProvider: StateProvider,\n  ) {\n    this.i18nService.locale$.subscribe((locale) => {\n      if (this.immediateSearchLocales.indexOf(locale) !== -1) {\n        this.searchableMinLength = 1;\n      } else {\n        this.searchableMinLength = this.defaultSearchableMinLength;\n      }\n    });\n\n    // Currently have to ensure this is only done a single time. Lunr allows you to register a function\n    // multiple times but they will add a warning message to the console. The way they do that breaks when ran on a service worker.\n    if (!SearchService.registeredPipeline) {\n      SearchService.registeredPipeline = true;\n      //register lunr pipeline function\n      lunr.Pipeline.registerFunction(this.normalizeAccentsPipelineFunction, \"normalizeAccents\");\n    }\n  }\n\n  async clearIndex(): Promise<void> {\n    await this.searchIndexEntityIdState.update(() => null);\n    await this.searchIndexState.update(() => null);\n    await this.searchIsIndexingState.update(() => null);\n  }\n\n  async isSearchable(query: string): Promise<boolean> {\n    query = SearchService.normalizeSearchQuery(query);\n    const index = await this.getIndexForSearch();\n    const notSearchable =\n      query == null ||\n      (index == null && query.length < this.searchableMinLength) ||\n      (index != null && query.length < this.searchableMinLength && query.indexOf(\">\") !== 0);\n    return !notSearchable;\n  }\n\n  async indexCiphers(ciphers: CipherView[], indexedEntityId?: string): Promise<void> {\n    if (await this.getIsIndexing()) {\n      return;\n    }\n\n    await this.setIsIndexing(true);\n    await this.setIndexedEntityIdForSearch(indexedEntityId as IndexedEntityId);\n    const builder = new lunr.Builder();\n    builder.pipeline.add(this.normalizeAccentsPipelineFunction);\n    builder.ref(\"id\");\n    builder.field(\"shortid\", { boost: 100, extractor: (c: CipherView) => c.id.substr(0, 8) });\n    builder.field(\"name\", {\n      boost: 10,\n    });\n    builder.field(\"subtitle\", {\n      boost: 5,\n      extractor: (c: CipherView) => {\n        if (c.subTitle != null && c.type === CipherType.Card) {\n          return c.subTitle.replace(/\\*/g, \"\");\n        }\n        return c.subTitle;\n      },\n    });\n    builder.field(\"notes\");\n    builder.field(\"login.username\", {\n      extractor: (c: CipherView) =>\n        c.type === CipherType.Login && c.login != null ? c.login.username : null,\n    });\n    builder.field(\"login.uris\", { boost: 2, extractor: (c: CipherView) => this.uriExtractor(c) });\n    builder.field(\"fields\", { extractor: (c: CipherView) => this.fieldExtractor(c, false) });\n    builder.field(\"fields_joined\", { extractor: (c: CipherView) => this.fieldExtractor(c, true) });\n    builder.field(\"attachments\", {\n      extractor: (c: CipherView) => this.attachmentExtractor(c, false),\n    });\n    builder.field(\"attachments_joined\", {\n      extractor: (c: CipherView) => this.attachmentExtractor(c, true),\n    });\n    builder.field(\"organizationid\", { extractor: (c: CipherView) => c.organizationId });\n    ciphers = ciphers || [];\n    ciphers.forEach((c) => builder.add(c));\n    const index = builder.build();\n\n    await this.setIndexForSearch(index.toJSON() as SerializedLunrIndex);\n\n    await this.setIsIndexing(false);\n\n    this.logService.info(\"Finished search indexing\");\n  }\n\n  async searchCiphers(\n    query: string,\n    filter: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[] = null,\n    ciphers: CipherView[],\n  ): Promise<CipherView[]> {\n    const results: CipherView[] = [];\n    if (query != null) {\n      query = SearchService.normalizeSearchQuery(query.trim().toLowerCase());\n    }\n    if (query === \"\") {\n      query = null;\n    }\n\n    if (ciphers == null) {\n      ciphers = [];\n    }\n\n    if (filter != null && Array.isArray(filter) && filter.length > 0) {\n      ciphers = ciphers.filter((c) => filter.every((f) => f == null || f(c)));\n    } else if (filter != null) {\n      ciphers = ciphers.filter(filter as (cipher: CipherView) => boolean);\n    }\n\n    if (!(await this.isSearchable(query))) {\n      return ciphers;\n    }\n\n    if (await this.getIsIndexing()) {\n      await new Promise((r) => setTimeout(r, 250));\n      if (await this.getIsIndexing()) {\n        await new Promise((r) => setTimeout(r, 500));\n      }\n    }\n\n    const index = await this.getIndexForSearch();\n    if (index == null) {\n      // Fall back to basic search if index is not available\n      return this.searchCiphersBasic(ciphers, query);\n    }\n\n    const ciphersMap = new Map<string, CipherView>();\n    ciphers.forEach((c) => ciphersMap.set(c.id, c));\n\n    let searchResults: lunr.Index.Result[] = null;\n    const isQueryString = query != null && query.length > 1 && query.indexOf(\">\") === 0;\n    if (isQueryString) {\n      try {\n        searchResults = index.search(query.substr(1).trim());\n      } catch (e) {\n        this.logService.error(e);\n      }\n    } else {\n      const soWild = lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING;\n      searchResults = index.query((q) => {\n        lunr.tokenizer(query).forEach((token) => {\n          const t = token.toString();\n          q.term(t, { fields: [\"name\"], wildcard: soWild });\n          q.term(t, { fields: [\"subtitle\"], wildcard: soWild });\n          q.term(t, { fields: [\"login.uris\"], wildcard: soWild });\n          q.term(t, {});\n        });\n      });\n    }\n\n    if (searchResults != null) {\n      searchResults.forEach((r) => {\n        if (ciphersMap.has(r.ref)) {\n          results.push(ciphersMap.get(r.ref));\n        }\n      });\n    }\n    return results;\n  }\n\n  searchCiphersBasic(ciphers: CipherView[], query: string, deleted = false) {\n    query = SearchService.normalizeSearchQuery(query.trim().toLowerCase());\n    return ciphers.filter((c) => {\n      if (deleted !== c.isDeleted) {\n        return false;\n      }\n      if (c.name != null && c.name.toLowerCase().indexOf(query) > -1) {\n        return true;\n      }\n      if (query.length >= 8 && c.id.startsWith(query)) {\n        return true;\n      }\n      if (c.subTitle != null && c.subTitle.toLowerCase().indexOf(query) > -1) {\n        return true;\n      }\n      if (\n        c.login &&\n        c.login.hasUris &&\n        c.login.uris.some((loginUri) => loginUri?.uri?.toLowerCase().indexOf(query) > -1)\n      ) {\n        return true;\n      }\n      return false;\n    });\n  }\n\n  searchSends(sends: SendView[], query: string) {\n    query = SearchService.normalizeSearchQuery(query.trim().toLocaleLowerCase());\n    if (query === null) {\n      return sends;\n    }\n    const sendsMatched: SendView[] = [];\n    const lowPriorityMatched: SendView[] = [];\n    sends.forEach((s) => {\n      if (s.name != null && s.name.toLowerCase().indexOf(query) > -1) {\n        sendsMatched.push(s);\n      } else if (\n        query.length >= 8 &&\n        (s.id.startsWith(query) ||\n          s.accessId.toLocaleLowerCase().startsWith(query) ||\n          (s.file?.id != null && s.file.id.startsWith(query)))\n      ) {\n        lowPriorityMatched.push(s);\n      } else if (s.notes != null && s.notes.toLowerCase().indexOf(query) > -1) {\n        lowPriorityMatched.push(s);\n      } else if (s.text?.text != null && s.text.text.toLowerCase().indexOf(query) > -1) {\n        lowPriorityMatched.push(s);\n      } else if (s.file?.fileName != null && s.file.fileName.toLowerCase().indexOf(query) > -1) {\n        lowPriorityMatched.push(s);\n      }\n    });\n    return sendsMatched.concat(lowPriorityMatched);\n  }\n\n  async getIndexForSearch(): Promise<lunr.Index | null> {\n    return await firstValueFrom(this.index$);\n  }\n\n  private async setIndexForSearch(index: SerializedLunrIndex): Promise<void> {\n    await this.searchIndexState.update(() => index);\n  }\n\n  private async setIndexedEntityIdForSearch(indexedEntityId: IndexedEntityId): Promise<void> {\n    await this.searchIndexEntityIdState.update(() => indexedEntityId);\n  }\n\n  private async setIsIndexing(indexing: boolean): Promise<void> {\n    await this.searchIsIndexingState.update(() => indexing);\n  }\n\n  private async getIsIndexing(): Promise<boolean> {\n    return await firstValueFrom(this.searchIsIndexing$);\n  }\n\n  private fieldExtractor(c: CipherView, joined: boolean) {\n    if (!c.hasFields) {\n      return null;\n    }\n    let fields: string[] = [];\n    c.fields.forEach((f) => {\n      if (f.name != null) {\n        fields.push(f.name);\n      }\n      if (f.type === FieldType.Text && f.value != null) {\n        fields.push(f.value);\n      }\n    });\n    fields = fields.filter((f) => f.trim() !== \"\");\n    if (fields.length === 0) {\n      return null;\n    }\n    return joined ? fields.join(\" \") : fields;\n  }\n\n  private attachmentExtractor(c: CipherView, joined: boolean) {\n    if (!c.hasAttachments) {\n      return null;\n    }\n    let attachments: string[] = [];\n    c.attachments.forEach((a) => {\n      if (a != null && a.fileName != null) {\n        if (joined && a.fileName.indexOf(\".\") > -1) {\n          attachments.push(a.fileName.substr(0, a.fileName.lastIndexOf(\".\")));\n        } else {\n          attachments.push(a.fileName);\n        }\n      }\n    });\n    attachments = attachments.filter((f) => f.trim() !== \"\");\n    if (attachments.length === 0) {\n      return null;\n    }\n    return joined ? attachments.join(\" \") : attachments;\n  }\n\n  private uriExtractor(c: CipherView) {\n    if (c.type !== CipherType.Login || c.login == null || !c.login.hasUris) {\n      return null;\n    }\n    const uris: string[] = [];\n    c.login.uris.forEach((u) => {\n      if (u.uri == null || u.uri === \"\") {\n        return;\n      }\n      if (u.hostname != null) {\n        uris.push(u.hostname);\n        return;\n      }\n      let uri = u.uri;\n      if (u.match !== UriMatchStrategy.RegularExpression) {\n        const protocolIndex = uri.indexOf(\"://\");\n        if (protocolIndex > -1) {\n          uri = uri.substr(protocolIndex + 3);\n        }\n        const queryIndex = uri.search(/\\?|&|#/);\n        if (queryIndex > -1) {\n          uri = uri.substring(0, queryIndex);\n        }\n      }\n      uris.push(uri);\n    });\n    return uris.length > 0 ? uris : null;\n  }\n\n  private normalizeAccentsPipelineFunction(token: lunr.Token): any {\n    const searchableFields = [\"name\", \"login.username\", \"subtitle\", \"notes\"];\n    const fields = (token as any).metadata[\"fields\"];\n    const checkFields = fields.every((i: any) => searchableFields.includes(i));\n\n    if (checkFields) {\n      return SearchService.normalizeSearchQuery(token.toString());\n    }\n\n    return token;\n  }\n\n  // Remove accents/diacritics characters from text. This regex is equivalent to the Diacritic unicode property escape, i.e. it will match all diacritic characters.\n  static normalizeSearchQuery(query: string): string {\n    return query?.normalize(\"NFD\").replace(/[\\u0300-\\u036f]/g, \"\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { combineLatest, concatMap, filter, firstValueFrom, map, timeout } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { TaskSchedulerService, ScheduledTaskNames } from \"@bitwarden/common/platform/scheduling\";\nimport { BiometricsService } from \"@bitwarden/key-management\";\n\nimport { SearchService } from \"../../abstractions/search.service\";\nimport { VaultTimeoutSettingsService } from \"../../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService as VaultTimeoutServiceAbstraction } from \"../../abstractions/vault-timeout/vault-timeout.service\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../auth/abstractions/master-password.service.abstraction\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { MessagingService } from \"../../platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { StateEventRunnerService } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { FolderService } from \"../../vault/abstractions/folder/folder.service.abstraction\";\n\nexport class VaultTimeoutService implements VaultTimeoutServiceAbstraction {\n  private inited = false;\n\n  constructor(\n    private accountService: AccountService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private cipherService: CipherService,\n    private folderService: FolderService,\n    private collectionService: CollectionService,\n    protected platformUtilsService: PlatformUtilsService,\n    private messagingService: MessagingService,\n    private searchService: SearchService,\n    private stateService: StateService,\n    private authService: AuthService,\n    private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    private stateEventRunnerService: StateEventRunnerService,\n    private taskSchedulerService: TaskSchedulerService,\n    protected logService: LogService,\n    private biometricService: BiometricsService,\n    private lockedCallback: (userId?: string) => Promise<void> = null,\n    private loggedOutCallback: (\n      logoutReason: LogoutReason,\n      userId?: string,\n    ) => Promise<void> = null,\n  ) {\n    this.taskSchedulerService.registerTaskHandler(\n      ScheduledTaskNames.vaultTimeoutCheckInterval,\n      () => this.checkVaultTimeout(),\n    );\n  }\n\n  async init(checkOnInterval: boolean) {\n    if (this.inited) {\n      return;\n    }\n\n    this.inited = true;\n    if (checkOnInterval) {\n      this.startCheck();\n    }\n  }\n\n  startCheck() {\n    this.checkVaultTimeout().catch((error) => this.logService.error(error));\n    this.taskSchedulerService.setInterval(\n      ScheduledTaskNames.vaultTimeoutCheckInterval,\n      10 * 1000, // check every 10 seconds\n    );\n  }\n\n  async checkVaultTimeout(): Promise<void> {\n    // Get whether or not the view is open a single time so it can be compared for each user\n    const isViewOpen = await this.platformUtilsService.isViewOpen();\n\n    await firstValueFrom(\n      combineLatest([\n        this.accountService.activeAccount$,\n        this.accountService.accountActivity$,\n      ]).pipe(\n        concatMap(async ([activeAccount, accountActivity]) => {\n          const activeUserId = activeAccount?.id;\n          for (const userIdString in accountActivity) {\n            const userId = userIdString as UserId;\n            if (\n              userId != null &&\n              (await this.shouldLock(userId, accountActivity[userId], activeUserId, isViewOpen))\n            ) {\n              await this.executeTimeoutAction(userId);\n            }\n          }\n        }),\n      ),\n    );\n  }\n\n  async lock(userId?: UserId): Promise<void> {\n    await this.biometricService.setShouldAutopromptNow(false);\n\n    const authed = await this.stateService.getIsAuthenticated({ userId: userId });\n    if (!authed) {\n      return;\n    }\n\n    const availableActions = await firstValueFrom(\n      this.vaultTimeoutSettingsService.availableVaultTimeoutActions$(userId),\n    );\n    const supportsLock = availableActions.includes(VaultTimeoutAction.Lock);\n    if (!supportsLock) {\n      await this.logOut(userId);\n    }\n\n    const currentUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n\n    const lockingUserId = userId ?? currentUserId;\n\n    // HACK: Start listening for the transition of the locking user from something to the locked state.\n    // This is very much a hack to ensure that the authentication status to retrievable right after\n    // it does its work. Particularly the `lockedCallback` and `\"locked\"` message. Instead\n    // lockedCallback should be deprecated and people should subscribe and react to `authStatusFor$` themselves.\n    const lockPromise = firstValueFrom(\n      this.authService.authStatusFor$(lockingUserId).pipe(\n        filter((authStatus) => authStatus === AuthenticationStatus.Locked),\n        timeout({\n          first: 5_000,\n          with: () => {\n            throw new Error(\"The lock process did not complete in a reasonable amount of time.\");\n          },\n        }),\n      ),\n    );\n\n    if (userId == null || userId === currentUserId) {\n      await this.searchService.clearIndex();\n      await this.collectionService.clearActiveUserCache();\n    }\n\n    await this.folderService.clearDecryptedFolderState(lockingUserId);\n    await this.masterPasswordService.clearMasterKey(lockingUserId);\n\n    await this.stateService.setUserKeyAutoUnlock(null, { userId: lockingUserId });\n    await this.stateService.setCryptoMasterKeyAuto(null, { userId: lockingUserId });\n\n    await this.cipherService.clearCache(lockingUserId);\n\n    await this.stateEventRunnerService.handleEvent(\"lock\", lockingUserId);\n\n    // HACK: Sit here and wait for the the auth status to transition to `Locked`\n    // to ensure the message and lockedCallback will get the correct status\n    // if/when they call it.\n    await lockPromise;\n\n    this.messagingService.send(\"locked\", { userId: lockingUserId });\n\n    if (this.lockedCallback != null) {\n      await this.lockedCallback(userId);\n    }\n  }\n\n  async logOut(userId?: string): Promise<void> {\n    if (this.loggedOutCallback != null) {\n      await this.loggedOutCallback(\"vaultTimeout\", userId);\n    }\n  }\n\n  private async shouldLock(\n    userId: string,\n    lastActive: Date,\n    activeUserId: string,\n    isViewOpen: boolean,\n  ): Promise<boolean> {\n    if (isViewOpen && userId === activeUserId) {\n      // We know a view is open and this is the currently active user\n      // which means they are likely looking at their vault\n      // and they should not lock.\n      return false;\n    }\n\n    const authStatus = await this.authService.getAuthStatus(userId);\n    if (\n      authStatus === AuthenticationStatus.Locked ||\n      authStatus === AuthenticationStatus.LoggedOut\n    ) {\n      return false;\n    }\n\n    const vaultTimeout = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n    );\n\n    if (typeof vaultTimeout === \"string\") {\n      return false;\n    }\n\n    if (lastActive == null) {\n      return false;\n    }\n\n    const vaultTimeoutSeconds = vaultTimeout * 60;\n    const diffSeconds = (new Date().getTime() - lastActive.getTime()) / 1000;\n    return diffSeconds >= vaultTimeoutSeconds;\n  }\n\n  private async executeTimeoutAction(userId: UserId): Promise<void> {\n    const timeoutAction = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n    );\n    timeoutAction === VaultTimeoutAction.LogOut\n      ? await this.logOut(userId)\n      : await this.lock(userId);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SendType } from \"../../enums/send-type\";\nimport { SendFileApi } from \"../api/send-file.api\";\nimport { SendTextApi } from \"../api/send-text.api\";\nimport { Send } from \"../domain/send\";\n\nexport class SendRequest {\n  type: SendType;\n  fileLength?: number;\n  name: string;\n  notes: string;\n  key: string;\n  maxAccessCount?: number;\n  expirationDate: string;\n  deletionDate: string;\n  text: SendTextApi;\n  file: SendFileApi;\n  password: string;\n  disabled: boolean;\n  hideEmail: boolean;\n\n  constructor(send: Send, fileLength?: number) {\n    this.type = send.type;\n    this.fileLength = fileLength;\n    this.name = send.name ? send.name.encryptedString : null;\n    this.notes = send.notes ? send.notes.encryptedString : null;\n    this.maxAccessCount = send.maxAccessCount;\n    this.expirationDate = send.expirationDate != null ? send.expirationDate.toISOString() : null;\n    this.deletionDate = send.deletionDate != null ? send.deletionDate.toISOString() : null;\n    this.key = send.key != null ? send.key.encryptedString : null;\n    this.password = send.password;\n    this.disabled = send.disabled;\n    this.hideEmail = send.hideEmail;\n\n    switch (this.type) {\n      case SendType.Text:\n        this.text = new SendTextApi();\n        this.text.text = send.text.text != null ? send.text.text.encryptedString : null;\n        this.text.hidden = send.text.hidden;\n        break;\n      case SendType.File:\n        this.file = new SendFileApi();\n        this.file.fileName = send.file.fileName != null ? send.file.fileName.encryptedString : null;\n        break;\n      default:\n        break;\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendFileApi } from \"../api/send-file.api\";\nimport { SendTextApi } from \"../api/send-text.api\";\n\nexport class SendAccessResponse extends BaseResponse {\n  id: string;\n  type: SendType;\n  name: string;\n  file: SendFileApi;\n  text: SendTextApi;\n  expirationDate: Date;\n  creatorIdentifier: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.name = this.getResponseProperty(\"Name\");\n\n    const text = this.getResponseProperty(\"Text\");\n    if (text != null) {\n      this.text = new SendTextApi(text);\n    }\n\n    const file = this.getResponseProperty(\"File\");\n    if (file != null) {\n      this.file = new SendFileApi(file);\n    }\n\n    this.expirationDate = this.getResponseProperty(\"ExpirationDate\");\n    this.creatorIdentifier = this.getResponseProperty(\"CreatorIdentifier\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class SendFileDownloadDataResponse extends BaseResponse {\n  id: string = null;\n  url: string = null;\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.url = this.getResponseProperty(\"Url\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\nimport { FileUploadType } from \"../../../../platform/enums\";\n\nimport { SendResponse } from \"./send.response\";\n\nexport class SendFileUploadDataResponse extends BaseResponse {\n  fileUploadType: FileUploadType;\n  sendResponse: SendResponse;\n  url: string = null;\n  constructor(response: any) {\n    super(response);\n    this.fileUploadType = this.getResponseProperty(\"FileUploadType\");\n    const sendResponse = this.getResponseProperty(\"SendResponse\");\n    this.sendResponse = sendResponse == null ? null : new SendResponse(sendResponse);\n    this.url = this.getResponseProperty(\"Url\");\n  }\n}\n","import { SEND_DISK, SEND_MEMORY, UserKeyDefinition } from \"../../../platform/state\";\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\n/** Encrypted send state stored on disk */\nexport const SEND_USER_ENCRYPTED = UserKeyDefinition.record<SendData>(\n  SEND_DISK,\n  \"sendUserEncrypted\",\n  {\n    deserializer: (obj: SendData) => obj,\n    clearOn: [\"logout\"],\n  },\n);\n\n/** Decrypted send state stored in memory */\nexport const SEND_USER_DECRYPTED = new UserKeyDefinition<SendView[]>(\n  SEND_MEMORY,\n  \"sendUserDecrypted\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"lock\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\nimport type { Simplify } from \"type-fest\";\n\nimport { CombinedState } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\ntype EncryptedSendState = Simplify<CombinedState<Record<string, SendData>>>;\nexport abstract class SendStateProvider {\n  encryptedState$: Observable<EncryptedSendState>;\n  decryptedState$: Observable<SendView[]>;\n\n  getEncryptedSends: () => Promise<EncryptedSendState>;\n\n  setEncryptedSends: (value: { [id: string]: SendData }, userId: UserId) => Promise<void>;\n\n  getDecryptedSends: () => Promise<SendView[]>;\n\n  setDecryptedSends: (value: SendView[]) => Promise<void>;\n}\n","import { Send } from \"../domain/send\";\n\nimport { SendRequest } from \"./send.request\";\n\nexport class SendWithIdRequest extends SendRequest {\n  id: string;\n\n  constructor(send: Send) {\n    super(send);\n    this.id = send.id;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { CipherResponse } from \"../../models/response/cipher.response\";\n\nexport abstract class CipherFileUploadService {\n  upload: (\n    cipher: Cipher,\n    encFileName: EncString,\n    encData: EncArrayBuffer,\n    admin: boolean,\n    dataEncKey: [SymmetricCryptoKey, EncString],\n  ) => Promise<CipherResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherView } from \"../view/cipher.view\";\n\nconst CacheTTL = 3000;\n\nexport class SortedCiphersCache {\n  private readonly sortedCiphersByUrl: Map<string, Ciphers> = new Map<string, Ciphers>();\n  private readonly timeouts: Map<string, any> = new Map<string, any>();\n\n  constructor(private readonly comparator: (a: CipherView, b: CipherView) => number) {}\n\n  isCached(url: string) {\n    return this.sortedCiphersByUrl.has(url);\n  }\n\n  addCiphers(url: string, ciphers: CipherView[]) {\n    ciphers.sort(this.comparator);\n    this.sortedCiphersByUrl.set(url, new Ciphers(ciphers));\n    this.resetTimer(url);\n  }\n\n  getLastUsed(url: string) {\n    this.resetTimer(url);\n    return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getLastUsed() : null;\n  }\n\n  getLastLaunched(url: string) {\n    return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getLastLaunched() : null;\n  }\n\n  getNext(url: string) {\n    this.resetTimer(url);\n    return this.isCached(url) ? this.sortedCiphersByUrl.get(url).getNext() : null;\n  }\n\n  updateLastUsedIndex(url: string) {\n    if (this.isCached(url)) {\n      this.sortedCiphersByUrl.get(url).updateLastUsedIndex();\n    }\n  }\n\n  clear() {\n    this.sortedCiphersByUrl.clear();\n    this.timeouts.clear();\n  }\n\n  private resetTimer(url: string) {\n    clearTimeout(this.timeouts.get(url));\n    this.timeouts.set(\n      url,\n      setTimeout(() => {\n        this.sortedCiphersByUrl.delete(url);\n        this.timeouts.delete(url);\n      }, CacheTTL),\n    );\n  }\n}\n\nclass Ciphers {\n  lastUsedIndex = -1;\n\n  constructor(private readonly ciphers: CipherView[]) {}\n\n  getLastUsed() {\n    this.lastUsedIndex = Math.max(this.lastUsedIndex, 0);\n    return this.ciphers[this.lastUsedIndex];\n  }\n\n  getLastLaunched() {\n    const usedCiphers = this.ciphers.filter((cipher) => cipher.localData?.lastLaunched);\n    const sortedCiphers = usedCiphers.sort(\n      (x, y) => y.localData.lastLaunched.valueOf() - x.localData.lastLaunched.valueOf(),\n    );\n    return sortedCiphers[0];\n  }\n\n  getNextIndex() {\n    return (this.lastUsedIndex + 1) % this.ciphers.length;\n  }\n\n  getNext() {\n    return this.ciphers[this.getNextIndex()];\n  }\n\n  updateLastUsedIndex() {\n    this.lastUsedIndex = this.getNextIndex();\n  }\n}\n","export class CipherBulkMoveRequest {\n  ids: string[];\n  folderId: string;\n\n  constructor(ids: string[], folderId: string) {\n    this.ids = ids == null ? [] : ids;\n    this.folderId = folderId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class CipherBulkRestoreRequest {\n  ids: string[];\n  organizationId: string;\n\n  constructor(ids: string[], organizationId?: string) {\n    this.ids = ids == null ? [] : ids;\n    this.organizationId = organizationId;\n  }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherWithIdRequest extends CipherRequest {\n  id: string;\n\n  constructor(cipher: Cipher) {\n    super(cipher);\n    this.id = cipher.id;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Cipher } from \"../domain/cipher\";\n\nimport { CipherWithIdRequest } from \"./cipher-with-id.request\";\n\nexport class CipherBulkShareRequest {\n  ciphers: CipherWithIdRequest[];\n  collectionIds: string[];\n\n  constructor(ciphers: Cipher[], collectionIds: string[]) {\n    if (ciphers != null) {\n      this.ciphers = [];\n      ciphers.forEach((c) => {\n        this.ciphers.push(new CipherWithIdRequest(c));\n      });\n    }\n    this.collectionIds = collectionIds;\n  }\n}\n","import { CipherId, CollectionId, OrganizationId } from \"../../../types/guid\";\n\nexport class CipherBulkUpdateCollectionsRequest {\n  organizationId: OrganizationId;\n  cipherIds: CipherId[];\n  collectionIds: CollectionId[];\n  removeCollections: boolean;\n  constructor(\n    organizationId: OrganizationId,\n    cipherIds: CipherId[],\n    collectionIds: CollectionId[],\n    removeCollections: boolean = false,\n  ) {\n    this.organizationId = organizationId;\n    this.cipherIds = cipherIds;\n    this.collectionIds = collectionIds;\n    this.removeCollections = removeCollections;\n  }\n}\n","export class CipherCollectionsRequest {\n  collectionIds: string[];\n\n  constructor(collectionIds: string[]) {\n    this.collectionIds = collectionIds == null ? [] : collectionIds;\n  }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherCreateRequest {\n  cipher: CipherRequest;\n  collectionIds: string[];\n\n  constructor(cipher: Cipher) {\n    this.cipher = new CipherRequest(cipher);\n    this.collectionIds = cipher.collectionIds;\n  }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nexport class CipherPartialRequest {\n  folderId: string;\n  favorite: boolean;\n\n  constructor(cipher: Cipher) {\n    this.folderId = cipher.folderId;\n    this.favorite = cipher.favorite;\n  }\n}\n","import { Cipher } from \"../domain/cipher\";\n\nimport { CipherRequest } from \"./cipher.request\";\n\nexport class CipherShareRequest {\n  cipher: CipherRequest;\n  collectionIds: string[];\n\n  constructor(cipher: Cipher) {\n    this.cipher = new CipherRequest(cipher);\n    this.collectionIds = cipher.collectionIds;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport {\n  CIPHERS_DISK,\n  CIPHERS_DISK_LOCAL,\n  CIPHERS_MEMORY,\n  UserKeyDefinition,\n} from \"../../../platform/state\";\nimport { CipherId } from \"../../../types/guid\";\nimport { CipherData } from \"../../models/data/cipher.data\";\nimport { LocalData } from \"../../models/data/local.data\";\nimport { CipherView } from \"../../models/view/cipher.view\";\nimport { AddEditCipherInfo } from \"../../types/add-edit-cipher-info\";\n\nexport const ENCRYPTED_CIPHERS = UserKeyDefinition.record<CipherData>(CIPHERS_DISK, \"ciphers\", {\n  deserializer: (obj: Jsonify<CipherData>) => CipherData.fromJSON(obj),\n  clearOn: [\"logout\"],\n});\n\nexport const DECRYPTED_CIPHERS = UserKeyDefinition.record<CipherView>(\n  CIPHERS_MEMORY,\n  \"decryptedCiphers\",\n  {\n    deserializer: (cipher: Jsonify<CipherView>) => CipherView.fromJSON(cipher),\n    clearOn: [\"logout\", \"lock\"],\n  },\n);\n\nexport const FAILED_DECRYPTED_CIPHERS = UserKeyDefinition.array<CipherView>(\n  CIPHERS_MEMORY,\n  \"failedDecryptedCiphers\",\n  {\n    deserializer: (cipher: Jsonify<CipherView>) => CipherView.fromJSON(cipher),\n    clearOn: [\"logout\", \"lock\"],\n  },\n);\n\nexport const LOCAL_DATA_KEY = new UserKeyDefinition<Record<CipherId, LocalData>>(\n  CIPHERS_DISK_LOCAL,\n  \"localData\",\n  {\n    deserializer: (localData) => localData,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const ADD_EDIT_CIPHER_INFO_KEY = new UserKeyDefinition<AddEditCipherInfo>(\n  CIPHERS_MEMORY,\n  \"addEditCipherInfo\",\n  {\n    deserializer: (addEditCipherInfo: AddEditCipherInfo) => {\n      if (addEditCipherInfo == null) {\n        return null;\n      }\n\n      const cipher =\n        addEditCipherInfo?.cipher.toJSON != null\n          ? addEditCipherInfo.cipher\n          : CipherView.fromJSON(addEditCipherInfo?.cipher as Jsonify<CipherView>);\n\n      return { cipher, collectionIds: addEditCipherInfo.collectionIds };\n    },\n    clearOn: [\"logout\", \"lock\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  combineLatest,\n  filter,\n  firstValueFrom,\n  map,\n  merge,\n  Observable,\n  of,\n  shareReplay,\n  Subject,\n  switchMap,\n} from \"rxjs\";\nimport { SemVer } from \"semver\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { BulkEncryptService } from \"@bitwarden/common/platform/abstractions/bulk-encrypt.service\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { SearchService } from \"../../abstractions/search.service\";\nimport { AutofillSettingsServiceAbstraction } from \"../../autofill/services/autofill-settings.service\";\nimport { DomainSettingsService } from \"../../autofill/services/domain-settings.service\";\nimport { UriMatchStrategySetting } from \"../../models/domain/domain-service\";\nimport { ErrorResponse } from \"../../models/response/error.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { View } from \"../../models/view/view\";\nimport { ConfigService } from \"../../platform/abstractions/config/config.service\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { sequentialize } from \"../../platform/misc/sequentialize\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport Domain from \"../../platform/models/domain/domain-base\";\nimport { EncArrayBuffer } from \"../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport { ActiveUserState, StateProvider } from \"../../platform/state\";\nimport { CipherId, CollectionId, OrganizationId, UserId } from \"../../types/guid\";\nimport { OrgKey, UserKey } from \"../../types/key\";\nimport { CipherService as CipherServiceAbstraction } from \"../abstractions/cipher.service\";\nimport { CipherFileUploadService } from \"../abstractions/file-upload/cipher-file-upload.service\";\nimport { FieldType } from \"../enums\";\nimport { CipherType } from \"../enums/cipher-type\";\nimport { CipherData } from \"../models/data/cipher.data\";\nimport { LocalData } from \"../models/data/local.data\";\nimport { Attachment } from \"../models/domain/attachment\";\nimport { Card } from \"../models/domain/card\";\nimport { Cipher } from \"../models/domain/cipher\";\nimport { Fido2Credential } from \"../models/domain/fido2-credential\";\nimport { Field } from \"../models/domain/field\";\nimport { Identity } from \"../models/domain/identity\";\nimport { Login } from \"../models/domain/login\";\nimport { LoginUri } from \"../models/domain/login-uri\";\nimport { Password } from \"../models/domain/password\";\nimport { SecureNote } from \"../models/domain/secure-note\";\nimport { SortedCiphersCache } from \"../models/domain/sorted-ciphers-cache\";\nimport { SshKey } from \"../models/domain/ssh-key\";\nimport { CipherBulkDeleteRequest } from \"../models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../models/request/cipher-bulk-share.request\";\nimport { CipherBulkUpdateCollectionsRequest } from \"../models/request/cipher-bulk-update-collections.request\";\nimport { CipherCollectionsRequest } from \"../models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../models/request/cipher-share.request\";\nimport { CipherWithIdRequest } from \"../models/request/cipher-with-id.request\";\nimport { CipherRequest } from \"../models/request/cipher.request\";\nimport { CipherResponse } from \"../models/response/cipher.response\";\nimport { AttachmentView } from \"../models/view/attachment.view\";\nimport { CipherView } from \"../models/view/cipher.view\";\nimport { FieldView } from \"../models/view/field.view\";\nimport { PasswordHistoryView } from \"../models/view/password-history.view\";\nimport { AddEditCipherInfo } from \"../types/add-edit-cipher-info\";\n\nimport {\n  ADD_EDIT_CIPHER_INFO_KEY,\n  DECRYPTED_CIPHERS,\n  ENCRYPTED_CIPHERS,\n  FAILED_DECRYPTED_CIPHERS,\n  LOCAL_DATA_KEY,\n} from \"./key-state/ciphers.state\";\n\nconst CIPHER_KEY_ENC_MIN_SERVER_VER = new SemVer(\"2024.2.0\");\n\nexport class CipherService implements CipherServiceAbstraction {\n  private sortedCiphersCache: SortedCiphersCache = new SortedCiphersCache(\n    this.sortCiphersByLastUsed,\n  );\n  /**\n   * Observable that forces the `cipherViews$` observable to re-emit with the provided value.\n   * Used to let subscribers of `cipherViews$` know that the decrypted ciphers have been cleared for the active user.\n   * @private\n   */\n  private forceCipherViews$: Subject<CipherView[]> = new Subject<CipherView[]>();\n\n  localData$: Observable<Record<CipherId, LocalData>>;\n  ciphers$: Observable<Record<CipherId, CipherData>>;\n\n  /**\n   * Observable that emits an array of decrypted ciphers for the active user.\n   * This observable will not emit until the encrypted ciphers have either been loaded from state or after sync.\n   *\n   * A `null` value indicates that the latest encrypted ciphers have not been decrypted yet and that\n   * decryption is in progress. The latest decrypted ciphers will be emitted once decryption is complete.\n   *\n   */\n  cipherViews$: Observable<CipherView[] | null>;\n  addEditCipherInfo$: Observable<AddEditCipherInfo>;\n\n  /**\n   * Observable that emits an array of cipherViews that failed to decrypt. Does not emit until decryption has completed.\n   *\n   * An empty array indicates that all ciphers were successfully decrypted.\n   */\n  failedToDecryptCiphers$: Observable<CipherView[]>;\n\n  private localDataState: ActiveUserState<Record<CipherId, LocalData>>;\n  private encryptedCiphersState: ActiveUserState<Record<CipherId, CipherData>>;\n  private decryptedCiphersState: ActiveUserState<Record<CipherId, CipherView>>;\n  private failedToDecryptCiphersState: ActiveUserState<CipherView[]>;\n  private addEditCipherInfoState: ActiveUserState<AddEditCipherInfo>;\n\n  constructor(\n    private keyService: KeyService,\n    private domainSettingsService: DomainSettingsService,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private searchService: SearchService,\n    private stateService: StateService,\n    private autofillSettingsService: AutofillSettingsServiceAbstraction,\n    private encryptService: EncryptService,\n    private bulkEncryptService: BulkEncryptService,\n    private cipherFileUploadService: CipherFileUploadService,\n    private configService: ConfigService,\n    private stateProvider: StateProvider,\n    private accountService: AccountService,\n  ) {\n    this.localDataState = this.stateProvider.getActive(LOCAL_DATA_KEY);\n    this.encryptedCiphersState = this.stateProvider.getActive(ENCRYPTED_CIPHERS);\n    this.decryptedCiphersState = this.stateProvider.getActive(DECRYPTED_CIPHERS);\n    this.failedToDecryptCiphersState = this.stateProvider.getActive(FAILED_DECRYPTED_CIPHERS);\n    this.addEditCipherInfoState = this.stateProvider.getActive(ADD_EDIT_CIPHER_INFO_KEY);\n\n    this.localData$ = this.localDataState.state$.pipe(map((data) => data ?? {}));\n    this.ciphers$ = this.encryptedCiphersState.state$.pipe(map((ciphers) => ciphers ?? {}));\n\n    // Decrypted ciphers depend on both ciphers and local data and need to be updated when either changes\n    this.cipherViews$ = combineLatest([this.encryptedCiphersState.state$, this.localData$]).pipe(\n      filter(([ciphers]) => ciphers != null), // Skip if ciphers haven't been loaded yor synced yet\n      switchMap(() => merge(this.forceCipherViews$, this.getAllDecrypted())),\n      shareReplay({ bufferSize: 1, refCount: true }),\n    );\n\n    this.failedToDecryptCiphers$ = this.failedToDecryptCiphersState.state$.pipe(\n      filter((ciphers) => ciphers != null),\n      switchMap((ciphers) => merge(this.forceCipherViews$, of(ciphers))),\n      shareReplay({ bufferSize: 1, refCount: true }),\n    );\n\n    this.addEditCipherInfo$ = this.addEditCipherInfoState.state$;\n  }\n\n  async setDecryptedCipherCache(value: CipherView[], userId: UserId) {\n    // Sometimes we might prematurely decrypt the vault and that will result in no ciphers\n    // if we cache it then we may accidentally return it when it's not right, we'd rather try decryption again.\n    // We still want to set null though, that is the indicator that the cache isn't valid and we should do decryption.\n    if (value == null || value.length !== 0) {\n      await this.setDecryptedCiphers(value, userId);\n    }\n    if (this.searchService != null) {\n      if (value == null) {\n        await this.searchService.clearIndex();\n      } else {\n        await this.searchService.indexCiphers(value);\n      }\n    }\n  }\n\n  async setFailedDecryptedCiphers(cipherViews: CipherView[], userId: UserId) {\n    await this.stateProvider.setUserState(FAILED_DECRYPTED_CIPHERS, cipherViews, userId);\n  }\n\n  private async setDecryptedCiphers(value: CipherView[], userId: UserId) {\n    const cipherViews: { [id: string]: CipherView } = {};\n    value?.forEach((c) => {\n      cipherViews[c.id] = c;\n    });\n    await this.stateProvider.setUserState(DECRYPTED_CIPHERS, cipherViews, userId);\n  }\n\n  async clearCache(userId?: UserId): Promise<void> {\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n    userId ??= activeUserId;\n    await this.clearDecryptedCiphersState(userId);\n\n    // Force the cipherView$ observable (which always tracks the active user) to re-emit\n    if (userId == activeUserId) {\n      this.forceCipherViews$.next(null);\n    }\n  }\n\n  async encrypt(\n    model: CipherView,\n    userId: UserId,\n    keyForCipherEncryption?: SymmetricCryptoKey,\n    keyForCipherKeyDecryption?: SymmetricCryptoKey,\n    originalCipher: Cipher = null,\n  ): Promise<Cipher> {\n    if (model.id != null) {\n      if (originalCipher == null) {\n        originalCipher = await this.get(model.id);\n      }\n      if (originalCipher != null) {\n        await this.updateModelfromExistingCipher(model, originalCipher, userId);\n      }\n      this.adjustPasswordHistoryLength(model);\n    }\n\n    const cipher = new Cipher();\n    cipher.id = model.id;\n    cipher.folderId = model.folderId;\n    cipher.favorite = model.favorite;\n    cipher.organizationId = model.organizationId;\n    cipher.type = model.type;\n    cipher.collectionIds = model.collectionIds;\n    cipher.revisionDate = model.revisionDate;\n    cipher.reprompt = model.reprompt;\n    cipher.edit = model.edit;\n\n    if (await this.getCipherKeyEncryptionEnabled()) {\n      cipher.key = originalCipher?.key ?? null;\n      const userOrOrgKey = await this.getKeyForCipherKeyDecryption(cipher, userId);\n      // The keyForEncryption is only used for encrypting the cipher key, not the cipher itself, since cipher key encryption is enabled.\n      // If the caller has provided a key for cipher key encryption, use it. Otherwise, use the user or org key.\n      keyForCipherEncryption ||= userOrOrgKey;\n      // If the caller has provided a key for cipher key decryption, use it. Otherwise, use the user or org key.\n      keyForCipherKeyDecryption ||= userOrOrgKey;\n      return this.encryptCipherWithCipherKey(\n        model,\n        cipher,\n        keyForCipherEncryption,\n        keyForCipherKeyDecryption,\n      );\n    } else {\n      keyForCipherEncryption ||= await this.getKeyForCipherKeyDecryption(cipher, userId);\n      // We want to ensure that the cipher key is null if cipher key encryption is disabled\n      // so that decryption uses the proper key.\n      cipher.key = null;\n      return this.encryptCipher(model, cipher, keyForCipherEncryption);\n    }\n  }\n\n  async encryptAttachments(\n    attachmentsModel: AttachmentView[],\n    key: SymmetricCryptoKey,\n  ): Promise<Attachment[]> {\n    if (attachmentsModel == null || attachmentsModel.length === 0) {\n      return null;\n    }\n\n    const promises: Promise<any>[] = [];\n    const encAttachments: Attachment[] = [];\n    attachmentsModel.forEach(async (model) => {\n      const attachment = new Attachment();\n      attachment.id = model.id;\n      attachment.size = model.size;\n      attachment.sizeName = model.sizeName;\n      attachment.url = model.url;\n      const promise = this.encryptObjProperty(\n        model,\n        attachment,\n        {\n          fileName: null,\n        },\n        key,\n      ).then(async () => {\n        if (model.key != null) {\n          attachment.key = await this.encryptService.encrypt(model.key.key, key);\n        }\n        encAttachments.push(attachment);\n      });\n      promises.push(promise);\n    });\n\n    await Promise.all(promises);\n    return encAttachments;\n  }\n\n  async encryptFields(fieldsModel: FieldView[], key: SymmetricCryptoKey): Promise<Field[]> {\n    if (!fieldsModel || !fieldsModel.length) {\n      return null;\n    }\n\n    const self = this;\n    const encFields: Field[] = [];\n    await fieldsModel.reduce(async (promise, field) => {\n      await promise;\n      const encField = await self.encryptField(field, key);\n      encFields.push(encField);\n    }, Promise.resolve());\n\n    return encFields;\n  }\n\n  async encryptField(fieldModel: FieldView, key: SymmetricCryptoKey): Promise<Field> {\n    const field = new Field();\n    field.type = fieldModel.type;\n    field.linkedId = fieldModel.linkedId;\n    // normalize boolean type field values\n    if (fieldModel.type === FieldType.Boolean && fieldModel.value !== \"true\") {\n      fieldModel.value = \"false\";\n    }\n\n    await this.encryptObjProperty(\n      fieldModel,\n      field,\n      {\n        name: null,\n        value: null,\n      },\n      key,\n    );\n\n    return field;\n  }\n\n  async encryptPasswordHistories(\n    phModels: PasswordHistoryView[],\n    key: SymmetricCryptoKey,\n  ): Promise<Password[]> {\n    if (!phModels || !phModels.length) {\n      return null;\n    }\n\n    const self = this;\n    const encPhs: Password[] = [];\n    await phModels.reduce(async (promise, ph) => {\n      await promise;\n      const encPh = await self.encryptPasswordHistory(ph, key);\n      encPhs.push(encPh);\n    }, Promise.resolve());\n\n    return encPhs;\n  }\n\n  async encryptPasswordHistory(\n    phModel: PasswordHistoryView,\n    key: SymmetricCryptoKey,\n  ): Promise<Password> {\n    const ph = new Password();\n    ph.lastUsedDate = phModel.lastUsedDate;\n\n    await this.encryptObjProperty(\n      phModel,\n      ph,\n      {\n        password: null,\n      },\n      key,\n    );\n\n    return ph;\n  }\n\n  async get(id: string): Promise<Cipher> {\n    const ciphers = await firstValueFrom(this.ciphers$);\n    // eslint-disable-next-line\n    if (ciphers == null || !ciphers.hasOwnProperty(id)) {\n      return null;\n    }\n\n    const localData = await firstValueFrom(this.localData$);\n    const cipherId = id as CipherId;\n\n    return new Cipher(ciphers[cipherId], localData ? localData[cipherId] : null);\n  }\n\n  async getAll(): Promise<Cipher[]> {\n    const localData = await firstValueFrom(this.localData$);\n    const ciphers = await firstValueFrom(this.ciphers$);\n    const response: Cipher[] = [];\n    for (const id in ciphers) {\n      // eslint-disable-next-line\n      if (ciphers.hasOwnProperty(id)) {\n        const cipherId = id as CipherId;\n        response.push(new Cipher(ciphers[cipherId], localData ? localData[cipherId] : null));\n      }\n    }\n    return response;\n  }\n\n  /**\n   * Decrypts all ciphers for the active user and caches them in memory. If the ciphers have already been decrypted and\n   * cached, the cached ciphers are returned.\n   * @deprecated Use `cipherViews$` observable instead\n   */\n  @sequentialize(() => \"getAllDecrypted\")\n  async getAllDecrypted(): Promise<CipherView[]> {\n    const decCiphers = await this.getDecryptedCiphers();\n    if (decCiphers != null && decCiphers.length !== 0) {\n      await this.reindexCiphers();\n      return await this.getDecryptedCiphers();\n    }\n\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (activeUserId == null) {\n      return [];\n    }\n\n    const [newDecCiphers, failedCiphers] = await this.decryptCiphers(\n      await this.getAll(),\n      activeUserId,\n    );\n\n    await this.setDecryptedCipherCache(newDecCiphers, activeUserId);\n    await this.setFailedDecryptedCiphers(failedCiphers, activeUserId);\n\n    return newDecCiphers;\n  }\n\n  private async getDecryptedCiphers() {\n    return Object.values(\n      await firstValueFrom(this.decryptedCiphersState.state$.pipe(map((c) => c ?? {}))),\n    );\n  }\n\n  /**\n   * Decrypts the provided ciphers using the provided user's keys.\n   * @param ciphers\n   * @param userId\n   * @returns Two cipher arrays, the first containing successfully decrypted ciphers and the second containing ciphers that failed to decrypt.\n   * @private\n   */\n  private async decryptCiphers(\n    ciphers: Cipher[],\n    userId: UserId,\n  ): Promise<[CipherView[], CipherView[]]> {\n    const keys = await firstValueFrom(this.keyService.cipherDecryptionKeys$(userId, true));\n\n    if (keys == null || (keys.userKey == null && Object.keys(keys.orgKeys).length === 0)) {\n      // return early if there are no keys to decrypt with\n      return;\n    }\n\n    // Group ciphers by orgId or under 'null' for the user's ciphers\n    const grouped = ciphers.reduce(\n      (agg, c) => {\n        agg[c.organizationId] ??= [];\n        agg[c.organizationId].push(c);\n        return agg;\n      },\n      {} as Record<string, Cipher[]>,\n    );\n\n    const allCipherViews = (\n      await Promise.all(\n        Object.entries(grouped).map(async ([orgId, groupedCiphers]) => {\n          if (await this.configService.getFeatureFlag(FeatureFlag.PM4154_BulkEncryptionService)) {\n            return await this.bulkEncryptService.decryptItems(\n              groupedCiphers,\n              keys.orgKeys[orgId as OrganizationId] ?? keys.userKey,\n            );\n          } else {\n            return await this.encryptService.decryptItems(\n              groupedCiphers,\n              keys.orgKeys[orgId as OrganizationId] ?? keys.userKey,\n            );\n          }\n        }),\n      )\n    )\n      .flat()\n      .sort(this.getLocaleSortingFunction());\n\n    // Split ciphers into two arrays, one for successfully decrypted ciphers and one for ciphers that failed to decrypt\n    return allCipherViews.reduce(\n      (acc, c) => {\n        if (c.decryptionFailure) {\n          acc[1].push(c);\n        } else {\n          acc[0].push(c);\n        }\n        return acc;\n      },\n      [[], []] as [CipherView[], CipherView[]],\n    );\n  }\n\n  private async reindexCiphers() {\n    const userId = await this.stateService.getUserId();\n    const reindexRequired =\n      this.searchService != null &&\n      ((await firstValueFrom(this.searchService.indexedEntityId$)) ?? userId) !== userId;\n    if (reindexRequired) {\n      await this.searchService.indexCiphers(await this.getDecryptedCiphers(), userId);\n    }\n  }\n\n  async getAllDecryptedForGrouping(groupingId: string, folder = true): Promise<CipherView[]> {\n    const ciphers = await this.getAllDecrypted();\n\n    return ciphers.filter((cipher) => {\n      if (cipher.isDeleted) {\n        return false;\n      }\n      if (folder && cipher.folderId === groupingId) {\n        return true;\n      } else if (\n        !folder &&\n        cipher.collectionIds != null &&\n        cipher.collectionIds.indexOf(groupingId) > -1\n      ) {\n        return true;\n      }\n\n      return false;\n    });\n  }\n\n  async getAllDecryptedForUrl(\n    url: string,\n    includeOtherTypes?: CipherType[],\n    defaultMatch: UriMatchStrategySetting = null,\n  ): Promise<CipherView[]> {\n    const ciphers = await this.getAllDecrypted();\n    return await this.filterCiphersForUrl(ciphers, url, includeOtherTypes, defaultMatch);\n  }\n\n  async filterCiphersForUrl(\n    ciphers: CipherView[],\n    url: string,\n    includeOtherTypes?: CipherType[],\n    defaultMatch: UriMatchStrategySetting = null,\n  ): Promise<CipherView[]> {\n    if (url == null && includeOtherTypes == null) {\n      return [];\n    }\n\n    const equivalentDomains = await firstValueFrom(\n      this.domainSettingsService.getUrlEquivalentDomains(url),\n    );\n    defaultMatch ??= await firstValueFrom(this.domainSettingsService.defaultUriMatchStrategy$);\n\n    return ciphers.filter((cipher) => {\n      const cipherIsLogin = cipher.type === CipherType.Login && cipher.login !== null;\n\n      if (cipher.deletedDate !== null) {\n        return false;\n      }\n\n      if (\n        Array.isArray(includeOtherTypes) &&\n        includeOtherTypes.includes(cipher.type) &&\n        !cipherIsLogin\n      ) {\n        return true;\n      }\n\n      if (cipherIsLogin) {\n        return cipher.login.matchesUri(url, equivalentDomains, defaultMatch);\n      }\n\n      return false;\n    });\n  }\n\n  private async getAllDecryptedCiphersOfType(type: CipherType[]): Promise<CipherView[]> {\n    const ciphers = await this.getAllDecrypted();\n    return ciphers\n      .filter((cipher) => cipher.deletedDate == null && type.includes(cipher.type))\n      .sort((a, b) => this.sortCiphersByLastUsedThenName(a, b));\n  }\n\n  async getAllFromApiForOrganization(organizationId: string): Promise<CipherView[]> {\n    const response = await this.apiService.getCiphersOrganization(organizationId);\n    return await this.decryptOrganizationCiphersResponse(response, organizationId);\n  }\n\n  async getManyFromApiForOrganization(organizationId: string): Promise<CipherView[]> {\n    const response = await this.apiService.send(\n      \"GET\",\n      \"/ciphers/organization-details/assigned?organizationId=\" + organizationId,\n      null,\n      true,\n      true,\n    );\n    return this.decryptOrganizationCiphersResponse(response, organizationId);\n  }\n\n  private async decryptOrganizationCiphersResponse(\n    response: ListResponse<CipherResponse>,\n    organizationId: string,\n  ): Promise<CipherView[]> {\n    if (response?.data == null || response.data.length < 1) {\n      return [];\n    }\n\n    const ciphers = response.data.map((cr) => new Cipher(new CipherData(cr)));\n    const key = await this.keyService.getOrgKey(organizationId);\n    let decCiphers: CipherView[] = [];\n    if (await this.configService.getFeatureFlag(FeatureFlag.PM4154_BulkEncryptionService)) {\n      decCiphers = await this.bulkEncryptService.decryptItems(ciphers, key);\n    } else {\n      decCiphers = await this.encryptService.decryptItems(ciphers, key);\n    }\n\n    decCiphers.sort(this.getLocaleSortingFunction());\n    return decCiphers;\n  }\n\n  async getLastUsedForUrl(url: string, autofillOnPageLoad = false): Promise<CipherView> {\n    return this.getCipherForUrl(url, true, false, autofillOnPageLoad);\n  }\n\n  async getLastLaunchedForUrl(url: string, autofillOnPageLoad = false): Promise<CipherView> {\n    return this.getCipherForUrl(url, false, true, autofillOnPageLoad);\n  }\n\n  async getNextCipherForUrl(url: string): Promise<CipherView> {\n    return this.getCipherForUrl(url, false, false, false);\n  }\n\n  async getNextCardCipher(): Promise<CipherView> {\n    const cacheKey = \"cardCiphers\";\n\n    if (!this.sortedCiphersCache.isCached(cacheKey)) {\n      const ciphers = await this.getAllDecryptedCiphersOfType([CipherType.Card]);\n      if (!ciphers?.length) {\n        return null;\n      }\n\n      this.sortedCiphersCache.addCiphers(cacheKey, ciphers);\n    }\n\n    return this.sortedCiphersCache.getNext(cacheKey);\n  }\n\n  async getNextIdentityCipher(): Promise<CipherView> {\n    const cacheKey = \"identityCiphers\";\n\n    if (!this.sortedCiphersCache.isCached(cacheKey)) {\n      const ciphers = await this.getAllDecryptedCiphersOfType([CipherType.Identity]);\n      if (!ciphers?.length) {\n        return null;\n      }\n\n      this.sortedCiphersCache.addCiphers(cacheKey, ciphers);\n    }\n\n    return this.sortedCiphersCache.getNext(cacheKey);\n  }\n\n  updateLastUsedIndexForUrl(url: string) {\n    this.sortedCiphersCache.updateLastUsedIndex(url);\n  }\n\n  async updateLastUsedDate(id: string): Promise<void> {\n    const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n    let ciphersLocalData = await firstValueFrom(this.localData$);\n\n    if (!ciphersLocalData) {\n      ciphersLocalData = {};\n    }\n\n    const cipherId = id as CipherId;\n    if (ciphersLocalData[cipherId]) {\n      ciphersLocalData[cipherId].lastUsedDate = new Date().getTime();\n    } else {\n      ciphersLocalData[cipherId] = {\n        lastUsedDate: new Date().getTime(),\n      };\n    }\n\n    await this.localDataState.update(() => ciphersLocalData);\n\n    const decryptedCipherCache = await this.getDecryptedCiphers();\n    if (!decryptedCipherCache) {\n      return;\n    }\n\n    for (let i = 0; i < decryptedCipherCache.length; i++) {\n      const cached = decryptedCipherCache[i];\n      if (cached.id === id) {\n        cached.localData = ciphersLocalData[id as CipherId];\n        break;\n      }\n    }\n    await this.setDecryptedCiphers(decryptedCipherCache, userId);\n  }\n\n  async updateLastLaunchedDate(id: string): Promise<void> {\n    const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n    let ciphersLocalData = await firstValueFrom(this.localData$);\n\n    if (!ciphersLocalData) {\n      ciphersLocalData = {};\n    }\n\n    const currentTime = new Date().getTime();\n    ciphersLocalData[id as CipherId] = {\n      lastLaunched: currentTime,\n      lastUsedDate: currentTime,\n    };\n\n    await this.localDataState.update(() => ciphersLocalData);\n\n    const decryptedCipherCache = await this.getDecryptedCiphers();\n    if (!decryptedCipherCache) {\n      return;\n    }\n\n    for (let i = 0; i < decryptedCipherCache.length; i++) {\n      const cached = decryptedCipherCache[i];\n      if (cached.id === id) {\n        cached.localData = ciphersLocalData[id as CipherId];\n        break;\n      }\n    }\n    await this.setDecryptedCiphers(decryptedCipherCache, userId);\n  }\n\n  async saveNeverDomain(domain: string): Promise<void> {\n    if (domain == null) {\n      return;\n    }\n\n    let domains = await firstValueFrom(this.domainSettingsService.neverDomains$);\n    if (!domains) {\n      domains = {};\n    }\n    domains[domain] = null;\n    await this.domainSettingsService.setNeverDomains(domains);\n  }\n\n  async createWithServer(cipher: Cipher, orgAdmin?: boolean): Promise<Cipher> {\n    let response: CipherResponse;\n    if (orgAdmin && cipher.organizationId != null) {\n      const request = new CipherCreateRequest(cipher);\n      response = await this.apiService.postCipherAdmin(request);\n      const data = new CipherData(response, cipher.collectionIds);\n      return new Cipher(data);\n    } else if (cipher.collectionIds != null) {\n      const request = new CipherCreateRequest(cipher);\n      response = await this.apiService.postCipherCreate(request);\n    } else {\n      const request = new CipherRequest(cipher);\n      response = await this.apiService.postCipher(request);\n    }\n    cipher.id = response.id;\n\n    const data = new CipherData(response, cipher.collectionIds);\n    const updated = await this.upsert(data);\n    // No local data for new ciphers\n    return new Cipher(updated[cipher.id as CipherId]);\n  }\n\n  async updateWithServer(cipher: Cipher, orgAdmin?: boolean): Promise<Cipher> {\n    let response: CipherResponse;\n    if (orgAdmin) {\n      const request = new CipherRequest(cipher);\n      response = await this.apiService.putCipherAdmin(cipher.id, request);\n      const data = new CipherData(response, cipher.collectionIds);\n      return new Cipher(data, cipher.localData);\n    } else if (cipher.edit) {\n      const request = new CipherRequest(cipher);\n      response = await this.apiService.putCipher(cipher.id, request);\n    } else {\n      const request = new CipherPartialRequest(cipher);\n      response = await this.apiService.putPartialCipher(cipher.id, request);\n    }\n\n    const data = new CipherData(response, cipher.collectionIds);\n    const updated = await this.upsert(data);\n    // updating with server does not change local data\n    return new Cipher(updated[cipher.id as CipherId], cipher.localData);\n  }\n\n  async shareWithServer(\n    cipher: CipherView,\n    organizationId: string,\n    collectionIds: string[],\n    userId: UserId,\n  ): Promise<any> {\n    const attachmentPromises: Promise<any>[] = [];\n    if (cipher.attachments != null) {\n      cipher.attachments.forEach((attachment) => {\n        if (attachment.key == null) {\n          attachmentPromises.push(\n            this.shareAttachmentWithServer(attachment, cipher.id, organizationId),\n          );\n        }\n      });\n    }\n    await Promise.all(attachmentPromises);\n\n    cipher.organizationId = organizationId;\n    cipher.collectionIds = collectionIds;\n    const encCipher = await this.encryptSharedCipher(cipher, userId);\n    const request = new CipherShareRequest(encCipher);\n    const response = await this.apiService.putShareCipher(cipher.id, request);\n    const data = new CipherData(response, collectionIds);\n    await this.upsert(data);\n  }\n\n  async shareManyWithServer(\n    ciphers: CipherView[],\n    organizationId: string,\n    collectionIds: string[],\n    userId: UserId,\n  ): Promise<any> {\n    const promises: Promise<any>[] = [];\n    const encCiphers: Cipher[] = [];\n    for (const cipher of ciphers) {\n      cipher.organizationId = organizationId;\n      cipher.collectionIds = collectionIds;\n      promises.push(\n        this.encryptSharedCipher(cipher, userId).then((c) => {\n          encCiphers.push(c);\n        }),\n      );\n    }\n    await Promise.all(promises);\n    const request = new CipherBulkShareRequest(encCiphers, collectionIds);\n    try {\n      await this.apiService.putShareCiphers(request);\n    } catch (e) {\n      for (const cipher of ciphers) {\n        cipher.organizationId = null;\n        cipher.collectionIds = null;\n      }\n      throw e;\n    }\n    await this.upsert(encCiphers.map((c) => c.toCipherData()));\n  }\n\n  saveAttachmentWithServer(\n    cipher: Cipher,\n    unencryptedFile: any,\n    userId: UserId,\n    admin = false,\n  ): Promise<Cipher> {\n    return new Promise((resolve, reject) => {\n      const reader = new FileReader();\n      reader.readAsArrayBuffer(unencryptedFile);\n      reader.onload = async (evt: any) => {\n        try {\n          const cData = await this.saveAttachmentRawWithServer(\n            cipher,\n            unencryptedFile.name,\n            evt.target.result,\n            userId,\n            admin,\n          );\n          resolve(cData);\n        } catch (e) {\n          reject(e);\n        }\n      };\n      reader.onerror = () => {\n        reject(\"Error reading file.\");\n      };\n    });\n  }\n\n  async saveAttachmentRawWithServer(\n    cipher: Cipher,\n    filename: string,\n    data: Uint8Array,\n    userId: UserId,\n    admin = false,\n  ): Promise<Cipher> {\n    const encKey = await this.getKeyForCipherKeyDecryption(cipher, userId);\n    const cipherKeyEncryptionEnabled = await this.getCipherKeyEncryptionEnabled();\n\n    const cipherEncKey =\n      cipherKeyEncryptionEnabled && cipher.key != null\n        ? (new SymmetricCryptoKey(\n            await this.encryptService.decryptToBytes(cipher.key, encKey),\n          ) as UserKey)\n        : encKey;\n\n    //if cipher key encryption is disabled but the item has an individual key,\n    //then we rollback to using the user key as the main key of encryption of the item\n    //in order to keep item and it's attachments with the same encryption level\n    if (cipher.key != null && !cipherKeyEncryptionEnabled) {\n      const model = await cipher.decrypt(await this.getKeyForCipherKeyDecryption(cipher, userId));\n      cipher = await this.encrypt(model, userId);\n      await this.updateWithServer(cipher);\n    }\n\n    const encFileName = await this.encryptService.encrypt(filename, cipherEncKey);\n\n    const dataEncKey = await this.keyService.makeDataEncKey(cipherEncKey);\n    const encData = await this.encryptService.encryptToBytes(new Uint8Array(data), dataEncKey[0]);\n\n    const response = await this.cipherFileUploadService.upload(\n      cipher,\n      encFileName,\n      encData,\n      admin,\n      dataEncKey,\n    );\n\n    const cData = new CipherData(response, cipher.collectionIds);\n    if (!admin) {\n      await this.upsert(cData);\n    }\n    return new Cipher(cData);\n  }\n\n  async saveCollectionsWithServer(cipher: Cipher): Promise<Cipher> {\n    const request = new CipherCollectionsRequest(cipher.collectionIds);\n    const response = await this.apiService.putCipherCollections(cipher.id, request);\n    // The response will now check for an unavailable value. This value determines whether\n    // the user still has Can Manage access to the item after updating.\n    if (response.unavailable) {\n      await this.delete(cipher.id);\n      return;\n    }\n    const data = new CipherData(response.cipher);\n    const updated = await this.upsert(data);\n    return new Cipher(updated[cipher.id as CipherId], cipher.localData);\n  }\n\n  async saveCollectionsWithServerAdmin(cipher: Cipher): Promise<Cipher> {\n    const request = new CipherCollectionsRequest(cipher.collectionIds);\n    const response = await this.apiService.putCipherCollectionsAdmin(cipher.id, request);\n    const data = new CipherData(response);\n    return new Cipher(data);\n  }\n\n  /**\n   * Bulk update collections for many ciphers with the server\n   * @param orgId\n   * @param cipherIds\n   * @param collectionIds\n   * @param removeCollections - If true, the collectionIds will be removed from the ciphers, otherwise they will be added\n   */\n  async bulkUpdateCollectionsWithServer(\n    orgId: OrganizationId,\n    cipherIds: CipherId[],\n    collectionIds: CollectionId[],\n    removeCollections: boolean = false,\n  ): Promise<void> {\n    const request = new CipherBulkUpdateCollectionsRequest(\n      orgId,\n      cipherIds,\n      collectionIds,\n      removeCollections,\n    );\n\n    await this.apiService.send(\"POST\", \"/ciphers/bulk-collections\", request, true, false);\n\n    // Update the local state\n    const ciphers = await firstValueFrom(this.ciphers$);\n\n    for (const id of cipherIds) {\n      const cipher = ciphers[id];\n      if (cipher) {\n        if (removeCollections) {\n          cipher.collectionIds = cipher.collectionIds?.filter(\n            (cid) => !collectionIds.includes(cid as CollectionId),\n          );\n        } else {\n          // Append to the collectionIds if it's not already there\n          cipher.collectionIds = [...new Set([...(cipher.collectionIds ?? []), ...collectionIds])];\n        }\n      }\n    }\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => ciphers);\n  }\n\n  async upsert(cipher: CipherData | CipherData[]): Promise<Record<CipherId, CipherData>> {\n    const ciphers = cipher instanceof CipherData ? [cipher] : cipher;\n    return await this.updateEncryptedCipherState((current) => {\n      ciphers.forEach((c) => (current[c.id as CipherId] = c));\n      return current;\n    });\n  }\n\n  async replace(ciphers: { [id: string]: CipherData }, userId: UserId): Promise<any> {\n    await this.updateEncryptedCipherState(() => ciphers, userId);\n  }\n\n  /**\n   * Updates ciphers for the currently active user. Inactive users can only clear all ciphers, for now.\n   * @param update update callback for encrypted cipher data\n   * @returns\n   */\n  private async updateEncryptedCipherState(\n    update: (current: Record<CipherId, CipherData>) => Record<CipherId, CipherData>,\n    userId: UserId = null,\n  ): Promise<Record<CipherId, CipherData>> {\n    userId ||= await firstValueFrom(this.stateProvider.activeUserId$);\n    await this.clearDecryptedCiphersState(userId);\n    const updatedCiphers = await this.stateProvider\n      .getUser(userId, ENCRYPTED_CIPHERS)\n      .update((current) => {\n        const result = update(current ?? {});\n        return result;\n      });\n    return updatedCiphers;\n  }\n\n  async clear(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    await this.clearEncryptedCiphersState(userId);\n    await this.clearCache(userId);\n  }\n\n  async moveManyWithServer(ids: string[], folderId: string): Promise<any> {\n    await this.apiService.putMoveCiphers(new CipherBulkMoveRequest(ids, folderId));\n\n    let ciphers = await firstValueFrom(this.ciphers$);\n    if (ciphers == null) {\n      ciphers = {};\n    }\n\n    ids.forEach((id) => {\n      // eslint-disable-next-line\n      if (ciphers.hasOwnProperty(id)) {\n        ciphers[id as CipherId].folderId = folderId;\n      }\n    });\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => ciphers);\n  }\n\n  async delete(id: string | string[]): Promise<any> {\n    const ciphers = await firstValueFrom(this.ciphers$);\n    if (ciphers == null) {\n      return;\n    }\n\n    if (typeof id === \"string\") {\n      const cipherId = id as CipherId;\n      if (ciphers[cipherId] == null) {\n        return;\n      }\n      delete ciphers[cipherId];\n    } else {\n      (id as CipherId[]).forEach((i) => {\n        delete ciphers[i];\n      });\n    }\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => ciphers);\n  }\n\n  async deleteWithServer(id: string, asAdmin = false): Promise<any> {\n    if (asAdmin) {\n      await this.apiService.deleteCipherAdmin(id);\n    } else {\n      await this.apiService.deleteCipher(id);\n    }\n\n    await this.delete(id);\n  }\n\n  async deleteManyWithServer(ids: string[], asAdmin = false): Promise<any> {\n    const request = new CipherBulkDeleteRequest(ids);\n    if (asAdmin) {\n      await this.apiService.deleteManyCiphersAdmin(request);\n    } else {\n      await this.apiService.deleteManyCiphers(request);\n    }\n    await this.delete(ids);\n  }\n\n  async deleteAttachment(id: string, attachmentId: string): Promise<void> {\n    let ciphers = await firstValueFrom(this.ciphers$);\n    const cipherId = id as CipherId;\n    // eslint-disable-next-line\n    if (ciphers == null || !ciphers.hasOwnProperty(id) || ciphers[cipherId].attachments == null) {\n      return;\n    }\n\n    for (let i = 0; i < ciphers[cipherId].attachments.length; i++) {\n      if (ciphers[cipherId].attachments[i].id === attachmentId) {\n        ciphers[cipherId].attachments.splice(i, 1);\n      }\n    }\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => {\n      if (ciphers == null) {\n        ciphers = {};\n      }\n      return ciphers;\n    });\n  }\n\n  async deleteAttachmentWithServer(id: string, attachmentId: string): Promise<void> {\n    try {\n      await this.apiService.deleteCipherAttachment(id, attachmentId);\n    } catch (e) {\n      return Promise.reject((e as ErrorResponse).getSingleMessage());\n    }\n    await this.deleteAttachment(id, attachmentId);\n  }\n\n  sortCiphersByLastUsed(a: CipherView, b: CipherView): number {\n    const aLastUsed =\n      a.localData && a.localData.lastUsedDate ? (a.localData.lastUsedDate as number) : null;\n    const bLastUsed =\n      b.localData && b.localData.lastUsedDate ? (b.localData.lastUsedDate as number) : null;\n\n    const bothNotNull = aLastUsed != null && bLastUsed != null;\n    if (bothNotNull && aLastUsed < bLastUsed) {\n      return 1;\n    }\n    if (aLastUsed != null && bLastUsed == null) {\n      return -1;\n    }\n\n    if (bothNotNull && aLastUsed > bLastUsed) {\n      return -1;\n    }\n    if (bLastUsed != null && aLastUsed == null) {\n      return 1;\n    }\n\n    return 0;\n  }\n\n  sortCiphersByLastUsedThenName(a: CipherView, b: CipherView): number {\n    const result = this.sortCiphersByLastUsed(a, b);\n    if (result !== 0) {\n      return result;\n    }\n\n    return this.getLocaleSortingFunction()(a, b);\n  }\n\n  getLocaleSortingFunction(): (a: CipherView, b: CipherView) => number {\n    return (a, b) => {\n      let aName = a.name;\n      let bName = b.name;\n\n      if (aName == null && bName != null) {\n        return -1;\n      }\n      if (aName != null && bName == null) {\n        return 1;\n      }\n      if (aName == null && bName == null) {\n        return 0;\n      }\n\n      const result = this.i18nService.collator\n        ? this.i18nService.collator.compare(aName, bName)\n        : aName.localeCompare(bName);\n\n      if (result !== 0 || a.type !== CipherType.Login || b.type !== CipherType.Login) {\n        return result;\n      }\n\n      if (a.login.username != null) {\n        aName += a.login.username;\n      }\n\n      if (b.login.username != null) {\n        bName += b.login.username;\n      }\n\n      return this.i18nService.collator\n        ? this.i18nService.collator.compare(aName, bName)\n        : aName.localeCompare(bName);\n    };\n  }\n\n  async softDelete(id: string | string[]): Promise<any> {\n    let ciphers = await firstValueFrom(this.ciphers$);\n    if (ciphers == null) {\n      return;\n    }\n\n    const setDeletedDate = (cipherId: CipherId) => {\n      if (ciphers[cipherId] == null) {\n        return;\n      }\n      ciphers[cipherId].deletedDate = new Date().toISOString();\n    };\n\n    if (typeof id === \"string\") {\n      setDeletedDate(id as CipherId);\n    } else {\n      (id as string[]).forEach(setDeletedDate);\n    }\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => {\n      if (ciphers == null) {\n        ciphers = {};\n      }\n      return ciphers;\n    });\n  }\n\n  async softDeleteWithServer(id: string, asAdmin = false): Promise<any> {\n    if (asAdmin) {\n      await this.apiService.putDeleteCipherAdmin(id);\n    } else {\n      await this.apiService.putDeleteCipher(id);\n    }\n\n    await this.softDelete(id);\n  }\n\n  async softDeleteManyWithServer(ids: string[], asAdmin = false): Promise<any> {\n    const request = new CipherBulkDeleteRequest(ids);\n    if (asAdmin) {\n      await this.apiService.putDeleteManyCiphersAdmin(request);\n    } else {\n      await this.apiService.putDeleteManyCiphers(request);\n    }\n\n    await this.softDelete(ids);\n  }\n\n  async restore(\n    cipher: { id: string; revisionDate: string } | { id: string; revisionDate: string }[],\n  ) {\n    let ciphers = await firstValueFrom(this.ciphers$);\n    if (ciphers == null) {\n      return;\n    }\n\n    const clearDeletedDate = (c: { id: string; revisionDate: string }) => {\n      const cipherId = c.id as CipherId;\n      if (ciphers[cipherId] == null) {\n        return;\n      }\n      ciphers[cipherId].deletedDate = null;\n      ciphers[cipherId].revisionDate = c.revisionDate;\n    };\n\n    if (cipher.constructor.name === Array.name) {\n      (cipher as { id: string; revisionDate: string }[]).forEach(clearDeletedDate);\n    } else {\n      clearDeletedDate(cipher as { id: string; revisionDate: string });\n    }\n\n    await this.clearCache();\n    await this.encryptedCiphersState.update(() => {\n      if (ciphers == null) {\n        ciphers = {};\n      }\n      return ciphers;\n    });\n  }\n\n  async restoreWithServer(id: string, asAdmin = false): Promise<any> {\n    let response;\n    if (asAdmin) {\n      response = await this.apiService.putRestoreCipherAdmin(id);\n    } else {\n      response = await this.apiService.putRestoreCipher(id);\n    }\n\n    await this.restore({ id: id, revisionDate: response.revisionDate });\n  }\n\n  /**\n   * No longer using an asAdmin Param. Org Vault bulkRestore will assess if an item is unassigned or editable\n   * The Org Vault will pass those ids an array as well as the orgId when calling bulkRestore\n   */\n  async restoreManyWithServer(ids: string[], orgId: string = null): Promise<void> {\n    let response;\n\n    if (orgId) {\n      const request = new CipherBulkRestoreRequest(ids, orgId);\n      response = await this.apiService.putRestoreManyCiphersAdmin(request);\n    } else {\n      const request = new CipherBulkRestoreRequest(ids);\n      response = await this.apiService.putRestoreManyCiphers(request);\n    }\n\n    const restores: { id: string; revisionDate: string }[] = [];\n    for (const cipher of response.data) {\n      restores.push({ id: cipher.id, revisionDate: cipher.revisionDate });\n    }\n    await this.restore(restores);\n  }\n\n  async getKeyForCipherKeyDecryption(cipher: Cipher, userId: UserId): Promise<UserKey | OrgKey> {\n    return (\n      (await this.keyService.getOrgKey(cipher.organizationId)) ||\n      ((await this.keyService.getUserKeyWithLegacySupport(userId)) as UserKey)\n    );\n  }\n\n  async setAddEditCipherInfo(value: AddEditCipherInfo) {\n    await this.addEditCipherInfoState.update(() => value, {\n      shouldUpdate: (current) => !(current == null && value == null),\n    });\n  }\n\n  async getRotatedData(\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<CipherWithIdRequest[]> {\n    if (originalUserKey == null) {\n      throw new Error(\"Original user key is required to rotate ciphers\");\n    }\n    if (newUserKey == null) {\n      throw new Error(\"New user key is required to rotate ciphers\");\n    }\n\n    let encryptedCiphers: CipherWithIdRequest[] = [];\n\n    const ciphers = await firstValueFrom(this.cipherViews$);\n    const failedCiphers = await firstValueFrom(this.failedToDecryptCiphers$);\n    if (!ciphers) {\n      return encryptedCiphers;\n    }\n\n    if (failedCiphers.length > 0) {\n      throw new Error(\"Cannot rotate ciphers when decryption failures are present\");\n    }\n\n    const userCiphers = ciphers.filter((c) => c.organizationId == null);\n    if (userCiphers.length === 0) {\n      return encryptedCiphers;\n    }\n    encryptedCiphers = await Promise.all(\n      userCiphers.map(async (cipher) => {\n        const encryptedCipher = await this.encrypt(cipher, userId, newUserKey, originalUserKey);\n        return new CipherWithIdRequest(encryptedCipher);\n      }),\n    );\n\n    return encryptedCiphers;\n  }\n\n  // Helpers\n\n  // In the case of a cipher that is being shared with an organization, we want to decrypt the\n  // cipher key with the user's key and then re-encrypt it with the organization's key.\n  private async encryptSharedCipher(model: CipherView, userId: UserId): Promise<Cipher> {\n    const keyForCipherKeyDecryption = await this.keyService.getUserKeyWithLegacySupport(userId);\n    return await this.encrypt(model, userId, null, keyForCipherKeyDecryption);\n  }\n\n  private async updateModelfromExistingCipher(\n    model: CipherView,\n    originalCipher: Cipher,\n    userId: UserId,\n  ): Promise<void> {\n    const existingCipher = await originalCipher.decrypt(\n      await this.getKeyForCipherKeyDecryption(originalCipher, userId),\n    );\n    model.passwordHistory = existingCipher.passwordHistory || [];\n    if (model.type === CipherType.Login && existingCipher.type === CipherType.Login) {\n      if (\n        existingCipher.login.password != null &&\n        existingCipher.login.password !== \"\" &&\n        existingCipher.login.password !== model.login.password\n      ) {\n        const ph = new PasswordHistoryView();\n        ph.password = existingCipher.login.password;\n        ph.lastUsedDate = model.login.passwordRevisionDate = new Date();\n        model.passwordHistory.splice(0, 0, ph);\n      } else {\n        model.login.passwordRevisionDate = existingCipher.login.passwordRevisionDate;\n      }\n    }\n    if (existingCipher.hasFields) {\n      const existingHiddenFields = existingCipher.fields.filter(\n        (f) =>\n          f.type === FieldType.Hidden &&\n          f.name != null &&\n          f.name !== \"\" &&\n          f.value != null &&\n          f.value !== \"\",\n      );\n      const hiddenFields =\n        model.fields == null\n          ? []\n          : model.fields.filter(\n              (f) => f.type === FieldType.Hidden && f.name != null && f.name !== \"\",\n            );\n      existingHiddenFields.forEach((ef) => {\n        const matchedField = hiddenFields.find((f) => f.name === ef.name);\n        if (matchedField == null || matchedField.value !== ef.value) {\n          const ph = new PasswordHistoryView();\n          ph.password = ef.name + \": \" + ef.value;\n          ph.lastUsedDate = new Date();\n          model.passwordHistory.splice(0, 0, ph);\n        }\n      });\n    }\n  }\n\n  private adjustPasswordHistoryLength(model: CipherView) {\n    if (model.passwordHistory != null && model.passwordHistory.length === 0) {\n      model.passwordHistory = null;\n    } else if (model.passwordHistory != null && model.passwordHistory.length > 5) {\n      // only save last 5 history\n      model.passwordHistory = model.passwordHistory.slice(0, 5);\n    }\n  }\n\n  private async shareAttachmentWithServer(\n    attachmentView: AttachmentView,\n    cipherId: string,\n    organizationId: string,\n  ): Promise<any> {\n    const attachmentResponse = await this.apiService.nativeFetch(\n      new Request(attachmentView.url, { cache: \"no-store\" }),\n    );\n    if (attachmentResponse.status !== 200) {\n      throw Error(\"Failed to download attachment: \" + attachmentResponse.status.toString());\n    }\n\n    const encBuf = await EncArrayBuffer.fromResponse(attachmentResponse);\n    const activeUserId = await firstValueFrom(this.accountService.activeAccount$);\n    const userKey = await this.keyService.getUserKeyWithLegacySupport(activeUserId.id);\n    const decBuf = await this.encryptService.decryptToBytes(encBuf, userKey);\n\n    let encKey: UserKey | OrgKey;\n    encKey = await this.keyService.getOrgKey(organizationId);\n    encKey ||= (await this.keyService.getUserKeyWithLegacySupport()) as UserKey;\n\n    const dataEncKey = await this.keyService.makeDataEncKey(encKey);\n\n    const encFileName = await this.encryptService.encrypt(attachmentView.fileName, encKey);\n    const encData = await this.encryptService.encryptToBytes(new Uint8Array(decBuf), dataEncKey[0]);\n\n    const fd = new FormData();\n    try {\n      const blob = new Blob([encData.buffer], { type: \"application/octet-stream\" });\n      fd.append(\"key\", dataEncKey[1].encryptedString);\n      fd.append(\"data\", blob, encFileName.encryptedString);\n    } catch (e) {\n      if (Utils.isNode && !Utils.isBrowser) {\n        fd.append(\"key\", dataEncKey[1].encryptedString);\n        fd.append(\n          \"data\",\n          Buffer.from(encData.buffer) as any,\n          {\n            filepath: encFileName.encryptedString,\n            contentType: \"application/octet-stream\",\n          } as any,\n        );\n      } else {\n        throw e;\n      }\n    }\n\n    try {\n      await this.apiService.postShareCipherAttachment(\n        cipherId,\n        attachmentView.id,\n        fd,\n        organizationId,\n      );\n    } catch (e) {\n      throw new Error((e as ErrorResponse).getSingleMessage());\n    }\n  }\n\n  private async encryptObjProperty<V extends View, D extends Domain>(\n    model: V,\n    obj: D,\n    map: any,\n    key: SymmetricCryptoKey,\n  ): Promise<void> {\n    const promises = [];\n    const self = this;\n\n    for (const prop in map) {\n      // eslint-disable-next-line\n      if (!map.hasOwnProperty(prop)) {\n        continue;\n      }\n\n      (function (theProp, theObj) {\n        const p = Promise.resolve()\n          .then(() => {\n            const modelProp = (model as any)[map[theProp] || theProp];\n            if (modelProp && modelProp !== \"\") {\n              return self.encryptService.encrypt(modelProp, key);\n            }\n            return null;\n          })\n          .then((val: EncString) => {\n            (theObj as any)[theProp] = val;\n          });\n        promises.push(p);\n      })(prop, obj);\n    }\n\n    await Promise.all(promises);\n  }\n\n  private async encryptCipherData(cipher: Cipher, model: CipherView, key: SymmetricCryptoKey) {\n    switch (cipher.type) {\n      case CipherType.Login:\n        cipher.login = new Login();\n        cipher.login.passwordRevisionDate = model.login.passwordRevisionDate;\n        cipher.login.autofillOnPageLoad = model.login.autofillOnPageLoad;\n        await this.encryptObjProperty(\n          model.login,\n          cipher.login,\n          {\n            username: null,\n            password: null,\n            totp: null,\n          },\n          key,\n        );\n\n        if (model.login.uris != null) {\n          cipher.login.uris = [];\n          model.login.uris = model.login.uris.filter((u) => u.uri != null && u.uri !== \"\");\n          for (let i = 0; i < model.login.uris.length; i++) {\n            const loginUri = new LoginUri();\n            loginUri.match = model.login.uris[i].match;\n            await this.encryptObjProperty(\n              model.login.uris[i],\n              loginUri,\n              {\n                uri: null,\n              },\n              key,\n            );\n            const uriHash = await this.encryptService.hash(model.login.uris[i].uri, \"sha256\");\n            loginUri.uriChecksum = await this.encryptService.encrypt(uriHash, key);\n            cipher.login.uris.push(loginUri);\n          }\n        }\n\n        if (model.login.fido2Credentials != null) {\n          cipher.login.fido2Credentials = await Promise.all(\n            model.login.fido2Credentials.map(async (viewKey) => {\n              const domainKey = new Fido2Credential();\n              await this.encryptObjProperty(\n                viewKey,\n                domainKey,\n                {\n                  credentialId: null,\n                  keyType: null,\n                  keyAlgorithm: null,\n                  keyCurve: null,\n                  keyValue: null,\n                  rpId: null,\n                  rpName: null,\n                  userHandle: null,\n                  userName: null,\n                  userDisplayName: null,\n                  origin: null,\n                },\n                key,\n              );\n              domainKey.counter = await this.encryptService.encrypt(String(viewKey.counter), key);\n              domainKey.discoverable = await this.encryptService.encrypt(\n                String(viewKey.discoverable),\n                key,\n              );\n              domainKey.creationDate = viewKey.creationDate;\n              return domainKey;\n            }),\n          );\n        }\n        return;\n      case CipherType.SecureNote:\n        cipher.secureNote = new SecureNote();\n        cipher.secureNote.type = model.secureNote.type;\n        return;\n      case CipherType.Card:\n        cipher.card = new Card();\n        await this.encryptObjProperty(\n          model.card,\n          cipher.card,\n          {\n            cardholderName: null,\n            brand: null,\n            number: null,\n            expMonth: null,\n            expYear: null,\n            code: null,\n          },\n          key,\n        );\n        return;\n      case CipherType.Identity:\n        cipher.identity = new Identity();\n        await this.encryptObjProperty(\n          model.identity,\n          cipher.identity,\n          {\n            title: null,\n            firstName: null,\n            middleName: null,\n            lastName: null,\n            address1: null,\n            address2: null,\n            address3: null,\n            city: null,\n            state: null,\n            postalCode: null,\n            country: null,\n            company: null,\n            email: null,\n            phone: null,\n            ssn: null,\n            username: null,\n            passportNumber: null,\n            licenseNumber: null,\n          },\n          key,\n        );\n        return;\n      case CipherType.SshKey:\n        cipher.sshKey = new SshKey();\n        await this.encryptObjProperty(\n          model.sshKey,\n          cipher.sshKey,\n          {\n            privateKey: null,\n            publicKey: null,\n            keyFingerprint: null,\n          },\n          key,\n        );\n        return;\n      default:\n        throw new Error(\"Unknown cipher type.\");\n    }\n  }\n\n  private async getAutofillOnPageLoadDefault() {\n    return await firstValueFrom(this.autofillSettingsService.autofillOnPageLoadDefault$);\n  }\n\n  private async getCipherForUrl(\n    url: string,\n    lastUsed: boolean,\n    lastLaunched: boolean,\n    autofillOnPageLoad: boolean,\n  ): Promise<CipherView> {\n    const cacheKey = autofillOnPageLoad ? \"autofillOnPageLoad-\" + url : url;\n\n    if (!this.sortedCiphersCache.isCached(cacheKey)) {\n      let ciphers = await this.getAllDecryptedForUrl(url);\n      if (!ciphers) {\n        return null;\n      }\n\n      if (autofillOnPageLoad) {\n        const autofillOnPageLoadDefault = await this.getAutofillOnPageLoadDefault();\n\n        ciphers = ciphers.filter(\n          (cipher) =>\n            cipher.login.autofillOnPageLoad ||\n            (cipher.login.autofillOnPageLoad == null && autofillOnPageLoadDefault !== false),\n        );\n        if (ciphers.length === 0) {\n          return null;\n        }\n      }\n\n      this.sortedCiphersCache.addCiphers(cacheKey, ciphers);\n    }\n\n    if (lastLaunched) {\n      return this.sortedCiphersCache.getLastLaunched(cacheKey);\n    } else if (lastUsed) {\n      return this.sortedCiphersCache.getLastUsed(cacheKey);\n    } else {\n      return this.sortedCiphersCache.getNext(cacheKey);\n    }\n  }\n\n  private async clearEncryptedCiphersState(userId: UserId) {\n    await this.stateProvider.setUserState(ENCRYPTED_CIPHERS, {}, userId);\n  }\n\n  private async clearDecryptedCiphersState(userId: UserId) {\n    await this.setDecryptedCiphers(null, userId);\n    await this.setFailedDecryptedCiphers(null, userId);\n    this.clearSortedCiphers();\n  }\n\n  private clearSortedCiphers() {\n    this.sortedCiphersCache.clear();\n  }\n\n  /**\n   * Encrypts a cipher object.\n   * @param model The cipher view model.\n   * @param cipher The cipher object.\n   * @param key The encryption key to encrypt with. This can be the org key, user key or cipher key, but must never be null\n   */\n  private async encryptCipher(\n    model: CipherView,\n    cipher: Cipher,\n    key: SymmetricCryptoKey,\n  ): Promise<Cipher> {\n    if (key == null) {\n      throw new Error(\n        \"Key to encrypt cipher must not be null. Use the org key, user key or cipher key.\",\n      );\n    }\n\n    await Promise.all([\n      this.encryptObjProperty(\n        model,\n        cipher,\n        {\n          name: null,\n          notes: null,\n        },\n        key,\n      ),\n      this.encryptCipherData(cipher, model, key),\n      this.encryptFields(model.fields, key).then((fields) => {\n        cipher.fields = fields;\n      }),\n      this.encryptPasswordHistories(model.passwordHistory, key).then((ph) => {\n        cipher.passwordHistory = ph;\n      }),\n      this.encryptAttachments(model.attachments, key).then((attachments) => {\n        cipher.attachments = attachments;\n      }),\n    ]);\n    return cipher;\n  }\n\n  private async encryptCipherWithCipherKey(\n    model: CipherView,\n    cipher: Cipher,\n    keyForCipherKeyEncryption: SymmetricCryptoKey,\n    keyForCipherKeyDecryption: SymmetricCryptoKey,\n  ): Promise<Cipher> {\n    // First, we get the key for cipher key encryption, in its decrypted form\n    let decryptedCipherKey: SymmetricCryptoKey;\n    if (cipher.key == null) {\n      decryptedCipherKey = await this.keyService.makeCipherKey();\n    } else {\n      decryptedCipherKey = new SymmetricCryptoKey(\n        await this.encryptService.decryptToBytes(cipher.key, keyForCipherKeyDecryption),\n      );\n    }\n\n    // Then, we have to encrypt the cipher key with the proper key.\n    cipher.key = await this.encryptService.encrypt(\n      decryptedCipherKey.key,\n      keyForCipherKeyEncryption,\n    );\n\n    // Finally, we can encrypt the cipher with the decrypted cipher key.\n    return this.encryptCipher(model, cipher, decryptedCipherKey);\n  }\n\n  private async getCipherKeyEncryptionEnabled(): Promise<boolean> {\n    const featureEnabled = await this.configService.getFeatureFlag(FeatureFlag.CipherKeyEncryption);\n    const meetsServerVersion = await firstValueFrom(\n      this.configService.checkServerMeetsVersionRequirement$(CIPHER_KEY_ENC_MIN_SERVER_VER),\n    );\n    return featureEnabled && meetsServerVersion;\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { FOLDER_DISK, FOLDER_MEMORY, UserKeyDefinition } from \"../../../platform/state\";\nimport { FolderData } from \"../../models/data/folder.data\";\nimport { FolderView } from \"../../models/view/folder.view\";\n\nexport const FOLDER_ENCRYPTED_FOLDERS = UserKeyDefinition.record<FolderData>(\n  FOLDER_DISK,\n  \"folder\",\n  {\n    deserializer: (obj: Jsonify<FolderData>) => FolderData.fromJSON(obj),\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const FOLDER_DECRYPTED_FOLDERS = new UserKeyDefinition<FolderView[]>(\n  FOLDER_MEMORY,\n  \"decryptedFolders\",\n  {\n    deserializer: (obj: Jsonify<FolderView[]>) => obj?.map((f) => FolderView.fromJSON(f)) ?? [],\n    clearOn: [\"logout\", \"lock\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CryptoFunctionService } from \"../../platform/abstractions/crypto-function.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { TotpService as TotpServiceAbstraction } from \"../abstractions/totp.service\";\n\nconst B32Chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567\";\nconst SteamChars = \"23456789BCDFGHJKMNPQRTVWXY\";\n\nexport class TotpService implements TotpServiceAbstraction {\n  constructor(\n    private cryptoFunctionService: CryptoFunctionService,\n    private logService: LogService,\n  ) {}\n\n  async getCode(key: string): Promise<string> {\n    if (key == null) {\n      return null;\n    }\n    let period = 30;\n    let alg: \"sha1\" | \"sha256\" | \"sha512\" = \"sha1\";\n    let digits = 6;\n    let keyB32 = key;\n    const isOtpAuth = key.toLowerCase().indexOf(\"otpauth://\") === 0;\n    const isSteamAuth = !isOtpAuth && key.toLowerCase().indexOf(\"steam://\") === 0;\n    if (isOtpAuth) {\n      const params = Utils.getQueryParams(key);\n      if (params.has(\"digits\") && params.get(\"digits\") != null) {\n        try {\n          const digitParams = parseInt(params.get(\"digits\").trim(), null);\n          if (digitParams > 10) {\n            digits = 10;\n          } else if (digitParams > 0) {\n            digits = digitParams;\n          }\n        } catch {\n          this.logService.error(\"Invalid digits param.\");\n        }\n      }\n      if (params.has(\"period\") && params.get(\"period\") != null) {\n        try {\n          const periodParam = parseInt(params.get(\"period\").trim(), null);\n          if (periodParam > 0) {\n            period = periodParam;\n          }\n        } catch {\n          this.logService.error(\"Invalid period param.\");\n        }\n      }\n      if (params.has(\"secret\") && params.get(\"secret\") != null) {\n        keyB32 = params.get(\"secret\");\n      }\n      if (params.has(\"algorithm\") && params.get(\"algorithm\") != null) {\n        const algParam = params.get(\"algorithm\").toLowerCase();\n        if (algParam === \"sha1\" || algParam === \"sha256\" || algParam === \"sha512\") {\n          alg = algParam;\n        }\n      }\n    } else if (isSteamAuth) {\n      keyB32 = key.substr(\"steam://\".length);\n      digits = 5;\n    }\n\n    const epoch = Math.round(new Date().getTime() / 1000.0);\n    const timeHex = this.leftPad(this.decToHex(Math.floor(epoch / period)), 16, \"0\");\n    const timeBytes = Utils.fromHexToArray(timeHex);\n    const keyBytes = this.b32ToBytes(keyB32);\n\n    if (!keyBytes.length || !timeBytes.length) {\n      return null;\n    }\n\n    const hash = await this.sign(keyBytes, timeBytes, alg);\n    if (hash.length === 0) {\n      return null;\n    }\n\n    const offset = hash[hash.length - 1] & 0xf;\n    const binary =\n      ((hash[offset] & 0x7f) << 24) |\n      ((hash[offset + 1] & 0xff) << 16) |\n      ((hash[offset + 2] & 0xff) << 8) |\n      (hash[offset + 3] & 0xff);\n\n    let otp = \"\";\n    if (isSteamAuth) {\n      let fullCode = binary & 0x7fffffff;\n      for (let i = 0; i < digits; i++) {\n        otp += SteamChars[fullCode % SteamChars.length];\n        fullCode = Math.trunc(fullCode / SteamChars.length);\n      }\n    } else {\n      otp = (binary % Math.pow(10, digits)).toString();\n      otp = this.leftPad(otp, digits, \"0\");\n    }\n\n    return otp;\n  }\n\n  getTimeInterval(key: string): number {\n    let period = 30;\n    if (key != null && key.toLowerCase().indexOf(\"otpauth://\") === 0) {\n      const params = Utils.getQueryParams(key);\n      if (params.has(\"period\") && params.get(\"period\") != null) {\n        try {\n          period = parseInt(params.get(\"period\").trim(), null);\n        } catch {\n          this.logService.error(\"Invalid period param.\");\n        }\n      }\n    }\n    return period;\n  }\n\n  // Helpers\n\n  private leftPad(s: string, l: number, p: string): string {\n    if (l + 1 >= s.length) {\n      s = Array(l + 1 - s.length).join(p) + s;\n    }\n    return s;\n  }\n\n  private decToHex(d: number): string {\n    return (d < 15.5 ? \"0\" : \"\") + Math.round(d).toString(16);\n  }\n\n  private b32ToHex(s: string): string {\n    s = s.toUpperCase();\n    let cleanedInput = \"\";\n\n    for (let i = 0; i < s.length; i++) {\n      if (B32Chars.indexOf(s[i]) < 0) {\n        continue;\n      }\n\n      cleanedInput += s[i];\n    }\n    s = cleanedInput;\n\n    let bits = \"\";\n    let hex = \"\";\n    for (let i = 0; i < s.length; i++) {\n      const byteIndex = B32Chars.indexOf(s.charAt(i));\n      if (byteIndex < 0) {\n        continue;\n      }\n      bits += this.leftPad(byteIndex.toString(2), 5, \"0\");\n    }\n    for (let i = 0; i + 4 <= bits.length; i += 4) {\n      const chunk = bits.substr(i, 4);\n      hex = hex + parseInt(chunk, 2).toString(16);\n    }\n    return hex;\n  }\n\n  private b32ToBytes(s: string): Uint8Array {\n    return Utils.fromHexToArray(this.b32ToHex(s));\n  }\n\n  private async sign(\n    keyBytes: Uint8Array,\n    timeBytes: Uint8Array,\n    alg: \"sha1\" | \"sha256\" | \"sha512\",\n  ) {\n    const signature = await this.cryptoFunctionService.hmac(timeBytes, keyBytes, alg);\n    return new Uint8Array(signature);\n  }\n}\n","import { VAULT_SETTINGS_DISK, KeyDefinition, UserKeyDefinition } from \"../../../platform/state\";\n\nexport const USER_ENABLE_PASSKEYS = new KeyDefinition<boolean>(\n  VAULT_SETTINGS_DISK,\n  \"enablePasskeys\",\n  {\n    deserializer: (obj) => obj,\n  },\n);\n\nexport const SHOW_CARDS_CURRENT_TAB = new UserKeyDefinition<boolean>(\n  VAULT_SETTINGS_DISK,\n  \"showCardsCurrentTab\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [], // do not clear user settings\n  },\n);\n\nexport const SHOW_IDENTITIES_CURRENT_TAB = new UserKeyDefinition<boolean>(\n  VAULT_SETTINGS_DISK,\n  \"showIdentitiesCurrentTab\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [], // do not clear user settings\n  },\n);\n\nexport const CLICK_ITEMS_AUTOFILL_VAULT_VIEW = new UserKeyDefinition<boolean>(\n  VAULT_SETTINGS_DISK,\n  \"clickItemsToAutofillOnVaultView\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [], // do not clear user settings\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ErrorHandler, Injectable, Injector, inject } from \"@angular/core\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\n@Injectable()\nexport class LoggingErrorHandler extends ErrorHandler {\n  /**\n   * When injecting services into an `ErrorHandler`, we must use the `Injector` manually to avoid circular dependency errors.\n   *\n   * https://stackoverflow.com/a/57115053\n   */\n  private injector = inject(Injector);\n\n  override handleError(error: any): void {\n    try {\n      const logService = this.injector.get(LogService, null);\n      logService.error(\"Unhandled error in angular\", error);\n    } catch {\n      super.handleError(error);\n    }\n  }\n}\n","import { Injectable, signal, WritableSignal } from \"@angular/core\";\nimport type { FormGroup } from \"@angular/forms\";\n\nimport {\n  FormCacheOptions,\n  SignalCacheOptions,\n  ViewCacheService,\n} from \"../abstractions/view-cache.service\";\n\n/**\n * The functionality of the {@link ViewCacheService} is only needed in the browser extension popup,\n * yet is provided to all clients to make sharing components easier.\n *\n * Non-extension clients use this noop implementation.\n *  */\n@Injectable({\n  providedIn: \"root\",\n})\nexport class NoopViewCacheService implements ViewCacheService {\n  /**\n   * Return a normal signal.\n   */\n  signal<T>(options: SignalCacheOptions<T>): WritableSignal<T> {\n    return signal(options.initialValue);\n  }\n\n  /**\n   * Return the original form group.\n   **/\n  formGroup<TFormGroup extends FormGroup>(options: FormCacheOptions<TFormGroup>): TFormGroup {\n    return options.control;\n  }\n}\n","import { Inject, Injectable } from \"@angular/core\";\nimport { fromEvent, map, merge, Observable, of, Subscription, switchMap } from \"rxjs\";\n\nimport { ThemeTypes, Theme } from \"@bitwarden/common/platform/enums\";\nimport { ThemeStateService } from \"@bitwarden/common/platform/theming/theme-state.service\";\n\nimport { SYSTEM_THEME_OBSERVABLE } from \"../../../services/injection-tokens\";\n\nimport { AbstractThemingService } from \"./theming.service.abstraction\";\n\n@Injectable()\nexport class AngularThemingService implements AbstractThemingService {\n  /**\n   * Creates a system theme observable based on watching the given window.\n   * @param window The window that should be watched for system theme changes.\n   * @returns An observable that will track the system theme.\n   */\n  static createSystemThemeFromWindow(window: Window): Observable<Theme> {\n    return merge(\n      // This observable should always emit at least once, so go and get the current system theme designation\n      of(AngularThemingService.getSystemThemeFromWindow(window)),\n      // Start listening to changes\n      fromEvent<MediaQueryListEvent>(\n        window.matchMedia(\"(prefers-color-scheme: dark)\"),\n        \"change\",\n      ).pipe(map((event) => (event.matches ? ThemeTypes.Dark : ThemeTypes.Light))),\n    );\n  }\n\n  /**\n   * Gets the currently active system theme based on the given window.\n   * @param window The window to query for the current theme.\n   * @returns The active system theme.\n   */\n  static getSystemThemeFromWindow(window: Window): Theme {\n    return window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n      ? ThemeTypes.Dark\n      : ThemeTypes.Light;\n  }\n\n  readonly theme$ = this.themeStateService.selectedTheme$.pipe(\n    switchMap((configuredTheme) => {\n      if (configuredTheme === ThemeTypes.System) {\n        return this.systemTheme$;\n      }\n\n      return of(configuredTheme);\n    }),\n  );\n\n  constructor(\n    private themeStateService: ThemeStateService,\n    @Inject(SYSTEM_THEME_OBSERVABLE)\n    private systemTheme$: Observable<Theme>,\n  ) {}\n\n  applyThemeChangesTo(document: Document): Subscription {\n    return this.theme$.subscribe((theme) => {\n      document.documentElement.classList.remove(\n        \"theme_\" + ThemeTypes.Light,\n        \"theme_\" + ThemeTypes.Dark,\n        \"theme_\" + ThemeTypes.Nord,\n        \"theme_\" + ThemeTypes.SolarizedDark,\n      );\n      document.documentElement.classList.add(\"theme_\" + theme);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ErrorHandler, LOCALE_ID, NgModule } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport {\n  OrganizationUserApiService,\n  DefaultOrganizationUserApiService,\n  CollectionService,\n  DefaultCollectionService,\n} from \"@bitwarden/admin-console/common\";\nimport {\n  SetPasswordJitService,\n  DefaultSetPasswordJitService,\n  RegistrationFinishService as RegistrationFinishServiceAbstraction,\n  DefaultRegistrationFinishService,\n  AnonLayoutWrapperDataService,\n  DefaultAnonLayoutWrapperDataService,\n  LoginComponentService,\n  DefaultLoginComponentService,\n  LoginDecryptionOptionsService,\n  DefaultLoginDecryptionOptionsService,\n  DefaultLoginApprovalComponentService,\n} from \"@bitwarden/auth/angular\";\nimport {\n  AuthRequestServiceAbstraction,\n  AuthRequestService,\n  PinServiceAbstraction,\n  PinService,\n  LoginStrategyServiceAbstraction,\n  LoginStrategyService,\n  LoginEmailServiceAbstraction,\n  LoginEmailService,\n  InternalUserDecryptionOptionsServiceAbstraction,\n  UserDecryptionOptionsService,\n  UserDecryptionOptionsServiceAbstraction,\n  LogoutReason,\n  RegisterRouteService,\n  AuthRequestApiService,\n  DefaultAuthRequestApiService,\n  DefaultLoginSuccessHandlerService,\n  LoginSuccessHandlerService,\n  LoginApprovalComponentServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService as ApiServiceAbstraction } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService as AuditServiceAbstraction } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService as EventCollectionServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { SearchService as SearchServiceAbstraction } from \"@bitwarden/common/abstractions/search.service\";\nimport { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService as VaultTimeoutServiceAbstraction } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport {\n  InternalOrganizationServiceAbstraction,\n  OrganizationService as OrganizationServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport {\n  OrgDomainInternalServiceAbstraction,\n  OrgDomainServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport {\n  InternalPolicyService,\n  PolicyService as PolicyServiceAbstraction,\n} from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { ProviderApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderService as ProviderServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { OrganizationApiService } from \"@bitwarden/common/admin-console/services/organization/organization-api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/services/organization/organization.service\";\nimport { OrgDomainApiService } from \"@bitwarden/common/admin-console/services/organization-domain/org-domain-api.service\";\nimport { OrgDomainService } from \"@bitwarden/common/admin-console/services/organization-domain/org-domain.service\";\nimport { DefaultOrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/services/organization-management-preferences/default-organization-management-preferences.service\";\nimport { PolicyApiService } from \"@bitwarden/common/admin-console/services/policy/policy-api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/services/policy/policy.service\";\nimport { ProviderApiService } from \"@bitwarden/common/admin-console/services/provider/provider-api.service\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/services/provider.service\";\nimport { AccountApiService as AccountApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport {\n  AccountService as AccountServiceAbstraction,\n  InternalAccountService,\n} from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AnonymousHubService as AnonymousHubServiceAbstraction } from \"@bitwarden/common/auth/abstractions/anonymous-hub.service\";\nimport { AuthService as AuthServiceAbstraction } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AvatarService as AvatarServiceAbstraction } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { DevicesServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices/devices.service.abstraction\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { KeyConnectorService as KeyConnectorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport {\n  InternalMasterPasswordServiceAbstraction,\n  MasterPasswordServiceAbstraction,\n} from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"@bitwarden/common/auth/abstractions/password-reset-enrollment.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TokenService as TokenServiceAbstraction } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService as TwoFactorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { UserVerificationApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { UserVerificationService as UserVerificationServiceAbstraction } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-api.service.abstraction\";\nimport { WebAuthnLoginPrfKeyServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login-prf-key.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AccountApiServiceImplementation } from \"@bitwarden/common/auth/services/account-api.service\";\nimport { AccountServiceImplementation } from \"@bitwarden/common/auth/services/account.service\";\nimport { AnonymousHubService } from \"@bitwarden/common/auth/services/anonymous-hub.service\";\nimport { AuthService } from \"@bitwarden/common/auth/services/auth.service\";\nimport { AvatarService } from \"@bitwarden/common/auth/services/avatar.service\";\nimport { DeviceTrustService } from \"@bitwarden/common/auth/services/device-trust.service.implementation\";\nimport { DevicesServiceImplementation } from \"@bitwarden/common/auth/services/devices/devices.service.implementation\";\nimport { DevicesApiServiceImplementation } from \"@bitwarden/common/auth/services/devices-api.service.implementation\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/services/key-connector.service\";\nimport { MasterPasswordService } from \"@bitwarden/common/auth/services/master-password/master-password.service\";\nimport { PasswordResetEnrollmentServiceImplementation } from \"@bitwarden/common/auth/services/password-reset-enrollment.service.implementation\";\nimport { SsoLoginService } from \"@bitwarden/common/auth/services/sso-login.service\";\nimport { TokenService } from \"@bitwarden/common/auth/services/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { UserVerificationApiService } from \"@bitwarden/common/auth/services/user-verification/user-verification-api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/services/user-verification/user-verification.service\";\nimport { WebAuthnLoginApiService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login-api.service\";\nimport { WebAuthnLoginPrfKeyService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login-prf-key.service\";\nimport { WebAuthnLoginService } from \"@bitwarden/common/auth/services/webauthn-login/webauthn-login.service\";\nimport {\n  AutofillSettingsServiceAbstraction,\n  AutofillSettingsService,\n} from \"@bitwarden/common/autofill/services/autofill-settings.service\";\nimport {\n  BadgeSettingsServiceAbstraction,\n  BadgeSettingsService,\n} from \"@bitwarden/common/autofill/services/badge-settings.service\";\nimport {\n  DomainSettingsService,\n  DefaultDomainSettingsService,\n} from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport {\n  BillingApiServiceAbstraction,\n  OrganizationBillingServiceAbstraction,\n} from \"@bitwarden/common/billing/abstractions\";\nimport { AccountBillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/account/account-billing-api.service.abstraction\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { OrganizationBillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/organizations/organization-billing-api.service.abstraction\";\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport { AccountBillingApiService } from \"@bitwarden/common/billing/services/account/account-billing-api.service\";\nimport { DefaultBillingAccountProfileStateService } from \"@bitwarden/common/billing/services/account/billing-account-profile-state.service\";\nimport { BillingApiService } from \"@bitwarden/common/billing/services/billing-api.service\";\nimport { OrganizationBillingApiService } from \"@bitwarden/common/billing/services/organization/organization-billing-api.service\";\nimport { OrganizationBillingService } from \"@bitwarden/common/billing/services/organization-billing.service\";\nimport { TaxService } from \"@bitwarden/common/billing/services/tax.service\";\nimport { AppIdService as AppIdServiceAbstraction } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { BulkEncryptService } from \"@bitwarden/common/platform/abstractions/bulk-encrypt.service\";\nimport { ConfigApiServiceAbstraction } from \"@bitwarden/common/platform/abstractions/config/config-api.service.abstraction\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService as CryptoFunctionServiceAbstraction } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport {\n  EnvironmentService,\n  RegionConfig,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { FileUploadService as FileUploadServiceAbstraction } from \"@bitwarden/common/platform/abstractions/file-upload/file-upload.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { KeyGenerationService as KeyGenerationServiceAbstraction } from \"@bitwarden/common/platform/abstractions/key-generation.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService as MessagingServiceAbstraction } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService as PlatformUtilsServiceAbstraction } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkClientFactory } from \"@bitwarden/common/platform/abstractions/sdk/sdk-client-factory\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { StateService as StateServiceAbstraction } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { ValidationService as ValidationServiceAbstraction } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { StateFactory } from \"@bitwarden/common/platform/factories/state-factory\";\nimport { Message, MessageListener, MessageSender } from \"@bitwarden/common/platform/messaging\";\n// eslint-disable-next-line no-restricted-imports -- Used for dependency injection\nimport { SubjectMessageSender } from \"@bitwarden/common/platform/messaging/internal\";\nimport { devFlagEnabled } from \"@bitwarden/common/platform/misc/flags\";\nimport { Account } from \"@bitwarden/common/platform/models/domain/account\";\nimport { GlobalState } from \"@bitwarden/common/platform/models/domain/global-state\";\nimport {\n  TaskSchedulerService,\n  DefaultTaskSchedulerService,\n} from \"@bitwarden/common/platform/scheduling\";\nimport { AppIdService } from \"@bitwarden/common/platform/services/app-id.service\";\nimport { ConfigApiService } from \"@bitwarden/common/platform/services/config/config-api.service\";\nimport { DefaultConfigService } from \"@bitwarden/common/platform/services/config/default-config.service\";\nimport { ConsoleLogService } from \"@bitwarden/common/platform/services/console-log.service\";\nimport { BulkEncryptServiceImplementation } from \"@bitwarden/common/platform/services/cryptography/bulk-encrypt.service.implementation\";\nimport { MultithreadEncryptServiceImplementation } from \"@bitwarden/common/platform/services/cryptography/multithread-encrypt.service.implementation\";\nimport { DefaultBroadcasterService } from \"@bitwarden/common/platform/services/default-broadcaster.service\";\nimport { DefaultEnvironmentService } from \"@bitwarden/common/platform/services/default-environment.service\";\nimport { DefaultServerSettingsService } from \"@bitwarden/common/platform/services/default-server-settings.service\";\nimport { FileUploadService } from \"@bitwarden/common/platform/services/file-upload/file-upload.service\";\nimport { KeyGenerationService } from \"@bitwarden/common/platform/services/key-generation.service\";\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { NoopNotificationsService } from \"@bitwarden/common/platform/services/noop-notifications.service\";\nimport { DefaultSdkService } from \"@bitwarden/common/platform/services/sdk/default-sdk.service\";\nimport { StateService } from \"@bitwarden/common/platform/services/state.service\";\nimport { StorageServiceProvider } from \"@bitwarden/common/platform/services/storage-service.provider\";\nimport { UserAutoUnlockKeyService } from \"@bitwarden/common/platform/services/user-auto-unlock-key.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/services/validation.service\";\nimport { WebCryptoFunctionService } from \"@bitwarden/common/platform/services/web-crypto-function.service\";\nimport {\n  ActiveUserStateProvider,\n  GlobalStateProvider,\n  SingleUserStateProvider,\n  StateProvider,\n  DerivedStateProvider,\n} from \"@bitwarden/common/platform/state\";\n/* eslint-disable import/no-restricted-paths -- We need the implementations to inject, but generally these should not be accessed */\nimport { DefaultActiveUserStateProvider } from \"@bitwarden/common/platform/state/implementations/default-active-user-state.provider\";\nimport { DefaultDerivedStateProvider } from \"@bitwarden/common/platform/state/implementations/default-derived-state.provider\";\nimport { DefaultGlobalStateProvider } from \"@bitwarden/common/platform/state/implementations/default-global-state.provider\";\nimport { DefaultSingleUserStateProvider } from \"@bitwarden/common/platform/state/implementations/default-single-user-state.provider\";\nimport { DefaultStateProvider } from \"@bitwarden/common/platform/state/implementations/default-state.provider\";\nimport { StateEventRegistrarService } from \"@bitwarden/common/platform/state/state-event-registrar.service\";\nimport { StateEventRunnerService } from \"@bitwarden/common/platform/state/state-event-runner.service\";\n/* eslint-enable import/no-restricted-paths */\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\n// eslint-disable-next-line no-restricted-imports -- Needed for DI\nimport { DefaultSyncService } from \"@bitwarden/common/platform/sync/internal\";\nimport {\n  DefaultThemeStateService,\n  ThemeStateService,\n} from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport { ApiService } from \"@bitwarden/common/services/api.service\";\nimport { AuditService } from \"@bitwarden/common/services/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/services/event/event-collection.service\";\nimport { EventUploadService } from \"@bitwarden/common/services/event/event-upload.service\";\nimport { NotificationsService } from \"@bitwarden/common/services/notifications.service\";\nimport { SearchService } from \"@bitwarden/common/services/search.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/services/vault-timeout/vault-timeout-settings.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/services/vault-timeout/vault-timeout.service\";\nimport {\n  PasswordStrengthService,\n  PasswordStrengthServiceAbstraction,\n} from \"@bitwarden/common/tools/password-strength\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service\";\nimport { SendApiService as SendApiServiceAbstraction } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendStateProvider as SendStateProvider } from \"@bitwarden/common/tools/send/services/send-state.provider\";\nimport { SendStateProvider as SendStateProviderAbstraction } from \"@bitwarden/common/tools/send/services/send-state.provider.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service\";\nimport {\n  InternalSendService,\n  SendService as SendServiceAbstraction,\n} from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { CipherService as CipherServiceAbstraction } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherFileUploadService as CipherFileUploadServiceAbstraction } from \"@bitwarden/common/vault/abstractions/file-upload/cipher-file-upload.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport {\n  FolderService as FolderServiceAbstraction,\n  InternalFolderService,\n} from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService as TotpServiceAbstraction } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { VaultSettingsService as VaultSettingsServiceAbstraction } from \"@bitwarden/common/vault/abstractions/vault-settings/vault-settings.service\";\nimport {\n  CipherAuthorizationService,\n  DefaultCipherAuthorizationService,\n} from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport { CipherService } from \"@bitwarden/common/vault/services/cipher.service\";\nimport { CipherFileUploadService } from \"@bitwarden/common/vault/services/file-upload/cipher-file-upload.service\";\nimport { FolderApiService } from \"@bitwarden/common/vault/services/folder/folder-api.service\";\nimport { FolderService } from \"@bitwarden/common/vault/services/folder/folder.service\";\nimport { TotpService } from \"@bitwarden/common/vault/services/totp.service\";\nimport { VaultSettingsService } from \"@bitwarden/common/vault/services/vault-settings/vault-settings.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport {\n  GeneratorHistoryService,\n  LocalGeneratorHistoryService,\n} from \"@bitwarden/generator-history\";\nimport {\n  legacyPasswordGenerationServiceFactory,\n  legacyUsernameGenerationServiceFactory,\n  PasswordGenerationServiceAbstraction,\n  UsernameGenerationServiceAbstraction,\n} from \"@bitwarden/generator-legacy\";\nimport {\n  ImportApiService,\n  ImportApiServiceAbstraction,\n  ImportService,\n  ImportServiceAbstraction,\n} from \"@bitwarden/importer/core\";\nimport {\n  KeyService,\n  DefaultKeyService,\n  BiometricStateService,\n  DefaultBiometricStateService,\n  BiometricsService,\n  DefaultKdfConfigService,\n  KdfConfigService,\n  UserAsymmetricKeysRegenerationService,\n  DefaultUserAsymmetricKeysRegenerationService,\n  UserAsymmetricKeysRegenerationApiService,\n  DefaultUserAsymmetricKeysRegenerationApiService,\n} from \"@bitwarden/key-management\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\nimport {\n  VaultExportService,\n  VaultExportServiceAbstraction,\n  OrganizationVaultExportService,\n  OrganizationVaultExportServiceAbstraction,\n  IndividualVaultExportService,\n  IndividualVaultExportServiceAbstraction,\n} from \"@bitwarden/vault-export-core\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { NewDeviceVerificationNoticeService } from \"../../../vault/src/services/new-device-verification-notice.service\";\nimport { FormValidationErrorsService as FormValidationErrorsServiceAbstraction } from \"../platform/abstractions/form-validation-errors.service\";\nimport { ViewCacheService } from \"../platform/abstractions/view-cache.service\";\nimport { FormValidationErrorsService } from \"../platform/services/form-validation-errors.service\";\nimport { LoggingErrorHandler } from \"../platform/services/logging-error-handler\";\nimport { NoopViewCacheService } from \"../platform/services/noop-view-cache.service\";\nimport { AngularThemingService } from \"../platform/services/theming/angular-theming.service\";\nimport { AbstractThemingService } from \"../platform/services/theming/theming.service.abstraction\";\nimport { safeProvider, SafeProvider } from \"../platform/utils/safe-provider\";\n\nimport {\n  LOCALES_DIRECTORY,\n  LOCKED_CALLBACK,\n  LOGOUT_CALLBACK,\n  LOG_MAC_FAILURES,\n  MEMORY_STORAGE,\n  OBSERVABLE_DISK_STORAGE,\n  OBSERVABLE_MEMORY_STORAGE,\n  SafeInjectionToken,\n  SECURE_STORAGE,\n  STATE_FACTORY,\n  SUPPORTS_SECURE_STORAGE,\n  SYSTEM_LANGUAGE,\n  SYSTEM_THEME_OBSERVABLE,\n  WINDOW,\n  DEFAULT_VAULT_TIMEOUT,\n  INTRAPROCESS_MESSAGING_SUBJECT,\n  CLIENT_TYPE,\n  REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n  ENV_ADDITIONAL_REGIONS,\n} from \"./injection-tokens\";\nimport { ModalService } from \"./modal.service\";\n\n/**\n * Provider definitions used in the ngModule.\n * Add your provider definition here using the safeProvider function as a wrapper. This will give you type safety.\n * If you need help please ask for it, do NOT change the type of this array.\n */\nconst safeProviders: SafeProvider[] = [\n  safeProvider(ModalService),\n  safeProvider(PasswordRepromptService),\n  safeProvider({ provide: WINDOW, useValue: window }),\n  safeProvider({\n    provide: LOCALE_ID as SafeInjectionToken<string>,\n    useFactory: (i18nService: I18nServiceAbstraction) => i18nService.translationLocale,\n    deps: [I18nServiceAbstraction],\n  }),\n  safeProvider({\n    provide: SUPPORTS_SECURE_STORAGE,\n    useFactory: (platformUtilsService: PlatformUtilsServiceAbstraction) =>\n      platformUtilsService.supportsSecureStorage(),\n    deps: [PlatformUtilsServiceAbstraction],\n  }),\n  safeProvider({\n    provide: LOCALES_DIRECTORY,\n    useValue: \"./locales\",\n  }),\n  safeProvider({\n    provide: SYSTEM_LANGUAGE,\n    useFactory: (window: Window) => window.navigator.language,\n    deps: [WINDOW],\n  }),\n  safeProvider({\n    provide: STATE_FACTORY,\n    useValue: new StateFactory(GlobalState, Account),\n  }),\n  safeProvider({\n    provide: LOGOUT_CALLBACK,\n    useFactory:\n      (messagingService: MessagingServiceAbstraction) =>\n      async (logoutReason: LogoutReason, userId?: string) => {\n        return Promise.resolve(\n          messagingService.send(\"logout\", { logoutReason: logoutReason, userId: userId }),\n        );\n      },\n    deps: [MessagingServiceAbstraction],\n  }),\n  safeProvider({\n    provide: LOCKED_CALLBACK,\n    useValue: null,\n  }),\n  safeProvider({\n    provide: LOG_MAC_FAILURES,\n    useValue: true,\n  }),\n  safeProvider({\n    provide: SYSTEM_THEME_OBSERVABLE,\n    useFactory: (window: Window) => AngularThemingService.createSystemThemeFromWindow(window),\n    deps: [WINDOW],\n  }),\n  safeProvider({\n    provide: ThemeStateService,\n    useClass: DefaultThemeStateService,\n    deps: [GlobalStateProvider, ConfigService],\n  }),\n  safeProvider({\n    provide: AbstractThemingService,\n    useClass: AngularThemingService,\n    deps: [ThemeStateService, SYSTEM_THEME_OBSERVABLE],\n  }),\n  safeProvider({\n    provide: AppIdServiceAbstraction,\n    useClass: AppIdService,\n    deps: [OBSERVABLE_DISK_STORAGE, LogService],\n  }),\n  safeProvider({\n    provide: AuditServiceAbstraction,\n    useClass: AuditService,\n    deps: [CryptoFunctionServiceAbstraction, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: AuthServiceAbstraction,\n    useClass: AuthService,\n    deps: [\n      AccountServiceAbstraction,\n      MessagingServiceAbstraction,\n      KeyService,\n      ApiServiceAbstraction,\n      StateServiceAbstraction,\n      TokenServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: LoginStrategyServiceAbstraction,\n    useClass: LoginStrategyService,\n    deps: [\n      AccountServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      KeyService,\n      ApiServiceAbstraction,\n      TokenServiceAbstraction,\n      AppIdServiceAbstraction,\n      PlatformUtilsServiceAbstraction,\n      MessagingServiceAbstraction,\n      LogService,\n      KeyConnectorServiceAbstraction,\n      EnvironmentService,\n      StateServiceAbstraction,\n      TwoFactorServiceAbstraction,\n      I18nServiceAbstraction,\n      EncryptService,\n      PasswordStrengthServiceAbstraction,\n      PolicyServiceAbstraction,\n      DeviceTrustServiceAbstraction,\n      AuthRequestServiceAbstraction,\n      InternalUserDecryptionOptionsServiceAbstraction,\n      GlobalStateProvider,\n      BillingAccountProfileStateService,\n      VaultTimeoutSettingsServiceAbstraction,\n      KdfConfigService,\n      TaskSchedulerService,\n    ],\n  }),\n  safeProvider({\n    provide: FileUploadServiceAbstraction,\n    useClass: FileUploadService,\n    deps: [LogService, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: CipherFileUploadServiceAbstraction,\n    useClass: CipherFileUploadService,\n    deps: [ApiServiceAbstraction, FileUploadServiceAbstraction],\n  }),\n  safeProvider({\n    provide: DomainSettingsService,\n    useClass: DefaultDomainSettingsService,\n    deps: [StateProvider, ConfigService],\n  }),\n  safeProvider({\n    provide: CipherServiceAbstraction,\n    useFactory: (\n      keyService: KeyService,\n      domainSettingsService: DomainSettingsService,\n      apiService: ApiServiceAbstraction,\n      i18nService: I18nServiceAbstraction,\n      searchService: SearchServiceAbstraction,\n      stateService: StateServiceAbstraction,\n      autofillSettingsService: AutofillSettingsServiceAbstraction,\n      encryptService: EncryptService,\n      bulkEncryptService: BulkEncryptService,\n      fileUploadService: CipherFileUploadServiceAbstraction,\n      configService: ConfigService,\n      stateProvider: StateProvider,\n      accountService: AccountServiceAbstraction,\n    ) =>\n      new CipherService(\n        keyService,\n        domainSettingsService,\n        apiService,\n        i18nService,\n        searchService,\n        stateService,\n        autofillSettingsService,\n        encryptService,\n        bulkEncryptService,\n        fileUploadService,\n        configService,\n        stateProvider,\n        accountService,\n      ),\n    deps: [\n      KeyService,\n      DomainSettingsService,\n      ApiServiceAbstraction,\n      I18nServiceAbstraction,\n      SearchServiceAbstraction,\n      StateServiceAbstraction,\n      AutofillSettingsServiceAbstraction,\n      EncryptService,\n      BulkEncryptService,\n      CipherFileUploadServiceAbstraction,\n      ConfigService,\n      StateProvider,\n      AccountServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: InternalFolderService,\n    useClass: FolderService,\n    deps: [\n      KeyService,\n      EncryptService,\n      I18nServiceAbstraction,\n      CipherServiceAbstraction,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: FolderServiceAbstraction,\n    useExisting: InternalFolderService,\n  }),\n  safeProvider({\n    provide: FolderApiServiceAbstraction,\n    useClass: FolderApiService,\n    deps: [InternalFolderService, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: AccountApiServiceAbstraction,\n    useClass: AccountApiServiceImplementation,\n    deps: [\n      ApiServiceAbstraction,\n      UserVerificationServiceAbstraction,\n      LogService,\n      InternalAccountService,\n      EnvironmentService,\n    ],\n  }),\n  safeProvider({\n    provide: InternalAccountService,\n    useClass: AccountServiceImplementation,\n    deps: [MessagingServiceAbstraction, LogService, GlobalStateProvider],\n  }),\n  safeProvider({\n    provide: AccountServiceAbstraction,\n    useExisting: InternalAccountService,\n  }),\n  safeProvider({\n    provide: AvatarServiceAbstraction,\n    useClass: AvatarService,\n    deps: [ApiServiceAbstraction, StateProvider],\n  }),\n  safeProvider({ provide: LogService, useFactory: () => new ConsoleLogService(false), deps: [] }),\n  safeProvider({\n    provide: CollectionService,\n    useClass: DefaultCollectionService,\n    deps: [KeyService, EncryptService, I18nServiceAbstraction, StateProvider],\n  }),\n  safeProvider({\n    provide: ENV_ADDITIONAL_REGIONS,\n    useValue: process.env.ADDITIONAL_REGIONS as unknown as RegionConfig[],\n  }),\n  safeProvider({\n    provide: EnvironmentService,\n    useClass: DefaultEnvironmentService,\n    deps: [StateProvider, AccountServiceAbstraction, ENV_ADDITIONAL_REGIONS],\n  }),\n  safeProvider({\n    provide: InternalUserDecryptionOptionsServiceAbstraction,\n    useClass: UserDecryptionOptionsService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: UserDecryptionOptionsServiceAbstraction,\n    useExisting: InternalUserDecryptionOptionsServiceAbstraction,\n  }),\n  safeProvider({\n    provide: TotpServiceAbstraction,\n    useClass: TotpService,\n    deps: [CryptoFunctionServiceAbstraction, LogService],\n  }),\n  safeProvider({\n    provide: TokenServiceAbstraction,\n    useClass: TokenService,\n    deps: [\n      SingleUserStateProvider,\n      GlobalStateProvider,\n      SUPPORTS_SECURE_STORAGE,\n      SECURE_STORAGE,\n      KeyGenerationServiceAbstraction,\n      EncryptService,\n      LogService,\n      LOGOUT_CALLBACK,\n    ],\n  }),\n  safeProvider({\n    provide: KeyGenerationServiceAbstraction,\n    useClass: KeyGenerationService,\n    deps: [CryptoFunctionServiceAbstraction],\n  }),\n  safeProvider({\n    provide: KeyService,\n    useClass: DefaultKeyService,\n    deps: [\n      PinServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      KeyGenerationServiceAbstraction,\n      CryptoFunctionServiceAbstraction,\n      EncryptService,\n      PlatformUtilsServiceAbstraction,\n      LogService,\n      StateServiceAbstraction,\n      AccountServiceAbstraction,\n      StateProvider,\n      KdfConfigService,\n    ],\n  }),\n  safeProvider({\n    provide: PasswordStrengthServiceAbstraction,\n    useClass: PasswordStrengthService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: PasswordGenerationServiceAbstraction,\n    useFactory: legacyPasswordGenerationServiceFactory,\n    deps: [\n      EncryptService,\n      KeyService,\n      PolicyServiceAbstraction,\n      AccountServiceAbstraction,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: GeneratorHistoryService,\n    useClass: LocalGeneratorHistoryService,\n    deps: [EncryptService, KeyService, StateProvider],\n  }),\n  safeProvider({\n    provide: UsernameGenerationServiceAbstraction,\n    useFactory: legacyUsernameGenerationServiceFactory,\n    deps: [\n      ApiServiceAbstraction,\n      I18nServiceAbstraction,\n      KeyService,\n      EncryptService,\n      PolicyServiceAbstraction,\n      AccountServiceAbstraction,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n    useFactory: (toastService: ToastService, i18nService: I18nServiceAbstraction) => () => {\n      toastService.showToast({\n        variant: \"error\",\n        title: i18nService.t(\"errorRefreshingAccessToken\"),\n        message: i18nService.t(\"errorRefreshingAccessTokenDesc\"),\n      });\n    },\n    deps: [ToastService, I18nServiceAbstraction],\n  }),\n  safeProvider({\n    provide: ApiServiceAbstraction,\n    useClass: ApiService,\n    deps: [\n      TokenServiceAbstraction,\n      PlatformUtilsServiceAbstraction,\n      EnvironmentService,\n      AppIdServiceAbstraction,\n      REFRESH_ACCESS_TOKEN_ERROR_CALLBACK,\n      LogService,\n      LOGOUT_CALLBACK,\n      VaultTimeoutSettingsServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: SendServiceAbstraction,\n    useExisting: InternalSendService,\n  }),\n  safeProvider({\n    provide: InternalSendService,\n    useClass: SendService,\n    deps: [\n      KeyService,\n      I18nServiceAbstraction,\n      KeyGenerationServiceAbstraction,\n      SendStateProviderAbstraction,\n      EncryptService,\n    ],\n  }),\n  safeProvider({\n    provide: SendStateProviderAbstraction,\n    useClass: SendStateProvider,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: SendApiServiceAbstraction,\n    useClass: SendApiService,\n    deps: [ApiServiceAbstraction, FileUploadServiceAbstraction, InternalSendService],\n  }),\n  safeProvider({\n    provide: SyncService,\n    useClass: DefaultSyncService,\n    deps: [\n      InternalMasterPasswordServiceAbstraction,\n      AccountServiceAbstraction,\n      ApiServiceAbstraction,\n      DomainSettingsService,\n      InternalFolderService,\n      CipherServiceAbstraction,\n      KeyService,\n      CollectionService,\n      MessagingServiceAbstraction,\n      InternalPolicyService,\n      InternalSendService,\n      LogService,\n      KeyConnectorServiceAbstraction,\n      StateServiceAbstraction,\n      ProviderServiceAbstraction,\n      FolderApiServiceAbstraction,\n      InternalOrganizationServiceAbstraction,\n      SendApiServiceAbstraction,\n      UserDecryptionOptionsServiceAbstraction,\n      AvatarServiceAbstraction,\n      LOGOUT_CALLBACK,\n      BillingAccountProfileStateService,\n      TokenServiceAbstraction,\n      AuthServiceAbstraction,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: BroadcasterService,\n    useClass: DefaultBroadcasterService,\n    deps: [MessageListener],\n  }),\n  safeProvider({\n    provide: VaultTimeoutSettingsServiceAbstraction,\n    useClass: VaultTimeoutSettingsService,\n    deps: [\n      AccountServiceAbstraction,\n      PinServiceAbstraction,\n      UserDecryptionOptionsServiceAbstraction,\n      KeyService,\n      TokenServiceAbstraction,\n      PolicyServiceAbstraction,\n      BiometricStateService,\n      StateProvider,\n      LogService,\n      DEFAULT_VAULT_TIMEOUT,\n    ],\n  }),\n  safeProvider({\n    provide: VaultTimeoutService,\n    useClass: VaultTimeoutService,\n    deps: [\n      AccountServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      CipherServiceAbstraction,\n      FolderServiceAbstraction,\n      CollectionService,\n      PlatformUtilsServiceAbstraction,\n      MessagingServiceAbstraction,\n      SearchServiceAbstraction,\n      StateServiceAbstraction,\n      AuthServiceAbstraction,\n      VaultTimeoutSettingsServiceAbstraction,\n      StateEventRunnerService,\n      TaskSchedulerService,\n      LogService,\n      BiometricsService,\n      LOCKED_CALLBACK,\n      LOGOUT_CALLBACK,\n    ],\n  }),\n  safeProvider({\n    provide: VaultTimeoutServiceAbstraction,\n    useExisting: VaultTimeoutService,\n  }),\n  safeProvider({\n    provide: SsoLoginServiceAbstraction,\n    useClass: SsoLoginService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: STATE_FACTORY,\n    useValue: new StateFactory(GlobalState, Account),\n  }),\n  safeProvider({\n    provide: StateServiceAbstraction,\n    useClass: StateService,\n    deps: [\n      AbstractStorageService,\n      SECURE_STORAGE,\n      MEMORY_STORAGE,\n      LogService,\n      STATE_FACTORY,\n      AccountServiceAbstraction,\n      EnvironmentService,\n      TokenServiceAbstraction,\n      MigrationRunner,\n    ],\n  }),\n  safeProvider({\n    provide: ImportApiServiceAbstraction,\n    useClass: ImportApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: ImportServiceAbstraction,\n    useClass: ImportService,\n    deps: [\n      CipherServiceAbstraction,\n      FolderServiceAbstraction,\n      ImportApiServiceAbstraction,\n      I18nServiceAbstraction,\n      CollectionService,\n      KeyService,\n      EncryptService,\n      PinServiceAbstraction,\n      AccountServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: IndividualVaultExportServiceAbstraction,\n    useClass: IndividualVaultExportService,\n    deps: [\n      FolderServiceAbstraction,\n      CipherServiceAbstraction,\n      PinServiceAbstraction,\n      KeyService,\n      EncryptService,\n      CryptoFunctionServiceAbstraction,\n      KdfConfigService,\n      AccountServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: OrganizationVaultExportServiceAbstraction,\n    useClass: OrganizationVaultExportService,\n    deps: [\n      CipherServiceAbstraction,\n      ApiServiceAbstraction,\n      PinServiceAbstraction,\n      KeyService,\n      EncryptService,\n      CryptoFunctionServiceAbstraction,\n      CollectionService,\n      KdfConfigService,\n      AccountServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: VaultExportServiceAbstraction,\n    useClass: VaultExportService,\n    deps: [IndividualVaultExportServiceAbstraction, OrganizationVaultExportServiceAbstraction],\n  }),\n  safeProvider({\n    provide: SearchServiceAbstraction,\n    useClass: SearchService,\n    deps: [LogService, I18nServiceAbstraction, StateProvider],\n  }),\n  safeProvider({\n    provide: NotificationsServiceAbstraction,\n    useClass: devFlagEnabled(\"noopNotifications\") ? NoopNotificationsService : NotificationsService,\n    deps: [\n      LogService,\n      SyncService,\n      AppIdServiceAbstraction,\n      ApiServiceAbstraction,\n      EnvironmentService,\n      LOGOUT_CALLBACK,\n      StateServiceAbstraction,\n      AuthServiceAbstraction,\n      MessagingServiceAbstraction,\n      TaskSchedulerService,\n    ],\n  }),\n  safeProvider({\n    provide: CryptoFunctionServiceAbstraction,\n    useClass: WebCryptoFunctionService,\n    deps: [WINDOW],\n  }),\n  safeProvider({\n    provide: EncryptService,\n    useClass: MultithreadEncryptServiceImplementation,\n    deps: [CryptoFunctionServiceAbstraction, LogService, LOG_MAC_FAILURES],\n  }),\n  safeProvider({\n    provide: BulkEncryptService,\n    useClass: BulkEncryptServiceImplementation,\n    deps: [CryptoFunctionServiceAbstraction, LogService],\n  }),\n  safeProvider({\n    provide: EventUploadServiceAbstraction,\n    useClass: EventUploadService,\n    deps: [\n      ApiServiceAbstraction,\n      StateProvider,\n      LogService,\n      AuthServiceAbstraction,\n      TaskSchedulerService,\n    ],\n  }),\n  safeProvider({\n    provide: EventCollectionServiceAbstraction,\n    useClass: EventCollectionService,\n    deps: [\n      CipherServiceAbstraction,\n      StateProvider,\n      OrganizationServiceAbstraction,\n      EventUploadServiceAbstraction,\n      AuthServiceAbstraction,\n      AccountServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: InternalPolicyService,\n    useClass: PolicyService,\n    deps: [StateProvider, OrganizationServiceAbstraction],\n  }),\n  safeProvider({\n    provide: PolicyServiceAbstraction,\n    useExisting: InternalPolicyService,\n  }),\n  safeProvider({\n    provide: PolicyApiServiceAbstraction,\n    useClass: PolicyApiService,\n    deps: [InternalPolicyService, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: InternalMasterPasswordServiceAbstraction,\n    useClass: MasterPasswordService,\n    deps: [\n      StateProvider,\n      StateServiceAbstraction,\n      KeyGenerationServiceAbstraction,\n      EncryptService,\n      LogService,\n    ],\n  }),\n  safeProvider({\n    provide: MasterPasswordServiceAbstraction,\n    useExisting: InternalMasterPasswordServiceAbstraction,\n  }),\n  safeProvider({\n    provide: KeyConnectorServiceAbstraction,\n    useClass: KeyConnectorService,\n    deps: [\n      AccountServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      KeyService,\n      ApiServiceAbstraction,\n      TokenServiceAbstraction,\n      LogService,\n      OrganizationServiceAbstraction,\n      KeyGenerationServiceAbstraction,\n      LOGOUT_CALLBACK,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: UserVerificationServiceAbstraction,\n    useClass: UserVerificationService,\n    deps: [\n      KeyService,\n      AccountServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      I18nServiceAbstraction,\n      UserVerificationApiServiceAbstraction,\n      UserDecryptionOptionsServiceAbstraction,\n      PinServiceAbstraction,\n      KdfConfigService,\n      BiometricsService,\n    ],\n  }),\n  safeProvider({\n    provide: InternalOrganizationServiceAbstraction,\n    useClass: OrganizationService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: OrganizationServiceAbstraction,\n    useExisting: InternalOrganizationServiceAbstraction,\n  }),\n  safeProvider({\n    provide: OrganizationUserApiService,\n    useClass: DefaultOrganizationUserApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: PasswordResetEnrollmentServiceAbstraction,\n    useClass: PasswordResetEnrollmentServiceImplementation,\n    deps: [\n      OrganizationApiServiceAbstraction,\n      AccountServiceAbstraction,\n      KeyService,\n      EncryptService,\n      OrganizationUserApiService,\n      I18nServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: ProviderServiceAbstraction,\n    useClass: ProviderService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: TwoFactorServiceAbstraction,\n    useClass: TwoFactorService,\n    deps: [I18nServiceAbstraction, PlatformUtilsServiceAbstraction, GlobalStateProvider],\n  }),\n  safeProvider({\n    provide: FormValidationErrorsServiceAbstraction,\n    useClass: FormValidationErrorsService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: UserVerificationApiServiceAbstraction,\n    useClass: UserVerificationApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: OrganizationApiServiceAbstraction,\n    useClass: OrganizationApiService,\n    // This is a slightly odd dependency tree for a specialized api service\n    // it depends on SyncService so that new data can be retrieved through the sync\n    // rather than updating the OrganizationService directly. Instead OrganizationService\n    // subscribes to sync notifications and will update itself based on that.\n    deps: [ApiServiceAbstraction, SyncService],\n  }),\n  safeProvider({\n    provide: OrganizationBillingApiServiceAbstraction,\n    useClass: OrganizationBillingApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: AccountBillingApiServiceAbstraction,\n    useClass: AccountBillingApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: DefaultConfigService,\n    useClass: DefaultConfigService,\n    deps: [\n      ConfigApiServiceAbstraction,\n      EnvironmentService,\n      LogService,\n      StateProvider,\n      AuthServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: ConfigService,\n    useExisting: DefaultConfigService,\n  }),\n  safeProvider({\n    provide: ConfigApiServiceAbstraction,\n    useClass: ConfigApiService,\n    deps: [ApiServiceAbstraction, TokenServiceAbstraction],\n  }),\n  safeProvider({\n    provide: AnonymousHubServiceAbstraction,\n    useClass: AnonymousHubService,\n    deps: [EnvironmentService, AuthRequestServiceAbstraction],\n  }),\n  safeProvider({\n    provide: ValidationServiceAbstraction,\n    useClass: ValidationService,\n    deps: [I18nServiceAbstraction, PlatformUtilsServiceAbstraction],\n  }),\n  safeProvider({\n    provide: LoginEmailServiceAbstraction,\n    useClass: LoginEmailService,\n    deps: [AccountServiceAbstraction, AuthServiceAbstraction, StateProvider],\n  }),\n  safeProvider({\n    provide: OrgDomainInternalServiceAbstraction,\n    useClass: OrgDomainService,\n    deps: [PlatformUtilsServiceAbstraction, I18nServiceAbstraction],\n  }),\n  safeProvider({\n    provide: OrgDomainServiceAbstraction,\n    useExisting: OrgDomainInternalServiceAbstraction,\n  }),\n  safeProvider({\n    provide: OrgDomainApiServiceAbstraction,\n    useClass: OrgDomainApiService,\n    deps: [OrgDomainInternalServiceAbstraction, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: DevicesApiServiceAbstraction,\n    useClass: DevicesApiServiceImplementation,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: DevicesServiceAbstraction,\n    useClass: DevicesServiceImplementation,\n    deps: [DevicesApiServiceAbstraction, AppIdServiceAbstraction],\n  }),\n  safeProvider({\n    provide: DeviceTrustServiceAbstraction,\n    useClass: DeviceTrustService,\n    deps: [\n      KeyGenerationServiceAbstraction,\n      CryptoFunctionServiceAbstraction,\n      KeyService,\n      EncryptService,\n      AppIdServiceAbstraction,\n      DevicesApiServiceAbstraction,\n      I18nServiceAbstraction,\n      PlatformUtilsServiceAbstraction,\n      StateProvider,\n      SECURE_STORAGE,\n      UserDecryptionOptionsServiceAbstraction,\n      LogService,\n      ConfigService,\n    ],\n  }),\n  safeProvider({\n    provide: AuthRequestServiceAbstraction,\n    useClass: AuthRequestService,\n    deps: [\n      AppIdServiceAbstraction,\n      AccountServiceAbstraction,\n      InternalMasterPasswordServiceAbstraction,\n      KeyService,\n      EncryptService,\n      ApiServiceAbstraction,\n      StateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: PinServiceAbstraction,\n    useClass: PinService,\n    deps: [\n      AccountServiceAbstraction,\n      CryptoFunctionServiceAbstraction,\n      EncryptService,\n      KdfConfigService,\n      KeyGenerationServiceAbstraction,\n      LogService,\n      MasterPasswordServiceAbstraction,\n      StateProvider,\n      StateServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: WebAuthnLoginPrfKeyServiceAbstraction,\n    useClass: WebAuthnLoginPrfKeyService,\n    deps: [CryptoFunctionServiceAbstraction],\n  }),\n  safeProvider({\n    provide: WebAuthnLoginApiServiceAbstraction,\n    useClass: WebAuthnLoginApiService,\n    deps: [ApiServiceAbstraction, EnvironmentService],\n  }),\n  safeProvider({\n    provide: WebAuthnLoginServiceAbstraction,\n    useClass: WebAuthnLoginService,\n    deps: [\n      WebAuthnLoginApiServiceAbstraction,\n      LoginStrategyServiceAbstraction,\n      WebAuthnLoginPrfKeyServiceAbstraction,\n      WINDOW,\n      LogService,\n    ],\n  }),\n  safeProvider({\n    provide: StorageServiceProvider,\n    useClass: StorageServiceProvider,\n    deps: [OBSERVABLE_DISK_STORAGE, OBSERVABLE_MEMORY_STORAGE],\n  }),\n  safeProvider({\n    provide: StateEventRegistrarService,\n    useClass: StateEventRegistrarService,\n    deps: [GlobalStateProvider, StorageServiceProvider],\n  }),\n  safeProvider({\n    provide: StateEventRunnerService,\n    useClass: StateEventRunnerService,\n    deps: [GlobalStateProvider, StorageServiceProvider],\n  }),\n  safeProvider({\n    provide: GlobalStateProvider,\n    useClass: DefaultGlobalStateProvider,\n    deps: [StorageServiceProvider, LogService],\n  }),\n  safeProvider({\n    provide: ActiveUserStateProvider,\n    useClass: DefaultActiveUserStateProvider,\n    deps: [AccountServiceAbstraction, SingleUserStateProvider],\n  }),\n  safeProvider({\n    provide: SingleUserStateProvider,\n    useClass: DefaultSingleUserStateProvider,\n    deps: [StorageServiceProvider, StateEventRegistrarService, LogService],\n  }),\n  safeProvider({\n    provide: DerivedStateProvider,\n    useClass: DefaultDerivedStateProvider,\n    deps: [],\n  }),\n  safeProvider({\n    provide: StateProvider,\n    useClass: DefaultStateProvider,\n    deps: [\n      ActiveUserStateProvider,\n      SingleUserStateProvider,\n      GlobalStateProvider,\n      DerivedStateProvider,\n    ],\n  }),\n  safeProvider({\n    provide: OrganizationBillingServiceAbstraction,\n    useClass: OrganizationBillingService,\n    deps: [\n      ApiServiceAbstraction,\n      BillingApiServiceAbstraction,\n      ConfigService,\n      KeyService,\n      EncryptService,\n      I18nServiceAbstraction,\n      OrganizationApiServiceAbstraction,\n      SyncService,\n    ],\n  }),\n  safeProvider({\n    provide: AutofillSettingsServiceAbstraction,\n    useClass: AutofillSettingsService,\n    deps: [StateProvider, PolicyServiceAbstraction],\n  }),\n  safeProvider({\n    provide: BadgeSettingsServiceAbstraction,\n    useClass: BadgeSettingsService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: BiometricStateService,\n    useClass: DefaultBiometricStateService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: VaultSettingsServiceAbstraction,\n    useClass: VaultSettingsService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: MigrationRunner,\n    useClass: MigrationRunner,\n    deps: [AbstractStorageService, LogService, MigrationBuilderService, CLIENT_TYPE],\n  }),\n  safeProvider({\n    provide: MigrationBuilderService,\n    useClass: MigrationBuilderService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: BillingApiServiceAbstraction,\n    useClass: BillingApiService,\n    deps: [ApiServiceAbstraction, LogService, ToastService],\n  }),\n  safeProvider({\n    provide: TaxServiceAbstraction,\n    useClass: TaxService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: BillingAccountProfileStateService,\n    useClass: DefaultBillingAccountProfileStateService,\n    deps: [StateProvider, PlatformUtilsServiceAbstraction, ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: OrganizationManagementPreferencesService,\n    useClass: DefaultOrganizationManagementPreferencesService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: UserAutoUnlockKeyService,\n    useClass: UserAutoUnlockKeyService,\n    deps: [KeyService],\n  }),\n  safeProvider({\n    provide: ErrorHandler,\n    useClass: LoggingErrorHandler,\n    deps: [],\n  }),\n  safeProvider({\n    provide: INTRAPROCESS_MESSAGING_SUBJECT,\n    useFactory: () => new Subject<Message<Record<string, unknown>>>(),\n    deps: [],\n  }),\n  safeProvider({\n    provide: MessageListener,\n    useFactory: (subject: Subject<Message<Record<string, unknown>>>) =>\n      new MessageListener(subject.asObservable()),\n    deps: [INTRAPROCESS_MESSAGING_SUBJECT],\n  }),\n  safeProvider({\n    provide: MessageSender,\n    useFactory: (subject: Subject<Message<Record<string, unknown>>>) =>\n      new SubjectMessageSender(subject),\n    deps: [INTRAPROCESS_MESSAGING_SUBJECT],\n  }),\n  safeProvider({\n    provide: TaskSchedulerService,\n    useClass: DefaultTaskSchedulerService,\n    deps: [LogService],\n  }),\n  safeProvider({\n    provide: ProviderApiServiceAbstraction,\n    useClass: ProviderApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: KdfConfigService,\n    useClass: DefaultKdfConfigService,\n    deps: [StateProvider],\n  }),\n  safeProvider({\n    provide: SetPasswordJitService,\n    useClass: DefaultSetPasswordJitService,\n    deps: [\n      ApiServiceAbstraction,\n      KeyService,\n      EncryptService,\n      I18nServiceAbstraction,\n      KdfConfigService,\n      InternalMasterPasswordServiceAbstraction,\n      OrganizationApiServiceAbstraction,\n      OrganizationUserApiService,\n      InternalUserDecryptionOptionsServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: DefaultServerSettingsService,\n    useClass: DefaultServerSettingsService,\n    deps: [ConfigService],\n  }),\n  safeProvider({\n    provide: RegisterRouteService,\n    useClass: RegisterRouteService,\n    deps: [ConfigService],\n  }),\n  safeProvider({\n    provide: AnonLayoutWrapperDataService,\n    useClass: DefaultAnonLayoutWrapperDataService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: RegistrationFinishServiceAbstraction,\n    useClass: DefaultRegistrationFinishService,\n    deps: [KeyService, AccountApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: ViewCacheService,\n    useExisting: NoopViewCacheService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: LoginComponentService,\n    useClass: DefaultLoginComponentService,\n    deps: [\n      CryptoFunctionServiceAbstraction,\n      EnvironmentService,\n      PasswordGenerationServiceAbstraction,\n      PlatformUtilsServiceAbstraction,\n      SsoLoginServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: SdkService,\n    useClass: DefaultSdkService,\n    deps: [\n      SdkClientFactory,\n      EnvironmentService,\n      PlatformUtilsServiceAbstraction,\n      AccountServiceAbstraction,\n      KdfConfigService,\n      KeyService,\n    ],\n  }),\n  safeProvider({\n    provide: CipherAuthorizationService,\n    useClass: DefaultCipherAuthorizationService,\n    deps: [CollectionService, OrganizationServiceAbstraction],\n  }),\n  safeProvider({\n    provide: AuthRequestApiService,\n    useClass: DefaultAuthRequestApiService,\n    deps: [ApiServiceAbstraction, LogService],\n  }),\n  safeProvider({\n    provide: LoginApprovalComponentServiceAbstraction,\n    useClass: DefaultLoginApprovalComponentService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: LoginDecryptionOptionsService,\n    useClass: DefaultLoginDecryptionOptionsService,\n    deps: [MessagingServiceAbstraction],\n  }),\n  safeProvider(NewDeviceVerificationNoticeService),\n  safeProvider({\n    provide: UserAsymmetricKeysRegenerationApiService,\n    useClass: DefaultUserAsymmetricKeysRegenerationApiService,\n    deps: [ApiServiceAbstraction],\n  }),\n  safeProvider({\n    provide: UserAsymmetricKeysRegenerationService,\n    useClass: DefaultUserAsymmetricKeysRegenerationService,\n    deps: [\n      KeyService,\n      CipherServiceAbstraction,\n      UserAsymmetricKeysRegenerationApiService,\n      LogService,\n      SdkService,\n      ApiServiceAbstraction,\n      ConfigService,\n    ],\n  }),\n  safeProvider({\n    provide: LoginSuccessHandlerService,\n    useClass: DefaultLoginSuccessHandlerService,\n    deps: [SyncService, UserAsymmetricKeysRegenerationService],\n  }),\n];\n\n@NgModule({\n  declarations: [],\n  // Do not register your dependency here! Add it to the typesafeProviders array using the helper function\n  providers: safeProviders,\n})\nexport class JslibServicesModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Observable,\n  combineLatest,\n  distinctUntilChanged,\n  firstValueFrom,\n  map,\n  of,\n  shareReplay,\n  switchMap,\n} from \"rxjs\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { StateService } from \"../../platform/abstractions/state.service\";\nimport { MessageSender } from \"../../platform/messaging\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { UserId } from \"../../types/guid\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { AuthService as AuthServiceAbstraction } from \"../abstractions/auth.service\";\nimport { TokenService } from \"../abstractions/token.service\";\nimport { AuthenticationStatus } from \"../enums/authentication-status\";\n\nexport class AuthService implements AuthServiceAbstraction {\n  activeAccountStatus$: Observable<AuthenticationStatus>;\n  authStatuses$: Observable<Record<UserId, AuthenticationStatus>>;\n\n  constructor(\n    protected accountService: AccountService,\n    protected messageSender: MessageSender,\n    protected keyService: KeyService,\n    protected apiService: ApiService,\n    protected stateService: StateService,\n    private tokenService: TokenService,\n  ) {\n    this.activeAccountStatus$ = this.accountService.activeAccount$.pipe(\n      map((account) => account?.id),\n      switchMap((userId) => {\n        return this.authStatusFor$(userId);\n      }),\n    );\n\n    this.authStatuses$ = this.accountService.accounts$.pipe(\n      map((accounts) => Object.keys(accounts) as UserId[]),\n      switchMap((entries) => {\n        if (entries.length === 0) {\n          return of([] as { userId: UserId; status: AuthenticationStatus }[]);\n        }\n        return combineLatest(\n          entries.map((userId) =>\n            this.authStatusFor$(userId).pipe(map((status) => ({ userId, status }))),\n          ),\n        );\n      }),\n      map((statuses) => {\n        return statuses.reduce(\n          (acc, { userId, status }) => {\n            acc[userId] = status;\n            return acc;\n          },\n          {} as Record<UserId, AuthenticationStatus>,\n        );\n      }),\n    );\n  }\n\n  authStatusFor$(userId: UserId): Observable<AuthenticationStatus> {\n    if (!Utils.isGuid(userId)) {\n      return of(AuthenticationStatus.LoggedOut);\n    }\n\n    return combineLatest([\n      this.keyService.getInMemoryUserKeyFor$(userId),\n      this.tokenService.hasAccessToken$(userId),\n    ]).pipe(\n      map(([userKey, hasAccessToken]) => {\n        if (!hasAccessToken) {\n          return AuthenticationStatus.LoggedOut;\n        }\n\n        if (!userKey) {\n          return AuthenticationStatus.Locked;\n        }\n\n        return AuthenticationStatus.Unlocked;\n      }),\n      distinctUntilChanged(),\n      shareReplay({ bufferSize: 1, refCount: false }),\n    );\n  }\n\n  async getAuthStatus(userId?: string): Promise<AuthenticationStatus> {\n    userId ??= await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    return await firstValueFrom(this.authStatusFor$(userId as UserId));\n  }\n\n  logOut(callback: () => void, userId?: string): void {\n    callback();\n    this.messageSender.send(\"loggedOut\", { userId });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport {\n  FileUploadApiMethods,\n  FileUploadService as FileUploadServiceAbstraction,\n} from \"../../abstractions/file-upload/file-upload.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { FileUploadType } from \"../../enums\";\nimport { EncArrayBuffer } from \"../../models/domain/enc-array-buffer\";\nimport { EncString } from \"../../models/domain/enc-string\";\n\nimport { AzureFileUploadService } from \"./azure-file-upload.service\";\nimport { BitwardenFileUploadService } from \"./bitwarden-file-upload.service\";\n\nexport class FileUploadService implements FileUploadServiceAbstraction {\n  private azureFileUploadService: AzureFileUploadService;\n  private bitwardenFileUploadService: BitwardenFileUploadService;\n\n  constructor(\n    protected logService: LogService,\n    apiService: ApiService,\n  ) {\n    this.azureFileUploadService = new AzureFileUploadService(logService, apiService);\n    this.bitwardenFileUploadService = new BitwardenFileUploadService();\n  }\n\n  async upload(\n    uploadData: { url: string; fileUploadType: FileUploadType },\n    fileName: EncString,\n    encryptedFileData: EncArrayBuffer,\n    fileUploadMethods: FileUploadApiMethods,\n  ) {\n    try {\n      switch (uploadData.fileUploadType) {\n        case FileUploadType.Direct:\n          await this.bitwardenFileUploadService.upload(\n            fileName.encryptedString,\n            encryptedFileData,\n            (fd) => fileUploadMethods.postDirect(fd),\n          );\n          break;\n        case FileUploadType.Azure: {\n          await this.azureFileUploadService.upload(\n            uploadData.url,\n            encryptedFileData,\n            fileUploadMethods.renewFileUploadUrl,\n          );\n          break;\n        }\n        default:\n          throw new Error(\"Unknown file upload type\");\n      }\n    } catch (e) {\n      await fileUploadMethods.rollback();\n      throw e;\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport {\n  FileUploadApiMethods,\n  FileUploadService,\n} from \"../../../platform/abstractions/file-upload/file-upload.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { CipherFileUploadService as CipherFileUploadServiceAbstraction } from \"../../abstractions/file-upload/cipher-file-upload.service\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { AttachmentRequest } from \"../../models/request/attachment.request\";\nimport { AttachmentUploadDataResponse } from \"../../models/response/attachment-upload-data.response\";\nimport { CipherResponse } from \"../../models/response/cipher.response\";\n\nexport class CipherFileUploadService implements CipherFileUploadServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private fileUploadService: FileUploadService,\n  ) {}\n\n  async upload(\n    cipher: Cipher,\n    encFileName: EncString,\n    encData: EncArrayBuffer,\n    admin: boolean,\n    dataEncKey: [SymmetricCryptoKey, EncString],\n  ): Promise<CipherResponse> {\n    const request: AttachmentRequest = {\n      key: dataEncKey[1].encryptedString,\n      fileName: encFileName.encryptedString,\n      fileSize: encData.buffer.byteLength,\n      adminRequest: admin,\n    };\n\n    let response: CipherResponse;\n    try {\n      const uploadDataResponse = await this.apiService.postCipherAttachment(cipher.id, request);\n      response = admin ? uploadDataResponse.cipherMiniResponse : uploadDataResponse.cipherResponse;\n      await this.fileUploadService.upload(\n        uploadDataResponse,\n        encFileName,\n        encData,\n        this.generateMethods(uploadDataResponse, response, request.adminRequest),\n      );\n    } catch (e) {\n      if (\n        (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) ||\n        (e as ErrorResponse).statusCode === 405\n      ) {\n        response = await this.legacyServerAttachmentFileUpload(\n          request.adminRequest,\n          cipher.id,\n          encFileName,\n          encData,\n          dataEncKey[1],\n        );\n      } else if (e instanceof ErrorResponse) {\n        throw new Error((e as ErrorResponse).getSingleMessage());\n      } else {\n        throw e;\n      }\n    }\n    return response;\n  }\n\n  private generateMethods(\n    uploadData: AttachmentUploadDataResponse,\n    response: CipherResponse,\n    isAdmin: boolean,\n  ): FileUploadApiMethods {\n    return {\n      postDirect: this.generatePostDirectCallback(uploadData, isAdmin),\n      renewFileUploadUrl: this.generateRenewFileUploadUrlCallback(uploadData, response, isAdmin),\n      rollback: this.generateRollbackCallback(response, uploadData, isAdmin),\n    };\n  }\n\n  private generatePostDirectCallback(uploadData: AttachmentUploadDataResponse, isAdmin: boolean) {\n    return (data: FormData) => {\n      const response = isAdmin ? uploadData.cipherMiniResponse : uploadData.cipherResponse;\n      return this.apiService.postAttachmentFile(response.id, uploadData.attachmentId, data);\n    };\n  }\n\n  private generateRenewFileUploadUrlCallback(\n    uploadData: AttachmentUploadDataResponse,\n    response: CipherResponse,\n    isAdmin: boolean,\n  ) {\n    return async () => {\n      const renewResponse = await this.apiService.renewAttachmentUploadUrl(\n        response.id,\n        uploadData.attachmentId,\n      );\n      return renewResponse?.url;\n    };\n  }\n\n  private generateRollbackCallback(\n    response: CipherResponse,\n    uploadData: AttachmentUploadDataResponse,\n    isAdmin: boolean,\n  ) {\n    return () => {\n      if (isAdmin) {\n        return this.apiService.deleteCipherAttachmentAdmin(response.id, uploadData.attachmentId);\n      } else {\n        return this.apiService.deleteCipherAttachment(response.id, uploadData.attachmentId);\n      }\n    };\n  }\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  async legacyServerAttachmentFileUpload(\n    admin: boolean,\n    cipherId: string,\n    encFileName: EncString,\n    encData: EncArrayBuffer,\n    key: EncString,\n  ) {\n    const fd = new FormData();\n    try {\n      const blob = new Blob([encData.buffer], { type: \"application/octet-stream\" });\n      fd.append(\"key\", key.encryptedString);\n      fd.append(\"data\", blob, encFileName.encryptedString);\n    } catch (e) {\n      if (Utils.isNode && !Utils.isBrowser) {\n        fd.append(\"key\", key.encryptedString);\n        fd.append(\n          \"data\",\n          Buffer.from(encData.buffer) as any,\n          {\n            filepath: encFileName.encryptedString,\n            contentType: \"application/octet-stream\",\n          } as any,\n        );\n      } else {\n        throw e;\n      }\n    }\n\n    let response: CipherResponse;\n    try {\n      if (admin) {\n        response = await this.apiService.postCipherAttachmentAdminLegacy(cipherId, fd);\n      } else {\n        response = await this.apiService.postCipherAttachmentLegacy(cipherId, fd);\n      }\n    } catch (e) {\n      throw new Error((e as ErrorResponse).getSingleMessage());\n    }\n\n    return response;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, Subject, firstValueFrom, map, shareReplay, switchMap, merge } from \"rxjs\";\n\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../../key-management/src/abstractions/key.service\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { StateProvider } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { CipherService } from \"../../../vault/abstractions/cipher.service\";\nimport { InternalFolderService as InternalFolderServiceAbstraction } from \"../../../vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderData } from \"../../../vault/models/data/folder.data\";\nimport { Folder } from \"../../../vault/models/domain/folder\";\nimport { FolderView } from \"../../../vault/models/view/folder.view\";\nimport { Cipher } from \"../../models/domain/cipher\";\nimport { FolderWithIdRequest } from \"../../models/request/folder-with-id.request\";\nimport { FOLDER_DECRYPTED_FOLDERS, FOLDER_ENCRYPTED_FOLDERS } from \"../key-state/folder.state\";\n\nexport class FolderService implements InternalFolderServiceAbstraction {\n  /**\n   * Ensures we reuse the same observable stream for each userId rather than\n   * creating a new one on each folderViews$ call.\n   */\n  private folderViewCache = new Map<UserId, Observable<FolderView[]>>();\n\n  /**\n   * Used to force the folderviews$ Observable to re-emit with a provided value.\n   * Required because shareReplay with refCount: false maintains last emission.\n   * Used during cleanup to force emit empty arrays, ensuring stale data isn't retained.\n   */\n  private forceFolderViews: Record<UserId, Subject<FolderView[]>> = {};\n\n  constructor(\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private i18nService: I18nService,\n    private cipherService: CipherService,\n    private stateProvider: StateProvider,\n  ) {}\n\n  folders$(userId: UserId): Observable<Folder[]> {\n    return this.encryptedFoldersState(userId).state$.pipe(\n      map((folders) => {\n        if (folders == null) {\n          return [];\n        }\n\n        return Object.values(folders).map((f) => new Folder(f));\n      }),\n    );\n  }\n\n  /**\n   * Returns an Observable of decrypted folder views for the given userId.\n   * Uses folderViewCache to maintain a single Observable instance per user,\n   * combining normal folder state updates with forced updates.\n   */\n  folderViews$(userId: UserId): Observable<FolderView[]> {\n    if (!this.folderViewCache.has(userId)) {\n      if (!this.forceFolderViews[userId]) {\n        this.forceFolderViews[userId] = new Subject<FolderView[]>();\n      }\n\n      const observable = merge(\n        this.forceFolderViews[userId],\n        this.encryptedFoldersState(userId).state$.pipe(\n          switchMap((folderData) => {\n            return this.decryptFolders(userId, folderData);\n          }),\n        ),\n      ).pipe(shareReplay({ refCount: false, bufferSize: 1 }));\n\n      this.folderViewCache.set(userId, observable);\n    }\n\n    return this.folderViewCache.get(userId);\n  }\n\n  // TODO: This should be moved to EncryptService or something\n  async encrypt(model: FolderView, key: SymmetricCryptoKey): Promise<Folder> {\n    const folder = new Folder();\n    folder.id = model.id;\n    folder.name = await this.encryptService.encrypt(model.name, key);\n    return folder;\n  }\n\n  async get(id: string, userId: UserId): Promise<Folder> {\n    const folders = await firstValueFrom(this.folders$(userId));\n\n    return folders.find((folder) => folder.id === id);\n  }\n\n  getDecrypted$(id: string, userId: UserId): Observable<FolderView | undefined> {\n    return this.folderViews$(userId).pipe(\n      map((folders) => folders.find((folder) => folder.id === id)),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n  }\n\n  async getAllFromState(userId: UserId): Promise<Folder[]> {\n    return await firstValueFrom(this.folders$(userId));\n  }\n\n  /**\n   * @deprecated For the CLI only\n   * @param id id of the folder\n   */\n  async getFromState(id: string, userId: UserId): Promise<Folder> {\n    const folder = await this.get(id, userId);\n    if (!folder) {\n      return null;\n    }\n\n    return folder;\n  }\n\n  /**\n   * @deprecated Only use in CLI!\n   */\n  async getAllDecryptedFromState(userId: UserId): Promise<FolderView[]> {\n    return await firstValueFrom(this.folderViews$(userId));\n  }\n\n  async upsert(folderData: FolderData | FolderData[], userId: UserId): Promise<void> {\n    await this.clearDecryptedFolderState(userId);\n    await this.encryptedFoldersState(userId).update((folders) => {\n      if (folders == null) {\n        folders = {};\n      }\n\n      if (folderData instanceof FolderData) {\n        const f = folderData as FolderData;\n        folders[f.id] = f;\n      } else {\n        (folderData as FolderData[]).forEach((f) => {\n          folders[f.id] = f;\n        });\n      }\n\n      return folders;\n    });\n  }\n\n  async replace(folders: { [id: string]: FolderData }, userId: UserId): Promise<void> {\n    if (!folders) {\n      return;\n    }\n    await this.clearDecryptedFolderState(userId);\n    await this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS).update(() => {\n      const newFolders: Record<string, FolderData> = { ...folders };\n      return newFolders;\n    });\n  }\n\n  async clearDecryptedFolderState(userId: UserId): Promise<void> {\n    if (userId == null) {\n      throw new Error(\"User ID is required.\");\n    }\n\n    await this.setDecryptedFolders([], userId);\n  }\n\n  async clear(userId: UserId): Promise<void> {\n    this.forceFolderViews[userId]?.next([]);\n\n    await this.encryptedFoldersState(userId).update(() => ({}));\n    await this.clearDecryptedFolderState(userId);\n  }\n\n  async delete(id: string | string[], userId: UserId): Promise<any> {\n    await this.clearDecryptedFolderState(userId);\n    await this.encryptedFoldersState(userId).update((folders) => {\n      if (folders == null) {\n        return;\n      }\n\n      const folderIdsToDelete = Array.isArray(id) ? id : [id];\n\n      folderIdsToDelete.forEach((id) => {\n        if (folders[id] != null) {\n          delete folders[id];\n        }\n      });\n\n      return folders;\n    });\n\n    // Items in a deleted folder are re-assigned to \"No Folder\"\n    const ciphers = await this.cipherService.getAll();\n    if (ciphers != null) {\n      const updates: Cipher[] = [];\n      for (const cId in ciphers) {\n        if (ciphers[cId].folderId === id) {\n          ciphers[cId].folderId = null;\n          updates.push(ciphers[cId]);\n        }\n      }\n      if (updates.length > 0) {\n        await this.cipherService.upsert(updates.map((c) => c.toCipherData()));\n      }\n    }\n  }\n\n  async getRotatedData(\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<FolderWithIdRequest[]> {\n    if (newUserKey == null) {\n      throw new Error(\"New user key is required for rotation.\");\n    }\n\n    let encryptedFolders: FolderWithIdRequest[] = [];\n    const folders = await firstValueFrom(this.folderViews$(userId));\n    if (!folders) {\n      return encryptedFolders;\n    }\n    encryptedFolders = await Promise.all(\n      folders.map(async (folder) => {\n        const encryptedFolder = await this.encrypt(folder, newUserKey);\n        return new FolderWithIdRequest(encryptedFolder);\n      }),\n    );\n    return encryptedFolders;\n  }\n\n  /**\n   * Decrypts the folders for a user.\n   * @param userId the user id\n   * @param folderData encrypted folders\n   * @returns a list of decrypted folders\n   */\n  private async decryptFolders(\n    userId: UserId,\n    folderData: Record<string, FolderData>,\n  ): Promise<FolderView[]> {\n    // Check if the decrypted folders are already cached\n    const decrypted = await firstValueFrom(\n      this.stateProvider.getUser(userId, FOLDER_DECRYPTED_FOLDERS).state$,\n    );\n    if (decrypted?.length) {\n      return decrypted;\n    }\n\n    if (folderData == null) {\n      return [];\n    }\n\n    const folders = Object.values(folderData).map((f) => new Folder(f));\n    const userKey = await firstValueFrom(this.keyService.userKey$(userId));\n    if (!userKey) {\n      return [];\n    }\n\n    const decryptFolderPromises = folders.map((f) =>\n      f.decryptWithKey(userKey, this.encryptService),\n    );\n    const decryptedFolders = await Promise.all(decryptFolderPromises);\n    decryptedFolders.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n\n    const noneFolder = new FolderView();\n    noneFolder.name = this.i18nService.t(\"noneFolder\");\n    decryptedFolders.push(noneFolder);\n\n    // Cache the decrypted folders\n    await this.setDecryptedFolders(decryptedFolders, userId);\n    return decryptedFolders;\n  }\n\n  /**\n   * @returns a SingleUserState for the encrypted folders.\n   */\n  private encryptedFoldersState(userId: UserId) {\n    return this.stateProvider.getUser(userId, FOLDER_ENCRYPTED_FOLDERS);\n  }\n\n  /**\n   * Sets the decrypted folders state for a user.\n   * @param folders the decrypted folders\n   * @param userId the user id\n   */\n  private async setDecryptedFolders(folders: FolderView[], userId: UserId): Promise<void> {\n    await this.stateProvider.setUserState(FOLDER_DECRYPTED_FOLDERS, folders, userId);\n  }\n}\n","import { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { FolderApiServiceAbstraction } from \"../../../vault/abstractions/folder/folder-api.service.abstraction\";\nimport { InternalFolderService } from \"../../../vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderData } from \"../../../vault/models/data/folder.data\";\nimport { Folder } from \"../../../vault/models/domain/folder\";\nimport { FolderRequest } from \"../../../vault/models/request/folder.request\";\nimport { FolderResponse } from \"../../../vault/models/response/folder.response\";\n\nexport class FolderApiService implements FolderApiServiceAbstraction {\n  constructor(\n    private folderService: InternalFolderService,\n    private apiService: ApiService,\n  ) {}\n\n  async save(folder: Folder, userId: UserId): Promise<any> {\n    const request = new FolderRequest(folder);\n\n    let response: FolderResponse;\n    if (folder.id == null) {\n      response = await this.postFolder(request);\n      folder.id = response.id;\n    } else {\n      response = await this.putFolder(folder.id, request);\n    }\n\n    const data = new FolderData(response);\n    await this.folderService.upsert(data, userId);\n  }\n\n  async delete(id: string, userId: UserId): Promise<any> {\n    await this.deleteFolder(id);\n    await this.folderService.delete(id, userId);\n  }\n\n  async deleteAll(userId: UserId): Promise<void> {\n    await this.apiService.send(\"DELETE\", \"/folders/all\", null, true, false);\n    await this.folderService.clear(userId);\n  }\n\n  async get(id: string): Promise<FolderResponse> {\n    const r = await this.apiService.send(\"GET\", \"/folders/\" + id, null, true, true);\n    return new FolderResponse(r);\n  }\n\n  private async postFolder(request: FolderRequest): Promise<FolderResponse> {\n    const r = await this.apiService.send(\"POST\", \"/folders\", request, true, true);\n    return new FolderResponse(r);\n  }\n\n  async putFolder(id: string, request: FolderRequest): Promise<FolderResponse> {\n    const r = await this.apiService.send(\"PUT\", \"/folders/\" + id, request, true, true);\n    return new FolderResponse(r);\n  }\n\n  private deleteFolder(id: string): Promise<any> {\n    return this.apiService.send(\"DELETE\", \"/folders/\" + id, null, true, false);\n  }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../models/response/error.response\";\nimport { EnvironmentService } from \"../../platform/abstractions/environment.service\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { AccountApiService } from \"../abstractions/account-api.service\";\nimport { InternalAccountService } from \"../abstractions/account.service\";\nimport { UserVerificationService } from \"../abstractions/user-verification/user-verification.service.abstraction\";\nimport { RegisterFinishRequest } from \"../models/request/registration/register-finish.request\";\nimport { RegisterSendVerificationEmailRequest } from \"../models/request/registration/register-send-verification-email.request\";\nimport { RegisterVerificationEmailClickedRequest } from \"../models/request/registration/register-verification-email-clicked.request\";\nimport { Verification } from \"../types/verification\";\n\nexport class AccountApiServiceImplementation implements AccountApiService {\n  constructor(\n    private apiService: ApiService,\n    private userVerificationService: UserVerificationService,\n    private logService: LogService,\n    private accountService: InternalAccountService,\n    private environmentService: EnvironmentService,\n  ) {}\n\n  async deleteAccount(verification: Verification): Promise<void> {\n    try {\n      const verificationRequest = await this.userVerificationService.buildRequest(verification);\n      await this.apiService.send(\"DELETE\", \"/accounts\", verificationRequest, true, false);\n      this.accountService.delete();\n    } catch (e) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async registerSendVerificationEmail(\n    request: RegisterSendVerificationEmailRequest,\n  ): Promise<null | string> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    try {\n      const response = await this.apiService.send(\n        \"POST\",\n        \"/accounts/register/send-verification-email\",\n        request,\n        false,\n        true,\n        env.getIdentityUrl(),\n      );\n\n      return response;\n    } catch (e: unknown) {\n      if (e instanceof ErrorResponse) {\n        if (e.statusCode === 204) {\n          // No content is a success response.\n          return null;\n        }\n      }\n\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async registerVerificationEmailClicked(\n    request: RegisterVerificationEmailClickedRequest,\n  ): Promise<void> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    try {\n      const response = await this.apiService.send(\n        \"POST\",\n        \"/accounts/register/verification-email-clicked\",\n        request,\n        false,\n        false,\n        env.getIdentityUrl(),\n      );\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async registerFinish(request: RegisterFinishRequest): Promise<string> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    try {\n      const response = await this.apiService.send(\n        \"POST\",\n        \"/accounts/register/finish\",\n        request,\n        false,\n        true,\n        env.getIdentityUrl(),\n      );\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KdfConfig, PBKDF2KdfConfig, Argon2KdfConfig, KdfType } from \"@bitwarden/key-management\";\n\nimport { CsprngArray } from \"../../types/csprng\";\nimport { CryptoFunctionService } from \"../abstractions/crypto-function.service\";\nimport { KeyGenerationService as KeyGenerationServiceAbstraction } from \"../abstractions/key-generation.service\";\nimport { Utils } from \"../misc/utils\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport class KeyGenerationService implements KeyGenerationServiceAbstraction {\n  constructor(private cryptoFunctionService: CryptoFunctionService) {}\n\n  async createKey(bitLength: 256 | 512): Promise<SymmetricCryptoKey> {\n    const key = await this.cryptoFunctionService.aesGenerateKey(bitLength);\n    return new SymmetricCryptoKey(key);\n  }\n\n  async createKeyWithPurpose(\n    bitLength: 128 | 192 | 256 | 512,\n    purpose: string,\n    salt?: string,\n  ): Promise<{ salt: string; material: CsprngArray; derivedKey: SymmetricCryptoKey }> {\n    if (salt == null) {\n      const bytes = await this.cryptoFunctionService.randomBytes(32);\n      salt = Utils.fromBufferToUtf8(bytes);\n    }\n    const material = await this.cryptoFunctionService.aesGenerateKey(bitLength);\n    const key = await this.cryptoFunctionService.hkdf(material, salt, purpose, 64, \"sha256\");\n    return { salt, material, derivedKey: new SymmetricCryptoKey(key) };\n  }\n\n  async deriveKeyFromMaterial(\n    material: CsprngArray,\n    salt: string,\n    purpose: string,\n  ): Promise<SymmetricCryptoKey> {\n    const key = await this.cryptoFunctionService.hkdf(material, salt, purpose, 64, \"sha256\");\n    return new SymmetricCryptoKey(key);\n  }\n\n  async deriveKeyFromPassword(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    kdfConfig: KdfConfig,\n  ): Promise<SymmetricCryptoKey> {\n    let key: Uint8Array = null;\n    if (kdfConfig.kdfType == null || kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n      if (kdfConfig.iterations == null) {\n        kdfConfig.iterations = PBKDF2KdfConfig.ITERATIONS.defaultValue;\n      }\n\n      key = await this.cryptoFunctionService.pbkdf2(password, salt, \"sha256\", kdfConfig.iterations);\n    } else if (kdfConfig.kdfType == KdfType.Argon2id) {\n      if (kdfConfig.iterations == null) {\n        kdfConfig.iterations = Argon2KdfConfig.ITERATIONS.defaultValue;\n      }\n\n      if (kdfConfig.memory == null) {\n        kdfConfig.memory = Argon2KdfConfig.MEMORY.defaultValue;\n      }\n\n      if (kdfConfig.parallelism == null) {\n        kdfConfig.parallelism = Argon2KdfConfig.PARALLELISM.defaultValue;\n      }\n\n      const saltHash = await this.cryptoFunctionService.hash(salt, \"sha256\");\n      key = await this.cryptoFunctionService.argon2(\n        password,\n        saltHash,\n        kdfConfig.iterations,\n        kdfConfig.memory * 1024, // convert to KiB from MiB\n        kdfConfig.parallelism,\n      );\n    } else {\n      throw new Error(\"Unknown Kdf.\");\n    }\n    return new SymmetricCryptoKey(key);\n  }\n\n  async stretchKey(key: SymmetricCryptoKey): Promise<SymmetricCryptoKey> {\n    const newKey = new Uint8Array(64);\n    const encKey = await this.cryptoFunctionService.hkdfExpand(key.key, \"enc\", 32, \"sha256\");\n    const macKey = await this.cryptoFunctionService.hkdfExpand(key.key, \"mac\", 32, \"sha256\");\n\n    newKey.set(new Uint8Array(encKey));\n    newKey.set(new Uint8Array(macKey), 32);\n\n    return new SymmetricCryptoKey(newKey);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  CollectionRequest,\n  CollectionAccessDetailsResponse,\n  CollectionDetailsResponse,\n  CollectionResponse,\n} from \"@bitwarden/admin-console/common\";\nimport { LogoutReason } from \"@bitwarden/auth/common\";\n\nimport { ApiService as ApiServiceAbstraction } from \"../abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { OrganizationConnectionType } from \"../admin-console/enums\";\nimport { OrganizationSponsorshipCreateRequest } from \"../admin-console/models/request/organization/organization-sponsorship-create.request\";\nimport { OrganizationSponsorshipRedeemRequest } from \"../admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { OrganizationConnectionRequest } from \"../admin-console/models/request/organization-connection.request\";\nimport { ProviderAddOrganizationRequest } from \"../admin-console/models/request/provider/provider-add-organization.request\";\nimport { ProviderOrganizationCreateRequest } from \"../admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderUserAcceptRequest } from \"../admin-console/models/request/provider/provider-user-accept.request\";\nimport { ProviderUserBulkConfirmRequest } from \"../admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"../admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"../admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserInviteRequest } from \"../admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"../admin-console/models/request/provider/provider-user-update.request\";\nimport { SelectionReadOnlyRequest } from \"../admin-console/models/request/selection-read-only.request\";\nimport {\n  OrganizationConnectionConfigApis,\n  OrganizationConnectionResponse,\n} from \"../admin-console/models/response/organization-connection.response\";\nimport { OrganizationExportResponse } from \"../admin-console/models/response/organization-export.response\";\nimport { OrganizationSponsorshipSyncStatusResponse } from \"../admin-console/models/response/organization-sponsorship-sync-status.response\";\nimport { PreValidateSponsorshipResponse } from \"../admin-console/models/response/pre-validate-sponsorship.response\";\nimport {\n  ProviderOrganizationOrganizationDetailsResponse,\n  ProviderOrganizationResponse,\n} from \"../admin-console/models/response/provider/provider-organization.response\";\nimport { ProviderUserBulkPublicKeyResponse } from \"../admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"../admin-console/models/response/provider/provider-user-bulk.response\";\nimport {\n  ProviderUserResponse,\n  ProviderUserUserDetailsResponse,\n} from \"../admin-console/models/response/provider/provider-user.response\";\nimport { SelectionReadOnlyResponse } from \"../admin-console/models/response/selection-read-only.response\";\nimport { TokenService } from \"../auth/abstractions/token.service\";\nimport { AuthRequest } from \"../auth/models/request/auth.request\";\nimport { DeviceVerificationRequest } from \"../auth/models/request/device-verification.request\";\nimport { DisableTwoFactorAuthenticatorRequest } from \"../auth/models/request/disable-two-factor-authenticator.request\";\nimport { EmailTokenRequest } from \"../auth/models/request/email-token.request\";\nimport { EmailRequest } from \"../auth/models/request/email.request\";\nimport { DeviceRequest } from \"../auth/models/request/identity-token/device.request\";\nimport { PasswordTokenRequest } from \"../auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"../auth/models/request/identity-token/sso-token.request\";\nimport { TokenTwoFactorRequest } from \"../auth/models/request/identity-token/token-two-factor.request\";\nimport { UserApiTokenRequest } from \"../auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"../auth/models/request/identity-token/webauthn-login-token.request\";\nimport { KeyConnectorUserKeyRequest } from \"../auth/models/request/key-connector-user-key.request\";\nimport { PasswordHintRequest } from \"../auth/models/request/password-hint.request\";\nimport { PasswordRequest } from \"../auth/models/request/password.request\";\nimport { PasswordlessAuthRequest } from \"../auth/models/request/passwordless-auth.request\";\nimport { SecretVerificationRequest } from \"../auth/models/request/secret-verification.request\";\nimport { SetKeyConnectorKeyRequest } from \"../auth/models/request/set-key-connector-key.request\";\nimport { SetPasswordRequest } from \"../auth/models/request/set-password.request\";\nimport { TwoFactorEmailRequest } from \"../auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviderRequest } from \"../auth/models/request/two-factor-provider.request\";\nimport { TwoFactorRecoveryRequest } from \"../auth/models/request/two-factor-recovery.request\";\nimport { UpdateProfileRequest } from \"../auth/models/request/update-profile.request\";\nimport { UpdateTdeOffboardingPasswordRequest } from \"../auth/models/request/update-tde-offboarding-password.request\";\nimport { UpdateTempPasswordRequest } from \"../auth/models/request/update-temp-password.request\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"../auth/models/request/update-two-factor-authenticator.request\";\nimport { UpdateTwoFactorDuoRequest } from \"../auth/models/request/update-two-factor-duo.request\";\nimport { UpdateTwoFactorEmailRequest } from \"../auth/models/request/update-two-factor-email.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"../auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"../auth/models/request/update-two-factor-web-authn.request\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"../auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { ApiKeyResponse } from \"../auth/models/response/api-key.response\";\nimport { AuthRequestResponse } from \"../auth/models/response/auth-request.response\";\nimport { DeviceVerificationResponse } from \"../auth/models/response/device-verification.response\";\nimport { IdentityCaptchaResponse } from \"../auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"../auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"../auth/models/response/identity-two-factor.response\";\nimport { KeyConnectorUserKeyResponse } from \"../auth/models/response/key-connector-user-key.response\";\nimport { PreloginResponse } from \"../auth/models/response/prelogin.response\";\nimport { RegisterResponse } from \"../auth/models/response/register.response\";\nimport { SsoPreValidateResponse } from \"../auth/models/response/sso-pre-validate.response\";\nimport { TwoFactorAuthenticatorResponse } from \"../auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"../auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"../auth/models/response/two-factor-email.response\";\nimport { TwoFactorProviderResponse } from \"../auth/models/response/two-factor-provider.response\";\nimport { TwoFactorRecoverResponse } from \"../auth/models/response/two-factor-recover.response\";\nimport {\n  ChallengeResponse,\n  TwoFactorWebAuthnResponse,\n} from \"../auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"../auth/models/response/two-factor-yubi-key.response\";\nimport { BitPayInvoiceRequest } from \"../billing/models/request/bit-pay-invoice.request\";\nimport { PaymentRequest } from \"../billing/models/request/payment.request\";\nimport { TaxInfoUpdateRequest } from \"../billing/models/request/tax-info-update.request\";\nimport { BillingHistoryResponse } from \"../billing/models/response/billing-history.response\";\nimport { BillingPaymentResponse } from \"../billing/models/response/billing-payment.response\";\nimport { PaymentResponse } from \"../billing/models/response/payment.response\";\nimport { PlanResponse } from \"../billing/models/response/plan.response\";\nimport { SubscriptionResponse } from \"../billing/models/response/subscription.response\";\nimport { TaxInfoResponse } from \"../billing/models/response/tax-info.response\";\nimport { TaxRateResponse } from \"../billing/models/response/tax-rate.response\";\nimport { DeviceType } from \"../enums\";\nimport { VaultTimeoutAction } from \"../enums/vault-timeout-action.enum\";\nimport { CollectionBulkDeleteRequest } from \"../models/request/collection-bulk-delete.request\";\nimport { DeleteRecoverRequest } from \"../models/request/delete-recover.request\";\nimport { EventRequest } from \"../models/request/event.request\";\nimport { KdfRequest } from \"../models/request/kdf.request\";\nimport { KeysRequest } from \"../models/request/keys.request\";\nimport { PreloginRequest } from \"../models/request/prelogin.request\";\nimport { RegisterRequest } from \"../models/request/register.request\";\nimport { StorageRequest } from \"../models/request/storage.request\";\nimport { UpdateAvatarRequest } from \"../models/request/update-avatar.request\";\nimport { UpdateDomainsRequest } from \"../models/request/update-domains.request\";\nimport { VerifyDeleteRecoverRequest } from \"../models/request/verify-delete-recover.request\";\nimport { VerifyEmailRequest } from \"../models/request/verify-email.request\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { DomainsResponse } from \"../models/response/domains.response\";\nimport { ErrorResponse } from \"../models/response/error.response\";\nimport { EventResponse } from \"../models/response/event.response\";\nimport { ListResponse } from \"../models/response/list.response\";\nimport { ProfileResponse } from \"../models/response/profile.response\";\nimport { UserKeyResponse } from \"../models/response/user-key.response\";\nimport { AppIdService } from \"../platform/abstractions/app-id.service\";\nimport { EnvironmentService } from \"../platform/abstractions/environment.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"../platform/abstractions/platform-utils.service\";\nimport { flagEnabled } from \"../platform/misc/flags\";\nimport { Utils } from \"../platform/misc/utils\";\nimport { SyncResponse } from \"../platform/sync\";\nimport { UserId } from \"../types/guid\";\nimport { AttachmentRequest } from \"../vault/models/request/attachment.request\";\nimport { CipherBulkDeleteRequest } from \"../vault/models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../vault/models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../vault/models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../vault/models/request/cipher-bulk-share.request\";\nimport { CipherCollectionsRequest } from \"../vault/models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../vault/models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../vault/models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../vault/models/request/cipher-share.request\";\nimport { CipherRequest } from \"../vault/models/request/cipher.request\";\nimport { AttachmentUploadDataResponse } from \"../vault/models/response/attachment-upload-data.response\";\nimport { AttachmentResponse } from \"../vault/models/response/attachment.response\";\nimport { CipherResponse } from \"../vault/models/response/cipher.response\";\nimport { OptionalCipherResponse } from \"../vault/models/response/optional-cipher.response\";\n\n/**\n * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual\n * api services. The `send` method is still allowed to be used within api services. For background\n * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service.\n */\nexport class ApiService implements ApiServiceAbstraction {\n  private device: DeviceType;\n  private deviceType: string;\n  private isWebClient = false;\n  private isDesktopClient = false;\n\n  constructor(\n    private tokenService: TokenService,\n    private platformUtilsService: PlatformUtilsService,\n    private environmentService: EnvironmentService,\n    private appIdService: AppIdService,\n    private refreshAccessTokenErrorCallback: () => void,\n    private logService: LogService,\n    private logoutCallback: (logoutReason: LogoutReason) => Promise<void>,\n    private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    private customUserAgent: string = null,\n  ) {\n    this.device = platformUtilsService.getDevice();\n    this.deviceType = this.device.toString();\n    this.isWebClient =\n      this.device === DeviceType.IEBrowser ||\n      this.device === DeviceType.ChromeBrowser ||\n      this.device === DeviceType.EdgeBrowser ||\n      this.device === DeviceType.FirefoxBrowser ||\n      this.device === DeviceType.OperaBrowser ||\n      this.device === DeviceType.SafariBrowser ||\n      this.device === DeviceType.UnknownBrowser ||\n      this.device === DeviceType.VivaldiBrowser;\n    this.isDesktopClient =\n      this.device === DeviceType.WindowsDesktop ||\n      this.device === DeviceType.MacOsDesktop ||\n      this.device === DeviceType.LinuxDesktop ||\n      this.device === DeviceType.WindowsCLI ||\n      this.device === DeviceType.MacOsCLI ||\n      this.device === DeviceType.LinuxCLI;\n  }\n\n  // Auth APIs\n\n  async postIdentityToken(\n    request:\n      | UserApiTokenRequest\n      | PasswordTokenRequest\n      | SsoTokenRequest\n      | WebAuthnLoginTokenRequest,\n  ): Promise<IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse> {\n    const headers = new Headers({\n      \"Content-Type\": \"application/x-www-form-urlencoded; charset=utf-8\",\n      Accept: \"application/json\",\n      \"Device-Type\": this.deviceType,\n    });\n    if (this.customUserAgent != null) {\n      headers.set(\"User-Agent\", this.customUserAgent);\n    }\n    request.alterIdentityTokenHeaders(headers);\n\n    const identityToken =\n      request instanceof UserApiTokenRequest\n        ? request.toIdentityToken()\n        : request.toIdentityToken(this.platformUtilsService.getClientType());\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    const response = await this.fetch(\n      new Request(env.getIdentityUrl() + \"/connect/token\", {\n        body: this.qsStringify(identityToken),\n        credentials: await this.getCredentials(),\n        cache: \"no-store\",\n        headers: headers,\n        method: \"POST\",\n      }),\n    );\n\n    let responseJson: any = null;\n    if (this.isJsonResponse(response)) {\n      responseJson = await response.json();\n    }\n\n    if (responseJson != null) {\n      if (response.status === 200) {\n        return new IdentityTokenResponse(responseJson);\n      } else if (\n        response.status === 400 &&\n        responseJson.TwoFactorProviders2 &&\n        Object.keys(responseJson.TwoFactorProviders2).length\n      ) {\n        return new IdentityTwoFactorResponse(responseJson);\n      } else if (\n        response.status === 400 &&\n        responseJson.HCaptcha_SiteKey &&\n        Object.keys(responseJson.HCaptcha_SiteKey).length\n      ) {\n        return new IdentityCaptchaResponse(responseJson);\n      }\n    }\n\n    return Promise.reject(new ErrorResponse(responseJson, response.status, true));\n  }\n\n  async refreshIdentityToken(): Promise<any> {\n    try {\n      await this.refreshToken();\n    } catch (e) {\n      this.logService.error(\"Error refreshing access token: \", e);\n      throw e;\n    }\n  }\n\n  // TODO: PM-3519: Create and move to AuthRequest Api service\n  // TODO: PM-9724: Remove legacy auth request methods when we remove legacy LoginViaAuthRequestV1Components\n  async postAuthRequest(request: AuthRequest): Promise<AuthRequestResponse> {\n    const r = await this.send(\"POST\", \"/auth-requests/\", request, false, true);\n    return new AuthRequestResponse(r);\n  }\n  async postAdminAuthRequest(request: AuthRequest): Promise<AuthRequestResponse> {\n    const r = await this.send(\"POST\", \"/auth-requests/admin-request\", request, true, true);\n    return new AuthRequestResponse(r);\n  }\n\n  async getAuthResponse(id: string, accessCode: string): Promise<AuthRequestResponse> {\n    const path = `/auth-requests/${id}/response?code=${accessCode}`;\n    const r = await this.send(\"GET\", path, null, false, true);\n    return new AuthRequestResponse(r);\n  }\n\n  async getAuthRequest(id: string): Promise<AuthRequestResponse> {\n    const path = `/auth-requests/${id}`;\n    const r = await this.send(\"GET\", path, null, true, true);\n    return new AuthRequestResponse(r);\n  }\n\n  async putAuthRequest(id: string, request: PasswordlessAuthRequest): Promise<AuthRequestResponse> {\n    const path = `/auth-requests/${id}`;\n    const r = await this.send(\"PUT\", path, request, true, true);\n    return new AuthRequestResponse(r);\n  }\n\n  async getAuthRequests(): Promise<ListResponse<AuthRequestResponse>> {\n    const path = `/auth-requests/`;\n    const r = await this.send(\"GET\", path, null, true, true);\n    return new ListResponse(r, AuthRequestResponse);\n  }\n\n  async getLastAuthRequest(): Promise<AuthRequestResponse> {\n    const requests = await this.getAuthRequests();\n    const activeRequests = requests.data.filter((m) => !m.isAnswered && !m.isExpired);\n    const lastRequest = activeRequests.sort((a: AuthRequestResponse, b: AuthRequestResponse) =>\n      a.creationDate.localeCompare(b.creationDate),\n    )[activeRequests.length - 1];\n    return lastRequest;\n  }\n\n  // Account APIs\n\n  async getProfile(): Promise<ProfileResponse> {\n    const r = await this.send(\"GET\", \"/accounts/profile\", null, true, true);\n    return new ProfileResponse(r);\n  }\n\n  async getUserSubscription(): Promise<SubscriptionResponse> {\n    const r = await this.send(\"GET\", \"/accounts/subscription\", null, true, true);\n    return new SubscriptionResponse(r);\n  }\n\n  async getTaxInfo(): Promise<TaxInfoResponse> {\n    const r = await this.send(\"GET\", \"/accounts/tax\", null, true, true);\n    return new TaxInfoResponse(r);\n  }\n\n  async putProfile(request: UpdateProfileRequest): Promise<ProfileResponse> {\n    const r = await this.send(\"PUT\", \"/accounts/profile\", request, true, true);\n    return new ProfileResponse(r);\n  }\n\n  async putAvatar(request: UpdateAvatarRequest): Promise<ProfileResponse> {\n    const r = await this.send(\"PUT\", \"/accounts/avatar\", request, true, true);\n    return new ProfileResponse(r);\n  }\n\n  putTaxInfo(request: TaxInfoUpdateRequest): Promise<any> {\n    return this.send(\"PUT\", \"/accounts/tax\", request, true, false);\n  }\n\n  async postPrelogin(request: PreloginRequest): Promise<PreloginResponse> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const r = await this.send(\n      \"POST\",\n      \"/accounts/prelogin\",\n      request,\n      false,\n      true,\n      env.getIdentityUrl(),\n    );\n    return new PreloginResponse(r);\n  }\n\n  postEmailToken(request: EmailTokenRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/email-token\", request, true, false);\n  }\n\n  postEmail(request: EmailRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/email\", request, true, false);\n  }\n\n  postPassword(request: PasswordRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/password\", request, true, false);\n  }\n\n  setPassword(request: SetPasswordRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/set-password\", request, true, false);\n  }\n\n  postSetKeyConnectorKey(request: SetKeyConnectorKeyRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/set-key-connector-key\", request, true, false);\n  }\n\n  postSecurityStamp(request: SecretVerificationRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/security-stamp\", request, true, false);\n  }\n\n  async getAccountRevisionDate(): Promise<number> {\n    const r = await this.send(\"GET\", \"/accounts/revision-date\", null, true, true);\n    return r as number;\n  }\n\n  postPasswordHint(request: PasswordHintRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/password-hint\", request, false, false);\n  }\n\n  async postRegister(request: RegisterRequest): Promise<RegisterResponse> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const r = await this.send(\n      \"POST\",\n      \"/accounts/register\",\n      request,\n      false,\n      true,\n      env.getIdentityUrl(),\n    );\n    return new RegisterResponse(r);\n  }\n\n  async postPremium(data: FormData): Promise<PaymentResponse> {\n    const r = await this.send(\"POST\", \"/accounts/premium\", data, true, true);\n    return new PaymentResponse(r);\n  }\n\n  postReinstatePremium(): Promise<any> {\n    return this.send(\"POST\", \"/accounts/reinstate-premium\", null, true, false);\n  }\n\n  async postAccountStorage(request: StorageRequest): Promise<PaymentResponse> {\n    const r = await this.send(\"POST\", \"/accounts/storage\", request, true, true);\n    return new PaymentResponse(r);\n  }\n\n  postAccountPayment(request: PaymentRequest): Promise<void> {\n    return this.send(\"POST\", \"/accounts/payment\", request, true, false);\n  }\n\n  postAccountLicense(data: FormData): Promise<any> {\n    return this.send(\"POST\", \"/accounts/license\", data, true, false);\n  }\n\n  postAccountKeys(request: KeysRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/keys\", request, true, false);\n  }\n\n  postAccountVerifyEmail(): Promise<any> {\n    return this.send(\"POST\", \"/accounts/verify-email\", null, true, false);\n  }\n\n  postAccountVerifyEmailToken(request: VerifyEmailRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/verify-email-token\", request, false, false);\n  }\n\n  postAccountRecoverDelete(request: DeleteRecoverRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/delete-recover\", request, false, false);\n  }\n\n  postAccountRecoverDeleteToken(request: VerifyDeleteRecoverRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/delete-recover-token\", request, false, false);\n  }\n\n  postAccountKdf(request: KdfRequest): Promise<any> {\n    return this.send(\"POST\", \"/accounts/kdf\", request, true, false);\n  }\n\n  async deleteSsoUser(organizationId: string): Promise<void> {\n    return this.send(\"DELETE\", \"/accounts/sso/\" + organizationId, null, true, false);\n  }\n\n  async getSsoUserIdentifier(): Promise<string> {\n    return this.send(\"GET\", \"/accounts/sso/user-identifier\", null, true, true);\n  }\n\n  async postUserApiKey(id: string, request: SecretVerificationRequest): Promise<ApiKeyResponse> {\n    const r = await this.send(\"POST\", \"/accounts/api-key\", request, true, true);\n    return new ApiKeyResponse(r);\n  }\n\n  async postUserRotateApiKey(\n    id: string,\n    request: SecretVerificationRequest,\n  ): Promise<ApiKeyResponse> {\n    const r = await this.send(\"POST\", \"/accounts/rotate-api-key\", request, true, true);\n    return new ApiKeyResponse(r);\n  }\n\n  putUpdateTempPassword(request: UpdateTempPasswordRequest): Promise<any> {\n    return this.send(\"PUT\", \"/accounts/update-temp-password\", request, true, false);\n  }\n\n  putUpdateTdeOffboardingPassword(request: UpdateTdeOffboardingPasswordRequest): Promise<void> {\n    return this.send(\"PUT\", \"/accounts/update-tde-offboarding-password\", request, true, false);\n  }\n\n  postConvertToKeyConnector(): Promise<void> {\n    return this.send(\"POST\", \"/accounts/convert-to-key-connector\", null, true, false);\n  }\n\n  // Account Billing APIs\n\n  async getUserBillingHistory(): Promise<BillingHistoryResponse> {\n    const r = await this.send(\"GET\", \"/accounts/billing/history\", null, true, true);\n    return new BillingHistoryResponse(r);\n  }\n\n  async getUserBillingPayment(): Promise<BillingPaymentResponse> {\n    const r = await this.send(\"GET\", \"/accounts/billing/payment-method\", null, true, true);\n    return new BillingPaymentResponse(r);\n  }\n\n  // Cipher APIs\n\n  async getCipher(id: string): Promise<CipherResponse> {\n    const r = await this.send(\"GET\", \"/ciphers/\" + id, null, true, true);\n    return new CipherResponse(r);\n  }\n\n  async getFullCipherDetails(id: string): Promise<CipherResponse> {\n    const r = await this.send(\"GET\", \"/ciphers/\" + id + \"/details\", null, true, true);\n    return new CipherResponse(r);\n  }\n\n  async getCipherAdmin(id: string): Promise<CipherResponse> {\n    const r = await this.send(\"GET\", \"/ciphers/\" + id + \"/admin\", null, true, true);\n    return new CipherResponse(r);\n  }\n\n  async getCiphersOrganization(organizationId: string): Promise<ListResponse<CipherResponse>> {\n    const r = await this.send(\n      \"GET\",\n      \"/ciphers/organization-details?organizationId=\" + organizationId,\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, CipherResponse);\n  }\n\n  async postCipher(request: CipherRequest): Promise<CipherResponse> {\n    const r = await this.send(\"POST\", \"/ciphers\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  async postCipherCreate(request: CipherCreateRequest): Promise<CipherResponse> {\n    const r = await this.send(\"POST\", \"/ciphers/create\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  async postCipherAdmin(request: CipherCreateRequest): Promise<CipherResponse> {\n    const r = await this.send(\"POST\", \"/ciphers/admin\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  async putCipher(id: string, request: CipherRequest): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id, request, true, true);\n    return new CipherResponse(r);\n  }\n\n  async putPartialCipher(id: string, request: CipherPartialRequest): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/partial\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  async putCipherAdmin(id: string, request: CipherRequest): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/admin\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  deleteCipher(id: string): Promise<any> {\n    return this.send(\"DELETE\", \"/ciphers/\" + id, null, true, false);\n  }\n\n  deleteCipherAdmin(id: string): Promise<any> {\n    return this.send(\"DELETE\", \"/ciphers/\" + id + \"/admin\", null, true, false);\n  }\n\n  deleteManyCiphers(request: CipherBulkDeleteRequest): Promise<any> {\n    return this.send(\"DELETE\", \"/ciphers\", request, true, false);\n  }\n\n  deleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise<any> {\n    return this.send(\"DELETE\", \"/ciphers/admin\", request, true, false);\n  }\n\n  putMoveCiphers(request: CipherBulkMoveRequest): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/move\", request, true, false);\n  }\n\n  async putShareCipher(id: string, request: CipherShareRequest): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/share\", request, true, true);\n    return new CipherResponse(r);\n  }\n\n  putShareCiphers(request: CipherBulkShareRequest): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/share\", request, true, false);\n  }\n\n  async putCipherCollections(\n    id: string,\n    request: CipherCollectionsRequest,\n  ): Promise<OptionalCipherResponse> {\n    const response = await this.send(\n      \"PUT\",\n      \"/ciphers/\" + id + \"/collections_v2\",\n      request,\n      true,\n      true,\n    );\n    return new OptionalCipherResponse(response);\n  }\n\n  putCipherCollectionsAdmin(id: string, request: CipherCollectionsRequest): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/\" + id + \"/collections-admin\", request, true, true);\n  }\n\n  postPurgeCiphers(\n    request: SecretVerificationRequest,\n    organizationId: string = null,\n  ): Promise<any> {\n    let path = \"/ciphers/purge\";\n    if (organizationId != null) {\n      path += \"?organizationId=\" + organizationId;\n    }\n    return this.send(\"POST\", path, request, true, false);\n  }\n\n  putDeleteCipher(id: string): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/\" + id + \"/delete\", null, true, false);\n  }\n\n  putDeleteCipherAdmin(id: string): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/\" + id + \"/delete-admin\", null, true, false);\n  }\n\n  putDeleteManyCiphers(request: CipherBulkDeleteRequest): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/delete\", request, true, false);\n  }\n\n  putDeleteManyCiphersAdmin(request: CipherBulkDeleteRequest): Promise<any> {\n    return this.send(\"PUT\", \"/ciphers/delete-admin\", request, true, false);\n  }\n\n  async putRestoreCipher(id: string): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/restore\", null, true, true);\n    return new CipherResponse(r);\n  }\n\n  async putRestoreCipherAdmin(id: string): Promise<CipherResponse> {\n    const r = await this.send(\"PUT\", \"/ciphers/\" + id + \"/restore-admin\", null, true, true);\n    return new CipherResponse(r);\n  }\n\n  async putRestoreManyCiphers(\n    request: CipherBulkRestoreRequest,\n  ): Promise<ListResponse<CipherResponse>> {\n    const r = await this.send(\"PUT\", \"/ciphers/restore\", request, true, true);\n    return new ListResponse<CipherResponse>(r, CipherResponse);\n  }\n\n  async putRestoreManyCiphersAdmin(\n    request: CipherBulkRestoreRequest,\n  ): Promise<ListResponse<CipherResponse>> {\n    const r = await this.send(\"PUT\", \"/ciphers/restore-admin\", request, true, true);\n    return new ListResponse<CipherResponse>(r, CipherResponse);\n  }\n\n  // Attachments APIs\n\n  async getAttachmentData(\n    cipherId: string,\n    attachmentId: string,\n    emergencyAccessId?: string,\n  ): Promise<AttachmentResponse> {\n    const path =\n      (emergencyAccessId != null ? \"/emergency-access/\" + emergencyAccessId + \"/\" : \"/ciphers/\") +\n      cipherId +\n      \"/attachment/\" +\n      attachmentId;\n    const r = await this.send(\"GET\", path, null, true, true);\n    return new AttachmentResponse(r);\n  }\n\n  async postCipherAttachment(\n    id: string,\n    request: AttachmentRequest,\n  ): Promise<AttachmentUploadDataResponse> {\n    const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment/v2\", request, true, true);\n    return new AttachmentUploadDataResponse(r);\n  }\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  async postCipherAttachmentLegacy(id: string, data: FormData): Promise<CipherResponse> {\n    const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment\", data, true, true);\n    return new CipherResponse(r);\n  }\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  async postCipherAttachmentAdminLegacy(id: string, data: FormData): Promise<CipherResponse> {\n    const r = await this.send(\"POST\", \"/ciphers/\" + id + \"/attachment-admin\", data, true, true);\n    return new CipherResponse(r);\n  }\n\n  deleteCipherAttachment(id: string, attachmentId: string): Promise<any> {\n    return this.send(\"DELETE\", \"/ciphers/\" + id + \"/attachment/\" + attachmentId, null, true, false);\n  }\n\n  deleteCipherAttachmentAdmin(id: string, attachmentId: string): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/admin\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  postShareCipherAttachment(\n    id: string,\n    attachmentId: string,\n    data: FormData,\n    organizationId: string,\n  ): Promise<any> {\n    return this.send(\n      \"POST\",\n      \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/share?organizationId=\" + organizationId,\n      data,\n      true,\n      false,\n    );\n  }\n\n  async renewAttachmentUploadUrl(\n    id: string,\n    attachmentId: string,\n  ): Promise<AttachmentUploadDataResponse> {\n    const r = await this.send(\n      \"GET\",\n      \"/ciphers/\" + id + \"/attachment/\" + attachmentId + \"/renew\",\n      null,\n      true,\n      true,\n    );\n    return new AttachmentUploadDataResponse(r);\n  }\n\n  postAttachmentFile(id: string, attachmentId: string, data: FormData): Promise<any> {\n    return this.send(\"POST\", \"/ciphers/\" + id + \"/attachment/\" + attachmentId, data, true, false);\n  }\n\n  // Collections APIs\n\n  async getCollectionAccessDetails(\n    organizationId: string,\n    id: string,\n  ): Promise<CollectionAccessDetailsResponse> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id + \"/details\",\n      null,\n      true,\n      true,\n    );\n    return new CollectionAccessDetailsResponse(r);\n  }\n\n  async getUserCollections(): Promise<ListResponse<CollectionResponse>> {\n    const r = await this.send(\"GET\", \"/collections\", null, true, true);\n    return new ListResponse(r, CollectionResponse);\n  }\n\n  async getCollections(organizationId: string): Promise<ListResponse<CollectionResponse>> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/collections\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, CollectionResponse);\n  }\n\n  async getManyCollectionsWithAccessDetails(\n    organizationId: string,\n  ): Promise<ListResponse<CollectionAccessDetailsResponse>> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/collections/details\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, CollectionAccessDetailsResponse);\n  }\n\n  async getCollectionUsers(\n    organizationId: string,\n    id: string,\n  ): Promise<SelectionReadOnlyResponse[]> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id + \"/users\",\n      null,\n      true,\n      true,\n    );\n    return r.map((dr: any) => new SelectionReadOnlyResponse(dr));\n  }\n\n  async postCollection(\n    organizationId: string,\n    request: CollectionRequest,\n  ): Promise<CollectionDetailsResponse> {\n    const r = await this.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/collections\",\n      request,\n      true,\n      true,\n    );\n    return new CollectionAccessDetailsResponse(r);\n  }\n\n  async putCollection(\n    organizationId: string,\n    id: string,\n    request: CollectionRequest,\n  ): Promise<CollectionDetailsResponse> {\n    const r = await this.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id,\n      request,\n      true,\n      true,\n    );\n    return new CollectionAccessDetailsResponse(r);\n  }\n\n  async putCollectionUsers(\n    organizationId: string,\n    id: string,\n    request: SelectionReadOnlyRequest[],\n  ): Promise<any> {\n    await this.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id + \"/users\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  deleteCollection(organizationId: string, id: string): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id,\n      null,\n      true,\n      false,\n    );\n  }\n\n  deleteManyCollections(organizationId: string, collectionIds: string[]): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/collections\",\n      new CollectionBulkDeleteRequest(collectionIds),\n      true,\n      false,\n    );\n  }\n\n  deleteCollectionUser(\n    organizationId: string,\n    id: string,\n    organizationUserId: string,\n  ): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/collections/\" + id + \"/user/\" + organizationUserId,\n      null,\n      true,\n      false,\n    );\n  }\n\n  // Groups APIs\n\n  async getGroupUsers(organizationId: string, id: string): Promise<string[]> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/groups/\" + id + \"/users\",\n      null,\n      true,\n      true,\n    );\n    return r;\n  }\n\n  deleteGroupUser(organizationId: string, id: string, organizationUserId: string): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/groups/\" + id + \"/user/\" + organizationUserId,\n      null,\n      true,\n      false,\n    );\n  }\n\n  // Plan APIs\n\n  async getPlans(): Promise<ListResponse<PlanResponse>> {\n    const r = await this.send(\"GET\", \"/plans\", null, false, true);\n    return new ListResponse(r, PlanResponse);\n  }\n\n  async getTaxRates(): Promise<ListResponse<TaxRateResponse>> {\n    const r = await this.send(\"GET\", \"/plans/sales-tax-rates/\", null, true, true);\n    return new ListResponse(r, TaxRateResponse);\n  }\n\n  // Settings APIs\n\n  async getSettingsDomains(): Promise<DomainsResponse> {\n    const r = await this.send(\"GET\", \"/settings/domains\", null, true, true);\n    return new DomainsResponse(r);\n  }\n\n  async putSettingsDomains(request: UpdateDomainsRequest): Promise<DomainsResponse> {\n    const r = await this.send(\"PUT\", \"/settings/domains\", request, true, true);\n    return new DomainsResponse(r);\n  }\n\n  // Sync APIs\n\n  async getSync(): Promise<SyncResponse> {\n    const path = this.isDesktopClient || this.isWebClient ? \"/sync?excludeDomains=true\" : \"/sync\";\n    const r = await this.send(\"GET\", path, null, true, true);\n    return new SyncResponse(r);\n  }\n\n  // Two-factor APIs\n\n  async getTwoFactorProviders(): Promise<ListResponse<TwoFactorProviderResponse>> {\n    const r = await this.send(\"GET\", \"/two-factor\", null, true, true);\n    return new ListResponse(r, TwoFactorProviderResponse);\n  }\n\n  async getTwoFactorOrganizationProviders(\n    organizationId: string,\n  ): Promise<ListResponse<TwoFactorProviderResponse>> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/two-factor\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, TwoFactorProviderResponse);\n  }\n\n  async getTwoFactorAuthenticator(\n    request: SecretVerificationRequest,\n  ): Promise<TwoFactorAuthenticatorResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-authenticator\", request, true, true);\n    return new TwoFactorAuthenticatorResponse(r);\n  }\n\n  async getTwoFactorEmail(request: SecretVerificationRequest): Promise<TwoFactorEmailResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-email\", request, true, true);\n    return new TwoFactorEmailResponse(r);\n  }\n\n  async getTwoFactorDuo(request: SecretVerificationRequest): Promise<TwoFactorDuoResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-duo\", request, true, true);\n    return new TwoFactorDuoResponse(r);\n  }\n\n  async getTwoFactorOrganizationDuo(\n    organizationId: string,\n    request: SecretVerificationRequest,\n  ): Promise<TwoFactorDuoResponse> {\n    const r = await this.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/two-factor/get-duo\",\n      request,\n      true,\n      true,\n    );\n    return new TwoFactorDuoResponse(r);\n  }\n\n  async getTwoFactorYubiKey(request: SecretVerificationRequest): Promise<TwoFactorYubiKeyResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-yubikey\", request, true, true);\n    return new TwoFactorYubiKeyResponse(r);\n  }\n\n  async getTwoFactorWebAuthn(\n    request: SecretVerificationRequest,\n  ): Promise<TwoFactorWebAuthnResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-webauthn\", request, true, true);\n    return new TwoFactorWebAuthnResponse(r);\n  }\n\n  async getTwoFactorWebAuthnChallenge(\n    request: SecretVerificationRequest,\n  ): Promise<ChallengeResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-webauthn-challenge\", request, true, true);\n    return new ChallengeResponse(r);\n  }\n\n  async getTwoFactorRecover(request: SecretVerificationRequest): Promise<TwoFactorRecoverResponse> {\n    const r = await this.send(\"POST\", \"/two-factor/get-recover\", request, true, true);\n    return new TwoFactorRecoverResponse(r);\n  }\n\n  async putTwoFactorAuthenticator(\n    request: UpdateTwoFactorAuthenticatorRequest,\n  ): Promise<TwoFactorAuthenticatorResponse> {\n    const r = await this.send(\"PUT\", \"/two-factor/authenticator\", request, true, true);\n    return new TwoFactorAuthenticatorResponse(r);\n  }\n\n  async deleteTwoFactorAuthenticator(\n    request: DisableTwoFactorAuthenticatorRequest,\n  ): Promise<TwoFactorProviderResponse> {\n    const r = await this.send(\"DELETE\", \"/two-factor/authenticator\", request, true, true);\n    return new TwoFactorProviderResponse(r);\n  }\n\n  async putTwoFactorEmail(request: UpdateTwoFactorEmailRequest): Promise<TwoFactorEmailResponse> {\n    const r = await this.send(\"PUT\", \"/two-factor/email\", request, true, true);\n    return new TwoFactorEmailResponse(r);\n  }\n\n  async putTwoFactorDuo(request: UpdateTwoFactorDuoRequest): Promise<TwoFactorDuoResponse> {\n    const r = await this.send(\"PUT\", \"/two-factor/duo\", request, true, true);\n    return new TwoFactorDuoResponse(r);\n  }\n\n  async putTwoFactorOrganizationDuo(\n    organizationId: string,\n    request: UpdateTwoFactorDuoRequest,\n  ): Promise<TwoFactorDuoResponse> {\n    const r = await this.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/two-factor/duo\",\n      request,\n      true,\n      true,\n    );\n    return new TwoFactorDuoResponse(r);\n  }\n\n  async putTwoFactorYubiKey(\n    request: UpdateTwoFactorYubikeyOtpRequest,\n  ): Promise<TwoFactorYubiKeyResponse> {\n    const r = await this.send(\"PUT\", \"/two-factor/yubikey\", request, true, true);\n    return new TwoFactorYubiKeyResponse(r);\n  }\n\n  async putTwoFactorWebAuthn(\n    request: UpdateTwoFactorWebAuthnRequest,\n  ): Promise<TwoFactorWebAuthnResponse> {\n    const response = request.deviceResponse.response as AuthenticatorAttestationResponse;\n    const data: any = Object.assign({}, request);\n\n    data.deviceResponse = {\n      id: request.deviceResponse.id,\n      rawId: btoa(request.deviceResponse.id),\n      type: request.deviceResponse.type,\n      extensions: request.deviceResponse.getClientExtensionResults(),\n      response: {\n        AttestationObject: Utils.fromBufferToB64(response.attestationObject),\n        clientDataJson: Utils.fromBufferToB64(response.clientDataJSON),\n      },\n    };\n\n    const r = await this.send(\"PUT\", \"/two-factor/webauthn\", data, true, true);\n    return new TwoFactorWebAuthnResponse(r);\n  }\n\n  async deleteTwoFactorWebAuthn(\n    request: UpdateTwoFactorWebAuthnDeleteRequest,\n  ): Promise<TwoFactorWebAuthnResponse> {\n    const r = await this.send(\"DELETE\", \"/two-factor/webauthn\", request, true, true);\n    return new TwoFactorWebAuthnResponse(r);\n  }\n\n  async putTwoFactorDisable(request: TwoFactorProviderRequest): Promise<TwoFactorProviderResponse> {\n    const r = await this.send(\"PUT\", \"/two-factor/disable\", request, true, true);\n    return new TwoFactorProviderResponse(r);\n  }\n\n  async putTwoFactorOrganizationDisable(\n    organizationId: string,\n    request: TwoFactorProviderRequest,\n  ): Promise<TwoFactorProviderResponse> {\n    const r = await this.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/two-factor/disable\",\n      request,\n      true,\n      true,\n    );\n    return new TwoFactorProviderResponse(r);\n  }\n\n  postTwoFactorRecover(request: TwoFactorRecoveryRequest): Promise<any> {\n    return this.send(\"POST\", \"/two-factor/recover\", request, false, false);\n  }\n\n  postTwoFactorEmailSetup(request: TwoFactorEmailRequest): Promise<any> {\n    return this.send(\"POST\", \"/two-factor/send-email\", request, true, false);\n  }\n\n  postTwoFactorEmail(request: TwoFactorEmailRequest): Promise<any> {\n    return this.send(\"POST\", \"/two-factor/send-email-login\", request, false, false);\n  }\n\n  async getDeviceVerificationSettings(): Promise<DeviceVerificationResponse> {\n    const r = await this.send(\n      \"GET\",\n      \"/two-factor/get-device-verification-settings\",\n      null,\n      true,\n      true,\n    );\n    return new DeviceVerificationResponse(r);\n  }\n\n  async putDeviceVerificationSettings(\n    request: DeviceVerificationRequest,\n  ): Promise<DeviceVerificationResponse> {\n    const r = await this.send(\n      \"PUT\",\n      \"/two-factor/device-verification-settings\",\n      request,\n      true,\n      true,\n    );\n    return new DeviceVerificationResponse(r);\n  }\n\n  // Organization APIs\n\n  async getCloudCommunicationsEnabled(): Promise<boolean> {\n    const r = await this.send(\"GET\", \"/organizations/connections/enabled\", null, true, true);\n    return r as boolean;\n  }\n\n  async getOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    id: string,\n    type: OrganizationConnectionType,\n    configType: { new (response: any): TConfig },\n  ): Promise<OrganizationConnectionResponse<TConfig>> {\n    const r = await this.send(\"GET\", `/organizations/connections/${id}/${type}`, null, true, true);\n    return new OrganizationConnectionResponse(r, configType);\n  }\n\n  async createOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    request: OrganizationConnectionRequest,\n    configType: { new (response: any): TConfig },\n  ): Promise<OrganizationConnectionResponse<TConfig>> {\n    const r = await this.send(\"POST\", \"/organizations/connections/\", request, true, true);\n    return new OrganizationConnectionResponse(r, configType);\n  }\n\n  async updateOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    request: OrganizationConnectionRequest,\n    configType: { new (response: any): TConfig },\n    organizationConnectionId?: string,\n  ): Promise<OrganizationConnectionResponse<TConfig>> {\n    const r = await this.send(\n      \"PUT\",\n      \"/organizations/connections/\" + organizationConnectionId,\n      request,\n      true,\n      true,\n    );\n    return new OrganizationConnectionResponse(r, configType);\n  }\n\n  async deleteOrganizationConnection(id: string): Promise<void> {\n    return this.send(\"DELETE\", \"/organizations/connections/\" + id, null, true, false);\n  }\n\n  // Provider User APIs\n\n  async getProviderUsers(\n    providerId: string,\n  ): Promise<ListResponse<ProviderUserUserDetailsResponse>> {\n    const r = await this.send(\"GET\", \"/providers/\" + providerId + \"/users\", null, true, true);\n    return new ListResponse(r, ProviderUserUserDetailsResponse);\n  }\n\n  async getProviderUser(providerId: string, id: string): Promise<ProviderUserResponse> {\n    const r = await this.send(\"GET\", \"/providers/\" + providerId + \"/users/\" + id, null, true, true);\n    return new ProviderUserResponse(r);\n  }\n\n  postProviderUserInvite(providerId: string, request: ProviderUserInviteRequest): Promise<any> {\n    return this.send(\"POST\", \"/providers/\" + providerId + \"/users/invite\", request, true, false);\n  }\n\n  postProviderUserReinvite(providerId: string, id: string): Promise<any> {\n    return this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/\" + id + \"/reinvite\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async postManyProviderUserReinvite(\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ): Promise<ListResponse<ProviderUserBulkResponse>> {\n    const r = await this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/reinvite\",\n      request,\n      true,\n      true,\n    );\n    return new ListResponse(r, ProviderUserBulkResponse);\n  }\n\n  async postProviderUserBulkConfirm(\n    providerId: string,\n    request: ProviderUserBulkConfirmRequest,\n  ): Promise<ListResponse<ProviderUserBulkResponse>> {\n    const r = await this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/confirm\",\n      request,\n      true,\n      true,\n    );\n    return new ListResponse(r, ProviderUserBulkResponse);\n  }\n\n  async deleteManyProviderUsers(\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ): Promise<ListResponse<ProviderUserBulkResponse>> {\n    const r = await this.send(\"DELETE\", \"/providers/\" + providerId + \"/users\", request, true, true);\n    return new ListResponse(r, ProviderUserBulkResponse);\n  }\n\n  postProviderUserAccept(\n    providerId: string,\n    id: string,\n    request: ProviderUserAcceptRequest,\n  ): Promise<any> {\n    return this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/\" + id + \"/accept\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postProviderUserConfirm(\n    providerId: string,\n    id: string,\n    request: ProviderUserConfirmRequest,\n  ): Promise<any> {\n    return this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/\" + id + \"/confirm\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async postProviderUsersPublicKey(\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ): Promise<ListResponse<ProviderUserBulkPublicKeyResponse>> {\n    const r = await this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/users/public-keys\",\n      request,\n      true,\n      true,\n    );\n    return new ListResponse(r, ProviderUserBulkPublicKeyResponse);\n  }\n\n  putProviderUser(\n    providerId: string,\n    id: string,\n    request: ProviderUserUpdateRequest,\n  ): Promise<any> {\n    return this.send(\"PUT\", \"/providers/\" + providerId + \"/users/\" + id, request, true, false);\n  }\n\n  deleteProviderUser(providerId: string, id: string): Promise<any> {\n    return this.send(\"DELETE\", \"/providers/\" + providerId + \"/users/\" + id, null, true, false);\n  }\n\n  // Provider Organization APIs\n\n  async getProviderClients(\n    providerId: string,\n  ): Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>> {\n    const r = await this.send(\n      \"GET\",\n      \"/providers/\" + providerId + \"/organizations\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, ProviderOrganizationOrganizationDetailsResponse);\n  }\n\n  postProviderAddOrganization(\n    providerId: string,\n    request: ProviderAddOrganizationRequest,\n  ): Promise<any> {\n    return this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/organizations/add\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async postProviderCreateOrganization(\n    providerId: string,\n    request: ProviderOrganizationCreateRequest,\n  ): Promise<ProviderOrganizationResponse> {\n    const r = await this.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/organizations\",\n      request,\n      true,\n      true,\n    );\n    return new ProviderOrganizationResponse(r);\n  }\n\n  deleteProviderOrganization(providerId: string, id: string): Promise<any> {\n    return this.send(\n      \"DELETE\",\n      \"/providers/\" + providerId + \"/organizations/\" + id,\n      null,\n      true,\n      false,\n    );\n  }\n\n  // Event APIs\n\n  async getEvents(start: string, end: string, token: string): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\"/events\", start, end, token),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async getEventsCipher(\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\"/ciphers/\" + id + \"/events\", start, end, token),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async getEventsOrganization(\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\"/organizations/\" + id + \"/events\", start, end, token),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async getEventsOrganizationUser(\n    organizationId: string,\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\n        \"/organizations/\" + organizationId + \"/users/\" + id + \"/events\",\n        start,\n        end,\n        token,\n      ),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async getEventsProvider(\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\"/providers/\" + id + \"/events\", start, end, token),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async getEventsProviderUser(\n    providerId: string,\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ): Promise<ListResponse<EventResponse>> {\n    const r = await this.send(\n      \"GET\",\n      this.addEventParameters(\n        \"/providers/\" + providerId + \"/users/\" + id + \"/events\",\n        start,\n        end,\n        token,\n      ),\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, EventResponse);\n  }\n\n  async postEventsCollect(request: EventRequest[], userId?: UserId): Promise<any> {\n    const authHeader = await this.tokenService.getAccessToken(userId);\n    const headers = new Headers({\n      \"Device-Type\": this.deviceType,\n      Authorization: \"Bearer \" + authHeader,\n      \"Content-Type\": \"application/json; charset=utf-8\",\n    });\n    if (this.customUserAgent != null) {\n      headers.set(\"User-Agent\", this.customUserAgent);\n    }\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const response = await this.fetch(\n      new Request(env.getEventsUrl() + \"/collect\", {\n        cache: \"no-store\",\n        credentials: await this.getCredentials(),\n        method: \"POST\",\n        body: JSON.stringify(request),\n        headers: headers,\n      }),\n    );\n    if (response.status !== 200) {\n      return Promise.reject(\"Event post failed.\");\n    }\n  }\n\n  // User APIs\n\n  async getUserPublicKey(id: string): Promise<UserKeyResponse> {\n    const r = await this.send(\"GET\", \"/users/\" + id + \"/public-key\", null, true, true);\n    return new UserKeyResponse(r);\n  }\n\n  // HIBP APIs\n\n  async getHibpBreach(username: string): Promise<BreachAccountResponse[]> {\n    const r = await this.send(\"GET\", \"/hibp/breach?username=\" + username, null, true, true);\n    return r.map((a: any) => new BreachAccountResponse(a));\n  }\n\n  // Misc\n\n  async postBitPayInvoice(request: BitPayInvoiceRequest): Promise<string> {\n    const r = await this.send(\"POST\", \"/bitpay-invoice\", request, true, true);\n    return r as string;\n  }\n\n  async postSetupPayment(): Promise<string> {\n    const r = await this.send(\"POST\", \"/setup-payment\", null, true, true);\n    return r as string;\n  }\n\n  // Key Connector\n\n  async getMasterKeyFromKeyConnector(\n    keyConnectorUrl: string,\n  ): Promise<KeyConnectorUserKeyResponse> {\n    const authHeader = await this.getActiveBearerToken();\n\n    const response = await this.fetch(\n      new Request(keyConnectorUrl + \"/user-keys\", {\n        cache: \"no-store\",\n        method: \"GET\",\n        headers: new Headers({\n          Accept: \"application/json\",\n          Authorization: \"Bearer \" + authHeader,\n        }),\n      }),\n    );\n\n    if (response.status !== 200) {\n      const error = await this.handleError(response, false, true);\n      return Promise.reject(error);\n    }\n\n    return new KeyConnectorUserKeyResponse(await response.json());\n  }\n\n  async postUserKeyToKeyConnector(\n    keyConnectorUrl: string,\n    request: KeyConnectorUserKeyRequest,\n  ): Promise<void> {\n    const authHeader = await this.getActiveBearerToken();\n\n    const response = await this.fetch(\n      new Request(keyConnectorUrl + \"/user-keys\", {\n        cache: \"no-store\",\n        method: \"POST\",\n        headers: new Headers({\n          Accept: \"application/json\",\n          Authorization: \"Bearer \" + authHeader,\n          \"Content-Type\": \"application/json; charset=utf-8\",\n        }),\n        body: JSON.stringify(request),\n      }),\n    );\n\n    if (response.status !== 200) {\n      const error = await this.handleError(response, false, true);\n      return Promise.reject(error);\n    }\n  }\n\n  async getKeyConnectorAlive(keyConnectorUrl: string) {\n    const response = await this.fetch(\n      new Request(keyConnectorUrl + \"/alive\", {\n        cache: \"no-store\",\n        method: \"GET\",\n        headers: new Headers({\n          Accept: \"application/json\",\n          \"Content-Type\": \"application/json; charset=utf-8\",\n        }),\n      }),\n    );\n\n    if (response.status !== 200) {\n      const error = await this.handleError(response, false, true);\n      return Promise.reject(error);\n    }\n  }\n\n  async getOrganizationExport(organizationId: string): Promise<OrganizationExportResponse> {\n    const r = await this.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/export\",\n      null,\n      true,\n      true,\n    );\n    return new OrganizationExportResponse(r);\n  }\n\n  // Helpers\n\n  async getActiveBearerToken(): Promise<string> {\n    let accessToken = await this.tokenService.getAccessToken();\n    if (await this.tokenService.tokenNeedsRefresh()) {\n      accessToken = await this.refreshToken();\n    }\n    return accessToken;\n  }\n\n  async fetch(request: Request): Promise<Response> {\n    if (request.method === \"GET\") {\n      request.headers.set(\"Cache-Control\", \"no-store\");\n      request.headers.set(\"Pragma\", \"no-cache\");\n    }\n    request.headers.set(\"Bitwarden-Client-Name\", this.platformUtilsService.getClientType());\n    request.headers.set(\n      \"Bitwarden-Client-Version\",\n      await this.platformUtilsService.getApplicationVersionNumber(),\n    );\n    return this.nativeFetch(request);\n  }\n\n  nativeFetch(request: Request): Promise<Response> {\n    return fetch(request);\n  }\n\n  async preValidateSso(identifier: string): Promise<SsoPreValidateResponse> {\n    if (identifier == null || identifier === \"\") {\n      throw new Error(\"Organization Identifier was not provided.\");\n    }\n    const headers = new Headers({\n      Accept: \"application/json\",\n      \"Device-Type\": this.deviceType,\n    });\n    if (this.customUserAgent != null) {\n      headers.set(\"User-Agent\", this.customUserAgent);\n    }\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const path = `/sso/prevalidate?domainHint=${encodeURIComponent(identifier)}`;\n    const response = await this.fetch(\n      new Request(env.getIdentityUrl() + path, {\n        cache: \"no-store\",\n        credentials: await this.getCredentials(),\n        headers: headers,\n        method: \"GET\",\n      }),\n    );\n\n    if (response.status === 200) {\n      const body = await response.json();\n      return new SsoPreValidateResponse(body);\n    } else {\n      const error = await this.handleError(response, false, true);\n      return Promise.reject(error);\n    }\n  }\n\n  async postCreateSponsorship(\n    sponsoredOrgId: string,\n    request: OrganizationSponsorshipCreateRequest,\n  ): Promise<void> {\n    return await this.send(\n      \"POST\",\n      \"/organization/sponsorship/\" +\n        (this.platformUtilsService.isSelfHost() ? \"self-hosted/\" : \"\") +\n        sponsoredOrgId +\n        \"/families-for-enterprise\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async getSponsorshipSyncStatus(\n    sponsoredOrgId: string,\n  ): Promise<OrganizationSponsorshipSyncStatusResponse> {\n    const response = await this.send(\n      \"GET\",\n      \"/organization/sponsorship/\" + sponsoredOrgId + \"/sync-status\",\n      null,\n      true,\n      true,\n    );\n    return new OrganizationSponsorshipSyncStatusResponse(response);\n  }\n\n  async deleteRevokeSponsorship(sponsoringOrganizationId: string): Promise<void> {\n    return await this.send(\n      \"DELETE\",\n      \"/organization/sponsorship/\" +\n        (this.platformUtilsService.isSelfHost() ? \"self-hosted/\" : \"\") +\n        sponsoringOrganizationId,\n      null,\n      true,\n      false,\n    );\n  }\n\n  async deleteRemoveSponsorship(sponsoringOrgId: string): Promise<void> {\n    return await this.send(\n      \"DELETE\",\n      \"/organization/sponsorship/sponsored/\" + sponsoringOrgId,\n      null,\n      true,\n      false,\n    );\n  }\n\n  async postPreValidateSponsorshipToken(\n    sponsorshipToken: string,\n  ): Promise<PreValidateSponsorshipResponse> {\n    const response = await this.send(\n      \"POST\",\n      \"/organization/sponsorship/validate-token?sponsorshipToken=\" +\n        encodeURIComponent(sponsorshipToken),\n      null,\n      true,\n      true,\n    );\n\n    return new PreValidateSponsorshipResponse(response);\n  }\n\n  async postRedeemSponsorship(\n    sponsorshipToken: string,\n    request: OrganizationSponsorshipRedeemRequest,\n  ): Promise<void> {\n    return await this.send(\n      \"POST\",\n      \"/organization/sponsorship/redeem?sponsorshipToken=\" + encodeURIComponent(sponsorshipToken),\n      request,\n      true,\n      false,\n    );\n  }\n\n  async postResendSponsorshipOffer(sponsoringOrgId: string): Promise<void> {\n    return await this.send(\n      \"POST\",\n      \"/organization/sponsorship/\" + sponsoringOrgId + \"/families-for-enterprise/resend\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  protected async refreshToken(): Promise<string> {\n    const refreshToken = await this.tokenService.getRefreshToken();\n    if (refreshToken != null && refreshToken !== \"\") {\n      return this.refreshAccessToken();\n    }\n\n    const clientId = await this.tokenService.getClientId();\n    const clientSecret = await this.tokenService.getClientSecret();\n    if (!Utils.isNullOrWhitespace(clientId) && !Utils.isNullOrWhitespace(clientSecret)) {\n      return this.refreshApiToken();\n    }\n\n    this.refreshAccessTokenErrorCallback();\n\n    throw new Error(\"Cannot refresh access token, no refresh token or api keys are stored.\");\n  }\n\n  protected async refreshAccessToken(): Promise<string> {\n    const refreshToken = await this.tokenService.getRefreshToken();\n    if (refreshToken == null || refreshToken === \"\") {\n      throw new Error();\n    }\n    const headers = new Headers({\n      \"Content-Type\": \"application/x-www-form-urlencoded; charset=utf-8\",\n      Accept: \"application/json\",\n      \"Device-Type\": this.deviceType,\n    });\n    if (this.customUserAgent != null) {\n      headers.set(\"User-Agent\", this.customUserAgent);\n    }\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const decodedToken = await this.tokenService.decodeAccessToken();\n    const response = await this.fetch(\n      new Request(env.getIdentityUrl() + \"/connect/token\", {\n        body: this.qsStringify({\n          grant_type: \"refresh_token\",\n          client_id: decodedToken.client_id,\n          refresh_token: refreshToken,\n        }),\n        cache: \"no-store\",\n        credentials: await this.getCredentials(),\n        headers: headers,\n        method: \"POST\",\n      }),\n    );\n\n    if (response.status === 200) {\n      const responseJson = await response.json();\n      const tokenResponse = new IdentityTokenResponse(responseJson);\n\n      const newDecodedAccessToken = await this.tokenService.decodeAccessToken(\n        tokenResponse.accessToken,\n      );\n      const userId = newDecodedAccessToken.sub;\n\n      const vaultTimeoutAction = await firstValueFrom(\n        this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n      );\n      const vaultTimeout = await firstValueFrom(\n        this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n      );\n\n      const refreshedTokens = await this.tokenService.setTokens(\n        tokenResponse.accessToken,\n        vaultTimeoutAction as VaultTimeoutAction,\n        vaultTimeout,\n        tokenResponse.refreshToken,\n      );\n      return refreshedTokens.accessToken;\n    } else {\n      const error = await this.handleError(response, true, true);\n      return Promise.reject(error);\n    }\n  }\n\n  protected async refreshApiToken(): Promise<string> {\n    const clientId = await this.tokenService.getClientId();\n    const clientSecret = await this.tokenService.getClientSecret();\n\n    const appId = await this.appIdService.getAppId();\n    const deviceRequest = new DeviceRequest(appId, this.platformUtilsService);\n    const tokenRequest = new UserApiTokenRequest(\n      clientId,\n      clientSecret,\n      new TokenTwoFactorRequest(),\n      deviceRequest,\n    );\n\n    const response = await this.postIdentityToken(tokenRequest);\n    if (!(response instanceof IdentityTokenResponse)) {\n      throw new Error(\"Invalid response received when refreshing api token\");\n    }\n\n    const newDecodedAccessToken = await this.tokenService.decodeAccessToken(response.accessToken);\n    const userId = newDecodedAccessToken.sub;\n\n    const vaultTimeoutAction = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n    );\n    const vaultTimeout = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n    );\n\n    const refreshedToken = await this.tokenService.setAccessToken(\n      response.accessToken,\n      vaultTimeoutAction as VaultTimeoutAction,\n      vaultTimeout,\n    );\n    return refreshedToken;\n  }\n\n  async send(\n    method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\",\n    path: string,\n    body: any,\n    authed: boolean,\n    hasResponse: boolean,\n    apiUrl?: string,\n    alterHeaders?: (headers: Headers) => void,\n  ): Promise<any> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    apiUrl = Utils.isNullOrWhitespace(apiUrl) ? env.getApiUrl() : apiUrl;\n\n    // Prevent directory traversal from malicious paths\n    const pathParts = path.split(\"?\");\n    const requestUrl =\n      apiUrl + Utils.normalizePath(pathParts[0]) + (pathParts.length > 1 ? `?${pathParts[1]}` : \"\");\n\n    const [requestHeaders, requestBody] = await this.buildHeadersAndBody(\n      authed,\n      hasResponse,\n      body,\n      alterHeaders,\n    );\n\n    const requestInit: RequestInit = {\n      cache: \"no-store\",\n      credentials: await this.getCredentials(),\n      method: method,\n    };\n    requestInit.headers = requestHeaders;\n    requestInit.body = requestBody;\n    const response = await this.fetch(new Request(requestUrl, requestInit));\n\n    const responseType = response.headers.get(\"content-type\");\n    const responseIsJson = responseType != null && responseType.indexOf(\"application/json\") !== -1;\n    const responseIsCsv = responseType != null && responseType.indexOf(\"text/csv\") !== -1;\n    if (hasResponse && response.status === 200 && responseIsJson) {\n      const responseJson = await response.json();\n      return responseJson;\n    } else if (hasResponse && response.status === 200 && responseIsCsv) {\n      return await response.text();\n    } else if (response.status !== 200) {\n      const error = await this.handleError(response, false, authed);\n      return Promise.reject(error);\n    }\n  }\n\n  private async buildHeadersAndBody(\n    authed: boolean,\n    hasResponse: boolean,\n    body: any,\n    alterHeaders: (headers: Headers) => void,\n  ): Promise<[Headers, any]> {\n    let requestBody: any = null;\n    const headers = new Headers({\n      \"Device-Type\": this.deviceType,\n    });\n\n    if (flagEnabled(\"prereleaseBuild\")) {\n      headers.set(\"Is-Prerelease\", \"1\");\n    }\n    if (this.customUserAgent != null) {\n      headers.set(\"User-Agent\", this.customUserAgent);\n    }\n    if (hasResponse) {\n      headers.set(\"Accept\", \"application/json\");\n    }\n    if (alterHeaders != null) {\n      alterHeaders(headers);\n    }\n    if (authed) {\n      const authHeader = await this.getActiveBearerToken();\n      headers.set(\"Authorization\", \"Bearer \" + authHeader);\n    }\n\n    if (body != null) {\n      if (typeof body === \"string\") {\n        requestBody = body;\n        headers.set(\"Content-Type\", \"application/x-www-form-urlencoded; charset=utf-8\");\n      } else if (typeof body === \"object\") {\n        if (body instanceof FormData) {\n          requestBody = body;\n        } else {\n          headers.set(\"Content-Type\", \"application/json; charset=utf-8\");\n          requestBody = JSON.stringify(body);\n        }\n      }\n    }\n\n    return [headers, requestBody];\n  }\n\n  private async handleError(\n    response: Response,\n    tokenError: boolean,\n    authed: boolean,\n  ): Promise<ErrorResponse> {\n    let responseJson: any = null;\n    if (this.isJsonResponse(response)) {\n      responseJson = await response.json();\n    } else if (this.isTextResponse(response)) {\n      responseJson = { Message: await response.text() };\n    }\n\n    if (authed) {\n      if (\n        response.status === 401 ||\n        response.status === 403 ||\n        (tokenError &&\n          response.status === 400 &&\n          responseJson != null &&\n          responseJson.error === \"invalid_grant\")\n      ) {\n        await this.logoutCallback(\"invalidGrantError\");\n      }\n    }\n\n    return new ErrorResponse(responseJson, response.status, tokenError);\n  }\n\n  private qsStringify(params: any): string {\n    return Object.keys(params)\n      .map((key) => {\n        return encodeURIComponent(key) + \"=\" + encodeURIComponent(params[key]);\n      })\n      .join(\"&\");\n  }\n\n  private async getCredentials(): Promise<RequestCredentials> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    if (!this.isWebClient || env.hasBaseUrl()) {\n      return \"include\";\n    }\n    return undefined;\n  }\n\n  private addEventParameters(base: string, start: string, end: string, token: string) {\n    if (start != null) {\n      base += \"?start=\" + start;\n    }\n    if (end != null) {\n      base += base.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n      base += \"end=\" + end;\n    }\n    if (token != null) {\n      base += base.indexOf(\"?\") > -1 ? \"&\" : \"?\";\n      base += \"continuationToken=\" + token;\n    }\n    return base;\n  }\n\n  private isJsonResponse(response: Response): boolean {\n    const typeHeader = response.headers.get(\"content-type\");\n    return typeHeader != null && typeHeader.indexOf(\"application/json\") > -1;\n  }\n\n  private isTextResponse(response: Response): boolean {\n    const typeHeader = response.headers.get(\"content-type\");\n    return typeHeader != null && typeHeader.indexOf(\"text\") > -1;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, concatMap, distinctUntilChanged, firstValueFrom, map } from \"rxjs\";\n\nimport { PBKDF2KdfConfig, KeyService } from \"@bitwarden/key-management\";\n\nimport { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { KeyGenerationService } from \"../../../platform/abstractions/key-generation.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { SendType } from \"../enums/send-type\";\nimport { SendData } from \"../models/data/send.data\";\nimport { Send } from \"../models/domain/send\";\nimport { SendFile } from \"../models/domain/send-file\";\nimport { SendText } from \"../models/domain/send-text\";\nimport { SendWithIdRequest } from \"../models/request/send-with-id.request\";\nimport { SendView } from \"../models/view/send.view\";\nimport { SEND_KDF_ITERATIONS } from \"../send-kdf\";\n\nimport { SendStateProvider } from \"./send-state.provider.abstraction\";\nimport { InternalSendService as InternalSendServiceAbstraction } from \"./send.service.abstraction\";\n\nexport class SendService implements InternalSendServiceAbstraction {\n  readonly sendKeySalt = \"bitwarden-send\";\n  readonly sendKeyPurpose = \"send\";\n\n  sends$ = this.stateProvider.encryptedState$.pipe(\n    map(([, record]) => Object.values(record || {}).map((data) => new Send(data))),\n  );\n  sendViews$ = this.stateProvider.encryptedState$.pipe(\n    concatMap(([, record]) =>\n      this.decryptSends(Object.values(record || {}).map((data) => new Send(data))),\n    ),\n  );\n\n  constructor(\n    private keyService: KeyService,\n    private i18nService: I18nService,\n    private keyGenerationService: KeyGenerationService,\n    private stateProvider: SendStateProvider,\n    private encryptService: EncryptService,\n  ) {}\n\n  async encrypt(\n    model: SendView,\n    file: File | ArrayBuffer,\n    password: string,\n    key?: SymmetricCryptoKey,\n  ): Promise<[Send, EncArrayBuffer]> {\n    let fileData: EncArrayBuffer = null;\n    const send = new Send();\n    send.id = model.id;\n    send.type = model.type;\n    send.disabled = model.disabled;\n    send.hideEmail = model.hideEmail;\n    send.maxAccessCount = model.maxAccessCount;\n    send.deletionDate = model.deletionDate;\n    send.expirationDate = model.expirationDate;\n    if (model.key == null) {\n      const key = await this.keyGenerationService.createKeyWithPurpose(\n        128,\n        this.sendKeyPurpose,\n        this.sendKeySalt,\n      );\n      model.key = key.material;\n      model.cryptoKey = key.derivedKey;\n    }\n    if (password != null) {\n      const passwordKey = await this.keyGenerationService.deriveKeyFromPassword(\n        password,\n        model.key,\n        new PBKDF2KdfConfig(SEND_KDF_ITERATIONS),\n      );\n      send.password = passwordKey.keyB64;\n    }\n    if (key == null) {\n      key = await this.keyService.getUserKey();\n    }\n    send.key = await this.encryptService.encrypt(model.key, key);\n    send.name = await this.encryptService.encrypt(model.name, model.cryptoKey);\n    send.notes = await this.encryptService.encrypt(model.notes, model.cryptoKey);\n    if (send.type === SendType.Text) {\n      send.text = new SendText();\n      send.text.text = await this.encryptService.encrypt(model.text.text, model.cryptoKey);\n      send.text.hidden = model.text.hidden;\n    } else if (send.type === SendType.File) {\n      send.file = new SendFile();\n      if (file != null) {\n        if (file instanceof ArrayBuffer) {\n          const [name, data] = await this.encryptFileData(\n            model.file.fileName,\n            file,\n            model.cryptoKey,\n          );\n          send.file.fileName = name;\n          fileData = data;\n        } else {\n          fileData = await this.parseFile(send, file, model.cryptoKey);\n        }\n      }\n    }\n\n    return [send, fileData];\n  }\n\n  get$(id: string): Observable<Send | undefined> {\n    return this.sends$.pipe(\n      distinctUntilChanged((oldSends, newSends) => {\n        const oldSend = oldSends.find((oldSend) => oldSend.id === id);\n        const newSend = newSends.find((newSend) => newSend.id === id);\n        if (!oldSend || !newSend) {\n          // If either oldSend or newSend is not found, consider them different\n          return false;\n        }\n\n        // Compare each property of the old and new Send objects\n        const allPropertiesSame = Object.keys(newSend).every((key) => {\n          if (\n            (oldSend[key as keyof Send] != null && newSend[key as keyof Send] === null) ||\n            (oldSend[key as keyof Send] === null && newSend[key as keyof Send] != null)\n          ) {\n            // If a key from either old or new send is not found, and the key from the other send has a value, consider them different\n            return false;\n          }\n\n          switch (key) {\n            case \"name\":\n            case \"notes\":\n            case \"key\":\n              if (oldSend[key] === null && newSend[key] === null) {\n                return true;\n              }\n\n              return oldSend[key].encryptedString === newSend[key].encryptedString;\n            case \"text\":\n              if (oldSend[key].text == null && newSend[key].text == null) {\n                return true;\n              }\n              if (\n                (oldSend[key].text != null && newSend[key].text == null) ||\n                (oldSend[key].text == null && newSend[key].text != null)\n              ) {\n                return false;\n              }\n              return oldSend[key].text.encryptedString === newSend[key].text.encryptedString;\n            case \"file\":\n              //Files are never updated so never will be changed.\n              return true;\n            case \"revisionDate\":\n            case \"expirationDate\":\n            case \"deletionDate\":\n              if (oldSend[key] === null && newSend[key] === null) {\n                return true;\n              }\n              return oldSend[key].getTime() === newSend[key].getTime();\n            default:\n              // For other properties, compare directly\n              return oldSend[key as keyof Send] === newSend[key as keyof Send];\n          }\n        });\n\n        return allPropertiesSame;\n      }),\n      map((sends) => sends.find((o) => o.id === id)),\n    );\n  }\n\n  async getFromState(id: string): Promise<Send> {\n    const [, sends] = await this.stateProvider.getEncryptedSends();\n    // eslint-disable-next-line\n    if (sends == null || !sends.hasOwnProperty(id)) {\n      return null;\n    }\n\n    return new Send(sends[id]);\n  }\n\n  async getAll(): Promise<Send[]> {\n    const [, sends] = await this.stateProvider.getEncryptedSends();\n    const response: Send[] = [];\n    for (const id in sends) {\n      // eslint-disable-next-line\n      if (sends.hasOwnProperty(id)) {\n        response.push(new Send(sends[id]));\n      }\n    }\n    return response;\n  }\n\n  async getAllDecryptedFromState(): Promise<SendView[]> {\n    let decSends = await this.stateProvider.getDecryptedSends();\n    if (decSends != null) {\n      return decSends;\n    }\n\n    decSends = [];\n    const hasKey = await this.keyService.hasUserKey();\n    if (!hasKey) {\n      throw new Error(\"No user key found.\");\n    }\n\n    const promises: Promise<any>[] = [];\n    const sends = await this.getAll();\n    sends.forEach((send) => {\n      promises.push(send.decrypt().then((f) => decSends.push(f)));\n    });\n\n    await Promise.all(promises);\n    decSends.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n\n    await this.stateProvider.setDecryptedSends(decSends);\n    return decSends;\n  }\n\n  async upsert(send: SendData | SendData[]): Promise<any> {\n    const [userId, currentSends] = await this.stateProvider.getEncryptedSends();\n    let sends = currentSends;\n    if (sends == null) {\n      sends = {};\n    }\n    if (send instanceof SendData) {\n      const s = send as SendData;\n      sends[s.id] = s;\n    } else {\n      (send as SendData[]).forEach((s) => {\n        sends[s.id] = s;\n      });\n    }\n\n    await this.replace(sends, userId);\n  }\n\n  async delete(id: string | string[]): Promise<any> {\n    const [userId, sends] = await this.stateProvider.getEncryptedSends();\n    if (sends == null) {\n      return;\n    }\n\n    if (typeof id === \"string\") {\n      if (sends[id] == null) {\n        return;\n      }\n      delete sends[id];\n    } else {\n      (id as string[]).forEach((i) => {\n        delete sends[i];\n      });\n    }\n\n    await this.replace(sends, userId);\n  }\n\n  async replace(sends: { [id: string]: SendData }, userId: UserId): Promise<any> {\n    await this.stateProvider.setEncryptedSends(sends, userId);\n  }\n\n  async getRotatedData(\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<SendWithIdRequest[]> {\n    if (newUserKey == null) {\n      throw new Error(\"New user key is required for rotation.\");\n    }\n    if (originalUserKey == null) {\n      throw new Error(\"Original user key is required for rotation.\");\n    }\n\n    const req = await firstValueFrom(\n      this.sends$.pipe(\n        concatMap(async (sends) => this.toRotatedKeyRequestMap(sends, originalUserKey, newUserKey)),\n      ),\n    );\n    // separate return for easier debugging\n    return req;\n  }\n\n  private async toRotatedKeyRequestMap(\n    sends: Send[],\n    originalUserKey: UserKey,\n    rotateUserKey: UserKey,\n  ) {\n    const requests = await Promise.all(\n      sends.map(async (send) => {\n        const sendKey = await this.encryptService.decryptToBytes(send.key, originalUserKey);\n        send.key = await this.encryptService.encrypt(sendKey, rotateUserKey);\n        return new SendWithIdRequest(send);\n      }),\n    );\n    return requests;\n  }\n\n  private parseFile(send: Send, file: File, key: SymmetricCryptoKey): Promise<EncArrayBuffer> {\n    return new Promise((resolve, reject) => {\n      const reader = new FileReader();\n      reader.readAsArrayBuffer(file);\n      reader.onload = async (evt) => {\n        try {\n          const [name, data] = await this.encryptFileData(\n            file.name,\n            evt.target.result as ArrayBuffer,\n            key,\n          );\n          send.file.fileName = name;\n          resolve(data);\n        } catch (e) {\n          reject(e);\n        }\n      };\n      reader.onerror = () => {\n        reject(\"Error reading file.\");\n      };\n    });\n  }\n\n  private async encryptFileData(\n    fileName: string,\n    data: ArrayBuffer,\n    key: SymmetricCryptoKey,\n  ): Promise<[EncString, EncArrayBuffer]> {\n    if (key == null) {\n      key = await this.keyService.getUserKey();\n    }\n    const encFileName = await this.encryptService.encrypt(fileName, key);\n    const encFileData = await this.encryptService.encryptToBytes(new Uint8Array(data), key);\n    return [encFileName, encFileData];\n  }\n\n  private async decryptSends(sends: Send[]) {\n    const decryptSendPromises = sends.map((s) => s.decrypt());\n    const decryptedSends = await Promise.all(decryptSendPromises);\n\n    decryptedSends.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n    return decryptedSends;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, firstValueFrom } from \"rxjs\";\n\nimport { ActiveUserState, CombinedState, StateProvider } from \"../../../platform/state\";\nimport { UserId } from \"../../../types/guid\";\nimport { SendData } from \"../models/data/send.data\";\nimport { SendView } from \"../models/view/send.view\";\n\nimport { SEND_USER_DECRYPTED, SEND_USER_ENCRYPTED } from \"./key-definitions\";\nimport { SendStateProvider as SendStateProviderAbstraction } from \"./send-state.provider.abstraction\";\n\n/** State provider for sends */\nexport class SendStateProvider implements SendStateProviderAbstraction {\n  /** Observable for the encrypted sends for an active user */\n  encryptedState$: Observable<CombinedState<Record<string, SendData>>>;\n  /** Observable with the decrypted sends for an active user */\n  decryptedState$: Observable<SendView[]>;\n\n  private activeUserEncryptedState: ActiveUserState<Record<string, SendData>>;\n  private activeUserDecryptedState: ActiveUserState<SendView[]>;\n\n  constructor(protected stateProvider: StateProvider) {\n    this.activeUserEncryptedState = this.stateProvider.getActive(SEND_USER_ENCRYPTED);\n    this.encryptedState$ = this.activeUserEncryptedState.combinedState$;\n\n    this.activeUserDecryptedState = this.stateProvider.getActive(SEND_USER_DECRYPTED);\n    this.decryptedState$ = this.activeUserDecryptedState.state$;\n  }\n\n  /** Gets the encrypted sends from state for an active user */\n  async getEncryptedSends(): Promise<CombinedState<{ [id: string]: SendData }>> {\n    return await firstValueFrom(this.encryptedState$);\n  }\n\n  /** Sets the encrypted send state for an active user */\n  async setEncryptedSends(value: { [id: string]: SendData }, userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, SEND_USER_ENCRYPTED).update(() => value);\n  }\n\n  /** Gets the decrypted sends from state for the active user */\n  async getDecryptedSends(): Promise<SendView[]> {\n    return await firstValueFrom(this.decryptedState$);\n  }\n\n  /** Sets the decrypted send state for an active user */\n  async setDecryptedSends(value: SendView[]): Promise<void> {\n    await this.activeUserDecryptedState.update(() => value);\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport {\n  FileUploadApiMethods,\n  FileUploadService,\n} from \"../../../platform/abstractions/file-upload/file-upload.service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { SendType } from \"../enums/send-type\";\nimport { SendData } from \"../models/data/send.data\";\nimport { Send } from \"../models/domain/send\";\nimport { SendAccessRequest } from \"../models/request/send-access.request\";\nimport { SendRequest } from \"../models/request/send.request\";\nimport { SendAccessResponse } from \"../models/response/send-access.response\";\nimport { SendFileDownloadDataResponse } from \"../models/response/send-file-download-data.response\";\nimport { SendFileUploadDataResponse } from \"../models/response/send-file-upload-data.response\";\nimport { SendResponse } from \"../models/response/send.response\";\nimport { SendAccessView } from \"../models/view/send-access.view\";\n\nimport { SendApiService as SendApiServiceAbstraction } from \"./send-api.service.abstraction\";\nimport { InternalSendService } from \"./send.service.abstraction\";\n\nexport class SendApiService implements SendApiServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private fileUploadService: FileUploadService,\n    private sendService: InternalSendService,\n  ) {}\n\n  async getSend(id: string): Promise<SendResponse> {\n    const r = await this.apiService.send(\"GET\", \"/sends/\" + id, null, true, true);\n    return new SendResponse(r);\n  }\n\n  async postSendAccess(\n    id: string,\n    request: SendAccessRequest,\n    apiUrl?: string,\n  ): Promise<SendAccessResponse> {\n    const addSendIdHeader = (headers: Headers) => {\n      headers.set(\"Send-Id\", id);\n    };\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/sends/access/\" + id,\n      request,\n      false,\n      true,\n      apiUrl,\n      addSendIdHeader,\n    );\n    return new SendAccessResponse(r);\n  }\n\n  async getSendFileDownloadData(\n    send: SendAccessView,\n    request: SendAccessRequest,\n    apiUrl?: string,\n  ): Promise<SendFileDownloadDataResponse> {\n    const addSendIdHeader = (headers: Headers) => {\n      headers.set(\"Send-Id\", send.id);\n    };\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/sends/\" + send.id + \"/access/file/\" + send.file.id,\n      request,\n      false,\n      true,\n      apiUrl,\n      addSendIdHeader,\n    );\n    return new SendFileDownloadDataResponse(r);\n  }\n\n  async getSends(): Promise<ListResponse<SendResponse>> {\n    const r = await this.apiService.send(\"GET\", \"/sends\", null, true, true);\n    return new ListResponse(r, SendResponse);\n  }\n\n  async postSend(request: SendRequest): Promise<SendResponse> {\n    const r = await this.apiService.send(\"POST\", \"/sends\", request, true, true);\n    return new SendResponse(r);\n  }\n\n  async postFileTypeSend(request: SendRequest): Promise<SendFileUploadDataResponse> {\n    const r = await this.apiService.send(\"POST\", \"/sends/file/v2\", request, true, true);\n    return new SendFileUploadDataResponse(r);\n  }\n\n  async renewSendFileUploadUrl(\n    sendId: string,\n    fileId: string,\n  ): Promise<SendFileUploadDataResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/sends/\" + sendId + \"/file/\" + fileId,\n      null,\n      true,\n      true,\n    );\n    return new SendFileUploadDataResponse(r);\n  }\n\n  postSendFile(sendId: string, fileId: string, data: FormData): Promise<any> {\n    return this.apiService.send(\"POST\", \"/sends/\" + sendId + \"/file/\" + fileId, data, true, false);\n  }\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  async postSendFileLegacy(data: FormData): Promise<SendResponse> {\n    const r = await this.apiService.send(\"POST\", \"/sends/file\", data, true, true);\n    return new SendResponse(r);\n  }\n\n  async putSend(id: string, request: SendRequest): Promise<SendResponse> {\n    const r = await this.apiService.send(\"PUT\", \"/sends/\" + id, request, true, true);\n    return new SendResponse(r);\n  }\n\n  async putSendRemovePassword(id: string): Promise<SendResponse> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/sends/\" + id + \"/remove-password\",\n      null,\n      true,\n      true,\n    );\n    return new SendResponse(r);\n  }\n\n  deleteSend(id: string): Promise<any> {\n    return this.apiService.send(\"DELETE\", \"/sends/\" + id, null, true, false);\n  }\n\n  async save(sendData: [Send, EncArrayBuffer]): Promise<Send> {\n    const response = await this.upload(sendData);\n\n    const data = new SendData(response);\n    await this.sendService.upsert(data);\n    return new Send(data);\n  }\n\n  async delete(id: string): Promise<any> {\n    await this.deleteSend(id);\n    await this.sendService.delete(id);\n  }\n\n  async removePassword(id: string): Promise<any> {\n    const response = await this.putSendRemovePassword(id);\n    const data = new SendData(response);\n    await this.sendService.upsert(data);\n  }\n\n  // Send File Upload methods\n\n  private async upload(sendData: [Send, EncArrayBuffer]): Promise<SendResponse> {\n    const request = new SendRequest(sendData[0], sendData[1]?.buffer.byteLength);\n    let response: SendResponse;\n    if (sendData[0].id == null) {\n      if (sendData[0].type === SendType.Text) {\n        response = await this.postSend(request);\n      } else {\n        try {\n          const uploadDataResponse = await this.postFileTypeSend(request);\n          response = uploadDataResponse.sendResponse;\n          await this.fileUploadService.upload(\n            uploadDataResponse,\n            sendData[0].file.fileName,\n            sendData[1],\n            this.generateMethods(uploadDataResponse, response),\n          );\n        } catch (e) {\n          if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {\n            response = await this.legacyServerSendFileUpload(sendData, request);\n          } else if (e instanceof ErrorResponse) {\n            throw new Error((e as ErrorResponse).getSingleMessage());\n          } else {\n            throw e;\n          }\n        }\n      }\n      sendData[0].id = response.id;\n      sendData[0].accessId = response.accessId;\n    } else {\n      response = await this.putSend(sendData[0].id, request);\n    }\n    return response;\n  }\n\n  private generateMethods(\n    uploadData: SendFileUploadDataResponse,\n    response: SendResponse,\n  ): FileUploadApiMethods {\n    return {\n      postDirect: this.generatePostDirectCallback(response),\n      renewFileUploadUrl: this.generateRenewFileUploadUrlCallback(response.id, response.file.id),\n      rollback: this.generateRollbackCallback(response.id),\n    };\n  }\n\n  private generatePostDirectCallback(sendResponse: SendResponse) {\n    return (data: FormData) => {\n      return this.postSendFile(sendResponse.id, sendResponse.file.id, data);\n    };\n  }\n\n  private generateRenewFileUploadUrlCallback(sendId: string, fileId: string) {\n    return async () => {\n      const renewResponse = await this.renewSendFileUploadUrl(sendId, fileId);\n      return renewResponse?.url;\n    };\n  }\n\n  private generateRollbackCallback(sendId: string) {\n    return () => {\n      return this.deleteSend(sendId);\n    };\n  }\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  async legacyServerSendFileUpload(\n    sendData: [Send, EncArrayBuffer],\n    request: SendRequest,\n  ): Promise<SendResponse> {\n    const fd = new FormData();\n    try {\n      const blob = new Blob([sendData[1].buffer], { type: \"application/octet-stream\" });\n      fd.append(\"model\", JSON.stringify(request));\n      fd.append(\"data\", blob, sendData[0].file.fileName.encryptedString);\n    } catch (e) {\n      if (Utils.isNode && !Utils.isBrowser) {\n        fd.append(\"model\", JSON.stringify(request));\n        fd.append(\n          \"data\",\n          Buffer.from(sendData[1].buffer) as any,\n          {\n            filepath: sendData[0].file.fileName.encryptedString,\n            contentType: \"application/octet-stream\",\n          } as any,\n        );\n      } else {\n        throw e;\n      }\n    }\n    return await this.postSendFileLegacy(fd);\n  }\n}\n","import { Subscription } from \"rxjs\";\n\nimport { BroadcasterService, MessageBase } from \"../abstractions/broadcaster.service\";\nimport { MessageListener } from \"../messaging\";\n\n/**\n * Temporary implementation that just delegates to the message sender and message listener\n * and manages their subscriptions.\n */\nexport class DefaultBroadcasterService implements BroadcasterService {\n  subscriptions = new Map<string, Subscription>();\n\n  constructor(private readonly messageListener: MessageListener) {}\n\n  subscribe(id: string, messageCallback: (message: MessageBase) => void) {\n    this.subscriptions.set(\n      id,\n      this.messageListener.allMessages$.subscribe((message) => {\n        messageCallback(message);\n      }),\n    );\n  }\n\n  unsubscribe(id: string) {\n    const subscription = this.subscriptions.get(id);\n    subscription?.unsubscribe();\n    this.subscriptions.delete(id);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  EMPTY,\n  Observable,\n  catchError,\n  combineLatest,\n  defer,\n  distinctUntilChanged,\n  firstValueFrom,\n  from,\n  map,\n  shareReplay,\n  switchMap,\n  tap,\n} from \"rxjs\";\n\nimport {\n  PinServiceAbstraction,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { BiometricStateService } from \"@bitwarden/key-management\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { VaultTimeoutSettingsService as VaultTimeoutSettingsServiceAbstraction } from \"../../abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../admin-console/enums\";\nimport { Policy } from \"../../admin-console/models/domain/policy\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { TokenService } from \"../../auth/abstractions/token.service\";\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { StateProvider } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"../../types/vault-timeout.type\";\n\nimport { VAULT_TIMEOUT, VAULT_TIMEOUT_ACTION } from \"./vault-timeout-settings.state\";\n\nexport class VaultTimeoutSettingsService implements VaultTimeoutSettingsServiceAbstraction {\n  constructor(\n    private accountService: AccountService,\n    private pinService: PinServiceAbstraction,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private keyService: KeyService,\n    private tokenService: TokenService,\n    private policyService: PolicyService,\n    private biometricStateService: BiometricStateService,\n    private stateProvider: StateProvider,\n    private logService: LogService,\n    private defaultVaultTimeout: VaultTimeout,\n  ) {}\n\n  async setVaultTimeoutOptions(\n    userId: UserId,\n    timeout: VaultTimeout,\n    action: VaultTimeoutAction,\n  ): Promise<void> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot set vault timeout settings.\");\n    }\n\n    if (timeout == null) {\n      throw new Error(\"Vault Timeout cannot be null.\");\n    }\n\n    if (action == null) {\n      throw new Error(\"Vault Timeout Action cannot be null.\");\n    }\n\n    // We swap these tokens from being on disk for lock actions, and in memory for logout actions\n    // Get them here to set them to their new location after changing the timeout action and clearing if needed\n    const accessToken = await this.tokenService.getAccessToken();\n    const refreshToken = await this.tokenService.getRefreshToken();\n    const clientId = await this.tokenService.getClientId();\n    const clientSecret = await this.tokenService.getClientSecret();\n\n    await this.setVaultTimeout(userId, timeout);\n\n    if (timeout != VaultTimeoutStringType.Never && action === VaultTimeoutAction.LogOut) {\n      // if we have a vault timeout and the action is log out, reset tokens\n      // as the tokens were stored on disk and now should be stored in memory\n      await this.tokenService.clearTokens();\n    }\n\n    await this.setVaultTimeoutAction(userId, action);\n\n    await this.tokenService.setTokens(accessToken, action, timeout, refreshToken, [\n      clientId,\n      clientSecret,\n    ]);\n\n    await this.keyService.refreshAdditionalKeys();\n  }\n\n  availableVaultTimeoutActions$(userId?: string): Observable<VaultTimeoutAction[]> {\n    return defer(() => this.getAvailableVaultTimeoutActions(userId));\n  }\n\n  async canLock(userId: UserId): Promise<boolean> {\n    const availableVaultTimeoutActions: VaultTimeoutAction[] = await firstValueFrom(\n      this.availableVaultTimeoutActions$(userId),\n    );\n    return availableVaultTimeoutActions?.includes(VaultTimeoutAction.Lock) || false;\n  }\n\n  async isBiometricLockSet(userId?: string): Promise<boolean> {\n    const biometricUnlockPromise =\n      userId == null\n        ? firstValueFrom(this.biometricStateService.biometricUnlockEnabled$)\n        : this.biometricStateService.getBiometricUnlockEnabled(userId as UserId);\n    return await biometricUnlockPromise;\n  }\n\n  private async setVaultTimeout(userId: UserId, timeout: VaultTimeout): Promise<void> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot set vault timeout.\");\n    }\n\n    if (timeout == null) {\n      throw new Error(\"Vault Timeout cannot be null.\");\n    }\n\n    await this.stateProvider.setUserState(VAULT_TIMEOUT, timeout, userId);\n  }\n\n  getVaultTimeoutByUserId$(userId: UserId): Observable<VaultTimeout> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot get vault timeout.\");\n    }\n\n    return combineLatest([\n      this.stateProvider.getUserState$(VAULT_TIMEOUT, userId),\n      this.getMaxVaultTimeoutPolicyByUserId$(userId),\n    ]).pipe(\n      switchMap(([currentVaultTimeout, maxVaultTimeoutPolicy]) => {\n        return from(this.determineVaultTimeout(currentVaultTimeout, maxVaultTimeoutPolicy)).pipe(\n          tap((vaultTimeout: VaultTimeout) => {\n            // As a side effect, set the new value determined by determineVaultTimeout into state if it's different from the current\n            if (vaultTimeout !== currentVaultTimeout) {\n              return this.stateProvider.setUserState(VAULT_TIMEOUT, vaultTimeout, userId);\n            }\n          }),\n          catchError((error: unknown) => {\n            // Protect outer observable from canceling on error by catching and returning EMPTY\n            this.logService.error(`Error getting vault timeout: ${error}`);\n            return EMPTY;\n          }),\n        );\n      }),\n      distinctUntilChanged(), // Avoid having the set side effect trigger a new emission of the same action\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n  }\n\n  private async determineVaultTimeout(\n    currentVaultTimeout: VaultTimeout | null,\n    maxVaultTimeoutPolicy: Policy | null,\n  ): Promise<VaultTimeout | null> {\n    // if current vault timeout is null, apply the client specific default\n    currentVaultTimeout = currentVaultTimeout ?? this.defaultVaultTimeout;\n\n    // If no policy applies, return the current vault timeout\n    if (!maxVaultTimeoutPolicy) {\n      return currentVaultTimeout;\n    }\n\n    // User is subject to a max vault timeout policy\n    const maxVaultTimeoutPolicyData = maxVaultTimeoutPolicy.data;\n\n    // If the current vault timeout is not numeric, change it to the policy compliant value\n    if (typeof currentVaultTimeout === \"string\") {\n      return maxVaultTimeoutPolicyData.minutes;\n    }\n\n    // For numeric vault timeouts, ensure they are smaller than maximum allowed value according to policy\n    const policyCompliantTimeout = Math.min(currentVaultTimeout, maxVaultTimeoutPolicyData.minutes);\n\n    return policyCompliantTimeout;\n  }\n\n  private async setVaultTimeoutAction(userId: UserId, action: VaultTimeoutAction): Promise<void> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot set vault timeout action.\");\n    }\n\n    if (!action) {\n      throw new Error(\"Vault Timeout Action cannot be null\");\n    }\n\n    await this.stateProvider.setUserState(VAULT_TIMEOUT_ACTION, action, userId);\n  }\n\n  getVaultTimeoutActionByUserId$(userId: UserId): Observable<VaultTimeoutAction> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot get vault timeout action.\");\n    }\n\n    return combineLatest([\n      this.stateProvider.getUserState$(VAULT_TIMEOUT_ACTION, userId),\n      this.getMaxVaultTimeoutPolicyByUserId$(userId),\n    ]).pipe(\n      switchMap(([currentVaultTimeoutAction, maxVaultTimeoutPolicy]) => {\n        return from(\n          this.determineVaultTimeoutAction(\n            userId,\n            currentVaultTimeoutAction,\n            maxVaultTimeoutPolicy,\n          ),\n        ).pipe(\n          tap((vaultTimeoutAction: VaultTimeoutAction) => {\n            // As a side effect, set the new value determined by determineVaultTimeout into state if it's different from the current\n            // We want to avoid having a null timeout action always so we set it to the default if it is null\n            // and if the user becomes subject to a policy that requires a specific action, we set it to that\n            if (vaultTimeoutAction !== currentVaultTimeoutAction) {\n              return this.stateProvider.setUserState(\n                VAULT_TIMEOUT_ACTION,\n                vaultTimeoutAction,\n                userId,\n              );\n            }\n          }),\n          catchError((error: unknown) => {\n            // Protect outer observable from canceling on error by catching and returning EMPTY\n            this.logService.error(`Error getting vault timeout: ${error}`);\n            return EMPTY;\n          }),\n        );\n      }),\n      distinctUntilChanged(), // Avoid having the set side effect trigger a new emission of the same action\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n  }\n\n  private async determineVaultTimeoutAction(\n    userId: string,\n    currentVaultTimeoutAction: VaultTimeoutAction | null,\n    maxVaultTimeoutPolicy: Policy | null,\n  ): Promise<VaultTimeoutAction> {\n    const availableVaultTimeoutActions = await this.getAvailableVaultTimeoutActions(userId);\n    if (availableVaultTimeoutActions.length === 1) {\n      return availableVaultTimeoutActions[0];\n    }\n\n    if (\n      maxVaultTimeoutPolicy?.data?.action &&\n      availableVaultTimeoutActions.includes(maxVaultTimeoutPolicy.data.action)\n    ) {\n      // return policy defined vault timeout action\n      return maxVaultTimeoutPolicy.data.action;\n    }\n\n    // No policy applies from here on\n    // If the current vault timeout is null and lock is an option, set it as the default\n    if (\n      currentVaultTimeoutAction == null &&\n      availableVaultTimeoutActions.includes(VaultTimeoutAction.Lock)\n    ) {\n      return VaultTimeoutAction.Lock;\n    }\n\n    return currentVaultTimeoutAction;\n  }\n\n  private getMaxVaultTimeoutPolicyByUserId$(userId: UserId): Observable<Policy | null> {\n    if (!userId) {\n      throw new Error(\"User id required. Cannot get max vault timeout policy.\");\n    }\n\n    return this.policyService\n      .getAll$(PolicyType.MaximumVaultTimeout, userId)\n      .pipe(map((policies) => policies[0] ?? null));\n  }\n\n  private async getAvailableVaultTimeoutActions(userId?: string): Promise<VaultTimeoutAction[]> {\n    userId ??= (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n    const availableActions = [VaultTimeoutAction.LogOut];\n\n    const canLock =\n      (await this.userHasMasterPassword(userId)) ||\n      (await this.pinService.isPinSet(userId as UserId)) ||\n      (await this.isBiometricLockSet(userId));\n\n    if (canLock) {\n      availableActions.push(VaultTimeoutAction.Lock);\n    }\n\n    return availableActions;\n  }\n\n  async clear(userId?: string): Promise<void> {\n    await this.keyService.clearPinKeys(userId);\n  }\n\n  private async userHasMasterPassword(userId: string): Promise<boolean> {\n    if (userId) {\n      const decryptionOptions = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),\n      );\n\n      return !!decryptionOptions?.hasMasterPassword;\n    } else {\n      return await firstValueFrom(this.userDecryptionOptionsService.hasMasterPassword$);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as signalR from \"@microsoft/signalr\";\nimport * as signalRMsgPack from \"@microsoft/signalr-protocol-msgpack\";\nimport { firstValueFrom, Subscription } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\n\nimport { ApiService } from \"../abstractions/api.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"../abstractions/notifications.service\";\nimport { AuthService } from \"../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../auth/enums/authentication-status\";\nimport { NotificationType } from \"../enums\";\nimport {\n  NotificationResponse,\n  SyncCipherNotification,\n  SyncFolderNotification,\n  SyncSendNotification,\n} from \"../models/response/notification.response\";\nimport { AppIdService } from \"../platform/abstractions/app-id.service\";\nimport { EnvironmentService } from \"../platform/abstractions/environment.service\";\nimport { LogService } from \"../platform/abstractions/log.service\";\nimport { MessagingService } from \"../platform/abstractions/messaging.service\";\nimport { StateService } from \"../platform/abstractions/state.service\";\nimport { ScheduledTaskNames } from \"../platform/scheduling/scheduled-task-name.enum\";\nimport { TaskSchedulerService } from \"../platform/scheduling/task-scheduler.service\";\nimport { SyncService } from \"../vault/abstractions/sync/sync.service.abstraction\";\n\nexport class NotificationsService implements NotificationsServiceAbstraction {\n  private signalrConnection: signalR.HubConnection;\n  private url: string;\n  private connected = false;\n  private inited = false;\n  private inactive = false;\n  private reconnectTimerSubscription: Subscription;\n  private isSyncingOnReconnect = true;\n\n  constructor(\n    private logService: LogService,\n    private syncService: SyncService,\n    private appIdService: AppIdService,\n    private apiService: ApiService,\n    private environmentService: EnvironmentService,\n    private logoutCallback: (logoutReason: LogoutReason) => Promise<void>,\n    private stateService: StateService,\n    private authService: AuthService,\n    private messagingService: MessagingService,\n    private taskSchedulerService: TaskSchedulerService,\n  ) {\n    this.taskSchedulerService.registerTaskHandler(\n      ScheduledTaskNames.notificationsReconnectTimeout,\n      () => this.reconnect(this.isSyncingOnReconnect),\n    );\n    this.environmentService.environment$.subscribe(() => {\n      if (!this.inited) {\n        return;\n      }\n\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.init();\n    });\n  }\n\n  async init(): Promise<void> {\n    this.inited = false;\n    this.url = (await firstValueFrom(this.environmentService.environment$)).getNotificationsUrl();\n\n    // Set notifications server URL to `https://-` to effectively disable communication\n    // with the notifications server from the client app\n    if (this.url === \"https://-\") {\n      return;\n    }\n\n    if (this.signalrConnection != null) {\n      this.signalrConnection.off(\"ReceiveMessage\");\n      this.signalrConnection.off(\"Heartbeat\");\n      await this.signalrConnection.stop();\n      this.connected = false;\n      this.signalrConnection = null;\n    }\n\n    this.signalrConnection = new signalR.HubConnectionBuilder()\n      .withUrl(this.url + \"/hub\", {\n        accessTokenFactory: () => this.apiService.getActiveBearerToken(),\n        skipNegotiation: true,\n        transport: signalR.HttpTransportType.WebSockets,\n      })\n      .withHubProtocol(new signalRMsgPack.MessagePackHubProtocol() as signalR.IHubProtocol)\n      // .configureLogging(signalR.LogLevel.Trace)\n      .build();\n\n    this.signalrConnection.on(\"ReceiveMessage\", (data: any) =>\n      this.processNotification(new NotificationResponse(data)),\n    );\n    // eslint-disable-next-line\n    this.signalrConnection.on(\"Heartbeat\", (data: any) => {\n      /*console.log('Heartbeat!');*/\n    });\n    this.signalrConnection.onclose(() => {\n      this.connected = false;\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.reconnect(true);\n    });\n    this.inited = true;\n    if (await this.isAuthedAndUnlocked()) {\n      await this.reconnect(false);\n    }\n  }\n\n  async updateConnection(sync = false): Promise<void> {\n    if (!this.inited) {\n      return;\n    }\n    try {\n      if (await this.isAuthedAndUnlocked()) {\n        await this.reconnect(sync);\n      } else {\n        await this.signalrConnection.stop();\n      }\n    } catch (e) {\n      this.logService.error(e.toString());\n    }\n  }\n\n  async reconnectFromActivity(): Promise<void> {\n    this.inactive = false;\n    if (this.inited && !this.connected) {\n      await this.reconnect(true);\n    }\n  }\n\n  async disconnectFromInactivity(): Promise<void> {\n    this.inactive = true;\n    if (this.inited && this.connected) {\n      await this.signalrConnection.stop();\n    }\n  }\n\n  private async processNotification(notification: NotificationResponse) {\n    const appId = await this.appIdService.getAppId();\n    if (notification == null || notification.contextId === appId) {\n      return;\n    }\n\n    const isAuthenticated = await this.stateService.getIsAuthenticated();\n    const payloadUserId = notification.payload.userId || notification.payload.UserId;\n    const myUserId = await this.stateService.getUserId();\n    if (isAuthenticated && payloadUserId != null && payloadUserId !== myUserId) {\n      return;\n    }\n\n    switch (notification.type) {\n      case NotificationType.SyncCipherCreate:\n      case NotificationType.SyncCipherUpdate:\n        await this.syncService.syncUpsertCipher(\n          notification.payload as SyncCipherNotification,\n          notification.type === NotificationType.SyncCipherUpdate,\n        );\n        break;\n      case NotificationType.SyncCipherDelete:\n      case NotificationType.SyncLoginDelete:\n        await this.syncService.syncDeleteCipher(notification.payload as SyncCipherNotification);\n        break;\n      case NotificationType.SyncFolderCreate:\n      case NotificationType.SyncFolderUpdate:\n        await this.syncService.syncUpsertFolder(\n          notification.payload as SyncFolderNotification,\n          notification.type === NotificationType.SyncFolderUpdate,\n          payloadUserId,\n        );\n        break;\n      case NotificationType.SyncFolderDelete:\n        await this.syncService.syncDeleteFolder(\n          notification.payload as SyncFolderNotification,\n          payloadUserId,\n        );\n        break;\n      case NotificationType.SyncVault:\n      case NotificationType.SyncCiphers:\n      case NotificationType.SyncSettings:\n        if (isAuthenticated) {\n          await this.syncService.fullSync(false);\n        }\n        break;\n      case NotificationType.SyncOrganizations:\n        if (isAuthenticated) {\n          // An organization update may not have bumped the user's account revision date, so force a sync\n          await this.syncService.fullSync(true);\n        }\n        break;\n      case NotificationType.SyncOrgKeys:\n        if (isAuthenticated) {\n          await this.syncService.fullSync(true);\n          // Stop so a reconnect can be made\n          await this.signalrConnection.stop();\n        }\n        break;\n      case NotificationType.LogOut:\n        if (isAuthenticated) {\n          this.logService.info(\"[Notifications Service] Received logout notification\");\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.logoutCallback(\"logoutNotification\");\n        }\n        break;\n      case NotificationType.SyncSendCreate:\n      case NotificationType.SyncSendUpdate:\n        await this.syncService.syncUpsertSend(\n          notification.payload as SyncSendNotification,\n          notification.type === NotificationType.SyncSendUpdate,\n        );\n        break;\n      case NotificationType.SyncSendDelete:\n        await this.syncService.syncDeleteSend(notification.payload as SyncSendNotification);\n        break;\n      case NotificationType.AuthRequest:\n        {\n          this.messagingService.send(\"openLoginApproval\", {\n            notificationId: notification.payload.id,\n          });\n        }\n        break;\n      case NotificationType.SyncOrganizationStatusChanged:\n        if (isAuthenticated) {\n          await this.syncService.fullSync(true);\n        }\n        break;\n      case NotificationType.SyncOrganizationCollectionSettingChanged:\n        if (isAuthenticated) {\n          await this.syncService.fullSync(true);\n        }\n        break;\n      default:\n        break;\n    }\n  }\n\n  private async reconnect(sync: boolean) {\n    this.reconnectTimerSubscription?.unsubscribe();\n\n    if (this.connected || !this.inited || this.inactive) {\n      return;\n    }\n    const authedAndUnlocked = await this.isAuthedAndUnlocked();\n    if (!authedAndUnlocked) {\n      return;\n    }\n\n    try {\n      await this.signalrConnection.start();\n      this.connected = true;\n      if (sync) {\n        await this.syncService.fullSync(false);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (!this.connected) {\n      this.isSyncingOnReconnect = sync;\n      this.reconnectTimerSubscription = this.taskSchedulerService.setTimeout(\n        ScheduledTaskNames.notificationsReconnectTimeout,\n        this.random(120000, 300000),\n      );\n    }\n  }\n\n  private async isAuthedAndUnlocked() {\n    const authStatus = await this.authService.getAuthStatus();\n    return authStatus >= AuthenticationStatus.Unlocked;\n  }\n\n  private random(min: number, max: number) {\n    min = Math.ceil(min);\n    max = Math.floor(max);\n    return Math.floor(Math.random() * (max - min + 1)) + min;\n  }\n}\n","import * as argon2 from \"argon2-browser\";\nimport * as forge from \"node-forge\";\n\nimport { Utils } from \"../../platform/misc/utils\";\nimport { CsprngArray } from \"../../types/csprng\";\nimport { CryptoFunctionService } from \"../abstractions/crypto-function.service\";\nimport { CbcDecryptParameters, EcbDecryptParameters } from \"../models/domain/decrypt-parameters\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport class WebCryptoFunctionService implements CryptoFunctionService {\n  private crypto: Crypto;\n  private subtle: SubtleCrypto;\n  private wasmSupported: boolean;\n\n  constructor(globalContext: { crypto: Crypto }) {\n    if (globalContext?.crypto?.subtle == null) {\n      throw new Error(\n        \"Could not instantiate WebCryptoFunctionService. Could not locate Subtle crypto.\",\n      );\n    }\n    this.crypto = globalContext.crypto;\n    this.subtle = this.crypto.subtle;\n    this.wasmSupported = this.checkIfWasmSupported();\n  }\n\n  async pbkdf2(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    algorithm: \"sha256\" | \"sha512\",\n    iterations: number,\n  ): Promise<Uint8Array> {\n    const wcLen = algorithm === \"sha256\" ? 256 : 512;\n    const passwordBuf = this.toBuf(password);\n    const saltBuf = this.toBuf(salt);\n\n    const pbkdf2Params: Pbkdf2Params = {\n      name: \"PBKDF2\",\n      salt: saltBuf,\n      iterations: iterations,\n      hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n    };\n\n    const impKey = await this.subtle.importKey(\n      \"raw\",\n      passwordBuf,\n      { name: \"PBKDF2\" } as any,\n      false,\n      [\"deriveBits\"],\n    );\n    const buffer = await this.subtle.deriveBits(pbkdf2Params as any, impKey, wcLen);\n    return new Uint8Array(buffer);\n  }\n\n  async argon2(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    iterations: number,\n    memory: number,\n    parallelism: number,\n  ): Promise<Uint8Array> {\n    if (!this.wasmSupported) {\n      throw \"Webassembly support is required for the Argon2 KDF feature.\";\n    }\n\n    const passwordArr = new Uint8Array(this.toBuf(password));\n    const saltArr = new Uint8Array(this.toBuf(salt));\n\n    const result = await argon2.hash({\n      pass: passwordArr,\n      salt: saltArr,\n      time: iterations,\n      mem: memory,\n      parallelism: parallelism,\n      hashLen: 32,\n      type: argon2.ArgonType.Argon2id,\n    });\n    argon2.unloadRuntime();\n    return result.hash;\n  }\n\n  async hkdf(\n    ikm: Uint8Array,\n    salt: string | Uint8Array,\n    info: string | Uint8Array,\n    outputByteSize: number,\n    algorithm: \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array> {\n    const saltBuf = this.toBuf(salt);\n    const infoBuf = this.toBuf(info);\n\n    const hkdfParams: HkdfParams = {\n      name: \"HKDF\",\n      salt: saltBuf,\n      info: infoBuf,\n      hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n    };\n\n    const impKey = await this.subtle.importKey(\"raw\", ikm, { name: \"HKDF\" } as any, false, [\n      \"deriveBits\",\n    ]);\n    const buffer = await this.subtle.deriveBits(hkdfParams as any, impKey, outputByteSize * 8);\n    return new Uint8Array(buffer);\n  }\n\n  // ref: https://tools.ietf.org/html/rfc5869\n  async hkdfExpand(\n    prk: Uint8Array,\n    info: string | Uint8Array,\n    outputByteSize: number,\n    algorithm: \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array> {\n    const hashLen = algorithm === \"sha256\" ? 32 : 64;\n    if (outputByteSize > 255 * hashLen) {\n      throw new Error(\"outputByteSize is too large.\");\n    }\n    const prkArr = new Uint8Array(prk);\n    if (prkArr.length < hashLen) {\n      throw new Error(\"prk is too small.\");\n    }\n    const infoBuf = this.toBuf(info);\n    const infoArr = new Uint8Array(infoBuf);\n    let runningOkmLength = 0;\n    let previousT = new Uint8Array(0);\n    const n = Math.ceil(outputByteSize / hashLen);\n    const okm = new Uint8Array(n * hashLen);\n    for (let i = 0; i < n; i++) {\n      const t = new Uint8Array(previousT.length + infoArr.length + 1);\n      t.set(previousT);\n      t.set(infoArr, previousT.length);\n      t.set([i + 1], t.length - 1);\n      previousT = new Uint8Array(await this.hmac(t, prk, algorithm));\n      okm.set(previousT, runningOkmLength);\n      runningOkmLength += previousT.length;\n      if (runningOkmLength >= outputByteSize) {\n        break;\n      }\n    }\n    return okm.slice(0, outputByteSize);\n  }\n\n  async hash(\n    value: string | Uint8Array,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\" | \"md5\",\n  ): Promise<Uint8Array> {\n    if (algorithm === \"md5\") {\n      const md = forge.md.md5.create();\n      const valueBytes = this.toByteString(value);\n      md.update(valueBytes, \"raw\");\n      return Utils.fromByteStringToArray(md.digest().data);\n    }\n\n    const valueBuf = this.toBuf(value);\n    const buffer = await this.subtle.digest(\n      { name: this.toWebCryptoAlgorithm(algorithm) },\n      valueBuf,\n    );\n    return new Uint8Array(buffer);\n  }\n\n  async hmac(\n    value: Uint8Array,\n    key: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array> {\n    const signingAlgorithm = {\n      name: \"HMAC\",\n      hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n    };\n\n    const impKey = await this.subtle.importKey(\"raw\", key, signingAlgorithm, false, [\"sign\"]);\n    const buffer = await this.subtle.sign(signingAlgorithm, impKey, value);\n    return new Uint8Array(buffer);\n  }\n\n  // Safely compare two values in a way that protects against timing attacks (Double HMAC Verification).\n  // ref: https://www.nccgroup.trust/us/about-us/newsroom-and-events/blog/2011/february/double-hmac-verification/\n  // ref: https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy\n  async compare(a: Uint8Array, b: Uint8Array): Promise<boolean> {\n    const macKey = await this.randomBytes(32);\n    const signingAlgorithm = {\n      name: \"HMAC\",\n      hash: { name: \"SHA-256\" },\n    };\n    const impKey = await this.subtle.importKey(\"raw\", macKey, signingAlgorithm, false, [\"sign\"]);\n    const mac1 = await this.subtle.sign(signingAlgorithm, impKey, a);\n    const mac2 = await this.subtle.sign(signingAlgorithm, impKey, b);\n\n    if (mac1.byteLength !== mac2.byteLength) {\n      return false;\n    }\n\n    const arr1 = new Uint8Array(mac1);\n    const arr2 = new Uint8Array(mac2);\n    for (let i = 0; i < arr2.length; i++) {\n      if (arr1[i] !== arr2[i]) {\n        return false;\n      }\n    }\n\n    return true;\n  }\n\n  hmacFast(value: string, key: string, algorithm: \"sha1\" | \"sha256\" | \"sha512\"): Promise<string> {\n    const hmac = forge.hmac.create();\n    hmac.start(algorithm, key);\n    hmac.update(value);\n    const bytes = hmac.digest().getBytes();\n    return Promise.resolve(bytes);\n  }\n\n  async compareFast(a: string, b: string): Promise<boolean> {\n    const rand = await this.randomBytes(32);\n    const bytes = new Uint32Array(rand);\n    const buffer = forge.util.createBuffer();\n    for (let i = 0; i < bytes.length; i++) {\n      buffer.putInt32(bytes[i]);\n    }\n    const macKey = buffer.getBytes();\n\n    const hmac = forge.hmac.create();\n    hmac.start(\"sha256\", macKey);\n    hmac.update(a);\n    const mac1 = hmac.digest().getBytes();\n\n    hmac.start(\"sha256\", null);\n    hmac.update(b);\n    const mac2 = hmac.digest().getBytes();\n\n    const equals = mac1 === mac2;\n    return equals;\n  }\n\n  async aesEncrypt(data: Uint8Array, iv: Uint8Array, key: Uint8Array): Promise<Uint8Array> {\n    const impKey = await this.subtle.importKey(\"raw\", key, { name: \"AES-CBC\" } as any, false, [\n      \"encrypt\",\n    ]);\n    const buffer = await this.subtle.encrypt({ name: \"AES-CBC\", iv: iv }, impKey, data);\n    return new Uint8Array(buffer);\n  }\n\n  aesDecryptFastParameters(\n    data: string,\n    iv: string,\n    mac: string | null,\n    key: SymmetricCryptoKey,\n  ): CbcDecryptParameters<string> {\n    const p = {} as CbcDecryptParameters<string>;\n    if (key.meta != null) {\n      p.encKey = key.meta.encKeyByteString;\n      p.macKey = key.meta.macKeyByteString;\n    }\n\n    if (p.encKey == null) {\n      p.encKey = forge.util.decode64(key.encKeyB64);\n    }\n    p.data = forge.util.decode64(data);\n    p.iv = forge.util.decode64(iv);\n    p.macData = p.iv + p.data;\n    if (p.macKey == null && key.macKeyB64 != null) {\n      p.macKey = forge.util.decode64(key.macKeyB64);\n    }\n    if (mac != null) {\n      p.mac = forge.util.decode64(mac);\n    }\n\n    // cache byte string keys for later\n    if (key.meta == null) {\n      key.meta = {};\n    }\n    if (key.meta.encKeyByteString == null) {\n      key.meta.encKeyByteString = p.encKey;\n    }\n    if (p.macKey != null && key.meta.macKeyByteString == null) {\n      key.meta.macKeyByteString = p.macKey;\n    }\n\n    return p;\n  }\n\n  aesDecryptFast({\n    mode,\n    parameters,\n  }:\n    | { mode: \"cbc\"; parameters: CbcDecryptParameters<string> }\n    | { mode: \"ecb\"; parameters: EcbDecryptParameters<string> }): Promise<string> {\n    const decipher = (forge as any).cipher.createDecipher(\n      this.toWebCryptoAesMode(mode),\n      parameters.encKey,\n    );\n    const options = {} as any;\n    if (mode === \"cbc\") {\n      options.iv = parameters.iv;\n    }\n    const dataBuffer = (forge as any).util.createBuffer(parameters.data);\n    decipher.start(options);\n    decipher.update(dataBuffer);\n    decipher.finish();\n    const val = decipher.output.toString();\n    return Promise.resolve(val);\n  }\n\n  async aesDecrypt(\n    data: Uint8Array,\n    iv: Uint8Array | null,\n    key: Uint8Array,\n    mode: \"cbc\" | \"ecb\",\n  ): Promise<Uint8Array> {\n    if (mode === \"ecb\") {\n      // Web crypto does not support AES-ECB mode, so we need to do this in forge.\n      const parameters: EcbDecryptParameters<string> = {\n        data: this.toByteString(data),\n        encKey: this.toByteString(key),\n      };\n      const result = await this.aesDecryptFast({ mode: \"ecb\", parameters });\n      return Utils.fromByteStringToArray(result);\n    }\n    const impKey = await this.subtle.importKey(\"raw\", key, { name: \"AES-CBC\" } as any, false, [\n      \"decrypt\",\n    ]);\n\n    // CBC\n    if (iv == null) {\n      throw new Error(\"IV is required for CBC mode.\");\n    }\n    const buffer = await this.subtle.decrypt({ name: \"AES-CBC\", iv: iv }, impKey, data);\n    return new Uint8Array(buffer);\n  }\n\n  async rsaEncrypt(\n    data: Uint8Array,\n    publicKey: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\",\n  ): Promise<Uint8Array> {\n    // Note: Edge browser requires that we specify name and hash for both key import and decrypt.\n    // We cannot use the proper types here.\n    const rsaParams = {\n      name: \"RSA-OAEP\",\n      hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n    };\n    const impKey = await this.subtle.importKey(\"spki\", publicKey, rsaParams, false, [\"encrypt\"]);\n    const buffer = await this.subtle.encrypt(rsaParams, impKey, data);\n    return new Uint8Array(buffer);\n  }\n\n  async rsaDecrypt(\n    data: Uint8Array,\n    privateKey: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\",\n  ): Promise<Uint8Array> {\n    // Note: Edge browser requires that we specify name and hash for both key import and decrypt.\n    // We cannot use the proper types here.\n    const rsaParams = {\n      name: \"RSA-OAEP\",\n      hash: { name: this.toWebCryptoAlgorithm(algorithm) },\n    };\n    const impKey = await this.subtle.importKey(\"pkcs8\", privateKey, rsaParams, false, [\"decrypt\"]);\n    const buffer = await this.subtle.decrypt(rsaParams, impKey, data);\n    return new Uint8Array(buffer);\n  }\n\n  async rsaExtractPublicKey(privateKey: Uint8Array): Promise<Uint8Array> {\n    const rsaParams = {\n      name: \"RSA-OAEP\",\n      // Have to specify some algorithm\n      hash: { name: this.toWebCryptoAlgorithm(\"sha1\") },\n    };\n    const impPrivateKey = await this.subtle.importKey(\"pkcs8\", privateKey, rsaParams, true, [\n      \"decrypt\",\n    ]);\n    const jwkPrivateKey = await this.subtle.exportKey(\"jwk\", impPrivateKey);\n    const jwkPublicKeyParams = {\n      kty: \"RSA\",\n      e: jwkPrivateKey.e,\n      n: jwkPrivateKey.n,\n      alg: \"RSA-OAEP\",\n      ext: true,\n    };\n    const impPublicKey = await this.subtle.importKey(\"jwk\", jwkPublicKeyParams, rsaParams, true, [\n      \"encrypt\",\n    ]);\n    const buffer = await this.subtle.exportKey(\"spki\", impPublicKey);\n    return new Uint8Array(buffer);\n  }\n\n  async aesGenerateKey(bitLength = 128 | 192 | 256 | 512): Promise<CsprngArray> {\n    if (bitLength === 512) {\n      // 512 bit keys are not supported in WebCrypto, so we concat two 256 bit keys\n      const key1 = await this.aesGenerateKey(256);\n      const key2 = await this.aesGenerateKey(256);\n      return new Uint8Array([...key1, ...key2]) as CsprngArray;\n    }\n    const aesParams = {\n      name: \"AES-CBC\",\n      length: bitLength,\n    };\n\n    const key = await this.subtle.generateKey(aesParams, true, [\"encrypt\", \"decrypt\"]);\n    const rawKey = await this.subtle.exportKey(\"raw\", key);\n    return new Uint8Array(rawKey) as CsprngArray;\n  }\n\n  async rsaGenerateKeyPair(length: 1024 | 2048 | 4096): Promise<[Uint8Array, Uint8Array]> {\n    const rsaParams = {\n      name: \"RSA-OAEP\",\n      modulusLength: length,\n      publicExponent: new Uint8Array([0x01, 0x00, 0x01]), // 65537\n      // Have to specify some algorithm\n      hash: { name: this.toWebCryptoAlgorithm(\"sha1\") },\n    };\n    const keyPair = await this.subtle.generateKey(rsaParams, true, [\"encrypt\", \"decrypt\"]);\n    const publicKey = await this.subtle.exportKey(\"spki\", keyPair.publicKey);\n    const privateKey = await this.subtle.exportKey(\"pkcs8\", keyPair.privateKey);\n    return [new Uint8Array(publicKey), new Uint8Array(privateKey)];\n  }\n\n  randomBytes(length: number): Promise<CsprngArray> {\n    const arr = new Uint8Array(length);\n    this.crypto.getRandomValues(arr);\n    return Promise.resolve(arr as CsprngArray);\n  }\n\n  private toBuf(value: string | Uint8Array): Uint8Array {\n    let buf: Uint8Array;\n    if (typeof value === \"string\") {\n      buf = Utils.fromUtf8ToArray(value);\n    } else {\n      buf = value;\n    }\n    return buf;\n  }\n\n  private toByteString(value: string | Uint8Array): string {\n    let bytes: string;\n    if (typeof value === \"string\") {\n      bytes = forge.util.encodeUtf8(value);\n    } else {\n      bytes = Utils.fromBufferToByteString(value);\n    }\n    return bytes;\n  }\n\n  private toWebCryptoAlgorithm(algorithm: \"sha1\" | \"sha256\" | \"sha512\" | \"md5\"): string {\n    if (algorithm === \"md5\") {\n      throw new Error(\"MD5 is not supported in WebCrypto.\");\n    }\n    return algorithm === \"sha1\" ? \"SHA-1\" : algorithm === \"sha256\" ? \"SHA-256\" : \"SHA-512\";\n  }\n\n  private toWebCryptoAesMode(mode: \"cbc\" | \"ecb\"): string {\n    return mode === \"cbc\" ? \"AES-CBC\" : \"AES-ECB\";\n  }\n\n  // ref: https://stackoverflow.com/a/47880734/1090359\n  private checkIfWasmSupported(): boolean {\n    try {\n      if (typeof WebAssembly === \"object\" && typeof WebAssembly.instantiate === \"function\") {\n        const module = new WebAssembly.Module(\n          Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00),\n        );\n        if (module instanceof WebAssembly.Module) {\n          return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;\n        }\n      }\n    } catch {\n      return false;\n    }\n    return false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { defaultIfEmpty, filter, firstValueFrom, fromEvent, map, Subject, takeUntil } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { Decryptable } from \"../../interfaces/decryptable.interface\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\n\nimport { EncryptServiceImplementation } from \"./encrypt.service.implementation\";\nimport { getClassInitializer } from \"./get-class-initializer\";\n\n// TTL (time to live) is not strictly required but avoids tying up memory resources if inactive\nconst workerTTL = 3 * 60000; // 3 minutes\n\n/**\n * @deprecated Replaced by BulkEncryptionService (PM-4154)\n */\nexport class MultithreadEncryptServiceImplementation extends EncryptServiceImplementation {\n  private worker: Worker;\n  private timeout: any;\n\n  private clear$ = new Subject<void>();\n\n  /**\n   * Sends items to a web worker to decrypt them.\n   * This utilises multithreading to decrypt items faster without interrupting other operations (e.g. updating UI).\n   */\n  async decryptItems<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]> {\n    if (items == null || items.length < 1) {\n      return [];\n    }\n\n    this.logService.info(\"Starting decryption using multithreading\");\n\n    this.worker ??= new Worker(\n      new URL(\n        /* webpackChunkName: 'encrypt-worker' */\n        \"@bitwarden/common/platform/services/cryptography/encrypt.worker.ts\",\n        import.meta.url,\n      ),\n    );\n\n    this.restartTimeout();\n\n    const request = {\n      id: Utils.newGuid(),\n      items: items,\n      key: key,\n    };\n\n    this.worker.postMessage(JSON.stringify(request));\n\n    return await firstValueFrom(\n      fromEvent(this.worker, \"message\").pipe(\n        filter((response: MessageEvent) => response.data?.id === request.id),\n        map((response) => JSON.parse(response.data.items)),\n        map((items) =>\n          items.map((jsonItem: Jsonify<T>) => {\n            const initializer = getClassInitializer<T>(jsonItem.initializerKey);\n            return initializer(jsonItem);\n          }),\n        ),\n        takeUntil(this.clear$),\n        defaultIfEmpty([]),\n      ),\n    );\n  }\n\n  private clear() {\n    this.clear$.next();\n    this.worker?.terminate();\n    this.worker = null;\n    this.clearTimeout();\n  }\n\n  private restartTimeout() {\n    this.clearTimeout();\n    this.timeout = setTimeout(() => this.clear(), workerTTL);\n  }\n\n  private clearTimeout() {\n    if (this.timeout != null) {\n      clearTimeout(this.timeout);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, fromEvent, filter, map, takeUntil, defaultIfEmpty, Subject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { BulkEncryptService } from \"../../abstractions/bulk-encrypt.service\";\nimport { CryptoFunctionService } from \"../../abstractions/crypto-function.service\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { Decryptable } from \"../../interfaces/decryptable.interface\";\nimport { InitializerMetadata } from \"../../interfaces/initializer-metadata.interface\";\nimport { Utils } from \"../../misc/utils\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\n\nimport { getClassInitializer } from \"./get-class-initializer\";\n\n// TTL (time to live) is not strictly required but avoids tying up memory resources if inactive\nconst workerTTL = 60000; // 1 minute\nconst maxWorkers = 8;\nconst minNumberOfItemsForMultithreading = 400;\n\nexport class BulkEncryptServiceImplementation implements BulkEncryptService {\n  private workers: Worker[] = [];\n  private timeout: any;\n\n  private clear$ = new Subject<void>();\n\n  constructor(\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected logService: LogService,\n  ) {}\n\n  /**\n   * Decrypts items using a web worker if the environment supports it.\n   * Will fall back to the main thread if the window object is not available.\n   */\n  async decryptItems<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]> {\n    if (key == null) {\n      throw new Error(\"No encryption key provided.\");\n    }\n\n    if (items == null || items.length < 1) {\n      return [];\n    }\n\n    if (typeof window === \"undefined\") {\n      this.logService.info(\"Window not available in BulkEncryptService, decrypting sequentially\");\n      const results = [];\n      for (let i = 0; i < items.length; i++) {\n        results.push(await items[i].decrypt(key));\n      }\n      return results;\n    }\n\n    const decryptedItems = await this.getDecryptedItemsFromWorkers(items, key);\n    return decryptedItems;\n  }\n\n  /**\n   * Sends items to a set of web workers to decrypt them. This utilizes multiple workers to decrypt items\n   * faster without interrupting other operations (e.g. updating UI).\n   */\n  private async getDecryptedItemsFromWorkers<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]> {\n    if (items == null || items.length < 1) {\n      return [];\n    }\n\n    this.clearTimeout();\n\n    const hardwareConcurrency = navigator.hardwareConcurrency || 1;\n    let numberOfWorkers = Math.min(hardwareConcurrency, maxWorkers);\n    if (items.length < minNumberOfItemsForMultithreading) {\n      numberOfWorkers = 1;\n    }\n\n    this.logService.info(\n      `Starting decryption using multithreading with ${numberOfWorkers} workers for ${items.length} items`,\n    );\n\n    if (this.workers.length == 0) {\n      for (let i = 0; i < numberOfWorkers; i++) {\n        this.workers.push(\n          new Worker(\n            new URL(\n              /* webpackChunkName: 'encrypt-worker' */\n              \"@bitwarden/common/platform/services/cryptography/encrypt.worker.ts\",\n              import.meta.url,\n            ),\n          ),\n        );\n      }\n    }\n\n    const itemsPerWorker = Math.floor(items.length / this.workers.length);\n    const results = [];\n\n    for (const [i, worker] of this.workers.entries()) {\n      const start = i * itemsPerWorker;\n      const end = start + itemsPerWorker;\n      const itemsForWorker = items.slice(start, end);\n\n      // push the remaining items to the last worker\n      if (i == this.workers.length - 1) {\n        itemsForWorker.push(...items.slice(end));\n      }\n\n      const request = {\n        id: Utils.newGuid(),\n        items: itemsForWorker,\n        key: key,\n      };\n\n      worker.postMessage(JSON.stringify(request));\n      results.push(\n        firstValueFrom(\n          fromEvent(worker, \"message\").pipe(\n            filter((response: MessageEvent) => response.data?.id === request.id),\n            map((response) => JSON.parse(response.data.items)),\n            map((items) =>\n              items.map((jsonItem: Jsonify<T>) => {\n                const initializer = getClassInitializer<T>(jsonItem.initializerKey);\n                return initializer(jsonItem);\n              }),\n            ),\n            takeUntil(this.clear$),\n            defaultIfEmpty([]),\n          ),\n        ),\n      );\n    }\n\n    const decryptedItems = (await Promise.all(results)).flat();\n    this.logService.info(\n      `Finished decrypting ${decryptedItems.length} items using ${numberOfWorkers} workers`,\n    );\n\n    this.restartTimeout();\n\n    return decryptedItems;\n  }\n\n  private clear() {\n    this.clear$.next();\n    for (const worker of this.workers) {\n      worker.terminate();\n    }\n    this.workers = [];\n    this.clearTimeout();\n  }\n\n  private restartTimeout() {\n    this.clearTimeout();\n    this.timeout = setTimeout(() => this.clear(), workerTTL);\n  }\n\n  private clearTimeout() {\n    if (this.timeout != null) {\n      clearTimeout(this.timeout);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"../../abstractions/event/event-upload.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { EventData } from \"../../models/data/event.data\";\nimport { EventRequest } from \"../../models/request/event.request\";\nimport { LogService } from \"../../platform/abstractions/log.service\";\nimport { ScheduledTaskNames } from \"../../platform/scheduling/scheduled-task-name.enum\";\nimport { TaskSchedulerService } from \"../../platform/scheduling/task-scheduler.service\";\nimport { StateProvider } from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\n\nimport { EVENT_COLLECTION } from \"./key-definitions\";\n\nexport class EventUploadService implements EventUploadServiceAbstraction {\n  private inited = false;\n  constructor(\n    private apiService: ApiService,\n    private stateProvider: StateProvider,\n    private logService: LogService,\n    private authService: AuthService,\n    private taskSchedulerService: TaskSchedulerService,\n  ) {\n    this.taskSchedulerService.registerTaskHandler(ScheduledTaskNames.eventUploadsInterval, () =>\n      this.uploadEvents(),\n    );\n  }\n\n  init(checkOnInterval: boolean) {\n    if (this.inited) {\n      return;\n    }\n\n    this.inited = true;\n    if (checkOnInterval) {\n      void this.uploadEvents();\n      this.taskSchedulerService.setInterval(\n        ScheduledTaskNames.eventUploadsInterval,\n        60 * 1000, // check every 60 seconds\n      );\n    }\n  }\n\n  /** Upload the event collection from state.\n   *  @param userId upload events for provided user. If not active user will be used.\n   */\n  async uploadEvents(userId?: UserId): Promise<void> {\n    if (!userId) {\n      userId = await firstValueFrom(this.stateProvider.activeUserId$);\n    }\n\n    if (!userId) {\n      return;\n    }\n\n    const isUnlocked = await firstValueFrom(\n      this.authService\n        .authStatusFor$(userId)\n        .pipe(map((status) => status === AuthenticationStatus.Unlocked)),\n    );\n    if (!isUnlocked) {\n      return;\n    }\n\n    const eventCollection = await this.takeEvents(userId);\n\n    if (eventCollection == null || eventCollection.length === 0) {\n      return;\n    }\n    const request = eventCollection.map((e) => {\n      const req = new EventRequest();\n      req.type = e.type;\n      req.cipherId = e.cipherId;\n      req.date = e.date;\n      req.organizationId = e.organizationId;\n      return req;\n    });\n    try {\n      await this.apiService.postEventsCollect(request, userId);\n    } catch (e) {\n      this.logService.error(e);\n      // Add the events back to state if there was an error and they were not uploaded.\n      await this.stateProvider.setUserState(EVENT_COLLECTION, eventCollection, userId);\n    }\n  }\n\n  /** Return user's events and then clear them from state\n   *  @param userId the user to grab and clear events for\n   */\n  private async takeEvents(userId: UserId): Promise<EventData[]> {\n    let taken = null;\n    await this.stateProvider.getUser(userId, EVENT_COLLECTION).update((current) => {\n      taken = current ?? [];\n      return [];\n    });\n\n    return taken;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map, from, zip, Observable } from \"rxjs\";\n\nimport { EventCollectionService as EventCollectionServiceAbstraction } from \"../../abstractions/event/event-collection.service\";\nimport { EventUploadService } from \"../../abstractions/event/event-upload.service\";\nimport { OrganizationService } from \"../../admin-console/abstractions/organization/organization.service.abstraction\";\nimport { AccountService } from \"../../auth/abstractions/account.service\";\nimport { AuthService } from \"../../auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"../../auth/enums/authentication-status\";\nimport { EventType } from \"../../enums\";\nimport { EventData } from \"../../models/data/event.data\";\nimport { StateProvider } from \"../../platform/state\";\nimport { CipherService } from \"../../vault/abstractions/cipher.service\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nimport { EVENT_COLLECTION } from \"./key-definitions\";\n\nexport class EventCollectionService implements EventCollectionServiceAbstraction {\n  private orgIds$: Observable<string[]>;\n\n  constructor(\n    private cipherService: CipherService,\n    private stateProvider: StateProvider,\n    private organizationService: OrganizationService,\n    private eventUploadService: EventUploadService,\n    private authService: AuthService,\n    private accountService: AccountService,\n  ) {\n    this.orgIds$ = this.organizationService.organizations$.pipe(\n      map((orgs) => orgs?.filter((o) => o.useEvents)?.map((x) => x.id) ?? []),\n    );\n  }\n\n  /** Adds an event to the active user's event collection\n   *  @param eventType the event type to be added\n   *  @param ciphers The collection of ciphers to log events for\n   *  @param uploadImmediately in some cases the recorded events should be uploaded right after being added\n   */\n  async collectMany(\n    eventType: EventType,\n    ciphers: CipherView[],\n    uploadImmediately = false,\n  ): Promise<any> {\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    const eventStore = this.stateProvider.getUser(userId, EVENT_COLLECTION);\n\n    if (!(await this.shouldUpdate(null, eventType, ciphers))) {\n      return;\n    }\n\n    const events$ = this.orgIds$.pipe(\n      map((orgs) =>\n        ciphers\n          .filter((c) => orgs.includes(c.organizationId))\n          .map((c) => ({\n            type: eventType,\n            cipherId: c.id,\n            date: new Date().toISOString(),\n            organizationId: c.organizationId,\n          })),\n      ),\n    );\n\n    await eventStore.update(\n      (currentEvents, newEvents) => [...(currentEvents ?? []), ...newEvents],\n      {\n        combineLatestWith: events$,\n      },\n    );\n\n    if (uploadImmediately) {\n      await this.eventUploadService.uploadEvents();\n    }\n  }\n\n  /** Adds an event to the active user's event collection\n   *  @param eventType the event type to be added\n   *  @param cipherId if provided the id of the cipher involved in the event\n   *  @param uploadImmediately in some cases the recorded events should be uploaded right after being added\n   *  @param organizationId the organizationId involved in the event. If the cipherId is not provided an organizationId is required\n   */\n  async collect(\n    eventType: EventType,\n    cipherId: string = null,\n    uploadImmediately = false,\n    organizationId: string = null,\n  ): Promise<any> {\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    const eventStore = this.stateProvider.getUser(userId, EVENT_COLLECTION);\n\n    if (!(await this.shouldUpdate(organizationId, eventType, undefined, cipherId))) {\n      return;\n    }\n\n    const event = new EventData();\n    event.type = eventType;\n    event.cipherId = cipherId;\n    event.date = new Date().toISOString();\n    event.organizationId = organizationId;\n\n    await eventStore.update((events) => {\n      events = events ?? [];\n      events.push(event);\n      return events;\n    });\n\n    if (uploadImmediately) {\n      await this.eventUploadService.uploadEvents();\n    }\n  }\n\n  /** Verifies if the event collection should be updated for the provided information\n   *  @param cipherId the cipher for the event\n   *  @param organizationId the organization for the event\n   */\n  private async shouldUpdate(\n    organizationId: string = null,\n    eventType: EventType = null,\n    ciphers: CipherView[] = [],\n    cipherId?: string,\n  ): Promise<boolean> {\n    const cipher$ = from(this.cipherService.get(cipherId));\n\n    const [authStatus, orgIds, cipher] = await firstValueFrom(\n      zip(this.authService.activeAccountStatus$, this.orgIds$, cipher$),\n    );\n\n    // The user must be authorized\n    if (authStatus != AuthenticationStatus.Unlocked) {\n      return false;\n    }\n\n    // User must have organizations assigned to them\n    if (orgIds == null || orgIds.length == 0) {\n      return false;\n    }\n\n    // Individual vault export doesn't need cipher id or organization id.\n    if (eventType == EventType.User_ClientExportedVault) {\n      return true;\n    }\n\n    // If the cipherId was provided and a cipher exists, add it to the collection\n    if (cipher != null) {\n      ciphers.push(new CipherView(cipher));\n    }\n\n    // If no ciphers there must be an organization id provided\n    if ((ciphers == null || ciphers.length == 0) && organizationId == null) {\n      return false;\n    }\n\n    // If the input list of ciphers is provided. Check the ciphers to see if any\n    // are in the user's org list\n    if (ciphers != null && ciphers.length > 0) {\n      const filtered = ciphers.filter((c) => orgIds.includes(c.organizationId));\n      return filtered.length > 0;\n    }\n\n    // If the organization id is provided it must be in the user's org list\n    if (organizationId != null && !orgIds.includes(organizationId)) {\n      return false;\n    }\n\n    return true;\n  }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { HttpStatusCode } from \"../../../enums\";\nimport { ErrorResponse } from \"../../../models/response/error.response\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { PolicyApiServiceAbstraction } from \"../../abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"../../abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { PolicyRequest } from \"../../models/request/policy.request\";\nimport { PolicyResponse } from \"../../models/response/policy.response\";\n\nexport class PolicyApiService implements PolicyApiServiceAbstraction {\n  constructor(\n    private policyService: InternalPolicyService,\n    private apiService: ApiService,\n  ) {}\n\n  async getPolicy(organizationId: string, type: PolicyType): Promise<PolicyResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/policies/\" + type,\n      null,\n      true,\n      true,\n    );\n    return new PolicyResponse(r);\n  }\n\n  async getPolicies(organizationId: string): Promise<ListResponse<PolicyResponse>> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/policies\",\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, PolicyResponse);\n  }\n\n  async getPoliciesByToken(\n    organizationId: string,\n    token: string,\n    email: string,\n    organizationUserId: string,\n  ): Promise<Policy[] | undefined> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" +\n        organizationId +\n        \"/policies/token?\" +\n        \"token=\" +\n        encodeURIComponent(token) +\n        \"&email=\" +\n        Utils.encodeRFC3986URIComponent(email) +\n        \"&organizationUserId=\" +\n        organizationUserId,\n      null,\n      false,\n      true,\n    );\n    return Policy.fromListResponse(new ListResponse(r, PolicyResponse));\n  }\n\n  private async getMasterPasswordPolicyResponseForOrgUser(\n    organizationId: string,\n  ): Promise<PolicyResponse> {\n    const response = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/policies/master-password\",\n      null,\n      true,\n      true,\n    );\n\n    return new PolicyResponse(response);\n  }\n\n  async getMasterPasswordPolicyOptsForOrgUser(\n    orgId: string,\n  ): Promise<MasterPasswordPolicyOptions | null> {\n    try {\n      const masterPasswordPolicyResponse =\n        await this.getMasterPasswordPolicyResponseForOrgUser(orgId);\n\n      const masterPasswordPolicy = Policy.fromResponse(masterPasswordPolicyResponse);\n\n      if (!masterPasswordPolicy) {\n        return null;\n      }\n\n      return await firstValueFrom(\n        this.policyService.masterPasswordPolicyOptions$([masterPasswordPolicy]),\n      );\n    } catch (error) {\n      // If policy not found, return null\n      if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n        return null;\n      }\n      // otherwise rethrow error\n      throw error;\n    }\n  }\n\n  async putPolicy(organizationId: string, type: PolicyType, request: PolicyRequest): Promise<any> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/policies/\" + type,\n      request,\n      true,\n      true,\n    );\n    const response = new PolicyResponse(r);\n    const data = new PolicyData(response);\n    await this.policyService.upsert(data);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport {\n  BiometricsService,\n  BiometricsStatus,\n  KdfConfigService,\n  KeyService,\n} from \"@bitwarden/key-management\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { PinServiceAbstraction } from \"../../../../../auth/src/common/abstractions/pin.service.abstraction\";\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { HashPurpose } from \"../../../platform/enums\";\nimport { UserId } from \"../../../types/guid\";\nimport { AccountService } from \"../../abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"../../abstractions/master-password.service.abstraction\";\nimport { UserVerificationApiServiceAbstraction } from \"../../abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { UserVerificationService as UserVerificationServiceAbstraction } from \"../../abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"../../enums/verification-type\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\nimport { UserVerificationOptions } from \"../../types/user-verification-options\";\nimport {\n  MasterPasswordVerification,\n  MasterPasswordVerificationResponse,\n  OtpVerification,\n  PinVerification,\n  ServerSideVerification,\n  Verification,\n  VerificationWithSecret,\n  verificationHasSecret,\n} from \"../../types/verification\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Use it to verify the input collected by UserVerificationComponent.\n */\nexport class UserVerificationService implements UserVerificationServiceAbstraction {\n  constructor(\n    private keyService: KeyService,\n    private accountService: AccountService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private i18nService: I18nService,\n    private userVerificationApiService: UserVerificationApiServiceAbstraction,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private pinService: PinServiceAbstraction,\n    private kdfConfigService: KdfConfigService,\n    private biometricsService: BiometricsService,\n  ) {}\n\n  async getAvailableVerificationOptions(\n    verificationType: keyof UserVerificationOptions,\n  ): Promise<UserVerificationOptions> {\n    const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    if (verificationType === \"client\") {\n      const [userHasMasterPassword, isPinDecryptionAvailable, biometricsStatus] = await Promise.all(\n        [\n          this.hasMasterPasswordAndMasterKeyHash(userId),\n          this.pinService.isPinDecryptionAvailable(userId),\n          this.biometricsService.getBiometricsStatus(),\n        ],\n      );\n\n      // note: we do not need to check this.platformUtilsService.supportsBiometric() because\n      // we can just use the logic below which works for both desktop & the browser extension.\n\n      return {\n        client: {\n          masterPassword: userHasMasterPassword,\n          pin: isPinDecryptionAvailable,\n          biometrics: biometricsStatus === BiometricsStatus.Available,\n        },\n        server: {\n          masterPassword: false,\n          otp: false,\n        },\n      };\n    } else {\n      // server\n      // Don't check if have MP hash locally, because we are going to send the secret to the server to be verified.\n      const userHasMasterPassword = await this.hasMasterPassword(userId);\n\n      return {\n        client: {\n          masterPassword: false,\n          pin: false,\n          biometrics: false,\n        },\n        server: { masterPassword: userHasMasterPassword, otp: !userHasMasterPassword },\n      };\n    }\n  }\n\n  async buildRequest<T extends SecretVerificationRequest>(\n    verification: ServerSideVerification,\n    requestClass?: new () => T,\n    alreadyHashed?: boolean,\n  ) {\n    this.validateSecretInput(verification);\n\n    const request =\n      requestClass != null ? new requestClass() : (new SecretVerificationRequest() as T);\n\n    if (verification.type === VerificationType.OTP) {\n      request.otp = verification.secret;\n    } else {\n      const [userId, email] = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n      );\n      let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n      if (!masterKey && !alreadyHashed) {\n        masterKey = await this.keyService.makeMasterKey(\n          verification.secret,\n          email,\n          await this.kdfConfigService.getKdfConfig(),\n        );\n      }\n      request.masterPasswordHash = alreadyHashed\n        ? verification.secret\n        : await this.keyService.hashMasterKey(verification.secret, masterKey);\n    }\n\n    return request;\n  }\n\n  async verifyUser(verification: Verification): Promise<boolean> {\n    if (verification == null) {\n      throw new Error(\"Verification is required.\");\n    }\n\n    const [userId, email] = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => [a?.id, a?.email])),\n    );\n\n    if (verificationHasSecret(verification)) {\n      this.validateSecretInput(verification);\n    }\n\n    switch (verification.type) {\n      case VerificationType.OTP:\n        return this.verifyUserByOTP(verification);\n      case VerificationType.MasterPassword:\n        await this.verifyUserByMasterPassword(verification, userId, email);\n        return true;\n      case VerificationType.PIN:\n        return this.verifyUserByPIN(verification, userId);\n      case VerificationType.Biometrics:\n        return this.verifyUserByBiometrics();\n      default: {\n        // Compile-time check for exhaustive switch\n        const _exhaustiveCheck: never = verification;\n        return _exhaustiveCheck;\n      }\n    }\n  }\n\n  private async verifyUserByOTP(verification: OtpVerification): Promise<boolean> {\n    const request = new VerifyOTPRequest(verification.secret);\n    try {\n      await this.userVerificationApiService.postAccountVerifyOTP(request);\n    } catch (e) {\n      throw new Error(this.i18nService.t(\"invalidVerificationCode\"));\n    }\n    return true;\n  }\n\n  async verifyUserByMasterPassword(\n    verification: MasterPasswordVerification,\n    userId: UserId,\n    email: string,\n  ): Promise<MasterPasswordVerificationResponse> {\n    if (!verification.secret) {\n      throw new Error(\"Master Password is required. Cannot verify user without a master password.\");\n    }\n    if (!userId) {\n      throw new Error(\"User ID is required. Cannot verify user by master password.\");\n    }\n    if (!email) {\n      throw new Error(\"Email is required. Cannot verify user by master password.\");\n    }\n\n    const kdfConfig = await this.kdfConfigService.getKdfConfig();\n    if (!kdfConfig) {\n      throw new Error(\"KDF config is required. Cannot verify user by master password.\");\n    }\n\n    let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    if (!masterKey) {\n      masterKey = await this.keyService.makeMasterKey(verification.secret, email, kdfConfig);\n    }\n\n    if (!masterKey) {\n      throw new Error(\"Master key could not be created to verify the master password.\");\n    }\n\n    let policyOptions: MasterPasswordPolicyResponse | null;\n    // Client-side verification\n    if (await this.hasMasterPasswordAndMasterKeyHash(userId)) {\n      const passwordValid = await this.keyService.compareKeyHash(\n        verification.secret,\n        masterKey,\n        userId,\n      );\n      if (!passwordValid) {\n        throw new Error(this.i18nService.t(\"invalidMasterPassword\"));\n      }\n      policyOptions = null;\n    } else {\n      // Server-side verification\n      const request = new SecretVerificationRequest();\n      const serverKeyHash = await this.keyService.hashMasterKey(\n        verification.secret,\n        masterKey,\n        HashPurpose.ServerAuthorization,\n      );\n      request.masterPasswordHash = serverKeyHash;\n      try {\n        policyOptions = await this.userVerificationApiService.postAccountVerifyPassword(request);\n      } catch (e) {\n        throw new Error(this.i18nService.t(\"invalidMasterPassword\"));\n      }\n    }\n\n    const localKeyHash = await this.keyService.hashMasterKey(\n      verification.secret,\n      masterKey,\n      HashPurpose.LocalAuthorization,\n    );\n    await this.masterPasswordService.setMasterKeyHash(localKeyHash, userId);\n    await this.masterPasswordService.setMasterKey(masterKey, userId);\n    return { policyOptions, masterKey };\n  }\n\n  private async verifyUserByPIN(verification: PinVerification, userId: UserId): Promise<boolean> {\n    if (!userId) {\n      throw new Error(\"User ID is required. Cannot verify user by PIN.\");\n    }\n\n    const userKey = await this.pinService.decryptUserKeyWithPin(verification.secret, userId);\n\n    return userKey != null;\n  }\n\n  private async verifyUserByBiometrics(): Promise<boolean> {\n    return this.biometricsService.authenticateWithBiometrics();\n  }\n\n  async requestOTP() {\n    await this.userVerificationApiService.postAccountRequestOTP();\n  }\n\n  async hasMasterPassword(userId?: string): Promise<boolean> {\n    if (userId) {\n      const decryptionOptions = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptionsById$(userId),\n      );\n\n      if (decryptionOptions?.hasMasterPassword != undefined) {\n        return decryptionOptions.hasMasterPassword;\n      }\n    }\n    return await firstValueFrom(this.userDecryptionOptionsService.hasMasterPassword$);\n  }\n\n  async hasMasterPasswordAndMasterKeyHash(userId?: string): Promise<boolean> {\n    userId ??= (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    return (\n      (await this.hasMasterPassword(userId)) &&\n      (await firstValueFrom(this.masterPasswordService.masterKeyHash$(userId as UserId))) != null\n    );\n  }\n\n  private validateSecretInput(verification: VerificationWithSecret) {\n    if (verification?.secret == null || verification.secret === \"\") {\n      switch (verification.type) {\n        case VerificationType.OTP:\n          throw new Error(this.i18nService.t(\"verificationCodeRequired\"));\n        case VerificationType.MasterPassword:\n          throw new Error(this.i18nService.t(\"masterPasswordRequired\"));\n        case VerificationType.PIN:\n          throw new Error(this.i18nService.t(\"pinRequired\"));\n      }\n    }\n  }\n}\n","import { MasterKey } from \"../../types/key\";\nimport { VerificationType } from \"../enums/verification-type\";\nimport { MasterPasswordPolicyResponse } from \"../models/response/master-password-policy.response\";\n\nexport type OtpVerification = { type: VerificationType.OTP; secret: string };\nexport type MasterPasswordVerification = { type: VerificationType.MasterPassword; secret: string };\nexport type PinVerification = { type: VerificationType.PIN; secret: string };\nexport type BiometricsVerification = { type: VerificationType.Biometrics };\n\nexport type VerificationWithSecret = OtpVerification | MasterPasswordVerification | PinVerification;\nexport type VerificationWithoutSecret = BiometricsVerification;\n\nexport type Verification = VerificationWithSecret | VerificationWithoutSecret;\n\nexport function verificationHasSecret(\n  verification: Verification,\n): verification is VerificationWithSecret {\n  return \"secret\" in verification;\n}\n\nexport type ServerSideVerification = OtpVerification | MasterPasswordVerification;\n\nexport type MasterPasswordVerificationResponse = {\n  masterKey: MasterKey;\n  policyOptions: MasterPasswordPolicyResponse;\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordEnrollmentRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { OrganizationApiServiceAbstraction } from \"../../admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { UserKey } from \"../../types/key\";\nimport { AccountService } from \"../abstractions/account.service\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"../abstractions/password-reset-enrollment.service.abstraction\";\n\nexport class PasswordResetEnrollmentServiceImplementation\n  implements PasswordResetEnrollmentServiceAbstraction\n{\n  constructor(\n    protected organizationApiService: OrganizationApiServiceAbstraction,\n    protected accountService: AccountService,\n    protected keyService: KeyService,\n    protected encryptService: EncryptService,\n    protected organizationUserApiService: OrganizationUserApiService,\n    protected i18nService: I18nService,\n  ) {}\n\n  async enrollIfRequired(organizationSsoIdentifier: string): Promise<void> {\n    const orgAutoEnrollStatusResponse =\n      await this.organizationApiService.getAutoEnrollStatus(organizationSsoIdentifier);\n\n    if (!orgAutoEnrollStatusResponse.resetPasswordEnabled) {\n      await this.enroll(orgAutoEnrollStatusResponse.id, null, null);\n    }\n  }\n\n  async enroll(organizationId: string): Promise<void>;\n  async enroll(organizationId: string, userId: string, userKey: UserKey): Promise<void>;\n  async enroll(organizationId: string, userId?: string, userKey?: UserKey): Promise<void> {\n    const orgKeyResponse = await this.organizationApiService.getKeys(organizationId);\n    if (orgKeyResponse == null) {\n      throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n    }\n\n    const orgPublicKey = Utils.fromB64ToArray(orgKeyResponse.publicKey);\n\n    userId =\n      userId ?? (await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id))));\n    userKey = userKey ?? (await this.keyService.getUserKey(userId));\n    // RSA Encrypt user's userKey.key with organization public key\n    const encryptedKey = await this.encryptService.rsaEncrypt(userKey.key, orgPublicKey);\n\n    const resetRequest = new OrganizationUserResetPasswordEnrollmentRequest();\n    resetRequest.resetPasswordKey = encryptedKey.encryptedString;\n\n    await this.organizationUserApiService.putOrganizationUserResetPasswordEnrollment(\n      organizationId,\n      userId,\n      resetRequest,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UntypedFormGroup, ValidationErrors } from \"@angular/forms\";\n\nimport {\n  FormGroupControls,\n  FormValidationErrorsService as FormValidationErrorsAbstraction,\n  AllValidationErrors,\n} from \"../abstractions/form-validation-errors.service\";\n\nexport class FormValidationErrorsService implements FormValidationErrorsAbstraction {\n  getFormValidationErrors(controls: FormGroupControls): AllValidationErrors[] {\n    let errors: AllValidationErrors[] = [];\n    Object.keys(controls).forEach((key) => {\n      const control = controls[key];\n      if (control instanceof UntypedFormGroup) {\n        errors = errors.concat(this.getFormValidationErrors(control.controls));\n      }\n\n      const controlErrors: ValidationErrors = controls[key].errors;\n      if (controlErrors !== null) {\n        Object.keys(controlErrors).forEach((keyError) => {\n          errors.push({\n            controlName: key,\n            errorName: keyError,\n          });\n        });\n      }\n    });\n\n    return errors;\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { UserVerificationApiServiceAbstraction } from \"../../abstractions/user-verification/user-verification-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { VerifyOTPRequest } from \"../../models/request/verify-otp.request\";\nimport { MasterPasswordPolicyResponse } from \"../../models/response/master-password-policy.response\";\n\nexport class UserVerificationApiService implements UserVerificationApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  postAccountVerifyOTP(request: VerifyOTPRequest): Promise<void> {\n    return this.apiService.send(\"POST\", \"/accounts/verify-otp\", request, true, false);\n  }\n  async postAccountRequestOTP(): Promise<void> {\n    return this.apiService.send(\"POST\", \"/accounts/request-otp\", null, true, false);\n  }\n  postAccountVerifyPassword(\n    request: SecretVerificationRequest,\n  ): Promise<MasterPasswordPolicyResponse> {\n    return this.apiService.send(\"POST\", \"/accounts/verify-password\", request, true, true);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BillingHistoryResponse } from \"@bitwarden/common/billing/models/response/billing-history.response\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { OrganizationApiKeyRequest } from \"../../../admin-console/models/request/organization-api-key.request\";\nimport { OrganizationSsoRequest } from \"../../../auth/models/request/organization-sso.request\";\nimport { SecretVerificationRequest } from \"../../../auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"../../../auth/models/response/api-key.response\";\nimport { OrganizationSsoResponse } from \"../../../auth/models/response/organization-sso.response\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../../billing/models/request/expanded-tax-info-update.request\";\nimport { OrganizationNoPaymentMethodCreateRequest } from \"../../../billing/models/request/organization-no-payment-method-create-request\";\nimport { OrganizationSmSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-sm-subscription-update.request\";\nimport { OrganizationSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-subscription-update.request\";\nimport { PaymentRequest } from \"../../../billing/models/request/payment.request\";\nimport { SecretsManagerSubscribeRequest } from \"../../../billing/models/request/sm-subscribe.request\";\nimport { BillingResponse } from \"../../../billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"../../../billing/models/response/organization-subscription.response\";\nimport { PaymentResponse } from \"../../../billing/models/response/payment.response\";\nimport { TaxInfoResponse } from \"../../../billing/models/response/tax-info.response\";\nimport { ImportDirectoryRequest } from \"../../../models/request/import-directory.request\";\nimport { SeatRequest } from \"../../../models/request/seat.request\";\nimport { StorageRequest } from \"../../../models/request/storage.request\";\nimport { VerifyBankRequest } from \"../../../models/request/verify-bank.request\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { SyncService } from \"../../../vault/abstractions/sync/sync.service.abstraction\";\nimport { OrganizationApiServiceAbstraction } from \"../../abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationApiKeyType } from \"../../enums\";\nimport { OrganizationCollectionManagementUpdateRequest } from \"../../models/request/organization-collection-management-update.request\";\nimport { OrganizationCreateRequest } from \"../../models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../models/request/organization-keys.request\";\nimport { OrganizationUpdateRequest } from \"../../models/request/organization-update.request\";\nimport { OrganizationUpgradeRequest } from \"../../models/request/organization-upgrade.request\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"../../models/request/organization-verify-delete-recover.request\";\nimport { OrganizationApiKeyInformationResponse } from \"../../models/response/organization-api-key-information.response\";\nimport { OrganizationAutoEnrollStatusResponse } from \"../../models/response/organization-auto-enroll-status.response\";\nimport { OrganizationKeysResponse } from \"../../models/response/organization-keys.response\";\nimport { OrganizationResponse } from \"../../models/response/organization.response\";\nimport { ProfileOrganizationResponse } from \"../../models/response/profile-organization.response\";\n\nexport class OrganizationApiService implements OrganizationApiServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private syncService: SyncService,\n  ) {}\n\n  async get(id: string): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\"GET\", \"/organizations/\" + id, null, true, true);\n    return new OrganizationResponse(r);\n  }\n\n  async getBilling(id: string): Promise<BillingResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + id + \"/billing\",\n      null,\n      true,\n      true,\n    );\n    return new BillingResponse(r);\n  }\n\n  async getBillingHistory(id: string): Promise<BillingHistoryResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + id + \"/billing/history\",\n      null,\n      true,\n      true,\n    );\n    return new BillingHistoryResponse(r);\n  }\n\n  async getSubscription(id: string): Promise<OrganizationSubscriptionResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + id + \"/subscription\",\n      null,\n      true,\n      true,\n    );\n    return new OrganizationSubscriptionResponse(r);\n  }\n\n  async getLicense(id: string, installationId: string): Promise<unknown> {\n    return this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + id + \"/license?installationId=\" + installationId,\n      null,\n      true,\n      true,\n    );\n  }\n\n  async getAutoEnrollStatus(identifier: string): Promise<OrganizationAutoEnrollStatusResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + identifier + \"/auto-enroll-status\",\n      null,\n      true,\n      true,\n    );\n    return new OrganizationAutoEnrollStatusResponse(r);\n  }\n\n  async create(request: OrganizationCreateRequest): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\"POST\", \"/organizations\", request, true, true);\n    // Forcing a sync will notify organization service that they need to repull\n    await this.syncService.fullSync(true);\n    return new OrganizationResponse(r);\n  }\n\n  async createWithoutPayment(\n    request: OrganizationNoPaymentMethodCreateRequest,\n  ): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/create-without-payment\",\n      request,\n      true,\n      true,\n    );\n    // Forcing a sync will notify organization service that they need to repull\n    await this.syncService.fullSync(true);\n    return new OrganizationResponse(r);\n  }\n\n  async createLicense(data: FormData): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/licenses/self-hosted\",\n      data,\n      true,\n      true,\n    );\n    return new OrganizationResponse(r);\n  }\n\n  async save(id: string, request: OrganizationUpdateRequest): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\"PUT\", \"/organizations/\" + id, request, true, true);\n    const data = new OrganizationResponse(r);\n    await this.syncService.fullSync(true);\n    return data;\n  }\n\n  async updatePayment(id: string, request: PaymentRequest): Promise<void> {\n    return this.apiService.send(\"POST\", \"/organizations/\" + id + \"/payment\", request, true, false);\n  }\n\n  async upgrade(id: string, request: OrganizationUpgradeRequest): Promise<PaymentResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/upgrade\",\n      request,\n      true,\n      true,\n    );\n    return new PaymentResponse(r);\n  }\n\n  async updatePasswordManagerSeats(\n    id: string,\n    request: OrganizationSubscriptionUpdateRequest,\n  ): Promise<ProfileOrganizationResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/subscription\",\n      request,\n      true,\n      true,\n    );\n    return new ProfileOrganizationResponse(r);\n  }\n\n  async updateSecretsManagerSubscription(\n    id: string,\n    request: OrganizationSmSubscriptionUpdateRequest,\n  ): Promise<ProfileOrganizationResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/sm-subscription\",\n      request,\n      true,\n      true,\n    );\n    return new ProfileOrganizationResponse(r);\n  }\n\n  async updateSeats(id: string, request: SeatRequest): Promise<PaymentResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/seat\",\n      request,\n      true,\n      true,\n    );\n    return new PaymentResponse(r);\n  }\n\n  async updateStorage(id: string, request: StorageRequest): Promise<PaymentResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/storage\",\n      request,\n      true,\n      true,\n    );\n    return new PaymentResponse(r);\n  }\n\n  async verifyBank(id: string, request: VerifyBankRequest): Promise<void> {\n    await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/verify-bank\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async reinstate(id: string): Promise<void> {\n    return this.apiService.send(\"POST\", \"/organizations/\" + id + \"/reinstate\", null, true, false);\n  }\n\n  async leave(id: string): Promise<void> {\n    await this.apiService.send(\"POST\", \"/organizations/\" + id + \"/leave\", null, true, false);\n    await this.syncService.fullSync(true);\n  }\n\n  async delete(id: string, request: SecretVerificationRequest): Promise<void> {\n    await this.apiService.send(\"DELETE\", \"/organizations/\" + id, request, true, false);\n    await this.syncService.fullSync(true);\n  }\n\n  deleteUsingToken(\n    organizationId: string,\n    request: OrganizationVerifyDeleteRecoverRequest,\n  ): Promise<any> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/delete-recover-token\",\n      request,\n      false,\n      false,\n    );\n  }\n\n  async updateLicense(id: string, data: FormData): Promise<void> {\n    await this.apiService.send(\n      \"POST\",\n      \"/organizations/licenses/self-hosted/\" + id,\n      data,\n      true,\n      false,\n    );\n  }\n\n  async importDirectory(organizationId: string, request: ImportDirectoryRequest): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/import\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async getOrCreateApiKey(id: string, request: OrganizationApiKeyRequest): Promise<ApiKeyResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/api-key\",\n      request,\n      true,\n      true,\n    );\n    return new ApiKeyResponse(r);\n  }\n\n  async getApiKeyInformation(\n    id: string,\n    organizationApiKeyType: OrganizationApiKeyType = null,\n  ): Promise<ListResponse<OrganizationApiKeyInformationResponse>> {\n    const uri =\n      organizationApiKeyType === null\n        ? \"/organizations/\" + id + \"/api-key-information\"\n        : \"/organizations/\" + id + \"/api-key-information/\" + organizationApiKeyType;\n    const r = await this.apiService.send(\"GET\", uri, null, true, true);\n    return new ListResponse(r, OrganizationApiKeyInformationResponse);\n  }\n\n  async rotateApiKey(id: string, request: OrganizationApiKeyRequest): Promise<ApiKeyResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/rotate-api-key\",\n      request,\n      true,\n      true,\n    );\n    return new ApiKeyResponse(r);\n  }\n\n  async getTaxInfo(id: string): Promise<TaxInfoResponse> {\n    const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/tax\", null, true, true);\n    return new TaxInfoResponse(r);\n  }\n\n  async updateTaxInfo(id: string, request: ExpandedTaxInfoUpdateRequest): Promise<void> {\n    // Can't broadcast anything because the response doesn't have content\n    return this.apiService.send(\"PUT\", \"/organizations/\" + id + \"/tax\", request, true, false);\n  }\n\n  async getKeys(id: string): Promise<OrganizationKeysResponse> {\n    const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/keys\", null, true, true);\n    return new OrganizationKeysResponse(r);\n  }\n\n  async updateKeys(\n    id: string,\n    request: OrganizationKeysRequest,\n  ): Promise<OrganizationKeysResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/keys\",\n      request,\n      true,\n      true,\n    );\n    // Not broadcasting anything because data on this response doesn't correspond to `Organization`\n    return new OrganizationKeysResponse(r);\n  }\n\n  async getSso(id: string): Promise<OrganizationSsoResponse> {\n    const r = await this.apiService.send(\"GET\", \"/organizations/\" + id + \"/sso\", null, true, true);\n    return new OrganizationSsoResponse(r);\n  }\n\n  async updateSso(id: string, request: OrganizationSsoRequest): Promise<OrganizationSsoResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/sso\",\n      request,\n      true,\n      true,\n    );\n    // Not broadcasting anything because data on this response doesn't correspond to `Organization`\n    return new OrganizationSsoResponse(r);\n  }\n\n  async selfHostedSyncLicense(id: string) {\n    await this.apiService.send(\n      \"POST\",\n      \"/organizations/licenses/self-hosted/\" + id + \"/sync/\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async subscribeToSecretsManager(\n    id: string,\n    request: SecretsManagerSubscribeRequest,\n  ): Promise<ProfileOrganizationResponse> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + id + \"/subscribe-secrets-manager\",\n      request,\n      true,\n      true,\n    );\n    return new ProfileOrganizationResponse(r);\n  }\n\n  async updateCollectionManagement(\n    id: string,\n    request: OrganizationCollectionManagementUpdateRequest,\n  ): Promise<OrganizationResponse> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + id + \"/collection-management\",\n      request,\n      true,\n      true,\n    );\n    const data = new OrganizationResponse(r);\n    await this.syncService.fullSync(true);\n    return data;\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { OrganizationBillingApiServiceAbstraction } from \"../../abstractions/organizations/organization-billing-api.service.abstraction\";\nimport {\n  BillingInvoiceResponse,\n  BillingTransactionResponse,\n} from \"../../models/response/billing.response\";\n\nexport class OrganizationBillingApiService implements OrganizationBillingApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  async getBillingInvoices(\n    id: string,\n    status?: string,\n    startAfter?: string,\n  ): Promise<BillingInvoiceResponse[]> {\n    const params = new URLSearchParams();\n\n    if (status) {\n      params.append(\"status\", status);\n    }\n\n    if (startAfter) {\n      params.append(\"startAfter\", startAfter);\n    }\n\n    const queryString = `?${params.toString()}`;\n\n    const r = await this.apiService.send(\n      \"GET\",\n      `/organizations/${id}/billing/invoices${queryString}`,\n      null,\n      true,\n      true,\n    );\n    return r?.map((i: any) => new BillingInvoiceResponse(i)) || [];\n  }\n\n  async getBillingTransactions(\n    id: string,\n    startAfter?: string,\n  ): Promise<BillingTransactionResponse[]> {\n    const queryParams = startAfter ? `?startAfter=${startAfter}` : \"\";\n    const r = await this.apiService.send(\n      \"GET\",\n      `/organizations/${id}/billing/transactions${queryParams}`,\n      null,\n      true,\n      true,\n    );\n    return r?.map((i: any) => new BillingTransactionResponse(i)) || [];\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { AccountBillingApiServiceAbstraction } from \"../../abstractions/account/account-billing-api.service.abstraction\";\nimport {\n  BillingInvoiceResponse,\n  BillingTransactionResponse,\n} from \"../../models/response/billing.response\";\n\nexport class AccountBillingApiService implements AccountBillingApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  async getBillingInvoices(\n    status?: string,\n    startAfter?: string,\n  ): Promise<BillingInvoiceResponse[]> {\n    const params = new URLSearchParams();\n\n    if (status) {\n      params.append(\"status\", status);\n    }\n\n    if (startAfter) {\n      params.append(\"startAfter\", startAfter);\n    }\n\n    const queryString = `?${params.toString()}`;\n\n    const r = await this.apiService.send(\n      \"GET\",\n      `/accounts/billing/invoices${queryString}`,\n      null,\n      true,\n      true,\n    );\n    return r?.map((i: any) => new BillingInvoiceResponse(i)) || [];\n  }\n\n  async getBillingTransactions(startAfter?: string): Promise<BillingTransactionResponse[]> {\n    const queryParams = startAfter ? `?startAfter=${startAfter}` : \"\";\n    const r = await this.apiService.send(\n      \"GET\",\n      `/accounts/billing/transactions${queryParams}`,\n      null,\n      true,\n      true,\n    );\n    return r?.map((i: any) => new BillingTransactionResponse(i)) || [];\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { TokenService } from \"../../../auth/abstractions/token.service\";\nimport { UserId } from \"../../../types/guid\";\nimport { ConfigApiServiceAbstraction } from \"../../abstractions/config/config-api.service.abstraction\";\nimport { ServerConfigResponse } from \"../../models/response/server-config.response\";\n\nexport class ConfigApiService implements ConfigApiServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private tokenService: TokenService,\n  ) {}\n\n  async get(userId: UserId | undefined): Promise<ServerConfigResponse> {\n    // Authentication adds extra context to config responses, if the user has an access token, we want to use it\n    // We don't particularly care about ensuring the token is valid and not expired, just that it exists\n    const authed: boolean =\n      userId == null ? false : (await this.tokenService.getAccessToken(userId)) != null;\n\n    const r = await this.apiService.send(\"GET\", \"/config\", null, authed, true);\n    return new ServerConfigResponse(r);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  HttpTransportType,\n  HubConnection,\n  HubConnectionBuilder,\n  IHubProtocol,\n} from \"@microsoft/signalr\";\nimport { MessagePackHubProtocol } from \"@microsoft/signalr-protocol-msgpack\";\nimport { firstValueFrom } from \"rxjs\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { AuthRequestServiceAbstraction } from \"../../../../auth/src/common/abstractions\";\nimport { NotificationType } from \"../../enums\";\nimport {\n  AuthRequestPushNotification,\n  NotificationResponse,\n} from \"../../models/response/notification.response\";\nimport { EnvironmentService } from \"../../platform/abstractions/environment.service\";\nimport { AnonymousHubService as AnonymousHubServiceAbstraction } from \"../abstractions/anonymous-hub.service\";\n\nexport class AnonymousHubService implements AnonymousHubServiceAbstraction {\n  private anonHubConnection: HubConnection;\n  private url: string;\n\n  constructor(\n    private environmentService: EnvironmentService,\n    private authRequestService: AuthRequestServiceAbstraction,\n  ) {}\n\n  async createHubConnection(token: string) {\n    this.url = (await firstValueFrom(this.environmentService.environment$)).getNotificationsUrl();\n\n    this.anonHubConnection = new HubConnectionBuilder()\n      .withUrl(this.url + \"/anonymous-hub?Token=\" + token, {\n        skipNegotiation: true,\n        transport: HttpTransportType.WebSockets,\n      })\n      .withHubProtocol(new MessagePackHubProtocol() as IHubProtocol)\n      .build();\n\n    await this.anonHubConnection.start();\n\n    this.anonHubConnection.on(\"AuthRequestResponseRecieved\", (data: any) => {\n      this.ProcessNotification(new NotificationResponse(data));\n    });\n  }\n\n  async stopHubConnection() {\n    if (this.anonHubConnection) {\n      await this.anonHubConnection.stop();\n    }\n  }\n\n  private ProcessNotification(notification: NotificationResponse) {\n    switch (notification.type) {\n      case NotificationType.AuthRequestResponse:\n        this.authRequestService.sendAuthRequestPushNotification(\n          notification.payload as AuthRequestPushNotification,\n        );\n    }\n  }\n}\n","import { ErrorResponse } from \"../../models/response/error.response\";\nimport { I18nService } from \"../abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../abstractions/platform-utils.service\";\nimport { ValidationService as ValidationServiceAbstraction } from \"../abstractions/validation.service\";\n\nexport class ValidationService implements ValidationServiceAbstraction {\n  constructor(\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n  ) {}\n\n  showError(data: any): string[] {\n    const defaultErrorMessage = this.i18nService.t(\"unexpectedError\");\n    let errors: string[] = [];\n\n    if (data != null && typeof data === \"string\") {\n      errors.push(data);\n    } else if (data == null || typeof data !== \"object\") {\n      errors.push(defaultErrorMessage);\n    } else if (data.validationErrors != null) {\n      errors = errors.concat((data as ErrorResponse).getAllMessages());\n    } else {\n      errors.push(data.message ? data.message : defaultErrorMessage);\n    }\n\n    if (errors.length === 1) {\n      this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errors[0]);\n    } else if (errors.length > 1) {\n      this.platformUtilsService.showToast(\"error\", this.i18nService.t(\"errorOccurred\"), errors, {\n        timeout: 5000 * errors.length,\n      });\n    }\n\n    return errors;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BehaviorSubject } from \"rxjs\";\n\nimport { I18nService } from \"../../../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../../../platform/abstractions/platform-utils.service\";\nimport { OrgDomainInternalServiceAbstraction } from \"../../abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainResponse } from \"../../abstractions/organization-domain/responses/organization-domain.response\";\n\nexport class OrgDomainService implements OrgDomainInternalServiceAbstraction {\n  protected _orgDomains$: BehaviorSubject<OrganizationDomainResponse[]> = new BehaviorSubject([]);\n\n  orgDomains$ = this._orgDomains$.asObservable();\n\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n  ) {}\n\n  get(orgDomainId: string): OrganizationDomainResponse {\n    const orgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n    return orgDomains.find((orgDomain) => orgDomain.id === orgDomainId);\n  }\n\n  copyDnsTxt(dnsTxt: string): void {\n    this.platformUtilsService.copyToClipboard(dnsTxt);\n  }\n\n  upsert(orgDomains: OrganizationDomainResponse[]): void {\n    const existingOrgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n    orgDomains.forEach((orgDomain: OrganizationDomainResponse) => {\n      // Determine if passed in orgDomain exists in existing array:\n      const index = existingOrgDomains.findIndex(\n        (existingOrgDomain) => existingOrgDomain.id === orgDomain.id,\n      );\n      if (index !== -1) {\n        existingOrgDomains[index] = orgDomain;\n      } else {\n        existingOrgDomains.push(orgDomain);\n      }\n    });\n\n    this._orgDomains$.next(existingOrgDomains);\n  }\n\n  replace(orgDomains: OrganizationDomainResponse[]): void {\n    this._orgDomains$.next(orgDomains);\n  }\n\n  clearCache(): void {\n    this._orgDomains$.next([]);\n  }\n\n  delete(orgDomainIds: string[]): void {\n    const existingOrgDomains: OrganizationDomainResponse[] = this._orgDomains$.getValue();\n\n    orgDomainIds.forEach((orgDomainId: string) => {\n      const index = existingOrgDomains.findIndex(\n        (existingOrgDomain) => existingOrgDomain.id === orgDomainId,\n      );\n      if (index !== -1) {\n        existingOrgDomains.splice(index, 1);\n      }\n    });\n\n    this._orgDomains$.next(existingOrgDomains);\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { OrgDomainApiServiceAbstraction } from \"../../abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrgDomainInternalServiceAbstraction } from \"../../abstractions/organization-domain/org-domain.service.abstraction\";\nimport { OrganizationDomainSsoDetailsResponse } from \"../../abstractions/organization-domain/responses/organization-domain-sso-details.response\";\nimport { OrganizationDomainResponse } from \"../../abstractions/organization-domain/responses/organization-domain.response\";\nimport { VerifiedOrganizationDomainSsoDetailsResponse } from \"../../abstractions/organization-domain/responses/verified-organization-domain-sso-details.response\";\n\nimport { OrganizationDomainSsoDetailsRequest } from \"./requests/organization-domain-sso-details.request\";\nimport { OrganizationDomainRequest } from \"./requests/organization-domain.request\";\n\nexport class OrgDomainApiService implements OrgDomainApiServiceAbstraction {\n  constructor(\n    private orgDomainService: OrgDomainInternalServiceAbstraction,\n    private apiService: ApiService,\n  ) {}\n\n  async getAllByOrgId(orgId: string): Promise<Array<OrganizationDomainResponse>> {\n    const listResponse: ListResponse<any> = await this.apiService.send(\n      \"GET\",\n      `/organizations/${orgId}/domain`,\n      null,\n      true,\n      true,\n    );\n\n    const orgDomains = listResponse.data.map(\n      (resultOrgDomain: any) => new OrganizationDomainResponse(resultOrgDomain),\n    );\n\n    this.orgDomainService.replace(orgDomains);\n\n    return orgDomains;\n  }\n\n  async getByOrgIdAndOrgDomainId(\n    orgId: string,\n    orgDomainId: string,\n  ): Promise<OrganizationDomainResponse> {\n    const result = await this.apiService.send(\n      \"GET\",\n      `/organizations/${orgId}/domain/${orgDomainId}`,\n      null,\n      true,\n      true,\n    );\n\n    const response = new OrganizationDomainResponse(result);\n\n    this.orgDomainService.upsert([response]);\n\n    return response;\n  }\n\n  async post(\n    orgId: string,\n    orgDomainReq: OrganizationDomainRequest,\n  ): Promise<OrganizationDomainResponse> {\n    const result = await this.apiService.send(\n      \"POST\",\n      `/organizations/${orgId}/domain`,\n      orgDomainReq,\n      true,\n      true,\n    );\n\n    const response = new OrganizationDomainResponse(result);\n\n    this.orgDomainService.upsert([response]);\n\n    return response;\n  }\n\n  async verify(orgId: string, orgDomainId: string): Promise<OrganizationDomainResponse> {\n    const result = await this.apiService.send(\n      \"POST\",\n      `/organizations/${orgId}/domain/${orgDomainId}/verify`,\n      null,\n      true,\n      true,\n    );\n\n    const response = new OrganizationDomainResponse(result);\n\n    this.orgDomainService.upsert([response]);\n\n    return response;\n  }\n\n  async delete(orgId: string, orgDomainId: string): Promise<any> {\n    await this.apiService.send(\n      \"DELETE\",\n      `/organizations/${orgId}/domain/${orgDomainId}`,\n      null,\n      true,\n      false,\n    );\n    this.orgDomainService.delete([orgDomainId]);\n  }\n\n  async getClaimedOrgDomainByEmail(email: string): Promise<OrganizationDomainSsoDetailsResponse> {\n    const result = await this.apiService.send(\n      \"POST\",\n      `/organizations/domain/sso/details`,\n      new OrganizationDomainSsoDetailsRequest(email),\n      false, // anonymous\n      true,\n    );\n    const response = new OrganizationDomainSsoDetailsResponse(result);\n\n    return response;\n  }\n\n  async getVerifiedOrgDomainsByEmail(\n    email: string,\n  ): Promise<ListResponse<VerifiedOrganizationDomainSsoDetailsResponse>> {\n    const result = await this.apiService.send(\n      \"POST\",\n      `/organizations/domain/sso/verified`,\n      new OrganizationDomainSsoDetailsRequest(email),\n      false, // anonymous\n      true,\n    );\n\n    return new ListResponse(result, VerifiedOrganizationDomainSsoDetailsResponse);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { DevicesApiServiceAbstraction } from \"../abstractions/devices-api.service.abstraction\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport { UpdateDevicesTrustRequest } from \"../models/request/update-devices-trust.request\";\nimport { ProtectedDeviceResponse } from \"../models/response/protected-device.response\";\n\nimport { TrustedDeviceKeysRequest } from \"./devices/requests/trusted-device-keys.request\";\n\nexport class DevicesApiServiceImplementation implements DevicesApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  async getKnownDevice(email: string, deviceIdentifier: string): Promise<boolean> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/devices/knowndevice\",\n      null,\n      false,\n      true,\n      null,\n      (headers) => {\n        headers.set(\"X-Device-Identifier\", deviceIdentifier);\n        headers.set(\"X-Request-Email\", Utils.fromUtf8ToUrlB64(email));\n      },\n    );\n    return r as boolean;\n  }\n\n  /**\n   * Get device by identifier\n   * @param deviceIdentifier - client generated id (not device id in DB)\n   */\n  async getDeviceByIdentifier(deviceIdentifier: string): Promise<DeviceResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      `/devices/identifier/${deviceIdentifier}`,\n      null,\n      true,\n      true,\n    );\n    return new DeviceResponse(r);\n  }\n\n  async getDevices(): Promise<ListResponse<DeviceResponse>> {\n    const r = await this.apiService.send(\"GET\", \"/devices\", null, true, true, null);\n    return new ListResponse(r, DeviceResponse);\n  }\n\n  async updateTrustedDeviceKeys(\n    deviceIdentifier: string,\n    devicePublicKeyEncryptedUserKey: string,\n    userKeyEncryptedDevicePublicKey: string,\n    deviceKeyEncryptedDevicePrivateKey: string,\n  ): Promise<DeviceResponse> {\n    const request = new TrustedDeviceKeysRequest(\n      devicePublicKeyEncryptedUserKey,\n      userKeyEncryptedDevicePublicKey,\n      deviceKeyEncryptedDevicePrivateKey,\n    );\n\n    const result = await this.apiService.send(\n      \"PUT\",\n      `/devices/${deviceIdentifier}/keys`,\n      request,\n      true,\n      true,\n    );\n\n    return new DeviceResponse(result);\n  }\n\n  async updateTrust(\n    updateDevicesTrustRequestModel: UpdateDevicesTrustRequest,\n    deviceIdentifier: string,\n  ): Promise<void> {\n    await this.apiService.send(\n      \"POST\",\n      \"/devices/update-trust\",\n      updateDevicesTrustRequestModel,\n      true,\n      false,\n      null,\n      (headers) => {\n        headers.set(\"Device-Identifier\", deviceIdentifier);\n      },\n    );\n  }\n\n  async getDeviceKeys(\n    deviceIdentifier: string,\n    secretVerificationRequest: SecretVerificationRequest,\n  ): Promise<ProtectedDeviceResponse> {\n    const result = await this.apiService.send(\n      \"POST\",\n      `/devices/${deviceIdentifier}/retrieve-keys`,\n      secretVerificationRequest,\n      true,\n      true,\n    );\n    return new ProtectedDeviceResponse(result);\n  }\n\n  async postDeviceTrustLoss(deviceIdentifier: string): Promise<void> {\n    await this.apiService.send(\n      \"POST\",\n      \"/devices/lost-trust\",\n      null,\n      true,\n      false,\n      null,\n      (headers) => {\n        headers.set(\"Device-Identifier\", deviceIdentifier);\n      },\n    );\n  }\n\n  async deactivateDevice(deviceId: string): Promise<void> {\n    await this.apiService.send(\"POST\", `/devices/${deviceId}/deactivate`, null, true, false);\n  }\n}\n","import { Observable, defer, map } from \"rxjs\";\n\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\n\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { DevicesServiceAbstraction } from \"../../abstractions/devices/devices.service.abstraction\";\nimport { DeviceResponse } from \"../../abstractions/devices/responses/device.response\";\nimport { DeviceView } from \"../../abstractions/devices/views/device.view\";\nimport { DevicesApiServiceAbstraction } from \"../../abstractions/devices-api.service.abstraction\";\n\n/**\n * @class DevicesServiceImplementation\n * @implements {DevicesServiceAbstraction}\n * @description Observable based data store service for Devices.\n * note: defer is used to convert the promises to observables and to ensure\n * that observables are created for each subscription\n * (i.e., promsise --> observables are cold until subscribed to)\n */\nexport class DevicesServiceImplementation implements DevicesServiceAbstraction {\n  constructor(\n    private devicesApiService: DevicesApiServiceAbstraction,\n    private appIdService: AppIdService,\n  ) {}\n\n  /**\n   * @description Gets the list of all devices.\n   */\n  getDevices$(): Observable<Array<DeviceView>> {\n    return defer(() => this.devicesApiService.getDevices()).pipe(\n      map((deviceResponses: ListResponse<DeviceResponse>) => {\n        return deviceResponses.data.map((deviceResponse: DeviceResponse) => {\n          return new DeviceView(deviceResponse);\n        });\n      }),\n    );\n  }\n\n  /**\n   * @description Gets the device with the specified identifier.\n   */\n  getDeviceByIdentifier$(deviceIdentifier: string): Observable<DeviceView> {\n    return defer(() => this.devicesApiService.getDeviceByIdentifier(deviceIdentifier)).pipe(\n      map((deviceResponse: DeviceResponse) => new DeviceView(deviceResponse)),\n    );\n  }\n\n  /**\n   * @description Checks if a device is known for a user by user's email and device's identifier.\n   */\n  isDeviceKnownForUser$(email: string, deviceIdentifier: string): Observable<boolean> {\n    return defer(() => this.devicesApiService.getKnownDevice(email, deviceIdentifier));\n  }\n\n  /**\n   * @description Updates the keys for the specified device.\n   */\n\n  updateTrustedDeviceKeys$(\n    deviceIdentifier: string,\n    devicePublicKeyEncryptedUserKey: string,\n    userKeyEncryptedDevicePublicKey: string,\n    deviceKeyEncryptedDevicePrivateKey: string,\n  ): Observable<DeviceView> {\n    return defer(() =>\n      this.devicesApiService.updateTrustedDeviceKeys(\n        deviceIdentifier,\n        devicePublicKeyEncryptedUserKey,\n        userKeyEncryptedDevicePublicKey,\n        deviceKeyEncryptedDevicePrivateKey,\n      ),\n    ).pipe(map((deviceResponse: DeviceResponse) => new DeviceView(deviceResponse)));\n  }\n\n  /**\n   * @description Deactivates a device\n   */\n  deactivateDevice$(deviceId: string): Observable<void> {\n    return defer(() => this.devicesApiService.deactivateDevice(deviceId));\n  }\n\n  /**\n   * @description Gets the current device.\n   */\n  getCurrentDevice$(): Observable<DeviceResponse> {\n    return defer(async () => {\n      const deviceIdentifier = await this.appIdService.getAppId();\n      return this.devicesApiService.getDeviceByIdentifier(deviceIdentifier);\n    });\n  }\n}\n","import { CryptoFunctionService } from \"../../../platform/abstractions/crypto-function.service\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { PrfKey } from \"../../../types/key\";\nimport { WebAuthnLoginPrfKeyServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-prf-key.service.abstraction\";\n\nconst LoginWithPrfSalt = \"passwordless-login\";\n\nexport class WebAuthnLoginPrfKeyService implements WebAuthnLoginPrfKeyServiceAbstraction {\n  constructor(private cryptoFunctionService: CryptoFunctionService) {}\n\n  async getLoginWithPrfSalt(): Promise<ArrayBuffer> {\n    return await this.cryptoFunctionService.hash(LoginWithPrfSalt, \"sha256\");\n  }\n\n  async createSymmetricKeyFromPrf(prf: ArrayBuffer): Promise<PrfKey> {\n    return (await this.stretchKey(new Uint8Array(prf))) as PrfKey;\n  }\n\n  // TODO: use keyGenerationService.stretchKey\n  private async stretchKey(key: Uint8Array): Promise<SymmetricCryptoKey> {\n    const newKey = new Uint8Array(64);\n    const encKey = await this.cryptoFunctionService.hkdfExpand(key, \"enc\", 32, \"sha256\");\n    const macKey = await this.cryptoFunctionService.hkdfExpand(key, \"mac\", 32, \"sha256\");\n    newKey.set(new Uint8Array(encKey));\n    newKey.set(new Uint8Array(macKey), 32);\n    return new SymmetricCryptoKey(newKey);\n  }\n}\n","import { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"../../../abstractions/api.service\";\nimport { EnvironmentService } from \"../../../platform/abstractions/environment.service\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-api.service.abstraction\";\n\nimport { CredentialAssertionOptionsResponse } from \"./response/credential-assertion-options.response\";\n\nexport class WebAuthnLoginApiService implements WebAuthnLoginApiServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private environmentService: EnvironmentService,\n  ) {}\n\n  async getCredentialAssertionOptions(): Promise<CredentialAssertionOptionsResponse> {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const response = await this.apiService.send(\n      \"GET\",\n      `/accounts/webauthn/assertion-options`,\n      null,\n      false,\n      true,\n      env.getIdentityUrl(),\n    );\n    return new CredentialAssertionOptionsResponse(response);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LoginStrategyServiceAbstraction, WebAuthnLoginCredentials } from \"@bitwarden/auth/common\";\n\nimport { LogService } from \"../../../platform/abstractions/log.service\";\nimport { PrfKey } from \"../../../types/key\";\nimport { WebAuthnLoginApiServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-api.service.abstraction\";\nimport { WebAuthnLoginPrfKeyServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login-prf-key.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"../../abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"../../models/domain/auth-result\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion.view\";\n\nimport { WebAuthnLoginAssertionResponseRequest } from \"./request/webauthn-login-assertion-response.request\";\n\nexport class WebAuthnLoginService implements WebAuthnLoginServiceAbstraction {\n  private navigatorCredentials: CredentialsContainer;\n\n  constructor(\n    private webAuthnLoginApiService: WebAuthnLoginApiServiceAbstraction,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private webAuthnLoginPrfKeyService: WebAuthnLoginPrfKeyServiceAbstraction,\n    private window: Window,\n    private logService?: LogService,\n  ) {\n    this.navigatorCredentials = this.window.navigator.credentials;\n  }\n\n  async getCredentialAssertionOptions(): Promise<WebAuthnLoginCredentialAssertionOptionsView> {\n    const response = await this.webAuthnLoginApiService.getCredentialAssertionOptions();\n    return new WebAuthnLoginCredentialAssertionOptionsView(response.options, response.token);\n  }\n\n  async assertCredential(\n    credentialAssertionOptions: WebAuthnLoginCredentialAssertionOptionsView,\n  ): Promise<WebAuthnLoginCredentialAssertionView> {\n    const nativeOptions: CredentialRequestOptions = {\n      publicKey: credentialAssertionOptions.options,\n    };\n    // TODO: Remove `any` when typescript typings add support for PRF\n    nativeOptions.publicKey.extensions = {\n      prf: { eval: { first: await this.webAuthnLoginPrfKeyService.getLoginWithPrfSalt() } },\n    } as any;\n\n    try {\n      const response = await this.navigatorCredentials.get(nativeOptions);\n      if (!(response instanceof PublicKeyCredential)) {\n        return undefined;\n      }\n      // TODO: Remove `any` when typescript typings add support for PRF\n      const prfResult = (response.getClientExtensionResults() as any).prf?.results?.first;\n      let symmetricPrfKey: PrfKey | undefined;\n      if (prfResult != undefined) {\n        symmetricPrfKey =\n          await this.webAuthnLoginPrfKeyService.createSymmetricKeyFromPrf(prfResult);\n      }\n\n      const deviceResponse = new WebAuthnLoginAssertionResponseRequest(response);\n\n      // Verify that we aren't going to send PRF information to the server in any case.\n      // Note: this will only happen if a dev has done something wrong.\n      if (\"prf\" in deviceResponse.extensions) {\n        throw new Error(\"PRF information is not allowed to be sent to the server.\");\n      }\n\n      return new WebAuthnLoginCredentialAssertionView(\n        credentialAssertionOptions.token,\n        deviceResponse,\n        symmetricPrfKey,\n      );\n    } catch (error) {\n      this.logService?.error(error);\n      return undefined;\n    }\n  }\n\n  async logIn(assertion: WebAuthnLoginCredentialAssertionView): Promise<AuthResult> {\n    const credential = new WebAuthnLoginCredentials(\n      assertion.token,\n      assertion.deviceResponse,\n      assertion.prfKey,\n    );\n    const result = await this.loginStrategyService.logIn(credential);\n    return result;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LogService } from \"../../abstractions/log.service\";\nimport { StorageServiceProvider } from \"../../services/storage-service.provider\";\nimport { GlobalState } from \"../global-state\";\nimport { GlobalStateProvider } from \"../global-state.provider\";\nimport { KeyDefinition } from \"../key-definition\";\n\nimport { DefaultGlobalState } from \"./default-global-state\";\n\nexport class DefaultGlobalStateProvider implements GlobalStateProvider {\n  private globalStateCache: Record<string, GlobalState<unknown>> = {};\n\n  constructor(\n    private storageServiceProvider: StorageServiceProvider,\n    private readonly logService: LogService,\n  ) {}\n\n  get<T>(keyDefinition: KeyDefinition<T>): GlobalState<T> {\n    const [location, storageService] = this.storageServiceProvider.get(\n      keyDefinition.stateDefinition.defaultStorageLocation,\n      keyDefinition.stateDefinition.storageLocationOverrides,\n    );\n    const cacheKey = this.buildCacheKey(location, keyDefinition);\n    const existingGlobalState = this.globalStateCache[cacheKey];\n    if (existingGlobalState != null) {\n      // The cast into the actual generic is safe because of rules around key definitions\n      // being unique.\n      return existingGlobalState as DefaultGlobalState<T>;\n    }\n\n    const newGlobalState = new DefaultGlobalState<T>(\n      keyDefinition,\n      storageService,\n      this.logService,\n    );\n\n    this.globalStateCache[cacheKey] = newGlobalState;\n    return newGlobalState;\n  }\n\n  private buildCacheKey(location: string, keyDefinition: KeyDefinition<unknown>) {\n    return `${location}_${keyDefinition.fullName}`;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, distinctUntilChanged, map } from \"rxjs\";\n\nimport { AccountService } from \"../../../auth/abstractions/account.service\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserState } from \"../user-state\";\nimport { ActiveUserStateProvider, SingleUserStateProvider } from \"../user-state.provider\";\n\nimport { DefaultActiveUserState } from \"./default-active-user-state\";\n\nexport class DefaultActiveUserStateProvider implements ActiveUserStateProvider {\n  activeUserId$: Observable<UserId | undefined>;\n\n  constructor(\n    private readonly accountService: AccountService,\n    private readonly singleUserStateProvider: SingleUserStateProvider,\n  ) {\n    this.activeUserId$ = this.accountService.activeAccount$.pipe(\n      map((account) => account?.id),\n      // To avoid going to storage when we don't need to, only get updates when there is a true change.\n      distinctUntilChanged((a, b) => (a == null || b == null ? a == b : a === b)), // Treat null and undefined as equal\n    );\n  }\n\n  get<T>(keyDefinition: UserKeyDefinition<T>): ActiveUserState<T> {\n    // All other providers cache the creation of their corresponding `State` objects, this instance\n    // doesn't need to do that since it calls `SingleUserStateProvider` it will go through their caching\n    // layer, because of that, the creation of this instance is quite simple and not worth caching.\n    return new DefaultActiveUserState(\n      keyDefinition,\n      this.activeUserId$,\n      this.singleUserStateProvider,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"../../../types/guid\";\nimport { LogService } from \"../../abstractions/log.service\";\nimport { StorageServiceProvider } from \"../../services/storage-service.provider\";\nimport { StateEventRegistrarService } from \"../state-event-registrar.service\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { SingleUserState } from \"../user-state\";\nimport { SingleUserStateProvider } from \"../user-state.provider\";\n\nimport { DefaultSingleUserState } from \"./default-single-user-state\";\n\nexport class DefaultSingleUserStateProvider implements SingleUserStateProvider {\n  private cache: Record<string, SingleUserState<unknown>> = {};\n\n  constructor(\n    private readonly storageServiceProvider: StorageServiceProvider,\n    private readonly stateEventRegistrarService: StateEventRegistrarService,\n    private readonly logService: LogService,\n  ) {}\n\n  get<T>(userId: UserId, keyDefinition: UserKeyDefinition<T>): SingleUserState<T> {\n    const [location, storageService] = this.storageServiceProvider.get(\n      keyDefinition.stateDefinition.defaultStorageLocation,\n      keyDefinition.stateDefinition.storageLocationOverrides,\n    );\n    const cacheKey = this.buildCacheKey(location, userId, keyDefinition);\n    const existingUserState = this.cache[cacheKey];\n    if (existingUserState != null) {\n      // I have to cast out of the unknown generic but this should be safe if rules\n      // around domain token are made\n      return existingUserState as SingleUserState<T>;\n    }\n\n    const newUserState = new DefaultSingleUserState<T>(\n      userId,\n      keyDefinition,\n      storageService,\n      this.stateEventRegistrarService,\n      this.logService,\n    );\n    this.cache[cacheKey] = newUserState;\n    return newUserState;\n  }\n\n  private buildCacheKey(\n    location: string,\n    userId: UserId,\n    keyDefinition: UserKeyDefinition<unknown>,\n  ) {\n    return `${location}_${keyDefinition.fullName}_${userId}`;\n  }\n}\n","import { Observable } from \"rxjs\";\n\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\nimport { DerivedStateProvider } from \"../derived-state.provider\";\n\nimport { DefaultDerivedState } from \"./default-derived-state\";\n\nexport class DefaultDerivedStateProvider implements DerivedStateProvider {\n  private cache: Record<string, DerivedState<unknown>> = {};\n\n  constructor() {}\n\n  get<TFrom, TTo, TDeps extends DerivedStateDependencies>(\n    parentState$: Observable<TFrom>,\n    deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,\n    dependencies: TDeps,\n  ): DerivedState<TTo> {\n    const cacheKey = deriveDefinition.buildCacheKey();\n    const existingDerivedState = this.cache[cacheKey];\n    if (existingDerivedState != null) {\n      // I have to cast out of the unknown generic but this should be safe if rules\n      // around domain token are made\n      return existingDerivedState as DefaultDerivedState<TFrom, TTo, TDeps>;\n    }\n\n    const newDerivedState = this.buildDerivedState(parentState$, deriveDefinition, dependencies);\n    this.cache[cacheKey] = newDerivedState;\n    return newDerivedState;\n  }\n\n  protected buildDerivedState<TFrom, TTo, TDeps extends DerivedStateDependencies>(\n    parentState$: Observable<TFrom>,\n    deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,\n    dependencies: TDeps,\n  ): DerivedState<TTo> {\n    return new DefaultDerivedState<TFrom, TTo, TDeps>(parentState$, deriveDefinition, dependencies);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, filter, of, switchMap, take } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { DerivedStateDependencies } from \"../../../types/state\";\nimport { DeriveDefinition } from \"../derive-definition\";\nimport { DerivedState } from \"../derived-state\";\nimport { DerivedStateProvider } from \"../derived-state.provider\";\nimport { GlobalStateProvider } from \"../global-state.provider\";\nimport { StateProvider } from \"../state.provider\";\nimport { UserKeyDefinition } from \"../user-key-definition\";\nimport { ActiveUserStateProvider, SingleUserStateProvider } from \"../user-state.provider\";\n\nexport class DefaultStateProvider implements StateProvider {\n  activeUserId$: Observable<UserId>;\n  constructor(\n    private readonly activeUserStateProvider: ActiveUserStateProvider,\n    private readonly singleUserStateProvider: SingleUserStateProvider,\n    private readonly globalStateProvider: GlobalStateProvider,\n    private readonly derivedStateProvider: DerivedStateProvider,\n  ) {\n    this.activeUserId$ = this.activeUserStateProvider.activeUserId$;\n  }\n\n  getUserState$<T>(userKeyDefinition: UserKeyDefinition<T>, userId?: UserId): Observable<T> {\n    if (userId) {\n      return this.getUser<T>(userId, userKeyDefinition).state$;\n    } else {\n      return this.activeUserId$.pipe(\n        filter((userId) => userId != null), // Filter out null-ish user ids since we can't get state for a null user id\n        take(1),\n        switchMap((userId) => this.getUser<T>(userId, userKeyDefinition).state$),\n      );\n    }\n  }\n\n  getUserStateOrDefault$<T>(\n    userKeyDefinition: UserKeyDefinition<T>,\n    config: { userId: UserId | undefined; defaultValue?: T },\n  ): Observable<T> {\n    const { userId, defaultValue = null } = config;\n    if (userId) {\n      return this.getUser<T>(userId, userKeyDefinition).state$;\n    } else {\n      return this.activeUserId$.pipe(\n        take(1),\n        switchMap((userId) =>\n          userId != null ? this.getUser<T>(userId, userKeyDefinition).state$ : of(defaultValue),\n        ),\n      );\n    }\n  }\n\n  async setUserState<T>(\n    userKeyDefinition: UserKeyDefinition<T>,\n    value: T,\n    userId?: UserId,\n  ): Promise<[UserId, T]> {\n    if (userId) {\n      return [userId, await this.getUser<T>(userId, userKeyDefinition).update(() => value)];\n    } else {\n      return await this.getActive<T>(userKeyDefinition).update(() => value);\n    }\n  }\n\n  getActive: InstanceType<typeof ActiveUserStateProvider>[\"get\"] =\n    this.activeUserStateProvider.get.bind(this.activeUserStateProvider);\n  getUser: InstanceType<typeof SingleUserStateProvider>[\"get\"] =\n    this.singleUserStateProvider.get.bind(this.singleUserStateProvider);\n  getGlobal: InstanceType<typeof GlobalStateProvider>[\"get\"] = this.globalStateProvider.get.bind(\n    this.globalStateProvider,\n  );\n  getDerived: <TFrom, TTo, TDeps extends DerivedStateDependencies>(\n    parentState$: Observable<TFrom>,\n    deriveDefinition: DeriveDefinition<unknown, TTo, TDeps>,\n    dependencies: TDeps,\n  ) => DerivedState<TTo> = this.derivedStateProvider.get.bind(this.derivedStateProvider);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  BillingApiServiceAbstraction,\n  OrganizationBillingServiceAbstraction,\n  OrganizationInformation,\n  PaymentInformation,\n  PlanInformation,\n  SubscriptionInformation,\n} from \"@bitwarden/common/billing/abstractions\";\nimport { BillingSourceResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { PaymentSourceResponse } from \"@bitwarden/common/billing/models/response/payment-source.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction as OrganizationApiService } from \"../../admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationCreateRequest } from \"../../admin-console/models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../admin-console/models/request/organization-keys.request\";\nimport { OrganizationResponse } from \"../../admin-console/models/response/organization.response\";\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { OrgKey } from \"../../types/key\";\nimport { PlanType } from \"../enums\";\nimport { OrganizationNoPaymentMethodCreateRequest } from \"../models/request/organization-no-payment-method-create-request\";\n\ninterface OrganizationKeys {\n  encryptedKey: EncString;\n  publicKey: string;\n  encryptedPrivateKey: EncString;\n  encryptedCollectionName: EncString;\n}\n\nexport class OrganizationBillingService implements OrganizationBillingServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private billingApiService: BillingApiServiceAbstraction,\n    private configService: ConfigService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private i18nService: I18nService,\n    private organizationApiService: OrganizationApiService,\n    private syncService: SyncService,\n  ) {}\n\n  async getPaymentSource(\n    organizationId: string,\n  ): Promise<BillingSourceResponse | PaymentSourceResponse> {\n    const deprecateStripeSourcesAPI = await this.configService.getFeatureFlag(\n      FeatureFlag.AC2476_DeprecateStripeSourcesAPI,\n    );\n\n    if (deprecateStripeSourcesAPI) {\n      const paymentMethod =\n        await this.billingApiService.getOrganizationPaymentMethod(organizationId);\n      return paymentMethod.paymentSource;\n    } else {\n      const billing = await this.organizationApiService.getBilling(organizationId);\n      return billing.paymentSource;\n    }\n  }\n\n  async purchaseSubscription(subscription: SubscriptionInformation): Promise<OrganizationResponse> {\n    const request = new OrganizationCreateRequest();\n\n    const organizationKeys = await this.makeOrganizationKeys();\n\n    this.setOrganizationKeys(request, organizationKeys);\n\n    this.setOrganizationInformation(request, subscription.organization);\n\n    this.setPlanInformation(request, subscription.plan);\n\n    this.setPaymentInformation(request, subscription.payment);\n\n    const response = await this.organizationApiService.create(request);\n\n    await this.apiService.refreshIdentityToken();\n\n    await this.syncService.fullSync(true);\n\n    return response;\n  }\n\n  async purchaseSubscriptionNoPaymentMethod(\n    subscription: SubscriptionInformation,\n  ): Promise<OrganizationResponse> {\n    const request = new OrganizationNoPaymentMethodCreateRequest();\n\n    const organizationKeys = await this.makeOrganizationKeys();\n\n    this.setOrganizationKeys(request, organizationKeys);\n\n    this.setOrganizationInformation(request, subscription.organization);\n\n    this.setPlanInformation(request, subscription.plan);\n\n    const response = await this.organizationApiService.createWithoutPayment(request);\n\n    await this.apiService.refreshIdentityToken();\n\n    await this.syncService.fullSync(true);\n\n    return response;\n  }\n\n  async startFree(subscription: SubscriptionInformation): Promise<OrganizationResponse> {\n    const request = new OrganizationCreateRequest();\n\n    const organizationKeys = await this.makeOrganizationKeys();\n\n    this.setOrganizationKeys(request, organizationKeys);\n\n    this.setOrganizationInformation(request, subscription.organization);\n\n    this.setPlanInformation(request, subscription.plan);\n\n    const response = await this.organizationApiService.create(request);\n\n    await this.apiService.refreshIdentityToken();\n\n    await this.syncService.fullSync(true);\n\n    return response;\n  }\n\n  private async makeOrganizationKeys(): Promise<OrganizationKeys> {\n    const [encryptedKey, key] = await this.keyService.makeOrgKey<OrgKey>();\n    const [publicKey, encryptedPrivateKey] = await this.keyService.makeKeyPair(key);\n    const encryptedCollectionName = await this.encryptService.encrypt(\n      this.i18nService.t(\"defaultCollection\"),\n      key,\n    );\n    return {\n      encryptedKey,\n      publicKey,\n      encryptedPrivateKey,\n      encryptedCollectionName,\n    };\n  }\n\n  private prohibitsAdditionalSeats(planType: PlanType) {\n    switch (planType) {\n      case PlanType.Free:\n      case PlanType.FamiliesAnnually:\n      case PlanType.FamiliesAnnually2019:\n      case PlanType.TeamsStarter2023:\n      case PlanType.TeamsStarter:\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  private setOrganizationInformation(\n    request: OrganizationCreateRequest | OrganizationNoPaymentMethodCreateRequest,\n    information: OrganizationInformation,\n  ): void {\n    request.name = information.name;\n    request.businessName = information.businessName;\n    request.billingEmail = information.billingEmail;\n    request.initiationPath = information.initiationPath;\n  }\n\n  private setOrganizationKeys(\n    request: OrganizationCreateRequest | OrganizationNoPaymentMethodCreateRequest,\n    keys: OrganizationKeys,\n  ): void {\n    request.key = keys.encryptedKey.encryptedString;\n    request.keys = new OrganizationKeysRequest(\n      keys.publicKey,\n      keys.encryptedPrivateKey.encryptedString,\n    );\n    request.collectionName = keys.encryptedCollectionName.encryptedString;\n  }\n\n  private setPaymentInformation(\n    request: OrganizationCreateRequest,\n    information: PaymentInformation,\n  ) {\n    const [paymentToken, paymentMethodType] = information.paymentMethod;\n    request.paymentToken = paymentToken;\n    request.paymentMethodType = paymentMethodType;\n\n    const billingInformation = information.billing;\n    request.billingAddressPostalCode = billingInformation.postalCode;\n    request.billingAddressCountry = billingInformation.country;\n\n    if (billingInformation.taxId) {\n      request.taxIdNumber = billingInformation.taxId;\n      request.billingAddressLine1 = billingInformation.addressLine1;\n      request.billingAddressLine2 = billingInformation.addressLine2;\n      request.billingAddressCity = billingInformation.city;\n      request.billingAddressState = billingInformation.state;\n    }\n  }\n\n  private setPlanInformation(\n    request: OrganizationCreateRequest | OrganizationNoPaymentMethodCreateRequest,\n    information: PlanInformation,\n  ): void {\n    request.planType = information.type;\n\n    if (this.prohibitsAdditionalSeats(request.planType)) {\n      request.useSecretsManager = information.subscribeToSecretsManager;\n      request.isFromSecretsManagerTrial = information.isFromSecretsManagerTrial;\n      return;\n    }\n\n    request.additionalSeats = information.passwordManagerSeats;\n\n    if (information.subscribeToSecretsManager) {\n      request.useSecretsManager = true;\n      request.isFromSecretsManagerTrial = information.isFromSecretsManagerTrial;\n      request.additionalSmSeats = information.secretsManagerSeats;\n      request.additionalServiceAccounts = information.secretsManagerServiceAccounts;\n    }\n\n    if (information.storage) {\n      request.additionalStorageGb = information.storage;\n    }\n  }\n\n  async restartSubscription(\n    organizationId: string,\n    subscription: SubscriptionInformation,\n  ): Promise<void> {\n    const request = new OrganizationCreateRequest();\n    const organizationKeys = await this.makeOrganizationKeys();\n    this.setOrganizationKeys(request, organizationKeys);\n    this.setOrganizationInformation(request, subscription.organization);\n    this.setPlanInformation(request, subscription.plan);\n    this.setPaymentInformation(request, subscription.payment);\n    await this.billingApiService.restartSubscription(organizationId, request);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n/**\n * Service for managing vault settings.\n */\nexport abstract class VaultSettingsService {\n  /**\n   * An observable monitoring the state of the enable passkeys setting.\n   * The observable updates when the setting changes.\n   */\n  enablePasskeys$: Observable<boolean>;\n  /**\n   * An observable monitoring the state of the show cards on the current tab.\n   */\n  showCardsCurrentTab$: Observable<boolean>;\n  /**\n   * An observable monitoring the state of the show identities on the current tab.\n   */\n  showIdentitiesCurrentTab$: Observable<boolean>;\n  /**\n  /**\n   * An observable monitoring the state of the click items on the Vault view\n   * for Autofill suggestions.\n   */\n  clickItemsToAutofillVaultView$: Observable<boolean>;\n  /**\n\n  /**\n   * Saves the enable passkeys setting to disk.\n   * @param value The new value for the passkeys setting.\n   */\n  setEnablePasskeys: (value: boolean) => Promise<void>;\n  /**\n   * Saves the show cards on tab page setting to disk.\n   * @param value The new value for the show cards on tab page setting.\n   */\n  setShowCardsCurrentTab: (value: boolean) => Promise<void>;\n  /**\n   * Saves the show identities on tab page setting to disk.\n   * @param value The new value for the show identities on tab page setting.\n   */\n  setShowIdentitiesCurrentTab: (value: boolean) => Promise<void>;\n  /**\n   * Saves the click items on vault View for Autofill suggestions to disk.\n   * @param value The new value for the click items on vault View for\n   * Autofill suggestions setting.\n   */\n  setClickItemsToAutofillVaultView: (value: boolean) => Promise<void>;\n}\n","import { Observable, map } from \"rxjs\";\n\nimport { ActiveUserState, GlobalState, StateProvider } from \"../../../platform/state\";\nimport { VaultSettingsService as VaultSettingsServiceAbstraction } from \"../../abstractions/vault-settings/vault-settings.service\";\nimport {\n  SHOW_CARDS_CURRENT_TAB,\n  SHOW_IDENTITIES_CURRENT_TAB,\n  USER_ENABLE_PASSKEYS,\n  CLICK_ITEMS_AUTOFILL_VAULT_VIEW,\n} from \"../key-state/vault-settings.state\";\n\n/**\n * {@link VaultSettingsServiceAbstraction}\n */\nexport class VaultSettingsService implements VaultSettingsServiceAbstraction {\n  private enablePasskeysState: GlobalState<boolean> =\n    this.stateProvider.getGlobal(USER_ENABLE_PASSKEYS);\n  /**\n   * {@link VaultSettingsServiceAbstraction.enablePasskeys$}\n   */\n  readonly enablePasskeys$: Observable<boolean> = this.enablePasskeysState.state$.pipe(\n    map((x) => x ?? true),\n  );\n\n  private showCardsCurrentTabState: ActiveUserState<boolean> =\n    this.stateProvider.getActive(SHOW_CARDS_CURRENT_TAB);\n  /**\n   * {@link VaultSettingsServiceAbstraction.showCardsCurrentTab$}\n   */\n  readonly showCardsCurrentTab$: Observable<boolean> = this.showCardsCurrentTabState.state$.pipe(\n    map((x) => x ?? true),\n  );\n\n  private showIdentitiesCurrentTabState: ActiveUserState<boolean> = this.stateProvider.getActive(\n    SHOW_IDENTITIES_CURRENT_TAB,\n  );\n  /**\n   * {@link VaultSettingsServiceAbstraction.showIdentitiesCurrentTab$}\n   */\n  readonly showIdentitiesCurrentTab$: Observable<boolean> =\n    this.showIdentitiesCurrentTabState.state$.pipe(map((x) => x ?? true));\n\n  private clickItemsToAutofillVaultViewState: ActiveUserState<boolean> =\n    this.stateProvider.getActive(CLICK_ITEMS_AUTOFILL_VAULT_VIEW);\n  /**\n   * {@link VaultSettingsServiceAbstraction.clickItemsToAutofillVaultView$$}\n   */\n  readonly clickItemsToAutofillVaultView$: Observable<boolean> =\n    this.clickItemsToAutofillVaultViewState.state$.pipe(map((x) => x ?? false));\n\n  constructor(private stateProvider: StateProvider) {}\n\n  /**\n   * {@link VaultSettingsServiceAbstraction.setShowCardsCurrentTab}\n   */\n  async setShowCardsCurrentTab(value: boolean): Promise<void> {\n    await this.showCardsCurrentTabState.update(() => value);\n  }\n\n  /**\n   * {@link VaultSettingsServiceAbstraction.setDontShowIdentitiesCurrentTab}\n   */\n  async setShowIdentitiesCurrentTab(value: boolean): Promise<void> {\n    await this.showIdentitiesCurrentTabState.update(() => value);\n  }\n\n  /**\n   * {@link VaultSettingsServiceAbstraction.setClickItemsToAutofillVaultView}\n   */\n  async setClickItemsToAutofillVaultView(value: boolean): Promise<void> {\n    await this.clickItemsToAutofillVaultViewState.update(() => value);\n  }\n\n  /**\n   * {@link VaultSettingsServiceAbstraction.setEnablePasskeys}\n   */\n  async setEnablePasskeys(value: boolean): Promise<void> {\n    await this.enablePasskeysState.update(() => value);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ProviderOrganizationOrganizationDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-organization.response\";\nimport { UpdatePaymentMethodRequest } from \"@bitwarden/common/billing/models/request/update-payment-method.request\";\nimport { VerifyBankAccountRequest } from \"@bitwarden/common/billing/models/request/verify-bank-account.request\";\nimport { InvoicesResponse } from \"@bitwarden/common/billing/models/response/invoices.response\";\nimport { PaymentMethodResponse } from \"@bitwarden/common/billing/models/response/payment-method.response\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { ApiService } from \"../../abstractions/api.service\";\nimport { OrganizationCreateRequest } from \"../../admin-console/models/request/organization-create.request\";\nimport { BillingApiServiceAbstraction } from \"../../billing/abstractions\";\nimport { PaymentMethodType } from \"../../billing/enums\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../billing/models/request/expanded-tax-info-update.request\";\nimport { SubscriptionCancellationRequest } from \"../../billing/models/request/subscription-cancellation.request\";\nimport { OrganizationBillingMetadataResponse } from \"../../billing/models/response/organization-billing-metadata.response\";\nimport { PlanResponse } from \"../../billing/models/response/plan.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { CreateClientOrganizationRequest } from \"../models/request/create-client-organization.request\";\nimport { UpdateClientOrganizationRequest } from \"../models/request/update-client-organization.request\";\nimport { ProviderSubscriptionResponse } from \"../models/response/provider-subscription-response\";\n\nexport class BillingApiService implements BillingApiServiceAbstraction {\n  constructor(\n    private apiService: ApiService,\n    private logService: LogService,\n    private toastService: ToastService,\n  ) {}\n\n  cancelOrganizationSubscription(\n    organizationId: string,\n    request: SubscriptionCancellationRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/cancel\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  cancelPremiumUserSubscription(request: SubscriptionCancellationRequest): Promise<void> {\n    return this.apiService.send(\"POST\", \"/accounts/cancel\", request, true, false);\n  }\n\n  createProviderClientOrganization(\n    providerId: string,\n    request: CreateClientOrganizationRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/clients\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async createSetupIntent(type: PaymentMethodType) {\n    const getPath = () => {\n      switch (type) {\n        case PaymentMethodType.BankAccount: {\n          return \"/setup-intent/bank-account\";\n        }\n        case PaymentMethodType.Card: {\n          return \"/setup-intent/card\";\n        }\n      }\n    };\n    const response = await this.apiService.send(\"POST\", getPath(), null, true, true);\n    return response as string;\n  }\n\n  async getOrganizationBillingMetadata(\n    organizationId: string,\n  ): Promise<OrganizationBillingMetadataResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/billing/metadata\",\n      null,\n      true,\n      true,\n    );\n\n    return new OrganizationBillingMetadataResponse(r);\n  }\n\n  async getOrganizationPaymentMethod(organizationId: string): Promise<PaymentMethodResponse> {\n    const response = await this.execute(() =>\n      this.apiService.send(\n        \"GET\",\n        \"/organizations/\" + organizationId + \"/billing/payment-method\",\n        null,\n        true,\n        true,\n      ),\n    );\n    return new PaymentMethodResponse(response);\n  }\n\n  async getPlans(): Promise<ListResponse<PlanResponse>> {\n    const r = await this.apiService.send(\"GET\", \"/plans\", null, false, true);\n    return new ListResponse(r, PlanResponse);\n  }\n\n  async getProviderClientInvoiceReport(providerId: string, invoiceId: string): Promise<string> {\n    const response = await this.apiService.send(\n      \"GET\",\n      \"/providers/\" + providerId + \"/billing/invoices/\" + invoiceId,\n      null,\n      true,\n      true,\n    );\n    return response as string;\n  }\n\n  async getProviderClientOrganizations(\n    providerId: string,\n  ): Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>> {\n    const response = await this.execute(() =>\n      this.apiService.send(\"GET\", \"/providers/\" + providerId + \"/organizations\", null, true, true),\n    );\n    return new ListResponse(response, ProviderOrganizationOrganizationDetailsResponse);\n  }\n\n  async getProviderInvoices(providerId: string): Promise<InvoicesResponse> {\n    const response = await this.execute(() =>\n      this.apiService.send(\n        \"GET\",\n        \"/providers/\" + providerId + \"/billing/invoices\",\n        null,\n        true,\n        true,\n      ),\n    );\n    return new InvoicesResponse(response);\n  }\n\n  async getProviderSubscription(providerId: string): Promise<ProviderSubscriptionResponse> {\n    const response = await this.execute(() =>\n      this.apiService.send(\n        \"GET\",\n        \"/providers/\" + providerId + \"/billing/subscription\",\n        null,\n        true,\n        true,\n      ),\n    );\n    return new ProviderSubscriptionResponse(response);\n  }\n\n  async updateOrganizationPaymentMethod(\n    organizationId: string,\n    request: UpdatePaymentMethodRequest,\n  ): Promise<void> {\n    return await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/billing/payment-method\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async updateOrganizationTaxInformation(\n    organizationId: string,\n    request: ExpandedTaxInfoUpdateRequest,\n  ): Promise<void> {\n    return await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/billing/tax-information\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async updateProviderClientOrganization(\n    providerId: string,\n    organizationId: string,\n    request: UpdateClientOrganizationRequest,\n  ): Promise<any> {\n    return await this.apiService.send(\n      \"PUT\",\n      \"/providers/\" + providerId + \"/clients/\" + organizationId,\n      request,\n      true,\n      false,\n    );\n  }\n\n  async updateProviderTaxInformation(providerId: string, request: ExpandedTaxInfoUpdateRequest) {\n    return await this.apiService.send(\n      \"PUT\",\n      \"/providers/\" + providerId + \"/billing/tax-information\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async verifyOrganizationBankAccount(\n    organizationId: string,\n    request: VerifyBankAccountRequest,\n  ): Promise<void> {\n    return await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/billing/payment-method/verify-bank-account\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async restartSubscription(\n    organizationId: string,\n    request: OrganizationCreateRequest,\n  ): Promise<void> {\n    return await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/billing/restart-subscription\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  private async execute(request: () => Promise<any>): Promise<any> {\n    try {\n      return await request();\n    } catch (error) {\n      this.logService.error(error);\n      if (error instanceof ErrorResponse) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: error.getSingleMessage(),\n        });\n      }\n      throw error;\n    }\n  }\n}\n","import { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport { CountryListItem } from \"@bitwarden/common/billing/models/domain\";\nimport { PreviewIndividualInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-individual-invoice.request\";\nimport { PreviewOrganizationInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-organization-invoice.request\";\nimport { PreviewInvoiceResponse } from \"@bitwarden/common/billing/models/response/preview-invoice.response\";\n\nexport class TaxService implements TaxServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  getCountries(): CountryListItem[] {\n    return [\n      { name: \"-- Select --\", value: \"\", disabled: false },\n      { name: \"United States\", value: \"US\", disabled: false },\n      { name: \"China\", value: \"CN\", disabled: false },\n      { name: \"France\", value: \"FR\", disabled: false },\n      { name: \"Germany\", value: \"DE\", disabled: false },\n      { name: \"Canada\", value: \"CA\", disabled: false },\n      { name: \"United Kingdom\", value: \"GB\", disabled: false },\n      { name: \"Australia\", value: \"AU\", disabled: false },\n      { name: \"India\", value: \"IN\", disabled: false },\n      { name: \"\", value: \"-\", disabled: true },\n      { name: \"Afghanistan\", value: \"AF\", disabled: false },\n      { name: \"Åland Islands\", value: \"AX\", disabled: false },\n      { name: \"Albania\", value: \"AL\", disabled: false },\n      { name: \"Algeria\", value: \"DZ\", disabled: false },\n      { name: \"American Samoa\", value: \"AS\", disabled: false },\n      { name: \"Andorra\", value: \"AD\", disabled: false },\n      { name: \"Angola\", value: \"AO\", disabled: false },\n      { name: \"Anguilla\", value: \"AI\", disabled: false },\n      { name: \"Antarctica\", value: \"AQ\", disabled: false },\n      { name: \"Antigua and Barbuda\", value: \"AG\", disabled: false },\n      { name: \"Argentina\", value: \"AR\", disabled: false },\n      { name: \"Armenia\", value: \"AM\", disabled: false },\n      { name: \"Aruba\", value: \"AW\", disabled: false },\n      { name: \"Austria\", value: \"AT\", disabled: false },\n      { name: \"Azerbaijan\", value: \"AZ\", disabled: false },\n      { name: \"Bahamas\", value: \"BS\", disabled: false },\n      { name: \"Bahrain\", value: \"BH\", disabled: false },\n      { name: \"Bangladesh\", value: \"BD\", disabled: false },\n      { name: \"Barbados\", value: \"BB\", disabled: false },\n      { name: \"Belarus\", value: \"BY\", disabled: false },\n      { name: \"Belgium\", value: \"BE\", disabled: false },\n      { name: \"Belize\", value: \"BZ\", disabled: false },\n      { name: \"Benin\", value: \"BJ\", disabled: false },\n      { name: \"Bermuda\", value: \"BM\", disabled: false },\n      { name: \"Bhutan\", value: \"BT\", disabled: false },\n      { name: \"Bolivia, Plurinational State of\", value: \"BO\", disabled: false },\n      { name: \"Bonaire, Sint Eustatius and Saba\", value: \"BQ\", disabled: false },\n      { name: \"Bosnia and Herzegovina\", value: \"BA\", disabled: false },\n      { name: \"Botswana\", value: \"BW\", disabled: false },\n      { name: \"Bouvet Island\", value: \"BV\", disabled: false },\n      { name: \"Brazil\", value: \"BR\", disabled: false },\n      { name: \"British Indian Ocean Territory\", value: \"IO\", disabled: false },\n      { name: \"Brunei Darussalam\", value: \"BN\", disabled: false },\n      { name: \"Bulgaria\", value: \"BG\", disabled: false },\n      { name: \"Burkina Faso\", value: \"BF\", disabled: false },\n      { name: \"Burundi\", value: \"BI\", disabled: false },\n      { name: \"Cambodia\", value: \"KH\", disabled: false },\n      { name: \"Cameroon\", value: \"CM\", disabled: false },\n      { name: \"Cape Verde\", value: \"CV\", disabled: false },\n      { name: \"Cayman Islands\", value: \"KY\", disabled: false },\n      { name: \"Central African Republic\", value: \"CF\", disabled: false },\n      { name: \"Chad\", value: \"TD\", disabled: false },\n      { name: \"Chile\", value: \"CL\", disabled: false },\n      { name: \"Christmas Island\", value: \"CX\", disabled: false },\n      { name: \"Cocos (Keeling) Islands\", value: \"CC\", disabled: false },\n      { name: \"Colombia\", value: \"CO\", disabled: false },\n      { name: \"Comoros\", value: \"KM\", disabled: false },\n      { name: \"Congo\", value: \"CG\", disabled: false },\n      { name: \"Congo, the Democratic Republic of the\", value: \"CD\", disabled: false },\n      { name: \"Cook Islands\", value: \"CK\", disabled: false },\n      { name: \"Costa Rica\", value: \"CR\", disabled: false },\n      { name: \"Côte d'Ivoire\", value: \"CI\", disabled: false },\n      { name: \"Croatia\", value: \"HR\", disabled: false },\n      { name: \"Cuba\", value: \"CU\", disabled: false },\n      { name: \"Curaçao\", value: \"CW\", disabled: false },\n      { name: \"Cyprus\", value: \"CY\", disabled: false },\n      { name: \"Czech Republic\", value: \"CZ\", disabled: false },\n      { name: \"Denmark\", value: \"DK\", disabled: false },\n      { name: \"Djibouti\", value: \"DJ\", disabled: false },\n      { name: \"Dominica\", value: \"DM\", disabled: false },\n      { name: \"Dominican Republic\", value: \"DO\", disabled: false },\n      { name: \"Ecuador\", value: \"EC\", disabled: false },\n      { name: \"Egypt\", value: \"EG\", disabled: false },\n      { name: \"El Salvador\", value: \"SV\", disabled: false },\n      { name: \"Equatorial Guinea\", value: \"GQ\", disabled: false },\n      { name: \"Eritrea\", value: \"ER\", disabled: false },\n      { name: \"Estonia\", value: \"EE\", disabled: false },\n      { name: \"Ethiopia\", value: \"ET\", disabled: false },\n      { name: \"Falkland Islands (Malvinas)\", value: \"FK\", disabled: false },\n      { name: \"Faroe Islands\", value: \"FO\", disabled: false },\n      { name: \"Fiji\", value: \"FJ\", disabled: false },\n      { name: \"Finland\", value: \"FI\", disabled: false },\n      { name: \"French Guiana\", value: \"GF\", disabled: false },\n      { name: \"French Polynesia\", value: \"PF\", disabled: false },\n      { name: \"French Southern Territories\", value: \"TF\", disabled: false },\n      { name: \"Gabon\", value: \"GA\", disabled: false },\n      { name: \"Gambia\", value: \"GM\", disabled: false },\n      { name: \"Georgia\", value: \"GE\", disabled: false },\n      { name: \"Ghana\", value: \"GH\", disabled: false },\n      { name: \"Gibraltar\", value: \"GI\", disabled: false },\n      { name: \"Greece\", value: \"GR\", disabled: false },\n      { name: \"Greenland\", value: \"GL\", disabled: false },\n      { name: \"Grenada\", value: \"GD\", disabled: false },\n      { name: \"Guadeloupe\", value: \"GP\", disabled: false },\n      { name: \"Guam\", value: \"GU\", disabled: false },\n      { name: \"Guatemala\", value: \"GT\", disabled: false },\n      { name: \"Guernsey\", value: \"GG\", disabled: false },\n      { name: \"Guinea\", value: \"GN\", disabled: false },\n      { name: \"Guinea-Bissau\", value: \"GW\", disabled: false },\n      { name: \"Guyana\", value: \"GY\", disabled: false },\n      { name: \"Haiti\", value: \"HT\", disabled: false },\n      { name: \"Heard Island and McDonald Islands\", value: \"HM\", disabled: false },\n      { name: \"Holy See (Vatican City State)\", value: \"VA\", disabled: false },\n      { name: \"Honduras\", value: \"HN\", disabled: false },\n      { name: \"Hong Kong\", value: \"HK\", disabled: false },\n      { name: \"Hungary\", value: \"HU\", disabled: false },\n      { name: \"Iceland\", value: \"IS\", disabled: false },\n      { name: \"Indonesia\", value: \"ID\", disabled: false },\n      { name: \"Iran, Islamic Republic of\", value: \"IR\", disabled: false },\n      { name: \"Iraq\", value: \"IQ\", disabled: false },\n      { name: \"Ireland\", value: \"IE\", disabled: false },\n      { name: \"Isle of Man\", value: \"IM\", disabled: false },\n      { name: \"Israel\", value: \"IL\", disabled: false },\n      { name: \"Italy\", value: \"IT\", disabled: false },\n      { name: \"Jamaica\", value: \"JM\", disabled: false },\n      { name: \"Japan\", value: \"JP\", disabled: false },\n      { name: \"Jersey\", value: \"JE\", disabled: false },\n      { name: \"Jordan\", value: \"JO\", disabled: false },\n      { name: \"Kazakhstan\", value: \"KZ\", disabled: false },\n      { name: \"Kenya\", value: \"KE\", disabled: false },\n      { name: \"Kiribati\", value: \"KI\", disabled: false },\n      { name: \"Korea, Democratic People's Republic of\", value: \"KP\", disabled: false },\n      { name: \"Korea, Republic of\", value: \"KR\", disabled: false },\n      { name: \"Kuwait\", value: \"KW\", disabled: false },\n      { name: \"Kyrgyzstan\", value: \"KG\", disabled: false },\n      { name: \"Lao People's Democratic Republic\", value: \"LA\", disabled: false },\n      { name: \"Latvia\", value: \"LV\", disabled: false },\n      { name: \"Lebanon\", value: \"LB\", disabled: false },\n      { name: \"Lesotho\", value: \"LS\", disabled: false },\n      { name: \"Liberia\", value: \"LR\", disabled: false },\n      { name: \"Libya\", value: \"LY\", disabled: false },\n      { name: \"Liechtenstein\", value: \"LI\", disabled: false },\n      { name: \"Lithuania\", value: \"LT\", disabled: false },\n      { name: \"Luxembourg\", value: \"LU\", disabled: false },\n      { name: \"Macao\", value: \"MO\", disabled: false },\n      { name: \"Macedonia, the former Yugoslav Republic of\", value: \"MK\", disabled: false },\n      { name: \"Madagascar\", value: \"MG\", disabled: false },\n      { name: \"Malawi\", value: \"MW\", disabled: false },\n      { name: \"Malaysia\", value: \"MY\", disabled: false },\n      { name: \"Maldives\", value: \"MV\", disabled: false },\n      { name: \"Mali\", value: \"ML\", disabled: false },\n      { name: \"Malta\", value: \"MT\", disabled: false },\n      { name: \"Marshall Islands\", value: \"MH\", disabled: false },\n      { name: \"Martinique\", value: \"MQ\", disabled: false },\n      { name: \"Mauritania\", value: \"MR\", disabled: false },\n      { name: \"Mauritius\", value: \"MU\", disabled: false },\n      { name: \"Mayotte\", value: \"YT\", disabled: false },\n      { name: \"Mexico\", value: \"MX\", disabled: false },\n      { name: \"Micronesia, Federated States of\", value: \"FM\", disabled: false },\n      { name: \"Moldova, Republic of\", value: \"MD\", disabled: false },\n      { name: \"Monaco\", value: \"MC\", disabled: false },\n      { name: \"Mongolia\", value: \"MN\", disabled: false },\n      { name: \"Montenegro\", value: \"ME\", disabled: false },\n      { name: \"Montserrat\", value: \"MS\", disabled: false },\n      { name: \"Morocco\", value: \"MA\", disabled: false },\n      { name: \"Mozambique\", value: \"MZ\", disabled: false },\n      { name: \"Myanmar\", value: \"MM\", disabled: false },\n      { name: \"Namibia\", value: \"NA\", disabled: false },\n      { name: \"Nauru\", value: \"NR\", disabled: false },\n      { name: \"Nepal\", value: \"NP\", disabled: false },\n      { name: \"Netherlands\", value: \"NL\", disabled: false },\n      { name: \"New Caledonia\", value: \"NC\", disabled: false },\n      { name: \"New Zealand\", value: \"NZ\", disabled: false },\n      { name: \"Nicaragua\", value: \"NI\", disabled: false },\n      { name: \"Niger\", value: \"NE\", disabled: false },\n      { name: \"Nigeria\", value: \"NG\", disabled: false },\n      { name: \"Niue\", value: \"NU\", disabled: false },\n      { name: \"Norfolk Island\", value: \"NF\", disabled: false },\n      { name: \"Northern Mariana Islands\", value: \"MP\", disabled: false },\n      { name: \"Norway\", value: \"NO\", disabled: false },\n      { name: \"Oman\", value: \"OM\", disabled: false },\n      { name: \"Pakistan\", value: \"PK\", disabled: false },\n      { name: \"Palau\", value: \"PW\", disabled: false },\n      { name: \"Palestinian Territory, Occupied\", value: \"PS\", disabled: false },\n      { name: \"Panama\", value: \"PA\", disabled: false },\n      { name: \"Papua New Guinea\", value: \"PG\", disabled: false },\n      { name: \"Paraguay\", value: \"PY\", disabled: false },\n      { name: \"Peru\", value: \"PE\", disabled: false },\n      { name: \"Philippines\", value: \"PH\", disabled: false },\n      { name: \"Pitcairn\", value: \"PN\", disabled: false },\n      { name: \"Poland\", value: \"PL\", disabled: false },\n      { name: \"Portugal\", value: \"PT\", disabled: false },\n      { name: \"Puerto Rico\", value: \"PR\", disabled: false },\n      { name: \"Qatar\", value: \"QA\", disabled: false },\n      { name: \"Réunion\", value: \"RE\", disabled: false },\n      { name: \"Romania\", value: \"RO\", disabled: false },\n      { name: \"Russian Federation\", value: \"RU\", disabled: false },\n      { name: \"Rwanda\", value: \"RW\", disabled: false },\n      { name: \"Saint Barthélemy\", value: \"BL\", disabled: false },\n      { name: \"Saint Helena, Ascension and Tristan da Cunha\", value: \"SH\", disabled: false },\n      { name: \"Saint Kitts and Nevis\", value: \"KN\", disabled: false },\n      { name: \"Saint Lucia\", value: \"LC\", disabled: false },\n      { name: \"Saint Martin (French part)\", value: \"MF\", disabled: false },\n      { name: \"Saint Pierre and Miquelon\", value: \"PM\", disabled: false },\n      { name: \"Saint Vincent and the Grenadines\", value: \"VC\", disabled: false },\n      { name: \"Samoa\", value: \"WS\", disabled: false },\n      { name: \"San Marino\", value: \"SM\", disabled: false },\n      { name: \"Sao Tome and Principe\", value: \"ST\", disabled: false },\n      { name: \"Saudi Arabia\", value: \"SA\", disabled: false },\n      { name: \"Senegal\", value: \"SN\", disabled: false },\n      { name: \"Serbia\", value: \"RS\", disabled: false },\n      { name: \"Seychelles\", value: \"SC\", disabled: false },\n      { name: \"Sierra Leone\", value: \"SL\", disabled: false },\n      { name: \"Singapore\", value: \"SG\", disabled: false },\n      { name: \"Sint Maarten (Dutch part)\", value: \"SX\", disabled: false },\n      { name: \"Slovakia\", value: \"SK\", disabled: false },\n      { name: \"Slovenia\", value: \"SI\", disabled: false },\n      { name: \"Solomon Islands\", value: \"SB\", disabled: false },\n      { name: \"Somalia\", value: \"SO\", disabled: false },\n      { name: \"South Africa\", value: \"ZA\", disabled: false },\n      { name: \"South Georgia and the South Sandwich Islands\", value: \"GS\", disabled: false },\n      { name: \"South Sudan\", value: \"SS\", disabled: false },\n      { name: \"Spain\", value: \"ES\", disabled: false },\n      { name: \"Sri Lanka\", value: \"LK\", disabled: false },\n      { name: \"Sudan\", value: \"SD\", disabled: false },\n      { name: \"Suriname\", value: \"SR\", disabled: false },\n      { name: \"Svalbard and Jan Mayen\", value: \"SJ\", disabled: false },\n      { name: \"Swaziland\", value: \"SZ\", disabled: false },\n      { name: \"Sweden\", value: \"SE\", disabled: false },\n      { name: \"Switzerland\", value: \"CH\", disabled: false },\n      { name: \"Syrian Arab Republic\", value: \"SY\", disabled: false },\n      { name: \"Taiwan\", value: \"TW\", disabled: false },\n      { name: \"Tajikistan\", value: \"TJ\", disabled: false },\n      { name: \"Tanzania, United Republic of\", value: \"TZ\", disabled: false },\n      { name: \"Thailand\", value: \"TH\", disabled: false },\n      { name: \"Timor-Leste\", value: \"TL\", disabled: false },\n      { name: \"Togo\", value: \"TG\", disabled: false },\n      { name: \"Tokelau\", value: \"TK\", disabled: false },\n      { name: \"Tonga\", value: \"TO\", disabled: false },\n      { name: \"Trinidad and Tobago\", value: \"TT\", disabled: false },\n      { name: \"Tunisia\", value: \"TN\", disabled: false },\n      { name: \"Turkey\", value: \"TR\", disabled: false },\n      { name: \"Turkmenistan\", value: \"TM\", disabled: false },\n      { name: \"Turks and Caicos Islands\", value: \"TC\", disabled: false },\n      { name: \"Tuvalu\", value: \"TV\", disabled: false },\n      { name: \"Uganda\", value: \"UG\", disabled: false },\n      { name: \"Ukraine\", value: \"UA\", disabled: false },\n      { name: \"United Arab Emirates\", value: \"AE\", disabled: false },\n      { name: \"United States Minor Outlying Islands\", value: \"UM\", disabled: false },\n      { name: \"Uruguay\", value: \"UY\", disabled: false },\n      { name: \"Uzbekistan\", value: \"UZ\", disabled: false },\n      { name: \"Vanuatu\", value: \"VU\", disabled: false },\n      { name: \"Venezuela, Bolivarian Republic of\", value: \"VE\", disabled: false },\n      { name: \"Viet Nam\", value: \"VN\", disabled: false },\n      { name: \"Virgin Islands, British\", value: \"VG\", disabled: false },\n      { name: \"Virgin Islands, U.S.\", value: \"VI\", disabled: false },\n      { name: \"Wallis and Futuna\", value: \"WF\", disabled: false },\n      { name: \"Western Sahara\", value: \"EH\", disabled: false },\n      { name: \"Yemen\", value: \"YE\", disabled: false },\n      { name: \"Zambia\", value: \"ZM\", disabled: false },\n      { name: \"Zimbabwe\", value: \"ZW\", disabled: false },\n    ];\n  }\n\n  async isCountrySupported(country: string): Promise<boolean> {\n    const response = await this.apiService.send(\n      \"GET\",\n      \"/tax/is-country-supported?country=\" + country,\n      null,\n      true,\n      true,\n    );\n    return response;\n  }\n\n  async previewIndividualInvoice(\n    request: PreviewIndividualInvoiceRequest,\n  ): Promise<PreviewInvoiceResponse> {\n    const response = await this.apiService.send(\n      \"POST\",\n      \"/accounts/billing/preview-invoice\",\n      request,\n      true,\n      true,\n    );\n    return new PreviewInvoiceResponse(response);\n  }\n\n  async previewOrganizationInvoice(\n    request: PreviewOrganizationInvoiceRequest,\n  ): Promise<PreviewInvoiceResponse> {\n    const response = await this.apiService.send(\n      \"POST\",\n      `/invoices/preview-organization`,\n      request,\n      true,\n      true,\n    );\n    return new PreviewInvoiceResponse(response);\n  }\n}\n","import { ApiService } from \"../../../abstractions/api.service\";\nimport { ProviderApiServiceAbstraction } from \"../../abstractions/provider/provider-api.service.abstraction\";\nimport { ProviderSetupRequest } from \"../../models/request/provider/provider-setup.request\";\nimport { ProviderUpdateRequest } from \"../../models/request/provider/provider-update.request\";\nimport { ProviderVerifyRecoverDeleteRequest } from \"../../models/request/provider/provider-verify-recover-delete.request\";\nimport { ProviderResponse } from \"../../models/response/provider/provider.response\";\n\nexport class ProviderApiService implements ProviderApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n  async postProviderSetup(id: string, request: ProviderSetupRequest) {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/providers/\" + id + \"/setup\",\n      request,\n      true,\n      true,\n    );\n    return new ProviderResponse(r);\n  }\n\n  async getProvider(id: string) {\n    const r = await this.apiService.send(\"GET\", \"/providers/\" + id, null, true, true);\n    return new ProviderResponse(r);\n  }\n\n  async putProvider(id: string, request: ProviderUpdateRequest) {\n    const r = await this.apiService.send(\"PUT\", \"/providers/\" + id, request, true, true);\n    return new ProviderResponse(r);\n  }\n\n  providerRecoverDeleteToken(\n    providerId: string,\n    request: ProviderVerifyRecoverDeleteRequest,\n  ): Promise<any> {\n    return this.apiService.send(\n      \"POST\",\n      \"/providers/\" + providerId + \"/delete-recover-token\",\n      request,\n      false,\n      false,\n    );\n  }\n\n  async deleteProvider(id: string): Promise<void> {\n    await this.apiService.send(\"DELETE\", \"/providers/\" + id, null, true, false);\n  }\n}\n","import { Injector, WritableSignal } from \"@angular/core\";\nimport type { FormGroup } from \"@angular/forms\";\nimport type { Jsonify, JsonValue } from \"type-fest\";\n\ntype Deserializer<T> = {\n  /**\n   * A function to use to safely convert your type from json to your expected type.\n   *\n   * @param jsonValue The JSON object representation of your state.\n   * @returns The fully typed version of your state.\n   */\n  readonly deserializer?: (jsonValue: Jsonify<T>) => T;\n};\n\ntype BaseCacheOptions<T> = {\n  /** A unique key for saving the cached value to state */\n  key: string;\n\n  /** An optional injector. Required if the method is called outside of an injection context. */\n  injector?: Injector;\n} & (T extends JsonValue ? Deserializer<T> : Required<Deserializer<T>>);\n\nexport type SignalCacheOptions<T> = BaseCacheOptions<T> & {\n  /** The initial value for the signal. */\n  initialValue: T;\n};\n\n/** Extract the value type from a FormGroup */\ntype FormValue<TFormGroup extends FormGroup> = TFormGroup[\"value\"];\n\nexport type FormCacheOptions<TFormGroup extends FormGroup> = BaseCacheOptions<\n  FormValue<TFormGroup>\n> & {\n  control: TFormGroup;\n};\n\n/**\n * Cache for temporary component state\n *\n * #### Implementations\n * - browser extension popup: used to persist UI between popup open and close\n * - all other clients: noop\n */\nexport abstract class ViewCacheService {\n  /**\n   * Create a signal from a previously cached value. Whenever the signal is updated, the new value is saved to the cache.\n   *\n   * Non browser extension implementations are noop and return a normal signal.\n   *\n   * @returns the created signal\n   *\n   * @example\n   * ```ts\n   * const mySignal = this.viewCacheService.signal({\n   *   key: \"popup-search-text\"\n   *   initialValue: \"\"\n   * });\n   * ```\n   */\n  abstract signal<T>(options: SignalCacheOptions<T>): WritableSignal<T>;\n\n  /**\n   * - Initialize a form from a cached value\n   * - Save form value to cache when it changes\n   * - The form is marked dirty if the restored value is not `undefined`.\n   *\n   * Non browser extension implementations are noop and return the original form group.\n   *\n   * @example\n   * ```ts\n   * this.loginDetailsForm = this.viewCacheService.formGroup({\n   *   key: \"vault-login-details-form\",\n   *   control: this.formBuilder.group({\n   *     username: [\"\"],\n   *     email: [\"\"],\n   *   })\n   * });\n   * ```\n   **/\n  abstract formGroup<TFormGroup extends FormGroup>(\n    options: FormCacheOptions<TFormGroup>,\n  ): TFormGroup;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  combineLatest,\n  concatMap,\n  Observable,\n  shareReplay,\n  map,\n  distinctUntilChanged,\n  tap,\n  switchMap,\n  catchError,\n} from \"rxjs\";\n\nimport { KeyService, KdfConfigService, KdfConfig, KdfType } from \"@bitwarden/key-management\";\nimport {\n  BitwardenClient,\n  ClientSettings,\n  LogLevel,\n  DeviceType as SdkDeviceType,\n} from \"@bitwarden/sdk-internal\";\n\nimport { EncryptedOrganizationKeyData } from \"../../../admin-console/models/data/encrypted-organization-key.data\";\nimport { AccountInfo, AccountService } from \"../../../auth/abstractions/account.service\";\nimport { DeviceType } from \"../../../enums/device-type.enum\";\nimport { OrganizationId, UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { Environment, EnvironmentService } from \"../../abstractions/environment.service\";\nimport { PlatformUtilsService } from \"../../abstractions/platform-utils.service\";\nimport { SdkClientFactory } from \"../../abstractions/sdk/sdk-client-factory\";\nimport { SdkService } from \"../../abstractions/sdk/sdk.service\";\nimport { compareValues } from \"../../misc/compare-values\";\nimport { EncryptedString } from \"../../models/domain/enc-string\";\n\nexport class DefaultSdkService implements SdkService {\n  private sdkClientCache = new Map<UserId, Observable<BitwardenClient>>();\n\n  client$ = this.environmentService.environment$.pipe(\n    concatMap(async (env) => {\n      const settings = this.toSettings(env);\n      return await this.sdkClientFactory.createSdkClient(settings, LogLevel.Info);\n    }),\n    shareReplay({ refCount: true, bufferSize: 1 }),\n  );\n\n  version$ = this.client$.pipe(\n    map((client) => client.version()),\n    catchError(() => \"Unsupported\"),\n  );\n\n  constructor(\n    private sdkClientFactory: SdkClientFactory,\n    private environmentService: EnvironmentService,\n    private platformUtilsService: PlatformUtilsService,\n    private accountService: AccountService,\n    private kdfConfigService: KdfConfigService,\n    private keyService: KeyService,\n    private userAgent: string = null,\n  ) {}\n\n  userClient$(userId: UserId): Observable<BitwardenClient | undefined> {\n    // TODO: Figure out what happens when the user logs out\n    if (this.sdkClientCache.has(userId)) {\n      return this.sdkClientCache.get(userId);\n    }\n\n    const account$ = this.accountService.accounts$.pipe(\n      map((accounts) => accounts[userId]),\n      distinctUntilChanged(),\n    );\n    const kdfParams$ = this.kdfConfigService.getKdfConfig$(userId).pipe(distinctUntilChanged());\n    const privateKey$ = this.keyService\n      .userEncryptedPrivateKey$(userId)\n      .pipe(distinctUntilChanged());\n    const userKey$ = this.keyService.userKey$(userId).pipe(distinctUntilChanged());\n    const orgKeys$ = this.keyService.encryptedOrgKeys$(userId).pipe(\n      distinctUntilChanged(compareValues), // The upstream observable emits different objects with the same values\n    );\n\n    const client$ = combineLatest([\n      this.environmentService.getEnvironment$(userId),\n      account$,\n      kdfParams$,\n      privateKey$,\n      userKey$,\n      orgKeys$,\n    ]).pipe(\n      // switchMap is required to allow the clean-up logic to be executed when `combineLatest` emits a new value.\n      switchMap(([env, account, kdfParams, privateKey, userKey, orgKeys]) => {\n        // Create our own observable to be able to implement clean-up logic\n        return new Observable<BitwardenClient>((subscriber) => {\n          let client: BitwardenClient;\n\n          const createAndInitializeClient = async () => {\n            if (privateKey == null || userKey == null) {\n              return undefined;\n            }\n\n            const settings = this.toSettings(env);\n            client = await this.sdkClientFactory.createSdkClient(settings, LogLevel.Info);\n\n            await this.initializeClient(client, account, kdfParams, privateKey, userKey, orgKeys);\n\n            return client;\n          };\n\n          createAndInitializeClient()\n            .then((c) => {\n              client = c;\n              subscriber.next(c);\n            })\n            .catch((e) => {\n              subscriber.error(e);\n            });\n\n          return () => client?.free();\n        });\n      }),\n      tap({\n        finalize: () => this.sdkClientCache.delete(userId),\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    this.sdkClientCache.set(userId, client$);\n    return client$;\n  }\n\n  private async initializeClient(\n    client: BitwardenClient,\n    account: AccountInfo,\n    kdfParams: KdfConfig,\n    privateKey: EncryptedString,\n    userKey: UserKey,\n    orgKeys?: Record<OrganizationId, EncryptedOrganizationKeyData>,\n  ) {\n    await client.crypto().initialize_user_crypto({\n      email: account.email,\n      method: { decryptedKey: { decrypted_user_key: userKey.keyB64 } },\n      kdfParams:\n        kdfParams.kdfType === KdfType.PBKDF2_SHA256\n          ? {\n              pBKDF2: { iterations: kdfParams.iterations },\n            }\n          : {\n              argon2id: {\n                iterations: kdfParams.iterations,\n                memory: kdfParams.memory,\n                parallelism: kdfParams.parallelism,\n              },\n            },\n      privateKey,\n    });\n\n    // We initialize the org crypto even if the org_keys are\n    // null to make sure any existing org keys are cleared.\n    await client.crypto().initialize_org_crypto({\n      organizationKeys: new Map(\n        Object.entries(orgKeys ?? {})\n          .filter(([_, v]) => v.type === \"organization\")\n          .map(([k, v]) => [k, v.key]),\n      ),\n    });\n  }\n\n  private toSettings(env: Environment): ClientSettings {\n    return {\n      apiUrl: env.getApiUrl(),\n      identityUrl: env.getIdentityUrl(),\n      deviceType: this.toDevice(this.platformUtilsService.getDevice()),\n      userAgent: this.userAgent ?? navigator.userAgent,\n    };\n  }\n\n  private toDevice(device: DeviceType): SdkDeviceType {\n    switch (device) {\n      case DeviceType.Android:\n        return \"Android\";\n      case DeviceType.iOS:\n        return \"iOS\";\n      case DeviceType.ChromeExtension:\n        return \"ChromeExtension\";\n      case DeviceType.FirefoxExtension:\n        return \"FirefoxExtension\";\n      case DeviceType.OperaExtension:\n        return \"OperaExtension\";\n      case DeviceType.EdgeExtension:\n        return \"EdgeExtension\";\n      case DeviceType.WindowsDesktop:\n        return \"WindowsDesktop\";\n      case DeviceType.MacOsDesktop:\n        return \"MacOsDesktop\";\n      case DeviceType.LinuxDesktop:\n        return \"LinuxDesktop\";\n      case DeviceType.ChromeBrowser:\n        return \"ChromeBrowser\";\n      case DeviceType.FirefoxBrowser:\n        return \"FirefoxBrowser\";\n      case DeviceType.OperaBrowser:\n        return \"OperaBrowser\";\n      case DeviceType.EdgeBrowser:\n        return \"EdgeBrowser\";\n      case DeviceType.IEBrowser:\n        return \"IEBrowser\";\n      case DeviceType.UnknownBrowser:\n        return \"UnknownBrowser\";\n      case DeviceType.AndroidAmazon:\n        return \"AndroidAmazon\";\n      case DeviceType.UWP:\n        return \"UWP\";\n      case DeviceType.SafariBrowser:\n        return \"SafariBrowser\";\n      case DeviceType.VivaldiBrowser:\n        return \"VivaldiBrowser\";\n      case DeviceType.VivaldiExtension:\n        return \"VivaldiExtension\";\n      case DeviceType.SafariExtension:\n        return \"SafariExtension\";\n      case DeviceType.Server:\n        return \"Server\";\n      case DeviceType.WindowsCLI:\n        return \"WindowsCLI\";\n      case DeviceType.MacOsCLI:\n        return \"MacOsCLI\";\n      case DeviceType.LinuxCLI:\n        return \"LinuxCLI\";\n      default:\n        return \"SDK\";\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Subject } from \"rxjs\";\n\nimport { AbstractStorageService, StorageUpdate } from \"../abstractions/storage.service\";\n\nexport class MemoryStorageService extends AbstractStorageService {\n  protected store = new Map<string, unknown>();\n  private updatesSubject = new Subject<StorageUpdate>();\n\n  get valuesRequireDeserialization(): boolean {\n    return false;\n  }\n  get updates$() {\n    return this.updatesSubject.asObservable();\n  }\n\n  get<T>(key: string): Promise<T> {\n    if (this.store.has(key)) {\n      const obj = this.store.get(key);\n      return Promise.resolve(obj as T);\n    }\n    return Promise.resolve(null);\n  }\n\n  async has(key: string): Promise<boolean> {\n    return (await this.get(key)) != null;\n  }\n\n  save<T>(key: string, obj: T): Promise<void> {\n    if (obj == null) {\n      return this.remove(key);\n    }\n    // TODO: Remove once foreground/background contexts are separated in browser\n    // Needed to ensure ownership of all memory by the context running the storage service\n    const toStore = structuredClone(obj);\n    this.store.set(key, toStore);\n    this.updatesSubject.next({ key, updateType: \"save\" });\n    return Promise.resolve();\n  }\n\n  remove(key: string): Promise<void> {\n    this.store.delete(key);\n    this.updatesSubject.next({ key, updateType: \"remove\" });\n    return Promise.resolve();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, Subject } from \"rxjs\";\n\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n  StorageUpdate,\n} from \"../abstractions/storage.service\";\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\nexport class WindowStorageService implements AbstractStorageService, ObservableStorageService {\n  private readonly updatesSubject = new Subject<StorageUpdate>();\n\n  updates$: Observable<StorageUpdate>;\n  constructor(private readonly storage: Storage) {\n    this.updates$ = this.updatesSubject.asObservable();\n  }\n\n  get valuesRequireDeserialization(): boolean {\n    return true;\n  }\n\n  get<T>(key: string, options?: StorageOptions): Promise<T> {\n    const jsonValue = this.storage.getItem(key);\n    if (jsonValue != null) {\n      return Promise.resolve(JSON.parse(jsonValue) as T);\n    }\n\n    return Promise.resolve(null);\n  }\n\n  async has(key: string, options?: StorageOptions): Promise<boolean> {\n    return (await this.get(key, options)) != null;\n  }\n\n  save<T>(key: string, obj: T, options?: StorageOptions): Promise<void> {\n    if (obj == null) {\n      return this.remove(key, options);\n    }\n\n    if (obj instanceof Set) {\n      obj = Array.from(obj) as T;\n    }\n\n    this.storage.setItem(key, JSON.stringify(obj));\n    this.updatesSubject.next({ key, updateType: \"save\" });\n  }\n\n  remove(key: string, options?: StorageOptions): Promise<void> {\n    this.storage.removeItem(key);\n    this.updatesSubject.next({ key, updateType: \"remove\" });\n    return Promise.resolve();\n  }\n\n  getKeys(): string[] {\n    return Object.keys(this.storage);\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { DefaultSsoComponentService, SsoComponentService } from \"@bitwarden/auth/angular\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n/**\n * This service is used to handle the SSO login process for the web client.\n */\n@Injectable()\nexport class WebSsoComponentService\n  extends DefaultSsoComponentService\n  implements SsoComponentService\n{\n  constructor(private i18nService: I18nService) {\n    super();\n  }\n\n  setDocumentCookies() {\n    document.cookie = `ssoHandOffMessage=${this.i18nService.t(\"ssoHandOff\")};SameSite=strict`;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { Subject } from \"rxjs\";\n\nimport {\n  AbstractStorageService,\n  StorageUpdate,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { HtmlStorageLocation } from \"@bitwarden/common/platform/enums\";\nimport { StorageOptions } from \"@bitwarden/common/platform/models/domain/storage-options\";\n\n@Injectable()\nexport class HtmlStorageService implements AbstractStorageService {\n  private updatesSubject = new Subject<StorageUpdate>();\n\n  get defaultOptions(): StorageOptions {\n    return { htmlStorageLocation: HtmlStorageLocation.Session };\n  }\n\n  get valuesRequireDeserialization(): boolean {\n    return true;\n  }\n  updates$;\n\n  constructor() {\n    this.updates$ = this.updatesSubject.asObservable();\n  }\n\n  get<T>(key: string, options: StorageOptions = this.defaultOptions): Promise<T> {\n    let json: string = null;\n    switch (options.htmlStorageLocation) {\n      case HtmlStorageLocation.Local:\n        json = window.localStorage.getItem(key);\n        break;\n      case HtmlStorageLocation.Session:\n      default:\n        json = window.sessionStorage.getItem(key);\n        break;\n    }\n\n    if (json != null) {\n      const obj = JSON.parse(json);\n      return Promise.resolve(obj as T);\n    }\n    return Promise.resolve(null);\n  }\n\n  async has(key: string, options: StorageOptions = this.defaultOptions): Promise<boolean> {\n    return (await this.get(key, options)) != null;\n  }\n\n  save(key: string, obj: any, options: StorageOptions = this.defaultOptions): Promise<any> {\n    if (obj == null) {\n      return this.remove(key, options);\n    }\n\n    if (obj instanceof Set) {\n      obj = Array.from(obj);\n    }\n\n    const json = JSON.stringify(obj);\n    switch (options.htmlStorageLocation) {\n      case HtmlStorageLocation.Local:\n        window.localStorage.setItem(key, json);\n        break;\n      case HtmlStorageLocation.Session:\n      default:\n        window.sessionStorage.setItem(key, json);\n        break;\n    }\n    this.updatesSubject.next({ key, updateType: \"save\" });\n    return Promise.resolve();\n  }\n\n  remove(key: string, options: StorageOptions = this.defaultOptions): Promise<any> {\n    switch (options.htmlStorageLocation) {\n      case HtmlStorageLocation.Local:\n        window.localStorage.removeItem(key);\n        break;\n      case HtmlStorageLocation.Session:\n      default:\n        window.sessionStorage.removeItem(key);\n        break;\n    }\n    this.updatesSubject.next({ key, updateType: \"remove\" });\n    return Promise.resolve();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TranslationService as TranslationServiceAbstraction } from \"../abstractions/translation.service\";\n\nexport abstract class TranslationService implements TranslationServiceAbstraction {\n  // First locale is the default (English)\n  supportedTranslationLocales: string[] = [\"en\"];\n  defaultLocale = \"en\";\n  abstract translationLocale: string;\n  collator: Intl.Collator;\n  localeNames = new Map<string, string>([\n    [\"af\", \"Afrikaans\"],\n    [\"ar\", \"العربية الفصحى\"],\n    [\"az\", \"Azərbaycanca\"],\n    [\"be\", \"Беларуская\"],\n    [\"bg\", \"български\"],\n    [\"bn\", \"বাংলা\"],\n    [\"bs\", \"bosanski jezik\"],\n    [\"ca\", \"català\"],\n    [\"cs\", \"čeština\"],\n    [\"cy\", \"Cymraeg, y Gymraeg\"],\n    [\"da\", \"dansk\"],\n    [\"de\", \"Deutsch\"],\n    [\"el\", \"Ελληνικά\"],\n    [\"en\", \"English\"],\n    [\"en-GB\", \"English (British)\"],\n    [\"en-IN\", \"English (India)\"],\n    [\"eo\", \"Esperanto\"],\n    [\"es\", \"español\"],\n    [\"et\", \"eesti\"],\n    [\"eu\", \"euskara\"],\n    [\"fa\", \"فارسی\"],\n    [\"fi\", \"suomi\"],\n    [\"fil\", \"Wikang Filipino\"],\n    [\"fr\", \"français\"],\n    [\"gl\", \"galego\"],\n    [\"he\", \"עברית\"],\n    [\"hi\", \"हिन्दी\"],\n    [\"hr\", \"hrvatski\"],\n    [\"hu\", \"magyar\"],\n    [\"id\", \"Bahasa Indonesia\"],\n    [\"it\", \"italiano\"],\n    [\"ja\", \"日本語\"],\n    [\"ka\", \"ქართული\"],\n    [\"km\", \"ខ្មែរ, ខេមរភាសា, ភាសាខ្មែរ\"],\n    [\"kn\", \"ಕನ್ನಡ\"],\n    [\"ko\", \"한국어\"],\n    [\"lt\", \"lietuvių kalba\"],\n    [\"lv\", \"Latvietis\"],\n    [\"me\", \"црногорски\"],\n    [\"ml\", \"മലയാളം\"],\n    [\"mr\", \"मराठी\"],\n    [\"my\", \"ဗမာစကား\"],\n    [\"nb\", \"norsk (bokmål)\"],\n    [\"ne\", \"नेपाली\"],\n    [\"nl\", \"Nederlands\"],\n    [\"nn\", \"Norsk Nynorsk\"],\n    [\"or\", \"ଓଡ଼ିଆ\"],\n    [\"pl\", \"polski\"],\n    [\"pt-BR\", \"português do Brasil\"],\n    [\"pt-PT\", \"português\"],\n    [\"ro\", \"română\"],\n    [\"ru\", \"русский\"],\n    [\"si\", \"සිංහල\"],\n    [\"sk\", \"slovenčina\"],\n    [\"sl\", \"Slovenski jezik, Slovenščina\"],\n    [\"sr\", \"Српски\"],\n    [\"sv\", \"svenska\"],\n    [\"te\", \"తెలుగు\"],\n    [\"th\", \"ไทย\"],\n    [\"tr\", \"Türkçe\"],\n    [\"uk\", \"українська\"],\n    [\"vi\", \"Tiếng Việt\"],\n    [\"zh-CN\", \"中文(中国大陆)\"],\n    [\"zh-TW\", \"中文(台灣)\"],\n  ]);\n\n  protected inited: boolean;\n  protected defaultMessages: any = {};\n  protected localeMessages: any = {};\n\n  constructor(\n    protected systemLanguage: string,\n    protected localesDirectory: string,\n    protected getLocalesJson: (formattedLocale: string) => Promise<any>,\n  ) {\n    this.systemLanguage = systemLanguage.replace(\"_\", \"-\");\n  }\n\n  async init(locale?: string) {\n    if (this.inited) {\n      throw new Error(\"i18n already initialized.\");\n    }\n    if (this.supportedTranslationLocales == null || this.supportedTranslationLocales.length === 0) {\n      throw new Error(\"supportedTranslationLocales not set.\");\n    }\n\n    this.inited = true;\n    this.translationLocale = locale != null ? locale : this.systemLanguage;\n\n    try {\n      this.collator = new Intl.Collator(this.translationLocale, {\n        numeric: true,\n        sensitivity: \"base\",\n      });\n    } catch {\n      this.collator = null;\n    }\n\n    if (this.supportedTranslationLocales.indexOf(this.translationLocale) === -1) {\n      this.translationLocale = this.translationLocale.slice(0, 2);\n\n      if (this.supportedTranslationLocales.indexOf(this.translationLocale) === -1) {\n        this.translationLocale = this.defaultLocale;\n      }\n    }\n\n    if (this.localesDirectory != null) {\n      await this.loadMessages(this.translationLocale, this.localeMessages);\n      if (this.translationLocale !== this.defaultLocale) {\n        await this.loadMessages(this.defaultLocale, this.defaultMessages);\n      }\n    }\n  }\n\n  t(id: string, p1?: string, p2?: string, p3?: string): string {\n    return this.translate(id, p1, p2, p3);\n  }\n\n  translate(id: string, p1?: string | number, p2?: string | number, p3?: string | number): string {\n    let result: string;\n    // eslint-disable-next-line\n    if (this.localeMessages.hasOwnProperty(id) && this.localeMessages[id]) {\n      result = this.localeMessages[id];\n      // eslint-disable-next-line\n    } else if (this.defaultMessages.hasOwnProperty(id) && this.defaultMessages[id]) {\n      result = this.defaultMessages[id];\n    } else {\n      result = \"\";\n    }\n\n    if (result !== \"\") {\n      if (p1 != null) {\n        result = result.split(\"__$1__\").join(p1.toString());\n      }\n      if (p2 != null) {\n        result = result.split(\"__$2__\").join(p2.toString());\n      }\n      if (p3 != null) {\n        result = result.split(\"__$3__\").join(p3.toString());\n      }\n    }\n\n    return result;\n  }\n\n  protected async loadMessages(locale: string, messagesObj: any): Promise<any> {\n    const formattedLocale = locale.replace(\"-\", \"_\");\n    const locales = await this.getLocalesJson(formattedLocale);\n    for (const prop in locales) {\n      // eslint-disable-next-line\n      if (!locales.hasOwnProperty(prop)) {\n        continue;\n      }\n      messagesObj[prop] = locales[prop].message;\n\n      if (locales[prop].placeholders) {\n        for (const placeProp in locales[prop].placeholders) {\n          if (\n            !locales[prop].placeholders.hasOwnProperty(placeProp) || // eslint-disable-line\n            !locales[prop].placeholders[placeProp].content\n          ) {\n            continue;\n          }\n\n          const replaceToken = \"\\\\$\" + placeProp.toUpperCase() + \"\\\\$\";\n          let replaceContent = locales[prop].placeholders[placeProp].content;\n          if (replaceContent === \"$1\" || replaceContent === \"$2\" || replaceContent === \"$3\") {\n            replaceContent = \"__$\" + replaceContent + \"__\";\n          }\n          messagesObj[prop] = messagesObj[prop].replace(\n            new RegExp(replaceToken, \"g\"),\n            replaceContent,\n          );\n        }\n      }\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, firstValueFrom, map } from \"rxjs\";\n\nimport { I18nService as I18nServiceAbstraction } from \"../abstractions/i18n.service\";\nimport { GlobalState, GlobalStateProvider, KeyDefinition, TRANSLATION_DISK } from \"../state\";\n\nimport { TranslationService } from \"./translation.service\";\n\nconst LOCALE_KEY = new KeyDefinition<string>(TRANSLATION_DISK, \"locale\", {\n  deserializer: (value) => value,\n});\n\nexport class I18nService extends TranslationService implements I18nServiceAbstraction {\n  translationLocale: string;\n  protected translationLocaleState: GlobalState<string>;\n  userSetLocale$: Observable<string | undefined>;\n  locale$: Observable<string>;\n\n  constructor(\n    protected systemLanguage: string,\n    protected localesDirectory: string,\n    protected getLocalesJson: (formattedLocale: string) => Promise<any>,\n    globalStateProvider: GlobalStateProvider,\n  ) {\n    super(systemLanguage, localesDirectory, getLocalesJson);\n    this.translationLocaleState = globalStateProvider.get(LOCALE_KEY);\n    this.userSetLocale$ = this.translationLocaleState.state$;\n    this.locale$ = this.userSetLocale$.pipe(map((locale) => locale ?? this.translationLocale));\n  }\n\n  async setLocale(locale: string): Promise<void> {\n    await this.translationLocaleState.update(() => locale);\n  }\n\n  override async init() {\n    const storedLocale = await firstValueFrom(this.translationLocaleState.state$);\n    await super.init(storedLocale);\n  }\n}\n","// Please leave 'en' where it is, as it's our fallback language in case no translation can be found\nexport const SupportedTranslationLocales: string[] = [\n  \"en\",\n  \"af\",\n  \"ar\",\n  \"az\",\n  \"be\",\n  \"bg\",\n  \"bn\",\n  \"bs\",\n  \"ca\",\n  \"cs\",\n  \"cy\",\n  \"da\",\n  \"de\",\n  \"el\",\n  \"en-GB\",\n  \"en-IN\",\n  \"eo\",\n  \"es\",\n  \"et\",\n  \"eu\",\n  \"fa\",\n  \"fi\",\n  \"fil\",\n  \"fr\",\n  \"gl\",\n  \"he\",\n  \"hi\",\n  \"hr\",\n  \"hu\",\n  \"id\",\n  \"it\",\n  \"ja\",\n  \"ka\",\n  \"km\",\n  \"kn\",\n  \"ko\",\n  \"lv\",\n  \"ml\",\n  \"mr\",\n  \"my\",\n  \"nb\",\n  \"ne\",\n  \"nl\",\n  \"nn\",\n  \"or\",\n  \"pl\",\n  \"pt-PT\",\n  \"pt-BR\",\n  \"ro\",\n  \"ru\",\n  \"si\",\n  \"sk\",\n  \"sl\",\n  \"sr\",\n  \"sv\",\n  \"te\",\n  \"th\",\n  \"tr\",\n  \"uk\",\n  \"vi\",\n  \"zh-CN\",\n  \"zh-TW\",\n];\n","import { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { BiometricsService, BiometricsStatus } from \"@bitwarden/key-management\";\n\nexport class WebBiometricsService extends BiometricsService {\n  async authenticateWithBiometrics(): Promise<boolean> {\n    return false;\n  }\n\n  async getBiometricsStatus(): Promise<BiometricsStatus> {\n    return BiometricsStatus.PlatformUnsupported;\n  }\n\n  async unlockWithBiometricsForUser(userId: UserId): Promise<UserKey | null> {\n    return null;\n  }\n\n  async getBiometricsStatusForUser(userId: UserId): Promise<BiometricsStatus> {\n    return BiometricsStatus.PlatformUnsupported;\n  }\n\n  async getShouldAutopromptNow(): Promise<boolean> {\n    return false;\n  }\n\n  async setShouldAutopromptNow(value: boolean): Promise<void> {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, ReplaySubject } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport {\n  Environment,\n  Region,\n  RegionConfig,\n  Urls,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport {\n  CloudEnvironment,\n  DefaultEnvironmentService,\n  SelfHostedEnvironment,\n} from \"@bitwarden/common/platform/services/default-environment.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nexport type WebRegionConfig = RegionConfig & {\n  key: Region | string; // strings are used for custom environments\n  domain: string;\n  urls: Urls;\n};\n\n/**\n * Web specific environment service. Ensures that the urls are set from the window location.\n */\nexport class WebEnvironmentService extends DefaultEnvironmentService {\n  constructor(\n    private win: Window,\n    stateProvider: StateProvider,\n    accountService: AccountService,\n    additionalRegionConfigs: WebRegionConfig[] = [],\n    private router: Router,\n    private envUrls: Urls,\n  ) {\n    super(stateProvider, accountService, additionalRegionConfigs);\n\n    // The web vault always uses the current location as the base url\n    // If the base URL is `https://vaultwarden.example.com/base/path/`,\n    // `window.location.href` should have one of the following forms:\n    //\n    // - `https://vaultwarden.example.com/base/path/`\n    // - `https://vaultwarden.example.com/base/path/#/some/route[?queryParam=...]`\n    // - `https://vaultwarden.example.com/base/path/?queryParam=...`\n    //\n    // We want to get to just `https://vaultwarden.example.com/base/path`.\n    let baseUrl = this.win.location.href;\n    baseUrl = baseUrl.replace(/(\\/+|\\/*#.*|\\/*\\?.*)$/, \"\"); // Strip off trailing `/`, `#`, `?` and everything after.\n    envUrls.base ??= baseUrl;\n\n    // Find the region\n    const currentHostname = new URL(this.win.location.href).hostname;\n    const availableRegions = this.availableRegions();\n    const region = availableRegions.find((r) => {\n      // We must use hostname as our QA envs use the same\n      // domain (bitwarden.pw) but different subdomains (qa and euqa)\n      const webVaultHostname = new URL(r.urls.webVault).hostname;\n      return webVaultHostname === currentHostname;\n    });\n\n    let environment: Environment;\n    if (region) {\n      environment = new WebCloudEnvironment(region, envUrls);\n    } else {\n      environment = new SelfHostedEnvironment(envUrls);\n    }\n\n    // Override the environment observable with a replay subject\n    const subject = new ReplaySubject<Environment>(1);\n    subject.next(environment);\n    this.environment$ = subject.asObservable();\n  }\n\n  // Web setting env means navigating to a new location\n  async setEnvironment(region: Region | string, urls?: Urls): Promise<Urls> {\n    if (region === Region.SelfHosted) {\n      throw new Error(\"setEnvironment does not work in web for self-hosted.\");\n    }\n\n    // Find the region\n    const currentHostname = new URL(this.win.location.href).hostname;\n    const availableRegions = this.availableRegions();\n    const currentRegionConfig = availableRegions.find((r) => {\n      // We must use hostname as our QA envs use the same\n      // domain (bitwarden.pw) but different subdomains (qa and euqa)\n      const webVaultHostname = new URL(r.urls.webVault).hostname;\n      return webVaultHostname === currentHostname;\n    });\n\n    if (currentRegionConfig.key === region) {\n      // They have selected the current region, return the current env urls\n      // We can't return the region urls because the env base url is modified\n      // in the constructor to match the current window.location.origin.\n      const currentEnv = await firstValueFrom(this.environment$);\n      return currentEnv.getUrls();\n    }\n\n    const chosenRegionConfig = this.availableRegions().find((r) => r.key === region);\n\n    if (chosenRegionConfig == null) {\n      throw new Error(\"The selected region is not known as an available region.\");\n    }\n\n    // Preserve the current in app route + params in the new location\n    const routeAndParams = `/#${this.router.url}`;\n    this.win.location.href = chosenRegionConfig.urls.webVault + routeAndParams;\n\n    // This return shouldn't matter as we are about to leave the current window\n    return chosenRegionConfig.urls;\n  }\n}\n\nexport class WebCloudEnvironment extends CloudEnvironment {\n  constructor(config: RegionConfig, urls: Urls) {\n    super(config);\n    // We override the urls to avoid CORS issues\n    this.urls = urls;\n  }\n}\n","import { ClientType } from \"@bitwarden/common/enums\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { WindowStorageService } from \"@bitwarden/common/platform/storage/window-storage.service\";\nimport { MigrationHelper } from \"@bitwarden/common/state-migrations/migration-helper\";\n\nexport class WebMigrationRunner extends MigrationRunner {\n  constructor(\n    diskStorage: AbstractStorageService,\n    logService: LogService,\n    migrationBuilderService: MigrationBuilderService,\n    private diskLocalStorage: WindowStorageService,\n  ) {\n    super(diskStorage, logService, migrationBuilderService, ClientType.Web);\n  }\n\n  override async run(): Promise<void> {\n    // Run the default migration against session storage\n    await super.run();\n\n    // run web disk local specific migrations\n    const migrationBuilder = this.migrationBuilderService.build();\n\n    let stateVersion = await this.diskLocalStorage.get<number | null>(\"stateVersion\");\n    if (stateVersion == null) {\n      // Web has never stored a state version in disk local before\n      // TODO: Is this a good number?\n      stateVersion = 12;\n    }\n\n    // Run migrations again specifically for web `localStorage`.\n    const helper = new WebMigrationHelper(stateVersion, this.diskLocalStorage, this.logService);\n\n    await migrationBuilder.migrate(helper);\n  }\n}\n\nclass WebMigrationHelper extends MigrationHelper {\n  private readonly diskLocalStorageService: WindowStorageService;\n\n  constructor(\n    currentVersion: number,\n    storageService: WindowStorageService,\n    logService: LogService,\n  ) {\n    super(currentVersion, storageService, logService, \"web-disk-local\", ClientType.Web);\n    this.diskLocalStorageService = storageService;\n  }\n\n  override async getAccounts<ExpectedAccountType>(): Promise<\n    { userId: string; account: ExpectedAccountType }[]\n  > {\n    // Get all the keys of things stored in `localStorage`\n    const keys = this.diskLocalStorageService.getKeys();\n\n    const accounts: { userId: string; account: ExpectedAccountType }[] = [];\n\n    for (const key of keys) {\n      // Is this is likely a userid\n      if (!Utils.isGuid(key)) {\n        continue;\n      }\n\n      const accountCandidate = await this.diskLocalStorageService.get(key);\n\n      // If there isn't data at that key location, don't bother\n      if (accountCandidate == null) {\n        continue;\n      }\n\n      // The legacy account object was always an object, if\n      // it is some other primitive, it's like a false positive.\n      if (typeof accountCandidate !== \"object\") {\n        continue;\n      }\n\n      accounts.push({ userId: key, account: accountCandidate as ExpectedAccountType });\n    }\n\n    // TODO: Cache this for future calls?\n    return accounts;\n  }\n}\n","import { SdkClientFactory } from \"@bitwarden/common/platform/abstractions/sdk/sdk-client-factory\";\nimport * as sdk from \"@bitwarden/sdk-internal\";\n\n/**\n * SDK client factory with a js fallback for when WASM is not supported.\n */\nexport class WebSdkClientFactory implements SdkClientFactory {\n  async createSdkClient(\n    ...args: ConstructorParameters<typeof sdk.BitwardenClient>\n  ): Promise<sdk.BitwardenClient> {\n    const module = await load();\n\n    (sdk as any).init(module);\n\n    return Promise.resolve(new sdk.BitwardenClient(...args));\n  }\n}\n\n// https://stackoverflow.com/a/47880734\nconst supported = (() => {\n  try {\n    if (typeof WebAssembly === \"object\" && typeof WebAssembly.instantiate === \"function\") {\n      const module = new WebAssembly.Module(\n        Uint8Array.of(0x0, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00),\n      );\n      if (module instanceof WebAssembly.Module) {\n        return new WebAssembly.Instance(module) instanceof WebAssembly.Instance;\n      }\n    }\n  } catch (e) {\n    // ignore\n  }\n  return false;\n})();\n\nasync function load() {\n  if (supported) {\n    return await import(\"@bitwarden/sdk-internal/bitwarden_wasm_internal_bg.wasm\");\n  } else {\n    return await import(\"@bitwarden/sdk-internal/bitwarden_wasm_internal_bg.wasm.js\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { DeviceType, EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { EventResponse } from \"@bitwarden/common/models/response/event.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Injectable()\nexport class EventService {\n  private policies: Policy[];\n\n  constructor(\n    private i18nService: I18nService,\n    policyService: PolicyService,\n    private configService: ConfigService,\n  ) {\n    policyService.policies$.subscribe((policies) => {\n      this.policies = policies;\n    });\n  }\n\n  getDefaultDateFilters() {\n    const d = new Date();\n    const end = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 23, 59);\n    d.setDate(d.getDate() - 30);\n    const start = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0);\n    return [this.toDateTimeLocalString(start), this.toDateTimeLocalString(end)];\n  }\n\n  formatDateFilters(filterStart: string, filterEnd: string) {\n    const start: Date = new Date(filterStart);\n    const end: Date = new Date(filterEnd + \":59.999\");\n    if (isNaN(start.getTime()) || isNaN(end.getTime()) || end < start) {\n      throw new Error(\"Invalid date range.\");\n    }\n    return [start.toISOString(), end.toISOString()];\n  }\n\n  async getEventInfo(ev: EventResponse, options = new EventOptions()): Promise<EventInfo> {\n    const appInfo = this.getAppInfo(ev);\n    const { message, humanReadableMessage } = await this.getEventMessage(ev, options);\n    return {\n      message: message,\n      humanReadableMessage: humanReadableMessage,\n      appIcon: appInfo[0],\n      appName: appInfo[1],\n    };\n  }\n\n  private async getEventMessage(ev: EventResponse, options: EventOptions) {\n    let msg = \"\";\n    let humanReadableMsg = \"\";\n    switch (ev.type) {\n      // User\n      case EventType.User_LoggedIn:\n        msg = humanReadableMsg = this.i18nService.t(\"loggedIn\");\n        break;\n      case EventType.User_ChangedPassword:\n        msg = humanReadableMsg = this.i18nService.t(\"changedPassword\");\n        break;\n      case EventType.User_Updated2fa:\n        msg = humanReadableMsg = this.i18nService.t(\"enabledUpdated2fa\");\n        break;\n      case EventType.User_Disabled2fa:\n        msg = humanReadableMsg = this.i18nService.t(\"disabled2fa\");\n        break;\n      case EventType.User_Recovered2fa:\n        msg = humanReadableMsg = this.i18nService.t(\"recovered2fa\");\n        break;\n      case EventType.User_FailedLogIn:\n        msg = humanReadableMsg = this.i18nService.t(\"failedLogin\");\n        break;\n      case EventType.User_FailedLogIn2fa:\n        msg = humanReadableMsg = this.i18nService.t(\"failedLogin2fa\");\n        break;\n      case EventType.User_ClientExportedVault:\n        msg = humanReadableMsg = this.i18nService.t(\"exportedVault\");\n        break;\n      case EventType.User_UpdatedTempPassword:\n        msg = humanReadableMsg = this.i18nService.t(\"updatedTempPassword\");\n        break;\n      case EventType.User_MigratedKeyToKeyConnector:\n        msg = humanReadableMsg = this.i18nService.t(\"migratedKeyConnector\");\n        break;\n      case EventType.User_RequestedDeviceApproval:\n        msg = humanReadableMsg = this.i18nService.t(\"requestedDeviceApproval\");\n        break;\n      case EventType.User_TdeOffboardingPasswordSet:\n        msg = humanReadableMsg = this.i18nService.t(\"tdeOffboardingPasswordSet\");\n        break;\n      // Cipher\n      case EventType.Cipher_Created:\n        msg = this.i18nService.t(\"createdItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"createdItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_Updated:\n        msg = this.i18nService.t(\"editedItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"editedItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_Deleted:\n        msg = this.i18nService.t(\"permanentlyDeletedItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"permanentlyDeletedItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_SoftDeleted:\n        msg = this.i18nService.t(\"deletedItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"deletedItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_Restored:\n        msg = this.i18nService.t(\"restoredItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"restoredItemId\", this.formatCipherId(ev, options));\n        break;\n      case EventType.Cipher_AttachmentCreated:\n        msg = this.i18nService.t(\"createdAttachmentForItem\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"createdAttachmentForItem\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_AttachmentDeleted:\n        msg = this.i18nService.t(\"deletedAttachmentForItem\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"deletedAttachmentForItem\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_Shared:\n        msg = this.i18nService.t(\"movedItemIdToOrg\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"movedItemIdToOrg\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_ClientViewed:\n        msg = this.i18nService.t(\"viewedItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"viewedItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_ClientToggledPasswordVisible:\n        msg = this.i18nService.t(\"viewedPasswordItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"viewedPasswordItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_ClientToggledHiddenFieldVisible:\n        msg = this.i18nService.t(\"viewedHiddenFieldItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"viewedHiddenFieldItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_ClientToggledCardNumberVisible:\n        msg = this.i18nService.t(\"viewedCardNumberItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"viewedCardNumberItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_ClientToggledCardCodeVisible:\n        msg = this.i18nService.t(\"viewedSecurityCodeItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"viewedSecurityCodeItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_ClientCopiedHiddenField:\n        msg = this.i18nService.t(\"copiedHiddenFieldItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"copiedHiddenFieldItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_ClientCopiedPassword:\n        msg = this.i18nService.t(\"copiedPasswordItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"copiedPasswordItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_ClientCopiedCardCode:\n        msg = this.i18nService.t(\"copiedSecurityCodeItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"copiedSecurityCodeItemId\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      case EventType.Cipher_ClientAutofilled:\n        msg = this.i18nService.t(\"autofilledItemId\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\"autofilledItemId\", this.getShortId(ev.cipherId));\n        break;\n      case EventType.Cipher_UpdatedCollections:\n        msg = this.i18nService.t(\"editedCollectionsForItem\", this.formatCipherId(ev, options));\n        humanReadableMsg = this.i18nService.t(\n          \"editedCollectionsForItem\",\n          this.getShortId(ev.cipherId),\n        );\n        break;\n      // Collection\n      case EventType.Collection_Created:\n        msg = this.i18nService.t(\"createdCollectionId\", this.formatCollectionId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"createdCollectionId\",\n          this.getShortId(ev.collectionId),\n        );\n        break;\n      case EventType.Collection_Updated:\n        msg = this.i18nService.t(\"editedCollectionId\", this.formatCollectionId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"editedCollectionId\",\n          this.getShortId(ev.collectionId),\n        );\n        break;\n      case EventType.Collection_Deleted:\n        msg = this.i18nService.t(\"deletedCollectionId\", this.formatCollectionId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"deletedCollectionId\",\n          this.getShortId(ev.collectionId),\n        );\n        break;\n      // Group\n      case EventType.Group_Created:\n        msg = this.i18nService.t(\"createdGroupId\", this.formatGroupId(ev));\n        humanReadableMsg = this.i18nService.t(\"createdGroupId\", this.getShortId(ev.groupId));\n        break;\n      case EventType.Group_Updated:\n        msg = this.i18nService.t(\"editedGroupId\", this.formatGroupId(ev));\n        humanReadableMsg = this.i18nService.t(\"editedGroupId\", this.getShortId(ev.groupId));\n        break;\n      case EventType.Group_Deleted:\n        msg = this.i18nService.t(\"deletedGroupId\", this.formatGroupId(ev));\n        humanReadableMsg = this.i18nService.t(\"deletedGroupId\", this.getShortId(ev.groupId));\n        break;\n      // Org user\n      case EventType.OrganizationUser_Invited:\n        msg = this.i18nService.t(\"invitedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"invitedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Confirmed:\n        msg = this.i18nService.t(\"confirmedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"confirmedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Updated:\n        msg = this.i18nService.t(\"editedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"editedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Removed:\n        msg = this.i18nService.t(\"removedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"removedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_UpdatedGroups:\n        msg = this.i18nService.t(\"editedGroupsForUser\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"editedGroupsForUser\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_UnlinkedSso:\n        msg = this.i18nService.t(\"unlinkedSsoUser\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"unlinkedSsoUser\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_ResetPassword_Enroll:\n        msg = this.i18nService.t(\"eventEnrollAccountRecovery\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"eventEnrollAccountRecovery\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_ResetPassword_Withdraw:\n        msg = this.i18nService.t(\"eventWithdrawAccountRecovery\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"eventWithdrawAccountRecovery\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_AdminResetPassword:\n        msg = this.i18nService.t(\"eventAdminPasswordReset\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"eventAdminPasswordReset\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_ResetSsoLink:\n        msg = this.i18nService.t(\"eventResetSsoLink\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"eventResetSsoLink\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_FirstSsoLogin:\n        msg = this.i18nService.t(\"firstSsoLogin\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"firstSsoLogin\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Revoked:\n        msg = this.i18nService.t(\"revokedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"revokedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Restored:\n        msg = this.i18nService.t(\"restoredUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"restoredUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_ApprovedAuthRequest:\n        msg = this.i18nService.t(\"approvedAuthRequest\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"approvedAuthRequest\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_RejectedAuthRequest:\n        msg = this.i18nService.t(\"rejectedAuthRequest\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"rejectedAuthRequest\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Deleted:\n        msg = this.i18nService.t(\"deletedUserId\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"deletedUserId\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      case EventType.OrganizationUser_Left:\n        msg = this.i18nService.t(\"userLeftOrganization\", this.formatOrgUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"userLeftOrganization\",\n          this.getShortId(ev.organizationUserId),\n        );\n        break;\n      // Org\n      case EventType.Organization_Updated:\n        msg = humanReadableMsg = this.i18nService.t(\"editedOrgSettings\");\n        break;\n      case EventType.Organization_PurgedVault:\n        msg = humanReadableMsg = this.i18nService.t(\"purgedOrganizationVault\");\n        break;\n      case EventType.Organization_ClientExportedVault:\n        msg = humanReadableMsg = this.i18nService.t(\"exportedOrganizationVault\");\n        break;\n      case EventType.Organization_VaultAccessed:\n        msg = humanReadableMsg = this.i18nService.t(\"vaultAccessedByProvider\");\n        break;\n      case EventType.Organization_EnabledSso:\n        msg = humanReadableMsg = this.i18nService.t(\"enabledSso\");\n        break;\n      case EventType.Organization_DisabledSso:\n        msg = humanReadableMsg = this.i18nService.t(\"disabledSso\");\n        break;\n      case EventType.Organization_EnabledKeyConnector:\n        msg = humanReadableMsg = this.i18nService.t(\"enabledKeyConnector\");\n        break;\n      case EventType.Organization_DisabledKeyConnector:\n        msg = humanReadableMsg = this.i18nService.t(\"disabledKeyConnector\");\n        break;\n      case EventType.Organization_SponsorshipsSynced:\n        msg = humanReadableMsg = this.i18nService.t(\"sponsorshipsSynced\");\n        break;\n      case EventType.Organization_CollectionManagementUpdated:\n        msg = this.i18nService.t(\"modifiedCollectionManagement\", this.formatOrganizationId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"modifiedCollectionManagement\",\n          this.getShortId(ev.organizationId),\n        );\n        break;\n\n      // Policies\n      case EventType.Policy_Updated: {\n        msg = this.i18nService.t(\"modifiedPolicyId\", this.formatPolicyId(ev));\n\n        const policy = this.policies.filter((p) => p.id === ev.policyId)[0];\n        let p1 = this.getShortId(ev.policyId);\n        if (policy != null) {\n          p1 = PolicyType[policy.type];\n        }\n\n        humanReadableMsg = this.i18nService.t(\"modifiedPolicyId\", p1);\n        break;\n      }\n      // Provider users:\n      case EventType.ProviderUser_Invited:\n        msg = this.i18nService.t(\"invitedUserId\", this.formatProviderUserId(ev));\n        humanReadableMsg = this.i18nService.t(\"invitedUserId\", this.getShortId(ev.providerUserId));\n        break;\n      case EventType.ProviderUser_Confirmed:\n        msg = this.i18nService.t(\"confirmedUserId\", this.formatProviderUserId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"confirmedUserId\",\n          this.getShortId(ev.providerUserId),\n        );\n        break;\n      case EventType.ProviderUser_Updated:\n        msg = this.i18nService.t(\"editedUserId\", this.formatProviderUserId(ev));\n        humanReadableMsg = this.i18nService.t(\"editedUserId\", this.getShortId(ev.providerUserId));\n        break;\n      case EventType.ProviderUser_Removed:\n        msg = this.i18nService.t(\"removedUserId\", this.formatProviderUserId(ev));\n        humanReadableMsg = this.i18nService.t(\"removedUserId\", this.getShortId(ev.providerUserId));\n        break;\n      case EventType.ProviderOrganization_Created:\n        msg = this.i18nService.t(\"createdOrganizationId\", this.formatProviderOrganizationId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"createdOrganizationId\",\n          this.getShortId(ev.providerOrganizationId),\n        );\n        break;\n      case EventType.ProviderOrganization_Added:\n        msg = this.i18nService.t(\"addedOrganizationId\", this.formatProviderOrganizationId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"addedOrganizationId\",\n          this.getShortId(ev.providerOrganizationId),\n        );\n        break;\n      case EventType.ProviderOrganization_Removed:\n        msg = this.i18nService.t(\"removedOrganizationId\", this.formatProviderOrganizationId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"removedOrganizationId\",\n          this.getShortId(ev.providerOrganizationId),\n        );\n        break;\n      case EventType.ProviderOrganization_VaultAccessed:\n        msg = this.i18nService.t(\"accessedClientVault\", this.formatProviderOrganizationId(ev));\n        humanReadableMsg = this.i18nService.t(\n          \"accessedClientVault\",\n          this.getShortId(ev.providerOrganizationId),\n        );\n        break;\n      // Org Domain claiming events\n      case EventType.OrganizationDomain_Added:\n        msg = humanReadableMsg = this.i18nService.t(\"addedDomain\", ev.domainName);\n        break;\n      case EventType.OrganizationDomain_Removed:\n        msg = humanReadableMsg = this.i18nService.t(\"removedDomain\", ev.domainName);\n        break;\n      case EventType.OrganizationDomain_Verified:\n        msg = humanReadableMsg = this.i18nService.t(\n          (await this.configService.getFeatureFlag(FeatureFlag.AccountDeprovisioning))\n            ? \"domainClaimedEvent\"\n            : \"domainVerifiedEvent\",\n          ev.domainName,\n        );\n        break;\n      case EventType.OrganizationDomain_NotVerified:\n        msg = humanReadableMsg = this.i18nService.t(\n          (await this.configService.getFeatureFlag(FeatureFlag.AccountDeprovisioning))\n            ? \"domainNotClaimedEvent\"\n            : \"domainNotVerifiedEvent\",\n          ev.domainName,\n        );\n        break;\n      // Secrets Manager\n      case EventType.Secret_Retrieved:\n        msg = this.i18nService.t(\"accessedSecret\", this.formatSecretId(ev));\n        humanReadableMsg = this.i18nService.t(\"accessedSecret\", this.getShortId(ev.secretId));\n        break;\n      default:\n        break;\n    }\n    return {\n      message: msg === \"\" ? null : msg,\n      humanReadableMessage: humanReadableMsg === \"\" ? null : humanReadableMsg,\n    };\n  }\n\n  private getAppInfo(ev: EventResponse): [string, string] {\n    if (ev.serviceAccountId) {\n      return [\"bwi-globe\", this.i18nService.t(\"sdk\")];\n    }\n\n    switch (ev.deviceType) {\n      case DeviceType.Android:\n        return [\"bwi-android\", this.i18nService.t(\"mobile\") + \" - Android\"];\n      case DeviceType.iOS:\n        return [\"bwi-apple\", this.i18nService.t(\"mobile\") + \" - iOS\"];\n      case DeviceType.UWP:\n        return [\"bwi-windows\", this.i18nService.t(\"mobile\") + \" - Windows\"];\n      case DeviceType.ChromeExtension:\n        return [\"bwi-chrome\", this.i18nService.t(\"extension\") + \" - Chrome\"];\n      case DeviceType.FirefoxExtension:\n        return [\"bwi-firefox\", this.i18nService.t(\"extension\") + \" - Firefox\"];\n      case DeviceType.OperaExtension:\n        return [\"bwi-opera\", this.i18nService.t(\"extension\") + \" - Opera\"];\n      case DeviceType.EdgeExtension:\n        return [\"bwi-edge\", this.i18nService.t(\"extension\") + \" - Edge\"];\n      case DeviceType.VivaldiExtension:\n        return [\"bwi-puzzle\", this.i18nService.t(\"extension\") + \" - Vivaldi\"];\n      case DeviceType.SafariExtension:\n        return [\"bwi-safari\", this.i18nService.t(\"extension\") + \" - Safari\"];\n      case DeviceType.WindowsDesktop:\n        return [\"bwi-windows\", this.i18nService.t(\"desktop\") + \" - Windows\"];\n      case DeviceType.MacOsDesktop:\n        return [\"bwi-apple\", this.i18nService.t(\"desktop\") + \" - macOS\"];\n      case DeviceType.LinuxDesktop:\n        return [\"bwi-linux\", this.i18nService.t(\"desktop\") + \" - Linux\"];\n      case DeviceType.ChromeBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Chrome\"];\n      case DeviceType.FirefoxBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Firefox\"];\n      case DeviceType.OperaBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Opera\"];\n      case DeviceType.SafariBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Safari\"];\n      case DeviceType.VivaldiBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Vivaldi\"];\n      case DeviceType.EdgeBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - Edge\"];\n      case DeviceType.IEBrowser:\n        return [\"bwi-globe\", this.i18nService.t(\"webVault\") + \" - IE\"];\n      case DeviceType.Server:\n        return [\"bwi-server\", this.i18nService.t(\"server\")];\n      case DeviceType.WindowsCLI:\n        return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - Windows\"];\n      case DeviceType.MacOsCLI:\n        return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - macOS\"];\n      case DeviceType.LinuxCLI:\n        return [\"bwi-cli\", this.i18nService.t(\"cli\") + \" - Linux\"];\n      case DeviceType.UnknownBrowser:\n        return [\n          \"bwi-globe\",\n          this.i18nService.t(\"webVault\") + \" - \" + this.i18nService.t(\"unknown\"),\n        ];\n      default:\n        return [\"bwi-globe\", this.i18nService.t(\"unknown\")];\n    }\n  }\n\n  private formatCipherId(ev: EventResponse, options: EventOptions) {\n    const shortId = this.getShortId(ev.cipherId);\n    if (ev.organizationId == null || !options.cipherInfo) {\n      return \"<code>\" + shortId + \"</code>\";\n    }\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\n      \"href\",\n      `#/organizations/${ev.organizationId}/vault?search=${shortId}&viewEvents=${ev.cipherId}&type=all`,\n    );\n    return a.outerHTML;\n  }\n\n  private formatGroupId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.groupId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\"href\", \"#/organizations/\" + ev.organizationId + \"/groups?search=\" + shortId);\n    return a.outerHTML;\n  }\n\n  private formatCollectionId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.collectionId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\n      \"href\",\n      `#/organizations/${ev.organizationId}/vault?collectionId=${ev.collectionId}`,\n    );\n    return a.outerHTML;\n  }\n\n  private formatOrgUserId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.organizationUserId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\n      \"href\",\n      \"#/organizations/\" +\n        ev.organizationId +\n        \"/members?search=\" +\n        shortId +\n        \"&viewEvents=\" +\n        ev.organizationUserId,\n    );\n    return a.outerHTML;\n  }\n\n  private formatProviderUserId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.providerUserId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\n      \"href\",\n      \"#/providers/\" +\n        ev.providerId +\n        \"/manage/people?search=\" +\n        shortId +\n        \"&viewEvents=\" +\n        ev.providerUserId,\n    );\n    return a.outerHTML;\n  }\n\n  private formatProviderOrganizationId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.providerOrganizationId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\"href\", \"#/providers/\" + ev.providerId + \"/clients?search=\" + shortId);\n    return a.outerHTML;\n  }\n\n  private formatOrganizationId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.organizationId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\"href\", \"#/organizations/\" + ev.organizationId + \"/settings/account\");\n    return a.outerHTML;\n  }\n\n  private formatPolicyId(ev: EventResponse) {\n    const shortId = this.getShortId(ev.policyId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\n      \"href\",\n      \"#/organizations/\" + ev.organizationId + \"/settings/policies?policyId=\" + ev.policyId,\n    );\n    return a.outerHTML;\n  }\n\n  formatSecretId(ev: EventResponse): string {\n    const shortId = this.getShortId(ev.secretId);\n    const a = this.makeAnchor(shortId);\n    a.setAttribute(\"href\", \"#/sm/\" + ev.organizationId + \"/secrets?search=\" + shortId);\n    return a.outerHTML;\n  }\n\n  private makeAnchor(shortId: string) {\n    const a = document.createElement(\"a\");\n    a.title = this.i18nService.t(\"view\");\n    a.innerHTML = \"<code>\" + shortId + \"</code>\";\n    return a;\n  }\n\n  private getShortId(id: string) {\n    return id?.substring(0, 8);\n  }\n\n  private toDateTimeLocalString(date: Date) {\n    return (\n      date.getFullYear() +\n      \"-\" +\n      this.pad(date.getMonth() + 1) +\n      \"-\" +\n      this.pad(date.getDate()) +\n      \"T\" +\n      this.pad(date.getHours()) +\n      \":\" +\n      this.pad(date.getMinutes())\n    );\n  }\n\n  private pad(num: number) {\n    const norm = Math.floor(Math.abs(num));\n    return (norm < 10 ? \"0\" : \"\") + norm;\n  }\n}\n\nexport class EventInfo {\n  message: string;\n  humanReadableMessage: string;\n  appIcon: string;\n  appName: string;\n}\n\nexport class EventOptions {\n  cipherInfo = true;\n}\n","// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { EncryptService } from \"../abstractions/encrypt.service\";\n\nexport class ContainerService {\n  constructor(\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n  ) {}\n\n  attachToGlobal(global: any) {\n    if (!global.bitwardenContainerService) {\n      global.bitwardenContainerService = this;\n    }\n  }\n\n  /**\n   * @throws Will throw if KeyService was not instantiated and provided to the ContainerService constructor\n   */\n  getKeyService(): KeyService {\n    if (this.keyService == null) {\n      throw new Error(\"ContainerService.keyService not initialized.\");\n    }\n    return this.keyService;\n  }\n\n  /**\n   * @throws Will throw if EncryptService was not instantiated and provided to the ContainerService constructor\n   */\n  getEncryptService(): EncryptService {\n    if (this.encryptService == null) {\n      throw new Error(\"ContainerService.encryptService not initialized.\");\n    }\n    return this.encryptService;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { catchError, firstValueFrom, map } from \"rxjs\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\n\ntype Version = {\n  client: string;\n  sdk: string;\n};\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class VersionService {\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private sdkService: SdkService,\n  ) {}\n\n  applyVersionToWindow() {\n    (window as any).__version = async (): Promise<Version> => {\n      return {\n        client: await this.platformUtilsService.getApplicationVersion(),\n        sdk: await firstValueFrom(\n          this.sdkService.client$.pipe(\n            map((client) => client.version()),\n            catchError(() => \"Unsupported\"),\n          ),\n        ),\n      };\n    };\n  }\n}\n","import { DOCUMENT } from \"@angular/common\";\nimport { Inject, Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AbstractThemingService } from \"@bitwarden/angular/platform/services/theming/theming.service.abstraction\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport { EventUploadService as EventUploadServiceAbstraction } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService as NotificationsServiceAbstraction } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { TwoFactorService as TwoFactorServiceAbstraction } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { StateService as StateServiceAbstraction } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ContainerService } from \"@bitwarden/common/platform/services/container.service\";\nimport { UserAutoUnlockKeyService } from \"@bitwarden/common/platform/services/user-auto-unlock-key.service\";\nimport { EventUploadService } from \"@bitwarden/common/services/event/event-upload.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/services/vault-timeout/vault-timeout.service\";\nimport { KeyService as KeyServiceAbstraction } from \"@bitwarden/key-management\";\n\nimport { VersionService } from \"../platform/version.service\";\n\n@Injectable()\nexport class InitService {\n  constructor(\n    @Inject(WINDOW) private win: Window,\n    private notificationsService: NotificationsServiceAbstraction,\n    private vaultTimeoutService: VaultTimeoutService,\n    private i18nService: I18nServiceAbstraction,\n    private eventUploadService: EventUploadServiceAbstraction,\n    private twoFactorService: TwoFactorServiceAbstraction,\n    private stateService: StateServiceAbstraction,\n    private keyService: KeyServiceAbstraction,\n    private themingService: AbstractThemingService,\n    private encryptService: EncryptService,\n    private userAutoUnlockKeyService: UserAutoUnlockKeyService,\n    private accountService: AccountService,\n    private versionService: VersionService,\n    @Inject(DOCUMENT) private document: Document,\n  ) {}\n\n  init() {\n    return async () => {\n      await this.stateService.init();\n\n      const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n      if (activeAccount) {\n        // If there is an active account, we must await the process of setting the user key in memory\n        // if the auto user key is set to avoid race conditions of any code trying to access the user key from mem.\n        await this.userAutoUnlockKeyService.setUserKeyInMemoryIfAutoUserKeySet(activeAccount.id);\n      }\n\n      setTimeout(() => this.notificationsService.init(), 3000);\n      await this.vaultTimeoutService.init(true);\n      await this.i18nService.init();\n      (this.eventUploadService as EventUploadService).init(true);\n      this.twoFactorService.init();\n      const htmlEl = this.win.document.documentElement;\n      htmlEl.classList.add(\"locale_\" + this.i18nService.translationLocale);\n      this.themingService.applyThemeChangesTo(this.document);\n      this.versionService.applyVersionToWindow();\n\n      const containerService = new ContainerService(this.keyService, this.encryptService);\n      containerService.attachToGlobal(this.win);\n    };\n  }\n}\n","// Put web specific injection tokens here\nimport { SafeInjectionToken } from \"@bitwarden/angular/services/injection-tokens\";\nimport { Urls } from \"@bitwarden/common/platform/abstractions/environment.service\";\n\n/**\n * Injection token for injecting the NodeJS process.env urls into services.\n * Using an injection token allows services to be tested without needing to\n * mock the process.env.\n */\nexport const ENV_URLS = new SafeInjectionToken<Urls>(\"ENV_URLS\");\n","import { Injectable, Injector } from \"@angular/core\";\nimport * as jq from \"jquery\";\nimport { first } from \"rxjs/operators\";\n\nimport { ModalRef } from \"@bitwarden/angular/components/modal/modal.ref\";\nimport { ModalService as BaseModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Injectable()\nexport class ModalService extends BaseModalService {\n  el: any = null;\n  modalOpen = false;\n\n  constructor(\n    injector: Injector,\n    private messagingService: MessagingService,\n  ) {\n    super(injector);\n  }\n\n  protected setupHandlers(modalRef: ModalRef) {\n    modalRef.onCreated.pipe(first()).subscribe(() => {\n      const modals = Array.from(document.querySelectorAll(\".modal\"));\n      if (modals.length > 0) {\n        this.el = jq(modals[0]);\n        this.el.modal(\"show\");\n\n        this.el.on(\"show.bs.modal\", () => {\n          modalRef.show();\n          this.messagingService.send(\"modalShow\");\n        });\n        this.el.on(\"shown.bs.modal\", () => {\n          modalRef.shown();\n          this.messagingService.send(\"modalShown\");\n          if (!Utils.isMobileBrowser) {\n            this.el.find(\"*[appAutoFocus]\").focus();\n          }\n        });\n        this.el.on(\"hide.bs.modal\", () => {\n          this.messagingService.send(\"modalClose\");\n        });\n        this.el.on(\"hidden.bs.modal\", () => {\n          modalRef.closed();\n          this.messagingService.send(\"modalClosed\");\n        });\n      }\n    });\n\n    modalRef.onClose.pipe(first()).subscribe(() => {\n      if (this.el != null) {\n        this.el.modal(\"hide\");\n      }\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FileDownloadRequest } from \"./file-download.request\";\n\nexport class FileDownloadBuilder {\n  get blobOptions(): any {\n    const options = this._request.blobOptions ?? {};\n    if (options.type == null) {\n      options.type = this.fileType;\n    }\n    return options;\n  }\n\n  get blob(): Blob {\n    if (this.blobOptions != null) {\n      return new Blob([this._request.blobData], this.blobOptions);\n    } else {\n      return new Blob([this._request.blobData]);\n    }\n  }\n\n  get downloadMethod(): \"save\" | \"open\" {\n    if (this._request.downloadMethod != null) {\n      return this._request.downloadMethod;\n    }\n    return this.fileType != \"application/pdf\" ? \"save\" : \"open\";\n  }\n\n  private get fileType() {\n    const fileNameLower = this._request.fileName.toLowerCase();\n    if (fileNameLower.endsWith(\".pdf\")) {\n      return \"application/pdf\";\n    } else if (fileNameLower.endsWith(\".xlsx\")) {\n      return \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\";\n    } else if (fileNameLower.endsWith(\".docx\")) {\n      return \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\";\n    } else if (fileNameLower.endsWith(\".pptx\")) {\n      return \"application/vnd.openxmlformats-officedocument.presentationml.presentation\";\n    } else if (fileNameLower.endsWith(\".csv\")) {\n      return \"text/csv\";\n    } else if (fileNameLower.endsWith(\".png\")) {\n      return \"image/png\";\n    } else if (fileNameLower.endsWith(\".jpg\") || fileNameLower.endsWith(\".jpeg\")) {\n      return \"image/jpeg\";\n    } else if (fileNameLower.endsWith(\".gif\")) {\n      return \"image/gif\";\n    }\n    return null;\n  }\n\n  constructor(private readonly _request: FileDownloadRequest) {}\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { FileDownloadBuilder } from \"@bitwarden/common/platform/abstractions/file-download/file-download.builder\";\nimport { FileDownloadRequest } from \"@bitwarden/common/platform/abstractions/file-download/file-download.request\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Injectable()\nexport class WebFileDownloadService implements FileDownloadService {\n  constructor(private platformUtilsService: PlatformUtilsService) {}\n\n  download(request: FileDownloadRequest): void {\n    const builder = new FileDownloadBuilder(request);\n    const a = window.document.createElement(\"a\");\n    if (!this.platformUtilsService.isSafari()) {\n      a.rel = \"noreferrer\";\n      a.target = \"_blank\";\n    }\n    a.href = URL.createObjectURL(builder.blob);\n    a.download = request.fileName;\n    window.document.body.appendChild(a);\n    a.click();\n    window.document.body.removeChild(a);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { APP_INITIALIZER, NgModule, Optional, SkipSelf } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport {\n  CollectionAdminService,\n  DefaultCollectionAdminService,\n  OrganizationUserApiService,\n  CollectionService,\n} from \"@bitwarden/admin-console/common\";\nimport { SafeProvider, safeProvider } from \"@bitwarden/angular/platform/utils/safe-provider\";\nimport {\n  CLIENT_TYPE,\n  DEFAULT_VAULT_TIMEOUT,\n  ENV_ADDITIONAL_REGIONS,\n  LOCALES_DIRECTORY,\n  MEMORY_STORAGE,\n  OBSERVABLE_DISK_LOCAL_STORAGE,\n  OBSERVABLE_DISK_STORAGE,\n  OBSERVABLE_MEMORY_STORAGE,\n  SECURE_STORAGE,\n  SYSTEM_LANGUAGE,\n  SafeInjectionToken,\n  WINDOW,\n} from \"@bitwarden/angular/services/injection-tokens\";\nimport { JslibServicesModule } from \"@bitwarden/angular/services/jslib-services.module\";\nimport { ModalService as ModalServiceAbstraction } from \"@bitwarden/angular/services/modal.service\";\nimport {\n  RegistrationFinishService as RegistrationFinishServiceAbstraction,\n  LoginComponentService,\n  SetPasswordJitService,\n  SsoComponentService,\n  LoginDecryptionOptionsService,\n} from \"@bitwarden/auth/angular\";\nimport {\n  InternalUserDecryptionOptionsServiceAbstraction,\n  LoginEmailService,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport {\n  InternalPolicyService,\n  PolicyService,\n} from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountApiService as AccountApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { ProcessReloadServiceAbstraction } from \"@bitwarden/common/key-management/abstractions/process-reload.service\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport {\n  EnvironmentService,\n  Urls,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService as I18nServiceAbstraction } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkClientFactory } from \"@bitwarden/common/platform/abstractions/sdk/sdk-client-factory\";\nimport { AbstractStorageService } from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { AppIdService as DefaultAppIdService } from \"@bitwarden/common/platform/services/app-id.service\";\nimport { MemoryStorageService } from \"@bitwarden/common/platform/services/memory-storage.service\";\n// eslint-disable-next-line import/no-restricted-paths -- Implementation for memory storage\nimport { MigrationBuilderService } from \"@bitwarden/common/platform/services/migration-builder.service\";\nimport { MigrationRunner } from \"@bitwarden/common/platform/services/migration-runner\";\nimport { NoopSdkClientFactory } from \"@bitwarden/common/platform/services/sdk/noop-sdk-client-factory\";\nimport { StorageServiceProvider } from \"@bitwarden/common/platform/services/storage-service.provider\";\n/* eslint-disable import/no-restricted-paths -- Implementation for memory storage */\nimport { GlobalStateProvider, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { MemoryStorageService as MemoryStorageServiceForStateProviders } from \"@bitwarden/common/platform/state/storage/memory-storage.service\";\n/* eslint-enable import/no-restricted-paths -- Implementation for memory storage */\nimport { WindowStorageService } from \"@bitwarden/common/platform/storage/window-storage.service\";\nimport {\n  DefaultThemeStateService,\n  ThemeStateService,\n} from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport { VaultTimeout, VaultTimeoutStringType } from \"@bitwarden/common/types/vault-timeout.type\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport {\n  KdfConfigService,\n  KeyService as KeyServiceAbstraction,\n  BiometricsService,\n} from \"@bitwarden/key-management\";\nimport { LockComponentService } from \"@bitwarden/key-management/angular\";\n\nimport { flagEnabled } from \"../../utils/flags\";\nimport { PolicyListService } from \"../admin-console/core/policy-list.service\";\nimport {\n  WebSetPasswordJitService,\n  WebRegistrationFinishService,\n  WebLoginComponentService,\n  WebLoginDecryptionOptionsService,\n} from \"../auth\";\nimport { WebSsoComponentService } from \"../auth/core/services/login/web-sso-component.service\";\nimport { AcceptOrganizationInviteService } from \"../auth/organization-invite/accept-organization.service\";\nimport { HtmlStorageService } from \"../core/html-storage.service\";\nimport { I18nService } from \"../core/i18n.service\";\nimport { WebLockComponentService } from \"../key-management/lock/services/web-lock-component.service\";\nimport { WebProcessReloadService } from \"../key-management/services/web-process-reload.service\";\nimport { WebBiometricsService } from \"../key-management/web-biometric.service\";\nimport { WebEnvironmentService } from \"../platform/web-environment.service\";\nimport { WebMigrationRunner } from \"../platform/web-migration-runner\";\nimport { WebSdkClientFactory } from \"../platform/web-sdk-client-factory\";\nimport { WebStorageServiceProvider } from \"../platform/web-storage-service.provider\";\n\nimport { EventService } from \"./event.service\";\nimport { InitService } from \"./init.service\";\nimport { ENV_URLS } from \"./injection-tokens\";\nimport { ModalService } from \"./modal.service\";\nimport { RouterService } from \"./router.service\";\nimport { WebFileDownloadService } from \"./web-file-download.service\";\nimport { WebPlatformUtilsService } from \"./web-platform-utils.service\";\n\n/**\n * Provider definitions used in the ngModule.\n * Add your provider definition here using the safeProvider function as a wrapper. This will give you type safety.\n * If you need help please ask for it, do NOT change the type of this array.\n */\nconst safeProviders: SafeProvider[] = [\n  safeProvider(InitService),\n  safeProvider(RouterService),\n  safeProvider(EventService),\n  safeProvider(PolicyListService),\n  safeProvider({\n    provide: DEFAULT_VAULT_TIMEOUT,\n    deps: [PlatformUtilsService],\n    useFactory: (platformUtilsService: PlatformUtilsService): VaultTimeout =>\n      platformUtilsService.isDev() ? VaultTimeoutStringType.Never : 15,\n  }),\n  safeProvider({\n    provide: APP_INITIALIZER as SafeInjectionToken<() => void>,\n    useFactory: (initService: InitService) => initService.init(),\n    deps: [InitService],\n    multi: true,\n  }),\n  safeProvider({\n    provide: I18nServiceAbstraction,\n    useClass: I18nService,\n    deps: [SYSTEM_LANGUAGE, LOCALES_DIRECTORY, GlobalStateProvider],\n  }),\n  safeProvider({ provide: AbstractStorageService, useClass: HtmlStorageService, deps: [] }),\n  safeProvider({\n    provide: SECURE_STORAGE,\n    // TODO: platformUtilsService.isDev has a helper for this, but using that service here results in a circular dependency.\n    // We have a tech debt item in the backlog to break up platformUtilsService, but in the meantime simply checking the environment here is less cumbersome.\n    useClass: process.env.NODE_ENV === \"development\" ? HtmlStorageService : MemoryStorageService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: MEMORY_STORAGE,\n    useClass: MemoryStorageService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: OBSERVABLE_MEMORY_STORAGE,\n    useClass: MemoryStorageServiceForStateProviders,\n    deps: [],\n  }),\n  safeProvider({\n    provide: OBSERVABLE_DISK_STORAGE,\n    useFactory: () => new WindowStorageService(window.sessionStorage),\n    deps: [],\n  }),\n  safeProvider({\n    provide: PlatformUtilsService,\n    useClass: WebPlatformUtilsService,\n    useAngularDecorators: true,\n  }),\n  safeProvider({\n    provide: ModalServiceAbstraction,\n    useClass: ModalService,\n    useAngularDecorators: true,\n  }),\n  safeProvider({\n    provide: FileDownloadService,\n    useClass: WebFileDownloadService,\n    useAngularDecorators: true,\n  }),\n  safeProvider({\n    provide: WindowStorageService,\n    useFactory: () => new WindowStorageService(window.localStorage),\n    deps: [],\n  }),\n  safeProvider({\n    provide: OBSERVABLE_DISK_LOCAL_STORAGE,\n    useExisting: WindowStorageService,\n  }),\n  safeProvider({\n    provide: StorageServiceProvider,\n    useClass: WebStorageServiceProvider,\n    deps: [OBSERVABLE_DISK_STORAGE, OBSERVABLE_MEMORY_STORAGE, OBSERVABLE_DISK_LOCAL_STORAGE],\n  }),\n  safeProvider({\n    provide: MigrationRunner,\n    useClass: WebMigrationRunner,\n    deps: [AbstractStorageService, LogService, MigrationBuilderService, WindowStorageService],\n  }),\n  safeProvider({\n    provide: ENV_URLS,\n    useValue: process.env.URLS as Urls,\n  }),\n  safeProvider({\n    provide: EnvironmentService,\n    useClass: WebEnvironmentService,\n    deps: [WINDOW, StateProvider, AccountService, ENV_ADDITIONAL_REGIONS, Router, ENV_URLS],\n  }),\n  safeProvider({\n    provide: BiometricsService,\n    useClass: WebBiometricsService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: ThemeStateService,\n    useFactory: (globalStateProvider: GlobalStateProvider, configService: ConfigService) =>\n      // Web chooses to have Light as the default theme\n      new DefaultThemeStateService(globalStateProvider, configService, ThemeType.Light),\n    deps: [GlobalStateProvider, ConfigService],\n  }),\n  safeProvider({\n    provide: CLIENT_TYPE,\n    useValue: ClientType.Web,\n  }),\n  safeProvider({\n    provide: RegistrationFinishServiceAbstraction,\n    useClass: WebRegistrationFinishService,\n    deps: [\n      KeyServiceAbstraction,\n      AccountApiServiceAbstraction,\n      AcceptOrganizationInviteService,\n      PolicyApiServiceAbstraction,\n      LogService,\n      PolicyService,\n    ],\n  }),\n  safeProvider({\n    provide: LockComponentService,\n    useClass: WebLockComponentService,\n    deps: [],\n  }),\n  safeProvider({\n    provide: SetPasswordJitService,\n    useClass: WebSetPasswordJitService,\n    deps: [\n      ApiService,\n      KeyServiceAbstraction,\n      EncryptService,\n      I18nServiceAbstraction,\n      KdfConfigService,\n      InternalMasterPasswordServiceAbstraction,\n      OrganizationApiServiceAbstraction,\n      OrganizationUserApiService,\n      InternalUserDecryptionOptionsServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: AppIdService,\n    useClass: DefaultAppIdService,\n    deps: [OBSERVABLE_DISK_LOCAL_STORAGE, LogService],\n  }),\n  safeProvider({\n    provide: LoginComponentService,\n    useClass: WebLoginComponentService,\n    deps: [\n      AcceptOrganizationInviteService,\n      LogService,\n      PolicyApiServiceAbstraction,\n      InternalPolicyService,\n      RouterService,\n      CryptoFunctionService,\n      EnvironmentService,\n      PasswordGenerationServiceAbstraction,\n      PlatformUtilsService,\n      SsoLoginServiceAbstraction,\n    ],\n  }),\n  safeProvider({\n    provide: CollectionAdminService,\n    useClass: DefaultCollectionAdminService,\n    deps: [ApiService, KeyServiceAbstraction, EncryptService, CollectionService],\n  }),\n  safeProvider({\n    provide: SdkClientFactory,\n    useClass: flagEnabled(\"sdk\") ? WebSdkClientFactory : NoopSdkClientFactory,\n    deps: [],\n  }),\n  safeProvider({\n    provide: ProcessReloadServiceAbstraction,\n    useClass: WebProcessReloadService,\n    deps: [WINDOW],\n  }),\n  safeProvider({\n    provide: LoginEmailService,\n    useClass: LoginEmailService,\n    deps: [AccountService, AuthService, StateProvider],\n  }),\n  safeProvider({\n    provide: SsoComponentService,\n    useClass: WebSsoComponentService,\n    deps: [I18nServiceAbstraction],\n  }),\n  safeProvider({\n    provide: LoginDecryptionOptionsService,\n    useClass: WebLoginDecryptionOptionsService,\n    deps: [MessagingService, RouterService, AcceptOrganizationInviteService],\n  }),\n];\n\n@NgModule({\n  declarations: [],\n  imports: [CommonModule, JslibServicesModule],\n  // Do not register your dependency here! Add it to the typesafeProviders array using the helper function\n  providers: safeProviders,\n})\nexport class CoreModule {\n  constructor(@Optional() @SkipSelf() parentModule?: CoreModule) {\n    if (parentModule) {\n      throw new Error(\"CoreModule is already loaded. Import it in the AppModule only\");\n    }\n  }\n}\n","import { I18nService as BaseI18nService } from \"@bitwarden/common/platform/services/i18n.service\";\nimport { GlobalStateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { SupportedTranslationLocales } from \"../../translation-constants\";\n\nexport class I18nService extends BaseI18nService {\n  constructor(\n    systemLanguage: string,\n    localesDirectory: string,\n    globalStateProvider: GlobalStateProvider,\n  ) {\n    super(\n      systemLanguage || \"en-US\",\n      localesDirectory,\n      async (formattedLocale: string) => {\n        const filePath =\n          this.localesDirectory +\n          \"/\" +\n          formattedLocale +\n          \"/messages.json?cache=\" +\n          process.env.CACHE_TAG;\n        const localesResult = await fetch(filePath);\n        const locales = await localesResult.json();\n        return locales;\n      },\n      globalStateProvider,\n    );\n\n    this.supportedTranslationLocales = SupportedTranslationLocales;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Subject } from \"rxjs\";\n\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n  StorageUpdate,\n} from \"../../abstractions/storage.service\";\n\nexport class MemoryStorageService\n  extends AbstractStorageService\n  implements ObservableStorageService\n{\n  protected store: Record<string, string> = {};\n  private updatesSubject = new Subject<StorageUpdate>();\n\n  get valuesRequireDeserialization(): boolean {\n    return true;\n  }\n  get updates$() {\n    return this.updatesSubject.asObservable();\n  }\n\n  get<T>(key: string): Promise<T> {\n    const json = this.store[key];\n    if (json) {\n      const obj = JSON.parse(json as string);\n      return Promise.resolve(obj as T);\n    }\n    return Promise.resolve(null);\n  }\n\n  async has(key: string): Promise<boolean> {\n    return (await this.get(key)) != null;\n  }\n\n  save<T>(key: string, obj: T): Promise<void> {\n    if (obj == null) {\n      return this.remove(key);\n    }\n    // TODO: Remove once foreground/background contexts are separated in browser\n    // Needed to ensure ownership of all memory by the context running the storage service\n    this.store[key] = JSON.stringify(obj);\n    this.updatesSubject.next({ key, updateType: \"save\" });\n    return Promise.resolve();\n  }\n\n  remove(key: string): Promise<void> {\n    delete this.store[key];\n    this.updatesSubject.next({ key, updateType: \"remove\" });\n    return Promise.resolve();\n  }\n}\n","import {\n  AbstractStorageService,\n  ObservableStorageService,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport {\n  PossibleLocation,\n  StorageServiceProvider,\n} from \"@bitwarden/common/platform/services/storage-service.provider\";\nimport {\n  ClientLocations,\n  // eslint-disable-next-line import/no-restricted-paths\n} from \"@bitwarden/common/platform/state/state-definition\";\n\nexport class WebStorageServiceProvider extends StorageServiceProvider {\n  constructor(\n    diskStorageService: AbstractStorageService & ObservableStorageService,\n    memoryStorageService: AbstractStorageService & ObservableStorageService,\n    private readonly diskLocalStorageService: AbstractStorageService & ObservableStorageService,\n  ) {\n    super(diskStorageService, memoryStorageService);\n  }\n\n  override get(\n    defaultLocation: PossibleLocation,\n    overrides: Partial<ClientLocations>,\n  ): [location: PossibleLocation, service: AbstractStorageService & ObservableStorageService] {\n    const location = overrides[\"web\"] ?? defaultLocation;\n    switch (location) {\n      case \"disk-local\":\n        return [\"disk-local\", this.diskLocalStorageService];\n      default:\n        // Pass in computed location to super because they could have\n        // overriden default \"disk\" with web \"memory\".\n        return super.get(location, overrides);\n    }\n  }\n}\n","import { inject } from \"@angular/core\";\nimport { map, Observable } from \"rxjs\";\n\nimport {\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { BiometricsStatus } from \"@bitwarden/key-management\";\nimport { LockComponentService, UnlockOptions } from \"@bitwarden/key-management/angular\";\n\nexport class WebLockComponentService implements LockComponentService {\n  private readonly userDecryptionOptionsService = inject(UserDecryptionOptionsServiceAbstraction);\n\n  constructor() {}\n\n  getBiometricsError(error: any): string | null {\n    throw new Error(\n      \"Biometric unlock is not supported in the web app. See getAvailableUnlockOptions$\",\n    );\n  }\n\n  getPreviousUrl(): string | null {\n    return null;\n  }\n\n  async isWindowVisible(): Promise<boolean> {\n    throw new Error(\"Method not implemented.\");\n  }\n\n  getBiometricsUnlockBtnText(): string {\n    throw new Error(\n      \"Biometric unlock is not supported in the web app. See getAvailableUnlockOptions$\",\n    );\n  }\n\n  getAvailableUnlockOptions$(userId: UserId): Observable<UnlockOptions> {\n    return this.userDecryptionOptionsService.userDecryptionOptionsById$(userId).pipe(\n      map((userDecryptionOptions: UserDecryptionOptions) => {\n        const unlockOpts: UnlockOptions = {\n          masterPassword: {\n            enabled: userDecryptionOptions.hasMasterPassword,\n          },\n          pin: {\n            enabled: false,\n          },\n          biometrics: {\n            enabled: false,\n            biometricsStatus: BiometricsStatus.PlatformUnsupported,\n          },\n        };\n        return unlockOpts;\n      }),\n    );\n  }\n}\n","import {\n  flagEnabled as baseFlagEnabled,\n  devFlagEnabled as baseDevFlagEnabled,\n  devFlagValue as baseDevFlagValue,\n  SharedFlags,\n  SharedDevFlags,\n} from \"@bitwarden/common/platform/misc/flags\";\n\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type Flags = {} & SharedFlags;\n\n// required to avoid linting errors when there are no flags\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport type DevFlags = {} & SharedDevFlags;\n\nexport function flagEnabled(flag: keyof Flags): boolean {\n  return baseFlagEnabled<Flags>(flag);\n}\n\nexport function devFlagEnabled(flag: keyof DevFlags) {\n  return baseDevFlagEnabled<DevFlags>(flag);\n}\n\nexport function devFlagValue(flag: keyof DevFlags) {\n  return baseDevFlagValue(flag);\n}\n","import type { BitwardenClient } from \"@bitwarden/sdk-internal\";\n\nimport { SdkClientFactory } from \"../../abstractions/sdk/sdk-client-factory\";\n\n/**\n * Noop SDK client factory.\n *\n * Used during SDK rollout to prevent bundling the SDK with some applications.\n */\nexport class NoopSdkClientFactory implements SdkClientFactory {\n  createSdkClient(\n    ...args: ConstructorParameters<typeof BitwardenClient>\n  ): Promise<BitwardenClient> {\n    return Promise.reject(new Error(\"SDK not available\"));\n  }\n}\n","import { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { ProcessReloadServiceAbstraction } from \"@bitwarden/common/key-management/abstractions/process-reload.service\";\n\nexport class WebProcessReloadService implements ProcessReloadServiceAbstraction {\n  constructor(private window: Window) {}\n\n  async startProcessReload(authService: AuthService): Promise<void> {\n    this.window.location.reload();\n  }\n\n  cancelProcessReload(): void {\n    return;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { Title } from \"@angular/platform-browser\";\nimport { ActivatedRoute, NavigationEnd, Router } from \"@angular/router\";\nimport { filter, firstValueFrom } from \"rxjs\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  KeyDefinition,\n  ROUTER_DISK,\n  StateProvider,\n  GlobalState,\n} from \"@bitwarden/common/platform/state\";\n\n/**\n * Data properties acceptable for use in route objects (see usage in oss-routing.module.ts for example)\n */\nexport interface RouteDataProperties {\n  /**\n   * Title of the current HTML document (shows in browser tab)\n   */\n  titleId?: string;\n  /**\n   * doNotSaveUrl - choose to not keep track of the previous URL in memory in the RouterService\n   */\n  doNotSaveUrl?: boolean;\n}\n\nconst DEEP_LINK_REDIRECT_URL = new KeyDefinition(ROUTER_DISK, \"deepLinkRedirectUrl\", {\n  deserializer: (value: string) => value,\n});\n\n@Injectable()\nexport class RouterService {\n  /**\n   * The string value of the URL the user tried to navigate to while unauthenticated.\n   *\n   * Developed to allow users to deep link even when the navigation gets interrupted\n   * by the authentication process.\n   */\n  private deepLinkRedirectUrlState: GlobalState<string>;\n\n  private previousUrl: string = undefined;\n  private currentUrl: string = undefined;\n\n  constructor(\n    private router: Router,\n    private activatedRoute: ActivatedRoute,\n    private titleService: Title,\n    private stateProvider: StateProvider,\n    i18nService: I18nService,\n  ) {\n    this.deepLinkRedirectUrlState = this.stateProvider.getGlobal(DEEP_LINK_REDIRECT_URL);\n\n    this.currentUrl = this.router.url;\n\n    router.events\n      .pipe(filter((e) => e instanceof NavigationEnd))\n      .subscribe((event: NavigationEnd) => {\n        this.currentUrl = event.url;\n\n        let title = \"Vaultwarden Web\";\n\n        if (this.currentUrl.includes(\"/sm/\")) {\n          title = i18nService.t(\"bitSecretsManager\");\n        }\n\n        let child = this.activatedRoute.firstChild;\n        while (child.firstChild) {\n          child = child.firstChild;\n        }\n\n        const titleId: string = child?.snapshot?.data?.titleId;\n        const rawTitle: string = child?.snapshot?.data?.title;\n        const updateUrl = !child?.snapshot?.data?.doNotSaveUrl ?? true;\n\n        if (titleId != null || rawTitle != null) {\n          const newTitle = rawTitle != null ? rawTitle : i18nService.t(titleId);\n          if (newTitle != null && newTitle !== \"\") {\n            title = newTitle + \" | \" + title;\n          }\n        }\n        this.titleService.setTitle(title);\n        if (updateUrl) {\n          this.setPreviousUrl(this.currentUrl);\n        }\n      });\n  }\n\n  getPreviousUrl(): string | undefined {\n    return this.previousUrl;\n  }\n\n  setPreviousUrl(url: string): void {\n    this.previousUrl = url;\n  }\n\n  /**\n   * Save URL to Global State. This service is used during the login process\n   * @param url URL being saved to the Global State\n   */\n  async persistLoginRedirectUrl(url: string): Promise<void> {\n    await this.deepLinkRedirectUrlState.update(() => url);\n  }\n\n  /**\n   * Fetch and clear persisted LoginRedirectUrl if present in state\n   */\n  async getAndClearLoginRedirectUrl(): Promise<string | undefined> {\n    const persistedPreLoginUrl = await firstValueFrom(this.deepLinkRedirectUrlState.state$);\n\n    if (!Utils.isNullOrEmpty(persistedPreLoginUrl)) {\n      await this.persistLoginRedirectUrl(null);\n      return persistedPreLoginUrl;\n    }\n\n    return;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\n\nimport { ClientType, DeviceType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Injectable()\nexport class WebPlatformUtilsService implements PlatformUtilsService {\n  private browserCache: DeviceType = null;\n\n  constructor(\n    private i18nService: I18nService,\n    private messagingService: MessagingService,\n    private logService: LogService,\n  ) {}\n\n  getDevice(): DeviceType {\n    if (this.browserCache != null) {\n      return this.browserCache;\n    }\n\n    if (\n      navigator.userAgent.indexOf(\" Firefox/\") !== -1 ||\n      navigator.userAgent.indexOf(\" Gecko/\") !== -1\n    ) {\n      this.browserCache = DeviceType.FirefoxBrowser;\n    } else if (navigator.userAgent.indexOf(\" OPR/\") >= 0) {\n      this.browserCache = DeviceType.OperaBrowser;\n    } else if (navigator.userAgent.indexOf(\" Edg/\") !== -1) {\n      this.browserCache = DeviceType.EdgeBrowser;\n    } else if (navigator.userAgent.indexOf(\" Vivaldi/\") !== -1) {\n      this.browserCache = DeviceType.VivaldiBrowser;\n    } else if (\n      navigator.userAgent.indexOf(\" Safari/\") !== -1 &&\n      navigator.userAgent.indexOf(\"Chrome\") === -1\n    ) {\n      this.browserCache = DeviceType.SafariBrowser;\n    } else if ((window as any).chrome && navigator.userAgent.indexOf(\" Chrome/\") !== -1) {\n      this.browserCache = DeviceType.ChromeBrowser;\n    } else if (navigator.userAgent.indexOf(\" Trident/\") !== -1) {\n      this.browserCache = DeviceType.IEBrowser;\n    } else {\n      this.browserCache = DeviceType.UnknownBrowser;\n    }\n\n    return this.browserCache;\n  }\n\n  getDeviceString(): string {\n    const device = DeviceType[this.getDevice()].toLowerCase();\n    return device.replace(\"browser\", \"\");\n  }\n\n  getClientType() {\n    return ClientType.Web;\n  }\n\n  isFirefox(): boolean {\n    return this.getDevice() === DeviceType.FirefoxBrowser;\n  }\n\n  isChrome(): boolean {\n    return this.getDevice() === DeviceType.ChromeBrowser;\n  }\n\n  isEdge(): boolean {\n    return this.getDevice() === DeviceType.EdgeBrowser;\n  }\n\n  isOpera(): boolean {\n    return this.getDevice() === DeviceType.OperaBrowser;\n  }\n\n  isVivaldi(): boolean {\n    return this.getDevice() === DeviceType.VivaldiBrowser;\n  }\n\n  isSafari(): boolean {\n    return this.getDevice() === DeviceType.SafariBrowser;\n  }\n\n  isMacAppStore(): boolean {\n    return false;\n  }\n\n  isViewOpen(): Promise<boolean> {\n    return Promise.resolve(false);\n  }\n\n  launchUri(uri: string, options?: any): void {\n    const a = document.createElement(\"a\");\n    a.href = uri;\n    if (options == null || !options.sameWindow) {\n      a.target = \"_blank\";\n      a.rel = \"noreferrer noopener\";\n    }\n    a.classList.add(\"d-none\");\n    document.body.appendChild(a);\n    a.click();\n    document.body.removeChild(a);\n  }\n\n  getApplicationVersion(): Promise<string> {\n    return Promise.resolve(process.env.APPLICATION_VERSION || \"-\");\n  }\n\n  async getApplicationVersionNumber(): Promise<string> {\n    return (await this.getApplicationVersion()).split(RegExp(\"[+|-]\"))[0].trim();\n  }\n\n  supportsWebAuthn(win: Window): boolean {\n    return typeof PublicKeyCredential !== \"undefined\";\n  }\n\n  supportsDuo(): boolean {\n    return true;\n  }\n\n  showToast(\n    type: \"error\" | \"success\" | \"warning\" | \"info\",\n    title: string,\n    text: string | string[],\n    options?: any,\n  ): void {\n    this.messagingService.send(\"showToast\", {\n      text: text,\n      title: title,\n      type: type,\n      options: options,\n    });\n  }\n\n  isDev(): boolean {\n    return false; // treat Vaultwarden as production ready\n    return process.env.NODE_ENV === \"development\";\n  }\n\n  isSelfHost(): boolean {\n    return true; // treat Vaultwarden as self hosted\n    return WebPlatformUtilsService.isSelfHost();\n  }\n\n  static isSelfHost(): boolean {\n    return true; // treat Vaultwarden as self hosted\n    return process.env.ENV.toString() === \"selfhosted\";\n  }\n\n  copyToClipboard(text: string, options?: any): void | boolean {\n    let win = window;\n    let doc = window.document;\n    if (options && (options.window || options.win)) {\n      win = options.window || options.win;\n      doc = win.document;\n    } else if (options && options.doc) {\n      doc = options.doc;\n    }\n    if (doc.queryCommandSupported && doc.queryCommandSupported(\"copy\")) {\n      const textarea = doc.createElement(\"textarea\");\n      textarea.textContent = text;\n      // Prevent scrolling to bottom of page in MS Edge.\n      textarea.style.position = \"fixed\";\n      let copyEl = doc.body;\n      // For some reason copy command won't work when modal is open if appending to body\n      if (doc.body.classList.contains(\"modal-open\")) {\n        copyEl = doc.body.querySelector<HTMLElement>(\".modal\");\n      }\n      copyEl.appendChild(textarea);\n      textarea.select();\n      let success = false;\n      try {\n        // Security exception may be thrown by some browsers.\n        success = doc.execCommand(\"copy\");\n        if (!success) {\n          this.logService.debug(\"Copy command unsupported or disabled.\");\n        }\n      } catch (e) {\n        // eslint-disable-next-line\n        console.warn(\"Copy to clipboard failed.\", e);\n      } finally {\n        copyEl.removeChild(textarea);\n      }\n      return success;\n    }\n  }\n\n  readFromClipboard(options?: any): Promise<string> {\n    throw new Error(\"Cannot read from clipboard on web.\");\n  }\n\n  supportsSecureStorage() {\n    return false;\n  }\n\n  getAutofillKeyboardShortcut(): Promise<string> {\n    return null;\n  }\n}\n","import { inject, Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\n\nimport { UpdateKeyRequest } from \"./request/update-key.request\";\n\n@Injectable()\nexport class UserKeyRotationApiService {\n  readonly apiService = inject(ApiService);\n\n  postUserKeyUpdate(request: UpdateKeyRequest): Promise<any> {\n    return this.apiService.send(\"POST\", \"/accounts/key\", request, true, false);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { UserKeyRotationApiService } from \"./user-key-rotation-api.service\";\nimport { UserKeyRotationService } from \"./user-key-rotation.service\";\n\n@NgModule({\n  providers: [UserKeyRotationService, UserKeyRotationApiService],\n})\nexport class UserKeyRotationModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationUserResetPasswordWithIdRequest } from \"@bitwarden/admin-console/common\";\nimport { WebauthnRotateCredentialRequest } from \"@bitwarden/common/auth/models/request/webauthn-rotate-credential.request\";\nimport { SendWithIdRequest } from \"@bitwarden/common/src/tools/send/models/request/send-with-id.request\";\nimport { CipherWithIdRequest } from \"@bitwarden/common/src/vault/models/request/cipher-with-id.request\";\nimport { FolderWithIdRequest } from \"@bitwarden/common/src/vault/models/request/folder-with-id.request\";\n\nimport { EmergencyAccessWithIdRequest } from \"../../../auth/emergency-access/request/emergency-access-update.request\";\n\nexport class UpdateKeyRequest {\n  masterPasswordHash: string;\n  key: string;\n  privateKey: string;\n  ciphers: CipherWithIdRequest[] = [];\n  folders: FolderWithIdRequest[] = [];\n  sends: SendWithIdRequest[] = [];\n  emergencyAccessKeys: EmergencyAccessWithIdRequest[] = [];\n  resetPasswordKeys: OrganizationUserResetPasswordWithIdRequest[] = [];\n  webauthnKeys: WebauthnRotateCredentialRequest[] = [];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { Account } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { MasterPasswordVerification } from \"@bitwarden/common/auth/types/verification\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { OrganizationUserResetPasswordService } from \"../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service\";\nimport { WebauthnLoginAdminService } from \"../../auth/core\";\nimport { EmergencyAccessService } from \"../../auth/emergency-access\";\n\nimport { UpdateKeyRequest } from \"./request/update-key.request\";\nimport { UserKeyRotationApiService } from \"./user-key-rotation-api.service\";\n\n@Injectable()\nexport class UserKeyRotationService {\n  constructor(\n    private userVerificationService: UserVerificationService,\n    private apiService: UserKeyRotationApiService,\n    private cipherService: CipherService,\n    private folderService: FolderService,\n    private sendService: SendService,\n    private emergencyAccessService: EmergencyAccessService,\n    private resetPasswordService: OrganizationUserResetPasswordService,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private syncService: SyncService,\n    private webauthnLoginAdminService: WebauthnLoginAdminService,\n    private logService: LogService,\n  ) {}\n\n  /**\n   * Creates a new user key and re-encrypts all required data with the it.\n   * @param masterPassword current master password (used for validation)\n   */\n  async rotateUserKeyAndEncryptedData(masterPassword: string, user: Account): Promise<void> {\n    this.logService.info(\"[Userkey rotation] Starting user key rotation...\");\n    if (!masterPassword) {\n      this.logService.info(\"[Userkey rotation] Invalid master password provided. Aborting!\");\n      throw new Error(\"Invalid master password\");\n    }\n\n    if ((await this.syncService.getLastSync()) === null) {\n      this.logService.info(\"[Userkey rotation] Client was never synced. Aborting!\");\n      throw new Error(\n        \"The local vault is de-synced and the keys cannot be rotated. Please log out and log back in to resolve this issue.\",\n      );\n    }\n\n    // Verify master password\n    // UV service sets master key on success since it is stored in memory and can be lost on refresh\n    const verification = {\n      type: VerificationType.MasterPassword,\n      secret: masterPassword,\n    } as MasterPasswordVerification;\n\n    const { masterKey } = await this.userVerificationService.verifyUserByMasterPassword(\n      verification,\n      user.id,\n      user.email,\n    );\n\n    const [newUserKey, newEncUserKey] = await this.keyService.makeUserKey(masterKey);\n\n    if (!newUserKey || !newEncUserKey) {\n      this.logService.info(\"[Userkey rotation] User key could not be created. Aborting!\");\n      throw new Error(\"User key could not be created\");\n    }\n\n    // Create new request\n    const request = new UpdateKeyRequest();\n\n    // Add new user key\n    request.key = newEncUserKey.encryptedString;\n\n    // Add master key hash\n    const masterPasswordHash = await this.keyService.hashMasterKey(masterPassword, masterKey);\n    request.masterPasswordHash = masterPasswordHash;\n\n    // Get original user key\n    // Note: We distribute the legacy key, but not all domains actually use it. If any of those\n    // domains break their legacy support it will break the migration process for legacy users.\n    const originalUserKey = await this.keyService.getUserKeyWithLegacySupport(user.id);\n    const isMasterKey =\n      (await firstValueFrom(this.keyService.userKey$(user.id))) != originalUserKey;\n    this.logService.info(\"[Userkey rotation] Is legacy user: \" + isMasterKey);\n\n    // Add re-encrypted data\n    request.privateKey = await this.encryptPrivateKey(newUserKey, user.id);\n\n    const rotatedCiphers = await this.cipherService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedCiphers != null) {\n      request.ciphers = rotatedCiphers;\n    }\n\n    const rotatedFolders = await this.folderService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedFolders != null) {\n      request.folders = rotatedFolders;\n    }\n\n    const rotatedSends = await this.sendService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedSends != null) {\n      request.sends = rotatedSends;\n    }\n\n    const rotatedEmergencyAccessKeys = await this.emergencyAccessService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedEmergencyAccessKeys != null) {\n      request.emergencyAccessKeys = rotatedEmergencyAccessKeys;\n    }\n\n    // Note: Reset password keys request model has user verification\n    // properties, but the rotation endpoint uses its own MP hash.\n    const rotatedResetPasswordKeys = await this.resetPasswordService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedResetPasswordKeys != null) {\n      request.resetPasswordKeys = rotatedResetPasswordKeys;\n    }\n\n    const rotatedWebauthnKeys = await this.webauthnLoginAdminService.getRotatedData(\n      originalUserKey,\n      newUserKey,\n      user.id,\n    );\n    if (rotatedWebauthnKeys != null) {\n      request.webauthnKeys = rotatedWebauthnKeys;\n    }\n\n    this.logService.info(\"[Userkey rotation] Posting user key rotation request to server\");\n    await this.apiService.postUserKeyUpdate(request);\n    this.logService.info(\"[Userkey rotation] Userkey rotation request posted to server\");\n\n    // TODO PM-2199: Add device trust rotation support to the user key rotation endpoint\n    this.logService.info(\"[Userkey rotation] Rotating device trust...\");\n    await this.deviceTrustService.rotateDevicesTrust(user.id, newUserKey, masterPasswordHash);\n    this.logService.info(\"[Userkey rotation] Device trust rotation completed\");\n  }\n\n  private async encryptPrivateKey(\n    newUserKey: UserKey,\n    userId: UserId,\n  ): Promise<EncryptedString | null> {\n    const privateKey = await firstValueFrom(\n      this.keyService.userPrivateKeyWithLegacySupport$(userId),\n    );\n    if (!privateKey) {\n      throw new Error(\"No private key found for user key rotation\");\n    }\n    return (await this.encryptService.encrypt(privateKey, newUserKey)).encryptedString;\n  }\n}\n","<bit-menu #menu ariaRole=\"dialog\" [ariaLabel]=\"'switchProducts' | i18n\">\n  <div class=\"tw-px-4 tw-py-2\" *ngIf=\"products$ | async as products\">\n    <!-- Bento options -->\n    <!-- grid-template-columns is dynamic so we can collapse empty columns  -->\n    <section\n      [ngStyle]=\"{\n        '--num-products': products.bento.length,\n        'grid-template-columns': 'repeat(min(var(--num-products,1),3),auto)',\n      }\"\n      class=\"tw-grid tw-gap-2\"\n    >\n      <a\n        *ngFor=\"let product of products.bento\"\n        [routerLink]=\"product.appRoute\"\n        [ngClass]=\"\n          product.isActive\n            ? 'tw-bg-primary-600 tw-font-bold !tw-text-contrast tw-ring-offset-2 hover:tw-bg-primary-600'\n            : ''\n        \"\n        class=\"tw-group/product-link tw-flex tw-h-24 tw-w-28 tw-flex-col tw-items-center tw-justify-center tw-rounded tw-p-1 tw-text-primary-600 tw-outline-none hover:tw-bg-background-alt hover:tw-text-primary-700 hover:tw-no-underline focus-visible:!tw-ring-2 focus-visible:!tw-ring-primary-700\"\n        ariaCurrentWhenActive=\"page\"\n      >\n        <i class=\"bwi {{ product.icon }} tw-text-4xl !tw-m-0 !tw-mb-1\"></i>\n        <span\n          class=\"tw-max-w-24 tw-text-center tw-text-sm tw-leading-snug group-hover/product-link:tw-underline\"\n          >{{ product.name }}</span\n        >\n      </a>\n    </section>\n\n    <!-- Other options -->\n    <section\n      *ngIf=\"false\"\n      class=\"tw-mt-4 tw-flex tw-w-full tw-flex-col tw-gap-2 tw-border-0 tw-border-t tw-border-solid tw-border-t-text-muted tw-p-2 tw-pb-0\"\n    >\n      <span class=\"tw-mb-1 tw-text-xs tw-text-muted\">{{ \"moreFromBitwarden\" | i18n }}</span>\n      <span *ngFor=\"let product of products.other\">\n        <!-- <a> for when the marketing route is internal, it needs to use [routerLink] instead of [href] like the external <a> uses. -->\n        <a\n          *ngIf=\"!product.marketingRoute.external\"\n          bitLink\n          [routerLink]=\"product.marketingRoute.route\"\n        >\n          <span class=\"tw-flex tw-items-center tw-font-normal\">\n            <i class=\"bwi bwi-fw {{ product.icon }} tw-m-0 !tw-mr-3\"></i>{{ product.name }}\n          </span>\n        </a>\n        <!-- <a> for when the marketing route is external -->\n        <a\n          *ngIf=\"product.marketingRoute.external\"\n          bitLink\n          [href]=\"product.marketingRoute.route\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n        >\n          <span class=\"tw-flex tw-items-center tw-font-normal\">\n            <i class=\"bwi bwi-fw {{ product.icon }} tw-m-0 !tw-mr-3\"></i>{{ product.name }}\n          </span>\n        </a>\n      </span>\n    </section>\n  </div>\n</bit-menu>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, ViewChild } from \"@angular/core\";\n\nimport { MenuComponent } from \"@bitwarden/components\";\n\nimport { ProductSwitcherService } from \"./shared/product-switcher.service\";\n\n@Component({\n  selector: \"product-switcher-content\",\n  templateUrl: \"./product-switcher-content.component.html\",\n})\nexport class ProductSwitcherContentComponent {\n  @ViewChild(\"menu\")\n  menu: MenuComponent;\n\n  constructor(private productSwitcherService: ProductSwitcherService) {}\n\n  protected readonly products$ = this.productSwitcherService.products$;\n}\n","<button\n  type=\"button\"\n  bitIconButton=\"bwi bwi-fw bwi-filter\"\n  [bitMenuTriggerFor]=\"content?.menu\"\n  [buttonType]=\"buttonType\"\n  [attr.aria-label]=\"'switchProducts' | i18n\"\n  *ngIf=\"products$ | async\"\n></button>\n<product-switcher-content #content></product-switcher-content>\n","import { AfterViewInit, ChangeDetectorRef, Component, Input } from \"@angular/core\";\n\nimport { IconButtonType } from \"@bitwarden/components/src/icon-button/icon-button.component\";\n\nimport { ProductSwitcherService } from \"./shared/product-switcher.service\";\n@Component({\n  selector: \"product-switcher\",\n  templateUrl: \"./product-switcher.component.html\",\n})\nexport class ProductSwitcherComponent implements AfterViewInit {\n  /**\n   * Passed to the product switcher's `bitIconButton`\n   */\n  @Input()\n  buttonType: IconButtonType = \"main\";\n\n  ngAfterViewInit() {\n    /**\n     * Resolves https://angular.io/errors/NG0100 [SM-403]\n     *\n     * Caused by `[bitMenuTriggerFor]=\"content?.menu\"` in template\n     */\n    this.changeDetector.detectChanges();\n  }\n\n  constructor(\n    private changeDetector: ChangeDetectorRef,\n    private productSwitcherService: ProductSwitcherService,\n  ) {}\n\n  protected readonly products$ = this.productSwitcherService.products$;\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerModule } from \"@bitwarden/components\";\n\nimport { DynamicAvatarComponent } from \"../../components/dynamic-avatar.component\";\nimport { SharedModule } from \"../../shared\";\nimport { ProductSwitcherModule } from \"../product-switcher/product-switcher.module\";\n\nimport { WebHeaderComponent } from \"./web-header.component\";\n\n@NgModule({\n  imports: [SharedModule, DynamicAvatarComponent, ProductSwitcherModule, BannerModule],\n  declarations: [WebHeaderComponent],\n  exports: [WebHeaderComponent],\n})\nexport class HeaderModule {}\n","<header\n  *ngIf=\"routeData$ | async as routeData\"\n  class=\"-tw-m-6 tw-mb-3 tw-flex tw-flex-col tw-p-6\"\n  [ngClass]=\"{\n    'tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300 tw-bg-background-alt tw-pb-0':\n      tabsContainer.childElementCount !== 0,\n  }\"\n>\n  <div class=\"tw-flex\">\n    <div class=\"tw-flex tw-min-w-0 tw-flex-1 tw-flex-col tw-gap-2\">\n      <ng-content select=\"[slot=breadcrumbs]\"></ng-content>\n      <h1\n        bitTypography=\"h1\"\n        noMargin\n        class=\"tw-m-0 tw-mr-2 tw-truncate tw-leading-10\"\n        [title]=\"title || (routeData.titleId | i18n)\"\n      >\n        <i *ngIf=\"icon\" class=\"bwi {{ icon }}\" aria-hidden=\"true\"></i>\n        {{ title || (routeData.titleId | i18n) }}\n        <ng-content select=\"[slot=title-suffix]\"></ng-content>\n      </h1>\n    </div>\n    <div class=\"tw-ml-auto tw-flex tw-flex-col tw-gap-4\">\n      <div class=\"tw-flex tw-min-w-max tw-items-center tw-justify-end tw-gap-2\">\n        <ng-content></ng-content>\n        <product-switcher></product-switcher>\n        <ng-container *ngIf=\"account$ | async as account\">\n          <button\n            type=\"button\"\n            [bitMenuTriggerFor]=\"accountMenu\"\n            class=\"tw-border-0 tw-bg-transparent tw-p-0\"\n          >\n            <dynamic-avatar [id]=\"account.id\" [text]=\"account | userName\"></dynamic-avatar>\n          </button>\n\n          <bit-menu #accountMenu>\n            <div class=\"tw-flex tw-min-w-52 tw-max-w-72 tw-flex-col\">\n              <div\n                class=\"tw-flex tw-items-center tw-px-4 tw-py-1 tw-leading-tight tw-text-muted\"\n                appStopProp\n              >\n                <dynamic-avatar [id]=\"account.id\" [text]=\"account | userName\"></dynamic-avatar>\n                <div class=\"tw-ml-2 tw-block tw-overflow-hidden tw-whitespace-nowrap\">\n                  <span>{{ \"loggedInAs\" | i18n }}</span>\n                  <small class=\"tw-block tw-overflow-hidden tw-whitespace-nowrap\">\n                    {{ account | userName }}\n                  </small>\n                </div>\n              </div>\n\n              <ng-container *ngIf=\"selfHosted\">\n                <bit-menu-divider></bit-menu-divider>\n                <span class=\"tw-break-all tw-px-4 tw-py-1 tw-text-left tw-text-muted\">\n                  {{ hostname }}\n                </span>\n              </ng-container>\n\n              <bit-menu-divider></bit-menu-divider>\n\n              <a bitMenuItem routerLink=\"/settings/account\">\n                <i class=\"bwi bwi-fw bwi-user\" aria-hidden=\"true\"></i>\n                {{ \"accountSettings\" | i18n }}\n              </a>\n              <a\n                bitMenuItem\n                href=\"https://github.com/dani-garcia/vaultwarden\"\n                target=\"_blank\"\n                rel=\"noreferrer\"\n              >\n                <i class=\"bwi bwi-fw bwi-question-circle\" aria-hidden=\"true\"></i>\n                {{ \"getHelp\" | i18n }}\n              </a>\n              <a\n                bitMenuItem\n                href=\"https://bitwarden.com/download/\"\n                target=\"_blank\"\n                rel=\"noreferrer\"\n              >\n                <i class=\"bwi bwi-fw bwi-download\" aria-hidden=\"true\"></i>\n                {{ \"getApps\" | i18n }}\n              </a>\n\n              <bit-menu-divider></bit-menu-divider>\n\n              <button *ngIf=\"canLock$ | async\" bitMenuItem type=\"button\" (click)=\"lock()\">\n                <i class=\"bwi bwi-fw bwi-lock\" aria-hidden=\"true\"></i>\n                {{ \"lockNow\" | i18n }}\n              </button>\n              <button bitMenuItem type=\"button\" (click)=\"logout()\">\n                <i class=\"bwi bwi-fw bwi-sign-out\" aria-hidden=\"true\"></i>\n                {{ \"logOut\" | i18n }}\n              </button>\n            </div>\n          </bit-menu>\n        </ng-container>\n      </div>\n      <div\n        class=\"tw-ml-auto\"\n        #contentContainer\n        [ngClass]=\"{ 'tw-hidden': contentContainer.childElementCount === 0 }\"\n      >\n        <ng-content select=\"[slot=secondary]\"></ng-content>\n      </div>\n    </div>\n  </div>\n  <div\n    #tabsContainer\n    class=\"-tw-mx-4 -tw-mb-px\"\n    [ngClass]=\"{ 'tw-hidden': tabsContainer.childElementCount === 0 }\"\n  >\n    <ng-content select=\"[slot=tabs]\"></ng-content>\n  </div>\n</header>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { map, Observable } from \"rxjs\";\n\nimport { User } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\n@Component({\n  selector: \"app-header\",\n  templateUrl: \"./web-header.component.html\",\n})\nexport class WebHeaderComponent {\n  /**\n   * Custom title that overrides the route data `titleId`\n   */\n  @Input() title: string;\n\n  /**\n   * Icon to show before the title\n   */\n  @Input() icon: string;\n\n  protected routeData$: Observable<{ titleId: string }>;\n  protected account$: Observable<User & { id: UserId }>;\n  protected canLock$: Observable<boolean>;\n  protected selfHosted: boolean;\n  protected hostname = location.hostname;\n\n  constructor(\n    private route: ActivatedRoute,\n    private platformUtilsService: PlatformUtilsService,\n    private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    private messagingService: MessagingService,\n    private accountService: AccountService,\n  ) {\n    this.routeData$ = this.route.data.pipe(\n      map((params) => {\n        return {\n          titleId: params.titleId,\n        };\n      }),\n    );\n\n    this.selfHosted = this.platformUtilsService.isSelfHost();\n\n    this.account$ = this.accountService.activeAccount$;\n    this.canLock$ = this.vaultTimeoutSettingsService\n      .availableVaultTimeoutActions$()\n      .pipe(map((actions) => actions.includes(VaultTimeoutAction.Lock)));\n  }\n\n  protected lock() {\n    this.messagingService.send(\"lockVault\");\n  }\n\n  protected logout() {\n    this.messagingService.send(\"logout\");\n  }\n}\n","import { A11yModule } from \"@angular/cdk/a11y\";\nimport { NgModule } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { NavigationModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { NavigationProductSwitcherComponent } from \"./navigation-switcher/navigation-switcher.component\";\nimport { ProductSwitcherContentComponent } from \"./product-switcher-content.component\";\nimport { ProductSwitcherComponent } from \"./product-switcher.component\";\n\n@NgModule({\n  imports: [SharedModule, A11yModule, RouterModule, NavigationModule],\n  declarations: [\n    ProductSwitcherComponent,\n    ProductSwitcherContentComponent,\n    NavigationProductSwitcherComponent,\n  ],\n  exports: [ProductSwitcherComponent, NavigationProductSwitcherComponent],\n  providers: [I18nPipe],\n})\nexport class ProductSwitcherModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { ActivatedRoute, NavigationEnd, NavigationStart, ParamMap, Router } from \"@angular/router\";\nimport { combineLatest, concatMap, filter, map, Observable, ReplaySubject, startWith } from \"rxjs\";\n\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n  canAccessOrgAdmin,\n  OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\n\nexport type ProductSwitcherItem = {\n  /**\n   * Displayed name\n   */\n  name: string;\n\n  /**\n   * Displayed icon\n   */\n  icon: string;\n\n  /**\n   * Route for items in the `bentoProducts$` section\n   */\n  appRoute?: string | any[];\n\n  /**\n   * Route for items in the `otherProducts$` section\n   */\n  marketingRoute?: {\n    route: string | any[];\n    external: boolean;\n  };\n  /**\n   * Route definition for external/internal routes for items in the `otherProducts$` section\n   */\n\n  /**\n   * Used to apply css styles to show when a button is selected\n   */\n  isActive?: boolean;\n\n  /**\n   * A product switcher item can be shown in the left navigation menu.\n   * When shown under the \"other\" section the content can be overridden.\n   */\n  otherProductOverrides?: {\n    /** Alternative navigation menu name */\n    name?: string;\n    /** Supporting text that is shown when the product is rendered in the \"other\" section */\n    supportingText?: string;\n  };\n};\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class ProductSwitcherService {\n  /**\n   * Emits when the sync service has completed a sync\n   *\n   * Without waiting for a sync to be complete, in accurate product information\n   * can be displayed to the user for a brief moment until the sync is complete\n   * and all data is available.\n   */\n  private syncCompleted$ = new ReplaySubject<void>(1);\n\n  /**\n   * Certain events should trigger an update to the `products$` observable but the values\n   * themselves are not needed. This observable is used to only trigger the update.\n   */\n  private triggerProductUpdate$: Observable<void> = combineLatest([\n    this.syncCompleted$,\n    this.router.events.pipe(\n      // Product paths need to be updated when routes change, but the router event isn't actually needed\n      startWith(null), // Start with a null event to trigger the initial combineLatest\n      filter((e) => e instanceof NavigationEnd || e instanceof NavigationStart || e === null),\n    ),\n  ]).pipe(map(() => null));\n\n  constructor(\n    private organizationService: OrganizationService,\n    private providerService: ProviderService,\n    private route: ActivatedRoute,\n    private router: Router,\n    private i18n: I18nPipe,\n    private syncService: SyncService,\n  ) {\n    this.pollUntilSynced();\n  }\n\n  products$: Observable<{\n    bento: ProductSwitcherItem[];\n    other: ProductSwitcherItem[];\n  }> = combineLatest([\n    this.organizationService.organizations$,\n    this.route.paramMap,\n    this.triggerProductUpdate$,\n  ]).pipe(\n    map(([orgs, ...rest]): [Organization[], ParamMap, void] => {\n      return [\n        // Sort orgs by name to match the order within the sidebar\n        orgs.sort((a, b) => a.name.localeCompare(b.name)),\n        ...rest,\n      ];\n    }),\n    concatMap(async ([orgs, paramMap]) => {\n      let routeOrg = orgs.find((o) => o.id === paramMap.get(\"organizationId\"));\n\n      let organizationIdViaPath: string | null = null;\n\n      if ([\"/sm/\", \"/organizations/\"].some((path) => this.router.url.includes(path))) {\n        // Grab the organization ID from the URL\n        organizationIdViaPath = this.router.url.split(\"/\")[2] ?? null;\n      }\n\n      // When the user is already viewing an organization within an application use it as the active route org\n      if (organizationIdViaPath && !routeOrg) {\n        routeOrg = orgs.find((o) => o.id === organizationIdViaPath);\n      }\n\n      // If the active route org doesn't have access to SM, find the first org that does.\n      const smOrg =\n        routeOrg?.canAccessSecretsManager && routeOrg?.enabled == true\n          ? routeOrg\n          : orgs.find((o) => o.canAccessSecretsManager && o.enabled == true);\n\n      // If the active route org doesn't have access to AC, find the first org that does.\n      const acOrg =\n        routeOrg != null && canAccessOrgAdmin(routeOrg)\n          ? routeOrg\n          : orgs.find((o) => canAccessOrgAdmin(o));\n\n      // TODO: This should be migrated to an Observable provided by the provider service and moved to the combineLatest above. See AC-2092.\n      const providers = await this.providerService.getAll();\n\n      const products = {\n        pm: {\n          name: \"Password Manager\",\n          icon: \"bwi-lock\",\n          appRoute: \"/vault\",\n          marketingRoute: {\n            route: \"https://bitwarden.com/products/personal/\",\n            external: true,\n          },\n          isActive:\n            !this.router.url.includes(\"/sm/\") &&\n            !this.router.url.includes(\"/organizations/\") &&\n            !this.router.url.includes(\"/providers/\"),\n        },\n        sm: {\n          name: \"Secrets Manager\",\n          icon: \"bwi-cli\",\n          appRoute: [\"/sm\", smOrg?.id],\n          marketingRoute: {\n            route: \"/sm-landing\",\n            external: false,\n          },\n          isActive: this.router.url.includes(\"/sm/\"),\n          otherProductOverrides: {\n            supportingText: this.i18n.transform(\"secureYourInfrastructure\"),\n          },\n        },\n        ac: {\n          name: \"Admin Console\",\n          icon: \"bwi-business\",\n          appRoute: [\"/organizations\", acOrg?.id],\n          marketingRoute: {\n            route: \"https://bitwarden.com/products/business/\",\n            external: true,\n          },\n          isActive: this.router.url.includes(\"/organizations/\"),\n        },\n        provider: {\n          name: \"Provider Portal\",\n          icon: \"bwi-provider\",\n          appRoute: [\"/providers\", providers[0]?.id],\n          isActive: this.router.url.includes(\"/providers/\"),\n        },\n        orgs: {\n          name: \"Organizations\",\n          icon: \"bwi-business\",\n          marketingRoute: {\n            route: \"https://bitwarden.com/products/business/\",\n            external: true,\n          },\n          otherProductOverrides: {\n            name: \"Share your passwords\",\n            supportingText: this.i18n.transform(\"protectYourFamilyOrBusiness\"),\n          },\n        },\n      } satisfies Record<string, ProductSwitcherItem>;\n\n      const bento: ProductSwitcherItem[] = [products.pm];\n      const other: ProductSwitcherItem[] = [];\n\n      if (smOrg) {\n        bento.push(products.sm);\n      } else {\n        other.push(products.sm);\n      }\n\n      if (acOrg) {\n        bento.push(products.ac);\n      } else {\n        other.push(products.orgs);\n      }\n\n      if (providers.length > 0) {\n        bento.push(products.provider);\n      }\n\n      return {\n        bento,\n        other,\n      };\n    }),\n  );\n\n  /** Poll the `syncService` until a sync is completed */\n  private pollUntilSynced() {\n    const interval = setInterval(async () => {\n      const lastSync = await this.syncService.getLastSync();\n      if (lastSync !== null) {\n        clearInterval(interval);\n        this.syncCompleted$.next();\n      }\n    }, 200);\n  }\n}\n","<bit-nav-item\n  [text]=\"'sponsoredFamilies' | i18n\"\n  route=\"settings/sponsored-families\"\n  *ngIf=\"showFreeFamilies$ | async\"\n></bit-nav-item>\n","import { Component } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { NavigationModule } from \"@bitwarden/components\";\n\nimport { FreeFamiliesPolicyService } from \"../services/free-families-policy.service\";\n\nimport { BillingSharedModule } from \"./billing-shared.module\";\n\n@Component({\n  selector: \"billing-free-families-nav-item\",\n  templateUrl: \"./billing-free-families-nav-item.component.html\",\n  standalone: true,\n  imports: [NavigationModule, BillingSharedModule],\n})\nexport class BillingFreeFamiliesNavItemComponent {\n  showFreeFamilies$: Observable<boolean>;\n\n  constructor(private freeFamiliesPolicyService: FreeFamiliesPolicyService) {\n    this.showFreeFamilies$ = this.freeFamiliesPolicyService.showFreeFamilies$;\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const PasswordManagerLogo = svgIcon`\n<svg version=\"1.1\" viewBox=\"0 0 800 200\" xmlns=\"http://www.w3.org/2000/svg\">\n <path class=\"tw-fill-text-alt2\" d=\"m457.16 129.39-11.407-36.49q-1.0783-3.3482-4.0292-15.209h-.454q-2.27 9.9313-3.9725 15.322l-11.747 36.377h-10.896l-16.968-62.197h9.8744q6.0158 23.438 9.137 35.696 3.178 12.258 3.632 16.514h.454q.62424-3.2347 1.9863-8.342 1.4188-5.1642 2.4402-8.1717l11.407-35.696h10.215l11.123 35.696q3.178 9.7611 4.313 16.401h.454q.227-2.043 1.1918-6.2993 1.0215-4.2562 11.861-45.797h9.7611l-17.195 62.197zm77.858 0-1.8727-8.8528h-.454q-4.6535 5.8455-9.3072 7.9451-4.5968 2.043-11.52 2.043-9.2503 0-14.528-4.767-5.221-4.767-5.221-13.563 0-18.841 30.134-19.749l10.555-.3405v-3.859q0-7.3209-3.178-10.783-3.1212-3.5185-10.045-3.5185-7.7748 0-17.592 4.767l-2.8943-7.207q4.5968-2.497 10.045-3.9158 5.5048-1.4187 11.009-1.4187 11.123 0 16.457 4.9373 5.3912 4.9373 5.3912 15.833v42.449zm-21.281-6.6399q8.7964 0 13.79-4.8238 5.0508-4.8238 5.0508-13.506v-5.6183l-9.4205.39725q-11.237.39725-16.231 3.5185-4.9372 3.0645-4.9372 9.5908 0 5.1075 3.0645 7.7748 3.1212 2.6672 8.6825 2.6672zm76.045-56.693q4.1428 0 7.4343.68101l-1.3053 8.7395q-3.859-.85122-6.8101-.85122-7.5476 0-12.939 6.1291-5.3345 6.1291-5.3345 15.266v33.369h-9.4205v-62.197h7.7748l1.0783 11.52h.454q3.4617-6.0721 8.3425-9.3636 4.8805-3.2915 10.726-3.2915zm59.077 54.991h-.51081q-6.526 9.4775-19.522 9.4775-12.201 0-19.011-8.342-6.7532-8.342-6.7532-23.721t6.8102-23.892q6.8101-8.5122 18.954-8.5122 12.655 0 19.408 9.1933h.73779l-.39725-4.4832-.22704-4.3697v-25.311h9.4205v88.301h-7.6615zm-18.841 1.589q9.6478 0 13.96-5.221 4.3697-5.2777 4.3697-16.968v-1.9863q0-13.223-4.4264-18.841-4.3698-5.675-14.017-5.675-8.2856 0-12.712 6.4696-4.3698 6.4127-4.3698 18.16 0 11.918 4.3698 17.99 4.3697 6.0721 12.825 6.0721zm74 7.8881q-13.79 0-21.792-8.3989-7.9451-8.3989-7.9451-23.324 0-15.039 7.3773-23.892 7.4343-8.8528 19.919-8.8528 11.69 0 18.501 7.7179 6.8101 7.6615 6.8101 20.26v5.9588h-42.846q.28376 10.953 5.5048 16.628 5.2777 5.675 14.812 5.675 10.045 0 19.863-4.1995v8.3989q-4.994 2.1565-9.4775 3.0645-4.4265.96478-10.726.96478zm-2.5537-56.58q-7.4912 0-11.975 4.8805-4.4265 4.8805-5.221 13.506h32.518q0-8.9097-3.9725-13.62-3.9725-4.767-11.35-4.767zm84.047 55.445v-40.236q0-7.6045-3.4617-11.35-3.4618-3.7455-10.839-3.7455-9.7611 0-14.301 5.2777t-4.54 17.422v32.631h-9.4205v-62.197h7.6615l1.5322 8.5122h.45403q2.8942-4.5968 8.1153-7.0937 5.221-2.5537 11.634-2.5537 11.237 0 16.912 5.448 5.675 5.3912 5.675 17.309v40.576z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m213.24 129.39-3.3482-8.6261h-.454q-4.3697 5.5048-9.023 7.6615-4.5968 2.0998-12.031 2.0998-9.137 0-14.415-5.221-5.221-5.221-5.221-14.869 0-10.102 7.0368-14.869 7.0937-4.8238 21.338-5.3345l11.009-.3405v-2.7808q0-9.6478-9.8744-9.6478-7.6045 0-17.876 4.5968l-5.7318-11.69q10.953-5.7318 24.289-5.7318 12.769 0 19.579 5.5615 6.8102 5.5615 6.8102 16.912v42.279zm-5.1075-29.397-6.6962.227q-7.5476.227-11.237 2.724-3.6888 2.497-3.6888 7.6045 0 7.321 8.3989 7.321 6.0158 0 9.5908-3.4617 3.632-3.4617 3.632-9.1933zm79.962 29.397-2.3268-8.1153h-.908q-2.7808 4.4265-7.8881 6.8665-5.1075 2.3835-11.634 2.3835-11.18 0-16.855-5.9588-5.675-6.0158-5.675-17.252v-41.371h17.309v37.058q0 6.8665 2.4402 10.328 2.4402 3.405 7.7748 3.405 7.264 0 10.499-4.8238 3.2348-4.8805 3.2348-16.117v-29.85h17.309v63.447zm48.748 0h-17.309v-88.301h17.309zm44.889-12.655q4.54 0 10.896-1.9863v12.882q-6.4696 2.8943-15.89 2.8943-10.385 0-15.152-5.221-4.7103-5.2777-4.7103-15.776v-30.588h-8.2856v-7.321l9.5338-5.7885 4.994-13.393h11.066v13.506h17.763v12.996h-17.763v30.588q0 3.6887 2.043 5.448 2.0998 1.7592 5.5047 1.7592z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m51.982 33.947-15.322.002 41.131 115.17h14.518l41.131-115.17h-15.162l-25.971 73.872c-1.7205 4.7315-3.1706 9.1927-4.3535 13.387-1.1829 4.086-2.1516 8.0119-2.9043 11.775-.75272-3.7636-1.7195-7.7417-2.9023-11.936-1.1829-4.1938-2.635-8.7098-4.3555-13.549l-25.809-73.552z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m84.264 5.0749a2.3288 2.3288 0 00-1.2122.99654l-4.145 6.9077c-.72599.06029-1.4502.12529-2.1701.20657l-5.406-5.9599a2.3288 2.3288 0 00-3.9203.77975l-2.7161 7.5796c-.7008.20184-1.4008.40458-2.0929.62653l-6.4616-4.7875a2.3288 2.3288 0 00-3.691 1.53l-1.1884 7.9871c-.63834.33084-1.2749.66363-1.9023 1.0124l-7.297-3.4482a2.3288 2.3288 0 00-3.3222 2.2201l.39272 8.0937c-.55229.44111-1.0997.8874-1.639 1.3438l-7.8588-1.9647a2.3288 2.3288 0 00-2.825 2.825l1.9647 7.8588c-.45646.53923-.90273 1.0867-1.3439 1.639l-8.0937-.39271a2.3288 2.3288 0 00-2.2201 3.3222l3.4482 7.297c-.3488.62737-.68158 1.2639-1.0124 1.9023l-7.9871 1.1884a2.3288 2.3288 0 00-1.53 3.6911l4.7875 6.4616c-.22196.69217-.4247 1.3921-.62653 2.093l-7.5796 2.7161a2.3288 2.3288 0 00-.77976 3.9203l5.9599 5.4061c-.08128.71995-.14628 1.4442-.20657 2.1701l-6.9077 4.1451a2.3288 2.3288 0 000 3.9952l6.9077 4.1439c.06028.72636.12524 1.451.20657 2.1713l-5.9599 5.4061a2.3288 2.3288 0 00.77976 3.9192l7.5796 2.7161c.20188.70099.4045 1.4017.62653 2.0941l-4.7875 6.4605a2.3288 2.3288 0 001.53 3.6922l7.9871 1.1884c.33079.63822.6637 1.275 1.0124 1.9023l-3.4482 7.297a2.3288 2.3288 0 002.2201 3.3222l8.0937-.39272c.44117.55235.88734 1.0997 1.3439 1.639l-1.9647 7.8588a2.3288 2.3288 0 002.825 2.825l7.8588-1.9647c.53923.45647 1.0867.90273 1.639 1.3438l-.39272 8.0926a2.3288 2.3288 0 003.3222 2.2201l7.297-3.447c.62736.34881 1.2639.68158 1.9023 1.0124l1.1884 7.987a2.3288 2.3288 0 003.691 1.5289l6.4616-4.7864c.69217.22197 1.3921.4247 2.0929.62654l2.7161 7.5796a2.3288 2.3288 0 003.9203.7786l5.4049-5.9588c.72031.0813 1.4449.14624 2.1713.20656l4.145 6.9077a2.3288 2.3288 0 003.9952 0l4.1439-6.9077c.72674-.0603 1.4517-.12518 2.1724-.20656l5.4049 5.9588a2.3288 2.3288 0 003.9192-.7786l2.7161-7.5796c.70103-.20189 1.4017-.4045 2.0941-.62654l6.4605 4.7864a2.3288 2.3288 0 003.6922-1.5289l1.1884-7.987c.63823-.33079 1.275-.6637 1.9023-1.0124l7.297 3.447a2.3288 2.3288 0 003.3222-2.2201l-.39271-8.0926c.55234-.44117 1.0997-.88734 1.639-1.3438l7.8588 1.9647a2.3288 2.3288 0 002.825-2.825l-1.9647-7.8588c.4565-.53928.90269-1.0866 1.3438-1.639l8.0926.39272a2.3288 2.3288 0 002.2201-3.3222l-3.447-7.297c.34872-.62723.68163-1.264 1.0124-1.9023l7.987-1.1884a2.3288 2.3288 0 001.5289-3.6922l-4.7863-6.4605c.22202-.69235.42462-1.3931.62652-2.0941l7.5796-2.7161a2.3288 2.3288 0 00.77862-3.9192l-5.9588-5.4049c.0814-.72069.14623-1.4457.20658-2.1724l6.9077-4.1439a2.3288 2.3288 0 000-3.9952l-6.9077-4.1451c-.0603-.72635-.12524-1.451-.20658-2.1713l5.9588-5.4049a2.3288 2.3288 0 00-.77862-3.9203l-7.5796-2.7161c-.20184-.70082-.40457-1.4008-.62652-2.093l4.7863-6.4616a2.3288 2.3288 0 00-1.5289-3.6911l-7.987-1.1884c-.33084-.63836-.66362-1.2749-1.0124-1.9023l3.447-7.297a2.3288 2.3288 0 00-2.2201-3.3222l-8.0926.39271c-.44112-.55229-.8874-1.0997-1.3438-1.639l1.9647-7.8588a2.3288 2.3288 0 00-2.825-2.825l-7.8588 1.9647c-.53927-.4565-1.0866-.9027-1.639-1.3438l.39271-8.0937a2.3288 2.3288 0 00-3.3222-2.2201l-7.297 3.4482c-.62726-.34873-1.264-.68165-1.9023-1.0124l-1.1884-7.9871a2.3288 2.3288 0 00-3.6922-1.53l-6.4605 4.7875c-.69236-.22201-1.3931-.42463-2.0941-.62653l-2.7161-7.5796a2.3288 2.3288 0 00-3.9192-.77975l-5.406 5.9599c-.72032-.08133-1.4449-.14626-2.1713-.20657l-4.1439-6.9077a2.3288 2.3288 0 00-2.783-.99654zm.78543 14.613a4.657 4.657 0 014.6569 4.6569 4.657 4.657 0 01-4.6569 4.6569 4.657 4.657 0 01-4.6569-4.6569 4.657 4.657 0 014.6569-4.6569zm-10.998 8.0064 7.7056 7.7056a4.6575 4.6575 0 006.5853 0l7.7056-7.7056c17.959 3.3214 33.023 14.65 41.468 30.141l-4.943 9.6998a4.6575 4.6575 0 002.0351 6.263l9.7123 4.9486c.32157 2.5182.49487 5.0839.49487 7.692 0 15.934-6.1974 30.369-16.306 41.066l-10.796-1.7093a4.6575 4.6575 0 00-5.3277 3.8704l-1.7116 10.804c-7.7603 3.6739-16.443 5.734-25.624 5.734-9.1812 0-17.864-2.0608-25.625-5.7352l-1.7116-10.803a4.6575 4.6575 0 00-5.3277-3.8715l-10.795 1.7105c-10.108-10.697-16.306-25.132-16.306-41.066 0-2.608.1733-5.1738.49487-7.692l9.7111-4.9486a4.6575 4.6575 0 002.0351-6.263l-4.9418-9.6986c8.4449-15.492 23.508-26.821 41.468-30.142zm-47.923 34.902a4.657 4.657 0 011.3064.22587 4.657 4.657 0 012.9896 5.868 4.657 4.657 0 01-5.868 2.9907 4.657 4.657 0 01-2.9907-5.8691 4.657 4.657 0 014.5627-3.2155zm117.84 0a4.657 4.657 0 014.5616 3.2155 4.657 4.657 0 01-2.9896 5.8691 4.657 4.657 0 01-5.868-2.9907 4.657 4.657 0 012.9896-5.868 4.657 4.657 0 011.3064-.22587zm-95.153 69.428a4.657 4.657 0 012.4709.88189 4.657 4.657 0 011.0306 6.5047 4.657 4.657 0 01-6.5047 1.0306 4.657 4.657 0 01-1.0306-6.5047 4.657 4.657 0 014.0338-1.9125zm72.463 0a4.657 4.657 0 014.0338 1.9125 4.657 4.657 0 01-1.0306 6.5047 4.657 4.657 0 01-6.5047-1.0306 4.657 4.657 0 011.0306-6.5047 4.657 4.657 0 012.4709-.88189z\"/>\n <path class=\"tw-fill-text-alt2\" d=\"m304.87 145.51q7.8436 0 11.429 3.0814t3.5857 8.684q0 3.3055-1.5127 6.2189-1.4567 2.8573-4.9863 4.6502-3.4736 1.7928-9.4684 1.7928h-4.5941v15.575h-5.0423v-40.003zm-.44821 4.314h-5.0984v15.799h4.0339q5.7147 0 8.516-1.8489 2.8013-1.8488 2.8013-6.2749 0-3.8658-2.4652-5.7707-2.4651-1.9049-7.7876-1.9049zm34.456 5.1544q5.4906 0 8.1238 2.4091t2.6332 7.6756v20.449h-3.5857l-.95244-4.258h-.2241q-1.9609 2.4651-4.1459 3.6417-2.129 1.1765-5.9388 1.1765-4.0899 0-6.7792-2.129-2.6892-2.185-2.6892-6.7791 0-4.4821 3.5296-6.8912 3.5296-2.4651 10.869-2.6892l5.0984-.16808v-1.7928q0-3.7537-1.6248-5.2104t-4.5941-1.4567q-2.3531 0-4.4821.72834-2.129.67231-3.9778 1.5687l-1.5127-3.6977q1.9609-1.0645 4.6502-1.7928 2.6892-.78437 5.6026-.78437zm1.4567 16.023q-5.6026.2241-7.7876 1.7928-2.129 1.5687-2.129 4.426 0 2.5212 1.5127 3.6977 1.5687 1.1766 3.9778 1.1766 3.8098 0 6.3309-2.073 2.5212-2.129 2.5212-6.499v-2.6892zm38.154 6.2189q0 4.37-3.2495 6.6111-3.2495 2.241-8.7401 2.241-3.1375 0-5.4345-.50423-2.241-.50424-3.9778-1.4006v-4.4821q1.7928.89641 4.314 1.6808 2.5772.72834 5.2104.72834 3.7537 0 5.4345-1.1766 1.6808-1.2326 1.6808-3.2495 0-1.1205-.61628-2.0169-.61629-.89642-2.241-1.7928-1.5687-.89641-4.5381-2.0169-2.9134-1.1205-4.9863-2.241t-3.1935-2.6892-1.1205-4.0339q0-3.8098 3.0814-5.8827 3.1374-2.073 8.1798-2.073 2.7453 0 5.0984.56026 2.4091.50423 4.4821 1.4567l-1.6808 3.9218q-1.9049-.78436-3.9778-1.3446t-4.258-.56026q-3.0254 0-4.6502 1.0085-1.5687.95244-1.5687 2.6332 0 1.2326.72834 2.129.72834.84039 2.4091 1.6808 1.7368.78436 4.5941 1.9049 2.8573 1.0645 4.8743 2.185t3.0814 2.7453q1.0645 1.5687 1.0645 3.9778zm26.836 0q0 4.37-3.2495 6.6111t-8.74 2.241q-3.1375 0-5.4345-.50423-2.241-.50424-3.9778-1.4006v-4.4821q1.7928.89641 4.314 1.6808 2.5772.72834 5.2104.72834 3.7537 0 5.4345-1.1766 1.6808-1.2326 1.6808-3.2495 0-1.1205-.61629-2.0169-.61628-.89642-2.241-1.7928-1.5687-.89641-4.5381-2.0169-2.9134-1.1205-4.9863-2.241-2.073-1.1205-3.1935-2.6892t-1.1205-4.0339q0-3.8098 3.0814-5.8827 3.1375-2.073 8.1798-2.073 2.7453 0 5.0984.56026 2.4091.50423 4.4821 1.4567l-1.6808 3.9218q-1.9049-.78436-3.9778-1.3446t-4.258-.56026q-3.0254 0-4.6502 1.0085-1.5687.95244-1.5687 2.6332 0 1.2326.72833 2.129.72834.84039 2.4091 1.6808 1.7368.78436 4.5941 1.9049 2.8573 1.0645 4.8743 2.185 2.0169 1.1205 3.0814 2.7453 1.0645 1.5687 1.0645 3.9778zm26.668-8.684q-.72834-2.2971-1.2886-4.4821-.50424-2.241-.78437-3.4736h-.2241q-.2241 1.2326-.72834 3.4736-.50423 2.185-1.2886 4.5381l-5.3785 16.864h-5.6026l-8.2358-30.03h5.0984l4.1459 16.023q.61628 2.4091 1.1765 4.8743.56026 2.4651.78437 4.0899h.2241q.2241-.95245.50423-2.3531.33616-1.4006.72834-2.9134.39218-1.5687.78437-2.8013l5.3225-16.92h5.3785l5.1544 16.92q.61629 1.9049 1.1766 4.1459.61629 2.241.84039 3.8658h.2241q.16808-1.4006.72834-3.8658.61629-2.4652 1.2886-5.0423l4.202-16.023h5.0423l-8.3479 30.03h-5.7707zm50.76 1.9049q0 7.4515-3.8098 11.541-3.7537 4.0899-10.197 4.0899-3.9778 0-7.1153-1.7928-3.0814-1.8489-4.8743-5.3225-1.7928-3.5296-1.7928-8.516 0-7.4515 3.7537-11.485t10.197-4.0339q4.0899 0 7.1713 1.8488 3.1375 1.7928 4.8743 5.2664 1.7928 3.4176 1.7928 8.4039zm-22.691 0q0 5.3225 2.073 8.4599 2.129 3.0814 6.7231 3.0814 4.5381 0 6.6671-3.0814 2.129-3.1374 2.129-8.4599t-2.129-8.3479q-2.129-3.0254-6.7231-3.0254t-6.6671 3.0254q-2.073 3.0254-2.073 8.3479zm44.485-15.519q.84039 0 1.7928.11205 1.0085.056 1.7368.2241l-.61628 4.5381q-.72834-.16808-1.6248-.28013-.84039-.11205-1.6248-.11205-2.2971 0-4.314 1.2886-2.0169 1.2326-3.2495 3.5296-1.1766 2.241-1.1766 5.2664v16.023h-4.9303v-30.03h4.0339l.56026 5.4905h.2241q1.4567-2.4651 3.7537-4.258 2.2971-1.7928 5.4345-1.7928zm18.657 31.15q-5.6026 0-8.9642-3.8658-3.3616-3.9218-3.3616-11.653t3.3616-11.653q3.4176-3.9778 9.0202-3.9778 3.4736 0 5.6586 1.2886 2.241 1.2886 3.6417 3.1375h.33615q-.056-.72834-.2241-2.129-.11205-1.4567-.11205-2.2971v-11.99h4.9303v42.58h-3.9778l-.72834-4.0339h-.2241q-1.3446 1.9049-3.5857 3.2495-2.241 1.3446-5.7707 1.3446zm.78437-4.0899q4.7622 0 6.6671-2.5772 1.9609-2.6332 1.9609-7.8997v-.89641q0-5.6026-1.8488-8.572-1.8489-3.0254-6.8352-3.0254-3.9778 0-5.9948 3.1935-1.9609 3.1374-1.9609 8.4599 0 5.3785 1.9609 8.3479 2.0169 2.9694 6.0508 2.9694zm55.914 3.5296-13.166-35.072h-.2241q.16808 1.7368.28013 4.7062.11205 2.9134.11205 6.1068v24.259h-4.6502v-40.003h7.4515l12.326 32.775h.22411l12.55-32.775h7.3954v40.003h-4.9863v-24.595q0-2.9134.11205-5.7707.16808-2.8573.28013-4.6502h-.2241l-13.334 35.016zm43.868-30.534q5.4906 0 8.1238 2.4091t2.6332 7.6756v20.449h-3.5857l-.95244-4.258h-.22411q-1.9609 2.4651-4.1459 3.6417-2.129 1.1765-5.9388 1.1765-4.0899 0-6.7791-2.129-2.6892-2.185-2.6892-6.7791 0-4.4821 3.5296-6.8912 3.5296-2.4651 10.869-2.6892l5.0984-.16808v-1.7928q0-3.7537-1.6248-5.2104t-4.5941-1.4567q-2.3531 0-4.4821.72834-2.129.67231-3.9778 1.5687l-1.5127-3.6977q1.9609-1.0645 4.6502-1.7928 2.6892-.78437 5.6026-.78437zm1.4567 16.023q-5.6026.2241-7.7876 1.7928-2.129 1.5687-2.129 4.426 0 2.5212 1.5127 3.6977 1.5687 1.1766 3.9778 1.1766 3.8098 0 6.3309-2.073 2.5212-2.129 2.5212-6.499v-2.6892zm33.055-16.079q5.3785 0 8.1238 2.6332 2.7453 2.5772 2.7453 8.4039v19.553h-4.8743v-19.217q0-7.2274-6.7231-7.2274-4.9863 0-6.8912 2.8013t-1.9049 8.0677v15.575h-4.9303v-30.03h3.9778l.72834 4.0899h.28013q1.4567-2.3531 4.0339-3.4736 2.5772-1.1765 5.4345-1.1765zm31.543.056q5.4906 0 8.1238 2.4091t2.6332 7.6756v20.449h-3.5857l-.95245-4.258h-.2241q-1.9609 2.4651-4.1459 3.6417-2.129 1.1765-5.9388 1.1765-4.0899 0-6.7792-2.129-2.6892-2.185-2.6892-6.7791 0-4.4821 3.5296-6.8912 3.5296-2.4651 10.869-2.6892l5.0984-.16808v-1.7928q0-3.7537-1.6248-5.2104t-4.5941-1.4567q-2.3531 0-4.4821.72834-2.129.67231-3.9778 1.5687l-1.5127-3.6977q1.9609-1.0645 4.6502-1.7928 2.6892-.78437 5.6026-.78437zm1.4567 16.023q-5.6026.2241-7.7876 1.7928-2.129 1.5687-2.129 4.426 0 2.5212 1.5127 3.6977 1.5687 1.1766 3.9778 1.1766 3.8098 0 6.3309-2.073 2.5212-2.129 2.5212-6.499v-2.6892zm29.246-16.079q2.9694 0 5.3225 1.1205 2.4091 1.1205 4.0899 3.4176h.28013l.67231-3.9778h3.9218v30.534q0 6.443-3.3055 9.6925-3.2495 3.2495-10.141 3.2495-6.6111 0-10.813-1.9049v-4.5381q4.426 2.3531 11.093 2.3531 3.8658 0 6.0508-2.2971 2.241-2.241 2.241-6.1629v-1.1766q0-.67231.056-1.9049.056-1.2886.11205-1.7928h-.2241q-3.0254 4.5381-9.3003 4.5381-5.8267 0-9.1322-4.0899-3.2495-4.0899-3.2495-11.429 0-7.1713 3.2495-11.373 3.3055-4.258 9.0762-4.258zm.67232 4.1459q-3.7538 0-5.8267 3.0254-2.073 2.9694-2.073 8.516t2.0169 8.516q2.073 2.9134 5.9948 2.9134 4.5381 0 6.6111-2.4091 2.073-2.4651 2.073-7.8997v-1.1766q0-6.1629-2.129-8.7961-2.129-2.6892-6.6671-2.6892zm34.736-4.1459q3.8658 0 6.6111 1.6808 2.8013 1.6808 4.258 4.7622 1.5127 3.0254 1.5127 7.1153v2.9694h-20.562q.11206 5.0984 2.5772 7.7876 2.5212 2.6332 7.0032 2.6332 2.8573 0 5.0423-.50423 2.241-.56026 4.5941-1.5687v4.314q-2.2971 1.0085-4.5381 1.4567-2.241.50423-5.3225.50423-4.258 0-7.5635-1.7368-3.2495-1.7368-5.0984-5.1544-1.7928-3.4736-1.7928-8.4599 0-4.9303 1.6248-8.4599 1.6808-3.5296 4.6502-5.4345 3.0254-1.9049 7.0032-1.9049zm-.056 4.0339q-3.5296 0-5.6026 2.2971-2.0169 2.241-2.4091 6.2749h15.295q-.056-3.8098-1.7928-6.1629-1.7368-2.4091-5.4906-2.4091zm34.064-4.0339q.84039 0 1.7928.11205 1.0085.056 1.7368.2241l-.61629 4.5381q-.72834-.16808-1.6248-.28013-.84039-.11205-1.6248-.11205-2.2971 0-4.314 1.2886-2.0169 1.2326-3.2495 3.5296-1.1765 2.241-1.1765 5.2664v16.023h-4.9303v-30.03h4.0339l.56026 5.4905h.22411q1.4567-2.4651 3.7537-4.258 2.2971-1.7928 5.4345-1.7928z\"/>\n</svg>\n`;\n","<app-layout>\n  <app-side-nav>\n    <bit-nav-logo [openIcon]=\"logo\" route=\".\" [label]=\"'passwordManager' | i18n\"></bit-nav-logo>\n\n    <bit-nav-item icon=\"bwi-collection\" [text]=\"'vaults' | i18n\" route=\"vault\"></bit-nav-item>\n    <bit-nav-item icon=\"bwi-send\" [text]=\"'send' | i18n\" route=\"sends\"></bit-nav-item>\n    <bit-nav-group icon=\"bwi-wrench\" [text]=\"'tools' | i18n\" route=\"tools\">\n      <bit-nav-item [text]=\"'generator' | i18n\" route=\"tools/generator\"></bit-nav-item>\n      <bit-nav-item [text]=\"'importData' | i18n\" route=\"tools/import\"></bit-nav-item>\n      <bit-nav-item [text]=\"'exportVault' | i18n\" route=\"tools/export\"></bit-nav-item>\n    </bit-nav-group>\n    <bit-nav-item icon=\"bwi-sliders\" [text]=\"'reports' | i18n\" route=\"reports\"></bit-nav-item>\n    <bit-nav-group icon=\"bwi-cog\" [text]=\"'settings' | i18n\" route=\"settings\">\n      <bit-nav-item [text]=\"'myAccount' | i18n\" route=\"settings/account\"></bit-nav-item>\n      <bit-nav-item [text]=\"'security' | i18n\" route=\"settings/security\"></bit-nav-item>\n      <bit-nav-item [text]=\"'preferences' | i18n\" route=\"settings/preferences\"></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'subscription' | i18n\"\n        route=\"settings/subscription\"\n        *ngIf=\"showSubscription$ | async\"\n      ></bit-nav-item>\n      <bit-nav-item [text]=\"'domainRules' | i18n\" route=\"settings/domain-rules\"></bit-nav-item>\n      <bit-nav-item\n        [text]=\"'emergencyAccess' | i18n\"\n        route=\"settings/emergency-access\"\n      ></bit-nav-item>\n      <billing-free-families-nav-item></billing-free-families-nav-item>\n    </bit-nav-group>\n  </app-side-nav>\n\n  <router-outlet></router-outlet>\n</app-layout>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\nimport { Observable, of } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { IconModule } from \"@bitwarden/components\";\n\nimport { BillingFreeFamiliesNavItemComponent } from \"../billing/shared/billing-free-families-nav-item.component\";\n\nimport { PasswordManagerLogo } from \"./password-manager-logo\";\nimport { WebLayoutModule } from \"./web-layout.module\";\n\n@Component({\n  selector: \"app-user-layout\",\n  templateUrl: \"user-layout.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    RouterModule,\n    JslibModule,\n    WebLayoutModule,\n    IconModule,\n    BillingFreeFamiliesNavItemComponent,\n  ],\n})\nexport class UserLayoutComponent implements OnInit {\n  protected readonly logo = PasswordManagerLogo;\n  isFreeFamilyFlagEnabled: boolean;\n  protected hasFamilySponsorshipAvailable$: Observable<boolean>;\n  protected showSponsoredFamilies$: Observable<boolean>;\n  protected showSubscription$: Observable<boolean>;\n\n  constructor(\n    private syncService: SyncService,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {\n    this.showSubscription$ = of(false); // always hide subscriptions in Vaultwarden\n  }\n\n  async ngOnInit() {\n    document.body.classList.remove(\"layout_frontend\");\n    await this.syncService.fullSync(false);\n\n    this.hasFamilySponsorshipAvailable$ = of(false); // disable family Sponsorships in Vaultwarden\n    this.showSponsoredFamilies$ = of(false); // disable family Sponsorships in Vaultwarden\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { LayoutComponent } from \"@bitwarden/components\";\n\nimport { ProductSwitcherModule } from \"./product-switcher/product-switcher.module\";\nimport { ToggleWidthComponent } from \"./toggle-width.component\";\n\n@Component({\n  selector: \"app-layout\",\n  templateUrl: \"web-layout.component.html\",\n  standalone: true,\n  imports: [CommonModule, LayoutComponent, ProductSwitcherModule, ToggleWidthComponent],\n})\nexport class WebLayoutComponent {\n  constructor() {}\n}\n","<bit-layout>\n  <ng-content select=\"app-side-nav, [slot=side-nav]\" slot=\"side-nav\"></ng-content>\n  <ng-content></ng-content>\n</bit-layout>\n","import { NgModule } from \"@angular/core\";\n\nimport { NavigationModule } from \"@bitwarden/components\";\n\nimport { WebLayoutComponent } from \"./web-layout.component\";\nimport { WebSideNavComponent } from \"./web-side-nav.component\";\n\n@NgModule({\n  imports: [WebLayoutComponent, WebSideNavComponent],\n  exports: [NavigationModule, WebLayoutComponent, WebSideNavComponent],\n  declarations: [],\n  providers: [],\n})\nexport class WebLayoutModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { NavigationModule } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-toggle-width\",\n  template: `<bit-nav-item\n    text=\"Toggle Width\"\n    icon=\"bwi-bug\"\n    *ngIf=\"isDev\"\n    (click)=\"toggleWidth()\"\n  ></bit-nav-item>`,\n  standalone: true,\n  imports: [CommonModule, NavigationModule],\n})\nexport class ToggleWidthComponent {\n  protected isDev: boolean;\n\n  constructor(platformUtilsService: PlatformUtilsService) {\n    this.isDev = platformUtilsService.isDev();\n  }\n\n  protected toggleWidth() {\n    if (document.body.style.minWidth === \"unset\") {\n      document.body.style.minWidth = \"\";\n    } else {\n      document.body.style.minWidth = \"unset\";\n    }\n  }\n}\n","<div class=\"tw-mt-auto\">\n  <!-- [attr.icon] is used to keep the icon attribute on the bit-nav-item after prod mode is enabled. Matches other navigation items and assists in automated testing. -->\n  <bit-nav-item\n    *ngFor=\"let product of accessibleProducts$ | async\"\n    [icon]=\"product.icon\"\n    [text]=\"product.name\"\n    [route]=\"product.appRoute\"\n    [attr.icon]=\"product.icon\"\n    [forceActiveStyles]=\"product.isActive\"\n  >\n  </bit-nav-item>\n  <ng-container *ngIf=\"moreProducts$ | async as moreProducts\">\n    <section *ngIf=\"false\" class=\"tw-mt-2 tw-flex tw-w-full tw-flex-col tw-gap-2 tw-border-0\">\n      <span class=\"tw-text-xs !tw-text-alt2 tw-p-2 tw-pb-0\">{{ \"moreFromBitwarden\" | i18n }}</span>\n      <ng-container *ngFor=\"let more of moreProducts\">\n        <!-- <a> for when the marketing route is external -->\n        <a\n          *ngIf=\"more.marketingRoute.external\"\n          [href]=\"more.marketingRoute.route\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          class=\"tw-flex tw-py-2 tw-px-4 tw-font-semibold !tw-text-alt2 !tw-no-underline hover:tw-bg-primary-300/60 [&>:not(.bwi)]:hover:tw-underline\"\n        >\n          <i class=\"bwi bwi-fw {{ more.icon }} tw-mt-1 tw-mx-1\"></i>\n          <div>\n            {{ more.otherProductOverrides?.name ?? more.name }}\n            <div\n              *ngIf=\"more.otherProductOverrides?.supportingText\"\n              class=\"tw-text-xs tw-font-normal\"\n            >\n              {{ more.otherProductOverrides.supportingText }}\n            </div>\n          </div>\n        </a>\n        <!-- <a> for when the marketing route is internal, it needs to use [routerLink] instead of [href] like the external <a> uses. -->\n        <a\n          *ngIf=\"!more.marketingRoute.external\"\n          [routerLink]=\"more.marketingRoute.route\"\n          rel=\"noreferrer\"\n          class=\"tw-flex tw-py-2 tw-px-4 tw-font-semibold !tw-text-alt2 !tw-no-underline hover:tw-bg-primary-300/60 [&>:not(.bwi)]:hover:tw-underline\"\n        >\n          <i class=\"bwi bwi-fw {{ more.icon }} tw-mt-1 tw-mx-1\"></i>\n          <div>\n            {{ more.otherProductOverrides?.name ?? more.name }}\n            <div\n              *ngIf=\"more.otherProductOverrides?.supportingText\"\n              class=\"tw-text-xs tw-font-normal\"\n            >\n              {{ more.otherProductOverrides.supportingText }}\n            </div>\n          </div>\n        </a>\n      </ng-container>\n    </section>\n  </ng-container>\n</div>\n","import { Component } from \"@angular/core\";\nimport { map, Observable } from \"rxjs\";\n\nimport { ProductSwitcherItem, ProductSwitcherService } from \"../shared/product-switcher.service\";\n\n@Component({\n  selector: \"navigation-product-switcher\",\n  templateUrl: \"./navigation-switcher.component.html\",\n})\nexport class NavigationProductSwitcherComponent {\n  constructor(private productSwitcherService: ProductSwitcherService) {}\n\n  protected readonly accessibleProducts$: Observable<ProductSwitcherItem[]> =\n    this.productSwitcherService.products$.pipe(map((products) => products.bento ?? []));\n\n  protected readonly moreProducts$: Observable<ProductSwitcherItem[]> =\n    this.productSwitcherService.products$.pipe(\n      map((products) => products.other ?? []),\n      // Ensure that organizations is displayed first in the other products list\n      // This differs from the order in `ProductSwitcherContentComponent` but matches the intent\n      // from product & design\n      map((products) => products.sort((product) => (product.name === \"Organizations\" ? -1 : 1))),\n    );\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { SideNavVariant, NavigationModule } from \"@bitwarden/components\";\n\nimport { ProductSwitcherModule } from \"./product-switcher/product-switcher.module\";\nimport { ToggleWidthComponent } from \"./toggle-width.component\";\n\n@Component({\n  selector: \"app-side-nav\",\n  templateUrl: \"web-side-nav.component.html\",\n  standalone: true,\n  imports: [CommonModule, NavigationModule, ProductSwitcherModule, ToggleWidthComponent],\n})\nexport class WebSideNavComponent {\n  @Input() variant: SideNavVariant = \"primary\";\n}\n","<bit-side-nav [variant]=\"variant\">\n  <ng-content></ng-content>\n\n  <ng-container slot=\"footer\">\n    <navigation-product-switcher></navigation-product-switcher>\n    <app-toggle-width></app-toggle-width>\n  </ng-container>\n</bit-side-nav>\n","<ng-container>\n  <hr />\n  <p *ngIf=\"fingerprint\">\n    {{ fingerprintLabel }}:\n    <a\n      href=\"https://bitwarden.com/help/fingerprint-phrase/\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      appA11yTitle=\"{{ 'learnMoreAboutYourAccountFingerprintPhrase' | i18n }}\"\n    >\n      <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i\n    ></a>\n    <br />\n    <code class=\"tw-text-code\">{{ fingerprint }}</code>\n  </p>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { SharedModule } from \"../../shared.module\";\n\n@Component({\n  selector: \"app-account-fingerprint\",\n  templateUrl: \"account-fingerprint.component.html\",\n  standalone: true,\n  imports: [SharedModule],\n})\nexport class AccountFingerprintComponent implements OnInit {\n  @Input() fingerprintMaterial: string;\n  @Input() publicKeyBuffer: Uint8Array;\n  @Input() fingerprintLabel: string;\n\n  protected fingerprint: string;\n\n  constructor(private keyService: KeyService) {}\n\n  async ngOnInit() {\n    // TODO - In the future, remove this code and use the fingerprint pipe once merged\n    const generatedFingerprint = await this.keyService.getFingerprint(\n      this.fingerprintMaterial,\n      this.publicKeyBuffer,\n    );\n    this.fingerprint = generatedFingerprint?.join(\"-\") ?? null;\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../../shared\";\n\nimport { ChangeKdfConfirmationComponent } from \"./change-kdf-confirmation.component\";\nimport { ChangeKdfComponent } from \"./change-kdf.component\";\n\n@NgModule({\n  imports: [CommonModule, SharedModule],\n  declarations: [ChangeKdfComponent, ChangeKdfConfirmationComponent],\n  exports: [ChangeKdfComponent, ChangeKdfConfirmationComponent],\n})\nexport class ChangeKdfModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport {\n  PasswordCalloutComponent,\n  UserVerificationFormInputComponent,\n  VaultTimeoutInputComponent,\n} from \"@bitwarden/auth/angular\";\nimport { LayoutComponent, NavigationModule } from \"@bitwarden/components\";\n\nimport { OrganizationLayoutComponent } from \"../admin-console/organizations/layouts/organization-layout.component\";\nimport { EventsComponent as OrgEventsComponent } from \"../admin-console/organizations/manage/events.component\";\nimport { UserConfirmComponent as OrgUserConfirmComponent } from \"../admin-console/organizations/manage/user-confirm.component\";\nimport { VerifyRecoverDeleteOrgComponent } from \"../admin-console/organizations/manage/verify-recover-delete-org.component\";\nimport { AcceptFamilySponsorshipComponent } from \"../admin-console/organizations/sponsorships/accept-family-sponsorship.component\";\nimport { ExposedPasswordsReportComponent as OrgExposedPasswordsReportComponent } from \"../admin-console/organizations/tools/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent as OrgInactiveTwoFactorReportComponent } from \"../admin-console/organizations/tools/inactive-two-factor-report.component\";\nimport { ReusedPasswordsReportComponent as OrgReusedPasswordsReportComponent } from \"../admin-console/organizations/tools/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent as OrgUnsecuredWebsitesReportComponent } from \"../admin-console/organizations/tools/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent as OrgWeakPasswordsReportComponent } from \"../admin-console/organizations/tools/weak-passwords-report.component\";\nimport { HintComponent } from \"../auth/hint.component\";\nimport { RecoverDeleteComponent } from \"../auth/recover-delete.component\";\nimport { RecoverTwoFactorComponent } from \"../auth/recover-two-factor.component\";\nimport { RegisterFormModule } from \"../auth/register-form/register-form.module\";\nimport { RemovePasswordComponent } from \"../auth/remove-password.component\";\nimport { SetPasswordComponent } from \"../auth/set-password.component\";\nimport { AccountComponent } from \"../auth/settings/account/account.component\";\nimport { ChangeAvatarDialogComponent } from \"../auth/settings/account/change-avatar-dialog.component\";\nimport { ChangeEmailComponent } from \"../auth/settings/account/change-email.component\";\nimport { DangerZoneComponent } from \"../auth/settings/account/danger-zone.component\";\nimport { DeauthorizeSessionsComponent } from \"../auth/settings/account/deauthorize-sessions.component\";\nimport { DeleteAccountDialogComponent } from \"../auth/settings/account/delete-account-dialog.component\";\nimport { ProfileComponent } from \"../auth/settings/account/profile.component\";\nimport { EmergencyAccessAttachmentsComponent } from \"../auth/settings/emergency-access/attachments/emergency-access-attachments.component\";\nimport { EmergencyAccessConfirmComponent } from \"../auth/settings/emergency-access/confirm/emergency-access-confirm.component\";\nimport { EmergencyAccessAddEditComponent } from \"../auth/settings/emergency-access/emergency-access-add-edit.component\";\nimport { EmergencyAccessComponent } from \"../auth/settings/emergency-access/emergency-access.component\";\nimport { EmergencyAccessTakeoverComponent } from \"../auth/settings/emergency-access/takeover/emergency-access-takeover.component\";\nimport { EmergencyAccessViewComponent } from \"../auth/settings/emergency-access/view/emergency-access-view.component\";\nimport { EmergencyAddEditCipherComponent } from \"../auth/settings/emergency-access/view/emergency-add-edit-cipher.component\";\nimport { ApiKeyComponent } from \"../auth/settings/security/api-key.component\";\nimport { ChangeKdfModule } from \"../auth/settings/security/change-kdf/change-kdf.module\";\nimport { SecurityKeysComponent } from \"../auth/settings/security/security-keys.component\";\nimport { SecurityComponent } from \"../auth/settings/security/security.component\";\nimport { TwoFactorRecoveryComponent } from \"../auth/settings/two-factor/two-factor-recovery.component\";\nimport { TwoFactorSetupAuthenticatorComponent } from \"../auth/settings/two-factor/two-factor-setup-authenticator.component\";\nimport { TwoFactorSetupDuoComponent } from \"../auth/settings/two-factor/two-factor-setup-duo.component\";\nimport { TwoFactorSetupEmailComponent } from \"../auth/settings/two-factor/two-factor-setup-email.component\";\nimport { TwoFactorSetupWebAuthnComponent } from \"../auth/settings/two-factor/two-factor-setup-webauthn.component\";\nimport { TwoFactorSetupYubiKeyComponent } from \"../auth/settings/two-factor/two-factor-setup-yubikey.component\";\nimport { TwoFactorSetupComponent } from \"../auth/settings/two-factor/two-factor-setup.component\";\nimport { TwoFactorVerifyComponent } from \"../auth/settings/two-factor/two-factor-verify.component\";\nimport { UserVerificationModule } from \"../auth/shared/components/user-verification\";\nimport { SsoComponentV1 } from \"../auth/sso-v1.component\";\nimport { TwoFactorOptionsComponent } from \"../auth/two-factor-options.component\";\nimport { TwoFactorComponent } from \"../auth/two-factor.component\";\nimport { UpdatePasswordComponent } from \"../auth/update-password.component\";\nimport { UpdateTempPasswordComponent } from \"../auth/update-temp-password.component\";\nimport { VerifyEmailTokenComponent } from \"../auth/verify-email-token.component\";\nimport { VerifyRecoverDeleteComponent } from \"../auth/verify-recover-delete.component\";\nimport { SponsoredFamiliesComponent } from \"../billing/settings/sponsored-families.component\";\nimport { SponsoringOrgRowComponent } from \"../billing/settings/sponsoring-org-row.component\";\nimport { DynamicAvatarComponent } from \"../components/dynamic-avatar.component\";\nimport { SelectableAvatarComponent } from \"../components/selectable-avatar.component\";\nimport { FrontendLayoutComponent } from \"../layouts/frontend-layout.component\";\nimport { HeaderModule } from \"../layouts/header/header.module\";\nimport { ProductSwitcherModule } from \"../layouts/product-switcher/product-switcher.module\";\nimport { UserLayoutComponent } from \"../layouts/user-layout.component\";\nimport { DomainRulesComponent } from \"../settings/domain-rules.component\";\nimport { PreferencesComponent } from \"../settings/preferences.component\";\nimport { GeneratorComponent } from \"../tools/generator.component\";\nimport { PasswordGeneratorHistoryComponent } from \"../tools/password-generator-history.component\";\nimport { AddEditComponent as SendAddEditComponent } from \"../tools/send/add-edit.component\";\nimport { PremiumBadgeComponent } from \"../vault/components/premium-badge.component\";\nimport { AddEditCustomFieldsComponent } from \"../vault/individual-vault/add-edit-custom-fields.component\";\nimport { AddEditComponent } from \"../vault/individual-vault/add-edit.component\";\nimport { AttachmentsComponent } from \"../vault/individual-vault/attachments.component\";\nimport { FolderAddEditComponent } from \"../vault/individual-vault/folder-add-edit.component\";\nimport { OrganizationBadgeModule } from \"../vault/individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../vault/individual-vault/pipes/pipes.module\";\nimport { AddEditComponent as OrgAddEditComponent } from \"../vault/org-vault/add-edit.component\";\nimport { AttachmentsComponent as OrgAttachmentsComponent } from \"../vault/org-vault/attachments.component\";\nimport { PurgeVaultComponent } from \"../vault/settings/purge-vault.component\";\n\nimport { EnvironmentSelectorModule } from \"./../components/environment-selector/environment-selector.module\";\nimport { AccountFingerprintComponent } from \"./components/account-fingerprint/account-fingerprint.component\";\nimport { SharedModule } from \"./shared.module\";\n\n// Please do not add to this list of declarations - we should refactor these into modules when doing so makes sense until there are none left.\n// If you are building new functionality, please create or extend a feature module instead.\n@NgModule({\n  imports: [\n    SharedModule,\n    RegisterFormModule,\n    ProductSwitcherModule,\n    UserVerificationModule,\n    ChangeKdfModule,\n    DynamicAvatarComponent,\n    EnvironmentSelectorModule,\n    AccountFingerprintComponent,\n    OrganizationBadgeModule,\n    PipesModule,\n    PasswordCalloutComponent,\n    UserVerificationFormInputComponent,\n    DangerZoneComponent,\n    LayoutComponent,\n    NavigationModule,\n    HeaderModule,\n    OrganizationLayoutComponent,\n    UserLayoutComponent,\n    VerifyRecoverDeleteOrgComponent,\n    VaultTimeoutInputComponent,\n  ],\n  declarations: [\n    AcceptFamilySponsorshipComponent,\n    AccountComponent,\n    AddEditComponent,\n    AddEditCustomFieldsComponent,\n    AddEditCustomFieldsComponent,\n    ApiKeyComponent,\n    AttachmentsComponent,\n    ChangeEmailComponent,\n    DeauthorizeSessionsComponent,\n    DeleteAccountDialogComponent,\n    DomainRulesComponent,\n    EmergencyAccessAddEditComponent,\n    EmergencyAccessAttachmentsComponent,\n    EmergencyAccessComponent,\n    EmergencyAccessConfirmComponent,\n    EmergencyAccessTakeoverComponent,\n    EmergencyAccessViewComponent,\n    EmergencyAddEditCipherComponent,\n    FolderAddEditComponent,\n    FrontendLayoutComponent,\n    HintComponent,\n    OrgAddEditComponent,\n    OrgAttachmentsComponent,\n    OrgEventsComponent,\n    OrgExposedPasswordsReportComponent,\n    OrgInactiveTwoFactorReportComponent,\n    OrgReusedPasswordsReportComponent,\n    OrgUnsecuredWebsitesReportComponent,\n    OrgUserConfirmComponent,\n    OrgWeakPasswordsReportComponent,\n    GeneratorComponent,\n    PasswordGeneratorHistoryComponent,\n    PreferencesComponent,\n    PremiumBadgeComponent,\n    ProfileComponent,\n    ChangeAvatarDialogComponent,\n    PurgeVaultComponent,\n    RecoverDeleteComponent,\n    RecoverTwoFactorComponent,\n    RemovePasswordComponent,\n    SecurityComponent,\n    SecurityKeysComponent,\n    SelectableAvatarComponent,\n    SendAddEditComponent,\n    SetPasswordComponent,\n    SponsoredFamiliesComponent,\n    SponsoringOrgRowComponent,\n    SsoComponentV1,\n    TwoFactorSetupAuthenticatorComponent,\n    TwoFactorComponent,\n    TwoFactorSetupDuoComponent,\n    TwoFactorSetupEmailComponent,\n    TwoFactorOptionsComponent,\n    TwoFactorRecoveryComponent,\n    TwoFactorSetupComponent,\n    TwoFactorVerifyComponent,\n    TwoFactorSetupWebAuthnComponent,\n    TwoFactorSetupYubiKeyComponent,\n    UpdatePasswordComponent,\n    UpdateTempPasswordComponent,\n    VerifyEmailTokenComponent,\n    VerifyRecoverDeleteComponent,\n  ],\n  exports: [\n    UserVerificationModule,\n    PremiumBadgeComponent,\n    AccountComponent,\n    AddEditComponent,\n    AddEditCustomFieldsComponent,\n    AddEditCustomFieldsComponent,\n    ApiKeyComponent,\n    AttachmentsComponent,\n    ChangeEmailComponent,\n    DeauthorizeSessionsComponent,\n    DeleteAccountDialogComponent,\n    DomainRulesComponent,\n    DynamicAvatarComponent,\n    EmergencyAccessAddEditComponent,\n    EmergencyAccessAttachmentsComponent,\n    EmergencyAccessComponent,\n    EmergencyAccessConfirmComponent,\n    EmergencyAccessTakeoverComponent,\n    EmergencyAccessViewComponent,\n    EmergencyAddEditCipherComponent,\n    FolderAddEditComponent,\n    FrontendLayoutComponent,\n    HintComponent,\n    OrgAddEditComponent,\n    OrganizationLayoutComponent,\n    OrgAttachmentsComponent,\n    OrgEventsComponent,\n    OrgExposedPasswordsReportComponent,\n    OrgInactiveTwoFactorReportComponent,\n    OrgReusedPasswordsReportComponent,\n    OrgUnsecuredWebsitesReportComponent,\n    OrgUserConfirmComponent,\n    OrgWeakPasswordsReportComponent,\n    GeneratorComponent,\n    PasswordGeneratorHistoryComponent,\n    PreferencesComponent,\n    PremiumBadgeComponent,\n    ProfileComponent,\n    ChangeAvatarDialogComponent,\n    PurgeVaultComponent,\n    RecoverDeleteComponent,\n    RecoverTwoFactorComponent,\n    RemovePasswordComponent,\n    SecurityComponent,\n    SecurityKeysComponent,\n    SelectableAvatarComponent,\n    SendAddEditComponent,\n    SetPasswordComponent,\n    SponsoredFamiliesComponent,\n    SponsoringOrgRowComponent,\n    SsoComponentV1,\n    TwoFactorSetupAuthenticatorComponent,\n    TwoFactorComponent,\n    TwoFactorSetupDuoComponent,\n    TwoFactorSetupEmailComponent,\n    TwoFactorOptionsComponent,\n    TwoFactorRecoveryComponent,\n    TwoFactorSetupComponent,\n    TwoFactorVerifyComponent,\n    TwoFactorSetupWebAuthnComponent,\n    TwoFactorSetupYubiKeyComponent,\n    UpdatePasswordComponent,\n    UpdateTempPasswordComponent,\n    UserLayoutComponent,\n    VerifyEmailTokenComponent,\n    VerifyRecoverDeleteComponent,\n    HeaderModule,\n    DangerZoneComponent,\n  ],\n})\nexport class LooseComponentsModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { AvatarComponent } from \"./avatar.component\";\n\n@NgModule({\n  imports: [AvatarComponent],\n  exports: [AvatarComponent],\n})\nexport class AvatarModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { BadgeListComponent } from \"./badge-list.component\";\n\n@NgModule({\n  imports: [BadgeListComponent],\n  exports: [BadgeListComponent],\n})\nexport class BadgeListModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { TabBodyComponent } from \"./tab-group/tab-body.component\";\nimport { TabGroupComponent } from \"./tab-group/tab-group.component\";\nimport { TabLabelDirective } from \"./tab-group/tab-label.directive\";\nimport { TabComponent } from \"./tab-group/tab.component\";\nimport { TabLinkComponent } from \"./tab-nav-bar/tab-link.component\";\nimport { TabNavBarComponent } from \"./tab-nav-bar/tab-nav-bar.component\";\n\n@NgModule({\n  imports: [\n    CommonModule,\n    TabGroupComponent,\n    TabComponent,\n    TabLabelDirective,\n    TabNavBarComponent,\n    TabLinkComponent,\n    TabBodyComponent,\n  ],\n  exports: [\n    TabGroupComponent,\n    TabComponent,\n    TabLabelDirective,\n    TabNavBarComponent,\n    TabLinkComponent,\n  ],\n})\nexport class TabsModule {}\n","import { registerLocaleData } from \"@angular/common\";\nimport localeAf from \"@angular/common/locales/af\";\nimport localeAr from \"@angular/common/locales/ar\";\nimport localeAz from \"@angular/common/locales/az\";\nimport localeBe from \"@angular/common/locales/be\";\nimport localeBg from \"@angular/common/locales/bg\";\nimport localeBn from \"@angular/common/locales/bn\";\nimport localeBs from \"@angular/common/locales/bs\";\nimport localeCa from \"@angular/common/locales/ca\";\nimport localeCs from \"@angular/common/locales/cs\";\nimport localeCy from \"@angular/common/locales/cy\";\nimport localeDa from \"@angular/common/locales/da\";\nimport localeDe from \"@angular/common/locales/de\";\nimport localeEl from \"@angular/common/locales/el\";\nimport localeEnGb from \"@angular/common/locales/en-GB\";\nimport localeEnIn from \"@angular/common/locales/en-IN\";\nimport localeEo from \"@angular/common/locales/eo\";\nimport localeEs from \"@angular/common/locales/es\";\nimport localeEt from \"@angular/common/locales/et\";\nimport localeEu from \"@angular/common/locales/eu\";\nimport localeFa from \"@angular/common/locales/fa\";\nimport localeFi from \"@angular/common/locales/fi\";\nimport localeFil from \"@angular/common/locales/fil\";\nimport localeFr from \"@angular/common/locales/fr\";\nimport localeGl from \"@angular/common/locales/gl\";\nimport localeHe from \"@angular/common/locales/he\";\nimport localeHi from \"@angular/common/locales/hi\";\nimport localeHr from \"@angular/common/locales/hr\";\nimport localeHu from \"@angular/common/locales/hu\";\nimport localeId from \"@angular/common/locales/id\";\nimport localeIt from \"@angular/common/locales/it\";\nimport localeJa from \"@angular/common/locales/ja\";\nimport localeKa from \"@angular/common/locales/ka\";\nimport localeKm from \"@angular/common/locales/km\";\nimport localeKn from \"@angular/common/locales/kn\";\nimport localeKo from \"@angular/common/locales/ko\";\nimport localeLv from \"@angular/common/locales/lv\";\nimport localeMl from \"@angular/common/locales/ml\";\nimport localeMr from \"@angular/common/locales/mr\";\nimport localeMy from \"@angular/common/locales/my\";\nimport localeNb from \"@angular/common/locales/nb\";\nimport localeNe from \"@angular/common/locales/ne\";\nimport localeNl from \"@angular/common/locales/nl\";\nimport localeNn from \"@angular/common/locales/nn\";\nimport localeOr from \"@angular/common/locales/or\";\nimport localePl from \"@angular/common/locales/pl\";\nimport localePtBr from \"@angular/common/locales/pt\";\nimport localePtPt from \"@angular/common/locales/pt-PT\";\nimport localeRo from \"@angular/common/locales/ro\";\nimport localeRu from \"@angular/common/locales/ru\";\nimport localeSi from \"@angular/common/locales/si\";\nimport localeSk from \"@angular/common/locales/sk\";\nimport localeSl from \"@angular/common/locales/sl\";\nimport localeSr from \"@angular/common/locales/sr\";\nimport localeSv from \"@angular/common/locales/sv\";\nimport localeTe from \"@angular/common/locales/te\";\nimport localeTh from \"@angular/common/locales/th\";\nimport localeTr from \"@angular/common/locales/tr\";\nimport localeUk from \"@angular/common/locales/uk\";\nimport localeVi from \"@angular/common/locales/vi\";\nimport localeZhCn from \"@angular/common/locales/zh-Hans\";\nimport localeZhTw from \"@angular/common/locales/zh-Hant\";\n\nregisterLocaleData(localeAf, \"af\");\nregisterLocaleData(localeAr, \"ar\");\nregisterLocaleData(localeAz, \"az\");\nregisterLocaleData(localeBe, \"be\");\nregisterLocaleData(localeBg, \"bg\");\nregisterLocaleData(localeBn, \"bn\");\nregisterLocaleData(localeBs, \"bs\");\nregisterLocaleData(localeCa, \"ca\");\nregisterLocaleData(localeCs, \"cs\");\nregisterLocaleData(localeCy, \"cy\");\nregisterLocaleData(localeDa, \"da\");\nregisterLocaleData(localeDe, \"de\");\nregisterLocaleData(localeEl, \"el\");\nregisterLocaleData(localeEnGb, \"en-GB\");\nregisterLocaleData(localeEnIn, \"en-IN\");\nregisterLocaleData(localeEo, \"eo\");\nregisterLocaleData(localeEs, \"es\");\nregisterLocaleData(localeEt, \"et\");\nregisterLocaleData(localeEu, \"eu\");\nregisterLocaleData(localeFa, \"fa\");\nregisterLocaleData(localeFi, \"fi\");\nregisterLocaleData(localeFil, \"fil\");\nregisterLocaleData(localeFr, \"fr\");\nregisterLocaleData(localeGl, \"gl\");\nregisterLocaleData(localeHe, \"he\");\nregisterLocaleData(localeHi, \"hi\");\nregisterLocaleData(localeHr, \"hr\");\nregisterLocaleData(localeHu, \"hu\");\nregisterLocaleData(localeId, \"id\");\nregisterLocaleData(localeIt, \"it\");\nregisterLocaleData(localeJa, \"ja\");\nregisterLocaleData(localeKa, \"ka\");\nregisterLocaleData(localeKm, \"km\");\nregisterLocaleData(localeKn, \"kn\");\nregisterLocaleData(localeKo, \"ko\");\nregisterLocaleData(localeLv, \"lv\");\nregisterLocaleData(localeMl, \"ml\");\nregisterLocaleData(localeMr, \"mr\");\nregisterLocaleData(localeMy, \"my\");\nregisterLocaleData(localeNb, \"nb\");\nregisterLocaleData(localeNe, \"ne\");\nregisterLocaleData(localeNl, \"nl\");\nregisterLocaleData(localeNn, \"nn\");\nregisterLocaleData(localeOr, \"or\");\nregisterLocaleData(localePl, \"pl\");\nregisterLocaleData(localePtBr, \"pt-BR\");\nregisterLocaleData(localePtPt, \"pt-PT\");\nregisterLocaleData(localeRo, \"ro\");\nregisterLocaleData(localeRu, \"ru\");\nregisterLocaleData(localeSi, \"si\");\nregisterLocaleData(localeSk, \"sk\");\nregisterLocaleData(localeSl, \"sl\");\nregisterLocaleData(localeSr, \"sr\");\nregisterLocaleData(localeSv, \"sv\");\nregisterLocaleData(localeTe, \"te\");\nregisterLocaleData(localeTh, \"th\");\nregisterLocaleData(localeTr, \"tr\");\nregisterLocaleData(localeUk, \"uk\");\nregisterLocaleData(localeVi, \"vi\");\nregisterLocaleData(localeZhCn, \"zh-CN\");\nregisterLocaleData(localeZhTw, \"zh-TW\");\n","import { DragDropModule } from \"@angular/cdk/drag-drop\";\nimport { CommonModule, DatePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { RouterModule } from \"@angular/router\";\nimport { InfiniteScrollDirective } from \"ngx-infinite-scroll\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  AsyncActionsModule,\n  AvatarModule,\n  BadgeListModule,\n  BadgeModule,\n  ButtonModule,\n  CalloutModule,\n  CheckboxModule,\n  ColorPasswordModule,\n  ContainerComponent,\n  DialogModule,\n  FormFieldModule,\n  IconButtonModule,\n  IconModule,\n  LinkModule,\n  MenuModule,\n  MultiSelectModule,\n  ProgressModule,\n  RadioButtonModule,\n  SectionComponent,\n  SelectModule,\n  TableModule,\n  TabsModule,\n  ToggleGroupModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\n// Register the locales for the application\nimport \"./locales\";\n\n/**\n * This NgModule should contain the most basic shared directives, pipes, and components. They\n * should be widely used by other modules to be considered for adding to this module. If in doubt\n * do not add to this module.\n *\n * See: https://angular.io/guide/module-types#shared-ngmodules\n */\n@NgModule({\n  imports: [\n    CommonModule,\n    DragDropModule,\n    FormsModule,\n    ReactiveFormsModule,\n    InfiniteScrollDirective,\n    RouterModule,\n    JslibModule,\n\n    // Component library modules\n    // Only add components that are used almost everywhere in the application\n    AsyncActionsModule,\n    AvatarModule,\n    BadgeListModule,\n    BadgeModule,\n    ButtonModule,\n    CalloutModule,\n    CheckboxModule,\n    ColorPasswordModule,\n    ContainerComponent,\n    DialogModule,\n    FormFieldModule,\n    IconButtonModule,\n    IconModule,\n    LinkModule,\n    MenuModule,\n    MultiSelectModule,\n    ProgressModule,\n    RadioButtonModule,\n    SectionComponent,\n    TableModule,\n    TabsModule,\n    ToggleGroupModule,\n    TypographyModule,\n\n    // Web specific\n  ],\n  exports: [\n    CommonModule,\n    DragDropModule,\n    FormsModule,\n    ReactiveFormsModule,\n    InfiniteScrollDirective,\n    RouterModule,\n    JslibModule,\n\n    // Component library\n    AsyncActionsModule,\n    AvatarModule,\n    BadgeListModule,\n    BadgeModule,\n    ButtonModule,\n    CalloutModule,\n    CheckboxModule,\n    ColorPasswordModule,\n    ContainerComponent,\n    DialogModule,\n    FormFieldModule,\n    IconButtonModule,\n    IconModule,\n    LinkModule,\n    MenuModule,\n    MultiSelectModule,\n    ProgressModule,\n    RadioButtonModule,\n    SectionComponent,\n    SelectModule,\n    TableModule,\n    TabsModule,\n    ToggleGroupModule,\n    TypographyModule,\n\n    // Web specific\n  ],\n  providers: [DatePipe],\n  bootstrap: [],\n})\nexport class SharedModule {}\n","import { inject } from \"@angular/core\";\nimport {\n  ActivatedRouteSnapshot,\n  RouterStateSnapshot,\n  Router,\n  CanActivateFn,\n  UrlTree,\n} from \"@angular/router\";\nimport { Observable, of } from \"rxjs\";\nimport { switchMap, tap } from \"rxjs/operators\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\n/**\n * CanActivate guard that checks if the user has premium and otherwise triggers the \"premiumRequired\"\n * message and blocks navigation.\n */\nexport function hasPremiumGuard(): CanActivateFn {\n  return (\n    _route: ActivatedRouteSnapshot,\n    _state: RouterStateSnapshot,\n  ): Observable<boolean | UrlTree> => {\n    const router = inject(Router);\n    const messagingService = inject(MessagingService);\n    const billingAccountProfileStateService = inject(BillingAccountProfileStateService);\n    const accountService = inject(AccountService);\n\n    return accountService.activeAccount$.pipe(\n      switchMap((account) =>\n        account\n          ? billingAccountProfileStateService.hasPremiumFromAnySource$(account.id)\n          : of(false),\n      ),\n      tap((userHasPremium: boolean) => {\n        if (!userHasPremium) {\n          messagingService.send(\"premiumRequired\");\n        }\n      }),\n      // Prevent trapping the user on the login page, since that's an awful UX flow\n      tap((userHasPremium: boolean) => {\n        if (!userHasPremium && router.url === \"/login\") {\n          return router.createUrlTree([\"/\"]);\n        }\n      }),\n    );\n  };\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"breachDesc\" | i18n }}</p>\n  <form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n    <bit-form-field class=\"tw-w-1/2\" disableMargin>\n      <bit-label>{{ \"username\" | i18n }}</bit-label>\n      <input id=\"username\" type=\"text\" formControlName=\"username\" bitInput />\n    </bit-form-field>\n    <small class=\"form-text text-muted tw-mb-4\">{{ \"breachCheckUsernameEmail\" | i18n }}</small>\n    <button type=\"submit\" buttonType=\"primary\" bitButton [loading]=\"loading\">\n      {{ \"checkBreaches\" | i18n }}\n    </button>\n  </form>\n  <div class=\"tw-mt-4\" *ngIf=\"!loading && checkedUsername\">\n    <p *ngIf=\"error\">{{ \"reportError\" | i18n }}...</p>\n    <ng-container *ngIf=\"!error\">\n      <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!breachedAccounts.length\">\n        {{ \"breachUsernameNotFound\" | i18n: checkedUsername }}\n      </bit-callout>\n      <bit-callout type=\"danger\" title=\"{{ 'breachFound' | i18n }}\" *ngIf=\"breachedAccounts.length\">\n        {{ \"breachUsernameFound\" | i18n: checkedUsername : breachedAccounts.length }}\n      </bit-callout>\n      <ul class=\"list-group list-group-breach\" *ngIf=\"breachedAccounts.length\">\n        <li *ngFor=\"let a of breachedAccounts\" class=\"list-group-item min-height-fix\">\n          <div class=\"row\">\n            <div class=\"col-2 tw-text-center\">\n              <img [src]=\"a.logoPath\" alt=\"\" class=\"img-fluid\" />\n            </div>\n            <div class=\"col-7\">\n              <h3 class=\"tw-text-lg\">{{ a.title }}</h3>\n              <p [innerHTML]=\"a.description\"></p>\n              <p class=\"tw-mb-1\">{{ \"compromisedData\" | i18n }}:</p>\n              <ul>\n                <li *ngFor=\"let d of a.dataClasses\">{{ d }}</li>\n              </ul>\n            </div>\n            <div class=\"col-3\">\n              <dl>\n                <dt>{{ \"website\" | i18n }}</dt>\n                <dd>{{ a.domain }}</dd>\n                <dt>{{ \"affectedUsers\" | i18n }}</dt>\n                <dd>{{ a.pwnCount | number }}</dd>\n                <dt>{{ \"breachOccurred\" | i18n }}</dt>\n                <dd>{{ a.breachDate | date: \"mediumDate\" }}</dd>\n                <dt>{{ \"breachReported\" | i18n }}</dt>\n                <dd>{{ a.addedDate | date: \"mediumDate\" }}</dd>\n              </dl>\n            </div>\n          </div>\n        </li>\n      </ul>\n    </ng-container>\n  </div>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BreachAccountResponse } from \"@bitwarden/common/models/response/breach-account.response\";\n\n@Component({\n  selector: \"app-breach-report\",\n  templateUrl: \"breach-report.component.html\",\n})\nexport class BreachReportComponent implements OnInit {\n  loading = false;\n  error = false;\n  checkedUsername: string;\n  breachedAccounts: BreachAccountResponse[] = [];\n  formGroup = this.formBuilder.group({\n    username: [\"\", { validators: [Validators.required], updateOn: \"change\" }],\n  });\n\n  constructor(\n    private auditService: AuditService,\n    private accountService: AccountService,\n    private formBuilder: FormBuilder,\n  ) {}\n\n  async ngOnInit() {\n    this.formGroup\n      .get(\"username\")\n      .setValue(\n        await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email))),\n      );\n  }\n\n  submit = async () => {\n    this.formGroup.markAsTouched();\n\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    this.error = false;\n    this.loading = true;\n    const username = this.formGroup.value.username.toLowerCase();\n    try {\n      this.breachedAccounts = await this.auditService.breachedAccounts(username);\n    } catch {\n      this.error = true;\n    } finally {\n      this.loading = false;\n    }\n\n    this.checkedUsername = username;\n  };\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportBreach = svgIcon`\n  <svg width=\"58\" height=\"75\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M39.569 74H13.007a7 7 0 0 1-7-7V31.077a7 7 0 0 1 7-7h19.101a7 7 0 0 1 4.988 2.088l7.46 7.576a7 7 0 0 1 2.013 4.912V67a7 7 0 0 1-7 7Z\" fill=\"#175DDC\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"M44.576 69.055H18.015a7 7 0 0 1-7-7V26.132a7 7 0 0 1 7-7h19.1a7 7 0 0 1 4.988 2.088l7.46 7.576a7 7 0 0 1 2.013 4.911v28.348a7 7 0 0 1-7 7Z\" fill=\"#175DDC\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"M50 63.698H23.439a7 7 0 0 1-7-7V20.775a7 7 0 0 1 7-7h19.1a7 7 0 0 1 4.988 2.088l7.46 7.575A7 7 0 0 1 57 28.35v28.348a7 7 0 0 1-7 7Z\" fill=\"#175DDC\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"M44.648 13.599v3.95a8 8 0 0 0 8 8h4.518\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" d=\"M23.533 37.736H49.49M23.533 46.802H49.49M23.533 42.269H49.49M23.533 55.456H49.49M23.533 50.923H49.49\" />\n    <path d=\"M1 16.483C1 7.944 8.013 1 16.69 1c8.678 0 15.691 6.944 15.691 15.483 0 8.54-7.013 15.484-15.69 15.484C8.012 31.967 1 25.023 1 16.484Z\" fill=\"#518FFF\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"m16.562 7.979.1 11.538\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" />\n    <ellipse rx=\"1.252\" ry=\"1.236\" transform=\"rotate(-.479 2802.219 -1964.476) skewX(.012)\" fill=\"#fff\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportExposedPasswords = svgIcon`\n  <svg width=\"101\" height=\"77\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M32.374 50.192a26.42 26.42 0 0 0 9.111 1.608c14.34 0 25.965-11.372 25.965-25.4 0-.337-.007-.673-.02-1.008h25.299v34.85H32.374v-10.05Z\" fill=\"currentColor\" />\n    <path d=\"M15.805 26.4c0 14.028 11.625 25.4 25.965 25.4s25.964-11.372 25.964-25.4C67.734 12.372 56.11 1 41.77 1 27.43 1 15.805 12.372 15.805 26.4Z\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M27.914 47.849a1 1 0 0 0-2 0h2Zm68.288-26.792a2.12 2.12 0 0 1 2.14 2.11h2c0-2.253-1.83-4.11-4.14-4.11v2Zm2.14 2.11v40.552h2V23.167h-2Zm0 40.552c0 1.172-.958 2.11-2.14 2.11v2c2.25 0 4.14-1.798 4.14-4.11h-2Zm-2.14 2.11H30.054v2h66.148v-2Zm-66.148 0a2.12 2.12 0 0 1-2.14-2.11h-2a4.12 4.12 0 0 0 4.14 4.11v-2Zm-2.14-2.11V47.85h-2v15.87h2Zm39.254-42.662h29.034v-2H67.168v2Z\" fill=\"#fff\" />\n    <path d=\"M67.203 25.56h25.64v34.85H32.487V50.011\" stroke=\"#fff\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n    <path d=\"M47.343 76h31.571\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M57.557 66.83V76M67.771 66.83V76\" stroke=\"#fff\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n    <path d=\"m20.995 42.873-3.972 3.972-14.61 14.61a3.413 3.413 0 0 0 0 4.826v0a3.413 3.413 0 0 0 4.827 0l14.61-14.61 3.972-3.972\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M86.037 32.488H71.845M86.037 37.81H76.28M71.845 37.81h-6.652M86.037 43.132h-6.209M74.95 43.132H61.2M86.037 48.454H71.845M66.967 48.454h-7.54M86.037 53.776H66.08M61.201 53.776h-11.53M44.793 53.776h-7.096\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" />\n    <rect width=\"40.801\" height=\"9.757\" rx=\"4\" transform=\"matrix(-1 0 0 1 61.201 14.748)\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"M16.852 33.375h28.375a4 4 0 0 1 4 4v1.757a4 4 0 0 1-4 4H22.174M66.523 33.375h-3.539a4 4 0 0 0-4 4v3.761c0 1.102.894 1.996 1.996 1.996v0\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportInactiveTwoFactor = svgIcon`\n  <svg width=\"42\" height=\"75\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path fill=\"currentColor\" stroke=\"#fff\" stroke-width=\"2\" d=\"M1 13.121h39.595v48.758H1z\" />\n    <rect x=\"1\" y=\"1\" width=\"39.595\" height=\"73\" rx=\"8\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" d=\"M12.344 8.091h16.907M18.907 67.424h3.025M31.503 32.515c-2.047-4.337-6.717-7.061-11.73-6.414a11.356 11.356 0 0 0-9.125 7.126M10.816 42.016c2.047 4.337 6.718 7.062 11.73 6.414 4.346-.562 7.8-3.51 9.213-7.358\" />\n    <path d=\"m33.584 29.293-1.295 4.625-4.625-1.295M8.523 44.725l1.441-4.581 4.582 1.441\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const MemberAccess = svgIcon`\n    <svg width=\"94\" height=\"63\" viewBox=\"0 0 94 63\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n        <path d=\"M70 10H2V46H12.3227H12.6806H46.2498H70V18.1286V10Z\" fill=\"#518FFF\"/>\n        <path d=\"M65.7419 1H6C3.23858 1 1 3.23858 1 6V42.2581C1 45.0195 3.23857 47.2581 6 47.2581H12.2835H12.6401H46.0818H65.7419C68.5034 47.2581 70.7419 45.0195 70.7419 42.2581V11.9933V6C70.7419 3.23858 68.5034 1 65.7419 1Z\" stroke=\"white\" stroke-width=\"2\"/>\n        <circle cx=\"70.129\" cy=\"27.0968\" r=\"13.0968\" fill=\"#175DDC\" stroke=\"white\" stroke-width=\"2\"/>\n        <path d=\"M88.9315 61.8708C73.6363 61.8708 66.0989 61.8708 50.4248 61.8708C48.57 61.8708 47.8031 59.945 48.0426 58.4704C49.725 48.1136 58.9691 40.1934 70.1207 40.1934C81.2722 40.1934 90.5164 48.1136 92.1988 58.4704C92.5526 60.6485 91.3052 61.8708 88.9315 61.8708Z\" fill=\"#175DDC\" stroke=\"white\" stroke-width=\"2\"/>\n        <path d=\"M55.7419 5.61292V5.1613\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n        <path d=\"M59.8064 5.61292V5.1613\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n        <path d=\"M63.871 5.61292V5.1613\" stroke=\"white\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n        <line x1=\"2\" y1=\"9\" x2=\"69.7419\" y2=\"9\" stroke=\"white\" stroke-width=\"2\"/>\n    </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportReusedPasswords = svgIcon`\n  <svg width=\"102\" height=\"102\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M57.983 15.06a35.664 35.664 0 0 1 14.531 6.27c16.164 11.78 19.585 34.613 7.643 51a37.227 37.227 0 0 1-6.81 7.138m-32.842 6.697a35.708 35.708 0 0 1-11.239-5.495c-16.163-11.78-19.585-34.613-7.642-51a37.55 37.55 0 0 1 3.295-3.929\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M93.909 64.598H7.72c-.708 0-1.275-.662-1.275-1.49V40.273c0-.828.567-1.49 1.275-1.49H93.91c.708 0 1.275.663 1.275 1.49v22.837c.047.827-.567 1.49-1.275 1.49Z\" fill=\"currentColor\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M21.532 52.186v-5.965M21.532 52.187l5.748-1.844M21.532 52.186l3.524 4.881M21.531 52.186l-3.47 4.881M21.532 52.187l-5.694-1.844M40.944 52.186v-5.965M40.944 52.187l5.694-1.844M40.944 52.187l3.525 4.88M40.944 52.187l-3.525 4.88M40.944 52.187l-5.694-1.844M54.849 57.337h11.294M74.21 57.337h11.295M41.75 83l.71 4.75-4.75.71M58.664 18.66 56 14.665 59.996 12\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportUnsecuredWebsites = svgIcon`\n  <svg width=\"113\" height=\"76\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M1.71 12.983h110.362v55.11a6 6 0 0 1-6 6H7.711a6 6 0 0 1-6-6v-55.11Z\" fill=\"currentColor\" />\n    <rect x=\"1\" y=\"1.073\" width=\"110.5\" height=\"73.454\" rx=\"9\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"M89.48 8.048V7.47M96.363 8.048V7.47M103.246 8.048V7.47\" stroke=\"#fff\" stroke-width=\"4\" stroke-linecap=\"round\" />\n    <path d=\"M0 12.983h111.217\" stroke=\"#fff\" stroke-width=\"2\" />\n    <path d=\"m93.236 44.384-18.42-11.026 2.93 21.266 5.582-5.237 4.27 6.46 2.98-1.971-4.26-6.446 6.918-3.046Z\" fill=\"#175DDC\" stroke=\"#fff\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n    <rect width=\"96.673\" height=\"6.886\" rx=\"3.443\" transform=\"matrix(-1 0 0 1 104.373 18.721)\" stroke=\"#fff\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ReportWeakPasswords = svgIcon`\n  <svg width=\"78\" height=\"78\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M66.493 64.415V77H9.979V64.324M9.979 44.065V32.106h56.514v12.148\" stroke=\"#fff\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n    <path d=\"M75.44 64.852H2.085c-.603 0-1.085-.555-1.085-1.25V44.448c0-.694.482-1.25 1.085-1.25H75.44c.603 0 1.085.556 1.085 1.25v19.156c.04.694-.482 1.25-1.085 1.25Z\" fill=\"currentColor\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M13.84 54.56v-5.077M13.84 54.56l4.893-1.57M13.84 54.56l3 4.153M13.84 54.56l-2.954 4.153M13.84 54.56l-4.846-1.57M30.363 54.56v-5.077M30.363 54.56l4.846-1.57M30.363 54.56l3 4.153M30.363 54.56l-3 4.153M30.363 54.56l-4.846-1.57M42.197 59.042h9.506M58.57 59.042h9.507\" stroke=\"#fff\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path d=\"M20.863 31.364c-.274-5.285 0-15.817 1.093-18.863 1.276-3.554 6.233-10.826 15.856-11.482 4.83-.273 15.2 2.296 18.043 14.763\" stroke=\"#fff\" stroke-width=\"2\" />\n  </svg>\n`;\n","import { ReportBreach } from \"./icons/report-breach.icon\";\nimport { ReportExposedPasswords } from \"./icons/report-exposed-passwords.icon\";\nimport { ReportInactiveTwoFactor } from \"./icons/report-inactive-two-factor.icon\";\nimport { MemberAccess } from \"./icons/report-member-access.icon\";\nimport { ReportReusedPasswords } from \"./icons/report-reused-passwords.icon\";\nimport { ReportUnsecuredWebsites } from \"./icons/report-unsecured-websites.icon\";\nimport { ReportWeakPasswords } from \"./icons/report-weak-passwords.icon\";\nimport { ReportEntry } from \"./shared\";\n\nexport enum ReportType {\n  ExposedPasswords = \"exposedPasswords\",\n  ReusedPasswords = \"reusedPasswords\",\n  WeakPasswords = \"weakPasswords\",\n  UnsecuredWebsites = \"unsecuredWebsites\",\n  Inactive2fa = \"inactive2fa\",\n  DataBreach = \"dataBreach\",\n  MemberAccessReport = \"memberAccessReport\",\n}\n\ntype ReportWithoutVariant = Omit<ReportEntry, \"variant\">;\n\nexport const reports: Record<ReportType, ReportWithoutVariant> = {\n  [ReportType.ExposedPasswords]: {\n    title: \"exposedPasswordsReport\",\n    description: \"exposedPasswordsReportDesc\",\n    route: \"exposed-passwords-report\",\n    icon: ReportExposedPasswords,\n  },\n  [ReportType.ReusedPasswords]: {\n    title: \"reusedPasswordsReport\",\n    description: \"reusedPasswordsReportDesc\",\n    route: \"reused-passwords-report\",\n    icon: ReportReusedPasswords,\n  },\n  [ReportType.WeakPasswords]: {\n    title: \"weakPasswordsReport\",\n    description: \"weakPasswordsReportDesc\",\n    route: \"weak-passwords-report\",\n    icon: ReportWeakPasswords,\n  },\n  [ReportType.UnsecuredWebsites]: {\n    title: \"unsecuredWebsitesReport\",\n    description: \"unsecuredWebsitesReportDesc\",\n    route: \"unsecured-websites-report\",\n    icon: ReportUnsecuredWebsites,\n  },\n  [ReportType.Inactive2fa]: {\n    title: \"inactive2faReport\",\n    description: \"inactive2faReportDesc\",\n    route: \"inactive-two-factor-report\",\n    icon: ReportInactiveTwoFactor,\n  },\n  [ReportType.DataBreach]: {\n    title: \"dataBreachReport\",\n    description: \"breachDesc\",\n    route: \"breach-report\",\n    icon: ReportBreach,\n  },\n  [ReportType.MemberAccessReport]: {\n    title: \"memberAccessReport\",\n    description: \"memberAccessReportDesc\",\n    route: \"member-access-report\",\n    icon: MemberAccess,\n  },\n};\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\nimport { ReportCardComponent } from \"./report-card/report-card.component\";\nimport { ReportListComponent } from \"./report-list/report-list.component\";\n\n@NgModule({\n  imports: [CommonModule, SharedModule],\n  declarations: [ReportCardComponent, ReportListComponent],\n  exports: [ReportCardComponent, ReportListComponent],\n})\nexport class ReportsSharedModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\n\nimport { reports, ReportType } from \"../reports\";\nimport { ReportEntry, ReportVariant } from \"../shared\";\n\n@Component({\n  selector: \"app-reports-home\",\n  templateUrl: \"reports-home.component.html\",\n})\nexport class ReportsHomeComponent implements OnInit {\n  reports: ReportEntry[];\n\n  constructor(\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    const account = await firstValueFrom(this.accountService.activeAccount$);\n    const userHasPremium = await firstValueFrom(\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n    );\n    const reportRequiresPremium = userHasPremium\n      ? ReportVariant.Enabled\n      : ReportVariant.RequiresPremium;\n\n    this.reports = [\n      {\n        ...reports[ReportType.ExposedPasswords],\n        variant: reportRequiresPremium,\n      },\n      {\n        ...reports[ReportType.ReusedPasswords],\n        variant: reportRequiresPremium,\n      },\n      {\n        ...reports[ReportType.WeakPasswords],\n        variant: reportRequiresPremium,\n      },\n      {\n        ...reports[ReportType.UnsecuredWebsites],\n        variant: reportRequiresPremium,\n      },\n      {\n        ...reports[ReportType.Inactive2fa],\n        variant: reportRequiresPremium,\n      },\n      {\n        ...reports[ReportType.DataBreach],\n        variant: ReportVariant.Enabled,\n      },\n    ];\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"reportsDesc\" | i18n }}</p>\n\n  <app-report-list [reports]=\"reports\"></app-report-list>\n</bit-container>\n","<router-outlet></router-outlet>\n\n<div class=\"row tw-mt-4\">\n  <div class=\"col\">\n    <a bitButton bitIconButton=\"bwi-angle-left\" routerLink=\"./\" *ngIf=\"!homepage\">\n      {{ \"backToReports\" | i18n }}\n    </a>\n  </div>\n</div>\n","import { Component, OnDestroy } from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport { Subscription } from \"rxjs\";\nimport { filter } from \"rxjs/operators\";\n\n@Component({\n  selector: \"app-reports-layout\",\n  templateUrl: \"reports-layout.component.html\",\n})\nexport class ReportsLayoutComponent implements OnDestroy {\n  homepage = true;\n  subscription: Subscription;\n\n  constructor(router: Router) {\n    this.subscription = router.events\n      .pipe(filter((event) => event instanceof NavigationEnd))\n      // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n      .subscribe((event) => {\n        this.homepage = (event as NavigationEnd).url == \"/reports\";\n      });\n  }\n\n  ngOnDestroy(): void {\n    this.subscription?.unsubscribe();\n  }\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { authGuard } from \"@bitwarden/angular/auth/guards\";\n\nimport { hasPremiumGuard } from \"../../core/guards/has-premium.guard\";\n\nimport { BreachReportComponent } from \"./pages/breach-report.component\";\nimport { ExposedPasswordsReportComponent } from \"./pages/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent } from \"./pages/inactive-two-factor-report.component\";\nimport { ReportsHomeComponent } from \"./pages/reports-home.component\";\nimport { ReusedPasswordsReportComponent } from \"./pages/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent } from \"./pages/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent } from \"./pages/weak-passwords-report.component\";\nimport { ReportsLayoutComponent } from \"./reports-layout.component\";\n\nconst routes: Routes = [\n  {\n    path: \"\",\n    component: ReportsLayoutComponent,\n    canActivate: [authGuard],\n    children: [\n      {\n        path: \"\",\n        pathMatch: \"full\",\n        component: ReportsHomeComponent,\n        data: { titleId: \"reports\", homepage: true },\n      },\n      {\n        path: \"breach-report\",\n        component: BreachReportComponent,\n        data: { titleId: \"dataBreachReport\" },\n      },\n      {\n        path: \"reused-passwords-report\",\n        component: ReusedPasswordsReportComponent,\n        data: { titleId: \"reusedPasswordsReport\" },\n        canActivate: [hasPremiumGuard()],\n      },\n      {\n        path: \"unsecured-websites-report\",\n        component: UnsecuredWebsitesReportComponent,\n        data: { titleId: \"unsecuredWebsitesReport\" },\n        canActivate: [hasPremiumGuard()],\n      },\n      {\n        path: \"weak-passwords-report\",\n        component: WeakPasswordsReportComponent,\n        data: { titleId: \"weakPasswordsReport\" },\n        canActivate: [hasPremiumGuard()],\n      },\n      {\n        path: \"exposed-passwords-report\",\n        component: ExposedPasswordsReportComponent,\n        data: { titleId: \"exposedPasswordsReport\" },\n        canActivate: [hasPremiumGuard()],\n      },\n      {\n        path: \"inactive-two-factor-report\",\n        component: InactiveTwoFactorReportComponent,\n        data: { titleId: \"inactive2faReport\" },\n        canActivate: [hasPremiumGuard()],\n      },\n    ],\n  },\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class ReportsRoutingModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\nimport { OrganizationBadgeModule } from \"../../vault/individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../../vault/individual-vault/pipes/pipes.module\";\n\nimport { BreachReportComponent } from \"./pages/breach-report.component\";\nimport { ExposedPasswordsReportComponent } from \"./pages/exposed-passwords-report.component\";\nimport { InactiveTwoFactorReportComponent } from \"./pages/inactive-two-factor-report.component\";\nimport { ReportsHomeComponent } from \"./pages/reports-home.component\";\nimport { ReusedPasswordsReportComponent } from \"./pages/reused-passwords-report.component\";\nimport { UnsecuredWebsitesReportComponent } from \"./pages/unsecured-websites-report.component\";\nimport { WeakPasswordsReportComponent } from \"./pages/weak-passwords-report.component\";\nimport { ReportsLayoutComponent } from \"./reports-layout.component\";\nimport { ReportsRoutingModule } from \"./reports-routing.module\";\nimport { ReportsSharedModule } from \"./shared\";\n\n@NgModule({\n  imports: [\n    CommonModule,\n    SharedModule,\n    ReportsSharedModule,\n    ReportsRoutingModule,\n    OrganizationBadgeModule,\n    PipesModule,\n    HeaderModule,\n  ],\n  declarations: [\n    BreachReportComponent,\n    ExposedPasswordsReportComponent,\n    InactiveTwoFactorReportComponent,\n    ReportsLayoutComponent,\n    ReportsHomeComponent,\n    ReusedPasswordsReportComponent,\n    UnsecuredWebsitesReportComponent,\n    WeakPasswordsReportComponent,\n  ],\n})\nexport class ReportsModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ViewChild, ViewContainerRef, OnDestroy } from \"@angular/core\";\nimport { BehaviorSubject, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { TableDataSource } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent } from \"../../../vault/individual-vault/add-edit.component\";\nimport { AddEditComponent as OrgAddEditComponent } from \"../../../vault/org-vault/add-edit.component\";\n\n@Directive()\nexport class CipherReportComponent implements OnDestroy {\n  @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n  cipherAddEditModalRef: ViewContainerRef;\n  isAdminConsoleActive = false;\n\n  loading = false;\n  hasLoaded = false;\n  ciphers: CipherView[] = [];\n  allCiphers: CipherView[] = [];\n  dataSource = new TableDataSource<CipherView>();\n  organization: Organization;\n  organizations: Organization[];\n  organizations$: Observable<Organization[]>;\n\n  filterStatus: any = [0];\n  showFilterToggle: boolean = false;\n  vaultMsg: string = \"vault\";\n  currentFilterStatus: number | string;\n  protected filterOrgStatus$ = new BehaviorSubject<number | string>(0);\n  private destroyed$: Subject<void> = new Subject();\n\n  constructor(\n    protected cipherService: CipherService,\n    private modalService: ModalService,\n    protected passwordRepromptService: PasswordRepromptService,\n    protected organizationService: OrganizationService,\n    protected i18nService: I18nService,\n    private syncService: SyncService,\n  ) {\n    this.organizations$ = this.organizationService.organizations$;\n    this.organizations$.pipe(takeUntil(this.destroyed$)).subscribe((orgs) => {\n      this.organizations = orgs;\n    });\n  }\n\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n\n  getName(filterId: string | number) {\n    let orgName: any;\n\n    if (filterId === 0) {\n      orgName = this.i18nService.t(\"all\");\n    } else if (filterId === 1) {\n      orgName = this.i18nService.t(\"me\");\n    } else {\n      this.organizations.filter((org: Organization) => {\n        if (org.id === filterId) {\n          orgName = org.name;\n          return org;\n        }\n      });\n    }\n    return orgName;\n  }\n\n  getCount(filterId: string | number) {\n    let orgFilterStatus: any;\n    let cipherCount;\n\n    if (filterId === 0) {\n      cipherCount = this.allCiphers.length;\n    } else if (filterId === 1) {\n      cipherCount = this.allCiphers.filter((c) => c.organizationId === null).length;\n    } else {\n      this.organizations.filter((org: Organization) => {\n        if (org.id === filterId) {\n          orgFilterStatus = org.id;\n          return org;\n        }\n      });\n      cipherCount = this.allCiphers.filter((c) => c.organizationId === orgFilterStatus).length;\n    }\n    return cipherCount;\n  }\n\n  async filterOrgToggle(status: any) {\n    let filter = null;\n    if (typeof status === \"number\" && status === 1) {\n      filter = (c: CipherView) => c.organizationId == null;\n    } else if (typeof status === \"string\") {\n      const orgId = status as OrganizationId;\n      filter = (c: CipherView) => c.organizationId === orgId;\n    }\n    this.dataSource.filter = filter;\n  }\n\n  async load() {\n    this.loading = true;\n    await this.syncService.fullSync(false);\n    // when a user fixes an item in a report we want to persist the filter they had\n    // if they fix the last item of that filter we will go back to the \"All\" filter\n    if (this.currentFilterStatus) {\n      if (this.ciphers.length > 2) {\n        this.filterOrgStatus$.next(this.currentFilterStatus);\n        await this.filterOrgToggle(this.currentFilterStatus);\n      } else {\n        this.filterOrgStatus$.next(0);\n        await this.filterOrgToggle(0);\n      }\n    } else {\n      await this.setCiphers();\n    }\n    this.loading = false;\n    this.hasLoaded = true;\n  }\n\n  async selectCipher(cipher: CipherView) {\n    if (!(await this.repromptCipher(cipher))) {\n      return;\n    }\n\n    const type = this.organization != null ? OrgAddEditComponent : AddEditComponent;\n\n    const [modal, childComponent] = await this.modalService.openViewRef(\n      type,\n      this.cipherAddEditModalRef,\n      (comp: OrgAddEditComponent | AddEditComponent) => {\n        if (this.organization != null) {\n          (comp as OrgAddEditComponent).organization = this.organization;\n          comp.organizationId = this.organization.id;\n        }\n\n        comp.cipherId = cipher == null ? null : cipher.id;\n        // eslint-disable-next-line rxjs/no-async-subscribe\n        comp.onSavedCipher.subscribe(async () => {\n          modal.close();\n          await this.load();\n        });\n        // eslint-disable-next-line rxjs/no-async-subscribe\n        comp.onDeletedCipher.subscribe(async () => {\n          modal.close();\n          await this.load();\n        });\n        // eslint-disable-next-line rxjs/no-async-subscribe\n        comp.onRestoredCipher.subscribe(async () => {\n          modal.close();\n          await this.load();\n        });\n      },\n    );\n\n    return childComponent;\n  }\n\n  protected async setCiphers() {\n    this.allCiphers = [];\n  }\n\n  protected async repromptCipher(c: CipherView) {\n    return (\n      c.reprompt === CipherRepromptType.None ||\n      (await this.passwordRepromptService.showPasswordPrompt())\n    );\n  }\n\n  protected async getAllCiphers(): Promise<CipherView[]> {\n    return await this.cipherService.getAllDecrypted();\n  }\n\n  protected filterCiphersByOrg(ciphersList: CipherView[]) {\n    this.allCiphers = [...ciphersList];\n\n    this.ciphers = ciphersList.map((ciph) => {\n      if (this.filterStatus.indexOf(ciph.organizationId) === -1 && ciph.organizationId != null) {\n        this.filterStatus.push(ciph.organizationId);\n      } else if (this.filterStatus.indexOf(1) === -1 && ciph.organizationId == null) {\n        this.filterStatus.splice(1, 0, 1);\n      }\n      return ciph;\n    });\n    this.dataSource.data = this.ciphers;\n\n    if (this.filterStatus.length > 2) {\n      this.showFilterToggle = true;\n      this.vaultMsg = \"vaults\";\n    } else {\n      // If a user fixes an item and there is only one item left remove the filter toggle and change the vault message to singular\n      this.showFilterToggle = false;\n      this.vaultMsg = \"vault\";\n    }\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"exposedPasswordsReportDesc\" | i18n }}</p>\n  <button type=\"submit\" buttonType=\"primary\" bitButton [loading]=\"loading\" (click)=\"load()\">\n    {{ \"checkExposedPasswords\" | i18n }}\n  </button>\n  <div class=\"tw-mt-4\" *ngIf=\"hasLoaded\">\n    <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!ciphers.length\">\n      {{ \"noExposedPasswords\" | i18n }}\n    </bit-callout>\n    <ng-container *ngIf=\"ciphers.length\">\n      <bit-callout type=\"danger\" title=\"{{ 'exposedPasswordsFound' | i18n }}\" [useAlertRole]=\"true\">\n        {{ \"exposedPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n      </bit-callout>\n      <bit-toggle-group\n        *ngIf=\"showFilterToggle && !isAdminConsoleActive\"\n        [selected]=\"filterOrgStatus$ | async\"\n        (selectedChange)=\"filterOrgToggle($event)\"\n        [attr.aria-label]=\"'addAccessFilter' | i18n\"\n      >\n        <ng-container *ngFor=\"let status of filterStatus\">\n          <bit-toggle [value]=\"status\">\n            {{ getName(status) }}\n            <span bitBadge variant=\"info\"> {{ getCount(status) }} </span>\n          </bit-toggle>\n        </ng-container>\n      </bit-toggle-group>\n      <bit-table [dataSource]=\"dataSource\">\n        <ng-container header>\n          <tr bitRow>\n            <th bitCell></th>\n            <th bitCell bitSortable=\"name\">{{ \"name\" | i18n }}</th>\n            <th bitCell bitSortable=\"organizationId\" *ngIf=\"!isAdminConsoleActive\">\n              {{ \"owner\" | i18n }}\n            </th>\n            <th bitCell class=\"tw-text-right\" bitSortable=\"exposedXTimes\">\n              {{ \"timesExposed\" | i18n }}\n            </th>\n          </tr>\n        </ng-container>\n        <ng-template body let-rows$>\n          <tr bitRow *ngFor=\"let r of rows$ | async\">\n            <td bitCell>\n              <app-vault-icon [cipher]=\"r\"></app-vault-icon>\n            </td>\n            <td bitCell>\n              <ng-container *ngIf=\"!organization || canManageCipher(r); else cantManage\">\n                <a\n                  bitLink\n                  href=\"#\"\n                  appStopClick\n                  (click)=\"selectCipher(r)\"\n                  title=\"{{ 'editItemWithName' | i18n: r.name }}\"\n                  >{{ r.name }}</a\n                >\n              </ng-container>\n              <ng-template #cantManage>\n                <span>{{ r.name }}</span>\n              </ng-template>\n              <ng-container *ngIf=\"!organization && r.organizationId\">\n                <i\n                  class=\"bwi bwi-collection\"\n                  appStopProp\n                  title=\"{{ 'shared' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n              </ng-container>\n              <ng-container *ngIf=\"r.hasAttachments\">\n                <i\n                  class=\"bwi bwi-paperclip\"\n                  appStopProp\n                  title=\"{{ 'attachments' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n              </ng-container>\n              <br />\n              <small>{{ r.subTitle }}</small>\n            </td>\n            <td bitCell *ngIf=\"!isAdminConsoleActive\">\n              <app-org-badge\n                *ngIf=\"!organization\"\n                [disabled]=\"disabled\"\n                [organizationId]=\"r.organizationId\"\n                [organizationName]=\"r.organizationId | orgNameFromId: (organizations$ | async)\"\n                appStopProp\n              >\n              </app-org-badge>\n            </td>\n            <td bitCell class=\"tw-text-right\">\n              <span bitBadge variant=\"warning\">\n                {{ \"exposedXTimes\" | i18n: (r.exposedXTimes | number) }}\n              </span>\n            </td>\n          </tr>\n        </ng-template>\n      </bit-table>\n    </ng-container>\n  </div>\n  <ng-template #cipherAddEdit></ng-template>\n</bit-container>\n","import { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\ntype ReportResult = CipherView & { exposedXTimes: number };\n\n@Component({\n  selector: \"app-exposed-passwords-report\",\n  templateUrl: \"exposed-passwords-report.component.html\",\n})\nexport class ExposedPasswordsReportComponent extends CipherReportComponent implements OnInit {\n  disabled = true;\n\n  constructor(\n    protected cipherService: CipherService,\n    protected auditService: AuditService,\n    protected organizationService: OrganizationService,\n    modalService: ModalService,\n    passwordRepromptService: PasswordRepromptService,\n    i18nService: I18nService,\n    syncService: SyncService,\n  ) {\n    super(\n      cipherService,\n      modalService,\n      passwordRepromptService,\n      organizationService,\n      i18nService,\n      syncService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.load();\n  }\n\n  async setCiphers() {\n    const allCiphers = await this.getAllCiphers();\n    const exposedPasswordCiphers: ReportResult[] = [];\n    const promises: Promise<void>[] = [];\n    this.filterStatus = [0];\n\n    allCiphers.forEach((ciph) => {\n      const { type, login, isDeleted, edit, viewPassword } = ciph;\n      if (\n        type !== CipherType.Login ||\n        login.password == null ||\n        login.password === \"\" ||\n        isDeleted ||\n        (!this.organization && !edit) ||\n        !viewPassword\n      ) {\n        return;\n      }\n\n      const promise = this.auditService.passwordLeaked(login.password).then((exposedCount) => {\n        if (exposedCount > 0) {\n          const row = { ...ciph, exposedXTimes: exposedCount } as ReportResult;\n          exposedPasswordCiphers.push(row);\n        }\n      });\n      promises.push(promise);\n    });\n    await Promise.all(promises);\n\n    this.filterCiphersByOrg(exposedPasswordCiphers);\n    this.dataSource.sort = { column: \"exposedXTimes\", direction: \"desc\" };\n  }\n\n  protected canManageCipher(c: CipherView): boolean {\n    // this will only ever be false from the org view;\n    return true;\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"inactive2faReportDesc\" | i18n }}</p>\n  <div *ngIf=\"!hasLoaded && loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n  <div class=\"tw-mt-4\" *ngIf=\"hasLoaded\">\n    <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!ciphers.length\">\n      {{ \"noInactive2fa\" | i18n }}\n    </bit-callout>\n    <ng-container *ngIf=\"ciphers.length\">\n      <bit-callout type=\"danger\" title=\"{{ 'inactive2faFound' | i18n }}\">\n        {{ \"inactive2faFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n      </bit-callout>\n      <bit-toggle-group\n        *ngIf=\"showFilterToggle && !isAdminConsoleActive\"\n        [selected]=\"filterOrgStatus$ | async\"\n        (selectedChange)=\"filterOrgToggle($event)\"\n        [attr.aria-label]=\"'addAccessFilter' | i18n\"\n      >\n        <ng-container *ngFor=\"let status of filterStatus\">\n          <bit-toggle [value]=\"status\">\n            {{ getName(status) }}\n            <span bitBadge variant=\"info\"> {{ getCount(status) }} </span>\n          </bit-toggle>\n        </ng-container>\n      </bit-toggle-group>\n      <bit-table [dataSource]=\"dataSource\">\n        <ng-container header *ngIf=\"!isAdminConsoleActive\">\n          <tr bitRow>\n            <th bitCell></th>\n            <th bitCell>{{ \"name\" | i18n }}</th>\n            <th bitCell>{{ \"owner\" | i18n }}</th>\n            <th bitCell></th>\n          </tr>\n        </ng-container>\n        <tbody>\n          <ng-template body let-rows$>\n            <tr bitRow *ngFor=\"let r of rows$ | async\">\n              <td bitCell>\n                <app-vault-icon [cipher]=\"r\"></app-vault-icon>\n              </td>\n              <td bitCell>\n                <a\n                  bitLink\n                  href=\"#\"\n                  appStopClick\n                  (click)=\"selectCipher(r)\"\n                  title=\"{{ 'editItemWithName' | i18n: r.name }}\"\n                  >{{ r.name }}</a\n                >\n                <ng-container *ngIf=\"!organization && r.organizationId\">\n                  <i\n                    class=\"bwi bwi-collection\"\n                    appStopProp\n                    title=\"{{ 'shared' | i18n }}\"\n                    aria-hidden=\"true\"\n                  ></i>\n                  <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n                </ng-container>\n                <ng-container *ngIf=\"r.hasAttachments\">\n                  <i\n                    class=\"bwi bwi-paperclip\"\n                    appStopProp\n                    title=\"{{ 'attachments' | i18n }}\"\n                    aria-hidden=\"true\"\n                  ></i>\n                  <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n                </ng-container>\n                <br />\n                <small>{{ r.subTitle }}</small>\n              </td>\n              <td bitCell>\n                <app-org-badge\n                  *ngIf=\"!organization\"\n                  [disabled]=\"disabled\"\n                  [organizationId]=\"r.organizationId\"\n                  [organizationName]=\"r.organizationId | orgNameFromId: (organizations$ | async)\"\n                  appStopProp\n                >\n                </app-org-badge>\n              </td>\n              <td bitCell class=\"tw-text-right\">\n                <a\n                  bitBadge\n                  href=\"{{ cipherDocs.get(r.id) }}\"\n                  target=\"_blank\"\n                  rel=\"noreferrer\"\n                  *ngIf=\"cipherDocs.has(r.id)\"\n                >\n                  {{ \"instructions\" | i18n }}</a\n                >\n              </td>\n            </tr>\n          </ng-template>\n        </tbody></bit-table\n      >\n    </ng-container>\n  </div>\n  <ng-template #cipherAddEdit></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n  selector: \"app-inactive-two-factor-report\",\n  templateUrl: \"inactive-two-factor-report.component.html\",\n})\nexport class InactiveTwoFactorReportComponent extends CipherReportComponent implements OnInit {\n  services = new Map<string, string>();\n  cipherDocs = new Map<string, string>();\n  disabled = true;\n\n  constructor(\n    protected cipherService: CipherService,\n    protected organizationService: OrganizationService,\n    modalService: ModalService,\n    private logService: LogService,\n    passwordRepromptService: PasswordRepromptService,\n    i18nService: I18nService,\n    syncService: SyncService,\n  ) {\n    super(\n      cipherService,\n      modalService,\n      passwordRepromptService,\n      organizationService,\n      i18nService,\n      syncService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.load();\n  }\n\n  async setCiphers() {\n    try {\n      await this.load2fa();\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (this.services.size > 0) {\n      const allCiphers = await this.getAllCiphers();\n      const inactive2faCiphers: CipherView[] = [];\n      const docs = new Map<string, string>();\n      this.filterStatus = [0];\n\n      allCiphers.forEach((ciph) => {\n        const { type, login, isDeleted, edit, id, viewPassword } = ciph;\n        if (\n          type !== CipherType.Login ||\n          (login.totp != null && login.totp !== \"\") ||\n          !login.hasUris ||\n          isDeleted ||\n          (!this.organization && !edit) ||\n          !viewPassword\n        ) {\n          return;\n        }\n\n        for (let i = 0; i < login.uris.length; i++) {\n          const u = login.uris[i];\n          if (u.uri != null && u.uri !== \"\") {\n            const uri = u.uri.replace(\"www.\", \"\");\n            const domain = Utils.getDomain(uri);\n            if (domain != null && this.services.has(domain)) {\n              if (this.services.get(domain) != null) {\n                docs.set(id, this.services.get(domain));\n              }\n              // If the uri is in the 2fa list. Add the cipher to the inactive\n              // collection. No need to check any additional uris for the cipher.\n              inactive2faCiphers.push(ciph);\n              return;\n            }\n          }\n        }\n      });\n\n      this.filterCiphersByOrg(inactive2faCiphers);\n      this.cipherDocs = docs;\n    }\n  }\n\n  private async load2fa() {\n    if (this.services.size > 0) {\n      return;\n    }\n    const response = await fetch(new Request(\"https://api.2fa.directory/v3/totp.json\"));\n    if (response.status !== 200) {\n      throw new Error();\n    }\n    const responseJson = await response.json();\n    for (const service of responseJson) {\n      const serviceData = service[1];\n      if (serviceData.domain == null) {\n        continue;\n      }\n      if (serviceData.documentation == null) {\n        continue;\n      }\n      if (serviceData[\"additional-domains\"] != null) {\n        for (const additionalDomain of serviceData[\"additional-domains\"]) {\n          this.services.set(additionalDomain, serviceData.documentation);\n        }\n      }\n      this.services.set(serviceData.domain, serviceData.documentation);\n    }\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"reusedPasswordsReportDesc\" | i18n }}</p>\n  <div *ngIf=\"!hasLoaded && loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n  <div class=\"tw-mt-4\" *ngIf=\"hasLoaded\">\n    <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!ciphers.length\">\n      {{ \"noReusedPasswords\" | i18n }}\n    </bit-callout>\n    <ng-container *ngIf=\"ciphers.length\">\n      <bit-callout type=\"danger\" title=\"{{ 'reusedPasswordsFound' | i18n }}\">\n        {{ \"reusedPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n      </bit-callout>\n\n      <bit-toggle-group\n        *ngIf=\"showFilterToggle && !isAdminConsoleActive\"\n        [selected]=\"filterOrgStatus$ | async\"\n        (selectedChange)=\"filterOrgToggle($event)\"\n        [attr.aria-label]=\"'addAccessFilter' | i18n\"\n      >\n        <ng-container *ngFor=\"let status of filterStatus\">\n          <bit-toggle [value]=\"status\">\n            {{ getName(status) }}\n            <span bitBadge variant=\"info\"> {{ getCount(status) }} </span>\n          </bit-toggle>\n        </ng-container>\n      </bit-toggle-group>\n\n      <bit-table [dataSource]=\"dataSource\">\n        <ng-container header *ngIf=\"!isAdminConsoleActive\">\n          <tr bitRow>\n            <th bitCell></th>\n            <th bitCell>{{ \"name\" | i18n }}</th>\n            <th bitCell>{{ \"owner\" | i18n }}</th>\n            <th bitCell class=\"tw-text-right\">{{ \"timesReused\" | i18n }}</th>\n          </tr>\n        </ng-container>\n        <ng-template body let-rows$>\n          <tr bitRow *ngFor=\"let r of rows$ | async\">\n            <td bitCell>\n              <app-vault-icon [cipher]=\"r\"></app-vault-icon>\n            </td>\n            <td bitCell>\n              <ng-container *ngIf=\"!organization || canManageCipher(r); else cantManage\">\n                <a\n                  bitLink\n                  href=\"#\"\n                  appStopClick\n                  (click)=\"selectCipher(r)\"\n                  title=\"{{ 'editItemWithName' | i18n: r.name }}\"\n                  >{{ r.name }}</a\n                >\n              </ng-container>\n              <ng-template #cantManage>\n                <span>{{ r.name }}</span>\n              </ng-template>\n              <ng-container *ngIf=\"!organization && r.organizationId\">\n                <i\n                  class=\"bwi bwi-collection\"\n                  appStopProp\n                  title=\"{{ 'shared' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n              </ng-container>\n              <ng-container *ngIf=\"r.hasAttachments\">\n                <i\n                  class=\"bwi bwi-paperclip\"\n                  appStopProp\n                  title=\"{{ 'attachments' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n              </ng-container>\n              <br />\n              <small>{{ r.subTitle }}</small>\n            </td>\n            <td bitCell>\n              <app-org-badge\n                *ngIf=\"!organization\"\n                [disabled]=\"disabled\"\n                [organizationId]=\"r.organizationId\"\n                [organizationName]=\"r.organizationId | orgNameFromId: (organizations$ | async)\"\n                appStopProp\n              >\n              </app-org-badge>\n            </td>\n            <td bitCell class=\"tw-text-right\">\n              <span bitBadge variant=\"warning\">\n                {{ \"reusedXTimes\" | i18n: passwordUseMap.get(r.login.password) }}\n              </span>\n            </td>\n          </tr>\n        </ng-template>\n      </bit-table>\n    </ng-container>\n  </div>\n  <ng-template #cipherAddEdit></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n  selector: \"app-reused-passwords-report\",\n  templateUrl: \"reused-passwords-report.component.html\",\n})\nexport class ReusedPasswordsReportComponent extends CipherReportComponent implements OnInit {\n  passwordUseMap: Map<string, number>;\n  disabled = true;\n\n  constructor(\n    protected cipherService: CipherService,\n    protected organizationService: OrganizationService,\n    modalService: ModalService,\n    passwordRepromptService: PasswordRepromptService,\n    i18nService: I18nService,\n    syncService: SyncService,\n  ) {\n    super(\n      cipherService,\n      modalService,\n      passwordRepromptService,\n      organizationService,\n      i18nService,\n      syncService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.load();\n  }\n\n  async setCiphers() {\n    const allCiphers = await this.getAllCiphers();\n    const ciphersWithPasswords: CipherView[] = [];\n    this.passwordUseMap = new Map<string, number>();\n    this.filterStatus = [0];\n\n    allCiphers.forEach((ciph) => {\n      const { type, login, isDeleted, edit, viewPassword } = ciph;\n      if (\n        type !== CipherType.Login ||\n        login.password == null ||\n        login.password === \"\" ||\n        isDeleted ||\n        (!this.organization && !edit) ||\n        !viewPassword\n      ) {\n        return;\n      }\n\n      ciphersWithPasswords.push(ciph);\n      if (this.passwordUseMap.has(login.password)) {\n        this.passwordUseMap.set(login.password, this.passwordUseMap.get(login.password) + 1);\n      } else {\n        this.passwordUseMap.set(login.password, 1);\n      }\n    });\n    const reusedPasswordCiphers = ciphersWithPasswords.filter(\n      (c) =>\n        this.passwordUseMap.has(c.login.password) && this.passwordUseMap.get(c.login.password) > 1,\n    );\n\n    this.filterCiphersByOrg(reusedPasswordCiphers);\n  }\n\n  protected canManageCipher(c: CipherView): boolean {\n    // this will only ever be false from an organization view\n    return true;\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"unsecuredWebsitesReportDesc\" | i18n }}</p>\n  <div *ngIf=\"!hasLoaded && loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n  <div class=\"tw-mt-4\" *ngIf=\"hasLoaded\">\n    <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!ciphers.length\">\n      {{ \"noUnsecuredWebsites\" | i18n }}\n    </bit-callout>\n    <ng-container *ngIf=\"ciphers.length\">\n      <bit-callout type=\"danger\" title=\"{{ 'unsecuredWebsitesFound' | i18n }}\">\n        {{ \"unsecuredWebsitesFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n      </bit-callout>\n\n      <bit-toggle-group\n        *ngIf=\"showFilterToggle && !isAdminConsoleActive\"\n        [selected]=\"filterOrgStatus$ | async\"\n        (selectedChange)=\"filterOrgToggle($event)\"\n        [attr.aria-label]=\"'addAccessFilter' | i18n\"\n      >\n        <ng-container *ngFor=\"let status of filterStatus\">\n          <bit-toggle [value]=\"status\">\n            {{ getName(status) }}\n            <span bitBadge variant=\"info\"> {{ getCount(status) }} </span>\n          </bit-toggle>\n        </ng-container>\n      </bit-toggle-group>\n      <bit-table [dataSource]=\"dataSource\">\n        <ng-container header *ngIf=\"!isAdminConsoleActive\">\n          <tr bitRow>\n            <th bitCell></th>\n            <th bitCell>{{ \"name\" | i18n }}</th>\n            <th bitCell>{{ \"owner\" | i18n }}</th>\n            <th bitCell></th>\n          </tr>\n        </ng-container>\n        <ng-template body let-rows$>\n          <tr bitRow *ngFor=\"let r of rows$ | async\">\n            <td bitCell>\n              <app-vault-icon [cipher]=\"r\"></app-vault-icon>\n            </td>\n            <td bitCell>\n              <a\n                bitLink\n                href=\"#\"\n                appStopClick\n                (click)=\"selectCipher(r)\"\n                title=\"{{ 'editItemWithName' | i18n: r.name }}\"\n              >\n                {{ r.name }}\n              </a>\n              <ng-container *ngIf=\"!organization && r.organizationId\">\n                <i\n                  class=\"bwi bwi-collection\"\n                  appStopProp\n                  title=\"{{ 'shared' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n              </ng-container>\n              <ng-container *ngIf=\"r.hasAttachments\">\n                <i\n                  class=\"bwi bwi-paperclip\"\n                  appStopProp\n                  title=\"{{ 'attachments' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n              </ng-container>\n              <br />\n              <small>{{ r.subTitle }}</small>\n            </td>\n            <td bitCell>\n              <app-org-badge\n                *ngIf=\"!organization\"\n                [disabled]=\"disabled\"\n                [organizationId]=\"r.organizationId\"\n                [organizationName]=\"r.organizationId | orgNameFromId: (organizations$ | async)\"\n                appStopProp\n              >\n              </app-org-badge>\n            </td>\n          </tr>\n        </ng-template>\n      </bit-table>\n    </ng-container>\n  </div>\n  <ng-template #cipherAddEdit></ng-template>\n</bit-container>\n","import { Component, OnInit } from \"@angular/core\";\n\nimport { CollectionService, Collection } from \"@bitwarden/admin-console/common\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\n@Component({\n  selector: \"app-unsecured-websites-report\",\n  templateUrl: \"unsecured-websites-report.component.html\",\n})\nexport class UnsecuredWebsitesReportComponent extends CipherReportComponent implements OnInit {\n  disabled = true;\n\n  constructor(\n    protected cipherService: CipherService,\n    protected organizationService: OrganizationService,\n    modalService: ModalService,\n    passwordRepromptService: PasswordRepromptService,\n    i18nService: I18nService,\n    syncService: SyncService,\n    private collectionService: CollectionService,\n  ) {\n    super(\n      cipherService,\n      modalService,\n      passwordRepromptService,\n      organizationService,\n      i18nService,\n      syncService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.load();\n  }\n\n  async setCiphers() {\n    const allCiphers = await this.getAllCiphers();\n    const allCollections = await this.collectionService.getAll();\n    this.filterStatus = [0];\n\n    const unsecuredCiphers = allCiphers.filter((c) => {\n      const containsUnsecured = this.cipherContainsUnsecured(c);\n      if (containsUnsecured === false) {\n        return false;\n      }\n\n      const canView = this.canView(c, allCollections);\n      return canView;\n    });\n\n    this.filterCiphersByOrg(unsecuredCiphers);\n  }\n\n  /**\n   * Cipher needs to be a Login type, contain Uris, and not be deleted\n   * @param cipher Current cipher with unsecured uri\n   */\n  private cipherContainsUnsecured(cipher: CipherView): boolean {\n    if (cipher.type !== CipherType.Login || !cipher.login.hasUris || cipher.isDeleted) {\n      return false;\n    }\n\n    const containsUnsecured = cipher.login.uris.some(\n      (u: any) => u.uri != null && u.uri.indexOf(\"http://\") === 0,\n    );\n    return containsUnsecured;\n  }\n\n  /**\n   * If the user does not have readonly set or it's false they have the ability to edit\n   * @param cipher Current cipher with unsecured uri\n   * @param allCollections The collections for the user\n   */\n  private canView(cipher: CipherView, allCollections: Collection[]): boolean {\n    if (!cipher.organizationId) {\n      return true;\n    }\n\n    return (\n      allCollections.filter(\n        (item) => cipher.collectionIds.indexOf(item.id) > -1 && !(item.readOnly ?? false),\n      ).length > 0\n    );\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"weakPasswordsReportDesc\" | i18n }}</p>\n  <div *ngIf=\"!hasLoaded && loading\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n  <div class=\"tw-mt-4\" *ngIf=\"hasLoaded\">\n    <bit-callout type=\"success\" title=\"{{ 'goodNews' | i18n }}\" *ngIf=\"!ciphers.length\">\n      {{ \"noWeakPasswords\" | i18n }}\n    </bit-callout>\n    <ng-container *ngIf=\"ciphers.length\">\n      <bit-callout type=\"danger\" title=\"{{ 'weakPasswordsFound' | i18n }}\">\n        {{ \"weakPasswordsFoundReportDesc\" | i18n: (ciphers.length | number) : vaultMsg }}\n      </bit-callout>\n      <bit-toggle-group\n        *ngIf=\"showFilterToggle && !isAdminConsoleActive\"\n        [selected]=\"filterOrgStatus$ | async\"\n        (selectedChange)=\"filterOrgToggle($event)\"\n        [attr.aria-label]=\"'addAccessFilter' | i18n\"\n      >\n        <ng-container *ngFor=\"let status of filterStatus\">\n          <bit-toggle [value]=\"status\">\n            {{ getName(status) }}\n            <span bitBadge variant=\"info\"> {{ getCount(status) }} </span>\n          </bit-toggle>\n        </ng-container>\n      </bit-toggle-group>\n      <bit-table [dataSource]=\"dataSource\">\n        <ng-container header>\n          <tr bitRow>\n            <th bitCell></th>\n            <th bitCell bitSortable=\"name\">{{ \"name\" | i18n }}</th>\n            <th bitCell bitSortable=\"organizationId\" *ngIf=\"!isAdminConsoleActive\">\n              {{ \"owner\" | i18n }}\n            </th>\n            <th bitCell class=\"tw-text-right\" bitSortable=\"score\" default>\n              {{ \"weakness\" | i18n }}\n            </th>\n          </tr>\n        </ng-container>\n        <ng-template body let-rows$>\n          <tr bitRow *ngFor=\"let r of rows$ | async\">\n            <td bitCell>\n              <app-vault-icon [cipher]=\"r\"></app-vault-icon>\n            </td>\n            <td bitCell>\n              <ng-container *ngIf=\"!organization || canManageCipher(r); else cantManage\">\n                <a\n                  bitLink\n                  href=\"#\"\n                  appStopClick\n                  (click)=\"selectCipher(r)\"\n                  title=\"{{ 'editItemWithName' | i18n: r.name }}\"\n                  >{{ r.name }}</a\n                >\n              </ng-container>\n              <ng-template #cantManage>\n                <span>{{ r.name }}</span>\n              </ng-template>\n              <ng-container *ngIf=\"!organization && r.organizationId\">\n                <i\n                  class=\"bwi bwi-collection\"\n                  appStopProp\n                  title=\"{{ 'shared' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n              </ng-container>\n              <ng-container *ngIf=\"r.hasAttachments\">\n                <i\n                  class=\"bwi bwi-paperclip\"\n                  appStopProp\n                  title=\"{{ 'attachments' | i18n }}\"\n                  aria-hidden=\"true\"\n                ></i>\n                <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n              </ng-container>\n              <br />\n              <small>{{ r.subTitle }}</small>\n            </td>\n            <td bitCell *ngIf=\"!isAdminConsoleActive\">\n              <app-org-badge\n                *ngIf=\"!organization\"\n                [disabled]=\"disabled\"\n                [organizationId]=\"r.organizationId\"\n                [organizationName]=\"r.organizationId | orgNameFromId: (organizations$ | async)\"\n                appStopProp\n              >\n              </app-org-badge>\n            </td>\n            <td bitCell class=\"tw-text-right\">\n              <span bitBadge [variant]=\"r.reportValue.badgeVariant\">\n                {{ r.reportValue.label | i18n }}\n              </span>\n            </td>\n          </tr>\n        </ng-template>\n      </bit-table>\n    </ng-container>\n  </div>\n  <ng-template #cipherAddEdit></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { BadgeVariant } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { CipherReportComponent } from \"./cipher-report.component\";\n\ntype ReportScore = { label: string; badgeVariant: BadgeVariant };\ntype ReportResult = CipherView & { score: number; reportValue: ReportScore };\n\n@Component({\n  selector: \"app-weak-passwords-report\",\n  templateUrl: \"weak-passwords-report.component.html\",\n})\nexport class WeakPasswordsReportComponent extends CipherReportComponent implements OnInit {\n  disabled = true;\n\n  weakPasswordCiphers: ReportResult[] = [];\n\n  constructor(\n    protected cipherService: CipherService,\n    protected passwordStrengthService: PasswordStrengthServiceAbstraction,\n    protected organizationService: OrganizationService,\n    modalService: ModalService,\n    passwordRepromptService: PasswordRepromptService,\n    i18nService: I18nService,\n    syncService: SyncService,\n  ) {\n    super(\n      cipherService,\n      modalService,\n      passwordRepromptService,\n      organizationService,\n      i18nService,\n      syncService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.load();\n  }\n\n  async setCiphers() {\n    const allCiphers = await this.getAllCiphers();\n    this.weakPasswordCiphers = [];\n    this.filterStatus = [0];\n    this.findWeakPasswords(allCiphers);\n  }\n\n  protected findWeakPasswords(ciphers: CipherView[]): void {\n    ciphers.forEach((ciph) => {\n      const { type, login, isDeleted, edit, viewPassword } = ciph;\n      if (\n        type !== CipherType.Login ||\n        login.password == null ||\n        login.password === \"\" ||\n        isDeleted ||\n        (!this.organization && !edit) ||\n        !viewPassword\n      ) {\n        return;\n      }\n\n      const hasUserName = this.isUserNameNotEmpty(ciph);\n      let userInput: string[] = [];\n      if (hasUserName) {\n        const atPosition = login.username.indexOf(\"@\");\n        if (atPosition > -1) {\n          userInput = userInput\n            .concat(\n              login.username\n                .substr(0, atPosition)\n                .trim()\n                .toLowerCase()\n                .split(/[^A-Za-z0-9]/),\n            )\n            .filter((i) => i.length >= 3);\n        } else {\n          userInput = login.username\n            .trim()\n            .toLowerCase()\n            .split(/[^A-Za-z0-9]/)\n            .filter((i) => i.length >= 3);\n        }\n      }\n      const result = this.passwordStrengthService.getPasswordStrength(\n        login.password,\n        null,\n        userInput.length > 0 ? userInput : null,\n      );\n\n      if (result.score != null && result.score <= 2) {\n        const scoreValue = this.scoreKey(result.score);\n        const row = { ...ciph, score: result.score, reportValue: scoreValue } as ReportResult;\n        this.weakPasswordCiphers.push(row);\n      }\n    });\n    this.filterCiphersByOrg(this.weakPasswordCiphers);\n  }\n\n  protected canManageCipher(c: CipherView): boolean {\n    // this will only ever be false from the org view;\n    return true;\n  }\n\n  private isUserNameNotEmpty(c: CipherView): boolean {\n    return !Utils.isNullOrWhitespace(c.login.username);\n  }\n\n  private scoreKey(score: number): ReportScore {\n    switch (score) {\n      case 4:\n        return { label: \"strong\", badgeVariant: \"success\" };\n      case 3:\n        return { label: \"good\", badgeVariant: \"primary\" };\n      case 2:\n        return { label: \"weak\", badgeVariant: \"warning\" };\n      default:\n        return { label: \"veryWeak\", badgeVariant: \"danger\" };\n    }\n  }\n}\n","export enum ReportVariant {\n  Enabled = \"Enabled\",\n  RequiresPremium = \"RequiresPremium\",\n  RequiresUpgrade = \"RequiresUpgrade\",\n  RequiresEnterprise = \"RequiresEnterprise\",\n}\n","<a\n  class=\"tw-block tw-h-full tw-max-w-72 tw-overflow-hidden tw-rounded tw-border tw-border-solid tw-border-secondary-300 !tw-text-main tw-transition-all hover:tw-scale-105 hover:tw-no-underline focus:tw-outline-none focus:tw-ring focus:tw-ring-primary-700 focus:tw-ring-offset-2\"\n  [routerLink]=\"route\"\n>\n  <div class=\"tw-relative\">\n    <div\n      class=\"tw-flex tw-h-28 tw-bg-background-alt2 tw-text-center tw-text-primary-300\"\n      [ngClass]=\"{ 'tw-grayscale': disabled }\"\n    >\n      <div class=\"tw-m-auto\"><bit-icon [icon]=\"icon\" aria-hidden=\"true\"></bit-icon></div>\n    </div>\n    <div class=\"tw-p-5\" [ngClass]=\"{ 'tw-grayscale': disabled }\">\n      <h3 class=\"tw-mb-4 tw-text-xl tw-font-bold\">{{ title }}</h3>\n      <p class=\"tw-mb-0\">{{ description }}</p>\n    </div>\n    <span\n      bitBadge\n      [variant]=\"requiresPremium ? 'success' : 'primary'\"\n      class=\"tw-absolute tw-left-2 tw-top-2 tw-leading-none\"\n      *ngIf=\"disabled\"\n    >\n      <ng-container *ngIf=\"requiresPremium\">{{ \"premium\" | i18n }}</ng-container>\n      <ng-container *ngIf=\"!requiresPremium\">{{ \"upgrade\" | i18n }}</ng-container>\n    </span>\n  </div>\n</a>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { Icon } from \"@bitwarden/components\";\n\nimport { ReportVariant } from \"../models/report-variant\";\n\n@Component({\n  selector: \"app-report-card\",\n  templateUrl: \"report-card.component.html\",\n})\nexport class ReportCardComponent {\n  @Input() title: string;\n  @Input() description: string;\n  @Input() route: string;\n  @Input() icon: Icon;\n  @Input() variant: ReportVariant;\n\n  protected get disabled() {\n    return this.variant != ReportVariant.Enabled;\n  }\n\n  protected get requiresPremium() {\n    return this.variant == ReportVariant.RequiresPremium;\n  }\n}\n","<div class=\"tw-inline-grid tw-grid-cols-3 tw-gap-4\">\n  <div *ngFor=\"let report of reports\">\n    <app-report-card\n      [title]=\"report.title | i18n\"\n      [description]=\"report.description | i18n\"\n      [route]=\"report.route\"\n      [variant]=\"report.variant\"\n      [icon]=\"report.icon\"\n    ></app-report-card>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { ReportEntry } from \"../models/report-entry\";\n\n@Component({\n  selector: \"app-report-list\",\n  templateUrl: \"report-list.component.html\",\n})\nexport class ReportListComponent {\n  @Input() reports: ReportEntry[];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { PluralizePipe } from \"@bitwarden/angular/pipes/pluralize.pipe\";\nimport { DialogService } from \"@bitwarden/components\";\nimport {\n  AssignCollectionsComponent,\n  CollectionAssignmentParams,\n  CollectionAssignmentResult,\n} from \"@bitwarden/vault\";\n\nimport { SharedModule } from \"../../../shared\";\n\n@Component({\n  imports: [SharedModule, AssignCollectionsComponent, PluralizePipe],\n  templateUrl: \"./assign-collections-web.component.html\",\n  standalone: true,\n})\nexport class AssignCollectionsWebComponent {\n  protected editableItemCount: number;\n\n  constructor(\n    @Inject(DIALOG_DATA) public params: CollectionAssignmentParams,\n    private dialogRef: DialogRef<CollectionAssignmentResult>,\n  ) {}\n\n  protected async onCollectionAssign(result: CollectionAssignmentResult) {\n    this.dialogRef.close(result);\n  }\n\n  static open(dialogService: DialogService, config: DialogConfig<CollectionAssignmentParams>) {\n    return dialogService.open<CollectionAssignmentResult, CollectionAssignmentParams>(\n      AssignCollectionsWebComponent,\n      config,\n    );\n  }\n}\n","<bit-dialog dialogSize=\"large\">\n  <span bitDialogTitle>\n    {{ \"assignToCollections\" | i18n }}\n    <span class=\"tw-text-sm tw-normal-case tw-text-muted\">\n      {{ editableItemCount | pluralize: (\"item\" | i18n) : (\"items\" | i18n) }}\n    </span>\n  </span>\n\n  <div bitDialogContent>\n    <assign-collections\n      [params]=\"params\"\n      [submitBtn]=\"assignSubmitButton\"\n      (onCollectionAssign)=\"onCollectionAssign($event)\"\n      (editableItemCountChange)=\"editableItemCount = $event\"\n    ></assign-collections>\n  </div>\n\n  <ng-container bitDialogFooter>\n    <button\n      #assignSubmitButton\n      form=\"assign_collections_form\"\n      type=\"submit\"\n      bitButton\n      bitFormButton\n      buttonType=\"primary\"\n    >\n      {{ \"assign\" | i18n }}\n    </button>\n    <button type=\"button\" bitButton buttonType=\"secondary\" bitDialogClose>\n      {{ \"cancel\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { ChangeDetectorRef, Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { AbstractControl, FormBuilder, Validators } from \"@angular/forms\";\nimport {\n  combineLatest,\n  map,\n  Observable,\n  of,\n  shareReplay,\n  Subject,\n  switchMap,\n  takeUntil,\n} from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport {\n  CollectionAccessSelectionView,\n  CollectionAdminService,\n  CollectionAdminView,\n  OrganizationUserApiService,\n  OrganizationUserUserMiniResponse,\n  CollectionResponse,\n  CollectionView,\n} from \"@bitwarden/admin-console/common\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { BitValidators, DialogService } from \"@bitwarden/components\";\n\nimport { GroupApiService, GroupView } from \"../../../admin-console/organizations/core\";\nimport { PermissionMode } from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.component\";\nimport {\n  AccessItemType,\n  AccessItemValue,\n  AccessItemView,\n  CollectionPermission,\n  convertToPermission,\n  convertToSelectionView,\n} from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\n\nexport enum CollectionDialogTabType {\n  Info = 0,\n  Access = 1,\n}\n\nexport interface CollectionDialogParams {\n  collectionId?: string;\n  organizationId: string;\n  initialTab?: CollectionDialogTabType;\n  parentCollectionId?: string;\n  showOrgSelector?: boolean;\n  /**\n   * Flag to limit the nested collections to only those the user has explicit CanManage access too.\n   */\n  limitNestedCollections?: boolean;\n  readonly?: boolean;\n  isAddAccessCollection?: boolean;\n}\n\nexport interface CollectionDialogResult {\n  action: CollectionDialogAction;\n  collection: CollectionResponse | CollectionView;\n}\n\nexport enum CollectionDialogAction {\n  Saved = \"saved\",\n  Canceled = \"canceled\",\n  Deleted = \"deleted\",\n}\n\n@Component({\n  templateUrl: \"collection-dialog.component.html\",\n})\nexport class CollectionDialogComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n  protected organizations$: Observable<Organization[]>;\n\n  protected tabIndex: CollectionDialogTabType;\n  protected loading = true;\n  protected organization?: Organization;\n  protected collection?: CollectionAdminView;\n  protected nestOptions: CollectionView[] = [];\n  protected accessItems: AccessItemView[] = [];\n  protected deletedParentName: string | undefined;\n  protected showOrgSelector = false;\n  protected formGroup = this.formBuilder.group({\n    name: [\"\", [Validators.required, BitValidators.forbiddenCharacters([\"/\"])]],\n    externalId: \"\",\n    parent: undefined as string | undefined,\n    access: [[] as AccessItemValue[]],\n    selectedOrg: \"\",\n  });\n  protected PermissionMode = PermissionMode;\n  protected showDeleteButton = false;\n  protected showAddAccessWarning = false;\n\n  constructor(\n    @Inject(DIALOG_DATA) private params: CollectionDialogParams,\n    private formBuilder: FormBuilder,\n    private dialogRef: DialogRef<CollectionDialogResult>,\n    private organizationService: OrganizationService,\n    private groupService: GroupApiService,\n    private collectionAdminService: CollectionAdminService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private organizationUserApiService: OrganizationUserApiService,\n    private dialogService: DialogService,\n    private changeDetectorRef: ChangeDetectorRef,\n  ) {\n    this.tabIndex = params.initialTab ?? CollectionDialogTabType.Info;\n  }\n\n  async ngOnInit() {\n    // Opened from the individual vault\n    if (this.params.showOrgSelector) {\n      this.showOrgSelector = true;\n      this.formGroup.controls.selectedOrg.valueChanges\n        .pipe(takeUntil(this.destroy$))\n        .subscribe((id) => this.loadOrg(id));\n      this.organizations$ = this.organizationService.organizations$.pipe(\n        first(),\n        map((orgs) =>\n          orgs\n            .filter((o) => o.canCreateNewCollections && !o.isProviderUser)\n            .sort(Utils.getSortFunction(this.i18nService, \"name\")),\n        ),\n      );\n      // patchValue will trigger a call to loadOrg() in this case, so no need to call it again here\n      this.formGroup.patchValue({ selectedOrg: this.params.organizationId });\n    } else {\n      // Opened from the org vault\n      this.formGroup.patchValue({ selectedOrg: this.params.organizationId });\n      await this.loadOrg(this.params.organizationId);\n    }\n  }\n\n  async loadOrg(orgId: string) {\n    const organization$ = this.organizationService\n      .get$(orgId)\n      .pipe(shareReplay({ refCount: true, bufferSize: 1 }));\n    const groups$ = organization$.pipe(\n      switchMap((organization) => {\n        if (!organization.useGroups) {\n          return of([] as GroupView[]);\n        }\n\n        return this.groupService.getAll(orgId);\n      }),\n    );\n    combineLatest({\n      organization: organization$,\n      collections: this.collectionAdminService.getAll(orgId),\n      groups: groups$,\n      users: this.organizationUserApiService.getAllMiniUserDetails(orgId),\n    })\n      .pipe(takeUntil(this.formGroup.controls.selectedOrg.valueChanges), takeUntil(this.destroy$))\n      .subscribe(({ organization, collections: allCollections, groups, users }) => {\n        this.organization = organization;\n\n        if (this.params.collectionId) {\n          this.collection = allCollections.find((c) => c.id === this.collectionId);\n\n          if (!this.collection) {\n            throw new Error(\"Could not find collection to edit.\");\n          }\n        }\n\n        this.accessItems = [].concat(\n          groups.map((group) => mapGroupToAccessItemView(group, this.collection)),\n          users.data.map((user) => mapUserToAccessItemView(user, this.collection)),\n        );\n\n        // Force change detection to update the access selector's items\n        this.changeDetectorRef.detectChanges();\n\n        this.nestOptions = this.params.limitNestedCollections\n          ? allCollections.filter((c) => c.manage)\n          : allCollections;\n\n        if (this.collection) {\n          // Ensure we don't allow nesting the current collection within itself\n          this.nestOptions = this.nestOptions.filter((c) => c.id !== this.collectionId);\n\n          // Parse the name to find its parent name\n          const { name, parent: parentName } = parseName(this.collection);\n\n          // Determine if the user can see/select the parent collection\n          if (parentName !== undefined) {\n            if (\n              this.organization.canViewAllCollections &&\n              !allCollections.find((c) => c.name === parentName)\n            ) {\n              // The user can view all collections, but the parent was not found -> assume it has been deleted\n              this.deletedParentName = parentName;\n            } else if (!this.nestOptions.find((c) => c.name === parentName)) {\n              // We cannot find the current parent collection in our list of options, so add a placeholder\n              this.nestOptions.unshift({ name: parentName } as CollectionView);\n            }\n          }\n\n          const accessSelections = mapToAccessSelections(this.collection);\n          this.formGroup.patchValue({\n            name,\n            externalId: this.collection.externalId,\n            parent: parentName,\n            access: accessSelections,\n          });\n          this.showDeleteButton = !this.dialogReadonly && this.collection.canDelete(organization);\n        } else {\n          const parent = this.nestOptions.find((c) => c.id === this.params.parentCollectionId);\n          const currentOrgUserId = users.data.find(\n            (u) => u.userId === this.organization?.userId,\n          )?.id;\n          const initialSelection: AccessItemValue[] =\n            currentOrgUserId !== undefined\n              ? [\n                  {\n                    id: currentOrgUserId,\n                    type: AccessItemType.Member,\n                    permission: CollectionPermission.Manage,\n                  },\n                ]\n              : [];\n\n          this.formGroup.patchValue({\n            parent: parent?.name ?? undefined,\n            access: initialSelection,\n          });\n        }\n\n        if (!organization.allowAdminAccessToAllCollectionItems) {\n          this.formGroup.controls.access.addValidators(validateCanManagePermission);\n        } else {\n          this.formGroup.controls.access.removeValidators(validateCanManagePermission);\n        }\n        this.formGroup.controls.access.updateValueAndValidity();\n\n        this.handleFormGroupReadonly(this.dialogReadonly);\n\n        this.loading = false;\n        this.showAddAccessWarning = this.handleAddAccessWarning();\n      });\n  }\n\n  protected get collectionId() {\n    return this.params.collectionId;\n  }\n\n  protected get editMode() {\n    return this.params.collectionId != undefined;\n  }\n\n  protected get dialogReadonly() {\n    return this.params.readonly === true;\n  }\n\n  protected async cancel() {\n    this.close(CollectionDialogAction.Canceled);\n  }\n\n  protected submit = async () => {\n    // Saving a collection is prohibited while in read only mode\n    if (this.dialogReadonly) {\n      return;\n    }\n\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      const accessTabError = this.formGroup.controls.access.hasError(\"managePermissionRequired\");\n\n      if (this.tabIndex === CollectionDialogTabType.Access && !accessTabError) {\n        this.platformUtilsService.showToast(\n          \"error\",\n          null,\n          this.i18nService.t(\"fieldOnTabRequiresAttention\", this.i18nService.t(\"collectionInfo\")),\n        );\n      } else if (this.tabIndex === CollectionDialogTabType.Info && accessTabError) {\n        this.platformUtilsService.showToast(\n          \"error\",\n          null,\n          this.i18nService.t(\"fieldOnTabRequiresAttention\", this.i18nService.t(\"access\")),\n        );\n      }\n      return;\n    }\n\n    const collectionView = new CollectionAdminView();\n    collectionView.id = this.params.collectionId;\n    collectionView.organizationId = this.formGroup.controls.selectedOrg.value;\n    collectionView.externalId = this.formGroup.controls.externalId.value;\n    collectionView.groups = this.formGroup.controls.access.value\n      .filter((v) => v.type === AccessItemType.Group)\n      .map(convertToSelectionView);\n    collectionView.users = this.formGroup.controls.access.value\n      .filter((v) => v.type === AccessItemType.Member)\n      .map(convertToSelectionView);\n\n    const parent = this.formGroup.controls.parent.value;\n    if (parent) {\n      collectionView.name = `${parent}/${this.formGroup.controls.name.value}`;\n    } else {\n      collectionView.name = this.formGroup.controls.name.value;\n    }\n\n    const savedCollection = await this.collectionAdminService.save(collectionView);\n\n    this.platformUtilsService.showToast(\n      \"success\",\n      null,\n      this.i18nService.t(\n        this.editMode ? \"editedCollectionId\" : \"createdCollectionId\",\n        collectionView.name,\n      ),\n    );\n\n    this.close(CollectionDialogAction.Saved, savedCollection);\n  };\n\n  protected delete = async () => {\n    // Deleting a collection is prohibited while in read only mode\n    if (this.dialogReadonly) {\n      return;\n    }\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.collection?.name,\n      content: { key: \"deleteCollectionConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed && this.params.collectionId) {\n      return false;\n    }\n\n    await this.collectionAdminService.delete(this.params.organizationId, this.params.collectionId);\n\n    this.platformUtilsService.showToast(\n      \"success\",\n      null,\n      this.i18nService.t(\"deletedCollectionId\", this.collection?.name),\n    );\n\n    this.close(CollectionDialogAction.Deleted, this.collection);\n  };\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  private handleAddAccessWarning(): boolean {\n    if (\n      !this.organization?.allowAdminAccessToAllCollectionItems &&\n      this.params.isAddAccessCollection\n    ) {\n      return true;\n    }\n\n    return false;\n  }\n\n  private handleFormGroupReadonly(readonly: boolean) {\n    if (readonly) {\n      this.formGroup.controls.name.disable();\n      this.formGroup.controls.externalId.disable();\n      this.formGroup.controls.parent.disable();\n      this.formGroup.controls.access.disable();\n    } else {\n      this.formGroup.controls.name.enable();\n      this.formGroup.controls.externalId.enable();\n      this.formGroup.controls.parent.enable();\n      this.formGroup.controls.access.enable();\n    }\n  }\n\n  private close(action: CollectionDialogAction, collection?: CollectionResponse | CollectionView) {\n    this.dialogRef.close({ action, collection } as CollectionDialogResult);\n  }\n}\n\nfunction parseName(collection: CollectionView) {\n  const nameParts = collection.name?.split(\"/\");\n  const name = nameParts[nameParts.length - 1];\n  const parent = nameParts.length > 1 ? nameParts.slice(0, -1).join(\"/\") : undefined;\n\n  return { name, parent };\n}\n\nfunction mapToAccessSelections(collectionDetails: CollectionAdminView): AccessItemValue[] {\n  if (collectionDetails == undefined) {\n    return [];\n  }\n  return [].concat(\n    collectionDetails.groups.map<AccessItemValue>((selection) => ({\n      id: selection.id,\n      type: AccessItemType.Group,\n      permission: convertToPermission(selection),\n    })),\n    collectionDetails.users.map<AccessItemValue>((selection) => ({\n      id: selection.id,\n      type: AccessItemType.Member,\n      permission: convertToPermission(selection),\n    })),\n  );\n}\n\n/**\n * Validator to ensure that at least one access item has Manage permission\n */\nfunction validateCanManagePermission(control: AbstractControl) {\n  const access = control.value as AccessItemValue[];\n  const hasManagePermission = access.some((a) => a.permission === CollectionPermission.Manage);\n\n  return hasManagePermission ? null : { managePermissionRequired: true };\n}\n\n/**\n *\n * @param group Current group being used to translate object into AccessItemView\n * @param collectionId Current collection being viewed/edited\n * @returns AccessItemView customized to set a readonlyPermission to be displayed if the access selector is in a disabled state\n */\nfunction mapGroupToAccessItemView(\n  group: GroupView,\n  collection: CollectionAdminView,\n): AccessItemView {\n  return {\n    id: group.id,\n    type: AccessItemType.Group,\n    listName: group.name,\n    labelName: group.name,\n    readonly: false,\n    readonlyPermission:\n      collection != null\n        ? convertToPermission(collection.groups.find((g) => g.id === group.id))\n        : undefined,\n  };\n}\n\n/**\n *\n * @param user Current user being used to translate object into AccessItemView\n * @param collectionId Current collection being viewed/edited\n * @returns AccessItemView customized to set a readonlyPermission to be displayed if the access selector is in a disabled state\n */\nfunction mapUserToAccessItemView(\n  user: OrganizationUserUserMiniResponse,\n  collection: CollectionAdminView,\n): AccessItemView {\n  return {\n    id: user.id,\n    type: AccessItemType.Member,\n    email: user.email,\n    role: user.type,\n    listName: user.name?.length > 0 ? `${user.name} (${user.email})` : user.email,\n    labelName: user.name ?? user.email,\n    status: user.status,\n    readonly: false,\n    readonlyPermission:\n      collection != null\n        ? convertToPermission(\n            new CollectionAccessSelectionView(collection.users.find((u) => u.id === user.id)),\n          )\n        : undefined,\n  };\n}\n\n/**\n * Strongly typed helper to open a CollectionDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport function openCollectionDialog(\n  dialogService: DialogService,\n  config: DialogConfig<CollectionDialogParams>,\n) {\n  return dialogService.open<CollectionDialogResult, CollectionDialogParams>(\n    CollectionDialogComponent,\n    config,\n  );\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog [disablePadding]=\"!loading\" dialogSize=\"large\">\n    <span bitDialogTitle>\n      <ng-container *ngIf=\"editMode\">\n        {{ \"editCollection\" | i18n }}\n        <span class=\"tw-text-sm tw-normal-case tw-text-muted\" *ngIf=\"!loading\">{{\n          collection.name\n        }}</span>\n      </ng-container>\n      <ng-container *ngIf=\"!editMode\">\n        {{ \"newCollection\" | i18n }}\n      </ng-container>\n    </span>\n    <div bitDialogContent>\n      <ng-container *ngIf=\"loading\" #spinner>\n        <i class=\"bwi bwi-spinner bwi-lg bwi-spin\" aria-hidden=\"true\"></i>\n      </ng-container>\n      <bit-tab-group *ngIf=\"!loading\" [(selectedIndex)]=\"tabIndex\">\n        <bit-tab label=\"{{ 'collectionInfo' | i18n }}\">\n          <bit-form-field>\n            <bit-label>{{ \"name\" | i18n }}</bit-label>\n            <input bitInput appAutofocus formControlName=\"name\" />\n          </bit-form-field>\n\n          <bit-form-field *ngIf=\"showOrgSelector\">\n            <bit-label>{{ \"organization\" | i18n }}</bit-label>\n            <bit-select bitInput formControlName=\"selectedOrg\">\n              <bit-option\n                *ngFor=\"let org of organizations$ | async\"\n                icon=\"bwi-business\"\n                [value]=\"org.id\"\n                [label]=\"org.name\"\n              >\n              </bit-option>\n            </bit-select>\n          </bit-form-field>\n\n          <bit-form-field>\n            <bit-label>{{ \"externalId\" | i18n }}</bit-label>\n            <input bitInput formControlName=\"externalId\" />\n            <bit-hint>{{ \"externalIdDesc\" | i18n }}</bit-hint>\n          </bit-form-field>\n\n          <bit-form-field>\n            <bit-label>{{ \"nestCollectionUnder\" | i18n }}</bit-label>\n            <bit-select bitInput formControlName=\"parent\">\n              <bit-option [value]=\"undefined\" [label]=\"'noCollection' | i18n\"> </bit-option>\n              <bit-option\n                *ngIf=\"deletedParentName\"\n                disabled\n                icon=\"bwi-collection\"\n                [value]=\"deletedParentName\"\n                label=\"{{ deletedParentName }} ({{ 'deleted' | i18n }})\"\n              >\n              </bit-option>\n              <bit-option\n                *ngFor=\"let collection of nestOptions\"\n                icon=\"bwi-collection\"\n                [value]=\"collection.name\"\n                [label]=\"collection.name\"\n              >\n              </bit-option>\n            </bit-select>\n          </bit-form-field>\n        </bit-tab>\n        <bit-tab label=\"{{ 'access' | i18n }}\">\n          <div class=\"tw-mb-3\">\n            <ng-container *ngIf=\"dialogReadonly\">\n              <span>{{ \"readOnlyCollectionAccess\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"!dialogReadonly\">\n              <bit-callout\n                title=\"{{ 'grantAddAccessCollectionWarningTitle' | i18n }}\"\n                type=\"warning\"\n                *ngIf=\"showAddAccessWarning\"\n              >\n                {{ \"grantAddAccessCollectionWarning\" | i18n }}\n              </bit-callout>\n              <span *ngIf=\"organization.useGroups\">{{ \"grantCollectionAccess\" | i18n }}</span>\n              <span *ngIf=\"!organization.useGroups\">{{\n                \"grantCollectionAccessMembersOnly\" | i18n\n              }}</span>\n              <span *ngIf=\"organization.allowAdminAccessToAllCollectionItems\">\n                {{ \" \" + (\"adminCollectionAccess\" | i18n) }}\n              </span>\n            </ng-container>\n          </div>\n          <div\n            class=\"tw-mb-3 tw-text-danger\"\n            *ngIf=\"\n              formGroup.controls.access.hasError('managePermissionRequired') &&\n              !showAddAccessWarning\n            \"\n          >\n            <i class=\"bwi bwi-error\"></i> {{ \"managePermissionRequired\" | i18n }}\n          </div>\n          <bit-access-selector\n            *ngIf=\"organization.useGroups\"\n            [permissionMode]=\"dialogReadonly ? PermissionMode.Readonly : PermissionMode.Edit\"\n            formControlName=\"access\"\n            [items]=\"accessItems\"\n            [columnHeader]=\"'groupSlashMemberColumnHeader' | i18n\"\n            [selectorLabelText]=\"'selectGroupsAndMembers' | i18n\"\n            [selectorHelpText]=\"'userPermissionOverrideHelperDesc' | i18n\"\n            [emptySelectionText]=\"'noMembersOrGroupsAdded' | i18n\"\n          ></bit-access-selector>\n          <bit-access-selector\n            *ngIf=\"!organization.useGroups\"\n            [permissionMode]=\"dialogReadonly ? PermissionMode.Readonly : PermissionMode.Edit\"\n            formControlName=\"access\"\n            [items]=\"accessItems\"\n            [columnHeader]=\"'memberColumnHeader' | i18n\"\n            [selectorLabelText]=\"'selectMembers' | i18n\"\n            [emptySelectionText]=\"'noMembersAdded' | i18n\"\n          ></bit-access-selector>\n        </bit-tab>\n      </bit-tab-group>\n    </div>\n    <ng-container bitDialogFooter>\n      <button\n        type=\"submit\"\n        bitButton\n        bitFormButton\n        buttonType=\"primary\"\n        [disabled]=\"loading || dialogReadonly\"\n      >\n        {{ \"save\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        (click)=\"cancel()\"\n        [disabled]=\"loading\"\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n      <button\n        *ngIf=\"showDeleteButton\"\n        type=\"button\"\n        bitIconButton=\"bwi-trash\"\n        buttonType=\"danger\"\n        class=\"tw-ml-auto\"\n        bitFormButton\n        [appA11yTitle]=\"'delete' | i18n\"\n        [bitAction]=\"delete\"\n        [disabled]=\"loading\"\n      ></button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","import { AbstractControl, FormControl, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nexport function forbiddenCharacters(characters: string[]): ValidatorFn {\n  return (control: AbstractControl): ValidationErrors | null => {\n    if (!(control instanceof FormControl)) {\n      throw new Error(\"forbiddenCharacters only supports validating FormControls\");\n    }\n\n    if (control.value === null || control.value === undefined) {\n      return null;\n    }\n\n    const value = String(control.value);\n\n    for (const char of value) {\n      if (characters.includes(char)) {\n        return { forbiddenCharacters: { value: control.value, characters } };\n      }\n    }\n\n    return null;\n  };\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SelectModule } from \"@bitwarden/components\";\n\nimport { AccessSelectorModule } from \"../../../admin-console/organizations/shared/components/access-selector/access-selector.module\";\nimport { SharedModule } from \"../../../shared\";\n\nimport { CollectionDialogComponent } from \"./collection-dialog.component\";\n@NgModule({\n  imports: [SharedModule, AccessSelectorModule, SelectModule],\n  declarations: [CollectionDialogComponent],\n  exports: [CollectionDialogComponent],\n})\nexport class CollectionDialogModule {}\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\n\n/**\n * Hides the element if the user has premium.\n */\n@Directive({\n  selector: \"[appNotPremium]\",\n})\nexport class NotPremiumDirective implements OnInit {\n  constructor(\n    private templateRef: TemplateRef<any>,\n    private viewContainer: ViewContainerRef,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    const account = await firstValueFrom(this.accountService.activeAccount$);\n\n    if (!account) {\n      this.viewContainer.createEmbeddedView(this.templateRef);\n      return;\n    }\n\n    const premium = await firstValueFrom(\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n    );\n\n    if (premium) {\n      this.viewContainer.clear();\n    } else {\n      this.viewContainer.createEmbeddedView(this.templateRef);\n    }\n  }\n}\n","import { Component } from \"@angular/core\";\n\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\n@Component({\n  selector: \"app-premium-badge\",\n  template: `\n    <button type=\"button\" *appNotPremium bitBadge variant=\"success\" (click)=\"premiumRequired()\">\n      {{ \"premium\" | i18n }}\n    </button>\n  `,\n})\nexport class PremiumBadgeComponent {\n  constructor(private messagingService: MessagingService) {}\n\n  premiumRequired() {\n    this.messagingService.send(\"premiumRequired\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ButtonModule, DialogModule, DialogService } from \"@bitwarden/components\";\nimport { CipherFormGeneratorComponent } from \"@bitwarden/vault\";\n\nexport interface WebVaultGeneratorDialogParams {\n  type: \"password\" | \"username\";\n}\n\nexport interface WebVaultGeneratorDialogResult {\n  action: WebVaultGeneratorDialogAction;\n  generatedValue?: string;\n}\n\nexport enum WebVaultGeneratorDialogAction {\n  Selected = \"selected\",\n  Canceled = \"canceled\",\n}\n\n@Component({\n  selector: \"web-vault-generator-dialog\",\n  templateUrl: \"./web-generator-dialog.component.html\",\n  standalone: true,\n  imports: [CommonModule, CipherFormGeneratorComponent, ButtonModule, DialogModule],\n})\nexport class WebVaultGeneratorDialogComponent {\n  protected title = this.i18nService.t(this.isPassword ? \"passwordGenerator\" : \"usernameGenerator\");\n  protected selectButtonText = this.i18nService.t(\n    this.isPassword ? \"useThisPassword\" : \"useThisUsername\",\n  );\n\n  /**\n   * Whether the dialog is generating a password/passphrase. If false, it is generating a username.\n   * @protected\n   */\n  protected get isPassword() {\n    return this.params.type === \"password\";\n  }\n\n  /**\n   * The currently generated value.\n   * @protected\n   */\n  protected generatedValue: string = \"\";\n\n  constructor(\n    @Inject(DIALOG_DATA) protected params: WebVaultGeneratorDialogParams,\n    private dialogRef: DialogRef<WebVaultGeneratorDialogResult>,\n    private i18nService: I18nService,\n  ) {}\n\n  /**\n   * Close the dialog without selecting a value.\n   */\n  protected close = () => {\n    this.dialogRef.close({ action: WebVaultGeneratorDialogAction.Canceled });\n  };\n\n  /**\n   * Close the dialog and select the currently generated value.\n   */\n  protected selectValue = () => {\n    this.dialogRef.close({\n      action: WebVaultGeneratorDialogAction.Selected,\n      generatedValue: this.generatedValue,\n    });\n  };\n\n  onValueGenerated(value: string) {\n    this.generatedValue = value;\n  }\n\n  /**\n   * Opens the vault generator dialog.\n   */\n  static open(dialogService: DialogService, config: DialogConfig<WebVaultGeneratorDialogParams>) {\n    return dialogService.open<WebVaultGeneratorDialogResult, WebVaultGeneratorDialogParams>(\n      WebVaultGeneratorDialogComponent,\n      {\n        ...config,\n      },\n    );\n  }\n}\n","<bit-dialog dialogSize=\"default\" background=\"alt\">\n  <span bitDialogTitle>\n    {{ title }}\n  </span>\n  <ng-container bitDialogContent>\n    <vault-cipher-form-generator\n      [type]=\"params.type\"\n      (valueGenerated)=\"onValueGenerated($event)\"\n      disableMargin\n    ></vault-cipher-form-generator>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button\n      type=\"button\"\n      bitButton\n      buttonType=\"primary\"\n      (click)=\"selectValue()\"\n      data-testid=\"select-button\"\n    >\n      {{ selectButtonText }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject, Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { DialogService } from \"@bitwarden/components\";\nimport { CipherFormGenerationService } from \"@bitwarden/vault\";\n\nimport { WebVaultGeneratorDialogComponent } from \"../components/web-generator-dialog/web-generator-dialog.component\";\n\n@Injectable()\nexport class WebCipherFormGenerationService implements CipherFormGenerationService {\n  private dialogService = inject(DialogService);\n\n  async generatePassword(): Promise<string> {\n    const dialogRef = WebVaultGeneratorDialogComponent.open(this.dialogService, {\n      data: { type: \"password\" },\n    });\n\n    const result = await firstValueFrom(dialogRef.closed);\n\n    if (result == null || result.action === \"canceled\") {\n      return null;\n    }\n\n    return result.generatedValue;\n  }\n\n  async generateUsername(): Promise<string> {\n    const dialogRef = WebVaultGeneratorDialogComponent.open(this.dialogService, {\n      data: { type: \"username\" },\n    });\n\n    const result = await firstValueFrom(dialogRef.closed);\n\n    if (result == null || result.action === \"canceled\") {\n      return null;\n    }\n\n    return result.generatedValue;\n  }\n}\n","<bit-dialog dialogSize=\"large\" background=\"alt\" [loading]=\"performingInitialLoad\">\n  <span bitDialogTitle aria-live=\"polite\">\n    {{ title }}\n  </span>\n  <div bitDialogContent #dialogContent>\n    <app-cipher-view\n      *ngIf=\"showCipherView\"\n      [cipher]=\"cipher\"\n      [collections]=\"collections\"\n      [isAdminConsole]=\"formConfig.isAdminConsole\"\n    ></app-cipher-view>\n    <vault-cipher-form\n      *ngIf=\"loadForm\"\n      formId=\"cipherForm\"\n      [config]=\"formConfig\"\n      [submitBtn]=\"submitBtn\"\n      (formReady)=\"onFormReady()\"\n      (cipherSaved)=\"onCipherSaved($event)\"\n    >\n      <bit-item slot=\"attachment-button\">\n        <button bit-item-content type=\"button\" (click)=\"openAttachmentsDialog()\">\n          <p class=\"tw-m-0\">\n            {{ \"attachments\" | i18n }}\n            <span\n              *ngIf=\"!(canAccessAttachments$ | async)\"\n              bitBadge\n              variant=\"success\"\n              class=\"tw-ml-2\"\n            >\n              {{ \"premium\" | i18n }}\n            </span>\n          </p>\n          <i slot=\"end\" class=\"bwi bwi-angle-right\" aria-hidden=\"true\"></i>\n        </button>\n      </bit-item>\n    </vault-cipher-form>\n  </div>\n  <ng-container bitDialogFooter>\n    <ng-container *ngIf=\"showCipherView\">\n      <button\n        bitButton\n        [bitAction]=\"switchToEdit\"\n        buttonType=\"primary\"\n        type=\"button\"\n        [disabled]=\"disableEdit\"\n      >\n        {{ \"edit\" | i18n }}\n      </button>\n    </ng-container>\n    <button\n      bitButton\n      type=\"submit\"\n      form=\"cipherForm\"\n      buttonType=\"primary\"\n      #submitBtn\n      [hidden]=\"showCipherView\"\n    >\n      {{ \"save\" | i18n }}\n    </button>\n    <button\n      bitButton\n      type=\"button\"\n      buttonType=\"secondary\"\n      (click)=\"cancel()\"\n      *ngIf=\"!showCipherView\"\n    >\n      {{ \"cancel\" | i18n }}\n    </button>\n    <div class=\"tw-ml-auto\" *ngIf=\"showDelete\">\n      <button\n        bitIconButton=\"bwi-trash\"\n        type=\"button\"\n        buttonType=\"danger\"\n        [appA11yTitle]=\"'delete' | i18n\"\n        [bitAction]=\"delete\"\n        [disabled]=\"!(canDeleteCipher$ | async)\"\n        data-testid=\"delete-cipher-btn\"\n      ></button>\n    </div>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, ElementRef, Inject, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, Observable, Subject, switchMap } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { CipherId, CollectionId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { PremiumUpgradePromptService } from \"@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service\";\nimport { ViewPasswordHistoryService } from \"@bitwarden/common/vault/abstractions/view-password-history.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherData } from \"@bitwarden/common/vault/models/data/cipher.data\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  DialogService,\n  ItemModule,\n  ToastService,\n} from \"@bitwarden/components\";\nimport {\n  CipherAttachmentsComponent,\n  CipherFormConfig,\n  CipherFormGenerationService,\n  CipherFormModule,\n  CipherViewComponent,\n  DecryptionFailureDialogComponent,\n} from \"@bitwarden/vault\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport {\n  AttachmentDialogCloseResult,\n  AttachmentDialogResult,\n  AttachmentsV2Component,\n} from \"../../individual-vault/attachments-v2.component\";\nimport { WebCipherFormGenerationService } from \"../../services/web-cipher-form-generation.service\";\nimport { WebVaultPremiumUpgradePromptService } from \"../../services/web-premium-upgrade-prompt.service\";\nimport { WebViewPasswordHistoryService } from \"../../services/web-view-password-history.service\";\n\nexport type VaultItemDialogMode = \"view\" | \"form\";\n\nexport interface VaultItemDialogParams {\n  /**\n   * The mode of the dialog.\n   * - `view` is for viewing an existing cipher.\n   * - `form` is for editing or creating a new cipher.\n   */\n  mode: VaultItemDialogMode;\n\n  /**\n   * The configuration object for the dialog and form.\n   */\n  formConfig: CipherFormConfig;\n\n  /**\n   * If true, the \"edit\" button will be disabled in the dialog.\n   */\n  disableForm?: boolean;\n\n  /**\n   * The ID of the active collection. This is know the collection filter selected by the user.\n   */\n  activeCollectionId?: CollectionId;\n\n  /**\n   * If true, the dialog is being opened from the admin console.\n   */\n  isAdminConsoleAction?: boolean;\n}\n\nexport enum VaultItemDialogResult {\n  /**\n   * A cipher was saved (created or updated).\n   */\n  Saved = \"saved\",\n\n  /**\n   * A cipher was deleted.\n   */\n  Deleted = \"deleted\",\n\n  /**\n   * The dialog was closed to navigate the user the premium upgrade page.\n   */\n  PremiumUpgrade = \"premiumUpgrade\",\n}\n\n@Component({\n  selector: \"app-vault-item-dialog\",\n  templateUrl: \"vault-item-dialog.component.html\",\n  standalone: true,\n  imports: [\n    ButtonModule,\n    CipherViewComponent,\n    DialogModule,\n    CommonModule,\n    SharedModule,\n    CipherFormModule,\n    CipherAttachmentsComponent,\n    AsyncActionsModule,\n    ItemModule,\n    DecryptionFailureDialogComponent,\n  ],\n  providers: [\n    { provide: PremiumUpgradePromptService, useClass: WebVaultPremiumUpgradePromptService },\n    { provide: ViewPasswordHistoryService, useClass: WebViewPasswordHistoryService },\n    { provide: CipherFormGenerationService, useClass: WebCipherFormGenerationService },\n  ],\n})\nexport class VaultItemDialogComponent implements OnInit, OnDestroy {\n  /**\n   * Reference to the dialog content element. Used to scroll to the top of the dialog when switching modes.\n   * @protected\n   */\n  @ViewChild(\"dialogContent\")\n  protected dialogContent: ElementRef<HTMLElement>;\n\n  /**\n   * Tracks if the cipher was ever modified while the dialog was open. Used to ensure the dialog emits the correct result\n   * in case of closing with the X button or ESC key.\n   * @private\n   */\n  private _cipherModified: boolean = false;\n\n  /**\n   * The original mode of the form when the dialog is first opened.\n   * Used to determine if the form should switch to edit mode after successfully creating a new cipher.\n   * @private\n   */\n  private _originalFormMode = this.params.formConfig.mode;\n\n  /**\n   * Subject to emit when the form is ready to be displayed.\n   * @private\n   */\n  private _formReadySubject = new Subject<void>();\n\n  /**\n   * Tracks if the dialog is performing the initial load. Used to display a spinner while loading.\n   * @private\n   */\n  protected performingInitialLoad: boolean = true;\n\n  /**\n   * The title of the dialog. Updates based on the dialog mode and cipher type.\n   * @protected\n   */\n  protected title: string;\n\n  /**\n   * The current cipher being viewed. Undefined if creating a new cipher.\n   * @protected\n   */\n  protected cipher?: CipherView;\n\n  /**\n   * The organization the current cipher belongs to. Undefined if creating a new cipher.\n   * @protected\n   */\n  protected organization?: Organization;\n\n  /**\n   * The collections the current cipher is assigned to. Undefined if creating a new cipher.\n   * @protected\n   */\n  protected collections?: CollectionView[];\n\n  /**\n   * Flag to indicate if the user has access to attachments via a premium subscription.\n   * @protected\n   */\n  protected canAccessAttachments$ = this.accountService.activeAccount$.pipe(\n    switchMap((account) =>\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n    ),\n  );\n\n  protected get loadingForm() {\n    return this.loadForm && !this.formReady;\n  }\n\n  protected get disableEdit() {\n    return this.params.disableForm;\n  }\n\n  protected get canDelete() {\n    return this.cipher?.edit ?? false;\n  }\n\n  protected get showDelete() {\n    // Don't show the delete button when cloning a cipher\n    if (this.params.mode == \"form\" && this.formConfig.mode === \"clone\") {\n      return false;\n    }\n    // Never show the delete button for new ciphers\n    return this.cipher != null;\n  }\n\n  protected get showCipherView() {\n    return this.cipher != undefined && (this.params.mode === \"view\" || this.loadingForm);\n  }\n\n  /**\n   * Flag to initialize/attach the form component.\n   */\n  protected loadForm = this.params.mode === \"form\";\n\n  /**\n   * Flag to indicate the form is ready to be displayed.\n   */\n  protected formReady = false;\n\n  protected formConfig: CipherFormConfig = this.params.formConfig;\n\n  protected canDeleteCipher$: Observable<boolean>;\n\n  constructor(\n    @Inject(DIALOG_DATA) protected params: VaultItemDialogParams,\n    private dialogRef: DialogRef<VaultItemDialogResult>,\n    private dialogService: DialogService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n    private messagingService: MessagingService,\n    private logService: LogService,\n    private cipherService: CipherService,\n    private accountService: AccountService,\n    private router: Router,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private premiumUpgradeService: PremiumUpgradePromptService,\n    private cipherAuthorizationService: CipherAuthorizationService,\n    private apiService: ApiService,\n    private eventCollectionService: EventCollectionService,\n  ) {\n    this.updateTitle();\n  }\n\n  async ngOnInit() {\n    this.cipher = await this.getDecryptedCipherView(this.formConfig);\n\n    if (this.cipher) {\n      if (this.cipher.decryptionFailure) {\n        this.dialogService.open(DecryptionFailureDialogComponent, {\n          data: { cipherIds: [this.cipher.id] },\n        });\n        this.dialogRef.close();\n        return;\n      }\n\n      this.collections = this.formConfig.collections.filter((c) =>\n        this.cipher.collectionIds?.includes(c.id),\n      );\n      this.organization = this.formConfig.organizations.find(\n        (o) => o.id === this.cipher.organizationId,\n      );\n\n      this.canDeleteCipher$ = this.cipherAuthorizationService.canDeleteCipher$(\n        this.cipher,\n        [this.params.activeCollectionId],\n        this.params.isAdminConsoleAction,\n      );\n\n      await this.eventCollectionService.collect(\n        EventType.Cipher_ClientViewed,\n        this.cipher.id,\n        false,\n        this.cipher.organizationId,\n      );\n    }\n\n    this.performingInitialLoad = false;\n  }\n\n  ngOnDestroy() {\n    // If the cipher was modified, be sure we emit the saved result in case the dialog was closed with the X button or ESC key.\n    if (this._cipherModified) {\n      this.dialogRef.close(VaultItemDialogResult.Saved);\n    }\n  }\n\n  /**\n   * Called by the CipherFormComponent when the cipher is saved successfully.\n   * @param cipherView - The newly saved cipher.\n   */\n  protected async onCipherSaved(cipherView: CipherView) {\n    // We successfully saved the cipher, update the dialog state and switch to view mode.\n    this.cipher = cipherView;\n    this.collections = this.formConfig.collections.filter((c) =>\n      cipherView.collectionIds?.includes(c.id),\n    );\n\n    // If the cipher was newly created (via add/clone), switch the form to edit for subsequent edits.\n    if (this._originalFormMode === \"add\" || this._originalFormMode === \"clone\") {\n      this.formConfig.mode = \"edit\";\n      this.formConfig.initialValues = null;\n    }\n\n    let cipher = await this.cipherService.get(cipherView.id);\n\n    // When the form config is used within the Admin Console, retrieve the cipher from the admin endpoint (if not found in local state)\n    if (this.formConfig.isAdminConsole && (cipher == null || this.formConfig.admin)) {\n      const cipherResponse = await this.apiService.getCipherAdmin(cipherView.id);\n      cipherResponse.edit = true;\n      cipherResponse.viewPassword = true;\n\n      const cipherData = new CipherData(cipherResponse);\n      cipher = new Cipher(cipherData);\n    }\n\n    // Store the updated cipher so any following edits use the most up to date cipher\n    this.formConfig.originalCipher = cipher;\n    this._cipherModified = true;\n    await this.changeMode(\"view\");\n  }\n\n  /**\n   * Called by the CipherFormComponent when the form is ready to be displayed.\n   */\n  protected onFormReady() {\n    this.formReady = true;\n    this._formReadySubject.next();\n  }\n\n  delete = async () => {\n    if (!this.cipher) {\n      return;\n    }\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteItem\" },\n      content: {\n        key: this.cipher.isDeleted ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\",\n      },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      await this.deleteCipher();\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"success\"),\n        message: this.i18nService.t(\n          this.cipher.isDeleted ? \"permanentlyDeletedItem\" : \"deletedItem\",\n        ),\n      });\n      this.messagingService.send(\n        this.cipher.isDeleted ? \"permanentlyDeletedCipher\" : \"deletedCipher\",\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n    this._cipherModified = false;\n    this.dialogRef.close(VaultItemDialogResult.Deleted);\n  };\n\n  openAttachmentsDialog = async () => {\n    const canAccessAttachments = await firstValueFrom(this.canAccessAttachments$);\n\n    if (!canAccessAttachments) {\n      await this.premiumUpgradeService.promptForPremium();\n      return;\n    }\n\n    const dialogRef = this.dialogService.open<AttachmentDialogCloseResult, { cipherId: CipherId }>(\n      AttachmentsV2Component,\n      {\n        data: {\n          cipherId: this.formConfig.originalCipher?.id as CipherId,\n        },\n      },\n    );\n\n    const result = await firstValueFrom(dialogRef.closed);\n\n    if (\n      result.action === AttachmentDialogResult.Removed ||\n      result.action === AttachmentDialogResult.Uploaded\n    ) {\n      this._cipherModified = true;\n    }\n  };\n\n  switchToEdit = async () => {\n    if (!this.cipher) {\n      return;\n    }\n    await this.changeMode(\"form\");\n  };\n\n  cancel = async () => {\n    // We're in View mode, we don't have a cipher, or we were cloning, close the dialog.\n    if (this.params.mode === \"view\" || this.cipher == null || this.formConfig.mode === \"clone\") {\n      this.dialogRef.close(this._cipherModified ? VaultItemDialogResult.Saved : undefined);\n      return;\n    }\n\n    // We're in Form mode, and we have a cipher, switch back to View mode.\n    await this.changeMode(\"view\");\n  };\n\n  private async getDecryptedCipherView(config: CipherFormConfig) {\n    if (config.originalCipher == null) {\n      return;\n    }\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    return await config.originalCipher.decrypt(\n      await this.cipherService.getKeyForCipherKeyDecryption(config.originalCipher, activeUserId),\n    );\n  }\n\n  private updateTitle() {\n    let partOne: string;\n\n    if (this.params.mode === \"view\") {\n      partOne = \"viewItemType\";\n    } else if (this.formConfig.mode === \"edit\" || this.formConfig.mode === \"partial-edit\") {\n      partOne = \"editItemHeader\";\n    } else {\n      partOne = \"newItemHeader\";\n    }\n\n    const type = this.cipher?.type ?? this.formConfig.cipherType ?? CipherType.Login;\n\n    switch (type) {\n      case CipherType.Login:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeLogin\"));\n        break;\n      case CipherType.Card:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeCard\"));\n        break;\n      case CipherType.Identity:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeIdentity\"));\n        break;\n      case CipherType.SecureNote:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"note\"));\n        break;\n      case CipherType.SshKey:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeSshKey\"));\n        break;\n    }\n  }\n\n  /**\n   * Changes the mode of the dialog. When switching to Form mode, the form is initialized first then displayed once ready.\n   * @param mode\n   * @private\n   */\n  private async changeMode(mode: VaultItemDialogMode) {\n    this.formReady = false;\n\n    if (mode == \"form\") {\n      this.loadForm = true;\n      // Wait for the formReadySubject to emit before continuing.\n      // This helps prevent flashing an empty dialog while the form is initializing.\n      await firstValueFrom(this._formReadySubject);\n    } else {\n      this.loadForm = false;\n    }\n\n    this.params.mode = mode;\n    this.updateTitle();\n    // Scroll to the top of the dialog content when switching modes.\n    this.dialogContent.nativeElement.parentElement.scrollTop = 0;\n\n    // Update the URL query params to reflect the new mode.\n    await this.router.navigate([], {\n      queryParams: {\n        action: mode === \"form\" ? \"edit\" : \"view\",\n        itemId: this.cipher?.id,\n      },\n      queryParamsHandling: \"merge\",\n      replaceUrl: true,\n    });\n  }\n\n  /**\n   * Helper method to delete cipher.\n   */\n  private async deleteCipher(): Promise<void> {\n    const cipherIsUnassigned = this.cipher.isUnassigned;\n\n    // Delete the cipher as an admin when:\n    // - The organization allows for owners/admins to manage all collections/items\n    // - The cipher is unassigned\n    const asAdmin = this.organization?.canEditAllCiphers || cipherIsUnassigned;\n\n    if (this.cipher.isDeleted) {\n      await this.cipherService.deleteWithServer(this.cipher.id, asAdmin);\n    } else {\n      await this.cipherService.softDeleteWithServer(this.cipher.id, asAdmin);\n    }\n  }\n\n  /**\n   * Opens the VaultItemDialog.\n   * @param dialogService\n   * @param params\n   */\n  static open(dialogService: DialogService, params: VaultItemDialogParams) {\n    return dialogService.open<VaultItemDialogResult, VaultItemDialogParams>(\n      VaultItemDialogComponent,\n      {\n        data: params,\n      },\n    );\n  }\n}\n","<cdk-virtual-scroll-viewport [itemSize]=\"RowHeight\" scrollWindow class=\"tw-pb-8\">\n  <bit-table [dataSource]=\"dataSource\" layout=\"fixed\">\n    <ng-container header>\n      <tr>\n        <th bitCell class=\"tw-w-24 tw-whitespace-nowrap\" colspan=\"2\">\n          <input\n            class=\"tw-mr-2\"\n            type=\"checkbox\"\n            bitCheckbox\n            id=\"checkAll\"\n            [disabled]=\"disabled || isEmpty\"\n            (change)=\"$event ? toggleAll() : null\"\n            [checked]=\"selection.hasValue() && isAllSelected\"\n          />\n          <label class=\"tw-mb-0 !tw-font-bold !tw-text-muted\" for=\"checkAll\">{{\n            \"all\" | i18n\n          }}</label>\n        </th>\n        <!-- Organization vault -->\n        <th\n          *ngIf=\"showAdminActions\"\n          bitCell\n          bitSortable=\"name\"\n          [fn]=\"sortByName\"\n          [class]=\"showExtraColumn ? 'lg:tw-w-3/5' : 'tw-w-full'\"\n        >\n          {{ \"name\" | i18n }}\n        </th>\n        <!-- Individual vault -->\n        <th\n          *ngIf=\"!showAdminActions\"\n          bitCell\n          [class]=\"showExtraColumn ? 'lg:tw-w-3/5' : 'tw-w-full'\"\n        >\n          {{ \"name\" | i18n }}\n        </th>\n        <th bitCell *ngIf=\"showOwner\" class=\"tw-hidden tw-w-2/5 lg:tw-table-cell\">\n          {{ \"owner\" | i18n }}\n        </th>\n        <th bitCell class=\"tw-w-2/5\" *ngIf=\"showCollections\">{{ \"collections\" | i18n }}</th>\n        <th bitCell bitSortable=\"groups\" [fn]=\"sortByGroups\" class=\"tw-w-2/5\" *ngIf=\"showGroups\">\n          {{ \"groups\" | i18n }}\n        </th>\n        <th\n          bitCell\n          bitSortable=\"permissions\"\n          default=\"desc\"\n          [fn]=\"sortByPermissions\"\n          class=\"tw-w-2/5\"\n          *ngIf=\"showPermissionsColumn\"\n        >\n          {{ \"permission\" | i18n }}\n        </th>\n        <th bitCell class=\"tw-w-12 tw-text-right\">\n          <button\n            [disabled]=\"disabled || isEmpty || disableMenu\"\n            [bitMenuTriggerFor]=\"headerMenu\"\n            [attr.title]=\"disableMenu ? ('missingPermissions' | i18n) : ''\"\n            bitIconButton=\"bwi-ellipsis-v\"\n            size=\"small\"\n            type=\"button\"\n            appA11yTitle=\"{{ 'options' | i18n }}\"\n          ></button>\n          <bit-menu #headerMenu>\n            <button *ngIf=\"bulkMoveAllowed\" type=\"button\" bitMenuItem (click)=\"bulkMoveToFolder()\">\n              <i class=\"bwi bwi-fw bwi-folder\" aria-hidden=\"true\"></i>\n              {{ \"addToFolder\" | i18n }}\n            </button>\n            <button\n              *ngIf=\"showAdminActions && showBulkEditCollectionAccess\"\n              type=\"button\"\n              bitMenuItem\n              (click)=\"bulkEditCollectionAccess()\"\n            >\n              <i class=\"bwi bwi-fw bwi-users\" aria-hidden=\"true\"></i>\n              {{ \"editAccess\" | i18n }}\n            </button>\n            <button\n              *ngIf=\"\n                (showAdminActions || showAssignToCollections()) && bulkAssignToCollectionsAllowed\n              \"\n              type=\"button\"\n              bitMenuItem\n              (click)=\"assignToCollections()\"\n            >\n              <i class=\"bwi bwi-fw bwi-collection\" aria-hidden=\"true\"></i>\n              {{ \"assignToCollections\" | i18n }}\n            </button>\n            <button *ngIf=\"showBulkTrashOptions\" type=\"button\" bitMenuItem (click)=\"bulkRestore()\">\n              <i class=\"bwi bwi-fw bwi-undo\" aria-hidden=\"true\"></i>\n              {{ \"restoreSelected\" | i18n }}\n            </button>\n            <button *ngIf=\"showDelete\" type=\"button\" bitMenuItem (click)=\"bulkDelete()\">\n              <span class=\"tw-text-danger\">\n                <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n                {{ (showBulkTrashOptions ? \"permanentlyDeleteSelected\" : \"delete\") | i18n }}\n              </span>\n            </button>\n          </bit-menu>\n        </th>\n      </tr>\n    </ng-container>\n    <ng-template body let-rows$>\n      <ng-container *cdkVirtualFor=\"let item of rows$; templateCacheSize: 0\">\n        <tr\n          *ngIf=\"item.collection\"\n          bitRow\n          appVaultCollectionRow\n          alignContent=\"middle\"\n          [disabled]=\"disabled\"\n          [collection]=\"item.collection\"\n          [showOwner]=\"showOwner\"\n          [showCollections]=\"showCollections\"\n          [showGroups]=\"showGroups\"\n          [organizations]=\"allOrganizations\"\n          [showPermissionsColumn]=\"showPermissionsColumn\"\n          [groups]=\"allGroups\"\n          [canDeleteCollection]=\"canDeleteCollection(item.collection)\"\n          [canEditCollection]=\"canEditCollection(item.collection)\"\n          [canViewCollectionInfo]=\"canViewCollectionInfo(item.collection)\"\n          [checked]=\"selection.isSelected(item)\"\n          (checkedToggled)=\"selection.toggle(item)\"\n          (onEvent)=\"event($event)\"\n        ></tr>\n        <!--\n          addAccessStatus check here so ciphers do not show if user\n          has filtered for collections with addAccess\n        -->\n        <tr\n          *ngIf=\"item.cipher && (!addAccessToggle || (addAccessToggle && addAccessStatus !== 1))\"\n          bitRow\n          appVaultCipherRow\n          alignContent=\"middle\"\n          [disabled]=\"disabled\"\n          [cipher]=\"item.cipher\"\n          [showOwner]=\"showOwner\"\n          [showCollections]=\"showCollections\"\n          [showGroups]=\"showGroups\"\n          [showPremiumFeatures]=\"showPremiumFeatures\"\n          [useEvents]=\"useEvents\"\n          [viewingOrgVault]=\"viewingOrgVault\"\n          [cloneable]=\"canClone(item)\"\n          [organizations]=\"allOrganizations\"\n          [collections]=\"allCollections\"\n          [checked]=\"selection.isSelected(item)\"\n          [canEditCipher]=\"canEditCipher(item.cipher)\"\n          [canManageCollection]=\"canManageCollection(item.cipher)\"\n          (checkedToggled)=\"selection.toggle(item)\"\n          (onEvent)=\"event($event)\"\n        ></tr>\n      </ng-container>\n    </ng-template>\n  </bit-table>\n</cdk-virtual-scroll-viewport>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { CollectionView, Unassigned, CollectionAdminView } from \"@bitwarden/admin-console/common\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { SortDirection, TableDataSource } from \"@bitwarden/components\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\n\nimport {\n  CollectionPermission,\n  convertToPermission,\n} from \"./../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\nimport { VaultItem } from \"./vault-item\";\nimport { VaultItemEvent } from \"./vault-item-event\";\n\n// Fixed manual row height required due to how cdk-virtual-scroll works\nexport const RowHeight = 75.5;\nexport const RowHeightClass = `tw-h-[75.5px]`;\n\nconst MaxSelectionCount = 500;\n\ntype ItemPermission = CollectionPermission | \"NoAccess\";\n\n@Component({\n  selector: \"app-vault-items\",\n  templateUrl: \"vault-items.component.html\",\n  // TODO: Improve change detection, see: https://bitwarden.atlassian.net/browse/TDL-220\n  // changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaultItemsComponent {\n  protected RowHeight = RowHeight;\n\n  @Input() disabled: boolean;\n  @Input() showOwner: boolean;\n  @Input() showCollections: boolean;\n  @Input() showGroups: boolean;\n  @Input() useEvents: boolean;\n  @Input() showPremiumFeatures: boolean;\n  @Input() showBulkMove: boolean;\n  @Input() showBulkTrashOptions: boolean;\n  // Encompasses functionality only available from the organization vault context\n  @Input() showAdminActions = false;\n  @Input() allOrganizations: Organization[] = [];\n  @Input() allCollections: CollectionView[] = [];\n  @Input() allGroups: GroupView[] = [];\n  @Input() showBulkEditCollectionAccess = false;\n  @Input() showBulkAddToCollections = false;\n  @Input() showPermissionsColumn = false;\n  @Input() viewingOrgVault: boolean;\n  @Input() addAccessStatus: number;\n  @Input() addAccessToggle: boolean;\n  @Input() activeCollection: CollectionView | undefined;\n\n  private _ciphers?: CipherView[] = [];\n  @Input() get ciphers(): CipherView[] {\n    return this._ciphers;\n  }\n  set ciphers(value: CipherView[] | undefined) {\n    this._ciphers = value ?? [];\n    this.refreshItems();\n  }\n\n  private _collections?: CollectionView[] = [];\n  @Input() get collections(): CollectionView[] {\n    return this._collections;\n  }\n  set collections(value: CollectionView[] | undefined) {\n    this._collections = value ?? [];\n    this.refreshItems();\n  }\n\n  @Output() onEvent = new EventEmitter<VaultItemEvent>();\n\n  protected editableItems: VaultItem[] = [];\n  protected dataSource = new TableDataSource<VaultItem>();\n  protected selection = new SelectionModel<VaultItem>(true, [], true);\n\n  get showExtraColumn() {\n    return this.showCollections || this.showGroups || this.showOwner;\n  }\n\n  get isAllSelected() {\n    return this.editableItems\n      .slice(0, MaxSelectionCount)\n      .every((item) => this.selection.isSelected(item));\n  }\n\n  get isEmpty() {\n    return this.dataSource.data.length === 0;\n  }\n\n  get bulkMoveAllowed() {\n    return (\n      this.showBulkMove && this.selection.selected.filter((item) => item.collection).length === 0\n    );\n  }\n\n  get showDelete(): boolean {\n    if (this.selection.selected.length === 0) {\n      return true;\n    }\n\n    const hasPersonalItems = this.hasPersonalItems();\n    const uniqueCipherOrgIds = this.getUniqueOrganizationIds();\n\n    const canManageCollectionCiphers = this.selection.selected\n      .filter((item) => item.cipher)\n      .every(({ cipher }) => this.canManageCollection(cipher));\n\n    const canDeleteCollections = this.selection.selected\n      .filter((item) => item.collection)\n      .every((item) => item.collection && this.canDeleteCollection(item.collection));\n\n    const userCanDeleteAccess = canManageCollectionCiphers && canDeleteCollections;\n\n    if (\n      userCanDeleteAccess ||\n      (hasPersonalItems && (!uniqueCipherOrgIds.size || userCanDeleteAccess))\n    ) {\n      return true;\n    }\n\n    return false;\n  }\n\n  get disableMenu() {\n    return (\n      !this.bulkMoveAllowed &&\n      !this.showAssignToCollections() &&\n      !this.showDelete &&\n      !this.showBulkEditCollectionAccess\n    );\n  }\n\n  get bulkAssignToCollectionsAllowed() {\n    return this.showBulkAddToCollections && this.ciphers.length > 0;\n  }\n\n  protected canEditCollection(collection: CollectionView): boolean {\n    // Only allow allow deletion if collection editing is enabled and not deleting \"Unassigned\"\n    if (collection.id === Unassigned) {\n      return false;\n    }\n\n    const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n\n    return collection.canEdit(organization);\n  }\n\n  protected canDeleteCollection(collection: CollectionView): boolean {\n    // Only allow allow deletion if collection editing is enabled and not deleting \"Unassigned\"\n    if (collection.id === Unassigned) {\n      return false;\n    }\n\n    const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n\n    return collection.canDelete(organization);\n  }\n\n  protected canViewCollectionInfo(collection: CollectionView) {\n    const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n    return collection.canViewCollectionInfo(organization);\n  }\n\n  protected toggleAll() {\n    this.isAllSelected\n      ? this.selection.clear()\n      : this.selection.select(...this.editableItems.slice(0, MaxSelectionCount));\n  }\n\n  protected event(event: VaultItemEvent) {\n    this.onEvent.emit(event);\n  }\n\n  protected bulkMoveToFolder() {\n    this.event({\n      type: \"moveToFolder\",\n      items: this.selection.selected\n        .filter((item) => item.cipher !== undefined)\n        .map((item) => item.cipher),\n    });\n  }\n\n  protected bulkRestore() {\n    this.event({\n      type: \"restore\",\n      items: this.selection.selected\n        .filter((item) => item.cipher !== undefined)\n        .map((item) => item.cipher),\n    });\n  }\n\n  protected bulkDelete() {\n    this.event({\n      type: \"delete\",\n      items: this.selection.selected,\n    });\n  }\n\n  // TODO: PM-13944 Refactor to use cipherAuthorizationService.canClone$ instead\n  protected canClone(vaultItem: VaultItem) {\n    if (vaultItem.cipher.organizationId == null) {\n      return true;\n    }\n\n    const org = this.allOrganizations.find((o) => o.id === vaultItem.cipher.organizationId);\n\n    // Admins and custom users can always clone in the Org Vault\n    if (this.viewingOrgVault && (org.isAdmin || org.permissions.editAnyCollection)) {\n      return true;\n    }\n\n    // Check if the cipher belongs to a collection with canManage permission\n    const orgCollections = this.allCollections.filter((c) => c.organizationId === org.id);\n\n    for (const collection of orgCollections) {\n      if (vaultItem.cipher.collectionIds.includes(collection.id) && collection.manage) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n\n  protected canEditCipher(cipher: CipherView) {\n    if (cipher.organizationId == null) {\n      return true;\n    }\n\n    const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);\n    return (organization.canEditAllCiphers && this.viewingOrgVault) || cipher.edit;\n  }\n\n  protected canManageCollection(cipher: CipherView) {\n    // If the cipher is not part of an organization (personal item), user can manage it\n    if (cipher.organizationId == null) {\n      return true;\n    }\n\n    // Check for admin access in AC vault\n    if (this.showAdminActions) {\n      const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);\n      // If the user is an admin, they can delete an unassigned cipher\n      if (cipher.collectionIds.length === 0) {\n        return organization?.canEditUnmanagedCollections === true;\n      }\n\n      if (\n        organization?.permissions.editAnyCollection ||\n        (organization?.allowAdminAccessToAllCollectionItems && organization.isAdmin)\n      ) {\n        return true;\n      }\n    }\n\n    if (this.activeCollection) {\n      return this.activeCollection.manage === true;\n    }\n\n    return this.allCollections\n      .filter((c) => cipher.collectionIds.includes(c.id))\n      .some((collection) => collection.manage);\n  }\n\n  private refreshItems() {\n    const collections: VaultItem[] = this.collections.map((collection) => ({ collection }));\n    const ciphers: VaultItem[] = this.ciphers.map((cipher) => ({ cipher }));\n    const items: VaultItem[] = [].concat(collections).concat(ciphers);\n\n    this.selection.clear();\n\n    // All ciphers are selectable, collections only if they can be edited or deleted\n    this.editableItems = items.filter(\n      (item) =>\n        item.cipher !== undefined ||\n        (item.collection !== undefined &&\n          (this.canEditCollection(item.collection) || this.canDeleteCollection(item.collection))),\n    );\n\n    this.dataSource.data = items;\n  }\n\n  protected bulkEditCollectionAccess() {\n    this.event({\n      type: \"bulkEditCollectionAccess\",\n      items: this.selection.selected\n        .filter((item) => item.collection !== undefined)\n        .map((item) => item.collection),\n    });\n  }\n\n  protected assignToCollections() {\n    this.event({\n      type: \"assignToCollections\",\n      items: this.selection.selected\n        .filter((item) => item.cipher !== undefined)\n        .map((item) => item.cipher),\n    });\n  }\n\n  protected showAssignToCollections(): boolean {\n    if (!this.showBulkMove) {\n      return false;\n    }\n\n    // When the user doesn't belong to an organization, hide assign to collections\n    if (this.allOrganizations.length === 0) {\n      return false;\n    }\n\n    if (this.selection.selected.length === 0) {\n      return true;\n    }\n\n    const hasPersonalItems = this.hasPersonalItems();\n    const uniqueCipherOrgIds = this.getUniqueOrganizationIds();\n\n    // Return false if items are from different organizations\n    if (uniqueCipherOrgIds.size > 1) {\n      return false;\n    }\n\n    // If all items are personal, return based on personal items\n    if (uniqueCipherOrgIds.size === 0) {\n      return hasPersonalItems;\n    }\n\n    const [orgId] = uniqueCipherOrgIds;\n    const organization = this.allOrganizations.find((o) => o.id === orgId);\n\n    const canEditOrManageAllCiphers = organization?.canEditAllCiphers && this.viewingOrgVault;\n\n    const collectionNotSelected =\n      this.selection.selected.filter((item) => item.collection).length === 0;\n\n    return (canEditOrManageAllCiphers || this.allCiphersHaveEditAccess()) && collectionNotSelected;\n  }\n\n  /**\n   * Sorts VaultItems, grouping collections before ciphers, and sorting each group alphabetically by name.\n   */\n  protected sortByName = (a: VaultItem, b: VaultItem, direction: SortDirection) => {\n    // Collections before ciphers\n    const collectionCompare = this.prioritizeCollections(a, b, direction);\n    if (collectionCompare !== 0) {\n      return collectionCompare;\n    }\n\n    return this.compareNames(a, b);\n  };\n\n  /**\n   * Sorts VaultItems based on group names\n   */\n  protected sortByGroups = (a: VaultItem, b: VaultItem, direction: SortDirection) => {\n    if (\n      !(a.collection instanceof CollectionAdminView) &&\n      !(b.collection instanceof CollectionAdminView)\n    ) {\n      return 0;\n    }\n\n    const getFirstGroupName = (collection: CollectionAdminView): string => {\n      if (collection.groups.length > 0) {\n        return collection.groups.map((group) => this.getGroupName(group.id) || \"\").sort()[0];\n      }\n      return null;\n    };\n\n    // Collections before ciphers\n    const collectionCompare = this.prioritizeCollections(a, b, direction);\n    if (collectionCompare !== 0) {\n      return collectionCompare;\n    }\n\n    const aGroupName = getFirstGroupName(a.collection as CollectionAdminView);\n    const bGroupName = getFirstGroupName(b.collection as CollectionAdminView);\n\n    // Collections with groups come before collections without groups.\n    // If a collection has no groups, getFirstGroupName returns null.\n    if (aGroupName === null) {\n      return 1;\n    }\n\n    if (bGroupName === null) {\n      return -1;\n    }\n\n    return aGroupName.localeCompare(bGroupName);\n  };\n\n  /**\n   * Sorts VaultItems based on their permissions, with higher permissions taking precedence.\n   * If permissions are equal, it falls back to sorting by name.\n   */\n  protected sortByPermissions = (a: VaultItem, b: VaultItem, direction: SortDirection) => {\n    const getPermissionPriority = (item: VaultItem): number => {\n      const permission = item.collection\n        ? this.getCollectionPermission(item.collection)\n        : this.getCipherPermission(item.cipher);\n\n      const priorityMap = {\n        [CollectionPermission.Manage]: 5,\n        [CollectionPermission.Edit]: 4,\n        [CollectionPermission.EditExceptPass]: 3,\n        [CollectionPermission.View]: 2,\n        [CollectionPermission.ViewExceptPass]: 1,\n        NoAccess: 0,\n      };\n\n      return priorityMap[permission] ?? -1;\n    };\n\n    // Collections before ciphers\n    const collectionCompare = this.prioritizeCollections(a, b, direction);\n    if (collectionCompare !== 0) {\n      return collectionCompare;\n    }\n\n    const priorityA = getPermissionPriority(a);\n    const priorityB = getPermissionPriority(b);\n\n    // Higher priority first\n    if (priorityA !== priorityB) {\n      return priorityA - priorityB;\n    }\n\n    return this.compareNames(a, b);\n  };\n\n  private compareNames(a: VaultItem, b: VaultItem): number {\n    const getName = (item: VaultItem) => item.collection?.name || item.cipher?.name;\n    return getName(a).localeCompare(getName(b));\n  }\n\n  /**\n   * Sorts VaultItems by prioritizing collections over ciphers.\n   * Collections are always placed before ciphers, regardless of the sorting direction.\n   */\n  private prioritizeCollections(a: VaultItem, b: VaultItem, direction: SortDirection): number {\n    if (a.collection && !b.collection) {\n      return direction === \"asc\" ? -1 : 1;\n    }\n\n    if (!a.collection && b.collection) {\n      return direction === \"asc\" ? 1 : -1;\n    }\n\n    return 0;\n  }\n\n  private hasPersonalItems(): boolean {\n    return this.selection.selected.some(({ cipher }) => cipher?.organizationId === null);\n  }\n\n  private allCiphersHaveEditAccess(): boolean {\n    return this.selection.selected\n      .filter(({ cipher }) => cipher)\n      .every(({ cipher }) => cipher?.edit);\n  }\n\n  private getUniqueOrganizationIds(): Set<string> {\n    return new Set(this.selection.selected.flatMap((i) => i.cipher?.organizationId ?? []));\n  }\n\n  private getGroupName(groupId: string): string | undefined {\n    return this.allGroups.find((g) => g.id === groupId)?.name;\n  }\n\n  private getCollectionPermission(collection: CollectionView): ItemPermission {\n    const organization = this.allOrganizations.find((o) => o.id === collection.organizationId);\n\n    if (collection.id == Unassigned && organization?.canEditUnassignedCiphers) {\n      return CollectionPermission.Edit;\n    }\n\n    if (collection.assigned) {\n      return convertToPermission(collection);\n    }\n\n    return \"NoAccess\";\n  }\n\n  private getCipherPermission(cipher: CipherView): ItemPermission {\n    if (!cipher.organizationId || cipher.collectionIds.length === 0) {\n      return CollectionPermission.Manage;\n    }\n\n    const filteredCollections = this.allCollections?.filter((collection) => {\n      if (collection.assigned) {\n        return cipher.collectionIds.find((id) => {\n          if (collection.id === id) {\n            return collection;\n          }\n        });\n      }\n    });\n\n    if (filteredCollections?.length === 1) {\n      return convertToPermission(filteredCollections[0]);\n    }\n\n    if (filteredCollections?.length > 0) {\n      const permissions = filteredCollections.map((collection) => convertToPermission(collection));\n\n      const orderedPermissions = [\n        CollectionPermission.Manage,\n        CollectionPermission.Edit,\n        CollectionPermission.EditExceptPass,\n        CollectionPermission.View,\n        CollectionPermission.ViewExceptPass,\n      ];\n\n      return orderedPermissions.find((perm) => permissions.includes(perm));\n    }\n\n    return \"NoAccess\";\n  }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\n\n@Pipe({\n  name: \"collectionNameFromId\",\n  pure: true,\n})\nexport class GetCollectionNameFromIdPipe implements PipeTransform {\n  transform(value: string, collections: CollectionView[]) {\n    return collections.find((o) => o.id === value)?.name;\n  }\n}\n","<ng-container *ngFor=\"let c of shownCollections\">\n  <span bitBadge variant=\"secondary\">{{ c | collectionNameFromId: collections }}</span>\n</ng-container>\n<ng-container *ngIf=\"showXMore\">\n  <span bitBadge variant=\"secondary\">+ {{ xMoreCount }} more</span>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\n\n@Component({\n  selector: \"app-collection-badge\",\n  templateUrl: \"collection-name-badge.component.html\",\n})\nexport class CollectionNameBadgeComponent {\n  @Input() collectionIds: string[];\n  @Input() collections: CollectionView[];\n\n  get shownCollections(): string[] {\n    return this.showXMore ? this.collectionIds.slice(0, 2) : this.collectionIds;\n  }\n\n  get showXMore(): boolean {\n    return this.collectionIds.length > 3;\n  }\n\n  get xMoreCount(): number {\n    return this.collectionIds.length - 2;\n  }\n}\n","<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-min-w-fit\">\n  <input\n    *ngIf=\"showCheckbox\"\n    type=\"checkbox\"\n    bitCheckbox\n    appStopProp\n    [disabled]=\"disabled || cipher.decryptionFailure\"\n    [checked]=\"checked\"\n    (change)=\"$event ? this.checkedToggled.next() : null\"\n    [attr.aria-label]=\"'vaultItemSelect' | i18n\"\n  />\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-min-w-fit\">\n  <app-vault-icon [cipher]=\"cipher\"></app-vault-icon>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-truncate\">\n  <div class=\"tw-inline-flex tw-w-full\">\n    <button\n      bitLink\n      class=\"tw-overflow-hidden tw-text-ellipsis tw-text-start tw-leading-snug\"\n      [disabled]=\"disabled\"\n      [routerLink]=\"[]\"\n      [queryParams]=\"{ itemId: cipher.id, action: clickAction }\"\n      queryParamsHandling=\"merge\"\n      [replaceUrl]=\"extensionRefreshEnabled\"\n      title=\"{{ 'editItemWithName' | i18n: cipher.name }}\"\n      type=\"button\"\n      appStopProp\n      aria-haspopup=\"true\"\n    >\n      {{ cipher.name }}\n    </button>\n    <ng-container *ngIf=\"cipher.hasAttachments\">\n      <i\n        class=\"bwi bwi-paperclip tw-ml-2 tw-leading-normal\"\n        appStopProp\n        title=\"{{ 'attachments' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n      <ng-container *ngIf=\"showFixOldAttachments\">\n        <i\n          class=\"bwi bwi-exclamation-triangle tw-ml-2 tw-leading-normal tw-text-warning\"\n          appStopProp\n          title=\"{{ 'attachmentsNeedFix' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"attachmentsNeedFix\" | i18n }}</span>\n      </ng-container>\n    </ng-container>\n  </div>\n  <br />\n  <span class=\"tw-text-sm tw-text-muted\" appStopProp>{{ cipher.subTitle }}</span>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showOwner\" class=\"tw-hidden lg:tw-table-cell\">\n  <app-org-badge\n    [disabled]=\"disabled\"\n    [organizationId]=\"cipher.organizationId\"\n    [organizationName]=\"cipher.organizationId | orgNameFromId: organizations\"\n    appStopProp\n  >\n  </app-org-badge>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showCollections\">\n  <app-collection-badge\n    *ngIf=\"cipher.collectionIds\"\n    [collectionIds]=\"cipher.collectionIds\"\n    [collections]=\"collections\"\n  ></app-collection-badge>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showGroups\"></td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"viewingOrgVault\">\n  <p class=\"tw-mb-0 tw-text-muted\">\n    {{ permissionText }}\n  </p>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-text-right\">\n  <button\n    *ngIf=\"cipher.decryptionFailure\"\n    [disabled]=\"disabled || !canManageCollection\"\n    [bitMenuTriggerFor]=\"corruptedCipherOptions\"\n    size=\"small\"\n    bitIconButton=\"bwi-ellipsis-v\"\n    type=\"button\"\n    appA11yTitle=\"{{ 'options' | i18n }}\"\n    appStopProp\n  ></button>\n  <bit-menu #corruptedCipherOptions>\n    <button bitMenuItem *ngIf=\"canManageCollection\" (click)=\"deleteCipher()\" type=\"button\">\n      <span class=\"tw-text-danger\">\n        <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n        {{ (cipher.isDeleted ? \"permanentlyDelete\" : \"delete\") | i18n }}\n      </span>\n    </button>\n  </bit-menu>\n  <button\n    *ngIf=\"!cipher.decryptionFailure\"\n    [disabled]=\"disabled || disableMenu\"\n    [bitMenuTriggerFor]=\"cipherOptions\"\n    size=\"small\"\n    bitIconButton=\"bwi-ellipsis-v\"\n    type=\"button\"\n    appA11yTitle=\"{{ (disableMenu ? 'missingPermissions' : 'options') | i18n }}\"\n    appStopProp\n  ></button>\n  <bit-menu #cipherOptions>\n    <ng-container *ngIf=\"isNotDeletedLoginCipher\">\n      <button bitMenuItem type=\"button\" (click)=\"copy('username')\">\n        <i class=\"bwi bwi-fw bwi-clone\" aria-hidden=\"true\"></i>\n        {{ \"copyUsername\" | i18n }}\n      </button>\n      <button bitMenuItem type=\"button\" (click)=\"copy('password')\" *ngIf=\"cipher.viewPassword\">\n        <i class=\"bwi bwi-fw bwi-clone\" aria-hidden=\"true\"></i>\n        {{ \"copyPassword\" | i18n }}\n      </button>\n      <button bitMenuItem type=\"button\" (click)=\"copy('totp')\" *ngIf=\"showTotpCopyButton\">\n        <i class=\"bwi bwi-fw bwi-clone\" aria-hidden=\"true\"></i>\n        {{ \"copyVerificationCode\" | i18n }}\n      </button>\n      <a\n        bitMenuItem\n        *ngIf=\"cipher.login.canLaunch\"\n        type=\"button\"\n        [href]=\"cipher.login.launchUri\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n      >\n        <i class=\"bwi bwi-fw bwi-share-square\" aria-hidden=\"true\"></i>\n        {{ \"launch\" | i18n }}\n      </a>\n    </ng-container>\n\n    <button bitMenuItem *ngIf=\"showAttachments\" type=\"button\" (click)=\"attachments()\">\n      <i class=\"bwi bwi-fw bwi-paperclip\" aria-hidden=\"true\"></i>\n      {{ \"attachments\" | i18n }}\n    </button>\n    <button bitMenuItem *ngIf=\"showClone\" type=\"button\" (click)=\"clone()\">\n      <i class=\"bwi bwi-fw bwi-files\" aria-hidden=\"true\"></i>\n      {{ \"clone\" | i18n }}\n    </button>\n    <button\n      bitMenuItem\n      *ngIf=\"showAssignToCollections\"\n      type=\"button\"\n      (click)=\"assignToCollections()\"\n    >\n      <i class=\"bwi bwi-fw bwi-collection\" aria-hidden=\"true\"></i>\n      {{ \"assignToCollections\" | i18n }}\n    </button>\n    <button bitMenuItem *ngIf=\"showEventLogs\" type=\"button\" (click)=\"events()\">\n      <i class=\"bwi bwi-fw bwi-file-text\" aria-hidden=\"true\"></i>\n      {{ \"eventLogs\" | i18n }}\n    </button>\n    <button bitMenuItem (click)=\"restore()\" type=\"button\" *ngIf=\"cipher.isDeleted\">\n      <i class=\"bwi bwi-fw bwi-undo\" aria-hidden=\"true\"></i>\n      {{ \"restore\" | i18n }}\n    </button>\n    <button bitMenuItem *ngIf=\"canManageCollection\" (click)=\"deleteCipher()\" type=\"button\">\n      <span class=\"tw-text-danger\">\n        <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n        {{ (cipher.isDeleted ? \"permanentlyDelete\" : \"delete\") | i18n }}\n      </span>\n    </button>\n  </bit-menu>\n</td>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport {\n  convertToPermission,\n  getPermissionList,\n} from \"./../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\nimport { VaultItemEvent } from \"./vault-item-event\";\nimport { RowHeightClass } from \"./vault-items.component\";\n\n@Component({\n  selector: \"tr[appVaultCipherRow]\",\n  templateUrl: \"vault-cipher-row.component.html\",\n})\nexport class VaultCipherRowComponent implements OnInit {\n  protected RowHeightClass = RowHeightClass;\n\n  /**\n   * Flag to determine if the extension refresh feature flag is enabled.\n   */\n  protected extensionRefreshEnabled = false;\n\n  @Input() disabled: boolean;\n  @Input() cipher: CipherView;\n  @Input() showOwner: boolean;\n  @Input() showCollections: boolean;\n  @Input() showGroups: boolean;\n  @Input() showPremiumFeatures: boolean;\n  @Input() useEvents: boolean;\n  @Input() cloneable: boolean;\n  @Input() organizations: Organization[];\n  @Input() collections: CollectionView[];\n  @Input() viewingOrgVault: boolean;\n  @Input() canEditCipher: boolean;\n  @Input() canManageCollection: boolean;\n\n  @Output() onEvent = new EventEmitter<VaultItemEvent>();\n\n  @Input() checked: boolean;\n  @Output() checkedToggled = new EventEmitter<void>();\n\n  protected CipherType = CipherType;\n  private permissionList = getPermissionList();\n  private permissionPriority = [\n    \"canManage\",\n    \"canEdit\",\n    \"canEditExceptPass\",\n    \"canView\",\n    \"canViewExceptPass\",\n  ];\n  protected organization?: Organization;\n\n  constructor(\n    private configService: ConfigService,\n    private i18nService: I18nService,\n  ) {}\n\n  /**\n   * Lifecycle hook for component initialization.\n   * Checks if the extension refresh feature flag is enabled to provide to template.\n   */\n  async ngOnInit(): Promise<void> {\n    this.extensionRefreshEnabled = await firstValueFrom(\n      this.configService.getFeatureFlag$(FeatureFlag.ExtensionRefresh),\n    );\n    if (this.cipher.organizationId != null) {\n      this.organization = this.organizations.find((o) => o.id === this.cipher.organizationId);\n    }\n  }\n\n  protected get clickAction() {\n    if (this.cipher.decryptionFailure) {\n      return \"showFailedToDecrypt\";\n    }\n    return this.extensionRefreshEnabled ? \"view\" : null;\n  }\n\n  protected get showTotpCopyButton() {\n    return (\n      (this.cipher.login?.hasTotp ?? false) &&\n      (this.cipher.organizationUseTotp || this.showPremiumFeatures)\n    );\n  }\n\n  protected get showFixOldAttachments() {\n    return this.cipher.hasOldAttachments && this.cipher.organizationId == null;\n  }\n\n  protected get showAttachments() {\n    return this.canEditCipher || this.cipher.attachments?.length > 0;\n  }\n\n  protected get showAssignToCollections() {\n    return this.organizations?.length && this.canEditCipher && !this.cipher.isDeleted;\n  }\n\n  protected get showClone() {\n    return this.cloneable && !this.cipher.isDeleted;\n  }\n\n  protected get showEventLogs() {\n    return this.useEvents && this.cipher.organizationId;\n  }\n\n  protected get isNotDeletedLoginCipher() {\n    return this.cipher.type === this.CipherType.Login && !this.cipher.isDeleted;\n  }\n\n  protected get permissionText() {\n    if (!this.cipher.organizationId || this.cipher.collectionIds.length === 0) {\n      return this.i18nService.t(\"canManage\");\n    }\n\n    const filteredCollections = this.collections.filter((collection) => {\n      if (collection.assigned) {\n        return this.cipher.collectionIds.find((id) => {\n          if (collection.id === id) {\n            return collection;\n          }\n        });\n      }\n    });\n\n    if (filteredCollections?.length === 1) {\n      return this.i18nService.t(\n        this.permissionList.find((p) => p.perm === convertToPermission(filteredCollections[0]))\n          ?.labelId,\n      );\n    }\n\n    if (filteredCollections?.length > 1) {\n      const labels = filteredCollections.map((collection) => {\n        return this.permissionList.find((p) => p.perm === convertToPermission(collection))?.labelId;\n      });\n\n      const highestPerm = this.permissionPriority.find((perm) => labels.includes(perm));\n      return this.i18nService.t(highestPerm);\n    }\n\n    return this.i18nService.t(\"noAccess\");\n  }\n\n  protected get showCopyPassword(): boolean {\n    return this.isNotDeletedLoginCipher && this.cipher.viewPassword;\n  }\n\n  protected get showCopyTotp(): boolean {\n    return this.isNotDeletedLoginCipher && this.showTotpCopyButton;\n  }\n\n  protected get showLaunchUri(): boolean {\n    return this.isNotDeletedLoginCipher && this.cipher.login.canLaunch;\n  }\n\n  protected get disableMenu() {\n    return !(\n      this.isNotDeletedLoginCipher ||\n      this.showCopyPassword ||\n      this.showCopyTotp ||\n      this.showLaunchUri ||\n      this.showAttachments ||\n      this.showClone ||\n      this.canEditCipher ||\n      this.cipher.isDeleted\n    );\n  }\n\n  protected copy(field: \"username\" | \"password\" | \"totp\") {\n    this.onEvent.emit({ type: \"copyField\", item: this.cipher, field });\n  }\n\n  protected clone() {\n    this.onEvent.emit({ type: \"clone\", item: this.cipher });\n  }\n\n  protected events() {\n    this.onEvent.emit({ type: \"viewEvents\", item: this.cipher });\n  }\n\n  protected restore() {\n    this.onEvent.emit({ type: \"restore\", items: [this.cipher] });\n  }\n\n  protected deleteCipher() {\n    this.onEvent.emit({ type: \"delete\", items: [{ cipher: this.cipher }] });\n  }\n\n  protected attachments() {\n    this.onEvent.emit({ type: \"viewAttachments\", item: this.cipher });\n  }\n\n  protected assignToCollections() {\n    this.onEvent.emit({ type: \"assignToCollections\", items: [this.cipher] });\n  }\n\n  protected get showCheckbox() {\n    if (!this.viewingOrgVault || !this.organization) {\n      return true; // Always show checkbox in individual vault or for non-org items\n    }\n\n    return this.organization.canEditAllCiphers || this.cipher.edit;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnChanges } from \"@angular/core\";\n\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\n\n@Component({\n  selector: \"app-group-badge\",\n  templateUrl: \"group-name-badge.component.html\",\n})\nexport class GroupNameBadgeComponent implements OnChanges {\n  @Input() selectedGroups: SelectionReadOnlyRequest[];\n  @Input() allGroups: GroupView[];\n\n  protected groupNames: string[] = [];\n\n  constructor(private i18nService: I18nService) {}\n\n  ngOnChanges() {\n    this.groupNames = this.selectedGroups\n      .map((g) => {\n        return this.allGroups.find((o) => o.id === g.id)?.name;\n      })\n      .sort(this.i18nService.collator.compare);\n  }\n}\n","<bit-badge-list [items]=\"groupNames\" [maxItems]=\"3\" variant=\"secondary\"></bit-badge-list>\n","<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-min-w-fit\">\n  <input\n    type=\"checkbox\"\n    bitCheckbox\n    appStopProp\n    *ngIf=\"showCheckbox\"\n    [disabled]=\"disabled\"\n    [checked]=\"checked\"\n    (change)=\"$event ? this.checkedToggled.next() : null\"\n    [attr.aria-label]=\"'collectionItemSelect' | i18n\"\n  />\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-min-w-fit\">\n  <div class=\"icon\" aria-hidden=\"true\">\n    <i class=\"bwi bwi-fw bwi-lg bwi-collection\"></i>\n  </div>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\">\n  <button\n    bitLink\n    [disabled]=\"disabled\"\n    type=\"button\"\n    class=\"tw-flex tw-w-full tw-text-start tw-leading-snug\"\n    linkType=\"secondary\"\n    title=\"{{ 'viewCollectionWithName' | i18n: collection.name }}\"\n    [routerLink]=\"[]\"\n    [queryParams]=\"{ collectionId: collection.id }\"\n    queryParamsHandling=\"merge\"\n    appStopProp\n  >\n    <span class=\"tw-truncate tw-mr-1\">{{ collection.name }}</span>\n    <div>\n      <span *ngIf=\"showAddAccess\" bitBadge variant=\"warning\">{{ \"addAccess\" | i18n }}</span>\n    </div>\n  </button>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showOwner\" class=\"tw-hidden lg:tw-table-cell\">\n  <app-org-badge\n    [disabled]=\"disabled\"\n    [organizationId]=\"collection.organizationId\"\n    [organizationName]=\"collection.organizationId | orgNameFromId: organizations\"\n    appStopProp\n  >\n  </app-org-badge>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showCollections\"></td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showGroups\">\n  <app-group-badge\n    *ngIf=\"collectionGroups\"\n    [selectedGroups]=\"collectionGroups\"\n    [allGroups]=\"groups\"\n  ></app-group-badge>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" *ngIf=\"showPermissionsColumn\">\n  <p class=\"tw-mb-0 tw-text-muted\" [title]=\"permissionTooltip\">\n    {{ permissionText }}\n  </p>\n</td>\n<td bitCell [ngClass]=\"RowHeightClass\" class=\"tw-text-right\">\n  <button\n    *ngIf=\"canEditCollection || canDeleteCollection || canViewCollectionInfo\"\n    [disabled]=\"disabled\"\n    [bitMenuTriggerFor]=\"collectionOptions\"\n    size=\"small\"\n    bitIconButton=\"bwi-ellipsis-v\"\n    type=\"button\"\n    appA11yTitle=\"{{ 'options' | i18n }}\"\n    appStopProp\n  ></button>\n  <bit-menu #collectionOptions>\n    <ng-container *ngIf=\"canEditCollection\">\n      <button type=\"button\" bitMenuItem (click)=\"edit(false)\">\n        <i class=\"bwi bwi-fw bwi-pencil-square\" aria-hidden=\"true\"></i>\n        {{ \"editInfo\" | i18n }}\n      </button>\n      <button type=\"button\" bitMenuItem (click)=\"access(false)\">\n        <i class=\"bwi bwi-fw bwi-users\" aria-hidden=\"true\"></i>\n        {{ \"editAccess\" | i18n }}\n      </button>\n    </ng-container>\n    <ng-container *ngIf=\"!canEditCollection && canViewCollectionInfo\">\n      <button type=\"button\" bitMenuItem (click)=\"edit(true)\">\n        <i class=\"bwi bwi-fw bwi-pencil-square\" aria-hidden=\"true\"></i>\n        {{ \"viewInfo\" | i18n }}\n      </button>\n      <button type=\"button\" bitMenuItem (click)=\"access(true)\">\n        <i class=\"bwi bwi-fw bwi-users\" aria-hidden=\"true\"></i>\n        {{ \"viewAccess\" | i18n }}\n      </button>\n    </ng-container>\n    <button *ngIf=\"canDeleteCollection\" type=\"button\" bitMenuItem (click)=\"deleteCollection()\">\n      <span class=\"tw-text-danger\">\n        <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n        {{ \"delete\" | i18n }}\n      </span>\n    </button>\n  </bit-menu>\n</td>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { CollectionAdminView, Unassigned, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { GroupView } from \"../../../admin-console/organizations/core\";\n\nimport {\n  convertToPermission,\n  getPermissionList,\n} from \"./../../../admin-console/organizations/shared/components/access-selector/access-selector.models\";\nimport { VaultItemEvent } from \"./vault-item-event\";\nimport { RowHeightClass } from \"./vault-items.component\";\n\n@Component({\n  selector: \"tr[appVaultCollectionRow]\",\n  templateUrl: \"vault-collection-row.component.html\",\n})\nexport class VaultCollectionRowComponent {\n  protected RowHeightClass = RowHeightClass;\n  protected Unassigned = \"unassigned\";\n\n  @Input() disabled: boolean;\n  @Input() collection: CollectionView;\n  @Input() showOwner: boolean;\n  @Input() showCollections: boolean;\n  @Input() showGroups: boolean;\n  @Input() canEditCollection: boolean;\n  @Input() canDeleteCollection: boolean;\n  @Input() canViewCollectionInfo: boolean;\n  @Input() organizations: Organization[];\n  @Input() groups: GroupView[];\n  @Input() showPermissionsColumn: boolean;\n\n  @Output() onEvent = new EventEmitter<VaultItemEvent>();\n\n  @Input() checked: boolean;\n  @Output() checkedToggled = new EventEmitter<void>();\n\n  constructor(private i18nService: I18nService) {}\n\n  get collectionGroups() {\n    if (!(this.collection instanceof CollectionAdminView)) {\n      return [];\n    }\n\n    return this.collection.groups;\n  }\n\n  get organization() {\n    return this.organizations.find((o) => o.id === this.collection.organizationId);\n  }\n\n  get showAddAccess() {\n    if (this.collection.id == Unassigned) {\n      return false;\n    }\n\n    // Only show AddAccess when viewing the Org vault (implied by CollectionAdminView)\n    if (this.collection instanceof CollectionAdminView) {\n      // Only show AddAccess if unmanaged and allowAdminAccessToAllCollectionItems is disabled\n      return (\n        !this.organization?.allowAdminAccessToAllCollectionItems &&\n        this.collection.unmanaged &&\n        this.organization?.canEditUnmanagedCollections\n      );\n    }\n\n    return false;\n  }\n\n  get permissionText() {\n    if (this.collection.id == Unassigned && this.organization?.canEditUnassignedCiphers) {\n      return this.i18nService.t(\"canEdit\");\n    }\n    if ((this.collection as CollectionAdminView).assigned) {\n      const permissionList = getPermissionList();\n      return this.i18nService.t(\n        permissionList.find((p) => p.perm === convertToPermission(this.collection))?.labelId,\n      );\n    }\n    return this.i18nService.t(\"noAccess\");\n  }\n\n  get permissionTooltip() {\n    if (this.collection.id == Unassigned) {\n      return this.i18nService.t(\"collectionAdminConsoleManaged\");\n    }\n    return \"\";\n  }\n\n  protected edit(readonly: boolean) {\n    this.onEvent.next({ type: \"editCollection\", item: this.collection, readonly: readonly });\n  }\n\n  protected access(readonly: boolean) {\n    this.onEvent.next({ type: \"viewCollectionAccess\", item: this.collection, readonly: readonly });\n  }\n\n  protected deleteCollection() {\n    this.onEvent.next({ type: \"delete\", items: [{ collection: this.collection }] });\n  }\n\n  protected get showCheckbox() {\n    if (this.collection?.id === Unassigned) {\n      return false; // Never show checkbox for Unassigned\n    }\n\n    return this.canEditCollection || this.canDeleteCollection;\n  }\n}\n","import { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { TableModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { OrganizationBadgeModule } from \"../../individual-vault/organization-badge/organization-badge.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\nimport { CollectionBadgeModule } from \"../../org-vault/collection-badge/collection-badge.module\";\nimport { GroupBadgeModule } from \"../../org-vault/group-badge/group-badge.module\";\n\nimport { VaultCipherRowComponent } from \"./vault-cipher-row.component\";\nimport { VaultCollectionRowComponent } from \"./vault-collection-row.component\";\nimport { VaultItemsComponent } from \"./vault-items.component\";\n\n@NgModule({\n  imports: [\n    CommonModule,\n    RouterModule,\n    ScrollingModule,\n    SharedModule,\n    TableModule,\n    OrganizationBadgeModule,\n    CollectionBadgeModule,\n    GroupBadgeModule,\n    PipesModule,\n  ],\n  declarations: [VaultItemsComponent, VaultCipherRowComponent, VaultCollectionRowComponent],\n  exports: [VaultItemsComponent],\n})\nexport class VaultItemsModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CdkDragDrop, moveItemInArray } from \"@angular/cdk/drag-drop\";\nimport { Directive, Input, OnChanges, SimpleChanges } from \"@angular/core\";\n\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { FieldType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\n\n@Directive()\nexport class AddEditCustomFieldsComponent implements OnChanges {\n  @Input() cipher: CipherView;\n  @Input() thisCipherType: CipherType;\n  @Input() editMode: boolean;\n\n  addFieldType: FieldType = FieldType.Text;\n  addFieldTypeOptions: any[];\n  addFieldLinkedTypeOption: any;\n  linkedFieldOptions: any[] = [];\n\n  cipherType = CipherType;\n  fieldType = FieldType;\n  eventType = EventType;\n\n  constructor(\n    private i18nService: I18nService,\n    private eventCollectionService: EventCollectionService,\n  ) {\n    this.addFieldTypeOptions = [\n      { name: i18nService.t(\"cfTypeText\"), value: FieldType.Text },\n      { name: i18nService.t(\"cfTypeHidden\"), value: FieldType.Hidden },\n      { name: i18nService.t(\"cfTypeBoolean\"), value: FieldType.Boolean },\n    ];\n    this.addFieldLinkedTypeOption = {\n      name: this.i18nService.t(\"cfTypeLinked\"),\n      value: FieldType.Linked,\n    };\n  }\n\n  ngOnChanges(changes: SimpleChanges) {\n    if (changes.thisCipherType != null) {\n      this.setLinkedFieldOptions();\n\n      if (!changes.thisCipherType.firstChange) {\n        this.resetCipherLinkedFields();\n      }\n    }\n  }\n\n  addField() {\n    if (this.cipher.fields == null) {\n      this.cipher.fields = [];\n    }\n\n    const f = new FieldView();\n    f.type = this.addFieldType;\n    f.newField = true;\n\n    if (f.type === FieldType.Linked) {\n      f.linkedId = this.linkedFieldOptions[0].value;\n    }\n\n    this.cipher.fields.push(f);\n  }\n\n  removeField(field: FieldView) {\n    const i = this.cipher.fields.indexOf(field);\n    if (i > -1) {\n      this.cipher.fields.splice(i, 1);\n    }\n  }\n\n  toggleFieldValue(field: FieldView) {\n    const f = field as any;\n    f.showValue = !f.showValue;\n    if (this.editMode && f.showValue) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.eventCollectionService.collect(\n        EventType.Cipher_ClientToggledHiddenFieldVisible,\n        this.cipher.id,\n      );\n    }\n  }\n\n  trackByFunction(index: number, item: any) {\n    return index;\n  }\n\n  drop(event: CdkDragDrop<string[]>) {\n    moveItemInArray(this.cipher.fields, event.previousIndex, event.currentIndex);\n  }\n\n  private setLinkedFieldOptions() {\n    if (this.cipher.linkedFieldOptions == null) {\n      return;\n    }\n\n    const options: any = [];\n    this.cipher.linkedFieldOptions.forEach((linkedFieldOption, id) =>\n      options.push({ name: this.i18nService.t(linkedFieldOption.i18nKey), value: id }),\n    );\n    this.linkedFieldOptions = options.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n  }\n\n  private resetCipherLinkedFields() {\n    if (this.cipher.fields == null || this.cipher.fields.length === 0) {\n      return;\n    }\n\n    // Delete any Linked custom fields if the item type does not support them\n    if (this.cipher.linkedFieldOptions == null) {\n      this.cipher.fields = this.cipher.fields.filter((f) => f.type !== FieldType.Linked);\n      return;\n    }\n\n    this.cipher.fields\n      .filter((f) => f.type === FieldType.Linked)\n      .forEach((f) => (f.linkedId = this.linkedFieldOptions[0].value));\n  }\n}\n","import { Directive, ElementRef, forwardRef, HostListener, Input, Renderer2 } from \"@angular/core\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n// ref: https://juristr.com/blog/2018/02/ng-true-value-directive/\n@Directive({\n  selector: \"input[type=checkbox][appTrueFalseValue]\",\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => TrueFalseValueDirective),\n      multi: true,\n    },\n  ],\n})\nexport class TrueFalseValueDirective implements ControlValueAccessor {\n  @Input() trueValue: boolean | string = true;\n  @Input() falseValue: boolean | string = false;\n\n  constructor(\n    private elementRef: ElementRef,\n    private renderer: Renderer2,\n  ) {}\n\n  @HostListener(\"change\", [\"$event\"])\n  onHostChange(ev: any) {\n    this.propagateChange(ev.target.checked ? this.trueValue : this.falseValue);\n  }\n\n  writeValue(obj: any): void {\n    if (obj === this.trueValue) {\n      this.renderer.setProperty(this.elementRef.nativeElement, \"checked\", true);\n    } else {\n      this.renderer.setProperty(this.elementRef.nativeElement, \"checked\", false);\n    }\n  }\n\n  registerOnChange(fn: any): void {\n    this.propagateChange = fn;\n  }\n\n  registerOnTouched(fn: any): void {\n    /* nothing */\n  }\n\n  setDisabledState?(isDisabled: boolean): void {\n    /* nothing */\n  }\n\n  private propagateChange = (_: any) => {\n    /* nothing */\n  };\n}\n","<ng-container>\n  <h3 class=\"mt-4\">{{ \"customFields\" | i18n }}</h3>\n  <div cdkDropList (cdkDropListDropped)=\"drop($event)\" *ngIf=\"cipher.hasFields\">\n    <div\n      role=\"group\"\n      class=\"row\"\n      cdkDrag\n      *ngFor=\"let f of cipher.fields; let i = index; trackBy: trackByFunction\"\n      attr.aria-label=\"{{ f.name }}\"\n    >\n      <div class=\"col-5 form-group\">\n        <div class=\"d-flex\">\n          <label for=\"fieldName{{ i }}\">{{ \"name\" | i18n }}</label>\n          <a\n            class=\"ml-auto\"\n            href=\"https://bitwarden.com/help/custom-fields/\"\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            appA11yTitle=\"{{ 'learnMore' | i18n }}\"\n          >\n            <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n          </a>\n        </div>\n        <input\n          id=\"fieldName{{ i }}\"\n          type=\"text\"\n          name=\"Field.Name{{ i }}\"\n          [(ngModel)]=\"f.name\"\n          class=\"form-control\"\n          appInputVerbatim\n          [disabled]=\"cipher.isDeleted || viewOnly\"\n          [readonly]=\"!cipher.edit && editMode\"\n        />\n      </div>\n      <div class=\"col-7 form-group\">\n        <label for=\"fieldValue{{ i }}\">{{ \"value\" | i18n }}</label>\n        <div class=\"d-flex align-items-center\">\n          <!-- Text -->\n          <div class=\"input-group\" *ngIf=\"f.type === fieldType.Text\">\n            <input\n              id=\"fieldValue{{ i }}\"\n              class=\"form-control\"\n              type=\"text\"\n              name=\"Field.Value{{ i }}\"\n              [(ngModel)]=\"f.value\"\n              appInputVerbatim\n              [disabled]=\"cipher.isDeleted || viewOnly\"\n              [readonly]=\"!cipher.edit && editMode\"\n              attr.aria-describedby=\"fieldName{{ i }}\"\n            />\n            <div class=\"input-group-append\">\n              <button\n                type=\"button\"\n                class=\"btn btn-outline-secondary\"\n                appA11yTitle=\"{{ 'copyValue' | i18n }}\"\n                (click)=\"copy(f.value, 'value', 'Field')\"\n              >\n                <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n              </button>\n            </div>\n          </div>\n          <!-- Hidden -->\n          <div class=\"input-group\" *ngIf=\"f.type === fieldType.Hidden\">\n            <input\n              id=\"fieldValue{{ i }}\"\n              type=\"{{ f.showValue ? 'text' : 'password' }}\"\n              name=\"Field.Value{{ i }}\"\n              [(ngModel)]=\"f.value\"\n              class=\"form-control text-monospace\"\n              appInputVerbatim\n              autocomplete=\"new-password\"\n              [disabled]=\"cipher.isDeleted || viewOnly || (!cipher.viewPassword && !f.newField)\"\n              [readonly]=\"!cipher.edit && editMode\"\n              attr.aria-describedby=\"fieldName{{ i }}\"\n            />\n            <div class=\"input-group-append\">\n              <button\n                type=\"button\"\n                class=\"btn btn-outline-secondary\"\n                appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                (click)=\"toggleFieldValue(f)\"\n                [disabled]=\"!cipher.viewPassword && !f.newField\"\n              >\n                <i\n                  class=\"bwi bwi-lg\"\n                  aria-hidden=\"true\"\n                  [ngClass]=\"{ 'bwi-eye': !f.showValue, 'bwi-eye-slash': f.showValue }\"\n                >\n                </i>\n              </button>\n              <button\n                type=\"button\"\n                class=\"btn btn-outline-secondary\"\n                appA11yTitle=\"{{ 'copyValue' | i18n }}\"\n                (click)=\"copy(f.value, 'value', f.type === fieldType.Hidden ? 'H_Field' : 'Field')\"\n                [disabled]=\"!cipher.viewPassword && !f.newField\"\n              >\n                <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n              </button>\n            </div>\n          </div>\n          <!-- Linked -->\n          <div class=\"input-group\" *ngIf=\"f.type === fieldType.Linked\">\n            <select\n              id=\"fieldValue{{ i }}\"\n              name=\"Field.Value{{ i }}\"\n              class=\"form-control\"\n              [(ngModel)]=\"f.linkedId\"\n              *ngIf=\"f.type === fieldType.Linked && cipher.linkedFieldOptions != null\"\n              [disabled]=\"cipher.isDeleted || viewOnly\"\n              attr.aria-describedby=\"fieldName{{ i }}\"\n            >\n              <option *ngFor=\"let o of linkedFieldOptions\" [ngValue]=\"o.value\">{{ o.name }}</option>\n            </select>\n          </div>\n          <div class=\"flex-fill\">\n            <!-- Boolean -->\n            <input\n              id=\"fieldValue{{ i }}\"\n              name=\"Field.Value{{ i }}\"\n              type=\"checkbox\"\n              [(ngModel)]=\"f.value\"\n              *ngIf=\"f.type === fieldType.Boolean\"\n              appTrueFalseValue\n              trueValue=\"true\"\n              falseValue=\"false\"\n              [disabled]=\"cipher.isDeleted || viewOnly\"\n              attr.aria-describedby=\"fieldName{{ i }}\"\n            />\n          </div>\n          <button\n            type=\"button\"\n            class=\"btn btn-link text-danger ml-2\"\n            (click)=\"removeField(f)\"\n            appA11yTitle=\"{{ 'remove' | i18n }}\"\n            *ngIf=\"!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)\"\n          >\n            <i class=\"bwi bwi-minus-circle bwi-lg\" aria-hidden=\"true\"></i>\n          </button>\n          <button\n            type=\"button\"\n            class=\"btn btn-link text-muted cursor-move\"\n            appA11yTitle=\"{{ 'dragToSort' | i18n }}\"\n            *ngIf=\"!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)\"\n          >\n            <i class=\"bwi bwi-hamburger bwi-lg\" aria-hidden=\"true\"></i>\n          </button>\n        </div>\n      </div>\n    </div>\n  </div>\n  <!-- Add new custom field -->\n  <a\n    bitLink\n    href=\"#\"\n    appStopClick\n    (click)=\"addField()\"\n    class=\"d-inline-block mb-2\"\n    *ngIf=\"!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)\"\n  >\n    <i class=\"bwi bwi-plus-circle bwi-fw\" aria-hidden=\"true\"></i> {{ \"newCustomField\" | i18n }}\n  </a>\n  <div class=\"row\" *ngIf=\"!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)\">\n    <div class=\"col-5\">\n      <label for=\"addFieldType\" class=\"tw-sr-only\">{{ \"type\" | i18n }}</label>\n      <select id=\"addFieldType\" class=\"form-control\" name=\"AddFieldType\" [(ngModel)]=\"addFieldType\">\n        <option *ngFor=\"let o of addFieldTypeOptions\" [ngValue]=\"o.value\">{{ o.name }}</option>\n        <option\n          *ngIf=\"cipher.linkedFieldOptions != null\"\n          [ngValue]=\"addFieldLinkedTypeOption.value\"\n        >\n          {{ addFieldLinkedTypeOption.name }}\n        </option>\n      </select>\n    </div>\n  </div>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { AddEditCustomFieldsComponent as BaseAddEditCustomFieldsComponent } from \"@bitwarden/angular/vault/components/add-edit-custom-fields.component\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Component({\n  selector: \"app-vault-add-edit-custom-fields\",\n  templateUrl: \"add-edit-custom-fields.component.html\",\n})\nexport class AddEditCustomFieldsComponent extends BaseAddEditCustomFieldsComponent {\n  @Input() viewOnly: boolean;\n  @Input() copy: (value: string, typeI18nKey: string, aType: string) => void;\n\n  constructor(i18nService: I18nService, eventCollectionService: EventCollectionService) {\n    super(i18nService, eventCollectionService);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe } from \"@angular/common\";\nimport { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { concatMap, firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { CollectionService, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport {\n  isMember,\n  OrganizationService,\n} from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { OrganizationUserStatusType, PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { normalizeExpiryYearFormat } from \"@bitwarden/common/autofill/utils\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { UriMatchStrategy } from \"@bitwarden/common/models/domain/domain-service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CollectionId, UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType, SecureNoteType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginUriView } from \"@bitwarden/common/vault/models/view/login-uri.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\nimport { SshKeyView } from \"@bitwarden/common/vault/models/view/ssh-key.view\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { generate_ssh_key } from \"@bitwarden/sdk-internal\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\n@Directive()\nexport class AddEditComponent implements OnInit, OnDestroy {\n  @Input() cloneMode = false;\n  @Input() folderId: string = null;\n  @Input() cipherId: string;\n  @Input() type: CipherType;\n  @Input() collectionIds: string[];\n  @Input() organizationId: string = null;\n  @Input() collectionId: string = null;\n  @Output() onSavedCipher = new EventEmitter<CipherView>();\n  @Output() onDeletedCipher = new EventEmitter<CipherView>();\n  @Output() onRestoredCipher = new EventEmitter<CipherView>();\n  @Output() onCancelled = new EventEmitter<CipherView>();\n  @Output() onEditAttachments = new EventEmitter<CipherView>();\n  @Output() onShareCipher = new EventEmitter<CipherView>();\n  @Output() onEditCollections = new EventEmitter<CipherView>();\n  @Output() onGeneratePassword = new EventEmitter();\n  @Output() onGenerateUsername = new EventEmitter();\n\n  canDeleteCipher$: Observable<boolean>;\n\n  editMode = false;\n  cipher: CipherView;\n  folders$: Observable<FolderView[]>;\n  collections: CollectionView[] = [];\n  title: string;\n  formPromise: Promise<any>;\n  deletePromise: Promise<any>;\n  restorePromise: Promise<any>;\n  checkPasswordPromise: Promise<number>;\n  showPassword = false;\n  showPrivateKey = false;\n  showTotpSeed = false;\n  showCardNumber = false;\n  showCardCode = false;\n  cipherType = CipherType;\n  typeOptions: any[];\n  cardBrandOptions: any[];\n  cardExpMonthOptions: any[];\n  identityTitleOptions: any[];\n  uriMatchOptions: any[];\n  ownershipOptions: any[] = [];\n  autofillOnPageLoadOptions: any[];\n  currentDate = new Date();\n  allowPersonal = true;\n  reprompt = false;\n  canUseReprompt = true;\n  organization: Organization;\n  /**\n   * Flag to determine if the action is being performed from the admin console.\n   */\n  isAdminConsoleAction: boolean = false;\n\n  protected componentName = \"\";\n  protected destroy$ = new Subject<void>();\n  protected writeableCollections: CollectionView[];\n  private personalOwnershipPolicyAppliesToActiveUser: boolean;\n  private previousCipherId: string;\n\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  get fido2CredentialCreationDateValue(): string {\n    const dateCreated = this.i18nService.t(\"dateCreated\");\n    const creationDate = this.datePipe.transform(\n      this.cipher?.login?.fido2Credentials?.[0]?.creationDate,\n      \"short\",\n    );\n    return `${dateCreated} ${creationDate}`;\n  }\n\n  constructor(\n    protected cipherService: CipherService,\n    protected folderService: FolderService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected auditService: AuditService,\n    protected accountService: AccountService,\n    protected collectionService: CollectionService,\n    protected messagingService: MessagingService,\n    protected eventCollectionService: EventCollectionService,\n    protected policyService: PolicyService,\n    protected logService: LogService,\n    protected passwordRepromptService: PasswordRepromptService,\n    private organizationService: OrganizationService,\n    protected dialogService: DialogService,\n    protected win: Window,\n    protected datePipe: DatePipe,\n    protected configService: ConfigService,\n    protected cipherAuthorizationService: CipherAuthorizationService,\n    protected toastService: ToastService,\n    private sdkService: SdkService,\n  ) {\n    this.typeOptions = [\n      { name: i18nService.t(\"typeLogin\"), value: CipherType.Login },\n      { name: i18nService.t(\"typeCard\"), value: CipherType.Card },\n      { name: i18nService.t(\"typeIdentity\"), value: CipherType.Identity },\n      { name: i18nService.t(\"typeSecureNote\"), value: CipherType.SecureNote },\n    ];\n\n    this.cardBrandOptions = [\n      { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n      { name: \"Visa\", value: \"Visa\" },\n      { name: \"Mastercard\", value: \"Mastercard\" },\n      { name: \"American Express\", value: \"Amex\" },\n      { name: \"Discover\", value: \"Discover\" },\n      { name: \"Diners Club\", value: \"Diners Club\" },\n      { name: \"JCB\", value: \"JCB\" },\n      { name: \"Maestro\", value: \"Maestro\" },\n      { name: \"UnionPay\", value: \"UnionPay\" },\n      { name: \"RuPay\", value: \"RuPay\" },\n      { name: i18nService.t(\"other\"), value: \"Other\" },\n    ];\n    this.cardExpMonthOptions = [\n      { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n      { name: \"01 - \" + i18nService.t(\"january\"), value: \"1\" },\n      { name: \"02 - \" + i18nService.t(\"february\"), value: \"2\" },\n      { name: \"03 - \" + i18nService.t(\"march\"), value: \"3\" },\n      { name: \"04 - \" + i18nService.t(\"april\"), value: \"4\" },\n      { name: \"05 - \" + i18nService.t(\"may\"), value: \"5\" },\n      { name: \"06 - \" + i18nService.t(\"june\"), value: \"6\" },\n      { name: \"07 - \" + i18nService.t(\"july\"), value: \"7\" },\n      { name: \"08 - \" + i18nService.t(\"august\"), value: \"8\" },\n      { name: \"09 - \" + i18nService.t(\"september\"), value: \"9\" },\n      { name: \"10 - \" + i18nService.t(\"october\"), value: \"10\" },\n      { name: \"11 - \" + i18nService.t(\"november\"), value: \"11\" },\n      { name: \"12 - \" + i18nService.t(\"december\"), value: \"12\" },\n    ];\n    this.identityTitleOptions = [\n      { name: \"-- \" + i18nService.t(\"select\") + \" --\", value: null },\n      { name: i18nService.t(\"mr\"), value: i18nService.t(\"mr\") },\n      { name: i18nService.t(\"mrs\"), value: i18nService.t(\"mrs\") },\n      { name: i18nService.t(\"ms\"), value: i18nService.t(\"ms\") },\n      { name: i18nService.t(\"mx\"), value: i18nService.t(\"mx\") },\n      { name: i18nService.t(\"dr\"), value: i18nService.t(\"dr\") },\n    ];\n    this.uriMatchOptions = [\n      { name: i18nService.t(\"defaultMatchDetection\"), value: null },\n      { name: i18nService.t(\"baseDomain\"), value: UriMatchStrategy.Domain },\n      { name: i18nService.t(\"host\"), value: UriMatchStrategy.Host },\n      { name: i18nService.t(\"startsWith\"), value: UriMatchStrategy.StartsWith },\n      { name: i18nService.t(\"regEx\"), value: UriMatchStrategy.RegularExpression },\n      { name: i18nService.t(\"exact\"), value: UriMatchStrategy.Exact },\n      { name: i18nService.t(\"never\"), value: UriMatchStrategy.Never },\n    ];\n    this.autofillOnPageLoadOptions = [\n      { name: i18nService.t(\"autoFillOnPageLoadUseDefault\"), value: null },\n      { name: i18nService.t(\"autoFillOnPageLoadYes\"), value: true },\n      { name: i18nService.t(\"autoFillOnPageLoadNo\"), value: false },\n    ];\n  }\n\n  async ngOnInit() {\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)\n      .pipe(\n        concatMap(async (policyAppliesToActiveUser) => {\n          this.personalOwnershipPolicyAppliesToActiveUser = policyAppliesToActiveUser;\n          await this.init();\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n\n    this.writeableCollections = await this.loadCollections();\n    this.canUseReprompt = await this.passwordRepromptService.enabled();\n\n    const sshKeysEnabled = await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem);\n    if (sshKeysEnabled) {\n      this.typeOptions.push({ name: this.i18nService.t(\"typeSshKey\"), value: CipherType.SshKey });\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async init() {\n    if (this.ownershipOptions.length) {\n      this.ownershipOptions = [];\n    }\n    if (this.personalOwnershipPolicyAppliesToActiveUser) {\n      this.allowPersonal = false;\n    } else {\n      const myEmail = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n      );\n      this.ownershipOptions.push({ name: myEmail, value: null });\n    }\n\n    const orgs = await this.organizationService.getAll();\n    orgs\n      .filter(isMember)\n      .sort(Utils.getSortFunction(this.i18nService, \"name\"))\n      .forEach((o) => {\n        if (o.enabled && o.status === OrganizationUserStatusType.Confirmed) {\n          this.ownershipOptions.push({ name: o.name, value: o.id });\n        }\n      });\n    if (!this.allowPersonal && this.organizationId == undefined) {\n      this.organizationId = this.defaultOwnerId;\n    }\n  }\n\n  async load() {\n    this.editMode = this.cipherId != null;\n    if (this.editMode) {\n      this.editMode = true;\n      if (this.cloneMode) {\n        this.cloneMode = true;\n        this.title = this.i18nService.t(\"addItem\");\n      } else {\n        this.title = this.i18nService.t(\"editItem\");\n      }\n    } else {\n      this.title = this.i18nService.t(\"addItem\");\n    }\n\n    const loadedAddEditCipherInfo = await this.loadAddEditCipherInfo();\n\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n    if (this.cipher == null) {\n      if (this.editMode) {\n        const cipher = await this.loadCipher();\n        this.cipher = await cipher.decrypt(\n          await this.cipherService.getKeyForCipherKeyDecryption(cipher, activeUserId),\n        );\n\n        // Adjust Cipher Name if Cloning\n        if (this.cloneMode) {\n          this.cipher.name += \" - \" + this.i18nService.t(\"clone\");\n          // If not allowing personal ownership, update cipher's org Id to prompt downstream changes\n          if (this.cipher.organizationId == null && !this.allowPersonal) {\n            this.cipher.organizationId = this.organizationId;\n          }\n        }\n      } else {\n        this.cipher = new CipherView();\n        this.cipher.organizationId = this.organizationId == null ? null : this.organizationId;\n        this.cipher.folderId = this.folderId;\n        this.cipher.type = this.type == null ? CipherType.Login : this.type;\n        this.cipher.login = new LoginView();\n        this.cipher.login.uris = [new LoginUriView()];\n        this.cipher.card = new CardView();\n        this.cipher.identity = new IdentityView();\n        this.cipher.secureNote = new SecureNoteView();\n        this.cipher.secureNote.type = SecureNoteType.Generic;\n        this.cipher.sshKey = new SshKeyView();\n        this.cipher.reprompt = CipherRepromptType.None;\n      }\n    }\n\n    if (this.cipher != null && (!this.editMode || loadedAddEditCipherInfo || this.cloneMode)) {\n      await this.organizationChanged();\n      if (\n        this.collectionIds != null &&\n        this.collectionIds.length > 0 &&\n        this.collections.length > 0\n      ) {\n        this.collections.forEach((c) => {\n          if (this.collectionIds.indexOf(c.id) > -1) {\n            (c as any).checked = true;\n          }\n        });\n      }\n    }\n    // Only Admins can clone a cipher to different owner\n    if (this.cloneMode && this.cipher.organizationId != null) {\n      const cipherOrg = (await firstValueFrom(this.organizationService.memberOrganizations$)).find(\n        (o) => o.id === this.cipher.organizationId,\n      );\n\n      if (cipherOrg != null && !cipherOrg.isAdmin && !cipherOrg.permissions.editAnyCollection) {\n        this.ownershipOptions = [{ name: cipherOrg.name, value: cipherOrg.id }];\n      }\n    }\n\n    // We don't want to copy passkeys when we clone a cipher\n    if (this.cloneMode && this.cipher?.login?.hasFido2Credentials) {\n      this.cipher.login.fido2Credentials = null;\n    }\n\n    this.folders$ = this.folderService.folderViews$(activeUserId);\n\n    if (this.editMode && this.previousCipherId !== this.cipherId) {\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientViewed, [this.cipher]);\n    }\n    this.previousCipherId = this.cipherId;\n    this.reprompt = this.cipher.reprompt !== CipherRepromptType.None;\n    if (this.reprompt) {\n      this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;\n    }\n\n    this.canDeleteCipher$ = this.cipherAuthorizationService.canDeleteCipher$(\n      this.cipher,\n      [this.collectionId as CollectionId],\n      this.isAdminConsoleAction,\n    );\n\n    if (!this.editMode || this.cloneMode) {\n      // Creating an ssh key directly while filtering to the ssh key category\n      // must force a key to be set. SSH keys must never be created with an empty private key field\n      if (\n        this.cipher.type === CipherType.SshKey &&\n        (this.cipher.sshKey.privateKey == null || this.cipher.sshKey.privateKey === \"\")\n      ) {\n        await this.generateSshKey(false);\n      }\n    }\n  }\n\n  async submit(): Promise<boolean> {\n    if (this.cipher.isDeleted) {\n      return this.restore();\n    }\n\n    // normalize card expiry year on save\n    if (this.cipher.type === this.cipherType.Card) {\n      this.cipher.card.expYear = normalizeExpiryYearFormat(this.cipher.card.expYear);\n    }\n\n    // trim whitespace from the TOTP field\n    if (this.cipher.type === this.cipherType.Login && this.cipher.login.totp) {\n      this.cipher.login.totp = this.cipher.login.totp.trim();\n    }\n\n    if (this.cipher.name == null || this.cipher.name === \"\") {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"nameRequired\"),\n      );\n      return false;\n    }\n\n    if (\n      (!this.editMode || this.cloneMode) &&\n      !this.allowPersonal &&\n      this.cipher.organizationId == null\n    ) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"personalOwnershipSubmitError\"),\n      );\n      return false;\n    }\n\n    if (\n      (!this.editMode || this.cloneMode) &&\n      this.cipher.type === CipherType.Login &&\n      this.cipher.login.uris != null &&\n      this.cipher.login.uris.length === 1 &&\n      (this.cipher.login.uris[0].uri == null || this.cipher.login.uris[0].uri === \"\")\n    ) {\n      this.cipher.login.uris = [];\n    }\n\n    // Allows saving of selected collections during \"Add\" and \"Clone\" flows\n    if ((!this.editMode || this.cloneMode) && this.cipher.organizationId != null) {\n      this.cipher.collectionIds =\n        this.collections == null\n          ? []\n          : this.collections.filter((c) => (c as any).checked).map((c) => c.id);\n    }\n\n    // Clear current Cipher Id if exists to trigger \"Add\" cipher flow\n    if (this.cloneMode) {\n      this.cipher.id = null;\n    }\n\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    const cipher = await this.encryptCipher(activeUserId);\n    try {\n      this.formPromise = this.saveCipher(cipher);\n      await this.formPromise;\n      this.cipher.id = cipher.id;\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(this.editMode && !this.cloneMode ? \"editedItem\" : \"addedItem\"),\n      );\n      this.onSavedCipher.emit(this.cipher);\n      this.messagingService.send(this.editMode && !this.cloneMode ? \"editedCipher\" : \"addedCipher\");\n      return true;\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return false;\n  }\n\n  addUri() {\n    if (this.cipher.type !== CipherType.Login) {\n      return;\n    }\n\n    if (this.cipher.login.uris == null) {\n      this.cipher.login.uris = [];\n    }\n\n    this.cipher.login.uris.push(new LoginUriView());\n  }\n\n  removeUri(uri: LoginUriView) {\n    if (this.cipher.type !== CipherType.Login || this.cipher.login.uris == null) {\n      return;\n    }\n\n    const i = this.cipher.login.uris.indexOf(uri);\n    if (i > -1) {\n      this.cipher.login.uris.splice(i, 1);\n    }\n  }\n\n  removePasskey() {\n    if (this.cipher.type !== CipherType.Login || this.cipher.login.fido2Credentials == null) {\n      return;\n    }\n\n    this.cipher.login.fido2Credentials = null;\n  }\n\n  onCardNumberChange(): void {\n    this.cipher.card.brand = CardView.getCardBrandByPatterns(this.cipher.card.number);\n  }\n\n  getCardExpMonthDisplay() {\n    return this.cardExpMonthOptions.find((x) => x.value == this.cipher.card.expMonth)?.name;\n  }\n\n  trackByFunction(index: number, item: any) {\n    return index;\n  }\n\n  cancel() {\n    this.onCancelled.emit(this.cipher);\n  }\n\n  attachments() {\n    this.onEditAttachments.emit(this.cipher);\n  }\n\n  share() {\n    this.onShareCipher.emit(this.cipher);\n  }\n\n  editCollections() {\n    this.onEditCollections.emit(this.cipher);\n  }\n\n  async delete(): Promise<boolean> {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteItem\" },\n      content: {\n        key: this.cipher.isDeleted ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\",\n      },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.deletePromise = this.deleteCipher();\n      await this.deletePromise;\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(this.cipher.isDeleted ? \"permanentlyDeletedItem\" : \"deletedItem\"),\n      );\n      this.onDeletedCipher.emit(this.cipher);\n      this.messagingService.send(\n        this.cipher.isDeleted ? \"permanentlyDeletedCipher\" : \"deletedCipher\",\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return true;\n  }\n\n  async restore(): Promise<boolean> {\n    if (!this.cipher.isDeleted) {\n      return false;\n    }\n\n    try {\n      this.restorePromise = this.restoreCipher();\n      await this.restorePromise;\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"restoredItem\"));\n      this.onRestoredCipher.emit(this.cipher);\n      this.messagingService.send(\"restoredCipher\");\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return true;\n  }\n\n  async generateUsername(): Promise<boolean> {\n    if (this.cipher.login?.username?.length) {\n      const confirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"overwriteUsername\" },\n        content: { key: \"overwriteUsernameConfirmation\" },\n        type: \"warning\",\n      });\n\n      if (!confirmed) {\n        return false;\n      }\n    }\n\n    this.onGenerateUsername.emit();\n    return true;\n  }\n\n  async generatePassword(): Promise<boolean> {\n    if (this.cipher.login?.password?.length) {\n      const confirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"overwritePassword\" },\n        content: { key: \"overwritePasswordConfirmation\" },\n        type: \"warning\",\n      });\n\n      if (!confirmed) {\n        return false;\n      }\n    }\n\n    this.onGeneratePassword.emit();\n    return true;\n  }\n\n  togglePassword() {\n    this.showPassword = !this.showPassword;\n\n    if (this.editMode && this.showPassword) {\n      document.getElementById(\"loginPassword\")?.focus();\n\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientToggledPasswordVisible, [\n        this.cipher,\n      ]);\n    }\n  }\n\n  toggleTotpSeed() {\n    this.showTotpSeed = !this.showTotpSeed;\n\n    if (this.editMode && this.showTotpSeed) {\n      document.getElementById(\"loginTotp\")?.focus();\n\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientToggledTOTPSeedVisible, [\n        this.cipher,\n      ]);\n    }\n  }\n\n  async toggleCardNumber() {\n    this.showCardNumber = !this.showCardNumber;\n    if (this.showCardNumber) {\n      void this.eventCollectionService.collectMany(\n        EventType.Cipher_ClientToggledCardNumberVisible,\n        [this.cipher],\n      );\n    }\n  }\n\n  toggleCardCode() {\n    this.showCardCode = !this.showCardCode;\n    document.getElementById(\"cardCode\").focus();\n    if (this.editMode && this.showCardCode) {\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientToggledCardCodeVisible, [\n        this.cipher,\n      ]);\n    }\n  }\n\n  togglePrivateKey() {\n    this.showPrivateKey = !this.showPrivateKey;\n  }\n\n  toggleUriOptions(uri: LoginUriView) {\n    const u = uri as any;\n    u.showOptions = u.showOptions == null && uri.match != null ? false : !u.showOptions;\n  }\n\n  loginUriMatchChanged(uri: LoginUriView) {\n    const u = uri as any;\n    u.showOptions = u.showOptions == null ? true : u.showOptions;\n  }\n\n  async organizationChanged() {\n    if (this.writeableCollections != null) {\n      this.writeableCollections.forEach((c) => ((c as any).checked = false));\n    }\n    if (this.cipher.organizationId != null) {\n      this.collections = this.writeableCollections?.filter(\n        (c) => c.organizationId === this.cipher.organizationId,\n      );\n      // If there's only one collection, check it by default\n      if (this.collections.length === 1) {\n        (this.collections[0] as any).checked = true;\n      }\n      const org = await this.organizationService.get(this.cipher.organizationId);\n      if (org != null) {\n        this.cipher.organizationUseTotp = org.useTotp;\n      }\n    } else {\n      this.collections = [];\n    }\n  }\n\n  async checkPassword() {\n    if (this.checkPasswordPromise != null) {\n      return;\n    }\n\n    if (\n      this.cipher.login == null ||\n      this.cipher.login.password == null ||\n      this.cipher.login.password === \"\"\n    ) {\n      return;\n    }\n\n    this.checkPasswordPromise = this.auditService.passwordLeaked(this.cipher.login.password);\n    const matches = await this.checkPasswordPromise;\n    this.checkPasswordPromise = null;\n\n    if (matches > 0) {\n      this.platformUtilsService.showToast(\n        \"warning\",\n        null,\n        this.i18nService.t(\"passwordExposed\", matches.toString()),\n      );\n    } else {\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"passwordSafe\"));\n    }\n  }\n\n  repromptChanged() {\n    this.reprompt = !this.reprompt;\n    if (this.reprompt) {\n      this.cipher.reprompt = CipherRepromptType.Password;\n      this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[2].value;\n    } else {\n      this.cipher.reprompt = CipherRepromptType.None;\n      this.cipher.login.autofillOnPageLoad = this.autofillOnPageLoadOptions[0].value;\n    }\n  }\n\n  protected async loadCollections() {\n    const allCollections = await this.collectionService.getAllDecrypted();\n    return allCollections.filter((c) => !c.readOnly);\n  }\n\n  protected loadCipher() {\n    return this.cipherService.get(this.cipherId);\n  }\n\n  protected encryptCipher(userId: UserId) {\n    return this.cipherService.encrypt(this.cipher, userId);\n  }\n\n  protected saveCipher(cipher: Cipher) {\n    let orgAdmin = this.organization?.canEditAllCiphers;\n\n    // if a cipher is unassigned we want to check if they are an admin or have permission to edit any collection\n    if (!cipher.collectionIds) {\n      orgAdmin = this.organization?.canEditUnassignedCiphers;\n    }\n\n    return this.cipher.id == null\n      ? this.cipherService.createWithServer(cipher, orgAdmin)\n      : this.cipherService.updateWithServer(cipher, orgAdmin);\n  }\n\n  protected deleteCipher() {\n    return this.cipher.isDeleted\n      ? this.cipherService.deleteWithServer(this.cipher.id, this.asAdmin)\n      : this.cipherService.softDeleteWithServer(this.cipher.id, this.asAdmin);\n  }\n\n  protected restoreCipher() {\n    return this.cipherService.restoreWithServer(this.cipher.id, this.asAdmin);\n  }\n\n  /**\n   * Determines if a cipher must be deleted as an admin by belonging to an organization and being unassigned to a collection.\n   */\n  get asAdmin(): boolean {\n    return (\n      this.cipher.organizationId !== null &&\n      this.cipher.organizationId.length > 0 &&\n      (this.organization?.canEditAllCiphers ||\n        !this.cipher.collectionIds ||\n        this.cipher.collectionIds.length === 0)\n    );\n  }\n\n  get defaultOwnerId(): string | null {\n    return this.ownershipOptions[0].value;\n  }\n\n  async loadAddEditCipherInfo(): Promise<boolean> {\n    const addEditCipherInfo: any = await firstValueFrom(this.cipherService.addEditCipherInfo$);\n    const loadedSavedInfo = addEditCipherInfo != null;\n\n    if (loadedSavedInfo) {\n      this.cipher = addEditCipherInfo.cipher;\n      this.collectionIds = addEditCipherInfo.collectionIds;\n\n      if (!this.editMode && !this.allowPersonal && this.cipher.organizationId == null) {\n        // This is a new cipher and personal ownership isn't allowed, so we need to set the default owner\n        this.cipher.organizationId = this.defaultOwnerId;\n      }\n    }\n\n    await this.cipherService.setAddEditCipherInfo(null);\n\n    return loadedSavedInfo;\n  }\n\n  async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {\n    if (value == null) {\n      return false;\n    }\n\n    const copyOptions = this.win != null ? { window: this.win } : null;\n    this.platformUtilsService.copyToClipboard(value, copyOptions);\n    this.platformUtilsService.showToast(\n      \"info\",\n      null,\n      this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n    );\n\n    if (typeI18nKey === \"password\") {\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientCopiedPassword, [\n        this.cipher,\n      ]);\n    } else if (typeI18nKey === \"securityCode\") {\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientCopiedCardCode, [\n        this.cipher,\n      ]);\n    } else if (aType === \"H_Field\") {\n      void this.eventCollectionService.collectMany(EventType.Cipher_ClientCopiedHiddenField, [\n        this.cipher,\n      ]);\n    }\n\n    return true;\n  }\n\n  private async generateSshKey(showNotification: boolean = true) {\n    await firstValueFrom(this.sdkService.client$);\n    const sshKey = generate_ssh_key(\"Ed25519\");\n    this.cipher.sshKey.privateKey = sshKey.private_key;\n    this.cipher.sshKey.publicKey = sshKey.public_key;\n    this.cipher.sshKey.keyFingerprint = sshKey.key_fingerprint;\n\n    if (showNotification) {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: \"\",\n        message: this.i18nService.t(\"sshKeyGenerated\"),\n      });\n    }\n  }\n\n  async typeChange() {\n    if (this.cipher.type === CipherType.SshKey) {\n      await this.generateSshKey();\n    }\n  }\n}\n","<div class=\"modal fade\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"cipherAddEditTitle\">\n  <div class=\"modal-dialog modal-dialog-scrollable modal-lg\" role=\"document\">\n    <form\n      class=\"modal-content\"\n      #form\n      (ngSubmit)=\"submit()\"\n      [appApiAction]=\"formPromise\"\n      ngNativeValidate\n      autocomplete=\"off\"\n    >\n      <div class=\"modal-header\">\n        <h1 class=\"modal-title\" id=\"cipherAddEditTitle\">{{ title }}</h1>\n        <button\n          type=\"button\"\n          class=\"close\"\n          data-dismiss=\"modal\"\n          appA11yTitle=\"{{ 'close' | i18n }}\"\n        >\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n      <div class=\"modal-body\" *ngIf=\"cipher\">\n        <bit-callout type=\"info\" *ngIf=\"allowOwnershipAssignment() && !allowPersonal\">\n          {{ \"personalOwnershipPolicyInEffect\" | i18n }}\n        </bit-callout>\n        <bit-callout *ngIf=\"cardIsExpired\" type=\"info\" [title]=\"'cardExpiredTitle' | i18n\">\n          {{ \"cardExpiredMessage\" | i18n }}\n        </bit-callout>\n        <div class=\"row\" *ngIf=\"!editMode && !viewOnly\">\n          <div class=\"col-6 form-group\">\n            <label for=\"type\">{{ \"whatTypeOfItem\" | i18n }}</label>\n            <select\n              id=\"type\"\n              name=\"Type\"\n              [(ngModel)]=\"cipher.type\"\n              class=\"form-control\"\n              [disabled]=\"cipher.isDeleted\"\n              (change)=\"typeChange()\"\n              appAutofocus\n            >\n              <option *ngFor=\"let o of typeOptions\" [ngValue]=\"o.value\">{{ o.name }}</option>\n            </select>\n          </div>\n        </div>\n        <div class=\"row\">\n          <div class=\"col-6 form-group\">\n            <label for=\"name\">{{ \"name\" | i18n }}</label>\n            <input\n              id=\"name\"\n              class=\"form-control\"\n              type=\"text\"\n              name=\"Name\"\n              [(ngModel)]=\"cipher.name\"\n              required\n              [disabled]=\"cipher.isDeleted || viewOnly\"\n              [readonly]=\"!cipher.edit && editMode\"\n            />\n          </div>\n          <div class=\"col-6 form-group\" *ngIf=\"!organization\">\n            <label for=\"folder\">{{ \"folder\" | i18n }}</label>\n            <select\n              id=\"folder\"\n              name=\"FolderId\"\n              [(ngModel)]=\"cipher.folderId\"\n              class=\"form-control\"\n              [disabled]=\"cipher.isDeleted || viewOnly\"\n            >\n              <option *ngFor=\"let f of folders$ | async\" [ngValue]=\"f.id\">{{ f.name }}</option>\n            </select>\n          </div>\n        </div>\n        <!-- Login -->\n        <ng-container *ngIf=\"cipher.type === cipherType.Login\">\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"loginUsername\">{{ \"username\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"loginUsername\"\n                  class=\"form-control\"\n                  type=\"text\"\n                  name=\"Login.Username\"\n                  [(ngModel)]=\"cipher.login.username\"\n                  appInputVerbatim\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                  [readonly]=\"!cipher.edit && editMode\"\n                />\n                <div class=\"input-group-append\" *ngIf=\"!cipher.isDeleted\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copyUsername' | i18n }}\"\n                    (click)=\"copy(cipher.login.username, 'username', 'Username')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n            <div class=\"col-6 form-group\">\n              <div class=\"d-flex\">\n                <label for=\"loginPassword\">{{ \"password\" | i18n }}</label>\n                <div class=\"ml-auto d-flex\" *ngIf=\"!cipher.isDeleted && !viewOnly\">\n                  <a\n                    href=\"#\"\n                    class=\"d-block mr-2 bwi-icon-above-input\"\n                    appStopClick\n                    appA11yTitle=\"{{ 'generatePassword' | i18n }}\"\n                    (click)=\"generatePassword()\"\n                    *ngIf=\"cipher.viewPassword && !(!cipher.edit && editMode)\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-fw bwi-generate\" aria-hidden=\"true\"></i>\n                  </a>\n                  <a\n                    href=\"#\"\n                    class=\"d-block bwi-icon-above-input\"\n                    #checkPasswordBtn\n                    appStopClick\n                    appA11yTitle=\"{{ 'checkPassword' | i18n }}\"\n                    (click)=\"checkPassword()\"\n                    [appApiAction]=\"checkPasswordPromise\"\n                  >\n                    <i\n                      class=\"bwi bwi-lg bwi-fw bwi-check-circle\"\n                      [hidden]=\"$any(checkPasswordBtn).loading\"\n                      aria-hidden=\"true\"\n                    ></i>\n                    <i\n                      class=\"bwi bwi-lg bwi-fw bwi-spinner bwi-spin\"\n                      aria-hidden=\"true\"\n                      [hidden]=\"!$any(checkPasswordBtn).loading\"\n                      title=\"{{ 'loading' | i18n }}\"\n                    ></i>\n                  </a>\n                  <a\n                    href=\"#\"\n                    class=\"d-block bwi-icon-above-input\"\n                    appStopClick\n                    [appA11yTitle]=\"'toggleCharacterCount' | i18n\"\n                    (click)=\"togglePasswordCount()\"\n                    *ngIf=\"cipher.viewPassword\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-fw bwi-numbered-list\" aria-hidden=\"true\"></i>\n                  </a>\n                </div>\n              </div>\n              <div class=\"input-group\">\n                <input\n                  id=\"loginPassword\"\n                  class=\"form-control text-monospace\"\n                  type=\"{{ showPassword ? 'text' : 'password' }}\"\n                  name=\"Login.Password\"\n                  [(ngModel)]=\"cipher.login.password\"\n                  appInputVerbatim\n                  autocomplete=\"new-password\"\n                  [disabled]=\"cipher.isDeleted || !cipher.viewPassword || viewOnly\"\n                  [readonly]=\"!cipher.edit && editMode\"\n                />\n                <div class=\"input-group-append\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                    (click)=\"togglePassword()\"\n                    [disabled]=\"!cipher.viewPassword\"\n                  >\n                    <i\n                      class=\"bwi bwi-lg\"\n                      aria-hidden=\"true\"\n                      [ngClass]=\"{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }\"\n                    ></i>\n                  </button>\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copyPassword' | i18n }}\"\n                    (click)=\"copy(cipher.login.password, 'password', 'Password')\"\n                    [disabled]=\"!cipher.viewPassword\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n          <div *ngIf=\"showPasswordCount\" class=\"tw-mb-4\">\n            <label>{{ \"passwordCharacterCount\" | i18n }}</label>\n            <div class=\"tw-flex tw-justify-between\">\n              <bit-color-password\n                [password]=\"cipher.login.password\"\n                [showCount]=\"true\"\n              ></bit-color-password>\n              <button type=\"button\" bitLink (click)=\"togglePasswordCount()\">\n                {{ \"hide\" | i18n }}\n              </button>\n            </div>\n          </div>\n          <ng-container *ngIf=\"cipher.login.hasFido2Credentials\">\n            <div class=\"tw-flex tw-flex-row\">\n              <div class=\"tw-mb-4 tw-w-1/2\">\n                <label for=\"loginFido2credential\">{{ \"typePasskey\" | i18n }}</label>\n                <div\n                  class=\"tw-flex tw-flex-row\"\n                  tabindex=\"0\"\n                  attr.aria-label=\"{{ 'typePasskey' | i18n }} {{\n                    fido2CredentialCreationDateValue\n                  }}\"\n                >\n                  <input\n                    id=\"loginFido2credential\"\n                    class=\"form-control\"\n                    type=\"text\"\n                    name=\"Login.Fido2credential\"\n                    [value]=\"fido2CredentialCreationDateValue\"\n                    appInputVerbatim\n                    disabled\n                    readonly\n                  />\n                  <button\n                    type=\"button\"\n                    class=\"tw-items-center tw-border-none tw-bg-transparent tw-text-danger tw-ml-3\"\n                    appA11yTitle=\"{{ 'removePasskey' | i18n }}\"\n                    (click)=\"removePasskey()\"\n                    *ngIf=\"!cipher.isDeleted && !viewOnly\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-minus-circle\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n          </ng-container>\n          <div class=\"tw-flex tw-flex-row\">\n            <div class=\"tw-mb-4 tw-w-1/2\">\n              <label for=\"loginTotp\">{{ \"authenticatorKeyTotp\" | i18n }}</label>\n              <input\n                id=\"loginTotp\"\n                type=\"{{ cipher.viewPassword ? 'text' : 'password' }}\"\n                name=\"Login.Totp\"\n                class=\"form-control text-monospace\"\n                [(ngModel)]=\"cipher.login.totp\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || !cipher.viewPassword || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"tw-mb-4 tw-ml-4 tw-flex tw-w-1/2 tw-items-end\" [ngClass]=\"{ low: totpLow }\">\n              <div\n                class=\"totp tw-flex tw-flex-row tw-items-center\"\n                *ngIf=\"!cipher.login.totp || !totpCode\"\n              >\n                <span class=\"totp-countdown\">\n                  <span class=\"totp-sec tw-text-muted\">15</span>\n                  <svg>\n                    <g>\n                      <circle\n                        class=\"totp-circle-muted inner\"\n                        r=\"12.6\"\n                        cy=\"16\"\n                        cx=\"16\"\n                        opacity=\"0.25\"\n                        [ngStyle]=\"{ 'stroke-dashoffset.px': 40 }\"\n                      ></circle>\n                      <circle\n                        class=\"totp-circle-muted outer\"\n                        opacity=\"0.25\"\n                        r=\"14\"\n                        cy=\"16\"\n                        cx=\"16\"\n                      ></circle>\n                    </g>\n                  </svg>\n                </span>\n                <span\n                  class=\"totp-code tw-ml-2 tw-mr-3 tw-text-muted\"\n                  title=\"{{ 'verificationCodeTotp' | i18n }}\"\n                  >--- ---</span\n                >\n                <i class=\"bwi bwi-lg bwi-clone tw-text-muted\" aria-hidden=\"true\"></i>\n              </div>\n              <div class=\"tw-pb-2\" *ngIf=\"!cipher.login.totp || !totpCode\">\n                <app-premium-badge\n                  *ngIf=\"!organization && !cipher.organizationId\"\n                  class=\"ml-3\"\n                ></app-premium-badge>\n                <a\n                  href=\"#\"\n                  appStopClick\n                  bitBadge\n                  variant=\"primary\"\n                  class=\"tw-ml-4\"\n                  (click)=\"upgradeOrganization()\"\n                  *ngIf=\"\n                    (organization && !organization.useTotp) ||\n                    (!organization &&\n                      !canAccessPremium &&\n                      cipher.organizationId &&\n                      !cipher.organizationUseTotp)\n                  \"\n                >\n                  {{ \"upgrade\" | i18n }}\n                </a>\n              </div>\n              <div\n                *ngIf=\"cipher.login.totp && totpCode\"\n                class=\"totp tw-flex tw-flex-row tw-items-center\"\n              >\n                <span class=\"totp-countdown\">\n                  <span class=\"totp-sec\">{{ totpSec }}</span>\n                  <svg>\n                    <g>\n                      <circle\n                        class=\"totp-circle inner\"\n                        r=\"12.6\"\n                        cy=\"16\"\n                        cx=\"16\"\n                        [ngStyle]=\"{ 'stroke-dashoffset.px': totpDash }\"\n                      ></circle>\n                      <circle class=\"totp-circle outer\" r=\"14\" cy=\"16\" cx=\"16\"></circle>\n                    </g>\n                  </svg>\n                </span>\n                <span\n                  class=\"totp-code tw-mx-2 tw-mt-1\"\n                  title=\"{{ 'verificationCodeTotp' | i18n }}\"\n                  >{{ totpCodeFormatted }}</span\n                >\n                <button\n                  type=\"button\"\n                  class=\"tw-items-center tw-border-none tw-bg-transparent tw-text-primary-600\"\n                  appA11yTitle=\"{{ 'copyVerificationCode' | i18n }}\"\n                  (click)=\"copy(totpCode, 'verificationCodeTotp', 'TOTP')\"\n                >\n                  <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                </button>\n              </div>\n            </div>\n          </div>\n          <ng-container *ngIf=\"cipher.login.hasUris\">\n            <div\n              role=\"group\"\n              class=\"row\"\n              *ngFor=\"let u of cipher.login.uris; let i = index; trackBy: trackByFunction\"\n              attr.aria-label=\"{{ 'uriPosition' | i18n: i + 1 }}\"\n            >\n              <div class=\"col-7 form-group\">\n                <label for=\"loginUri{{ i }}\">{{ \"uriPosition\" | i18n: i + 1 }}</label>\n                <div class=\"input-group\">\n                  <input\n                    class=\"form-control\"\n                    id=\"loginUri{{ i }}\"\n                    type=\"text\"\n                    name=\"Login.Uris[{{ i }}].Uri\"\n                    [(ngModel)]=\"u.uri\"\n                    [disabled]=\"cipher.isDeleted || viewOnly\"\n                    placeholder=\"{{ 'ex' | i18n }} https://google.com\"\n                    appInputVerbatim\n                  />\n                  <div class=\"input-group-append\">\n                    <button\n                      type=\"button\"\n                      class=\"btn btn-outline-secondary\"\n                      appA11yTitle=\"{{ 'launch' | i18n }}\"\n                      (click)=\"launch(u)\"\n                      [disabled]=\"!u.canLaunch\"\n                    >\n                      <i class=\"bwi bwi-lg bwi-share-square\" aria-hidden=\"true\"></i>\n                    </button>\n                    <button\n                      type=\"button\"\n                      class=\"btn btn-outline-secondary\"\n                      appA11yTitle=\"{{ 'copyUri' | i18n }}\"\n                      (click)=\"copy(u.uri, 'uri', 'URI')\"\n                    >\n                      <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                    </button>\n                  </div>\n                </div>\n              </div>\n              <div class=\"col-5 form-group\">\n                <div class=\"d-flex\">\n                  <label for=\"loginUriMatch{{ i }}\">\n                    {{ \"matchDetection\" | i18n }}\n                  </label>\n                  <a\n                    class=\"ml-auto\"\n                    href=\"https://bitwarden.com/help/uri-match-detection/\"\n                    target=\"_blank\"\n                    rel=\"noreferrer\"\n                    appA11yTitle=\"{{ 'learnMoreAboutMatchDetection' | i18n }}\"\n                  >\n                    <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n                  </a>\n                </div>\n                <div class=\"d-flex\">\n                  <select\n                    class=\"form-control overflow-hidden\"\n                    id=\"loginUriMatch{{ i }}\"\n                    name=\"Login.Uris[{{ i }}].Match\"\n                    [(ngModel)]=\"u.match\"\n                    (change)=\"loginUriMatchChanged(u)\"\n                    [disabled]=\"cipher.isDeleted || viewOnly\"\n                  >\n                    <option *ngFor=\"let o of uriMatchOptions\" [ngValue]=\"o.value\">\n                      {{ o.name }}\n                    </option>\n                  </select>\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-link text-danger ml-2\"\n                    (click)=\"removeUri(u)\"\n                    appA11yTitle=\"{{ 'remove' | i18n }}\"\n                    *ngIf=\"!cipher.isDeleted && !viewOnly\"\n                  >\n                    <i class=\"bwi bwi-minus-circle bwi-lg\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n          </ng-container>\n          <a\n            href=\"#\"\n            bitLink\n            appStopClick\n            (click)=\"addUri()\"\n            class=\"d-inline-block mb-3\"\n            *ngIf=\"!cipher.isDeleted && !viewOnly && !(!cipher.edit && editMode)\"\n          >\n            <i class=\"bwi bwi-plus-circle bwi-fw\" aria-hidden=\"true\"></i> {{ \"newUri\" | i18n }}\n          </a>\n        </ng-container>\n        <!-- Card -->\n        <ng-container *ngIf=\"cipher.type === cipherType.Card\">\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"cardCardholderName\">{{ \"cardholderName\" | i18n }}</label>\n              <input\n                id=\"cardCardholderName\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Card.CardCardholderName\"\n                [(ngModel)]=\"cipher.card.cardholderName\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-6 form-group\">\n              <label for=\"cardBrand\">{{ \"brand\" | i18n }}</label>\n              <span *ngIf=\"!(!cipher.edit && editMode); else readonlyCardBrand\">\n                <select\n                  id=\"cardBrand\"\n                  class=\"form-control\"\n                  name=\"Card.Brand\"\n                  [(ngModel)]=\"cipher.card.brand\"\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                >\n                  <option *ngFor=\"let o of cardBrandOptions\" [ngValue]=\"o.value\">\n                    {{ o.name }}\n                  </option>\n                </select>\n              </span>\n              <ng-template #readonlyCardBrand>\n                <input\n                  id=\"cardBrand\"\n                  class=\"form-control\"\n                  name=\"Card.Brand\"\n                  type=\"text\"\n                  [readonly]=\"true\"\n                  [value]=\"cipher.card.brand\"\n                />\n              </ng-template>\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"cardNumber\">{{ \"number\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"cardNumber\"\n                  class=\"form-control text-monospace\"\n                  type=\"{{ showCardNumber ? 'text' : 'password' }}\"\n                  name=\"Card.Number\"\n                  (input)=\"onCardNumberChange()\"\n                  [(ngModel)]=\"cipher.card.number\"\n                  appInputVerbatim\n                  autocomplete=\"new-password\"\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                  [readonly]=\"!cipher.edit && editMode\"\n                />\n                <div class=\"input-group-append\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                    (click)=\"toggleCardNumber()\"\n                  >\n                    <i\n                      class=\"bwi bwi-lg\"\n                      aria-hidden=\"true\"\n                      [ngClass]=\"{\n                        'bwi-eye': !showCardNumber,\n                        'bwi-eye-slash': showCardNumber,\n                      }\"\n                    ></i>\n                  </button>\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copyNumber' | i18n }}\"\n                    (click)=\"copy(cipher.card.number, 'number', 'Number')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n            <div class=\"col form-group\">\n              <label for=\"cardExpMonth\">{{ \"expirationMonth\" | i18n }}</label>\n              <span *ngIf=\"!(!cipher.edit && editMode); else readonlyCardExpMonth\">\n                <select\n                  id=\"cardExpMonth\"\n                  class=\"form-control\"\n                  name=\"Card.ExpMonth\"\n                  [(ngModel)]=\"cipher.card.expMonth\"\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                >\n                  <option *ngFor=\"let o of cardExpMonthOptions\" [ngValue]=\"o.value\">\n                    {{ o.name }}\n                  </option>\n                </select>\n              </span>\n              <ng-template #readonlyCardExpMonth>\n                <input\n                  id=\"cardExpMonth\"\n                  class=\"form-control\"\n                  type=\"text\"\n                  name=\"Card.ExpMonth\"\n                  [readonly]=\"true\"\n                  [value]=\"getCardExpMonthDisplay()\"\n                />\n              </ng-template>\n            </div>\n            <div class=\"col form-group\">\n              <label for=\"cardExpYear\">{{ \"expirationYear\" | i18n }}</label>\n              <input\n                id=\"cardExpYear\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Card.ExpYear\"\n                [(ngModel)]=\"cipher.card.expYear\"\n                placeholder=\"{{ 'ex' | i18n }} 2019\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"cardCode\">{{ \"securityCode\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"cardCode\"\n                  class=\"form-control text-monospace\"\n                  type=\"{{ showCardCode ? 'text' : 'password' }}\"\n                  name=\"Card.Code\"\n                  [(ngModel)]=\"cipher.card.code\"\n                  appInputVerbatim\n                  autocomplete=\"new-password\"\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                  [readonly]=\"!cipher.edit && editMode\"\n                />\n                <div class=\"input-group-append\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                    (click)=\"toggleCardCode()\"\n                  >\n                    <i\n                      class=\"bwi bwi-lg\"\n                      aria-hidden=\"true\"\n                      [ngClass]=\"{ 'bwi-eye': !showCardCode, 'bwi-eye-slash': showCardCode }\"\n                    ></i>\n                  </button>\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'securityCode' | i18n }}\"\n                    (click)=\"copy(cipher.card.code, 'securityCode', 'Security Code')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </ng-container>\n        <!-- Identity -->\n        <ng-container *ngIf=\"cipher.type === cipherType.Identity\">\n          <div class=\"row\">\n            <div class=\"col-4 form-group\">\n              <label for=\"idTitle\">{{ \"title\" | i18n }}</label>\n              <span *ngIf=\"!(!cipher.edit && editMode); else readonlyIdTitle\">\n                <select\n                  id=\"idTitle\"\n                  class=\"form-control\"\n                  name=\"Identity.Title\"\n                  [(ngModel)]=\"cipher.identity.title\"\n                  [disabled]=\"cipher.isDeleted || viewOnly\"\n                >\n                  <option *ngFor=\"let o of identityTitleOptions\" [ngValue]=\"o.value\">\n                    {{ o.name }}\n                  </option>\n                </select>\n              </span>\n              <ng-template #readonlyIdTitle>\n                <input\n                  id=\"idTitle\"\n                  class=\"form-control\"\n                  name=\"Identity.Title\"\n                  type=\"text\"\n                  [readonly]=\"true\"\n                  [value]=\"cipher.identity.title\"\n                />\n              </ng-template>\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-4 form-group\">\n              <label for=\"idFirstName\">{{ \"firstName\" | i18n }}</label>\n              <input\n                id=\"idFirstName\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.FirstName\"\n                [(ngModel)]=\"cipher.identity.firstName\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-4 form-group\">\n              <label for=\"idMiddleName\">{{ \"middleName\" | i18n }}</label>\n              <input\n                id=\"idMiddleName\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.MiddleName\"\n                [(ngModel)]=\"cipher.identity.middleName\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-4 form-group\">\n              <label for=\"idLastName\">{{ \"lastName\" | i18n }}</label>\n              <input\n                id=\"idLastName\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.LastName\"\n                [(ngModel)]=\"cipher.identity.lastName\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-4 form-group\">\n              <label for=\"idUsername\">{{ \"username\" | i18n }}</label>\n              <input\n                id=\"idUsername\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Username\"\n                [(ngModel)]=\"cipher.identity.username\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-4 form-group\">\n              <label for=\"idCompany\">{{ \"company\" | i18n }}</label>\n              <input\n                id=\"idCompany\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Company\"\n                [(ngModel)]=\"cipher.identity.company\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-4 form-group\">\n              <label for=\"idSsn\">{{ \"ssn\" | i18n }}</label>\n              <input\n                id=\"idSsn\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.SSN\"\n                [(ngModel)]=\"cipher.identity.ssn\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-4 form-group\">\n              <label for=\"idPassportNumber\">{{ \"passportNumber\" | i18n }}</label>\n              <input\n                id=\"idPassportNumber\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.PassportNumber\"\n                [(ngModel)]=\"cipher.identity.passportNumber\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-4 form-group\">\n              <label for=\"idLicenseNumber\">{{ \"licenseNumber\" | i18n }}</label>\n              <input\n                id=\"idLicenseNumber\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.LicenseNumber\"\n                [(ngModel)]=\"cipher.identity.licenseNumber\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"idEmail\">{{ \"email\" | i18n }}</label>\n              <input\n                id=\"idEmail\"\n                class=\"form-control\"\n                type=\"text\"\n                inputmode=\"email\"\n                name=\"Identity.Email\"\n                [(ngModel)]=\"cipher.identity.email\"\n                appInputVerbatim\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-6 form-group\">\n              <label for=\"idPhone\">{{ \"phone\" | i18n }}</label>\n              <input\n                id=\"idPhone\"\n                class=\"form-control\"\n                type=\"text\"\n                inputmode=\"tel\"\n                name=\"Identity.Phone\"\n                [(ngModel)]=\"cipher.identity.phone\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"idAddress1\">{{ \"address1\" | i18n }}</label>\n              <input\n                id=\"idAddress1\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Address1\"\n                [(ngModel)]=\"cipher.identity.address1\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-6 form-group\">\n              <label for=\"idAddress2\">{{ \"address2\" | i18n }}</label>\n              <input\n                id=\"idAddress2\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Address2\"\n                [(ngModel)]=\"cipher.identity.address2\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"idAddress3\">{{ \"address3\" | i18n }}</label>\n              <input\n                id=\"idAddress3\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Address3\"\n                [(ngModel)]=\"cipher.identity.address3\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-6 form-group\">\n              <label for=\"idCity\">{{ \"cityTown\" | i18n }}</label>\n              <input\n                id=\"idCity\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.City\"\n                [(ngModel)]=\"cipher.identity.city\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"idState\">{{ \"stateProvince\" | i18n }}</label>\n              <input\n                id=\"idState\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.State\"\n                [(ngModel)]=\"cipher.identity.state\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n            <div class=\"col-6 form-group\">\n              <label for=\"idPostalCode\">{{ \"zipPostalCode\" | i18n }}</label>\n              <input\n                id=\"idPostalCode\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.PostalCode\"\n                [(ngModel)]=\"cipher.identity.postalCode\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n          <div class=\"row\">\n            <div class=\"col-6 form-group\">\n              <label for=\"idCountry\">{{ \"country\" | i18n }}</label>\n              <input\n                id=\"idCountry\"\n                class=\"form-control\"\n                type=\"text\"\n                name=\"Identity.Country\"\n                [(ngModel)]=\"cipher.identity.country\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n                [readonly]=\"!cipher.edit && editMode\"\n              />\n            </div>\n          </div>\n        </ng-container>\n        <!-- Ssh Key -->\n        <ng-container *ngIf=\"cipher.type === cipherType.SshKey\">\n          <div class=\"row\">\n            <div class=\"col-12 form-group\">\n              <label for=\"sshKeyPrivateKey\">{{ \"sshKeyPrivateKey\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"sshKeyPrivateKey\"\n                  class=\"form-control\"\n                  type=\"{{ showPrivateKey ? 'text' : 'password' }}\"\n                  name=\"SSHKey.PrivateKey\"\n                  [(ngModel)]=\"cipher.sshKey.privateKey\"\n                  appInputVerbatim\n                  disabled\n                  readonly\n                />\n                <div class=\"input-group-append\" *ngIf=\"!cipher.isDeleted\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                    (click)=\"togglePrivateKey()\"\n                    [disabled]=\"!cipher.viewPassword\"\n                  >\n                    <i\n                      class=\"bwi bwi-lg\"\n                      aria-hidden=\"true\"\n                      [ngClass]=\"{ 'bwi-eye': !showPrivateKey, 'bwi-eye-slash': showPrivateKey }\"\n                    ></i>\n                  </button>\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copySSHPrivateKey' | i18n }}\"\n                    (click)=\"copy(cipher.sshKey.privateKey, 'sshKeyPrivateKey', 'PrivateKey')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n            <div class=\"col-12 form-group\">\n              <label for=\"sshKeyPublicKey\">{{ \"sshKeyPublicKey\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"sshKeyPublicKey\"\n                  class=\"form-control\"\n                  type=\"text\"\n                  name=\"SshKey.PublicKey\"\n                  [(ngModel)]=\"cipher.sshKey.publicKey\"\n                  appInputVerbatim\n                  disabled\n                  readonly\n                />\n                <div class=\"input-group-append\" *ngIf=\"!cipher.isDeleted\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copySshPublicKey' | i18n }}\"\n                    (click)=\"copy(cipher.sshKey.publicKey, 'sshKeyPublicKey', 'PublicKey')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n            <div class=\"col-12 form-group\">\n              <label for=\"sshKeyFingerprint\">{{ \"sshKeyFingerprint\" | i18n }}</label>\n              <div class=\"input-group\">\n                <input\n                  id=\"sshKeyFingerprint\"\n                  class=\"form-control\"\n                  type=\"text\"\n                  name=\"SshKey.Fingerprint\"\n                  [(ngModel)]=\"cipher.sshKey.keyFingerprint\"\n                  appInputVerbatim\n                  disabled\n                  readonly\n                />\n                <div class=\"input-group-append\" *ngIf=\"!cipher.isDeleted\">\n                  <button\n                    type=\"button\"\n                    class=\"btn btn-outline-secondary\"\n                    appA11yTitle=\"{{ 'copySshFingerprint' | i18n }}\"\n                    (click)=\"copy(cipher.sshKey.keyFingerprint, 'sshKeyFingerprint', 'Fingerprint')\"\n                  >\n                    <i class=\"bwi bwi-lg bwi-clone\" aria-hidden=\"true\"></i>\n                  </button>\n                </div>\n              </div>\n            </div>\n          </div>\n        </ng-container>\n        <div class=\"form-group\">\n          <label for=\"notes\">{{ \"notes\" | i18n }}</label>\n          <textarea\n            id=\"notes\"\n            name=\"Notes\"\n            rows=\"6\"\n            [(ngModel)]=\"cipher.notes\"\n            [disabled]=\"cipher.isDeleted || viewOnly\"\n            [readonly]=\"!cipher.edit && editMode\"\n            class=\"form-control\"\n          ></textarea>\n        </div>\n        <app-vault-add-edit-custom-fields\n          *ngIf=\"!(!cipher.hasFields && !cipher.edit && editMode)\"\n          [cipher]=\"cipher\"\n          [thisCipherType]=\"cipher.type\"\n          [viewOnly]=\"viewOnly\"\n          [copy]=\"copy.bind(this)\"\n          [editMode]=\"editMode\"\n        ></app-vault-add-edit-custom-fields>\n        <ng-container *ngIf=\"allowOwnershipAssignment()\">\n          <h3 class=\"mt-4\">{{ \"ownership\" | i18n }}</h3>\n          <div class=\"row\">\n            <div class=\"col-5\">\n              <label for=\"organizationId\">{{ \"whoOwnsThisItem\" | i18n }}</label>\n              <select\n                id=\"organizationId\"\n                class=\"form-control\"\n                name=\"OrganizationId\"\n                [(ngModel)]=\"cipher.organizationId\"\n                (change)=\"organizationChanged()\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n              >\n                <option *ngFor=\"let o of ownershipOptions\" [ngValue]=\"o.value\">{{ o.name }}</option>\n              </select>\n            </div>\n          </div>\n        </ng-container>\n        <ng-container *ngIf=\"(!editMode || cloneMode) && cipher.organizationId\">\n          <h3 class=\"mt-4\">{{ \"collections\" | i18n }}</h3>\n          <div *ngIf=\"!collections || !collections.length\">\n            {{ \"noCollectionsInList\" | i18n }}\n          </div>\n          <ng-container *ngIf=\"collections && collections.length\">\n            <div class=\"form-check\" *ngFor=\"let c of collections; let i = index\">\n              <input\n                class=\"form-check-input\"\n                type=\"checkbox\"\n                [(ngModel)]=\"$any(c).checked\"\n                id=\"collection-{{ i }}\"\n                name=\"Collection[{{ i }}].Checked\"\n                [disabled]=\"cipher.isDeleted || viewOnly\"\n              />\n              <label class=\"form-check-label\" for=\"collection-{{ i }}\">{{ c.name }}</label>\n            </div>\n          </ng-container>\n        </ng-container>\n        <ng-container *ngIf=\"editMode\">\n          <div class=\"small text-muted mt-4\">\n            <div>\n              <b class=\"font-weight-semibold\">{{ \"dateUpdated\" | i18n }}:</b>\n              {{ cipher.revisionDate | date: \"medium\" }}\n            </div>\n            <div *ngIf=\"cipher.creationDate\">\n              <b class=\"font-weight-semibold\">{{ \"dateCreated\" | i18n }}:</b>\n              {{ cipher.creationDate | date: \"medium\" }}\n            </div>\n            <div *ngIf=\"showRevisionDate\">\n              <b class=\"font-weight-semibold\">{{ \"datePasswordUpdated\" | i18n }}:</b>\n              {{ cipher.passwordRevisionDisplayDate | date: \"medium\" }}\n            </div>\n            <div *ngIf=\"hasPasswordHistory\">\n              <b class=\"font-weight-semibold\">{{ \"passwordHistory\" | i18n }}:</b>\n              <a href=\"#\" bitLink appStopClick (click)=\"viewHistory()\" title=\"{{ 'view' | i18n }}\">\n                {{ cipher.passwordHistory.length }}\n              </a>\n            </div>\n            <div class=\"ml-3\" *ngIf=\"viewingPasswordHistory\">\n              <div *ngFor=\"let ph of cipher.passwordHistory\">\n                {{ ph.lastUsedDate | date: \"short\" }} -\n                <bit-color-password [password]=\"ph.password\"></bit-color-password>\n              </div>\n            </div>\n          </div>\n        </ng-container>\n        <ng-container *ngIf=\"canUseReprompt\">\n          <h3 class=\"mt-4\">{{ \"options\" | i18n }}</h3>\n          <div class=\"form-check\">\n            <input\n              class=\"form-check-input\"\n              type=\"checkbox\"\n              [ngModel]=\"reprompt\"\n              (change)=\"repromptChanged()\"\n              id=\"passwordPrompt\"\n              name=\"passwordPrompt\"\n              [disabled]=\"cipher.isDeleted || viewOnly || (!cipher.edit && editMode)\"\n            />\n            <label class=\"form-check-label\" for=\"passwordPrompt\">{{\n              \"passwordPrompt\" | i18n\n            }}</label>\n            <a\n              target=\"_blank\"\n              rel=\"noreferrer\"\n              appA11yTitle=\"{{ 'learnMoreAboutMasterPasswordReprompt' | i18n }}\"\n              href=\"https://bitwarden.com/help/managing-items/#protect-individual-items\"\n            >\n              <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n            </a>\n          </div>\n        </ng-container>\n      </div>\n      <div class=\"modal-footer\">\n        <button\n          type=\"submit\"\n          class=\"btn btn-primary btn-submit\"\n          [disabled]=\"form.loading\"\n          *ngIf=\"!viewOnly\"\n        >\n          <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n          <span>{{ (cipher?.isDeleted ? \"restore\" : \"save\") | i18n }}</span>\n        </button>\n        <button type=\"button\" class=\"btn btn-outline-secondary\" data-dismiss=\"modal\">\n          {{ (viewOnly ? \"close\" : \"cancel\") | i18n }}\n        </button>\n        <div class=\"ml-auto\" *ngIf=\"cipher && !viewOnly\">\n          <button\n            *ngIf=\"!organization && !cipher.isDeleted\"\n            type=\"button\"\n            (click)=\"toggleFavorite()\"\n            class=\"btn btn-link\"\n            appA11yTitle=\"{{ (cipher.favorite ? 'unfavorite' : 'favorite') | i18n }}\"\n          >\n            <i\n              class=\"bwi bwi-lg\"\n              [ngClass]=\"{ 'bwi-star-f': cipher.favorite, 'bwi-star': !cipher.favorite }\"\n              aria-hidden=\"true\"\n            ></i>\n          </button>\n          <button\n            #deleteBtn\n            type=\"button\"\n            (click)=\"delete()\"\n            class=\"btn btn-outline-danger\"\n            appA11yTitle=\"{{ (cipher.isDeleted ? 'permanentlyDelete' : 'delete') | i18n }}\"\n            *ngIf=\"editMode && !cloneMode && (canDeleteCipher$ | async)\"\n            [disabled]=\"$any(deleteBtn).loading\"\n            [appApiAction]=\"deletePromise\"\n          >\n            <i\n              class=\"bwi bwi-trash bwi-lg bwi-fw\"\n              [hidden]=\"$any(deleteBtn).loading\"\n              aria-hidden=\"true\"\n            ></i>\n            <i\n              class=\"bwi bwi-spinner bwi-spin bwi-lg bwi-fw\"\n              [hidden]=\"!$any(deleteBtn).loading\"\n              title=\"{{ 'loading' | i18n }}\"\n              aria-hidden=\"true\"\n            ></i>\n          </button>\n        </div>\n      </div>\n    </form>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { AddEditComponent as BaseAddEditComponent } from \"@bitwarden/angular/vault/components/add-edit.component\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { isCardExpired } from \"@bitwarden/common/autofill/utils\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { Launchable } from \"@bitwarden/common/vault/interfaces/launchable\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\n@Component({\n  selector: \"app-vault-add-edit\",\n  templateUrl: \"add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent implements OnInit, OnDestroy {\n  canAccessPremium: boolean;\n  totpCode: string;\n  totpCodeFormatted: string;\n  totpDash: number;\n  totpSec: number;\n  totpLow: boolean;\n  showRevisionDate = false;\n  hasPasswordHistory = false;\n  viewingPasswordHistory = false;\n  viewOnly = false;\n  showPasswordCount = false;\n  cardIsExpired: boolean = false;\n\n  protected totpInterval: number;\n  protected override componentName = \"app-vault-add-edit\";\n\n  constructor(\n    cipherService: CipherService,\n    folderService: FolderService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    auditService: AuditService,\n    accountService: AccountService,\n    collectionService: CollectionService,\n    protected totpService: TotpService,\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected messagingService: MessagingService,\n    eventCollectionService: EventCollectionService,\n    protected policyService: PolicyService,\n    organizationService: OrganizationService,\n    logService: LogService,\n    passwordRepromptService: PasswordRepromptService,\n    dialogService: DialogService,\n    datePipe: DatePipe,\n    configService: ConfigService,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    cipherAuthorizationService: CipherAuthorizationService,\n    toastService: ToastService,\n    sdkService: SdkService,\n  ) {\n    super(\n      cipherService,\n      folderService,\n      i18nService,\n      platformUtilsService,\n      auditService,\n      accountService,\n      collectionService,\n      messagingService,\n      eventCollectionService,\n      policyService,\n      logService,\n      passwordRepromptService,\n      organizationService,\n      dialogService,\n      window,\n      datePipe,\n      configService,\n      cipherAuthorizationService,\n      toastService,\n      sdkService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.ngOnInit();\n    await this.load();\n\n    // https://bitwarden.atlassian.net/browse/PM-10413\n    // cannot generate ssh keys so block creation\n    if (\n      this.type === CipherType.SshKey &&\n      this.cipherId == null &&\n      !(await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem))\n    ) {\n      this.type = CipherType.Login;\n      this.cipher.type = CipherType.Login;\n    }\n\n    this.viewOnly = !this.cipher.edit && this.editMode;\n    // remove when all the title for all clients are updated to New Item\n    if (this.cloneMode || !this.editMode) {\n      this.title = this.i18nService.t(\"newItem\");\n    }\n    this.showRevisionDate = this.cipher.passwordRevisionDisplayDate != null;\n    this.hasPasswordHistory = this.cipher.hasPasswordHistory;\n    this.cleanUp();\n\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a.id)),\n    );\n\n    this.canAccessPremium = await firstValueFrom(\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(activeUserId),\n    );\n\n    if (this.showTotp()) {\n      await this.totpUpdateCode();\n      const interval = this.totpService.getTimeInterval(this.cipher.login.totp);\n      await this.totpTick(interval);\n\n      this.totpInterval = window.setInterval(async () => {\n        await this.totpTick(interval);\n      }, 1000);\n    }\n\n    const extensionRefreshEnabled = await firstValueFrom(\n      this.configService.getFeatureFlag$(FeatureFlag.ExtensionRefresh),\n    );\n\n    this.cardIsExpired = extensionRefreshEnabled && isCardExpired(this.cipher.card);\n  }\n\n  ngOnDestroy() {\n    super.ngOnDestroy();\n  }\n\n  toggleFavorite() {\n    this.cipher.favorite = !this.cipher.favorite;\n  }\n\n  togglePassword() {\n    super.togglePassword();\n\n    // Hide password count when password is hidden to be safe\n    if (!this.showPassword && this.showPasswordCount) {\n      this.togglePasswordCount();\n    }\n  }\n\n  togglePasswordCount() {\n    this.showPasswordCount = !this.showPasswordCount;\n\n    if (this.editMode && this.showPasswordCount) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.eventCollectionService.collect(\n        EventType.Cipher_ClientToggledPasswordVisible,\n        this.cipherId,\n      );\n    }\n  }\n\n  launch(uri: Launchable) {\n    if (!uri.canLaunch) {\n      return;\n    }\n\n    this.platformUtilsService.launchUri(uri.launchUri);\n  }\n\n  async copy(value: string, typeI18nKey: string, aType: string): Promise<boolean> {\n    if (value == null) {\n      return false;\n    }\n\n    this.platformUtilsService.copyToClipboard(value, { window: window });\n    this.platformUtilsService.showToast(\n      \"info\",\n      null,\n      this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n    );\n\n    if (this.editMode) {\n      if (typeI18nKey === \"password\") {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, this.cipherId);\n      } else if (typeI18nKey === \"securityCode\") {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.eventCollectionService.collect(EventType.Cipher_ClientCopiedCardCode, this.cipherId);\n      } else if (aType === \"H_Field\") {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.eventCollectionService.collect(\n          EventType.Cipher_ClientCopiedHiddenField,\n          this.cipherId,\n        );\n      }\n    }\n\n    return true;\n  }\n\n  async generatePassword(): Promise<boolean> {\n    const confirmed = await super.generatePassword();\n    if (confirmed) {\n      const options = (await this.passwordGenerationService.getOptions())?.[0] ?? {};\n      this.cipher.login.password = await this.passwordGenerationService.generatePassword(options);\n    }\n    return confirmed;\n  }\n\n  premiumRequired() {\n    if (!this.canAccessPremium) {\n      this.messagingService.send(\"premiumRequired\");\n      return;\n    }\n  }\n\n  upgradeOrganization() {\n    this.messagingService.send(\"upgradeOrganization\", {\n      organizationId: this.cipher.organizationId,\n    });\n  }\n\n  showGetPremium() {\n    if (this.canAccessPremium) {\n      return;\n    }\n    if (this.cipher.organizationUseTotp) {\n      this.upgradeOrganization();\n    } else {\n      this.premiumRequired();\n    }\n  }\n\n  viewHistory() {\n    this.viewingPasswordHistory = !this.viewingPasswordHistory;\n  }\n\n  protected cleanUp() {\n    if (this.totpInterval) {\n      window.clearInterval(this.totpInterval);\n    }\n  }\n\n  protected async totpUpdateCode() {\n    if (\n      this.cipher == null ||\n      this.cipher.type !== CipherType.Login ||\n      this.cipher.login.totp == null\n    ) {\n      if (this.totpInterval) {\n        window.clearInterval(this.totpInterval);\n      }\n      return;\n    }\n\n    this.totpCode = await this.totpService.getCode(this.cipher.login.totp);\n    if (this.totpCode != null) {\n      if (this.totpCode.length > 4) {\n        const half = Math.floor(this.totpCode.length / 2);\n        this.totpCodeFormatted =\n          this.totpCode.substring(0, half) + \" \" + this.totpCode.substring(half);\n      } else {\n        this.totpCodeFormatted = this.totpCode;\n      }\n    } else {\n      this.totpCodeFormatted = null;\n      if (this.totpInterval) {\n        window.clearInterval(this.totpInterval);\n      }\n    }\n  }\n\n  protected allowOwnershipAssignment() {\n    return (\n      (!this.editMode || this.cloneMode) &&\n      this.ownershipOptions != null &&\n      (this.ownershipOptions.length > 1 || !this.allowPersonal)\n    );\n  }\n\n  protected showTotp() {\n    return (\n      this.cipher.type === CipherType.Login &&\n      this.cipher.login.totp &&\n      this.organization?.productTierType != ProductTierType.Free &&\n      (this.cipher.organizationUseTotp || this.canAccessPremium)\n    );\n  }\n\n  private async totpTick(intervalSeconds: number) {\n    const epoch = Math.round(new Date().getTime() / 1000.0);\n    const mod = epoch % intervalSeconds;\n\n    this.totpSec = intervalSeconds - mod;\n    this.totpDash = +(Math.round(((78.6 / intervalSeconds) * mod + \"e+2\") as any) + \"e-2\");\n    this.totpLow = this.totpSec <= 7;\n    if (mod === 0) {\n      await this.totpUpdateCode();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { CipherId } from \"@bitwarden/common/types/guid\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { CipherAttachmentsComponent } from \"@bitwarden/vault\";\n\nimport { SharedModule } from \"../../shared\";\n\nexport interface AttachmentsDialogParams {\n  cipherId: CipherId;\n}\n\n/**\n * Enum representing the possible results of the attachment dialog.\n */\nexport enum AttachmentDialogResult {\n  Uploaded = \"uploaded\",\n  Removed = \"removed\",\n  Closed = \"closed\",\n}\n\nexport interface AttachmentDialogCloseResult {\n  action: AttachmentDialogResult;\n}\n\n/**\n * Component for the attachments dialog.\n */\n@Component({\n  selector: \"app-vault-attachments-v2\",\n  templateUrl: \"attachments-v2.component.html\",\n  standalone: true,\n  imports: [CommonModule, SharedModule, CipherAttachmentsComponent],\n})\nexport class AttachmentsV2Component {\n  cipherId: CipherId;\n  attachmentFormId = CipherAttachmentsComponent.attachmentFormID;\n\n  /**\n   * Constructor for AttachmentsV2Component.\n   * @param dialogRef - Reference to the dialog.\n   * @param params - Parameters passed to the dialog.\n   */\n  constructor(\n    private dialogRef: DialogRef<AttachmentDialogCloseResult>,\n    @Inject(DIALOG_DATA) public params: AttachmentsDialogParams,\n  ) {\n    this.cipherId = params.cipherId;\n  }\n\n  /**\n   * Opens the attachments dialog.\n   * @param dialogService - The dialog service.\n   * @param params - The parameters for the dialog.\n   * @returns The dialog reference.\n   */\n  static open(\n    dialogService: DialogService,\n    params: AttachmentsDialogParams,\n  ): DialogRef<AttachmentDialogCloseResult> {\n    return dialogService.open(AttachmentsV2Component, {\n      data: params,\n    });\n  }\n\n  /**\n   * Called when an attachment is successfully uploaded.\n   * Closes the dialog with an 'uploaded' result.\n   */\n  uploadSuccessful() {\n    this.dialogRef.close({\n      action: AttachmentDialogResult.Uploaded,\n    });\n  }\n\n  /**\n   * Called when an attachment is successfully removed.\n   * Closes the dialog with a 'removed' result.\n   */\n  removalSuccessful() {\n    this.dialogRef.close({\n      action: AttachmentDialogResult.Removed,\n    });\n  }\n}\n","<bit-dialog dialogSize=\"default\" background=\"alt\">\n  <span bitDialogTitle>\n    {{ \"attachments\" | i18n }}\n  </span>\n  <ng-container bitDialogContent>\n    <app-cipher-attachments\n      *ngIf=\"cipherId\"\n      [cipherId]=\"cipherId\"\n      [submitBtn]=\"submitBtn\"\n      (onUploadSuccess)=\"uploadSuccessful()\"\n      (onRemoveSuccess)=\"removalSuccessful()\"\n    ></app-cipher-attachments>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"submit\" buttonType=\"primary\" [attr.form]=\"attachmentFormId\" #submitBtn>\n      {{ \"upload\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { CollectionService, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherBulkDeleteRequest } from \"@bitwarden/common/vault/models/request/cipher-bulk-delete.request\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface BulkDeleteDialogParams {\n  cipherIds?: string[];\n  permanent?: boolean;\n  organization?: Organization;\n  organizations?: Organization[];\n  collections?: CollectionView[];\n  unassignedCiphers?: string[];\n}\n\nexport enum BulkDeleteDialogResult {\n  Deleted = \"deleted\",\n  Canceled = \"canceled\",\n}\n\n/**\n * Strongly typed helper to open a BulkDeleteDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openBulkDeleteDialog = (\n  dialogService: DialogService,\n  config: DialogConfig<BulkDeleteDialogParams>,\n) => {\n  return dialogService.open<BulkDeleteDialogResult, BulkDeleteDialogParams>(\n    BulkDeleteDialogComponent,\n    config,\n  );\n};\n\n@Component({\n  templateUrl: \"bulk-delete-dialog.component.html\",\n})\nexport class BulkDeleteDialogComponent {\n  cipherIds: string[];\n  permanent = false;\n  organization: Organization;\n  organizations: Organization[];\n  collections: CollectionView[];\n  unassignedCiphers: string[];\n\n  constructor(\n    @Inject(DIALOG_DATA) params: BulkDeleteDialogParams,\n    private dialogRef: DialogRef<BulkDeleteDialogResult>,\n    private cipherService: CipherService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private apiService: ApiService,\n    private collectionService: CollectionService,\n  ) {\n    this.cipherIds = params.cipherIds ?? [];\n    this.permanent = params.permanent;\n    this.organization = params.organization;\n    this.organizations = params.organizations;\n    this.collections = params.collections;\n    this.unassignedCiphers = params.unassignedCiphers || [];\n  }\n\n  protected async cancel() {\n    this.close(BulkDeleteDialogResult.Canceled);\n  }\n\n  protected submit = async () => {\n    const deletePromises: Promise<void>[] = [];\n\n    // Unassigned ciphers under an Owner/Admin OR Custom Users With Edit will call the deleteCiphersAdmin method\n    if (this.unassignedCiphers.length && this.organization.canEditUnassignedCiphers) {\n      deletePromises.push(this.deleteCiphersAdmin(this.unassignedCiphers));\n    }\n    if (this.cipherIds.length) {\n      if (!this.organization || !this.organization.canEditAllCiphers) {\n        deletePromises.push(this.deleteCiphers());\n      } else {\n        deletePromises.push(this.deleteCiphersAdmin(this.cipherIds));\n      }\n    }\n\n    if (this.collections.length) {\n      deletePromises.push(this.deleteCollections());\n    }\n\n    await Promise.all(deletePromises);\n\n    if (this.cipherIds.length || this.unassignedCiphers.length) {\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(this.permanent ? \"permanentlyDeletedItems\" : \"deletedItems\"),\n      );\n    }\n    if (this.collections.length) {\n      await this.collectionService.delete(this.collections.map((c) => c.id));\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(\"deletedCollections\"),\n      );\n    }\n    this.close(BulkDeleteDialogResult.Deleted);\n  };\n\n  private async deleteCiphers(): Promise<any> {\n    const asAdmin = this.organization?.canEditAllCiphers;\n    if (this.permanent) {\n      await this.cipherService.deleteManyWithServer(this.cipherIds, asAdmin);\n    } else {\n      await this.cipherService.softDeleteManyWithServer(this.cipherIds, asAdmin);\n    }\n  }\n\n  private async deleteCiphersAdmin(ciphers: string[]): Promise<any> {\n    const deleteRequest = new CipherBulkDeleteRequest(ciphers, this.organization.id);\n    if (this.permanent) {\n      return await this.apiService.deleteManyCiphersAdmin(deleteRequest);\n    } else {\n      return await this.apiService.putDeleteManyCiphersAdmin(deleteRequest);\n    }\n  }\n\n  private async deleteCollections(): Promise<any> {\n    // From org vault\n    if (this.organization) {\n      if (this.collections.some((c) => !c.canDelete(this.organization))) {\n        this.platformUtilsService.showToast(\n          \"error\",\n          this.i18nService.t(\"errorOccurred\"),\n          this.i18nService.t(\"missingPermissions\"),\n        );\n        return;\n      }\n      return await this.apiService.deleteManyCollections(\n        this.organization.id,\n        this.collections.map((c) => c.id),\n      );\n      // From individual vault, so there can be multiple organizations\n    } else if (this.organizations && this.collections) {\n      const deletePromises: Promise<any>[] = [];\n      for (const organization of this.organizations) {\n        const orgCollections = this.collections.filter((o) => o.organizationId === organization.id);\n        if (orgCollections.some((c) => !c.canDelete(organization))) {\n          this.platformUtilsService.showToast(\n            \"error\",\n            this.i18nService.t(\"errorOccurred\"),\n            this.i18nService.t(\"missingPermissions\"),\n          );\n          return;\n        }\n        const orgCollectionIds = orgCollections.map((c) => c.id);\n        deletePromises.push(\n          this.apiService.deleteManyCollections(organization.id, orgCollectionIds),\n        );\n      }\n      return await Promise.all(deletePromises);\n    }\n  }\n\n  private close(result: BulkDeleteDialogResult) {\n    this.dialogRef.close(result);\n  }\n}\n","<bit-simple-dialog>\n  <span bitDialogTitle>\n    {{ (permanent ? \"permanentlyDeleteSelected\" : \"deleteSelected\") | i18n }}\n  </span>\n  <span bitDialogContent>\n    <ng-container *ngIf=\"!permanent\">\n      <span *ngIf=\"cipherIds?.length || unassignedCiphers?.length\">\n        {{ \"deleteSelectedItemsDesc\" | i18n: cipherIds.length + unassignedCiphers.length }}\n      </span>\n      <span *ngIf=\"collections?.length\">\n        {{ \"deleteSelectedCollectionsDesc\" | i18n: collections.length }}\n      </span>\n      {{ \"deleteSelectedConfirmation\" | i18n }}\n    </ng-container>\n    <ng-container *ngIf=\"permanent\">\n      {{ \"permanentlyDeleteSelectedItemsDesc\" | i18n: cipherIds.length + unassignedCiphers.length }}\n    </ng-container>\n  </span>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"submit\" buttonType=\"danger\" [bitAction]=\"submit\">\n      {{ (permanent ? \"permanentlyDelete\" : \"delete\") | i18n }}\n    </button>\n    <button bitButton type=\"button\" (click)=\"cancel()\">{{ \"cancel\" | i18n }}</button>\n  </ng-container>\n</bit-simple-dialog>\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\n\nimport { OrganizationNameBadgeComponent } from \"./organization-name-badge.component\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [OrganizationNameBadgeComponent],\n  exports: [OrganizationNameBadgeComponent],\n})\nexport class OrganizationBadgeModule {}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n  name: \"ellipsis\",\n})\n/**\n * @deprecated Use the tailwind class 'tw-truncate' instead\n */\nexport class EllipsisPipe implements PipeTransform {\n  transform(value: string, limit = 25, completeWords = false, ellipsis = \"...\") {\n    if (value.length <= limit) {\n      return value;\n    }\n    limit -= ellipsis.length;\n    if (completeWords && value.length > limit && value.indexOf(\" \") > 0) {\n      limit = value.substring(0, limit).lastIndexOf(\" \");\n    }\n    return value.substring(0, limit) + ellipsis;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnChanges } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { Unassigned } from \"@bitwarden/admin-console/common\";\nimport { AvatarService } from \"@bitwarden/common/auth/abstractions/avatar.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Component({\n  selector: \"app-org-badge\",\n  templateUrl: \"organization-name-badge.component.html\",\n})\nexport class OrganizationNameBadgeComponent implements OnChanges {\n  @Input() organizationId?: string;\n  @Input() organizationName: string;\n  @Input() disabled: boolean;\n\n  // Need a separate variable or we get weird behavior when used as part of cdk virtual scrolling\n  name: string;\n  color: string;\n  textColor: string;\n  isMe: boolean;\n\n  constructor(\n    private i18nService: I18nService,\n    private avatarService: AvatarService,\n    private tokenService: TokenService,\n  ) {}\n\n  // ngOnChanges is required since this component might be reused as part of\n  // cdk virtual scrolling\n  async ngOnChanges() {\n    this.isMe = this.organizationName == null || this.organizationName === \"\";\n\n    if (this.isMe) {\n      this.name = this.i18nService.t(\"me\");\n      this.color = await firstValueFrom(this.avatarService.avatarColor$);\n      if (this.color == null) {\n        const userId = await this.tokenService.getUserId();\n        if (userId != null) {\n          this.color = Utils.stringToColor(userId);\n        } else {\n          const userName =\n            (await this.tokenService.getName()) ?? (await this.tokenService.getEmail());\n          this.color = Utils.stringToColor(userName.toUpperCase());\n        }\n      }\n    } else {\n      this.name = this.organizationName;\n      this.color = Utils.stringToColor(this.organizationName.toUpperCase());\n    }\n    this.textColor = Utils.pickTextColorBasedOnBgColor(this.color, 135, true) + \"!important\";\n  }\n\n  get organizationIdLink() {\n    return this.organizationId ?? Unassigned;\n  }\n}\n","<button\n  bitBadge\n  type=\"button\"\n  [disabled]=\"disabled\"\n  [style.color]=\"textColor\"\n  [style.background-color]=\"color\"\n  appA11yTitle=\"{{ organizationName }}\"\n  routerLink\n  [queryParams]=\"{ organizationId: organizationIdLink }\"\n  queryParamsHandling=\"merge\"\n>\n  {{ name | ellipsis: 13 }}\n</button>\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\n@Pipe({\n  name: \"orgNameFromId\",\n  pure: true,\n})\nexport class GetOrgNameFromIdPipe implements PipeTransform {\n  transform(value: string, organizations: Organization[]) {\n    const orgName = organizations?.find((o) => o.id === value)?.name;\n    return orgName;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { GetCollectionNameFromIdPipe } from \"./get-collection-name.pipe\";\nimport { GetGroupNameFromIdPipe } from \"./get-group-name.pipe\";\nimport { GetOrgNameFromIdPipe } from \"./get-organization-name.pipe\";\n\n@NgModule({\n  declarations: [GetOrgNameFromIdPipe, GetCollectionNameFromIdPipe, GetGroupNameFromIdPipe],\n  exports: [GetOrgNameFromIdPipe, GetCollectionNameFromIdPipe, GetGroupNameFromIdPipe],\n})\nexport class PipesModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordEnrollmentRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { UserVerificationDialogComponent } from \"@bitwarden/auth/angular\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { OrganizationUserResetPasswordService } from \"../members/services/organization-user-reset-password/organization-user-reset-password.service\";\n\ninterface EnrollMasterPasswordResetData {\n  organization: Organization;\n}\n\nexport class EnrollMasterPasswordReset {\n  constructor() {}\n\n  static async open(\n    dialogService: DialogService,\n    data: EnrollMasterPasswordResetData,\n    resetPasswordService: OrganizationUserResetPasswordService,\n    organizationUserApiService: OrganizationUserApiService,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    syncService: SyncService,\n    logService: LogService,\n    userVerificationService: UserVerificationService,\n    toastService: ToastService,\n  ) {\n    const result = await UserVerificationDialogComponent.open(dialogService, {\n      title: \"enrollAccountRecovery\",\n      calloutOptions: {\n        text: \"resetPasswordEnrollmentWarning\",\n        type: \"warning\",\n      },\n      verificationType: {\n        type: \"custom\",\n        verificationFn: async (secret: VerificationWithSecret) => {\n          const request =\n            await userVerificationService.buildRequest<OrganizationUserResetPasswordEnrollmentRequest>(\n              secret,\n            );\n          request.resetPasswordKey = await resetPasswordService.buildRecoveryKey(\n            data.organization.id,\n          );\n\n          // Process the enrollment request, which is an endpoint that is\n          // gated by a server-side check of the master password hash\n          await organizationUserApiService.putOrganizationUserResetPasswordEnrollment(\n            data.organization.id,\n            data.organization.userId,\n            request,\n          );\n          return true;\n        },\n      },\n    });\n\n    // User canceled enrollment\n    if (result.userAction === \"cancel\") {\n      return;\n    }\n\n    // Enrollment failed\n    if (!result.verificationSuccess) {\n      return;\n    }\n\n    // Enrollment succeeded\n    try {\n      toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: i18nService.t(\"enrollPasswordResetSuccess\"),\n      });\n      await syncService.fullSync(true);\n    } catch (e) {\n      logService.error(e);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AfterContentInit, Directive, HostListener, Input } from \"@angular/core\";\n\nimport { SsoComponent } from \"@bitwarden/angular/auth/components/sso.component\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\n@Directive({\n  selector: \"[app-link-sso]\",\n})\nexport class LinkSsoDirective extends SsoComponent implements AfterContentInit {\n  @Input() organization: Organization;\n  returnUri = \"/settings/organizations\";\n  redirectUri = window.location.origin + \"/sso-connector.html\";\n  clientId = \"web\";\n\n  @HostListener(\"click\", [\"$event\"])\n  async onClick($event: MouseEvent) {\n    $event.preventDefault();\n    await this.submit(this.returnUri, true);\n  }\n\n  async ngAfterContentInit() {\n    this.identifier = this.organization.identifier;\n  }\n}\n","<ng-container *ngIf=\"!hideMenu\">\n  <button\n    type=\"button\"\n    [bitMenuTriggerFor]=\"optionsMenu\"\n    class=\"filter-options-icon\"\n    [attr.aria-label]=\"'organizationOptionsMenu' | i18n\"\n  >\n    <i class=\"bwi bwi-ellipsis-v\" aria-hidden=\"true\"></i>\n  </button>\n  <bit-menu class=\"filter-organization-options\" #optionsMenu>\n    <ng-container *ngIf=\"!loaded\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin tw-m-2 tw-text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </ng-container>\n    <div\n      *ngIf=\"loaded\"\n      class=\"tw-flex tw-min-w-[200px] tw-max-w-[300px] tw-flex-col\"\n      [appApiAction]=\"actionPromise\"\n    >\n      <button\n        type=\"button\"\n        *ngIf=\"allowEnrollmentChanges(organization) && !organization.resetPasswordEnrolled\"\n        bitMenuItem\n        (click)=\"toggleResetPasswordEnrollment(organization)\"\n      >\n        <i class=\"bwi bwi-fw bwi-key\" aria-hidden=\"true\"></i>\n        {{ \"enrollAccountRecovery\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        *ngIf=\"allowEnrollmentChanges(organization) && organization.resetPasswordEnrolled\"\n        bitMenuItem\n        (click)=\"toggleResetPasswordEnrollment(organization)\"\n      >\n        <i class=\"bwi bwi-fw bwi-undo\" aria-hidden=\"true\"></i>\n        {{ \"withdrawAccountRecovery\" | i18n }}\n      </button>\n      <ng-container *ngIf=\"showSsoOptions(organization)\">\n        <button\n          type=\"button\"\n          *ngIf=\"organization.ssoBound; else linkSso\"\n          bitMenuItem\n          (click)=\"unlinkSso(organization)\"\n        >\n          <i class=\"bwi bwi-fw bwi-chain-broken\" aria-hidden=\"true\"></i>\n          {{ \"unlinkSso\" | i18n }}\n        </button>\n        <ng-template #linkSso>\n          <a href=\"#\" bitMenuItem app-link-sso [organization]=\"organization\">\n            <i class=\"bwi bwi-fw bwi-link\" aria-hidden=\"true\"></i>\n            {{ \"linkSso\" | i18n }}\n          </a>\n        </ng-template>\n      </ng-container>\n      <button *ngIf=\"showLeaveOrgOption\" type=\"button\" bitMenuItem (click)=\"leave(organization)\">\n        <i class=\"bwi bwi-fw bwi-sign-out tw-text-danger\" aria-hidden=\"true\"></i>\n        <span class=\"tw-text-danger\">{{ \"leave\" | i18n }}</span>\n      </button>\n    </div>\n  </bit-menu>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Inject, OnDestroy, OnInit } from \"@angular/core\";\nimport { combineLatest, map, Observable, of, Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordEnrollmentRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { OrganizationUserResetPasswordService } from \"../../../../admin-console/organizations/members/services/organization-user-reset-password/organization-user-reset-password.service\";\nimport { EnrollMasterPasswordReset } from \"../../../../admin-console/organizations/users/enroll-master-password-reset.component\";\nimport { OptionsInput } from \"../shared/components/vault-filter-section.component\";\nimport { OrganizationFilter } from \"../shared/models/vault-filter.type\";\n\n@Component({\n  selector: \"app-organization-options\",\n  templateUrl: \"organization-options.component.html\",\n})\nexport class OrganizationOptionsComponent implements OnInit, OnDestroy {\n  protected actionPromise: Promise<void | boolean>;\n  protected resetPasswordPolicy?: Policy | undefined;\n  protected loaded = false;\n  protected hideMenu = false;\n  protected showLeaveOrgOption = false;\n  protected organization: OrganizationFilter;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    @Inject(OptionsInput) protected organization$: Observable<OrganizationFilter>,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private apiService: ApiService,\n    private syncService: SyncService,\n    private policyService: PolicyService,\n    private logService: LogService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private organizationUserApiService: OrganizationUserApiService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private dialogService: DialogService,\n    private resetPasswordService: OrganizationUserResetPasswordService,\n    private userVerificationService: UserVerificationService,\n    private toastService: ToastService,\n    private configService: ConfigService,\n    private organizationService: OrganizationService,\n  ) {}\n\n  async ngOnInit() {\n    const resetPasswordPolicies$ = this.policyService.policies$.pipe(\n      map((policies) => policies.filter((policy) => policy.type === PolicyType.ResetPassword)),\n    );\n\n    const managingOrg$ = this.configService\n      .getFeatureFlag$(FeatureFlag.AccountDeprovisioning)\n      .pipe(\n        switchMap((isAccountDeprovisioningEnabled) =>\n          isAccountDeprovisioningEnabled\n            ? this.organizationService.organizations$.pipe(\n                map((organizations) =>\n                  organizations.find((o) => o.userIsManagedByOrganization === true),\n                ),\n              )\n            : of(null),\n        ),\n      );\n\n    combineLatest([\n      this.organization$,\n      resetPasswordPolicies$,\n      this.userDecryptionOptionsService.userDecryptionOptions$,\n      managingOrg$,\n    ])\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(([organization, resetPasswordPolicies, decryptionOptions, managingOrg]) => {\n        this.organization = organization;\n        this.resetPasswordPolicy = resetPasswordPolicies.find(\n          (p) => p.organizationId === organization.id,\n        );\n\n        // A user can leave an organization if they are NOT a managed user and they are NOT using TDE and Key Connector, or they have a master password.\n        this.showLeaveOrgOption =\n          managingOrg?.id !== organization.id &&\n          ((decryptionOptions.trustedDeviceOption == undefined &&\n            decryptionOptions.keyConnectorOption == undefined) ||\n            decryptionOptions.hasMasterPassword);\n\n        // Hide the 3 dot menu if the user has no available actions\n        this.hideMenu =\n          !this.showLeaveOrgOption &&\n          !this.showSsoOptions(this.organization) &&\n          !this.allowEnrollmentChanges(this.organization);\n\n        this.loaded = true;\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  allowEnrollmentChanges(org: OrganizationFilter): boolean {\n    if (org?.usePolicies && org?.useResetPassword && org?.hasPublicAndPrivateKeys) {\n      if (this.resetPasswordPolicy != undefined && this.resetPasswordPolicy.enabled) {\n        return !(org?.resetPasswordEnrolled && this.resetPasswordPolicy.data.autoEnrollEnabled);\n      }\n    }\n\n    return false;\n  }\n\n  showSsoOptions(org: OrganizationFilter) {\n    return org?.useSso && org?.identifier;\n  }\n\n  async unlinkSso(org: Organization) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: org.name,\n      content: { key: \"unlinkSsoConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.actionPromise = this.apiService.deleteSsoUser(org.id).then(() => {\n        return this.syncService.fullSync(true);\n      });\n      await this.actionPromise;\n      this.platformUtilsService.showToast(\"success\", null, \"Unlinked SSO\");\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async leave(org: Organization) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: org.name,\n      content: { key: \"leaveOrganizationConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.actionPromise = this.organizationApiService.leave(org.id);\n      await this.actionPromise;\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"leftOrganization\"));\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async toggleResetPasswordEnrollment(org: Organization) {\n    if (!this.organization.resetPasswordEnrolled) {\n      await EnrollMasterPasswordReset.open(\n        this.dialogService,\n        { organization: org },\n        this.resetPasswordService,\n        this.organizationUserApiService,\n        this.platformUtilsService,\n        this.i18nService,\n        this.syncService,\n        this.logService,\n        this.userVerificationService,\n        this.toastService,\n      );\n    } else {\n      // Remove reset password\n      const request = new OrganizationUserResetPasswordEnrollmentRequest();\n      request.masterPasswordHash = \"ignored\";\n      request.resetPasswordKey = null;\n      this.actionPromise =\n        this.organizationUserApiService.putOrganizationUserResetPasswordEnrollment(\n          this.organization.id,\n          this.organization.userId,\n          request,\n        );\n      try {\n        await this.actionPromise;\n        this.platformUtilsService.showToast(\n          \"success\",\n          null,\n          this.i18nService.t(\"withdrawPasswordResetSuccess\"),\n        );\n        await this.syncService.fullSync(true);\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n  }\n}\n","<div class=\"card vault-filters\">\n  <div class=\"container loading-spinner\" *ngIf=\"!isLoaded\">\n    <i class=\"bwi bwi-spinner bwi-spin bwi-3x\" aria-hidden=\"true\"></i>\n  </div>\n  <div *ngIf=\"isLoaded\">\n    <div class=\"card-header d-flex\">\n      {{ \"filters\" | i18n }}\n      <a\n        class=\"ml-auto\"\n        href=\"https://bitwarden.com/help/searching-vault/\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n        appA11yTitle=\"{{ 'learnMoreAboutSearchingYourVault' | i18n }}\"\n      >\n        <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n      </a>\n    </div>\n    <div class=\"card-body\">\n      <div class=\"tw-mb-4\">\n        <bit-search\n          id=\"search\"\n          placeholder=\"{{ searchPlaceholder | i18n }}\"\n          [(ngModel)]=\"searchText\"\n          (ngModelChange)=\"onSearchTextChanged($event)\"\n          autocomplete=\"off\"\n          appAutofocus\n        />\n      </div>\n      <ng-container *ngFor=\"let f of filtersList\">\n        <div class=\"filter\">\n          <app-filter-section [activeFilter]=\"activeFilter\" [section]=\"f\"> </app-filter-section>\n        </div>\n      </ng-container>\n    </div>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, inject, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, Subject } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billing-api.service.abstraction\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { TrialFlowService } from \"../../../../billing/services/trial-flow.service\";\nimport { VaultFilterService } from \"../services/abstractions/vault-filter.service\";\nimport {\n  VaultFilterList,\n  VaultFilterSection,\n  VaultFilterType,\n} from \"../shared/models/vault-filter-section.type\";\nimport { VaultFilter } from \"../shared/models/vault-filter.model\";\nimport {\n  CipherStatus,\n  CipherTypeFilter,\n  CollectionFilter,\n  FolderFilter,\n  OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { OrganizationOptionsComponent } from \"./organization-options.component\";\n\n@Component({\n  selector: \"app-vault-filter\",\n  templateUrl: \"vault-filter.component.html\",\n})\nexport class VaultFilterComponent implements OnInit, OnDestroy {\n  filters?: VaultFilterList;\n  @Input() activeFilter: VaultFilter = new VaultFilter();\n  @Output() onEditFolder = new EventEmitter<FolderFilter>();\n\n  @Input() searchText = \"\";\n  @Output() searchTextChanged = new EventEmitter<string>();\n\n  isLoaded = false;\n\n  protected destroy$: Subject<void> = new Subject<void>();\n  private router = inject(Router);\n  get filtersList() {\n    return this.filters ? Object.values(this.filters) : [];\n  }\n\n  get searchPlaceholder() {\n    if (this.activeFilter.isFavorites) {\n      return \"searchFavorites\";\n    }\n    if (this.activeFilter.isDeleted) {\n      return \"searchTrash\";\n    }\n    if (this.activeFilter.cipherType === CipherType.Login) {\n      return \"searchLogin\";\n    }\n    if (this.activeFilter.cipherType === CipherType.Card) {\n      return \"searchCard\";\n    }\n    if (this.activeFilter.cipherType === CipherType.Identity) {\n      return \"searchIdentity\";\n    }\n    if (this.activeFilter.cipherType === CipherType.SecureNote) {\n      return \"searchSecureNote\";\n    }\n    if (this.activeFilter.cipherType === CipherType.SshKey) {\n      return \"searchSshKey\";\n    }\n    if (this.activeFilter.selectedFolderNode?.node) {\n      return \"searchFolder\";\n    }\n    if (this.activeFilter.selectedCollectionNode?.node) {\n      return \"searchCollection\";\n    }\n    if (this.activeFilter.organizationId === \"MyVault\") {\n      return \"searchMyVault\";\n    }\n    if (this.activeFilter.organizationId) {\n      return \"searchOrganization\";\n    }\n\n    return \"searchVault\";\n  }\n\n  private trialFlowService = inject(TrialFlowService);\n\n  constructor(\n    protected vaultFilterService: VaultFilterService,\n    protected policyService: PolicyService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected billingApiService: BillingApiServiceAbstraction,\n    protected dialogService: DialogService,\n    protected configService: ConfigService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.filters = await this.buildAllFilters();\n    this.activeFilter.selectedCipherTypeNode =\n      (await this.getDefaultFilter()) as TreeNode<CipherTypeFilter>;\n    this.isLoaded = true;\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  onSearchTextChanged(t: string) {\n    this.searchText = t;\n    this.searchTextChanged.emit(t);\n  }\n\n  applyOrganizationFilter = async (orgNode: TreeNode<OrganizationFilter>): Promise<void> => {\n    if (!orgNode?.node.enabled) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        null,\n        this.i18nService.t(\"disabledOrganizationFilterError\"),\n      );\n      const metadata = await this.billingApiService.getOrganizationBillingMetadata(orgNode.node.id);\n      await this.trialFlowService.handleUnpaidSubscriptionDialog(orgNode.node, metadata);\n    }\n    const filter = this.activeFilter;\n    if (orgNode?.node.id === \"AllVaults\") {\n      filter.resetOrganization();\n    } else {\n      filter.selectedOrganizationNode = orgNode;\n    }\n    this.vaultFilterService.setOrganizationFilter(orgNode.node);\n    await this.vaultFilterService.expandOrgFilter();\n  };\n\n  applyTypeFilter = async (filterNode: TreeNode<CipherTypeFilter>): Promise<void> => {\n    const filter = this.activeFilter;\n    filter.resetFilter();\n    filter.selectedCipherTypeNode = filterNode;\n  };\n\n  applyFolderFilter = async (folderNode: TreeNode<FolderFilter>): Promise<void> => {\n    const filter = this.activeFilter;\n    filter.resetFilter();\n    filter.selectedFolderNode = folderNode;\n  };\n\n  applyCollectionFilter = async (collectionNode: TreeNode<CollectionFilter>): Promise<void> => {\n    const filter = this.activeFilter;\n    filter.resetFilter();\n    filter.selectedCollectionNode = collectionNode;\n  };\n\n  editFolder = async (folder: FolderFilter): Promise<void> => {\n    this.onEditFolder.emit(folder);\n  };\n\n  async getDefaultFilter(): Promise<TreeNode<VaultFilterType>> {\n    return await firstValueFrom(this.filters?.typeFilter.data$);\n  }\n\n  async buildAllFilters(): Promise<VaultFilterList> {\n    const builderFilter = {} as VaultFilterList;\n    builderFilter.organizationFilter = await this.addOrganizationFilter();\n    builderFilter.typeFilter = await this.addTypeFilter();\n    builderFilter.folderFilter = await this.addFolderFilter();\n    builderFilter.collectionFilter = await this.addCollectionFilter();\n    builderFilter.trashFilter = await this.addTrashFilter();\n    return builderFilter;\n  }\n\n  protected async addOrganizationFilter(): Promise<VaultFilterSection> {\n    const singleOrgPolicy = await this.policyService.policyAppliesToUser(PolicyType.SingleOrg);\n    const personalVaultPolicy = await this.policyService.policyAppliesToUser(\n      PolicyType.PersonalOwnership,\n    );\n\n    const addAction = !singleOrgPolicy\n      ? { text: \"newOrganization\", route: \"/create-organization\" }\n      : null;\n\n    const orgFilterSection: VaultFilterSection = {\n      data$: this.vaultFilterService.organizationTree$,\n      header: {\n        showHeader: !(singleOrgPolicy && personalVaultPolicy),\n        isSelectable: true,\n      },\n      action: this.applyOrganizationFilter,\n      options: { component: OrganizationOptionsComponent },\n      add: addAction,\n      divider: true,\n    };\n\n    return orgFilterSection;\n  }\n\n  protected async addTypeFilter(excludeTypes: CipherStatus[] = []): Promise<VaultFilterSection> {\n    const allTypeFilters: CipherTypeFilter[] = [\n      {\n        id: \"favorites\",\n        name: this.i18nService.t(\"favorites\"),\n        type: \"favorites\",\n        icon: \"bwi-star\",\n      },\n      {\n        id: \"login\",\n        name: this.i18nService.t(\"typeLogin\"),\n        type: CipherType.Login,\n        icon: \"bwi-globe\",\n      },\n      {\n        id: \"card\",\n        name: this.i18nService.t(\"typeCard\"),\n        type: CipherType.Card,\n        icon: \"bwi-credit-card\",\n      },\n      {\n        id: \"identity\",\n        name: this.i18nService.t(\"typeIdentity\"),\n        type: CipherType.Identity,\n        icon: \"bwi-id-card\",\n      },\n      {\n        id: \"note\",\n        name: this.i18nService.t(\"typeSecureNote\"),\n        type: CipherType.SecureNote,\n        icon: \"bwi-sticky-note\",\n      },\n    ];\n\n    if (await this.configService.getFeatureFlag(FeatureFlag.SSHKeyVaultItem)) {\n      allTypeFilters.push({\n        id: \"sshKey\",\n        name: this.i18nService.t(\"typeSshKey\"),\n        type: CipherType.SshKey,\n        icon: \"bwi-key\",\n      });\n    }\n\n    const typeFilterSection: VaultFilterSection = {\n      data$: this.vaultFilterService.buildTypeTree(\n        { id: \"AllItems\", name: \"allItems\", type: \"all\", icon: \"\" },\n        allTypeFilters.filter((f) => !excludeTypes.includes(f.type)),\n      ),\n      header: {\n        showHeader: true,\n        isSelectable: true,\n      },\n      action: this.applyTypeFilter,\n    };\n    return typeFilterSection;\n  }\n\n  protected async addFolderFilter(): Promise<VaultFilterSection> {\n    const folderFilterSection: VaultFilterSection = {\n      data$: this.vaultFilterService.folderTree$,\n      header: {\n        showHeader: true,\n        isSelectable: false,\n      },\n      action: this.applyFolderFilter,\n      edit: {\n        text: \"editFolder\",\n        action: this.editFolder,\n      },\n    };\n    return folderFilterSection;\n  }\n\n  protected async addCollectionFilter(): Promise<VaultFilterSection> {\n    const collectionFilterSection: VaultFilterSection = {\n      data$: this.vaultFilterService.collectionTree$,\n      header: {\n        showHeader: true,\n        isSelectable: true,\n      },\n      action: this.applyCollectionFilter,\n    };\n    return collectionFilterSection;\n  }\n\n  protected async addTrashFilter(): Promise<VaultFilterSection> {\n    const trashFilterSection: VaultFilterSection = {\n      data$: this.vaultFilterService.buildTypeTree(\n        {\n          id: \"headTrash\",\n          name: \"HeadTrash\",\n          type: \"trash\",\n          icon: \"bwi-trash\",\n        },\n        [\n          {\n            id: \"trash\",\n            name: this.i18nService.t(\"trash\"),\n            type: \"trash\",\n            icon: \"bwi-trash\",\n          },\n        ],\n      ),\n      header: {\n        showHeader: false,\n        isSelectable: true,\n      },\n      action: this.applyTypeFilter,\n    };\n    return trashFilterSection;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { CollectionAdminView, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FolderView } from \"@bitwarden/common/src/vault/models/view/folder.view\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport {\n  CipherTypeFilter,\n  CollectionFilter,\n  FolderFilter,\n  OrganizationFilter,\n} from \"../../shared/models/vault-filter.type\";\n\nexport abstract class VaultFilterService {\n  collapsedFilterNodes$: Observable<Set<string>>;\n  filteredFolders$: Observable<FolderView[]>;\n  filteredCollections$: Observable<CollectionView[]>;\n  organizationTree$: Observable<TreeNode<OrganizationFilter>>;\n  folderTree$: Observable<TreeNode<FolderFilter>>;\n  collectionTree$: Observable<TreeNode<CollectionFilter>>;\n  cipherTypeTree$: Observable<TreeNode<CipherTypeFilter>>;\n  getCollectionNodeFromTree: (id: string) => Promise<TreeNode<CollectionFilter>>;\n  setCollapsedFilterNodes: (collapsedFilterNodes: Set<string>) => Promise<void>;\n  expandOrgFilter: () => Promise<void>;\n  getOrganizationFilter: () => Observable<Organization>;\n  setOrganizationFilter: (organization: Organization) => void;\n  buildTypeTree: (\n    head: CipherTypeFilter,\n    array: CipherTypeFilter[],\n  ) => Observable<TreeNode<CipherTypeFilter>>;\n  // TODO: Remove this from org vault when collection admin service adopts state management\n  reloadCollections?: (collections: CollectionAdminView[]) => void;\n  clearOrganizationFilter: () => void;\n}\n","import { Unassigned } from \"@bitwarden/admin-console/common\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { RoutedVaultFilterBridgeService } from \"../../services/routed-vault-filter-bridge.service\";\n\nimport {\n  All,\n  isRoutedVaultFilterItemType,\n  RoutedVaultFilterItemType,\n  RoutedVaultFilterModel,\n} from \"./routed-vault-filter.model\";\nimport { VaultFilter, VaultFilterFunction } from \"./vault-filter.model\";\nimport {\n  OrganizationFilter,\n  CipherTypeFilter,\n  FolderFilter,\n  CollectionFilter,\n  CipherStatus,\n} from \"./vault-filter.type\";\n\n/**\n * This file is part of a layer that is used to temporary bridge between URL filtering and the old state-in-code method.\n * This should be removed after we have refactored the {@link VaultItemsComponent} and introduced vertical navigation\n * (which will refactor the {@link VaultFilterComponent}).\n *\n * This model supplies legacy code with the old state-in-code models saved as tree nodes.\n * It can also receive requests to select a new tree node by using setters.\n * However instead of just replacing the tree node models, it requests a URL navigation,\n * thereby bridging between legacy and URL filtering.\n */\nexport class RoutedVaultFilterBridge implements VaultFilter {\n  constructor(\n    private routedFilter: RoutedVaultFilterModel,\n    private legacyFilter: VaultFilter,\n    private bridgeService: RoutedVaultFilterBridgeService,\n  ) {}\n  get collectionBreadcrumbs(): TreeNode<CollectionFilter>[] {\n    return this.legacyFilter.collectionBreadcrumbs;\n  }\n  get isCollectionSelected(): boolean {\n    return this.legacyFilter.isCollectionSelected;\n  }\n  get isUnassignedCollectionSelected(): boolean {\n    return this.legacyFilter.isUnassignedCollectionSelected;\n  }\n  get isMyVaultSelected(): boolean {\n    return this.legacyFilter.isMyVaultSelected;\n  }\n  get selectedOrganizationNode(): TreeNode<OrganizationFilter> {\n    return this.legacyFilter.selectedOrganizationNode;\n  }\n  set selectedOrganizationNode(value: TreeNode<OrganizationFilter>) {\n    this.bridgeService.navigate({\n      ...this.routedFilter,\n      organizationId: value?.node.id === \"MyVault\" ? Unassigned : value?.node.id,\n      folderId: undefined,\n      collectionId: undefined,\n    });\n  }\n  get selectedCipherTypeNode(): TreeNode<CipherTypeFilter> {\n    return this.legacyFilter.selectedCipherTypeNode;\n  }\n  set selectedCipherTypeNode(value: TreeNode<CipherTypeFilter>) {\n    let type: RoutedVaultFilterItemType | undefined;\n\n    if (value?.node.id === \"AllItems\" && this.routedFilter.organizationIdParamType === \"path\") {\n      type = \"all\";\n    } else if (\n      value?.node.id === \"AllItems\" &&\n      this.routedFilter.organizationIdParamType === \"query\"\n    ) {\n      type = undefined;\n    } else if (isRoutedVaultFilterItemType(value?.node.id)) {\n      type = value?.node.id;\n    }\n\n    this.bridgeService.navigate({\n      ...this.routedFilter,\n      type,\n      folderId: undefined,\n      collectionId: undefined,\n    });\n  }\n  get selectedFolderNode(): TreeNode<FolderFilter> {\n    return this.legacyFilter.selectedFolderNode;\n  }\n  set selectedFolderNode(value: TreeNode<FolderFilter>) {\n    const folderId = value != null && value.node.id === null ? Unassigned : value?.node.id;\n    this.bridgeService.navigate({\n      ...this.routedFilter,\n      folderId,\n      type: undefined,\n      collectionId: undefined,\n    });\n  }\n  get selectedCollectionNode(): TreeNode<CollectionFilter> {\n    return this.legacyFilter.selectedCollectionNode;\n  }\n  set selectedCollectionNode(value: TreeNode<CollectionFilter>) {\n    let collectionId: string | undefined;\n\n    if (value != null && value.node.id === null) {\n      collectionId = Unassigned;\n    } else if (\n      value?.node.id === \"AllCollections\" &&\n      this.routedFilter.organizationIdParamType === \"path\"\n    ) {\n      collectionId = undefined;\n    } else if (\n      value?.node.id === \"AllCollections\" &&\n      this.routedFilter.organizationIdParamType === \"query\"\n    ) {\n      collectionId = All;\n    } else {\n      collectionId = value?.node.id;\n    }\n\n    this.bridgeService.navigate({\n      ...this.routedFilter,\n      collectionId,\n      type: undefined,\n      folderId: undefined,\n    });\n  }\n  get isFavorites(): boolean {\n    return this.legacyFilter.isFavorites;\n  }\n  get isDeleted(): boolean {\n    return this.legacyFilter.isDeleted;\n  }\n  get organizationId(): string {\n    return this.legacyFilter.organizationId;\n  }\n  get cipherType(): CipherType {\n    return this.legacyFilter.cipherType;\n  }\n  get cipherStatus(): CipherStatus {\n    return this.legacyFilter.cipherStatus;\n  }\n  get cipherTypeId(): string {\n    return this.legacyFilter.cipherTypeId;\n  }\n  get folderId(): string {\n    return this.legacyFilter.folderId;\n  }\n  get collectionId(): string {\n    return this.legacyFilter.collectionId;\n  }\n  resetFilter(): void {\n    this.bridgeService.navigate({\n      ...this.routedFilter,\n      collectionId: undefined,\n      folderId: undefined,\n      organizationId:\n        this.routedFilter.organizationIdParamType === \"path\"\n          ? this.routedFilter.organizationId\n          : undefined,\n      type: undefined,\n    });\n  }\n  resetOrganization(): void {\n    this.bridgeService.navigate({ ...this.routedFilter, organizationId: undefined });\n  }\n  buildFilter(): VaultFilterFunction {\n    return this.legacyFilter.buildFilter();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { combineLatest, map, Observable } from \"rxjs\";\n\nimport { Unassigned } from \"@bitwarden/admin-console/common\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\n\nimport { RoutedVaultFilterBridge } from \"../shared/models/routed-vault-filter-bridge.model\";\nimport { RoutedVaultFilterModel, All } from \"../shared/models/routed-vault-filter.model\";\nimport { VaultFilter } from \"../shared/models/vault-filter.model\";\nimport {\n  CipherTypeFilter,\n  CollectionFilter,\n  FolderFilter,\n  OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { VaultFilterService } from \"./abstractions/vault-filter.service\";\nimport { RoutedVaultFilterService } from \"./routed-vault-filter.service\";\n\n/**\n * This file is part of a layer that is used to temporary bridge between URL filtering and the old state-in-code method.\n * This should be removed after we have refactored the {@link VaultItemsComponent} and introduced vertical navigation\n * (which will refactor the {@link VaultFilterComponent}).\n *\n * This class listens to both the new {@link RoutedVaultFilterService} and the old {@link VaultFilterService}.\n * When a new filter is emitted the service uses the ids to find the corresponding tree nodes needed for\n * the old {@link VaultFilter} model. It then emits a bridge model that contains this information.\n */\n@Injectable()\nexport class RoutedVaultFilterBridgeService {\n  readonly activeFilter$: Observable<VaultFilter>;\n\n  constructor(\n    private router: Router,\n    private routedVaultFilterService: RoutedVaultFilterService,\n    legacyVaultFilterService: VaultFilterService,\n  ) {\n    this.activeFilter$ = combineLatest([\n      routedVaultFilterService.filter$,\n      legacyVaultFilterService.collectionTree$,\n      legacyVaultFilterService.folderTree$,\n      legacyVaultFilterService.organizationTree$,\n      legacyVaultFilterService.cipherTypeTree$,\n    ]).pipe(\n      map(([filter, collectionTree, folderTree, organizationTree, cipherTypeTree]) => {\n        const legacyFilter = isAdminConsole(filter)\n          ? createLegacyFilterForAdminConsole(filter, collectionTree, cipherTypeTree)\n          : createLegacyFilterForEndUser(\n              filter,\n              collectionTree,\n              folderTree,\n              organizationTree,\n              cipherTypeTree,\n            );\n\n        return new RoutedVaultFilterBridge(filter, legacyFilter, this);\n      }),\n    );\n  }\n\n  navigate(filter: RoutedVaultFilterModel) {\n    const [commands, extras] = this.routedVaultFilterService.createRoute(filter);\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate(commands, extras);\n  }\n}\n\n/**\n * Check if the filtering is being done as part of admin console.\n * Admin console can be identified by checking if the `organizationId`\n * is part of the path.\n *\n * @param filter Model to check if origin is admin console\n * @returns true if filtering being done as part of admin console\n */\nfunction isAdminConsole(filter: RoutedVaultFilterModel) {\n  return filter.organizationIdParamType === \"path\";\n}\n\nfunction createLegacyFilterForAdminConsole(\n  filter: RoutedVaultFilterModel,\n  collectionTree: TreeNode<CollectionFilter>,\n  cipherTypeTree: TreeNode<CipherTypeFilter>,\n): VaultFilter {\n  const legacyFilter = new VaultFilter();\n\n  if (filter.collectionId === undefined && filter.type === undefined) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n      collectionTree,\n      \"AllCollections\",\n    );\n  } else if (filter.collectionId !== undefined && filter.collectionId === Unassigned) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(collectionTree, null);\n  } else if (filter.collectionId !== undefined) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n      collectionTree,\n      filter.collectionId,\n    );\n  }\n\n  if (filter.collectionId === undefined && filter.type === All) {\n    legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n      cipherTypeTree,\n      \"AllItems\",\n    );\n  } else if (filter.type !== undefined && filter.type === \"trash\") {\n    legacyFilter.selectedCipherTypeNode = new TreeNode<CipherTypeFilter>(\n      { id: \"trash\", name: \"\", type: \"trash\", icon: \"\" },\n      null,\n    );\n  } else if (filter.type !== undefined && filter.type !== \"trash\") {\n    legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n      cipherTypeTree,\n      filter.type,\n    );\n  }\n\n  return legacyFilter;\n}\n\nfunction createLegacyFilterForEndUser(\n  filter: RoutedVaultFilterModel,\n  collectionTree: TreeNode<CollectionFilter>,\n  folderTree: TreeNode<FolderFilter>,\n  organizationTree: TreeNode<OrganizationFilter>,\n  cipherTypeTree: TreeNode<CipherTypeFilter>,\n): VaultFilter {\n  const legacyFilter = new VaultFilter();\n\n  if (filter.collectionId !== undefined && filter.collectionId === Unassigned) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(collectionTree, null);\n  } else if (filter.collectionId !== undefined && filter.collectionId === All) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n      collectionTree,\n      \"AllCollections\",\n    );\n  } else if (filter.collectionId !== undefined) {\n    legacyFilter.selectedCollectionNode = ServiceUtils.getTreeNodeObject(\n      collectionTree,\n      filter.collectionId,\n    );\n  }\n\n  if (filter.folderId !== undefined && filter.folderId === Unassigned) {\n    legacyFilter.selectedFolderNode = ServiceUtils.getTreeNodeObject(folderTree, null);\n  } else if (filter.folderId !== undefined && filter.folderId !== Unassigned) {\n    legacyFilter.selectedFolderNode = ServiceUtils.getTreeNodeObject(folderTree, filter.folderId);\n  }\n\n  if (filter.organizationId !== undefined && filter.organizationId === Unassigned) {\n    legacyFilter.selectedOrganizationNode = ServiceUtils.getTreeNodeObject(\n      organizationTree,\n      \"MyVault\",\n    );\n  } else if (filter.organizationId !== undefined && filter.organizationId !== Unassigned) {\n    legacyFilter.selectedOrganizationNode = ServiceUtils.getTreeNodeObject(\n      organizationTree,\n      filter.organizationId,\n    );\n  }\n\n  if (filter.type === undefined) {\n    legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n      cipherTypeTree,\n      \"AllItems\",\n    );\n  } else if (filter.type !== undefined && filter.type === \"trash\") {\n    legacyFilter.selectedCipherTypeNode = new TreeNode<CipherTypeFilter>(\n      { id: \"trash\", name: \"\", type: \"trash\", icon: \"\" },\n      null,\n    );\n  } else if (filter.type !== undefined && filter.type !== \"trash\") {\n    legacyFilter.selectedCipherTypeNode = ServiceUtils.getTreeNodeObject(\n      cipherTypeTree,\n      filter.type,\n    );\n  }\n\n  return legacyFilter;\n}\n","import { Injectable, OnDestroy } from \"@angular/core\";\nimport { ActivatedRoute, NavigationExtras } from \"@angular/router\";\nimport { combineLatest, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport {\n  isRoutedVaultFilterItemType,\n  RoutedVaultFilterModel,\n} from \"../shared/models/routed-vault-filter.model\";\n\n/**\n * This service is an abstraction layer on top of ActivatedRoute that\n * encapsulates the logic of how filters are stored in the URL.\n *\n * The service builds and emits filter models based on URL params and\n * also contains a method for generating routes to corresponding to those params.\n */\n@Injectable()\nexport class RoutedVaultFilterService implements OnDestroy {\n  private onDestroy = new Subject<void>();\n\n  /**\n   * Filter values extracted from the URL.\n   * To change the values use {@link RoutedVaultFilterService.createRoute}.\n   */\n  filter$: Observable<RoutedVaultFilterModel>;\n\n  constructor(activatedRoute: ActivatedRoute) {\n    this.filter$ = combineLatest([activatedRoute.paramMap, activatedRoute.queryParamMap]).pipe(\n      map(([params, queryParams]) => {\n        const unsafeType = queryParams.get(\"type\");\n        const type = isRoutedVaultFilterItemType(unsafeType) ? unsafeType : undefined;\n\n        return {\n          collectionId: queryParams.get(\"collectionId\") ?? undefined,\n          folderId: queryParams.get(\"folderId\") ?? undefined,\n          organizationId:\n            params.get(\"organizationId\") ?? queryParams.get(\"organizationId\") ?? undefined,\n          organizationIdParamType:\n            params.get(\"organizationId\") != undefined ? (\"path\" as const) : (\"query\" as const),\n          type,\n        };\n      }),\n      takeUntil(this.onDestroy),\n    );\n  }\n\n  /**\n   * Create a route that can be used to modify filters with Router or RouterLink.\n   * This method is specifically built to leave other query parameters untouched,\n   * meaning that navigation will only affect filters and not e.g. `cipherId`.\n   * To subscribe to changes use {@link RoutedVaultFilterService.filter$}.\n   *\n   * Note:\n   * This method currently only supports changing filters that are stored\n   * in query parameters. This means that {@link RoutedVaultFilterModel.organizationId}\n   * will be ignored if {@link RoutedVaultFilterModel.organizationIdParamType}\n   * is set to `path`.\n   *\n   * @param filter Filter values that should be applied to the URL.\n   * @returns route that can be used with Router or RouterLink\n   */\n  createRoute(filter: RoutedVaultFilterModel): [commands: any[], extras?: NavigationExtras] {\n    const commands: string[] = [];\n    const extras: NavigationExtras = {\n      queryParams: {\n        collectionId: filter.collectionId ?? null,\n        folderId: filter.folderId ?? null,\n        organizationId:\n          filter.organizationIdParamType === \"path\" ? null : (filter.organizationId ?? null),\n        type: filter.type ?? null,\n      },\n      queryParamsHandling: \"merge\",\n    };\n    return [commands, extras];\n  }\n\n  ngOnDestroy(): void {\n    this.onDestroy.next();\n    this.onDestroy.complete();\n  }\n}\n","import { UserKeyDefinition, VAULT_FILTER_DISK } from \"../../../platform/state\";\n\nexport const COLLAPSED_GROUPINGS = UserKeyDefinition.array<string>(\n  VAULT_FILTER_DISK,\n  \"collapsedGroupings\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"logout\", \"lock\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport {\n  BehaviorSubject,\n  combineLatest,\n  combineLatestWith,\n  firstValueFrom,\n  map,\n  Observable,\n  of,\n  switchMap,\n} from \"rxjs\";\n\nimport {\n  CollectionAdminView,\n  CollectionService,\n  CollectionView,\n} from \"@bitwarden/admin-console/common\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ActiveUserState, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\nimport { COLLAPSED_GROUPINGS } from \"@bitwarden/common/vault/services/key-state/collapsed-groupings.state\";\n\nimport {\n  CipherTypeFilter,\n  CollectionFilter,\n  FolderFilter,\n  OrganizationFilter,\n} from \"../shared/models/vault-filter.type\";\n\nimport { VaultFilterService as VaultFilterServiceAbstraction } from \"./abstractions/vault-filter.service\";\n\nconst NestingDelimiter = \"/\";\n\n@Injectable()\nexport class VaultFilterService implements VaultFilterServiceAbstraction {\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  organizationTree$: Observable<TreeNode<OrganizationFilter>> = combineLatest([\n    this.organizationService.memberOrganizations$,\n    this.policyService.policyAppliesToActiveUser$(PolicyType.SingleOrg),\n    this.policyService.policyAppliesToActiveUser$(PolicyType.PersonalOwnership),\n  ]).pipe(\n    switchMap(([orgs, singleOrgPolicy, personalOwnershipPolicy]) =>\n      this.buildOrganizationTree(orgs, singleOrgPolicy, personalOwnershipPolicy),\n    ),\n  );\n\n  protected _organizationFilter = new BehaviorSubject<Organization>(null);\n\n  filteredFolders$: Observable<FolderView[]> = this.activeUserId$.pipe(\n    switchMap((userId) =>\n      combineLatest([\n        this.folderService.folderViews$(userId),\n        this.cipherService.cipherViews$,\n        this._organizationFilter,\n      ]),\n    ),\n    switchMap(([folders, ciphers, org]) => {\n      return this.filterFolders(folders, ciphers, org);\n    }),\n  );\n  folderTree$: Observable<TreeNode<FolderFilter>> = this.filteredFolders$.pipe(\n    map((folders) => this.buildFolderTree(folders)),\n  );\n\n  filteredCollections$: Observable<CollectionView[]> =\n    this.collectionService.decryptedCollections$.pipe(\n      combineLatestWith(this._organizationFilter),\n      switchMap(([collections, org]) => {\n        return this.filterCollections(collections, org);\n      }),\n    );\n\n  collectionTree$: Observable<TreeNode<CollectionFilter>> = this.filteredCollections$.pipe(\n    map((collections) => this.buildCollectionTree(collections)),\n  );\n\n  cipherTypeTree$: Observable<TreeNode<CipherTypeFilter>> = this.buildCipherTypeTree();\n\n  private collapsedGroupingsState: ActiveUserState<string[]> =\n    this.stateProvider.getActive(COLLAPSED_GROUPINGS);\n\n  readonly collapsedFilterNodes$: Observable<Set<string>> =\n    this.collapsedGroupingsState.state$.pipe(map((c) => new Set(c)));\n\n  constructor(\n    protected organizationService: OrganizationService,\n    protected folderService: FolderService,\n    protected cipherService: CipherService,\n    protected policyService: PolicyService,\n    protected i18nService: I18nService,\n    protected stateProvider: StateProvider,\n    protected collectionService: CollectionService,\n    protected accountService: AccountService,\n  ) {}\n\n  async getCollectionNodeFromTree(id: string) {\n    const collections = await firstValueFrom(this.collectionTree$);\n    return ServiceUtils.getTreeNodeObject(collections, id) as TreeNode<CollectionFilter>;\n  }\n\n  async setCollapsedFilterNodes(collapsedFilterNodes: Set<string>): Promise<void> {\n    await this.collapsedGroupingsState.update(() => Array.from(collapsedFilterNodes));\n  }\n\n  protected async getCollapsedFilterNodes(): Promise<Set<string>> {\n    return await firstValueFrom(this.collapsedFilterNodes$);\n  }\n\n  getOrganizationFilter() {\n    return this._organizationFilter;\n  }\n\n  clearOrganizationFilter() {\n    this._organizationFilter.next(null);\n  }\n\n  setOrganizationFilter(organization: Organization) {\n    if (organization?.id != \"AllVaults\") {\n      this._organizationFilter.next(organization);\n    } else {\n      this._organizationFilter.next(null);\n    }\n  }\n\n  async expandOrgFilter() {\n    const collapsedFilterNodes = await firstValueFrom(this.collapsedFilterNodes$);\n    if (!collapsedFilterNodes.has(\"AllVaults\")) {\n      return;\n    }\n    collapsedFilterNodes.delete(\"AllVaults\");\n    await this.setCollapsedFilterNodes(collapsedFilterNodes);\n  }\n\n  protected async buildOrganizationTree(\n    orgs: Organization[],\n    singleOrgPolicy: boolean,\n    personalOwnershipPolicy: boolean,\n  ): Promise<TreeNode<OrganizationFilter>> {\n    const headNode = this.getOrganizationFilterHead();\n    if (!personalOwnershipPolicy) {\n      const myVaultNode = this.getOrganizationFilterMyVault();\n      headNode.children.push(myVaultNode);\n    }\n    if (singleOrgPolicy) {\n      orgs = orgs.slice(0, 1);\n    }\n    if (orgs) {\n      const orgNodes: TreeNode<OrganizationFilter>[] = [];\n      orgs.forEach((org) => {\n        const orgCopy = org as OrganizationFilter;\n        orgCopy.icon = \"bwi-business\";\n        const node = new TreeNode<OrganizationFilter>(orgCopy, headNode, orgCopy.name);\n        orgNodes.push(node);\n      });\n      // Sort organization nodes, then add them to the list after 'My Vault' and 'All Vaults' if present\n      orgNodes.sort((a, b) => a.node.name.localeCompare(b.node.name));\n      headNode.children.push(...orgNodes);\n    }\n    return headNode;\n  }\n\n  protected getOrganizationFilterHead(): TreeNode<OrganizationFilter> {\n    const head = new Organization() as OrganizationFilter;\n    head.enabled = true;\n    return new TreeNode<OrganizationFilter>(head, null, \"allVaults\", \"AllVaults\");\n  }\n\n  protected getOrganizationFilterMyVault(): TreeNode<OrganizationFilter> {\n    const myVault = new Organization() as OrganizationFilter;\n    myVault.id = \"MyVault\";\n    myVault.icon = \"bwi-user\";\n    myVault.enabled = true;\n    myVault.hideOptions = true;\n    return new TreeNode<OrganizationFilter>(myVault, null, this.i18nService.t(\"myVault\"));\n  }\n\n  buildTypeTree(\n    head: CipherTypeFilter,\n    array?: CipherTypeFilter[],\n  ): Observable<TreeNode<CipherTypeFilter>> {\n    const headNode = new TreeNode<CipherTypeFilter>(head, null);\n    array?.forEach((filter) => {\n      const node = new TreeNode<CipherTypeFilter>(filter, headNode, filter.name);\n      headNode.children.push(node);\n    });\n    return of(headNode);\n  }\n\n  protected async filterCollections(\n    storedCollections: CollectionView[],\n    org?: Organization,\n  ): Promise<CollectionView[]> {\n    return org?.id != null\n      ? storedCollections.filter((c) => c.organizationId === org.id)\n      : storedCollections;\n  }\n\n  protected buildCollectionTree(collections?: CollectionView[]): TreeNode<CollectionFilter> {\n    const headNode = this.getCollectionFilterHead();\n    if (!collections) {\n      return headNode;\n    }\n    const nodes: TreeNode<CollectionFilter>[] = [];\n    collections\n      .sort((a, b) => this.i18nService.collator.compare(a.name, b.name))\n      .forEach((c) => {\n        const collectionCopy = new CollectionView() as CollectionFilter;\n        collectionCopy.id = c.id;\n        collectionCopy.organizationId = c.organizationId;\n        collectionCopy.icon = \"bwi-collection\";\n        if (c instanceof CollectionAdminView) {\n          collectionCopy.groups = c.groups;\n          collectionCopy.assigned = c.assigned;\n        }\n        const parts =\n          c.name != null ? c.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n        ServiceUtils.nestedTraverse(nodes, 0, parts, collectionCopy, null, NestingDelimiter);\n      });\n    nodes.forEach((n) => {\n      n.parent = headNode;\n      headNode.children.push(n);\n    });\n    return headNode;\n  }\n\n  protected getCollectionFilterHead(): TreeNode<CollectionFilter> {\n    const head = new CollectionView() as CollectionFilter;\n    return new TreeNode<CollectionFilter>(head, null, \"collections\", \"AllCollections\");\n  }\n\n  protected async filterFolders(\n    storedFolders: FolderView[],\n    ciphers: CipherView[],\n    org?: Organization,\n  ): Promise<FolderView[]> {\n    // If no org or \"My Vault\" is selected, show all folders\n    if (org?.id == null || org?.id == \"MyVault\") {\n      return storedFolders;\n    }\n\n    // Otherwise, show only folders that have ciphers from the selected org and the \"no folder\" folder\n    const orgCiphers = ciphers.filter((c) => c.organizationId == org?.id);\n    return storedFolders.filter(\n      (f) => orgCiphers.some((oc) => oc.folderId == f.id) || f.id == null,\n    );\n  }\n\n  protected buildFolderTree(folders?: FolderView[]): TreeNode<FolderFilter> {\n    const headNode = this.getFolderFilterHead();\n    if (!folders) {\n      return headNode;\n    }\n    const nodes: TreeNode<FolderFilter>[] = [];\n    folders.forEach((f) => {\n      const folderCopy = new FolderView() as FolderFilter;\n      folderCopy.id = f.id;\n      folderCopy.revisionDate = f.revisionDate;\n      folderCopy.icon = \"bwi-folder\";\n      const parts = f.name != null ? f.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n      ServiceUtils.nestedTraverse(nodes, 0, parts, folderCopy, null, NestingDelimiter);\n    });\n\n    nodes.forEach((n) => {\n      n.parent = headNode;\n      headNode.children.push(n);\n    });\n    return headNode;\n  }\n\n  protected getFolderFilterHead(): TreeNode<FolderFilter> {\n    const head = new FolderView() as FolderFilter;\n    return new TreeNode<FolderFilter>(head, null, \"folders\", \"AllFolders\");\n  }\n\n  protected buildCipherTypeTree(): Observable<TreeNode<CipherTypeFilter>> {\n    const allTypeFilters: CipherTypeFilter[] = [\n      {\n        id: \"favorites\",\n        name: this.i18nService.t(\"favorites\"),\n        type: \"favorites\",\n        icon: \"bwi-star\",\n      },\n      {\n        id: \"login\",\n        name: this.i18nService.t(\"typeLogin\"),\n        type: CipherType.Login,\n        icon: \"bwi-globe\",\n      },\n      {\n        id: \"card\",\n        name: this.i18nService.t(\"typeCard\"),\n        type: CipherType.Card,\n        icon: \"bwi-credit-card\",\n      },\n      {\n        id: \"identity\",\n        name: this.i18nService.t(\"typeIdentity\"),\n        type: CipherType.Identity,\n        icon: \"bwi-id-card\",\n      },\n      {\n        id: \"note\",\n        name: this.i18nService.t(\"typeSecureNote\"),\n        type: CipherType.SecureNote,\n        icon: \"bwi-sticky-note\",\n      },\n      {\n        id: \"sshKey\",\n        name: this.i18nService.t(\"typeSshKey\"),\n        type: CipherType.SshKey,\n        icon: \"bwi-key\",\n      },\n    ];\n\n    return this.buildTypeTree(\n      { id: \"AllItems\", name: \"allItems\", type: \"all\", icon: \"\" },\n      allTypeFilters,\n    );\n  }\n}\n","<ng-container *ngIf=\"filters && filters.length\">\n  <div *ngIf=\"headerInfo.showHeader\" class=\"filter-heading\">\n    <button\n      type=\"button\"\n      class=\"toggle-button\"\n      (click)=\"toggleCollapse(headerNode.node)\"\n      [attr.aria-expanded]=\"!isCollapsed(headerNode.node)\"\n      appA11yTitle=\"{{ 'toggleCollapse' | i18n }}: {{ headerNode.node.name | i18n }}\"\n      aria-controls=\"sub-filters\"\n    >\n      <i\n        class=\"bwi bwi-fw\"\n        aria-hidden=\"true\"\n        [ngClass]=\"isCollapsed(headerNode.node) ? 'bwi-angle-right' : 'bwi-angle-down'\"\n      ></i>\n    </button>\n    <button\n      type=\"button\"\n      *ngIf=\"headerInfo.isSelectable\"\n      appA11yTitle=\"{{ (isOrganizationFilter ? 'vault' : 'filter') | i18n }}: {{\n        headerNode.node.name | i18n\n      }}\"\n      class=\"filter-button\"\n      (click)=\"onFilterSelect(headerNode)\"\n    >\n      <h3\n        [ngClass]=\"{\n          active: isAllVaultsSelected || isNodeSelected(headerNode),\n        }\"\n      >\n        &nbsp;{{ headerNode.node.name | i18n }}\n      </h3>\n    </button>\n    <h3 *ngIf=\"!headerInfo.isSelectable\" class=\"filter-title\">\n      &nbsp;{{ headerNode.node.name | i18n }}\n    </h3>\n  </div>\n  <ul\n    id=\"{{ headerNode.node.name }}-filters\"\n    *ngIf=\"!isCollapsed(headerNode.node)\"\n    class=\"filter-options\"\n  >\n    <ng-template #recursiveFilters let-filters>\n      <li\n        *ngFor=\"let f of filters\"\n        [ngClass]=\"{\n          active: isNodeSelected(f),\n        }\"\n        class=\"filter-option\"\n      >\n        <span class=\"filter-buttons\">\n          <button\n            type=\"button\"\n            *ngIf=\"f.children.length\"\n            appA11yTitle=\"{{ 'toggleCollapse' | i18n }}: {{ f.node.name }}\"\n            (click)=\"toggleCollapse(f.node)\"\n            [attr.aria-expanded]=\"!isCollapsed(f.node)\"\n            [attr.aria-controls]=\"f.node.name + '_children'\"\n            class=\"toggle-button\"\n          >\n            <i\n              class=\"bwi bwi-fw\"\n              [ngClass]=\"{\n                'bwi-angle-right': isCollapsed(f.node),\n                'bwi-angle-down': !isCollapsed(f.node),\n              }\"\n              aria-hidden=\"true\"\n            ></i>\n          </button>\n          <button\n            type=\"button\"\n            class=\"filter-button\"\n            appA11yTitle=\"{{ isOrganizationFilter ? 'vault' : ('filter' | i18n) }}: {{\n              f.node.name\n            }}\"\n            [ngClass]=\"{ 'disabled-organization': isOrganizationFilter && !f.node.enabled }\"\n            (click)=\"onFilterSelect(f)\"\n          >\n            <i\n              *ngIf=\"f.children.length === 0\"\n              class=\"bwi bwi-fw {{ f.node.icon }}\"\n              aria-hidden=\"true\"\n            ></i>\n            &nbsp;{{ f.node.name }}\n          </button>\n          <span class=\"ml-auto tw-flex tw-items-center\">\n            <button\n              type=\"button\"\n              *ngIf=\"editInfo && f.node.id\"\n              class=\"edit-button\"\n              (click)=\"onEdit(f)\"\n              appA11yTitle=\"{{ editInfo.text | i18n }}\"\n            >\n              <i class=\"bwi bwi-pencil bwi-fw\" aria-hidden=\"true\"></i>\n            </button>\n            <i\n              *ngIf=\"isOrganizationFilter && !f.node.enabled\"\n              class=\"org-options bwi bwi-fw bwi-exclamation-triangle text-danger\"\n              [attr.aria-label]=\"'organizationIsDisabled' | i18n\"\n              appA11yTitle=\"{{ 'organizationIsDisabled' | i18n }}\"\n            ></i>\n            <ng-container *ngIf=\"optionsInfo && !f.node.hideOptions\">\n              <ng-container\n                *ngComponentOutlet=\"optionsInfo.component; injector: createInjector(f.node)\"\n              ></ng-container>\n            </ng-container>\n          </span>\n        </span>\n        <ul\n          [id]=\"f.node.name + '_children'\"\n          class=\"nested-filter-options\"\n          *ngIf=\"f.children.length && !isCollapsed(f.node)\"\n        >\n          <ng-container *ngTemplateOutlet=\"recursiveFilters; context: { $implicit: f.children }\">\n          </ng-container>\n        </ul>\n      </li>\n    </ng-template>\n    <ng-container\n      *ngTemplateOutlet=\"recursiveFilters; context: { $implicit: filters }\"\n    ></ng-container>\n    <li class=\"filter-option\" *ngIf=\"showAddLink\">\n      <span class=\"filter-buttons\">\n        <a href=\"#\" routerLink=\"{{ addInfo.route }}\" class=\"filter-button\">\n          <i class=\"bwi bwi-plus bwi-fw\" aria-hidden=\"true\"></i>\n          &nbsp;{{ addInfo.text | i18n }}\n        </a>\n      </span>\n    </li>\n  </ul>\n  <hr *ngIf=\"divider\" />\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, InjectionToken, Injector, Input, OnDestroy, OnInit } from \"@angular/core\";\nimport { Observable, Subject, takeUntil } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { ITreeNodeObject, TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { VaultFilterService } from \"../../services/abstractions/vault-filter.service\";\nimport { VaultFilterSection, VaultFilterType } from \"../models/vault-filter-section.type\";\nimport { VaultFilter } from \"../models/vault-filter.model\";\n\n@Component({\n  selector: \"app-filter-section\",\n  templateUrl: \"vault-filter-section.component.html\",\n})\nexport class VaultFilterSectionComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  @Input() activeFilter: VaultFilter;\n  @Input() section: VaultFilterSection;\n\n  data: TreeNode<VaultFilterType>;\n  collapsedFilterNodes: Set<string> = new Set();\n\n  private injectors = new Map<string, Injector>();\n\n  constructor(\n    private vaultFilterService: VaultFilterService,\n    private injector: Injector,\n  ) {\n    this.vaultFilterService.collapsedFilterNodes$\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((nodes) => {\n        this.collapsedFilterNodes = nodes;\n      });\n  }\n\n  async ngOnInit() {\n    this.section?.data$?.pipe(takeUntil(this.destroy$)).subscribe((data) => {\n      this.data = data;\n    });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  get headerNode() {\n    return this.data;\n  }\n\n  get headerInfo() {\n    return this.section.header;\n  }\n\n  get filters() {\n    return this.data?.children;\n  }\n\n  get isOrganizationFilter() {\n    return this.data.node instanceof Organization;\n  }\n\n  get isAllVaultsSelected() {\n    return this.isOrganizationFilter && !this.activeFilter.selectedOrganizationNode;\n  }\n\n  isNodeSelected(filterNode: TreeNode<VaultFilterType>) {\n    const { organizationId, cipherTypeId, folderId, collectionId, isCollectionSelected } =\n      this.activeFilter;\n\n    const collectionStatus =\n      filterNode?.node.id === \"AllCollections\" &&\n      (isCollectionSelected || collectionId === \"AllCollections\");\n\n    return (\n      organizationId === filterNode?.node.id ||\n      cipherTypeId === filterNode?.node.id ||\n      folderId === filterNode?.node.id ||\n      collectionStatus\n    );\n  }\n\n  async onFilterSelect(filterNode: TreeNode<VaultFilterType>) {\n    await this.section?.action(filterNode);\n  }\n\n  get editInfo() {\n    return this.section?.edit;\n  }\n\n  onEdit(filterNode: TreeNode<VaultFilterType>) {\n    this.section?.edit?.action(filterNode.node);\n  }\n\n  get addInfo() {\n    return this.section.add;\n  }\n\n  get showAddLink() {\n    return this.section.add && this.section.add.route;\n  }\n\n  async onAdd() {\n    this.section?.add?.action();\n  }\n\n  get optionsInfo() {\n    return this.section?.options;\n  }\n\n  get divider() {\n    return this.section?.divider;\n  }\n\n  isCollapsed(node: ITreeNodeObject) {\n    return this.collapsedFilterNodes.has(node.id);\n  }\n\n  async toggleCollapse(node: ITreeNodeObject) {\n    if (this.collapsedFilterNodes.has(node.id)) {\n      this.collapsedFilterNodes.delete(node.id);\n    } else {\n      this.collapsedFilterNodes.add(node.id);\n    }\n    await this.vaultFilterService.setCollapsedFilterNodes(this.collapsedFilterNodes);\n  }\n\n  // an injector is necessary to pass data into a dynamic component\n  // here we are creating a new injector for each filter that has options\n  createInjector(data: VaultFilterType) {\n    let inject = this.injectors.get(data.id);\n\n    if (!inject) {\n      // Pass an observable to the component in order to update the component when the data changes\n      // as data binding does not work with dynamic components in Angular 15 (inputs are supported starting Angular 16)\n      const data$ = this.section.data$.pipe(\n        map((sectionNode) => sectionNode?.children?.find((node) => node.node.id === data.id)?.node),\n      );\n      inject = Injector.create({\n        providers: [{ provide: OptionsInput, useValue: data$ }],\n        parent: this.injector,\n      });\n      this.injectors.set(data.id, inject);\n    }\n    return inject;\n  }\n}\nexport const OptionsInput = new InjectionToken<Observable<VaultFilterType>>(\"OptionsInput\");\n","import { Unassigned } from \"@bitwarden/admin-console/common\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { All, RoutedVaultFilterModel } from \"./routed-vault-filter.model\";\n\nexport type FilterFunction = (cipher: CipherView) => boolean;\n\nexport function createFilterFunction(filter: RoutedVaultFilterModel): FilterFunction {\n  return (cipher) => {\n    if (filter.type === \"favorites\" && !cipher.favorite) {\n      return false;\n    }\n    if (filter.type === \"card\" && cipher.type !== CipherType.Card) {\n      return false;\n    }\n    if (filter.type === \"identity\" && cipher.type !== CipherType.Identity) {\n      return false;\n    }\n    if (filter.type === \"login\" && cipher.type !== CipherType.Login) {\n      return false;\n    }\n    if (filter.type === \"note\" && cipher.type !== CipherType.SecureNote) {\n      return false;\n    }\n    if (filter.type === \"sshKey\" && cipher.type !== CipherType.SshKey) {\n      return false;\n    }\n    if (filter.type === \"trash\" && !cipher.isDeleted) {\n      return false;\n    }\n    // Hide trash unless explicitly selected\n    if (filter.type !== \"trash\" && cipher.isDeleted) {\n      return false;\n    }\n    // No folder\n    if (filter.folderId === Unassigned && cipher.folderId !== null) {\n      return false;\n    }\n    // Folder\n    if (\n      filter.folderId !== undefined &&\n      filter.folderId !== All &&\n      filter.folderId !== Unassigned &&\n      cipher.folderId !== filter.folderId\n    ) {\n      return false;\n    }\n    // All collections (top level)\n    if (filter.collectionId === All) {\n      return false;\n    }\n    // Unassigned\n    if (\n      filter.collectionId === Unassigned &&\n      (cipher.organizationId == null ||\n        (cipher.collectionIds != null && cipher.collectionIds.length > 0))\n    ) {\n      return false;\n    }\n    // Collection\n    if (\n      filter.collectionId !== undefined &&\n      filter.collectionId !== All &&\n      filter.collectionId !== Unassigned &&\n      (cipher.collectionIds == null || !cipher.collectionIds.includes(filter.collectionId))\n    ) {\n      return false;\n    }\n    // My Vault\n    if (filter.organizationId === Unassigned && cipher.organizationId != null) {\n      return false;\n    }\n    // Organization\n    else if (\n      filter.organizationId !== undefined &&\n      filter.organizationId !== Unassigned &&\n      cipher.organizationId !== filter.organizationId\n    ) {\n      return false;\n    }\n\n    return true;\n  };\n}\n","export const All = \"all\";\n\n// TODO: Remove `All` when moving to vertical navigation.\nconst itemTypes = [\n  \"favorites\",\n  \"login\",\n  \"card\",\n  \"identity\",\n  \"note\",\n  \"sshKey\",\n  \"trash\",\n  All,\n] as const;\n\nexport type RoutedVaultFilterItemType = (typeof itemTypes)[number];\n\nexport function isRoutedVaultFilterItemType(value: unknown): value is RoutedVaultFilterItemType {\n  return itemTypes.includes(value as any);\n}\n\nexport interface RoutedVaultFilterModel {\n  collectionId?: string;\n  folderId?: string;\n  organizationId?: string;\n  type?: RoutedVaultFilterItemType;\n\n  organizationIdParamType?: \"path\" | \"query\";\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport {\n  CipherStatus,\n  CipherTypeFilter,\n  CollectionFilter,\n  FolderFilter,\n  OrganizationFilter,\n} from \"./vault-filter.type\";\n\nexport type VaultFilterFunction = (cipher: CipherView) => boolean;\n\n// TODO: Replace shared VaultFilter Model with this one and\n// refactor browser and desktop code to use this model.\nexport class VaultFilter {\n  selectedOrganizationNode: TreeNode<OrganizationFilter>;\n  selectedCipherTypeNode: TreeNode<CipherTypeFilter>;\n  selectedFolderNode: TreeNode<FolderFilter>;\n  selectedCollectionNode: TreeNode<CollectionFilter>;\n\n  /**\n   * A list of collection filters that form a chain from the organization root to currently selected collection.\n   * To be used when rendering a breadcrumb UI for navigating the collection hierarchy.\n   * Begins from the organization root and excludes the currently selected collection.\n   */\n  get collectionBreadcrumbs(): TreeNode<CollectionFilter>[] {\n    if (!this.isCollectionSelected) {\n      return [];\n    }\n\n    const collections = [this.selectedCollectionNode];\n    while (collections[collections.length - 1].parent != undefined) {\n      collections.push(collections[collections.length - 1].parent);\n    }\n\n    return collections.slice(1).reverse();\n  }\n\n  /**\n   * The vault is filtered by a specific collection\n   */\n  get isCollectionSelected(): boolean {\n    return (\n      this.selectedCollectionNode != null &&\n      this.selectedCollectionNode.node.id !== \"AllCollections\"\n    );\n  }\n\n  /**\n   * The vault is filtered by the \"Unassigned\" collection\n   */\n  get isUnassignedCollectionSelected(): boolean {\n    return this.selectedCollectionNode != null && this.selectedCollectionNode.node.id === null;\n  }\n\n  /**\n   * The vault is filtered by the users individual vault\n   */\n  get isMyVaultSelected(): boolean {\n    return this.selectedOrganizationNode?.node.id === \"MyVault\";\n  }\n\n  get isFavorites(): boolean {\n    return this.selectedCipherTypeNode?.node.type === \"favorites\";\n  }\n\n  get isDeleted(): boolean {\n    return this.selectedCipherTypeNode?.node.type === \"trash\" ? true : null;\n  }\n\n  get organizationId(): string {\n    return this.selectedOrganizationNode?.node.id;\n  }\n\n  get cipherType(): CipherType {\n    return this.selectedCipherTypeNode?.node.type in CipherType\n      ? (this.selectedCipherTypeNode?.node.type as CipherType)\n      : null;\n  }\n\n  get cipherStatus(): CipherStatus {\n    return this.selectedCipherTypeNode?.node.type;\n  }\n\n  get cipherTypeId(): string {\n    return this.selectedCipherTypeNode?.node.id;\n  }\n\n  get folderId(): string {\n    return this.selectedFolderNode?.node.id;\n  }\n\n  get collectionId(): string {\n    return this.selectedCollectionNode?.node.id;\n  }\n\n  constructor(init?: Partial<VaultFilter>) {\n    Object.assign(this, init);\n  }\n\n  resetFilter() {\n    this.selectedCipherTypeNode = null;\n    this.selectedFolderNode = null;\n    this.selectedCollectionNode = null;\n  }\n\n  resetOrganization() {\n    this.selectedOrganizationNode = null;\n  }\n\n  buildFilter(): VaultFilterFunction {\n    return (cipher) => {\n      let cipherPassesFilter = true;\n      if (this.isFavorites && cipherPassesFilter) {\n        cipherPassesFilter = cipher.favorite;\n      }\n      if (this.isDeleted && cipherPassesFilter) {\n        cipherPassesFilter = cipher.isDeleted;\n      }\n      if (this.cipherType && cipherPassesFilter) {\n        cipherPassesFilter = cipher.type === this.cipherType;\n      }\n      if (this.selectedFolderNode) {\n        // No folder\n        if (this.folderId === null && cipherPassesFilter) {\n          cipherPassesFilter = cipher.folderId === null;\n        }\n        // Folder\n        if (this.folderId !== null && cipherPassesFilter) {\n          cipherPassesFilter = cipher.folderId === this.folderId;\n        }\n      }\n      if (this.selectedCollectionNode) {\n        // All Collections\n        if (this.collectionId === \"AllCollections\" && cipherPassesFilter) {\n          cipherPassesFilter = false;\n        }\n        // Unassigned\n        if (this.collectionId === null && cipherPassesFilter) {\n          cipherPassesFilter =\n            cipher.organizationId != null &&\n            (cipher.collectionIds == null || cipher.collectionIds.length === 0);\n        }\n        // Collection\n        if (\n          this.collectionId !== null &&\n          this.collectionId !== \"AllCollections\" &&\n          cipherPassesFilter\n        ) {\n          cipherPassesFilter =\n            cipher.collectionIds != null && cipher.collectionIds.includes(this.collectionId);\n        }\n      }\n      if (this.selectedOrganizationNode) {\n        // My Vault\n        if (this.organizationId === \"MyVault\" && cipherPassesFilter) {\n          cipherPassesFilter = cipher.organizationId === null;\n        }\n        // Organization\n        else if (this.organizationId !== null && cipherPassesFilter) {\n          cipherPassesFilter = cipher.organizationId === this.organizationId;\n        }\n      }\n      return cipherPassesFilter;\n    };\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SearchModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../../shared\";\n\nimport { VaultFilterSectionComponent } from \"./components/vault-filter-section.component\";\n\n@NgModule({\n  imports: [SharedModule, SearchModule],\n  declarations: [VaultFilterSectionComponent],\n  exports: [SharedModule, VaultFilterSectionComponent, SearchModule],\n})\nexport class VaultFilterSharedModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Inject, OnInit } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { CollectionId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { ViewPasswordHistoryService } from \"@bitwarden/common/vault/abstractions/view-password-history.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums/cipher-type\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport {\n  AsyncActionsModule,\n  DialogModule,\n  DialogService,\n  ToastService,\n} from \"@bitwarden/components\";\n\nimport { PremiumUpgradePromptService } from \"../../../../../../libs/common/src/vault/abstractions/premium-upgrade-prompt.service\";\nimport { CipherViewComponent } from \"../../../../../../libs/vault/src/cipher-view/cipher-view.component\";\nimport { SharedModule } from \"../../shared/shared.module\";\nimport { WebVaultPremiumUpgradePromptService } from \"../services/web-premium-upgrade-prompt.service\";\nimport { WebViewPasswordHistoryService } from \"../services/web-view-password-history.service\";\n\nexport interface ViewCipherDialogParams {\n  cipher: CipherView;\n\n  /**\n   * Optional list of collections the cipher is assigned to. If none are provided, they will be loaded using the\n   * `CipherService` and the `collectionIds` property of the cipher.\n   */\n  collections?: CollectionView[];\n\n  /**\n   * Optional collection ID used to know the collection filter selected.\n   */\n  activeCollectionId?: CollectionId;\n\n  /**\n   * If true, the edit button will be disabled in the dialog.\n   */\n  disableEdit?: boolean;\n}\n\nexport enum ViewCipherDialogResult {\n  Edited = \"edited\",\n  Deleted = \"deleted\",\n  PremiumUpgrade = \"premiumUpgrade\",\n}\n\nexport interface ViewCipherDialogCloseResult {\n  action: ViewCipherDialogResult;\n}\n\n/**\n * Component for viewing a cipher, presented in a dialog.\n * @deprecated Use the VaultItemDialogComponent instead.\n */\n@Component({\n  selector: \"app-vault-view\",\n  templateUrl: \"view.component.html\",\n  standalone: true,\n  imports: [CipherViewComponent, CommonModule, AsyncActionsModule, DialogModule, SharedModule],\n  providers: [\n    { provide: ViewPasswordHistoryService, useClass: WebViewPasswordHistoryService },\n    { provide: PremiumUpgradePromptService, useClass: WebVaultPremiumUpgradePromptService },\n  ],\n})\nexport class ViewComponent implements OnInit {\n  cipher: CipherView;\n  collections?: CollectionView[];\n  onDeletedCipher = new EventEmitter<CipherView>();\n  cipherTypeString: string;\n  organization: Organization;\n\n  canDeleteCipher$: Observable<boolean>;\n\n  constructor(\n    @Inject(DIALOG_DATA) public params: ViewCipherDialogParams,\n    private dialogRef: DialogRef<ViewCipherDialogCloseResult>,\n    private i18nService: I18nService,\n    private dialogService: DialogService,\n    private messagingService: MessagingService,\n    private logService: LogService,\n    private cipherService: CipherService,\n    private toastService: ToastService,\n    private organizationService: OrganizationService,\n    private cipherAuthorizationService: CipherAuthorizationService,\n  ) {}\n\n  /**\n   * Lifecycle hook for component initialization.\n   */\n  async ngOnInit() {\n    this.cipher = this.params.cipher;\n    this.collections = this.params.collections;\n    this.cipherTypeString = this.getCipherViewTypeString();\n    if (this.cipher.organizationId) {\n      this.organization = await this.organizationService.get(this.cipher.organizationId);\n    }\n\n    this.canDeleteCipher$ = this.cipherAuthorizationService.canDeleteCipher$(this.cipher, [\n      this.params.activeCollectionId,\n    ]);\n  }\n\n  /**\n   * Method to handle cipher deletion. Called when a user clicks the delete button.\n   */\n  delete = async () => {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteItem\" },\n      content: {\n        key: this.cipher.isDeleted ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\",\n      },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      await this.deleteCipher();\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"success\"),\n        message: this.i18nService.t(\n          this.cipher.isDeleted ? \"permanentlyDeletedItem\" : \"deletedItem\",\n        ),\n      });\n      this.onDeletedCipher.emit(this.cipher);\n      this.messagingService.send(\n        this.cipher.isDeleted ? \"permanentlyDeletedCipher\" : \"deletedCipher\",\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    this.dialogRef.close({ action: ViewCipherDialogResult.Deleted });\n  };\n\n  /**\n   * Helper method to delete cipher.\n   */\n  protected async deleteCipher(): Promise<void> {\n    const asAdmin = this.organization?.canEditAllCiphers;\n    if (this.cipher.isDeleted) {\n      await this.cipherService.deleteWithServer(this.cipher.id, asAdmin);\n    } else {\n      await this.cipherService.softDeleteWithServer(this.cipher.id, asAdmin);\n    }\n  }\n\n  /**\n   * Method to handle cipher editing. Called when a user clicks the edit button.\n   */\n  async edit(): Promise<void> {\n    this.dialogRef.close({ action: ViewCipherDialogResult.Edited });\n  }\n\n  /**\n   * Method to get cipher view type string, used for the dialog title.\n   * E.g. \"View login\" or \"View note\".\n   * @returns The localized string for the cipher type\n   */\n  getCipherViewTypeString(): string {\n    if (!this.cipher) {\n      return null;\n    }\n\n    switch (this.cipher.type) {\n      case CipherType.Login:\n        return this.i18nService.t(\"viewItemType\", this.i18nService.t(\"typeLogin\").toLowerCase());\n      case CipherType.SecureNote:\n        return this.i18nService.t(\"viewItemType\", this.i18nService.t(\"note\").toLowerCase());\n      case CipherType.Card:\n        return this.i18nService.t(\"viewItemType\", this.i18nService.t(\"typeCard\").toLowerCase());\n      case CipherType.Identity:\n        return this.i18nService.t(\"viewItemType\", this.i18nService.t(\"typeIdentity\").toLowerCase());\n      case CipherType.SshKey:\n        return this.i18nService.t(\"viewItemType\", this.i18nService.t(\"typeSshKey\").toLowerCase());\n      default:\n        return null;\n    }\n  }\n}\n\n/**\n * Strongly typed helper to open a cipher view dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n * @returns A reference to the opened dialog\n */\nexport function openViewCipherDialog(\n  dialogService: DialogService,\n  config: DialogConfig<ViewCipherDialogParams>,\n): DialogRef<ViewCipherDialogCloseResult> {\n  return dialogService.open(ViewComponent, config);\n}\n","<bit-dialog dialogSize=\"large\" background=\"alt\">\n  <span bitDialogTitle>\n    {{ cipherTypeString }}\n  </span>\n  <ng-container bitDialogContent>\n    <app-cipher-view [cipher]=\"cipher\" [collections]=\"collections\"></app-cipher-view>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button\n      bitButton\n      (click)=\"edit()\"\n      buttonType=\"primary\"\n      type=\"button\"\n      [disabled]=\"params.disableEdit\"\n    >\n      {{ \"edit\" | i18n }}\n    </button>\n    <div class=\"tw-ml-auto\">\n      <button\n        bitButton\n        type=\"button\"\n        buttonType=\"danger\"\n        [appA11yTitle]=\"'delete' | i18n\"\n        [bitAction]=\"delete\"\n        [disabled]=\"!(canDeleteCipher$ | async)\"\n      >\n        <i class=\"bwi bwi-trash bwi-lg bwi-fw\" aria-hidden=\"true\"></i>\n      </button>\n    </div>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherData } from \"@bitwarden/common/vault/models/data/cipher.data\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"../individual-vault/add-edit.component\";\n\n@Component({\n  selector: \"app-org-vault-add-edit\",\n  templateUrl: \"../individual-vault/add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent {\n  originalCipher: Cipher = null;\n  protected override componentName = \"app-org-vault-add-edit\";\n\n  constructor(\n    cipherService: CipherService,\n    folderService: FolderService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    auditService: AuditService,\n    accountService: AccountService,\n    collectionService: CollectionService,\n    totpService: TotpService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private apiService: ApiService,\n    messagingService: MessagingService,\n    eventCollectionService: EventCollectionService,\n    policyService: PolicyService,\n    logService: LogService,\n    passwordRepromptService: PasswordRepromptService,\n    organizationService: OrganizationService,\n    dialogService: DialogService,\n    datePipe: DatePipe,\n    configService: ConfigService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    cipherAuthorizationService: CipherAuthorizationService,\n    toastService: ToastService,\n    sdkService: SdkService,\n  ) {\n    super(\n      cipherService,\n      folderService,\n      i18nService,\n      platformUtilsService,\n      auditService,\n      accountService,\n      collectionService,\n      totpService,\n      passwordGenerationService,\n      messagingService,\n      eventCollectionService,\n      policyService,\n      organizationService,\n      logService,\n      passwordRepromptService,\n      dialogService,\n      datePipe,\n      configService,\n      billingAccountProfileStateService,\n      cipherAuthorizationService,\n      toastService,\n      sdkService,\n    );\n  }\n\n  protected loadCollections() {\n    if (!this.organization.canEditAllCiphers) {\n      return super.loadCollections();\n    }\n    return Promise.resolve(this.collections);\n  }\n\n  protected async loadCipher() {\n    this.isAdminConsoleAction = true;\n    // Calling loadCipher first to assess if the cipher is unassigned. If null use apiService getCipherAdmin\n    const firstCipherCheck = await super.loadCipher();\n\n    if (!this.organization.canEditAllCiphers && firstCipherCheck != null) {\n      return firstCipherCheck;\n    }\n    const response = await this.apiService.getCipherAdmin(this.cipherId);\n    const data = new CipherData(response);\n\n    data.edit = true;\n    const cipher = new Cipher(data);\n    this.originalCipher = cipher;\n    return cipher;\n  }\n\n  protected encryptCipher(userId: UserId) {\n    if (!this.organization.canEditAllCiphers) {\n      return super.encryptCipher(userId);\n    }\n\n    return this.cipherService.encrypt(this.cipher, userId, null, null, this.originalCipher);\n  }\n\n  protected async deleteCipher() {\n    if (!this.organization.canEditAllCiphers) {\n      return super.deleteCipher();\n    }\n    return this.cipher.isDeleted\n      ? this.apiService.deleteCipherAdmin(this.cipherId)\n      : this.apiService.putDeleteCipherAdmin(this.cipherId);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\n\nimport { CollectionNameBadgeComponent } from \"./collection-name.badge.component\";\n\n@NgModule({\n  imports: [SharedModule, PipesModule],\n  declarations: [CollectionNameBadgeComponent],\n  exports: [CollectionNameBadgeComponent],\n})\nexport class CollectionBadgeModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared/shared.module\";\nimport { PipesModule } from \"../../individual-vault/pipes/pipes.module\";\n\nimport { GroupNameBadgeComponent } from \"./group-name-badge.component\";\n\n@NgModule({\n  imports: [SharedModule, PipesModule],\n  declarations: [GroupNameBadgeComponent],\n  exports: [GroupNameBadgeComponent],\n})\nexport class GroupBadgeModule {}\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Injectable } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { PremiumUpgradePromptService } from \"@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { VaultItemDialogResult } from \"../components/vault-item-dialog/vault-item-dialog.component\";\n\n/**\n * This service is used to prompt the user to upgrade to premium.\n */\n@Injectable()\nexport class WebVaultPremiumUpgradePromptService implements PremiumUpgradePromptService {\n  constructor(\n    private dialogService: DialogService,\n    private router: Router,\n    private dialog: DialogRef<VaultItemDialogResult>,\n  ) {}\n\n  /**\n   * Prompts the user to upgrade to premium.\n   * @param organizationId The ID of the organization to upgrade.\n   */\n  async promptForPremium(organizationId?: OrganizationId) {\n    let upgradeConfirmed;\n    if (organizationId) {\n      upgradeConfirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"upgradeOrganization\" },\n        content: { key: \"upgradeOrganizationDesc\" },\n        acceptButtonText: { key: \"upgradeOrganization\" },\n        type: \"info\",\n      });\n      if (upgradeConfirmed) {\n        await this.router.navigate([\"organizations\", organizationId, \"billing\", \"subscription\"]);\n      }\n    } else {\n      upgradeConfirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"premiumRequired\" },\n        content: { key: \"premiumRequiredDesc\" },\n        acceptButtonText: { key: \"upgrade\" },\n        type: \"success\",\n      });\n      if (upgradeConfirmed) {\n        await this.router.navigate([\"settings/subscription/premium\"]);\n      }\n    }\n\n    if (upgradeConfirmed) {\n      this.dialog.close(VaultItemDialogResult.PremiumUpgrade);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Inject, Component } from \"@angular/core\";\n\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { AsyncActionsModule, DialogModule, DialogService } from \"@bitwarden/components\";\nimport { PasswordHistoryViewComponent } from \"@bitwarden/vault\";\n\nimport { SharedModule } from \"../../shared/shared.module\";\n\n/**\n * The parameters for the password history dialog.\n */\nexport interface ViewPasswordHistoryDialogParams {\n  cipher: CipherView;\n}\n\n/**\n * A dialog component that displays the password history for a cipher.\n */\n@Component({\n  selector: \"app-vault-password-history\",\n  templateUrl: \"password-history.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    AsyncActionsModule,\n    DialogModule,\n    SharedModule,\n    PasswordHistoryViewComponent,\n  ],\n})\nexport class PasswordHistoryComponent {\n  /**\n   * The cipher to display the password history for.\n   */\n  cipher: CipherView;\n\n  /**\n   * The constructor for the password history dialog component.\n   * @param params The parameters passed to the password history dialog.\n   * @param dialogRef The dialog reference - used to close the dialog.\n   **/\n  constructor(\n    @Inject(DIALOG_DATA) public params: ViewPasswordHistoryDialogParams,\n    private dialogRef: DialogRef<PasswordHistoryComponent>,\n  ) {\n    /**\n     * Set the cipher from the parameters.\n     */\n    this.cipher = params.cipher;\n  }\n\n  /**\n   * Closes the password history dialog.\n   */\n  close() {\n    this.dialogRef.close();\n  }\n}\n\n/**\n * Strongly typed wrapper around the dialog service to open the password history dialog.\n */\nexport function openPasswordHistoryDialog(\n  dialogService: DialogService,\n  config: DialogConfig<ViewPasswordHistoryDialogParams>,\n) {\n  return dialogService.open(PasswordHistoryComponent, config);\n}\n","<bit-dialog dialogSize=\"small\" background=\"alt\">\n  <span bitDialogTitle>\n    {{ \"passwordHistory\" | i18n }}\n  </span>\n  <ng-container bitDialogContent>\n    <vault-password-history-view [cipher]=\"cipher\" />\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton (click)=\"close()\" buttonType=\"primary\" type=\"button\">\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","import { Injectable } from \"@angular/core\";\n\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { ViewPasswordHistoryService } from \"../../../../../../libs/common/src/vault/abstractions/view-password-history.service\";\nimport { openPasswordHistoryDialog } from \"../individual-vault/password-history.component\";\n\n/**\n * This service is used to display the password history dialog in the web vault.\n */\n@Injectable()\nexport class WebViewPasswordHistoryService implements ViewPasswordHistoryService {\n  constructor(private dialogService: DialogService) {}\n\n  /**\n   * Opens the password history dialog for the given cipher ID.\n   * @param cipherId The ID of the cipher to view the password history for.\n   */\n  async viewPasswordHistory(cipher: CipherView) {\n    openPasswordHistoryDialog(this.dialogService, { data: { cipher } });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormControl, FormGroup } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface PurgeVaultDialogData {\n  organizationId: string;\n}\n\n@Component({\n  selector: \"app-purge-vault\",\n  templateUrl: \"purge-vault.component.html\",\n})\nexport class PurgeVaultComponent {\n  organizationId: string = null;\n\n  formGroup = new FormGroup({\n    masterPassword: new FormControl<Verification>(null),\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected data: PurgeVaultDialogData,\n    private dialogRef: DialogRef,\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private userVerificationService: UserVerificationService,\n    private router: Router,\n    private syncService: SyncService,\n  ) {\n    this.organizationId = data && data.organizationId ? data.organizationId : null;\n  }\n\n  submit = async () => {\n    const response = this.userVerificationService\n      .buildRequest(this.formGroup.value.masterPassword)\n      .then((request) => this.apiService.postPurgeCiphers(request, this.organizationId));\n    await response;\n    this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"vaultPurged\"));\n    await this.syncService.fullSync(true);\n    if (this.organizationId != null) {\n      await this.router.navigate([\"organizations\", this.organizationId, \"vault\"]);\n    } else {\n      await this.router.navigate([\"vault\"]);\n    }\n    this.dialogRef.close();\n  };\n\n  static open(dialogService: DialogService, config?: DialogConfig<PurgeVaultDialogData>) {\n    return dialogService.open(PurgeVaultComponent, config);\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\" [title]=\"'purgeVault' | i18n\">\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">\n        {{ (organizationId ? \"purgeOrgVaultDesc\" : \"purgeVaultDesc\") | i18n }}\n      </p>\n      <bit-callout type=\"warning\">{{ \"purgeVaultWarning\" | i18n }}</bit-callout>\n      <app-user-verification formControlName=\"masterPassword\"></app-user-verification>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"danger\">\n        {{ \"purgeVault\" | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  CollectionAdminView,\n  CollectionView,\n  NestingDelimiter,\n} from \"@bitwarden/admin-console/common\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\n\nexport function getNestedCollectionTree(\n  collections: CollectionAdminView[],\n): TreeNode<CollectionAdminView>[];\nexport function getNestedCollectionTree(collections: CollectionView[]): TreeNode<CollectionView>[];\nexport function getNestedCollectionTree(\n  collections: (CollectionView | CollectionAdminView)[],\n): TreeNode<CollectionView | CollectionAdminView>[] {\n  if (!collections) {\n    return [];\n  }\n\n  // Collections need to be cloned because ServiceUtils.nestedTraverse actively\n  // modifies the names of collections.\n  // These changes risk affecting collections store in StateService.\n  const clonedCollections = collections\n    .sort((a, b) => a.name.localeCompare(b.name))\n    .map(cloneCollection);\n\n  const nodes: TreeNode<CollectionView | CollectionAdminView>[] = [];\n  clonedCollections.forEach((collection) => {\n    const parts =\n      collection.name != null\n        ? collection.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter)\n        : [];\n    ServiceUtils.nestedTraverse(nodes, 0, parts, collection, null, NestingDelimiter);\n  });\n  return nodes;\n}\n\nfunction cloneCollection(collection: CollectionView): CollectionView;\nfunction cloneCollection(collection: CollectionAdminView): CollectionAdminView;\nfunction cloneCollection(\n  collection: CollectionView | CollectionAdminView,\n): CollectionView | CollectionAdminView {\n  let cloned;\n\n  if (collection instanceof CollectionAdminView) {\n    cloned = new CollectionAdminView();\n    cloned.groups = [...collection.groups];\n    cloned.users = [...collection.users];\n    cloned.assigned = collection.assigned;\n    cloned.unmanaged = collection.unmanaged;\n  } else {\n    cloned = new CollectionView();\n  }\n\n  cloned.id = collection.id;\n  cloned.externalId = collection.externalId;\n  cloned.hidePasswords = collection.hidePasswords;\n  cloned.name = collection.name;\n  cloned.organizationId = collection.organizationId;\n  cloned.readOnly = collection.readOnly;\n  cloned.manage = collection.manage;\n  return cloned;\n}\n","<ng-template #loadingState>\n  <!-- This is the same html from index.html which presents the bitwarden logo and loading spinny properly\n   when the body has the layout_frontend class. Having this match the index allows for a duplicative yet seamless\n   loading state here for process reloading. -->\n  <div class=\"tw-p-8 tw-flex\">\n    <img class=\"new-logo-themed\" alt=\"Vaultwarden\" />\n    <div class=\"spinner-container tw-justify-center\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-3x tw-text-muted\"\n        title=\"Loading\"\n        aria-hidden=\"true\"\n      ></i>\n    </div>\n  </div>\n</ng-template>\n\n<ng-container *ngIf=\"!loading; else loadingState\">\n  <router-outlet></router-outlet>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DOCUMENT } from \"@angular/common\";\nimport { Component, Inject, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport * as jq from \"jquery\";\nimport { Subject, filter, firstValueFrom, map, takeUntil, timeout } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { EventUploadService } from \"@bitwarden/common/abstractions/event/event-upload.service\";\nimport { NotificationsService } from \"@bitwarden/common/abstractions/notifications.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { VaultTimeoutService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout.service\";\nimport { InternalOrganizationServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { ProcessReloadServiceAbstraction } from \"@bitwarden/common/key-management/abstractions/process-reload.service\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { StateEventRunnerService } from \"@bitwarden/common/platform/state\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { InternalFolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KeyService, BiometricStateService } from \"@bitwarden/key-management\";\n\nimport { PolicyListService } from \"./admin-console/core/policy-list.service\";\nimport {\n  DisableSendPolicy,\n  MasterPasswordPolicy,\n  PasswordGeneratorPolicy,\n  PersonalOwnershipPolicy,\n  RequireSsoPolicy,\n  ResetPasswordPolicy,\n  SendOptionsPolicy,\n  SingleOrgPolicy,\n  TwoFactorAuthenticationPolicy,\n} from \"./admin-console/organizations/policies\";\n\nconst BroadcasterSubscriptionId = \"AppComponent\";\nconst IdleTimeout = 60000 * 10; // 10 minutes\n\n@Component({\n  selector: \"app-root\",\n  templateUrl: \"app.component.html\",\n})\nexport class AppComponent implements OnDestroy, OnInit {\n  private lastActivity: Date = null;\n  private idleTimer: number = null;\n  private isIdle = false;\n  private destroy$ = new Subject<void>();\n\n  loading = false;\n\n  constructor(\n    @Inject(DOCUMENT) private document: Document,\n    private broadcasterService: BroadcasterService,\n    private folderService: InternalFolderService,\n    private syncService: SyncService,\n    private passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private cipherService: CipherService,\n    private authService: AuthService,\n    private router: Router,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private ngZone: NgZone,\n    private vaultTimeoutService: VaultTimeoutService,\n    private keyService: KeyService,\n    private collectionService: CollectionService,\n    private searchService: SearchService,\n    private notificationsService: NotificationsService,\n    private stateService: StateService,\n    private eventUploadService: EventUploadService,\n    private policyService: InternalPolicyService,\n    protected policyListService: PolicyListService,\n    private keyConnectorService: KeyConnectorService,\n    protected configService: ConfigService,\n    private dialogService: DialogService,\n    private biometricStateService: BiometricStateService,\n    private stateEventRunnerService: StateEventRunnerService,\n    private organizationService: InternalOrganizationServiceAbstraction,\n    private accountService: AccountService,\n    private processReloadService: ProcessReloadServiceAbstraction,\n  ) {}\n\n  ngOnInit() {\n    this.i18nService.locale$.pipe(takeUntil(this.destroy$)).subscribe((locale) => {\n      this.document.documentElement.lang = locale;\n    });\n\n    this.ngZone.runOutsideAngular(() => {\n      window.onmousemove = () => this.recordActivity();\n      window.onmousedown = () => this.recordActivity();\n      window.ontouchstart = () => this.recordActivity();\n      window.onclick = () => this.recordActivity();\n      window.onscroll = () => this.recordActivity();\n      window.onkeypress = () => this.recordActivity();\n    });\n\n    /// ############ DEPRECATED ############\n    /// Please do not use the AppComponent to send events between services.\n    ///\n    /// Services that depends on other services, should do so through Dependency Injection\n    /// and subscribe to events through that service observable.\n    ///\n    this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.ngZone.run(async () => {\n        switch (message.command) {\n          case \"loggedIn\":\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.notificationsService.updateConnection(false);\n            break;\n          case \"loggedOut\":\n            if (\n              message.userId == null ||\n              message.userId === (await firstValueFrom(this.accountService.activeAccount$))\n            ) {\n              await this.notificationsService.updateConnection(false);\n            }\n            break;\n          case \"unlocked\":\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.notificationsService.updateConnection(false);\n            break;\n          case \"authBlocked\":\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.router.navigate([\"/\"]);\n            break;\n          case \"logout\":\n            // note: the message.logoutReason isn't consumed anymore because of the process reload clearing any toasts.\n            await this.logOut(message.redirect);\n            break;\n          case \"lockVault\":\n            await this.vaultTimeoutService.lock();\n            break;\n          case \"locked\":\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.notificationsService.updateConnection(false);\n\n            await this.processReloadService.startProcessReload(this.authService);\n            break;\n          case \"lockedUrl\":\n            break;\n          case \"syncStarted\":\n            break;\n          case \"syncCompleted\":\n            if (message.successfully) {\n              await this.configService.ensureConfigFetched();\n            }\n            break;\n          case \"upgradeOrganization\": {\n            const upgradeConfirmed = await this.dialogService.openSimpleDialog({\n              title: { key: \"upgradeOrganization\" },\n              content: { key: \"upgradeOrganizationDesc\" },\n              acceptButtonText: { key: \"upgradeOrganization\" },\n              type: \"info\",\n            });\n            if (upgradeConfirmed) {\n              // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n              // eslint-disable-next-line @typescript-eslint/no-floating-promises\n              this.router.navigate([\n                \"organizations\",\n                message.organizationId,\n                \"billing\",\n                \"subscription\",\n              ]);\n            }\n            break;\n          }\n          case \"premiumRequired\": {\n            const premiumConfirmed = await this.dialogService.openSimpleDialog({\n              title: { key: \"premiumRequired\" },\n              content: { key: \"premiumRequiredDesc\" },\n              acceptButtonText: { key: \"upgrade\" },\n              type: \"success\",\n            });\n            if (premiumConfirmed) {\n              // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n              // eslint-disable-next-line @typescript-eslint/no-floating-promises\n              await this.router.navigate([\"settings/subscription/premium\"]);\n            }\n            break;\n          }\n          case \"emailVerificationRequired\": {\n            const emailVerificationConfirmed = await this.dialogService.openSimpleDialog({\n              title: { key: \"emailVerificationRequired\" },\n              content: { key: \"emailVerificationRequiredDesc\" },\n              acceptButtonText: { key: \"learnMore\" },\n              type: \"info\",\n            });\n            if (emailVerificationConfirmed) {\n              this.platformUtilsService.launchUri(\n                \"https://bitwarden.com/help/create-bitwarden-account/\",\n              );\n            }\n            break;\n          }\n          case \"showToast\":\n            if (typeof message.text === \"string\" && typeof crypto.subtle === \"undefined\") {\n              message.title = \"This browser requires HTTPS to use the web vault\";\n              message.text = \"Check the Vaultwarden wiki for details on how to enable it\";\n            }\n            this.toastService._showToast(message);\n            break;\n          case \"convertAccountToKeyConnector\":\n            // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n            // eslint-disable-next-line @typescript-eslint/no-floating-promises\n            this.router.navigate([\"/remove-password\"]);\n            break;\n          case \"syncOrganizationStatusChanged\": {\n            const { organizationId, enabled } = message;\n            const organizations = await firstValueFrom(this.organizationService.organizations$);\n            const organization = organizations.find((org) => org.id === organizationId);\n\n            if (organization) {\n              const updatedOrganization = {\n                ...organization,\n                enabled: enabled,\n              };\n              await this.organizationService.upsert(updatedOrganization);\n            }\n            break;\n          }\n          case \"syncOrganizationCollectionSettingChanged\": {\n            const { organizationId, limitCollectionCreation, limitCollectionDeletion } = message;\n            const organizations = await firstValueFrom(this.organizationService.organizations$);\n            const organization = organizations.find((org) => org.id === organizationId);\n\n            if (organization) {\n              await this.organizationService.upsert({\n                ...organization,\n                limitCollectionCreation: limitCollectionCreation,\n                limitCollectionDeletion: limitCollectionDeletion,\n              });\n            }\n            break;\n          }\n          default:\n            break;\n        }\n      });\n    });\n\n    this.router.events.pipe(takeUntil(this.destroy$)).subscribe((event) => {\n      if (event instanceof NavigationEnd) {\n        const modals = Array.from(document.querySelectorAll(\".modal\"));\n        for (const modal of modals) {\n          (jq(modal) as any).modal(\"hide\");\n        }\n      }\n    });\n\n    this.policyListService.addPolicies([\n      new TwoFactorAuthenticationPolicy(),\n      new MasterPasswordPolicy(),\n      new ResetPasswordPolicy(),\n      new PasswordGeneratorPolicy(),\n      new SingleOrgPolicy(),\n      new RequireSsoPolicy(),\n      new PersonalOwnershipPolicy(),\n      new DisableSendPolicy(),\n      new SendOptionsPolicy(),\n    ]);\n  }\n\n  ngOnDestroy() {\n    this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  private async logOut(redirect = true) {\n    // Ensure the loading state is applied before proceeding to avoid a flash\n    // of the login screen before the process reload fires.\n    this.ngZone.run(() => {\n      this.loading = true;\n      document.body.classList.add(\"layout_frontend\");\n    });\n\n    // Note: we don't display a toast logout reason anymore as the process reload\n    // will prevent any toasts from being displayed long enough to be read\n\n    await this.eventUploadService.uploadEvents();\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n\n    const logoutPromise = firstValueFrom(\n      this.authService.authStatusFor$(userId).pipe(\n        filter((authenticationStatus) => authenticationStatus === AuthenticationStatus.LoggedOut),\n        timeout({\n          first: 5_000,\n          with: () => {\n            throw new Error(\"The logout process did not complete in a reasonable amount of time.\");\n          },\n        }),\n      ),\n    );\n\n    await Promise.all([\n      this.keyService.clearKeys(),\n      this.cipherService.clear(userId),\n      this.folderService.clear(userId),\n      this.collectionService.clear(userId),\n      this.biometricStateService.logout(userId),\n    ]);\n\n    await this.stateEventRunnerService.handleEvent(\"logout\", userId);\n\n    await this.searchService.clearIndex();\n    this.authService.logOut(async () => {\n      await this.stateService.clean({ userId: userId });\n      await this.accountService.clean(userId);\n      await this.accountService.switchAccount(null);\n\n      await logoutPromise;\n\n      if (redirect) {\n        await this.router.navigate([\"/\"]);\n      }\n\n      await this.processReloadService.startProcessReload(this.authService);\n\n      // Normally we would need to reset the loading state to false or remove the layout_frontend\n      // class from the body here, but the process reload completely reloads the app so\n      // it handles it.\n    }, userId);\n  }\n\n  private async recordActivity() {\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    const now = new Date();\n    if (this.lastActivity != null && now.getTime() - this.lastActivity.getTime() < 250) {\n      return;\n    }\n\n    this.lastActivity = now;\n    await this.accountService.setAccountActivity(activeUserId, now);\n    // Idle states\n    if (this.isIdle) {\n      this.isIdle = false;\n      this.idleStateChanged();\n    }\n    if (this.idleTimer != null) {\n      window.clearTimeout(this.idleTimer);\n      this.idleTimer = null;\n    }\n    this.idleTimer = window.setTimeout(() => {\n      if (!this.isIdle) {\n        this.isIdle = true;\n        this.idleStateChanged();\n      }\n    }, IdleTimeout);\n  }\n\n  private idleStateChanged() {\n    if (this.isIdle) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.notificationsService.disconnectFromInactivity();\n    } else {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.notificationsService.reconnectFromActivity();\n    }\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ButtonModule } from \"@bitwarden/components\";\n\n/**\n * This component is used to display a message to the user that their authentication session has expired.\n * It provides a button to navigate to the login page.\n */\n@Component({\n  selector: \"app-two-factor-expired\",\n  standalone: true,\n  imports: [CommonModule, JslibModule, ButtonModule, RouterModule],\n  template: `\n    <p class=\"tw-text-center\">\n      {{ \"authenticationSessionTimedOut\" | i18n }}\n    </p>\n    <a routerLink=\"/login\" bitButton block buttonType=\"primary\">\n      {{ \"logIn\" | i18n }}\n    </a>\n  `,\n})\nexport class TwoFactorTimeoutComponent {}\n","import { Type, inject } from \"@angular/core\";\nimport { Route, Routes } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { componentRouteSwap } from \"../../utils/component-route-swap\";\n\n/**\n * Helper function to swap between two components based on the UnauthenticatedExtensionUIRefresh feature flag.\n * We need this because the auth teams's authenticated UI will be refreshed as part of the MVP but the\n * unauthenticated UIs will not necessarily make the cut.\n * Note: Even though this is primarily an extension refresh initiative, this will be used across clients\n * as we are consolidating the unauthenticated UIs into single libs/auth components which affects all clients.\n * @param defaultComponent - The current non-refreshed component to render.\n * @param refreshedComponent - The new refreshed component to render.\n * @param options - The shared route options to apply to both components.\n * @param altOptions - The alt route options to apply to the alt component. If not provided, the base options will be used.\n */\nexport function unauthUiRefreshSwap(\n  defaultComponent: Type<any>,\n  refreshedComponent: Type<any>,\n  options: Route,\n  altOptions?: Route,\n): Routes {\n  return componentRouteSwap(\n    defaultComponent,\n    refreshedComponent,\n    async () => {\n      const configService = inject(ConfigService);\n      return configService.getFeatureFlag(FeatureFlag.UnauthenticatedExtensionUIRefresh);\n    },\n    options,\n    altOptions,\n  );\n}\n","import { Injectable, inject } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ProfileResponse } from \"@bitwarden/common/models/response/profile.response\";\n\n@Injectable({\n  providedIn: \"root\",\n})\n/**\n * Class to provide profile level details without having to call the API each time.\n * NOTE: This is a temporary service and can be replaced once the `UnauthenticatedExtensionUIRefresh` flag goes live.\n * The `UnauthenticatedExtensionUIRefresh` introduces a sync that takes place upon logging in. These details can then\n * be added to account object and retrieved from there.\n * TODO: PM-16202\n */\nexport class VaultProfileService {\n  private apiService = inject(ApiService);\n\n  private userId: string | null = null;\n\n  /** Profile creation stored as a string. */\n  private profileCreatedDate: string | null = null;\n\n  /** True when 2FA is enabled on the profile. */\n  private profile2FAEnabled: boolean | null = null;\n\n  /**\n   * Returns the creation date of the profile.\n   * Note: `Date`s are mutable in JS, creating a new\n   * instance is important to avoid unwanted changes.\n   */\n  async getProfileCreationDate(userId: string): Promise<Date> {\n    if (this.profileCreatedDate && userId === this.userId) {\n      return Promise.resolve(new Date(this.profileCreatedDate));\n    }\n\n    const profile = await this.fetchAndCacheProfile();\n\n    return new Date(profile.creationDate);\n  }\n\n  /**\n   * Returns whether there is a 2FA provider on the profile.\n   */\n  async getProfileTwoFactorEnabled(userId: string): Promise<boolean> {\n    if (this.profile2FAEnabled !== null && userId === this.userId) {\n      return Promise.resolve(this.profile2FAEnabled);\n    }\n\n    const profile = await this.fetchAndCacheProfile();\n\n    return profile.twoFactorEnabled;\n  }\n\n  private async fetchAndCacheProfile(): Promise<ProfileResponse> {\n    const profile = await this.apiService.getProfile();\n\n    this.userId = profile.id;\n    this.profileCreatedDate = profile.creationDate;\n    this.profile2FAEnabled = profile.twoFactorEnabled;\n\n    return profile;\n  }\n}\n","import { inject } from \"@angular/core\";\nimport { ActivatedRouteSnapshot, CanActivateFn, Router } from \"@angular/router\";\nimport { Observable, firstValueFrom } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Account, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { NewDeviceVerificationNoticeService } from \"../../../../vault/src/services/new-device-verification-notice.service\";\nimport { VaultProfileService } from \"../services/vault-profile.service\";\n\nexport const NewDeviceVerificationNoticeGuard: CanActivateFn = async (\n  route: ActivatedRouteSnapshot,\n) => {\n  const router = inject(Router);\n  const configService = inject(ConfigService);\n  const newDeviceVerificationNoticeService = inject(NewDeviceVerificationNoticeService);\n  const accountService = inject(AccountService);\n  const platformUtilsService = inject(PlatformUtilsService);\n  const policyService = inject(PolicyService);\n  const vaultProfileService = inject(VaultProfileService);\n\n  if (route.queryParams[\"fromNewDeviceVerification\"]) {\n    return true;\n  }\n\n  const tempNoticeFlag = await configService.getFeatureFlag(\n    FeatureFlag.NewDeviceVerificationTemporaryDismiss,\n  );\n  const permNoticeFlag = await configService.getFeatureFlag(\n    FeatureFlag.NewDeviceVerificationPermanentDismiss,\n  );\n\n  if (!tempNoticeFlag && !permNoticeFlag) {\n    return true;\n  }\n\n  const currentAcct$: Observable<Account | null> = accountService.activeAccount$;\n  const currentAcct = await firstValueFrom(currentAcct$);\n\n  if (!currentAcct) {\n    return router.createUrlTree([\"/login\"]);\n  }\n\n  const has2FAEnabled = await hasATwoFactorProviderEnabled(vaultProfileService, currentAcct.id);\n  const isSelfHosted = await platformUtilsService.isSelfHost();\n  const requiresSSO = await isSSORequired(policyService);\n  const isProfileLessThanWeekOld = await profileIsLessThanWeekOld(\n    vaultProfileService,\n    currentAcct.id,\n  );\n\n  // When any of the following are true, the device verification notice is\n  // not applicable for the user.\n  if (has2FAEnabled || isSelfHosted || requiresSSO || isProfileLessThanWeekOld) {\n    return true;\n  }\n\n  const userItems$ = newDeviceVerificationNoticeService.noticeState$(currentAcct.id);\n  const userItems = await firstValueFrom(userItems$);\n\n  // Show the notice when:\n  // - The temp notice flag is enabled\n  // - The user hasn't dismissed the notice or the user dismissed it more than 7 days ago\n  if (\n    tempNoticeFlag &&\n    (!userItems?.last_dismissal || isMoreThan7DaysAgo(userItems?.last_dismissal))\n  ) {\n    return router.createUrlTree([\"/new-device-notice\"]);\n  }\n\n  // Show the notice when:\n  // - The permanent notice flag is enabled\n  // - The user hasn't dismissed the notice\n  if (permNoticeFlag && !userItems?.permanent_dismissal) {\n    return router.createUrlTree([\"/new-device-notice\"]);\n  }\n\n  return true;\n};\n\n/** Returns true has one 2FA provider enabled */\nasync function hasATwoFactorProviderEnabled(\n  vaultProfileService: VaultProfileService,\n  userId: string,\n): Promise<boolean> {\n  return vaultProfileService.getProfileTwoFactorEnabled(userId);\n}\n\n/** Returns true when the user's profile is less than a week old */\nasync function profileIsLessThanWeekOld(\n  vaultProfileService: VaultProfileService,\n  userId: string,\n): Promise<boolean> {\n  const creationDate = await vaultProfileService.getProfileCreationDate(userId);\n  return !isMoreThan7DaysAgo(creationDate);\n}\n\n/** Returns true when the user is required to login via SSO */\nasync function isSSORequired(policyService: PolicyService) {\n  return firstValueFrom(policyService.policyAppliesToActiveUser$(PolicyType.RequireSso));\n}\n\n/** Returns the true when the date given is older than 7 days */\nfunction isMoreThan7DaysAgo(date?: string | Date): boolean {\n  if (!date) {\n    return false;\n  }\n\n  const inputDate = new Date(date).getTime();\n  const today = new Date().getTime();\n\n  const differenceInMS = today - inputDate;\n  const msInADay = 1000 * 60 * 60 * 24;\n  const differenceInDays = Math.round(differenceInMS / msInADay);\n\n  return differenceInDays > 7;\n}\n","<div class=\"mt-5 d-flex justify-content-center\" *ngIf=\"loading\">\n  <div>\n    <img class=\"mb-4 logo logo-themed\" alt=\"Bitwarden\" />\n    <p class=\"text-center\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-2x text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </p>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, inject } from \"@angular/core\";\nimport { Params } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { OrganizationSponsorshipResponse } from \"@bitwarden/common/admin-console/models/response/organization-sponsorship.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { BaseAcceptComponent } from \"../../../common/base.accept.component\";\n\n/*\n * This component is responsible for handling the acceptance of a families plan sponsorship invite.\n * \"Bitwarden allows all members of Enterprise Organizations to redeem a complimentary Families Plan with their\n * personal email address.\" - https://bitwarden.com/learning/free-families-plan-for-enterprise/\n */\n@Component({\n  selector: \"app-accept-family-sponsorship\",\n  templateUrl: \"accept-family-sponsorship.component.html\",\n})\nexport class AcceptFamilySponsorshipComponent extends BaseAcceptComponent {\n  failedShortMessage = \"inviteAcceptFailedShort\";\n  failedMessage = \"inviteAcceptFailed\";\n\n  requiredParameters = [\"email\", \"token\"];\n\n  policyResponse!: OrganizationSponsorshipResponse;\n  policyApiService = inject(PolicyApiServiceAbstraction);\n  configService = inject(ConfigService);\n  toastService = inject(ToastService);\n\n  async authedHandler(qParams: Params) {\n    await this.router.navigate([\"/setup/families-for-enterprise\"], { queryParams: qParams });\n  }\n\n  async unauthedHandler(qParams: Params) {\n    if (!qParams.register) {\n      await this.router.navigate([\"/login\"], { queryParams: { email: qParams.email } });\n    } else {\n      // TODO: update logic when email verification flag is removed\n      let queryParams: Params;\n      let registerRoute = await firstValueFrom(this.registerRoute$);\n      if (registerRoute === \"/register\") {\n        queryParams = {\n          email: qParams.email,\n        };\n      } else if (registerRoute === \"/signup\") {\n        // We have to override the base component route as we don't need users to\n        // complete email verification if they are coming directly an emailed invite.\n\n        // TODO: in the future, to allow users to enter a name, consider sending all invite users to\n        // start registration page with prefilled email and a named token to be passed directly\n        // along to the finish-signup page without requiring email verification as\n        // we can treat the existence of the token as a form of email verification.\n\n        registerRoute = \"/finish-signup\";\n        queryParams = {\n          email: qParams.email,\n          orgSponsoredFreeFamilyPlanToken: qParams.token,\n        };\n      }\n\n      await this.router.navigate([registerRoute], {\n        queryParams: queryParams,\n      });\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PlanSponsorshipType } from \"../../../../billing/enums\";\n\nexport class OrganizationSponsorshipRedeemRequest {\n  planSponsorshipType: PlanSponsorshipType;\n  sponsoredOrganizationId: string;\n}\n","<div class=\"tw-container\">\n  <h1 bitTypography=\"h1\">{{ \"sponsoredFamiliesOffer\" | i18n }}</h1>\n  <div *ngIf=\"loading\" class=\"tw-mt-5 tw-flex tw-justify-center\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin bwi-2x tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n  <div *ngIf=\"!loading && badToken\" class=\"tw-mt-5 tw-flex tw-justify-center\">\n    <span>{{ \"badToken\" | i18n }}</span>\n  </div>\n  <form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\" *ngIf=\"!loading && !badToken\">\n    <p bitTypography=\"body1\">{{ \"acceptBitwardenFamiliesHelp\" | i18n }}</p>\n    <bit-form-field class=\"tw-w-1/2\">\n      <bit-label>{{ \"sponsoredFamiliesSelectOffer\" | i18n }}</bit-label>\n      <bit-select formControlName=\"selectedFamilyOrganizationId\">\n        <bit-option value=\"\" label=\"-- {{ 'select' | i18n }} --\" disabled></bit-option>\n        <bit-option value=\"createNew\" label=\"{{ 'newFamiliesOrganization' | i18n }}\"></bit-option>\n        <bit-option\n          *ngFor=\"let o of existingFamilyOrganizations$ | async\"\n          [label]=\"o.name\"\n          [value]=\"o.id\"\n        >\n        </bit-option>\n      </bit-select>\n    </bit-form-field>\n    <div *ngIf=\"showNewOrganization\">\n      <app-organization-plans></app-organization-plans>\n    </div>\n    <div class=\"w-1/2\" *ngIf=\"!showNewOrganization\">\n      <button bitButton buttonType=\"primary\" bitFormButton type=\"submit\">\n        {{ \"acceptOffer\" | i18n }}\n      </button>\n    </div>\n  </form>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { lastValueFrom, Observable, Subject } from \"rxjs\";\nimport { first, map, takeUntil } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { OrganizationSponsorshipRedeemRequest } from \"@bitwarden/common/admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { PreValidateSponsorshipResponse } from \"@bitwarden/common/admin-console/models/response/pre-validate-sponsorship.response\";\nimport { PlanSponsorshipType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { OrganizationPlansComponent } from \"../../../billing\";\nimport { SharedModule } from \"../../../shared\";\nimport {\n  DeleteOrganizationDialogResult,\n  openDeleteOrganizationDialog,\n} from \"../settings/components\";\n\n@Component({\n  templateUrl: \"families-for-enterprise-setup.component.html\",\n  standalone: true,\n  imports: [SharedModule, OrganizationPlansComponent],\n})\nexport class FamiliesForEnterpriseSetupComponent implements OnInit, OnDestroy {\n  @ViewChild(OrganizationPlansComponent, { static: false })\n  set organizationPlansComponent(value: OrganizationPlansComponent) {\n    if (!value) {\n      return;\n    }\n\n    value.plan = PlanType.FamiliesAnnually;\n    value.productTier = ProductTierType.Families;\n    value.acceptingSponsorship = true;\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n    value.onSuccess.subscribe(this.onOrganizationCreateSuccess.bind(this));\n  }\n\n  loading = true;\n  badToken = false;\n\n  token: string;\n  existingFamilyOrganizations: Organization[];\n  existingFamilyOrganizations$: Observable<Organization[]>;\n\n  showNewOrganization = false;\n  _organizationPlansComponent: OrganizationPlansComponent;\n  preValidateSponsorshipResponse: PreValidateSponsorshipResponse;\n  _selectedFamilyOrganizationId = \"\";\n\n  private _destroy = new Subject<void>();\n  formGroup = this.formBuilder.group({\n    selectedFamilyOrganizationId: [\"\", Validators.required],\n  });\n  constructor(\n    private router: Router,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private route: ActivatedRoute,\n    private apiService: ApiService,\n    private syncService: SyncService,\n    private validationService: ValidationService,\n    private organizationService: OrganizationService,\n    private dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    document.body.classList.remove(\"layout_frontend\");\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      const error = qParams.token == null;\n      if (error) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: this.i18nService.t(\"sponsoredFamiliesAcceptFailed\"),\n          timeout: 10000,\n        });\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/\"]);\n        return;\n      }\n\n      this.token = qParams.token;\n\n      await this.syncService.fullSync(true);\n\n      this.preValidateSponsorshipResponse = await this.apiService.postPreValidateSponsorshipToken(\n        this.token,\n      );\n      if (this.preValidateSponsorshipResponse.isFreeFamilyPolicyEnabled) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: this.i18nService.t(\"errorOccured\"),\n          message: this.i18nService.t(\"offerNoLongerValid\"),\n        });\n\n        await this.router.navigate([\"/\"]);\n        return;\n      } else {\n        this.badToken = !this.preValidateSponsorshipResponse.isTokenValid;\n      }\n\n      this.loading = false;\n    });\n\n    this.existingFamilyOrganizations$ = this.organizationService.organizations$.pipe(\n      map((orgs) =>\n        orgs.filter(\n          (o) =>\n            o.productTierType === ProductTierType.Families && o.type === OrganizationUserType.Owner,\n        ),\n      ),\n    );\n\n    this.existingFamilyOrganizations$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {\n      if (orgs.length === 0) {\n        this.selectedFamilyOrganizationId = \"createNew\";\n      }\n    });\n    this.formGroup.valueChanges.pipe(takeUntil(this._destroy)).subscribe((val) => {\n      this.selectedFamilyOrganizationId = val.selectedFamilyOrganizationId;\n    });\n  }\n\n  ngOnDestroy(): void {\n    this._destroy.next();\n    this._destroy.complete();\n  }\n\n  submit = async () => {\n    await this.doSubmit(this._selectedFamilyOrganizationId);\n  };\n\n  get selectedFamilyOrganizationId() {\n    return this._selectedFamilyOrganizationId;\n  }\n\n  set selectedFamilyOrganizationId(value: string) {\n    this._selectedFamilyOrganizationId = value;\n    this.showNewOrganization = value === \"createNew\";\n  }\n\n  private async doSubmit(organizationId: string) {\n    try {\n      const request = new OrganizationSponsorshipRedeemRequest();\n      request.planSponsorshipType = PlanSponsorshipType.FamiliesForEnterprise;\n      request.sponsoredOrganizationId = organizationId;\n\n      await this.apiService.postRedeemSponsorship(this.token, request);\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"sponsoredFamiliesOfferRedeemed\"),\n      });\n      await this.syncService.fullSync(true);\n\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"/\"]);\n    } catch (e) {\n      if (this.showNewOrganization) {\n        const dialog = openDeleteOrganizationDialog(this.dialogService, {\n          data: {\n            organizationId: organizationId,\n            requestType: \"InvalidFamiliesForEnterprise\",\n          },\n        });\n\n        const result = await lastValueFrom(dialog.closed);\n\n        if (result === DeleteOrganizationDialogResult.Deleted) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.router.navigate([\"/\"]);\n        }\n      }\n      this.validationService.showError(this.i18nService.t(\"sponsorshipTokenHasExpired\"));\n    }\n  }\n\n  private async onOrganizationCreateSuccess(value: any) {\n    // Use newly created organization id\n    await this.doSubmit(value.organizationId);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\n\nimport { OrganizationPlansComponent } from \"../../billing\";\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  templateUrl: \"create-organization.component.html\",\n  standalone: true,\n  imports: [SharedModule, OrganizationPlansComponent, HeaderModule],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class CreateOrganizationComponent implements OnInit {\n  @ViewChild(OrganizationPlansComponent, { static: true })\n  orgPlansComponent: OrganizationPlansComponent;\n\n  constructor(private route: ActivatedRoute) {}\n\n  ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      if (qParams.plan === \"families\") {\n        this.orgPlansComponent.plan = PlanType.FamiliesAnnually;\n        this.orgPlansComponent.productTier = ProductTierType.Families;\n      } else if (qParams.plan === \"teams\") {\n        this.orgPlansComponent.plan = PlanType.TeamsAnnually;\n        this.orgPlansComponent.productTier = ProductTierType.Teams;\n      } else if (qParams.plan === \"teamsStarter\") {\n        this.orgPlansComponent.plan = PlanType.TeamsStarter;\n        this.orgPlansComponent.productTier = ProductTierType.TeamsStarter;\n      } else if (qParams.plan === \"enterprise\") {\n        this.orgPlansComponent.plan = PlanType.EnterpriseAnnually;\n        this.orgPlansComponent.productTier = ProductTierType.Enterprise;\n      }\n    });\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p>{{ \"newOrganizationDesc\" | i18n }}</p>\n  <app-organization-plans></app-organization-plans>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { LoginEmailServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PasswordHintRequest } from \"@bitwarden/common/auth/models/request/password-hint.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Directive()\nexport class HintComponent implements OnInit {\n  email = \"\";\n  formPromise: Promise<any>;\n\n  protected successRoute = \"login\";\n  protected onSuccessfulSubmit: () => void;\n\n  constructor(\n    protected router: Router,\n    protected i18nService: I18nService,\n    protected apiService: ApiService,\n    protected platformUtilsService: PlatformUtilsService,\n    private logService: LogService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.email = (await firstValueFrom(this.loginEmailService.loginEmail$)) ?? \"\";\n  }\n\n  async submit() {\n    if (this.email == null || this.email === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"emailRequired\"),\n      });\n      return;\n    }\n    if (this.email.indexOf(\"@\") === -1) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"invalidEmail\"),\n      });\n      return;\n    }\n\n    try {\n      this.formPromise = this.apiService.postPasswordHint(new PasswordHintRequest(this.email));\n      await this.formPromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"masterPassSent\"),\n      });\n      if (this.onSuccessfulSubmit != null) {\n        this.onSuccessfulSubmit();\n      } else if (this.router != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([this.successRoute]);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { HintComponent as BaseHintComponent } from \"@bitwarden/angular/auth/components/hint.component\";\nimport { LoginEmailServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-hint\",\n  templateUrl: \"hint.component.html\",\n})\nexport class HintComponent extends BaseHintComponent implements OnInit {\n  formGroup = this.formBuilder.group({\n    email: [\"\", [Validators.email, Validators.required]],\n  });\n\n  get emailFormControl() {\n    return this.formGroup.controls.email;\n  }\n\n  constructor(\n    router: Router,\n    i18nService: I18nService,\n    apiService: ApiService,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    loginEmailService: LoginEmailServiceAbstraction,\n    private formBuilder: FormBuilder,\n    protected toastService: ToastService,\n  ) {\n    super(\n      router,\n      i18nService,\n      apiService,\n      platformUtilsService,\n      logService,\n      loginEmailService,\n      toastService,\n    );\n  }\n\n  async ngOnInit(): Promise<void> {\n    await super.ngOnInit();\n    this.emailFormControl.setValue(this.email);\n  }\n\n  // Wrapper method to call super.submit() since properties (e.g., submit) cannot use super directly\n  // This is because properties are assigned per type and generally don't have access to the prototype\n  async superSubmit() {\n    await super.submit();\n  }\n\n  submit = async () => {\n    this.email = this.emailFormControl.value;\n    await this.superSubmit();\n  };\n}\n","<form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n  <bit-form-field>\n    <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n    <input\n      bitInput\n      appAutofocus\n      inputmode=\"email\"\n      appInputVerbatim=\"false\"\n      type=\"email\"\n      formControlName=\"email\"\n    />\n    <bit-hint>{{ \"enterEmailToGetHint\" | i18n }}</bit-hint>\n  </bit-form-field>\n  <hr />\n  <div class=\"tw-flex tw-gap-2\">\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [block]=\"true\">\n      {{ \"submit\" | i18n }}\n    </button>\n    <a bitButton buttonType=\"secondary\" routerLink=\"/login\" [block]=\"true\">\n      {{ \"cancel\" | i18n }}\n    </a>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport {\n  firstValueFrom,\n  switchMap,\n  Subject,\n  catchError,\n  from,\n  of,\n  finalize,\n  takeUntil,\n  defer,\n  throwError,\n  map,\n  Observable,\n  take,\n} from \"rxjs\";\n\nimport { OrganizationUserApiService } from \"@bitwarden/admin-console/common\";\nimport {\n  LoginEmailServiceAbstraction,\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { DevicesServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices/devices.service.abstraction\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"@bitwarden/common/auth/abstractions/password-reset-enrollment.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nenum State {\n  NewUser,\n  ExistingUserUntrustedDevice,\n}\n\ntype NewUserData = {\n  readonly state: State.NewUser;\n  readonly organizationId: string;\n  readonly userEmail: string;\n};\n\ntype ExistingUserUntrustedDeviceData = {\n  readonly state: State.ExistingUserUntrustedDevice;\n  readonly showApproveFromOtherDeviceBtn: boolean;\n  readonly showReqAdminApprovalBtn: boolean;\n  readonly showApproveWithMasterPasswordBtn: boolean;\n  readonly userEmail: string;\n};\n\ntype Data = NewUserData | ExistingUserUntrustedDeviceData;\n\n@Directive()\nexport class BaseLoginDecryptionOptionsComponentV1 implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  protected State = State;\n\n  protected data?: Data;\n  protected loading = true;\n\n  private email$: Observable<string>;\n\n  activeAccountId: UserId;\n\n  // Remember device means for the user to trust the device\n  rememberDeviceForm = this.formBuilder.group({\n    rememberDevice: [true],\n  });\n\n  get rememberDevice(): FormControl<boolean> {\n    return this.rememberDeviceForm?.controls.rememberDevice;\n  }\n\n  constructor(\n    protected formBuilder: FormBuilder,\n    protected devicesService: DevicesServiceAbstraction,\n    protected stateService: StateService,\n    protected router: Router,\n    protected activatedRoute: ActivatedRoute,\n    protected messagingService: MessagingService,\n    protected tokenService: TokenService,\n    protected loginEmailService: LoginEmailServiceAbstraction,\n    protected organizationApiService: OrganizationApiServiceAbstraction,\n    protected keyService: KeyService,\n    protected organizationUserApiService: OrganizationUserApiService,\n    protected apiService: ApiService,\n    protected i18nService: I18nService,\n    protected validationService: ValidationService,\n    protected deviceTrustService: DeviceTrustServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    protected passwordResetEnrollmentService: PasswordResetEnrollmentServiceAbstraction,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.loading = true;\n    this.activeAccountId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    this.email$ = this.accountService.activeAccount$.pipe(\n      map((a) => a?.email),\n      catchError((err: unknown) => {\n        this.validationService.showError(err);\n        return of(undefined);\n      }),\n      takeUntil(this.destroy$),\n    );\n\n    this.setupRememberDeviceValueChanges();\n\n    // Persist user choice from state if it exists\n    await this.setRememberDeviceDefaultValue();\n\n    try {\n      const userDecryptionOptions = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptions$,\n      );\n\n      // see sso-login.strategy - to determine if a user is new or not it just checks if there is a key on the token response..\n      // can we check if they have a user key or master key in crypto service? Would that be sufficient?\n      if (\n        !userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval &&\n        !userDecryptionOptions?.hasMasterPassword\n      ) {\n        // We are dealing with a new account if:\n        //  - User does not have admin approval (i.e. has not enrolled into admin reset)\n        //  - AND does not have a master password\n\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.loadNewUserData();\n      } else {\n        this.loadUntrustedDeviceData(userDecryptionOptions);\n      }\n\n      // Note: this is probably not a comprehensive write up of all scenarios:\n\n      // If the TDE feature flag is enabled and TDE is configured for the org that the user is a member of,\n      // then new and existing users can be redirected here after completing the SSO flow (and 2FA if enabled).\n\n      // First we must determine user type (new or existing):\n\n      // New User\n      // - present user with option to remember the device or not (trust the device)\n      // - present a continue button to proceed to the vault\n      //  - loadNewUserData() --> will need to load enrollment status and user email address.\n\n      // Existing User\n      // - Determine if user is an admin with access to account recovery in admin console\n      //  - Determine if user has a MP or not, if not, they must be redirected to set one (see PM-1035)\n      // - Determine if device is trusted or not via device crypto service (method not yet written)\n      //  - If not trusted, present user with login decryption options (approve from other device, approve with master password, request admin approval)\n      //    - loadUntrustedDeviceData()\n    } catch (err) {\n      this.validationService.showError(err);\n    }\n  }\n\n  private async setRememberDeviceDefaultValue() {\n    const rememberDeviceFromState = await this.deviceTrustService.getShouldTrustDevice(\n      this.activeAccountId,\n    );\n\n    const rememberDevice = rememberDeviceFromState ?? true;\n\n    this.rememberDevice.setValue(rememberDevice);\n  }\n\n  private setupRememberDeviceValueChanges() {\n    this.rememberDevice.valueChanges\n      .pipe(\n        switchMap((value) =>\n          defer(() => this.deviceTrustService.setShouldTrustDevice(this.activeAccountId, value)),\n        ),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  async loadNewUserData() {\n    const autoEnrollStatus$ = defer(() =>\n      this.ssoLoginService.getActiveUserOrganizationSsoIdentifier(),\n    ).pipe(\n      switchMap((organizationIdentifier) => {\n        if (organizationIdentifier == undefined) {\n          return throwError(() => new Error(this.i18nService.t(\"ssoIdentifierRequired\")));\n        }\n\n        return from(this.organizationApiService.getAutoEnrollStatus(organizationIdentifier));\n      }),\n      catchError((err: unknown) => {\n        this.validationService.showError(err);\n        return of(undefined);\n      }),\n    );\n\n    const autoEnrollStatus = await firstValueFrom(autoEnrollStatus$);\n    const email = await firstValueFrom(this.email$);\n\n    this.data = { state: State.NewUser, organizationId: autoEnrollStatus.id, userEmail: email };\n    this.loading = false;\n  }\n\n  loadUntrustedDeviceData(userDecryptionOptions: UserDecryptionOptions) {\n    this.loading = true;\n\n    this.email$\n      .pipe(\n        take(1),\n        finalize(() => {\n          this.loading = false;\n        }),\n      )\n      .subscribe((email) => {\n        const showApproveFromOtherDeviceBtn =\n          userDecryptionOptions?.trustedDeviceOption?.hasLoginApprovingDevice || false;\n\n        const showReqAdminApprovalBtn =\n          !!userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval || false;\n\n        const showApproveWithMasterPasswordBtn = userDecryptionOptions?.hasMasterPassword || false;\n\n        const userEmail = email;\n\n        this.data = {\n          state: State.ExistingUserUntrustedDevice,\n          showApproveFromOtherDeviceBtn,\n          showReqAdminApprovalBtn,\n          showApproveWithMasterPasswordBtn,\n          userEmail,\n        };\n      });\n  }\n\n  async approveFromOtherDevice() {\n    if (this.data.state !== State.ExistingUserUntrustedDevice) {\n      return;\n    }\n\n    this.loginEmailService.setLoginEmail(this.data.userEmail);\n    await this.router.navigate([\"/login-with-device\"]);\n  }\n\n  async requestAdminApproval() {\n    this.loginEmailService.setLoginEmail(this.data.userEmail);\n    await this.router.navigate([\"/admin-approval-requested\"]);\n  }\n\n  async approveWithMasterPassword() {\n    await this.router.navigate([\"/lock\"], { queryParams: { from: \"login-initiated\" } });\n  }\n\n  async createUser() {\n    if (this.data.state !== State.NewUser) {\n      return;\n    }\n\n    // this.loading to support clients without async-actions-support\n    this.loading = true;\n    // errors must be caught in child components to prevent navigation\n    try {\n      const { publicKey, privateKey } = await this.keyService.initAccount();\n      const keysRequest = new KeysRequest(publicKey, privateKey.encryptedString);\n      await this.apiService.postAccountKeys(keysRequest);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"accountSuccessfullyCreated\"),\n      });\n\n      await this.passwordResetEnrollmentService.enroll(this.data.organizationId);\n\n      if (this.rememberDeviceForm.value.rememberDevice) {\n        await this.deviceTrustService.trustDevice(this.activeAccountId);\n      }\n    } finally {\n      this.loading = false;\n    }\n  }\n\n  logOut() {\n    this.loading = true; // to avoid an awkward delay in browser extension\n    this.messagingService.send(\"logout\");\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<div class=\"tw-container tw-mx-auto\">\n  <div\n    class=\"tw-mx-auto tw-mt-5 tw-flex tw-max-w-lg tw-flex-col tw-items-center tw-justify-center tw-p-8\"\n  >\n    <div class=\"tw-mb-6\">\n      <img class=\"logo logo-themed\" alt=\"Bitwarden\" />\n    </div>\n\n    <ng-container *ngIf=\"loading\">\n      <p class=\"text-center\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin bwi-2x text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </p>\n    </ng-container>\n\n    <div\n      *ngIf=\"!loading\"\n      class=\"tw-w-full tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6\"\n    >\n      <ng-container *ngIf=\"data.state == State.ExistingUserUntrustedDevice\">\n        <h2 bitTypography=\"h2\" class=\"tw-mb-6\">{{ \"loginInitiated\" | i18n }}</h2>\n\n        <p bitTypography=\"body1\" class=\"tw-mb-6\">\n          {{ \"deviceApprovalRequired\" | i18n }}\n        </p>\n\n        <form [formGroup]=\"rememberDeviceForm\">\n          <bit-form-control>\n            <input type=\"checkbox\" bitCheckbox formControlName=\"rememberDevice\" />\n            <bit-label>{{ \"rememberThisDevice\" | i18n }} </bit-label>\n            <bit-hint bitTypography=\"body2\">{{ \"uncheckIfPublicDevice\" | i18n }}</bit-hint>\n          </bit-form-control>\n        </form>\n\n        <div class=\"tw-mb-6 tw-flex tw-flex-col tw-space-y-3\">\n          <button\n            *ngIf=\"data.showApproveFromOtherDeviceBtn\"\n            (click)=\"approveFromOtherDevice()\"\n            bitButton\n            type=\"button\"\n            buttonType=\"primary\"\n            block\n          >\n            {{ \"approveFromYourOtherDevice\" | i18n }}\n          </button>\n\n          <button\n            *ngIf=\"data.showReqAdminApprovalBtn\"\n            (click)=\"requestAdminApproval()\"\n            bitButton\n            type=\"button\"\n            buttonType=\"secondary\"\n          >\n            {{ \"requestAdminApproval\" | i18n }}\n          </button>\n\n          <button\n            *ngIf=\"data.showApproveWithMasterPasswordBtn\"\n            (click)=\"approveWithMasterPassword()\"\n            bitButton\n            type=\"button\"\n            buttonType=\"secondary\"\n            block\n          >\n            {{ \"approveWithMasterPassword\" | i18n }}\n          </button>\n        </div>\n      </ng-container>\n\n      <ng-container *ngIf=\"data.state == State.NewUser\">\n        <h2 bitTypography=\"h2\" class=\"tw-mb-6\">{{ \"loggedInExclamation\" | i18n }}</h2>\n\n        <form [formGroup]=\"rememberDeviceForm\">\n          <bit-form-control>\n            <input type=\"checkbox\" bitCheckbox formControlName=\"rememberDevice\" />\n            <bit-label>{{ \"rememberThisDevice\" | i18n }} </bit-label>\n            <bit-hint bitTypography=\"body2\">{{ \"uncheckIfPublicDevice\" | i18n }}</bit-hint>\n          </bit-form-control>\n        </form>\n\n        <button\n          bitButton\n          type=\"button\"\n          buttonType=\"primary\"\n          block\n          class=\"tw-mb-6\"\n          [bitAction]=\"createUserAction\"\n        >\n          {{ \"continue\" | i18n }}\n        </button>\n      </ng-container>\n\n      <hr class=\"tw-mb-6 tw-mt-0\" />\n\n      <div class=\"tw-m-0 tw-text-sm\">\n        <p class=\"tw-mb-1\">{{ \"loggingInAs\" | i18n }} {{ data.userEmail }}</p>\n        <a [routerLink]=\"[]\" (click)=\"logOut()\">{{ \"notYou\" | i18n }}</a>\n      </div>\n    </div>\n  </div>\n</div>\n","import { Component, inject } from \"@angular/core\";\n\nimport { BaseLoginDecryptionOptionsComponentV1 } from \"@bitwarden/angular/auth/components/base-login-decryption-options-v1.component\";\n\nimport { RouterService } from \"../../../core\";\nimport { AcceptOrganizationInviteService } from \"../../organization-invite/accept-organization.service\";\n@Component({\n  selector: \"web-login-decryption-options\",\n  templateUrl: \"login-decryption-options-v1.component.html\",\n})\nexport class LoginDecryptionOptionsComponentV1 extends BaseLoginDecryptionOptionsComponentV1 {\n  protected routerService = inject(RouterService);\n  protected acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n  override async createUser(): Promise<void> {\n    try {\n      await super.createUser();\n\n      // Invites from TDE orgs go through here, but the invite is\n      // accepted while being enrolled in admin recovery. So we need to clear\n      // the redirect and stored org invite.\n      await this.routerService.getAndClearLoginRedirectUrl();\n      await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n\n      await this.router.navigate([\"/vault\"]);\n    } catch (error) {\n      this.validationService.showError(error);\n    }\n  }\n\n  createUserAction = async (): Promise<void> => {\n    return this.createUser();\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class IFrameComponent {\n  iframe: HTMLIFrameElement;\n  private connectorLink: HTMLAnchorElement;\n  private parseFunction = this.parseMessage.bind(this);\n\n  constructor(\n    private win: Window,\n    protected webVaultUrl: string,\n    private path: string,\n    private iframeId: string,\n    public successCallback?: (message: string) => any,\n    public errorCallback?: (message: string) => any,\n    public infoCallback?: (message: string) => any,\n  ) {\n    this.connectorLink = win.document.createElement(\"a\");\n  }\n\n  stop() {\n    this.sendMessage(\"stop\");\n  }\n\n  start() {\n    this.sendMessage(\"start\");\n  }\n\n  sendMessage(message: any) {\n    if (!this.iframe || !this.iframe.src || !this.iframe.contentWindow) {\n      return;\n    }\n\n    this.iframe.contentWindow.postMessage(message, this.iframe.src);\n  }\n\n  base64Encode(str: string): string {\n    return btoa(\n      encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {\n        return String.fromCharCode((\"0x\" + p1) as any);\n      }),\n    );\n  }\n\n  cleanup() {\n    this.win.removeEventListener(\"message\", this.parseFunction, false);\n  }\n\n  protected createParams(data: any, version: number) {\n    return new URLSearchParams({\n      data: this.base64Encode(JSON.stringify(data)),\n      parent: encodeURIComponent(this.win.document.location.href),\n      v: version.toString(),\n    });\n  }\n\n  protected initComponent(params: URLSearchParams): void {\n    this.connectorLink.href = `${this.webVaultUrl}/${this.path}?${params}`;\n    this.iframe = this.win.document.getElementById(this.iframeId) as HTMLIFrameElement;\n    this.iframe.src = this.connectorLink.href;\n\n    this.win.addEventListener(\"message\", this.parseFunction, false);\n  }\n\n  private parseMessage(event: MessageEvent) {\n    if (!this.validMessage(event)) {\n      return;\n    }\n\n    const parts: string[] = event.data.split(\"|\");\n    if (parts[0] === \"success\" && this.successCallback) {\n      this.successCallback(parts[1]);\n    } else if (parts[0] === \"error\" && this.errorCallback) {\n      this.errorCallback(parts[1]);\n    } else if (parts[0] === \"info\" && this.infoCallback) {\n      this.infoCallback(parts[1]);\n    }\n  }\n\n  private validMessage(event: MessageEvent) {\n    if (\n      event.origin == null ||\n      event.origin === \"\" ||\n      event.origin !== (this.connectorLink as any).origin ||\n      event.data == null ||\n      typeof event.data !== \"string\"\n    ) {\n      return false;\n    }\n\n    return (\n      event.data.indexOf(\"success|\") === 0 ||\n      event.data.indexOf(\"error|\") === 0 ||\n      event.data.indexOf(\"info|\") === 0\n    );\n  }\n}\n","import { I18nService } from \"../platform/abstractions/i18n.service\";\n\nimport { IFrameComponent } from \"./iframe-component\";\n\n// TODO: PM-15162 - captcha is deprecated as part of UI refresh work\nexport class CaptchaIFrame extends IFrameComponent {\n  constructor(\n    win: Window,\n    webVaultUrl: string,\n    private i18nService: I18nService,\n    successCallback: (message: string) => any,\n    errorCallback: (message: string) => any,\n    infoCallback: (message: string) => any,\n  ) {\n    super(\n      win,\n      webVaultUrl,\n      \"captcha-connector.html\",\n      \"hcaptcha_iframe\",\n      successCallback,\n      errorCallback,\n      (message: string) => {\n        const parsedMessage = JSON.parse(message);\n        if (typeof parsedMessage !== \"string\") {\n          this.iframe.height = parsedMessage.height.toString();\n          this.iframe.width = parsedMessage.width.toString();\n        } else {\n          infoCallback(parsedMessage);\n        }\n      },\n    );\n  }\n\n  init(siteKey: string): void {\n    super.initComponent(\n      this.createParams({ siteKey: siteKey, locale: this.i18nService.translationLocale }, 1),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, Input } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { CaptchaIFrame } from \"@bitwarden/common/auth/captcha-iframe\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Directive()\nexport abstract class CaptchaProtectedComponent {\n  @Input() captchaSiteKey: string = null;\n  captchaToken: string = null;\n  captcha: CaptchaIFrame;\n\n  constructor(\n    protected environmentService: EnvironmentService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected toastService: ToastService,\n  ) {}\n\n  async setupCaptcha() {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const webVaultUrl = env.getWebVaultUrl();\n\n    this.captcha = new CaptchaIFrame(\n      window,\n      webVaultUrl,\n      this.i18nService,\n      (token: string) => {\n        this.captchaToken = token;\n      },\n      (error: string) => {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: this.i18nService.t(\"errorOccurred\"),\n          message: error,\n        });\n      },\n      (info: string) => {\n        this.toastService.showToast({\n          variant: \"info\",\n          title: this.i18nService.t(\"info\"),\n          message: info,\n        });\n      },\n    );\n  }\n\n  showCaptcha() {\n    return !Utils.isNullOrWhitespace(this.captchaSiteKey);\n  }\n\n  protected handleCaptchaRequired(response: { captchaSiteKey: string }): boolean {\n    if (Utils.isNullOrWhitespace(response.captchaSiteKey)) {\n      return false;\n    }\n\n    this.captchaSiteKey = response.captchaSiteKey;\n    this.captcha.init(response.captchaSiteKey);\n    return true;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, NavigationSkipped, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom, of } from \"rxjs\";\nimport { switchMap, take, takeUntil } from \"rxjs/operators\";\n\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  PasswordLoginCredentials,\n  RegisterRouteService,\n} from \"@bitwarden/auth/common\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport {\n  AllValidationErrors,\n  FormValidationErrorsService,\n} from \"../../platform/abstractions/form-validation-errors.service\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class LoginComponentV1 extends CaptchaProtectedComponent implements OnInit, OnDestroy {\n  @ViewChild(\"masterPasswordInput\", { static: true }) masterPasswordInput: ElementRef;\n\n  showPassword = false;\n  formPromise: Promise<AuthResult>;\n\n  onSuccessfulLogin: () => Promise<any>;\n  onSuccessfulLoginNavigate: (userId: UserId) => Promise<any>;\n  onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;\n  onSuccessfulLoginForceResetNavigate: () => Promise<any>;\n\n  showLoginWithDevice: boolean;\n  validatedEmail = false;\n  paramEmailSet = false;\n\n  get emailFormControl() {\n    return this.formGroup.controls.email;\n  }\n\n  formGroup = this.formBuilder.group({\n    email: [\"\", [Validators.required, Validators.email]],\n    masterPassword: [\n      \"\",\n      [Validators.required, Validators.minLength(Utils.originalMinimumPasswordLength)],\n    ],\n    rememberEmail: [false],\n  });\n\n  protected twoFactorRoute = \"2fa\";\n  protected successRoute = \"vault\";\n  // TODO: remove when email verification flag is removed\n  protected registerRoute$ = this.registerRouteService.registerRoute$();\n  protected forcePasswordResetRoute = \"update-temp-password\";\n\n  protected destroy$ = new Subject<void>();\n\n  get loggedEmail() {\n    return this.formGroup.value.email;\n  }\n\n  constructor(\n    protected devicesApiService: DevicesApiServiceAbstraction,\n    protected appIdService: AppIdService,\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    protected stateService: StateService,\n    environmentService: EnvironmentService,\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected logService: LogService,\n    protected ngZone: NgZone,\n    protected formBuilder: FormBuilder,\n    protected formValidationErrorService: FormValidationErrorsService,\n    protected route: ActivatedRoute,\n    protected loginEmailService: LoginEmailServiceAbstraction,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n    protected registerRouteService: RegisterRouteService,\n    protected toastService: ToastService,\n  ) {\n    super(environmentService, i18nService, platformUtilsService, toastService);\n  }\n\n  async ngOnInit() {\n    this.route?.queryParams\n      .pipe(\n        switchMap((params) => {\n          if (!params) {\n            // If no params,loadEmailSettings from state\n            return this.loadEmailSettings();\n          }\n\n          const queryParamsEmail = params.email;\n\n          if (queryParamsEmail != null && queryParamsEmail.indexOf(\"@\") > -1) {\n            this.formGroup.controls.email.setValue(queryParamsEmail);\n            this.paramEmailSet = true;\n          }\n\n          // If paramEmailSet is false, loadEmailSettings from state\n          return this.paramEmailSet ? of(null) : this.loadEmailSettings();\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n\n    // If the user navigates to /login from /login, reset the validatedEmail flag\n    // This should bring the user back to the login screen with the email field\n    this.router.events.pipe(takeUntil(this.destroy$)).subscribe((event) => {\n      if (event instanceof NavigationSkipped && event.url === \"/login\") {\n        this.validatedEmail = false;\n      }\n    });\n\n    // Backup check to handle unknown case where activatedRoute is not available\n    // This shouldn't happen under normal circumstances\n    if (!this.route) {\n      await this.loadEmailSettings();\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async submit(showToast = true) {\n    const data = this.formGroup.value;\n\n    await this.setupCaptcha();\n\n    this.formGroup.markAllAsTouched();\n\n    //web\n    if (this.formGroup.invalid && !showToast) {\n      return;\n    }\n\n    //desktop, browser; This should be removed once all clients use reactive forms\n    if (this.formGroup.invalid && showToast) {\n      const errorText = this.getErrorToastMessage();\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: errorText,\n      });\n      return;\n    }\n\n    try {\n      const credentials = new PasswordLoginCredentials(\n        data.email,\n        data.masterPassword,\n        this.captchaToken,\n        null,\n      );\n\n      this.formPromise = this.loginStrategyService.logIn(credentials);\n      const response = await this.formPromise;\n\n      await this.saveEmailSettings();\n\n      if (this.handleCaptchaRequired(response)) {\n        return;\n      } else if (await this.handleMigrateEncryptionKey(response)) {\n        return;\n      } else if (response.requiresTwoFactor) {\n        if (this.onSuccessfulLoginTwoFactorNavigate != null) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.onSuccessfulLoginTwoFactorNavigate();\n        } else {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.router.navigate([this.twoFactorRoute]);\n        }\n      } else if (response.forcePasswordReset != ForceSetPasswordReason.None) {\n        if (this.onSuccessfulLoginForceResetNavigate != null) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.onSuccessfulLoginForceResetNavigate();\n        } else {\n          this.loginEmailService.clearValues();\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.router.navigate([this.forcePasswordResetRoute]);\n        }\n      } else {\n        if (this.onSuccessfulLogin != null) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.onSuccessfulLogin();\n        }\n\n        if (this.onSuccessfulLoginNavigate != null) {\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.onSuccessfulLoginNavigate(response.userId);\n        } else {\n          this.loginEmailService.clearValues();\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.router.navigate([this.successRoute]);\n        }\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  togglePassword() {\n    this.showPassword = !this.showPassword;\n    if (this.ngZone.isStable) {\n      document.getElementById(\"masterPassword\").focus();\n    } else {\n      this.ngZone.onStable\n        .pipe(take(1))\n        .subscribe(() => document.getElementById(\"masterPassword\").focus());\n    }\n  }\n\n  async startAuthRequestLogin() {\n    this.formGroup.get(\"masterPassword\")?.clearValidators();\n    this.formGroup.get(\"masterPassword\")?.updateValueAndValidity();\n\n    if (!this.formGroup.valid) {\n      return;\n    }\n\n    await this.saveEmailSettings();\n    await this.router.navigate([\"/login-with-device\"]);\n  }\n\n  async launchSsoBrowser(clientId: string, ssoRedirectUri: string) {\n    // Save off email for SSO\n    await this.ssoLoginService.setSsoEmail(this.formGroup.value.email);\n\n    // Generate necessary sso params\n    const passwordOptions: any = {\n      type: \"password\",\n      length: 64,\n      uppercase: true,\n      lowercase: true,\n      numbers: true,\n      special: false,\n    };\n    const state = await this.passwordGenerationService.generatePassword(passwordOptions);\n    const ssoCodeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n    const codeVerifierHash = await this.cryptoFunctionService.hash(ssoCodeVerifier, \"sha256\");\n    const codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n\n    // Save sso params\n    await this.ssoLoginService.setSsoState(state);\n    await this.ssoLoginService.setCodeVerifier(ssoCodeVerifier);\n\n    // Build URI\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const webUrl = env.getWebVaultUrl();\n\n    // Launch browser\n    this.platformUtilsService.launchUri(\n      webUrl +\n        \"/#/sso?clientId=\" +\n        clientId +\n        \"&redirectUri=\" +\n        encodeURIComponent(ssoRedirectUri) +\n        \"&state=\" +\n        state +\n        \"&codeChallenge=\" +\n        codeChallenge +\n        \"&email=\" +\n        encodeURIComponent(this.formGroup.controls.email.value),\n    );\n  }\n\n  async validateEmail() {\n    this.formGroup.controls.email.markAsTouched();\n    const emailValid = this.formGroup.get(\"email\").valid;\n\n    if (emailValid) {\n      this.toggleValidateEmail(true);\n      await this.getLoginWithDevice(this.loggedEmail);\n    }\n  }\n\n  toggleValidateEmail(value: boolean) {\n    this.validatedEmail = value;\n    if (!this.validatedEmail) {\n      // Reset master password only when going from validated to not validated\n      // so that autofill can work properly\n      this.formGroup.controls.masterPassword.reset();\n    } else {\n      // Mark MP as untouched so that, when users enter email and hit enter,\n      // the MP field doesn't load with validation errors\n      this.formGroup.controls.masterPassword.markAsUntouched();\n\n      // When email is validated, focus on master password after\n      // waiting for input to be rendered\n      if (this.ngZone.isStable) {\n        this.masterPasswordInput?.nativeElement?.focus();\n      } else {\n        this.ngZone.onStable.pipe(take(1)).subscribe(() => {\n          this.masterPasswordInput?.nativeElement?.focus();\n        });\n      }\n    }\n  }\n\n  private async loadEmailSettings() {\n    // Try to load from memory first\n    const email = await firstValueFrom(this.loginEmailService.loginEmail$);\n    const rememberEmail = this.loginEmailService.getRememberEmail();\n\n    if (email) {\n      this.formGroup.controls.email.setValue(email);\n      this.formGroup.controls.rememberEmail.setValue(rememberEmail);\n    } else {\n      // If not in memory, check email on disk\n      const storedEmail = await firstValueFrom(this.loginEmailService.storedEmail$);\n      if (storedEmail) {\n        // If we have a stored email, rememberEmail should default to true\n        this.formGroup.controls.email.setValue(storedEmail);\n        this.formGroup.controls.rememberEmail.setValue(true);\n      }\n    }\n  }\n\n  protected async saveEmailSettings() {\n    this.loginEmailService.setLoginEmail(this.formGroup.value.email);\n    this.loginEmailService.setRememberEmail(this.formGroup.value.rememberEmail);\n    await this.loginEmailService.saveEmailSettings();\n  }\n\n  // Legacy accounts used the master key to encrypt data. Migration is required but only performed on web\n  protected async handleMigrateEncryptionKey(result: AuthResult): Promise<boolean> {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n\n    this.toastService.showToast({\n      variant: \"error\",\n      title: this.i18nService.t(\"errorOccured\"),\n      message: this.i18nService.t(\"encryptionKeyMigrationRequired\"),\n    });\n    return true;\n  }\n\n  private getErrorToastMessage() {\n    const error: AllValidationErrors = this.formValidationErrorService\n      .getFormValidationErrors(this.formGroup.controls)\n      .shift();\n\n    if (error) {\n      switch (error.errorName) {\n        case \"email\":\n          return this.i18nService.t(\"invalidEmail\");\n        case \"minlength\":\n          return this.i18nService.t(\"masterPasswordMinlength\", Utils.originalMinimumPasswordLength);\n        default:\n          return this.i18nService.t(this.errorTag(error));\n      }\n    }\n\n    return;\n  }\n\n  private errorTag(error: AllValidationErrors): string {\n    const name = error.errorName.charAt(0).toUpperCase() + error.errorName.slice(1);\n    return `${error.controlName}${name}`;\n  }\n\n  async getLoginWithDevice(email: string) {\n    try {\n      const deviceIdentifier = await this.appIdService.getAppId();\n      this.showLoginWithDevice = await this.devicesApiService.getKnownDevice(\n        email,\n        deviceIdentifier,\n      );\n    } catch (e) {\n      this.showLoginWithDevice = false;\n    }\n  }\n}\n","<form\n  [bitSubmit]=\"submitForm.bind(null, false)\"\n  [appApiAction]=\"formPromise\"\n  [formGroup]=\"formGroup\"\n>\n  <ng-container *ngIf=\"!validatedEmail\">\n    <div class=\"tw-mb-3\">\n      <bit-form-field>\n        <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n        <input bitInput type=\"email\" formControlName=\"email\" appAutofocus />\n      </bit-form-field>\n    </div>\n\n    <div class=\"tw-mb-3 tw-flex tw-items-start\">\n      <bit-form-control class=\"tw-mb-0\">\n        <input type=\"checkbox\" bitCheckbox formControlName=\"rememberEmail\" />\n        <bit-label>{{ \"rememberEmail\" | i18n }}</bit-label>\n      </bit-form-control>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <button\n        bitButton\n        type=\"submit\"\n        buttonType=\"primary\"\n        class=\"tw-w-full\"\n        (click)=\"validateEmail()\"\n      >\n        <span> {{ \"continue\" | i18n }} </span>\n      </button>\n    </div>\n\n    <div class=\"tw-mb-3 tw-flex tw-flex-col tw-items-center tw-justify-center\">\n      <p class=\"tw-mb-3\">{{ \"or\" | i18n }}</p>\n\n      <a\n        bitLink\n        block\n        linkType=\"primary\"\n        routerLink=\"/login-with-passkey\"\n        (mousedown)=\"$event.preventDefault()\"\n      >\n        <span><i class=\"bwi bwi-passkey\"></i> {{ \"logInWithPasskey\" | i18n }}</span>\n      </a>\n    </div>\n\n    <hr />\n\n    <p class=\"tw-m-0 tw-text-sm\">\n      {{ \"newAroundHere\" | i18n }}\n      <!-- Two notes:\n           (1) We check the value and validity of email so we don't send an invalid email to autofill\n           on load of register for both enter and mouse based navigation\n           (2) We use mousedown to trigger navigation so that the onBlur form validation does not fire\n           and move the create account link down the page on click which causes the user to miss actually\n           clicking on the link. Mousedown fires before onBlur.\n      -->\n      <a\n        bitLink\n        [routerLink]=\"registerRoute$ | async\"\n        [queryParams]=\"emailFormControl.valid ? { email: emailFormControl.value } : {}\"\n        (mousedown)=\"goToRegister()\"\n        >{{ \"createAccount\" | i18n }}</a\n      >\n    </p>\n  </ng-container>\n\n  <div [ngClass]=\"{ 'tw-hidden': !validatedEmail }\">\n    <div class=\"tw-mb-6 tw-h-28\">\n      <bit-form-field class=\"!tw-mb-1\">\n        <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n        <input type=\"password\" bitInput #masterPasswordInput formControlName=\"masterPassword\" />\n        <button type=\"button\" bitSuffix bitIconButton bitPasswordInputToggle></button>\n      </bit-form-field>\n      <a\n        bitLink\n        class=\"tw-mt-2\"\n        routerLink=\"/hint\"\n        (mousedown)=\"goToHint()\"\n        (click)=\"saveEmailSettings()\"\n        >{{ \"getMasterPasswordHint\" | i18n }}</a\n      >\n    </div>\n\n    <div [hidden]=\"!showCaptcha()\">\n      <iframe id=\"hcaptcha_iframe\" height=\"80\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n    </div>\n\n    <div class=\"tw-mb-3 tw-flex tw-space-x-4\">\n      <button bitButton buttonType=\"primary\" bitFormButton type=\"submit\" [block]=\"true\">\n        <span> {{ \"loginWithMasterPassword\" | i18n }} </span>\n      </button>\n    </div>\n\n    <div class=\"tw-mb-3\" *ngIf=\"showLoginWithDevice\">\n      <button\n        bitButton\n        type=\"button\"\n        [block]=\"true\"\n        buttonType=\"secondary\"\n        (click)=\"startAuthRequestLogin()\"\n      >\n        <span> <i class=\"bwi bwi-mobile\"></i> {{ \"loginWithDevice\" | i18n }} </span>\n      </button>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <a\n        routerLink=\"/sso\"\n        [queryParams]=\"{ email: formGroup.value.email }\"\n        (click)=\"saveEmailSettings()\"\n        bitButton\n        buttonType=\"secondary\"\n        class=\"tw-w-full\"\n      >\n        <i class=\"bwi bwi-provider tw-mr-2\"></i>\n        {{ \"enterpriseSingleSignOn\" | i18n }}\n      </a>\n    </div>\n\n    <hr />\n\n    <div class=\"tw-m-0 tw-text-sm\">\n      <p class=\"tw-mb-1\">{{ \"loggingInAs\" | i18n }} {{ loggedEmail }}</p>\n      <a bitLink [routerLink]=\"[]\" (click)=\"toggleValidateEmail(false)\">{{ \"notYou\" | i18n }}</a>\n    </div>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, NgZone, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, takeUntil } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { LoginComponentV1 as BaseLoginComponent } from \"@bitwarden/angular/auth/components/login-v1.component\";\nimport { FormValidationErrorsService } from \"@bitwarden/angular/platform/abstractions/form-validation-errors.service\";\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  RegisterRouteService,\n} from \"@bitwarden/auth/common\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyData } from \"@bitwarden/common/admin-console/models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { RouterService } from \"../../core\";\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\nimport { OrganizationInvite } from \"../organization-invite/organization-invite\";\n\n@Component({\n  selector: \"app-login\",\n  templateUrl: \"login-v1.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class LoginComponentV1 extends BaseLoginComponent implements OnInit {\n  showResetPasswordAutoEnrollWarning = false;\n  enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;\n  policies: Policy[];\n\n  constructor(\n    private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n    devicesApiService: DevicesApiServiceAbstraction,\n    appIdService: AppIdService,\n    loginStrategyService: LoginStrategyServiceAbstraction,\n    router: Router,\n    i18nService: I18nService,\n    route: ActivatedRoute,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n    cryptoFunctionService: CryptoFunctionService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private policyService: InternalPolicyService,\n    logService: LogService,\n    ngZone: NgZone,\n    protected stateService: StateService,\n    private routerService: RouterService,\n    formBuilder: FormBuilder,\n    formValidationErrorService: FormValidationErrorsService,\n    loginEmailService: LoginEmailServiceAbstraction,\n    ssoLoginService: SsoLoginServiceAbstraction,\n    webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n    registerRouteService: RegisterRouteService,\n    toastService: ToastService,\n  ) {\n    super(\n      devicesApiService,\n      appIdService,\n      loginStrategyService,\n      router,\n      platformUtilsService,\n      i18nService,\n      stateService,\n      environmentService,\n      passwordGenerationService,\n      cryptoFunctionService,\n      logService,\n      ngZone,\n      formBuilder,\n      formValidationErrorService,\n      route,\n      loginEmailService,\n      ssoLoginService,\n      webAuthnLoginService,\n      registerRouteService,\n      toastService,\n    );\n    this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n  }\n\n  submitForm = async (showToast = true) => {\n    return await this.submitFormHelper(showToast);\n  };\n\n  private async submitFormHelper(showToast: boolean) {\n    await super.submit(showToast);\n  }\n\n  async ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      // If there is an query parameter called 'org', set previousUrl to `/create-organization?org=paramValue`\n      if (qParams.org != null) {\n        const route = this.router.createUrlTree([\"create-organization\"], {\n          queryParams: { plan: qParams.org },\n        });\n        this.routerService.setPreviousUrl(route.toString());\n      }\n\n      /**\n       * If there is a query parameter called 'sponsorshipToken', that means they are coming\n       * from an email for sponsoring a families organization. If so, then set the prevousUrl\n       * to `/setup/families-for-enterprise?token=paramValue`\n       */\n      if (qParams.sponsorshipToken != null) {\n        const route = this.router.createUrlTree([\"setup/families-for-enterprise\"], {\n          queryParams: { token: qParams.sponsorshipToken },\n        });\n        this.routerService.setPreviousUrl(route.toString());\n      }\n\n      await super.ngOnInit();\n    });\n\n    // If there's an existing org invite, use it to get the password policies\n    const orgInvite = await this.acceptOrganizationInviteService.getOrganizationInvite();\n    if (orgInvite != null) {\n      await this.initPasswordPolicies(orgInvite);\n    }\n  }\n\n  async goAfterLogIn(userId: UserId) {\n    const masterPassword = this.formGroup.value.masterPassword;\n\n    // Check master password against policy\n    if (this.enforcedPasswordPolicyOptions != null) {\n      const strengthResult = this.passwordStrengthService.getPasswordStrength(\n        masterPassword,\n        this.formGroup.value.email,\n      );\n      const masterPasswordScore = strengthResult == null ? null : strengthResult.score;\n\n      // If invalid, save policies and require update\n      if (\n        !this.policyService.evaluateMasterPassword(\n          masterPasswordScore,\n          masterPassword,\n          this.enforcedPasswordPolicyOptions,\n        )\n      ) {\n        const policiesData: { [id: string]: PolicyData } = {};\n        this.policies.map((p) => (policiesData[p.id] = PolicyData.fromPolicy(p)));\n        await this.policyService.replace(policiesData, userId);\n        await this.router.navigate([\"update-password\"]);\n        return;\n      }\n    }\n\n    this.loginEmailService.clearValues();\n    await this.router.navigate([this.successRoute]);\n  }\n\n  async goToHint() {\n    await this.saveEmailSettings();\n    await this.router.navigateByUrl(\"/hint\");\n  }\n\n  async goToRegister() {\n    // TODO: remove when email verification flag is removed\n    const registerRoute = await firstValueFrom(this.registerRoute$);\n\n    if (this.emailFormControl.valid) {\n      await this.router.navigate([registerRoute], {\n        queryParams: { email: this.emailFormControl.value },\n      });\n      return;\n    }\n\n    await this.router.navigate([registerRoute]);\n  }\n\n  protected override async handleMigrateEncryptionKey(result: AuthResult): Promise<boolean> {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n    await this.router.navigate([\"migrate-legacy-encryption\"]);\n    return true;\n  }\n\n  private async initPasswordPolicies(invite: OrganizationInvite): Promise<void> {\n    try {\n      this.policies = await this.policyApiService.getPoliciesByToken(\n        invite.organizationId,\n        invite.token,\n        invite.email,\n        invite.organizationUserId,\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (this.policies == null) {\n      return;\n    }\n\n    const resetPasswordPolicy = this.policyService.getResetPasswordPolicyOptions(\n      this.policies,\n      invite.organizationId,\n    );\n\n    // Set to true if policy enabled and auto-enroll enabled\n    this.showResetPasswordAutoEnrollWarning =\n      resetPasswordPolicy[1] && resetPasswordPolicy[0].autoEnrollEnabled;\n\n    this.policyService\n      .masterPasswordPolicyOptions$(this.policies)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((enforcedPasswordPolicyOptions) => {\n        this.enforcedPasswordPolicyOptions = enforcedPasswordPolicyOptions;\n      });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { IsActiveMatchOptions, Router } from \"@angular/router\";\nimport { Subject, firstValueFrom, map, takeUntil } from \"rxjs\";\n\nimport {\n  AuthRequestLoginCredentials,\n  AuthRequestServiceAbstraction,\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AnonymousHubService } from \"@bitwarden/common/auth/abstractions/anonymous-hub.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthRequestType } from \"@bitwarden/common/auth/enums/auth-request-type\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { AuthRequest } from \"@bitwarden/common/auth/models/request/auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums/http-status-code.enum\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\nenum State {\n  StandardAuthRequest,\n  AdminAuthRequest,\n}\n\n@Directive()\nexport class LoginViaAuthRequestComponentV1\n  extends CaptchaProtectedComponent\n  implements OnInit, OnDestroy\n{\n  private destroy$ = new Subject<void>();\n  userAuthNStatus: AuthenticationStatus;\n  email: string;\n  showResendNotification = false;\n  authRequest: AuthRequest;\n  fingerprintPhrase: string;\n  onSuccessfulLoginTwoFactorNavigate: () => Promise<any>;\n  onSuccessfulLogin: () => Promise<any>;\n  onSuccessfulLoginNavigate: () => Promise<any>;\n  onSuccessfulLoginForceResetNavigate: () => Promise<any>;\n\n  protected adminApprovalRoute = \"admin-approval-requested\";\n\n  protected StateEnum = State;\n  protected state = State.StandardAuthRequest;\n\n  protected twoFactorRoute = \"2fa\";\n  protected successRoute = \"vault\";\n  protected forcePasswordResetRoute = \"update-temp-password\";\n  private resendTimeout = 12000;\n\n  private authRequestKeyPair: { publicKey: Uint8Array; privateKey: Uint8Array };\n\n  constructor(\n    protected router: Router,\n    private keyService: KeyService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private appIdService: AppIdService,\n    private passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private apiService: ApiService,\n    private authService: AuthService,\n    private logService: LogService,\n    environmentService: EnvironmentService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    private anonymousHubService: AnonymousHubService,\n    private validationService: ValidationService,\n    private accountService: AccountService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private authRequestService: AuthRequestServiceAbstraction,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    protected toastService: ToastService,\n  ) {\n    super(environmentService, i18nService, platformUtilsService, toastService);\n\n    // Gets signalR push notification\n    // Only fires on approval to prevent enumeration\n    this.authRequestService.authRequestPushNotification$\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((id) => {\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.verifyAndHandleApprovedAuthReq(id).catch((e: Error) => {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"error\"),\n            message: e.message,\n          });\n          this.logService.error(\"Failed to use approved auth request: \" + e.message);\n        });\n      });\n  }\n\n  async ngOnInit() {\n    this.email = await firstValueFrom(this.loginEmailService.loginEmail$);\n    this.userAuthNStatus = await this.authService.getAuthStatus();\n\n    const matchOptions: IsActiveMatchOptions = {\n      paths: \"exact\",\n      queryParams: \"ignored\",\n      fragment: \"ignored\",\n      matrixParams: \"ignored\",\n    };\n\n    if (this.router.isActive(this.adminApprovalRoute, matchOptions)) {\n      this.state = State.AdminAuthRequest;\n    }\n\n    if (this.state === State.AdminAuthRequest) {\n      // Pull email from state for admin auth reqs b/c it is available\n      // This also prevents it from being lost on refresh as the\n      // login service email does not persist.\n      this.email = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n      );\n      const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n\n      if (!this.email) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: this.i18nService.t(\"userEmailMissing\"),\n        });\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/login-initiated\"]);\n        return;\n      }\n\n      // We only allow a single admin approval request to be active at a time\n      // so must check state to see if we have an existing one or not\n      const adminAuthReqStorable = await this.authRequestService.getAdminAuthRequest(userId);\n\n      if (adminAuthReqStorable) {\n        await this.handleExistingAdminAuthRequest(adminAuthReqStorable, userId);\n      } else {\n        // No existing admin auth request; so we need to create one\n        await this.startAuthRequestLogin();\n      }\n    } else {\n      // Standard auth request\n      // TODO: evaluate if we can remove the setting of this.email in the constructor\n      this.email = await firstValueFrom(this.loginEmailService.loginEmail$);\n\n      if (!this.email) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: this.i18nService.t(\"userEmailMissing\"),\n        });\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([\"/login\"]);\n        return;\n      }\n\n      await this.startAuthRequestLogin();\n    }\n  }\n\n  async ngOnDestroy() {\n    await this.anonymousHubService.stopHubConnection();\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  private async handleExistingAdminAuthRequest(\n    adminAuthReqStorable: AdminAuthRequestStorable,\n    userId: UserId,\n  ) {\n    // Note: on login, the SSOLoginStrategy will also call to see an existing admin auth req\n    // has been approved and handle it if so.\n\n    // Regardless, we always retrieve the auth request from the server verify and handle status changes here as well\n    let adminAuthReqResponse: AuthRequestResponse;\n    try {\n      adminAuthReqResponse = await this.apiService.getAuthRequest(adminAuthReqStorable.id);\n    } catch (error) {\n      if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n        return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n      }\n    }\n\n    // Request doesn't exist anymore\n    if (!adminAuthReqResponse) {\n      return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n    }\n\n    // Re-derive the user's fingerprint phrase\n    // It is important to not use the server's public key here as it could have been compromised via MITM\n    const derivedPublicKeyArrayBuffer = await this.cryptoFunctionService.rsaExtractPublicKey(\n      adminAuthReqStorable.privateKey,\n    );\n    this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(\n      this.email,\n      derivedPublicKeyArrayBuffer,\n    );\n\n    // Request denied\n    if (adminAuthReqResponse.isAnswered && !adminAuthReqResponse.requestApproved) {\n      return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n    }\n\n    // Request approved\n    if (adminAuthReqResponse.requestApproved) {\n      return await this.handleApprovedAdminAuthRequest(\n        adminAuthReqResponse,\n        adminAuthReqStorable.privateKey,\n        userId,\n      );\n    }\n\n    // Request still pending response from admin\n    // set keypair and create hub connection so that any approvals will be received via push notification\n    this.authRequestKeyPair = { privateKey: adminAuthReqStorable.privateKey, publicKey: null };\n    await this.anonymousHubService.createHubConnection(adminAuthReqStorable.id);\n  }\n\n  private async handleExistingAdminAuthReqDeletedOrDenied(userId: UserId) {\n    // clear the admin auth request from state\n    await this.authRequestService.clearAdminAuthRequest(userId);\n\n    // start new auth request\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.startAuthRequestLogin();\n  }\n\n  private async buildAuthRequest(authRequestType: AuthRequestType) {\n    const authRequestKeyPairArray = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n\n    this.authRequestKeyPair = {\n      publicKey: authRequestKeyPairArray[0],\n      privateKey: authRequestKeyPairArray[1],\n    };\n\n    const deviceIdentifier = await this.appIdService.getAppId();\n    const publicKey = Utils.fromBufferToB64(this.authRequestKeyPair.publicKey);\n    const accessCode = await this.passwordGenerationService.generatePassword({\n      type: \"password\",\n      length: 25,\n    });\n\n    this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(\n      this.email,\n      this.authRequestKeyPair.publicKey,\n    );\n\n    this.authRequest = new AuthRequest(\n      this.email,\n      deviceIdentifier,\n      publicKey,\n      authRequestType,\n      accessCode,\n    );\n  }\n\n  async startAuthRequestLogin() {\n    this.showResendNotification = false;\n\n    try {\n      let reqResponse: AuthRequestResponse;\n\n      if (this.state === State.AdminAuthRequest) {\n        await this.buildAuthRequest(AuthRequestType.AdminApproval);\n        reqResponse = await this.apiService.postAdminAuthRequest(this.authRequest);\n\n        const adminAuthReqStorable = new AdminAuthRequestStorable({\n          id: reqResponse.id,\n          privateKey: this.authRequestKeyPair.privateKey,\n        });\n\n        const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n        await this.authRequestService.setAdminAuthRequest(adminAuthReqStorable, userId);\n      } else {\n        await this.buildAuthRequest(AuthRequestType.AuthenticateAndUnlock);\n        reqResponse = await this.apiService.postAuthRequest(this.authRequest);\n      }\n\n      if (reqResponse.id) {\n        await this.anonymousHubService.createHubConnection(reqResponse.id);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    setTimeout(() => {\n      this.showResendNotification = true;\n    }, this.resendTimeout);\n  }\n\n  private async verifyAndHandleApprovedAuthReq(requestId: string) {\n    try {\n      // Retrieve the auth request from server and verify it's approved\n      let authReqResponse: AuthRequestResponse;\n\n      switch (this.state) {\n        case State.StandardAuthRequest:\n          // Unauthed - access code required for user verification\n          authReqResponse = await this.apiService.getAuthResponse(\n            requestId,\n            this.authRequest.accessCode,\n          );\n          break;\n\n        case State.AdminAuthRequest:\n          // Authed - no access code required\n          authReqResponse = await this.apiService.getAuthRequest(requestId);\n          break;\n\n        default:\n          break;\n      }\n\n      if (!authReqResponse.requestApproved) {\n        return;\n      }\n\n      // Approved so proceed:\n\n      // 4 Scenarios to handle for approved auth requests:\n      // Existing flow 1:\n      //  - Anon Login with Device > User is not AuthN > receives approval from device with pubKey(masterKey)\n      //    > decrypt masterKey > must authenticate > gets masterKey(userKey) > decrypt userKey and proceed to vault\n\n      // 3 new flows from TDE:\n      // Flow 2:\n      //  - Post SSO > User is AuthN > SSO login strategy success sets masterKey(userKey) > receives approval from device with pubKey(masterKey)\n      //    > decrypt masterKey > decrypt userKey > establish trust if required > proceed to vault\n      // Flow 3:\n      //  - Post SSO > User is AuthN > Receives approval from device with pubKey(userKey) > decrypt userKey > establish trust if required > proceed to vault\n      // Flow 4:\n      //  - Anon Login with Device > User is not AuthN > receives approval from device with pubKey(userKey)\n      //    > decrypt userKey > must authenticate > set userKey > proceed to vault\n\n      // if user has authenticated via SSO\n      if (this.userAuthNStatus === AuthenticationStatus.Locked) {\n        const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n        return await this.handleApprovedAdminAuthRequest(\n          authReqResponse,\n          this.authRequestKeyPair.privateKey,\n          userId,\n        );\n      }\n\n      // Flow 1 and 4:\n      const loginAuthResult = await this.loginViaAuthRequestStrategy(requestId, authReqResponse);\n      await this.handlePostLoginNavigation(loginAuthResult);\n    } catch (error) {\n      if (error instanceof ErrorResponse) {\n        let errorRoute = \"/login\";\n        if (this.state === State.AdminAuthRequest) {\n          errorRoute = \"/login-initiated\";\n        }\n\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([errorRoute]);\n        this.validationService.showError(error);\n        return;\n      }\n\n      this.logService.error(error);\n    }\n  }\n\n  async handleApprovedAdminAuthRequest(\n    adminAuthReqResponse: AuthRequestResponse,\n    privateKey: ArrayBuffer,\n    userId: UserId,\n  ) {\n    // See verifyAndHandleApprovedAuthReq(...) for flow details\n    // it's flow 2 or 3 based on presence of masterPasswordHash\n    if (adminAuthReqResponse.masterPasswordHash) {\n      // Flow 2: masterPasswordHash is not null\n      // key is authRequestPublicKey(masterKey) + we have authRequestPublicKey(masterPasswordHash)\n      await this.authRequestService.setKeysAfterDecryptingSharedMasterKeyAndHash(\n        adminAuthReqResponse,\n        privateKey,\n        userId,\n      );\n    } else {\n      // Flow 3: masterPasswordHash is null\n      // we can assume key is authRequestPublicKey(userKey) and we can just decrypt with userKey and proceed to vault\n      await this.authRequestService.setUserKeyAfterDecryptingSharedUserKey(\n        adminAuthReqResponse,\n        privateKey,\n        userId,\n      );\n    }\n\n    // clear the admin auth request from state so it cannot be used again (it's a one time use)\n    // TODO: this should eventually be enforced via deleting this on the server once it is used\n    await this.authRequestService.clearAdminAuthRequest(userId);\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"loginApproved\"),\n    });\n\n    // Now that we have a decrypted user key in memory, we can check if we\n    // need to establish trust on the current device\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n    await this.deviceTrustService.trustDeviceIfRequired(activeAccount.id);\n\n    // TODO: don't forget to use auto enrollment service everywhere we trust device\n\n    await this.handleSuccessfulLoginNavigation();\n  }\n\n  // Authentication helper\n  private async buildAuthRequestLoginCredentials(\n    requestId: string,\n    response: AuthRequestResponse,\n  ): Promise<AuthRequestLoginCredentials> {\n    // if masterPasswordHash has a value, we will always receive key as authRequestPublicKey(masterKey) + authRequestPublicKey(masterPasswordHash)\n    // if masterPasswordHash is null, we will always receive key as authRequestPublicKey(userKey)\n    if (response.masterPasswordHash) {\n      const { masterKey, masterKeyHash } =\n        await this.authRequestService.decryptPubKeyEncryptedMasterKeyAndHash(\n          response.key,\n          response.masterPasswordHash,\n          this.authRequestKeyPair.privateKey,\n        );\n\n      return new AuthRequestLoginCredentials(\n        this.email,\n        this.authRequest.accessCode,\n        requestId,\n        null, // no userKey\n        masterKey,\n        masterKeyHash,\n      );\n    } else {\n      const userKey = await this.authRequestService.decryptPubKeyEncryptedUserKey(\n        response.key,\n        this.authRequestKeyPair.privateKey,\n      );\n      return new AuthRequestLoginCredentials(\n        this.email,\n        this.authRequest.accessCode,\n        requestId,\n        userKey,\n        null, // no masterKey\n        null, // no masterKeyHash\n      );\n    }\n  }\n\n  private async loginViaAuthRequestStrategy(\n    requestId: string,\n    authReqResponse: AuthRequestResponse,\n  ): Promise<AuthResult> {\n    // Note: credentials change based on if the authReqResponse.key is a encryptedMasterKey or UserKey\n    const credentials = await this.buildAuthRequestLoginCredentials(requestId, authReqResponse);\n\n    // Note: keys are set by AuthRequestLoginStrategy success handling\n    return await this.loginStrategyService.logIn(credentials);\n  }\n\n  // Routing logic\n  private async handlePostLoginNavigation(loginResponse: AuthResult) {\n    if (loginResponse.requiresTwoFactor) {\n      if (this.onSuccessfulLoginTwoFactorNavigate != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulLoginTwoFactorNavigate();\n      } else {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([this.twoFactorRoute]);\n      }\n    } else if (loginResponse.forcePasswordReset != ForceSetPasswordReason.None) {\n      if (this.onSuccessfulLoginForceResetNavigate != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulLoginForceResetNavigate();\n      } else {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([this.forcePasswordResetRoute]);\n      }\n    } else {\n      await this.handleSuccessfulLoginNavigation();\n    }\n  }\n\n  private async handleSuccessfulLoginNavigation() {\n    if (this.state === State.StandardAuthRequest) {\n      // Only need to set remembered email on standard login with auth req flow\n      await this.loginEmailService.saveEmailSettings();\n    }\n\n    if (this.onSuccessfulLogin != null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLogin();\n    }\n\n    if (this.onSuccessfulLoginNavigate != null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLoginNavigate();\n    } else {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([this.successRoute]);\n    }\n  }\n}\n","<!-- Please remove this disable statement when editing this file! -->\n<!-- eslint-disable tailwindcss/no-custom-classname -->\n<div\n  class=\"tw-mx-auto tw-mt-5 tw-flex tw-max-w-lg tw-flex-col tw-items-center tw-justify-center tw-p-8\"\n>\n  <div>\n    <img class=\"logo logo-themed\" alt=\"Bitwarden\" />\n\n    <ng-container *ngIf=\"state == StateEnum.StandardAuthRequest\">\n      <p class=\"tw-mx-4 tw-mb-4 tw-mt-3 tw-text-center tw-text-xl\">\n        {{ \"loginOrCreateNewAccount\" | i18n }}\n      </p>\n\n      <div\n        class=\"tw-mt-3 tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6\"\n      >\n        <h2 class=\"tw-mb-6 tw-text-xl tw-font-semibold\">{{ \"loginInitiated\" | i18n }}</h2>\n\n        <div class=\"tw-text-light\">\n          <p class=\"tw-mb-6\">{{ \"notificationSentDevice\" | i18n }}</p>\n\n          <p class=\"tw-mb-6\">\n            {{ \"fingerprintMatchInfo\" | i18n }}\n          </p>\n        </div>\n\n        <div class=\"tw-mb-6\">\n          <h4 class=\"tw-font-semibold\">{{ \"fingerprintPhraseHeader\" | i18n }}</h4>\n          <p>\n            <code>{{ fingerprintPhrase }}</code>\n          </p>\n        </div>\n\n        <div class=\"tw-my-10\" *ngIf=\"showResendNotification\">\n          <a [routerLink]=\"[]\" disabled=\"true\" (click)=\"startAuthRequestLogin()\">{{\n            \"resendNotification\" | i18n\n          }}</a>\n        </div>\n\n        <hr />\n\n        <div class=\"tw-text-light tw-mt-3\">\n          {{ \"loginWithDeviceEnabledNote\" | i18n }}\n          <a routerLink=\"/login\">{{ \"viewAllLoginOptions\" | i18n }}</a>\n        </div>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"state == StateEnum.AdminAuthRequest\">\n      <div\n        class=\"tw-mt-3 tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6\"\n      >\n        <h2 class=\"tw-mb-6 tw-text-xl tw-font-semibold\">{{ \"adminApprovalRequested\" | i18n }}</h2>\n\n        <div class=\"tw-text-light\">\n          <p class=\"tw-mb-6\">{{ \"adminApprovalRequestSentToAdmins\" | i18n }}</p>\n          <p class=\"tw-mb-6\">{{ \"youWillBeNotifiedOnceApproved\" | i18n }}</p>\n        </div>\n\n        <div class=\"tw-mb-6\">\n          <h4 class=\"tw-font-semibold\">{{ \"fingerprintPhraseHeader\" | i18n }}</h4>\n          <p>\n            <code>{{ fingerprintPhrase }}</code>\n          </p>\n        </div>\n\n        <hr />\n\n        <div class=\"tw-text-light tw-mt-3\">\n          {{ \"troubleLoggingIn\" | i18n }}\n          <a routerLink=\"/login-initiated\">{{ \"viewAllLoginOptions\" | i18n }}</a>\n        </div>\n      </div>\n    </ng-container>\n  </div>\n</div>\n","import { Component } from \"@angular/core\";\n\nimport { LoginViaAuthRequestComponentV1 as BaseLoginViaAuthRequestComponentV1 } from \"@bitwarden/angular/auth/components/login-via-auth-request-v1.component\";\n\n@Component({\n  selector: \"app-login-via-auth-request\",\n  templateUrl: \"login-via-auth-request-v1.component.html\",\n})\nexport class LoginViaAuthRequestComponentV1 extends BaseLoginViaAuthRequestComponentV1 {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { LoginSuccessHandlerService } from \"@bitwarden/auth/common\";\nimport { WebAuthnLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/webauthn/webauthn-login.service.abstraction\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { WebAuthnLoginCredentialAssertionView } from \"@bitwarden/common/auth/models/view/webauthn-login/webauthn-login-credential-assertion.view\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nexport type State = \"assert\" | \"assertFailed\";\n\n@Directive()\nexport class BaseLoginViaWebAuthnComponent implements OnInit {\n  protected currentState: State = \"assert\";\n\n  protected successRoute = \"/vault\";\n  protected forcePasswordResetRoute = \"/update-temp-password\";\n\n  constructor(\n    private webAuthnLoginService: WebAuthnLoginServiceAbstraction,\n    private router: Router,\n    private logService: LogService,\n    private validationService: ValidationService,\n    private i18nService: I18nService,\n    private loginSuccessHandlerService: LoginSuccessHandlerService,\n    private keyService: KeyService,\n  ) {}\n\n  ngOnInit(): void {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.authenticate();\n  }\n\n  protected retry() {\n    this.currentState = \"assert\";\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.authenticate();\n  }\n\n  private async authenticate() {\n    let assertion: WebAuthnLoginCredentialAssertionView;\n    try {\n      const options = await this.webAuthnLoginService.getCredentialAssertionOptions();\n      assertion = await this.webAuthnLoginService.assertCredential(options);\n    } catch (error) {\n      this.validationService.showError(error);\n      this.currentState = \"assertFailed\";\n      return;\n    }\n    try {\n      const authResult = await this.webAuthnLoginService.logIn(assertion);\n\n      if (authResult.requiresTwoFactor) {\n        this.validationService.showError(\n          this.i18nService.t(\"twoFactorForPasskeysNotSupportedOnClientUpdateToLogIn\"),\n        );\n        this.currentState = \"assertFailed\";\n        return;\n      }\n\n      // Only run loginSuccessHandlerService if webAuthn is used for vault decryption.\n      const userKey = await firstValueFrom(this.keyService.userKey$(authResult.userId));\n      if (userKey) {\n        await this.loginSuccessHandlerService.run(authResult.userId);\n      }\n\n      if (authResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n        await this.router.navigate([this.forcePasswordResetRoute]);\n        return;\n      }\n\n      await this.router.navigate([this.successRoute]);\n    } catch (error) {\n      if (error instanceof ErrorResponse) {\n        this.validationService.showError(this.i18nService.t(\"invalidPasskeyPleaseTryAgain\"));\n      }\n      this.logService.error(error);\n      this.currentState = \"assertFailed\";\n    }\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyFailedIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"163\" height=\"115\" fill=\"none\">\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M31 19.46H9v22h22v-22Zm-24-2v26h26v-26H7Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M0 43.46a4 4 0 0 1 4-4h32a4 4 0 0 1 4 4v7h-4v-7H4v16.747l1.705 2.149a4 4 0 0 1 .866 2.486v22.205a4 4 0 0 1-1 2.645L4 91.475v17.985h32V91.475l-1.572-1.783a4 4 0 0 1-1-2.645V64.842a4 4 0 0 1 .867-2.486L36 60.207V56.46h4v3.747a4 4 0 0 1-.867 2.487l-1.704 2.148v22.205L39 88.83a4 4 0 0 1 1 2.645v17.985a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V91.475a4 4 0 0 1 1-2.645l1.571-1.783V64.842L.867 62.694A4 4 0 0 1 0 60.207V43.46Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M19.74 63.96a.5.5 0 0 1 .355.147l2.852 2.866a.5.5 0 0 1 .146.353V77.56c2.585 1.188 4.407 3.814 4.407 6.865 0 4.183-3.357 7.534-7.5 7.534-4.144 0-7.5-3.376-7.5-7.534a7.546 7.546 0 0 1 4.478-6.894v-1.443a.5.5 0 0 1 .146-.353l1.275-1.281-1.322-1.33a.5.5 0 0 1 0-.705l.332-.334-.262-.263a.5.5 0 0 1-.005-.7l1.332-1.377-1.445-1.452a.5.5 0 0 1-.145-.352v-1.114a.5.5 0 0 1 .145-.352l2.357-2.369a.5.5 0 0 1 .355-.147Zm-1.856 3.075v.7l1.645 1.654a.5.5 0 0 1 .005.7l-1.332 1.377.267.268a.5.5 0 0 1 0 .705l-.333.334 1.323 1.329a.5.5 0 0 1 0 .705l-1.48 1.488v1.57a.5.5 0 0 1-.32.466 6.545 6.545 0 0 0-4.159 6.095c0 3.61 2.913 6.534 6.5 6.534 3.588 0 6.5-2.901 6.5-6.534 0-2.749-1.707-5.105-4.095-6.074a.5.5 0 0 1-.312-.463V67.532L19.74 65.17l-1.857 1.866ZM20 85.623a1.27 1.27 0 0 0-1.268 1.276c0 .702.56 1.276 1.268 1.276.712 0 1.268-.555 1.268-1.276A1.27 1.27 0 0 0 20 85.623Zm-2.268 1.276A2.27 2.27 0 0 1 20 84.623a2.27 2.27 0 0 1 2.268 2.276c0 1.269-1 2.276-2.268 2.276a2.27 2.27 0 0 1-2.268-2.276ZM57.623 114a1 1 0 0 1 1-1h63.048a1 1 0 0 1 0 2H58.623a1 1 0 0 1-1-1Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M78.022 114V95.654h2V114h-2ZM98.418 114V95.654h2V114h-2Z\" clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M16 14.46c0-7.732 6.268-14 14-14h119c7.732 0 14 6.268 14 14v68c0 7.732-6.268 14-14 14H39.5v-4H149c5.523 0 10-4.477 10-10v-68c0-5.523-4.477-10-10-10H30c-5.523 0-10 4.477-10 10v5h-4v-5Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M25 15.46a6 6 0 0 1 6-6h117a6 6 0 0 1 6 6v66a6 6 0 0 1-6 6H36.5v-2H148a4 4 0 0 0 4-4v-66a4 4 0 0 0-4-4H31a4 4 0 0 0-4 4v3h-2v-3Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\"\n    d=\"M104.269 32.86a1.42 1.42 0 0 0-1.007-.4h-25.83c-.39 0-.722.132-1.007.4a1.26 1.26 0 0 0-.425.947v16.199c0 1.207.25 2.407.75 3.597a13.22 13.22 0 0 0 1.861 3.165c.74.919 1.62 1.817 2.646 2.69a30.93 30.93 0 0 0 2.834 2.172c.868.577 1.77 1.121 2.712 1.636.942.516 1.612.862 2.007 1.043.394.181.714.326.95.42.18.083.373.128.583.128.21 0 .403-.041.582-.128.241-.099.557-.239.956-.42.394-.181 1.064-.532 2.006-1.043a36.595 36.595 0 0 0 2.712-1.636c.867-.576 1.813-1.302 2.838-2.171a19.943 19.943 0 0 0 2.646-2.69 13.24 13.24 0 0 0 1.862-3.166 9.19 9.19 0 0 0 .749-3.597V33.812c.005-.367-.14-.684-.425-.952Zm-3.329 17.298c0 5.864-10.593 10.916-10.593 10.916V35.93h10.593v14.228Z\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M18 24.46h-5v-2h5v2ZM27 24.46h-5v-2h5v2Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-danger-600\"\n    d=\"M51.066 66.894a2.303 2.303 0 0 1-2.455-.5l-10.108-9.797L28.375 66.4l-.002.002a2.294 2.294 0 0 1-3.185.005 2.24 2.24 0 0 1-.506-2.496c.117-.27.286-.518.503-.728l10.062-9.737-9.945-9.623a2.258 2.258 0 0 1-.698-1.6c-.004-.314.06-.619.176-.894a2.254 2.254 0 0 1 1.257-1.222 2.305 2.305 0 0 1 1.723.014c.267.11.518.274.732.486l10.01 9.682 9.995-9.688.009-.008a2.292 2.292 0 0 1 3.159.026c.425.411.68.98.684 1.59a2.242 2.242 0 0 1-.655 1.6l-.01.01-9.926 9.627 10.008 9.7.029.027a2.237 2.237 0 0 1 .53 2.496l-.002.004a2.258 2.258 0 0 1-1.257 1.222Z\" />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const CreatePasskeyIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"163\" height=\"116\" fill=\"none\">\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M31 19.58H9v22h22v-22Zm-24-2v26h26v-26H7Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M0 43.58a4 4 0 0 1 4-4h32a4 4 0 0 1 4 4v7h-4v-7H4v16.747l1.705 2.149a4 4 0 0 1 .866 2.486v22.204a4 4 0 0 1-1 2.646L4 91.595v17.985h32V91.595l-1.572-1.783a4 4 0 0 1-1-2.646V64.962a4 4 0 0 1 .867-2.486L36 60.327V56.58h4v3.747a4 4 0 0 1-.867 2.486l-1.704 2.149v22.204L39 88.95a4 4 0 0 1 1 2.646v17.985a4 4 0 0 1-4 4H4a4 4 0 0 1-4-4V91.595a4 4 0 0 1 1-2.646l1.571-1.783V64.962L.867 62.813A4 4 0 0 1 0 60.327V43.58Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M19.74 64.08a.5.5 0 0 1 .355.147l2.852 2.866a.5.5 0 0 1 .146.352V77.68c2.585 1.189 4.407 3.814 4.407 6.865 0 4.183-3.357 7.535-7.5 7.535-4.144 0-7.5-3.377-7.5-7.535a7.546 7.546 0 0 1 4.478-6.894V76.21a.5.5 0 0 1 .146-.353l1.275-1.282-1.322-1.329a.5.5 0 0 1 0-.705l.332-.334-.262-.263a.5.5 0 0 1-.005-.7l1.332-1.377-1.445-1.452a.5.5 0 0 1-.145-.353v-1.113a.5.5 0 0 1 .145-.353l2.357-2.368a.5.5 0 0 1 .355-.147Zm-1.856 3.074v.7l1.645 1.654a.5.5 0 0 1 .005.7l-1.332 1.377.267.268a.5.5 0 0 1 0 .706l-.333.334 1.323 1.329a.5.5 0 0 1 0 .705l-1.48 1.488v1.57a.5.5 0 0 1-.32.466 6.545 6.545 0 0 0-4.159 6.094c0 3.61 2.913 6.535 6.5 6.535 3.588 0 6.5-2.902 6.5-6.535 0-2.748-1.707-5.104-4.095-6.073a.5.5 0 0 1-.312-.463V67.651l-2.352-2.364-1.857 1.866ZM20 85.742a1.27 1.27 0 0 0-1.268 1.277c0 .701.56 1.276 1.268 1.276.712 0 1.268-.555 1.268-1.276A1.27 1.27 0 0 0 20 85.742Zm-2.268 1.277A2.27 2.27 0 0 1 20 84.742a2.27 2.27 0 0 1 2.268 2.277c0 1.268-1 2.276-2.268 2.276a2.27 2.27 0 0 1-2.268-2.276ZM41.796 42.844a1 1 0 0 1 1.413.058l5.526 6A1 1 0 0 1 48 50.58H27a1 1 0 1 1 0-2h18.72l-3.982-4.323a1 1 0 0 1 .058-1.413ZM33.315 62.315a1 1 0 0 1-1.413-.058l-5.526-6a1 1 0 0 1 .735-1.677h21a1 1 0 1 1 0 2h-18.72l3.982 4.322a1 1 0 0 1-.058 1.413ZM57.623 114.12a1 1 0 0 1 1-1h63.048a1 1 0 1 1 0 2H58.623a1 1 0 0 1-1-1Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M78.022 114.12V95.774h2v18.346h-2ZM98.418 114.12V95.774h2v18.346h-2Z\" clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M16 14.58c0-7.732 6.268-14 14-14h119c7.732 0 14 6.268 14 14v68c0 7.732-6.268 14-14 14H39.5v-4H149c5.523 0 10-4.478 10-10v-68c0-5.523-4.477-10-10-10H30c-5.523 0-10 4.477-10 10v5h-4v-5Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\"\n    d=\"M25 15.58a6 6 0 0 1 6-6h117a6 6 0 0 1 6 6v66a6 6 0 0 1-6 6H36.5v-2H148a4 4 0 0 0 4-4v-66a4 4 0 0 0-4-4H31a4 4 0 0 0-4 4v3h-2v-3Z\"\n    clip-rule=\"evenodd\" />\n  <path class=\"tw-fill-secondary-600\"\n    d=\"M104.269 32.98a1.42 1.42 0 0 0-1.007-.4h-25.83c-.39 0-.722.132-1.007.4a1.26 1.26 0 0 0-.425.947v16.199c0 1.207.25 2.406.75 3.597a13.222 13.222 0 0 0 1.861 3.165c.74.919 1.62 1.817 2.646 2.69a30.93 30.93 0 0 0 2.834 2.172c.868.577 1.77 1.121 2.712 1.636.942.515 1.612.861 2.007 1.043.394.18.714.325.95.42.18.082.373.128.583.128.21 0 .403-.042.582-.128.241-.099.557-.24.956-.42.394-.182 1.064-.532 2.006-1.043a36.56 36.56 0 0 0 2.712-1.636c.867-.577 1.813-1.302 2.838-2.172a19.943 19.943 0 0 0 2.646-2.69 13.24 13.24 0 0 0 1.862-3.165c.5-1.187.749-2.386.749-3.597V33.93c.005-.367-.14-.684-.425-.952Zm-3.329 17.298c0 5.864-10.593 10.916-10.593 10.916V36.049h10.593v14.23Z\" />\n  <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M18 24.58h-5v-2h5v2ZM27 24.58h-5v-2h5v2Z\"\n    clip-rule=\"evenodd\" />\n</svg>\n`;\n","<div\n  class=\"tw-mx-auto tw-mt-5 tw-flex tw-max-w-lg tw-flex-col tw-items-center tw-justify-center tw-p-8\"\n>\n  <div>\n    <img class=\"logo logo-themed\" alt=\"Bitwarden\" />\n    <h3 bitTypography=\"h3\" class=\"tw-my-8 tw-mb-3 tw-text-center\">\n      {{ \"readingPasskeyLoading\" | i18n }}\n    </h3>\n\n    <div\n      class=\"tw-rounded-md tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-6\"\n    >\n      <div class=\"tw-flex tw-flex-col tw-items-center\">\n        <ng-container *ngIf=\"currentState === 'assert'\">\n          <bit-icon [icon]=\"Icons.CreatePasskeyIcon\" class=\"tw-my-10\"></bit-icon>\n          <p bitTypography=\"body1\">{{ \"readingPasskeyLoadingInfo\" | i18n }}</p>\n          <button\n            type=\"button\"\n            bitButton\n            block\n            [loading]=\"true\"\n            buttonType=\"primary\"\n            class=\"tw-mb-4\"\n          >\n            {{ \"loading\" | i18n }}\n          </button>\n        </ng-container>\n\n        <ng-container *ngIf=\"currentState === 'assertFailed'\">\n          <bit-icon [icon]=\"Icons.CreatePasskeyFailedIcon\" class=\"tw-my-10\"></bit-icon>\n          <p bitTypography=\"body1\">{{ \"readingPasskeyLoadingInfo\" | i18n }}</p>\n          <button\n            type=\"button\"\n            bitButton\n            block\n            buttonType=\"primary\"\n            class=\"tw-mb-4\"\n            (click)=\"retry()\"\n          >\n            {{ \"tryAgain\" | i18n }}\n          </button>\n        </ng-container>\n      </div>\n      <p bitTypography=\"body1\" class=\"tw-mb-0\">\n        {{ \"troubleLoggingIn\" | i18n }}<br />\n        <a bitLink routerLink=\"/login\">{{ \"useADifferentLogInMethod\" | i18n }}</a>\n      </p>\n    </div>\n  </div>\n</div>\n","import { Component } from \"@angular/core\";\n\nimport { BaseLoginViaWebAuthnComponent } from \"@bitwarden/angular/auth/components/base-login-via-webauthn.component\";\nimport { CreatePasskeyFailedIcon } from \"@bitwarden/angular/auth/icons/create-passkey-failed.icon\";\nimport { CreatePasskeyIcon } from \"@bitwarden/angular/auth/icons/create-passkey.icon\";\n\n@Component({\n  selector: \"app-login-via-webauthn\",\n  templateUrl: \"login-via-webauthn.component.html\",\n})\nexport class LoginViaWebAuthnComponent extends BaseLoginViaWebAuthnComponent {\n  protected readonly Icons = { CreatePasskeyIcon, CreatePasskeyFailedIcon };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\nimport { BaseAcceptComponent } from \"../../common/base.accept.component\";\n\nimport { AcceptOrganizationInviteService } from \"./accept-organization.service\";\nimport { OrganizationInvite } from \"./organization-invite\";\n\n@Component({\n  templateUrl: \"accept-organization.component.html\",\n})\nexport class AcceptOrganizationComponent extends BaseAcceptComponent {\n  orgName$ = this.acceptOrganizationInviteService.orgName$;\n  protected requiredParameters: string[] = [\"organizationId\", \"organizationUserId\", \"token\"];\n\n  constructor(\n    router: Router,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    route: ActivatedRoute,\n    authService: AuthService,\n    registerRouteService: RegisterRouteService,\n    private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n  ) {\n    super(router, platformUtilsService, i18nService, route, authService, registerRouteService);\n  }\n\n  async authedHandler(qParams: Params): Promise<void> {\n    const invite = OrganizationInvite.fromParams(qParams);\n    const success = await this.acceptOrganizationInviteService.validateAndAcceptInvite(invite);\n\n    if (!success) {\n      return;\n    }\n\n    this.platformUtilService.showToast(\n      \"success\",\n      this.i18nService.t(\"inviteAccepted\"),\n      invite.initOrganization\n        ? this.i18nService.t(\"inviteInitAcceptedDesc\")\n        : this.i18nService.t(\"inviteAcceptedDesc\"),\n      { timeout: 10000 },\n    );\n\n    await this.router.navigate([\"/vault\"]);\n  }\n\n  async unauthedHandler(qParams: Params): Promise<void> {\n    const invite = OrganizationInvite.fromParams(qParams);\n    await this.acceptOrganizationInviteService.setOrganizationInvitation(invite);\n    await this.navigateInviteAcceptance(invite);\n  }\n\n  /**\n   * In certain scenarios, we want to accelerate the user through the accept org invite process\n   * For example, if the user has a BW account already, we want them to be taken to login instead of creation.\n   */\n  private async navigateInviteAcceptance(invite: OrganizationInvite): Promise<void> {\n    // if user exists, send user to login\n    if (invite.orgUserHasExistingUser) {\n      await this.router.navigate([\"/login\"], {\n        queryParams: { email: invite.email },\n      });\n      return;\n    }\n\n    if (invite.orgSsoIdentifier) {\n      // We only send sso org identifier if the org has SSO enabled and the SSO policy required.\n      // Will JIT provision the user.\n      // Note: If the organization has Admin Recovery enabled, the user will be accepted into the org\n      // upon enrollment. The user should not be returned here.\n      await this.router.navigate([\"/sso\"], {\n        queryParams: { email: invite.email, identifier: invite.orgSsoIdentifier },\n      });\n      return;\n    }\n\n    // if SSO is disabled OR if sso is enabled but the SSO login required policy is not enabled\n    // then send user to create account\n\n    // TODO: update logic when email verification flag is removed\n    let queryParams: Params;\n    let registerRoute = await firstValueFrom(this.registerRoute$);\n    if (registerRoute === \"/register\") {\n      queryParams = {\n        fromOrgInvite: \"true\",\n        email: invite.email,\n      };\n    } else if (registerRoute === \"/signup\") {\n      // We have to override the base component route as we don't need users to complete email verification\n      // if they are coming directly from an emailed org invite.\n      registerRoute = \"/finish-signup\";\n      queryParams = {\n        email: invite.email,\n      };\n    }\n\n    await this.router.navigate([registerRoute], {\n      queryParams: queryParams,\n    });\n    return;\n  }\n}\n","<div class=\"tw-mt-5 tw-flex tw-justify-center\">\n  <div>\n    <img src=\"../../images/logo-dark@2x.png\" class=\"logo\" alt=\"Bitwarden\" />\n    <p class=\"tw-text-center tw-my-4\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-2x tw-text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </p>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class DeleteRecoverRequest {\n  email: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { DeleteRecoverRequest } from \"@bitwarden/common/models/request/delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-recover-delete\",\n  templateUrl: \"recover-delete.component.html\",\n})\nexport class RecoverDeleteComponent {\n  protected recoverDeleteForm = new FormGroup({\n    email: new FormControl(\"\", [Validators.required]),\n  });\n\n  get email() {\n    return this.recoverDeleteForm.controls.email;\n  }\n\n  constructor(\n    private router: Router,\n    private apiService: ApiService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n  ) {}\n\n  submit = async () => {\n    if (this.recoverDeleteForm.invalid) {\n      return;\n    }\n\n    const request = new DeleteRecoverRequest();\n    request.email = this.email.value.trim().toLowerCase();\n    await this.apiService.postAccountRecoverDelete(request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"deleteRecoverEmailSent\"),\n    });\n\n    await this.router.navigate([\"/\"]);\n  };\n}\n","<form [formGroup]=\"recoverDeleteForm\" [bitSubmit]=\"submit\">\n  <p bitTypography=\"body1\">{{ \"deleteRecoverDesc\" | i18n }}</p>\n  <bit-form-field>\n    <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n    <input bitInput appAutofocus appInputVerbatim=\"false\" type=\"email\" formControlName=\"email\" />\n  </bit-form-field>\n  <hr />\n  <div class=\"tw-flex tw-gap-2\">\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [block]=\"true\">\n      {{ \"submit\" | i18n }}\n    </button>\n    <a bitButton buttonType=\"secondary\" routerLink=\"/login\" [block]=\"true\">\n      {{ \"cancel\" | i18n }}\n    </a>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorRecoveryRequest extends SecretVerificationRequest {\n  recoveryCode: string;\n  email: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TwoFactorRecoveryRequest } from \"@bitwarden/common/auth/models/request/two-factor-recovery.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"app-recover-two-factor\",\n  templateUrl: \"recover-two-factor.component.html\",\n})\nexport class RecoverTwoFactorComponent {\n  protected formGroup = new FormGroup({\n    email: new FormControl(null, [Validators.required]),\n    masterPassword: new FormControl(null, [Validators.required]),\n    recoveryCode: new FormControl(null, [Validators.required]),\n  });\n\n  constructor(\n    private router: Router,\n    private apiService: ApiService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private keyService: KeyService,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private toastService: ToastService,\n  ) {}\n\n  get email(): string {\n    return this.formGroup.value.email;\n  }\n\n  get masterPassword(): string {\n    return this.formGroup.value.masterPassword;\n  }\n\n  get recoveryCode(): string {\n    return this.formGroup.value.recoveryCode;\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    const request = new TwoFactorRecoveryRequest();\n    request.recoveryCode = this.recoveryCode.replace(/\\s/g, \"\").toLowerCase();\n    request.email = this.email.trim().toLowerCase();\n    const key = await this.loginStrategyService.makePreloginKey(this.masterPassword, request.email);\n    request.masterPasswordHash = await this.keyService.hashMasterKey(this.masterPassword, key);\n    await this.apiService.postTwoFactorRecover(request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"twoStepRecoverDisabled\"),\n    });\n    await this.router.navigate([\"/\"]);\n  };\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <p bitTypography=\"body1\">\n    {{ \"recoverAccountTwoStepDesc\" | i18n }}\n    <a\n      bitLink\n      href=\"https://bitwarden.com/help/lost-two-step-device/\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      >{{ \"learnMore\" | i18n }}</a\n    >\n  </p>\n  <bit-form-field>\n    <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n    <input\n      bitInput\n      type=\"text\"\n      formControlName=\"email\"\n      appAutofocus\n      inputmode=\"email\"\n      appInputVerbatim=\"false\"\n    />\n  </bit-form-field>\n  <bit-form-field>\n    <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n    <input bitInput type=\"password\" formControlName=\"masterPassword\" appInputVerbatim />\n  </bit-form-field>\n  <bit-form-field>\n    <bit-label>{{ \"recoveryCodeTitle\" | i18n }}</bit-label>\n    <input bitInput type=\"text\" formControlName=\"recoveryCode\" appInputVerbatim />\n  </bit-form-field>\n  <hr />\n  <div class=\"tw-flex tw-gap-2\">\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [block]=\"true\">\n      {{ \"submit\" | i18n }}\n    </button>\n    <a bitButton buttonType=\"secondary\" routerLink=\"/login\" [block]=\"true\">\n      {{ \"cancel\" | i18n }}\n    </a>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Directive()\nexport class RemovePasswordComponent implements OnInit {\n  actionPromise: Promise<void | boolean>;\n  continuing = false;\n  leaving = false;\n\n  loading = true;\n  organization: Organization;\n  email: string;\n\n  constructor(\n    private router: Router,\n    private accountService: AccountService,\n    private syncService: SyncService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private keyConnectorService: KeyConnectorService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private dialogService: DialogService,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.organization = await this.keyConnectorService.getManagingOrganization();\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n    await this.syncService.fullSync(false);\n    this.loading = false;\n  }\n\n  convert = async () => {\n    this.continuing = true;\n    this.actionPromise = this.keyConnectorService.migrateUser();\n\n    try {\n      await this.actionPromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"removedMasterPassword\"),\n      });\n      await this.keyConnectorService.removeConvertAccountRequired();\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"\"]);\n    } catch (e) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: e.message,\n      });\n    }\n  };\n\n  leave = async () => {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.organization.name,\n      content: { key: \"leaveOrganizationConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.leaving = true;\n      this.actionPromise = this.organizationApiService.leave(this.organization.id);\n      await this.actionPromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"leftOrganization\"),\n      });\n      await this.keyConnectorService.removeConvertAccountRequired();\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"\"]);\n    } catch (e) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: e,\n      });\n    }\n  };\n}\n","<div *ngIf=\"loading\" class=\"tw-text-center\">\n  <i\n    class=\"bwi bwi-spinner bwi-spin bwi-2x tw-text-muted\"\n    title=\"{{ 'loading' | i18n }}\"\n    aria-hidden=\"true\"\n  ></i>\n  <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n</div>\n\n<div *ngIf=\"!loading\">\n  <p>{{ \"convertOrganizationEncryptionDesc\" | i18n: organization.name }}</p>\n\n  <button\n    bitButton\n    type=\"button\"\n    buttonType=\"primary\"\n    class=\"tw-w-full tw-mb-2\"\n    [bitAction]=\"convert\"\n    [block]=\"true\"\n  >\n    {{ \"removeMasterPassword\" | i18n }}\n  </button>\n  <button\n    bitButton\n    type=\"button\"\n    buttonType=\"secondary\"\n    class=\"tw-w-full\"\n    [bitAction]=\"leave\"\n    [block]=\"true\"\n  >\n    {{ \"leaveOrganization\" | i18n }}\n  </button>\n</div>\n","import { Component } from \"@angular/core\";\n\nimport { RemovePasswordComponent as BaseRemovePasswordComponent } from \"@bitwarden/angular/auth/components/remove-password.component\";\n\n@Component({\n  selector: \"app-remove-password\",\n  templateUrl: \"remove-password.component.html\",\n})\nexport class RemovePasswordComponent extends BaseRemovePasswordComponent {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnDestroy, OnInit } from \"@angular/core\";\nimport { Subject, firstValueFrom, map, takeUntil } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KdfConfig, KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { PasswordColorText } from \"../../tools/password-strength/password-strength.component\";\n\n@Directive()\nexport class ChangePasswordComponent implements OnInit, OnDestroy {\n  masterPassword: string;\n  masterPasswordRetype: string;\n  formPromise: Promise<any>;\n  enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  passwordStrengthResult: any;\n  color: string;\n  text: string;\n  leakedPassword: boolean;\n  minimumLength = Utils.minimumPasswordLength;\n\n  protected email: string;\n  protected kdfConfig: KdfConfig;\n\n  protected destroy$ = new Subject<void>();\n\n  constructor(\n    protected i18nService: I18nService,\n    protected keyService: KeyService,\n    protected messagingService: MessagingService,\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected policyService: PolicyService,\n    protected stateService: StateService,\n    protected dialogService: DialogService,\n    protected kdfConfigService: KdfConfigService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n    this.policyService\n      .masterPasswordPolicyOptions$()\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(\n        (enforcedPasswordPolicyOptions) =>\n          (this.enforcedPolicyOptions ??= enforcedPasswordPolicyOptions),\n      );\n\n    if (this.enforcedPolicyOptions?.minLength) {\n      this.minimumLength = this.enforcedPolicyOptions.minLength;\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async submit() {\n    if (!(await this.strongPassword())) {\n      return;\n    }\n\n    if (!(await this.setupSubmitActions())) {\n      return;\n    }\n\n    const email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n    if (this.kdfConfig == null) {\n      this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n    }\n\n    // Create new master key\n    const newMasterKey = await this.keyService.makeMasterKey(\n      this.masterPassword,\n      email.trim().toLowerCase(),\n      this.kdfConfig,\n    );\n    const newMasterKeyHash = await this.keyService.hashMasterKey(this.masterPassword, newMasterKey);\n\n    let newProtectedUserKey: [UserKey, EncString] = null;\n    const userKey = await this.keyService.getUserKey();\n    if (userKey == null) {\n      newProtectedUserKey = await this.keyService.makeUserKey(newMasterKey);\n    } else {\n      newProtectedUserKey = await this.keyService.encryptUserKeyWithMasterKey(newMasterKey);\n    }\n\n    await this.performSubmitActions(newMasterKeyHash, newMasterKey, newProtectedUserKey);\n  }\n\n  async setupSubmitActions(): Promise<boolean> {\n    // Override in sub-class\n    // Can be used for additional validation and/or other processes the should occur before changing passwords\n    return true;\n  }\n\n  async performSubmitActions(\n    newMasterKeyHash: string,\n    newMasterKey: MasterKey,\n    newUserKey: [UserKey, EncString],\n  ) {\n    // Override in sub-class\n  }\n\n  async strongPassword(): Promise<boolean> {\n    if (this.masterPassword == null || this.masterPassword === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordRequired\"),\n      });\n      return false;\n    }\n    if (this.masterPassword.length < this.minimumLength) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordMinimumlength\", this.minimumLength),\n      });\n      return false;\n    }\n    if (this.masterPassword !== this.masterPasswordRetype) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPassDoesntMatch\"),\n      });\n      return false;\n    }\n\n    const strengthResult = this.passwordStrengthResult;\n\n    if (\n      this.enforcedPolicyOptions != null &&\n      !this.policyService.evaluateMasterPassword(\n        strengthResult.score,\n        this.masterPassword,\n        this.enforcedPolicyOptions,\n      )\n    ) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n      });\n      return false;\n    }\n\n    const weakPassword = strengthResult != null && strengthResult.score < 3;\n\n    if (weakPassword && this.leakedPassword) {\n      const result = await this.dialogService.openSimpleDialog({\n        title: { key: \"weakAndExposedMasterPassword\" },\n        content: { key: \"weakAndBreachedMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!result) {\n        return false;\n      }\n    } else {\n      if (weakPassword) {\n        const result = await this.dialogService.openSimpleDialog({\n          title: { key: \"weakMasterPassword\" },\n          content: { key: \"weakMasterPasswordDesc\" },\n          type: \"warning\",\n        });\n\n        if (!result) {\n          return false;\n        }\n      }\n      if (this.leakedPassword) {\n        const result = await this.dialogService.openSimpleDialog({\n          title: { key: \"exposedMasterPassword\" },\n          content: { key: \"exposedMasterPasswordDesc\" },\n          type: \"warning\",\n        });\n\n        if (!result) {\n          return false;\n        }\n      }\n    }\n\n    return true;\n  }\n\n  async logOut() {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"logOut\" },\n      content: { key: \"logOutConfirmation\" },\n      acceptButtonText: { key: \"logOut\" },\n      type: \"warning\",\n    });\n\n    if (confirmed) {\n      this.messagingService.send(\"logout\");\n    }\n  }\n\n  getStrengthResult(result: any) {\n    this.passwordStrengthResult = result;\n  }\n\n  getPasswordScoreText(event: PasswordColorText) {\n    this.color = event.color;\n    this.text = event.text;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, of } from \"rxjs\";\nimport { filter, first, switchMap, tap } from \"rxjs/operators\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordEnrollmentRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { OrganizationAutoEnrollStatusResponse } from \"@bitwarden/common/admin-console/models/response/organization-auto-enroll-status.response\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SetPasswordRequest } from \"@bitwarden/common/auth/models/request/set-password.request\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { DEFAULT_KDF_CONFIG, KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class SetPasswordComponent extends BaseChangePasswordComponent implements OnInit {\n  syncLoading = true;\n  showPassword = false;\n  hint = \"\";\n  orgSsoIdentifier: string = null;\n  orgId: string;\n  resetPasswordAutoEnroll = false;\n  onSuccessfulChangePassword: () => Promise<void>;\n  successRoute = \"vault\";\n  userId: UserId;\n\n  forceSetPasswordReason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n  ForceSetPasswordReason = ForceSetPasswordReason;\n\n  constructor(\n    accountService: AccountService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    i18nService: I18nService,\n    keyService: KeyService,\n    messagingService: MessagingService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    platformUtilsService: PlatformUtilsService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    policyService: PolicyService,\n    protected router: Router,\n    private apiService: ApiService,\n    private syncService: SyncService,\n    private route: ActivatedRoute,\n    stateService: StateService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private organizationUserApiService: OrganizationUserApiService,\n    private userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n    private ssoLoginService: SsoLoginServiceAbstraction,\n    dialogService: DialogService,\n    kdfConfigService: KdfConfigService,\n    private encryptService: EncryptService,\n    protected toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      keyService,\n      messagingService,\n      passwordGenerationService,\n      platformUtilsService,\n      policyService,\n      stateService,\n      dialogService,\n      kdfConfigService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n  }\n\n  async ngOnInit() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    super.ngOnInit();\n\n    await this.syncService.fullSync(true);\n    this.syncLoading = false;\n\n    this.userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n    this.forceSetPasswordReason = await firstValueFrom(\n      this.masterPasswordService.forceSetPasswordReason$(this.userId),\n    );\n\n    this.route.queryParams\n      .pipe(\n        first(),\n        switchMap((qParams) => {\n          if (qParams.identifier != null) {\n            return of(qParams.identifier);\n          } else {\n            // Try to get orgSsoId from state as fallback\n            // Note: this is primarily for the TDE user w/out MP obtains admin MP reset permission scenario.\n            return this.ssoLoginService.getActiveUserOrganizationSsoIdentifier();\n          }\n        }),\n        filter((orgSsoId) => orgSsoId != null),\n        tap((orgSsoId: string) => {\n          this.orgSsoIdentifier = orgSsoId;\n        }),\n        switchMap((orgSsoId: string) => this.organizationApiService.getAutoEnrollStatus(orgSsoId)),\n        tap((orgAutoEnrollStatusResponse: OrganizationAutoEnrollStatusResponse) => {\n          this.orgId = orgAutoEnrollStatusResponse.id;\n          this.resetPasswordAutoEnroll = orgAutoEnrollStatusResponse.resetPasswordEnabled;\n        }),\n        switchMap((orgAutoEnrollStatusResponse: OrganizationAutoEnrollStatusResponse) =>\n          // Must get org id from response to get master password policy options\n          this.policyApiService.getMasterPasswordPolicyOptsForOrgUser(\n            orgAutoEnrollStatusResponse.id,\n          ),\n        ),\n        tap((masterPasswordPolicyOptions: MasterPasswordPolicyOptions) => {\n          this.enforcedPolicyOptions = masterPasswordPolicyOptions;\n        }),\n      )\n      .subscribe({\n        error: () => {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: null,\n            message: this.i18nService.t(\"errorOccurred\"),\n          });\n        },\n      });\n  }\n\n  async setupSubmitActions() {\n    this.kdfConfig = DEFAULT_KDF_CONFIG;\n    return true;\n  }\n\n  async performSubmitActions(\n    masterPasswordHash: string,\n    masterKey: MasterKey,\n    userKey: [UserKey, EncString],\n  ) {\n    let keysRequest: KeysRequest | null = null;\n    let newKeyPair: [string, EncString] | null = null;\n\n    if (\n      this.forceSetPasswordReason !=\n      ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission\n    ) {\n      // Existing JIT provisioned user in a MP encryption org setting first password\n      // Users in this state will not already have a user asymmetric key pair so must create it for them\n      // We don't want to re-create the user key pair if the user already has one (TDE user case)\n\n      // in case we have a local private key, and are not sure whether it has been posted to the server, we post the local private key instead of generating a new one\n      const existingUserPrivateKey = (await firstValueFrom(\n        this.keyService.userPrivateKey$(this.userId),\n      )) as Uint8Array;\n      const existingUserPublicKey = await firstValueFrom(\n        this.keyService.userPublicKey$(this.userId),\n      );\n      if (existingUserPrivateKey != null && existingUserPublicKey != null) {\n        const existingUserPublicKeyB64 = Utils.fromBufferToB64(existingUserPublicKey);\n        newKeyPair = [\n          existingUserPublicKeyB64,\n          await this.encryptService.encrypt(existingUserPrivateKey, userKey[0]),\n        ];\n      } else {\n        newKeyPair = await this.keyService.makeKeyPair(userKey[0]);\n      }\n      keysRequest = new KeysRequest(newKeyPair[0], newKeyPair[1].encryptedString);\n    }\n\n    const request = new SetPasswordRequest(\n      masterPasswordHash,\n      userKey[1].encryptedString,\n      this.hint,\n      this.orgSsoIdentifier,\n      keysRequest,\n      this.kdfConfig.kdfType, //always PBKDF2 --> see this.setupSubmitActions\n      this.kdfConfig.iterations,\n    );\n    try {\n      if (this.resetPasswordAutoEnroll) {\n        this.formPromise = this.apiService\n          .setPassword(request)\n          .then(async () => {\n            await this.onSetPasswordSuccess(masterKey, userKey, newKeyPair);\n            return this.organizationApiService.getKeys(this.orgId);\n          })\n          .then(async (response) => {\n            if (response == null) {\n              throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n            }\n            const publicKey = Utils.fromB64ToArray(response.publicKey);\n\n            // RSA Encrypt user key with organization public key\n            const userKey = await this.keyService.getUserKey();\n            const encryptedUserKey = await this.encryptService.rsaEncrypt(userKey.key, publicKey);\n\n            const resetRequest = new OrganizationUserResetPasswordEnrollmentRequest();\n            resetRequest.masterPasswordHash = masterPasswordHash;\n            resetRequest.resetPasswordKey = encryptedUserKey.encryptedString;\n\n            return this.organizationUserApiService.putOrganizationUserResetPasswordEnrollment(\n              this.orgId,\n              this.userId,\n              resetRequest,\n            );\n          });\n      } else {\n        this.formPromise = this.apiService.setPassword(request).then(async () => {\n          await this.onSetPasswordSuccess(masterKey, userKey, newKeyPair);\n        });\n      }\n\n      await this.formPromise;\n\n      if (this.onSuccessfulChangePassword != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulChangePassword();\n      } else {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([this.successRoute]);\n      }\n    } catch {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n    }\n  }\n\n  togglePassword(confirmField: boolean) {\n    this.showPassword = !this.showPassword;\n    document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n  }\n\n  protected async onSetPasswordSuccess(\n    masterKey: MasterKey,\n    userKey: [UserKey, EncString],\n    keyPair: [string, EncString] | null,\n  ) {\n    // Clear force set password reason to allow navigation back to vault.\n    await this.masterPasswordService.setForceSetPasswordReason(\n      ForceSetPasswordReason.None,\n      this.userId,\n    );\n\n    // User now has a password so update account decryption options in state\n    const userDecryptionOpts = await firstValueFrom(\n      this.userDecryptionOptionsService.userDecryptionOptions$,\n    );\n    userDecryptionOpts.hasMasterPassword = true;\n    await this.userDecryptionOptionsService.setUserDecryptionOptions(userDecryptionOpts);\n    await this.kdfConfigService.setKdfConfig(this.userId, this.kdfConfig);\n    await this.masterPasswordService.setMasterKey(masterKey, this.userId);\n    await this.keyService.setUserKey(userKey[0], this.userId);\n\n    // Set private key only for new JIT provisioned users in MP encryption orgs\n    // Existing TDE users will have private key set on sync or on login\n    if (\n      keyPair !== null &&\n      this.forceSetPasswordReason !=\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission\n    ) {\n      await this.keyService.setPrivateKey(keyPair[1].encryptedString, this.userId);\n    }\n\n    const localMasterKeyHash = await this.keyService.hashMasterKey(\n      this.masterPassword,\n      masterKey,\n      HashPurpose.LocalAuthorization,\n    );\n    await this.masterPasswordService.setMasterKeyHash(localMasterKeyHash, this.userId);\n  }\n}\n","<div class=\"progress\">\n  <div\n    class=\"progress-bar {{ color }}\"\n    role=\"progressbar\"\n    [ngStyle]=\"{ width: scoreWidth + '%' }\"\n    attr.aria-valuenow=\"{{ scoreWidth }}\"\n    aria-valuemin=\"0\"\n    aria-valuemax=\"100\"\n  >\n    <ng-container *ngIf=\"showText && text\">\n      {{ text }}\n    </ng-container>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnChanges, Output } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\n\nexport interface PasswordColorText {\n  color: string;\n  text: string;\n}\n\n/**\n * @deprecated July 2024: Use new PasswordStrengthV2Component instead\n */\n@Component({\n  selector: \"app-password-strength\",\n  templateUrl: \"password-strength.component.html\",\n})\nexport class PasswordStrengthComponent implements OnChanges {\n  @Input() showText = false;\n  @Input() email: string;\n  @Input() name: string;\n  @Input() set password(value: string) {\n    this.updatePasswordStrength(value);\n  }\n  @Output() passwordStrengthResult = new EventEmitter<any>();\n  @Output() passwordScoreColor = new EventEmitter<PasswordColorText>();\n\n  masterPasswordScore: number;\n  scoreWidth = 0;\n  color = \"bg-danger\";\n  text: string;\n\n  private masterPasswordStrengthTimeout: any;\n\n  //used by desktop and browser to display strength text color\n  get masterPasswordScoreColor() {\n    switch (this.masterPasswordScore) {\n      case 4:\n        return \"success\";\n      case 3:\n        return \"primary\";\n      case 2:\n        return \"warning\";\n      default:\n        return \"danger\";\n    }\n  }\n\n  //used by desktop and browser to display strength text\n  get masterPasswordScoreText() {\n    switch (this.masterPasswordScore) {\n      case 4:\n        return this.i18nService.t(\"strong\");\n      case 3:\n        return this.i18nService.t(\"good\");\n      case 2:\n        return this.i18nService.t(\"weak\");\n      default:\n        return this.masterPasswordScore != null ? this.i18nService.t(\"weak\") : null;\n    }\n  }\n\n  constructor(\n    private i18nService: I18nService,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n  ) {}\n\n  ngOnChanges(): void {\n    this.masterPasswordStrengthTimeout = setTimeout(() => {\n      this.scoreWidth = this.masterPasswordScore == null ? 0 : (this.masterPasswordScore + 1) * 20;\n\n      switch (this.masterPasswordScore) {\n        case 4:\n          this.color = \"bg-success\";\n          this.text = this.i18nService.t(\"strong\");\n          break;\n        case 3:\n          this.color = \"bg-primary\";\n          this.text = this.i18nService.t(\"good\");\n          break;\n        case 2:\n          this.color = \"bg-warning\";\n          this.text = this.i18nService.t(\"weak\");\n          break;\n        default:\n          this.color = \"bg-danger\";\n          this.text = this.masterPasswordScore != null ? this.i18nService.t(\"weak\") : null;\n          break;\n      }\n\n      this.setPasswordScoreText(this.color, this.text);\n    }, 300);\n  }\n\n  updatePasswordStrength(password: string) {\n    const masterPassword = password;\n\n    if (this.masterPasswordStrengthTimeout != null) {\n      clearTimeout(this.masterPasswordStrengthTimeout);\n    }\n\n    const strengthResult = this.passwordStrengthService.getPasswordStrength(\n      masterPassword,\n      this.email,\n      this.name?.trim().toLowerCase().split(\" \"),\n    );\n    this.passwordStrengthResult.emit(strengthResult);\n    this.masterPasswordScore = strengthResult == null ? null : strengthResult.score;\n  }\n\n  setPasswordScoreText(color: string, text: string) {\n    color = color.slice(3);\n    this.passwordScoreColor.emit({ color: color, text: text });\n  }\n}\n","<form #form (ngSubmit)=\"submit()\" [appApiAction]=\"formPromise\" ngNativeValidate autocomplete=\"off\">\n  <div class=\"row justify-content-md-center mt-5\">\n    <div class=\"col-5\">\n      <p class=\"lead text-center mb-4\">{{ \"setMasterPassword\" | i18n }}</p>\n      <div class=\"card d-block\">\n        <div class=\"card-body text-center\" *ngIf=\"syncLoading\">\n          <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n          {{ \"loading\" | i18n }}\n        </div>\n        <div class=\"card-body\" *ngIf=\"!syncLoading\">\n          <p\n            *ngIf=\"\n              forceSetPasswordReason ==\n                ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission;\n              else defaultCardDesc\n            \"\n          >\n            {{ \"orgPermissionsUpdatedMustSetPassword\" | i18n }}\n          </p>\n\n          <ng-template #defaultCardDesc>\n            <p>{{ \"orgRequiresYouToSetPassword\" | i18n }}</p>\n          </ng-template>\n\n          <app-callout\n            type=\"warning\"\n            title=\"{{ 'resetPasswordPolicyAutoEnroll' | i18n }}\"\n            *ngIf=\"resetPasswordAutoEnroll\"\n          >\n            {{ \"resetPasswordAutoEnrollInviteWarning\" | i18n }}\n          </app-callout>\n          <div class=\"form-group\">\n            <auth-password-callout [policy]=\"enforcedPolicyOptions\" *ngIf=\"enforcedPolicyOptions\">\n            </auth-password-callout>\n            <label for=\"masterPassword\">{{ \"masterPass\" | i18n }}</label>\n            <div class=\"d-flex\">\n              <div class=\"w-100\">\n                <input\n                  id=\"masterPassword\"\n                  type=\"{{ showPassword ? 'text' : 'password' }}\"\n                  name=\"MasterPasswordHash\"\n                  class=\"text-monospace form-control mb-1\"\n                  [(ngModel)]=\"masterPassword\"\n                  required\n                  appInputVerbatim\n                />\n                <app-password-strength\n                  [password]=\"masterPassword\"\n                  [email]=\"email\"\n                  [showText]=\"true\"\n                  (passwordStrengthResult)=\"getStrengthResult($event)\"\n                >\n                </app-password-strength>\n              </div>\n              <div>\n                <button\n                  type=\"button\"\n                  class=\"ml-1 btn btn-link\"\n                  appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                  (click)=\"togglePassword(false)\"\n                >\n                  <i\n                    class=\"bwi bwi-lg\"\n                    aria-hidden=\"true\"\n                    [ngClass]=\"{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }\"\n                  ></i>\n                </button>\n                <div class=\"progress-bar invisible\"></div>\n              </div>\n            </div>\n            <small class=\"form-text text-muted\">{{ \"masterPassDesc\" | i18n }}</small>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"masterPasswordRetype\">{{ \"reTypeMasterPass\" | i18n }}</label>\n            <div class=\"d-flex\">\n              <input\n                id=\"masterPasswordRetype\"\n                type=\"{{ showPassword ? 'text' : 'password' }}\"\n                name=\"MasterPasswordRetype\"\n                class=\"text-monospace form-control\"\n                [(ngModel)]=\"masterPasswordRetype\"\n                required\n                appInputVerbatim\n              />\n              <button\n                type=\"button\"\n                class=\"ml-1 btn btn-link\"\n                appA11yTitle=\"{{ 'toggleVisibility' | i18n }}\"\n                (click)=\"togglePassword(true)\"\n              >\n                <i\n                  class=\"bwi bwi-lg\"\n                  aria-hidden=\"true\"\n                  [ngClass]=\"{ 'bwi-eye': !showPassword, 'bwi-eye-slash': showPassword }\"\n                ></i>\n              </button>\n            </div>\n          </div>\n          <div class=\"form-group\">\n            <label for=\"hint\">{{ \"masterPassHint\" | i18n }}</label>\n            <input id=\"hint\" class=\"form-control\" type=\"text\" name=\"Hint\" [(ngModel)]=\"hint\" />\n            <small class=\"form-text text-muted\">{{ \"masterPassHintDesc\" | i18n }}</small>\n          </div>\n          <hr />\n          <div class=\"d-flex\">\n            <button\n              type=\"submit\"\n              class=\"btn btn-primary btn-block btn-submit\"\n              [disabled]=\"form.loading\"\n            >\n              <i\n                class=\"bwi bwi-spinner bwi-spin\"\n                title=\"{{ 'loading' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span>{{ \"submit\" | i18n }}</span>\n            </button>\n            <button\n              type=\"button\"\n              class=\"btn btn-outline-secondary btn-block ml-2 mt-0\"\n              (click)=\"logOut()\"\n            >\n              {{ \"logOut\" | i18n }}\n            </button>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</form>\n","import { Component, inject } from \"@angular/core\";\n\nimport { SetPasswordComponent as BaseSetPasswordComponent } from \"@bitwarden/angular/auth/components/set-password.component\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\n\nimport { RouterService } from \"../core\";\n\nimport { AcceptOrganizationInviteService } from \"./organization-invite/accept-organization.service\";\n\n@Component({\n  selector: \"app-set-password\",\n  templateUrl: \"set-password.component.html\",\n})\nexport class SetPasswordComponent extends BaseSetPasswordComponent {\n  routerService = inject(RouterService);\n  acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n  protected override async onSetPasswordSuccess(\n    masterKey: MasterKey,\n    userKey: [UserKey, EncString],\n    keyPair: [string, EncString],\n  ): Promise<void> {\n    await super.onSetPasswordSuccess(masterKey, userKey, keyPair);\n    // SSO JIT accepts org invites when setting their MP, meaning\n    // we can clear the deep linked url for accepting it.\n    await this.routerService.getAndClearLoginRedirectUrl();\n    await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-deauthorize-sessions\",\n  templateUrl: \"deauthorize-sessions.component.html\",\n})\nexport class DeauthorizeSessionsComponent {\n  masterPassword: Verification;\n  formPromise: Promise<unknown>;\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private userVerificationService: UserVerificationService,\n    private messagingService: MessagingService,\n    private logService: LogService,\n    private toastService: ToastService,\n  ) {}\n\n  async submit() {\n    try {\n      this.formPromise = this.userVerificationService\n        .buildRequest(this.masterPassword)\n        .then((request) => this.apiService.postSecurityStamp(request));\n      await this.formPromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"sessionsDeauthorized\"),\n        message: this.i18nService.t(\"logBackIn\"),\n      });\n      this.messagingService.send(\"logout\");\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n}\n","<div class=\"modal fade\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"deAuthTitle\">\n  <div class=\"modal-dialog modal-dialog-scrollable\" role=\"document\">\n    <form\n      class=\"modal-content\"\n      #form\n      (ngSubmit)=\"submit()\"\n      [appApiAction]=\"formPromise\"\n      ngNativeValidate\n    >\n      <div class=\"modal-header\">\n        <h1 class=\"modal-title\" id=\"deAuthTitle\">{{ \"deauthorizeSessions\" | i18n }}</h1>\n        <button\n          type=\"button\"\n          class=\"close\"\n          data-dismiss=\"modal\"\n          appA11yTitle=\"{{ 'close' | i18n }}\"\n        >\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">\n        <p>{{ \"deauthorizeSessionsDesc\" | i18n }}</p>\n        <bit-callout type=\"warning\">{{ \"deauthorizeSessionsWarning\" | i18n }}</bit-callout>\n        <app-user-verification [(ngModel)]=\"masterPassword\" ngDefaultControl name=\"secret\">\n        </app-user-verification>\n      </div>\n      <div class=\"modal-footer\">\n        <button type=\"submit\" class=\"btn btn-danger btn-submit\" [disabled]=\"form.loading\">\n          <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n          <span>{{ \"deauthorizeSessions\" | i18n }}</span>\n        </button>\n        <button type=\"button\" class=\"btn btn-outline-secondary\" data-dismiss=\"modal\">\n          {{ \"close\" | i18n }}\n        </button>\n      </div>\n    </form>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Component({\n  templateUrl: \"delete-account-dialog.component.html\",\n})\nexport class DeleteAccountDialogComponent {\n  deleteForm = this.formBuilder.group({\n    verification: undefined as Verification | undefined,\n  });\n  invalidSecret: boolean = false;\n\n  constructor(\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private formBuilder: FormBuilder,\n    private accountApiService: AccountApiService,\n    private dialogRef: DialogRef,\n    private toastService: ToastService,\n  ) {}\n\n  submit = async () => {\n    try {\n      const verification = this.deleteForm.get(\"verification\").value;\n      await this.accountApiService.deleteAccount(verification);\n      this.dialogRef.close();\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"accountDeleted\"),\n        message: this.i18nService.t(\"accountDeletedDesc\"),\n      });\n    } catch (e) {\n      if (e instanceof ErrorResponse && e.statusCode === 400) {\n        this.invalidSecret = true;\n      }\n      throw e;\n    }\n  };\n\n  static open(dialogService: DialogService) {\n    return dialogService.open(DeleteAccountDialogComponent);\n  }\n}\n","<form [formGroup]=\"deleteForm\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"default\" [title]=\"'deleteAccount' | i18n\">\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">{{ \"deleteAccountDesc\" | i18n }}</p>\n      <bit-callout type=\"warning\">{{ \"deleteAccountWarning\" | i18n }}</bit-callout>\n      <app-user-verification-form-input\n        formControlName=\"verification\"\n        name=\"verification\"\n        [(invalidSecret)]=\"invalidSecret\"\n      ></app-user-verification-form-input>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"danger\">\n        {{ \"deleteAccount\" | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"close\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class EmailTokenRequest extends SecretVerificationRequest {\n  newEmail: string;\n  masterPasswordHash: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EmailTokenRequest } from \"./email-token.request\";\n\nexport class EmailRequest extends EmailTokenRequest {\n  newMasterPasswordHash: string;\n  token: string;\n  key: string;\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-callout type=\"warning\" *ngIf=\"showTwoFactorEmailWarning\">\n    {{ \"changeEmailTwoFactorWarning\" | i18n }}\n  </bit-callout>\n\n  <div class=\"tw-w-1/2 tw-pr-2\" formGroupName=\"step1\">\n    <bit-form-field>\n      <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n      <input\n        id=\"change-email_input_masterPassword\"\n        bitInput\n        type=\"password\"\n        formControlName=\"masterPassword\"\n      />\n      <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n    </bit-form-field>\n    <bit-form-field>\n      <bit-label>{{ \"newEmail\" | i18n }}</bit-label>\n      <input\n        id=\"change-email_input_newEmail\"\n        bitInput\n        type=\"email\"\n        formControlName=\"newEmail\"\n        inputmode=\"email\"\n      />\n    </bit-form-field>\n  </div>\n\n  <ng-container *ngIf=\"tokenSent\">\n    <hr />\n    <p>{{ \"changeEmailDesc\" | i18n: formGroup.controls.step1.value.newEmail }}</p>\n    <bit-callout type=\"warning\">{{ \"loggedOutWarning\" | i18n }}</bit-callout>\n\n    <div class=\"tw-w-1/2 tw-pr-2\">\n      <bit-form-field>\n        <bit-label>{{ \"code\" | i18n }}</bit-label>\n        <input id=\"change-email_input_token\" bitInput type=\"text\" formControlName=\"token\" />\n      </bit-form-field>\n    </div>\n  </ng-container>\n\n  <button type=\"submit\" bitButton buttonType=\"primary\" bitFormButton>\n    {{ (tokenSent ? \"changeEmail\" : \"continue\") | i18n }}\n  </button>\n  <button type=\"button\" bitButton *ngIf=\"tokenSent\" (click)=\"reset()\">\n    {{ \"cancel\" | i18n }}\n  </button>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EmailTokenRequest } from \"@bitwarden/common/auth/models/request/email-token.request\";\nimport { EmailRequest } from \"@bitwarden/common/auth/models/request/email.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"app-change-email\",\n  templateUrl: \"change-email.component.html\",\n})\nexport class ChangeEmailComponent implements OnInit {\n  tokenSent = false;\n  showTwoFactorEmailWarning = false;\n\n  protected formGroup = this.formBuilder.group({\n    step1: this.formBuilder.group({\n      masterPassword: [\"\", [Validators.required]],\n      newEmail: [\"\", [Validators.required, Validators.email]],\n    }),\n    token: [{ value: \"\", disabled: true }, [Validators.required]],\n  });\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private keyService: KeyService,\n    private messagingService: MessagingService,\n    private logService: LogService,\n    private stateService: StateService,\n    private formBuilder: FormBuilder,\n    private kdfConfigService: KdfConfigService,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    const twoFactorProviders = await this.apiService.getTwoFactorProviders();\n    this.showTwoFactorEmailWarning = twoFactorProviders.data.some(\n      (p) => p.type === TwoFactorProviderType.Email && p.enabled,\n    );\n  }\n\n  protected submit = async () => {\n    // This form has multiple steps, so we need to mark all the groups as touched.\n    this.formGroup.controls.step1.markAllAsTouched();\n\n    if (this.tokenSent) {\n      this.formGroup.controls.token.markAllAsTouched();\n    }\n\n    // Exit if the form is invalid.\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    const step1Value = this.formGroup.controls.step1.value;\n    const newEmail = step1Value.newEmail.trim().toLowerCase();\n\n    if (!this.tokenSent) {\n      const request = new EmailTokenRequest();\n      request.newEmail = newEmail;\n      request.masterPasswordHash = await this.keyService.hashMasterKey(\n        step1Value.masterPassword,\n        await this.keyService.getOrDeriveMasterKey(step1Value.masterPassword),\n      );\n      try {\n        await this.apiService.postEmailToken(request);\n        this.activateStep2();\n      } catch (e) {\n        this.logService.error(e);\n      }\n    } else {\n      const request = new EmailRequest();\n      request.token = this.formGroup.value.token;\n      request.newEmail = newEmail;\n      request.masterPasswordHash = await this.keyService.hashMasterKey(\n        step1Value.masterPassword,\n        await this.keyService.getOrDeriveMasterKey(step1Value.masterPassword),\n      );\n      const kdfConfig = await this.kdfConfigService.getKdfConfig();\n      const newMasterKey = await this.keyService.makeMasterKey(\n        step1Value.masterPassword,\n        newEmail,\n        kdfConfig,\n      );\n      request.newMasterPasswordHash = await this.keyService.hashMasterKey(\n        step1Value.masterPassword,\n        newMasterKey,\n      );\n      const newUserKey = await this.keyService.encryptUserKeyWithMasterKey(newMasterKey);\n      request.key = newUserKey[1].encryptedString;\n      try {\n        await this.apiService.postEmail(request);\n        this.reset();\n        this.toastService.showToast({\n          variant: \"success\",\n          title: this.i18nService.t(\"emailChanged\"),\n          message: this.i18nService.t(\"logBackIn\"),\n        });\n        this.messagingService.send(\"logout\");\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n  };\n\n  // Disable step1 and enable token\n  activateStep2() {\n    this.formGroup.controls.step1.disable();\n    this.formGroup.controls.token.enable();\n\n    this.tokenSent = true;\n  }\n\n  // Reset form and re-enable step1\n  reset() {\n    this.formGroup.reset();\n    this.formGroup.controls.step1.enable();\n    this.formGroup.controls.token.disable();\n\n    this.tokenSent = false;\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <app-profile></app-profile>\n\n  <div *ngIf=\"showChangeEmail$ | async\" class=\"tw-mt-16\">\n    <h1 bitTypography=\"h1\">{{ \"changeEmail\" | i18n }}</h1>\n    <app-change-email></app-change-email>\n  </div>\n\n  <app-danger-zone>\n    <button type=\"button\" bitButton buttonType=\"danger\" (click)=\"deauthorizeSessions()\">\n      {{ \"deauthorizeSessions\" | i18n }}\n    </button>\n    <button\n      *ngIf=\"showPurgeVault$ | async\"\n      type=\"button\"\n      bitButton\n      buttonType=\"danger\"\n      [bitAction]=\"purgeVault\"\n    >\n      {{ \"purgeVault\" | i18n }}\n    </button>\n    <button\n      *ngIf=\"showDeleteAccount$ | async\"\n      type=\"button\"\n      bitButton\n      buttonType=\"danger\"\n      [bitAction]=\"deleteAccount\"\n    >\n      {{ \"deleteAccount\" | i18n }}\n    </button>\n  </app-danger-zone>\n\n  <ng-template #deauthorizeSessionsTemplate></ng-template>\n  <ng-template #viewUserApiKeyTemplate></ng-template>\n  <ng-template #rotateUserApiKeyTemplate></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { combineLatest, from, lastValueFrom, map, Observable } from \"rxjs\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PurgeVaultComponent } from \"../../../vault/settings/purge-vault.component\";\n\nimport { DeauthorizeSessionsComponent } from \"./deauthorize-sessions.component\";\nimport { DeleteAccountDialogComponent } from \"./delete-account-dialog.component\";\n\n@Component({\n  selector: \"app-account\",\n  templateUrl: \"account.component.html\",\n})\nexport class AccountComponent implements OnInit {\n  @ViewChild(\"deauthorizeSessionsTemplate\", { read: ViewContainerRef, static: true })\n  deauthModalRef: ViewContainerRef;\n\n  showChangeEmail$: Observable<boolean>;\n  showPurgeVault$: Observable<boolean>;\n  showDeleteAccount$: Observable<boolean>;\n\n  constructor(\n    private modalService: ModalService,\n    private dialogService: DialogService,\n    private userVerificationService: UserVerificationService,\n    private configService: ConfigService,\n    private organizationService: OrganizationService,\n  ) {}\n\n  async ngOnInit() {\n    const isAccountDeprovisioningEnabled$ = this.configService.getFeatureFlag$(\n      FeatureFlag.AccountDeprovisioning,\n    );\n\n    const userIsManagedByOrganization$ = this.organizationService.organizations$.pipe(\n      map((organizations) => organizations.some((o) => o.userIsManagedByOrganization === true)),\n    );\n\n    const hasMasterPassword$ = from(this.userVerificationService.hasMasterPassword());\n\n    this.showChangeEmail$ = combineLatest([\n      hasMasterPassword$,\n      isAccountDeprovisioningEnabled$,\n      userIsManagedByOrganization$,\n    ]).pipe(\n      map(\n        ([hasMasterPassword, isAccountDeprovisioningEnabled, userIsManagedByOrganization]) =>\n          hasMasterPassword && (!isAccountDeprovisioningEnabled || !userIsManagedByOrganization),\n      ),\n    );\n\n    this.showPurgeVault$ = combineLatest([\n      isAccountDeprovisioningEnabled$,\n      userIsManagedByOrganization$,\n    ]).pipe(\n      map(\n        ([isAccountDeprovisioningEnabled, userIsManagedByOrganization]) =>\n          !isAccountDeprovisioningEnabled || !userIsManagedByOrganization,\n      ),\n    );\n\n    this.showDeleteAccount$ = combineLatest([\n      isAccountDeprovisioningEnabled$,\n      userIsManagedByOrganization$,\n    ]).pipe(\n      map(\n        ([isAccountDeprovisioningEnabled, userIsManagedByOrganization]) =>\n          !isAccountDeprovisioningEnabled || !userIsManagedByOrganization,\n      ),\n    );\n  }\n\n  async deauthorizeSessions() {\n    await this.modalService.openViewRef(DeauthorizeSessionsComponent, this.deauthModalRef);\n  }\n\n  purgeVault = async () => {\n    const dialogRef = PurgeVaultComponent.open(this.dialogService);\n    await lastValueFrom(dialogRef.closed);\n  };\n\n  deleteAccount = async () => {\n    const dialogRef = DeleteAccountDialogComponent.open(this.dialogService);\n    await lastValueFrom(dialogRef.closed);\n  };\n}\n","export enum EmergencyAccessType {\n  View = 0,\n  Takeover = 1,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherResponse } from \"@bitwarden/common/vault/models/response/cipher.response\";\nimport { KdfType } from \"@bitwarden/key-management\";\n\nimport { EmergencyAccessStatusType } from \"../enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../enums/emergency-access-type\";\n\nexport class GranteeEmergencyAccess {\n  id: string;\n  granteeId: string;\n  name: string;\n  email: string;\n  type: EmergencyAccessType;\n  status: EmergencyAccessStatusType;\n  waitTimeDays: number;\n  creationDate: string;\n  avatarColor: string;\n}\n\nexport class GrantorEmergencyAccess {\n  id: string;\n  grantorId: string;\n  name: string;\n  email: string;\n  type: EmergencyAccessType;\n  status: EmergencyAccessStatusType;\n  waitTimeDays: number;\n  creationDate: string;\n  avatarColor: string;\n}\n\nexport class TakeoverTypeEmergencyAccess {\n  keyEncrypted: string;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n}\n\nexport class ViewTypeEmergencyAccess {\n  keyEncrypted: string;\n  ciphers: CipherResponse[] = [];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, OnInit, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nexport enum EmergencyAccessConfirmDialogResult {\n  Confirmed = \"confirmed\",\n}\ntype EmergencyAccessConfirmDialogData = {\n  /** display name of the account requesting emergency access */\n  name: string;\n  /** identifies the account requesting emergency access */\n  userId: string;\n  /** traces a unique emergency request  */\n  emergencyAccessId: string;\n  /** user public key */\n  publicKey: Uint8Array;\n};\n@Component({\n  selector: \"emergency-access-confirm\",\n  templateUrl: \"emergency-access-confirm.component.html\",\n})\nexport class EmergencyAccessConfirmComponent implements OnInit {\n  loading = true;\n  fingerprint: string;\n  confirmForm = this.formBuilder.group({\n    dontAskAgain: [false],\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected params: EmergencyAccessConfirmDialogData,\n    private formBuilder: FormBuilder,\n    private keyService: KeyService,\n    protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n    private logService: LogService,\n    private dialogRef: DialogRef<EmergencyAccessConfirmDialogResult>,\n  ) {}\n\n  async ngOnInit() {\n    try {\n      const fingerprint = await this.keyService.getFingerprint(\n        this.params.userId,\n        this.params.publicKey,\n      );\n      if (fingerprint != null) {\n        this.fingerprint = fingerprint.join(\"-\");\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n    this.loading = false;\n  }\n\n  submit = async () => {\n    if (this.loading) {\n      return;\n    }\n\n    if (this.confirmForm.get(\"dontAskAgain\").value) {\n      await this.organizationManagementPreferencesService.autoConfirmFingerPrints.set(true);\n    }\n\n    try {\n      this.dialogRef.close(EmergencyAccessConfirmDialogResult.Confirmed);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  };\n  /**\n   * Strongly typed helper to open a EmergencyAccessConfirmComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open(\n    dialogService: DialogService,\n    config: DialogConfig<EmergencyAccessConfirmDialogData>,\n  ) {\n    return dialogService.open<EmergencyAccessConfirmDialogResult>(\n      EmergencyAccessConfirmComponent,\n      config,\n    );\n  }\n}\n","<form [formGroup]=\"confirmForm\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\" [loading]=\"loading\">\n    <span bitDialogTitle>\n      {{ \"confirmUser\" | i18n }}\n      <small class=\"tw-text-muted\">{{ params.name }}</small>\n    </span>\n    <div bitDialogContent>\n      <p bitTypography=\"body1\">\n        {{ \"fingerprintEnsureIntegrityVerify\" | i18n }}\n        <a\n          bitLink\n          href=\"https://bitwarden.com/help/fingerprint-phrase/\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n        >\n          {{ \"learnMore\" | i18n }}</a\n        >\n      </p>\n      <p bitTypography=\"body1\">\n        <code>{{ fingerprint }}</code>\n      </p>\n\n      <bit-form-control>\n        <input type=\"checkbox\" bitCheckbox formControlName=\"dontAskAgain\" />\n        <bit-label> {{ \"dontAskFingerprintAgain\" | i18n }}</bit-label>\n      </bit-form-control>\n    </div>\n    <div bitDialogFooter>\n      <button type=\"submit\" buttonType=\"primary\" bitButton bitFormButton>\n        <span>{{ \"confirm\" | i18n }}</span>\n      </button>\n      <button bitButton bitFormButton buttonType=\"secondary\" type=\"button\" bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n    </div>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { EmergencyAccessService } from \"../../emergency-access\";\nimport { EmergencyAccessType } from \"../../emergency-access/enums/emergency-access-type\";\n\nexport type EmergencyAccessAddEditDialogData = {\n  /** display name of the account requesting emergency access */\n  name: string;\n  /** traces a unique emergency request  */\n  emergencyAccessId: string;\n  /** A boolean indicating whether the emergency access request is in read-only mode (true for view-only, false for editing). */\n  readOnly: boolean;\n};\n\nexport enum EmergencyAccessAddEditDialogResult {\n  Saved = \"saved\",\n  Canceled = \"canceled\",\n  Deleted = \"deleted\",\n}\n@Component({\n  selector: \"emergency-access-add-edit\",\n  templateUrl: \"emergency-access-add-edit.component.html\",\n})\nexport class EmergencyAccessAddEditComponent implements OnInit {\n  loading = true;\n  readOnly = false;\n  editMode = false;\n  title: string;\n  type: EmergencyAccessType = EmergencyAccessType.View;\n\n  emergencyAccessType = EmergencyAccessType;\n  waitTimes: { name: string; value: number }[];\n\n  addEditForm = this.formBuilder.group({\n    email: [\"\", [Validators.email, Validators.required]],\n    emergencyAccessType: [this.emergencyAccessType.View],\n    waitTime: [{ value: null, disabled: this.readOnly }, [Validators.required]],\n  });\n  constructor(\n    @Inject(DIALOG_DATA) protected params: EmergencyAccessAddEditDialogData,\n    private formBuilder: FormBuilder,\n    private emergencyAccessService: EmergencyAccessService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private logService: LogService,\n    private dialogRef: DialogRef<EmergencyAccessAddEditDialogResult>,\n    private toastService: ToastService,\n  ) {}\n  async ngOnInit() {\n    this.editMode = this.loading = this.params.emergencyAccessId != null;\n    this.waitTimes = [\n      { name: this.i18nService.t(\"oneDay\"), value: 1 },\n      { name: this.i18nService.t(\"days\", \"2\"), value: 2 },\n      { name: this.i18nService.t(\"days\", \"7\"), value: 7 },\n      { name: this.i18nService.t(\"days\", \"14\"), value: 14 },\n      { name: this.i18nService.t(\"days\", \"30\"), value: 30 },\n      { name: this.i18nService.t(\"days\", \"90\"), value: 90 },\n    ];\n\n    if (this.editMode) {\n      this.title = this.i18nService.t(\"editEmergencyContact\");\n      try {\n        const emergencyAccess = await this.emergencyAccessService.getEmergencyAccess(\n          this.params.emergencyAccessId,\n        );\n        this.addEditForm.patchValue({\n          email: emergencyAccess.email,\n          waitTime: emergencyAccess.waitTimeDays,\n          emergencyAccessType: emergencyAccess.type,\n        });\n      } catch (e) {\n        this.logService.error(e);\n      }\n    } else {\n      this.title = this.i18nService.t(\"inviteEmergencyContact\");\n      this.addEditForm.patchValue({ waitTime: this.waitTimes[2].value });\n    }\n\n    this.loading = false;\n  }\n\n  submit = async () => {\n    if (this.addEditForm.invalid) {\n      this.addEditForm.markAllAsTouched();\n      return;\n    }\n    try {\n      if (this.editMode) {\n        await this.emergencyAccessService.update(\n          this.params.emergencyAccessId,\n          this.addEditForm.value.emergencyAccessType,\n          this.addEditForm.value.waitTime,\n        );\n      } else {\n        await this.emergencyAccessService.invite(\n          this.addEditForm.value.email,\n          this.addEditForm.value.emergencyAccessType,\n          this.addEditForm.value.waitTime,\n        );\n      }\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\n          this.editMode ? \"editedUserId\" : \"invitedUsers\",\n          this.params.name,\n        ),\n      });\n      this.dialogRef.close(EmergencyAccessAddEditDialogResult.Saved);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  };\n\n  delete = async () => {\n    this.dialogRef.close(EmergencyAccessAddEditDialogResult.Deleted);\n  };\n  /**\n   * Strongly typed helper to open a EmergencyAccessAddEditComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open = (\n    dialogService: DialogService,\n    config: DialogConfig<EmergencyAccessAddEditDialogData>,\n  ) => {\n    return dialogService.open<EmergencyAccessAddEditDialogResult>(\n      EmergencyAccessAddEditComponent,\n      config,\n    );\n  };\n}\n","<form [formGroup]=\"addEditForm\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\" [loading]=\"loading\">\n    <span bitDialogTitle>\n      <app-premium-badge *ngIf=\"readOnly\"></app-premium-badge>\n      {{ title }}\n      <small class=\"tw-text-muted\" *ngIf=\"params.name\">{{ params.name }}</small>\n    </span>\n    <ng-container bitDialogContent>\n      <ng-container *ngIf=\"!editMode\">\n        <p bitTypography=\"body1\">{{ \"inviteEmergencyContactDesc\" | i18n }}</p>\n        <bit-form-field>\n          <bit-label>{{ \"email\" | i18n }}</bit-label>\n          <input bitInput formControlName=\"email\" />\n        </bit-form-field>\n      </ng-container>\n      <bit-radio-group formControlName=\"emergencyAccessType\" [block]=\"true\">\n        <bit-label>\n          {{ \"userAccess\" | i18n }}\n          <a\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            bitLink\n            linkType=\"primary\"\n            appA11yTitle=\"{{ 'learnMoreAboutUserAccess' | i18n }}\"\n            href=\"https://bitwarden.com/help/emergency-access/#user-access\"\n            slot=\"end\"\n          >\n            <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n          </a>\n        </bit-label>\n        <bit-radio-button id=\"emergencyTypeView\" [value]=\"emergencyAccessType.View\">\n          <bit-label>{{ \"view\" | i18n }}</bit-label>\n          <bit-hint>{{ \"viewDesc\" | i18n }}</bit-hint>\n        </bit-radio-button>\n\n        <bit-radio-button id=\"emergencyTypeTakeover\" [value]=\"emergencyAccessType.Takeover\">\n          <bit-label>{{ \"takeover\" | i18n }}</bit-label>\n          <bit-hint>{{ \"takeoverDesc\" | i18n }}</bit-hint>\n        </bit-radio-button>\n      </bit-radio-group>\n\n      <bit-form-field class=\"tw-w-1/2 tw-relative tw-px-2.5\">\n        <bit-label>{{ \"waitTime\" | i18n }}</bit-label>\n        <bit-select formControlName=\"waitTime\">\n          <bit-option *ngFor=\"let o of waitTimes\" [value]=\"o.value\" [label]=\"o.name\"></bit-option>\n        </bit-select>\n        <bit-hint class=\"tw-text-sm\">{{ \"waitTimeDesc\" | i18n }}</bit-hint>\n      </bit-form-field>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" buttonType=\"primary\" bitButton bitFormButton [disabled]=\"readOnly\">\n        {{ \"save\" | i18n }}\n      </button>\n      <button bitButton bitFormButton buttonType=\"secondary\" type=\"button\" bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitFormButton\n        class=\"tw-ml-auto\"\n        bitIconButton=\"bwi-trash\"\n        buttonType=\"danger\"\n        [bitAction]=\"delete\"\n        *ngIf=\"editMode\"\n        appA11yTitle=\"{{ 'delete' | i18n }}\"\n      ></button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, OnDestroy, OnInit, Inject, Input } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { takeUntil } from \"rxjs\";\n\nimport { ChangePasswordComponent } from \"@bitwarden/angular/auth/components/change-password.component\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KdfType, KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { EmergencyAccessService } from \"../../../emergency-access\";\n\nexport enum EmergencyAccessTakeoverResultType {\n  Done = \"done\",\n}\ntype EmergencyAccessTakeoverDialogData = {\n  /** display name of the account requesting emergency access takeover */\n  name: string;\n  /** email of the account requesting emergency access takeover */\n  email: string;\n  /** traces a unique emergency request  */\n  emergencyAccessId: string;\n};\n@Component({\n  selector: \"emergency-access-takeover\",\n  templateUrl: \"emergency-access-takeover.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessTakeoverComponent\n  extends ChangePasswordComponent\n  implements OnInit, OnDestroy\n{\n  @Input() kdf: KdfType;\n  @Input() kdfIterations: number;\n  takeoverForm = this.formBuilder.group({\n    masterPassword: [\"\", [Validators.required]],\n    masterPasswordRetype: [\"\", [Validators.required]],\n  });\n\n  constructor(\n    @Inject(DIALOG_DATA) protected params: EmergencyAccessTakeoverDialogData,\n    private formBuilder: FormBuilder,\n    i18nService: I18nService,\n    keyService: KeyService,\n    messagingService: MessagingService,\n    stateService: StateService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    platformUtilsService: PlatformUtilsService,\n    policyService: PolicyService,\n    private emergencyAccessService: EmergencyAccessService,\n    private logService: LogService,\n    dialogService: DialogService,\n    private dialogRef: DialogRef<EmergencyAccessTakeoverResultType>,\n    kdfConfigService: KdfConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    protected toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      keyService,\n      messagingService,\n      passwordGenerationService,\n      platformUtilsService,\n      policyService,\n      stateService,\n      dialogService,\n      kdfConfigService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n  }\n\n  async ngOnInit() {\n    const policies = await this.emergencyAccessService.getGrantorPolicies(\n      this.params.emergencyAccessId,\n    );\n    this.policyService\n      .masterPasswordPolicyOptions$(policies)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((enforcedPolicyOptions) => (this.enforcedPolicyOptions = enforcedPolicyOptions));\n  }\n\n  // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n  ngOnDestroy(): void {\n    super.ngOnDestroy();\n  }\n\n  submit = async () => {\n    if (this.takeoverForm.invalid) {\n      this.takeoverForm.markAllAsTouched();\n      return;\n    }\n    this.masterPassword = this.takeoverForm.get(\"masterPassword\").value;\n    this.masterPasswordRetype = this.takeoverForm.get(\"masterPasswordRetype\").value;\n    if (!(await this.strongPassword())) {\n      return;\n    }\n\n    try {\n      await this.emergencyAccessService.takeover(\n        this.params.emergencyAccessId,\n        this.masterPassword,\n        this.params.email,\n      );\n    } catch (e) {\n      this.logService.error(e);\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"unexpectedError\"),\n      });\n    }\n    this.dialogRef.close(EmergencyAccessTakeoverResultType.Done);\n  };\n  /**\n   * Strongly typed helper to open a EmergencyAccessTakeoverComponent\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param config Configuration for the dialog\n   */\n  static open = (\n    dialogService: DialogService,\n    config: DialogConfig<EmergencyAccessTakeoverDialogData>,\n  ) => {\n    return dialogService.open<EmergencyAccessTakeoverResultType>(\n      EmergencyAccessTakeoverComponent,\n      config,\n    );\n  };\n}\n","<form [formGroup]=\"takeoverForm\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"large\">\n    <span bitDialogTitle>\n      {{ \"takeover\" | i18n }}\n      <small class=\"tw-text-muted\" *ngIf=\"params.name\">{{ params.name }}</small>\n    </span>\n    <div bitDialogContent>\n      <bit-callout type=\"warning\">{{ \"loggedOutWarning\" | i18n }}</bit-callout>\n      <auth-password-callout [policy]=\"enforcedPolicyOptions\" *ngIf=\"enforcedPolicyOptions\">\n      </auth-password-callout>\n      <div class=\"tw-w-full tw-flex tw-gap-4\">\n        <div class=\"tw-relative tw-flex-1\">\n          <bit-form-field disableMargin class=\"tw-mb-2\">\n            <bit-label>{{ \"newMasterPass\" | i18n }}</bit-label>\n            <input\n              bitInput\n              type=\"password\"\n              autocomplete=\"new-password\"\n              formControlName=\"masterPassword\"\n            />\n            <button type=\"button\" bitSuffix bitIconButton bitPasswordInputToggle></button>\n          </bit-form-field>\n          <app-password-strength\n            [password]=\"takeoverForm.value.masterPassword\"\n            [email]=\"email\"\n            [showText]=\"true\"\n            (passwordStrengthResult)=\"getStrengthResult($event)\"\n          >\n          </app-password-strength>\n        </div>\n        <div class=\"tw-relative tw-flex-1\">\n          <bit-form-field disableMargin class=\"tw-mb-2\">\n            <bit-label>{{ \"confirmNewMasterPass\" | i18n }}</bit-label>\n            <input\n              bitInput\n              type=\"password\"\n              autocomplete=\"new-password\"\n              formControlName=\"masterPasswordRetype\"\n            />\n            <button type=\"button\" bitSuffix bitIconButton bitPasswordInputToggle></button>\n          </bit-form-field>\n        </div>\n      </div>\n    </div>\n    <div bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"save\" | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n    </div>\n  </bit-dialog>\n</form>\n","<app-header></app-header>\n<bit-container>\n  <bit-section>\n    <p bitTypography=\"body1\">\n      <span class=\"tw-text-main\">{{ \"emergencyAccessDesc\" | i18n }}</span>\n      <a\n        bitLink\n        href=\"https://bitwarden.com/help/emergency-access/\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n      >\n        {{ \"learnMoreAboutEmergencyAccess\" | i18n }}\n      </a>\n    </p>\n    <bit-callout *ngIf=\"isOrganizationOwner\" type=\"warning\" title=\"{{ 'warning' | i18n }}\">{{\n      \"emergencyAccessOwnerWarning\" | i18n\n    }}</bit-callout>\n  </bit-section>\n  <bit-section>\n    <div class=\"tw-flex tw-items-center tw-gap-2 tw-mb-2\">\n      <h2 bitTypography=\"h2\" noMargin class=\"tw-mb-0\">\n        {{ \"trustedEmergencyContacts\" | i18n }}\n      </h2>\n      <app-premium-badge></app-premium-badge>\n      <div class=\"tw-ml-auto tw-flex\">\n        <button\n          type=\"button\"\n          bitButton\n          buttonType=\"primary\"\n          [bitAction]=\"invite\"\n          [disabled]=\"!(canAccessPremium$ | async)\"\n        >\n          <i aria-hidden=\"true\" class=\"bwi bwi-plus bwi-fw\"></i>\n          {{ \"addEmergencyContact\" | i18n }}\n        </button>\n      </div>\n    </div>\n    <bit-table *ngIf=\"trustedContacts && trustedContacts.length\">\n      <ng-container header>\n        <tr>\n          <th bitCell>{{ \"name\" | i18n }}</th>\n          <th bitCell>{{ \"accessLevel\" | i18n }}</th>\n          <th bitCell class=\"tw-text-right\">{{ \"options\" | i18n }}</th>\n        </tr>\n      </ng-container>\n      <ng-template body>\n        <tr bitRow *ngFor=\"let c of trustedContacts; let i = index\">\n          <td bitCell class=\"tw-flex tw-items-center tw-gap-4\">\n            <bit-avatar\n              [text]=\"c | userName\"\n              [id]=\"c.granteeId\"\n              [color]=\"c.avatarColor\"\n              size=\"small\"\n            ></bit-avatar>\n            <span>\n              <a bitLink href=\"#\" appStopClick (click)=\"edit(c)\">{{ c.email }}</a>\n              <span\n                bitBadge\n                variant=\"secondary\"\n                *ngIf=\"c.status === emergencyAccessStatusType.Invited\"\n                >{{ \"invited\" | i18n }}</span\n              >\n              <span\n                bitBadge\n                variant=\"warning\"\n                *ngIf=\"c.status === emergencyAccessStatusType.Accepted\"\n                >{{ \"needsConfirmation\" | i18n }}</span\n              >\n              <span\n                bitBadge\n                variant=\"warning\"\n                *ngIf=\"c.status === emergencyAccessStatusType.RecoveryInitiated\"\n                >{{ \"emergencyAccessRecoveryInitiated\" | i18n }}</span\n              >\n              <span bitBadge *ngIf=\"c.status === emergencyAccessStatusType.RecoveryApproved\">{{\n                \"emergencyAccessRecoveryApproved\" | i18n\n              }}</span>\n\n              <small class=\"tw-text-muted tw-block\" *ngIf=\"c.name\">{{ c.name }}</small>\n            </span>\n          </td>\n          <td bitCell>\n            <span bitBadge *ngIf=\"c.type === emergencyAccessType.View\">{{ \"view\" | i18n }}</span>\n            <span bitBadge *ngIf=\"c.type === emergencyAccessType.Takeover\">{{\n              \"takeover\" | i18n\n            }}</span>\n          </td>\n          <td bitCell class=\"tw-text-right\">\n            <button\n              [bitMenuTriggerFor]=\"trustedContactOptions\"\n              type=\"button\"\n              appA11yTitle=\"{{ 'options' | i18n }}\"\n              bitIconButton=\"bwi-ellipsis-v\"\n              buttonType=\"main\"\n            ></button>\n            <bit-menu #trustedContactOptions>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"c.status === emergencyAccessStatusType.Invited\"\n                (click)=\"reinvite(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-envelope\" aria-hidden=\"true\"></i>\n                {{ \"resendInvitation\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"c.status === emergencyAccessStatusType.Accepted\"\n                (click)=\"confirm(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-check\" aria-hidden=\"true\"></i>\n                {{ \"confirm\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"c.status === emergencyAccessStatusType.RecoveryInitiated\"\n                (click)=\"approve(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-check\" aria-hidden=\"true\"></i>\n                {{ \"approve\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"\n                  c.status === emergencyAccessStatusType.RecoveryInitiated ||\n                  c.status === emergencyAccessStatusType.RecoveryApproved\n                \"\n                (click)=\"reject(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-close\" aria-hidden=\"true\"></i>\n                {{ \"reject\" | i18n }}\n              </button>\n              <button type=\"button\" bitMenuItem (click)=\"remove(c)\">\n                <i class=\"bwi bwi-fw bwi-close\" aria-hidden=\"true\"></i>\n                {{ \"remove\" | i18n }}\n              </button>\n            </bit-menu>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n    <ng-container *ngIf=\"!trustedContacts || !trustedContacts.length\">\n      <p bitTypography=\"body1\" class=\"tw-mt-2\" *ngIf=\"loaded\">{{ \"noTrustedContacts\" | i18n }}</p>\n      <ng-container *ngIf=\"!loaded\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </ng-container>\n    </ng-container>\n  </bit-section>\n\n  <bit-section>\n    <h2 bitTypography=\"h2\">{{ \"designatedEmergencyContacts\" | i18n }}</h2>\n\n    <bit-table *ngIf=\"grantedContacts && grantedContacts.length\">\n      <ng-container header>\n        <tr>\n          <th bitCell>{{ \"name\" | i18n }}</th>\n          <th bitCell>{{ \"accessLevel\" | i18n }}</th>\n          <th bitCell class=\"tw-text-right\">{{ \"options\" | i18n }}</th>\n        </tr>\n      </ng-container>\n      <ng-template body>\n        <tr bitRow *ngFor=\"let c of grantedContacts; let i = index\">\n          <td bitCell class=\"tw-flex tw-items-center tw-gap-4\">\n            <bit-avatar\n              [text]=\"c | userName\"\n              [id]=\"c.grantorId\"\n              [color]=\"c.avatarColor\"\n              size=\"small\"\n            ></bit-avatar>\n            <span>\n              <span>{{ c.email }}</span>\n              <span bitBadge *ngIf=\"c.status === emergencyAccessStatusType.Invited\">{{\n                \"invited\" | i18n\n              }}</span>\n              <span\n                bitBadge\n                variant=\"warning\"\n                *ngIf=\"c.status === emergencyAccessStatusType.Accepted\"\n                >{{ \"needsConfirmation\" | i18n }}</span\n              >\n              <span\n                bitBadge\n                variant=\"warning\"\n                *ngIf=\"c.status === emergencyAccessStatusType.RecoveryInitiated\"\n                >{{ \"emergencyAccessRecoveryInitiated\" | i18n }}</span\n              >\n              <span\n                bitBadge\n                variant=\"success\"\n                *ngIf=\"c.status === emergencyAccessStatusType.RecoveryApproved\"\n                >{{ \"emergencyAccessRecoveryApproved\" | i18n }}</span\n              >\n\n              <small class=\"tw-text-muted tw-block\" *ngIf=\"c.name\">{{ c.name }}</small>\n            </span>\n          </td>\n          <td bitCell>\n            <span bitBadge *ngIf=\"c.type === emergencyAccessType.View\">{{ \"view\" | i18n }}</span>\n            <span bitBadge *ngIf=\"c.type === emergencyAccessType.Takeover\">{{\n              \"takeover\" | i18n\n            }}</span>\n          </td>\n          <td bitCell class=\"tw-text-right\">\n            <button\n              [bitMenuTriggerFor]=\"grantedContactOptions\"\n              type=\"button\"\n              appA11yTitle=\"{{ 'options' | i18n }}\"\n              bitIconButton=\"bwi-ellipsis-v\"\n              buttonType=\"main\"\n            ></button>\n            <bit-menu #grantedContactOptions>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"c.status === emergencyAccessStatusType.Confirmed\"\n                (click)=\"requestAccess(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-envelope\" aria-hidden=\"true\"></i>\n                {{ \"requestAccess\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"\n                  c.status === emergencyAccessStatusType.RecoveryApproved &&\n                  c.type === emergencyAccessType.Takeover\n                \"\n                (click)=\"takeover(c)\"\n              >\n                <i class=\"bwi bwi-fw bwi-key\" aria-hidden=\"true\"></i>\n                {{ \"takeover\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                *ngIf=\"\n                  c.status === emergencyAccessStatusType.RecoveryApproved &&\n                  c.type === emergencyAccessType.View\n                \"\n                [routerLink]=\"c.id\"\n              >\n                <i class=\"bwi bwi-fw bwi-eye\" aria-hidden=\"true\"></i>\n                {{ \"view\" | i18n }}\n              </button>\n              <button type=\"button\" bitMenuItem (click)=\"remove(c)\">\n                <i class=\"bwi bwi-fw bwi-close\" aria-hidden=\"true\"></i>\n                {{ \"remove\" | i18n }}\n              </button>\n            </bit-menu>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n    <ng-container *ngIf=\"!grantedContacts || !grantedContacts.length\">\n      <p bitTypography=\"body1\" *ngIf=\"loaded\">{{ \"noGrantedAccess\" | i18n }}</p>\n      <ng-container *ngIf=\"!loaded\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </ng-container>\n    </ng-container>\n  </bit-section>\n</bit-container>\n\n<ng-template #addEdit></ng-template>\n<ng-template #takeoverTemplate></ng-template>\n<ng-template #confirmTemplate></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { lastValueFrom, Observable, firstValueFrom, switchMap } from \"rxjs\";\n\nimport { UserNamePipe } from \"@bitwarden/angular/pipes/user-name.pipe\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationManagementPreferencesService } from \"@bitwarden/common/admin-console/abstractions/organization-management-preferences/organization-management-preferences.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport { EmergencyAccessService } from \"../../emergency-access\";\nimport { EmergencyAccessStatusType } from \"../../emergency-access/enums/emergency-access-status-type\";\nimport { EmergencyAccessType } from \"../../emergency-access/enums/emergency-access-type\";\nimport {\n  GranteeEmergencyAccess,\n  GrantorEmergencyAccess,\n} from \"../../emergency-access/models/emergency-access\";\n\nimport {\n  EmergencyAccessConfirmComponent,\n  EmergencyAccessConfirmDialogResult,\n} from \"./confirm/emergency-access-confirm.component\";\nimport {\n  EmergencyAccessAddEditComponent,\n  EmergencyAccessAddEditDialogResult,\n} from \"./emergency-access-add-edit.component\";\nimport {\n  EmergencyAccessTakeoverComponent,\n  EmergencyAccessTakeoverResultType,\n} from \"./takeover/emergency-access-takeover.component\";\n\n@Component({\n  selector: \"emergency-access\",\n  templateUrl: \"emergency-access.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessComponent implements OnInit {\n  @ViewChild(\"addEdit\", { read: ViewContainerRef, static: true }) addEditModalRef: ViewContainerRef;\n  @ViewChild(\"takeoverTemplate\", { read: ViewContainerRef, static: true })\n  takeoverModalRef: ViewContainerRef;\n  @ViewChild(\"confirmTemplate\", { read: ViewContainerRef, static: true })\n  confirmModalRef: ViewContainerRef;\n\n  loaded = false;\n  canAccessPremium$: Observable<boolean>;\n  trustedContacts: GranteeEmergencyAccess[];\n  grantedContacts: GrantorEmergencyAccess[];\n  emergencyAccessType = EmergencyAccessType;\n  emergencyAccessStatusType = EmergencyAccessStatusType;\n  actionPromise: Promise<any>;\n  isOrganizationOwner: boolean;\n\n  constructor(\n    private emergencyAccessService: EmergencyAccessService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private messagingService: MessagingService,\n    private userNamePipe: UserNamePipe,\n    private logService: LogService,\n    private stateService: StateService,\n    private organizationService: OrganizationService,\n    protected dialogService: DialogService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected organizationManagementPreferencesService: OrganizationManagementPreferencesService,\n    private toastService: ToastService,\n    private apiService: ApiService,\n    private accountService: AccountService,\n  ) {\n    this.canAccessPremium$ = this.accountService.activeAccount$.pipe(\n      switchMap((account) =>\n        billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n      ),\n    );\n  }\n\n  async ngOnInit() {\n    const orgs = await this.organizationService.getAll();\n    this.isOrganizationOwner = orgs.some((o) => o.isOwner);\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.load();\n  }\n\n  async load() {\n    this.trustedContacts = await this.emergencyAccessService.getEmergencyAccessTrusted();\n    this.grantedContacts = await this.emergencyAccessService.getEmergencyAccessGranted();\n    this.loaded = true;\n  }\n\n  async premiumRequired() {\n    const canAccessPremium = await firstValueFrom(this.canAccessPremium$);\n\n    if (!canAccessPremium) {\n      this.messagingService.send(\"premiumRequired\");\n      return;\n    }\n  }\n\n  edit = async (details: GranteeEmergencyAccess) => {\n    const canAccessPremium = await firstValueFrom(this.canAccessPremium$);\n    const dialogRef = EmergencyAccessAddEditComponent.open(this.dialogService, {\n      data: {\n        name: this.userNamePipe.transform(details),\n        emergencyAccessId: details?.id,\n        readOnly: !canAccessPremium,\n      },\n    });\n\n    const result = await lastValueFrom(dialogRef.closed);\n    if (result === EmergencyAccessAddEditDialogResult.Saved) {\n      await this.load();\n    } else if (result === EmergencyAccessAddEditDialogResult.Deleted) {\n      await this.remove(details);\n    }\n  };\n\n  invite = async () => {\n    await this.edit(null);\n  };\n\n  async reinvite(contact: GranteeEmergencyAccess) {\n    if (this.actionPromise != null) {\n      return;\n    }\n    this.actionPromise = this.emergencyAccessService.reinvite(contact.id);\n    await this.actionPromise;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"hasBeenReinvited\", contact.email),\n    });\n    this.actionPromise = null;\n  }\n\n  async confirm(contact: GranteeEmergencyAccess) {\n    function updateUser() {\n      contact.status = EmergencyAccessStatusType.Confirmed;\n    }\n\n    if (this.actionPromise != null) {\n      return;\n    }\n\n    const publicKeyResponse = await this.apiService.getUserPublicKey(contact.granteeId);\n    const publicKey = Utils.fromB64ToArray(publicKeyResponse.publicKey);\n\n    const autoConfirm = await firstValueFrom(\n      this.organizationManagementPreferencesService.autoConfirmFingerPrints.state$,\n    );\n    if (autoConfirm == null || !autoConfirm) {\n      const dialogRef = EmergencyAccessConfirmComponent.open(this.dialogService, {\n        data: {\n          name: this.userNamePipe.transform(contact),\n          emergencyAccessId: contact.id,\n          userId: contact?.granteeId,\n          publicKey,\n        },\n      });\n      const result = await lastValueFrom(dialogRef.closed);\n      if (result === EmergencyAccessConfirmDialogResult.Confirmed) {\n        await this.emergencyAccessService.confirm(contact.id, contact.granteeId, publicKey);\n        updateUser();\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(contact)),\n        });\n      }\n      return;\n    }\n\n    this.actionPromise = this.emergencyAccessService.confirm(\n      contact.id,\n      contact.granteeId,\n      publicKey,\n    );\n    await this.actionPromise;\n    updateUser();\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"hasBeenConfirmed\", this.userNamePipe.transform(contact)),\n    });\n    this.actionPromise = null;\n  }\n\n  async remove(details: GranteeEmergencyAccess | GrantorEmergencyAccess) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.userNamePipe.transform(details),\n      content: { key: \"removeUserConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      await this.emergencyAccessService.delete(details.id);\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"removedUserId\", this.userNamePipe.transform(details)),\n      });\n\n      if (details instanceof GranteeEmergencyAccess) {\n        this.removeGrantee(details);\n      } else {\n        this.removeGrantor(details);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async requestAccess(details: GrantorEmergencyAccess) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.userNamePipe.transform(details),\n      content: {\n        key: \"requestAccessConfirmation\",\n        placeholders: [details.waitTimeDays.toString()],\n      },\n      acceptButtonText: { key: \"requestAccess\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    await this.emergencyAccessService.requestAccess(details.id);\n\n    details.status = EmergencyAccessStatusType.RecoveryInitiated;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"requestSent\", this.userNamePipe.transform(details)),\n    });\n  }\n\n  async approve(details: GranteeEmergencyAccess) {\n    const type = this.i18nService.t(\n      details.type === EmergencyAccessType.View ? \"view\" : \"takeover\",\n    );\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: this.userNamePipe.transform(details),\n      content: {\n        key: \"approveAccessConfirmation\",\n        placeholders: [this.userNamePipe.transform(details), type],\n      },\n      acceptButtonText: { key: \"approve\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    await this.emergencyAccessService.approve(details.id);\n    details.status = EmergencyAccessStatusType.RecoveryApproved;\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"emergencyApproved\", this.userNamePipe.transform(details)),\n    });\n  }\n\n  async reject(details: GranteeEmergencyAccess) {\n    await this.emergencyAccessService.reject(details.id);\n    details.status = EmergencyAccessStatusType.Confirmed;\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"emergencyRejected\", this.userNamePipe.transform(details)),\n    });\n  }\n\n  takeover = async (details: GrantorEmergencyAccess) => {\n    const dialogRef = EmergencyAccessTakeoverComponent.open(this.dialogService, {\n      data: {\n        name: this.userNamePipe.transform(details),\n        email: details.email,\n        emergencyAccessId: details.id ?? null,\n      },\n    });\n    const result = await lastValueFrom(dialogRef.closed);\n    if (result === EmergencyAccessTakeoverResultType.Done) {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"passwordResetFor\", this.userNamePipe.transform(details)),\n      });\n    }\n  };\n\n  private removeGrantee(details: GranteeEmergencyAccess) {\n    const index = this.trustedContacts.indexOf(details);\n    if (index > -1) {\n      this.trustedContacts.splice(index, 1);\n    }\n  }\n\n  private removeGrantor(details: GrantorEmergencyAccess) {\n    const index = this.grantedContacts.indexOf(details);\n    if (index > -1) {\n      this.grantedContacts.splice(index, 1);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Directive()\nexport class AttachmentsComponent implements OnInit {\n  @Input() cipherId: string;\n  @Input() viewOnly: boolean;\n  @Output() onUploadedAttachment = new EventEmitter();\n  @Output() onDeletedAttachment = new EventEmitter();\n  @Output() onReuploadedAttachment = new EventEmitter();\n\n  cipher: CipherView;\n  cipherDomain: Cipher;\n  canAccessAttachments: boolean;\n  formPromise: Promise<any>;\n  deletePromises: { [id: string]: Promise<any> } = {};\n  reuploadPromises: { [id: string]: Promise<any> } = {};\n  emergencyAccessId?: string = null;\n  protected componentName = \"\";\n\n  constructor(\n    protected cipherService: CipherService,\n    protected i18nService: I18nService,\n    protected keyService: KeyService,\n    protected encryptService: EncryptService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected apiService: ApiService,\n    protected win: Window,\n    protected logService: LogService,\n    protected stateService: StateService,\n    protected fileDownloadService: FileDownloadService,\n    protected dialogService: DialogService,\n    protected billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    await this.init();\n  }\n\n  async submit() {\n    const fileEl = document.getElementById(\"file\") as HTMLInputElement;\n    const files = fileEl.files;\n    if (files == null || files.length === 0) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"selectFile\"),\n      );\n      return;\n    }\n\n    if (files[0].size > 524288000) {\n      // 500 MB\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"maxFileSize\"),\n      );\n      return;\n    }\n\n    try {\n      const activeUserId = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n      );\n      this.formPromise = this.saveCipherAttachment(files[0], activeUserId);\n      this.cipherDomain = await this.formPromise;\n      this.cipher = await this.cipherDomain.decrypt(\n        await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain, activeUserId),\n      );\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"attachmentSaved\"));\n      this.onUploadedAttachment.emit();\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    // reset file input\n    // ref: https://stackoverflow.com/a/20552042\n    fileEl.type = \"\";\n    fileEl.type = \"file\";\n    fileEl.value = \"\";\n  }\n\n  async delete(attachment: AttachmentView) {\n    if (this.deletePromises[attachment.id] != null) {\n      return;\n    }\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteAttachment\" },\n      content: { key: \"deleteAttachmentConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      this.deletePromises[attachment.id] = this.deleteCipherAttachment(attachment.id);\n      await this.deletePromises[attachment.id];\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deletedAttachment\"));\n      const i = this.cipher.attachments.indexOf(attachment);\n      if (i > -1) {\n        this.cipher.attachments.splice(i, 1);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    this.deletePromises[attachment.id] = null;\n    this.onDeletedAttachment.emit();\n  }\n\n  async download(attachment: AttachmentView) {\n    const a = attachment as any;\n    if (a.downloading) {\n      return;\n    }\n\n    if (!this.canAccessAttachments) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"premiumRequired\"),\n        this.i18nService.t(\"premiumRequiredDesc\"),\n      );\n      return;\n    }\n\n    let url: string;\n    try {\n      const attachmentDownloadResponse = await this.apiService.getAttachmentData(\n        this.cipher.id,\n        attachment.id,\n        this.emergencyAccessId,\n      );\n      url = attachmentDownloadResponse.url;\n    } catch (e) {\n      if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {\n        url = attachment.url;\n      } else if (e instanceof ErrorResponse) {\n        throw new Error((e as ErrorResponse).getSingleMessage());\n      } else {\n        throw e;\n      }\n    }\n\n    a.downloading = true;\n    const response = await fetch(new Request(url, { cache: \"no-store\" }));\n    if (response.status !== 200) {\n      this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n      a.downloading = false;\n      return;\n    }\n\n    try {\n      const encBuf = await EncArrayBuffer.fromResponse(response);\n      const key =\n        attachment.key != null\n          ? attachment.key\n          : await this.keyService.getOrgKey(this.cipher.organizationId);\n      const decBuf = await this.encryptService.decryptToBytes(encBuf, key);\n      this.fileDownloadService.download({\n        fileName: attachment.fileName,\n        blobData: decBuf,\n      });\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"fileSavedToDevice\"),\n      });\n    } catch (e) {\n      this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n    }\n\n    a.downloading = false;\n  }\n\n  protected async init() {\n    this.cipherDomain = await this.loadCipher();\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    this.cipher = await this.cipherDomain.decrypt(\n      await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain, activeUserId),\n    );\n\n    const canAccessPremium = await firstValueFrom(\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(activeUserId),\n    );\n    this.canAccessAttachments = canAccessPremium || this.cipher.organizationId != null;\n\n    if (!this.canAccessAttachments) {\n      const confirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"premiumRequired\" },\n        content: { key: \"premiumRequiredDesc\" },\n        acceptButtonText: { key: \"learnMore\" },\n        type: \"success\",\n      });\n\n      if (confirmed) {\n        this.platformUtilsService.launchUri(\n          \"https://vault.bitwarden.com/#/settings/subscription/premium\",\n        );\n      }\n    }\n  }\n\n  protected async reuploadCipherAttachment(attachment: AttachmentView, admin: boolean) {\n    const a = attachment as any;\n    if (attachment.key != null || a.downloading || this.reuploadPromises[attachment.id] != null) {\n      return;\n    }\n\n    try {\n      this.reuploadPromises[attachment.id] = Promise.resolve().then(async () => {\n        // 1. Download\n        a.downloading = true;\n        const response = await fetch(new Request(attachment.url, { cache: \"no-store\" }));\n        if (response.status !== 200) {\n          this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n          a.downloading = false;\n          return;\n        }\n\n        try {\n          // 2. Resave\n          const encBuf = await EncArrayBuffer.fromResponse(response);\n          const key =\n            attachment.key != null\n              ? attachment.key\n              : await this.keyService.getOrgKey(this.cipher.organizationId);\n          const decBuf = await this.encryptService.decryptToBytes(encBuf, key);\n          const activeUserId = await firstValueFrom(\n            this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n          );\n          this.cipherDomain = await this.cipherService.saveAttachmentRawWithServer(\n            this.cipherDomain,\n            attachment.fileName,\n            decBuf,\n            activeUserId,\n            admin,\n          );\n          this.cipher = await this.cipherDomain.decrypt(\n            await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain, activeUserId),\n          );\n\n          // 3. Delete old\n          this.deletePromises[attachment.id] = this.deleteCipherAttachment(attachment.id);\n          await this.deletePromises[attachment.id];\n          const foundAttachment = this.cipher.attachments.filter((a2) => a2.id === attachment.id);\n          if (foundAttachment.length > 0) {\n            const i = this.cipher.attachments.indexOf(foundAttachment[0]);\n            if (i > -1) {\n              this.cipher.attachments.splice(i, 1);\n            }\n          }\n\n          this.platformUtilsService.showToast(\n            \"success\",\n            null,\n            this.i18nService.t(\"attachmentSaved\"),\n          );\n          this.onReuploadedAttachment.emit();\n        } catch (e) {\n          this.platformUtilsService.showToast(\"error\", null, this.i18nService.t(\"errorOccurred\"));\n        }\n\n        a.downloading = false;\n      });\n      await this.reuploadPromises[attachment.id];\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  protected loadCipher() {\n    return this.cipherService.get(this.cipherId);\n  }\n\n  protected saveCipherAttachment(file: File, userId: UserId) {\n    return this.cipherService.saveAttachmentWithServer(this.cipherDomain, file, userId);\n  }\n\n  protected deleteCipherAttachment(attachmentId: string) {\n    return this.cipherService.deleteAttachmentWithServer(this.cipher.id, attachmentId);\n  }\n\n  protected async reupload(attachment: AttachmentView) {\n    // TODO: This should be removed but is needed since we re-use the same template\n  }\n}\n","<div class=\"modal fade\" role=\"dialog\" aria-modal=\"true\" aria-labelledby=\"attachmentsTitle\">\n  <div class=\"modal-dialog modal-dialog-scrollable\" role=\"document\">\n    <form\n      class=\"modal-content\"\n      #form\n      (ngSubmit)=\"submit()\"\n      [appApiAction]=\"formPromise\"\n      ngNativeValidate\n    >\n      <div class=\"modal-header\">\n        <h1 class=\"modal-title\" id=\"attachmentsTitle\">\n          {{ \"attachments\" | i18n }}\n          <small *ngIf=\"cipher\">{{ cipher.name }}</small>\n        </h1>\n        <button\n          type=\"button\"\n          class=\"close\"\n          data-dismiss=\"modal\"\n          appA11yTitle=\"{{ 'close' | i18n }}\"\n        >\n          <span aria-hidden=\"true\">&times;</span>\n        </button>\n      </div>\n      <div class=\"modal-body\">\n        <table class=\"table table-hover table-list\" *ngIf=\"cipher && cipher.hasAttachments\">\n          <tbody>\n            <tr *ngFor=\"let a of cipher.attachments\">\n              <td class=\"table-list-icon\">\n                <i\n                  class=\"bwi bwi-fw bwi-lg bwi-file\"\n                  *ngIf=\"!$any(a).downloading\"\n                  aria-hidden=\"true\"\n                ></i>\n                <i\n                  class=\"bwi bwi-spinner bwi-lg bwi-fw bwi-spin\"\n                  *ngIf=\"$any(a).downloading\"\n                  aria-hidden=\"true\"\n                ></i>\n              </td>\n              <td class=\"wrap\">\n                <div class=\"d-flex\">\n                  <a href=\"#\" appStopClick (click)=\"download(a)\">{{ a.fileName }}</a>\n                  <div *ngIf=\"showFixOldAttachments(a)\" class=\"ml-2\">\n                    <a\n                      href=\"https://bitwarden.com/help/attachments/#fixing-old-attachments\"\n                      target=\"_blank\"\n                      rel=\"noreferrer\"\n                    >\n                      <i\n                        class=\"bwi bwi-exclamation-triangle text-warning\"\n                        title=\"{{ 'attachmentFixDescription' | i18n }}\"\n                        aria-hidden=\"true\"\n                      ></i>\n                      <span class=\"tw-sr-only\">{{ \"attachmentFixDescription\" | i18n }}</span></a\n                    >\n                    <button\n                      type=\"button\"\n                      class=\"btn btn-outline-primary btn-sm m-0 py-0 px-2\"\n                      (click)=\"reupload(a)\"\n                      #reuploadBtn\n                      [appApiAction]=\"reuploadPromises[a.id]\"\n                      [disabled]=\"$any(reuploadBtn).loading\"\n                    >\n                      {{ \"fix\" | i18n }}\n                    </button>\n                  </div>\n                </div>\n                <small>{{ a.sizeName }}</small>\n              </td>\n              <td class=\"table-list-options\" *ngIf=\"!viewOnly\">\n                <button\n                  class=\"btn btn-outline-danger\"\n                  type=\"button\"\n                  appStopClick\n                  appA11yTitle=\"{{ 'delete' | i18n }}\"\n                  (click)=\"delete(a)\"\n                  #deleteBtn\n                  [appApiAction]=\"deletePromises[a.id]\"\n                  [disabled]=\"$any(deleteBtn).loading\"\n                >\n                  <i\n                    class=\"bwi bwi-trash bwi-lg bwi-fw\"\n                    [hidden]=\"$any(deleteBtn).loading\"\n                    aria-hidden=\"true\"\n                  ></i>\n                  <i\n                    class=\"bwi bwi-spinner bwi-spin bwi-lg bwi-fw\"\n                    [hidden]=\"!$any(deleteBtn).loading\"\n                    title=\"{{ 'loading' | i18n }}\"\n                    aria-hidden=\"true\"\n                  ></i>\n                </button>\n              </td>\n            </tr>\n          </tbody>\n        </table>\n        <div *ngIf=\"!viewOnly\">\n          <h3>{{ \"newAttachment\" | i18n }}</h3>\n          <label for=\"file\" class=\"tw-sr-only\">{{ \"file\" | i18n }}</label>\n          <input type=\"file\" id=\"file\" class=\"form-control-file\" name=\"file\" required />\n          <small class=\"form-text text-muted\">{{ \"maxFileSize\" | i18n }}</small>\n        </div>\n      </div>\n      <div class=\"modal-footer\">\n        <button\n          type=\"submit\"\n          class=\"btn btn-primary btn-submit\"\n          [disabled]=\"form.loading\"\n          *ngIf=\"!viewOnly\"\n        >\n          <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n          <span>{{ \"save\" | i18n }}</span>\n        </button>\n        <button type=\"button\" class=\"btn btn-outline-secondary\" data-dismiss=\"modal\">\n          {{ \"close\" | i18n }}\n        </button>\n      </div>\n    </form>\n  </div>\n</div>\n","import { Component } from \"@angular/core\";\n\nimport { AttachmentsComponent as BaseAttachmentsComponent } from \"@bitwarden/angular/vault/components/attachments.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"emergency-access-attachments\",\n  templateUrl: \"../../../../vault/individual-vault/attachments.component.html\",\n})\nexport class EmergencyAccessAttachmentsComponent extends BaseAttachmentsComponent {\n  viewOnly = true;\n  canAccessAttachments = true;\n\n  constructor(\n    cipherService: CipherService,\n    i18nService: I18nService,\n    keyService: KeyService,\n    encryptService: EncryptService,\n    stateService: StateService,\n    platformUtilsService: PlatformUtilsService,\n    apiService: ApiService,\n    logService: LogService,\n    fileDownloadService: FileDownloadService,\n    dialogService: DialogService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      cipherService,\n      i18nService,\n      keyService,\n      encryptService,\n      platformUtilsService,\n      apiService,\n      window,\n      logService,\n      stateService,\n      fileDownloadService,\n      dialogService,\n      billingAccountProfileStateService,\n      accountService,\n      toastService,\n    );\n  }\n\n  protected async init() {\n    // Do nothing since cipher is already decoded\n  }\n\n  protected showFixOldAttachments(attachment: AttachmentView) {\n    return false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"../../../../vault/individual-vault/add-edit.component\";\n\n@Component({\n  selector: \"app-org-vault-add-edit\",\n  templateUrl: \"../../../../vault/individual-vault/add-edit.component.html\",\n})\nexport class EmergencyAddEditCipherComponent extends BaseAddEditComponent implements OnInit {\n  originalCipher: Cipher = null;\n  viewOnly = true;\n  protected override componentName = \"app-org-vault-add-edit\";\n\n  constructor(\n    cipherService: CipherService,\n    folderService: FolderService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    auditService: AuditService,\n    accountService: AccountService,\n    collectionService: CollectionService,\n    totpService: TotpService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    messagingService: MessagingService,\n    eventCollectionService: EventCollectionService,\n    policyService: PolicyService,\n    passwordRepromptService: PasswordRepromptService,\n    organizationService: OrganizationService,\n    logService: LogService,\n    dialogService: DialogService,\n    datePipe: DatePipe,\n    configService: ConfigService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    cipherAuthorizationService: CipherAuthorizationService,\n    toastService: ToastService,\n    sdkService: SdkService,\n  ) {\n    super(\n      cipherService,\n      folderService,\n      i18nService,\n      platformUtilsService,\n      auditService,\n      accountService,\n      collectionService,\n      totpService,\n      passwordGenerationService,\n      messagingService,\n      eventCollectionService,\n      policyService,\n      organizationService,\n      logService,\n      passwordRepromptService,\n      dialogService,\n      datePipe,\n      configService,\n      billingAccountProfileStateService,\n      cipherAuthorizationService,\n      toastService,\n      sdkService,\n    );\n  }\n\n  async load() {\n    this.title = this.i18nService.t(\"viewItem\");\n  }\n\n  async ngOnInit(): Promise<void> {\n    await super.ngOnInit();\n    // The base component `ngOnInit` calculates the `viewOnly` property based on cipher properties\n    // In the case of emergency access, `viewOnly` should always be true, set it manually here after\n    // the base `ngOnInit` is complete.\n    this.viewOnly = true;\n  }\n\n  protected async loadCipher() {\n    return Promise.resolve(this.originalCipher);\n  }\n}\n","import { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PremiumUpgradePromptService } from \"@bitwarden/common/vault/abstractions/premium-upgrade-prompt.service\";\nimport { ViewPasswordHistoryService } from \"@bitwarden/common/vault/abstractions/view-password-history.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { ButtonModule, DialogModule, DialogService } from \"@bitwarden/components\";\nimport { CipherViewComponent } from \"@bitwarden/vault\";\n\nimport { WebViewPasswordHistoryService } from \"../../../../vault/services/web-view-password-history.service\";\n\nexport interface EmergencyViewDialogParams {\n  /** The cipher being viewed. */\n  cipher: CipherView;\n}\n\n/** Stubbed class, premium upgrade is not applicable for emergency viewing */\nclass PremiumUpgradePromptNoop implements PremiumUpgradePromptService {\n  async promptForPremium() {\n    return Promise.resolve();\n  }\n}\n\n@Component({\n  selector: \"app-emergency-view-dialog\",\n  templateUrl: \"emergency-view-dialog.component.html\",\n  standalone: true,\n  imports: [ButtonModule, CipherViewComponent, DialogModule, CommonModule, JslibModule],\n  providers: [\n    { provide: ViewPasswordHistoryService, useClass: WebViewPasswordHistoryService },\n    { provide: PremiumUpgradePromptService, useClass: PremiumUpgradePromptNoop },\n  ],\n})\nexport class EmergencyViewDialogComponent {\n  /**\n   * The title of the dialog. Updates based on the cipher type.\n   * @protected\n   */\n  protected title: string = \"\";\n\n  constructor(\n    @Inject(DIALOG_DATA) protected params: EmergencyViewDialogParams,\n    private dialogRef: DialogRef,\n    private i18nService: I18nService,\n  ) {\n    this.updateTitle();\n  }\n\n  get cipher(): CipherView {\n    return this.params.cipher;\n  }\n\n  cancel = () => {\n    this.dialogRef.close();\n  };\n\n  private updateTitle() {\n    const partOne = \"viewItemType\";\n\n    const type = this.cipher.type;\n\n    switch (type) {\n      case CipherType.Login:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeLogin\").toLowerCase());\n        break;\n      case CipherType.Card:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeCard\").toLowerCase());\n        break;\n      case CipherType.Identity:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"typeIdentity\").toLowerCase());\n        break;\n      case CipherType.SecureNote:\n        this.title = this.i18nService.t(partOne, this.i18nService.t(\"note\").toLowerCase());\n        break;\n    }\n  }\n\n  /**\n   * Opens the EmergencyViewDialog.\n   */\n  static open(dialogService: DialogService, params: EmergencyViewDialogParams) {\n    return dialogService.open<EmergencyViewDialogParams>(EmergencyViewDialogComponent, {\n      data: params,\n    });\n  }\n}\n","<bit-dialog dialogSize=\"large\" background=\"alt\" #dialog>\n  <span bitDialogTitle aria-live=\"polite\">\n    {{ title }}\n  </span>\n  <div bitDialogContent #dialogContent>\n    <app-cipher-view [cipher]=\"cipher\"></app-cipher-view>\n  </div>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"cancel()\">\n      {{ \"cancel\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","<h1 bitTypography=\"h1\">{{ \"vault\" | i18n }}</h1>\n\n<div class=\"tw-mt-6\">\n  <ng-container *ngIf=\"ciphers.length\">\n    <bit-table>\n      <ng-template body>\n        <tr bitRow *ngFor=\"let currentCipher of ciphers\">\n          <td bitCell>\n            <app-vault-icon [cipher]=\"currentCipher\"></app-vault-icon>\n          </td>\n          <td bitCell class=\"tw-w-full\">\n            <a\n              bitLink\n              href=\"#\"\n              appStopClick\n              (click)=\"selectCipher(currentCipher)\"\n              title=\"{{ 'editItem' | i18n }}\"\n              >{{ currentCipher.name }}</a\n            >\n            <ng-container *ngIf=\"currentCipher.organizationId\">\n              <i\n                class=\"bwi bwi-collection\"\n                appStopProp\n                title=\"{{ 'shared' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"shared\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"currentCipher.hasAttachments\">\n              <i\n                class=\"bwi bwi-paperclip\"\n                appStopProp\n                title=\"{{ 'attachments' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"attachments\" | i18n }}</span>\n            </ng-container>\n            <br />\n            <small class=\"tw-text-xs\">{{ currentCipher.subTitle }}</small>\n          </td>\n          <td bitCell>\n            <div *ngIf=\"currentCipher.hasAttachments\">\n              <button\n                [bitMenuTriggerFor]=\"optionsMenu\"\n                type=\"button\"\n                buttonType=\"main\"\n                bitIconButton=\"bwi-ellipsis-v\"\n                appA11yTitle=\"{{ 'options' | i18n }}\"\n              ></button>\n              <bit-menu #optionsMenu>\n                <button\n                  type=\"button\"\n                  bitMenuItem\n                  appStopClick\n                  (click)=\"viewAttachments(currentCipher)\"\n                >\n                  <i class=\"bwi bwi-fw bwi-paperclip\" aria-hidden=\"true\"></i>\n                  {{ \"attachments\" | i18n }}\n                </button>\n              </bit-menu>\n            </div>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n  </ng-container>\n  <ng-container *ngIf=\"!loaded\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </ng-container>\n</div>\n<ng-template #cipherAddEdit></ng-template>\n<ng-template #attachments></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\n\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { CipherFormConfigService, DefaultCipherFormConfigService } from \"@bitwarden/vault\";\n\nimport { EmergencyAccessService } from \"../../../emergency-access\";\nimport { EmergencyAccessAttachmentsComponent } from \"../attachments/emergency-access-attachments.component\";\n\nimport { EmergencyAddEditCipherComponent } from \"./emergency-add-edit-cipher.component\";\nimport { EmergencyViewDialogComponent } from \"./emergency-view-dialog.component\";\n\n@Component({\n  selector: \"emergency-access-view\",\n  templateUrl: \"emergency-access-view.component.html\",\n  providers: [{ provide: CipherFormConfigService, useClass: DefaultCipherFormConfigService }],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class EmergencyAccessViewComponent implements OnInit {\n  @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n  cipherAddEditModalRef: ViewContainerRef;\n  @ViewChild(\"attachments\", { read: ViewContainerRef, static: true })\n  attachmentsModalRef: ViewContainerRef;\n\n  id: string;\n  ciphers: CipherView[] = [];\n  loaded = false;\n\n  constructor(\n    private modalService: ModalService,\n    private router: Router,\n    private route: ActivatedRoute,\n    private emergencyAccessService: EmergencyAccessService,\n    private configService: ConfigService,\n    private dialogService: DialogService,\n  ) {}\n\n  ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n    this.route.params.subscribe((qParams) => {\n      if (qParams.id == null) {\n        return this.router.navigate([\"settings/emergency-access\"]);\n      }\n\n      this.id = qParams.id;\n\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.load();\n    });\n  }\n\n  async selectCipher(cipher: CipherView) {\n    const browserRefreshEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.ExtensionRefresh,\n    );\n\n    if (browserRefreshEnabled) {\n      EmergencyViewDialogComponent.open(this.dialogService, {\n        cipher,\n      });\n      return;\n    }\n\n    // FIXME PM-15385: Remove below dialog service logic once extension refresh is live.\n\n    // eslint-disable-next-line\n    const [_, childComponent] = await this.modalService.openViewRef(\n      EmergencyAddEditCipherComponent,\n      this.cipherAddEditModalRef,\n      (comp) => {\n        comp.cipherId = cipher == null ? null : cipher.id;\n        comp.cipher = cipher;\n      },\n    );\n\n    return childComponent;\n  }\n\n  async load() {\n    this.ciphers = await this.emergencyAccessService.getViewOnlyCiphers(this.id);\n    this.loaded = true;\n  }\n\n  async viewAttachments(cipher: CipherView) {\n    await this.modalService.openViewRef(\n      EmergencyAccessAttachmentsComponent,\n      this.attachmentsModalRef,\n      (comp) => {\n        comp.cipher = cipher;\n        comp.emergencyAccessId = this.id;\n      },\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class PasswordRequest extends SecretVerificationRequest {\n  newMasterPasswordHash: string;\n  masterPasswordHint: string;\n  key: string;\n}\n","<div class=\"tabbed-header\">\n  <h1>{{ \"changeMasterPassword\" | i18n }}</h1>\n</div>\n\n<bit-callout type=\"warning\">{{ \"loggedOutWarning\" | i18n }}</bit-callout>\n<auth-password-callout [policy]=\"enforcedPolicyOptions\" *ngIf=\"enforcedPolicyOptions\">\n</auth-password-callout>\n\n<form\n  #form\n  (ngSubmit)=\"submit()\"\n  [appApiAction]=\"formPromise\"\n  ngNativeValidate\n  autocomplete=\"off\"\n  class=\"tw-mb-14\"\n>\n  <div class=\"row\">\n    <div class=\"col-6\">\n      <div class=\"form-group\">\n        <label for=\"currentMasterPassword\">{{ \"currentMasterPass\" | i18n }}</label>\n        <input\n          id=\"currentMasterPassword\"\n          type=\"password\"\n          name=\"MasterPasswordHash\"\n          class=\"form-control\"\n          [(ngModel)]=\"currentMasterPassword\"\n          required\n          appInputVerbatim\n        />\n      </div>\n    </div>\n  </div>\n  <div class=\"row\">\n    <div class=\"col-6\">\n      <div class=\"form-group\">\n        <label for=\"newMasterPassword\">{{ \"newMasterPass\" | i18n }}</label>\n        <input\n          id=\"newMasterPassword\"\n          type=\"password\"\n          name=\"NewMasterPasswordHash\"\n          class=\"form-control mb-1\"\n          [(ngModel)]=\"masterPassword\"\n          required\n          appInputVerbatim\n          autocomplete=\"new-password\"\n        />\n        <bit-hint>\n          <span class=\"tw-font-semibold\">{{ \"important\" | i18n }}</span>\n          {{ \"masterPassImportant\" | i18n }} {{ characterMinimumMessage }}\n        </bit-hint>\n        <app-password-strength\n          [password]=\"masterPassword\"\n          [email]=\"email\"\n          [showText]=\"true\"\n          (passwordStrengthResult)=\"getStrengthResult($event)\"\n        >\n        </app-password-strength>\n      </div>\n    </div>\n    <div class=\"col-6\">\n      <div class=\"form-group\">\n        <label for=\"masterPasswordRetype\">{{ \"confirmNewMasterPass\" | i18n }}</label>\n        <input\n          id=\"masterPasswordRetype\"\n          type=\"password\"\n          name=\"MasterPasswordRetype\"\n          class=\"form-control\"\n          [(ngModel)]=\"masterPasswordRetype\"\n          required\n          appInputVerbatim\n          autocomplete=\"new-password\"\n        />\n      </div>\n    </div>\n  </div>\n  <div class=\"form-group\">\n    <div class=\"form-check\">\n      <input\n        class=\"form-check-input\"\n        type=\"checkbox\"\n        id=\"checkForBreaches\"\n        name=\"checkForBreaches\"\n        [(ngModel)]=\"checkForBreaches\"\n      />\n      <label class=\"form-check-label\" for=\"checkForBreaches\">\n        {{ \"checkForBreaches\" | i18n }}\n      </label>\n    </div>\n  </div>\n  <div class=\"form-group\">\n    <div class=\"form-check\">\n      <input\n        class=\"form-check-input\"\n        type=\"checkbox\"\n        id=\"rotateUserKey\"\n        name=\"RotateUserKey\"\n        [(ngModel)]=\"rotateUserKey\"\n        (change)=\"rotateUserKeyClicked()\"\n      />\n      <label class=\"form-check-label\" for=\"rotateUserKey\">\n        {{ \"rotateAccountEncKey\" | i18n }}\n      </label>\n      <a\n        href=\"https://bitwarden.com/help/account-encryption-key/#rotate-your-encryption-key\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n        appA11yTitle=\"{{ 'impactOfRotatingYourEncryptionKey' | i18n }}\"\n      >\n        <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n      </a>\n    </div>\n  </div>\n  <div class=\"form-group\">\n    <label for=\"masterPasswordHint\">{{ \"newMasterPassHint\" | i18n }}</label>\n    <input\n      id=\"masterPasswordHint\"\n      class=\"form-control\"\n      maxlength=\"50\"\n      type=\"text\"\n      name=\"MasterPasswordHint\"\n      [(ngModel)]=\"masterPasswordHint\"\n    />\n  </div>\n  <button type=\"submit\" buttonType=\"primary\" bitButton [loading]=\"form.loading\">\n    {{ \"changeMasterPassword\" | i18n }}\n  </button>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"@bitwarden/angular/auth/components/change-password.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { UserKeyRotationService } from \"../../key-management/key-rotation/user-key-rotation.service\";\n\n@Component({\n  selector: \"app-change-password\",\n  templateUrl: \"change-password.component.html\",\n})\nexport class ChangePasswordComponent\n  extends BaseChangePasswordComponent\n  implements OnInit, OnDestroy\n{\n  rotateUserKey = false;\n  currentMasterPassword: string;\n  masterPasswordHint: string;\n  checkForBreaches = true;\n  characterMinimumMessage = \"\";\n\n  constructor(\n    i18nService: I18nService,\n    keyService: KeyService,\n    messagingService: MessagingService,\n    stateService: StateService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    platformUtilsService: PlatformUtilsService,\n    policyService: PolicyService,\n    private auditService: AuditService,\n    private cipherService: CipherService,\n    private syncService: SyncService,\n    private apiService: ApiService,\n    private router: Router,\n    dialogService: DialogService,\n    private userVerificationService: UserVerificationService,\n    private keyRotationService: UserKeyRotationService,\n    kdfConfigService: KdfConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      keyService,\n      messagingService,\n      passwordGenerationService,\n      platformUtilsService,\n      policyService,\n      stateService,\n      dialogService,\n      kdfConfigService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n  }\n\n  async ngOnInit() {\n    if (!(await this.userVerificationService.hasMasterPassword())) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"/settings/security/two-factor\"]);\n    }\n\n    await super.ngOnInit();\n\n    this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n  }\n\n  async rotateUserKeyClicked() {\n    if (this.rotateUserKey) {\n      const ciphers = await this.cipherService.getAllDecrypted();\n      let hasOldAttachments = false;\n      if (ciphers != null) {\n        for (let i = 0; i < ciphers.length; i++) {\n          if (ciphers[i].organizationId == null && ciphers[i].hasOldAttachments) {\n            hasOldAttachments = true;\n            break;\n          }\n        }\n      }\n\n      if (hasOldAttachments) {\n        const learnMore = await this.dialogService.openSimpleDialog({\n          title: { key: \"warning\" },\n          content: { key: \"oldAttachmentsNeedFixDesc\" },\n          acceptButtonText: { key: \"learnMore\" },\n          cancelButtonText: { key: \"close\" },\n          type: \"warning\",\n        });\n\n        if (learnMore) {\n          this.platformUtilsService.launchUri(\n            \"https://bitwarden.com/help/attachments/#add-storage-space\",\n          );\n        }\n        this.rotateUserKey = false;\n        return;\n      }\n\n      const result = await this.dialogService.openSimpleDialog({\n        title: { key: \"rotateEncKeyTitle\" },\n        content:\n          this.i18nService.t(\"updateEncryptionKeyWarning\") +\n          \" \" +\n          this.i18nService.t(\"updateEncryptionKeyExportWarning\") +\n          \" \" +\n          this.i18nService.t(\"rotateEncKeyConfirmation\"),\n        type: \"warning\",\n      });\n\n      if (!result) {\n        this.rotateUserKey = false;\n      }\n    }\n  }\n\n  async submit() {\n    if (\n      this.masterPasswordHint != null &&\n      this.masterPasswordHint.toLowerCase() === this.masterPassword.toLowerCase()\n    ) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"hintEqualsPassword\"),\n      });\n      return;\n    }\n\n    this.leakedPassword = false;\n    if (this.checkForBreaches) {\n      this.leakedPassword = (await this.auditService.passwordLeaked(this.masterPassword)) > 0;\n    }\n\n    await super.submit();\n  }\n\n  async setupSubmitActions() {\n    if (this.currentMasterPassword == null || this.currentMasterPassword === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordRequired\"),\n      });\n      return false;\n    }\n\n    if (this.rotateUserKey) {\n      await this.syncService.fullSync(true);\n    }\n\n    return super.setupSubmitActions();\n  }\n\n  async performSubmitActions(\n    newMasterPasswordHash: string,\n    newMasterKey: MasterKey,\n    newUserKey: [UserKey, EncString],\n  ) {\n    const masterKey = await this.keyService.makeMasterKey(\n      this.currentMasterPassword,\n      await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email))),\n      await this.kdfConfigService.getKdfConfig(),\n    );\n\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n    const newLocalKeyHash = await this.keyService.hashMasterKey(\n      this.masterPassword,\n      newMasterKey,\n      HashPurpose.LocalAuthorization,\n    );\n\n    const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey, userId);\n    if (userKey == null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"invalidMasterPassword\"),\n      });\n      return;\n    }\n\n    const request = new PasswordRequest();\n    request.masterPasswordHash = await this.keyService.hashMasterKey(\n      this.currentMasterPassword,\n      masterKey,\n    );\n    request.masterPasswordHint = this.masterPasswordHint;\n    request.newMasterPasswordHash = newMasterPasswordHash;\n    request.key = newUserKey[1].encryptedString;\n\n    try {\n      if (this.rotateUserKey) {\n        this.formPromise = this.apiService.postPassword(request).then(async () => {\n          // we need to save this for local masterkey verification during rotation\n          await this.masterPasswordService.setMasterKeyHash(newLocalKeyHash, userId as UserId);\n          await this.masterPasswordService.setMasterKey(newMasterKey, userId as UserId);\n          return this.updateKey();\n        });\n      } else {\n        this.formPromise = this.apiService.postPassword(request);\n      }\n\n      await this.formPromise;\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"masterPasswordChanged\"),\n        message: this.i18nService.t(\"logBackIn\"),\n      });\n      this.messagingService.send(\"logout\");\n    } catch {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n    }\n  }\n\n  private async updateKey() {\n    const user = await firstValueFrom(this.accountService.activeAccount$);\n    await this.keyRotationService.rotateUserKeyAndEncryptedData(this.masterPassword, user);\n  }\n}\n","<bit-container>\n  <div class=\"tabbed-header\">\n    <div class=\"tw-flex tw-items-center tw-gap-2\">\n      <h1>{{ \"devices\" | i18n }}</h1>\n      <button\n        [bitPopoverTriggerFor]=\"infoPopover\"\n        type=\"button\"\n        class=\"tw-border-none tw-bg-transparent tw-text-primary-600 tw-flex tw-items-center tw-h-4 tw-w-4\"\n        [position]=\"'right-start'\"\n      >\n        <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n      </button>\n      <bit-popover [title]=\"'whatIsADevice' | i18n\" #infoPopover>\n        <p>{{ \"aDeviceIs\" | i18n }}</p>\n      </bit-popover>\n      <i\n        *ngIf=\"asyncActionLoading\"\n        class=\"bwi bwi-spinner bwi-spin tw-flex tw-items-center tw-h-4 tw-w-4\"\n        aria-hidden=\"true\"\n      ></i>\n    </div>\n  </div>\n\n  <p>{{ \"deviceListDescriptionTemp\" | i18n }}</p>\n\n  <div *ngIf=\"loading\" class=\"tw-flex tw-justify-center tw-items-center tw-p-4\">\n    <i class=\"bwi bwi-spinner bwi-spin tw-text-2xl\" aria-hidden=\"true\"></i>\n  </div>\n\n  <bit-table-scroll *ngIf=\"!loading\" [dataSource]=\"dataSource\" [rowSize]=\"50\">\n    <ng-container header>\n      <th\n        *ngFor=\"let col of columnConfig\"\n        [class]=\"col.headerClass\"\n        bitCell\n        [bitSortable]=\"col.sortable ? col.name : null\"\n        [default]=\"col.name === 'loginStatus' ? 'desc' : null\"\n        scope=\"col\"\n        role=\"columnheader\"\n      >\n        {{ col.title }}\n      </th>\n      <th bitCell scope=\"col\" role=\"columnheader\"></th>\n    </ng-container>\n    <ng-template bitRowDef let-row>\n      <td bitCell class=\"tw-flex tw-gap-2\">\n        <div class=\"tw-flex tw-items-center tw-justify-center tw-w-10\">\n          <i [class]=\"getDeviceIcon(row.type)\" class=\"bwi-lg\" aria-hidden=\"true\"></i>\n        </div>\n        <div>\n          <ng-container *ngIf=\"row.hasPendingAuthRequest\">\n            <a bitLink href=\"#\" appStopClick (click)=\"managePendingAuthRequest(row)\">\n              {{ row.displayName }}\n            </a>\n\n            <span class=\"tw-text-sm tw-text-muted tw-block\">\n              {{ \"needsApproval\" | i18n }}\n            </span>\n          </ng-container>\n          <ng-container *ngIf=\"!row.hasPendingAuthRequest\">\n            {{ row.displayName }}\n            <span\n              *ngIf=\"row.trusted && !row.hasPendingAuthRequest\"\n              class=\"tw-text-sm tw-text-muted tw-block\"\n            >\n              {{ \"trusted\" | i18n }}\n            </span>\n          </ng-container>\n        </div>\n      </td>\n      <td bitCell>\n        <span *ngIf=\"isCurrentDevice(row)\" bitBadge variant=\"primary\">{{\n          \"currentSession\" | i18n\n        }}</span>\n        <span *ngIf=\"row.hasPendingAuthRequest\" bitBadge variant=\"warning\">{{\n          \"requestPending\" | i18n\n        }}</span>\n      </td>\n      <td bitCell>{{ row.firstLogin | date: \"medium\" }}</td>\n      <!-- <td bitCell>\n        <button\n          type=\"button\"\n          bitIconButton=\"bwi-ellipsis-v\"\n          [bitMenuTriggerFor]=\"optionsMenu\"\n        ></button>\n        <bit-menu #optionsMenu>\n          Remove device button to be re-added later when we have per device session de-authentication. \n          <button\n            type=\"button\"\n            bitMenuItem\n            (click)=\"removeDevice(row)\"\n            [disabled]=\"isCurrentDevice(row)\"\n          >\n            <span [class]=\"isCurrentDevice(row) ? 'tw-text-muted' : 'tw-text-danger'\">\n              <i class=\"bwi bwi-trash\" aria-hidden=\"true\"></i>\n              {{ \"removeDevice\" | i18n }}\n            </span>\n          </button>\n        </bit-menu>\n      </td> -->\n    </ng-template>\n  </bit-table-scroll>\n</bit-container>\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { combineLatest, firstValueFrom } from \"rxjs\";\n\nimport { LoginApprovalComponent } from \"@bitwarden/auth/angular\";\nimport { DevicesServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices/devices.service.abstraction\";\nimport {\n  DevicePendingAuthRequest,\n  DeviceResponse,\n} from \"@bitwarden/common/auth/abstractions/devices/responses/device.response\";\nimport { DeviceView } from \"@bitwarden/common/auth/abstractions/devices/views/device.view\";\nimport { DeviceType, DeviceTypeMetadata } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport {\n  DialogService,\n  ToastService,\n  TableDataSource,\n  TableModule,\n  PopoverModule,\n} from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../shared\";\n\ninterface DeviceTableData {\n  id: string;\n  type: DeviceType;\n  displayName: string;\n  loginStatus: string;\n  firstLogin: Date;\n  trusted: boolean;\n  devicePendingAuthRequest: DevicePendingAuthRequest | null;\n  hasPendingAuthRequest: boolean;\n}\n\n/**\n * Provides a table of devices and allows the user to log out, approve or remove a device\n */\n@Component({\n  selector: \"app-device-management\",\n  templateUrl: \"./device-management.component.html\",\n  standalone: true,\n  imports: [CommonModule, SharedModule, TableModule, PopoverModule],\n})\nexport class DeviceManagementComponent {\n  protected readonly tableId = \"device-management-table\";\n  protected dataSource = new TableDataSource<DeviceTableData>();\n  protected currentDevice: DeviceView | undefined;\n  protected loading = true;\n  protected asyncActionLoading = false;\n\n  constructor(\n    private i18nService: I18nService,\n    private devicesService: DevicesServiceAbstraction,\n    private dialogService: DialogService,\n    private toastService: ToastService,\n    private validationService: ValidationService,\n  ) {\n    combineLatest([this.devicesService.getCurrentDevice$(), this.devicesService.getDevices$()])\n      .pipe(takeUntilDestroyed())\n      .subscribe({\n        next: ([currentDevice, devices]: [DeviceResponse, Array<DeviceView>]) => {\n          this.currentDevice = new DeviceView(currentDevice);\n\n          this.dataSource.data = devices.map((device: DeviceView): DeviceTableData => {\n            return {\n              id: device.id,\n              type: device.type,\n              displayName: this.getHumanReadableDeviceType(device.type),\n              loginStatus: this.getLoginStatus(device),\n              firstLogin: new Date(device.creationDate),\n              trusted: device.response.isTrusted,\n              devicePendingAuthRequest: device.response.devicePendingAuthRequest,\n              hasPendingAuthRequest: this.hasPendingAuthRequest(device.response),\n            };\n          });\n\n          this.loading = false;\n        },\n        error: () => {\n          this.loading = false;\n        },\n      });\n  }\n\n  /**\n   * Column configuration for the table\n   */\n  protected readonly columnConfig = [\n    {\n      name: \"displayName\",\n      title: this.i18nService.t(\"device\"),\n      headerClass: \"tw-w-1/3\",\n      sortable: true,\n    },\n    {\n      name: \"loginStatus\",\n      title: this.i18nService.t(\"loginStatus\"),\n      headerClass: \"tw-w-1/3\",\n      sortable: true,\n    },\n    {\n      name: \"firstLogin\",\n      title: this.i18nService.t(\"firstLogin\"),\n      headerClass: \"tw-w-1/3\",\n      sortable: true,\n    },\n  ];\n\n  /**\n   * Get the icon for a device type\n   * @param type - The device type\n   * @returns The icon for the device type\n   */\n  getDeviceIcon(type: DeviceType): string {\n    const defaultIcon = \"bwi bwi-desktop\";\n    const categoryIconMap: Record<string, string> = {\n      webVault: \"bwi bwi-browser\",\n      desktop: \"bwi bwi-desktop\",\n      mobile: \"bwi bwi-mobile\",\n      cli: \"bwi bwi-cli\",\n      extension: \"bwi bwi-puzzle\",\n      sdk: \"bwi bwi-desktop\",\n    };\n\n    const metadata = DeviceTypeMetadata[type];\n    return metadata ? (categoryIconMap[metadata.category] ?? defaultIcon) : defaultIcon;\n  }\n\n  /**\n   * Get the login status of a device\n   * It will return the current session if the device is the current device\n   * It will return the date of the pending auth request when available\n   * @param device - The device\n   * @returns The login status\n   */\n  private getLoginStatus(device: DeviceView): string {\n    if (this.isCurrentDevice(device)) {\n      return this.i18nService.t(\"currentSession\");\n    }\n\n    if (device.response.devicePendingAuthRequest?.creationDate) {\n      return this.i18nService.t(\"requestPending\");\n    }\n\n    return \"\";\n  }\n\n  /**\n   * Get a human readable device type from the DeviceType enum\n   * @param type - The device type\n   * @returns The human readable device type\n   */\n  private getHumanReadableDeviceType(type: DeviceType): string {\n    const metadata = DeviceTypeMetadata[type];\n    if (!metadata) {\n      return this.i18nService.t(\"unknownDevice\");\n    }\n\n    // If the platform is \"Unknown\" translate it since it is not a proper noun\n    const platform =\n      metadata.platform === \"Unknown\" ? this.i18nService.t(\"unknown\") : metadata.platform;\n    const category = this.i18nService.t(metadata.category);\n    return platform ? `${category} - ${platform}` : category;\n  }\n\n  /**\n   * Check if a device is the current device\n   * @param device - The device or device table data\n   * @returns True if the device is the current device, false otherwise\n   */\n  protected isCurrentDevice(device: DeviceView | DeviceTableData): boolean {\n    return \"response\" in device\n      ? device.id === this.currentDevice?.id\n      : device.id === this.currentDevice?.id;\n  }\n\n  /**\n   * Check if a device has a pending auth request\n   * @param device - The device response\n   * @returns True if the device has a pending auth request, false otherwise\n   */\n  private hasPendingAuthRequest(device: DeviceResponse): boolean {\n    return (\n      device.devicePendingAuthRequest !== undefined && device.devicePendingAuthRequest !== null\n    );\n  }\n\n  /**\n   * Open a dialog to approve or deny a pending auth request for a device\n   */\n  async managePendingAuthRequest(device: DeviceTableData) {\n    if (device.devicePendingAuthRequest === undefined || device.devicePendingAuthRequest === null) {\n      return;\n    }\n\n    const dialogRef = LoginApprovalComponent.open(this.dialogService, {\n      notificationId: device.devicePendingAuthRequest.id,\n    });\n\n    const result = await firstValueFrom(dialogRef.closed);\n\n    if (result !== undefined && typeof result === \"boolean\") {\n      // auth request approved or denied so reset\n      device.devicePendingAuthRequest = null;\n      device.hasPendingAuthRequest = false;\n    }\n  }\n\n  /**\n   * Remove a device\n   * @param device - The device\n   */\n  protected async removeDevice(device: DeviceTableData) {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"removeDevice\" },\n      content: { key: \"removeDeviceConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      this.asyncActionLoading = true;\n      await firstValueFrom(this.devicesService.deactivateDevice$(device.id));\n      this.asyncActionLoading = false;\n\n      // Remove the device from the data source\n      this.dataSource.data = this.dataSource.data.filter((d) => d.id !== device.id);\n\n      this.toastService.showToast({\n        title: \"\",\n        message: this.i18nService.t(\"deviceRemoved\"),\n        variant: \"success\",\n      });\n    } catch (error) {\n      this.validationService.showError(error);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KdfType } from \"@bitwarden/key-management\";\n\nimport { PasswordRequest } from \"../../auth/models/request/password.request\";\n\nexport class KdfRequest extends PasswordRequest {\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormGroup, FormControl, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KdfRequest } from \"@bitwarden/common/models/request/kdf.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { KdfConfig, KdfType, KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"app-change-kdf-confirmation\",\n  templateUrl: \"change-kdf-confirmation.component.html\",\n})\nexport class ChangeKdfConfirmationComponent {\n  kdfConfig: KdfConfig;\n\n  form = new FormGroup({\n    masterPassword: new FormControl(null, Validators.required),\n  });\n  showPassword = false;\n  masterPassword: string;\n  loading = false;\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private keyService: KeyService,\n    private messagingService: MessagingService,\n    @Inject(DIALOG_DATA) params: { kdf: KdfType; kdfConfig: KdfConfig },\n    private accountService: AccountService,\n    private toastService: ToastService,\n  ) {\n    this.kdfConfig = params.kdfConfig;\n    this.masterPassword = null;\n  }\n\n  submit = async () => {\n    if (this.form.invalid) {\n      return;\n    }\n    this.loading = true;\n    await this.makeKeyAndSaveAsync();\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"encKeySettingsChanged\"),\n      message: this.i18nService.t(\"logBackIn\"),\n    });\n    this.messagingService.send(\"logout\");\n    this.loading = false;\n  };\n\n  private async makeKeyAndSaveAsync() {\n    const masterPassword = this.form.value.masterPassword;\n\n    // Ensure the KDF config is valid.\n    this.kdfConfig.validateKdfConfigForSetting();\n\n    const request = new KdfRequest();\n    request.kdf = this.kdfConfig.kdfType;\n    request.kdfIterations = this.kdfConfig.iterations;\n    if (this.kdfConfig.kdfType === KdfType.Argon2id) {\n      request.kdfMemory = this.kdfConfig.memory;\n      request.kdfParallelism = this.kdfConfig.parallelism;\n    }\n    const masterKey = await this.keyService.getOrDeriveMasterKey(masterPassword);\n    request.masterPasswordHash = await this.keyService.hashMasterKey(masterPassword, masterKey);\n    const email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n\n    const newMasterKey = await this.keyService.makeMasterKey(masterPassword, email, this.kdfConfig);\n    request.newMasterPasswordHash = await this.keyService.hashMasterKey(\n      masterPassword,\n      newMasterKey,\n    );\n    const newUserKey = await this.keyService.encryptUserKeyWithMasterKey(newMasterKey);\n    request.key = newUserKey[1].encryptedString;\n\n    await this.apiService.postAccountKdf(request);\n  }\n}\n","<form [formGroup]=\"form\" [bitSubmit]=\"submit\" autocomplete=\"off\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ \"changeKdf\" | i18n }}\n    </span>\n\n    <span bitDialogContent>\n      <bit-callout type=\"warning\">{{ \"kdfSettingsChangeLogoutWarning\" | i18n }}</bit-callout>\n      <bit-form-field>\n        <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n        <input bitInput type=\"password\" formControlName=\"masterPassword\" appAutofocus />\n        <button\n          type=\"button\"\n          bitIconButton\n          bitSuffix\n          bitPasswordInputToggle\n          [(toggled)]=\"showPassword\"\n        ></button>\n        <bit-hint>\n          {{ \"confirmIdentity\" | i18n }}\n        </bit-hint></bit-form-field\n      >\n    </span>\n    <ng-container bitDialogFooter>\n      <button bitButton buttonType=\"primary\" type=\"submit\" bitFormButton>\n        <span>{{ \"changeKdf\" | i18n }}</span>\n      </button>\n      <button bitButton buttonType=\"secondary\" type=\"button\" bitFormButton bitDialogClose>\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","<h2 bitTypography=\"h2\">{{ \"encKeySettings\" | i18n }}</h2>\n<bit-callout type=\"warning\">{{ \"kdfSettingsChangeLogoutWarning\" | i18n }}</bit-callout>\n<p bitTypography=\"body1\">\n  {{ \"higherKDFIterations\" | i18n }}\n</p>\n<p bitTypography=\"body1\">\n  {{\n    \"kdfToHighWarningIncreaseInIncrements\"\n      | i18n: (isPBKDF2(kdfConfig) ? (\"incrementsOf100,000\" | i18n) : (\"smallIncrements\" | i18n))\n  }}\n</p>\n<form [formGroup]=\"formGroup\" autocomplete=\"off\">\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n    <div class=\"tw-col-span-6\">\n      <bit-form-field>\n        <bit-label\n          >{{ \"kdfAlgorithm\" | i18n }}\n          <a\n            class=\"tw-ml-auto\"\n            bitLink\n            href=\"https://bitwarden.com/help/kdf-algorithms\"\n            target=\"_blank\"\n            rel=\"noreferrer\"\n            appA11yTitle=\"{{ 'learnMoreAboutEncryptionAlgorithms' | i18n }}\"\n            slot=\"end\"\n          >\n            <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n          </a>\n        </bit-label>\n        <bit-select formControlName=\"kdf\">\n          <bit-option\n            *ngFor=\"let option of kdfOptions\"\n            [value]=\"option.value\"\n            [label]=\"option.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n      <bit-form-field formGroupName=\"kdfConfig\" *ngIf=\"isArgon2(kdfConfig)\">\n        <bit-label>{{ \"kdfMemory\" | i18n }}</bit-label>\n        <input\n          bitInput\n          formControlName=\"memory\"\n          type=\"number\"\n          [min]=\"ARGON2_MEMORY.min\"\n          [max]=\"ARGON2_MEMORY.max\"\n        />\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\">\n      <div class=\"tw-mb-0\">\n        <bit-form-field formGroupName=\"kdfConfig\" *ngIf=\"isPBKDF2(kdfConfig)\">\n          <bit-label>\n            {{ \"kdfIterations\" | i18n }}\n            <a\n              bitLink\n              class=\"tw-ml-auto\"\n              href=\"https://bitwarden.com/help/what-encryption-is-used/#changing-kdf-iterations\"\n              target=\"_blank\"\n              rel=\"noreferrer\"\n              appA11yTitle=\"{{ 'learnMoreAboutKDFIterations' | i18n }}\"\n              slot=\"end\"\n            >\n              <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n            </a>\n          </bit-label>\n          <input\n            bitInput\n            type=\"number\"\n            formControlName=\"iterations\"\n            [min]=\"PBKDF2_ITERATIONS.min\"\n            [max]=\"PBKDF2_ITERATIONS.max\"\n          />\n          <bit-hint>{{ \"kdfIterationRecommends\" | i18n }}</bit-hint>\n        </bit-form-field>\n        <ng-container *ngIf=\"isArgon2(kdfConfig)\">\n          <bit-form-field formGroupName=\"kdfConfig\">\n            <bit-label>\n              {{ \"kdfIterations\" | i18n }}\n            </bit-label>\n            <input\n              bitInput\n              type=\"number\"\n              formControlName=\"iterations\"\n              [min]=\"ARGON2_ITERATIONS.min\"\n              [max]=\"ARGON2_ITERATIONS.max\"\n            />\n          </bit-form-field>\n          <bit-form-field formGroupName=\"kdfConfig\">\n            <bit-label>\n              {{ \"kdfParallelism\" | i18n }}\n            </bit-label>\n            <input\n              bitInput\n              type=\"number\"\n              formControlName=\"parallelism\"\n              [min]=\"ARGON2_PARALLELISM.min\"\n              [max]=\"ARGON2_PARALLELISM.max\"\n            />\n          </bit-form-field>\n        </ng-container>\n      </div>\n    </div>\n  </div>\n  <button\n    (click)=\"openConfirmationModal()\"\n    type=\"button\"\n    buttonType=\"primary\"\n    bitButton\n    bitFormButton\n  >\n    {{ \"changeKdf\" | i18n }}\n  </button>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, ValidatorFn, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { DialogService } from \"@bitwarden/components\";\nimport {\n  KdfConfigService,\n  Argon2KdfConfig,\n  DEFAULT_KDF_CONFIG,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  KdfType,\n} from \"@bitwarden/key-management\";\n\nimport { ChangeKdfConfirmationComponent } from \"./change-kdf-confirmation.component\";\n\n@Component({\n  selector: \"app-change-kdf\",\n  templateUrl: \"change-kdf.component.html\",\n})\nexport class ChangeKdfComponent implements OnInit, OnDestroy {\n  kdfConfig: KdfConfig = DEFAULT_KDF_CONFIG;\n  kdfOptions: any[] = [];\n  private destroy$ = new Subject<void>();\n\n  protected formGroup = this.formBuilder.group({\n    kdf: new FormControl(KdfType.PBKDF2_SHA256, [Validators.required]),\n    kdfConfig: this.formBuilder.group({\n      iterations: [this.kdfConfig.iterations],\n      memory: [null as number],\n      parallelism: [null as number],\n    }),\n  });\n\n  // Default values for template\n  protected PBKDF2_ITERATIONS = PBKDF2KdfConfig.ITERATIONS;\n  protected ARGON2_ITERATIONS = Argon2KdfConfig.ITERATIONS;\n  protected ARGON2_MEMORY = Argon2KdfConfig.MEMORY;\n  protected ARGON2_PARALLELISM = Argon2KdfConfig.PARALLELISM;\n\n  constructor(\n    private dialogService: DialogService,\n    private kdfConfigService: KdfConfigService,\n    private formBuilder: FormBuilder,\n  ) {\n    this.kdfOptions = [\n      { name: \"PBKDF2 SHA-256\", value: KdfType.PBKDF2_SHA256 },\n      { name: \"Argon2id\", value: KdfType.Argon2id },\n    ];\n  }\n\n  async ngOnInit() {\n    this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n    this.formGroup.get(\"kdf\").setValue(this.kdfConfig.kdfType);\n    this.setFormControlValues(this.kdfConfig);\n\n    this.formGroup\n      .get(\"kdf\")\n      .valueChanges.pipe(takeUntil(this.destroy$))\n      .subscribe((newValue) => {\n        this.updateKdfConfig(newValue);\n      });\n  }\n  private updateKdfConfig(newValue: KdfType) {\n    let config: KdfConfig;\n    const validators: { [key: string]: ValidatorFn[] } = {\n      iterations: [],\n      memory: [],\n      parallelism: [],\n    };\n\n    switch (newValue) {\n      case KdfType.PBKDF2_SHA256:\n        config = new PBKDF2KdfConfig();\n        validators.iterations = [\n          Validators.required,\n          Validators.min(PBKDF2KdfConfig.ITERATIONS.min),\n          Validators.max(PBKDF2KdfConfig.ITERATIONS.max),\n        ];\n        break;\n      case KdfType.Argon2id:\n        config = new Argon2KdfConfig();\n        validators.iterations = [\n          Validators.required,\n          Validators.min(Argon2KdfConfig.ITERATIONS.min),\n          Validators.max(Argon2KdfConfig.ITERATIONS.max),\n        ];\n        validators.memory = [\n          Validators.required,\n          Validators.min(Argon2KdfConfig.MEMORY.min),\n          Validators.max(Argon2KdfConfig.MEMORY.max),\n        ];\n        validators.parallelism = [\n          Validators.required,\n          Validators.min(Argon2KdfConfig.PARALLELISM.min),\n          Validators.max(Argon2KdfConfig.PARALLELISM.max),\n        ];\n        break;\n      default:\n        throw new Error(\"Unknown KDF type.\");\n    }\n\n    this.kdfConfig = config;\n    this.setFormValidators(validators);\n    this.setFormControlValues(this.kdfConfig);\n  }\n\n  private setFormValidators(validators: { [key: string]: ValidatorFn[] }) {\n    this.setValidators(\"kdfConfig.iterations\", validators.iterations);\n    this.setValidators(\"kdfConfig.memory\", validators.memory);\n    this.setValidators(\"kdfConfig.parallelism\", validators.parallelism);\n  }\n  private setValidators(controlName: string, validators: ValidatorFn[]) {\n    const control = this.formGroup.get(controlName);\n    if (control) {\n      control.setValidators(validators);\n      control.updateValueAndValidity();\n    }\n  }\n  private setFormControlValues(kdfConfig: KdfConfig) {\n    this.formGroup.get(\"kdfConfig\").reset();\n    if (kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n      this.formGroup.get(\"kdfConfig.iterations\").setValue(kdfConfig.iterations);\n    } else if (kdfConfig.kdfType === KdfType.Argon2id) {\n      this.formGroup.get(\"kdfConfig.iterations\").setValue(kdfConfig.iterations);\n      this.formGroup.get(\"kdfConfig.memory\").setValue(kdfConfig.memory);\n      this.formGroup.get(\"kdfConfig.parallelism\").setValue(kdfConfig.parallelism);\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  isPBKDF2(t: KdfConfig): t is PBKDF2KdfConfig {\n    return t instanceof PBKDF2KdfConfig;\n  }\n\n  isArgon2(t: KdfConfig): t is Argon2KdfConfig {\n    return t instanceof Argon2KdfConfig;\n  }\n\n  async openConfirmationModal() {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n    if (this.kdfConfig.kdfType === KdfType.PBKDF2_SHA256) {\n      this.kdfConfig.iterations = this.formGroup.get(\"kdfConfig.iterations\").value;\n    } else if (this.kdfConfig.kdfType === KdfType.Argon2id) {\n      this.kdfConfig.iterations = this.formGroup.get(\"kdfConfig.iterations\").value;\n      this.kdfConfig.memory = this.formGroup.get(\"kdfConfig.memory\").value;\n      this.kdfConfig.parallelism = this.formGroup.get(\"kdfConfig.parallelism\").value;\n    }\n    this.dialogService.open(ChangeKdfConfirmationComponent, {\n      data: {\n        kdfConfig: this.kdfConfig,\n      },\n    });\n  }\n}\n","<app-change-kdf *ngIf=\"showChangeKdf\"></app-change-kdf>\n<div\n  [ngClass]=\"{ 'tw-mt-6': !showChangeKdf, 'tw-mt-16': showChangeKdf }\"\n  class=\"tw-border-0 tw-mb-0 tw-pb-2.5\"\n>\n  <h2 bitTypography=\"h2\">{{ \"apiKey\" | i18n }}</h2>\n</div>\n<p bitTypography=\"body1\">\n  {{ \"userApiKeyDesc\" | i18n }}\n</p>\n<button type=\"button\" bitButton buttonType=\"secondary\" (click)=\"viewUserApiKey()\">\n  {{ \"viewApiKey\" | i18n }}\n</button>\n<button type=\"button\" bitButton buttonType=\"secondary\" (click)=\"rotateUserApiKey()\">\n  {{ \"rotateApiKey\" | i18n }}\n</button>\n<ng-template #viewUserApiKeyTemplate></ng-template>\n<ng-template #rotateUserApiKeyTemplate></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { ApiKeyComponent } from \"./api-key.component\";\n\n@Component({\n  selector: \"app-security-keys\",\n  templateUrl: \"security-keys.component.html\",\n})\nexport class SecurityKeysComponent implements OnInit {\n  @ViewChild(\"viewUserApiKeyTemplate\", { read: ViewContainerRef, static: true })\n  viewUserApiKeyModalRef: ViewContainerRef;\n  @ViewChild(\"rotateUserApiKeyTemplate\", { read: ViewContainerRef, static: true })\n  rotateUserApiKeyModalRef: ViewContainerRef;\n\n  showChangeKdf = true;\n\n  constructor(\n    private userVerificationService: UserVerificationService,\n    private accountService: AccountService,\n    private apiService: ApiService,\n    private dialogService: DialogService,\n  ) {}\n\n  async ngOnInit() {\n    this.showChangeKdf = await this.userVerificationService.hasMasterPassword();\n  }\n\n  async viewUserApiKey() {\n    const entityId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    await ApiKeyComponent.open(this.dialogService, {\n      data: {\n        keyType: \"user\",\n        entityId: entityId,\n        postKey: this.apiService.postUserApiKey.bind(this.apiService),\n        scope: \"api\",\n        grantType: \"client_credentials\",\n        apiKeyTitle: \"apiKey\",\n        apiKeyWarning: \"userApiKeyWarning\",\n        apiKeyDescription: \"userApiKeyDesc\",\n      },\n    });\n  }\n\n  async rotateUserApiKey() {\n    const entityId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    await ApiKeyComponent.open(this.dialogService, {\n      data: {\n        keyType: \"user\",\n        isRotation: true,\n        entityId: entityId,\n        postKey: this.apiService.postUserRotateApiKey.bind(this.apiService),\n        scope: \"api\",\n        grantType: \"client_credentials\",\n        apiKeyTitle: \"apiKey\",\n        apiKeyWarning: \"userApiKeyWarning\",\n        apiKeyDescription: \"apiKeyRotateDesc\",\n      },\n    });\n  }\n}\n","<app-header>\n  <bit-tab-nav-bar slot=\"tabs\">\n    <ng-container *ngIf=\"showChangePassword\">\n      <bit-tab-link route=\"change-password\">{{ \"masterPassword\" | i18n }}</bit-tab-link>\n    </ng-container>\n    <bit-tab-link route=\"two-factor\">{{ \"twoStepLogin\" | i18n }}</bit-tab-link>\n    <bit-tab-link route=\"device-management\">{{ \"devices\" | i18n }}</bit-tab-link>\n    <bit-tab-link route=\"security-keys\">{{ \"keys\" | i18n }}</bit-tab-link>\n  </bit-tab-nav-bar>\n</app-header>\n\n<bit-container>\n  <router-outlet></router-outlet>\n</bit-container>\n","import { Component, OnInit } from \"@angular/core\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\n@Component({\n  selector: \"app-security\",\n  templateUrl: \"security.component.html\",\n})\nexport class SecurityComponent implements OnInit {\n  showChangePassword = true;\n\n  constructor(\n    private userVerificationService: UserVerificationService,\n    private configService: ConfigService,\n  ) {}\n\n  async ngOnInit() {\n    this.showChangePassword = await this.userVerificationService.hasMasterPassword();\n  }\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { ChangePasswordComponent } from \"../change-password.component\";\nimport { TwoFactorSetupComponent } from \"../two-factor/two-factor-setup.component\";\n\nimport { DeviceManagementComponent } from \"./device-management.component\";\nimport { SecurityKeysComponent } from \"./security-keys.component\";\nimport { SecurityComponent } from \"./security.component\";\n\nconst routes: Routes = [\n  {\n    path: \"\",\n    component: SecurityComponent,\n    data: { titleId: \"security\" },\n    children: [\n      { path: \"\", pathMatch: \"full\", redirectTo: \"change-password\" },\n      {\n        path: \"change-password\",\n        component: ChangePasswordComponent,\n        data: { titleId: \"masterPassword\" },\n      },\n      {\n        path: \"two-factor\",\n        component: TwoFactorSetupComponent,\n        data: { titleId: \"twoStepLogin\" },\n      },\n      {\n        path: \"security-keys\",\n        component: SecurityKeysComponent,\n        data: { titleId: \"keys\" },\n      },\n      {\n        path: \"device-management\",\n        component: DeviceManagementComponent,\n        data: { titleId: \"devices\" },\n      },\n    ],\n  },\n];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class SecurityRoutingModule {}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" class=\"tw-container\">\n  <div *ngIf=\"loggingIn\">\n    <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n    {{ \"loading\" | i18n }}\n  </div>\n  <div *ngIf=\"!loggingIn\">\n    <p bitTypography=\"body1\">{{ \"ssoLogInWithOrgIdentifier\" | i18n }}</p>\n    <bit-form-field>\n      <bit-label>{{ \"ssoIdentifier\" | i18n }}</bit-label>\n      <input bitInput type=\"text\" formControlName=\"identifier\" appAutofocus />\n    </bit-form-field>\n    <hr />\n    <div class=\"tw-flex tw-gap-2\">\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [block]=\"true\">\n        {{ \"logIn\" | i18n }}\n      </button>\n      <a bitButton buttonType=\"secondary\" routerLink=\"/login\" [block]=\"true\">\n        {{ \"cancel\" | i18n }}\n      </a>\n    </div>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport { SsoComponent as BaseSsoComponent } from \"@bitwarden/angular/auth/components/sso.component\";\nimport {\n  LoginStrategyServiceAbstraction,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrganizationDomainSsoDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain-sso-details.response\";\nimport { VerifiedOrganizationDomainSsoDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/verified-organization-domain-sso-details.response\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Component({\n  selector: \"app-sso\",\n  templateUrl: \"sso-v1.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class SsoComponentV1 extends BaseSsoComponent implements OnInit {\n  protected formGroup = new FormGroup({\n    identifier: new FormControl(null, [Validators.required]),\n  });\n\n  get identifierFormControl() {\n    return this.formGroup.controls.identifier;\n  }\n\n  constructor(\n    ssoLoginService: SsoLoginServiceAbstraction,\n    loginStrategyService: LoginStrategyServiceAbstraction,\n    router: Router,\n    i18nService: I18nService,\n    route: ActivatedRoute,\n    stateService: StateService,\n    platformUtilsService: PlatformUtilsService,\n    apiService: ApiService,\n    cryptoFunctionService: CryptoFunctionService,\n    environmentService: EnvironmentService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    logService: LogService,\n    private orgDomainApiService: OrgDomainApiServiceAbstraction,\n    private validationService: ValidationService,\n    userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    configService: ConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      ssoLoginService,\n      loginStrategyService,\n      router,\n      i18nService,\n      route,\n      stateService,\n      platformUtilsService,\n      apiService,\n      cryptoFunctionService,\n      environmentService,\n      passwordGenerationService,\n      logService,\n      userDecryptionOptionsService,\n      configService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n    this.redirectUri = window.location.origin + \"/sso-connector.html\";\n    this.clientId = \"web\";\n  }\n\n  async ngOnInit() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    super.ngOnInit();\n\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      if (qParams.identifier != null) {\n        // SSO Org Identifier in query params takes precedence over claimed domains\n        this.identifierFormControl.setValue(qParams.identifier);\n        this.loggingIn = true;\n        await this.submit();\n      } else {\n        // Note: this flow is written for web but both browser and desktop\n        // redirect here on SSO button click.\n\n        // Check if email matches any claimed domains\n        if (qParams.email) {\n          // show loading spinner\n          this.loggingIn = true;\n          try {\n            if (await this.configService.getFeatureFlag(FeatureFlag.VerifiedSsoDomainEndpoint)) {\n              const response: ListResponse<VerifiedOrganizationDomainSsoDetailsResponse> =\n                await this.orgDomainApiService.getVerifiedOrgDomainsByEmail(qParams.email);\n\n              if (response.data.length > 0) {\n                this.identifierFormControl.setValue(response.data[0].organizationIdentifier);\n                await this.submit();\n                return;\n              }\n            } else {\n              const response: OrganizationDomainSsoDetailsResponse =\n                await this.orgDomainApiService.getClaimedOrgDomainByEmail(qParams.email);\n\n              if (response?.ssoAvailable && response?.verifiedDate) {\n                this.identifierFormControl.setValue(response.organizationIdentifier);\n                await this.submit();\n                return;\n              }\n            }\n          } catch (error) {\n            this.handleGetClaimedDomainByEmailError(error);\n          }\n\n          this.loggingIn = false;\n        }\n\n        // Fallback to state svc if domain is unclaimed\n        const storedIdentifier = await this.ssoLoginService.getOrganizationSsoIdentifier();\n        if (storedIdentifier != null) {\n          this.identifierFormControl.setValue(storedIdentifier);\n        }\n      }\n    });\n  }\n\n  private handleGetClaimedDomainByEmailError(error: any): void {\n    if (error instanceof ErrorResponse) {\n      const errorResponse: ErrorResponse = error as ErrorResponse;\n      switch (errorResponse.statusCode) {\n        case HttpStatusCode.NotFound:\n          //this is a valid case for a domain not found\n          return;\n\n        default:\n          this.validationService.showError(errorResponse);\n          break;\n      }\n    }\n  }\n\n  submit = async () => {\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    const autoSubmit = (await firstValueFrom(this.route.queryParams)).identifier != null;\n\n    this.identifier = this.identifierFormControl.value;\n    await this.ssoLoginService.setOrganizationSsoIdentifier(this.identifier);\n    if (this.clientId === \"browser\") {\n      document.cookie = `ssoHandOffMessage=${this.i18nService.t(\"ssoHandOff\")};SameSite=strict`;\n    }\n    try {\n      await Object.getPrototypeOf(this).submit.call(this);\n    } catch (error) {\n      if (autoSubmit) {\n        await this.router.navigate([\"/login\"]);\n      } else {\n        this.validationService.showError(error);\n      }\n    }\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnInit, Output, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport {\n  BillingInformation,\n  OrganizationBillingServiceAbstraction as OrganizationBillingService,\n  OrganizationInformation,\n  PaymentInformation,\n  PlanInformation,\n} from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PaymentMethodType, PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { PlanResponse } from \"@bitwarden/common/billing/models/response/plan.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { BillingSharedModule, PaymentComponent, TaxInfoComponent } from \"../../shared\";\nimport { PaymentV2Component } from \"../../shared/payment/payment-v2.component\";\n\nexport type TrialOrganizationType = Exclude<ProductTierType, ProductTierType.Free>;\n\nexport interface OrganizationInfo {\n  name: string;\n  email: string;\n  type: TrialOrganizationType;\n}\n\nexport interface OrganizationCreatedEvent {\n  organizationId: string;\n  planDescription: string;\n}\n\nenum SubscriptionCadence {\n  Annual,\n  Monthly,\n}\n\nexport enum SubscriptionProduct {\n  PasswordManager,\n  SecretsManager,\n}\n\n@Component({\n  selector: \"app-trial-billing-step\",\n  templateUrl: \"trial-billing-step.component.html\",\n  imports: [BillingSharedModule],\n  standalone: true,\n})\nexport class TrialBillingStepComponent implements OnInit {\n  @ViewChild(PaymentComponent) paymentComponent: PaymentComponent;\n  @ViewChild(PaymentV2Component) paymentV2Component: PaymentV2Component;\n  @ViewChild(TaxInfoComponent) taxInfoComponent: TaxInfoComponent;\n  @Input() organizationInfo: OrganizationInfo;\n  @Input() subscriptionProduct: SubscriptionProduct = SubscriptionProduct.PasswordManager;\n  @Output() steppedBack = new EventEmitter();\n  @Output() organizationCreated = new EventEmitter<OrganizationCreatedEvent>();\n\n  loading = true;\n\n  annualCadence = SubscriptionCadence.Annual;\n  monthlyCadence = SubscriptionCadence.Monthly;\n\n  formGroup = this.formBuilder.group({\n    cadence: [SubscriptionCadence.Annual, Validators.required],\n  });\n  formPromise: Promise<string>;\n\n  applicablePlans: PlanResponse[];\n  annualPlan?: PlanResponse;\n  monthlyPlan?: PlanResponse;\n\n  deprecateStripeSourcesAPI: boolean;\n\n  constructor(\n    private apiService: ApiService,\n    private configService: ConfigService,\n    private i18nService: I18nService,\n    private formBuilder: FormBuilder,\n    private messagingService: MessagingService,\n    private organizationBillingService: OrganizationBillingService,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.deprecateStripeSourcesAPI = await this.configService.getFeatureFlag(\n      FeatureFlag.AC2476_DeprecateStripeSourcesAPI,\n    );\n    const plans = await this.apiService.getPlans();\n    this.applicablePlans = plans.data.filter(this.isApplicable);\n    this.annualPlan = this.findPlanFor(SubscriptionCadence.Annual);\n    this.monthlyPlan = this.findPlanFor(SubscriptionCadence.Monthly);\n    this.loading = false;\n  }\n\n  async submit(): Promise<void> {\n    if (!this.taxInfoComponent.taxFormGroup.valid && this.taxInfoComponent?.taxFormGroup.touched) {\n      this.taxInfoComponent.taxFormGroup.markAllAsTouched();\n      return;\n    }\n\n    this.formPromise = this.createOrganization();\n\n    const organizationId = await this.formPromise;\n    const planDescription = this.getPlanDescription();\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"organizationCreated\"),\n      message: this.i18nService.t(\"organizationReadyToGo\"),\n    });\n\n    this.organizationCreated.emit({\n      organizationId,\n      planDescription,\n    });\n\n    // TODO: No one actually listening to this?\n    this.messagingService.send(\"organizationCreated\", { organizationId });\n  }\n\n  protected changedCountry() {\n    if (this.deprecateStripeSourcesAPI) {\n      this.paymentV2Component.showBankAccount = this.taxInfoComponent.country === \"US\";\n      if (\n        !this.paymentV2Component.showBankAccount &&\n        this.paymentV2Component.selected === PaymentMethodType.BankAccount\n      ) {\n        this.paymentV2Component.select(PaymentMethodType.Card);\n      }\n    } else {\n      this.paymentComponent.hideBank = this.taxInfoComponent.taxFormGroup.value.country !== \"US\";\n      if (\n        this.paymentComponent.hideBank &&\n        this.paymentComponent.method === PaymentMethodType.BankAccount\n      ) {\n        this.paymentComponent.method = PaymentMethodType.Card;\n        this.paymentComponent.changeMethod();\n      }\n    }\n  }\n\n  protected getPriceFor(cadence: SubscriptionCadence): number {\n    const plan = this.findPlanFor(cadence);\n    return this.subscriptionProduct === SubscriptionProduct.PasswordManager\n      ? plan.PasswordManager.basePrice === 0\n        ? plan.PasswordManager.seatPrice\n        : plan.PasswordManager.basePrice\n      : plan.SecretsManager.basePrice === 0\n        ? plan.SecretsManager.seatPrice\n        : plan.SecretsManager.basePrice;\n  }\n\n  protected stepBack() {\n    this.steppedBack.emit();\n  }\n\n  private async createOrganization(): Promise<string> {\n    const planResponse = this.findPlanFor(this.formGroup.value.cadence);\n\n    let paymentMethod: [string, PaymentMethodType];\n\n    if (this.deprecateStripeSourcesAPI) {\n      const { type, token } = await this.paymentV2Component.tokenize();\n      paymentMethod = [token, type];\n    } else {\n      paymentMethod = await this.paymentComponent.createPaymentToken();\n    }\n\n    const organization: OrganizationInformation = {\n      name: this.organizationInfo.name,\n      billingEmail: this.organizationInfo.email,\n      initiationPath:\n        this.subscriptionProduct === SubscriptionProduct.PasswordManager\n          ? \"Password Manager trial from marketing website\"\n          : \"Secrets Manager trial from marketing website\",\n    };\n\n    const plan: PlanInformation = {\n      type: planResponse.type,\n      passwordManagerSeats: 1,\n    };\n\n    if (this.subscriptionProduct === SubscriptionProduct.SecretsManager) {\n      plan.subscribeToSecretsManager = true;\n      plan.isFromSecretsManagerTrial = true;\n      plan.secretsManagerSeats = 1;\n    }\n\n    const payment: PaymentInformation = {\n      paymentMethod,\n      billing: this.getBillingInformationFromTaxInfoComponent(),\n    };\n\n    const response = await this.organizationBillingService.purchaseSubscription({\n      organization,\n      plan,\n      payment,\n    });\n\n    return response.id;\n  }\n\n  private productTypeToPlanTypeMap: {\n    [productType in TrialOrganizationType]: {\n      [cadence in SubscriptionCadence]?: PlanType;\n    };\n  } = {\n    [ProductTierType.Enterprise]: {\n      [SubscriptionCadence.Annual]: PlanType.EnterpriseAnnually,\n      [SubscriptionCadence.Monthly]: PlanType.EnterpriseMonthly,\n    },\n    [ProductTierType.Families]: {\n      [SubscriptionCadence.Annual]: PlanType.FamiliesAnnually,\n      // No monthly option for Families plan\n    },\n    [ProductTierType.Teams]: {\n      [SubscriptionCadence.Annual]: PlanType.TeamsAnnually,\n      [SubscriptionCadence.Monthly]: PlanType.TeamsMonthly,\n    },\n    [ProductTierType.TeamsStarter]: {\n      // No annual option for Teams Starter plan\n      [SubscriptionCadence.Monthly]: PlanType.TeamsStarter,\n    },\n  };\n\n  private findPlanFor(cadence: SubscriptionCadence): PlanResponse | null {\n    const productType = this.organizationInfo.type;\n    const planType = this.productTypeToPlanTypeMap[productType]?.[cadence];\n    return planType ? this.applicablePlans.find((plan) => plan.type === planType) : null;\n  }\n\n  private getBillingInformationFromTaxInfoComponent(): BillingInformation {\n    return {\n      postalCode: this.taxInfoComponent.taxFormGroup?.value.postalCode,\n      country: this.taxInfoComponent.taxFormGroup?.value.country,\n      taxId: this.taxInfoComponent.taxFormGroup?.value.taxId,\n      addressLine1: this.taxInfoComponent.taxFormGroup?.value.line1,\n      addressLine2: this.taxInfoComponent.taxFormGroup?.value.line2,\n      city: this.taxInfoComponent.taxFormGroup?.value.city,\n      state: this.taxInfoComponent.taxFormGroup?.value.state,\n    };\n  }\n\n  private getPlanDescription(): string {\n    const plan = this.findPlanFor(this.formGroup.value.cadence);\n    const price =\n      this.subscriptionProduct === SubscriptionProduct.PasswordManager\n        ? plan.PasswordManager.basePrice === 0\n          ? plan.PasswordManager.seatPrice\n          : plan.PasswordManager.basePrice\n        : plan.SecretsManager.basePrice === 0\n          ? plan.SecretsManager.seatPrice\n          : plan.SecretsManager.basePrice;\n\n    switch (this.formGroup.value.cadence) {\n      case SubscriptionCadence.Annual:\n        return `${this.i18nService.t(\"annual\")} ($${price}/${this.i18nService.t(\"yr\")})`;\n      case SubscriptionCadence.Monthly:\n        return `${this.i18nService.t(\"monthly\")} ($${price}/${this.i18nService.t(\"monthAbbr\")})`;\n    }\n  }\n\n  private isApplicable(plan: PlanResponse): boolean {\n    const hasCorrectProductType =\n      plan.productTier === ProductTierType.Enterprise ||\n      plan.productTier === ProductTierType.Families ||\n      plan.productTier === ProductTierType.Teams ||\n      plan.productTier === ProductTierType.TeamsStarter;\n    const notDisabledOrLegacy = !plan.disabled && !plan.legacyYear;\n    return hasCorrectProductType && notDisabledOrLegacy;\n  }\n}\n","<ng-container *ngIf=\"loading\">\n  <i\n    class=\"bwi bwi-spinner bwi-spin text-muted\"\n    title=\"{{ 'loading' | i18n }}\"\n    aria-hidden=\"true\"\n  ></i>\n  <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n</ng-container>\n<form\n  #form\n  [formGroup]=\"formGroup\"\n  [appApiAction]=\"formPromise\"\n  (ngSubmit)=\"submit()\"\n  *ngIf=\"!loading\"\n>\n  <div class=\"tw-container tw-mb-3\">\n    <div class=\"tw-mb-6\">\n      <h2 class=\"tw-mb-3 tw-text-base tw-font-semibold\">{{ \"billingPlanLabel\" | i18n }}</h2>\n      <div class=\"tw-mb-1 tw-items-center\" *ngIf=\"annualPlan !== null\">\n        <label class=\"tw- tw-block tw-text-main\" for=\"annual\">\n          <input\n            class=\"tw-h-4 tw-w-4 tw-align-middle\"\n            id=\"annual\"\n            name=\"cadence\"\n            type=\"radio\"\n            [value]=\"annualCadence\"\n            formControlName=\"cadence\"\n          />\n          {{ \"annual\" | i18n }} -\n          {{ getPriceFor(annualCadence) | currency: \"$\" }}\n          /{{ \"yr\" | i18n }}\n        </label>\n      </div>\n      <div class=\"tw-mb-1 tw-items-center\" *ngIf=\"monthlyPlan !== null\">\n        <label class=\"tw- tw-block tw-text-main\" for=\"monthly\">\n          <input\n            class=\"tw-h-4 tw-w-4 tw-align-middle\"\n            id=\"monthly\"\n            name=\"cadence\"\n            type=\"radio\"\n            [value]=\"monthlyCadence\"\n            formControlName=\"cadence\"\n          />\n          {{ \"monthly\" | i18n }} -\n          {{ getPriceFor(monthlyCadence) | currency: \"$\" }}\n          /{{ \"monthAbbr\" | i18n }}\n        </label>\n      </div>\n    </div>\n    <div class=\"tw-mb-4\">\n      <h2 class=\"tw-mb-3 tw-text-base tw-font-semibold\">{{ \"paymentType\" | i18n }}</h2>\n      <app-payment\n        *ngIf=\"!deprecateStripeSourcesAPI\"\n        [hideCredit]=\"true\"\n        [trialFlow]=\"true\"\n      ></app-payment>\n      <app-payment-v2\n        *ngIf=\"deprecateStripeSourcesAPI\"\n        [showAccountCredit]=\"false\"\n      ></app-payment-v2>\n      <app-tax-info [trialFlow]=\"true\" (countryChanged)=\"changedCountry()\"></app-tax-info>\n    </div>\n    <div class=\"tw-flex tw-space-x-2\">\n      <button type=\"submit\" buttonType=\"primary\" bitButton [loading]=\"form.loading\">\n        {{ \"startTrial\" | i18n }}\n      </button>\n      <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"stepBack()\">Back</button>\n    </div>\n  </div>\n</form>\n","<ng-template>\n  <div\n    class=\"tw-inline-block tw-w-11/12 tw-pl-7\"\n    [ngClass]=\"{\n      'tw-border-0 tw-border-l tw-border-solid tw-border-secondary-300': applyBorder,\n      'tw-pt-6': addSubLabelSpacing,\n    }\"\n  >\n    <ng-content></ng-content>\n  </div>\n</ng-template>\n","import { CdkStep } from \"@angular/cdk/stepper\";\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"app-vertical-step\",\n  templateUrl: \"vertical-step.component.html\",\n  providers: [{ provide: CdkStep, useExisting: VerticalStep }],\n})\nexport class VerticalStep extends CdkStep {\n  @Input() subLabel = \"\";\n  @Input() applyBorder = true;\n  @Input() addSubLabelSpacing = false;\n}\n","<!-- eslint-disable tailwindcss/no-custom-classname -->\n<div class=\"tw-m-2.5 tw-h-16 tw-text-center\">\n  <button\n    type=\"button\"\n    (click)=\"selectStep()\"\n    [disabled]=\"disabled\"\n    class=\"tw-flex tw-w-full tw-items-center tw-border-none tw-bg-transparent\"\n    [ngClass]=\"{\n      'hover:tw-bg-secondary-100': !disabled && step.editable,\n    }\"\n    [attr.aria-expanded]=\"selected\"\n  >\n    <span\n      class=\"tw-mr-3.5 tw-w-9 tw-rounded-full tw-font-bold tw-leading-9\"\n      *ngIf=\"!step.completed\"\n      [ngClass]=\"{\n        'tw-bg-primary-600 tw-text-contrast': selected,\n        'tw-bg-secondary-300 tw-text-main': !selected && !disabled && step.editable,\n        'tw-bg-transparent tw-text-muted': disabled,\n      }\"\n    >\n      {{ stepNumber }}\n    </span>\n    <span\n      class=\"tw-mr-3.5 tw-w-9 tw-rounded-full tw-bg-primary-600 tw-font-bold tw-leading-9 tw-text-contrast\"\n      *ngIf=\"step.completed\"\n    >\n      <i class=\"bwi bwi-fw bwi-check tw-p-1\" aria-hidden=\"true\"></i>\n    </span>\n    <div\n      class=\"tw-txt-main tw-mt-3.5 tw-h-12 tw-text-left tw-leading-snug\"\n      [ngClass]=\"{\n        'tw-font-bold': selected,\n      }\"\n    >\n      <p\n        class=\"main-label text tw-mb-1 tw-text-main\"\n        [ngClass]=\"{\n          'tw-mt-1': !step.subLabel,\n        }\"\n      >\n        {{ step.label }}\n      </p>\n      <p class=\"sub-label small tw-text-muted\">{{ step.subLabel }}</p>\n    </div>\n  </button>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { VerticalStep } from \"./vertical-step.component\";\n\n@Component({\n  selector: \"app-vertical-step-content\",\n  templateUrl: \"vertical-step-content.component.html\",\n})\nexport class VerticalStepContentComponent {\n  @Output() onSelectStep = new EventEmitter<void>();\n\n  @Input() disabled = false;\n  @Input() selected = false;\n  @Input() step: VerticalStep;\n  @Input() stepNumber: number;\n\n  selectStep() {\n    this.onSelectStep.emit();\n  }\n}\n","<div>\n  <ul class=\"tw-flex tw-list-none tw-flex-col tw-flex-wrap tw-p-5\">\n    <li *ngFor=\"let step of steps; let i = index; let isLast = last\">\n      <app-vertical-step-content\n        [disabled]=\"isStepDisabled(i)\"\n        [selected]=\"selectedIndex === i\"\n        [step]=\"step\"\n        [stepNumber]=\"i + 1\"\n        (onSelectStep)=\"selectStepByIndex(i)\"\n      ></app-vertical-step-content>\n      <div\n        class=\"tw-inline-block tw-pl-7\"\n        *ngIf=\"selectedIndex === i\"\n        [ngTemplateOutlet]=\"selected ? selected.content : null\"\n      ></div>\n      <div\n        class=\"tw-ml-8 tw-h-6 tw-border-0 tw-border-l tw-border-solid tw-border-secondary-300\"\n        *ngIf=\"!isLast && !(selectedIndex === i)\"\n      ></div>\n    </li>\n  </ul>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CdkStepper } from \"@angular/cdk/stepper\";\nimport { Component, Input, QueryList } from \"@angular/core\";\n\nimport { VerticalStep } from \"./vertical-step.component\";\n\n@Component({\n  selector: \"app-vertical-stepper\",\n  templateUrl: \"vertical-stepper.component.html\",\n  providers: [{ provide: CdkStepper, useExisting: VerticalStepperComponent }],\n})\nexport class VerticalStepperComponent extends CdkStepper {\n  readonly steps: QueryList<VerticalStep>;\n\n  @Input()\n  activeClass = \"active\";\n\n  isNextButtonHidden() {\n    return !(this.steps.length === this.selectedIndex + 1);\n  }\n\n  isStepDisabled(index: number) {\n    if (this.selectedIndex !== index) {\n      return this.selectedIndex === index - 1\n        ? !this.steps.find((_, i) => i == index - 1)?.completed\n        : true;\n    }\n    return false;\n  }\n\n  selectStepByIndex(index: number): void {\n    this.selectedIndex = index;\n  }\n}\n","<div class=\"tw-pb-6 tw-pl-6\">\n  <p class=\"tw-text-xl\" *ngIf=\"product === Product.PasswordManager\">\n    {{ \"trialThankYou\" | i18n: orgLabel }}\n  </p>\n  <p class=\"tw-text-xl\" *ngIf=\"product === Product.SecretsManager\">\n    {{ \"smFreeTrialThankYou\" | i18n }}\n  </p>\n  <ul class=\"tw-list-disc\">\n    <li>\n      <p>\n        {{ \"trialConfirmationEmail\" | i18n }}\n        <span class=\"tw-font-bold\">{{ email }}</span\n        >.\n      </p>\n    </li>\n    <li>\n      <p>\n        {{ \"trialPaidInfoMessage\" | i18n: orgLabel }}\n      </p>\n    </li>\n  </ul>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { ProductType } from \"@bitwarden/common/billing/enums\";\n\n@Component({\n  selector: \"app-trial-confirmation-details\",\n  templateUrl: \"confirmation-details.component.html\",\n})\nexport class ConfirmationDetailsComponent {\n  @Input() email: string;\n  @Input() orgLabel: string;\n  @Input() product?: ProductType = ProductType.PasswordManager;\n\n  protected readonly Product = ProductType;\n}\n","<div *ngIf=\"!useTrialStepper\">\n  <auth-input-password\n    [email]=\"email\"\n    [masterPasswordPolicyOptions]=\"enforcedPolicyOptions\"\n    (onPasswordFormSubmit)=\"handlePasswordSubmit($event)\"\n    [buttonText]=\"'createAccount' | i18n\"\n  ></auth-input-password>\n</div>\n<div *ngIf=\"useTrialStepper\">\n  <app-vertical-stepper #stepper linear (selectionChange)=\"verticalStepChange($event)\">\n    <app-vertical-step label=\"Create Account\" [editable]=\"false\" [subLabel]=\"email\">\n      <auth-input-password\n        [email]=\"email\"\n        [masterPasswordPolicyOptions]=\"enforcedPolicyOptions\"\n        (onPasswordFormSubmit)=\"handlePasswordSubmit($event)\"\n        [buttonText]=\"'createAccount' | i18n\"\n      ></auth-input-password>\n    </app-vertical-step>\n    <app-vertical-step label=\"Organization Information\" [subLabel]=\"orgInfoSubLabel\">\n      <app-org-info [nameOnly]=\"true\" [formGroup]=\"orgInfoFormGroup\"></app-org-info>\n      <button\n        type=\"button\"\n        bitButton\n        buttonType=\"primary\"\n        [disabled]=\"orgInfoFormGroup.controls.name.invalid\"\n        [loading]=\"loading && (trialPaymentOptional$ | async)\"\n        (click)=\"orgNameEntrySubmit()\"\n      >\n        {{ (trialPaymentOptional$ | async) ? (\"startTrial\" | i18n) : (\"next\" | i18n) }}\n      </button>\n    </app-vertical-step>\n    <app-vertical-step\n      label=\"Billing\"\n      [subLabel]=\"billingSubLabel\"\n      *ngIf=\"!(trialPaymentOptional$ | async) && !isSecretsManagerFree\"\n    >\n      <app-trial-billing-step\n        *ngIf=\"stepper.selectedIndex === 2\"\n        [organizationInfo]=\"{\n          name: orgInfoFormGroup.value.name,\n          email: orgInfoFormGroup.value.billingEmail,\n          type: trialOrganizationType,\n        }\"\n        [subscriptionProduct]=\"\n          product === ProductType.SecretsManager\n            ? SubscriptionProduct.SecretsManager\n            : SubscriptionProduct.PasswordManager\n        \"\n        (steppedBack)=\"previousStep()\"\n        (organizationCreated)=\"createdOrganization($event)\"\n      >\n      </app-trial-billing-step>\n    </app-vertical-step>\n    <app-vertical-step label=\"Confirmation Details\" [applyBorder]=\"false\">\n      <app-trial-confirmation-details\n        [email]=\"email\"\n        [orgLabel]=\"orgLabel\"\n        [product]=\"this.product\"\n      ></app-trial-confirmation-details>\n      <div class=\"tw-mb-3 tw-flex\">\n        <a\n          type=\"button\"\n          bitButton\n          buttonType=\"primary\"\n          [routerLink]=\"\n            product === ProductType.SecretsManager\n              ? ['/sm', orgId]\n              : ['/organizations', orgId, 'vault']\n          \"\n        >\n          {{ \"getStarted\" | i18n | titlecase }}\n        </a>\n        <a\n          type=\"button\"\n          bitButton\n          buttonType=\"secondary\"\n          [routerLink]=\"['/organizations', orgId, 'members']\"\n          class=\"tw-ml-3 tw-inline-flex tw-items-center tw-px-3\"\n        >\n          {{ \"inviteUsers\" | i18n }}\n        </a>\n      </div>\n    </app-vertical-step>\n  </app-vertical-stepper>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { StepperSelectionEvent } from \"@angular/cdk/stepper\";\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, Subject, takeUntil } from \"rxjs\";\n\nimport { PasswordInputResult, RegistrationFinishService } from \"@bitwarden/auth/angular\";\nimport { LoginStrategyServiceAbstraction, PasswordLoginCredentials } from \"@bitwarden/auth/common\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport {\n  OrganizationBillingServiceAbstraction as OrganizationBillingService,\n  OrganizationInformation,\n  PlanInformation,\n} from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PlanType, ProductTierType, ProductType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport {\n  OrganizationCreatedEvent,\n  SubscriptionProduct,\n  TrialOrganizationType,\n} from \"../../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { RouterService } from \"../../../core/router.service\";\nimport { AcceptOrganizationInviteService } from \"../../organization-invite/accept-organization.service\";\nimport { VerticalStepperComponent } from \"../vertical-stepper/vertical-stepper.component\";\n\nexport type InitiationPath =\n  | \"Password Manager trial from marketing website\"\n  | \"Secrets Manager trial from marketing website\";\n\n@Component({\n  selector: \"app-complete-trial-initiation\",\n  templateUrl: \"complete-trial-initiation.component.html\",\n})\nexport class CompleteTrialInitiationComponent implements OnInit, OnDestroy {\n  @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n\n  /** Password Manager or Secrets Manager */\n  product: ProductType;\n  /** The tier of product being subscribed to */\n  productTier: ProductTierType;\n  /** Product types that display steppers for Password Manager */\n  stepperProductTypes: ProductTierType[] = [\n    ProductTierType.Teams,\n    ProductTierType.Enterprise,\n    ProductTierType.Families,\n  ];\n\n  /** Display multi-step trial flow when true */\n  useTrialStepper = false;\n\n  /** True, registering a password is in progress */\n  submitting = false;\n\n  /** Valid product types, used to filter out invalid query parameters */\n  validProducts = [ProductType.PasswordManager, ProductType.SecretsManager];\n\n  orgInfoSubLabel = \"\";\n  orgId = \"\";\n  orgLabel = \"\";\n  billingSubLabel = \"\";\n  enforcedPolicyOptions: MasterPasswordPolicyOptions;\n\n  /** User's email address associated with the trial */\n  email = \"\";\n  /** Token from the backend associated with the email verification */\n  emailVerificationToken: string;\n  loading = false;\n  productTierValue: number;\n\n  orgInfoFormGroup = this.formBuilder.group({\n    name: [\"\", { validators: [Validators.required, Validators.maxLength(50)], updateOn: \"change\" }],\n    billingEmail: [\"\"],\n  });\n\n  private destroy$ = new Subject<void>();\n  protected readonly SubscriptionProduct = SubscriptionProduct;\n  protected readonly ProductType = ProductType;\n  protected trialPaymentOptional$ = this.configService.getFeatureFlag$(\n    FeatureFlag.TrialPaymentOptional,\n  );\n\n  constructor(\n    protected router: Router,\n    private route: ActivatedRoute,\n    private formBuilder: FormBuilder,\n    private logService: LogService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private policyService: PolicyService,\n    private i18nService: I18nService,\n    private routerService: RouterService,\n    private organizationBillingService: OrganizationBillingService,\n    private acceptOrganizationInviteService: AcceptOrganizationInviteService,\n    private toastService: ToastService,\n    private registrationFinishService: RegistrationFinishService,\n    private validationService: ValidationService,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private configService: ConfigService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n      // Retrieve email from query params\n      if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n        this.email = qParams.email;\n        this.orgInfoFormGroup.controls.billingEmail.setValue(qParams.email);\n      }\n\n      // Show email validation toast when coming from email\n      if (qParams.fromEmail && qParams.fromEmail === \"true\") {\n        this.toastService.showToast({\n          title: null,\n          message: this.i18nService.t(\"emailVerifiedV2\"),\n          variant: \"success\",\n        });\n      }\n\n      if (qParams.token != null) {\n        this.emailVerificationToken = qParams.token;\n      }\n\n      const product = parseInt(qParams.product);\n\n      // Get product from query params, default to password manager\n      this.product = this.validProducts.includes(product) ? product : ProductType.PasswordManager;\n\n      const productTierParam = parseInt(qParams.productTier) as ProductTierType;\n      this.productTierValue = productTierParam;\n\n      /** Only show the trial stepper for a subset of types */\n      const showPasswordManagerStepper = this.stepperProductTypes.includes(productTierParam);\n\n      /** All types of secret manager should see the trial stepper */\n      const showSecretsManagerStepper = this.product === ProductType.SecretsManager;\n\n      if ((showPasswordManagerStepper || showSecretsManagerStepper) && !isNaN(productTierParam)) {\n        this.productTier = productTierParam;\n\n        this.orgLabel = this.planTypeDisplay;\n\n        this.useTrialStepper = true;\n      }\n\n      // Are they coming from an email for sponsoring a families organization\n      // After logging in redirect them to setup the families sponsorship\n      this.setupFamilySponsorship(qParams.sponsorshipToken);\n    });\n\n    const invite = await this.acceptOrganizationInviteService.getOrganizationInvite();\n    let policies: Policy[] | null = null;\n\n    if (invite != null) {\n      try {\n        policies = await this.policyApiService.getPoliciesByToken(\n          invite.organizationId,\n          invite.token,\n          invite.email,\n          invite.organizationUserId,\n        );\n      } catch (e) {\n        this.logService.error(e);\n      }\n    }\n\n    if (policies !== null) {\n      this.policyService\n        .masterPasswordPolicyOptions$(policies)\n        .pipe(takeUntil(this.destroy$))\n        .subscribe((enforcedPasswordPolicyOptions) => {\n          this.enforcedPolicyOptions = enforcedPasswordPolicyOptions;\n        });\n    }\n\n    this.orgInfoFormGroup.controls.name.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.orgInfoFormGroup.controls.name.markAsTouched();\n      });\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  /** Handle manual stepper change */\n  verticalStepChange(event: StepperSelectionEvent) {\n    if (event.selectedIndex === 1 && this.orgInfoFormGroup.controls.name.value === \"\") {\n      this.orgInfoSubLabel = this.planInfoLabel;\n    } else if (event.previouslySelectedIndex === 1) {\n      this.orgInfoSubLabel = this.orgInfoFormGroup.controls.name.value;\n    }\n  }\n\n  async orgNameEntrySubmit(): Promise<void> {\n    const isTrialPaymentOptional = await firstValueFrom(this.trialPaymentOptional$);\n\n    if (isTrialPaymentOptional) {\n      await this.createOrganizationOnTrial();\n    } else {\n      await this.conditionallyCreateOrganization();\n    }\n  }\n\n  /** Update local details from organization created event */\n  createdOrganization(event: OrganizationCreatedEvent) {\n    this.orgId = event.organizationId;\n    this.billingSubLabel = event.planDescription;\n    this.verticalStepper.next();\n  }\n\n  /** create an organization on trial without payment method */\n  async createOrganizationOnTrial() {\n    this.loading = true;\n    let trialInitiationPath: InitiationPath = \"Password Manager trial from marketing website\";\n    let plan: PlanInformation = {\n      type: this.getPlanType(),\n      passwordManagerSeats: 1,\n    };\n\n    if (this.product === ProductType.SecretsManager) {\n      trialInitiationPath = \"Secrets Manager trial from marketing website\";\n      plan = {\n        ...plan,\n        subscribeToSecretsManager: true,\n        isFromSecretsManagerTrial: true,\n        secretsManagerSeats: 1,\n      };\n    }\n\n    const organization: OrganizationInformation = {\n      name: this.orgInfoFormGroup.value.name,\n      billingEmail: this.orgInfoFormGroup.value.billingEmail,\n      initiationPath: trialInitiationPath,\n    };\n\n    const response = await this.organizationBillingService.purchaseSubscriptionNoPaymentMethod({\n      organization,\n      plan,\n    });\n\n    this.orgId = response?.id;\n    this.billingSubLabel = response.name.toString();\n    this.loading = false;\n    this.verticalStepper.next();\n  }\n\n  /** Move the user to the previous step */\n  previousStep() {\n    this.verticalStepper.previous();\n  }\n\n  getPlanType() {\n    switch (this.productTier) {\n      case ProductTierType.Teams:\n        return PlanType.TeamsAnnually;\n      case ProductTierType.Enterprise:\n        return PlanType.EnterpriseAnnually;\n      case ProductTierType.Families:\n        return PlanType.FamiliesAnnually;\n      case ProductTierType.Free:\n        return PlanType.Free;\n      default:\n        return PlanType.EnterpriseAnnually;\n    }\n  }\n\n  get isSecretsManagerFree() {\n    return this.product === ProductType.SecretsManager && this.productTier === ProductTierType.Free;\n  }\n\n  get planTypeDisplay() {\n    switch (this.productTier) {\n      case ProductTierType.Teams:\n        return \"Teams\";\n      case ProductTierType.Enterprise:\n        return \"Enterprise\";\n      case ProductTierType.Families:\n        return \"Families\";\n      default:\n        return \"\";\n    }\n  }\n\n  get planInfoLabel() {\n    switch (this.productTier) {\n      case ProductTierType.Teams:\n        return this.i18nService.t(\"enterTeamsOrgInfo\");\n      case ProductTierType.Enterprise:\n        return this.i18nService.t(\"enterEnterpriseOrgInfo\");\n      case ProductTierType.Families:\n        return this.i18nService.t(\"enterFamiliesOrgInfo\");\n      default:\n        return \"\";\n    }\n  }\n\n  get trialOrganizationType(): TrialOrganizationType {\n    if (this.productTier === ProductTierType.Free) {\n      return null;\n    }\n\n    return this.productTier;\n  }\n\n  /** Create an organization unless the trial is for secrets manager */\n  async conditionallyCreateOrganization(): Promise<void> {\n    if (!this.isSecretsManagerFree) {\n      this.verticalStepper.next();\n      return;\n    }\n\n    const response = await this.organizationBillingService.startFree({\n      organization: {\n        name: this.orgInfoFormGroup.value.name,\n        billingEmail: this.orgInfoFormGroup.value.billingEmail,\n      },\n      plan: {\n        type: 0,\n        subscribeToSecretsManager: true,\n        isFromSecretsManagerTrial: true,\n      },\n    });\n\n    this.orgId = response.id;\n    this.verticalStepper.next();\n  }\n\n  /**\n   * Complete the users registration with their password.\n   *\n   * When a the trial stepper isn't used, redirect the user to the login page.\n   */\n  async handlePasswordSubmit(passwordInputResult: PasswordInputResult) {\n    if (!this.useTrialStepper) {\n      await this.finishRegistration(passwordInputResult);\n      this.submitting = false;\n\n      await this.router.navigate([\"/login\"], { queryParams: { email: this.email } });\n      return;\n    }\n\n    const captchaToken = await this.finishRegistration(passwordInputResult);\n\n    if (captchaToken == null) {\n      this.submitting = false;\n      return;\n    }\n\n    await this.logIn(passwordInputResult.password, captchaToken);\n\n    this.submitting = false;\n\n    this.verticalStepper.next();\n  }\n\n  private setupFamilySponsorship(sponsorshipToken: string) {\n    if (sponsorshipToken != null) {\n      const route = this.router.createUrlTree([\"setup/families-for-enterprise\"], {\n        queryParams: { plan: sponsorshipToken },\n      });\n      this.routerService.setPreviousUrl(route.toString());\n    }\n  }\n\n  /** Logs the user in based using the token received by the `finishRegistration` method */\n  private async logIn(masterPassword: string, captchaBypassToken: string): Promise<void> {\n    const credentials = new PasswordLoginCredentials(\n      this.email,\n      masterPassword,\n      captchaBypassToken,\n      null,\n    );\n\n    await this.loginStrategyService.logIn(credentials);\n  }\n\n  finishRegistration(passwordInputResult: PasswordInputResult) {\n    this.submitting = true;\n    return this.registrationFinishService\n      .finishRegistration(this.email, passwordInputResult, this.emailVerificationToken)\n      .catch((e) => {\n        this.validationService.showError(e);\n        this.submitting = false;\n        return null;\n      });\n  }\n}\n","import { ActivatedRouteSnapshot, ResolveFn } from \"@angular/router\";\n\nimport { ProductType } from \"@bitwarden/common/billing/enums\";\nimport { Translation } from \"@bitwarden/components\";\n\nexport const freeTrialTextResolver: ResolveFn<Translation | null> = (\n  route: ActivatedRouteSnapshot,\n): Translation | null => {\n  const { product } = route.queryParams;\n  const products: ProductType[] = (product ?? \"\").split(\",\").map((p: string) => parseInt(p));\n\n  const onlyPasswordManager = products.length === 1 && products[0] === ProductType.PasswordManager;\n  const onlySecretsManager = products.length === 1 && products[0] === ProductType.SecretsManager;\n\n  switch (true) {\n    case onlyPasswordManager:\n      return {\n        key: \"continueSettingUpFreeTrialPasswordManager\",\n      };\n    case onlySecretsManager:\n      return {\n        key: \"continueSettingUpFreeTrialSecretsManager\",\n      };\n    default:\n      return {\n        key: \"continueSettingUpFreeTrial\",\n      };\n  }\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport type InitiationPath =\n  | \"Registration form\"\n  | \"Password Manager trial from marketing website\"\n  | \"Secrets Manager trial from marketing website\"\n  | \"New organization creation in-product\"\n  | \"Upgrade in-product\";\n\nexport class ReferenceEventRequest {\n  id: string;\n  session: string;\n  layout: string;\n  flow: string;\n  initiationPath: InitiationPath;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KdfType } from \"@bitwarden/key-management\";\n\nimport { CaptchaProtectedRequest } from \"../../auth/models/request/captcha-protected.request\";\n\nimport { KeysRequest } from \"./keys.request\";\nimport { ReferenceEventRequest } from \"./reference-event.request\";\n\nexport class RegisterRequest implements CaptchaProtectedRequest {\n  masterPasswordHint: string;\n  keys: KeysRequest;\n  token: string;\n  organizationUserId: string;\n\n  constructor(\n    public email: string,\n    public name: string,\n    public masterPasswordHash: string,\n    masterPasswordHint: string,\n    public key: string,\n    public referenceData: ReferenceEventRequest,\n    public captchaResponse: string,\n    public kdf: KdfType,\n    public kdfIterations: number,\n    public kdfMemory?: number,\n    public kdfParallelism?: number,\n  ) {\n    this.masterPasswordHint = masterPasswordHint ? masterPasswordHint : null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { AbstractControl, UntypedFormBuilder, ValidatorFn, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { LoginStrategyServiceAbstraction, PasswordLoginCredentials } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { RegisterResponse } from \"@bitwarden/common/auth/models/response/register.response\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { RegisterRequest } from \"@bitwarden/common/models/request/register.request\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { DEFAULT_KDF_CONFIG, KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  AllValidationErrors,\n  FormValidationErrorsService,\n} from \"../../platform/abstractions/form-validation-errors.service\";\nimport { PasswordColorText } from \"../../tools/password-strength/password-strength.component\";\nimport { InputsFieldMatch } from \"../validators/inputs-field-match.validator\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class RegisterComponent extends CaptchaProtectedComponent implements OnInit {\n  @Input() isInTrialFlow = false;\n  @Output() createdAccount = new EventEmitter<string>();\n\n  showPassword = false;\n  formPromise: Promise<RegisterResponse>;\n  referenceData: ReferenceEventRequest;\n  showTerms = true;\n  showErrorSummary = false;\n  passwordStrengthResult: any;\n  characterMinimumMessage: string;\n  minimumLength = Utils.minimumPasswordLength;\n  color: string;\n  text: string;\n\n  formGroup = this.formBuilder.group(\n    {\n      email: [\"\", [Validators.required, Validators.email]],\n      name: [\"\"],\n      masterPassword: [\"\", [Validators.required, Validators.minLength(this.minimumLength)]],\n      confirmMasterPassword: [\"\", [Validators.required, Validators.minLength(this.minimumLength)]],\n      hint: [\n        null,\n        [\n          InputsFieldMatch.validateInputsDoesntMatch(\n            \"masterPassword\",\n            this.i18nService.t(\"hintEqualsPassword\"),\n          ),\n        ],\n      ],\n      checkForBreaches: [true],\n      acceptPolicies: [false, [this.acceptPoliciesValidation()]],\n    },\n    {\n      validator: InputsFieldMatch.validateFormInputsMatch(\n        \"masterPassword\",\n        \"confirmMasterPassword\",\n        this.i18nService.t(\"masterPassDoesntMatch\"),\n      ),\n    },\n  );\n\n  protected successRoute = \"login\";\n\n  protected accountCreated = false;\n\n  protected captchaBypassToken: string = null;\n\n  // allows for extending classes to modify the register request before sending\n  // currently used by web to add organization invitation details\n  protected modifyRegisterRequest: (request: RegisterRequest) => Promise<void>;\n\n  constructor(\n    protected formValidationErrorService: FormValidationErrorsService,\n    protected formBuilder: UntypedFormBuilder,\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    i18nService: I18nService,\n    protected keyService: KeyService,\n    protected apiService: ApiService,\n    protected stateService: StateService,\n    platformUtilsService: PlatformUtilsService,\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    environmentService: EnvironmentService,\n    protected logService: LogService,\n    protected auditService: AuditService,\n    protected dialogService: DialogService,\n    protected toastService: ToastService,\n  ) {\n    super(environmentService, i18nService, platformUtilsService, toastService);\n    this.showTerms = !platformUtilsService.isSelfHost();\n    this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n  }\n\n  async ngOnInit() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.setupCaptcha();\n  }\n\n  async submit(showToast = true) {\n    if (typeof crypto.subtle === \"undefined\") {\n      this.platformUtilsService.showToast(\n        \"error\",\n        \"This browser requires HTTPS to use the web vault\",\n        \"Check the Vaultwarden wiki for details on how to enable it\",\n      );\n      return;\n    }\n    let email = this.formGroup.value.email;\n    email = email.trim().toLowerCase();\n    let name = this.formGroup.value.name;\n    name = name === \"\" ? null : name; // Why do we do this?\n    const masterPassword = this.formGroup.value.masterPassword;\n    try {\n      if (!this.accountCreated) {\n        const registerResponse = await this.registerAccount(\n          await this.buildRegisterRequest(email, masterPassword, name),\n          showToast,\n        );\n        if (!registerResponse.successful) {\n          return;\n        }\n        this.captchaBypassToken = registerResponse.captchaBypassToken;\n        this.accountCreated = true;\n      }\n      if (this.isInTrialFlow) {\n        if (!this.accountCreated) {\n          this.toastService.showToast({\n            variant: \"success\",\n            title: null,\n            message: this.i18nService.t(\"trialAccountCreated\"),\n          });\n        }\n        const loginResponse = await this.logIn(email, masterPassword, this.captchaBypassToken);\n        if (loginResponse.captchaRequired) {\n          return;\n        }\n        this.createdAccount.emit(this.formGroup.value.email);\n      } else {\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"newAccountCreated\"),\n        });\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.router.navigate([this.successRoute], { queryParams: { email: email } });\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  togglePassword() {\n    this.showPassword = !this.showPassword;\n  }\n\n  getStrengthResult(result: any) {\n    this.passwordStrengthResult = result;\n  }\n\n  getPasswordScoreText(event: PasswordColorText) {\n    this.color = event.color;\n    this.text = event.text;\n  }\n\n  private getErrorToastMessage() {\n    const error: AllValidationErrors = this.formValidationErrorService\n      .getFormValidationErrors(this.formGroup.controls)\n      .shift();\n\n    if (error) {\n      switch (error.errorName) {\n        case \"email\":\n          return this.i18nService.t(\"invalidEmail\");\n        case \"inputsDoesntMatchError\":\n          return this.i18nService.t(\"masterPassDoesntMatch\");\n        case \"inputsMatchError\":\n          return this.i18nService.t(\"hintEqualsPassword\");\n        case \"minlength\":\n          return this.i18nService.t(\"masterPasswordMinlength\", Utils.minimumPasswordLength);\n        default:\n          return this.i18nService.t(this.errorTag(error));\n      }\n    }\n\n    return;\n  }\n\n  private errorTag(error: AllValidationErrors): string {\n    const name = error.errorName.charAt(0).toUpperCase() + error.errorName.slice(1);\n    return `${error.controlName}${name}`;\n  }\n\n  //validation would be ignored on selfhosted\n  private acceptPoliciesValidation(): ValidatorFn {\n    return (control: AbstractControl) => {\n      const ctrlValue = control.value;\n\n      return !ctrlValue && this.showTerms ? { required: true } : null;\n    };\n  }\n\n  private async validateRegistration(showToast: boolean): Promise<{ isValid: boolean }> {\n    this.formGroup.markAllAsTouched();\n    this.showErrorSummary = true;\n\n    if (this.formGroup.get(\"acceptPolicies\").hasError(\"required\")) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"acceptPoliciesRequired\"),\n      });\n      return { isValid: false };\n    }\n\n    //web\n    if (this.formGroup.invalid && !showToast) {\n      return { isValid: false };\n    }\n\n    //desktop, browser\n    if (this.formGroup.invalid && showToast) {\n      const errorText = this.getErrorToastMessage();\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: errorText,\n      });\n      return { isValid: false };\n    }\n\n    const passwordWeak =\n      this.passwordStrengthResult != null && this.passwordStrengthResult.score < 3;\n    const passwordLeak =\n      this.formGroup.controls.checkForBreaches.value &&\n      (await this.auditService.passwordLeaked(this.formGroup.controls.masterPassword.value)) > 0;\n\n    if (passwordWeak && passwordLeak) {\n      const result = await this.dialogService.openSimpleDialog({\n        title: { key: \"weakAndExposedMasterPassword\" },\n        content: { key: \"weakAndBreachedMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!result) {\n        return { isValid: false };\n      }\n    } else if (passwordWeak) {\n      const result = await this.dialogService.openSimpleDialog({\n        title: { key: \"weakMasterPassword\" },\n        content: { key: \"weakMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!result) {\n        return { isValid: false };\n      }\n    } else if (passwordLeak) {\n      const result = await this.dialogService.openSimpleDialog({\n        title: { key: \"exposedMasterPassword\" },\n        content: { key: \"exposedMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!result) {\n        return { isValid: false };\n      }\n    }\n\n    return { isValid: true };\n  }\n\n  private async buildRegisterRequest(\n    email: string,\n    masterPassword: string,\n    name: string,\n  ): Promise<RegisterRequest> {\n    const hint = this.formGroup.value.hint;\n    const kdfConfig = DEFAULT_KDF_CONFIG;\n    const key = await this.keyService.makeMasterKey(masterPassword, email, kdfConfig);\n    const newUserKey = await this.keyService.makeUserKey(key);\n    const masterKeyHash = await this.keyService.hashMasterKey(masterPassword, key);\n    const keys = await this.keyService.makeKeyPair(newUserKey[0]);\n    const request = new RegisterRequest(\n      email,\n      name,\n      masterKeyHash,\n      hint,\n      newUserKey[1].encryptedString,\n      this.referenceData,\n      this.captchaToken,\n      kdfConfig.kdfType,\n      kdfConfig.iterations,\n    );\n    request.keys = new KeysRequest(keys[0], keys[1].encryptedString);\n    if (this.modifyRegisterRequest) {\n      await this.modifyRegisterRequest(request);\n    }\n    return request;\n  }\n\n  private async registerAccount(\n    request: RegisterRequest,\n    showToast: boolean,\n  ): Promise<{ successful: boolean; captchaBypassToken?: string }> {\n    if (!(await this.validateRegistration(showToast)).isValid) {\n      return { successful: false };\n    }\n    this.formPromise = this.apiService.postRegister(request);\n    try {\n      const response = await this.formPromise;\n      return { successful: true, captchaBypassToken: response.captchaBypassToken };\n    } catch (e) {\n      if (this.handleCaptchaRequired(e)) {\n        return { successful: false };\n      } else {\n        throw e;\n      }\n    }\n  }\n\n  private async logIn(\n    email: string,\n    masterPassword: string,\n    captchaBypassToken: string,\n  ): Promise<{ captchaRequired: boolean }> {\n    const credentials = new PasswordLoginCredentials(\n      email,\n      masterPassword,\n      captchaBypassToken,\n      null,\n    );\n    const loginResponse = await this.loginStrategyService.logIn(credentials);\n    if (this.handleCaptchaRequired(loginResponse)) {\n      return { captchaRequired: true };\n    }\n    return { captchaRequired: false };\n  }\n}\n","<!-- Please remove this disable statement when editing this file! -->\n<!-- eslint-disable tailwindcss/no-custom-classname -->\n<form\n  #form\n  (ngSubmit)=\"submit()\"\n  [appApiAction]=\"formPromise\"\n  class=\"tw-container tw-mx-auto\"\n  [formGroup]=\"formGroup\"\n>\n  <div>\n    <div class=\"tw-mb-3\">\n      <bit-form-field>\n        <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n        <input\n          id=\"register-form_input_email\"\n          bitInput\n          type=\"email\"\n          formControlName=\"email\"\n          [attr.readonly]=\"queryParamFromOrgInvite ? true : null\"\n        />\n        <bit-hint>{{ \"emailAddressDesc\" | i18n }}</bit-hint>\n      </bit-form-field>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <bit-form-field>\n        <bit-label>{{ \"name\" | i18n }}</bit-label>\n        <input id=\"register-form_input_name\" bitInput type=\"text\" formControlName=\"name\" />\n        <bit-hint>{{ \"yourNameDesc\" | i18n }}</bit-hint>\n      </bit-form-field>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <auth-password-callout [policy]=\"enforcedPolicyOptions\" *ngIf=\"enforcedPolicyOptions\">\n      </auth-password-callout>\n      <bit-form-field>\n        <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n        <input\n          id=\"register-form_input_master-password\"\n          bitInput\n          type=\"password\"\n          formControlName=\"masterPassword\"\n        />\n        <button\n          type=\"button\"\n          bitSuffix\n          bitIconButton\n          bitPasswordInputToggle\n          [(toggled)]=\"showPassword\"\n        ></button>\n        <bit-hint>\n          <span class=\"tw-font-semibold\">{{ \"important\" | i18n }}</span>\n          {{ \"masterPassImportant\" | i18n }} {{ characterMinimumMessage }}\n        </bit-hint>\n      </bit-form-field>\n      <app-password-strength\n        [password]=\"formGroup.get('masterPassword')?.value\"\n        [email]=\"formGroup.get('email')?.value\"\n        [name]=\"formGroup.get('name')?.value\"\n        [showText]=\"true\"\n        (passwordStrengthResult)=\"getStrengthResult($event)\"\n      >\n      </app-password-strength>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <bit-form-field>\n        <bit-label>{{ \"reTypeMasterPass\" | i18n }}</bit-label>\n        <input\n          id=\"register-form_input_confirm-master-password\"\n          bitInput\n          type=\"password\"\n          formControlName=\"confirmMasterPassword\"\n        />\n        <button\n          type=\"button\"\n          bitSuffix\n          bitIconButton\n          bitPasswordInputToggle\n          [(toggled)]=\"showPassword\"\n        ></button>\n      </bit-form-field>\n    </div>\n\n    <div class=\"tw-mb-3\">\n      <bit-form-field>\n        <bit-label>{{ \"masterPassHintLabel\" | i18n }}</bit-label>\n        <input id=\"register-form_input_hint\" bitInput type=\"text\" formControlName=\"hint\" />\n        <bit-hint>{{ \"masterPassHintDesc\" | i18n }}</bit-hint>\n      </bit-form-field>\n    </div>\n\n    <div [hidden]=\"!showCaptcha()\">\n      <iframe id=\"hcaptcha_iframe\" height=\"80\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n    </div>\n    <div class=\"tw-mb-4 tw-flex tw-items-start\">\n      <input\n        class=\"mt-1\"\n        type=\"checkbox\"\n        bitCheckbox\n        id=\"checkForBreaches\"\n        name=\"CheckBreach\"\n        formControlName=\"checkForBreaches\"\n      />\n      <bit-label for=\"checkForBreaches\"> {{ \"checkForBreaches\" | i18n }}</bit-label>\n    </div>\n    <div class=\"tw-mb-3 tw-flex tw-items-start\" *ngIf=\"showTerms\">\n      <input\n        class=\"mt-1\"\n        id=\"register-form-input-accept-policies\"\n        bitCheckbox\n        type=\"checkbox\"\n        formControlName=\"acceptPolicies\"\n      />\n\n      <bit-label for=\"register-form-input-accept-policies\">\n        {{ \"acceptPolicies\" | i18n }}<br />\n        <a bitLink href=\"https://bitwarden.com/terms/\" target=\"_blank\" rel=\"noreferrer\">{{\n          \"termsOfService\" | i18n\n        }}</a\n        >,\n        <a bitLink href=\"https://bitwarden.com/privacy/\" target=\"_blank\" rel=\"noreferrer\">{{\n          \"privacyPolicy\" | i18n\n        }}</a>\n      </bit-label>\n    </div>\n\n    <div class=\"tw-space-x-2 tw-pt-2\">\n      <ng-container *ngIf=\"!accountCreated\">\n        <button\n          [block]=\"true\"\n          type=\"submit\"\n          buttonType=\"primary\"\n          bitButton\n          [loading]=\"form.loading\"\n        >\n          {{ \"createAccount\" | i18n }}\n        </button>\n      </ng-container>\n      <ng-container *ngIf=\"accountCreated\">\n        <button\n          [block]=\"true\"\n          type=\"submit\"\n          buttonType=\"primary\"\n          bitButton\n          [loading]=\"form.loading\"\n        >\n          {{ \"logIn\" | i18n }}\n        </button>\n      </ng-container>\n    </div>\n    <p class=\"tw-m-0 tw-mt-5 tw-text-sm\">\n      {{ \"alreadyHaveAccount\" | i18n }}\n      <a bitLink routerLink=\"/login\">{{ \"logIn\" | i18n }}</a>\n    </p>\n    <bit-error-summary *ngIf=\"showErrorSummary\" [formGroup]=\"formGroup\"></bit-error-summary>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { RegisterComponent as BaseRegisterComponent } from \"@bitwarden/angular/auth/components/register.component\";\nimport { FormValidationErrorsService } from \"@bitwarden/angular/platform/abstractions/form-validation-errors.service\";\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { RegisterRequest } from \"@bitwarden/common/models/request/register.request\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\n\n@Component({\n  selector: \"app-register-form\",\n  templateUrl: \"./register-form.component.html\",\n})\nexport class RegisterFormComponent extends BaseRegisterComponent implements OnInit {\n  @Input() queryParamEmail: string;\n  @Input() queryParamFromOrgInvite: boolean;\n  @Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  @Input() referenceDataValue: ReferenceEventRequest;\n\n  showErrorSummary = false;\n  characterMinimumMessage: string;\n\n  constructor(\n    formValidationErrorService: FormValidationErrorsService,\n    formBuilder: UntypedFormBuilder,\n    loginStrategyService: LoginStrategyServiceAbstraction,\n    router: Router,\n    i18nService: I18nService,\n    keyService: KeyService,\n    apiService: ApiService,\n    stateService: StateService,\n    platformUtilsService: PlatformUtilsService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private policyService: PolicyService,\n    environmentService: EnvironmentService,\n    logService: LogService,\n    auditService: AuditService,\n    dialogService: DialogService,\n    acceptOrgInviteService: AcceptOrganizationInviteService,\n    toastService: ToastService,\n  ) {\n    super(\n      formValidationErrorService,\n      formBuilder,\n      loginStrategyService,\n      router,\n      i18nService,\n      keyService,\n      apiService,\n      stateService,\n      platformUtilsService,\n      passwordGenerationService,\n      environmentService,\n      logService,\n      auditService,\n      dialogService,\n      toastService,\n    );\n    this.modifyRegisterRequest = async (request: RegisterRequest) => {\n      // Org invites are deep linked. Non-existent accounts are redirected to the register page.\n      // Org user id and token are included here only for validation and two factor purposes.\n      const orgInvite = await acceptOrgInviteService.getOrganizationInvite();\n      if (orgInvite != null) {\n        request.organizationUserId = orgInvite.organizationUserId;\n        request.token = orgInvite.token;\n      }\n      // Invite is accepted after login (on deep link redirect).\n    };\n  }\n\n  async ngOnInit() {\n    await super.ngOnInit();\n    this.referenceData = this.referenceDataValue;\n    if (this.queryParamEmail) {\n      this.formGroup.get(\"email\")?.setValue(this.queryParamEmail);\n    }\n\n    if (this.enforcedPolicyOptions != null && this.enforcedPolicyOptions.minLength > 0) {\n      this.characterMinimumMessage = \"\";\n    } else {\n      this.characterMinimumMessage = this.i18nService.t(\"characterMinimum\", this.minimumLength);\n    }\n  }\n\n  async submit() {\n    if (\n      this.enforcedPolicyOptions != null &&\n      !this.policyService.evaluateMasterPassword(\n        this.passwordStrengthResult.score,\n        this.formGroup.value.masterPassword,\n        this.enforcedPolicyOptions,\n      )\n    ) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n      });\n      return;\n    }\n\n    await super.submit(false);\n  }\n}\n","<div class=\"tw-mb-1\" *ngIf=\"showRegionSelector\">\n  <bit-menu #environmentOptions>\n    <a\n      *ngFor=\"let region of availableRegions\"\n      bitMenuItem\n      [attr.href]=\"\n        region == currentRegion ? 'javascript:void(0)' : region.urls.webVault + routeAndParams\n      \"\n      class=\"pr-4\"\n    >\n      <i\n        class=\"bwi bwi-fw bwi-sm bwi-check pb-1\"\n        aria-hidden=\"true\"\n        [style.visibility]=\"region == currentRegion ? 'visible' : 'hidden'\"\n      ></i>\n      {{ region.domain }}\n    </a>\n  </bit-menu>\n  <div>\n    {{ \"accessing\" | i18n }}:\n    <a [routerLink]=\"[]\" [bitMenuTriggerFor]=\"environmentOptions\">\n      <b>{{ currentRegion?.domain }}</b\n      ><i class=\"bwi bwi-fw bwi-sm bwi-angle-down\" aria-hidden=\"true\"></i>\n    </a>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport {\n  EnvironmentService,\n  RegionConfig,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\n@Component({\n  selector: \"environment-selector\",\n  templateUrl: \"environment-selector.component.html\",\n})\nexport class EnvironmentSelectorComponent implements OnInit {\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private environmentService: EnvironmentService,\n    private router: Router,\n  ) {}\n\n  protected availableRegions = this.environmentService.availableRegions();\n  protected currentRegion?: RegionConfig;\n\n  protected showRegionSelector = false;\n  protected routeAndParams: string;\n\n  async ngOnInit() {\n    this.showRegionSelector = !this.platformUtilsService.isSelfHost();\n    this.routeAndParams = `/#${this.router.url}`;\n\n    const host = Utils.getHost(window.location.href);\n    this.currentRegion = this.availableRegions.find((r) => Utils.getHost(r.urls.webVault) === host);\n  }\n}\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-logo-badges\",\n  templateUrl: \"logo-badges.component.html\",\n})\nexport class LogoBadgesComponent {}\n","<figure>\n  <figcaption>\n    <cite>\n      <img\n        src=\"../../images/register-layout/vault-signup-badges.png\"\n        class=\"tw-mx-auto tw-block tw-w-full\"\n        alt=\"third party awards\"\n      />\n    </cite>\n  </figcaption>\n</figure>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-enterprise-content\",\n  templateUrl: \"enterprise-content.component.html\",\n})\nexport class EnterpriseContentComponent {}\n","<h1 class=\"tw-text-3xl !tw-text-alt2\">Start your 7-day Enterprise free trial</h1>\n<div class=\"tw-pt-20\">\n  <h2 class=\"tw-text-2xl\">\n    Bitwarden is the most trusted password manager designed for seamless administration and employee\n    usability.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0\">\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Instantly and securely share credentials with the groups and individuals who need them</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Strengthen company-wide security through centralized administrative control and\n      policies</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n      integrations</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Migrate to Bitwarden in minutes with comprehensive import options</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Give all Enterprise users the gift of 360º security with a free Families plan</span\n    >\n  </li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-badges></app-logo-badges>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-logo-forbes\",\n  templateUrl: \"logo-forbes.component.html\",\n})\nexport class LogoForbesComponent {}\n","<figure>\n  <figcaption>\n    <cite>\n      <img\n        src=\"../../images/register-layout/forbes-logo.svg\"\n        class=\"tw-mx-auto tw-block tw-w-40\"\n        alt=\"Forbes Logo\"\n      />\n    </cite>\n  </figcaption>\n  <blockquote class=\"tw-mx-auto tw-mt-2 tw-max-w-xl tw-px-4 tw-text-center\">\n    “Bitwarden boasts the backing of some of the world's best security experts and an attractive,\n    easy-to-use interface”\n  </blockquote>\n</figure>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-logo-us-news\",\n  templateUrl: \"logo-us-news.component.html\",\n})\nexport class LogoUSNewsComponent {}\n","<img\n  src=\"../../images/register-layout/usnews-360-badge.svg\"\n  class=\"tw-mx-auto tw-block tw-w-48\"\n  alt=\"US News 360 Reviews Best Password Manager\"\n/>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-teams-content\",\n  templateUrl: \"teams-content.component.html\",\n})\nexport class TeamsContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">The Bitwarden Password Manager</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Trusted by millions of individuals, teams, and organizations worldwide for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Store logins, secure notes, and more</li>\n  <li>Collaborate and share securely</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-forbes></app-logo-forbes>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-logo-company-testimonial\",\n  templateUrl: \"logo-company-testimonial.component.html\",\n})\nexport class LogoCompanyTestimonialComponent {}\n","<figure class=\"tw-text-center\">\n  <p class=\"tw-mx-auto tw-my-2 tw-max-w-xl tw-px-4 tw-text-center\">\n    Recommended by industry experts\n  </p>\n  <div class=\"tw-flex tw-flex-wrap tw-gap-8 tw-items-center tw-justify-center tw-mb-4\">\n    <div class=\"tw-flex tw-gap-8\">\n      <img src=\"../../images/register-layout/cnet-logo.svg\" class=\"tw-w-32\" alt=\"CNET Logo\" />\n      <img\n        src=\"../../images/register-layout/wired-logo.png\"\n        class=\"tw-w-32 tw-object-contain\"\n        alt=\"WIRED Logo\"\n      />\n    </div>\n    <div class=\"tw-flex tw-gap-8\">\n      <img\n        src=\"../../images/register-layout/new-york-times-logo.svg\"\n        class=\"tw-w-32\"\n        alt=\"New York Times Logo\"\n      />\n      <img src=\"../../images/register-layout/pcmag-logo.svg\" class=\"tw-w-32\" alt=\"PC Mag Logo\" />\n    </div>\n  </div>\n  <blockquote>\n    &ldquo;Bitwarden is currently CNET's top pick for the best password manager, thanks in part to\n    its commitment to transparency and its unbeatable free tier.&rdquo;\n  </blockquote>\n  <p class=\"tw-font-bold\">Best Password Manager in 2024</p>\n</figure>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-default-content\",\n  templateUrl: \"default-content.component.html\",\n})\nexport class DefaultContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">The Bitwarden Password Manager</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Trusted by millions of individuals, teams, and organizations worldwide for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Store logins, secure notes, and more</li>\n  <li>Collaborate and share securely</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28\">\n  <app-logo-company-testimonial></app-logo-company-testimonial>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-enterprise1-content\",\n  templateUrl: \"enterprise1-content.component.html\",\n})\nexport class Enterprise1ContentComponent {}\n","<h1 class=\"tw-text-3xl !tw-text-alt2\">Start your 7-day Enterprise free trial</h1>\n<div class=\"tw-pt-20\">\n  <h2 class=\"tw-text-2xl\">\n    Bitwarden is the most trusted password manager designed for seamless administration and employee\n    usability.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0\">\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Instantly and securely share credentials with the groups and individuals who need them</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Strengthen company-wide security through centralized administrative control and\n      policies</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n      integrations</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Migrate to Bitwarden in minutes with comprehensive import options</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Give all Enterprise users the gift of 360º security with a free Families plan</span\n    >\n  </li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-badges></app-logo-badges>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-enterprise2-content\",\n  templateUrl: \"enterprise2-content.component.html\",\n})\nexport class Enterprise2ContentComponent {}\n","<h1 class=\"tw-text-3xl !tw-text-alt2\">Start your 7-day Enterprise free trial</h1>\n<div class=\"tw-pt-20\">\n  <h2 class=\"tw-text-2xl\">\n    Bitwarden is the most trusted password manager designed for seamless administration and employee\n    usability.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0\">\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Instantly and securely share credentials with the groups and individuals who need them</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Strengthen company-wide security through centralized administrative control and\n      policies</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Streamline user onboarding and automate account provisioning with flexible SSO and SCIM\n      integrations</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Migrate to Bitwarden in minutes with comprehensive import options</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Give all Enterprise users the gift of 360º security with a free Families plan</span\n    >\n  </li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-badges></app-logo-badges>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-teams1-content\",\n  templateUrl: \"teams1-content.component.html\",\n})\nexport class Teams1ContentComponent {}\n","<h1 class=\"tw-text-3xl !tw-text-alt2\">Start your 7-day free trial for Teams</h1>\n<div class=\"tw-pt-20\">\n  <h2 class=\"tw-text-2xl\">\n    Strengthen business security with an easy-to-use password manager your team will love.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0\">\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Instantly and securely share credentials with the groups and individuals who need them</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Migrate to Bitwarden in minutes with comprehensive import options</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Save time and increase productivity with autofill and instant device syncing</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Enhance security practices across your team with easy user management</span\n    >\n  </li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-badges></app-logo-badges>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-teams2-content\",\n  templateUrl: \"teams2-content.component.html\",\n})\nexport class Teams2ContentComponent {}\n","<h1 class=\"tw-text-3xl !tw-text-alt2\">Start your 7-day free trial for Teams</h1>\n<div class=\"tw-pt-20\">\n  <h2 class=\"tw-text-2xl\">\n    Strengthen business security with an easy-to-use password manager your team will love.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main tw-list-none tw-pl-0\">\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Instantly and securely share credentials with the groups and individuals who need them</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Migrate to Bitwarden in minutes with comprehensive import options</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Save time and increase productivity with autofill and instant device syncing</span\n    >\n  </li>\n  <li class=\"tw-flex tw-items-center\">\n    <i class=\"bwi bwi-lg bwi-check-circle tw-mr-4 tw-flex-none\"></i\n    ><span class=\"tw-flex-auto\"\n      >Enhance security practices across your team with easy user management</span\n    >\n  </li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-badges></app-logo-badges>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-teams3-content\",\n  templateUrl: \"teams3-content.component.html\",\n})\nexport class Teams3ContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">Begin Teams Starter Free Trial Now</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>\n    Powerful security for up to 10 users\n    <div class=\"tw-mt-2 tw-text-base\">\n      Have more than 10 users?\n      <a routerLink=\"/register\" [queryParams]=\"{ org: 'teams', layout: 'teams1' }\"\n        >Start a Teams trial</a\n      >\n    </div>\n  </li>\n  <li>Collaborate and share securely</li>\n  <li>Deploy and manage quickly and easily</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-forbes></app-logo-forbes>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-logo-cnet\",\n  templateUrl: \"logo-cnet.component.html\",\n})\nexport class LogoCnetComponent {}\n","<figure>\n  <figcaption>\n    <cite>\n      <img\n        src=\"../../images/register-layout/cnet-logo.svg\"\n        class=\"tw-mx-auto tw-block tw-w-40\"\n        alt=\"CNET Logo\"\n      />\n    </cite>\n  </figcaption>\n  <blockquote class=\"tw-mx-auto tw-mt-2 tw-max-w-xl tw-px-4 tw-text-center\">\n    \"No more excuses; start using Bitwarden today. The identity you save could be your own. The\n    money definitely will be.\"\n  </blockquote>\n</figure>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-cnet-enterprise-content\",\n  templateUrl: \"cnet-enterprise-content.component.html\",\n})\nexport class CnetEnterpriseContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">Start Your Enterprise Free Trial Now</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Collaborate and share securely</li>\n  <li>Deploy and manage quickly and easily</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-cnet></app-logo-cnet>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-cnet-individual-content\",\n  templateUrl: \"cnet-individual-content.component.html\",\n})\nexport class CnetIndividualContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">Start Your Premium Account Now</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Store logins, secure notes, and more</li>\n  <li>Secure your account with advanced two-step login</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-cnet></app-logo-cnet>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-cnet-teams-content\",\n  templateUrl: \"cnet-teams-content.component.html\",\n})\nexport class CnetTeamsContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">Start Your Teams Free Trial Now</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Millions of individuals, teams, and organizations worldwide trust Bitwarden for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Collaborate and share securely</li>\n  <li>Deploy and manage quickly and easily</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-cnet></app-logo-cnet>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-abm-enterprise-content\",\n  templateUrl: \"abm-enterprise-content.component.html\",\n})\nexport class AbmEnterpriseContentComponent {}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">The Bitwarden Password Manager</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Trusted by millions of individuals, teams, and organizations worldwide for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Store logins, secure notes, and more</li>\n  <li>Collaborate and share securely</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-forbes></app-logo-forbes>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"app-abm-teams-content\",\n  templateUrl: \"abm-teams-content.component.html\",\n})\nexport class AbmTeamsContentComponent {}\n","<!-- eslint-disable tailwindcss/no-custom-classname -->\n<ng-container>\n  <div class=\"tw-absolute tw--z-10 tw--mt-48 tw-h-[28rem] tw-w-full tw-bg-background-alt2\"></div>\n  <div class=\"tw-min-w-4xl tw-mx-auto tw-flex tw-max-w-screen-xl tw-gap-12 tw-px-4\">\n    <div class=\"tw-w-1/2\">\n      <img\n        alt=\"Bitwarden\"\n        style=\"height: 50px; width: 335px\"\n        class=\"tw-mt-6\"\n        src=\"../../../../images/register-layout/logo-horizontal-white.svg\"\n      />\n      <div class=\"tw-pt-12\">\n        <app-secrets-manager-content></app-secrets-manager-content>\n      </div>\n    </div>\n    <div class=\"tw-w-1/2\">\n      <div class=\"tw-pt-44\">\n        <div class=\"tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-background\">\n          <div\n            *ngIf=\"!freeOrganization\"\n            class=\"tw-flex tw-h-auto tw-w-full tw-gap-5 tw-rounded-t tw-bg-secondary-100\"\n          >\n            <h2 class=\"tw-pb-4 tw-pl-4 tw-pt-5 tw-text-base tw-font-bold tw-uppercase\">\n              {{\n                \"startYour7DayFreeTrialOfBitwardenSecretsManagerFor\"\n                  | i18n: organizationTypeQueryParameter\n              }}\n            </h2>\n            <environment-selector\n              class=\"tw-mr-4 tw-mt-6 tw-flex-shrink-0 tw-text-end\"\n            ></environment-selector>\n          </div>\n          <app-secrets-manager-trial-free-stepper\n            *ngIf=\"freeOrganization\"\n          ></app-secrets-manager-trial-free-stepper>\n          <app-secrets-manager-trial-paid-stepper\n            *ngIf=\"!freeOrganization\"\n            [organizationTypeQueryParameter]=\"organizationTypeQueryParameter\"\n          ></app-secrets-manager-trial-paid-stepper>\n        </div>\n      </div>\n    </div>\n  </div>\n</ng-container>\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">The Bitwarden Password Manager</h1>\n<div class=\"tw-pt-32\">\n  <h2 class=\"tw-text-2xl\">\n    Trusted by millions of individuals, teams, and organizations worldwide for secure password\n    storage and sharing.\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li>Store logins, secure notes, and more</li>\n  <li>Collaborate and share securely</li>\n  <li>Access anywhere on any device</li>\n  <li>Create your account to get started</li>\n</ul>\n<div class=\"tw-mt-28 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-logo-forbes></app-logo-forbes>\n  <app-logo-us-news></app-logo-us-news>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\n@Component({\n  selector: \"app-secrets-manager-trial\",\n  templateUrl: \"secrets-manager-trial.component.html\",\n})\nexport class SecretsManagerTrialComponent implements OnInit, OnDestroy {\n  organizationTypeQueryParameter: string;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(private route: ActivatedRoute) {}\n\n  ngOnInit(): void {\n    this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((queryParameters) => {\n      this.organizationTypeQueryParameter = queryParameters.org;\n    });\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  get freeOrganization() {\n    return this.organizationTypeQueryParameter === \"free\";\n  }\n}\n","<!-- eslint-disable tailwindcss/no-custom-classname -->\n<app-secrets-manager-trial\n  *ngIf=\"layout === layouts.secretsManager; else passwordManagerTrial\"\n></app-secrets-manager-trial>\n<ng-template #passwordManagerTrial>\n  <div *ngIf=\"accountCreateOnly\" class=\"\">\n    <h1 class=\"tw-mt-12 tw-text-center tw-text-xl\">{{ \"createAccount\" | i18n }}</h1>\n    <div\n      class=\"tw-min-w-xl tw-m-auto tw-max-w-xl tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-8\"\n    >\n      <app-register-form\n        [queryParamEmail]=\"email\"\n        [queryParamFromOrgInvite]=\"fromOrgInvite\"\n        [enforcedPolicyOptions]=\"enforcedPolicyOptions\"\n        [referenceDataValue]=\"referenceData\"\n      ></app-register-form>\n    </div>\n  </div>\n  <div *ngIf=\"!accountCreateOnly\">\n    <div class=\"tw-absolute tw--z-10 tw--mt-48 tw-h-[28rem] tw-w-full tw-bg-background-alt2\"></div>\n    <div class=\"tw-min-w-4xl tw-mx-auto tw-flex tw-max-w-screen-xl tw-gap-12 tw-px-4\">\n      <div class=\"tw-w-1/2\">\n        <img\n          alt=\"Bitwarden\"\n          style=\"height: 50px; width: 335px\"\n          class=\"tw-mt-6\"\n          src=\"../../images/register-layout/logo-horizontal-white.svg\"\n        />\n\n        <div class=\"tw-pt-12\">\n          <!-- Layout params are used by marketing to determine left-hand content -->\n          <app-default-content *ngIf=\"layout === layouts.default\"></app-default-content>\n          <app-teams-content *ngIf=\"layout === layouts.teams\"></app-teams-content>\n          <app-teams1-content *ngIf=\"layout === layouts.teams1\"></app-teams1-content>\n          <app-teams2-content *ngIf=\"layout === layouts.teams2\"></app-teams2-content>\n          <app-teams3-content *ngIf=\"layout === layouts.teams3\"></app-teams3-content>\n          <app-enterprise-content *ngIf=\"layout === layouts.enterprise\"></app-enterprise-content>\n          <app-enterprise1-content *ngIf=\"layout === layouts.enterprise1\"></app-enterprise1-content>\n          <app-enterprise2-content *ngIf=\"layout === layouts.enterprise2\"></app-enterprise2-content>\n          <app-cnet-enterprise-content\n            *ngIf=\"layout === layouts.cnetcmpgnent\"\n          ></app-cnet-enterprise-content>\n          <app-cnet-individual-content\n            *ngIf=\"layout === layouts.cnetcmpgnind\"\n          ></app-cnet-individual-content>\n          <app-cnet-teams-content\n            *ngIf=\"layout === layouts.cnetcmpgnteams\"\n          ></app-cnet-teams-content>\n          <app-abm-enterprise-content\n            *ngIf=\"layout === layouts.abmenterprise\"\n          ></app-abm-enterprise-content>\n          <app-abm-teams-content *ngIf=\"layout === layouts.abmteams\"></app-abm-teams-content>\n        </div>\n      </div>\n      <div class=\"tw-w-1/2\">\n        <div *ngIf=\"!useTrialStepper\">\n          <div\n            class=\"tw-min-w-xl tw-m-auto tw-mt-28 tw-max-w-xl tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-8\"\n          >\n            <app-register-form\n              [queryParamEmail]=\"email\"\n              [enforcedPolicyOptions]=\"enforcedPolicyOptions\"\n              [referenceDataValue]=\"referenceData\"\n            ></app-register-form>\n          </div>\n        </div>\n        <div class=\"tw-pt-44\" *ngIf=\"useTrialStepper\">\n          <div\n            class=\"tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-background\"\n          >\n            <div class=\"tw-flex tw-h-auto tw-w-full tw-gap-5 tw-rounded-t tw-bg-secondary-100\">\n              <h2 class=\"tw-pb-4 tw-pl-4 tw-pt-5 tw-text-base tw-font-bold tw-uppercase\">\n                {{ freeTrialText }}\n              </h2>\n              <environment-selector\n                class=\"tw-mr-4 tw-mt-6 tw-flex-shrink-0 tw-text-end\"\n              ></environment-selector>\n            </div>\n            <app-vertical-stepper #stepper linear (selectionChange)=\"stepSelectionChange($event)\">\n              <app-vertical-step label=\"Create Account\" [editable]=\"false\" [subLabel]=\"email\">\n                <app-register-form\n                  [isInTrialFlow]=\"true\"\n                  (createdAccount)=\"createdAccount($event)\"\n                  [referenceDataValue]=\"referenceData\"\n                ></app-register-form>\n              </app-vertical-step>\n              <app-vertical-step label=\"Organization Information\" [subLabel]=\"orgInfoSubLabel\">\n                <app-org-info [nameOnly]=\"true\" [formGroup]=\"orgInfoFormGroup\"></app-org-info>\n                <button\n                  type=\"button\"\n                  bitButton\n                  buttonType=\"primary\"\n                  [disabled]=\"orgInfoFormGroup.get('name').invalid\"\n                  [loading]=\"loading\"\n                  (click)=\"createOrganizationOnTrial()\"\n                >\n                  {{ (enableTrialPayment$ | async) ? (\"startTrial\" | i18n) : (\"next\" | i18n) }}\n                </button>\n              </app-vertical-step>\n              <app-vertical-step\n                label=\"Billing\"\n                [subLabel]=\"billingSubLabel\"\n                *ngIf=\"!(enableTrialPayment$ | async)\"\n              >\n                <app-trial-billing-step\n                  *ngIf=\"stepper.selectedIndex === 2\"\n                  [organizationInfo]=\"{\n                    name: orgInfoFormGroup.get('name').value,\n                    email: orgInfoFormGroup.get('email').value,\n                    type: trialOrganizationType,\n                  }\"\n                  [subscriptionProduct]=\"SubscriptionProduct.PasswordManager\"\n                  (steppedBack)=\"previousStep()\"\n                  (organizationCreated)=\"createdOrganization($event)\"\n                >\n                </app-trial-billing-step>\n              </app-vertical-step>\n              <app-vertical-step label=\"Confirmation Details\" [applyBorder]=\"false\">\n                <app-trial-confirmation-details\n                  [email]=\"email\"\n                  [orgLabel]=\"orgLabel\"\n                ></app-trial-confirmation-details>\n                <div class=\"tw-mb-3 tw-flex\">\n                  <button\n                    type=\"button\"\n                    bitButton\n                    buttonType=\"primary\"\n                    (click)=\"navigateToOrgVault()\"\n                  >\n                    {{ \"getStarted\" | i18n | titlecase }}\n                  </button>\n                  <button\n                    type=\"button\"\n                    bitButton\n                    buttonType=\"secondary\"\n                    (click)=\"navigateToOrgInvite()\"\n                    class=\"tw-ml-3 tw-inline-flex tw-items-center tw-px-3\"\n                  >\n                    {{ \"inviteUsers\" | i18n }}\n                  </button>\n                </div>\n              </app-vertical-step>\n            </app-vertical-stepper>\n          </div>\n        </div>\n      </div>\n    </div>\n  </div>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { StepperSelectionEvent } from \"@angular/cdk/stepper\";\nimport { TitleCasePipe } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport {\n  OrganizationInformation,\n  PlanInformation,\n  OrganizationBillingServiceAbstraction as OrganizationBillingService,\n} from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport {\n  OrganizationCreatedEvent,\n  SubscriptionProduct,\n  TrialOrganizationType,\n} from \"../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { AcceptOrganizationInviteService } from \"../organization-invite/accept-organization.service\";\nimport { OrganizationInvite } from \"../organization-invite/organization-invite\";\n\nimport { RouterService } from \"./../../core/router.service\";\nimport { VerticalStepperComponent } from \"./vertical-stepper/vertical-stepper.component\";\n\nexport enum ValidOrgParams {\n  families = \"families\",\n  enterprise = \"enterprise\",\n  teams = \"teams\",\n  teamsStarter = \"teamsStarter\",\n  individual = \"individual\",\n  premium = \"premium\",\n  free = \"free\",\n}\n\nenum ValidLayoutParams {\n  default = \"default\",\n  teams = \"teams\",\n  teams1 = \"teams1\",\n  teams2 = \"teams2\",\n  teams3 = \"teams3\",\n  enterprise = \"enterprise\",\n  enterprise1 = \"enterprise1\",\n  enterprise2 = \"enterprise2\",\n  cnetcmpgnent = \"cnetcmpgnent\",\n  cnetcmpgnind = \"cnetcmpgnind\",\n  cnetcmpgnteams = \"cnetcmpgnteams\",\n  abmenterprise = \"abmenterprise\",\n  abmteams = \"abmteams\",\n  secretsManager = \"secretsManager\",\n}\n\n@Component({\n  selector: \"app-trial\",\n  templateUrl: \"trial-initiation.component.html\",\n})\nexport class TrialInitiationComponent implements OnInit, OnDestroy {\n  email = \"\";\n  fromOrgInvite = false;\n  org = \"\";\n  orgInfoSubLabel = \"\";\n  orgId = \"\";\n  orgLabel = \"\";\n  billingSubLabel = \"\";\n  layout = \"default\";\n  plan: PlanType;\n  productTier: ProductTierType;\n  accountCreateOnly = true;\n  useTrialStepper = false;\n  loading = false;\n  policies: Policy[];\n  enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  trialFlowOrgs: string[] = [\n    ValidOrgParams.teams,\n    ValidOrgParams.teamsStarter,\n    ValidOrgParams.enterprise,\n    ValidOrgParams.families,\n  ];\n  routeFlowOrgs: string[] = [\n    ValidOrgParams.free,\n    ValidOrgParams.premium,\n    ValidOrgParams.individual,\n  ];\n  layouts = ValidLayoutParams;\n  referenceData: ReferenceEventRequest;\n  @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n\n  orgInfoFormGroup = this.formBuilder.group({\n    name: [\"\", { validators: [Validators.required, Validators.maxLength(50)], updateOn: \"change\" }],\n    email: [\"\"],\n  });\n\n  private set referenceDataId(referenceId: string) {\n    if (referenceId != null) {\n      this.referenceData.id = referenceId;\n    } else {\n      this.referenceData.id = (\"; \" + document.cookie)\n        .split(\"; reference=\")\n        .pop()\n        .split(\";\")\n        .shift();\n    }\n\n    if (this.referenceData.id === \"\") {\n      this.referenceData.id = null;\n    } else {\n      // Matches \"_ga_QBRN562QQQ=value1.value2.session\" and captures values and session.\n      const regex = /_ga_QBRN562QQQ=([^.]+)\\.([^.]+)\\.(\\d+)/;\n      const match = document.cookie.match(regex);\n      if (match) {\n        this.referenceData.session = match[3];\n      }\n    }\n  }\n\n  private destroy$ = new Subject<void>();\n  protected enableTrialPayment$ = this.configService.getFeatureFlag$(\n    FeatureFlag.TrialPaymentOptional,\n  );\n\n  constructor(\n    private route: ActivatedRoute,\n    protected router: Router,\n    private formBuilder: UntypedFormBuilder,\n    private titleCasePipe: TitleCasePipe,\n    private logService: LogService,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private policyService: PolicyService,\n    private i18nService: I18nService,\n    private routerService: RouterService,\n    private acceptOrgInviteService: AcceptOrganizationInviteService,\n    private organizationBillingService: OrganizationBillingService,\n    private configService: ConfigService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n      this.referenceData = new ReferenceEventRequest();\n      if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n        this.email = qParams.email;\n        this.fromOrgInvite = qParams.fromOrgInvite === \"true\";\n      }\n\n      this.referenceDataId = qParams.reference;\n\n      if (Object.values(ValidLayoutParams).includes(qParams.layout)) {\n        this.layout = qParams.layout;\n        this.accountCreateOnly = false;\n      }\n\n      if (this.trialFlowOrgs.includes(qParams.org)) {\n        this.org = qParams.org;\n        this.orgLabel = this.titleCasePipe.transform(this.orgDisplayName);\n        this.useTrialStepper = true;\n        this.referenceData.flow = qParams.org;\n\n        if (this.org === ValidOrgParams.families) {\n          this.plan = PlanType.FamiliesAnnually;\n          this.productTier = ProductTierType.Families;\n        } else if (this.org === ValidOrgParams.teamsStarter) {\n          this.plan = PlanType.TeamsStarter;\n          this.productTier = ProductTierType.TeamsStarter;\n        } else if (this.org === ValidOrgParams.teams) {\n          this.plan = PlanType.TeamsAnnually;\n          this.productTier = ProductTierType.Teams;\n        } else if (this.org === ValidOrgParams.enterprise) {\n          this.plan = PlanType.EnterpriseAnnually;\n          this.productTier = ProductTierType.Enterprise;\n        }\n      } else if (this.routeFlowOrgs.includes(qParams.org)) {\n        this.referenceData.flow = qParams.org;\n        const route = this.router.createUrlTree([\"create-organization\"], {\n          queryParams: { plan: qParams.org },\n        });\n        this.routerService.setPreviousUrl(route.toString());\n      }\n\n      // Are they coming from an email for sponsoring a families organization\n      // After logging in redirect them to setup the families sponsorship\n      this.setupFamilySponsorship(qParams.sponsorshipToken);\n\n      this.referenceData.initiationPath = this.accountCreateOnly\n        ? \"Registration form\"\n        : \"Password Manager trial from marketing website\";\n    });\n\n    // If there's a deep linked org invite, use it to get the password policies\n    const orgInvite = await this.acceptOrgInviteService.getOrganizationInvite();\n    if (orgInvite != null) {\n      await this.initPasswordPolicies(orgInvite);\n    }\n\n    this.orgInfoFormGroup.controls.name.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe(() => {\n        this.orgInfoFormGroup.controls.name.markAsTouched();\n      });\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  stepSelectionChange(event: StepperSelectionEvent) {\n    // Set org info sub label\n    if (event.selectedIndex === 1 && this.orgInfoFormGroup.controls.name.value === \"\") {\n      this.orgInfoSubLabel =\n        \"Enter your \" +\n        this.titleCasePipe.transform(this.orgDisplayName) +\n        \" organization information\";\n    } else if (event.previouslySelectedIndex === 1) {\n      this.orgInfoSubLabel = this.orgInfoFormGroup.controls.name.value;\n    }\n\n    //set billing sub label\n    if (event.selectedIndex === 2) {\n      this.billingSubLabel = this.i18nService.t(\"billingTrialSubLabel\");\n    }\n  }\n\n  async createOrganizationOnTrial() {\n    this.loading = true;\n    const organization: OrganizationInformation = {\n      name: this.orgInfoFormGroup.get(\"name\").value,\n      billingEmail: this.orgInfoFormGroup.get(\"email\").value,\n      initiationPath: \"Password Manager trial from marketing website\",\n    };\n\n    const plan: PlanInformation = {\n      type: this.plan,\n      passwordManagerSeats: 1,\n    };\n\n    const response = await this.organizationBillingService.purchaseSubscriptionNoPaymentMethod({\n      organization,\n      plan,\n    });\n\n    this.orgId = response?.id;\n    this.billingSubLabel = `${this.i18nService.t(\"annual\")} ($0/${this.i18nService.t(\"yr\")})`;\n    this.loading = false;\n    this.verticalStepper.next();\n  }\n\n  createdAccount(email: string) {\n    this.email = email;\n    this.orgInfoFormGroup.get(\"email\")?.setValue(email);\n    this.verticalStepper.next();\n  }\n\n  billingSuccess(event: any) {\n    this.orgId = event?.orgId;\n    this.billingSubLabel = event?.subLabelText;\n    this.verticalStepper.next();\n  }\n\n  createdOrganization(event: OrganizationCreatedEvent) {\n    this.orgId = event.organizationId;\n    this.billingSubLabel = event.planDescription;\n    this.verticalStepper.next();\n  }\n\n  navigateToOrgVault() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([\"organizations\", this.orgId, \"vault\"]);\n  }\n\n  navigateToOrgInvite() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([\"organizations\", this.orgId, \"members\"]);\n  }\n\n  previousStep() {\n    this.verticalStepper.previous();\n  }\n\n  get orgDisplayName() {\n    if (this.org === \"teamsStarter\") {\n      return \"Teams Starter\";\n    }\n\n    return this.org;\n  }\n\n  get freeTrialText() {\n    const translationKey =\n      this.layout === this.layouts.secretsManager\n        ? \"startYour7DayFreeTrialOfBitwardenSecretsManagerFor\"\n        : \"startYour7DayFreeTrialOfBitwardenFor\";\n\n    return this.i18nService.t(translationKey, this.org);\n  }\n\n  get trialOrganizationType(): TrialOrganizationType {\n    switch (this.productTier) {\n      case ProductTierType.Free:\n        return null;\n      default:\n        return this.productTier;\n    }\n  }\n\n  private setupFamilySponsorship(sponsorshipToken: string) {\n    if (sponsorshipToken != null) {\n      const route = this.router.createUrlTree([\"setup/families-for-enterprise\"], {\n        queryParams: { plan: sponsorshipToken },\n      });\n      this.routerService.setPreviousUrl(route.toString());\n    }\n  }\n\n  private async initPasswordPolicies(invite: OrganizationInvite): Promise<void> {\n    if (invite == null) {\n      return;\n    }\n\n    try {\n      this.policies = await this.policyApiService.getPoliciesByToken(\n        invite.organizationId,\n        invite.token,\n        invite.email,\n        invite.organizationUserId,\n      );\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (this.policies != null) {\n      this.policyService\n        .masterPasswordPolicyOptions$(this.policies)\n        .pipe(takeUntil(this.destroy$))\n        .subscribe((enforcedPasswordPolicyOptions) => {\n          this.enforcedPolicyOptions = enforcedPasswordPolicyOptions;\n        });\n    }\n  }\n\n  protected readonly SubscriptionProduct = SubscriptionProduct;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n  ButtonModule,\n  LinkModule,\n  TypographyModule,\n  FormFieldModule,\n  AsyncActionsModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-authenticator\",\n  templateUrl: \"two-factor-auth-authenticator.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthAuthenticatorComponent {\n  tokenValue: string;\n  @Output() token = new EventEmitter<string>();\n}\n","<ng-container>\n  <p bitTypography=\"body1\">\n    {{ \"enterVerificationCodeApp\" | i18n }}\n  </p>\n  <bit-form-field>\n    <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n    <input\n      bitInput\n      type=\"text\"\n      appAutofocus\n      appInputVerbatim\n      [(ngModel)]=\"tokenValue\"\n      (input)=\"token.emit(tokenValue)\"\n    />\n  </bit-form-field>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { LoginStrategyServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  ButtonModule,\n  LinkModule,\n  TypographyModule,\n  FormFieldModule,\n  AsyncActionsModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-email\",\n  templateUrl: \"two-factor-auth-email.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthEmailComponent implements OnInit {\n  @Output() token = new EventEmitter<string>();\n\n  twoFactorEmail: string = null;\n  emailPromise: Promise<any>;\n  tokenValue: string = \"\";\n\n  constructor(\n    protected i18nService: I18nService,\n    protected twoFactorService: TwoFactorService,\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected logService: LogService,\n    protected apiService: ApiService,\n    protected appIdService: AppIdService,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    const providerData = await this.twoFactorService.getProviders().then((providers) => {\n      return providers.get(TwoFactorProviderType.Email);\n    });\n    this.twoFactorEmail = providerData.Email;\n\n    if ((await this.twoFactorService.getProviders()).size > 1) {\n      await this.sendEmail(false);\n    }\n  }\n\n  async sendEmail(doToast: boolean) {\n    if (this.emailPromise != null) {\n      return;\n    }\n\n    if ((await this.loginStrategyService.getEmail()) == null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"sessionTimeout\"),\n      });\n      return;\n    }\n\n    try {\n      const request = new TwoFactorEmailRequest();\n      request.email = await this.loginStrategyService.getEmail();\n      request.masterPasswordHash = await this.loginStrategyService.getMasterPasswordHash();\n      request.ssoEmail2FaSessionToken =\n        await this.loginStrategyService.getSsoEmail2FaSessionToken();\n      request.deviceIdentifier = await this.appIdService.getAppId();\n      request.authRequestAccessCode = await this.loginStrategyService.getAccessCode();\n      request.authRequestId = await this.loginStrategyService.getAuthRequestId();\n      this.emailPromise = this.apiService.postTwoFactorEmail(request);\n      await this.emailPromise;\n      if (doToast) {\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"verificationCodeEmailSent\", this.twoFactorEmail),\n        });\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    this.emailPromise = null;\n  }\n}\n","<p bitTypography=\"body1\">\n  {{ \"enterVerificationCodeEmail\" | i18n: twoFactorEmail }}\n</p>\n<bit-form-field>\n  <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n  <input\n    bitInput\n    type=\"text\"\n    appAutofocus\n    appInputVerbatim\n    [(ngModel)]=\"tokenValue\"\n    (input)=\"token.emit(tokenValue)\"\n  />\n  <bit-hint>\n    <a bitLink href=\"#\" appStopClick (click)=\"sendEmail(true)\">\n      {{ \"sendVerificationCodeEmailAgain\" | i18n }}\n    </a></bit-hint\n  >\n</bit-form-field>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { I18nService } from \"../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../platform/abstractions/platform-utils.service\";\n\nexport class WebAuthnIFrame {\n  private iframe: HTMLIFrameElement = null;\n  private connectorLink: HTMLAnchorElement;\n  private parseFunction = this.parseMessage.bind(this);\n\n  constructor(\n    private win: Window,\n    private webVaultUrl: string,\n    private webAuthnNewTab: boolean,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private successCallback: Function, // eslint-disable-line\n    private errorCallback: Function, // eslint-disable-line\n    private infoCallback: Function, // eslint-disable-line\n  ) {\n    this.connectorLink = win.document.createElement(\"a\");\n  }\n\n  init(data: any): void {\n    const params = new URLSearchParams({\n      data: this.base64Encode(JSON.stringify(data)),\n      parent: encodeURIComponent(this.win.document.location.href),\n      btnText: encodeURIComponent(this.i18nService.t(\"webAuthnAuthenticate\")),\n      v: \"1\",\n    });\n\n    if (this.webAuthnNewTab) {\n      // Firefox fallback which opens the webauthn page in a new tab\n      params.append(\"locale\", this.i18nService.translationLocale);\n      this.platformUtilsService.launchUri(\n        `${this.webVaultUrl}/webauthn-fallback-connector.html?${params}`,\n      );\n    } else {\n      this.connectorLink.href = `${this.webVaultUrl}/webauthn-connector.html?${params}`;\n      this.iframe = this.win.document.getElementById(\"webauthn_iframe\") as HTMLIFrameElement;\n      this.iframe.allow = \"publickey-credentials-get \" + new URL(this.webVaultUrl).origin;\n      this.iframe.src = this.connectorLink.href;\n\n      this.win.addEventListener(\"message\", this.parseFunction, false);\n    }\n  }\n\n  stop() {\n    this.sendMessage(\"stop\");\n  }\n\n  start() {\n    this.sendMessage(\"start\");\n  }\n\n  sendMessage(message: any) {\n    if (!this.iframe || !this.iframe.src || !this.iframe.contentWindow) {\n      return;\n    }\n\n    this.iframe.contentWindow.postMessage(message, this.iframe.src);\n  }\n\n  base64Encode(str: string): string {\n    return btoa(\n      encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, (match, p1) => {\n        return String.fromCharCode((\"0x\" + p1) as any);\n      }),\n    );\n  }\n\n  cleanup() {\n    this.win.removeEventListener(\"message\", this.parseFunction, false);\n  }\n\n  private parseMessage(event: MessageEvent) {\n    if (!this.validMessage(event)) {\n      return;\n    }\n\n    const parts: string[] = event.data.split(\"|\");\n    if (parts[0] === \"success\" && this.successCallback) {\n      this.successCallback(parts[1]);\n    } else if (parts[0] === \"error\" && this.errorCallback) {\n      this.errorCallback(parts[1]);\n    } else if (parts[0] === \"info\" && this.infoCallback) {\n      this.infoCallback(parts[1]);\n    }\n  }\n\n  private validMessage(event: MessageEvent) {\n    if (\n      event.origin == null ||\n      event.origin === \"\" ||\n      event.origin !== (this.connectorLink as any).origin ||\n      event.data == null ||\n      typeof event.data !== \"string\"\n    ) {\n      return false;\n    }\n\n    return (\n      event.data.indexOf(\"success|\") === 0 ||\n      event.data.indexOf(\"error|\") === 0 ||\n      event.data.indexOf(\"info|\") === 0\n    );\n  }\n}\n","<div id=\"web-authn-frame\" class=\"tw-mb-3\" *ngIf=\"!webAuthnNewTab\">\n  <iframe id=\"webauthn_iframe\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n</div>\n<ng-container *ngIf=\"webAuthnNewTab\">\n  <div class=\"content text-center\" *ngIf=\"webAuthnNewTab\">\n    <p class=\"text-center\">{{ \"webAuthnNewTab\" | i18n }}</p>\n    <button type=\"button\" class=\"btn primary block\" (click)=\"authWebAuthn()\" appStopClick>\n      {{ \"webAuthnNewTabOpen\" | i18n }}\n    </button>\n  </div>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Inject, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { WebAuthnIFrame } from \"@bitwarden/common/auth/webauthn-iframe\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  ButtonModule,\n  LinkModule,\n  TypographyModule,\n  FormFieldModule,\n  AsyncActionsModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-webauthn\",\n  templateUrl: \"two-factor-auth-webauthn.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthWebAuthnComponent implements OnInit, OnDestroy {\n  @Output() token = new EventEmitter<string>();\n\n  webAuthnReady = false;\n  webAuthnNewTab = false;\n  webAuthnSupported = false;\n  webAuthn: WebAuthnIFrame = null;\n\n  constructor(\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    @Inject(WINDOW) protected win: Window,\n    protected environmentService: EnvironmentService,\n    protected twoFactorService: TwoFactorService,\n    protected route: ActivatedRoute,\n    private toastService: ToastService,\n  ) {\n    this.webAuthnSupported = this.platformUtilsService.supportsWebAuthn(win);\n\n    if (this.platformUtilsService.getClientType() == ClientType.Browser) {\n      // FIXME: Chromium 110 has broken WebAuthn support in extensions via an iframe\n      this.webAuthnNewTab = true;\n    }\n  }\n\n  async ngOnInit(): Promise<void> {\n    if (this.route.snapshot.paramMap.has(\"webAuthnResponse\")) {\n      this.token.emit(this.route.snapshot.paramMap.get(\"webAuthnResponse\"));\n    }\n\n    this.cleanupWebAuthn();\n\n    if (this.win != null && this.webAuthnSupported) {\n      const env = await firstValueFrom(this.environmentService.environment$);\n      const webVaultUrl = env.getWebVaultUrl();\n      this.webAuthn = new WebAuthnIFrame(\n        this.win,\n        webVaultUrl,\n        this.webAuthnNewTab,\n        this.platformUtilsService,\n        this.i18nService,\n        (token: string) => {\n          this.token.emit(token);\n        },\n        (error: string) => {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"errorOccurred\"),\n            message: this.i18nService.t(\"webauthnCancelOrTimeout\"),\n          });\n        },\n        (info: string) => {\n          if (info === \"ready\") {\n            this.webAuthnReady = true;\n          }\n        },\n      );\n\n      if (!this.webAuthnNewTab) {\n        setTimeout(async () => {\n          await this.authWebAuthn();\n        }, 500);\n      }\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.cleanupWebAuthn();\n  }\n\n  async authWebAuthn() {\n    const providerData = (await this.twoFactorService.getProviders()).get(\n      TwoFactorProviderType.WebAuthn,\n    );\n\n    if (!this.webAuthnSupported || this.webAuthn == null) {\n      return;\n    }\n\n    this.webAuthn.init(providerData);\n  }\n\n  private cleanupWebAuthn() {\n    if (this.webAuthn != null) {\n      this.webAuthn.stop();\n      this.webAuthn.cleanup();\n    }\n  }\n}\n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport {\n  ButtonModule,\n  LinkModule,\n  TypographyModule,\n  FormFieldModule,\n  AsyncActionsModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-yubikey\",\n  templateUrl: \"two-factor-auth-yubikey.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthYubikeyComponent {\n  tokenValue: string = \"\";\n  @Output() token = new EventEmitter<string>();\n}\n","<p bitTypography=\"body1\" class=\"tw-text-center\">{{ \"insertYubiKey\" | i18n }}</p>\n<picture>\n  <source srcset=\"../../images/yubikey.avif\" type=\"image/avif\" />\n  <source srcset=\"../../images/yubikey.webp\" type=\"image/webp\" />\n  <img src=\"../../images/yubikey.jpg\" class=\"tw-rounded img-fluid tw-mb-3\" alt=\"\" />\n</picture>\n<bit-form-field>\n  <bit-label class=\"tw-sr-only\">{{ \"verificationCode\" | i18n }}</bit-label>\n  <input\n    type=\"password\"\n    bitInput\n    appAutofocus\n    appInputVerbatim\n    [(ngModel)]=\"tokenValue\"\n    (input)=\"token.emit(tokenValue)\"\n  />\n</bit-form-field>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  ButtonModule,\n  LinkModule,\n  TypographyModule,\n  FormFieldModule,\n  AsyncActionsModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-duo\",\n  templateUrl: \"two-factor-auth-duo.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthDuoComponent implements OnInit {\n  @Output() token = new EventEmitter<string>();\n  @Input() providerData: any;\n\n  duoFramelessUrl: string = null;\n  duoResultListenerInitialized = false;\n\n  constructor(\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit(): Promise<void> {\n    await this.init();\n  }\n\n  async init() {\n    // Setup listener for duo-redirect.ts connector to send back the code\n    if (!this.duoResultListenerInitialized) {\n      // setup client specific duo result listener\n      this.setupDuoResultListener();\n      this.duoResultListenerInitialized = true;\n    }\n\n    // flow must be launched by user so they can choose to remember the device or not.\n    this.duoFramelessUrl = this.providerData.AuthUrl;\n  }\n\n  // Each client will have own implementation\n  protected setupDuoResultListener(): void {}\n  async launchDuoFrameless(): Promise<void> {\n    if (this.duoFramelessUrl === null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"duoHealthCheckResultsInNullAuthUrlError\"),\n      });\n      return;\n    }\n    this.platformUtilsService.launchUri(this.duoFramelessUrl);\n  }\n}\n","<ng-container>\n  <p bitTypography=\"body1\" class=\"tw-mb-0\">\n    {{ \"duoRequiredByOrgForAccount\" | i18n }}\n  </p>\n  <p bitTypography=\"body1\">{{ \"launchDuoAndFollowStepsToFinishLoggingIn\" | i18n }}</p>\n</ng-container>\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ButtonModule, DialogModule, DialogService, TypographyModule } from \"@bitwarden/components\";\n\nexport enum TwoFactorOptionsDialogResult {\n  Provider = \"Provider selected\",\n  Recover = \"Recover selected\",\n}\n\nexport type TwoFactorOptionsDialogResultType = {\n  result: TwoFactorOptionsDialogResult;\n  type: TwoFactorProviderType;\n};\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-options\",\n  templateUrl: \"two-factor-options.component.html\",\n  imports: [CommonModule, JslibModule, DialogModule, ButtonModule, TypographyModule],\n  providers: [I18nPipe],\n})\nexport class TwoFactorOptionsComponent implements OnInit {\n  @Output() onProviderSelected = new EventEmitter<TwoFactorProviderType>();\n  @Output() onRecoverSelected = new EventEmitter();\n\n  providers: any[] = [];\n\n  // todo: remove after porting to two-factor-options-v2\n  // icons cause the layout to break on browser extensions\n  areIconsDisabled = false;\n\n  constructor(\n    private twoFactorService: TwoFactorService,\n    private environmentService: EnvironmentService,\n    private dialogRef: DialogRef,\n    private platformUtilsService: PlatformUtilsService,\n  ) {\n    // todo: remove after porting to two-factor-options-v2\n    if (this.platformUtilsService.getClientType() == ClientType.Browser) {\n      this.areIconsDisabled = true;\n    }\n  }\n\n  async ngOnInit() {\n    this.providers = await this.twoFactorService.getSupportedProviders(window);\n  }\n\n  async choose(p: any) {\n    this.onProviderSelected.emit(p.type);\n    this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Provider, type: p.type });\n  }\n\n  async recover() {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const webVault = env.getWebVaultUrl();\n    this.platformUtilsService.launchUri(webVault + \"/#/recover-2fa\");\n    this.onRecoverSelected.emit();\n    this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Recover });\n  }\n\n  static open(dialogService: DialogService) {\n    return dialogService.open<TwoFactorOptionsDialogResultType>(TwoFactorOptionsComponent);\n  }\n}\n","<bit-dialog dialogSize=\"large\">\n  <span bitDialogTitle>\n    {{ \"twoStepOptions\" | i18n }}\n  </span>\n  <ng-container bitDialogContent>\n    <div *ngFor=\"let p of providers\" class=\"tw-m-2\">\n      <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-4\">\n        <div\n          class=\"tw-flex tw-items-center tw-justify-center tw-min-w-[100px]\"\n          *ngIf=\"!areIconsDisabled\"\n        >\n          <img [class]=\"'mfaType' + p.type\" [alt]=\"p.name + ' logo'\" />\n        </div>\n        <div class=\"tw-flex-1\">\n          <h3 bitTypography=\"h3\">{{ p.name }}</h3>\n          <p bitTypography=\"body1\">{{ p.description }}</p>\n        </div>\n        <div class=\"tw-min-w-20\">\n          <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"choose(p)\">\n            {{ \"select\" | i18n }}\n          </button>\n        </div>\n      </div>\n      <hr />\n    </div>\n    <div class=\"tw-m-2\" (click)=\"recover()\">\n      <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-4\">\n        <div\n          class=\"tw-flex tw-items-center tw-justify-center tw-min-w-[100px]\"\n          *ngIf=\"!areIconsDisabled\"\n        >\n          <img class=\"recovery-code-img\" alt=\"rc logo\" />\n        </div>\n        <div class=\"tw-flex-1\">\n          <h3 bitTypography=\"h3\">{{ \"recoveryCodeTitle\" | i18n }}</h3>\n          <p bitTypography=\"body1\">{{ \"recoveryCodeDesc\" | i18n }}</p>\n        </div>\n        <div class=\"tw-min-w-20\">\n          <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"recover()\">\n            {{ \"select\" | i18n }}\n          </button>\n        </div>\n      </div>\n    </div>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","<form [bitSubmit]=\"submitForm\" [formGroup]=\"formGroup\" autocomplete=\"off\">\n  <app-two-factor-auth-email\n    (token)=\"token = $event\"\n    *ngIf=\"selectedProviderType === providerType.Email\"\n  />\n  <app-two-factor-auth-authenticator\n    (token)=\"token = $event\"\n    *ngIf=\"selectedProviderType === providerType.Authenticator\"\n  />\n  <app-two-factor-auth-yubikey\n    (token)=\"token = $event\"\n    *ngIf=\"selectedProviderType === providerType.Yubikey\"\n  />\n  <app-two-factor-auth-webauthn\n    (token)=\"token = $event; submitForm()\"\n    *ngIf=\"selectedProviderType === providerType.WebAuthn\"\n  />\n  <app-two-factor-auth-duo\n    (token)=\"token = $event; submitForm()\"\n    [providerData]=\"providerData\"\n    *ngIf=\"\n      selectedProviderType === providerType.OrganizationDuo ||\n      selectedProviderType === providerType.Duo\n    \"\n    #duoComponent\n  />\n  <bit-form-control *ngIf=\"selectedProviderType != null\">\n    <bit-label>{{ \"rememberMe\" | i18n }}</bit-label>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"remember\" />\n  </bit-form-control>\n  <ng-container *ngIf=\"selectedProviderType == null\">\n    <p bitTypography=\"body1\">{{ \"noTwoStepProviders\" | i18n }}</p>\n    <p bitTypography=\"body1\">{{ \"noTwoStepProviders2\" | i18n }}</p>\n  </ng-container>\n  <div [hidden]=\"!showCaptcha()\">\n    <iframe id=\"hcaptcha_iframe\" height=\"80\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n  </div>\n  <!-- Buttons -->\n  <div class=\"tw-flex tw-flex-col tw-space-y-2.5 tw-mb-3\">\n    <button\n      type=\"submit\"\n      buttonType=\"primary\"\n      bitButton\n      bitFormButton\n      *ngIf=\"\n        selectedProviderType != null &&\n        selectedProviderType !== providerType.WebAuthn &&\n        selectedProviderType !== providerType.Duo &&\n        selectedProviderType !== providerType.OrganizationDuo\n      \"\n    >\n      <span> <i class=\"bwi bwi-sign-in\" aria-hidden=\"true\"></i> {{ actionButtonText }} </span>\n    </button>\n    <button\n      type=\"button\"\n      buttonType=\"primary\"\n      bitButton\n      (click)=\"launchDuo()\"\n      *ngIf=\"\n        selectedProviderType === providerType.Duo ||\n        selectedProviderType === providerType.OrganizationDuo\n      \"\n    >\n      <span> <i class=\"bwi bwi-sign-in\" aria-hidden=\"true\"></i> {{ \"launchDuo\" | i18n }}</span>\n    </button>\n\n    <a routerLink=\"/login\" bitButton buttonType=\"secondary\">\n      {{ \"cancel\" | i18n }}\n    </a>\n  </div>\n  <div class=\"text-center\">\n    <a bitLink href=\"#\" appStopClick (click)=\"selectOtherTwofactorMethod()\">{{\n      \"useAnotherTwoStepMethod\" | i18n\n    }}</a>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, NavigationExtras, Router, RouterLink } from \"@angular/router\";\nimport { Subject, takeUntil, lastValueFrom, first, firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  UserDecryptionOptionsServiceAbstraction,\n  TrustedDeviceUserDecryptionOption,\n  UserDecryptionOptions,\n} from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogService,\n  FormFieldModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\nimport { CaptchaProtectedComponent } from \"../captcha-protected.component\";\n\nimport { TwoFactorAuthAuthenticatorComponent } from \"./two-factor-auth-authenticator.component\";\nimport { TwoFactorAuthDuoComponent } from \"./two-factor-auth-duo.component\";\nimport { TwoFactorAuthEmailComponent } from \"./two-factor-auth-email.component\";\nimport { TwoFactorAuthWebAuthnComponent } from \"./two-factor-auth-webauthn.component\";\nimport { TwoFactorAuthYubikeyComponent } from \"./two-factor-auth-yubikey.component\";\nimport {\n  TwoFactorOptionsDialogResult,\n  TwoFactorOptionsComponent,\n  TwoFactorOptionsDialogResultType,\n} from \"./two-factor-options.component\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth\",\n  templateUrl: \"two-factor-auth.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    RouterLink,\n    ButtonModule,\n    TwoFactorOptionsComponent,\n    TwoFactorAuthAuthenticatorComponent,\n    TwoFactorAuthEmailComponent,\n    TwoFactorAuthDuoComponent,\n    TwoFactorAuthYubikeyComponent,\n    TwoFactorAuthWebAuthnComponent,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthComponent extends CaptchaProtectedComponent implements OnInit {\n  token = \"\";\n  remember = false;\n  orgIdentifier: string = null;\n\n  providers = TwoFactorProviders;\n  providerType = TwoFactorProviderType;\n  selectedProviderType: TwoFactorProviderType = TwoFactorProviderType.Authenticator;\n  providerData: any;\n\n  @ViewChild(\"duoComponent\") duoComponent!: TwoFactorAuthDuoComponent;\n  formGroup = this.formBuilder.group({\n    token: [\n      \"\",\n      {\n        validators: [Validators.required],\n        updateOn: \"submit\",\n      },\n    ],\n    remember: [false],\n  });\n  actionButtonText = \"\";\n  title = \"\";\n  formPromise: Promise<any>;\n\n  private destroy$ = new Subject<void>();\n\n  onSuccessfulLogin: () => Promise<void>;\n  onSuccessfulLoginNavigate: () => Promise<void>;\n\n  onSuccessfulLoginTde: () => Promise<void>;\n  onSuccessfulLoginTdeNavigate: () => Promise<void>;\n\n  submitForm = async () => {\n    await this.submit();\n  };\n  goAfterLogIn = async () => {\n    this.loginEmailService.clearValues();\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([this.successRoute], {\n      queryParams: {\n        identifier: this.orgIdentifier,\n      },\n    });\n  };\n\n  protected loginRoute = \"login\";\n\n  protected trustedDeviceEncRoute = \"login-initiated\";\n  protected changePasswordRoute = \"set-password\";\n  protected forcePasswordResetRoute = \"update-temp-password\";\n  protected successRoute = \"vault\";\n\n  constructor(\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    private dialogService: DialogService,\n    protected route: ActivatedRoute,\n    private logService: LogService,\n    protected twoFactorService: TwoFactorService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected configService: ConfigService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private accountService: AccountService,\n    private formBuilder: FormBuilder,\n    @Inject(WINDOW) protected win: Window,\n    protected toastService: ToastService,\n  ) {\n    super(environmentService, i18nService, platformUtilsService, toastService);\n  }\n\n  async ngOnInit() {\n    if (!(await this.authing()) || (await this.twoFactorService.getProviders()) == null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([this.loginRoute]);\n      return;\n    }\n\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n    this.route.queryParams.pipe(first()).subscribe((qParams) => {\n      if (qParams.identifier != null) {\n        this.orgIdentifier = qParams.identifier;\n      }\n    });\n\n    if (await this.needsLock()) {\n      this.successRoute = \"lock\";\n    }\n\n    const webAuthnSupported = this.platformUtilsService.supportsWebAuthn(this.win);\n    this.selectedProviderType = await this.twoFactorService.getDefaultProvider(webAuthnSupported);\n    const providerData = await this.twoFactorService.getProviders().then((providers) => {\n      return providers.get(this.selectedProviderType);\n    });\n    this.providerData = providerData;\n    await this.updateUIToProviderData();\n\n    this.actionButtonText = this.i18nService.t(\"continue\");\n    this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n      this.token = value.token;\n      this.remember = value.remember;\n    });\n  }\n\n  async submit() {\n    await this.setupCaptcha();\n\n    if (this.token == null || this.token === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"verificationCodeRequired\"),\n      });\n      return;\n    }\n\n    try {\n      this.formPromise = this.loginStrategyService.logInTwoFactor(\n        new TokenTwoFactorRequest(this.selectedProviderType, this.token, this.remember),\n        this.captchaToken,\n      );\n      const authResult: AuthResult = await this.formPromise;\n      this.logService.info(\"Successfully submitted two factor token\");\n      await this.handleLoginResponse(authResult);\n    } catch {\n      this.logService.error(\"Error submitting two factor token\");\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"invalidVerificationCode\"),\n      });\n    }\n  }\n\n  async selectOtherTwofactorMethod() {\n    const dialogRef = TwoFactorOptionsComponent.open(this.dialogService);\n    const response: TwoFactorOptionsDialogResultType = await lastValueFrom(dialogRef.closed);\n    if (response.result === TwoFactorOptionsDialogResult.Provider) {\n      const providerData = await this.twoFactorService.getProviders().then((providers) => {\n        return providers.get(response.type);\n      });\n      this.providerData = providerData;\n      this.selectedProviderType = response.type;\n      await this.updateUIToProviderData();\n    }\n  }\n\n  async launchDuo() {\n    if (this.duoComponent != null) {\n      await this.duoComponent.launchDuoFrameless();\n    }\n  }\n\n  protected handleMigrateEncryptionKey(result: AuthResult): boolean {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([\"migrate-legacy-encryption\"]);\n    return true;\n  }\n\n  async updateUIToProviderData() {\n    if (this.selectedProviderType == null) {\n      this.title = this.i18nService.t(\"loginUnavailable\");\n      return;\n    }\n\n    this.title = (TwoFactorProviders as any)[this.selectedProviderType].name;\n  }\n\n  private async handleLoginResponse(authResult: AuthResult) {\n    if (this.handleCaptchaRequired(authResult)) {\n      return;\n    } else if (this.handleMigrateEncryptionKey(authResult)) {\n      return;\n    }\n\n    // Save off the OrgSsoIdentifier for use in the TDE flows\n    // - TDE login decryption options component\n    // - Browser SSO on extension open\n    await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(this.orgIdentifier);\n    this.loginEmailService.clearValues();\n\n    // note: this flow affects both TDE & standard users\n    if (this.isForcePasswordResetRequired(authResult)) {\n      return await this.handleForcePasswordReset(this.orgIdentifier);\n    }\n\n    const userDecryptionOpts = await firstValueFrom(\n      this.userDecryptionOptionsService.userDecryptionOptions$,\n    );\n\n    const tdeEnabled = await this.isTrustedDeviceEncEnabled(userDecryptionOpts.trustedDeviceOption);\n\n    if (tdeEnabled) {\n      return await this.handleTrustedDeviceEncryptionEnabled(\n        authResult,\n        this.orgIdentifier,\n        userDecryptionOpts,\n      );\n    }\n\n    // User must set password if they don't have one and they aren't using either TDE or key connector.\n    const requireSetPassword =\n      !userDecryptionOpts.hasMasterPassword && userDecryptionOpts.keyConnectorOption === undefined;\n\n    if (requireSetPassword || authResult.resetMasterPassword) {\n      // Change implies going no password -> password in this case\n      return await this.handleChangePasswordRequired(this.orgIdentifier);\n    }\n\n    return await this.handleSuccessfulLogin();\n  }\n\n  private async isTrustedDeviceEncEnabled(\n    trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n  ): Promise<boolean> {\n    const ssoTo2faFlowActive = this.route.snapshot.queryParamMap.get(\"sso\") === \"true\";\n\n    return ssoTo2faFlowActive && trustedDeviceOption !== undefined;\n  }\n\n  private async handleTrustedDeviceEncryptionEnabled(\n    authResult: AuthResult,\n    orgIdentifier: string,\n    userDecryptionOpts: UserDecryptionOptions,\n  ): Promise<void> {\n    // If user doesn't have a MP, but has reset password permission, they must set a MP\n    if (\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n    ) {\n      // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n      // Note: we cannot directly navigate to the set password screen in this scenario as we are in a pre-decryption state, and\n      // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n        userId,\n      );\n    }\n\n    if (this.onSuccessfulLoginTde != null) {\n      // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n      // before navigating to the success route.\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLoginTde();\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginTdeNavigate,\n      // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n      //  their user key, the login-initiated guard will redirect them to the vault)\n      [this.trustedDeviceEncRoute],\n    );\n  }\n\n  private async handleChangePasswordRequired(orgIdentifier: string) {\n    await this.router.navigate([this.changePasswordRoute], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  /**\n   * Determines if a user needs to reset their password based on certain conditions.\n   * Users can be forced to reset their password via an admin or org policy disallowing weak passwords.\n   * Note: this is different from the SSO component login flow as a user can\n   * login with MP and then have to pass 2FA to finish login and we can actually\n   * evaluate if they have a weak password at that time.\n   *\n   * @param {AuthResult} authResult - The authentication result.\n   * @returns {boolean} Returns true if a password reset is required, false otherwise.\n   */\n  private isForcePasswordResetRequired(authResult: AuthResult): boolean {\n    const forceResetReasons = [\n      ForceSetPasswordReason.AdminForcePasswordReset,\n      ForceSetPasswordReason.WeakMasterPassword,\n    ];\n\n    return forceResetReasons.includes(authResult.forcePasswordReset);\n  }\n\n  private async handleForcePasswordReset(orgIdentifier: string) {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([this.forcePasswordResetRoute], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  private async handleSuccessfulLogin() {\n    if (this.onSuccessfulLogin != null) {\n      // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n      // before navigating to the success route.\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLogin();\n    }\n    await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n  }\n\n  private async navigateViaCallbackOrRoute(\n    callback: () => Promise<unknown>,\n    commands: unknown[],\n    extras?: NavigationExtras,\n  ): Promise<void> {\n    if (callback) {\n      await callback();\n    } else {\n      await this.router.navigate(commands, extras);\n    }\n  }\n\n  private async authing(): Promise<boolean> {\n    return (await firstValueFrom(this.loginStrategyService.currentAuthType$)) !== null;\n  }\n\n  private async needsLock(): Promise<boolean> {\n    const authType = await firstValueFrom(this.loginStrategyService.currentAuthType$);\n    return authType == AuthenticationType.Sso || authType == AuthenticationType.UserApiKey;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\n\nimport { TwoFactorAuthDuoComponent as TwoFactorAuthDuoBaseComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-duo.component\";\nimport { AsyncActionsModule } from \"../../../../../libs/components/src/async-actions\";\nimport { ButtonModule } from \"../../../../../libs/components/src/button\";\nimport { FormFieldModule } from \"../../../../../libs/components/src/form-field\";\nimport { LinkModule } from \"../../../../../libs/components/src/link\";\nimport { TypographyModule } from \"../../../../../libs/components/src/typography\";\n\n@Component({\n  standalone: true,\n  selector: \"app-two-factor-auth-duo\",\n  templateUrl:\n    \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-duo.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    FormsModule,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthDuoComponent\n  extends TwoFactorAuthDuoBaseComponent\n  implements OnInit, OnDestroy\n{\n  async ngOnInit(): Promise<void> {\n    await super.ngOnInit();\n  }\n\n  private duoResultChannel: BroadcastChannel;\n\n  protected override setupDuoResultListener() {\n    if (!this.duoResultChannel) {\n      this.duoResultChannel = new BroadcastChannel(\"duoResult\");\n      this.duoResultChannel.addEventListener(\"message\", this.handleDuoResultMessage);\n    }\n  }\n\n  private handleDuoResultMessage = async (msg: { data: { code: string; state: string } }) => {\n    this.token.emit(msg.data.code + \"|\" + msg.data.state);\n  };\n\n  async ngOnDestroy() {\n    if (this.duoResultChannel) {\n      // clean up duo listener if it was initialized.\n      this.duoResultChannel.removeEventListener(\"message\", this.handleDuoResultMessage);\n      this.duoResultChannel.close();\n    }\n  }\n}\n","import { DialogModule } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { ActivatedRoute, Router, RouterLink } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nPipe } from \"@bitwarden/angular/platform/pipes/i18n.pipe\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  LinkModule,\n  TypographyModule,\n  CheckboxModule,\n  DialogService,\n  ToastService,\n} from \"@bitwarden/components\";\n\nimport { TwoFactorAuthAuthenticatorComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-authenticator.component\";\nimport { TwoFactorAuthEmailComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-email.component\";\nimport { TwoFactorAuthWebAuthnComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-webauthn.component\";\nimport { TwoFactorAuthYubikeyComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth-yubikey.component\";\nimport { TwoFactorAuthComponent as BaseTwoFactorAuthComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component\";\nimport { TwoFactorOptionsComponent } from \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-options.component\";\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"../../../../../libs/auth/src/common/abstractions\";\nimport { AsyncActionsModule } from \"../../../../../libs/components/src/async-actions\";\nimport { ButtonModule } from \"../../../../../libs/components/src/button\";\nimport { FormFieldModule } from \"../../../../../libs/components/src/form-field\";\n\nimport { TwoFactorAuthDuoComponent } from \"./two-factor-auth-duo.component\";\n\n@Component({\n  standalone: true,\n  templateUrl:\n    \"../../../../../libs/angular/src/auth/components/two-factor-auth/two-factor-auth.component.html\",\n  selector: \"app-two-factor-auth\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    RouterLink,\n    CheckboxModule,\n    TwoFactorOptionsComponent,\n    TwoFactorAuthEmailComponent,\n    TwoFactorAuthAuthenticatorComponent,\n    TwoFactorAuthYubikeyComponent,\n    TwoFactorAuthDuoComponent,\n    TwoFactorAuthWebAuthnComponent,\n  ],\n  providers: [I18nPipe],\n})\nexport class TwoFactorAuthComponent extends BaseTwoFactorAuthComponent {\n  constructor(\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    dialogService: DialogService,\n    protected route: ActivatedRoute,\n    logService: LogService,\n    protected twoFactorService: TwoFactorService,\n    loginEmailService: LoginEmailServiceAbstraction,\n    userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected configService: ConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    formBuilder: FormBuilder,\n    @Inject(WINDOW) protected win: Window,\n    toastService: ToastService,\n  ) {\n    super(\n      loginStrategyService,\n      router,\n      i18nService,\n      platformUtilsService,\n      environmentService,\n      dialogService,\n      route,\n      logService,\n      twoFactorService,\n      loginEmailService,\n      userDecryptionOptionsService,\n      ssoLoginService,\n      configService,\n      masterPasswordService,\n      accountService,\n      formBuilder,\n      win,\n      toastService,\n    );\n    this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n  }\n\n  protected override handleMigrateEncryptionKey(result: AuthResult): boolean {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([\"migrate-legacy-encryption\"]);\n    return true;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, Inject, OnInit, OnDestroy } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { ActivatedRoute, NavigationExtras, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\n// eslint-disable-next-line no-restricted-imports\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  TrustedDeviceUserDecryptionOption,\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { TwoFactorEmailRequest } from \"@bitwarden/common/auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviders } from \"@bitwarden/common/auth/services/two-factor.service\";\nimport { WebAuthnIFrame } from \"@bitwarden/common/auth/webauthn-iframe\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { CaptchaProtectedComponent } from \"./captcha-protected.component\";\n\n@Directive()\nexport class TwoFactorComponent extends CaptchaProtectedComponent implements OnInit, OnDestroy {\n  token = \"\";\n  remember = false;\n  webAuthnReady = false;\n  webAuthnNewTab = false;\n  providers = TwoFactorProviders;\n  providerType = TwoFactorProviderType;\n  selectedProviderType: TwoFactorProviderType = TwoFactorProviderType.Authenticator;\n  webAuthnSupported = false;\n  webAuthn: WebAuthnIFrame = null;\n  title = \"\";\n  twoFactorEmail: string = null;\n  formPromise: Promise<any>;\n  emailPromise: Promise<any>;\n  orgIdentifier: string = null;\n\n  duoFramelessUrl: string = null;\n  duoResultListenerInitialized = false;\n\n  onSuccessfulLogin: () => Promise<void>;\n  onSuccessfulLoginNavigate: () => Promise<void>;\n\n  onSuccessfulLoginTde: () => Promise<void>;\n  onSuccessfulLoginTdeNavigate: () => Promise<void>;\n\n  protected loginRoute = \"login\";\n\n  protected trustedDeviceEncRoute = \"login-initiated\";\n  protected changePasswordRoute = \"set-password\";\n  protected forcePasswordResetRoute = \"update-temp-password\";\n  protected successRoute = \"vault\";\n  protected twoFactorTimeoutRoute = \"2fa-timeout\";\n\n  get isDuoProvider(): boolean {\n    return (\n      this.selectedProviderType === TwoFactorProviderType.Duo ||\n      this.selectedProviderType === TwoFactorProviderType.OrganizationDuo\n    );\n  }\n\n  constructor(\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    protected i18nService: I18nService,\n    protected apiService: ApiService,\n    protected platformUtilsService: PlatformUtilsService,\n    @Inject(WINDOW) protected win: Window,\n    protected environmentService: EnvironmentService,\n    protected stateService: StateService,\n    protected route: ActivatedRoute,\n    protected logService: LogService,\n    protected twoFactorService: TwoFactorService,\n    protected appIdService: AppIdService,\n    protected loginEmailService: LoginEmailServiceAbstraction,\n    protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected configService: ConfigService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {\n    super(environmentService, i18nService, platformUtilsService, toastService);\n    this.webAuthnSupported = this.platformUtilsService.supportsWebAuthn(win);\n\n    // Add subscription to twoFactorTimeout$ and navigate to twoFactorTimeoutRoute if expired\n    this.loginStrategyService.twoFactorTimeout$\n      .pipe(takeUntilDestroyed())\n      .subscribe(async (expired) => {\n        if (!expired) {\n          return;\n        }\n\n        try {\n          await this.router.navigate([this.twoFactorTimeoutRoute]);\n        } catch (err) {\n          this.logService.error(`Failed to navigate to ${this.twoFactorTimeoutRoute} route`, err);\n        }\n      });\n  }\n\n  async ngOnInit() {\n    if (!(await this.authing()) || (await this.twoFactorService.getProviders()) == null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([this.loginRoute]);\n      return;\n    }\n\n    this.route.queryParams.pipe(first()).subscribe((qParams) => {\n      if (qParams.identifier != null) {\n        this.orgIdentifier = qParams.identifier;\n      }\n    });\n\n    if (await this.needsLock()) {\n      this.successRoute = \"lock\";\n    }\n\n    if (this.win != null && this.webAuthnSupported) {\n      const env = await firstValueFrom(this.environmentService.environment$);\n      const webVaultUrl = env.getWebVaultUrl();\n      this.webAuthn = new WebAuthnIFrame(\n        this.win,\n        webVaultUrl,\n        this.webAuthnNewTab,\n        this.platformUtilsService,\n        this.i18nService,\n        (token: string) => {\n          this.token = token;\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.submit();\n        },\n        (error: string) => {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"errorOccurred\"),\n            message: error,\n          });\n        },\n        (info: string) => {\n          if (info === \"ready\") {\n            this.webAuthnReady = true;\n          }\n        },\n      );\n    }\n\n    this.selectedProviderType = await this.twoFactorService.getDefaultProvider(\n      this.webAuthnSupported,\n    );\n    await this.init();\n  }\n\n  ngOnDestroy(): void {\n    this.cleanupWebAuthn();\n    this.webAuthn = null;\n  }\n\n  async init() {\n    if (this.selectedProviderType == null) {\n      this.title = this.i18nService.t(\"loginUnavailable\");\n      return;\n    }\n\n    this.cleanupWebAuthn();\n    this.title = (TwoFactorProviders as any)[this.selectedProviderType].name;\n    const providerData = await this.twoFactorService.getProviders().then((providers) => {\n      return providers.get(this.selectedProviderType);\n    });\n    switch (this.selectedProviderType) {\n      case TwoFactorProviderType.WebAuthn:\n        if (!this.webAuthnNewTab) {\n          setTimeout(async () => {\n            await this.authWebAuthn();\n          }, 500);\n        }\n        break;\n      case TwoFactorProviderType.Duo:\n      case TwoFactorProviderType.OrganizationDuo:\n        // Setup listener for duo-redirect.ts connector to send back the code\n        if (!this.duoResultListenerInitialized) {\n          // setup client specific duo result listener\n          this.setupDuoResultListener();\n          this.duoResultListenerInitialized = true;\n        }\n        // flow must be launched by user so they can choose to remember the device or not.\n        this.duoFramelessUrl = providerData.AuthUrl;\n        break;\n      case TwoFactorProviderType.Email:\n        this.twoFactorEmail = providerData.Email;\n        if ((await this.twoFactorService.getProviders()).size > 1) {\n          await this.sendEmail(false);\n        }\n        break;\n      default:\n        break;\n    }\n  }\n\n  async submit() {\n    await this.setupCaptcha();\n\n    if (this.token == null || this.token === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"verificationCodeRequired\"),\n      });\n      return;\n    }\n\n    if (this.selectedProviderType === TwoFactorProviderType.WebAuthn) {\n      if (this.webAuthn != null) {\n        this.webAuthn.stop();\n      } else {\n        return;\n      }\n    } else if (\n      this.selectedProviderType === TwoFactorProviderType.Email ||\n      this.selectedProviderType === TwoFactorProviderType.Authenticator\n    ) {\n      this.token = this.token.replace(\" \", \"\").trim();\n    }\n\n    await this.doSubmit();\n    if (this.selectedProviderType === TwoFactorProviderType.WebAuthn && this.webAuthn != null) {\n      this.webAuthn.start();\n    }\n  }\n\n  async doSubmit() {\n    this.formPromise = this.loginStrategyService.logInTwoFactor(\n      new TokenTwoFactorRequest(this.selectedProviderType, this.token, this.remember),\n      this.captchaToken,\n    );\n    const authResult: AuthResult = await this.formPromise;\n\n    await this.handleLoginResponse(authResult);\n  }\n\n  protected handleMigrateEncryptionKey(result: AuthResult): boolean {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n\n    this.toastService.showToast({\n      variant: \"error\",\n      title: this.i18nService.t(\"errorOccured\"),\n      message: this.i18nService.t(\"encryptionKeyMigrationRequired\"),\n    });\n    return true;\n  }\n\n  // Each client will have own implementation\n  protected setupDuoResultListener(): void {}\n\n  private async handleLoginResponse(authResult: AuthResult) {\n    if (this.handleCaptchaRequired(authResult)) {\n      return;\n    } else if (this.handleMigrateEncryptionKey(authResult)) {\n      return;\n    }\n\n    // Save off the OrgSsoIdentifier for use in the TDE flows\n    // - TDE login decryption options component\n    // - Browser SSO on extension open\n    await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(this.orgIdentifier);\n    this.loginEmailService.clearValues();\n\n    // note: this flow affects both TDE & standard users\n    if (this.isForcePasswordResetRequired(authResult)) {\n      return await this.handleForcePasswordReset(this.orgIdentifier);\n    }\n\n    const userDecryptionOpts = await firstValueFrom(\n      this.userDecryptionOptionsService.userDecryptionOptions$,\n    );\n\n    const tdeEnabled = await this.isTrustedDeviceEncEnabled(userDecryptionOpts.trustedDeviceOption);\n\n    if (tdeEnabled) {\n      return await this.handleTrustedDeviceEncryptionEnabled(\n        authResult,\n        this.orgIdentifier,\n        userDecryptionOpts,\n      );\n    }\n\n    // User must set password if they don't have one and they aren't using either TDE or key connector.\n    const requireSetPassword =\n      !userDecryptionOpts.hasMasterPassword && userDecryptionOpts.keyConnectorOption === undefined;\n\n    if (requireSetPassword || authResult.resetMasterPassword) {\n      // Change implies going no password -> password in this case\n      return await this.handleChangePasswordRequired(this.orgIdentifier);\n    }\n\n    return await this.handleSuccessfulLogin();\n  }\n\n  private async isTrustedDeviceEncEnabled(\n    trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n  ): Promise<boolean> {\n    const ssoTo2faFlowActive = this.route.snapshot.queryParamMap.get(\"sso\") === \"true\";\n\n    return ssoTo2faFlowActive && trustedDeviceOption !== undefined;\n  }\n\n  private async handleTrustedDeviceEncryptionEnabled(\n    authResult: AuthResult,\n    orgIdentifier: string,\n    userDecryptionOpts: UserDecryptionOptions,\n  ): Promise<void> {\n    // If user doesn't have a MP, but has reset password permission, they must set a MP\n    if (\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n    ) {\n      // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n      // Note: we cannot directly navigate to the set password screen in this scenario as we are in a pre-decryption state, and\n      // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n        userId,\n      );\n    }\n\n    if (this.onSuccessfulLoginTde != null) {\n      // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n      // before navigating to the success route.\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLoginTde();\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginTdeNavigate,\n      // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n      //  their user key, the login-initiated guard will redirect them to the vault)\n      [this.trustedDeviceEncRoute],\n    );\n  }\n\n  private async handleChangePasswordRequired(orgIdentifier: string) {\n    await this.router.navigate([this.changePasswordRoute], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  /**\n   * Determines if a user needs to reset their password based on certain conditions.\n   * Users can be forced to reset their password via an admin or org policy disallowing weak passwords.\n   * Note: this is different from the SSO component login flow as a user can\n   * login with MP and then have to pass 2FA to finish login and we can actually\n   * evaluate if they have a weak password at that time.\n   *\n   * @param {AuthResult} authResult - The authentication result.\n   * @returns {boolean} Returns true if a password reset is required, false otherwise.\n   */\n  private isForcePasswordResetRequired(authResult: AuthResult): boolean {\n    const forceResetReasons = [\n      ForceSetPasswordReason.AdminForcePasswordReset,\n      ForceSetPasswordReason.WeakMasterPassword,\n    ];\n\n    return forceResetReasons.includes(authResult.forcePasswordReset);\n  }\n\n  private async handleForcePasswordReset(orgIdentifier: string) {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([this.forcePasswordResetRoute], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  private async handleSuccessfulLogin() {\n    if (this.onSuccessfulLogin != null) {\n      // Note: awaiting this will currently cause a hang on desktop & browser as they will wait for a full sync to complete\n      // before navigating to the success route.\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLogin();\n    }\n    await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n  }\n\n  private async navigateViaCallbackOrRoute(\n    callback: () => Promise<unknown>,\n    commands: unknown[],\n    extras?: NavigationExtras,\n  ): Promise<void> {\n    if (callback) {\n      await callback();\n    } else {\n      await this.router.navigate(commands, extras);\n    }\n  }\n\n  async sendEmail(doToast: boolean) {\n    if (this.selectedProviderType !== TwoFactorProviderType.Email) {\n      return;\n    }\n\n    if (this.emailPromise != null) {\n      return;\n    }\n\n    if ((await this.loginStrategyService.getEmail()) == null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"sessionTimeout\"),\n      });\n      return;\n    }\n\n    try {\n      const request = new TwoFactorEmailRequest();\n      request.email = await this.loginStrategyService.getEmail();\n      request.masterPasswordHash = await this.loginStrategyService.getMasterPasswordHash();\n      request.ssoEmail2FaSessionToken =\n        await this.loginStrategyService.getSsoEmail2FaSessionToken();\n      request.deviceIdentifier = await this.appIdService.getAppId();\n      request.authRequestAccessCode = await this.loginStrategyService.getAccessCode();\n      request.authRequestId = await this.loginStrategyService.getAuthRequestId();\n      this.emailPromise = this.apiService.postTwoFactorEmail(request);\n      await this.emailPromise;\n      if (doToast) {\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"verificationCodeEmailSent\", this.twoFactorEmail),\n        });\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    this.emailPromise = null;\n  }\n\n  async authWebAuthn() {\n    const providerData = await this.twoFactorService.getProviders().then((providers) => {\n      return providers.get(this.selectedProviderType);\n    });\n\n    if (!this.webAuthnSupported || this.webAuthn == null) {\n      return;\n    }\n\n    this.webAuthn.init(providerData);\n  }\n\n  private cleanupWebAuthn() {\n    if (this.webAuthn != null) {\n      this.webAuthn.stop();\n      this.webAuthn.cleanup();\n    }\n  }\n\n  private async authing(): Promise<boolean> {\n    return (await firstValueFrom(this.loginStrategyService.currentAuthType$)) !== null;\n  }\n\n  private async needsLock(): Promise<boolean> {\n    const authType = await firstValueFrom(this.loginStrategyService.currentAuthType$);\n    return authType == AuthenticationType.Sso || authType == AuthenticationType.UserApiKey;\n  }\n\n  async launchDuoFrameless() {\n    if (this.duoFramelessUrl === null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"duoHealthCheckResultsInNullAuthUrlError\"),\n      });\n      return;\n    }\n\n    this.platformUtilsService.launchUri(this.duoFramelessUrl);\n  }\n}\n","import { Directive, EventEmitter, OnInit, Output } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  TwoFactorProviderDetails,\n  TwoFactorService,\n} from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive()\nexport class TwoFactorOptionsComponent implements OnInit {\n  @Output() onProviderSelected = new EventEmitter<TwoFactorProviderType>();\n  @Output() onRecoverSelected = new EventEmitter();\n\n  providers: any[] = [];\n\n  constructor(\n    protected twoFactorService: TwoFactorService,\n    protected router: Router,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected win: Window,\n    protected environmentService: EnvironmentService,\n  ) {}\n\n  async ngOnInit() {\n    this.providers = await this.twoFactorService.getSupportedProviders(this.win);\n  }\n\n  async choose(p: TwoFactorProviderDetails) {\n    this.onProviderSelected.emit(p.type);\n  }\n\n  async recover() {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const webVault = env.getWebVaultUrl();\n    this.platformUtilsService.launchUri(webVault + \"/#/recover-2fa\");\n    this.onRecoverSelected.emit();\n  }\n}\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { TwoFactorOptionsComponent as BaseTwoFactorOptionsComponent } from \"@bitwarden/angular/auth/components/two-factor-options.component\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport enum TwoFactorOptionsDialogResult {\n  Provider = \"Provider selected\",\n  Recover = \"Recover selected\",\n}\n\nexport type TwoFactorOptionsDialogResultType = {\n  result: TwoFactorOptionsDialogResult;\n  type: TwoFactorProviderType;\n};\n\n@Component({\n  selector: \"app-two-factor-options\",\n  templateUrl: \"two-factor-options.component.html\",\n})\nexport class TwoFactorOptionsComponent extends BaseTwoFactorOptionsComponent {\n  constructor(\n    twoFactorService: TwoFactorService,\n    router: Router,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    private dialogRef: DialogRef,\n  ) {\n    super(twoFactorService, router, i18nService, platformUtilsService, window, environmentService);\n  }\n\n  async choose(p: any) {\n    await super.choose(p);\n    this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Provider, type: p.type });\n  }\n\n  async recover() {\n    await super.recover();\n    this.dialogRef.close({ result: TwoFactorOptionsDialogResult.Recover });\n  }\n\n  static open(dialogService: DialogService) {\n    return dialogService.open<TwoFactorOptionsDialogResultType>(TwoFactorOptionsComponent);\n  }\n}\n","<bit-dialog dialogSize=\"large\">\n  <span bitDialogTitle>\n    {{ \"twoStepOptions\" | i18n }}\n  </span>\n  <ng-container bitDialogContent>\n    <div *ngFor=\"let p of providers\" class=\"tw-m-2\">\n      <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-4\">\n        <div class=\"tw-flex tw-items-center tw-justify-center tw-min-w-[120px]\">\n          <auth-two-factor-icon [provider]=\"p.type\" />\n        </div>\n        <div class=\"tw-flex-1\">\n          <h3 bitTypography=\"h3\">{{ p.name }}</h3>\n          <p bitTypography=\"body1\">{{ p.description }}</p>\n        </div>\n        <div class=\"tw-min-w-20\">\n          <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"choose(p)\">\n            {{ \"select\" | i18n }}\n          </button>\n        </div>\n      </div>\n      <hr />\n    </div>\n    <div class=\"tw-m-2\" (click)=\"recover()\">\n      <div class=\"tw-flex tw-items-center tw-justify-center tw-gap-4\">\n        <div class=\"tw-flex tw-items-center tw-justify-center tw-min-w-[120px]\">\n          <auth-two-factor-icon provider=\"rc\" />\n        </div>\n        <div class=\"tw-flex-1\">\n          <h3 bitTypography=\"h3\">{{ \"recoveryCodeTitle\" | i18n }}</h3>\n          <p bitTypography=\"body1\">{{ \"recoveryCodeDesc\" | i18n }}</p>\n        </div>\n        <div class=\"tw-min-w-20\">\n          <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"recover()\">\n            {{ \"select\" | i18n }}\n          </button>\n        </div>\n      </div>\n    </div>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","<form [bitSubmit]=\"submitForm\" [formGroup]=\"formGroup\" autocomplete=\"off\">\n  <div class=\"tw-min-w-96\">\n    <ng-container\n      *ngIf=\"\n        selectedProviderType === providerType.Email ||\n        selectedProviderType === providerType.Authenticator\n      \"\n    >\n      <p bitTypography=\"body1\" *ngIf=\"selectedProviderType === providerType.Authenticator\">\n        {{ \"enterVerificationCodeApp\" | i18n }}\n      </p>\n      <p bitTypography=\"body1\" *ngIf=\"selectedProviderType === providerType.Email\">\n        {{ \"enterVerificationCodeEmail\" | i18n: twoFactorEmail }}\n      </p>\n      <bit-form-field>\n        <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"token\" appAutofocus appInputVerbatim />\n        <bit-hint *ngIf=\"selectedProviderType === providerType.Email\">\n          <a\n            bitLink\n            href=\"#\"\n            appStopClick\n            (click)=\"sendEmail(true)\"\n            *ngIf=\"selectedProviderType === providerType.Email\"\n          >\n            {{ \"sendVerificationCodeEmailAgain\" | i18n }}\n          </a></bit-hint\n        >\n      </bit-form-field>\n    </ng-container>\n    <ng-container *ngIf=\"selectedProviderType === providerType.Yubikey\">\n      <p bitTypography=\"body1\" class=\"tw-text-center\">{{ \"insertYubiKey\" | i18n }}</p>\n      <picture>\n        <source srcset=\"../../images/yubikey.avif\" type=\"image/avif\" />\n        <source srcset=\"../../images/yubikey.webp\" type=\"image/webp\" />\n        <img src=\"../../images/yubikey.jpg\" class=\"tw-rounded img-fluid tw-mb-3\" alt=\"\" />\n      </picture>\n      <bit-form-field>\n        <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n        <input type=\"password\" bitInput formControlName=\"token\" appAutofocus appInputVerbatim />\n      </bit-form-field>\n    </ng-container>\n    <ng-container *ngIf=\"selectedProviderType === providerType.WebAuthn\">\n      <div id=\"web-authn-frame\" class=\"tw-mb-3\">\n        <iframe id=\"webauthn_iframe\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n      </div>\n    </ng-container>\n    <!-- Duo -->\n    <ng-container *ngIf=\"isDuoProvider\">\n      <p\n        bitTypography=\"body1\"\n        *ngIf=\"selectedProviderType === providerType.OrganizationDuo\"\n        class=\"tw-mb-0\"\n      >\n        {{ \"duoRequiredByOrgForAccount\" | i18n }}\n      </p>\n      <p bitTypography=\"body1\">{{ \"launchDuoAndFollowStepsToFinishLoggingIn\" | i18n }}</p>\n    </ng-container>\n    <bit-form-control *ngIf=\"selectedProviderType != null\">\n      <bit-label>{{ \"rememberMe\" | i18n }}</bit-label>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"remember\" />\n    </bit-form-control>\n    <ng-container *ngIf=\"selectedProviderType == null\">\n      <p bitTypography=\"body1\">{{ \"noTwoStepProviders\" | i18n }}</p>\n      <p bitTypography=\"body1\">{{ \"noTwoStepProviders2\" | i18n }}</p>\n    </ng-container>\n    <hr />\n    <div [hidden]=\"!showCaptcha()\">\n      <iframe id=\"hcaptcha_iframe\" height=\"80\" sandbox=\"allow-scripts allow-same-origin\"></iframe>\n    </div>\n    <!-- Buttons -->\n    <div class=\"tw-flex tw-flex-col tw-space-y-2.5 tw-mb-3\">\n      <button\n        type=\"submit\"\n        buttonType=\"primary\"\n        bitButton\n        bitFormButton\n        *ngIf=\"\n          selectedProviderType != null &&\n          !isDuoProvider &&\n          selectedProviderType !== providerType.WebAuthn\n        \"\n      >\n        <span> <i class=\"bwi bwi-sign-in\" aria-hidden=\"true\"></i> {{ \"continue\" | i18n }} </span>\n      </button>\n      <button\n        (click)=\"launchDuoFrameless()\"\n        type=\"button\"\n        buttonType=\"primary\"\n        bitButton\n        bitFormButton\n        *ngIf=\"isDuoProvider\"\n      >\n        <span> {{ \"launchDuo\" | i18n }} </span>\n      </button>\n      <a routerLink=\"/login\" bitButton buttonType=\"secondary\">\n        {{ \"cancel\" | i18n }}\n      </a>\n    </div>\n    <div class=\"text-center\">\n      <a bitLink href=\"#\" appStopClick (click)=\"anotherMethod()\">{{\n        \"useAnotherTwoStepMethod\" | i18n\n      }}</a>\n    </div>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Inject, OnDestroy, OnInit, ViewChild, ViewContainerRef } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil, lastValueFrom } from \"rxjs\";\n\nimport { TwoFactorComponent as BaseTwoFactorComponent } from \"@bitwarden/angular/auth/components/two-factor.component\";\nimport { WINDOW } from \"@bitwarden/angular/services/injection-tokens\";\nimport {\n  LoginStrategyServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\nimport {\n  TwoFactorOptionsDialogResult,\n  TwoFactorOptionsComponent,\n  TwoFactorOptionsDialogResultType,\n} from \"./two-factor-options.component\";\n\n@Component({\n  selector: \"app-two-factor\",\n  templateUrl: \"two-factor.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class TwoFactorComponent extends BaseTwoFactorComponent implements OnInit, OnDestroy {\n  @ViewChild(\"twoFactorOptions\", { read: ViewContainerRef, static: true })\n  twoFactorOptionsModal: ViewContainerRef;\n  formGroup = this.formBuilder.group({\n    token: [\n      \"\",\n      {\n        validators: [Validators.required],\n        updateOn: \"submit\",\n      },\n    ],\n    remember: [false],\n  });\n  private destroy$ = new Subject<void>();\n  constructor(\n    loginStrategyService: LoginStrategyServiceAbstraction,\n    router: Router,\n    i18nService: I18nService,\n    apiService: ApiService,\n    platformUtilsService: PlatformUtilsService,\n    stateService: StateService,\n    environmentService: EnvironmentService,\n    private dialogService: DialogService,\n    route: ActivatedRoute,\n    logService: LogService,\n    twoFactorService: TwoFactorService,\n    appIdService: AppIdService,\n    loginEmailService: LoginEmailServiceAbstraction,\n    userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    ssoLoginService: SsoLoginServiceAbstraction,\n    configService: ConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    toastService: ToastService,\n    private formBuilder: FormBuilder,\n    @Inject(WINDOW) protected win: Window,\n  ) {\n    super(\n      loginStrategyService,\n      router,\n      i18nService,\n      apiService,\n      platformUtilsService,\n      win,\n      environmentService,\n      stateService,\n      route,\n      logService,\n      twoFactorService,\n      appIdService,\n      loginEmailService,\n      userDecryptionOptionsService,\n      ssoLoginService,\n      configService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n    this.onSuccessfulLoginNavigate = this.goAfterLogIn;\n  }\n  async ngOnInit() {\n    await super.ngOnInit();\n    this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((value) => {\n      this.token = value.token;\n      this.remember = value.remember;\n    });\n  }\n  submitForm = async () => {\n    await this.submit();\n  };\n\n  async anotherMethod() {\n    const dialogRef = TwoFactorOptionsComponent.open(this.dialogService);\n    const response: TwoFactorOptionsDialogResultType = await lastValueFrom(dialogRef.closed);\n    if (response.result === TwoFactorOptionsDialogResult.Provider) {\n      this.selectedProviderType = response.type;\n      await this.init();\n    }\n  }\n\n  protected override handleMigrateEncryptionKey(result: AuthResult): boolean {\n    if (!result.requiresEncryptionKeyMigration) {\n      return false;\n    }\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([\"migrate-legacy-encryption\"]);\n    return true;\n  }\n\n  goAfterLogIn = async () => {\n    this.loginEmailService.clearValues();\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.router.navigate([this.successRoute], {\n      queryParams: {\n        identifier: this.orgIdentifier,\n      },\n    });\n  };\n\n  private duoResultChannel: BroadcastChannel;\n\n  protected override setupDuoResultListener() {\n    if (!this.duoResultChannel) {\n      this.duoResultChannel = new BroadcastChannel(\"duoResult\");\n      this.duoResultChannel.addEventListener(\"message\", this.handleDuoResultMessage);\n    }\n  }\n\n  private handleDuoResultMessage = async (msg: { data: { code: string; state: string } }) => {\n    this.token = msg.data.code + \"|\" + msg.data.state;\n    await this.submit();\n  };\n\n  async ngOnDestroy() {\n    super.ngOnDestroy();\n\n    if (this.duoResultChannel) {\n      // clean up duo listener if it was initialized.\n      this.duoResultChannel.removeEventListener(\"message\", this.handleDuoResultMessage);\n      this.duoResultChannel.close();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { Verification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class UpdatePasswordComponent extends BaseChangePasswordComponent {\n  hint: string;\n  key: string;\n  enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  showPassword = false;\n  currentMasterPassword: string;\n\n  onSuccessfulChangePassword: () => Promise<void>;\n\n  constructor(\n    protected router: Router,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    policyService: PolicyService,\n    keyService: KeyService,\n    messagingService: MessagingService,\n    private apiService: ApiService,\n    stateService: StateService,\n    private userVerificationService: UserVerificationService,\n    private logService: LogService,\n    dialogService: DialogService,\n    kdfConfigService: KdfConfigService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      keyService,\n      messagingService,\n      passwordGenerationService,\n      platformUtilsService,\n      policyService,\n      stateService,\n      dialogService,\n      kdfConfigService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n  }\n\n  togglePassword(confirmField: boolean) {\n    this.showPassword = !this.showPassword;\n    document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n  }\n\n  async cancel() {\n    await this.router.navigate([\"/vault\"]);\n  }\n\n  async setupSubmitActions(): Promise<boolean> {\n    if (this.currentMasterPassword == null || this.currentMasterPassword === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordRequired\"),\n      });\n      return false;\n    }\n\n    const secret: Verification = {\n      type: VerificationType.MasterPassword,\n      secret: this.currentMasterPassword,\n    };\n    try {\n      await this.userVerificationService.verifyUser(secret);\n    } catch (e) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: e.message,\n      });\n      return false;\n    }\n\n    this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n    return true;\n  }\n\n  async performSubmitActions(\n    newMasterKeyHash: string,\n    newMasterKey: MasterKey,\n    newUserKey: [UserKey, EncString],\n  ) {\n    try {\n      // Create Request\n      const request = new PasswordRequest();\n      request.masterPasswordHash = await this.keyService.hashMasterKey(\n        this.currentMasterPassword,\n        await this.keyService.getOrDeriveMasterKey(this.currentMasterPassword),\n      );\n      request.newMasterPasswordHash = newMasterKeyHash;\n      request.key = newUserKey[1].encryptedString;\n\n      // Update user's password\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.apiService.postPassword(request);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: this.i18nService.t(\"masterPasswordChanged\"),\n        message: this.i18nService.t(\"logBackIn\"),\n      });\n\n      if (this.onSuccessfulChangePassword != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulChangePassword();\n      } else {\n        this.messagingService.send(\"logout\");\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n}\n","<form #form (ngSubmit)=\"submit()\" [appApiAction]=\"formPromise\" ngNativeValidate autocomplete=\"off\">\n  <div class=\"row justify-content-md-center mt-5\">\n    <div class=\"col-4\">\n      <p class=\"lead text-center mb-4\">{{ \"updateMasterPassword\" | i18n }}</p>\n      <div class=\"card d-block\">\n        <div class=\"card-body\">\n          <app-callout type=\"warning\">{{ \"masterPasswordInvalidWarning\" | i18n }} </app-callout>\n          <auth-password-callout\n            [policy]=\"enforcedPolicyOptions\"\n            *ngIf=\"enforcedPolicyOptions\"\n          ></auth-password-callout>\n\n          <form\n            #form\n            (ngSubmit)=\"submit()\"\n            [appApiAction]=\"formPromise\"\n            ngNativeValidate\n            autocomplete=\"off\"\n          >\n            <div class=\"row\">\n              <div class=\"col-6\">\n                <div class=\"form-group\">\n                  <label for=\"currentMasterPassword\">{{ \"currentMasterPass\" | i18n }}</label>\n                  <input\n                    id=\"currentMasterPassword\"\n                    type=\"password\"\n                    name=\"MasterPasswordHash\"\n                    class=\"form-control\"\n                    [(ngModel)]=\"currentMasterPassword\"\n                    required\n                    appInputVerbatim\n                  />\n                </div>\n              </div>\n            </div>\n            <div class=\"row\">\n              <div class=\"col-6\">\n                <div class=\"form-group\">\n                  <label for=\"newMasterPassword\">{{ \"newMasterPass\" | i18n }}</label>\n                  <input\n                    id=\"newMasterPassword\"\n                    type=\"password\"\n                    name=\"NewMasterPasswordHash\"\n                    class=\"form-control mb-1\"\n                    [(ngModel)]=\"masterPassword\"\n                    required\n                    appInputVerbatim\n                    autocomplete=\"new-password\"\n                  />\n                  <app-password-strength\n                    [password]=\"masterPassword\"\n                    [email]=\"email\"\n                    [showText]=\"true\"\n                    (passwordStrengthResult)=\"getStrengthResult($event)\"\n                  ></app-password-strength>\n                </div>\n              </div>\n              <div class=\"col-6\">\n                <div class=\"form-group\">\n                  <label for=\"masterPasswordRetype\">{{ \"confirmNewMasterPass\" | i18n }}</label>\n                  <input\n                    id=\"masterPasswordRetype\"\n                    type=\"password\"\n                    name=\"MasterPasswordRetype\"\n                    class=\"form-control\"\n                    [(ngModel)]=\"masterPasswordRetype\"\n                    required\n                    appInputVerbatim\n                    autocomplete=\"new-password\"\n                  />\n                </div>\n              </div>\n            </div>\n            <button type=\"submit\" class=\"btn btn-primary btn-submit\" [disabled]=\"form.loading\">\n              <i\n                class=\"fa fa-spinner fa-spin\"\n                title=\"{{ 'loading' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span>{{ \"changeMasterPassword\" | i18n }}</span>\n            </button>\n            <button (click)=\"cancel()\" type=\"button\" class=\"btn btn-outline-secondary\">\n              <span>{{ \"cancel\" | i18n }}</span>\n            </button>\n          </form>\n        </div>\n      </div>\n    </div>\n  </div>\n</form>\n","import { Component, inject } from \"@angular/core\";\n\nimport { UpdatePasswordComponent as BaseUpdatePasswordComponent } from \"@bitwarden/angular/auth/components/update-password.component\";\n\nimport { RouterService } from \"../core\";\n\nimport { AcceptOrganizationInviteService } from \"./organization-invite/accept-organization.service\";\n\n@Component({\n  selector: \"app-update-password\",\n  templateUrl: \"update-password.component.html\",\n})\nexport class UpdatePasswordComponent extends BaseUpdatePasswordComponent {\n  private routerService = inject(RouterService);\n  private acceptOrganizationInviteService = inject(AcceptOrganizationInviteService);\n\n  override async cancel() {\n    // clearing the login redirect url so that the user\n    // does not join the organization if they cancel\n    await this.routerService.getAndClearLoginRedirectUrl();\n    await this.acceptOrganizationInviteService.clearOrganizationInvitation();\n    await super.cancel();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationUserResetPasswordRequest } from \"@bitwarden/admin-console/common\";\n\nexport class UpdateTdeOffboardingPasswordRequest extends OrganizationUserResetPasswordRequest {\n  masterPasswordHint: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationUserResetPasswordRequest } from \"@bitwarden/admin-console/common\";\n\nexport class UpdateTempPasswordRequest extends OrganizationUserResetPasswordRequest {\n  masterPasswordHint: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { PasswordRequest } from \"@bitwarden/common/auth/models/request/password.request\";\nimport { UpdateTdeOffboardingPasswordRequest } from \"@bitwarden/common/auth/models/request/update-tde-offboarding-password.request\";\nimport { UpdateTempPasswordRequest } from \"@bitwarden/common/auth/models/request/update-temp-password.request\";\nimport { MasterPasswordVerification } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport { ChangePasswordComponent as BaseChangePasswordComponent } from \"./change-password.component\";\n\n@Directive()\nexport class UpdateTempPasswordComponent extends BaseChangePasswordComponent implements OnInit {\n  hint: string;\n  key: string;\n  enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  showPassword = false;\n  reason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n  verification: MasterPasswordVerification = {\n    type: VerificationType.MasterPassword,\n    secret: \"\",\n  };\n\n  onSuccessfulChangePassword: () => Promise<any>;\n\n  get requireCurrentPassword(): boolean {\n    return this.reason === ForceSetPasswordReason.WeakMasterPassword;\n  }\n\n  constructor(\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    policyService: PolicyService,\n    keyService: KeyService,\n    messagingService: MessagingService,\n    private apiService: ApiService,\n    stateService: StateService,\n    private syncService: SyncService,\n    private logService: LogService,\n    private userVerificationService: UserVerificationService,\n    protected router: Router,\n    dialogService: DialogService,\n    kdfConfigService: KdfConfigService,\n    accountService: AccountService,\n    masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      keyService,\n      messagingService,\n      passwordGenerationService,\n      platformUtilsService,\n      policyService,\n      stateService,\n      dialogService,\n      kdfConfigService,\n      masterPasswordService,\n      accountService,\n      toastService,\n    );\n  }\n\n  async ngOnInit() {\n    await this.syncService.fullSync(true);\n\n    const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    this.reason = await firstValueFrom(this.masterPasswordService.forceSetPasswordReason$(userId));\n\n    // If we somehow end up here without a reason, go back to the home page\n    if (this.reason == ForceSetPasswordReason.None) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"/\"]);\n      return;\n    }\n\n    await super.ngOnInit();\n  }\n\n  get masterPasswordWarningText(): string {\n    if (this.reason == ForceSetPasswordReason.WeakMasterPassword) {\n      return this.i18nService.t(\"updateWeakMasterPasswordWarning\");\n    } else if (this.reason == ForceSetPasswordReason.TdeOffboarding) {\n      return this.i18nService.t(\"tdeDisabledMasterPasswordRequired\");\n    } else {\n      return this.i18nService.t(\"updateMasterPasswordWarning\");\n    }\n  }\n\n  togglePassword(confirmField: boolean) {\n    this.showPassword = !this.showPassword;\n    document.getElementById(confirmField ? \"masterPasswordRetype\" : \"masterPassword\").focus();\n  }\n\n  async setupSubmitActions(): Promise<boolean> {\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n    this.kdfConfig = await this.kdfConfigService.getKdfConfig();\n    return true;\n  }\n\n  async submit() {\n    // Validation\n    if (!(await this.strongPassword())) {\n      return;\n    }\n\n    if (!(await this.setupSubmitActions())) {\n      return;\n    }\n\n    try {\n      // Create new key and hash new password\n      const newMasterKey = await this.keyService.makeMasterKey(\n        this.masterPassword,\n        this.email.trim().toLowerCase(),\n        this.kdfConfig,\n      );\n      const newPasswordHash = await this.keyService.hashMasterKey(\n        this.masterPassword,\n        newMasterKey,\n      );\n\n      // Grab user key\n      const userKey = await this.keyService.getUserKey();\n\n      // Encrypt user key with new master key\n      const newProtectedUserKey = await this.keyService.encryptUserKeyWithMasterKey(\n        newMasterKey,\n        userKey,\n      );\n\n      await this.performSubmitActions(newPasswordHash, newMasterKey, newProtectedUserKey);\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async performSubmitActions(\n    masterPasswordHash: string,\n    masterKey: MasterKey,\n    userKey: [UserKey, EncString],\n  ) {\n    try {\n      switch (this.reason) {\n        case ForceSetPasswordReason.AdminForcePasswordReset:\n          this.formPromise = this.updateTempPassword(masterPasswordHash, userKey);\n          break;\n        case ForceSetPasswordReason.WeakMasterPassword:\n          this.formPromise = this.updatePassword(masterPasswordHash, userKey);\n          break;\n        case ForceSetPasswordReason.TdeOffboarding:\n          this.formPromise = this.updateTdeOffboardingPassword(masterPasswordHash, userKey);\n          break;\n      }\n\n      await this.formPromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"updatedMasterPassword\"),\n      });\n\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.None,\n        userId,\n      );\n\n      if (this.onSuccessfulChangePassword != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulChangePassword();\n      } else {\n        this.messagingService.send(\"logout\");\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n  private async updateTempPassword(masterPasswordHash: string, userKey: [UserKey, EncString]) {\n    const request = new UpdateTempPasswordRequest();\n    request.key = userKey[1].encryptedString;\n    request.newMasterPasswordHash = masterPasswordHash;\n    request.masterPasswordHint = this.hint;\n\n    return this.apiService.putUpdateTempPassword(request);\n  }\n\n  private async updatePassword(newMasterPasswordHash: string, userKey: [UserKey, EncString]) {\n    const request = await this.userVerificationService.buildRequest(\n      this.verification,\n      PasswordRequest,\n    );\n    request.masterPasswordHint = this.hint;\n    request.newMasterPasswordHash = newMasterPasswordHash;\n    request.key = userKey[1].encryptedString;\n\n    return this.apiService.postPassword(request);\n  }\n\n  private async updateTdeOffboardingPassword(\n    masterPasswordHash: string,\n    userKey: [UserKey, EncString],\n  ) {\n    const request = new UpdateTdeOffboardingPasswordRequest();\n    request.key = userKey[1].encryptedString;\n    request.newMasterPasswordHash = masterPasswordHash;\n    request.masterPasswordHint = this.hint;\n\n    return this.apiService.putUpdateTdeOffboardingPassword(request);\n  }\n}\n","<form #form (ngSubmit)=\"submit()\" [appApiAction]=\"formPromise\" ngNativeValidate autocomplete=\"off\">\n  <div class=\"tw-mt-12 tw-flex tw-justify-center\">\n    <div class=\"tw-w-1/3\">\n      <h1 bitTypography=\"h1\" class=\"tw-mb-4 tw-text-center\">{{ \"updateMasterPassword\" | i18n }}</h1>\n      <div\n        class=\"tw-block tw-rounded tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-8\"\n      >\n        <app-callout type=\"warning\">{{ masterPasswordWarningText }} </app-callout>\n        <auth-password-callout [policy]=\"enforcedPolicyOptions\" *ngIf=\"enforcedPolicyOptions\">\n        </auth-password-callout>\n        <bit-form-field *ngIf=\"requireCurrentPassword\">\n          <bit-label>{{ \"currentMasterPass\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"password\"\n            appInputVerbatim\n            required\n            [(ngModel)]=\"verification.secret\"\n            name=\"currentMasterPassword\"\n            id=\"currentMasterPassword\"\n            [appAutofocus]=\"requireCurrentPassword\"\n          />\n          <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n        </bit-form-field>\n        <div class=\"tw-mb-4\">\n          <bit-form-field class=\"!tw-mb-1\">\n            <bit-label>{{ \"newMasterPass\" | i18n }}</bit-label>\n            <input\n              bitInput\n              type=\"password\"\n              appInputVerbatim\n              required\n              [(ngModel)]=\"masterPassword\"\n              name=\"masterPassword\"\n              id=\"masterPassword\"\n            />\n            <button\n              type=\"button\"\n              bitIconButton\n              bitSuffix\n              bitPasswordInputToggle\n              [(toggled)]=\"showPassword\"\n            ></button>\n          </bit-form-field>\n          <app-password-strength\n            [password]=\"masterPassword\"\n            [email]=\"email\"\n            [showText]=\"true\"\n            (passwordStrengthResult)=\"getStrengthResult($event)\"\n          >\n          </app-password-strength>\n        </div>\n        <bit-form-field>\n          <bit-label>{{ \"confirmNewMasterPass\" | i18n }}</bit-label>\n          <input\n            bitInput\n            type=\"password\"\n            appInputVerbatim\n            required\n            [(ngModel)]=\"masterPasswordRetype\"\n            name=\"masterPasswordRetype\"\n            id=\"masterPasswordRetype\"\n          />\n          <button\n            type=\"button\"\n            bitIconButton\n            bitSuffix\n            bitPasswordInputToggle\n            [(toggled)]=\"showPassword\"\n          ></button>\n        </bit-form-field>\n        <bit-form-field>\n          <bit-label>{{ \"masterPassHint\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" [(ngModel)]=\"hint\" name=\"hint\" id=\"hint\" />\n          <bit-hint>{{ \"masterPassHintDesc\" | i18n }}</bit-hint>\n        </bit-form-field>\n        <hr />\n        <div class=\"tw-flex tw-space-x-2\">\n          <button\n            type=\"submit\"\n            bitButton\n            [block]=\"true\"\n            buttonType=\"primary\"\n            [loading]=\"form.loading\"\n            [disabled]=\"form.loading\"\n          >\n            {{ \"submit\" | i18n }}\n          </button>\n          <button type=\"button\" bitButton [block]=\"true\" buttonType=\"secondary\" (click)=\"logOut()\">\n            {{ \"logOut\" | i18n }}\n          </button>\n        </div>\n      </div>\n    </div>\n  </div>\n</form>\n","import { Component } from \"@angular/core\";\n\nimport { UpdateTempPasswordComponent as BaseUpdateTempPasswordComponent } from \"@bitwarden/angular/auth/components/update-temp-password.component\";\n\n@Component({\n  selector: \"app-update-temp-password\",\n  templateUrl: \"update-temp-password.component.html\",\n})\nexport class UpdateTempPasswordComponent extends BaseUpdateTempPasswordComponent {}\n","export class VerifyEmailRequest {\n  userId: string;\n  token: string;\n\n  constructor(userId: string, token: string) {\n    this.userId = userId;\n    this.token = token;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VerifyEmailRequest } from \"@bitwarden/common/models/request/verify-email.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-verify-email-token\",\n  templateUrl: \"verify-email-token.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class VerifyEmailTokenComponent implements OnInit {\n  constructor(\n    private router: Router,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private route: ActivatedRoute,\n    private apiService: ApiService,\n    private logService: LogService,\n    private stateService: StateService,\n    private toastService: ToastService,\n  ) {}\n\n  ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      if (qParams.userId != null && qParams.token != null) {\n        try {\n          await this.apiService.postAccountVerifyEmailToken(\n            new VerifyEmailRequest(qParams.userId, qParams.token),\n          );\n          if (await this.stateService.getIsAuthenticated()) {\n            await this.apiService.refreshIdentityToken();\n          }\n          this.toastService.showToast({\n            variant: \"success\",\n            title: null,\n            message: this.i18nService.t(\"emailVerified\"),\n          });\n          // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n          // eslint-disable-next-line @typescript-eslint/no-floating-promises\n          this.router.navigate([\"/\"]);\n          return;\n        } catch (e) {\n          this.logService.error(e);\n        }\n      }\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"emailVerifiedFailed\"),\n      });\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.router.navigate([\"/\"]);\n    });\n  }\n}\n","<div class=\"mt-5 d-flex justify-content-center\">\n  <div>\n    <img class=\"mb-4 logo logo-themed\" alt=\"Bitwarden\" />\n    <p class=\"text-center\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-2x text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </p>\n  </div>\n</div>\n","export class VerifyDeleteRecoverRequest {\n  userId: string;\n  token: string;\n\n  constructor(userId: string, token: string) {\n    this.userId = userId;\n    this.token = token;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormGroup } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { first } from \"rxjs/operators\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VerifyDeleteRecoverRequest } from \"@bitwarden/common/models/request/verify-delete-recover.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-verify-recover-delete\",\n  templateUrl: \"verify-recover-delete.component.html\",\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class VerifyRecoverDeleteComponent implements OnInit {\n  email: string;\n\n  private userId: string;\n  private token: string;\n  protected formGroup = new FormGroup({});\n\n  constructor(\n    private router: Router,\n    private apiService: ApiService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private route: ActivatedRoute,\n    private toastService: ToastService,\n  ) {}\n\n  ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      if (qParams.userId != null && qParams.token != null && qParams.email != null) {\n        this.userId = qParams.userId;\n        this.token = qParams.token;\n        this.email = qParams.email;\n      } else {\n        await this.router.navigate([\"/\"]);\n      }\n    });\n  }\n\n  submit = async () => {\n    const request = new VerifyDeleteRecoverRequest(this.userId, this.token);\n    await this.apiService.postAccountRecoverDeleteToken(request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: this.i18nService.t(\"accountDeleted\"),\n      message: this.i18nService.t(\"accountDeletedDesc\"),\n    });\n    await this.router.navigate([\"/\"]);\n  };\n}\n","<form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n  <app-callout type=\"warning\">{{ \"deleteAccountWarning\" | i18n }}</app-callout>\n  <p bitTypography=\"body1\" class=\"tw-text-center\">\n    <strong>{{ email }}</strong>\n  </p>\n  <p bitTypography=\"body1\">{{ \"deleteRecoverConfirmDesc\" | i18n }}</p>\n  <hr />\n  <div class=\"tw-flex tw-gap-2\">\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"danger\" [block]=\"true\">\n      {{ \"deleteAccount\" | i18n }}\n    </button>\n    <a bitButton buttonType=\"secondary\" routerLink=\"/login\" [block]=\"true\">\n      {{ \"cancel\" | i18n }}\n    </a>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, HostListener, Self } from \"@angular/core\";\nimport { NgControl } from \"@angular/forms\";\n\n@Directive({\n  selector: \"input[appInputStripSpaces]\",\n})\nexport class InputStripSpacesDirective {\n  constructor(\n    private el: ElementRef<HTMLInputElement>,\n    @Self() private ngControl: NgControl,\n  ) {}\n\n  @HostListener(\"input\") onInput() {\n    const value = this.el.nativeElement.value.replace(/\\s+/g, \"\");\n    this.ngControl.control.setValue(value);\n  }\n}\n","<td bitCell>\n  {{ sponsoringOrg.familySponsorshipFriendlyName }}\n</td>\n<td bitCell>{{ sponsoringOrg.name }}</td>\n<td bitCell>\n  <span [ngClass]=\"statusClass\">{{ statusMessage }}</span>\n</td>\n<td bitCell>\n  <button\n    *ngIf=\"!sponsoringOrg.familySponsorshipToDelete\"\n    type=\"button\"\n    bitIconButton=\"bwi-ellipsis-v\"\n    buttonType=\"main\"\n    [bitMenuTriggerFor]=\"appListDropdown\"\n    appA11yTitle=\"{{ 'options' | i18n }}\"\n  ></button>\n  <bit-menu #appListDropdown>\n    <button\n      type=\"button\"\n      bitMenuItem\n      *ngIf=\"\n        !isSelfHosted &&\n        !sponsoringOrg.familySponsorshipValidUntil &&\n        !(isFreeFamilyPolicyEnabled$ | async)\n      \"\n      (click)=\"resendEmail()\"\n      [attr.aria-label]=\"'resendEmailLabel' | i18n: sponsoringOrg.familySponsorshipFriendlyName\"\n    >\n      {{ \"resendEmail\" | i18n }}\n    </button>\n    <button\n      type=\"button\"\n      bitMenuItem\n      (click)=\"revokeSponsorship()\"\n      [attr.aria-label]=\"'revokeAccount' | i18n: sponsoringOrg.familySponsorshipFriendlyName\"\n    >\n      <span class=\"tw-text-danger\">{{ \"remove\" | i18n }}</span>\n    </button>\n  </bit-menu>\n</td>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { formatDate } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output, OnInit } from \"@angular/core\";\nimport { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"[sponsoring-org-row]\",\n  templateUrl: \"sponsoring-org-row.component.html\",\n})\nexport class SponsoringOrgRowComponent implements OnInit {\n  @Input() sponsoringOrg: Organization = null;\n  @Input() isSelfHosted = false;\n\n  @Output() sponsorshipRemoved = new EventEmitter();\n\n  statusMessage = \"loading\";\n  statusClass: \"tw-text-success\" | \"tw-text-danger\" = \"tw-text-success\";\n  isFreeFamilyPolicyEnabled$: Observable<boolean>;\n  isFreeFamilyFlagEnabled: boolean;\n  private locale = \"\";\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private logService: LogService,\n    private dialogService: DialogService,\n    private toastService: ToastService,\n    private configService: ConfigService,\n    private policyService: PolicyService,\n  ) {}\n\n  async ngOnInit() {\n    this.locale = await firstValueFrom(this.i18nService.locale$);\n\n    this.setStatus(\n      this.isSelfHosted,\n      this.sponsoringOrg.familySponsorshipToDelete,\n      this.sponsoringOrg.familySponsorshipValidUntil,\n      this.sponsoringOrg.familySponsorshipLastSyncDate,\n    );\n    this.isFreeFamilyFlagEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.DisableFreeFamiliesSponsorship,\n    );\n\n    if (this.isFreeFamilyFlagEnabled) {\n      this.isFreeFamilyPolicyEnabled$ = this.policyService\n        .getAll$(PolicyType.FreeFamiliesSponsorshipPolicy)\n        .pipe(\n          map(\n            (policies) =>\n              Array.isArray(policies) &&\n              policies.some(\n                (policy) => policy.organizationId === this.sponsoringOrg.id && policy.enabled,\n              ),\n          ),\n        );\n    }\n  }\n\n  async revokeSponsorship() {\n    try {\n      await this.doRevokeSponsorship();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async resendEmail() {\n    await this.apiService.postResendSponsorshipOffer(this.sponsoringOrg.id);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"emailSent\"),\n    });\n  }\n\n  private async doRevokeSponsorship() {\n    const content = this.sponsoringOrg.familySponsorshipValidUntil\n      ? this.i18nService.t(\n          \"updatedRevokeSponsorshipConfirmationForAcceptedSponsorship\",\n          this.sponsoringOrg.familySponsorshipFriendlyName,\n          formatDate(this.sponsoringOrg.familySponsorshipValidUntil, \"MM/dd/yyyy\", this.locale),\n        )\n      : this.i18nService.t(\n          \"updatedRevokeSponsorshipConfirmationForSentSponsorship\",\n          this.sponsoringOrg.familySponsorshipFriendlyName,\n        );\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: `${this.i18nService.t(\"removeSponsorship\")}?`,\n      content,\n      acceptButtonText: { key: \"remove\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    await this.apiService.deleteRevokeSponsorship(this.sponsoringOrg.id);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"reclaimedFreePlan\"),\n    });\n    this.sponsorshipRemoved.emit();\n  }\n\n  private setStatus(\n    selfHosted: boolean,\n    toDelete?: boolean,\n    validUntil?: Date,\n    lastSyncDate?: Date,\n  ) {\n    /*\n     * Possible Statuses:\n     * Requested (self-hosted only)\n     * Sent\n     * Active\n     * RequestRevoke\n     * RevokeWhenExpired\n     */\n\n    if (toDelete && validUntil) {\n      // They want to delete but there is a valid until date which means there is an active sponsorship\n      this.statusMessage = this.i18nService.t(\n        \"revokeWhenExpired\",\n        formatDate(validUntil, \"MM/dd/yyyy\", this.locale),\n      );\n      this.statusClass = \"tw-text-danger\";\n    } else if (toDelete) {\n      // They want to delete and we don't have a valid until date so we can\n      // this should only happen on a self-hosted install\n      this.statusMessage = this.i18nService.t(\"requestRemoved\");\n      this.statusClass = \"tw-text-danger\";\n    } else if (validUntil) {\n      // They don't want to delete and they have a valid until date\n      // that means they are actively sponsoring someone\n      this.statusMessage = this.i18nService.t(\"active\");\n      this.statusClass = \"tw-text-success\";\n    } else if (selfHosted && lastSyncDate) {\n      // We are on a self-hosted install and it has been synced but we have not gotten\n      // a valid until date so we can't know if they are actively sponsoring someone\n      this.statusMessage = this.i18nService.t(\"sent\");\n      this.statusClass = \"tw-text-success\";\n    } else if (!selfHosted) {\n      // We are in cloud and all other status checks have been false therefore we have\n      // sent the request but it hasn't been accepted yet\n      this.statusMessage = this.i18nService.t(\"sent\");\n      this.statusClass = \"tw-text-success\";\n    } else {\n      // We are on a self-hosted install and we have not synced yet\n      this.statusMessage = this.i18nService.t(\"requested\");\n      this.statusClass = \"tw-text-success\";\n    }\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <ng-container *ngIf=\"loading\">\n    <i class=\"bwi bwi-spinner bwi-spin text-muted\" title=\"{{ 'loading' | i18n }}\"></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </ng-container>\n  <ng-container *ngIf=\"!loading\">\n    <p bitTypography=\"body1\">\n      {{ \"sponsoredFamiliesEligible\" | i18n }}\n    </p>\n    <div bitTypography=\"body1\">\n      {{ \"sponsoredFamiliesInclude\" | i18n }}:\n      <ul class=\"tw-list-outside\">\n        <li>{{ \"sponsoredFamiliesPremiumAccess\" | i18n }}</li>\n        <li>{{ \"sponsoredFamiliesSharedCollections\" | i18n }}</li>\n      </ul>\n    </div>\n    <form [formGroup]=\"sponsorshipForm\" [bitSubmit]=\"submit\" *ngIf=\"anyOrgsAvailable$ | async\">\n      <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n        <div class=\"tw-col-span-7\">\n          <bit-form-field>\n            <bit-label>{{ \"familiesSponsoringOrgSelect\" | i18n }}</bit-label>\n            <bit-select\n              id=\"availableSponsorshipOrg\"\n              name=\"Available Sponsorship Organization\"\n              formControlName=\"selectedSponsorshipOrgId\"\n            >\n              <bit-option\n                [disabled]=\"true\"\n                [value]=\"\"\n                [label]=\"'--' + ('select' | i18n) + '--'\"\n              ></bit-option>\n              <bit-option\n                *ngFor=\"let o of availableSponsorshipOrgs$ | async\"\n                [value]=\"o.id\"\n                [label]=\"o.name\"\n              ></bit-option>\n            </bit-select>\n          </bit-form-field>\n        </div>\n        <div class=\"tw-col-span-7\">\n          <bit-form-field>\n            <bit-label>{{ \"sponsoredFamiliesEmail\" | i18n }}:</bit-label>\n            <input\n              bitInput\n              inputmode=\"email\"\n              formControlName=\"sponsorshipEmail\"\n              [attr.aria-invalid]=\"sponsorshipEmailControl.invalid\"\n              appInputStripSpaces\n            />\n          </bit-form-field>\n        </div>\n        <div class=\"tw-col-span-7\">\n          <button bitButton bitFormButton buttonType=\"primary\" type=\"submit\">\n            {{ \"redeem\" | i18n }}\n          </button>\n        </div>\n      </div>\n    </form>\n    <ng-container *ngIf=\"anyActiveSponsorships$ | async\">\n      <bit-table>\n        <ng-container header>\n          <tr>\n            <th bitCell>{{ \"recipient\" | i18n }}</th>\n            <th bitCell>{{ \"sponsoringOrg\" | i18n }}</th>\n            <th bitCell>{{ \"status\" | i18n }}</th>\n            <th bitCell></th>\n          </tr>\n        </ng-container>\n        <ng-template body alignContent=\"middle\">\n          <ng-container *ngFor=\"let o of activeSponsorshipOrgs$ | async\">\n            <tr\n              bitRow\n              sponsoring-org-row\n              [sponsoringOrg]=\"o\"\n              [isSelfHosted]=\"isSelfHosted\"\n              (sponsorshipRemoved)=\"forceReload()\"\n            >\n              <hr />\n            </tr>\n          </ng-container>\n        </ng-template>\n      </bit-table>\n      <hr />\n      <p bitTypography=\"body2\">{{ \"sponsoredFamiliesLeaveCopy\" | i18n }}</p>\n    </ng-container>\n  </ng-container>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n  FormBuilder,\n  FormControl,\n  FormGroup,\n  Validators,\n  AbstractControl,\n  AsyncValidatorFn,\n  ValidationErrors,\n} from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { combineLatest, firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PlanSponsorshipType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { FreeFamiliesPolicyService } from \"../services/free-families-policy.service\";\n\ninterface RequestSponsorshipForm {\n  selectedSponsorshipOrgId: FormControl<string>;\n  sponsorshipEmail: FormControl<string>;\n}\n\n@Component({\n  selector: \"app-sponsored-families\",\n  templateUrl: \"sponsored-families.component.html\",\n})\nexport class SponsoredFamiliesComponent implements OnInit, OnDestroy {\n  loading = false;\n  isFreeFamilyFlagEnabled: boolean;\n\n  availableSponsorshipOrgs$: Observable<Organization[]>;\n  activeSponsorshipOrgs$: Observable<Organization[]>;\n  anyOrgsAvailable$: Observable<boolean>;\n  anyActiveSponsorships$: Observable<boolean>;\n\n  // Conditional display properties\n  formPromise: Promise<void>;\n\n  sponsorshipForm: FormGroup<RequestSponsorshipForm>;\n\n  private _destroy = new Subject<void>();\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private syncService: SyncService,\n    private organizationService: OrganizationService,\n    private formBuilder: FormBuilder,\n    private accountService: AccountService,\n    private toastService: ToastService,\n    private configService: ConfigService,\n    private policyService: PolicyService,\n    private freeFamiliesPolicyService: FreeFamiliesPolicyService,\n    private router: Router,\n  ) {\n    this.sponsorshipForm = this.formBuilder.group<RequestSponsorshipForm>({\n      selectedSponsorshipOrgId: new FormControl(\"\", {\n        validators: [Validators.required],\n      }),\n      sponsorshipEmail: new FormControl(\"\", {\n        validators: [Validators.email, Validators.required],\n        asyncValidators: [\n          this.notAllowedValueAsync(\n            () => firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.email))),\n            true,\n          ),\n        ],\n        updateOn: \"change\",\n      }),\n    });\n  }\n\n  async ngOnInit() {\n    this.isFreeFamilyFlagEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.DisableFreeFamiliesSponsorship,\n    );\n\n    if (this.isFreeFamilyFlagEnabled) {\n      await this.preventAccessToFreeFamiliesPage();\n\n      this.availableSponsorshipOrgs$ = combineLatest([\n        this.organizationService.organizations$,\n        this.policyService.getAll$(PolicyType.FreeFamiliesSponsorshipPolicy),\n      ]).pipe(\n        map(([organizations, policies]) =>\n          organizations\n            .filter((org) => org.familySponsorshipAvailable)\n            .map((org) => ({\n              organization: org,\n              isPolicyEnabled: policies.some(\n                (policy) => policy.organizationId === org.id && policy.enabled,\n              ),\n            }))\n            .filter(({ isPolicyEnabled }) => !isPolicyEnabled)\n            .map(({ organization }) => organization),\n        ),\n      );\n    } else {\n      this.availableSponsorshipOrgs$ = this.organizationService.organizations$.pipe(\n        map((orgs) => orgs.filter((o) => o.familySponsorshipAvailable)),\n      );\n    }\n\n    this.availableSponsorshipOrgs$.pipe(takeUntil(this._destroy)).subscribe((orgs) => {\n      if (orgs.length === 1) {\n        this.sponsorshipForm.patchValue({\n          selectedSponsorshipOrgId: orgs[0].id,\n        });\n      }\n    });\n\n    this.anyOrgsAvailable$ = this.availableSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));\n\n    this.activeSponsorshipOrgs$ = this.organizationService.organizations$.pipe(\n      map((orgs) => orgs.filter((o) => o.familySponsorshipFriendlyName !== null)),\n    );\n\n    this.anyActiveSponsorships$ = this.activeSponsorshipOrgs$.pipe(map((orgs) => orgs.length > 0));\n\n    this.loading = false;\n\n    this.sponsorshipForm\n      .get(\"sponsorshipEmail\")\n      .valueChanges.pipe(takeUntil(this._destroy))\n      .subscribe((val) => {\n        if (this.sponsorshipEmailControl.hasError(\"email\")) {\n          this.sponsorshipEmailControl.setErrors([{ message: this.i18nService.t(\"invalidEmail\") }]);\n        }\n      });\n  }\n\n  ngOnDestroy(): void {\n    this._destroy.next();\n    this._destroy.complete();\n  }\n\n  private async preventAccessToFreeFamiliesPage() {\n    const showFreeFamiliesPage = await firstValueFrom(\n      this.freeFamiliesPolicyService.showFreeFamilies$,\n    );\n\n    if (!showFreeFamiliesPage) {\n      await this.router.navigate([\"/\"]);\n      return;\n    }\n  }\n\n  submit = async () => {\n    this.formPromise = this.apiService.postCreateSponsorship(\n      this.sponsorshipForm.value.selectedSponsorshipOrgId,\n      {\n        sponsoredEmail: this.sponsorshipForm.value.sponsorshipEmail,\n        planSponsorshipType: PlanSponsorshipType.FamiliesForEnterprise,\n        friendlyName: this.sponsorshipForm.value.sponsorshipEmail,\n      },\n    );\n\n    await this.formPromise;\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"sponsorshipCreated\"),\n    });\n    this.formPromise = null;\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.resetForm();\n    await this.forceReload();\n  };\n\n  async forceReload() {\n    this.loading = true;\n    await this.syncService.fullSync(true);\n    this.loading = false;\n  }\n\n  get sponsorshipEmailControl() {\n    return this.sponsorshipForm.controls.sponsorshipEmail;\n  }\n\n  private async resetForm() {\n    this.sponsorshipForm.reset();\n  }\n\n  get isSelfHosted(): boolean {\n    return this.platformUtilsService.isSelfHost();\n  }\n\n  notAllowedValueAsync(\n    valueGetter: () => Promise<string>,\n    caseInsensitive = false,\n  ): AsyncValidatorFn {\n    return async (control: AbstractControl): Promise<ValidationErrors | null> => {\n      let notAllowedValue = await valueGetter();\n      let controlValue = control.value;\n      if (caseInsensitive) {\n        notAllowedValue = notAllowedValue.toLowerCase();\n        controlValue = controlValue.toLowerCase();\n      }\n\n      if (controlValue === notAllowedValue) {\n        return {\n          errors: {\n            message: this.i18nService.t(\"cannotSponsorSelf\"),\n          },\n        };\n      }\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\n\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n  selector: \"app-frontend-layout\",\n  templateUrl: \"frontend-layout.component.html\",\n})\nexport class FrontendLayoutComponent implements OnInit, OnDestroy {\n  version: string;\n  year = \"2015\";\n\n  constructor(private platformUtilsService: PlatformUtilsService) {}\n\n  async ngOnInit() {\n    this.year = new Date().getFullYear().toString();\n    this.version = await this.platformUtilsService.getApplicationVersion();\n\n    document.body.classList.add(\"layout_frontend\");\n  }\n\n  ngOnDestroy() {\n    document.body.classList.remove(\"layout_frontend\");\n  }\n}\n","<router-outlet></router-outlet>\n<div class=\"container my-5 text-muted text-center\">\n  Vaultwarden Web<br />\n  {{ \"versionNumber\" | i18n: version }}\n  <br /><br />\n  <div class=\"small\">\n    A modified version of the Bitwarden&reg; Web Vault for Vaultwarden (an unofficial rewrite of the\n    Bitwarden&reg; server).<br />\n    Vaultwarden is not associated with the Bitwarden&reg; project nor Bitwarden Inc.\n  </div>\n</div>\n","import { NgModule } from \"@angular/core\";\n\nimport { CheckboxModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../../app/shared\";\n\nimport { LoginDecryptionOptionsComponentV1 } from \"./login-decryption-options/login-decryption-options-v1.component\";\nimport { LoginComponentV1 } from \"./login-v1.component\";\nimport { LoginViaAuthRequestComponentV1 } from \"./login-via-auth-request-v1.component\";\nimport { LoginViaWebAuthnComponent } from \"./login-via-webauthn/login-via-webauthn.component\";\n\n@NgModule({\n  imports: [SharedModule, CheckboxModule],\n  declarations: [\n    LoginComponentV1,\n    LoginViaAuthRequestComponentV1,\n    LoginDecryptionOptionsComponentV1,\n    LoginViaWebAuthnComponent,\n  ],\n  exports: [\n    LoginComponentV1,\n    LoginViaAuthRequestComponentV1,\n    LoginDecryptionOptionsComponentV1,\n    LoginViaWebAuthnComponent,\n  ],\n})\nexport class LoginModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit, ViewChild } from \"@angular/core\";\nimport { UntypedFormBuilder, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { OrganizationBillingServiceAbstraction as OrganizationBillingService } from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PlanType } from \"@bitwarden/common/billing/enums\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { VerticalStepperComponent } from \"../../trial-initiation/vertical-stepper/vertical-stepper.component\";\n\n@Component({\n  selector: \"app-secrets-manager-trial-free-stepper\",\n  templateUrl: \"secrets-manager-trial-free-stepper.component.html\",\n})\nexport class SecretsManagerTrialFreeStepperComponent implements OnInit {\n  @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n\n  formGroup = this.formBuilder.group({\n    name: [\n      \"\",\n      {\n        validators: [Validators.required, Validators.maxLength(50)],\n        updateOn: \"change\",\n      },\n    ],\n    email: [\n      \"\",\n      {\n        validators: [Validators.email],\n      },\n    ],\n  });\n\n  subLabels = {\n    createAccount:\n      \"Before creating your free organization, you first need to log in or create a personal account.\",\n    organizationInfo: \"Enter your organization information\",\n  };\n\n  organizationId: string;\n\n  referenceEventRequest: ReferenceEventRequest;\n\n  constructor(\n    protected formBuilder: UntypedFormBuilder,\n    protected i18nService: I18nService,\n    protected organizationBillingService: OrganizationBillingService,\n    protected router: Router,\n  ) {}\n\n  ngOnInit(): void {\n    this.referenceEventRequest = new ReferenceEventRequest();\n    this.referenceEventRequest.initiationPath = \"Secrets Manager trial from marketing website\";\n  }\n\n  accountCreated(email: string): void {\n    this.formGroup.get(\"email\")?.setValue(email);\n    this.subLabels.createAccount = email;\n    this.verticalStepper.next();\n  }\n\n  async createOrganization(): Promise<void> {\n    const response = await this.organizationBillingService.startFree({\n      organization: {\n        name: this.formGroup.get(\"name\").value,\n        billingEmail: this.formGroup.get(\"email\").value,\n      },\n      plan: {\n        type: PlanType.Free,\n        subscribeToSecretsManager: true,\n        isFromSecretsManagerTrial: true,\n      },\n    });\n\n    this.organizationId = response.id;\n    this.subLabels.organizationInfo = response.name;\n    this.verticalStepper.next();\n  }\n\n  async navigateToMembers(): Promise<void> {\n    await this.router.navigate([\"organizations\", this.organizationId, \"members\"]);\n  }\n\n  async navigateToSecretsManager(): Promise<void> {\n    await this.router.navigate([\"sm\", this.organizationId]);\n  }\n}\n","<app-vertical-stepper #stepper linear>\n  <app-vertical-step\n    label=\"{{ 'createAccount' | i18n | titlecase }}\"\n    [editable]=\"false\"\n    [subLabel]=\"subLabels.createAccount\"\n    [addSubLabelSpacing]=\"true\"\n  >\n    <app-register-form\n      [referenceDataValue]=\"referenceEventRequest\"\n      [isInTrialFlow]=\"true\"\n      (createdAccount)=\"accountCreated($event)\"\n    >\n    </app-register-form>\n  </app-vertical-step>\n  <app-vertical-step\n    label=\"{{ 'organizationInformation' | i18n | titlecase }}\"\n    [subLabel]=\"subLabels.organizationInfo\"\n  >\n    <app-org-info [nameOnly]=\"true\" [formGroup]=\"formGroup\"> </app-org-info>\n    <button\n      type=\"button\"\n      bitButton\n      buttonType=\"primary\"\n      [disabled]=\"formGroup.get('name').invalid\"\n      (click)=\"createOrganization()\"\n    >\n      {{ \"next\" | i18n }}\n    </button>\n  </app-vertical-step>\n  <app-vertical-step label=\"{{ 'confirmationDetails' | i18n | titlecase }}\">\n    <div class=\"tw-pb-6 tw-pl-6\">\n      <p class=\"tw-text-xl\">{{ \"smFreeTrialThankYou\" | i18n }}</p>\n      <ul class=\"tw-list-disc\">\n        <li>\n          <p>\n            {{ \"smFreeTrialConfirmationEmail\" | i18n }}\n            <span class=\"tw-font-bold\">{{ formGroup.get(\"email\").value }}</span\n            >.\n          </p>\n        </li>\n      </ul>\n    </div>\n    <div class=\"tw-mb-3 tw-flex\">\n      <button type=\"button\" bitButton buttonType=\"primary\" (click)=\"navigateToSecretsManager()\">\n        {{ \"getStarted\" | i18n | titlecase }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        buttonType=\"secondary\"\n        (click)=\"navigateToMembers()\"\n        class=\"tw-ml-3 tw-inline-flex tw-items-center tw-px-3\"\n      >\n        {{ \"inviteUsers\" | i18n }}\n      </button>\n    </div>\n  </app-vertical-step>\n</app-vertical-stepper>\n","<app-vertical-stepper #stepper linear>\n  <app-vertical-step\n    label=\"{{ 'createAccount' | i18n | titlecase }}\"\n    [editable]=\"false\"\n    [subLabel]=\"createAccountLabel\"\n    [addSubLabelSpacing]=\"true\"\n  >\n    <app-register-form\n      [referenceDataValue]=\"referenceEventRequest\"\n      [isInTrialFlow]=\"true\"\n      (createdAccount)=\"accountCreated($event)\"\n    >\n    </app-register-form>\n  </app-vertical-step>\n  <app-vertical-step\n    label=\"{{ 'organizationInformation' | i18n | titlecase }}\"\n    [subLabel]=\"subLabels.organizationInfo\"\n  >\n    <app-org-info [nameOnly]=\"true\" [formGroup]=\"formGroup\"></app-org-info>\n    <button\n      type=\"button\"\n      bitButton\n      buttonType=\"primary\"\n      [disabled]=\"formGroup.get('name').invalid\"\n      [loading]=\"createOrganizationLoading\"\n      (click)=\"createOrganizationOnTrial()\"\n      *ngIf=\"enableTrialPayment$ | async\"\n    >\n      {{ \"startTrial\" | i18n }}\n    </button>\n    <button\n      type=\"button\"\n      bitButton\n      buttonType=\"primary\"\n      [disabled]=\"formGroup.get('name').invalid\"\n      [loading]=\"createOrganizationLoading\"\n      cdkStepperNext\n      *ngIf=\"!(enableTrialPayment$ | async)\"\n    >\n      {{ \"next\" | i18n }}\n    </button>\n  </app-vertical-step>\n  <app-vertical-step\n    label=\"{{ 'billing' | i18n | titlecase }}\"\n    [subLabel]=\"billingSubLabel\"\n    *ngIf=\"!(enableTrialPayment$ | async)\"\n  >\n    <app-trial-billing-step\n      *ngIf=\"stepper.selectedIndex === 2\"\n      [organizationInfo]=\"{\n        name: formGroup.get('name').value,\n        email: formGroup.get('email').value,\n        type: productType,\n      }\"\n      [subscriptionProduct]=\"SubscriptionProduct.SecretsManager\"\n      (steppedBack)=\"steppedBack()\"\n      (organizationCreated)=\"organizationCreated($event)\"\n    ></app-trial-billing-step>\n  </app-vertical-step>\n  <app-vertical-step label=\"{{ 'confirmationDetails' | i18n | titlecase }}\">\n    <app-trial-confirmation-details\n      [email]=\"formGroup.get('email').value\"\n      [orgLabel]=\"organizationTypeQueryParameter\"\n    ></app-trial-confirmation-details>\n    <div class=\"tw-mb-3 tw-flex\">\n      <button type=\"button\" bitButton buttonType=\"primary\" (click)=\"navigateToSecretsManager()\">\n        {{ \"getStarted\" | i18n | titlecase }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        buttonType=\"secondary\"\n        (click)=\"navigateToMembers()\"\n        class=\"tw-ml-3 tw-inline-flex tw-items-center tw-px-3\"\n      >\n        {{ \"inviteUsers\" | i18n }}\n      </button>\n    </div>\n  </app-vertical-step>\n</app-vertical-stepper>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit, ViewChild } from \"@angular/core\";\nimport { UntypedFormBuilder } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { OrganizationBillingServiceAbstraction as OrganizationBillingService } from \"@bitwarden/common/billing/abstractions/organization-billing.service\";\nimport { PlanType, ProductTierType } from \"@bitwarden/common/billing/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ReferenceEventRequest } from \"@bitwarden/common/models/request/reference-event.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport {\n  OrganizationCreatedEvent,\n  SubscriptionProduct,\n  TrialOrganizationType,\n} from \"../../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { VerticalStepperComponent } from \"../../trial-initiation/vertical-stepper/vertical-stepper.component\";\nimport { SecretsManagerTrialFreeStepperComponent } from \"../secrets-manager/secrets-manager-trial-free-stepper.component\";\nimport { ValidOrgParams } from \"../trial-initiation.component\";\n\nconst trialFlowOrgs = [\n  ValidOrgParams.teams,\n  ValidOrgParams.teamsStarter,\n  ValidOrgParams.enterprise,\n  ValidOrgParams.families,\n];\n\n@Component({\n  selector: \"app-secrets-manager-trial-paid-stepper\",\n  templateUrl: \"secrets-manager-trial-paid-stepper.component.html\",\n})\nexport class SecretsManagerTrialPaidStepperComponent\n  extends SecretsManagerTrialFreeStepperComponent\n  implements OnInit\n{\n  @ViewChild(\"stepper\", { static: false }) verticalStepper: VerticalStepperComponent;\n  @Input() organizationTypeQueryParameter: string;\n\n  plan: PlanType;\n  createOrganizationLoading = false;\n  billingSubLabel = this.i18nService.t(\"billingTrialSubLabel\");\n  organizationId: string;\n\n  private destroy$ = new Subject<void>();\n  protected enableTrialPayment$ = this.configService.getFeatureFlag$(\n    FeatureFlag.TrialPaymentOptional,\n  );\n\n  constructor(\n    private route: ActivatedRoute,\n    private configService: ConfigService,\n    protected formBuilder: UntypedFormBuilder,\n    protected i18nService: I18nService,\n    protected organizationBillingService: OrganizationBillingService,\n    protected router: Router,\n  ) {\n    super(formBuilder, i18nService, organizationBillingService, router);\n  }\n\n  async ngOnInit(): Promise<void> {\n    this.referenceEventRequest = new ReferenceEventRequest();\n    this.referenceEventRequest.initiationPath = \"Secrets Manager trial from marketing website\";\n\n    this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n      if (trialFlowOrgs.includes(qParams.org)) {\n        if (qParams.org === ValidOrgParams.teamsStarter) {\n          this.plan = PlanType.TeamsStarter;\n        } else if (qParams.org === ValidOrgParams.teams) {\n          this.plan = PlanType.TeamsAnnually;\n        } else if (qParams.org === ValidOrgParams.enterprise) {\n          this.plan = PlanType.EnterpriseAnnually;\n        }\n      }\n    });\n  }\n\n  organizationCreated(event: OrganizationCreatedEvent) {\n    this.organizationId = event.organizationId;\n    this.billingSubLabel = event.planDescription;\n    this.verticalStepper.next();\n  }\n\n  steppedBack() {\n    this.verticalStepper.previous();\n  }\n\n  async createOrganizationOnTrial(): Promise<void> {\n    this.createOrganizationLoading = true;\n    const response = await this.organizationBillingService.purchaseSubscriptionNoPaymentMethod({\n      organization: {\n        name: this.formGroup.get(\"name\").value,\n        billingEmail: this.formGroup.get(\"email\").value,\n        initiationPath: \"Secrets Manager trial from marketing website\",\n      },\n      plan: {\n        type: this.plan,\n        subscribeToSecretsManager: true,\n        isFromSecretsManagerTrial: true,\n        passwordManagerSeats: 1,\n        secretsManagerSeats: 1,\n      },\n    });\n\n    this.organizationId = response?.id;\n    this.subLabels.organizationInfo = response?.name;\n    this.createOrganizationLoading = false;\n    this.verticalStepper.next();\n  }\n\n  get createAccountLabel() {\n    const organizationType =\n      this.productType === ProductTierType.TeamsStarter\n        ? \"Teams Starter\"\n        : ProductTierType[this.productType];\n    return `Before creating your ${organizationType} organization, you first need to log in or create a personal account.`;\n  }\n\n  get productType(): TrialOrganizationType {\n    switch (this.organizationTypeQueryParameter) {\n      case \"enterprise\":\n        return ProductTierType.Enterprise;\n      case \"families\":\n        return ProductTierType.Families;\n      case \"teams\":\n        return ProductTierType.Teams;\n      case \"teamsStarter\":\n        return ProductTierType.TeamsStarter;\n    }\n  }\n\n  protected readonly SubscriptionProduct = SubscriptionProduct;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"app-review-blurb\",\n  templateUrl: \"review-blurb.component.html\",\n})\nexport class ReviewBlurbComponent {\n  @Input() header: string;\n  @Input() quote: string;\n  @Input() source: string;\n}\n","<h1 class=\"tw-text-4xl !tw-text-alt2\">{{ header }}</h1>\n<div class=\"tw-pt-16\">\n  <h2 class=\"tw-text-2xl tw-font-semibold\">\n    {{ headline }}\n  </h2>\n</div>\n<ul class=\"tw-mt-12 tw-flex tw-flex-col tw-gap-10 tw-text-2xl tw-text-main\">\n  <li *ngFor=\"let primaryPoint of primaryPoints\">\n    {{ primaryPoint }}\n  </li>\n</ul>\n<div class=\"tw-mt-12 tw-flex tw-flex-col\">\n  <div class=\"tw-rounded-[32px] tw-bg-background\">\n    <div class=\"tw-my-8 tw-mx-6\">\n      <h2 class=\"tw-pl-5 tw-font-semibold\">{{ calloutHeadline }}</h2>\n      <ul class=\"tw-space-y-4 tw-mt-4 tw-pl-10\">\n        <li *ngFor=\"let callout of callouts\">\n          {{ callout }}\n        </li>\n      </ul>\n    </div>\n  </div>\n</div>\n<div class=\"tw-mt-12 tw-flex tw-flex-col tw-items-center tw-gap-5\">\n  <app-review-blurb\n    header=\"Businesses trust Bitwarden to secure their infrastructure\"\n    quote=\"At this point, it would be almost impossible to leak our secrets. It's just one less thing we have to worry about.\"\n    source=\"Titanom Technologies\"\n  ></app-review-blurb>\n</div>\n","<figure>\n  <h2 class=\"tw-mx-auto tw-pb-2 tw-max-w-xl tw-font-semibold tw-text-center\">\n    {{ header }}\n  </h2>\n  <blockquote class=\"tw-mx-auto tw-my-2 tw-max-w-xl tw-px-4 tw-text-center\">\n    \"{{ quote }}\"\n  </blockquote>\n  <figcaption>\n    <cite>\n      <p class=\"tw-mx-auto tw-text-center tw-font-bold\">{{ source }}</p>\n    </cite>\n  </figcaption>\n</figure>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\n@Component({\n  selector: \"app-secrets-manager-content\",\n  templateUrl: \"secrets-manager-content.component.html\",\n})\nexport class SecretsManagerContentComponent implements OnInit, OnDestroy {\n  header: string;\n  headline =\n    \"A simpler, faster way to secure and automate secrets across code and infrastructure deployments\";\n  primaryPoints: string[];\n  calloutHeadline: string;\n  callouts: string[];\n\n  private paidPrimaryPoints = [\n    \"Unlimited secrets, users, and projects\",\n    \"Simple and transparent pricing\",\n    \"Zero-knowledge, end-to-end encryption\",\n  ];\n\n  private paidCalloutHeadline = \"Limited time offer\";\n\n  private paidCallouts = [\n    \"Sign up today and receive a complimentary 12-month subscription to Bitwarden Password Manager\",\n    \"Experience complete security across your organization\",\n    \"Secure all your sensitive credentials, from user applications to machine secrets\",\n  ];\n\n  private freePrimaryPoints = [\n    \"Unlimited secrets\",\n    \"Simple and transparent pricing\",\n    \"Zero-knowledge, end-to-end encryption\",\n  ];\n\n  private freeCalloutHeadline = \"Go beyond developer security!\";\n\n  private freeCallouts = [\n    \"Your Bitwarden account will also grant complimentary access to Bitwarden Password Manager\",\n    \"Extend end-to-end encryption to your personal passwords, addresses, credit cards and notes\",\n  ];\n\n  private destroy$ = new Subject<void>();\n\n  constructor(private activatedRoute: ActivatedRoute) {}\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  ngOnInit(): void {\n    this.activatedRoute.queryParams.pipe(takeUntil(this.destroy$)).subscribe((queryParameters) => {\n      switch (queryParameters.org) {\n        case \"enterprise\":\n          this.header = \"Secrets Manager for Enterprise\";\n          this.primaryPoints = this.paidPrimaryPoints;\n          this.calloutHeadline = this.paidCalloutHeadline;\n          this.callouts = this.paidCallouts;\n          break;\n        case \"free\":\n          this.header = \"Bitwarden Secrets Manager\";\n          this.primaryPoints = this.freePrimaryPoints;\n          this.calloutHeadline = this.freeCalloutHeadline;\n          this.callouts = this.freeCallouts;\n          break;\n        case \"teams\":\n        case \"teamsStarter\":\n          this.header = \"Secrets Manager for Teams\";\n          this.primaryPoints = this.paidPrimaryPoints;\n          this.calloutHeadline = this.paidCalloutHeadline;\n          this.callouts = this.paidCallouts;\n          break;\n      }\n    });\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { VerticalStepContentComponent } from \"./vertical-step-content.component\";\nimport { VerticalStep } from \"./vertical-step.component\";\nimport { VerticalStepperComponent } from \"./vertical-stepper.component\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [VerticalStepperComponent, VerticalStep, VerticalStepContentComponent],\n  exports: [VerticalStepperComponent, VerticalStep],\n})\nexport class VerticalStepperModule {}\n","import { CdkStepperModule } from \"@angular/cdk/stepper\";\nimport { TitleCasePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { InputPasswordComponent } from \"@bitwarden/auth/angular\";\nimport { FormFieldModule } from \"@bitwarden/components\";\n\nimport { OrganizationCreateModule } from \"../../admin-console/organizations/create/organization-create.module\";\nimport { RegisterFormModule } from \"../../auth/register-form/register-form.module\";\nimport { SecretsManagerTrialFreeStepperComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial-free-stepper.component\";\nimport { SecretsManagerTrialPaidStepperComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial-paid-stepper.component\";\nimport { SecretsManagerTrialComponent } from \"../../auth/trial-initiation/secrets-manager/secrets-manager-trial.component\";\nimport { PaymentComponent, TaxInfoComponent } from \"../../billing\";\nimport { TrialBillingStepComponent } from \"../../billing/accounts/trial-initiation/trial-billing-step.component\";\nimport { EnvironmentSelectorModule } from \"../../components/environment-selector/environment-selector.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { CompleteTrialInitiationComponent } from \"./complete-trial-initiation/complete-trial-initiation.component\";\nimport { ConfirmationDetailsComponent } from \"./confirmation-details.component\";\nimport { AbmEnterpriseContentComponent } from \"./content/abm-enterprise-content.component\";\nimport { AbmTeamsContentComponent } from \"./content/abm-teams-content.component\";\nimport { CnetEnterpriseContentComponent } from \"./content/cnet-enterprise-content.component\";\nimport { CnetIndividualContentComponent } from \"./content/cnet-individual-content.component\";\nimport { CnetTeamsContentComponent } from \"./content/cnet-teams-content.component\";\nimport { DefaultContentComponent } from \"./content/default-content.component\";\nimport { EnterpriseContentComponent } from \"./content/enterprise-content.component\";\nimport { Enterprise1ContentComponent } from \"./content/enterprise1-content.component\";\nimport { Enterprise2ContentComponent } from \"./content/enterprise2-content.component\";\nimport { LogoBadgesComponent } from \"./content/logo-badges.component\";\nimport { LogoCnet5StarsComponent } from \"./content/logo-cnet-5-stars.component\";\nimport { LogoCnetComponent } from \"./content/logo-cnet.component\";\nimport { LogoCompanyTestimonialComponent } from \"./content/logo-company-testimonial.component\";\nimport { LogoForbesComponent } from \"./content/logo-forbes.component\";\nimport { LogoUSNewsComponent } from \"./content/logo-us-news.component\";\nimport { ReviewBlurbComponent } from \"./content/review-blurb.component\";\nimport { ReviewLogoComponent } from \"./content/review-logo.component\";\nimport { SecretsManagerContentComponent } from \"./content/secrets-manager-content.component\";\nimport { TeamsContentComponent } from \"./content/teams-content.component\";\nimport { Teams1ContentComponent } from \"./content/teams1-content.component\";\nimport { Teams2ContentComponent } from \"./content/teams2-content.component\";\nimport { Teams3ContentComponent } from \"./content/teams3-content.component\";\nimport { TrialInitiationComponent } from \"./trial-initiation.component\";\nimport { VerticalStepperModule } from \"./vertical-stepper/vertical-stepper.module\";\n\n@NgModule({\n  imports: [\n    SharedModule,\n    CdkStepperModule,\n    VerticalStepperModule,\n    FormFieldModule,\n    RegisterFormModule,\n    OrganizationCreateModule,\n    EnvironmentSelectorModule,\n    PaymentComponent,\n    TaxInfoComponent,\n    TrialBillingStepComponent,\n    InputPasswordComponent,\n  ],\n  declarations: [\n    TrialInitiationComponent,\n    CompleteTrialInitiationComponent,\n    EnterpriseContentComponent,\n    TeamsContentComponent,\n    ConfirmationDetailsComponent,\n    DefaultContentComponent,\n    EnterpriseContentComponent,\n    Enterprise1ContentComponent,\n    Enterprise2ContentComponent,\n    TeamsContentComponent,\n    Teams1ContentComponent,\n    Teams2ContentComponent,\n    Teams3ContentComponent,\n    CnetEnterpriseContentComponent,\n    CnetIndividualContentComponent,\n    CnetTeamsContentComponent,\n    AbmEnterpriseContentComponent,\n    AbmTeamsContentComponent,\n    LogoBadgesComponent,\n    LogoCnet5StarsComponent,\n    LogoCompanyTestimonialComponent,\n    LogoCnetComponent,\n    LogoForbesComponent,\n    LogoUSNewsComponent,\n    ReviewLogoComponent,\n    SecretsManagerContentComponent,\n    ReviewBlurbComponent,\n    SecretsManagerTrialComponent,\n    SecretsManagerTrialFreeStepperComponent,\n    SecretsManagerTrialPaidStepperComponent,\n  ],\n  exports: [TrialInitiationComponent, CompleteTrialInitiationComponent],\n  providers: [TitleCasePipe],\n})\nexport class TrialInitiationModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../../models/view/view\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendAccess } from \"../domain/send-access\";\n\nimport { SendFileView } from \"./send-file.view\";\nimport { SendTextView } from \"./send-text.view\";\n\nexport class SendAccessView implements View {\n  id: string = null;\n  name: string = null;\n  type: SendType = null;\n  text = new SendTextView();\n  file = new SendFileView();\n  expirationDate: Date = null;\n  creatorIdentifier: string = null;\n\n  constructor(s?: SendAccess) {\n    if (!s) {\n      return;\n    }\n\n    this.id = s.id;\n    this.type = s.type;\n    this.expirationDate = s.expirationDate;\n    this.creatorIdentifier = s.creatorIdentifier;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport Domain from \"../../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../../platform/models/domain/symmetric-crypto-key\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendAccessResponse } from \"../response/send-access.response\";\nimport { SendAccessView } from \"../view/send-access.view\";\n\nimport { SendFile } from \"./send-file\";\nimport { SendText } from \"./send-text\";\n\nexport class SendAccess extends Domain {\n  id: string;\n  type: SendType;\n  name: EncString;\n  file: SendFile;\n  text: SendText;\n  expirationDate: Date;\n  creatorIdentifier: string;\n\n  constructor(obj?: SendAccessResponse) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        name: null,\n        expirationDate: null,\n        creatorIdentifier: null,\n      },\n      [\"id\", \"expirationDate\", \"creatorIdentifier\"],\n    );\n\n    this.type = obj.type;\n\n    switch (this.type) {\n      case SendType.Text:\n        this.text = new SendText(obj.text);\n        break;\n      case SendType.File:\n        this.file = new SendFile(obj.file);\n        break;\n      default:\n        break;\n    }\n  }\n\n  async decrypt(key: SymmetricCryptoKey): Promise<SendAccessView> {\n    const model = new SendAccessView(this);\n\n    await this.decryptObj(\n      model,\n      {\n        name: null,\n      },\n      null,\n      key,\n    );\n\n    switch (this.type) {\n      case SendType.File:\n        model.file = await this.file.decrypt(key);\n        break;\n      case SendType.Text:\n        model.text = await this.text.decrypt(key);\n        break;\n      default:\n        break;\n    }\n\n    return model;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class SendAccessRequest {\n  password: string;\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ExpiredSendIcon = svgIcon`\n    <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"130\" height=\"130\" fill=\"none\">\n        <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M22.75 29.695c0-4.991 4.074-9.037 9.1-9.037h14.3v2.582h-14.3c-3.59 0-6.5 2.89-6.5 6.455v68.428h-2.6V29.696Zm75.4 76.175V68.428h2.6v37.442c0 4.991-4.074 9.038-9.1 9.038h-53.3v-2.582h53.3c3.59 0 6.5-2.891 6.5-6.456Z\" clip-rule=\"evenodd\"/>\n        <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M43.55 37.441c0-17.113 13.969-30.986 31.2-30.986s31.2 13.873 31.2 30.986c0 17.114-13.969 30.987-31.2 30.987s-31.2-13.873-31.2-30.986Zm31.2-33.568c-18.667 0-33.8 15.03-33.8 33.569S56.083 71.01 74.75 71.01c18.668 0 33.8-15.03 33.8-33.569S93.418 3.873 74.75 3.873Z\" clip-rule=\"evenodd\"/>\n        <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M73.972 65.2c0 .357.291.646.65.646 15.968 0 28.925-12.71 28.925-28.404a.648.648 0 0 0-.65-.646.648.648 0 0 0-.65.646c0 14.967-12.36 27.113-27.625 27.113a.648.648 0 0 0-.65.645ZM46.347 38.087c.36 0 .65-.289.65-.645 0-14.968 12.361-27.113 27.625-27.113.36 0 .65-.29.65-.646a.648.648 0 0 0-.65-.646c-15.968 0-28.925 12.71-28.925 28.405 0 .356.291.645.65.645Z\" clip-rule=\"evenodd\"/>\n        <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M123.729 81.869a1.926 1.926 0 0 1 0 2.739l-1.439 1.43a1.96 1.96 0 0 1-2.758 0L95.577 62.245a1.306 1.306 0 0 0-1.839 0 1.285 1.285 0 0 0 0 1.826l23.956 23.791a4.571 4.571 0 0 0 6.434 0l1.44-1.43a4.497 4.497 0 0 0 0-6.39l-23.956-23.791a1.306 1.306 0 0 0-1.838 0 1.285 1.285 0 0 0 0 1.825l23.955 23.792ZM34.45 36.797c0-.714.582-1.292 1.3-1.292h5.85c.718 0 1.3.578 1.3 1.291 0 .714-.582 1.292-1.3 1.292h-5.85c-.718 0-1.3-.578-1.3-1.291Zm0 10.973c0-.713.582-1.29 1.3-1.29h7.8c.718 0 1.3.578 1.3 1.29 0 .714-.582 1.292-1.3 1.292h-7.8c-.718 0-1.3-.578-1.3-1.291Zm0 10.975c0-.713.582-1.291 1.3-1.291H49.4c.718 0 1.3.578 1.3 1.29 0 .714-.582 1.292-1.3 1.292H35.75c-.718 0-1.3-.578-1.3-1.291Zm0 10.975c0-.714.582-1.292 1.3-1.292H72.8c.718 0 1.3.578 1.3 1.291s-.582 1.291-1.3 1.291H35.75c-.718 0-1.3-.578-1.3-1.29Zm0 10.973c0-.713.582-1.29 1.3-1.29h27.3c.718 0 1.3.577 1.3 1.29 0 .713-.582 1.291-1.3 1.291h-27.3c-.718 0-1.3-.578-1.3-1.29Zm6.5 10.975c0-.713.582-1.291 1.3-1.291H88.4c.718 0 1.3.578 1.3 1.291s-.582 1.291-1.3 1.291H42.25c-.718 0-1.3-.578-1.3-1.291Zm0 10.974c0-.713.582-1.291 1.3-1.291H88.4c.718 0 1.3.578 1.3 1.291s-.582 1.291-1.3 1.291H42.25c-.718 0-1.3-.578-1.3-1.291Z\" clip-rule=\"evenodd\"/>\n        <path class=\"tw-fill-secondary-600\" fill-rule=\"evenodd\" d=\"M43.664 86.742c.412.292.617.794.524 1.289l-6.366 33.964a1.305 1.305 0 0 1-1.745.968l-9.692-3.707-4.914 5.689c-.355.41-.928.557-1.438.37a1.292 1.292 0 0 1-.849-1.211v-8.444c0-.305.108-.599.306-.832l14.73-17.357a1.306 1.306 0 0 1 1.831-.156c.549.46.619 1.275.156 1.82L21.784 116.13v4.485l3.225-3.733c.358-.414.94-.56 1.454-.364l9.089 3.476 5.567-29.698-32.42 18.385 6.813 3.082c.653.296.941 1.061.643 1.71a1.303 1.303 0 0 1-1.722.64l-9.122-4.128a1.289 1.289 0 0 1-.106-2.296l37.06-21.017c.44-.249.986-.222 1.399.07Z\" clip-rule=\"evenodd\"/>\n    </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const NoSendsIcon = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"125\" fill=\"none\">\n    <path class=\"tw-stroke-art-primary\" stroke-width=\"3\" d=\"M13.425 11.994H5.99a4.311 4.311 0 0 0-4.311 4.312v62.09a4.311 4.311 0 0 0 4.311 4.311h40.09\"/>\n    <path class=\"tw-stroke-art-primary tw-fill-background\" stroke-width=\"3\" d=\"M66.27 75.142h-49.9a3.234 3.234 0 0 1-3.233-3.234V9.818a3.234 3.234 0 0 1 3.234-3.233h35.764a3.233 3.233 0 0 1 2.293.953l14.134 14.216c.602.605.94 1.425.94 2.28v47.874a3.233 3.233 0 0 1-3.233 3.234Z\"/>\n    <path class=\"tw-stroke-art-accent\" stroke-width=\"2\" d=\"M47.021 35.586c0-3.818-2.728-6.915-6.095-6.915-3.367 0-6.096 3.097-6.096 6.915\"/>\n    <path class=\"tw-stroke-art-accent\" stroke-width=\"2\" d=\"M47.38 35.335H34.058a3.593 3.593 0 0 0-3.593 3.592v9.817a3.593 3.593 0 0 0 3.593 3.593H47.38a3.593 3.593 0 0 0 3.593-3.593v-9.817a3.593 3.593 0 0 0-3.593-3.592Z\"/>\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-width=\"2\" d=\"M40.72 44.34v2.618\"/>\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-width=\"4\" d=\"M40.72 42.7v-.373\"/>\n    <path class=\"tw-stroke-art-primary\" fill=\"rgb(var(--color-background-alt))\" stroke-width=\"3\" d=\"M89.326 64.022s1.673-.73 2.252.572c.512 1.138-.822 2.033-.822 2.033L56.757 88.133a3.886 3.886 0 0 0-1.583 2.188l-4.732 16.705a2.665 2.665 0 0 0 .059 1.611 2.596 2.596 0 0 0 1.891 1.663c.331.07.673.071 1.004.004.402-.077.78-.25 1.102-.503l10.11-7.88a3.138 3.138 0 0 1 1.92-.663 3.08 3.08 0 0 1 1.905.662l13.926 10.948a2.556 2.556 0 0 0 3.162 0 2.71 2.71 0 0 0 .727-.879l31.777-61.762c.231-.448.33-.952.284-1.455a2.606 2.606 0 0 0-1.721-2.226 2.499 2.499 0 0 0-1.457-.06l-81.18 20.418c-.465.12-.888.364-1.223.708a2.672 2.672 0 0 0-.632 2.676c.146.46.417.865.78 1.174L46.2 83.1a4.463 4.463 0 0 0 2.565 1.572 4.489 4.489 0 0 0 2.984-.413l37.578-20.237Z\"/>\n  </svg>\n  `;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const SendCreatedIcon = svgIcon`\n<svg width=\"96\" height=\"95\" viewBox=\"0 0 96 95\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <path class=\"tw-stroke-art-primary\" d=\"M89.4998 48.3919C89.4998 70.5749 70.9198 88.5573 47.9998 88.5573C46.0374 88.5573 44.1068 88.4257 42.217 88.1707M6.49976 48.3919C6.49976 26.2092 25.08 8.22656 47.9998 8.22656C51.8283 8.22656 55.5353 8.72824 59.0553 9.66744\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M5.47085 67.8617C2.60335 61.9801 1 55.4075 1 48.4729C1 23.3503 22.0426 2.98438 48 2.98438C52.3355 2.98438 56.534 3.55257 60.5205 4.61618M92.211 32.9993C94.016 37.8295 95 43.0399 95 48.4729C95 73.5956 73.9575 93.9614 48 93.9614C45.7775 93.9614 43.5911 93.8119 41.4508 93.5235\" />\n  <path class=\"tw-fill-art-primary\" d=\"M20.8242 84.8672C20.8242 84.3149 20.3765 83.8672 19.8242 83.8672C19.2719 83.8672 18.8242 84.3149 18.8242 84.8672H20.8242ZM18.8242 87.2442C18.8242 87.7965 19.2719 88.2442 19.8242 88.2442C20.3765 88.2442 20.8242 87.7965 20.8242 87.2442H18.8242ZM18.8242 84.1908C18.8242 84.7431 19.2719 85.1908 19.8242 85.1908C20.3765 85.1908 20.8242 84.7431 20.8242 84.1908H18.8242ZM20.8242 83.8516C20.8242 83.2993 20.3765 82.8516 19.8242 82.8516C19.2719 82.8516 18.8242 83.2993 18.8242 83.8516H20.8242ZM26.7882 76.042C26.7882 72.0015 23.7427 68.5898 19.8238 68.5898V70.5898C22.4931 70.5898 24.7882 72.9552 24.7882 76.042H26.7882ZM19.8238 68.5898C15.9049 68.5898 12.8594 72.0015 12.8594 76.042H14.8594C14.8594 72.9552 17.1545 70.5898 19.8238 70.5898V68.5898ZM11.5 77.0391H28.1475V75.0391H11.5V77.0391ZM28.1475 77.0391C28.4548 77.0391 28.6475 77.2719 28.6475 77.4908H30.6475C30.6475 76.1062 29.4972 75.0391 28.1475 75.0391V77.0391ZM28.6475 77.4908V90.5469H30.6475V77.4908H28.6475ZM28.6475 90.5469C28.6475 90.7658 28.4548 90.9987 28.1475 90.9987V92.9987C29.4972 92.9987 30.6475 91.9315 30.6475 90.5469H28.6475ZM28.1475 90.9987H11.5V92.9987H28.1475V90.9987ZM11.5 90.9987C11.1928 90.9987 11 90.7658 11 90.5469H9C9 91.9315 10.1504 92.9987 11.5 92.9987V90.9987ZM11 90.5469V77.4908H9V90.5469H11ZM11 77.4908C11 77.2719 11.1928 77.0391 11.5 77.0391V75.0391C10.1504 75.0391 9 76.1062 9 77.4908H11ZM18.8242 84.8672V87.2442H20.8242V84.8672H18.8242ZM20.8242 84.1908V83.8516H18.8242V84.1908H20.8242Z\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M36 64L37 63\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M29.9998 69.9995L30.9998 68.9995\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M40.0174 51.8491L33 48.7544L61.5083 33L56.6108 58.4604L48.4968 55.4359L44.2571 60.2185V53.8888L55.5873 40.8772\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <mask id=\"path-7-inside-1_752_3985\" fill=\"white\">\n  <path d=\"M94 17.5C94 26.6127 86.6127 34 77.5 34C68.3873 34 61 26.6127 61 17.5C61 8.3873 68.3873 1 77.5 1C86.6127 1 94 8.3873 94 17.5Z\"/>\n  </mask>\n  <path style=\"fill: rgb(var(--color-success-600) / 1)\"  d=\"M70.7244 19.4372C70.3435 19.0372 69.7106 19.0218 69.3106 19.4027C68.9107 19.7836 68.8953 20.4166 69.2761 20.8165L70.7244 19.4372ZM74.6431 25.0018L73.919 25.6915C74.1205 25.9031 74.4046 26.016 74.6964 26.0004C74.9882 25.9848 75.2586 25.8424 75.4365 25.6105L74.6431 25.0018ZM69.2761 20.8165L73.919 25.6915L75.3673 24.3122L70.7244 19.4372L69.2761 20.8165ZM75.4365 25.6105L85.7937 12.1105L84.2069 10.8931L73.8497 24.3931L75.4365 25.6105ZM92 17.5C92 25.5081 85.5081 32 77.5 32V36C87.7173 36 96 27.7173 96 17.5H92ZM77.5 32C69.4919 32 63 25.5081 63 17.5H59C59 27.7173 67.2827 36 77.5 36V32ZM63 17.5C63 9.49187 69.4919 3 77.5 3V-1C67.2827 -1 59 7.28273 59 17.5H63ZM77.5 3C85.5081 3 92 9.49187 92 17.5H96C96 7.28273 87.7173 -1 77.5 -1V3Z\" mask=\"url(#path-7-inside-1_752_3985)\"/>\n  </svg>\n`;\n","import { Send } from \"@bitwarden/common/tools/send/models/domain/send\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\n\nimport { SendFormConfig } from \"./send-form-config.service\";\n\n/**\n * Service to save the send using the correct endpoint(s) and encapsulating the logic for decrypting the send.\n *\n * This service should only be used internally by the SendFormComponent.\n */\nexport abstract class SendFormService {\n  /**\n   * Helper to decrypt a send and avoid the need to call the send service directly.\n   * (useful for mocking tests/storybook).\n   */\n  abstract decryptSend(send: Send): Promise<SendView>;\n\n  /**\n   * Saves the new or modified send with the server.\n   */\n  abstract saveSend(\n    send: SendView,\n    file: File | ArrayBuffer,\n    config: SendFormConfig,\n  ): Promise<SendView>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\n\nimport { SendFormConfig } from \"./abstractions/send-form-config.service\";\nimport { SendOptionsComponent } from \"./components/options/send-options.component\";\nimport { SendDetailsComponent } from \"./components/send-details/send-details.component\";\nimport { SendFileDetailsComponent } from \"./components/send-details/send-file-details.component\";\nimport { SendTextDetailsComponent } from \"./components/send-details/send-text-details.component\";\n/**\n * The complete form for a send. Includes all the sub-forms from their respective section components.\n * TODO: Add additional form sections as they are implemented.\n */\nexport type SendForm = {\n  sendDetailsForm?: SendDetailsComponent[\"sendDetailsForm\"];\n  sendTextDetailsForm?: SendTextDetailsComponent[\"sendTextDetailsForm\"];\n  sendFileDetailsForm?: SendFileDetailsComponent[\"sendFileDetailsForm\"];\n  sendOptionsForm?: SendOptionsComponent[\"sendOptionsForm\"];\n};\n\n/**\n * A container for the {@link SendForm} that allows for registration of child form groups and patching of the send\n * to be updated/created. Child form components inject this container in order to register themselves with the parent form\n * and access configuration options.\n *\n * This is an alternative to passing the form groups down through the component tree via @Inputs() and form updates via\n * @Outputs(). It allows child forms to define their own structure and validation rules, while still being able to\n * update the parent send.\n */\nexport abstract class SendFormContainer {\n  /**\n   * The configuration for the send form.\n   */\n  readonly config: SendFormConfig;\n\n  /**\n   * The original send that is being edited/cloned. Used to pre-populate the form and compare changes.\n   */\n  readonly originalSendView: SendView | null;\n\n  abstract registerChildForm<K extends keyof SendForm>(\n    name: K,\n    group: Exclude<SendForm[K], undefined>,\n  ): void;\n\n  abstract onFileSelected(file: File): void;\n\n  abstract patchSend(updateFn: (current: SendView) => SendView): void;\n}\n","<bit-section [formGroup]=\"sendOptionsForm\">\n  <bit-section-header>\n    <h2 class=\"tw-mt-4\" bitTypography=\"h6\">{{ \"additionalOptions\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"limitSendViews\" | i18n }}</bit-label>\n      <input bitInput type=\"number\" formControlName=\"maxAccessCount\" min=\"1\" />\n      <bit-hint>{{ \"limitSendViewsHint\" | i18n }}</bit-hint>\n      <bit-hint *ngIf=\"shouldShowCount\"\n        >&nbsp;{{ \"limitSendViewsCount\" | i18n: viewsLeft }}</bit-hint\n      >\n    </bit-form-field>\n    <bit-form-field>\n      <bit-label>{{ (passwordRemoved ? \"newPassword\" : \"password\") | i18n }}</bit-label>\n      <input bitInput type=\"password\" formControlName=\"password\" />\n      <button\n        data-testid=\"toggle-visibility-for-password\"\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        *ngIf=\"!hasPassword\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-generate\"\n        bitSuffix\n        [appA11yTitle]=\"'generatePassword' | i18n\"\n        [disabled]=\"!config.areSendsAllowed\"\n        (click)=\"generatePassword()\"\n        data-testid=\"generate-password\"\n        *ngIf=\"!hasPassword\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyPassword' | i18n\"\n        [disabled]=\"!config.areSendsAllowed || !sendOptionsForm.get('password').value\"\n        [valueLabel]=\"'password' | i18n\"\n        [appCopyClick]=\"sendOptionsForm.get('password').value\"\n        showToast\n        *ngIf=\"!hasPassword\"\n      ></button>\n      <button\n        *ngIf=\"hasPassword\"\n        class=\"tw-border-l-0 last:tw-rounded-r focus-visible:tw-border-l focus-visible:tw-ml-[-1px]\"\n        bitSuffix\n        type=\"button\"\n        buttonType=\"danger\"\n        bitIconButton=\"bwi-minus-circle\"\n        [appA11yTitle]=\"'removePassword' | i18n\"\n        [bitAction]=\"removePassword\"\n        showToast\n      ></button>\n      <bit-hint>{{ \"sendPasswordDescV3\" | i18n }}</bit-hint>\n    </bit-form-field>\n    <bit-form-control *ngIf=\"!disableHideEmail || originalSendView?.hideEmail\">\n      <input\n        [disabled]=\"disableHideEmail && !sendOptionsForm.get('hideEmail').value\"\n        bitCheckbox\n        type=\"checkbox\"\n        formControlName=\"hideEmail\"\n      />\n      <bit-label>{{ \"hideYourEmail\" | i18n }}</bit-label>\n    </bit-form-control>\n    <bit-form-field disableMargin>\n      <bit-label>{{ \"privateNote\" | i18n }}</bit-label>\n      <textarea bitInput rows=\"3\" formControlName=\"notes\"></textarea>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CardComponent,\n  CheckboxModule,\n  DialogService,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\nimport { CredentialGeneratorService, Generators } from \"@bitwarden/generator-core\";\n\nimport { SendFormConfig } from \"../../abstractions/send-form-config.service\";\nimport { SendFormContainer } from \"../../send-form-container\";\n\n@Component({\n  selector: \"tools-send-options\",\n  templateUrl: \"./send-options.component.html\",\n  standalone: true,\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CardComponent,\n    CheckboxModule,\n    CommonModule,\n    FormFieldModule,\n    IconButtonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n  ],\n})\nexport class SendOptionsComponent implements OnInit {\n  @Input({ required: true })\n  config: SendFormConfig;\n  @Input()\n  originalSendView: SendView;\n  disableHideEmail = false;\n  passwordRemoved = false;\n  sendOptionsForm = this.formBuilder.group({\n    maxAccessCount: [null as number],\n    accessCount: [null as number],\n    notes: [null as string],\n    password: [null as string],\n    hideEmail: [false as boolean],\n  });\n\n  get hasPassword(): boolean {\n    return this.originalSendView && this.originalSendView.password !== null;\n  }\n\n  get shouldShowCount(): boolean {\n    return this.config.mode === \"edit\" && this.sendOptionsForm.value.maxAccessCount !== null;\n  }\n\n  get viewsLeft() {\n    return String(\n      this.sendOptionsForm.value.maxAccessCount\n        ? this.sendOptionsForm.value.maxAccessCount - this.sendOptionsForm.value.accessCount\n        : 0,\n    );\n  }\n\n  constructor(\n    private sendFormContainer: SendFormContainer,\n    private dialogService: DialogService,\n    private sendApiService: SendApiService,\n    private formBuilder: FormBuilder,\n    private policyService: PolicyService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n    private generatorService: CredentialGeneratorService,\n  ) {\n    this.sendFormContainer.registerChildForm(\"sendOptionsForm\", this.sendOptionsForm);\n    this.policyService\n      .getAll$(PolicyType.SendOptions)\n      .pipe(\n        map((policies) => policies?.some((p) => p.data.disableHideEmail)),\n        takeUntilDestroyed(),\n      )\n      .subscribe((disableHideEmail) => {\n        this.disableHideEmail = disableHideEmail;\n      });\n\n    this.sendOptionsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.sendFormContainer.patchSend((send) => {\n        Object.assign(send, {\n          maxAccessCount: value.maxAccessCount,\n          accessCount: value.accessCount,\n          password: value.password,\n          hideEmail: value.hideEmail,\n          notes: value.notes,\n        });\n        return send;\n      });\n    });\n  }\n\n  generatePassword = async () => {\n    const generatedCredential = await firstValueFrom(\n      this.generatorService.generate$(Generators.password),\n    );\n\n    this.sendOptionsForm.patchValue({\n      password: generatedCredential.credential,\n    });\n  };\n\n  removePassword = async () => {\n    if (!this.originalSendView || !this.originalSendView.password) {\n      return;\n    }\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"removePassword\" },\n      content: { key: \"removePasswordConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    this.passwordRemoved = true;\n\n    await this.sendApiService.removePassword(this.originalSendView.id);\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"removedPassword\"),\n    });\n\n    this.originalSendView.password = null;\n    this.sendOptionsForm.patchValue({\n      password: null,\n    });\n    this.sendOptionsForm.get(\"password\")?.enable();\n  };\n\n  ngOnInit() {\n    if (this.sendFormContainer.originalSendView) {\n      this.sendOptionsForm.patchValue({\n        maxAccessCount: this.sendFormContainer.originalSendView.maxAccessCount,\n        accessCount: this.sendFormContainer.originalSendView.accessCount,\n        password: this.hasPassword ? \"************\" : null, // 12 masked characters as a placeholder\n        hideEmail: this.sendFormContainer.originalSendView.hideEmail,\n        notes: this.sendFormContainer.originalSendView.notes,\n      });\n    }\n    if (this.hasPassword) {\n      this.sendOptionsForm.get(\"password\")?.disable();\n    }\n\n    if (!this.config.areSendsAllowed) {\n      this.sendOptionsForm.disable();\n    }\n  }\n}\n","<bit-section [formGroup]=\"sendFileDetailsForm\">\n  <div *ngIf=\"config.mode === 'edit'\">\n    <div bitTypography=\"body2\" class=\"tw-text-muted\">{{ \"file\" | i18n }}</div>\n    <div data-testid=\"file-name\">{{ originalSendView.file.fileName }}</div>\n    <div data-testid=\"file-size\" class=\"tw-text-muted\">{{ originalSendView.file.sizeName }}</div>\n  </div>\n  <bit-form-field *ngIf=\"config.mode !== 'edit'\">\n    <bit-label for=\"file\">{{ \"fileToShare\" | i18n }}</bit-label>\n    <div class=\"tw-flex tw-mt-2 tw-mb-1\">\n      <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"fileSelector.click()\">\n        {{ \"chooseFile\" | i18n }}\n      </button>\n      <span\n        class=\"tw-flex tw-items-center tw-pl-3\"\n        [ngClass]=\"fileName ? 'tw-text-main' : 'tw-text-muted'\"\n      >\n        {{ fileName || (\"noFileChosen\" | i18n) }}</span\n      >\n    </div>\n    <input\n      bitInput\n      #fileSelector\n      type=\"file\"\n      formControlName=\"file\"\n      hidden\n      (change)=\"onFileSelected($event)\"\n    />\n    <bit-hint>\n      {{ \"maxFileSize\" | i18n }}\n    </bit-hint>\n  </bit-form-field>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, Validators, ReactiveFormsModule, FormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendFileView } from \"@bitwarden/common/tools/send/models/view/send-file.view\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport {\n  ButtonModule,\n  FormFieldModule,\n  SectionComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { SendFormConfig } from \"../../abstractions/send-form-config.service\";\nimport { SendFormContainer } from \"../../send-form-container\";\n\n@Component({\n  selector: \"tools-send-file-details\",\n  templateUrl: \"./send-file-details.component.html\",\n  standalone: true,\n  imports: [\n    ButtonModule,\n    CommonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    SectionComponent,\n    FormsModule,\n    TypographyModule,\n  ],\n})\nexport class SendFileDetailsComponent implements OnInit {\n  @Input() config: SendFormConfig;\n  @Input() originalSendView?: SendView;\n\n  sendFileDetailsForm = this.formBuilder.group({\n    file: this.formBuilder.control<SendFileView | null>(null, Validators.required),\n  });\n\n  FileSendType = SendType.File;\n  fileName = \"\";\n\n  constructor(\n    private formBuilder: FormBuilder,\n    protected sendFormContainer: SendFormContainer,\n  ) {\n    this.sendFormContainer.registerChildForm(\"sendFileDetailsForm\", this.sendFileDetailsForm);\n\n    this.sendFileDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.sendFormContainer.patchSend((send) => {\n        return Object.assign(send, {\n          file: value.file,\n        });\n      });\n    });\n  }\n\n  onFileSelected = (event: Event): void => {\n    const file = (event.target as HTMLInputElement).files?.[0];\n    if (!file) {\n      return;\n    }\n    this.fileName = file.name;\n    this.sendFormContainer.onFileSelected(file);\n  };\n\n  ngOnInit() {\n    if (this.originalSendView) {\n      this.sendFileDetailsForm.patchValue({\n        file: this.originalSendView.file,\n      });\n    }\n\n    if (!this.config.areSendsAllowed) {\n      this.sendFileDetailsForm.disable();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, FormControl, Validators, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { CheckboxModule, FormFieldModule, SectionComponent } from \"@bitwarden/components\";\n\nimport { SendFormConfig } from \"../../abstractions/send-form-config.service\";\nimport { SendFormContainer } from \"../../send-form-container\";\n\n@Component({\n  selector: \"tools-send-text-details\",\n  templateUrl: \"./send-text-details.component.html\",\n  standalone: true,\n  imports: [\n    CheckboxModule,\n    CommonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    SectionComponent,\n  ],\n})\nexport class SendTextDetailsComponent implements OnInit {\n  @Input() config: SendFormConfig;\n  @Input() originalSendView?: SendView;\n\n  sendTextDetailsForm = this.formBuilder.group({\n    text: new FormControl(\"\", Validators.required),\n    hidden: new FormControl(false),\n  });\n\n  constructor(\n    private formBuilder: FormBuilder,\n    protected sendFormContainer: SendFormContainer,\n  ) {\n    this.sendFormContainer.registerChildForm(\"sendTextDetailsForm\", this.sendTextDetailsForm);\n\n    this.sendTextDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.sendFormContainer.patchSend((send) => {\n        return Object.assign(send, {\n          text: {\n            text: value.text,\n            hidden: value.hidden,\n          },\n        });\n      });\n    });\n  }\n\n  ngOnInit() {\n    if (this.originalSendView) {\n      this.sendTextDetailsForm.patchValue({\n        text: this.originalSendView.text?.text || \"\",\n        hidden: this.originalSendView.text?.hidden || false,\n      });\n    }\n\n    if (!this.config.areSendsAllowed) {\n      this.sendTextDetailsForm.disable();\n    }\n  }\n}\n","<bit-section [formGroup]=\"sendTextDetailsForm\" disableMargin>\n  <bit-form-field>\n    <bit-label>{{ \"sendTypeTextToShare\" | i18n }}</bit-label>\n    <textarea bitInput id=\"text\" rows=\"3\" formControlName=\"text\"></textarea>\n  </bit-form-field>\n  <bit-form-control>\n    <input bitCheckbox type=\"checkbox\" formControlName=\"hidden\" />\n    <bit-label>{{ \"hideTextByDefault\" | i18n }}</bit-label>\n  </bit-form-control>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule, DatePipe } from \"@angular/common\";\nimport { Component, OnInit, Input } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, FormControl, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport {\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  CheckboxModule,\n  SelectModule,\n} from \"@bitwarden/components\";\n\nimport { SendFormConfig } from \"../../abstractions/send-form-config.service\";\nimport { SendFormContainer } from \"../../send-form-container\";\nimport { SendOptionsComponent } from \"../options/send-options.component\";\n\nimport { SendFileDetailsComponent } from \"./send-file-details.component\";\nimport { SendTextDetailsComponent } from \"./send-text-details.component\";\n\n// Value = hours\nexport enum DatePreset {\n  OneHour = 1,\n  OneDay = 24,\n  TwoDays = 48,\n  ThreeDays = 72,\n  SevenDays = 168,\n  FourteenDays = 336,\n  ThirtyDays = 720,\n}\n\nexport interface DatePresetSelectOption {\n  name: string;\n  value: DatePreset | string;\n}\n\n@Component({\n  selector: \"tools-send-details\",\n  templateUrl: \"./send-details.component.html\",\n  standalone: true,\n  imports: [\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    JslibModule,\n    CardComponent,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SendTextDetailsComponent,\n    SendFileDetailsComponent,\n    SendOptionsComponent,\n    IconButtonModule,\n    CheckboxModule,\n    CommonModule,\n    SelectModule,\n  ],\n})\nexport class SendDetailsComponent implements OnInit {\n  @Input() config: SendFormConfig;\n  @Input() originalSendView?: SendView;\n\n  FileSendType = SendType.File;\n  TextSendType = SendType.Text;\n  sendLink: string | null = null;\n  customDeletionDateOption: DatePresetSelectOption | null = null;\n  datePresetOptions: DatePresetSelectOption[] = [];\n\n  sendDetailsForm = this.formBuilder.group({\n    name: new FormControl(\"\", Validators.required),\n    selectedDeletionDatePreset: new FormControl(DatePreset.SevenDays || \"\", Validators.required),\n  });\n\n  constructor(\n    protected sendFormContainer: SendFormContainer,\n    protected formBuilder: FormBuilder,\n    protected i18nService: I18nService,\n    protected datePipe: DatePipe,\n    protected environmentService: EnvironmentService,\n  ) {\n    this.sendDetailsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.sendFormContainer.patchSend((send) => {\n        return Object.assign(send, {\n          name: value.name,\n          deletionDate: new Date(this.formattedDeletionDate),\n          expirationDate: new Date(this.formattedDeletionDate),\n        } as SendView);\n      });\n    });\n\n    this.sendFormContainer.registerChildForm(\"sendDetailsForm\", this.sendDetailsForm);\n  }\n\n  async ngOnInit() {\n    this.setupDeletionDatePresets();\n\n    if (this.originalSendView) {\n      this.sendDetailsForm.patchValue({\n        name: this.originalSendView.name,\n        selectedDeletionDatePreset: this.originalSendView.deletionDate.toString(),\n      });\n\n      if (this.originalSendView.deletionDate) {\n        this.customDeletionDateOption = {\n          name: this.datePipe.transform(this.originalSendView.deletionDate, \"short\"),\n          value: this.originalSendView.deletionDate.toString(),\n        };\n        this.datePresetOptions.unshift(this.customDeletionDateOption);\n      }\n\n      const env = await firstValueFrom(this.environmentService.environment$);\n      this.sendLink =\n        env.getSendUrl() + this.originalSendView.accessId + \"/\" + this.originalSendView.urlB64Key;\n    }\n\n    if (!this.config.areSendsAllowed) {\n      this.sendDetailsForm.disable();\n    }\n  }\n\n  setupDeletionDatePresets() {\n    const defaultSelections: DatePresetSelectOption[] = [\n      { name: this.i18nService.t(\"oneHour\"), value: DatePreset.OneHour },\n      { name: this.i18nService.t(\"oneDay\"), value: DatePreset.OneDay },\n      { name: this.i18nService.t(\"days\", \"2\"), value: DatePreset.TwoDays },\n      { name: this.i18nService.t(\"days\", \"3\"), value: DatePreset.ThreeDays },\n      { name: this.i18nService.t(\"days\", \"7\"), value: DatePreset.SevenDays },\n      { name: this.i18nService.t(\"days\", \"14\"), value: DatePreset.FourteenDays },\n      { name: this.i18nService.t(\"days\", \"30\"), value: DatePreset.ThirtyDays },\n    ];\n\n    this.datePresetOptions = defaultSelections;\n  }\n\n  get formattedDeletionDate(): string {\n    const now = new Date();\n    const selectedValue = this.sendDetailsForm.controls.selectedDeletionDatePreset.value;\n\n    if (typeof selectedValue === \"string\") {\n      return selectedValue;\n    }\n\n    const milliseconds = now.setTime(now.getTime() + (selectedValue as number) * 60 * 60 * 1000);\n    return new Date(milliseconds).toString();\n  }\n}\n","<bit-section [formGroup]=\"sendDetailsForm\">\n  <bit-section-header class=\"tw-mt-2\">\n    <h2 bitTypography=\"h6\">{{ \"sendDetails\" | i18n }}</h2>\n  </bit-section-header>\n\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"name\" | i18n }}</bit-label>\n      <input appAutofocus bitInput type=\"text\" formControlName=\"name\" />\n    </bit-form-field>\n\n    <tools-send-text-details\n      *ngIf=\"config.sendType === TextSendType\"\n      [config]=\"config\"\n      [originalSendView]=\"originalSendView\"\n    ></tools-send-text-details>\n\n    <tools-send-file-details\n      *ngIf=\"config.sendType === FileSendType\"\n      [config]=\"config\"\n      [originalSendView]=\"originalSendView\"\n    ></tools-send-file-details>\n\n    <bit-form-field *ngIf=\"sendLink\">\n      <bit-label>{{ \"sendLink\" | i18n }}</bit-label>\n      <input data-testid=\"send-link\" bitInput type=\"text\" [value]=\"sendLink\" disabled />\n      <button\n        type=\"button\"\n        bitSuffix\n        showToast\n        bitIconButton=\"bwi-clone\"\n        [appCopyClick]=\"sendLink\"\n        [appA11yTitle]=\"'copySendLink' | i18n\"\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field disableMargin>\n      <bit-label>{{ \"deletionDate\" | i18n }}</bit-label>\n      <bit-select\n        id=\"deletionDate\"\n        name=\"SelectedDeletionDatePreset\"\n        formControlName=\"selectedDeletionDatePreset\"\n      >\n        <bit-option\n          *ngFor=\"let o of datePresetOptions\"\n          [value]=\"o.value\"\n          [label]=\"o.name\"\n        ></bit-option>\n      </bit-select>\n      <bit-hint>{{ \"deletionDateDescV2\" | i18n }}</bit-hint>\n    </bit-form-field>\n  </bit-card>\n  <tools-send-options [config]=\"config\" [originalSendView]=\"originalSendView\"></tools-send-options>\n</bit-section>\n","<form [id]=\"formId\" [formGroup]=\"sendForm\" [bitSubmit]=\"submit\">\n  <ng-container *ngIf=\"!loading\">\n    <tools-send-details\n      [config]=\"config\"\n      [originalSendView]=\"originalSendView\"\n    ></tools-send-details>\n  </ng-container>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport {\n  AfterViewInit,\n  Component,\n  DestroyRef,\n  EventEmitter,\n  forwardRef,\n  inject,\n  Input,\n  OnChanges,\n  OnInit,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport {\n  AsyncActionsModule,\n  BitSubmitDirective,\n  ButtonComponent,\n  CardComponent,\n  FormFieldModule,\n  ItemModule,\n  SectionComponent,\n  SelectModule,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { SendFormConfig } from \"../abstractions/send-form-config.service\";\nimport { SendFormService } from \"../abstractions/send-form.service\";\nimport { SendForm, SendFormContainer } from \"../send-form-container\";\n\nimport { SendDetailsComponent } from \"./send-details/send-details.component\";\n\n@Component({\n  selector: \"tools-send-form\",\n  templateUrl: \"./send-form.component.html\",\n  standalone: true,\n  providers: [\n    {\n      provide: SendFormContainer,\n      useExisting: forwardRef(() => SendFormComponent),\n    },\n  ],\n  imports: [\n    AsyncActionsModule,\n    CardComponent,\n    SectionComponent,\n    TypographyModule,\n    ItemModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SelectModule,\n    NgIf,\n    SendDetailsComponent,\n  ],\n})\nexport class SendFormComponent implements AfterViewInit, OnInit, OnChanges, SendFormContainer {\n  @ViewChild(BitSubmitDirective)\n  private bitSubmit: BitSubmitDirective;\n  private destroyRef = inject(DestroyRef);\n  private _firstInitialized = false;\n  private file: File | null = null;\n\n  /**\n   * The form ID to use for the form. Used to connect it to a submit button.\n   */\n  @Input({ required: true }) formId: string;\n\n  /**\n   * The configuration for the add/edit form. Used to determine which controls are shown and what values are available.\n   */\n  @Input({ required: true }) config: SendFormConfig;\n\n  /**\n   * Optional submit button that will be disabled or marked as loading when the form is submitting.\n   */\n  @Input()\n  submitBtn?: ButtonComponent;\n\n  /**\n   * Event emitted when the send is created successfully.\n   */\n  @Output() onSendCreated = new EventEmitter<SendView>();\n\n  /**\n   * Event emitted when the send is updated successfully.\n   */\n  @Output() onSendUpdated = new EventEmitter<SendView>();\n\n  /**\n   * The original send being edited or cloned. Null for add mode.\n   */\n  originalSendView: SendView | null;\n\n  /**\n   * The form group for the send. Starts empty and is populated by child components via the `registerChildForm` method.\n   * @protected\n   */\n  protected sendForm = this.formBuilder.group<SendForm>({});\n\n  /**\n   * The value of the updated send. Starts as a new send and is updated\n   * by child components via the `patchSend` method.\n   * @protected\n   */\n  protected updatedSendView: SendView | null;\n  protected loading: boolean = true;\n\n  SendType = SendType;\n\n  ngAfterViewInit(): void {\n    if (this.submitBtn) {\n      this.bitSubmit.loading$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((loading) => {\n        this.submitBtn.loading = loading;\n      });\n\n      this.bitSubmit.disabled$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((disabled) => {\n        this.submitBtn.disabled = disabled;\n      });\n    }\n  }\n\n  /**\n   * Registers a child form group with the parent form group. Used by child components to add their form groups to\n   * the parent form for validation.\n   * @param name - The name of the form group.\n   * @param group - The form group to add.\n   */\n  registerChildForm<K extends keyof SendForm>(\n    name: K,\n    group: Exclude<SendForm[K], undefined>,\n  ): void {\n    this.sendForm.setControl(name, group);\n  }\n\n  /**\n   * Method to update the sendView with the new values. This method should be called by the child form components\n   * @param updateFn - A function that takes the current sendView and returns the updated sendView\n   */\n  patchSend(updateFn: (current: SendView) => SendView): void {\n    this.updatedSendView = updateFn(this.updatedSendView);\n  }\n\n  /**\n   * We need to re-initialize the form when the config is updated.\n   */\n  async ngOnChanges() {\n    // Avoid re-initializing the form on the first change detection cycle.\n    if (this._firstInitialized) {\n      await this.init();\n    }\n  }\n\n  async ngOnInit() {\n    await this.init();\n    this._firstInitialized = true;\n  }\n\n  async init() {\n    this.loading = true;\n    this.updatedSendView = new SendView();\n    this.originalSendView = null;\n    this.sendForm.reset();\n\n    if (this.config == null) {\n      return;\n    }\n\n    if (this.config.mode !== \"add\") {\n      if (this.config.originalSend == null) {\n        throw new Error(\"Original send is required for edit or clone mode\");\n      }\n\n      this.originalSendView = await this.addEditFormService.decryptSend(this.config.originalSend);\n\n      this.updatedSendView = Object.assign(this.updatedSendView, this.originalSendView);\n    } else {\n      this.updatedSendView.type = this.config.sendType;\n    }\n\n    this.loading = false;\n  }\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private addEditFormService: SendFormService,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n  ) {}\n\n  onFileSelected(file: File): void {\n    this.file = file;\n  }\n\n  submit = async () => {\n    if (this.sendForm.invalid) {\n      this.sendForm.markAllAsTouched();\n      return;\n    }\n\n    const sendView = await this.addEditFormService.saveSend(\n      this.updatedSendView,\n      this.file,\n      this.config,\n    );\n\n    if (this.config.mode === \"add\") {\n      this.onSendCreated.emit(sendView);\n      return;\n    }\n\n    if (Utils.isNullOrWhitespace(this.updatedSendView.password)) {\n      this.updatedSendView.password = null;\n    }\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"editedItem\"),\n    });\n    this.onSendUpdated.emit(this.updatedSendView);\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject, Injectable } from \"@angular/core\";\n\nimport { Send } from \"@bitwarden/common/tools/send/models/domain/send\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\n\nimport { SendFormConfig } from \"../abstractions/send-form-config.service\";\nimport { SendFormService } from \"../abstractions/send-form.service\";\n\n@Injectable()\nexport class DefaultSendFormService implements SendFormService {\n  private sendApiService: SendApiService = inject(SendApiService);\n  private sendService = inject(SendService);\n\n  async decryptSend(send: Send): Promise<SendView> {\n    return await send.decrypt();\n  }\n\n  async saveSend(send: SendView, file: File | ArrayBuffer, config: SendFormConfig) {\n    const sendData = await this.sendService.encrypt(send, file, send.password, null);\n    const newSend = await this.sendApiService.save(sendData);\n    return await this.decryptSend(newSend);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { GeneratorServicesModule } from \"@bitwarden/generator-components\";\n\nimport { SendFormService } from \"./abstractions/send-form.service\";\nimport { SendFormComponent } from \"./components/send-form.component\";\nimport { DefaultSendFormService } from \"./services/default-send-form.service\";\n\n@NgModule({\n  imports: [SendFormComponent, GeneratorServicesModule],\n  providers: [\n    {\n      provide: SendFormService,\n      useClass: DefaultSendFormService,\n    },\n  ],\n  exports: [SendFormComponent],\n})\nexport class SendFormModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject, Injectable } from \"@angular/core\";\nimport { combineLatest, firstValueFrom, map } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { SendId } from \"@bitwarden/common/types/guid\";\n\nimport {\n  SendFormConfig,\n  SendFormConfigService,\n  SendFormMode,\n} from \"../abstractions/send-form-config.service\";\n\n/**\n * Default implementation of the `SendFormConfigService`.\n */\n@Injectable()\nexport class DefaultSendFormConfigService implements SendFormConfigService {\n  private policyService: PolicyService = inject(PolicyService);\n  private sendService: SendService = inject(SendService);\n\n  async buildConfig(\n    mode: SendFormMode,\n    sendId?: SendId,\n    sendType?: SendType,\n  ): Promise<SendFormConfig> {\n    const [areSendsAllowed, send] = await firstValueFrom(\n      combineLatest([this.areSendsEnabled$, this.getSend(sendId)]),\n    );\n\n    return {\n      mode,\n      sendType: sendType,\n      areSendsAllowed,\n      originalSend: send,\n    };\n  }\n\n  private areSendsEnabled$ = this.policyService\n    .policyAppliesToActiveUser$(PolicyType.DisableSend)\n    .pipe(map((p) => !p));\n\n  private getSend(id?: SendId) {\n    if (id == null) {\n      return Promise.resolve(null);\n    }\n    return this.sendService.get$(id);\n  }\n}\n","<button bitButton [bitMenuTriggerFor]=\"itemOptions\" buttonType=\"primary\" type=\"button\">\n  <i *ngIf=\"!hideIcon\" class=\"bwi bwi-plus-f\" aria-hidden=\"true\"></i>\n  {{ (hideIcon ? \"createSend\" : \"new\") | i18n }}\n</button>\n<bit-menu #itemOptions>\n  <a\n    bitMenuItem\n    [routerLink]=\"buildRouterLink(sendType.Text)\"\n    [queryParams]=\"buildQueryParams(sendType.Text)\"\n  >\n    <i class=\"bwi bwi-file-text\" slot=\"start\" aria-hidden=\"true\"></i>\n    {{ \"sendTypeText\" | i18n }}\n  </a>\n  <a\n    bitMenuItem\n    [routerLink]=\"buildRouterLink(sendType.File)\"\n    [queryParams]=\"buildQueryParams(sendType.File)\"\n  >\n    <i class=\"bwi bwi-file\" slot=\"start\" aria-hidden=\"true\"></i>\n    {{ \"sendTypeFile\" | i18n }}\n    <button type=\"button\" slot=\"end\" *ngIf=\"hasNoPremium\" bitBadge variant=\"success\">\n      {{ \"premium\" | i18n }}\n    </button>\n  </a>\n</bit-menu>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { Router, RouterLink } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { BadgeModule, ButtonModule, MenuModule } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"tools-new-send-dropdown\",\n  templateUrl: \"new-send-dropdown.component.html\",\n  standalone: true,\n  imports: [JslibModule, CommonModule, ButtonModule, RouterLink, MenuModule, BadgeModule],\n})\nexport class NewSendDropdownComponent implements OnInit {\n  @Input() hideIcon: boolean = false;\n\n  sendType = SendType;\n\n  hasNoPremium = false;\n\n  constructor(\n    private router: Router,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {}\n\n  async ngOnInit() {\n    const account = await firstValueFrom(this.accountService.activeAccount$);\n    if (!account) {\n      this.hasNoPremium = true;\n      return;\n    }\n\n    this.hasNoPremium = !(await firstValueFrom(\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n    ));\n  }\n\n  buildRouterLink(type: SendType) {\n    if (this.hasNoPremium && type === SendType.File) {\n      return \"/premium\";\n    } else {\n      return \"/add-send\";\n    }\n  }\n\n  buildQueryParams(type: SendType) {\n    if (this.hasNoPremium && type === SendType.File) {\n      return null;\n    }\n    return { type: type, isNew: true };\n  }\n}\n","<bit-section *ngIf=\"sends?.length > 0\">\n  <bit-section-header>\n    <h2 class=\"tw-font-bold\" bitTypography=\"h6\">\n      {{ headerText }}\n    </h2>\n    <span bitTypography=\"body1\" slot=\"end\">{{ sends.length }}</span>\n  </bit-section-header>\n  <bit-item-group>\n    <bit-item *ngFor=\"let send of sends\">\n      <button\n        bit-item-content\n        appA11yTitle=\"{{ 'edit' | i18n }} - {{ send.name }}\"\n        routerLink=\"/edit-send\"\n        [queryParams]=\"{ sendId: send.id, type: send.type }\"\n        appStopClick\n        type=\"button\"\n      >\n        <i\n          slot=\"start\"\n          *ngIf=\"send.type === sendType.Text\"\n          class=\"bwi bwi-file-text tw-text-2xl text-muted\"\n        ></i>\n        <i\n          slot=\"start\"\n          *ngIf=\"send.type === sendType.File\"\n          class=\"bwi bwi-file tw-text-2xl text-muted\"\n        ></i>\n        {{ send.name }}\n        <span slot=\"secondary\">\n          {{ \"deletionDate\" | i18n }}:&nbsp;{{ send.deletionDate | date: \"mediumDate\" }}\n        </span>\n      </button>\n      <ng-container slot=\"end\">\n        <bit-item-action>\n          <button\n            class=\"tw-p-1\"\n            bitIconButton=\"bwi-clone\"\n            size=\"small\"\n            type=\"button\"\n            (click)=\"copySendLink(send)\"\n            appA11yTitle=\"{{ 'copyLink' | i18n }} - {{ send.name }}\"\n          ></button>\n        </bit-item-action>\n        <bit-item-action>\n          <button\n            bitIconButton=\"bwi-trash\"\n            size=\"small\"\n            type=\"button\"\n            (click)=\"deleteSend(send)\"\n            appA11yTitle=\"{{ 'delete' | i18n }} - {{ send.name }}\"\n          ></button>\n        </bit-item-action>\n      </ng-container>\n    </bit-item>\n  </bit-item-group>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { RouterLink } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport {\n  BadgeModule,\n  ButtonModule,\n  DialogService,\n  IconButtonModule,\n  ItemModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  imports: [\n    CommonModule,\n    ItemModule,\n    ButtonModule,\n    BadgeModule,\n    IconButtonModule,\n    SectionComponent,\n    TypographyModule,\n    JslibModule,\n    SectionHeaderComponent,\n    RouterLink,\n  ],\n  selector: \"app-send-list-items-container\",\n  templateUrl: \"send-list-items-container.component.html\",\n  standalone: true,\n})\nexport class SendListItemsContainerComponent {\n  sendType = SendType;\n  /**\n   * The list of sends to display.\n   */\n  @Input()\n  sends: SendView[] = [];\n\n  @Input()\n  headerText: string;\n\n  constructor(\n    protected dialogService: DialogService,\n    protected environmentService: EnvironmentService,\n    protected i18nService: I18nService,\n    protected logService: LogService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected sendApiService: SendApiService,\n    protected toastService: ToastService,\n  ) {}\n\n  async deleteSend(s: SendView): Promise<boolean> {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteSend\" },\n      content: { key: \"deleteSendPermanentConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    await this.sendApiService.delete(s.id);\n\n    try {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"deletedSend\"),\n      });\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async copySendLink(send: SendView) {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const link = env.getSendUrl() + send.accessId + \"/\" + send.urlB64Key;\n    this.platformUtilsService.copyToClipboard(link);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"sendLink\")),\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { map, Observable, startWith } from \"rxjs\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { ITreeNodeObject, TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { ChipSelectOption } from \"@bitwarden/components\";\n\nexport type SendListFilter = {\n  sendType: SendType | null;\n};\n\nconst INITIAL_FILTERS: SendListFilter = {\n  sendType: null,\n};\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class SendListFiltersService {\n  /**\n   * UI form for all filters\n   */\n  filterForm = this.formBuilder.group<SendListFilter>(INITIAL_FILTERS);\n\n  /**\n   * Observable for `filterForm` value\n   */\n  filters$ = this.filterForm.valueChanges.pipe(\n    startWith(INITIAL_FILTERS),\n  ) as Observable<SendListFilter>;\n\n  constructor(\n    private i18nService: I18nService,\n    private formBuilder: FormBuilder,\n  ) {}\n\n  /**\n   * Observable whose value is a function that filters an array of `SendView` objects based on the current filters\n   */\n  filterFunction$: Observable<(send: SendView[]) => SendView[]> = this.filters$.pipe(\n    map(\n      (filters) => (sends: SendView[]) =>\n        sends.filter((send) => {\n          if (filters.sendType !== null && send.type !== filters.sendType) {\n            return false;\n          }\n\n          return true;\n        }),\n    ),\n  );\n\n  /**\n   * All available send types\n   */\n  readonly sendTypes: ChipSelectOption<SendType>[] = [\n    {\n      value: SendType.File,\n      label: this.i18nService.t(\"sendTypeFile\"),\n      icon: \"bwi-file\",\n    },\n    {\n      value: SendType.Text,\n      label: this.i18nService.t(\"sendTypeText\"),\n      icon: \"bwi-file-text\",\n    },\n  ];\n\n  /** Resets `filterForm` to the original state */\n  resetFilterForm(): void {\n    this.filterForm.reset(INITIAL_FILTERS);\n  }\n\n  /**\n   * Converts the given item into the `ChipSelectOption` structure\n   */\n  private convertToChipSelectOption<T extends ITreeNodeObject>(\n    item: TreeNode<T>,\n    icon: string,\n  ): ChipSelectOption<T> {\n    return {\n      value: item.node,\n      label: item.node.name,\n      icon,\n      children: item.children\n        ? item.children.map((i) => this.convertToChipSelectOption(i, icon))\n        : undefined,\n    };\n  }\n}\n","import { Injectable } from \"@angular/core\";\nimport {\n  BehaviorSubject,\n  combineLatest,\n  distinctUntilChanged,\n  from,\n  map,\n  merge,\n  Observable,\n  shareReplay,\n  startWith,\n  Subject,\n  switchMap,\n  tap,\n} from \"rxjs\";\n\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\n\nimport { SendListFiltersService } from \"./send-list-filters.service\";\n\n/**\n * Service for managing the various item lists on the new Vault tab in the browser popup.\n */\n@Injectable({\n  providedIn: \"root\",\n})\nexport class SendItemsService {\n  private _searchText$ = new BehaviorSubject<string>(\"\");\n\n  /**\n   * Subject that emits whenever new sends are being processed/filtered.\n   * @private\n   */\n  private _sendsLoading$ = new Subject<void>();\n\n  latestSearchText$: Observable<string> = this._searchText$.asObservable();\n  private _sendList$: Observable<SendView[]> = this.sendService.sendViews$;\n\n  /**\n   * Observable that emits the list of sends, filtered and sorted based on the current search text and filters.\n   * The list is sorted alphabetically by send name.\n   * @readonly\n   */\n  filteredAndSortedSends$: Observable<SendView[]> = combineLatest([\n    this._sendList$,\n    this._searchText$,\n    this.sendListFiltersService.filterFunction$,\n  ]).pipe(\n    tap(() => {\n      this._sendsLoading$.next();\n    }),\n    map(([sends, searchText, filterFunction]): [SendView[], string] => [\n      filterFunction(sends),\n      searchText,\n    ]),\n    map(([sends, searchText]) => this.searchService.searchSends(sends, searchText)),\n    map((sends) => sends.sort((a, b) => a.name.localeCompare(b.name))),\n    shareReplay({ refCount: true, bufferSize: 1 }),\n  );\n\n  /**\n   * Observable that indicates whether the service is currently loading sends.\n   */\n  loading$: Observable<boolean> = merge(\n    this._sendsLoading$.pipe(map(() => true)),\n    this.filteredAndSortedSends$.pipe(map(() => false)),\n  ).pipe(startWith(true), distinctUntilChanged(), shareReplay({ refCount: false, bufferSize: 1 }));\n\n  /**\n   * Observable that indicates whether a filter is currently applied to the sends.\n   */\n  hasFilterApplied$ = combineLatest([this._searchText$, this.sendListFiltersService.filters$]).pipe(\n    switchMap(([searchText, filters]) => {\n      return from(this.searchService.isSearchable(searchText)).pipe(\n        map(\n          (isSearchable) =>\n            isSearchable || Object.values(filters).some((filter) => filter !== null),\n        ),\n      );\n    }),\n  );\n\n  /**\n   * Observable that indicates whether the user's send list is empty.\n   */\n  emptyList$: Observable<boolean> = this._sendList$.pipe(map((sends) => !sends.length));\n\n  /**\n   * Observable that indicates whether there are no sends to show with the current filter.\n   */\n  noFilteredResults$: Observable<boolean> = this.filteredAndSortedSends$.pipe(\n    map((sends) => !sends.length),\n  );\n\n  constructor(\n    private sendService: SendService,\n    private sendListFiltersService: SendListFiltersService,\n    private searchService: SearchService,\n  ) {}\n\n  applyFilter(newSearchText: string) {\n    this._searchText$.next(newSearchText);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormsModule } from \"@angular/forms\";\nimport { Subject, Subscription, debounceTime, filter } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SearchModule } from \"@bitwarden/components\";\n\nimport { SendItemsService } from \"../services/send-items.service\";\n\nconst SearchTextDebounceInterval = 200;\n\n@Component({\n  imports: [CommonModule, SearchModule, JslibModule, FormsModule],\n  standalone: true,\n  selector: \"tools-send-search\",\n  templateUrl: \"send-search.component.html\",\n})\nexport class SendSearchComponent {\n  searchText: string;\n\n  private searchText$ = new Subject<string>();\n\n  constructor(private sendListItemService: SendItemsService) {\n    this.subscribeToLatestSearchText();\n    this.subscribeToApplyFilter();\n  }\n\n  onSearchTextChanged() {\n    this.searchText$.next(this.searchText);\n  }\n\n  subscribeToLatestSearchText(): Subscription {\n    return this.sendListItemService.latestSearchText$\n      .pipe(\n        takeUntilDestroyed(),\n        filter((data) => !!data),\n      )\n      .subscribe((text) => {\n        this.searchText = text;\n      });\n  }\n\n  subscribeToApplyFilter(): Subscription {\n    return this.searchText$\n      .pipe(debounceTime(SearchTextDebounceInterval), takeUntilDestroyed())\n      .subscribe((data) => {\n        this.sendListItemService.applyFilter(data);\n      });\n  }\n}\n","<div class=\"tw-mb-2\">\n  <bit-search\n    [placeholder]=\"'search' | i18n\"\n    [(ngModel)]=\"searchText\"\n    (ngModelChange)=\"onSearchTextChanged()\"\n    appAutofocus\n  >\n  </bit-search>\n</div>\n","<div\n  bitTypography=\"body2\"\n  class=\"tw-inline-flex tw-items-center tw-rounded-full tw-w-full tw-border-solid tw-border tw-gap-1.5 tw-group/chip-select\"\n  [ngClass]=\"{\n    'tw-bg-text-muted hover:tw-bg-secondary-700 tw-text-contrast hover:!tw-border-secondary-700':\n      selectedOption && !disabled,\n    'tw-bg-transparent hover:tw-border-secondary-700 !tw-text-muted hover:tw-bg-secondary-100':\n      !selectedOption && !disabled,\n    'tw-bg-secondary-300 tw-text-muted tw-border-transparent': disabled,\n    'tw-border-text-muted': !disabled,\n    'tw-ring-2 tw-ring-primary-600 tw-ring-offset-1': focusVisibleWithin(),\n  }\"\n>\n  <!-- Primary button -->\n  <button\n    type=\"button\"\n    class=\"fvw-target tw-inline-flex tw-gap-1.5 tw-items-center tw-justify-between tw-bg-transparent hover:tw-bg-transparent tw-border-none tw-outline-none tw-w-full tw-py-1 tw-pl-3 last:tw-pr-3 [&:not(:last-child)]:tw-pr-0 tw-truncate tw-text-[color:inherit] tw-text-[length:inherit]\"\n    [ngClass]=\"{\n      'tw-cursor-not-allowed': disabled,\n      'group-hover/chip-select:tw-text-secondary-700': !selectedOption && !disabled,\n    }\"\n    [bitMenuTriggerFor]=\"menu\"\n    [disabled]=\"disabled\"\n    [title]=\"label\"\n    #menuTrigger=\"menuTrigger\"\n    (click)=\"setMenuWidth()\"\n    #chipSelectButton\n  >\n    <span class=\"tw-inline-flex tw-items-center tw-gap-1.5 tw-truncate\">\n      <i class=\"bwi !tw-text-[inherit]\" [ngClass]=\"icon\"></i>\n      <span class=\"tw-truncate\">{{ label }}</span>\n    </span>\n    <i\n      *ngIf=\"!selectedOption\"\n      class=\"bwi tw-mt-0.5\"\n      [ngClass]=\"menuTrigger.isOpen ? 'bwi-angle-up' : 'bwi-angle-down'\"\n    ></i>\n  </button>\n\n  <!-- Close button -->\n  <button\n    *ngIf=\"selectedOption\"\n    type=\"button\"\n    [attr.aria-label]=\"'removeItem' | i18n: label\"\n    [disabled]=\"disabled\"\n    class=\"tw-bg-transparent hover:tw-bg-transparent tw-outline-none tw-rounded-full tw-py-0.5 tw-px-1 tw-mr-1 tw-text-[color:inherit] tw-text-[length:inherit] tw-border-solid tw-border tw-border-transparent hover:tw-border-text-contrast hover:disabled:tw-border-transparent tw-flex tw-items-center tw-justify-center focus-visible:tw-ring-2 tw-ring-text-contrast focus-visible:hover:tw-border-transparent\"\n    [ngClass]=\"{\n      'tw-cursor-not-allowed': disabled,\n    }\"\n    (click)=\"clear()\"\n  >\n    <i class=\"bwi bwi-close tw-text-xs\"></i>\n  </button>\n</div>\n\n<bit-menu #menu (closed)=\"handleMenuClosed()\">\n  <div\n    *ngIf=\"renderedOptions\"\n    class=\"tw-max-h-80 tw-min-w-32 tw-max-w-80 tw-text-sm\"\n    [ngStyle]=\"menuWidth && { width: menuWidth + 'px' }\"\n  >\n    <ng-container *ngIf=\"getParent(renderedOptions) as parent\">\n      <button\n        type=\"button\"\n        bitMenuItem\n        (click)=\"viewOption(parent, $event)\"\n        class=\"tw-text-[length:inherit]\"\n        [title]=\"'backTo' | i18n: parent.label ?? placeholderText\"\n      >\n        <i slot=\"start\" class=\"bwi bwi-angle-left\" aria-hidden=\"true\"></i>\n        {{ \"backTo\" | i18n: parent.label ?? placeholderText }}\n      </button>\n\n      <button\n        type=\"button\"\n        bitMenuItem\n        (click)=\"selectOption(renderedOptions, $event)\"\n        [title]=\"'viewItemsIn' | i18n: renderedOptions.label\"\n        class=\"tw-text-[length:inherit]\"\n      >\n        <i slot=\"start\" class=\"bwi bwi-list\" aria-hidden=\"true\"></i>\n        {{ \"viewItemsIn\" | i18n: renderedOptions.label }}\n      </button>\n    </ng-container>\n\n    <button\n      type=\"button\"\n      bitMenuItem\n      *ngFor=\"let option of renderedOptions.children\"\n      (click)=\"option.children?.length ? viewOption(option, $event) : selectOption(option, $event)\"\n      [disabled]=\"option.disabled\"\n      [title]=\"option.label\"\n      class=\"tw-text-[length:inherit]\"\n      [attr.aria-haspopup]=\"option.children?.length ? 'menu' : null\"\n    >\n      <i\n        *ngIf=\"option.icon\"\n        slot=\"start\"\n        class=\"bwi\"\n        [ngClass]=\"option.icon\"\n        aria-hidden=\"true\"\n      ></i>\n      {{ option.label }}\n      <i *ngIf=\"option.children?.length\" slot=\"end\" class=\"bwi bwi-angle-right\"></i>\n    </button>\n  </div>\n</bit-menu>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  AfterViewInit,\n  Component,\n  DestroyRef,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  Input,\n  QueryList,\n  ViewChild,\n  ViewChildren,\n  booleanAttribute,\n  inject,\n  signal,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from \"@angular/forms\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { compareValues } from \"../../../common/src/platform/misc/compare-values\";\nimport { ButtonModule } from \"../button\";\nimport { IconButtonModule } from \"../icon-button\";\nimport { MenuComponent, MenuItemDirective, MenuModule } from \"../menu\";\nimport { Option } from \"../select/option\";\nimport { SharedModule } from \"../shared\";\nimport { TypographyModule } from \"../typography\";\n\n/** An option that will be showed in the overlay menu of `ChipSelectComponent` */\nexport type ChipSelectOption<T> = Option<T> & {\n  /** The options that will be nested under this option */\n  children?: ChipSelectOption<T>[];\n};\n\n@Component({\n  selector: \"bit-chip-select\",\n  templateUrl: \"chip-select.component.html\",\n  standalone: true,\n  imports: [SharedModule, ButtonModule, IconButtonModule, MenuModule, TypographyModule],\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: ChipSelectComponent,\n      multi: true,\n    },\n  ],\n})\nexport class ChipSelectComponent<T = unknown> implements ControlValueAccessor, AfterViewInit {\n  @ViewChild(MenuComponent) menu: MenuComponent;\n  @ViewChildren(MenuItemDirective) menuItems: QueryList<MenuItemDirective>;\n  @ViewChild(\"chipSelectButton\") chipSelectButton: ElementRef<HTMLButtonElement>;\n\n  /** Text to show when there is no selected option */\n  @Input({ required: true }) placeholderText: string;\n\n  /** Icon to show when there is no selected option or the selected option does not have an icon */\n  @Input() placeholderIcon: string;\n\n  private _options: ChipSelectOption<T>[];\n  /** The select options to render */\n  @Input({ required: true })\n  get options(): ChipSelectOption<T>[] {\n    return this._options;\n  }\n  set options(value: ChipSelectOption<T>[]) {\n    this._options = value;\n    this.initializeRootTree(value);\n  }\n\n  /** Disables the entire chip */\n  @Input({ transform: booleanAttribute }) disabled = false;\n\n  /** Chip will stretch to full width of its container */\n  @Input({ transform: booleanAttribute }) fullWidth?: boolean;\n\n  /**\n   * We have `:focus-within` and `:focus-visible` but no `:focus-visible-within`\n   */\n  protected focusVisibleWithin = signal(false);\n  @HostListener(\"focusin\", [\"$event.target\"])\n  onFocusIn(target: HTMLElement) {\n    this.focusVisibleWithin.set(target.matches(\".fvw-target:focus-visible\"));\n  }\n  @HostListener(\"focusout\")\n  onFocusOut() {\n    this.focusVisibleWithin.set(false);\n  }\n\n  @HostBinding(\"class\")\n  get classList() {\n    return [\"tw-inline-block\", this.fullWidth ? \"tw-w-full\" : \"tw-max-w-52\"];\n  }\n\n  private destroyRef = inject(DestroyRef);\n\n  /** Tree constructed from `this.options` */\n  private rootTree: ChipSelectOption<T>;\n\n  /** Options that are currently displayed in the menu */\n  protected renderedOptions: ChipSelectOption<T>;\n\n  /** The option that is currently selected by the user */\n  protected selectedOption: ChipSelectOption<T>;\n\n  /**\n   * The initial calculated width of the menu when it opens, which is used to\n   * keep the width consistent as the user navigates through submenus\n   */\n  protected menuWidth: number | null = null;\n\n  /** The label to show in the chip button */\n  protected get label(): string {\n    return this.selectedOption?.label || this.placeholderText;\n  }\n\n  /** The icon to show in the chip button */\n  protected get icon(): string {\n    return this.selectedOption?.icon || this.placeholderIcon;\n  }\n\n  /**\n   * Set the rendered options based on whether or not an option is already selected, so that the correct\n   * submenu displays.\n   */\n  protected setOrResetRenderedOptions(): void {\n    this.renderedOptions = this.selectedOption\n      ? this.selectedOption.children?.length > 0\n        ? this.selectedOption\n        : this.getParent(this.selectedOption)\n      : this.rootTree;\n  }\n\n  protected handleMenuClosed(): void {\n    this.setOrResetRenderedOptions();\n    // reset menu width so that it can be recalculated upon open\n    this.menuWidth = null;\n  }\n\n  protected selectOption(option: ChipSelectOption<T>, _event: MouseEvent) {\n    this.selectedOption = option;\n    this.onChange(option);\n  }\n\n  protected viewOption(option: ChipSelectOption<T>, event: MouseEvent) {\n    this.renderedOptions = option;\n\n    /** We don't want the menu to close */\n    event.preventDefault();\n    event.stopImmediatePropagation();\n  }\n\n  /** Click handler for the X button */\n  protected clear() {\n    this.renderedOptions = this.rootTree;\n    this.selectedOption = null;\n    this.onChange(null);\n  }\n\n  /**\n   * Find a `ChipSelectOption` by its value\n   * @param tree the root tree to search\n   * @param value the option value to look for\n   * @returns the `ChipSelectOption` associated with the provided value, or null if not found\n   */\n  private findOption(tree: ChipSelectOption<T>, value: T): ChipSelectOption<T> | null {\n    let result = null;\n    if (tree.value !== null && compareValues(tree.value, value)) {\n      return tree;\n    }\n\n    if (Array.isArray(tree.children) && tree.children.length > 0) {\n      tree.children.some((node) => {\n        result = this.findOption(node, value);\n        return result;\n      });\n    }\n    return result;\n  }\n\n  /** Maps child options to their parent, to enable navigating up the tree */\n  private childParentMap = new Map<ChipSelectOption<T>, ChipSelectOption<T>>();\n\n  /** For each descendant in the provided `tree`, update `_parent` to be a refrence to the parent node. This allows us to navigate back in the menu. */\n  private markParents(tree: ChipSelectOption<T>) {\n    tree.children?.forEach((child) => {\n      this.childParentMap.set(child, tree);\n      this.markParents(child);\n    });\n  }\n\n  protected getParent(option: ChipSelectOption<T>): ChipSelectOption<T> | null {\n    return this.childParentMap.get(option);\n  }\n\n  private initializeRootTree(options: ChipSelectOption<T>[]) {\n    /** Since the component is just initialized with an array of options, we need to construct the root tree. */\n    const root: ChipSelectOption<T> = {\n      children: options,\n      value: null,\n    };\n    this.markParents(root);\n    this.rootTree = root;\n    this.renderedOptions = this.rootTree;\n  }\n\n  ngAfterViewInit() {\n    /**\n     * menuItems will change when the user navigates into or out of a submenu. when that happens, we want to\n     * direct their focus to the first item in the new menu\n     */\n    this.menuItems.changes.pipe(takeUntilDestroyed(this.destroyRef)).subscribe(() => {\n      this.menu.keyManager.setFirstItemActive();\n    });\n  }\n\n  /**\n   * Calculate the width of the menu based on whichever is larger, the chip select width or the width of\n   * the initially rendered options\n   */\n  protected setMenuWidth() {\n    const chipWidth = this.chipSelectButton.nativeElement.getBoundingClientRect().width;\n\n    const firstMenuItemWidth =\n      this.menu.menuItems.first.elementRef.nativeElement.getBoundingClientRect().width;\n\n    this.menuWidth = Math.max(chipWidth, firstMenuItemWidth);\n  }\n\n  /** Control Value Accessor */\n\n  private notifyOnChange?: (value: T) => void;\n  private notifyOnTouched?: () => void;\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  writeValue(obj: T): void {\n    this.selectedOption = this.findOption(this.rootTree, obj);\n    this.setOrResetRenderedOptions();\n  }\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnChange(fn: (value: T) => void): void {\n    this.notifyOnChange = fn;\n  }\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnTouched(fn: any): void {\n    this.notifyOnTouched = fn;\n  }\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n  }\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  protected onChange(option: Option<T> | null) {\n    if (!this.notifyOnChange) {\n      return;\n    }\n\n    this.notifyOnChange(option?.value ?? null);\n  }\n\n  /** Implemented as part of NG_VALUE_ACCESSOR */\n  protected onBlur() {\n    if (!this.notifyOnTouched) {\n      return;\n    }\n\n    this.notifyOnTouched();\n  }\n}\n","<div *ngIf=\"canAccessPremium$ | async\" role=\"toolbar\" [ariaLabel]=\"'filters' | i18n\">\n  <form [formGroup]=\"filterForm\" class=\"tw-flex tw-flex-wrap tw-gap-2 tw-mt-2\">\n    <bit-chip-select\n      formControlName=\"sendType\"\n      placeholderIcon=\"bwi-list\"\n      [placeholderText]=\"'type' | i18n\"\n      [options]=\"sendTypes\"\n    >\n    </bit-chip-select>\n  </form>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\nimport { Observable, of, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ChipSelectComponent } from \"@bitwarden/components\";\n\nimport { SendListFiltersService } from \"../services/send-list-filters.service\";\n\n@Component({\n  standalone: true,\n  selector: \"app-send-list-filters\",\n  templateUrl: \"./send-list-filters.component.html\",\n  imports: [CommonModule, JslibModule, ChipSelectComponent, ReactiveFormsModule],\n})\nexport class SendListFiltersComponent implements OnDestroy {\n  protected filterForm = this.sendListFiltersService.filterForm;\n  protected sendTypes = this.sendListFiltersService.sendTypes;\n  protected canAccessPremium$: Observable<boolean>;\n\n  constructor(\n    private sendListFiltersService: SendListFiltersService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    accountService: AccountService,\n  ) {\n    this.canAccessPremium$ = accountService.activeAccount$.pipe(\n      switchMap((account) =>\n        account\n          ? billingAccountProfileStateService.hasPremiumFromAnySource$(account.id)\n          : of(false),\n      ),\n    );\n  }\n\n  ngOnDestroy(): void {\n    this.sendListFiltersService.resetFilterForm();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { SendAccessRequest } from \"@bitwarden/common/tools/send/models/request/send-access.request\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  selector: \"app-send-access-file\",\n  templateUrl: \"send-access-file.component.html\",\n  imports: [SharedModule],\n  standalone: true,\n})\nexport class SendAccessFileComponent {\n  @Input() send: SendAccessView;\n  @Input() decKey: SymmetricCryptoKey;\n  @Input() accessRequest: SendAccessRequest;\n  constructor(\n    private i18nService: I18nService,\n    private toastService: ToastService,\n    private encryptService: EncryptService,\n    private fileDownloadService: FileDownloadService,\n    private sendApiService: SendApiService,\n  ) {}\n\n  protected download = async () => {\n    if (this.send == null || this.decKey == null) {\n      return;\n    }\n\n    const downloadData = await this.sendApiService.getSendFileDownloadData(\n      this.send,\n      this.accessRequest,\n    );\n\n    if (Utils.isNullOrWhitespace(downloadData.url)) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"missingSendFile\"),\n      });\n      return;\n    }\n\n    const response = await fetch(new Request(downloadData.url, { cache: \"no-store\" }));\n    if (response.status !== 200) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n      return;\n    }\n\n    try {\n      const encBuf = await EncArrayBuffer.fromResponse(response);\n      const decBuf = await this.encryptService.decryptToBytes(encBuf, this.decKey);\n      this.fileDownloadService.download({\n        fileName: this.send.file.fileName,\n        blobData: decBuf,\n        downloadMethod: \"save\",\n      });\n    } catch (e) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n    }\n  };\n}\n","<p>{{ send.file.fileName }}</p>\n<button bitButton type=\"button\" buttonType=\"primary\" [bitAction]=\"download\" [block]=\"true\">\n  <i class=\"bwi bwi-download\" aria-hidden=\"true\"></i>\n  {{ \"downloadAttachments\" | i18n }} ({{ send.file.sizeName }})\n</button>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  selector: \"app-send-access-password\",\n  templateUrl: \"send-access-password.component.html\",\n  imports: [SharedModule],\n  standalone: true,\n})\nexport class SendAccessPasswordComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n  protected formGroup = this.formBuilder.group({\n    password: [\"\", [Validators.required]],\n  });\n\n  @Input() loading: boolean;\n  @Output() setPasswordEvent = new EventEmitter<string>();\n\n  constructor(private formBuilder: FormBuilder) {}\n\n  async ngOnInit() {\n    this.formGroup.controls.password.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((val) => {\n        this.setPasswordEvent.emit(val);\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<p bitTypography=\"body1\">{{ \"sendProtectedPassword\" | i18n }}</p>\n<p bitTypography=\"body1\">{{ \"sendProtectedPasswordDontKnow\" | i18n }}</p>\n<div class=\"tw-mb-3\" [formGroup]=\"formGroup\">\n  <bit-form-field>\n    <bit-label>{{ \"password\" | i18n }}</bit-label>\n    <input\n      bitInput\n      type=\"password\"\n      formControlName=\"password\"\n      required\n      appInputVerbatim\n      appAutofocus\n    />\n    <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n  </bit-form-field>\n  <div class=\"tw-flex\">\n    <button\n      bitButton\n      bitFormButton\n      type=\"submit\"\n      buttonType=\"primary\"\n      [loading]=\"loading\"\n      [block]=\"true\"\n    >\n      <span> <i class=\"bwi bwi-sign-in\" aria-hidden=\"true\"></i> {{ \"continue\" | i18n }} </span>\n    </button>\n  </div>\n</div>\n","<bit-callout *ngIf=\"send.text.hidden\" type=\"info\">{{ \"sendHiddenByDefault\" | i18n }}</bit-callout>\n<bit-form-field [formGroup]=\"formGroup\">\n  <textarea id=\"text\" bitInput rows=\"8\" name=\"Text\" formControlName=\"sendText\" readonly></textarea>\n</bit-form-field>\n<div class=\"tw-mb-3\">\n  <button\n    bitButton\n    type=\"button\"\n    buttonType=\"secondary\"\n    [block]=\"true\"\n    (click)=\"toggleText()\"\n    *ngIf=\"send.text.hidden\"\n  >\n    <i\n      class=\"bwi bwi-lg\"\n      aria-hidden=\"true\"\n      [ngClass]=\"{ 'bwi-eye': !showText, 'bwi-eye-slash': showText }\"\n    ></i>\n    {{ \"toggleVisibility\" | i18n }}\n  </button>\n</div>\n<div class=\"tw-mb-3\">\n  <button bitButton type=\"button\" buttonType=\"primary\" [block]=\"true\" (click)=\"copyText()\">\n    <i class=\"bwi bwi-clone\" aria-hidden=\"true\"></i> {{ \"copyValue\" | i18n }}\n  </button>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  selector: \"app-send-access-text\",\n  templateUrl: \"send-access-text.component.html\",\n  imports: [SharedModule],\n  standalone: true,\n})\nexport class SendAccessTextComponent {\n  private _send: SendAccessView = null;\n  protected showText = false;\n\n  protected formGroup = this.formBuilder.group({\n    sendText: [\"\"],\n  });\n\n  constructor(\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private formBuilder: FormBuilder,\n    private toastService: ToastService,\n  ) {}\n\n  get send(): SendAccessView {\n    return this._send;\n  }\n\n  @Input() set send(value: SendAccessView) {\n    this._send = value;\n    this.showText = this.send.text != null ? !this.send.text.hidden : true;\n\n    if (this.send == null || this.send.text == null) {\n      return;\n    }\n\n    this.formGroup.controls.sendText.patchValue(\n      this.showText ? this.send.text.text : this.send.text.maskedText,\n    );\n  }\n\n  protected copyText() {\n    this.platformUtilsService.copyToClipboard(this.send.text.text);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"sendTypeText\")),\n    });\n  }\n\n  protected toggleText() {\n    this.showText = !this.showText;\n    this.formGroup.controls.sendText.patchValue(\n      this.showText ? this.send.text.text : this.send.text.maskedText,\n    );\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"load\">\n  <bit-callout *ngIf=\"hideEmail\" type=\"warning\" title=\"{{ 'warning' | i18n }}\">\n    {{ \"viewSendHiddenEmailWarning\" | i18n }}\n    <a bitLink href=\"https://bitwarden.com/help/receive-send/\" target=\"_blank\" rel=\"noreferrer\">{{\n      \"learnMore\" | i18n\n    }}</a\n    >.\n  </bit-callout>\n  <ng-container *ngIf=\"!loading; else spinner\">\n    <app-send-access-password\n      (setPasswordEvent)=\"setPassword($event)\"\n      *ngIf=\"passwordRequired && !error\"\n    ></app-send-access-password>\n    <bit-no-items [icon]=\"expiredSendIcon\" class=\"tw-text-main\" *ngIf=\"unavailable\">\n      <ng-container slot=\"description\">{{ \"sendAccessUnavailable\" | i18n }}</ng-container>\n    </bit-no-items>\n    <bit-no-items [icon]=\"expiredSendIcon\" class=\"tw-text-main\" *ngIf=\"error\">\n      <ng-container slot=\"description\">{{ \"unexpectedErrorSend\" | i18n }}</ng-container>\n    </bit-no-items>\n    <div *ngIf=\"!passwordRequired && send && !error && !unavailable\">\n      <p class=\"tw-text-center\">\n        <b>{{ send.name }}</b>\n      </p>\n      <hr />\n      <!-- Text -->\n      <ng-container *ngIf=\"send.type === sendType.Text\">\n        <app-send-access-text [send]=\"send\"></app-send-access-text>\n      </ng-container>\n      <!-- File -->\n      <ng-container *ngIf=\"send.type === sendType.File\">\n        <app-send-access-file\n          [send]=\"send\"\n          [decKey]=\"decKey\"\n          [accessRequest]=\"accessRequest\"\n        ></app-send-access-file>\n      </ng-container>\n      <p *ngIf=\"expirationDate\" class=\"tw-text-center tw-text-muted\">\n        Expires: {{ expirationDate | date: \"medium\" }}\n      </p>\n    </div>\n  </ng-container>\n  <ng-template #spinner>\n    <div class=\"tw-text-center\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin bwi-2x tw-text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </div>\n  </ng-template>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { ActivatedRoute } from \"@angular/router\";\n\nimport { AnonLayoutWrapperDataService } from \"@bitwarden/auth/angular\";\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendAccess } from \"@bitwarden/common/tools/send/models/domain/send-access\";\nimport { SendAccessRequest } from \"@bitwarden/common/tools/send/models/request/send-access.request\";\nimport { SendAccessResponse } from \"@bitwarden/common/tools/send/models/response/send-access.response\";\nimport { SendAccessView } from \"@bitwarden/common/tools/send/models/view/send-access.view\";\nimport { SEND_KDF_ITERATIONS } from \"@bitwarden/common/tools/send/send-kdf\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { NoItemsModule, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\nimport { ExpiredSendIcon } from \"@bitwarden/send-ui\";\n\nimport { SharedModule } from \"../../shared\";\n\nimport { SendAccessFileComponent } from \"./send-access-file.component\";\nimport { SendAccessPasswordComponent } from \"./send-access-password.component\";\nimport { SendAccessTextComponent } from \"./send-access-text.component\";\n\n@Component({\n  selector: \"app-send-access\",\n  templateUrl: \"access.component.html\",\n  standalone: true,\n  imports: [\n    SendAccessFileComponent,\n    SendAccessTextComponent,\n    SendAccessPasswordComponent,\n    SharedModule,\n    NoItemsModule,\n  ],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class AccessComponent implements OnInit {\n  protected send: SendAccessView;\n  protected sendType = SendType;\n  protected loading = true;\n  protected passwordRequired = false;\n  protected formPromise: Promise<SendAccessResponse>;\n  protected password: string;\n  protected unavailable = false;\n  protected error = false;\n  protected hideEmail = false;\n  protected decKey: SymmetricCryptoKey;\n  protected accessRequest: SendAccessRequest;\n  protected expiredSendIcon = ExpiredSendIcon;\n\n  protected formGroup = this.formBuilder.group({});\n\n  // TODO: remove when email verification flag is removed\n  registerRoute$ = this.registerRouteService.registerRoute$();\n\n  private id: string;\n  private key: string;\n\n  constructor(\n    private cryptoFunctionService: CryptoFunctionService,\n    private route: ActivatedRoute,\n    private keyService: KeyService,\n    private sendApiService: SendApiService,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n    private configService: ConfigService,\n    private registerRouteService: RegisterRouteService,\n    private layoutWrapperDataService: AnonLayoutWrapperDataService,\n    protected formBuilder: FormBuilder,\n  ) {}\n\n  protected get expirationDate() {\n    if (this.send == null || this.send.expirationDate == null) {\n      return null;\n    }\n    return this.send.expirationDate;\n  }\n\n  protected get creatorIdentifier() {\n    if (this.send == null || this.send.creatorIdentifier == null) {\n      return null;\n    }\n    return this.send.creatorIdentifier;\n  }\n\n  async ngOnInit() {\n    // eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe\n    this.route.params.subscribe(async (params) => {\n      this.id = params.sendId;\n      this.key = params.key;\n      if (this.key == null || this.id == null) {\n        return;\n      }\n      await this.load();\n    });\n  }\n\n  protected load = async () => {\n    this.unavailable = false;\n    this.error = false;\n    this.hideEmail = false;\n    try {\n      const keyArray = Utils.fromUrlB64ToArray(this.key);\n      this.accessRequest = new SendAccessRequest();\n      if (this.password != null) {\n        const passwordHash = await this.cryptoFunctionService.pbkdf2(\n          this.password,\n          keyArray,\n          \"sha256\",\n          SEND_KDF_ITERATIONS,\n        );\n        this.accessRequest.password = Utils.fromBufferToB64(passwordHash);\n      }\n      let sendResponse: SendAccessResponse = null;\n      if (this.loading) {\n        sendResponse = await this.sendApiService.postSendAccess(this.id, this.accessRequest);\n      } else {\n        this.formPromise = this.sendApiService.postSendAccess(this.id, this.accessRequest);\n        sendResponse = await this.formPromise;\n      }\n      this.passwordRequired = false;\n      const sendAccess = new SendAccess(sendResponse);\n      this.decKey = await this.keyService.makeSendKey(keyArray);\n      this.send = await sendAccess.decrypt(this.decKey);\n    } catch (e) {\n      if (e instanceof ErrorResponse) {\n        if (e.statusCode === 401) {\n          this.passwordRequired = true;\n        } else if (e.statusCode === 404) {\n          this.unavailable = true;\n        } else if (e.statusCode === 400) {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"errorOccurred\"),\n            message: e.message,\n          });\n        } else {\n          this.error = true;\n        }\n      } else {\n        this.error = true;\n      }\n    }\n    this.loading = false;\n    this.hideEmail =\n      this.creatorIdentifier == null &&\n      !this.passwordRequired &&\n      !this.loading &&\n      !this.unavailable;\n\n    if (this.creatorIdentifier != null) {\n      this.layoutWrapperDataService.setAnonLayoutWrapperData({\n        pageSubtitle: {\n          key: \"sendAccessCreatorIdentifier\",\n          placeholders: [this.creatorIdentifier],\n        },\n      });\n    }\n  };\n\n  protected setPassword(password: string) {\n    this.password = password;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SearchModule } from \"@bitwarden/components\";\n\nimport { VaultFilterSharedModule } from \"../../individual-vault/vault-filter/shared/vault-filter-shared.module\";\n\nimport { LinkSsoDirective } from \"./components/link-sso.directive\";\nimport { OrganizationOptionsComponent } from \"./components/organization-options.component\";\nimport { VaultFilterComponent } from \"./components/vault-filter.component\";\nimport { VaultFilterService as VaultFilterServiceAbstraction } from \"./services/abstractions/vault-filter.service\";\nimport { VaultFilterService } from \"./services/vault-filter.service\";\n\n@NgModule({\n  imports: [VaultFilterSharedModule, SearchModule],\n  declarations: [VaultFilterComponent, OrganizationOptionsComponent, LinkSsoDirective],\n  exports: [VaultFilterComponent],\n  providers: [\n    {\n      provide: VaultFilterServiceAbstraction,\n      useClass: VaultFilterService,\n    },\n  ],\n})\nexport class VaultFilterModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { AuthModule } from \"./auth\";\nimport { LoginModule } from \"./auth/login/login.module\";\nimport { TrialInitiationModule } from \"./auth/trial-initiation/trial-initiation.module\";\nimport { LooseComponentsModule, SharedModule } from \"./shared\";\nimport { AccessComponent } from \"./tools/send/access.component\";\nimport { OrganizationBadgeModule } from \"./vault/individual-vault/organization-badge/organization-badge.module\";\nimport { VaultFilterModule } from \"./vault/individual-vault/vault-filter/vault-filter.module\";\n\n@NgModule({\n  imports: [\n    SharedModule,\n    LooseComponentsModule,\n    TrialInitiationModule,\n    VaultFilterModule,\n    OrganizationBadgeModule,\n    LoginModule,\n    AuthModule,\n    AccessComponent,\n  ],\n  exports: [\n    SharedModule,\n    LooseComponentsModule,\n    TrialInitiationModule,\n    VaultFilterModule,\n    OrganizationBadgeModule,\n    LoginModule,\n    AccessComponent,\n  ],\n  bootstrap: [],\n})\nexport class OssModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Guid } from \"@bitwarden/common/src/types/guid\";\n\nexport class RequestSMAccessRequest {\n  OrganizationId: Guid;\n  EmailContent: string;\n}\n","import { Injectable } from \"@angular/core\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\n\nimport { RequestSMAccessRequest } from \"../models/requests/request-sm-access.request\";\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class SmLandingApiService {\n  constructor(private apiService: ApiService) {}\n\n  async requestSMAccessFromAdmins(request: RequestSMAccessRequest): Promise<void> {\n    await this.apiService.send(\"POST\", \"/request-access/request-sm-access\", request, true, false);\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <form [formGroup]=\"requestAccessForm\" [bitSubmit]=\"submit\">\n    <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n      <div class=\"tw-col-span-9\">\n        <p bitTypography=\"body1\">{{ \"youNeedApprovalFromYourAdminToTrySecretsManager\" | i18n }}</p>\n        <bit-form-field>\n          <bit-label>{{ \"addANote\" | i18n }}</bit-label>\n          <textarea\n            rows=\"20\"\n            id=\"request_access_textarea\"\n            bitInput\n            formControlName=\"requestAccessEmailContents\"\n          ></textarea>\n        </bit-form-field>\n        <bit-form-field>\n          <bit-label>{{ \"organization\" | i18n }}</bit-label>\n          <bit-select formControlName=\"selectedOrganization\">\n            <bit-option\n              *ngFor=\"let org of organizations\"\n              [value]=\"org\"\n              [label]=\"org.name\"\n              required\n            ></bit-option>\n          </bit-select>\n        </bit-form-field>\n        <div class=\"tw-flex tw-gap-x-4 tw-mt-4\">\n          <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n            {{ \"sendRequest\" | i18n }}\n          </button>\n          <button type=\"button\" bitButton buttonType=\"secondary\" [routerLink]=\"'/sm-landing'\">\n            {{ \"cancel\" | i18n }}\n          </button>\n        </div>\n      </div>\n    </div>\n  </form>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Guid } from \"@bitwarden/common/types/guid\";\nimport { NoItemsModule, SearchModule, ToastService } from \"@bitwarden/components\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { OssModule } from \"../../oss.module\";\nimport { SharedModule } from \"../../shared/shared.module\";\nimport { RequestSMAccessRequest } from \"../models/requests/request-sm-access.request\";\n\nimport { SmLandingApiService } from \"./sm-landing-api.service\";\n\n@Component({\n  selector: \"app-request-sm-access\",\n  standalone: true,\n  templateUrl: \"request-sm-access.component.html\",\n  imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule, OssModule],\n})\nexport class RequestSMAccessComponent implements OnInit {\n  requestAccessForm = new FormGroup({\n    requestAccessEmailContents: new FormControl(\n      this.i18nService.t(\"requestAccessSMDefaultEmailContent\"),\n      [Validators.required],\n    ),\n    selectedOrganization: new FormControl<Organization>(null, [Validators.required]),\n  });\n  organizations: Organization[] = [];\n\n  constructor(\n    private router: Router,\n    private i18nService: I18nService,\n    private organizationService: OrganizationService,\n    private smLandingApiService: SmLandingApiService,\n    private toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.organizations = (await this.organizationService.getAll())\n      .filter((e) => e.enabled)\n      .sort((a, b) => a.name.localeCompare(b.name));\n\n    if (this.organizations === null || this.organizations.length < 1) {\n      await this.navigateToCreateOrganizationPage();\n    }\n  }\n\n  submit = async () => {\n    this.requestAccessForm.markAllAsTouched();\n    if (this.requestAccessForm.invalid) {\n      return;\n    }\n\n    const formValue = this.requestAccessForm.value;\n    const request = new RequestSMAccessRequest();\n    request.OrganizationId = formValue.selectedOrganization.id as Guid;\n    request.EmailContent = formValue.requestAccessEmailContents;\n\n    await this.smLandingApiService.requestSMAccessFromAdmins(request);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"smAccessRequestEmailSent\"),\n    });\n    await this.router.navigate([\"/\"]);\n  };\n\n  async navigateToCreateOrganizationPage() {\n    await this.router.navigate([\"/create-organization\"]);\n  }\n}\n","<app-header></app-header>\n\n<div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n  <div class=\"tw-col-span-6\">\n    <img [src]=\"imageSrc\" class=\"tw-max-w-full\" alt=\"Bitwarden\" aria-hidden=\"true\" />\n  </div>\n  <div class=\"tw-col-span-6 tw-mx-4\">\n    <h1 bitTypography=\"h1\">{{ \"bitwardenSecretsManager\" | i18n }}</h1>\n    <bit-container *ngIf=\"this.showSecretsManagerInformation\">\n      <p bitTypography=\"body1\">\n        {{ \"developmentDevOpsAndITTeamsChooseBWSecret\" | i18n }}\n      </p>\n      <ul class=\"tw-list-outside\">\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          <b>{{ \"centralizeSecretsManagement\" | i18n }}</b>\n          {{ \"centralizeSecretsManagementDescription\" | i18n }}\n        </li>\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          <b>{{ \"preventSecretLeaks\" | i18n }}</b> {{ \"preventSecretLeaksDescription\" | i18n }}\n        </li>\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          <b>{{ \"enhanceDeveloperProductivity\" | i18n }}</b>\n          {{ \"enhanceDeveloperProductivityDescription\" | i18n }}\n        </li>\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          <b>{{ \"strengthenBusinessSecurity\" | i18n }}</b>\n          {{ \"strengthenBusinessSecurityDescription\" | i18n }}\n        </li>\n      </ul>\n    </bit-container>\n    <bit-container *ngIf=\"this.showGiveMembersAccessInstructions\">\n      <p bitTypography=\"body1\">\n        {{ \"giveMembersAccess\" | i18n }}\n      </p>\n      <ul class=\"tw-list-outside\">\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          {{ \"openYourOrganizations\" | i18n }} <b>{{ \"members\" | i18n }}</b>\n          {{ \"viewAndSelectTheMembers\" | i18n }}\n        </li>\n        <li bitTypography=\"body1\" class=\"tw-mb-2\">\n          {{ \"usingTheMenuSelect\" | i18n }} <b>{{ \"activateSecretsManager\" | i18n }}</b>\n          {{ \"toGrantAccessToSelectedMembers\" | i18n }}\n        </li>\n      </ul>\n    </bit-container>\n    <button type=\"button\" bitButton buttonType=\"primary\" [routerLink]=\"tryItNowUrl\">\n      {{ \"tryItNow\" | i18n }}\n    </button>\n    <a bitLink linkType=\"primary\" [href]=\"learnMoreUrl\" target=\"_blank\" class=\"tw-m-5\">\n      {{ \"learnMore\" | i18n }}\n    </a>\n  </div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\n\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { NoItemsModule, SearchModule } from \"@bitwarden/components\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared/shared.module\";\n\n@Component({\n  selector: \"app-sm-landing\",\n  standalone: true,\n  imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule],\n  templateUrl: \"sm-landing.component.html\",\n})\nexport class SMLandingComponent implements OnInit {\n  tryItNowUrl: string;\n  learnMoreUrl: string = \"https://bitwarden.com/help/secrets-manager-overview/\";\n  imageSrc: string = \"../images/sm.webp\";\n  showSecretsManagerInformation: boolean = true;\n  showGiveMembersAccessInstructions: boolean = false;\n\n  constructor(private organizationService: OrganizationService) {}\n\n  async ngOnInit() {\n    const enabledOrganizations = (await this.organizationService.getAll()).filter((e) => e.enabled);\n\n    if (enabledOrganizations.length > 0) {\n      this.handleEnabledOrganizations(enabledOrganizations);\n    } else {\n      // Person is not part of any orgs they need to be in an organization in order to use SM\n      this.tryItNowUrl = \"/create-organization\";\n    }\n  }\n\n  private handleEnabledOrganizations(enabledOrganizations: Organization[]) {\n    // People get to this page because SM (Secrets Manager) isn't enabled for them (or the Organization they are a part of)\n    // 1 - SM is enabled for the Organization but not that user\n    //1a - person is Admin+ (Admin or higher) and just needs instructions on how to enable it for themselves\n    //1b - person is beneath admin status and needs to request SM access from Administrators/Owners\n    // 2 - SM is not enabled for the organization yet\n    //2a - person is Owner/Provider - Direct them to the subscription/billing page\n    //2b - person is Admin - Direct them to request access page where an email is sent to owner/admins\n    //2c - person is user - Direct them to request access page where an email is sent to owner/admins\n\n    // We use useSecretsManager because we want to get the first org the person is a part of where SM is enabled but they don't have access enabled yet\n    const adminPlusNeedsInstructionsToEnableSM = enabledOrganizations.find(\n      (o) => o.isAdmin && o.useSecretsManager,\n    );\n    const ownerNeedsToEnableSM = enabledOrganizations.find(\n      (o) => o.isOwner && !o.useSecretsManager,\n    );\n\n    // 1a If Organization has SM Enabled, but this logged in person does not have it enabled, but they are admin+ then give them instructions to enable.\n    if (adminPlusNeedsInstructionsToEnableSM != undefined) {\n      this.showHowToEnableSMForMembers(adminPlusNeedsInstructionsToEnableSM.id);\n    }\n    // 2a Owners can enable SM in the subscription area of Admin Console.\n    else if (ownerNeedsToEnableSM != undefined) {\n      this.tryItNowUrl = `/organizations/${ownerNeedsToEnableSM.id}/billing/subscription`;\n    }\n    // 1b and 2b 2c, they must be lower than an Owner, and they need access, or want their org to have access to SM.\n    else {\n      this.tryItNowUrl = \"/request-sm-access\";\n    }\n  }\n\n  private showHowToEnableSMForMembers(orgId: string) {\n    this.showGiveMembersAccessInstructions = true;\n    this.showSecretsManagerInformation = false;\n    this.learnMoreUrl =\n      \"https://bitwarden.com/help/secrets-manager-quick-start/#give-members-access\";\n    this.imageSrc = \"../images/sm-give-access.png\";\n    this.tryItNowUrl = `/organizations/${orgId}/members`;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class UpdateDomainsRequest {\n  equivalentDomains: string[][];\n  excludedGlobalEquivalentDomains: number[];\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p bitTypography=\"body1\">{{ \"domainRulesDesc\" | i18n }}</p>\n  <form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n    <h2 bitTypography=\"h2\">{{ \"customEqDomains\" | i18n }}</h2>\n    <p bitTypography=\"body1\" *ngIf=\"loading\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </p>\n    <ng-container formArrayName=\"customDomain\" *ngIf=\"!loading\">\n      <div\n        class=\"tw-flex tw-items-center tw-gap-2 tw-mb-6\"\n        *ngFor=\"let d of custom; let i = index; trackBy: indexTrackBy\"\n      >\n        <bit-form-field class=\"tw-flex-1 !tw-mb-0\" formGroupName=\"{{ i }}\">\n          <bit-label>{{ \"customDomainX\" | i18n: i + 1 }} </bit-label>\n          <textarea\n            rows=\"2\"\n            bitInput\n            [value]=\"d\"\n            formControlName=\"domain\"\n            placeholder=\"{{ 'ex' | i18n }} google.com, gmail.com\"\n          ></textarea>\n        </bit-form-field>\n        <button\n          bitIconButton=\"bwi-minus-circle\"\n          type=\"button\"\n          buttonType=\"danger\"\n          (click)=\"remove(i)\"\n          appA11yTitle=\"{{ 'remove' | i18n }}\"\n        ></button>\n      </div>\n      <button bitButton type=\"button\" (click)=\"add()\" buttonType=\"secondary\" class=\"tw-mb-2\">\n        <i class=\"bwi bwi-plus bwi-fw\" aria-hidden=\"true\"></i> {{ \"newCustomDomain\" | i18n }}\n      </button>\n      <small class=\"tw-text-muted tw-block tw-mb-3\">{{ \"newCustomDomainDesc\" | i18n }}</small>\n    </ng-container>\n    <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n      {{ \"save\" | i18n }}\n    </button>\n    <h2 bitTypography=\"h2\" class=\"spaced-header\">{{ \"globalEqDomains\" | i18n }}</h2>\n    <p bitTypography=\"body1\" *ngIf=\"loading\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin tw-text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </p>\n    <bit-table *ngIf=\"!loading && global.length > 0\">\n      <ng-template body>\n        <tr bitRow *ngFor=\"let d of global\">\n          <td bitCell [ngClass]=\"{ 'table-list-strike': d.excluded }\">{{ d.domains }}</td>\n          <td bitCell>\n            <button\n              type=\"button\"\n              bitIconButton=\"bwi-cog\"\n              buttonType=\"secondary\"\n              [bitMenuTriggerFor]=\"appListDropdown\"\n              class=\"tw-border-0 tw-bg-transparent tw-p-0\"\n            ></button>\n            <bit-menu #appListDropdown>\n              <a href=\"#\" bitMenuItem appStopClick (click)=\"toggleExcluded(d)\" *ngIf=\"!d.excluded\">\n                <i class=\"bwi bwi-fw bwi-close\" aria-hidden=\"true\"></i>\n                {{ \"exclude\" | i18n }}\n              </a>\n              <a href=\"#\" bitMenuItem appStopClick (click)=\"toggleExcluded(d)\" *ngIf=\"d.excluded\">\n                <i class=\"bwi bwi-fw bwi-plus\" aria-hidden=\"true\"></i>\n                {{ \"include\" | i18n }}\n              </a>\n              <a href=\"#\" bitMenuItem appStopClick (click)=\"customize(d)\">\n                <i class=\"bwi bwi-fw bwi-cut\" aria-hidden=\"true\"></i>\n                {{ \"customize\" | i18n }}\n              </a>\n            </bit-menu>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n    <button type=\"submit\" bitButton buttonType=\"primary\">\n      {{ \"save\" | i18n }}\n    </button>\n  </form>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormArray, FormBuilder, FormControl, FormGroup } from \"@angular/forms\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { UpdateDomainsRequest } from \"@bitwarden/common/models/request/update-domains.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Component({\n  selector: \"app-domain-rules\",\n  templateUrl: \"domain-rules.component.html\",\n})\nexport class DomainRulesComponent implements OnInit {\n  loading = true;\n  custom: string[] = [];\n  global: any[] = [];\n  formPromise: Promise<any>;\n  formGroup: FormGroup<{ customDomain: FormArray<FormControl<any>> }> = this.formBuilder.group({\n    customDomain: this.formBuilder.array([]),\n  });\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private logService: LogService,\n    private formBuilder: FormBuilder,\n  ) {}\n\n  async ngOnInit() {\n    const response = await this.apiService.getSettingsDomains();\n    this.loading = false;\n    if (response.equivalentDomains != null) {\n      this.custom = response.equivalentDomains.map((d) => d.join(\", \"));\n    }\n    if (response.globalEquivalentDomains != null) {\n      this.global = response.globalEquivalentDomains.map((d) => {\n        return {\n          domains: d.domains.join(\", \"),\n          excluded: d.excluded,\n          key: d.type,\n        };\n      });\n    }\n    this.patch();\n  }\n  patch() {\n    const control = <FormArray>this.formGroup.get(\"customDomain\");\n    control.clear();\n    this.custom.forEach((val, index) => {\n      control.insert(index, this.patchValues(val));\n    });\n    this.formGroup.updateValueAndValidity();\n  }\n  patchValues(customDomain: string) {\n    return this.formBuilder.group({\n      domain: [customDomain],\n    });\n  }\n  toggleExcluded(globalDomain: any) {\n    globalDomain.excluded = !globalDomain.excluded;\n  }\n\n  customize(globalDomain: any) {\n    globalDomain.excluded = true;\n    this.custom.push(globalDomain.domains);\n    this.patch();\n  }\n\n  remove(index: number) {\n    this.custom.splice(index, 1);\n    this.patch();\n  }\n\n  add() {\n    this.custom.push(\"\");\n    this.patch();\n  }\n\n  submit = async () => {\n    const customDomainValues = this.formGroup.get(\"customDomain\").value;\n    this.custom = customDomainValues.map((d) => d.domain);\n    const request = new UpdateDomainsRequest();\n    request.excludedGlobalEquivalentDomains = this.global\n      .filter((d) => d.excluded)\n      .map((d) => d.key);\n    if (request.excludedGlobalEquivalentDomains.length === 0) {\n      request.excludedGlobalEquivalentDomains = null;\n    }\n    request.equivalentDomains = this.custom\n      .filter((d) => d != null && d.trim() !== \"\")\n      .map((d) => d.split(\",\").map((d2) => d2.trim()));\n    if (request.equivalentDomains.length === 0) {\n      request.equivalentDomains = null;\n    }\n\n    await this.apiService.putSettingsDomains(request);\n    this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"domainsUpdated\"));\n  };\n\n  indexTrackBy(index: number, obj: any): any {\n    return index;\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <p bitTypography=\"body1\">{{ \"preferencesDesc\" | i18n }}</p>\n  <form [formGroup]=\"form\" [bitSubmit]=\"submit\" class=\"tw-w-1/2\">\n    <bit-callout type=\"info\" *ngIf=\"vaultTimeoutPolicyCallout | async as policy\">\n      <span *ngIf=\"policy.timeout && policy.action\">\n        {{\n          \"vaultTimeoutPolicyWithActionInEffect\"\n            | i18n: policy.timeout.hours : policy.timeout.minutes : (policy.action | i18n)\n        }}\n      </span>\n      <span *ngIf=\"policy.timeout && !policy.action\">\n        {{ \"vaultTimeoutPolicyInEffect\" | i18n: policy.timeout.hours : policy.timeout.minutes }}\n      </span>\n      <span *ngIf=\"!policy.timeout && policy.action\">\n        {{ \"vaultTimeoutActionPolicyInEffect\" | i18n: (policy.action | i18n) }}\n      </span>\n    </bit-callout>\n    <auth-vault-timeout-input\n      [vaultTimeoutOptions]=\"vaultTimeoutOptions\"\n      [formControl]=\"form.controls.vaultTimeout\"\n      ngDefaultControl\n    >\n    </auth-vault-timeout-input>\n    <ng-container *ngIf=\"availableVaultTimeoutActions$ | async as availableVaultTimeoutActions\">\n      <bit-radio-group\n        formControlName=\"vaultTimeoutAction\"\n        *ngIf=\"availableVaultTimeoutActions.length > 1\"\n      >\n        <bit-label>{{ \"vaultTimeoutAction\" | i18n }}</bit-label>\n        <bit-radio-button\n          *ngIf=\"availableVaultTimeoutActions.includes(VaultTimeoutAction.Lock)\"\n          id=\"vaultTimeoutActionLock\"\n          [value]=\"VaultTimeoutAction.Lock\"\n        >\n          <bit-label>{{ \"lock\" | i18n }}</bit-label>\n          <bit-hint>{{ \"vaultTimeoutActionLockDesc\" | i18n }}</bit-hint>\n        </bit-radio-button>\n        <bit-radio-button\n          *ngIf=\"availableVaultTimeoutActions.includes(VaultTimeoutAction.LogOut)\"\n          id=\"vaultTimeoutActionLogOut\"\n          [value]=\"VaultTimeoutAction.LogOut\"\n        >\n          <bit-label>{{ \"logOut\" | i18n }}</bit-label>\n          <bit-hint>{{ \"vaultTimeoutActionLogOutDesc\" | i18n }}</bit-hint>\n        </bit-radio-button>\n      </bit-radio-group>\n    </ng-container>\n    <bit-form-field>\n      <bit-label\n        >{{ \"language\" | i18n }}\n        <a\n          bitLink\n          class=\"tw-float-right\"\n          href=\"https://bitwarden.com/help/localization/\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          appA11yTitle=\"{{ 'learnMoreAboutLocalization' | i18n }}\"\n          slot=\"end\"\n        >\n          <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n        </a>\n      </bit-label>\n      <bit-select formControlName=\"locale\" id=\"locale\">\n        <bit-option *ngFor=\"let o of localeOptions\" [value]=\"o.value\" [label]=\"o.name\"></bit-option>\n      </bit-select>\n      <bit-hint>{{ \"languageDesc\" | i18n }}</bit-hint>\n    </bit-form-field>\n    <bit-form-control>\n      <input type=\"checkbox\" bitCheckbox formControlName=\"enableFavicons\" />\n      <bit-label\n        >{{ \"enableFavicon\" | i18n }}\n        <a\n          bitLink\n          href=\"https://bitwarden.com/help/website-icons/\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          appA11yTitle=\"{{ 'learnMoreAboutWebsiteIcons' | i18n }}\"\n          slot=\"end\"\n        >\n          <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n        </a>\n      </bit-label>\n      <bit-hint>{{ \"faviconDesc\" | i18n }}</bit-hint>\n    </bit-form-control>\n    <bit-form-field>\n      <bit-label>{{ \"theme\" | i18n }}</bit-label>\n      <bit-select formControlName=\"theme\" id=\"theme\">\n        <bit-option *ngFor=\"let o of themeOptions\" [value]=\"o.value\" [label]=\"o.name\"></bit-option>\n      </bit-select>\n      <bit-hint>{{ \"themeDesc\" | i18n }}</bit-hint>\n    </bit-form-field>\n    <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">{{ \"save\" | i18n }}</button>\n  </form>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { concatMap, filter, firstValueFrom, map, Observable, Subject, takeUntil, tap } from \"rxjs\";\n\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DomainSettingsService } from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ThemeType } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { ThemeStateService } from \"@bitwarden/common/platform/theming/theme-state.service\";\nimport {\n  VaultTimeout,\n  VaultTimeoutOption,\n  VaultTimeoutStringType,\n} from \"@bitwarden/common/types/vault-timeout.type\";\nimport { DialogService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-preferences\",\n  templateUrl: \"preferences.component.html\",\n})\nexport class PreferencesComponent implements OnInit, OnDestroy {\n  // For use in template\n  protected readonly VaultTimeoutAction = VaultTimeoutAction;\n\n  protected availableVaultTimeoutActions$: Observable<VaultTimeoutAction[]>;\n\n  vaultTimeoutPolicyCallout: Observable<{\n    timeout: { hours: number; minutes: number };\n    action: VaultTimeoutAction;\n  }>;\n  vaultTimeoutOptions: VaultTimeoutOption[];\n  localeOptions: any[];\n  themeOptions: any[];\n\n  private startingLocale: string;\n  private destroy$ = new Subject<void>();\n\n  form = this.formBuilder.group({\n    vaultTimeout: [null as VaultTimeout | null],\n    vaultTimeoutAction: [VaultTimeoutAction.Lock],\n    enableFavicons: true,\n    theme: [ThemeType.Light],\n    locale: [null as string | null],\n  });\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private policyService: PolicyService,\n    private i18nService: I18nService,\n    private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    private platformUtilsService: PlatformUtilsService,\n    private themeStateService: ThemeStateService,\n    private domainSettingsService: DomainSettingsService,\n    private dialogService: DialogService,\n    private accountService: AccountService,\n  ) {\n    this.vaultTimeoutOptions = [\n      { name: i18nService.t(\"oneMinute\"), value: 1 },\n      { name: i18nService.t(\"fiveMinutes\"), value: 5 },\n      { name: i18nService.t(\"fifteenMinutes\"), value: 15 },\n      { name: i18nService.t(\"thirtyMinutes\"), value: 30 },\n      { name: i18nService.t(\"oneHour\"), value: 60 },\n      { name: i18nService.t(\"fourHours\"), value: 240 },\n      { name: i18nService.t(\"onRefresh\"), value: VaultTimeoutStringType.OnRestart },\n    ];\n    if (this.platformUtilsService.isDev()) {\n      this.vaultTimeoutOptions.push({\n        name: i18nService.t(\"never\"),\n        value: VaultTimeoutStringType.Never,\n      });\n    }\n\n    const localeOptions: any[] = [];\n    i18nService.supportedTranslationLocales.forEach((locale) => {\n      let name = locale;\n      if (i18nService.localeNames.has(locale)) {\n        name += \" - \" + i18nService.localeNames.get(locale);\n      }\n      localeOptions.push({ name: name, value: locale });\n    });\n    localeOptions.sort(Utils.getSortFunction(i18nService, \"name\"));\n    localeOptions.splice(0, 0, { name: i18nService.t(\"default\"), value: null });\n    this.localeOptions = localeOptions;\n    this.themeOptions = [\n      { name: i18nService.t(\"themeLight\"), value: ThemeType.Light },\n      { name: i18nService.t(\"themeDark\"), value: ThemeType.Dark },\n      { name: i18nService.t(\"themeSystem\"), value: ThemeType.System },\n    ];\n  }\n\n  async ngOnInit() {\n    this.availableVaultTimeoutActions$ =\n      this.vaultTimeoutSettingsService.availableVaultTimeoutActions$();\n\n    this.vaultTimeoutPolicyCallout = this.policyService.get$(PolicyType.MaximumVaultTimeout).pipe(\n      filter((policy) => policy != null),\n      map((policy) => {\n        let timeout;\n        if (policy.data?.minutes) {\n          timeout = {\n            hours: Math.floor(policy.data?.minutes / 60),\n            minutes: policy.data?.minutes % 60,\n          };\n        }\n        return { timeout: timeout, action: policy.data?.action };\n      }),\n      tap((policy) => {\n        if (policy.action) {\n          this.form.controls.vaultTimeoutAction.disable({ emitEvent: false });\n        } else {\n          this.form.controls.vaultTimeoutAction.enable({ emitEvent: false });\n        }\n      }),\n    );\n\n    this.form.controls.vaultTimeoutAction.valueChanges\n      .pipe(\n        concatMap(async (action) => {\n          if (action === VaultTimeoutAction.LogOut) {\n            const confirmed = await this.dialogService.openSimpleDialog({\n              title: { key: \"vaultTimeoutLogOutConfirmationTitle\" },\n              content: { key: \"vaultTimeoutLogOutConfirmation\" },\n              type: \"warning\",\n            });\n\n            if (!confirmed) {\n              this.form.controls.vaultTimeoutAction.patchValue(VaultTimeoutAction.Lock, {\n                emitEvent: false,\n              });\n              return;\n            }\n          }\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n\n    const activeAcct = await firstValueFrom(this.accountService.activeAccount$);\n\n    const initialFormValues = {\n      vaultTimeout: await firstValueFrom(\n        this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(activeAcct.id),\n      ),\n      vaultTimeoutAction: await firstValueFrom(\n        this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(activeAcct.id),\n      ),\n      enableFavicons: await firstValueFrom(this.domainSettingsService.showFavicons$),\n      theme: await firstValueFrom(this.themeStateService.selectedTheme$),\n      locale: (await firstValueFrom(this.i18nService.userSetLocale$)) ?? null,\n    };\n    this.startingLocale = initialFormValues.locale;\n    this.form.setValue(initialFormValues, { emitEvent: false });\n  }\n\n  submit = async () => {\n    if (!this.form.controls.vaultTimeout.valid) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        null,\n        this.i18nService.t(\"vaultTimeoutRangeError\"),\n      );\n      return;\n    }\n\n    // must get raw value b/c the vault timeout action is disabled when a policy is applied\n    // which removes the timeout action property and value from the normal form.value.\n    const values = this.form.getRawValue();\n\n    const activeAcct = await firstValueFrom(this.accountService.activeAccount$);\n\n    await this.vaultTimeoutSettingsService.setVaultTimeoutOptions(\n      activeAcct.id,\n      values.vaultTimeout,\n      values.vaultTimeoutAction,\n    );\n    await this.domainSettingsService.setShowFavicons(values.enableFavicons);\n    await this.themeStateService.setSelectedTheme(values.theme);\n    await this.i18nService.setLocale(values.locale);\n    if (values.locale !== this.startingLocale) {\n      window.location.reload();\n    } else {\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(\"preferencesUpdated\"),\n      );\n    }\n  };\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<!-- FIXME: root$ should be powered using a reactive form -->\n<bit-toggle-group\n  fullWidth\n  class=\"tw-mb-4\"\n  [selected]=\"(root$ | async).nav\"\n  (selectedChange)=\"onRootChanged({ nav: $event })\"\n  attr.aria-label=\"{{ 'type' | i18n }}\"\n>\n  <bit-toggle *ngFor=\"let option of rootOptions$ | async\" [value]=\"option.value\">\n    {{ option.label }}\n  </bit-toggle>\n</bit-toggle-group>\n\n<bit-card class=\"tw-flex tw-justify-between tw-mb-4\">\n  <div class=\"tw-grow tw-flex tw-items-center\">\n    <bit-color-password class=\"tw-font-mono\" [password]=\"value$ | async\"></bit-color-password>\n  </div>\n  <div class=\"tw-flex tw-items-center tw-space-x-1\">\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-generate\"\n      buttonType=\"main\"\n      (click)=\"generate('user request')\"\n      [appA11yTitle]=\"credentialTypeGenerateLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    >\n      {{ credentialTypeGenerateLabel$ | async }}\n    </button>\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-clone\"\n      buttonType=\"main\"\n      showToast\n      [appA11yTitle]=\"credentialTypeCopyLabel$ | async\"\n      [appCopyClick]=\"value$ | async\"\n      [valueLabel]=\"credentialTypeLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    ></button>\n  </div>\n</bit-card>\n<tools-password-settings\n  class=\"tw-mt-6\"\n  *ngIf=\"(showAlgorithm$ | async)?.id === 'password'\"\n  [userId]=\"userId$ | async\"\n  (onUpdated)=\"generate('password settings')\"\n/>\n<tools-passphrase-settings\n  class=\"tw-mt-6\"\n  *ngIf=\"(showAlgorithm$ | async)?.id === 'passphrase'\"\n  [userId]=\"userId$ | async\"\n  (onUpdated)=\"generate('passphrase settings')\"\n/>\n<bit-section *ngIf=\"(category$ | async) !== 'password'\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"options\" | i18n }}</h2>\n  </bit-section-header>\n  <div class=\"tw-mb-4\">\n    <bit-card>\n      <form [formGroup]=\"username\" class=\"box tw-container\">\n        <bit-form-field>\n          <bit-label>{{ \"type\" | i18n }}</bit-label>\n          <bit-select\n            [items]=\"usernameOptions$ | async\"\n            formControlName=\"nav\"\n            data-testid=\"username-type\"\n          >\n          </bit-select>\n          <bit-hint *ngIf=\"!!(credentialTypeHint$ | async)\">{{\n            credentialTypeHint$ | async\n          }}</bit-hint>\n        </bit-form-field>\n      </form>\n      <form *ngIf=\"showForwarder$ | async\" [formGroup]=\"forwarder\" class=\"box tw-container\">\n        <bit-form-field>\n          <bit-label>{{ \"service\" | i18n }}</bit-label>\n          <bit-select\n            [items]=\"forwarderOptions$ | async\"\n            formControlName=\"nav\"\n            data-testid=\"email-forwarding-service\"\n          >\n          </bit-select>\n        </bit-form-field>\n      </form>\n      <tools-catchall-settings\n        *ngIf=\"(showAlgorithm$ | async)?.id === 'catchall'\"\n        [userId]=\"userId$ | async\"\n        (onUpdated)=\"generate('catchall settings')\"\n      />\n      <tools-forwarder-settings\n        *ngIf=\"!!(forwarderId$ | async)\"\n        [forwarder]=\"forwarderId$ | async\"\n        [userId]=\"this.userId$ | async\"\n      />\n      <tools-subaddress-settings\n        *ngIf=\"(showAlgorithm$ | async)?.id === 'subaddress'\"\n        [userId]=\"userId$ | async\"\n        (onUpdated)=\"generate('subaddress settings')\"\n      />\n      <tools-username-settings\n        *ngIf=\"(showAlgorithm$ | async)?.id === 'username'\"\n        [userId]=\"userId$ | async\"\n        (onUpdated)=\"generate('username settings')\"\n      />\n    </bit-card>\n  </div>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport {\n  BehaviorSubject,\n  catchError,\n  combineLatest,\n  combineLatestWith,\n  distinctUntilChanged,\n  filter,\n  map,\n  ReplaySubject,\n  Subject,\n  switchMap,\n  takeUntil,\n  withLatestFrom,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService, Option } from \"@bitwarden/components\";\nimport {\n  AlgorithmInfo,\n  CredentialAlgorithm,\n  CredentialCategory,\n  CredentialGeneratorService,\n  GeneratedCredential,\n  Generators,\n  getForwarderConfiguration,\n  isEmailAlgorithm,\n  isForwarderIntegration,\n  isPasswordAlgorithm,\n  isSameAlgorithm,\n  isUsernameAlgorithm,\n  toCredentialGeneratorConfiguration,\n} from \"@bitwarden/generator-core\";\nimport { GeneratorHistoryService } from \"@bitwarden/generator-history\";\n\n// constants used to identify navigation selections that are not\n// generator algorithms\nconst IDENTIFIER = \"identifier\";\nconst FORWARDER = \"forwarder\";\nconst NONE_SELECTED = \"none\";\n\n@Component({\n  selector: \"tools-credential-generator\",\n  templateUrl: \"credential-generator.component.html\",\n})\nexport class CredentialGeneratorComponent implements OnInit, OnDestroy {\n  constructor(\n    private generatorService: CredentialGeneratorService,\n    private generatorHistoryService: GeneratorHistoryService,\n    private toastService: ToastService,\n    private logService: LogService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n    private zone: NgZone,\n    private formBuilder: FormBuilder,\n  ) {}\n\n  /** Binds the component to a specific user's settings. When this input is not provided,\n   * the form binds to the active user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Emits credentials created from a generation request. */\n  @Output()\n  readonly onGenerated = new EventEmitter<GeneratedCredential>();\n\n  protected root$ = new BehaviorSubject<{ nav: string }>({\n    nav: null,\n  });\n\n  protected onRootChanged(value: { nav: string }) {\n    // prevent subscription cycle\n    if (this.root$.value.nav !== value.nav) {\n      this.zone.run(() => {\n        this.root$.next(value);\n      });\n    }\n  }\n\n  protected username = this.formBuilder.group({\n    nav: [null as string],\n  });\n\n  protected forwarder = this.formBuilder.group({\n    nav: [null as string],\n  });\n\n  async ngOnInit() {\n    if (this.userId) {\n      this.userId$.next(this.userId);\n    } else {\n      this.accountService.activeAccount$\n        .pipe(\n          map((acct) => acct.id),\n          distinctUntilChanged(),\n          takeUntil(this.destroyed),\n        )\n        .subscribe(this.userId$);\n    }\n\n    this.generatorService\n      .algorithms$([\"email\", \"username\"], { userId$: this.userId$ })\n      .pipe(\n        map((algorithms) => {\n          const usernames = algorithms.filter((a) => !isForwarderIntegration(a.id));\n          const usernameOptions = this.toOptions(usernames);\n          usernameOptions.push({ value: FORWARDER, label: this.i18nService.t(\"forwardedEmail\") });\n\n          const forwarders = algorithms.filter((a) => isForwarderIntegration(a.id));\n          const forwarderOptions = this.toOptions(forwarders);\n          forwarderOptions.unshift({ value: NONE_SELECTED, label: this.i18nService.t(\"select\") });\n\n          return [usernameOptions, forwarderOptions] as const;\n        }),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([usernames, forwarders]) => {\n        this.usernameOptions$.next(usernames);\n        this.forwarderOptions$.next(forwarders);\n      });\n\n    this.generatorService\n      .algorithms$(\"password\", { userId$: this.userId$ })\n      .pipe(\n        map((algorithms) => {\n          const options = this.toOptions(algorithms);\n          options.push({ value: IDENTIFIER, label: this.i18nService.t(\"username\") });\n          return options;\n        }),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(this.rootOptions$);\n\n    this.algorithm$\n      .pipe(\n        map((a) => a?.description),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((hint) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.credentialTypeHint$.next(hint);\n        });\n      });\n\n    this.algorithm$\n      .pipe(\n        map((a) => a?.category),\n        distinctUntilChanged(),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((category) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.category$.next(category);\n        });\n      });\n\n    // wire up the generator\n    this.algorithm$\n      .pipe(\n        filter((algorithm) => !!algorithm),\n        switchMap((algorithm) => this.typeToGenerator$(algorithm.id)),\n        catchError((error: unknown, generator) => {\n          if (typeof error === \"string\") {\n            this.toastService.showToast({\n              message: error,\n              variant: \"error\",\n              title: \"\",\n            });\n          } else {\n            this.logService.error(error);\n          }\n\n          // continue with origin stream\n          return generator;\n        }),\n        withLatestFrom(this.userId$),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([generated, userId]) => {\n        this.generatorHistoryService\n          .track(userId, generated.credential, generated.category, generated.generationDate)\n          .catch((e: unknown) => {\n            this.logService.error(e);\n          });\n\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.onGenerated.next(generated);\n          this.value$.next(generated.credential);\n        });\n      });\n\n    // these subjects normalize cascade selections to ensure the current\n    // cascade is always well-known.\n    type CascadeValue = { nav: string; algorithm?: CredentialAlgorithm };\n    const activeRoot$ = new Subject<CascadeValue>();\n    const activeIdentifier$ = new Subject<CascadeValue>();\n    const activeForwarder$ = new Subject<CascadeValue>();\n\n    this.root$\n      .pipe(\n        map(\n          (root): CascadeValue =>\n            root.nav === IDENTIFIER\n              ? { nav: root.nav }\n              : { nav: root.nav, algorithm: JSON.parse(root.nav) },\n        ),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(activeRoot$);\n\n    this.username.valueChanges\n      .pipe(\n        map(\n          (username): CascadeValue =>\n            username.nav === FORWARDER\n              ? { nav: username.nav }\n              : { nav: username.nav, algorithm: JSON.parse(username.nav) },\n        ),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(activeIdentifier$);\n\n    this.forwarder.valueChanges\n      .pipe(\n        map(\n          (forwarder): CascadeValue =>\n            forwarder.nav === NONE_SELECTED\n              ? { nav: forwarder.nav }\n              : { nav: forwarder.nav, algorithm: JSON.parse(forwarder.nav) },\n        ),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(activeForwarder$);\n\n    // update forwarder cascade visibility\n    combineLatest([activeRoot$, activeIdentifier$, activeForwarder$])\n      .pipe(\n        map(([root, username, forwarder]) => {\n          const showForwarder = !root.algorithm && !username.algorithm;\n          const forwarderId =\n            showForwarder && isForwarderIntegration(forwarder.algorithm)\n              ? forwarder.algorithm.forwarder\n              : null;\n          return [showForwarder, forwarderId] as const;\n        }),\n        distinctUntilChanged((prev, next) => prev[0] === next[0] && prev[1] === next[1]),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([showForwarder, forwarderId]) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.showForwarder$.next(showForwarder);\n          this.forwarderId$.next(forwarderId);\n        });\n      });\n\n    // update active algorithm\n    combineLatest([activeRoot$, activeIdentifier$, activeForwarder$])\n      .pipe(\n        map(([root, username, forwarder]) => {\n          const selection = root.algorithm ?? username.algorithm ?? forwarder.algorithm;\n          if (selection) {\n            return this.generatorService.algorithm(selection);\n          } else {\n            return null;\n          }\n        }),\n        distinctUntilChanged((prev, next) => isSameAlgorithm(prev?.id, next?.id)),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((algorithm) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.algorithm$.next(algorithm);\n        });\n      });\n\n    // assume the last-selected generator algorithm is the user's preferred one\n    const preferences = await this.generatorService.preferences({ singleUserId$: this.userId$ });\n    this.algorithm$\n      .pipe(\n        filter((algorithm) => !!algorithm),\n        withLatestFrom(preferences),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([algorithm, preference]) => {\n        function setPreference(category: CredentialCategory) {\n          const p = preference[category];\n          p.algorithm = algorithm.id;\n          p.updated = new Date();\n        }\n\n        // `is*Algorithm` decides `algorithm`'s type, which flows into `setPreference`\n        if (isEmailAlgorithm(algorithm.id)) {\n          setPreference(\"email\");\n        } else if (isUsernameAlgorithm(algorithm.id)) {\n          setPreference(\"username\");\n        } else if (isPasswordAlgorithm(algorithm.id)) {\n          setPreference(\"password\");\n        } else {\n          return;\n        }\n\n        preferences.next(preference);\n      });\n\n    // populate the form with the user's preferences to kick off interactivity\n    preferences\n      .pipe(\n        map(({ email, username, password }) => {\n          const forwarderPref = isForwarderIntegration(email.algorithm) ? email : null;\n          const usernamePref = email.updated > username.updated ? email : username;\n\n          // inject drilldown flags\n          const forwarderNav = !forwarderPref\n            ? NONE_SELECTED\n            : JSON.stringify(forwarderPref.algorithm);\n          const userNav = forwarderPref ? FORWARDER : JSON.stringify(usernamePref.algorithm);\n          const rootNav =\n            usernamePref.updated > password.updated\n              ? IDENTIFIER\n              : JSON.stringify(password.algorithm);\n\n          // construct cascade metadata\n          const cascade = {\n            root: {\n              selection: { nav: rootNav },\n              active: {\n                nav: rootNav,\n                algorithm: rootNav === IDENTIFIER ? null : password.algorithm,\n              } as CascadeValue,\n            },\n            username: {\n              selection: { nav: userNav },\n              active: {\n                nav: userNav,\n                algorithm: forwarderPref ? null : usernamePref.algorithm,\n              },\n            },\n            forwarder: {\n              selection: { nav: forwarderNav },\n              active: {\n                nav: forwarderNav,\n                algorithm: forwarderPref?.algorithm,\n              },\n            },\n          };\n\n          return cascade;\n        }),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(({ root, username, forwarder }) => {\n        // update navigation; break subscription loop\n        this.onRootChanged(root.selection);\n        this.username.setValue(username.selection, { emitEvent: false });\n        this.forwarder.setValue(forwarder.selection, { emitEvent: false });\n\n        // update cascade visibility\n        activeRoot$.next(root.active);\n        activeIdentifier$.next(username.active);\n        activeForwarder$.next(forwarder.active);\n      });\n\n    // automatically regenerate when the algorithm switches if the algorithm\n    // allows it; otherwise set a placeholder\n    this.algorithm$.pipe(takeUntil(this.destroyed)).subscribe((a) => {\n      this.zone.run(() => {\n        if (!a || a.onlyOnRequest) {\n          this.value$.next(\"-\");\n        } else {\n          this.generate(\"autogenerate\").catch((e: unknown) => this.logService.error(e));\n        }\n      });\n    });\n  }\n\n  private typeToGenerator$(type: CredentialAlgorithm) {\n    const dependencies = {\n      on$: this.generate$,\n      userId$: this.userId$,\n    };\n\n    switch (type) {\n      case \"catchall\":\n        return this.generatorService.generate$(Generators.catchall, dependencies);\n\n      case \"subaddress\":\n        return this.generatorService.generate$(Generators.subaddress, dependencies);\n\n      case \"username\":\n        return this.generatorService.generate$(Generators.username, dependencies);\n\n      case \"password\":\n        return this.generatorService.generate$(Generators.password, dependencies);\n\n      case \"passphrase\":\n        return this.generatorService.generate$(Generators.passphrase, dependencies);\n    }\n\n    if (isForwarderIntegration(type)) {\n      const forwarder = getForwarderConfiguration(type.forwarder);\n      const configuration = toCredentialGeneratorConfiguration(forwarder);\n      const generator = this.generatorService.generate$(configuration, dependencies);\n      return generator;\n    }\n\n    throw new Error(`Invalid generator type: \"${type}\"`);\n  }\n\n  /** Lists the top-level credential types supported by the component.\n   *  @remarks This is string-typed because angular doesn't support\n   *  structural equality for objects, which prevents `CredentialAlgorithm`\n   *  from being selectable within a dropdown when its value contains a\n   *  `ForwarderIntegration`.\n   */\n  protected rootOptions$ = new BehaviorSubject<Option<string>[]>([]);\n\n  /** Lists the credential types of the username algorithm box. */\n  protected usernameOptions$ = new BehaviorSubject<Option<string>[]>([]);\n\n  /** Lists the credential types of the username algorithm box. */\n  protected forwarderOptions$ = new BehaviorSubject<Option<string>[]>([]);\n\n  /** Tracks the currently selected forwarder. */\n  protected forwarderId$ = new BehaviorSubject<IntegrationId>(null);\n\n  /** Tracks forwarder control visibility */\n  protected showForwarder$ = new BehaviorSubject<boolean>(false);\n\n  /** tracks the currently selected credential type */\n  protected algorithm$ = new ReplaySubject<AlgorithmInfo>(1);\n\n  protected showAlgorithm$ = this.algorithm$.pipe(\n    combineLatestWith(this.showForwarder$),\n    map(([algorithm, showForwarder]) => (showForwarder ? null : algorithm)),\n  );\n\n  /**\n   * Emits the copy button aria-label respective of the selected credential type\n   */\n  protected credentialTypeCopyLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ copy }) => copy),\n  );\n\n  /**\n   * Emits the generate button aria-label respective of the selected credential type\n   */\n  protected credentialTypeGenerateLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generate }) => generate),\n  );\n\n  /**\n   * Emits the copy credential toast respective of the selected credential type\n   */\n  protected credentialTypeLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generatedValue }) => generatedValue),\n  );\n\n  /** Emits hint key for the currently selected credential type */\n  protected credentialTypeHint$ = new ReplaySubject<string>(1);\n\n  /** tracks the currently selected credential category */\n  protected category$ = new ReplaySubject<string>(1);\n\n  /** Emits the last generated value. */\n  protected readonly value$ = new BehaviorSubject<string>(\"\");\n\n  /** Emits when the userId changes */\n  protected readonly userId$ = new BehaviorSubject<UserId>(null);\n\n  /** Emits when a new credential is requested */\n  private readonly generate$ = new Subject<string>();\n\n  /** Request a new value from the generator\n   * @param requestor a label used to trace generation request\n   *  origin in the debugger.\n   */\n  protected async generate(requestor: string) {\n    this.generate$.next(requestor);\n  }\n\n  private toOptions(algorithms: AlgorithmInfo[]) {\n    const options: Option<string>[] = algorithms.map((algorithm) => ({\n      value: JSON.stringify(algorithm.id),\n      label: algorithm.name,\n    }));\n\n    return options;\n  }\n\n  private readonly destroyed = new Subject<void>();\n  ngOnDestroy() {\n    this.destroyed.next();\n    this.destroyed.complete();\n\n    // finalize subjects\n    this.generate$.complete();\n    this.value$.complete();\n\n    // finalize component bindings\n    this.onGenerated.complete();\n  }\n}\n","import { Component } from \"@angular/core\";\n\nimport { ButtonModule, DialogService, LinkModule } from \"@bitwarden/components\";\nimport {\n  CredentialGeneratorHistoryDialogComponent,\n  GeneratorModule,\n} from \"@bitwarden/generator-components\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  standalone: true,\n  selector: \"credential-generator\",\n  templateUrl: \"credential-generator.component.html\",\n  imports: [SharedModule, HeaderModule, GeneratorModule, ButtonModule, LinkModule],\n})\nexport class CredentialGeneratorComponent {\n  constructor(private dialogService: DialogService) {}\n\n  openHistoryDialog = () => {\n    this.dialogService.open(CredentialGeneratorHistoryDialogComponent);\n  };\n}\n","<app-header></app-header>\n\n<bit-container>\n  <tools-credential-generator />\n  <button\n    bitLink\n    type=\"button\"\n    linkType=\"primary\"\n    aria-haspopup=\"true\"\n    (click)=\"openHistoryDialog()\"\n  >\n    {{ \"generatorHistory\" | i18n }}\n  </button>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\nimport { BehaviorSubject, combineLatest, firstValueFrom, Subject } from \"rxjs\";\nimport { debounceTime, first, map, skipWhile, takeUntil } from \"rxjs/operators\";\n\nimport { PasswordGeneratorPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/password-generator-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport {\n  GeneratorType,\n  DefaultPasswordBoundaries as DefaultBoundaries,\n} from \"@bitwarden/generator-core\";\nimport {\n  PasswordGenerationServiceAbstraction,\n  UsernameGenerationServiceAbstraction,\n  UsernameGeneratorOptions,\n  PasswordGeneratorOptions,\n} from \"@bitwarden/generator-legacy\";\n\nexport class EmailForwarderOptions {\n  name: string;\n  value: string;\n  validForSelfHosted: boolean;\n}\n\n@Directive()\nexport class GeneratorComponent implements OnInit, OnDestroy {\n  @Input() comingFromAddEdit = false;\n  @Input() type: GeneratorType | \"\";\n  @Output() onSelected = new EventEmitter<string>();\n\n  usernameGeneratingPromise: Promise<string>;\n  typeOptions: any[];\n  usernameTypeOptions: any[];\n  subaddressOptions: any[];\n  catchallOptions: any[];\n  forwardOptions: EmailForwarderOptions[];\n  usernameOptions: UsernameGeneratorOptions = { website: null };\n  passwordOptions: PasswordGeneratorOptions = {};\n  username = \"-\";\n  password = \"-\";\n  showOptions = false;\n  avoidAmbiguous = false;\n  enforcedPasswordPolicyOptions: PasswordGeneratorPolicyOptions;\n  usernameWebsite: string = null;\n\n  get passTypeOptions() {\n    return this._passTypeOptions.filter((o) => !o.disabled);\n  }\n  private _passTypeOptions: { name: string; value: GeneratorType; disabled: boolean }[];\n\n  private destroy$ = new Subject<void>();\n  private isInitialized$ = new BehaviorSubject(false);\n\n  // update screen reader minimum password length with 500ms debounce\n  // so that the user isn't flooded with status updates\n  private _passwordOptionsMinLengthForReader = new BehaviorSubject<number>(\n    DefaultBoundaries.length.min,\n  );\n  protected passwordOptionsMinLengthForReader$ = this._passwordOptionsMinLengthForReader.pipe(\n    map((val) => val || DefaultBoundaries.length.min),\n    debounceTime(500),\n  );\n\n  private _password = new BehaviorSubject<string>(\"-\");\n\n  constructor(\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected usernameGenerationService: UsernameGenerationServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected accountService: AccountService,\n    protected i18nService: I18nService,\n    protected logService: LogService,\n    protected route: ActivatedRoute,\n    protected ngZone: NgZone,\n    private win: Window,\n    protected toastService: ToastService,\n  ) {\n    this.typeOptions = [\n      { name: i18nService.t(\"password\"), value: \"password\" },\n      { name: i18nService.t(\"username\"), value: \"username\" },\n    ];\n    this._passTypeOptions = [\n      { name: i18nService.t(\"password\"), value: \"password\", disabled: false },\n      { name: i18nService.t(\"passphrase\"), value: \"passphrase\", disabled: false },\n    ];\n    this.usernameTypeOptions = [\n      {\n        name: i18nService.t(\"plusAddressedEmail\"),\n        value: \"subaddress\",\n        desc: i18nService.t(\"plusAddressedEmailDesc\"),\n      },\n      {\n        name: i18nService.t(\"catchallEmail\"),\n        value: \"catchall\",\n        desc: i18nService.t(\"catchallEmailDesc\"),\n      },\n      {\n        name: i18nService.t(\"forwardedEmail\"),\n        value: \"forwarded\",\n        desc: i18nService.t(\"forwardedEmailDesc\"),\n      },\n      { name: i18nService.t(\"randomWord\"), value: \"word\" },\n    ];\n    this.subaddressOptions = [{ name: i18nService.t(\"random\"), value: \"random\" }];\n    this.catchallOptions = [{ name: i18nService.t(\"random\"), value: \"random\" }];\n\n    this.forwardOptions = [\n      { name: \"\", value: \"\", validForSelfHosted: false },\n      { name: \"addy.io\", value: \"anonaddy\", validForSelfHosted: true },\n      { name: \"DuckDuckGo\", value: \"duckduckgo\", validForSelfHosted: false },\n      { name: \"Fastmail\", value: \"fastmail\", validForSelfHosted: true },\n      { name: \"Firefox Relay\", value: \"firefoxrelay\", validForSelfHosted: false },\n      { name: \"SimpleLogin\", value: \"simplelogin\", validForSelfHosted: true },\n      { name: \"Forward Email\", value: \"forwardemail\", validForSelfHosted: true },\n    ].sort((a, b) => a.name.localeCompare(b.name));\n\n    this._password.pipe(debounceTime(250)).subscribe((password) => {\n      ngZone.run(() => {\n        this.password = password;\n      });\n      this.passwordGenerationService.addHistory(this.password).catch((e) => {\n        this.logService.error(e);\n      });\n    });\n  }\n\n  cascadeOptions(navigationType: GeneratorType = undefined, accountEmail: string) {\n    this.avoidAmbiguous = !this.passwordOptions.ambiguous;\n\n    if (!this.type) {\n      if (navigationType) {\n        this.type = navigationType;\n      } else {\n        this.type = this.passwordOptions.type === \"username\" ? \"username\" : \"password\";\n      }\n    }\n\n    this.passwordOptions.type =\n      this.passwordOptions.type === \"passphrase\" ? \"passphrase\" : \"password\";\n\n    const overrideType = this.enforcedPasswordPolicyOptions.overridePasswordType ?? \"\";\n    const isDisabled = overrideType.length\n      ? (value: string, policyValue: string) => value !== policyValue\n      : (_value: string, _policyValue: string) => false;\n    for (const option of this._passTypeOptions) {\n      option.disabled = isDisabled(option.value, overrideType);\n    }\n\n    if (this.usernameOptions.type == null) {\n      this.usernameOptions.type = \"word\";\n    }\n    if (\n      this.usernameOptions.subaddressEmail == null ||\n      this.usernameOptions.subaddressEmail === \"\"\n    ) {\n      this.usernameOptions.subaddressEmail = accountEmail;\n    }\n    if (this.usernameWebsite == null) {\n      this.usernameOptions.subaddressType = this.usernameOptions.catchallType = \"random\";\n    } else {\n      this.usernameOptions.website = this.usernameWebsite;\n    }\n  }\n\n  async ngOnInit() {\n    combineLatest([\n      this.route.queryParams.pipe(first()),\n      this.accountService.activeAccount$.pipe(first()),\n      this.passwordGenerationService.getOptions$(),\n      this.usernameGenerationService.getOptions$(),\n    ])\n      .pipe(\n        map(([qParams, account, [passwordOptions, passwordPolicy], usernameOptions]) => ({\n          navigationType: qParams.type as GeneratorType,\n          accountEmail: account.email,\n          passwordOptions,\n          passwordPolicy,\n          usernameOptions,\n        })),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((options) => {\n        this.passwordOptions = options.passwordOptions;\n        this.enforcedPasswordPolicyOptions = options.passwordPolicy;\n        this.usernameOptions = options.usernameOptions;\n\n        this.cascadeOptions(options.navigationType, options.accountEmail);\n        this._passwordOptionsMinLengthForReader.next(this.passwordOptions.minLength);\n\n        if (this.regenerateWithoutButtonPress()) {\n          this.regenerate().catch((e) => {\n            this.logService.error(e);\n          });\n        }\n\n        this.isInitialized$.next(true);\n      });\n\n    // once initialization is complete, `ngOnInit` should return.\n    //\n    // FIXME(#6944): if a sync is in progress, wait to complete until after\n    // the sync completes.\n    await firstValueFrom(\n      this.isInitialized$.pipe(\n        skipWhile((initialized) => !initialized),\n        takeUntil(this.destroy$),\n      ),\n    );\n\n    if (this.usernameWebsite !== null) {\n      const websiteOption = { name: this.i18nService.t(\"websiteName\"), value: \"website-name\" };\n      this.subaddressOptions.push(websiteOption);\n      this.catchallOptions.push(websiteOption);\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n    this.isInitialized$.complete();\n    this._passwordOptionsMinLengthForReader.complete();\n  }\n\n  async typeChanged() {\n    await this.savePasswordOptions();\n  }\n\n  async regenerate() {\n    if (this.type === \"password\") {\n      await this.regeneratePassword();\n    } else if (this.type === \"username\") {\n      await this.regenerateUsername();\n    }\n  }\n\n  async sliderChanged() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.savePasswordOptions();\n    await this.passwordGenerationService.addHistory(this.password);\n  }\n\n  async onPasswordOptionsMinNumberInput($event: Event) {\n    // `savePasswordOptions()` replaces the null\n    this.passwordOptions.number = null;\n\n    await this.savePasswordOptions();\n\n    // fixes UI desync that occurs when minNumber has a fixed value\n    // that is reset through normalization\n    ($event.target as HTMLInputElement).value = `${this.passwordOptions.minNumber}`;\n  }\n\n  async setPasswordOptionsNumber($event: boolean) {\n    this.passwordOptions.number = $event;\n    // `savePasswordOptions()` replaces the null\n    this.passwordOptions.minNumber = null;\n\n    await this.savePasswordOptions();\n  }\n\n  async onPasswordOptionsMinSpecialInput($event: Event) {\n    // `savePasswordOptions()` replaces the null\n    this.passwordOptions.special = null;\n\n    await this.savePasswordOptions();\n\n    // fixes UI desync that occurs when minSpecial has a fixed value\n    // that is reset through normalization\n    ($event.target as HTMLInputElement).value = `${this.passwordOptions.minSpecial}`;\n  }\n\n  async setPasswordOptionsSpecial($event: boolean) {\n    this.passwordOptions.special = $event;\n    // `savePasswordOptions()` replaces the null\n    this.passwordOptions.minSpecial = null;\n\n    await this.savePasswordOptions();\n  }\n\n  async sliderInput() {\n    await this.normalizePasswordOptions();\n  }\n\n  async savePasswordOptions() {\n    // map navigation state into generator type\n    const restoreType = this.passwordOptions.type;\n    if (this.type === \"username\") {\n      this.passwordOptions.type = this.type;\n    }\n\n    // save options\n    await this.normalizePasswordOptions();\n    await this.passwordGenerationService.saveOptions(this.passwordOptions);\n\n    // restore the original format\n    this.passwordOptions.type = restoreType;\n  }\n\n  async saveUsernameOptions() {\n    await this.usernameGenerationService.saveOptions(this.usernameOptions);\n    if (this.usernameOptions.type === \"forwarded\") {\n      this.username = \"-\";\n    }\n  }\n\n  async regeneratePassword() {\n    this._password.next(\n      await this.passwordGenerationService.generatePassword(this.passwordOptions),\n    );\n  }\n\n  regenerateUsername() {\n    return this.generateUsername();\n  }\n\n  async generateUsername() {\n    try {\n      this.usernameGeneratingPromise = this.usernameGenerationService.generateUsername(\n        this.usernameOptions,\n      );\n      this.username = await this.usernameGeneratingPromise;\n      if (this.username === \"\" || this.username === null) {\n        this.username = \"-\";\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  copy() {\n    const password = this.type === \"password\";\n    const copyOptions = this.win != null ? { window: this.win } : null;\n    this.platformUtilsService.copyToClipboard(\n      password ? this.password : this.username,\n      copyOptions,\n    );\n    this.toastService.showToast({\n      variant: \"info\",\n      title: null,\n      message: this.i18nService.t(\n        \"valueCopied\",\n        this.i18nService.t(password ? \"password\" : \"username\"),\n      ),\n    });\n  }\n\n  select() {\n    this.onSelected.emit(this.type === \"password\" ? this.password : this.username);\n  }\n\n  toggleOptions() {\n    this.showOptions = !this.showOptions;\n  }\n\n  regenerateWithoutButtonPress() {\n    return this.type !== \"username\" || this.usernameOptions.type !== \"forwarded\";\n  }\n\n  private async normalizePasswordOptions() {\n    // Application level normalize options dependent on class variables\n    this.passwordOptions.ambiguous = !this.avoidAmbiguous;\n\n    if (\n      !this.passwordOptions.uppercase &&\n      !this.passwordOptions.lowercase &&\n      !this.passwordOptions.number &&\n      !this.passwordOptions.special\n    ) {\n      this.passwordOptions.lowercase = true;\n      if (this.win != null) {\n        const lowercase = this.win.document.querySelector(\"#lowercase\") as HTMLInputElement;\n        if (lowercase) {\n          lowercase.checked = true;\n        }\n      }\n    }\n\n    await this.passwordGenerationService.enforcePasswordGeneratorPoliciesOnOptions(\n      this.passwordOptions,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { GeneratedPasswordHistory } from \"@bitwarden/generator-history\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Directive()\nexport class PasswordGeneratorHistoryComponent implements OnInit {\n  history: GeneratedPasswordHistory[] = [];\n\n  constructor(\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected i18nService: I18nService,\n    private win: Window,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.history = await this.passwordGenerationService.getHistory();\n  }\n\n  clear = async () => {\n    this.history = await this.passwordGenerationService.clear();\n  };\n\n  copy(password: string) {\n    const copyOptions = this.win != null ? { window: this.win } : null;\n    this.platformUtilsService.copyToClipboard(password, copyOptions);\n    this.toastService.showToast({\n      variant: \"info\",\n      title: null,\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"password\")),\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, HostListener, Input } from \"@angular/core\";\n\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n@Directive({\n  selector: \"[appCopyText]\",\n})\nexport class CopyTextDirective {\n  constructor(\n    private el: ElementRef,\n    private platformUtilsService: PlatformUtilsService,\n  ) {}\n\n  @Input(\"appCopyText\") copyText: string;\n\n  @HostListener(\"copy\") onCopy() {\n    if (window == null) {\n      return;\n    }\n\n    const timeout = this.platformUtilsService.getClientType() === ClientType.Desktop ? 100 : 0;\n    setTimeout(() => {\n      this.platformUtilsService.copyToClipboard(this.copyText, { window: window });\n    }, timeout);\n  }\n}\n","<bit-dialog>\n  <span bitDialogTitle>\n    {{ \"passwordHistory\" | i18n }}\n  </span>\n  <span bitDialogContent>\n    <bit-table *ngIf=\"history.length\">\n      <ng-template body>\n        <tr bitRow *ngFor=\"let h of history\">\n          <td bitCell>\n            <bit-color-password\n              [password]=\"h.password\"\n              class=\"tw-block tw-font-mono\"\n              [appCopyText]=\"h.password\"\n            ></bit-color-password>\n            <small bitTypography=\"body2\" class=\"tw-text-muted\">\n              {{ h.date | date: \"medium\" }}\n            </small>\n          </td>\n          <td bitCell class=\"tw-w-0\">\n            <button\n              type=\"button\"\n              bitIconButton=\"bwi-clone\"\n              (click)=\"copy(h.password)\"\n              [appA11yTitle]=\"'copyPassword' | i18n\"\n            ></button>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n    <div *ngIf=\"!history.length\">\n      {{ \"noPasswordsInList\" | i18n }}\n    </div>\n  </span>\n  <ng-container bitDialogFooter>\n    <button type=\"button\" bitButton buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n    <button\n      type=\"button\"\n      class=\"tw-ml-auto\"\n      bitIconButton=\"bwi-trash\"\n      buttonType=\"danger\"\n      title=\"{{ 'clear' | i18n }}\"\n      [bitAction]=\"clear\"\n    ></button>\n  </ng-container>\n</bit-dialog>\n","import { Component } from \"@angular/core\";\n\nimport { PasswordGeneratorHistoryComponent as BasePasswordGeneratorHistoryComponent } from \"@bitwarden/angular/tools/generator/components/password-generator-history.component\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Component({\n  selector: \"app-password-generator-history\",\n  templateUrl: \"password-generator-history.component.html\",\n})\nexport class PasswordGeneratorHistoryComponent extends BasePasswordGeneratorHistoryComponent {\n  constructor(\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    toastService: ToastService,\n  ) {\n    super(passwordGenerationService, platformUtilsService, i18nService, window, toastService);\n  }\n}\n","<app-header></app-header>\n\n<bit-container>\n  <app-callout type=\"info\" *ngIf=\"enforcedPasswordPolicyOptions?.inEffect() && type === 'password'\">\n    {{ \"passwordGeneratorPolicyInEffect\" | i18n }}\n  </app-callout>\n  <div class=\"card card-generated bg-light my-4\">\n    <div class=\"card-body\">\n      <bit-color-password\n        [password]=\"type === 'password' ? password : username\"\n        [appCopyText]=\"type === 'password' ? password : username\"\n      ></bit-color-password>\n    </div>\n  </div>\n  <div class=\"form-group\" role=\"radiogroup\" aria-labelledby=\"typeHeading\">\n    <label id=\"typeHeading\" class=\"d-block\">{{ \"whatWouldYouLikeToGenerate\" | i18n }}</label>\n    <div class=\"form-check form-check-inline\" *ngFor=\"let o of typeOptions\">\n      <input\n        class=\"form-check-input\"\n        type=\"radio\"\n        [(ngModel)]=\"type\"\n        name=\"Type\"\n        id=\"type_{{ o.value }}\"\n        [value]=\"o.value\"\n        (change)=\"typeChanged()\"\n        [checked]=\"type === o.value\"\n      />\n      <label class=\"form-check-label\" for=\"type_{{ o.value }}\">\n        {{ o.name }}\n      </label>\n    </div>\n  </div>\n  <ng-container *ngIf=\"type === 'password'\">\n    <div aria-labelledby=\"passwordTypeHeading\" class=\"form-group\" role=\"radiogroup\">\n      <label id=\"passwordTypeHeading\" class=\"d-block\">{{ \"passwordType\" | i18n }}</label>\n      <div class=\"form-check form-check-inline\" *ngFor=\"let o of passTypeOptions\">\n        <input\n          class=\"form-check-input\"\n          type=\"radio\"\n          [(ngModel)]=\"passwordOptions.type\"\n          name=\"PasswordType\"\n          id=\"passwordType_{{ o.value }}\"\n          [value]=\"o.value\"\n          (change)=\"savePasswordOptions()\"\n          [checked]=\"passwordOptions.type === o.value\"\n        />\n        <label class=\"form-check-label\" for=\"passwordType_{{ o.value }}\">\n          {{ o.name }}\n        </label>\n      </div>\n    </div>\n    <ng-container *ngIf=\"passwordOptions.type === 'passphrase'\">\n      <div class=\"row\">\n        <div class=\"form-group col-4\">\n          <label for=\"num-words\">{{ \"numWords\" | i18n }}</label>\n          <input\n            id=\"num-words\"\n            class=\"form-control\"\n            type=\"number\"\n            min=\"3\"\n            max=\"20\"\n            [(ngModel)]=\"passwordOptions.numWords\"\n            (blur)=\"savePasswordOptions()\"\n          />\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"word-separator\">{{ \"wordSeparator\" | i18n }}</label>\n          <input\n            id=\"word-separator\"\n            class=\"form-control\"\n            type=\"text\"\n            maxlength=\"1\"\n            [(ngModel)]=\"passwordOptions.wordSeparator\"\n            (blur)=\"savePasswordOptions()\"\n          />\n        </div>\n      </div>\n      <label class=\"d-block\">{{ \"options\" | i18n }}</label>\n      <div class=\"form-group\">\n        <div class=\"form-check\">\n          <input\n            id=\"capitalize\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [(ngModel)]=\"passwordOptions.capitalize\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.capitalize\"\n          />\n          <label for=\"capitalize\" class=\"form-check-label\">{{ \"capitalize\" | i18n }}</label>\n        </div>\n        <div class=\"form-check\">\n          <input\n            id=\"include-number\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [(ngModel)]=\"passwordOptions.includeNumber\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.includeNumber\"\n          />\n          <label for=\"include-number\" class=\"form-check-label\">{{ \"includeNumber\" | i18n }}</label>\n        </div>\n      </div>\n    </ng-container>\n    <ng-container *ngIf=\"passwordOptions.type === 'password'\">\n      <div class=\"row\">\n        <div class=\"form-group col-4\">\n          <label for=\"length\">{{ \"length\" | i18n }}</label>\n          <input\n            id=\"length\"\n            class=\"form-control\"\n            type=\"number\"\n            [min]=\"passwordOptions.minLength\"\n            max=\"128\"\n            [(ngModel)]=\"passwordOptions.length\"\n            (blur)=\"savePasswordOptions()\"\n            (change)=\"lengthChanged()\"\n          />\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"min-length\">{{ \"passwordMinLength\" | i18n }}</label>\n          <input\n            id=\"min-length\"\n            class=\"form-control\"\n            type=\"text\"\n            readonly=\"true\"\n            [value]=\"passwordOptions.length\"\n          />\n          <span\n            class=\"tw-sr-only\"\n            attr.aria-label=\"{{ 'passwordMinLength' | i18n }}\"\n            role=\"status\"\n            aria-live=\"polite\"\n          >\n            {{ passwordOptionsMinLengthForReader$ | async }}\n          </span>\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"min-number\">{{ \"minNumbers\" | i18n }}</label>\n          <input\n            id=\"min-number\"\n            class=\"form-control\"\n            type=\"number\"\n            min=\"0\"\n            max=\"9\"\n            [(ngModel)]=\"passwordOptions.minNumber\"\n            (input)=\"onPasswordOptionsMinNumberInput($event)\"\n            (change)=\"minNumberChanged()\"\n          />\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"min-special\">{{ \"minSpecial\" | i18n }}</label>\n          <input\n            id=\"min-special\"\n            class=\"form-control\"\n            type=\"number\"\n            min=\"0\"\n            max=\"9\"\n            [(ngModel)]=\"passwordOptions.minSpecial\"\n            (input)=\"onPasswordOptionsMinSpecialInput($event)\"\n            (change)=\"minSpecialChanged()\"\n          />\n        </div>\n      </div>\n      <label class=\"d-block\">{{ \"options\" | i18n }}</label>\n      <div class=\"form-group\">\n        <div class=\"form-check\">\n          <input\n            id=\"uppercase\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [(ngModel)]=\"passwordOptions.uppercase\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.useUppercase\"\n            attr.aria-label=\"{{ 'uppercase' | i18n }}\"\n          />\n          <label for=\"uppercase\" class=\"form-check-label\">A-Z</label>\n        </div>\n        <div class=\"form-check\">\n          <input\n            id=\"lowercase\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [(ngModel)]=\"passwordOptions.lowercase\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.useLowercase\"\n            attr.aria-label=\"{{ 'lowercase' | i18n }}\"\n          />\n          <label for=\"lowercase\" class=\"form-check-label\">a-z</label>\n        </div>\n        <div class=\"form-check\">\n          <input\n            id=\"numbers\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [ngModel]=\"passwordOptions.number\"\n            (ngModelChange)=\"setPasswordOptionsNumber($event)\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.useNumbers\"\n            attr.aria-label=\"{{ 'numbers' | i18n }}\"\n          />\n          <label for=\"numbers\" class=\"form-check-label\">0-9</label>\n        </div>\n        <div class=\"form-check\">\n          <input\n            id=\"special\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            [ngModel]=\"passwordOptions.special\"\n            (ngModelChange)=\"setPasswordOptionsSpecial($event)\"\n            [disabled]=\"enforcedPasswordPolicyOptions?.useSpecial\"\n            attr.aria-label=\"{{ 'specialCharacters' | i18n }}\"\n          />\n          <label for=\"special\" class=\"form-check-label\">!&#64;#$%^&amp;*</label>\n        </div>\n        <div class=\"form-check\">\n          <input\n            id=\"ambiguous\"\n            class=\"form-check-input\"\n            type=\"checkbox\"\n            (change)=\"savePasswordOptions()\"\n            [(ngModel)]=\"avoidAmbiguous\"\n          />\n          <label for=\"ambiguous\" class=\"form-check-label\">{{ \"ambiguous\" | i18n }}</label>\n        </div>\n      </div>\n    </ng-container>\n    <div class=\"d-flex\">\n      <div>\n        <button type=\"button\" class=\"btn btn-primary\" (click)=\"regenerate()\">\n          {{ \"regeneratePassword\" | i18n }}\n        </button>\n        <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"copy()\">\n          {{ \"copyPassword\" | i18n }}\n        </button>\n      </div>\n      <div class=\"ml-auto\">\n        <button\n          type=\"button\"\n          class=\"btn btn-outline-secondary\"\n          (click)=\"history()\"\n          appA11yTitle=\"{{ 'passwordHistory' | i18n }}\"\n        >\n          <i class=\"bwi bwi-clock bwi-lg\" aria-hidden=\"true\"></i>\n        </button>\n      </div>\n    </div>\n  </ng-container>\n  <ng-container *ngIf=\"type === 'username'\">\n    <div aria-labelledby=\"usernameTypeHeading\" class=\"form-group\" role=\"radiogroup\">\n      <div class=\"d-block\">\n        <label id=\"usernameTypeHeading\">{{ \"usernameType\" | i18n }}</label>\n        <a\n          class=\"ml-auto\"\n          href=\"https://bitwarden.com/help/generator/#username-types\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          appA11yTitle=\"{{ 'learnMore' | i18n }}\"\n        >\n          <i class=\"bwi bwi-question-circle\" aria-hidden=\"true\"></i>\n        </a>\n      </div>\n      <div class=\"form-check\" *ngFor=\"let o of usernameTypeOptions\">\n        <input\n          class=\"form-check-input\"\n          type=\"radio\"\n          [(ngModel)]=\"usernameOptions.type\"\n          name=\"UsernameType\"\n          id=\"usernameType_{{ o.value }}\"\n          [value]=\"o.value\"\n          (change)=\"saveUsernameOptions()\"\n          [checked]=\"usernameOptions.type === o.value\"\n        />\n        <label class=\"form-check-label\" for=\"usernameType_{{ o.value }}\">\n          {{ o.name }}\n          <div class=\"small text-muted\">{{ o.desc }}</div>\n        </label>\n      </div>\n    </div>\n    <ng-container *ngIf=\"usernameOptions.type === 'forwarded'\">\n      <div class=\"form-group\" role=\"listbox\">\n        <label class=\"d-block\">{{ \"service\" | i18n }}</label>\n        <select\n          id=\"ForwardTypeDropdown\"\n          name=\"ForwardType\"\n          [(ngModel)]=\"usernameOptions.forwardedService\"\n          (change)=\"saveUsernameOptions()\"\n          class=\"form-control w-auto\"\n        >\n          <option *ngFor=\"let o of forwardOptions\" [ngValue]=\"o.value\" role=\"option\">\n            {{ o.name }}\n          </option>\n        </select>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'simplelogin'\">\n        <div class=\"form-group col-4\">\n          <label for=\"simplelogin-apikey\">{{ \"apiKey\" | i18n }}</label>\n          <input\n            id=\"simplelogin-apikey\"\n            class=\"form-control\"\n            type=\"password\"\n            [(ngModel)]=\"usernameOptions.forwardedSimpleLoginApiKey\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n        <div class=\"form-group col-4\" *ngIf=\"isSelfHosted\">\n          <label for=\"simplelogin-baseUrl\">{{ \"baseUrl\" | i18n }}</label>\n          <input\n            id=\"simplelogin-baseUrl\"\n            class=\"form-control\"\n            type=\"text\"\n            name=\"SimpleLoginDomain\"\n            [(ngModel)]=\"usernameOptions.forwardedSimpleLoginBaseUrl\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'duckduckgo'\">\n        <div class=\"form-group col-4\">\n          <label for=\"duckduckgo-apikey\">{{ \"apiKey\" | i18n }}</label>\n          <input\n            id=\"duckduckgo-apikey\"\n            class=\"form-control\"\n            type=\"password\"\n            name=\"DuckDuckGoApiKey\"\n            [(ngModel)]=\"usernameOptions.forwardedDuckDuckGoToken\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'anonaddy'\">\n        <div class=\"form-group col-4\">\n          <label for=\"anonaddy-apikey\">{{ \"apiAccessToken\" | i18n }}</label>\n          <input\n            id=\"anonaddy-apikey\"\n            class=\"form-control\"\n            type=\"password\"\n            [(ngModel)]=\"usernameOptions.forwardedAnonAddyApiToken\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"anonaddy-domain\">{{ \"aliasDomain\" | i18n }}</label>\n          <input\n            id=\"anonaddy-domain\"\n            class=\"form-control\"\n            type=\"text\"\n            [(ngModel)]=\"usernameOptions.forwardedAnonAddyDomain\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n        <div class=\"form-group col-4\" *ngIf=\"isSelfHosted\">\n          <label for=\"anonaddy-baseUrl\">{{ \"baseUrl\" | i18n }}</label>\n          <input\n            id=\"anonaddy-baseUrl\"\n            class=\"form-control\"\n            type=\"text\"\n            name=\"AnonAddyDomain\"\n            [(ngModel)]=\"usernameOptions.forwardedAnonAddyBaseUrl\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'firefoxrelay'\">\n        <div class=\"form-group col-4\">\n          <label for=\"firefox-apikey\">{{ \"apiAccessToken\" | i18n }}</label>\n          <input\n            id=\"firefox-apikey\"\n            class=\"form-control\"\n            type=\"password\"\n            [(ngModel)]=\"usernameOptions.forwardedFirefoxApiToken\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'fastmail'\">\n        <div class=\"form-group col-4\">\n          <label for=\"fastmail-apiToken\">{{ \"apiAccessToken\" | i18n }}</label>\n          <input\n            id=\"fastmail-apiToken\"\n            class=\"form-control\"\n            type=\"password\"\n            [(ngModel)]=\"usernameOptions.forwardedFastmailApiToken\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n      <div class=\"row\" *ngIf=\"usernameOptions.forwardedService === 'forwardemail'\">\n        <div class=\"form-group col-4\">\n          <label for=\"forwardemail-apikey\">{{ \"apiAccessToken\" | i18n }}</label>\n          <input\n            id=\"forwardemail-apikey\"\n            class=\"form-control\"\n            type=\"password\"\n            [(ngModel)]=\"usernameOptions.forwardedForwardEmailApiToken\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n        <div class=\"form-group col-4\">\n          <label for=\"forwardemail-domain\">{{ \"aliasDomain\" | i18n }}</label>\n          <input\n            id=\"forwardemail-domain\"\n            class=\"form-control\"\n            type=\"text\"\n            [(ngModel)]=\"usernameOptions.forwardedForwardEmailDomain\"\n            (blur)=\"saveUsernameOptions()\"\n          />\n        </div>\n      </div>\n    </ng-container>\n    <div class=\"row\" *ngIf=\"usernameOptions.type === 'subaddress'\">\n      <div class=\"form-group col-4\">\n        <label for=\"subaddress-email\">{{ \"emailAddress\" | i18n }}</label>\n        <input\n          id=\"subaddress-email\"\n          class=\"form-control\"\n          type=\"text\"\n          [(ngModel)]=\"usernameOptions.subaddressEmail\"\n          (blur)=\"saveUsernameOptions()\"\n        />\n      </div>\n    </div>\n    <div class=\"row\" *ngIf=\"usernameOptions.type === 'catchall'\">\n      <div class=\"form-group col-4\">\n        <label for=\"catchall-domain\">{{ \"domainName\" | i18n }}</label>\n        <input\n          id=\"catchall-domain\"\n          class=\"form-control\"\n          type=\"text\"\n          [(ngModel)]=\"usernameOptions.catchallDomain\"\n          (blur)=\"saveUsernameOptions()\"\n        />\n      </div>\n    </div>\n    <ng-container *ngIf=\"usernameOptions.type === 'word'\">\n      <label class=\"d-block\">{{ \"options\" | i18n }}</label>\n      <div class=\"row\">\n        <div class=\"form-group\">\n          <div class=\"form-check\">\n            <input\n              id=\"capitalizeUsername\"\n              type=\"checkbox\"\n              (change)=\"saveUsernameOptions()\"\n              [(ngModel)]=\"usernameOptions.wordCapitalize\"\n            />\n            <label for=\"capitalizeUsername\" class=\"form-check-label\">{{\n              \"capitalize\" | i18n\n            }}</label>\n          </div>\n          <div class=\"form-check\">\n            <input\n              id=\"includeNumberUsername\"\n              type=\"checkbox\"\n              (change)=\"saveUsernameOptions()\"\n              [(ngModel)]=\"usernameOptions.wordIncludeNumber\"\n            />\n            <label for=\"includeNumberUsername\" class=\"form-check-label\">{{\n              \"includeNumber\" | i18n\n            }}</label>\n          </div>\n        </div>\n      </div>\n    </ng-container>\n    <div #form [appApiAction]=\"usernameGeneratingPromise\">\n      <button\n        type=\"button\"\n        class=\"btn btn-submit btn-primary\"\n        (click)=\"$any(form).loading ? false : regenerate()\"\n        [attr.aria-disabled]=\"$any(form).loading ? 'true' : null\"\n      >\n        <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n        <span>{{ \"regenerateUsername\" | i18n }}</span>\n      </button>\n      <button type=\"button\" class=\"btn btn-outline-secondary\" (click)=\"copy()\">\n        {{ \"copyUsername\" | i18n }}\n      </button>\n    </div>\n  </ng-container>\n  <ng-template #historyTemplate></ng-template>\n</bit-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, NgZone } from \"@angular/core\";\nimport { ActivatedRoute } from \"@angular/router\";\n\nimport { GeneratorComponent as BaseGeneratorComponent } from \"@bitwarden/angular/tools/generator/components/generator.component\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport {\n  PasswordGenerationServiceAbstraction,\n  UsernameGenerationServiceAbstraction,\n} from \"@bitwarden/generator-legacy\";\n\nimport { PasswordGeneratorHistoryComponent } from \"./password-generator-history.component\";\n\n@Component({\n  selector: \"app-generator\",\n  templateUrl: \"generator.component.html\",\n})\nexport class GeneratorComponent extends BaseGeneratorComponent {\n  constructor(\n    passwordGenerationService: PasswordGenerationServiceAbstraction,\n    usernameGenerationService: UsernameGenerationServiceAbstraction,\n    accountService: AccountService,\n    platformUtilsService: PlatformUtilsService,\n    i18nService: I18nService,\n    logService: LogService,\n    route: ActivatedRoute,\n    ngZone: NgZone,\n    private dialogService: DialogService,\n    toastService: ToastService,\n  ) {\n    super(\n      passwordGenerationService,\n      usernameGenerationService,\n      platformUtilsService,\n      accountService,\n      i18nService,\n      logService,\n      route,\n      ngZone,\n      window,\n      toastService,\n    );\n    if (platformUtilsService.isSelfHost()) {\n      // Allow only valid email forwarders for self host\n      this.forwardOptions = this.forwardOptions.filter((forwarder) => forwarder.validForSelfHosted);\n    }\n  }\n\n  get isSelfHosted(): boolean {\n    return this.platformUtilsService.isSelfHost();\n  }\n\n  async history() {\n    this.dialogService.open(PasswordGeneratorHistoryComponent);\n  }\n\n  lengthChanged() {\n    document.getElementById(\"length\").focus();\n  }\n\n  minNumberChanged() {\n    document.getElementById(\"min-number\").focus();\n  }\n\n  minSpecialChanged() {\n    document.getElementById(\"min-special\").focus();\n  }\n}\n","import { Component } from \"@angular/core\";\n\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\n\nimport { SharedModule } from \"../../shared\";\n\n@Component({\n  selector: \"app-send-access-explainer\",\n  templateUrl: \"send-access-explainer.component.html\",\n  standalone: true,\n  imports: [SharedModule],\n})\nexport class SendAccessExplainerComponent {\n  // TODO: remove when email verification flag is removed\n  registerRoute$ = this.registerRouteService.registerRoute$();\n  constructor(private registerRouteService: RegisterRouteService) {}\n}\n","<div class=\"tw-text-center tw-text-muted\">\n  <p bitTypography=\"body2\" class=\"tw-mb-0\">\n    {{ \"sendAccessTaglineProductDesc\" | i18n }}\n  </p>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n  BehaviorSubject,\n  Subject,\n  firstValueFrom,\n  mergeMap,\n  from,\n  switchMap,\n  takeUntil,\n} from \"rxjs\";\n\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Directive()\nexport class SendComponent implements OnInit, OnDestroy {\n  disableSend = false;\n  sendType = SendType;\n  loaded = false;\n  loading = true;\n  refreshing = false;\n  expired = false;\n  type: SendType = null;\n  sends: SendView[] = [];\n  selectedType: SendType;\n  selectedAll: boolean;\n  filter: (cipher: SendView) => boolean;\n  searchPending = false;\n  hasSearched = false; // search() function called - returns true if text qualifies for search\n\n  actionPromise: any;\n  onSuccessfulRemovePassword: () => Promise<any>;\n  onSuccessfulDelete: () => Promise<any>;\n  onSuccessfulLoad: () => Promise<any>;\n\n  private searchTimeout: any;\n  private destroy$ = new Subject<void>();\n  private _filteredSends: SendView[];\n  private _searchText$ = new BehaviorSubject<string>(\"\");\n  protected isSearchable: boolean = false;\n\n  get filteredSends(): SendView[] {\n    return this._filteredSends;\n  }\n\n  set filteredSends(filteredSends: SendView[]) {\n    this._filteredSends = filteredSends;\n  }\n\n  get searchText() {\n    return this._searchText$.value;\n  }\n\n  set searchText(value: string) {\n    this._searchText$.next(value);\n  }\n\n  constructor(\n    protected sendService: SendService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected environmentService: EnvironmentService,\n    protected ngZone: NgZone,\n    protected searchService: SearchService,\n    protected policyService: PolicyService,\n    private logService: LogService,\n    protected sendApiService: SendApiService,\n    protected dialogService: DialogService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.DisableSend)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((policyAppliesToActiveUser) => {\n        this.disableSend = policyAppliesToActiveUser;\n      });\n\n    this._searchText$\n      .pipe(\n        switchMap((searchText) => from(this.searchService.isSearchable(searchText))),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((isSearchable) => {\n        this.isSearchable = isSearchable;\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async load(filter: (send: SendView) => boolean = null) {\n    this.loading = true;\n    this.sendService.sendViews$\n      .pipe(\n        mergeMap(async (sends) => {\n          this.sends = sends;\n          await this.search(null);\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n    if (this.onSuccessfulLoad != null) {\n      await this.onSuccessfulLoad();\n    } else {\n      // Default action\n      this.selectAll();\n    }\n    this.loading = false;\n    this.loaded = true;\n  }\n\n  async reload(filter: (send: SendView) => boolean = null) {\n    this.loaded = false;\n    this.sends = [];\n    await this.load(filter);\n  }\n\n  async refresh() {\n    try {\n      this.refreshing = true;\n      await this.reload(this.filter);\n    } finally {\n      this.refreshing = false;\n    }\n  }\n\n  async applyFilter(filter: (send: SendView) => boolean = null) {\n    this.filter = filter;\n    await this.search(null);\n  }\n\n  async search(timeout: number = null) {\n    this.searchPending = false;\n    if (this.searchTimeout != null) {\n      clearTimeout(this.searchTimeout);\n    }\n    if (timeout == null) {\n      this.hasSearched = this.isSearchable;\n      this.filteredSends = this.sends.filter((s) => this.filter == null || this.filter(s));\n      this.applyTextSearch();\n      return;\n    }\n    this.searchPending = true;\n    this.searchTimeout = setTimeout(async () => {\n      this.hasSearched = this.isSearchable;\n      this.filteredSends = this.sends.filter((s) => this.filter == null || this.filter(s));\n      this.applyTextSearch();\n      this.searchPending = false;\n    }, timeout);\n  }\n\n  async removePassword(s: SendView): Promise<boolean> {\n    if (this.actionPromise != null || s.password == null) {\n      return;\n    }\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"removePassword\" },\n      content: { key: \"removePasswordConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.actionPromise = this.sendApiService.removePassword(s.id);\n      await this.actionPromise;\n      if (this.onSuccessfulRemovePassword != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulRemovePassword();\n      } else {\n        // Default actions\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"removedPassword\"),\n        });\n        await this.load();\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n    this.actionPromise = null;\n  }\n\n  async delete(s: SendView): Promise<boolean> {\n    if (this.actionPromise != null) {\n      return false;\n    }\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteSend\" },\n      content: { key: \"deleteSendConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.actionPromise = this.sendApiService.delete(s.id);\n      await this.actionPromise;\n\n      if (this.onSuccessfulDelete != null) {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.onSuccessfulDelete();\n      } else {\n        // Default actions\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"deletedSend\"),\n        });\n        await this.refresh();\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n    this.actionPromise = null;\n    return true;\n  }\n\n  async copy(s: SendView) {\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const link = env.getSendUrl() + s.accessId + \"/\" + s.urlB64Key;\n    this.platformUtilsService.copyToClipboard(link);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(\"sendLink\")),\n    });\n  }\n\n  searchTextChanged() {\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.search(200);\n  }\n\n  selectAll() {\n    this.clearSelections();\n    this.selectedAll = true;\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.applyFilter(null);\n  }\n\n  selectType(type: SendType) {\n    this.clearSelections();\n    this.selectedType = type;\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.applyFilter((s) => s.type === type);\n  }\n\n  clearSelections() {\n    this.selectedAll = false;\n    this.selectedType = null;\n  }\n\n  private applyTextSearch() {\n    if (this.searchText != null) {\n      this.filteredSends = this.searchService.searchSends(this.filteredSends, this.searchText);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe } from \"@angular/common\";\nimport { Directive, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport {\n  Subject,\n  firstValueFrom,\n  takeUntil,\n  map,\n  BehaviorSubject,\n  concatMap,\n  switchMap,\n} from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { SendType } from \"@bitwarden/common/tools/send/enums/send-type\";\nimport { Send } from \"@bitwarden/common/tools/send/models/domain/send\";\nimport { SendFileView } from \"@bitwarden/common/tools/send/models/view/send-file.view\";\nimport { SendTextView } from \"@bitwarden/common/tools/send/models/view/send-text.view\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n// Value = hours\nenum DatePreset {\n  OneHour = 1,\n  OneDay = 24,\n  TwoDays = 48,\n  ThreeDays = 72,\n  SevenDays = 168,\n  ThirtyDays = 720,\n  Custom = 0,\n  Never = null,\n}\n\ninterface DatePresetSelectOption {\n  name: string;\n  value: DatePreset;\n}\n\n@Directive()\nexport class AddEditComponent implements OnInit, OnDestroy {\n  @Input() sendId: string;\n  @Input() type: SendType;\n\n  @Output() onSavedSend = new EventEmitter<SendView>();\n  @Output() onDeletedSend = new EventEmitter<SendView>();\n  @Output() onCancelled = new EventEmitter<SendView>();\n\n  deletionDatePresets: DatePresetSelectOption[] = [\n    { name: this.i18nService.t(\"oneHour\"), value: DatePreset.OneHour },\n    { name: this.i18nService.t(\"oneDay\"), value: DatePreset.OneDay },\n    { name: this.i18nService.t(\"days\", \"2\"), value: DatePreset.TwoDays },\n    { name: this.i18nService.t(\"days\", \"3\"), value: DatePreset.ThreeDays },\n    { name: this.i18nService.t(\"days\", \"7\"), value: DatePreset.SevenDays },\n    { name: this.i18nService.t(\"days\", \"30\"), value: DatePreset.ThirtyDays },\n    { name: this.i18nService.t(\"custom\"), value: DatePreset.Custom },\n  ];\n\n  expirationDatePresets: DatePresetSelectOption[] = [\n    { name: this.i18nService.t(\"never\"), value: DatePreset.Never },\n    ...this.deletionDatePresets,\n  ];\n\n  copyLink = false;\n  disableSend = false;\n  disableHideEmail = false;\n  send: SendView;\n  hasPassword: boolean;\n  showPassword = false;\n  formPromise: Promise<any>;\n  deletePromise: Promise<any>;\n  sendType = SendType;\n  typeOptions: any[];\n  canAccessPremium = true;\n  emailVerified = true;\n  alertShown = false;\n  showOptions = false;\n\n  protected componentName = \"\";\n  private sendLinkBaseUrl: string;\n  private destroy$ = new Subject<void>();\n\n  protected formGroup = this.formBuilder.group({\n    name: [\"\", Validators.required],\n    text: [],\n    textHidden: [false],\n    fileContents: [],\n    file: [null, Validators.required],\n    link: [],\n    copyLink: false,\n    maxAccessCount: [],\n    accessCount: [],\n    password: [],\n    notes: [],\n    hideEmail: false,\n    disabled: false,\n    type: [],\n    defaultExpirationDateTime: [],\n    defaultDeletionDateTime: [\"\", Validators.required],\n    selectedDeletionDatePreset: [DatePreset.SevenDays, Validators.required],\n    selectedExpirationDatePreset: [],\n  });\n\n  constructor(\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected environmentService: EnvironmentService,\n    protected datePipe: DatePipe,\n    protected sendService: SendService,\n    protected messagingService: MessagingService,\n    protected policyService: PolicyService,\n    protected logService: LogService,\n    protected stateService: StateService,\n    protected sendApiService: SendApiService,\n    protected dialogService: DialogService,\n    protected formBuilder: FormBuilder,\n    protected billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {\n    this.typeOptions = [\n      { name: i18nService.t(\"sendTypeFile\"), value: SendType.File, premium: true },\n      { name: i18nService.t(\"sendTypeText\"), value: SendType.Text, premium: false },\n    ];\n  }\n\n  get link(): string {\n    if (this.send != null && this.send.id != null && this.send.accessId != null) {\n      return this.sendLinkBaseUrl + this.send.accessId + \"/\" + this.send.urlB64Key;\n    }\n    return null;\n  }\n\n  get isSafari() {\n    return this.platformUtilsService.isSafari();\n  }\n\n  get isDateTimeLocalSupported(): boolean {\n    return !(this.platformUtilsService.isFirefox() || this.platformUtilsService.isSafari());\n  }\n\n  async ngOnInit() {\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.DisableSend)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((policyAppliesToActiveUser) => {\n        this.disableSend = policyAppliesToActiveUser;\n        if (this.disableSend) {\n          this.formGroup.disable();\n        }\n      });\n\n    this.policyService\n      .getAll$(PolicyType.SendOptions)\n      .pipe(\n        map((policies) => policies?.some((p) => p.data.disableHideEmail)),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((policyAppliesToActiveUser) => {\n        if (\n          (this.disableHideEmail = policyAppliesToActiveUser) &&\n          !this.formGroup.controls.hideEmail.value\n        ) {\n          this.formGroup.controls.hideEmail.disable();\n        } else {\n          this.formGroup.controls.hideEmail.enable();\n        }\n      });\n\n    this.formGroup.controls.type.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((val) => {\n      this.type = val;\n      this.typeChanged();\n    });\n\n    this.formGroup.controls.selectedDeletionDatePreset.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((datePreset) => {\n        datePreset === DatePreset.Custom\n          ? this.formGroup.controls.defaultDeletionDateTime.enable()\n          : this.formGroup.controls.defaultDeletionDateTime.disable();\n      });\n\n    this.formGroup.controls.hideEmail.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((val) => {\n        if (!val && this.disableHideEmail && this.formGroup.controls.hideEmail.enabled) {\n          this.formGroup.controls.hideEmail.disable();\n        }\n      });\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n    this.sendLinkBaseUrl = env.getSendUrl();\n\n    this.accountService.activeAccount$\n      .pipe(\n        switchMap((account) =>\n          this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n        ),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((hasPremiumFromAnySource) => {\n        this.canAccessPremium = hasPremiumFromAnySource;\n      });\n\n    await this.load();\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  get editMode(): boolean {\n    return this.sendId != null;\n  }\n\n  get title(): string {\n    return this.i18nService.t(this.editMode ? \"editSend\" : \"createSend\");\n  }\n\n  async load() {\n    this.emailVerified = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.emailVerified ?? false)),\n    );\n\n    this.type = !this.canAccessPremium || !this.emailVerified ? SendType.Text : SendType.File;\n    if (this.send == null) {\n      const send = new BehaviorSubject<SendView>(this.send);\n      send.subscribe({\n        next: (decryptedSend: SendView | undefined) => {\n          if (!(decryptedSend instanceof SendView)) {\n            return;\n          }\n\n          this.send = decryptedSend;\n          decryptedSend.type = decryptedSend.type ?? this.type;\n          this.type = this.send.type;\n          this.updateFormValues();\n          this.hasPassword = this.send.password != null && this.send.password.trim() !== \"\";\n        },\n        error: (error: unknown) => {\n          const errorMessage = (error as Error).message ?? \"An unknown error occurred\";\n          this.logService.error(\"Failed to decrypt send: \" + errorMessage);\n        },\n      });\n\n      if (this.editMode) {\n        this.sendService\n          .get$(this.sendId)\n          .pipe(\n            //Promise.reject will complete the BehaviourSubject, if desktop starts relying only on BehaviourSubject, this should be changed.\n            concatMap((s) =>\n              s instanceof Send ? s.decrypt() : Promise.reject(new Error(\"Failed to load send.\")),\n            ),\n            takeUntil(this.destroy$),\n          )\n          .subscribe(send);\n      } else {\n        const sendView = new SendView();\n        sendView.type = this.type;\n        sendView.file = new SendFileView();\n        sendView.text = new SendTextView();\n        sendView.deletionDate = new Date();\n        sendView.deletionDate.setDate(sendView.deletionDate.getDate() + 7);\n        send.next(sendView);\n      }\n    }\n  }\n\n  async submit(): Promise<boolean> {\n    this.formGroup.markAllAsTouched();\n\n    if (this.disableSend) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"sendDisabledWarning\"),\n      });\n      return false;\n    }\n\n    this.send.name = this.formGroup.controls.name.value;\n    this.send.text.text = this.formGroup.controls.text.value;\n    this.send.text.hidden = this.formGroup.controls.textHidden.value;\n    this.send.maxAccessCount = this.formGroup.controls.maxAccessCount.value;\n    this.send.accessCount = this.formGroup.controls.accessCount.value;\n    this.send.password = this.formGroup.controls.password.value;\n    this.send.notes = this.formGroup.controls.notes.value;\n    this.send.hideEmail = this.formGroup.controls.hideEmail.value;\n    this.send.disabled = this.formGroup.controls.disabled.value;\n    this.send.type = this.type;\n\n    if (Utils.isNullOrWhitespace(this.send.name)) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"nameRequired\"),\n      });\n      return false;\n    }\n\n    let file: File = null;\n    if (this.type === SendType.File && !this.editMode) {\n      const fileEl = document.getElementById(\"file\") as HTMLInputElement;\n      const files = fileEl.files;\n      if (files == null || files.length === 0) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: this.i18nService.t(\"errorOccurred\"),\n          message: this.i18nService.t(\"selectFile\"),\n        });\n        return;\n      }\n\n      file = files[0];\n      if (files[0].size > 524288000) {\n        // 500 MB\n        this.toastService.showToast({\n          variant: \"error\",\n          title: this.i18nService.t(\"errorOccurred\"),\n          message: this.i18nService.t(\"maxFileSize\"),\n        });\n        return;\n      }\n    }\n\n    if (Utils.isNullOrWhitespace(this.send.password)) {\n      this.send.password = null;\n    }\n\n    this.formPromise = this.encryptSend(file).then(async (encSend) => {\n      const uploadPromise = this.sendApiService.save(encSend);\n      await uploadPromise;\n      if (this.send.id == null) {\n        this.send.id = encSend[0].id;\n      }\n      if (this.send.accessId == null) {\n        this.send.accessId = encSend[0].accessId;\n      }\n      this.onSavedSend.emit(this.send);\n      if (this.formGroup.controls.copyLink.value && this.link != null) {\n        await this.handleCopyLinkToClipboard();\n        return;\n      }\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(this.editMode ? \"editedSend\" : \"createdSend\"),\n      });\n    });\n    try {\n      await this.formPromise;\n      return true;\n    } catch (e) {\n      this.logService.error(e);\n    }\n    return false;\n  }\n\n  async copyLinkToClipboard(link: string): Promise<void | boolean> {\n    return Promise.resolve(this.platformUtilsService.copyToClipboard(link));\n  }\n\n  protected async delete(): Promise<boolean> {\n    if (this.deletePromise != null) {\n      return false;\n    }\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteSend\" },\n      content: { key: \"deleteSendConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      this.deletePromise = this.sendApiService.delete(this.send.id);\n      await this.deletePromise;\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"deletedSend\"),\n      });\n      await this.load();\n      this.onDeletedSend.emit(this.send);\n      return true;\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return false;\n  }\n\n  typeChanged() {\n    if (this.type === SendType.File && !this.alertShown) {\n      if (!this.canAccessPremium) {\n        this.alertShown = true;\n        this.messagingService.send(\"premiumRequired\");\n      } else if (!this.emailVerified) {\n        this.alertShown = true;\n        this.messagingService.send(\"emailVerificationRequired\");\n      }\n    }\n    this.type === SendType.Text || this.editMode\n      ? this.formGroup.controls.file.disable()\n      : this.formGroup.controls.file.enable();\n  }\n\n  toggleOptions() {\n    this.showOptions = !this.showOptions;\n  }\n\n  protected loadSend(): Promise<Send> {\n    return firstValueFrom(this.sendService.get$(this.sendId));\n  }\n\n  protected async encryptSend(file: File): Promise<[Send, EncArrayBuffer]> {\n    const sendData = await this.sendService.encrypt(this.send, file, this.send.password, null);\n\n    // Parse dates\n    try {\n      sendData[0].deletionDate =\n        this.formattedDeletionDate == null ? null : new Date(this.formattedDeletionDate);\n    } catch {\n      sendData[0].deletionDate = null;\n    }\n    try {\n      sendData[0].expirationDate =\n        this.formattedExpirationDate == null ? null : new Date(this.formattedExpirationDate);\n    } catch {\n      sendData[0].expirationDate = null;\n    }\n\n    return sendData;\n  }\n\n  protected togglePasswordVisible() {\n    this.showPassword = !this.showPassword;\n    document.getElementById(\"password\").focus();\n  }\n\n  updateFormValues() {\n    this.formGroup.patchValue({\n      name: this.send?.name ?? \"\",\n      text: this.send?.text?.text ?? \"\",\n      textHidden: this.send?.text?.hidden ?? false,\n      link: this.link ?? \"\",\n      maxAccessCount: this.send?.maxAccessCount,\n      accessCount: this.send?.accessCount ?? 0,\n      notes: this.send?.notes ?? \"\",\n      hideEmail: this.send?.hideEmail ?? false,\n      disabled: this.send?.disabled ?? false,\n      type: this.send.type ?? this.type,\n      password: null,\n\n      selectedDeletionDatePreset: this.editMode ? DatePreset.Custom : DatePreset.SevenDays,\n      selectedExpirationDatePreset: this.editMode ? DatePreset.Custom : DatePreset.Never,\n      defaultExpirationDateTime:\n        this.send.expirationDate != null\n          ? this.datePipe.transform(new Date(this.send.expirationDate), \"yyyy-MM-ddTHH:mm\")\n          : null,\n      defaultDeletionDateTime: this.datePipe.transform(\n        new Date(this.send.deletionDate),\n        \"yyyy-MM-ddTHH:mm\",\n      ),\n    });\n\n    if (this.send.hideEmail) {\n      this.formGroup.controls.hideEmail.enable();\n    }\n  }\n\n  private async handleCopyLinkToClipboard() {\n    const copySuccess = await this.copyLinkToClipboard(this.link);\n    if (copySuccess ?? true) {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(this.editMode ? \"editedSend\" : \"createdSend\"),\n      });\n    } else {\n      await this.dialogService.openSimpleDialog({\n        title: \"\",\n        content: { key: this.editMode ? \"editedSend\" : \"createdSend\" },\n        acceptButtonText: { key: \"ok\" },\n        cancelButtonText: null,\n        type: \"success\",\n      });\n\n      await this.copyLinkToClipboard(this.link);\n    }\n  }\n\n  clearExpiration() {\n    this.formGroup.controls.defaultExpirationDateTime.patchValue(null);\n  }\n\n  get formattedExpirationDate(): string {\n    switch (this.formGroup.controls.selectedExpirationDatePreset.value as DatePreset) {\n      case DatePreset.Never:\n        return null;\n      case DatePreset.Custom:\n        if (!this.formGroup.controls.defaultExpirationDateTime.value) {\n          return null;\n        }\n        return this.formGroup.controls.defaultExpirationDateTime.value;\n      default: {\n        const now = new Date();\n        const milliseconds = now.setTime(\n          now.getTime() +\n            (this.formGroup.controls.selectedExpirationDatePreset.value as number) * 60 * 60 * 1000,\n        );\n        return new Date(milliseconds).toString();\n      }\n    }\n  }\n\n  get formattedDeletionDate(): string {\n    switch (this.formGroup.controls.selectedDeletionDatePreset.value as DatePreset) {\n      case DatePreset.Never:\n        this.formGroup.controls.selectedDeletionDatePreset.patchValue(DatePreset.SevenDays);\n        return this.formattedDeletionDate;\n      case DatePreset.Custom:\n        return this.formGroup.controls.defaultDeletionDateTime.value;\n      default: {\n        const now = new Date();\n        const milliseconds = now.setTime(\n          now.getTime() +\n            (this.formGroup.controls.selectedDeletionDatePreset.value as number) * 60 * 60 * 1000,\n        );\n        return new Date(milliseconds).toString();\n      }\n    }\n  }\n}\n","<form\n  [formGroup]=\"formGroup\"\n  [bitSubmit]=\"submitAndClose\"\n  [appApiAction]=\"formPromise\"\n  autocomplete=\"off\"\n>\n  <bit-dialog dialogSize=\"large\">\n    <span bitDialogTitle>\n      {{ title }}\n    </span>\n    <span bitDialogContent *ngIf=\"send\">\n      <bit-callout *ngIf=\"disableSend\">\n        {{ \"sendDisabledWarning\" | i18n }}\n      </bit-callout>\n      <bit-callout *ngIf=\"!disableSend && disableHideEmail\">\n        {{ \"sendOptionsPolicyInEffect\" | i18n }}\n        <ul class=\"tw-mb-0\">\n          <li>{{ \"sendDisableHideEmailInEffect\" | i18n }}</li>\n        </ul>\n      </bit-callout>\n      <bit-form-field class=\"tw-w-1/2\">\n        <bit-label for=\"name\">{{ \"name\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"name\" />\n        <bit-hint>{{ \"sendNameDesc\" | i18n }}</bit-hint>\n      </bit-form-field>\n      <div class=\"tw-flex\" *ngIf=\"!editMode\">\n        <bit-radio-group formControlName=\"type\">\n          <bit-label>{{ \"whatTypeOfSend\" | i18n }}</bit-label>\n\n          <bit-radio-button\n            *ngFor=\"let o of typeOptions\"\n            id=\"type_{{ o.value }}\"\n            class=\"tw-block\"\n            [value]=\"o.value\"\n            [disabled]=\"!canAccessPremium && o.premium\"\n          >\n            <bit-label>\n              {{ o.name }}\n              <app-premium-badge\n                class=\"tw-mx-1\"\n                *ngIf=\"!canAccessPremium && o.premium\"\n                slot=\"end\"\n              ></app-premium-badge>\n            </bit-label>\n          </bit-radio-button>\n        </bit-radio-group>\n      </div>\n      <!-- Text -->\n      <ng-container *ngIf=\"type === sendType.Text\">\n        <bit-form-field>\n          <bit-label for=\"text\">{{ \"sendTypeText\" | i18n }}</bit-label>\n          <textarea bitInput id=\"text\" rows=\"6\" formControlName=\"text\"></textarea>\n          <bit-hint>{{ \"sendTextDesc\" | i18n }}</bit-hint>\n        </bit-form-field>\n        <bit-form-control>\n          <input bitCheckbox type=\"checkbox\" formControlName=\"textHidden\" />\n          <bit-label>{{ \"textHiddenByDefault\" | i18n }}</bit-label>\n        </bit-form-control>\n      </ng-container>\n      <!-- File -->\n      <ng-container *ngIf=\"type === sendType.File\">\n        <div class=\"tw-flex\">\n          <div *ngIf=\"editMode\">\n            <bit-label>{{ \"file\" | i18n }}</bit-label>\n            <p bitTypography=\"body1\" class=\"tw-mb-0\">\n              {{ send.file.fileName }} ({{ send.file.sizeName }})\n            </p>\n          </div>\n          <bit-form-field *ngIf=\"!editMode\">\n            <bit-label>{{ \"file\" | i18n }}</bit-label>\n            <div>\n              <button bitButton type=\"button\" buttonType=\"secondary\" (click)=\"fileSelector.click()\">\n                {{ \"chooseFile\" | i18n }}\n              </button>\n              {{ selectedFile?.name ?? (\"noFileChosen\" | i18n) }}\n            </div>\n            <input\n              bitInput\n              #fileSelector\n              type=\"file\"\n              id=\"file\"\n              name=\"file\"\n              formControlName=\"file\"\n              (change)=\"setSelectedFile($event)\"\n              hidden\n              class=\"tw-hidden\"\n            />\n            <bit-hint>{{ \"sendFileDesc\" | i18n }} {{ \"maxFileSize\" | i18n }}</bit-hint>\n          </bit-form-field>\n        </div>\n      </ng-container>\n      <h4 bitTypography=\"h4\" class=\"tw-mt-5\">{{ \"share\" | i18n }}</h4>\n\n      <bit-form-field *ngIf=\"link\">\n        <bit-label for=\"link\">{{ \"sendLinkLabel\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" readonly formControlName=\"link\" />\n      </bit-form-field>\n\n      <bit-form-control>\n        <input bitCheckbox type=\"checkbox\" formControlName=\"copyLink\" />\n        <bit-label>{{ \"copySendLinkOnSave\" | i18n }}</bit-label>\n      </bit-form-control>\n      <div class=\"tw-mt-5 tw-flex\" (click)=\"toggleOptions()\">\n        <h4 bitTypography=\"h4\" class=\"tw-mb-0 tw-mr-2\">\n          <button type=\"button\" bitLink appStopClick [attr.aria-expanded]=\"showOptions\">\n            <i\n              class=\"bwi\"\n              aria-hidden=\"true\"\n              [ngClass]=\"{ 'bwi-angle-right': !showOptions, 'bwi-angle-down': showOptions }\"\n            ></i>\n            {{ \"options\" | i18n }}\n          </button>\n        </h4>\n      </div>\n      <div id=\"options\" [hidden]=\"!showOptions\">\n        <div class=\"tw-flex\">\n          <div *ngIf=\"!editMode\" class=\"tw-w-1/2 tw-pr-3\">\n            <bit-form-field>\n              <bit-label for=\"deletionDate\">{{ \"deletionDate\" | i18n }}</bit-label>\n              <bit-select\n                id=\"deletionDate\"\n                name=\"SelectedDeletionDatePreset\"\n                formControlName=\"selectedDeletionDatePreset\"\n              >\n                <bit-option\n                  *ngFor=\"let o of deletionDatePresets\"\n                  [value]=\"o.value\"\n                  [label]=\"o.name\"\n                ></bit-option>\n              </bit-select>\n              <ng-container *ngIf=\"formGroup.controls['selectedDeletionDatePreset'].value === 0\">\n                <input\n                  bitInput\n                  id=\"deletionDateCustom\"\n                  type=\"datetime-local\"\n                  name=\"DeletionDate\"\n                  formControlName=\"defaultDeletionDateTime\"\n                  placeholder=\"MM/DD/YYYY HH:MM AM/PM\"\n                />\n              </ng-container>\n              <bit-hint>{{ \"deletionDateDesc\" | i18n }}</bit-hint>\n            </bit-form-field>\n          </div>\n          <div *ngIf=\"editMode\" class=\"tw-w-1/2 tw-pr-3\">\n            <bit-form-field>\n              <bit-label for=\"deletionDate\">{{ \"deletionDate\" | i18n }}</bit-label>\n              <input\n                bitInput\n                id=\"deletionDateCustom\"\n                type=\"datetime-local\"\n                name=\"DeletionDate\"\n                formControlName=\"defaultDeletionDateTime\"\n                placeholder=\"MM/DD/YYYY HH:MM AM/PM\"\n              />\n              <bit-hint>{{ \"deletionDateDesc\" | i18n }}</bit-hint>\n            </bit-form-field>\n          </div>\n          <div *ngIf=\"!editMode\" class=\"tw-w-1/2 tw-pl-3\">\n            <bit-form-field>\n              <bit-label for=\"expirationDate\">\n                {{ \"expirationDate\" | i18n }}\n              </bit-label>\n              <bit-select\n                bitInput\n                id=\"expirationDate\"\n                name=\"SelectedExpirationDatePreset\"\n                formControlName=\"selectedExpirationDatePreset\"\n              >\n                <bit-option\n                  *ngFor=\"let e of expirationDatePresets\"\n                  [value]=\"e.value\"\n                  [label]=\"e.name\"\n                ></bit-option>\n              </bit-select>\n              <ng-container *ngIf=\"formGroup.controls['selectedExpirationDatePreset'].value === 0\">\n                <input\n                  bitInput\n                  id=\"expirationDateCustom\"\n                  type=\"datetime-local\"\n                  name=\"ExpirationDate\"\n                  formControlName=\"defaultExpirationDateTime\"\n                  placeholder=\"MM/DD/YYYY HH:MM AM/PM\"\n                />\n              </ng-container>\n              <bit-hint>{{ \"expirationDateDesc\" | i18n }}</bit-hint>\n            </bit-form-field>\n          </div>\n          <div *ngIf=\"editMode\" class=\"tw-w-1/2 tw-pl-3\">\n            <bit-form-field>\n              <bit-label class=\"tw-flex\" for=\"expirationDate\">\n                {{ \"expirationDate\" | i18n }}\n\n                <button\n                  type=\"button\"\n                  bitLink\n                  appStopClick\n                  (click)=\"clearExpiration()\"\n                  *ngIf=\"!disableSend\"\n                  class=\"tw-ml-auto\"\n                  slot=\"end\"\n                >\n                  {{ \"clear\" | i18n }}\n                </button>\n              </bit-label>\n              <input\n                bitInput\n                id=\"expirationDateCustom\"\n                type=\"datetime-local\"\n                name=\"ExpirationDate\"\n                formControlName=\"defaultExpirationDateTime\"\n                placeholder=\"MM/DD/YYYY HH:MM AM/PM\"\n              />\n              <bit-hint>{{ \"expirationDateDesc\" | i18n }}</bit-hint>\n            </bit-form-field>\n          </div>\n        </div>\n        <div class=\"tw-flex\">\n          <bit-form-field class=\"tw-w-1/2 tw-pr-3\">\n            <bit-label for=\"maxAccessCount\">{{ \"maxAccessCount\" | i18n }}</bit-label>\n            <input bitInput type=\"number\" formControlName=\"maxAccessCount\" min=\"1\" />\n            <bit-hint>{{ \"maxAccessCountDesc\" | i18n }}</bit-hint>\n          </bit-form-field>\n          <bit-form-field class=\"tw-w-1/2 tw-pl-3\" *ngIf=\"editMode\">\n            <bit-label for=\"accessCount\">{{ \"currentAccessCount\" | i18n }}</bit-label>\n            <input bitInput type=\"text\" formControlName=\"accessCount\" readonly />\n          </bit-form-field>\n        </div>\n        <div class=\"tw-flex\">\n          <bit-form-field class=\"tw-w-1/2 tw-pr-3\">\n            <bit-label for=\"password\" *ngIf=\"!hasPassword\">{{ \"password\" | i18n }}</bit-label>\n            <bit-label for=\"password\" *ngIf=\"hasPassword\">{{ \"newPassword\" | i18n }}</bit-label>\n\n            <input\n              bitInput\n              type=\"password\"\n              formControlName=\"password\"\n              autocomplete=\"new-password\"\n            />\n            <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n            <bit-hint>{{ \"sendPasswordDesc\" | i18n }}</bit-hint>\n          </bit-form-field>\n        </div>\n        <bit-form-field>\n          <bit-label>{{ \"notes\" | i18n }}</bit-label>\n          <textarea bitInput formControlName=\"notes\" rows=\"6\"></textarea>\n          <bit-hint>{{ \"sendNotesDesc\" | i18n }}</bit-hint>\n        </bit-form-field>\n\n        <bit-form-control>\n          <input bitCheckbox type=\"checkbox\" formControlName=\"hideEmail\" />\n          <bit-label>{{ \"hideEmail\" | i18n }}</bit-label>\n        </bit-form-control>\n\n        <bit-form-control>\n          <input bitCheckbox type=\"checkbox\" formControlName=\"disabled\" />\n          <bit-label>{{ \"disableThisSend\" | i18n }}</bit-label>\n        </bit-form-control>\n      </div>\n    </span>\n    <ng-container bitDialogFooter>\n      <button\n        type=\"submit\"\n        bitButton\n        bitFormButton\n        [appA11yTitle]=\"'save' | i18n\"\n        buttonType=\"primary\"\n      >\n        {{ \"save\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        buttonType=\"secondary\"\n        [appA11yTitle]=\"'cancel' | i18n\"\n        bitDialogClose\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n\n      <button\n        *ngIf=\"editMode\"\n        type=\"button\"\n        class=\"tw-ml-auto\"\n        bitIconButton=\"bwi-trash\"\n        buttonType=\"danger\"\n        [appA11yTitle]=\"'delete' | i18n\"\n        [bitAction]=\"deleteAndClose\"\n      ></button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { DatePipe } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\n\nimport { AddEditComponent as BaseAddEditComponent } from \"@bitwarden/angular/tools/send/add-edit.component\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-send-add-edit\",\n  templateUrl: \"add-edit.component.html\",\n})\nexport class AddEditComponent extends BaseAddEditComponent {\n  override componentName = \"app-send-add-edit\";\n  protected selectedFile: File;\n\n  constructor(\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    datePipe: DatePipe,\n    sendService: SendService,\n    stateService: StateService,\n    messagingService: MessagingService,\n    policyService: PolicyService,\n    logService: LogService,\n    sendApiService: SendApiService,\n    dialogService: DialogService,\n    formBuilder: FormBuilder,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected dialogRef: DialogRef,\n    @Inject(DIALOG_DATA) params: { sendId: string },\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      i18nService,\n      platformUtilsService,\n      environmentService,\n      datePipe,\n      sendService,\n      messagingService,\n      policyService,\n      logService,\n      stateService,\n      sendApiService,\n      dialogService,\n      formBuilder,\n      billingAccountProfileStateService,\n      accountService,\n      toastService,\n    );\n\n    this.sendId = params.sendId;\n  }\n\n  async copyLinkToClipboard(link: string): Promise<void | boolean> {\n    // Copy function on web depends on the modal being open or not. Since this event occurs during a transition\n    // of the modal closing we need to add a small delay to make sure state of the DOM is consistent.\n    return new Promise((resolve) => {\n      window.setTimeout(() => resolve(super.copyLinkToClipboard(link)), 500);\n    });\n  }\n\n  protected setSelectedFile(event: Event) {\n    const fileInputEl = <HTMLInputElement>event.target;\n    const file = fileInputEl.files.length > 0 ? fileInputEl.files[0] : null;\n    this.selectedFile = file;\n  }\n\n  submitAndClose = async () => {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    const success = await this.submit();\n    if (success) {\n      this.dialogRef.close();\n    }\n  };\n\n  deleteAndClose = async () => {\n    const success = await this.delete();\n    if (success) {\n      this.dialogRef.close();\n    }\n  };\n}\n","<app-header>\n  <ng-container slot=\"title-suffix\">\n    <small #actionSpinner [appApiAction]=\"actionPromise\">\n      <ng-container *ngIf=\"$any(actionSpinner).loading\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </ng-container>\n    </small>\n  </ng-container>\n\n  <button type=\"button\" bitButton buttonType=\"primary\" (click)=\"addSend()\" [disabled]=\"disableSend\">\n    <i class=\"bwi bwi-plus bwi-fw\" aria-hidden=\"true\"></i>\n    {{ \"createSend\" | i18n }}\n  </button>\n</app-header>\n\n<bit-callout type=\"warning\" title=\"{{ 'sendDisabled' | i18n }}\" *ngIf=\"disableSend\">\n  {{ \"sendDisabledWarning\" | i18n }}\n</bit-callout>\n<div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n  <div class=\"groupings tw-col-span-3\">\n    <div class=\"card vault-filters\">\n      <div class=\"card-header d-flex\">\n        {{ \"filters\" | i18n }}\n      </div>\n      <div class=\"card-body\">\n        <div class=\"tw-mb-4\">\n          <bit-search\n            [(ngModel)]=\"searchText\"\n            [placeholder]=\"'searchSends' | i18n\"\n            (input)=\"searchTextChanged()\"\n            appAutofocus\n          />\n        </div>\n        <div class=\"filter\">\n          <ul class=\"filter-options\">\n            <li class=\"filter-option\" [ngClass]=\"{ active: selectedAll }\">\n              <span class=\"filter-buttons\">\n                <button type=\"button\" class=\"filter-button\" appStopClick (click)=\"selectAll()\">\n                  <i class=\"bwi bwi-fw bwi-filter\"></i>{{ \"allSends\" | i18n }}\n                </button>\n              </span>\n            </li>\n          </ul>\n        </div>\n        <div class=\"filter\">\n          <div class=\"filter-heading\">\n            <h3>{{ \"types\" | i18n }}</h3>\n          </div>\n          <ul class=\"filter-options\">\n            <li class=\"filter-option\" [ngClass]=\"{ active: selectedType === sendType.Text }\">\n              <span class=\"filter-buttons\">\n                <button\n                  type=\"button\"\n                  class=\"filter-button\"\n                  appStopClick\n                  (click)=\"selectType(sendType.Text)\"\n                >\n                  <i class=\"bwi bwi-fw bwi-file-text\"></i>{{ \"sendTypeText\" | i18n }}\n                </button>\n              </span>\n            </li>\n            <li class=\"filter-option\" [ngClass]=\"{ active: selectedType === sendType.File }\">\n              <span class=\"filter-buttons\">\n                <button\n                  type=\"button\"\n                  class=\"filter-button\"\n                  appStopClick\n                  (click)=\"selectType(sendType.File)\"\n                >\n                  <i class=\"bwi bwi-fw bwi-file\"></i>{{ \"sendTypeFile\" | i18n }}\n                </button>\n              </span>\n            </li>\n          </ul>\n        </div>\n      </div>\n    </div>\n  </div>\n  <div class=\"tw-col-span-9\">\n    <!--Listing Table-->\n    <bit-table [dataSource]=\"dataSource\" *ngIf=\"filteredSends && filteredSends.length\">\n      <ng-container header>\n        <tr>\n          <th bitCell bitSortable=\"name\" default>{{ \"name\" | i18n }}</th>\n          <th bitCell bitSortable=\"deletionDate\">{{ \"deletionDate\" | i18n }}</th>\n          <th bitCell>{{ \"options\" | i18n }}</th>\n        </tr>\n      </ng-container>\n      <ng-template body let-rows$>\n        <tr bitRow *ngFor=\"let s of rows$ | async\">\n          <td bitCell (click)=\"editSend(s)\" class=\"tw-cursor-pointer\">\n            <span class=\"tw-mr-2\" aria-hidden=\"true\">\n              <i class=\"bwi bwi-fw bwi-lg bwi-file\" *ngIf=\"s.type == sendType.File\"></i>\n              <i class=\"bwi bwi-fw bwi-lg bwi-file-text\" *ngIf=\"s.type == sendType.Text\"></i>\n            </span>\n            <button type=\"button\" bitLink>\n              {{ s.name }}\n            </button>\n            <ng-container *ngIf=\"s.disabled\">\n              <i\n                class=\"bwi bwi-exclamation-triangle\"\n                appStopProp\n                title=\"{{ 'disabled' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"disabled\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"s.password\">\n              <i\n                class=\"bwi bwi-key\"\n                appStopProp\n                title=\"{{ 'password' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"password\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"s.maxAccessCountReached\">\n              <i\n                class=\"bwi bwi-ban\"\n                appStopProp\n                title=\"{{ 'maxAccessCountReached' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"maxAccessCountReached\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"s.expired\">\n              <i\n                class=\"bwi bwi-clock\"\n                appStopProp\n                title=\"{{ 'expired' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"expired\" | i18n }}</span>\n            </ng-container>\n            <ng-container *ngIf=\"s.pendingDelete\">\n              <i\n                class=\"bwi bwi-trash\"\n                appStopProp\n                title=\"{{ 'pendingDeletion' | i18n }}\"\n                aria-hidden=\"true\"\n              ></i>\n              <span class=\"tw-sr-only\">{{ \"pendingDeletion\" | i18n }}</span>\n            </ng-container>\n          </td>\n          <td bitCell class=\"tw-text-muted\" (click)=\"editSend(s)\" class=\"tw-cursor-pointer\">\n            <small bitTypography=\"body2\" appStopProp>{{ s.deletionDate | date: \"medium\" }}</small>\n          </td>\n          <td bitCell class=\"tw-w-0 tw-text-right\">\n            <button\n              type=\"button\"\n              [bitMenuTriggerFor]=\"sendOptions\"\n              bitIconButton=\"bwi-ellipsis-v\"\n              appA11yTitle=\"{{ 'options' | i18n }}\"\n            ></button>\n            <bit-menu #sendOptions>\n              <button type=\"button\" bitMenuItem (click)=\"copy(s)\">\n                <i class=\"bwi bwi-fw bwi-clone\" aria-hidden=\"true\"></i>\n                {{ \"copySendLink\" | i18n }}\n              </button>\n              <button\n                type=\"button\"\n                bitMenuItem\n                (click)=\"removePassword(s)\"\n                *ngIf=\"s.password && !disableSend\"\n              >\n                <i class=\"bwi bwi-fw bwi-close\" aria-hidden=\"true\"></i>\n                {{ \"removePassword\" | i18n }}\n              </button>\n              <button type=\"button\" bitMenuItem (click)=\"delete(s)\">\n                <span class=\"tw-text-danger\">\n                  <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n                  {{ \"delete\" | i18n }}\n                </span>\n              </button>\n            </bit-menu>\n          </td>\n        </tr>\n      </ng-template>\n    </bit-table>\n    <div class=\"no-items\" *ngIf=\"filteredSends && !filteredSends.length\">\n      <ng-container *ngIf=\"!loaded\">\n        <i\n          class=\"bwi bwi-spinner bwi-spin text-muted\"\n          title=\"{{ 'loading' | i18n }}\"\n          aria-hidden=\"true\"\n        ></i>\n        <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n      </ng-container>\n      <ng-container *ngIf=\"loaded\">\n        <bit-no-items [icon]=\"noItemIcon\" class=\"tw-text-main\">\n          <ng-container slot=\"title\">{{ \"sendsNoItemsTitle\" | i18n }}</ng-container>\n          <ng-container slot=\"description\">{{ \"sendsNoItemsMessage\" | i18n }}</ng-container>\n          <button slot=\"button\" type=\"button\" bitButton buttonType=\"secondary\" (click)=\"addSend()\">\n            <i class=\"bwi bwi-plus\" aria-hidden=\"true\"></i>\n            {{ \"createSend\" | i18n }}\n          </button>\n        </bit-no-items>\n      </ng-container>\n    </div>\n  </div>\n</div>\n<ng-template #sendAddEdit></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, NgZone, ViewChild, OnInit, OnDestroy, ViewContainerRef } from \"@angular/core\";\nimport { lastValueFrom } from \"rxjs\";\n\nimport { SendComponent as BaseSendComponent } from \"@bitwarden/angular/tools/send/send.component\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SendView } from \"@bitwarden/common/tools/send/models/view/send.view\";\nimport { SendApiService } from \"@bitwarden/common/tools/send/services/send-api.service.abstraction\";\nimport { SendService } from \"@bitwarden/common/tools/send/services/send.service.abstraction\";\nimport {\n  DialogService,\n  NoItemsModule,\n  SearchModule,\n  TableDataSource,\n  ToastService,\n} from \"@bitwarden/components\";\nimport { NoSendsIcon } from \"@bitwarden/send-ui\";\n\nimport { HeaderModule } from \"../../layouts/header/header.module\";\nimport { SharedModule } from \"../../shared\";\n\nimport { AddEditComponent } from \"./add-edit.component\";\n\nconst BroadcasterSubscriptionId = \"SendComponent\";\n\n@Component({\n  selector: \"app-send\",\n  standalone: true,\n  imports: [SharedModule, SearchModule, NoItemsModule, HeaderModule],\n  templateUrl: \"send.component.html\",\n})\nexport class SendComponent extends BaseSendComponent implements OnInit, OnDestroy {\n  @ViewChild(\"sendAddEdit\", { read: ViewContainerRef, static: true })\n  sendAddEditModalRef: ViewContainerRef;\n  noItemIcon = NoSendsIcon;\n\n  override set filteredSends(filteredSends: SendView[]) {\n    super.filteredSends = filteredSends;\n    this.dataSource.data = filteredSends;\n  }\n\n  override get filteredSends() {\n    return super.filteredSends;\n  }\n\n  protected dataSource = new TableDataSource<SendView>();\n\n  constructor(\n    sendService: SendService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    environmentService: EnvironmentService,\n    ngZone: NgZone,\n    searchService: SearchService,\n    policyService: PolicyService,\n    private broadcasterService: BroadcasterService,\n    logService: LogService,\n    sendApiService: SendApiService,\n    dialogService: DialogService,\n    toastService: ToastService,\n  ) {\n    super(\n      sendService,\n      i18nService,\n      platformUtilsService,\n      environmentService,\n      ngZone,\n      searchService,\n      policyService,\n      logService,\n      sendApiService,\n      dialogService,\n      toastService,\n    );\n  }\n\n  async ngOnInit() {\n    await super.ngOnInit();\n    await this.load();\n\n    // Broadcaster subscription - load if sync completes in the background\n    this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.ngZone.run(async () => {\n        switch (message.command) {\n          case \"syncCompleted\":\n            if (message.successfully) {\n              await this.load();\n            }\n            break;\n        }\n      });\n    });\n  }\n\n  ngOnDestroy() {\n    this.dialogService.closeAll();\n    this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n  }\n\n  async addSend() {\n    if (this.disableSend) {\n      return;\n    }\n\n    await this.editSend(null);\n  }\n\n  async editSend(send: SendView) {\n    const dialog = this.dialogService.open(AddEditComponent, {\n      data: {\n        sendId: send == null ? null : send.id,\n      },\n    });\n\n    await lastValueFrom(dialog.closed);\n    await this.load();\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { SharedModule } from \"../../../shared\";\n\nimport { BulkDeleteDialogComponent } from \"./bulk-delete-dialog/bulk-delete-dialog.component\";\nimport { BulkMoveDialogComponent } from \"./bulk-move-dialog/bulk-move-dialog.component\";\nimport { BulkShareDialogComponent } from \"./bulk-share-dialog/bulk-share-dialog.component\";\n\n@NgModule({\n  imports: [SharedModule],\n  declarations: [BulkDeleteDialogComponent, BulkMoveDialogComponent, BulkShareDialogComponent],\n  exports: [BulkDeleteDialogComponent, BulkMoveDialogComponent, BulkShareDialogComponent],\n})\nexport class BulkDialogsModule {}\n","import { Component } from \"@angular/core\";\n\nimport { AttachmentsComponent as BaseAttachmentsComponent } from \"@bitwarden/angular/vault/components/attachments.component\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"app-vault-attachments\",\n  templateUrl: \"attachments.component.html\",\n})\nexport class AttachmentsComponent extends BaseAttachmentsComponent {\n  protected override componentName = \"app-vault-attachments\";\n\n  constructor(\n    cipherService: CipherService,\n    i18nService: I18nService,\n    keyService: KeyService,\n    encryptService: EncryptService,\n    stateService: StateService,\n    platformUtilsService: PlatformUtilsService,\n    apiService: ApiService,\n    logService: LogService,\n    fileDownloadService: FileDownloadService,\n    dialogService: DialogService,\n    billingAccountProfileStateService: BillingAccountProfileStateService,\n    accountService: AccountService,\n    toastService: ToastService,\n  ) {\n    super(\n      cipherService,\n      i18nService,\n      keyService,\n      encryptService,\n      platformUtilsService,\n      apiService,\n      window,\n      logService,\n      stateService,\n      fileDownloadService,\n      dialogService,\n      billingAccountProfileStateService,\n      accountService,\n      toastService,\n    );\n  }\n\n  protected async reupload(attachment: AttachmentView) {\n    if (this.showFixOldAttachments(attachment)) {\n      await this.reuploadCipherAttachment(attachment, false);\n    }\n  }\n\n  protected showFixOldAttachments(attachment: AttachmentView) {\n    return attachment.key == null && this.cipher.organizationId == null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogConfig, DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject, OnInit } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map, Observable } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport interface BulkMoveDialogParams {\n  cipherIds?: string[];\n}\n\nexport enum BulkMoveDialogResult {\n  Moved = \"moved\",\n  Canceled = \"canceled\",\n}\n\n/**\n * Strongly typed helper to open a BulkMoveDialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Configuration for the dialog\n */\nexport const openBulkMoveDialog = (\n  dialogService: DialogService,\n  config: DialogConfig<BulkMoveDialogParams>,\n) => {\n  return dialogService.open<BulkMoveDialogResult, BulkMoveDialogParams>(\n    BulkMoveDialogComponent,\n    config,\n  );\n};\n\n@Component({\n  templateUrl: \"bulk-move-dialog.component.html\",\n})\nexport class BulkMoveDialogComponent implements OnInit {\n  cipherIds: string[] = [];\n\n  formGroup = this.formBuilder.group({\n    folderId: [\"\", [Validators.nullValidator]],\n  });\n  folders$: Observable<FolderView[]>;\n\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  constructor(\n    @Inject(DIALOG_DATA) params: BulkMoveDialogParams,\n    private dialogRef: DialogRef<BulkMoveDialogResult>,\n    private cipherService: CipherService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private folderService: FolderService,\n    private formBuilder: FormBuilder,\n    private accountService: AccountService,\n  ) {\n    this.cipherIds = params.cipherIds ?? [];\n  }\n\n  async ngOnInit() {\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n    this.folders$ = this.folderService.folderViews$(activeUserId);\n    this.formGroup.patchValue({\n      folderId: (await firstValueFrom(this.folders$))[0].id,\n    });\n  }\n\n  protected cancel() {\n    this.close(BulkMoveDialogResult.Canceled);\n  }\n\n  protected submit = async () => {\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    await this.cipherService.moveManyWithServer(this.cipherIds, this.formGroup.value.folderId);\n    this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"movedItems\"));\n    this.close(BulkMoveDialogResult.Moved);\n  };\n\n  private close(result: BulkMoveDialogResult) {\n    this.dialogRef.close(result);\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog dialogSize=\"small\">\n    <span bitDialogTitle>\n      {{ \"addToFolder\" | i18n }}\n    </span>\n    <span bitDialogContent>\n      <p>{{ \"moveSelectedItemsDesc\" | i18n: cipherIds.length }}</p>\n      <bit-form-field>\n        <bit-label for=\"folder\">{{ \"selectFolder\" | i18n }}</bit-label>\n        <bit-select formControlName=\"folderId\">\n          <bit-option *ngFor=\"let f of folders$ | async\" [value]=\"f.id\" [label]=\"f.name\">\n          </bit-option>\n        </bit-select>\n      </bit-form-field>\n    </span>\n    <ng-container bitDialogFooter>\n      <button bitButton bitFormButton type=\"submit\" buttonType=\"primary\">\n        {{ \"save\" | i18n }}\n      </button>\n      <button bitButton bitFormButton type=\"button\" buttonType=\"secondary\" (click)=\"cancel()\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\nimport { Validators, FormBuilder } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { DialogService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Directive()\nexport class FolderAddEditComponent implements OnInit {\n  @Input() folderId: string;\n  @Output() onSavedFolder = new EventEmitter<FolderView>();\n  @Output() onDeletedFolder = new EventEmitter<FolderView>();\n\n  editMode = false;\n  folder: FolderView = new FolderView();\n  title: string;\n  formPromise: Promise<any>;\n  deletePromise: Promise<any>;\n  protected componentName = \"\";\n\n  protected activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  formGroup = this.formBuilder.group({\n    name: [\"\", [Validators.required]],\n  });\n\n  constructor(\n    protected folderService: FolderService,\n    protected folderApiService: FolderApiServiceAbstraction,\n    protected accountService: AccountService,\n    protected keyService: KeyService,\n    protected i18nService: I18nService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected logService: LogService,\n    protected dialogService: DialogService,\n    protected formBuilder: FormBuilder,\n  ) {}\n\n  async ngOnInit() {\n    await this.init();\n  }\n\n  async submit(): Promise<boolean> {\n    this.folder.name = this.formGroup.controls.name.value;\n    if (this.folder.name == null || this.folder.name === \"\") {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"nameRequired\"),\n      );\n      return false;\n    }\n\n    try {\n      const activeUserId = await firstValueFrom(this.activeUserId$);\n      const userKey = await this.keyService.getUserKeyWithLegacySupport(activeUserId);\n      const folder = await this.folderService.encrypt(this.folder, userKey);\n      this.formPromise = this.folderApiService.save(folder, activeUserId);\n      await this.formPromise;\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(this.editMode ? \"editedFolder\" : \"addedFolder\"),\n      );\n      this.onSavedFolder.emit(this.folder);\n      return true;\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return false;\n  }\n\n  async delete(): Promise<boolean> {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteFolder\" },\n      content: { key: \"deleteFolderConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      const activeUserId = await firstValueFrom(this.activeUserId$);\n      this.deletePromise = this.folderApiService.delete(this.folder.id, activeUserId);\n      await this.deletePromise;\n      this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"deletedFolder\"));\n      this.onDeletedFolder.emit(this.folder);\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    return true;\n  }\n\n  protected async init() {\n    this.editMode = this.folderId != null;\n\n    if (this.editMode) {\n      this.editMode = true;\n      this.title = this.i18nService.t(\"editFolder\");\n      const activeUserId = await firstValueFrom(this.activeUserId$);\n      this.folder = await firstValueFrom(\n        this.folderService.getDecrypted$(this.folderId, activeUserId),\n      );\n    } else {\n      this.title = this.i18nService.t(\"addFolder\");\n    }\n    this.formGroup.controls.name.setValue(this.folder.name);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { FolderAddEditComponent as BaseFolderAddEditComponent } from \"@bitwarden/angular/vault/components/folder-add-edit.component\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { FolderApiServiceAbstraction } from \"@bitwarden/common/vault/abstractions/folder/folder-api.service.abstraction\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { DialogService, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  selector: \"app-folder-add-edit\",\n  templateUrl: \"folder-add-edit.component.html\",\n})\nexport class FolderAddEditComponent extends BaseFolderAddEditComponent {\n  protected override componentName = \"app-folder-add-edit\";\n  constructor(\n    folderService: FolderService,\n    folderApiService: FolderApiServiceAbstraction,\n    protected accountSerivce: AccountService,\n    protected keyService: KeyService,\n    i18nService: I18nService,\n    platformUtilsService: PlatformUtilsService,\n    logService: LogService,\n    dialogService: DialogService,\n    formBuilder: FormBuilder,\n    protected toastService: ToastService,\n    protected dialogRef: DialogRef<FolderAddEditDialogResult>,\n    @Inject(DIALOG_DATA) params: FolderAddEditDialogParams,\n  ) {\n    super(\n      folderService,\n      folderApiService,\n      accountSerivce,\n      keyService,\n      i18nService,\n      platformUtilsService,\n      logService,\n      dialogService,\n      formBuilder,\n    );\n    params?.folderId ? (this.folderId = params.folderId) : null;\n  }\n\n  deleteAndClose = async () => {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteFolder\" },\n      content: { key: \"deleteFolderConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      await this.folderApiService.delete(this.folder.id, await firstValueFrom(this.activeUserId$));\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"deletedFolder\"),\n      });\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    this.dialogRef.close(FolderAddEditDialogResult.Deleted);\n  };\n\n  submitAndClose = async () => {\n    this.folder.name = this.formGroup.controls.name.value;\n    if (this.folder.name == null || this.folder.name === \"\") {\n      this.formGroup.controls.name.markAsTouched();\n      return;\n    }\n\n    try {\n      const activeAccountId = await firstValueFrom(this.activeUserId$);\n      const userKey = await this.keyService.getUserKeyWithLegacySupport(activeAccountId);\n      const folder = await this.folderService.encrypt(this.folder, userKey);\n      this.formPromise = this.folderApiService.save(folder, activeAccountId);\n      await this.formPromise;\n      this.platformUtilsService.showToast(\n        \"success\",\n        null,\n        this.i18nService.t(this.editMode ? \"editedFolder\" : \"addedFolder\"),\n      );\n      this.onSavedFolder.emit(this.folder);\n      this.dialogRef.close(FolderAddEditDialogResult.Saved);\n    } catch (e) {\n      this.logService.error(e);\n    }\n    return;\n  };\n}\n\nexport interface FolderAddEditDialogParams {\n  folderId: string;\n}\n\nexport enum FolderAddEditDialogResult {\n  Deleted = \"deleted\",\n  Canceled = \"canceled\",\n  Saved = \"saved\",\n}\n\n/**\n * Strongly typed helper to open a FolderAddEdit dialog\n * @param dialogService Instance of the dialog service that will be used to open the dialog\n * @param config Optional configuration for the dialog\n */\nexport function openFolderAddEditDialog(\n  dialogService: DialogService,\n  config?: DialogConfig<FolderAddEditDialogParams>,\n) {\n  return dialogService.open<FolderAddEditDialogResult, FolderAddEditDialogParams>(\n    FolderAddEditComponent,\n    config,\n  );\n}\n","<form [bitSubmit]=\"submitAndClose\" [formGroup]=\"formGroup\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ title }}\n    </span>\n    <span bitDialogContent>\n      <bit-form-field>\n        <bit-label>{{ \"name\" | i18n }}</bit-label>\n        <input bitInput id=\"name\" formControlName=\"name\" />\n      </bit-form-field>\n    </span>\n    <ng-container bitDialogFooter>\n      <button bitButton buttonType=\"primary\" bitFormButton type=\"submit\">\n        <span>{{ \"save\" | i18n }}</span>\n      </button>\n      <button bitButton buttonType=\"secondary\" bitDialogClose type=\"button\" data-dismiss=\"modal\">\n        {{ \"cancel\" | i18n }}\n      </button>\n      <div class=\"tw-m-0 tw-ml-auto\">\n        <button\n          buttonType=\"danger\"\n          bitIconButton=\"bwi-trash\"\n          bitFormButton\n          type=\"button\"\n          appA11yTitle=\"{{ 'delete' | i18n }}\"\n          *ngIf=\"editMode\"\n          [bitAction]=\"deleteAndClose\"\n        ></button>\n      </div>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Output } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  BannerModule,\n  ButtonModule,\n  LinkModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-verify-email\",\n  templateUrl: \"verify-email.component.html\",\n  imports: [AsyncActionsModule, BannerModule, ButtonModule, CommonModule, JslibModule, LinkModule],\n})\nexport class VerifyEmailComponent {\n  actionPromise: Promise<unknown>;\n\n  @Output() onVerified = new EventEmitter<boolean>();\n  @Output() onDismiss = new EventEmitter<void>();\n\n  constructor(\n    private apiService: ApiService,\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private tokenService: TokenService,\n    private toastService: ToastService,\n  ) {}\n\n  async verifyEmail(): Promise<void> {\n    await this.apiService.refreshIdentityToken();\n    if (await this.tokenService.getEmailVerified()) {\n      this.onVerified.emit(true);\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"emailVerified\"),\n      });\n      return;\n    }\n\n    await this.apiService.postAccountVerifyEmail();\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"checkInboxForVerification\"),\n    });\n  }\n\n  send = async () => {\n    await this.verifyEmail();\n  };\n}\n","<bit-banner bannerType=\"warning\" (onClose)=\"onDismiss.emit()\">\n  {{ \"verifyEmailDesc\" | i18n }}\n  <button\n    id=\"sendBtn\"\n    bitLink\n    linkType=\"secondary\"\n    bitButton\n    type=\"button\"\n    buttonType=\"unstyled\"\n    [bitAction]=\"send\"\n  >\n    {{ \"sendEmail\" | i18n }}\n  </button>\n</bit-banner>\n","import { Injectable } from \"@angular/core\";\nimport { Observable, combineLatest, firstValueFrom, map, filter, mergeMap, take } from \"rxjs\";\n\nimport { UserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  StateProvider,\n  PREMIUM_BANNER_DISK_LOCAL,\n  BANNERS_DISMISSED_DISK,\n  UserKeyDefinition,\n  SingleUserState,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\nimport { PBKDF2KdfConfig, KdfConfigService, KdfType } from \"@bitwarden/key-management\";\n\nexport enum VisibleVaultBanner {\n  KDFSettings = \"kdf-settings\",\n  OutdatedBrowser = \"outdated-browser\",\n  Premium = \"premium\",\n  VerifyEmail = \"verify-email\",\n}\n\ntype PremiumBannerReprompt = {\n  numberOfDismissals: number;\n  /** Timestamp representing when to show the prompt next */\n  nextPromptDate: number;\n};\n\n/** Banners that will be re-shown on a new session */\ntype SessionBanners = Omit<VisibleVaultBanner, VisibleVaultBanner.Premium>;\n\nexport const PREMIUM_BANNER_REPROMPT_KEY = new UserKeyDefinition<PremiumBannerReprompt>(\n  PREMIUM_BANNER_DISK_LOCAL,\n  \"bannerReprompt\",\n  {\n    deserializer: (bannerReprompt) => bannerReprompt,\n    clearOn: [], // Do not clear user tutorials\n  },\n);\n\nexport const BANNERS_DISMISSED_DISK_KEY = new UserKeyDefinition<SessionBanners[]>(\n  BANNERS_DISMISSED_DISK,\n  \"bannersDismissed\",\n  {\n    deserializer: (bannersDismissed) => bannersDismissed,\n    clearOn: [], // Do not clear user tutorials\n  },\n);\n\n@Injectable()\nexport class VaultBannersService {\n  constructor(\n    private accountService: AccountService,\n    private stateProvider: StateProvider,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private platformUtilsService: PlatformUtilsService,\n    private kdfConfigService: KdfConfigService,\n    private syncService: SyncService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n  ) {}\n\n  shouldShowPremiumBanner$(userId: UserId): Observable<boolean> {\n    const premiumBannerState = this.premiumBannerState(userId);\n    const premiumSources$ = combineLatest([\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(userId),\n      premiumBannerState.state$,\n    ]);\n\n    return this.syncService.lastSync$(userId).pipe(\n      filter((lastSync) => lastSync !== null),\n      take(1), // Wait until the first sync is complete before considering the premium status\n      mergeMap(() => premiumSources$),\n      map(([canAccessPremium, dismissedState]) => {\n        const shouldShowPremiumBanner =\n          !canAccessPremium && !this.platformUtilsService.isSelfHost();\n\n        // Check if nextPromptDate is in the past passed\n        if (shouldShowPremiumBanner && dismissedState?.nextPromptDate) {\n          const nextPromptDate = new Date(dismissedState.nextPromptDate);\n          const now = new Date();\n          return now >= nextPromptDate;\n        }\n\n        return shouldShowPremiumBanner;\n      }),\n    );\n  }\n\n  /** Returns true when the update browser banner should be shown */\n  async shouldShowUpdateBrowserBanner(userId: UserId): Promise<boolean> {\n    const outdatedBrowser = window.navigator.userAgent.indexOf(\"MSIE\") !== -1;\n    const alreadyDismissed = (await this.getBannerDismissedState(userId)).includes(\n      VisibleVaultBanner.OutdatedBrowser,\n    );\n\n    return outdatedBrowser && !alreadyDismissed;\n  }\n\n  /** Returns true when the verify email banner should be shown */\n  async shouldShowVerifyEmailBanner(userId: UserId): Promise<boolean> {\n    const needsVerification = !(\n      await firstValueFrom(this.accountService.accounts$.pipe(map((accounts) => accounts[userId])))\n    )?.emailVerified;\n\n    const alreadyDismissed = (await this.getBannerDismissedState(userId)).includes(\n      VisibleVaultBanner.VerifyEmail,\n    );\n\n    return needsVerification && !alreadyDismissed;\n  }\n\n  /** Returns true when the low KDF iteration banner should be shown */\n  async shouldShowLowKDFBanner(userId: UserId): Promise<boolean> {\n    const hasLowKDF = (\n      await firstValueFrom(this.userDecryptionOptionsService.userDecryptionOptionsById$(userId))\n    )?.hasMasterPassword\n      ? await this.isLowKdfIteration(userId)\n      : false;\n\n    const alreadyDismissed = (await this.getBannerDismissedState(userId)).includes(\n      VisibleVaultBanner.KDFSettings,\n    );\n\n    return hasLowKDF && !alreadyDismissed;\n  }\n\n  /** Dismiss the given banner and perform any respective side effects */\n  async dismissBanner(userId: UserId, banner: SessionBanners): Promise<void> {\n    if (banner === VisibleVaultBanner.Premium) {\n      await this.dismissPremiumBanner(userId);\n    } else {\n      await this.sessionBannerState(userId).update((current) => {\n        const bannersDismissed = current ?? [];\n\n        return [...bannersDismissed, banner];\n      });\n    }\n  }\n\n  /**\n   *\n   * @returns a SingleUserState for the premium banner reprompt state\n   */\n  private premiumBannerState(userId: UserId): SingleUserState<PremiumBannerReprompt> {\n    return this.stateProvider.getUser(userId, PREMIUM_BANNER_REPROMPT_KEY);\n  }\n\n  /**\n   *\n   * @returns a SingleUserState for the session banners dismissed state\n   */\n  private sessionBannerState(userId: UserId): SingleUserState<SessionBanners[]> {\n    return this.stateProvider.getUser(userId, BANNERS_DISMISSED_DISK_KEY);\n  }\n\n  /** Returns banners that have already been dismissed */\n  private async getBannerDismissedState(userId: UserId): Promise<SessionBanners[]> {\n    // `state$` can emit null when a value has not been set yet,\n    // use nullish coalescing to default to an empty array\n    return (await firstValueFrom(this.sessionBannerState(userId).state$)) ?? [];\n  }\n\n  /** Increment dismissal state of the premium banner  */\n  private async dismissPremiumBanner(userId: UserId): Promise<void> {\n    await this.premiumBannerState(userId).update((current) => {\n      const numberOfDismissals = current?.numberOfDismissals ?? 0;\n      const now = new Date();\n\n      // Set midnight of the current day\n      now.setHours(0, 0, 0, 0);\n\n      // First dismissal, re-prompt in 1 week\n      if (numberOfDismissals === 0) {\n        now.setDate(now.getDate() + 7);\n        return {\n          numberOfDismissals: 1,\n          nextPromptDate: now.getTime(),\n        };\n      }\n\n      // Second dismissal, re-prompt in 1 month\n      if (numberOfDismissals === 1) {\n        now.setMonth(now.getMonth() + 1);\n        return {\n          numberOfDismissals: 2,\n          nextPromptDate: now.getTime(),\n        };\n      }\n\n      // 3+ dismissals, re-prompt each year\n      // Avoid day/month edge cases and only increment year\n      const nextYear = new Date(now.getFullYear() + 1, now.getMonth(), now.getDate());\n      nextYear.setHours(0, 0, 0, 0);\n      return {\n        numberOfDismissals: numberOfDismissals + 1,\n        nextPromptDate: nextYear.getTime(),\n      };\n    });\n  }\n\n  private async isLowKdfIteration(userId: UserId) {\n    const kdfConfig = await firstValueFrom(this.kdfConfigService.getKdfConfig$(userId));\n    return (\n      kdfConfig.kdfType === KdfType.PBKDF2_SHA256 &&\n      kdfConfig.iterations < PBKDF2KdfConfig.ITERATIONS.defaultValue\n    );\n  }\n}\n","<bit-banner\n  id=\"free-trial-banner\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  bannerType=\"premium\"\n  icon=\"bwi-billing\"\n  [showClose]=\"false\"\n  *ngFor=\"let organization of organizationsPaymentStatus; trackBy: trackBy; index as i\"\n>\n  {{ freeTrialMessage(organization) }}\n  <a\n    bitLink\n    linkType=\"secondary\"\n    (click)=\"navigateToPaymentMethod(organization?.organizationId)\"\n    rel=\"noreferrer noopener\"\n    class=\"tw-cursor-pointer\"\n  >\n    {{ \"clickHereToAddPaymentMethod\" | i18n }}\n  </a>\n</bit-banner>\n\n<bit-banner\n  id=\"update-browser-banner\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  bannerType=\"warning\"\n  *ngIf=\"visibleBanners.includes(VisibleVaultBanner.OutdatedBrowser)\"\n  (onClose)=\"dismissBanner(VisibleVaultBanner.OutdatedBrowser)\"\n>\n  {{ \"updateBrowserDesc\" | i18n }}\n  <a\n    bitLink\n    linkType=\"secondary\"\n    target=\"_blank\"\n    href=\"https://browser-update.org/update-browser.html\"\n    rel=\"noreferrer noopener\"\n  >\n    {{ \"updateBrowser\" | i18n }}\n  </a>\n</bit-banner>\n\n<bit-banner\n  id=\"kdf-settings-banner\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  bannerType=\"warning\"\n  *ngIf=\"visibleBanners.includes(VisibleVaultBanner.KDFSettings)\"\n  (onClose)=\"dismissBanner(VisibleVaultBanner.KDFSettings)\"\n>\n  {{ \"lowKDFIterationsBanner\" | i18n }}\n  <a bitLink linkType=\"secondary\" routerLink=\"/settings/security/security-keys\">\n    {{ \"changeKDFSettings\" | i18n }}\n  </a>\n</bit-banner>\n\n<app-verify-email\n  id=\"verify-email-banner\"\n  *ngIf=\"visibleBanners.includes(VisibleVaultBanner.VerifyEmail)\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  (onDismiss)=\"dismissBanner(VisibleVaultBanner.VerifyEmail)\"\n  (onVerified)=\"dismissBanner(VisibleVaultBanner.VerifyEmail)\"\n></app-verify-email>\n\n<bit-banner\n  id=\"premium-banner\"\n  class=\"-tw-m-6 tw-flex tw-flex-col tw-pb-6\"\n  bannerType=\"premium\"\n  *ngIf=\"premiumBannerVisible$ | async\"\n  (onClose)=\"dismissBanner(VisibleVaultBanner.Premium)\"\n>\n  {{ \"premiumUpgradeUnlockFeatures\" | i18n }}\n  <a bitLink linkType=\"secondary\" routerLink=\"/settings/subscription/premium\">\n    {{ \"goPremium\" | i18n }}\n  </a>\n</bit-banner>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, map, Observable, switchMap } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { BannerModule } from \"@bitwarden/components\";\n\nimport { VerifyEmailComponent } from \"../../../auth/settings/verify-email.component\";\nimport { FreeTrial } from \"../../../core/types/free-trial\";\nimport { SharedModule } from \"../../../shared\";\n\nimport { VaultBannersService, VisibleVaultBanner } from \"./services/vault-banners.service\";\n\n@Component({\n  standalone: true,\n  selector: \"app-vault-banners\",\n  templateUrl: \"./vault-banners.component.html\",\n  imports: [VerifyEmailComponent, SharedModule, BannerModule],\n  providers: [VaultBannersService],\n})\nexport class VaultBannersComponent implements OnInit {\n  visibleBanners: VisibleVaultBanner[] = [];\n  premiumBannerVisible$: Observable<boolean>;\n  VisibleVaultBanner = VisibleVaultBanner;\n  @Input() organizationsPaymentStatus: FreeTrial[] = [];\n\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  constructor(\n    private vaultBannerService: VaultBannersService,\n    private router: Router,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n  ) {\n    this.premiumBannerVisible$ = this.activeUserId$.pipe(\n      switchMap((userId) => this.vaultBannerService.shouldShowPremiumBanner$(userId)),\n    );\n  }\n\n  async ngOnInit(): Promise<void> {\n    await this.determineVisibleBanners();\n  }\n\n  async dismissBanner(banner: VisibleVaultBanner): Promise<void> {\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n    await this.vaultBannerService.dismissBanner(activeUserId, banner);\n\n    await this.determineVisibleBanners();\n  }\n\n  async navigateToPaymentMethod(organizationId: string): Promise<void> {\n    const navigationExtras = {\n      state: { launchPaymentModalAutomatically: true },\n    };\n\n    await this.router.navigate(\n      [\"organizations\", organizationId, \"billing\", \"payment-method\"],\n      navigationExtras,\n    );\n  }\n\n  /** Determine which banners should be present */\n  private async determineVisibleBanners(): Promise<void> {\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n\n    const showBrowserOutdated =\n      await this.vaultBannerService.shouldShowUpdateBrowserBanner(activeUserId);\n    const showVerifyEmail = await this.vaultBannerService.shouldShowVerifyEmailBanner(activeUserId);\n    const showLowKdf = await this.vaultBannerService.shouldShowLowKDFBanner(activeUserId);\n\n    this.visibleBanners = [\n      showBrowserOutdated ? VisibleVaultBanner.OutdatedBrowser : null,\n      showVerifyEmail ? VisibleVaultBanner.VerifyEmail : null,\n      showLowKdf ? VisibleVaultBanner.KDFSettings : null,\n    ].filter(Boolean); // remove all falsy values, i.e. null\n  }\n\n  freeTrialMessage(organization: FreeTrial) {\n    if (organization.remainingDays >= 2) {\n      return this.i18nService.t(\n        \"freeTrialEndPromptMultipleDays\",\n        organization.organizationName,\n        organization.remainingDays.toString(),\n      );\n    } else if (organization.remainingDays === 1) {\n      return this.i18nService.t(\"freeTrialEndPromptTomorrow\", organization.organizationName);\n    } else {\n      return this.i18nService.t(\"freeTrialEndPromptToday\", organization.organizationName);\n    }\n  }\n\n  trackBy(index: number) {\n    return index;\n  }\n}\n","<app-header [title]=\"title\" [icon]=\"icon\">\n  <bit-breadcrumbs *ngIf=\"showBreadcrumbs\" slot=\"breadcrumbs\">\n    <bit-breadcrumb\n      *ngIf=\"activeOrganizationId\"\n      [route]=\"[]\"\n      [queryParams]=\"{ organizationId: activeOrganizationId, collectionId: All }\"\n      queryParamsHandling=\"merge\"\n    >\n      {{ activeOrganizationId | orgNameFromId: organizations }} {{ \"vault\" | i18n | lowercase }}\n    </bit-breadcrumb>\n    <ng-container>\n      <bit-breadcrumb\n        *ngFor=\"let collection of collections\"\n        icon=\"bwi-collection\"\n        [route]=\"[]\"\n        [queryParams]=\"{ collectionId: collection.id }\"\n        queryParamsHandling=\"merge\"\n      >\n        {{ collection.name }}\n      </bit-breadcrumb>\n    </ng-container>\n  </bit-breadcrumbs>\n\n  <ng-container slot=\"title-suffix\">\n    <ng-container *ngIf=\"collection != null && (canEditCollection || canDeleteCollection)\">\n      <button\n        bitIconButton=\"bwi-angle-down\"\n        [bitMenuTriggerFor]=\"editCollectionMenu\"\n        size=\"small\"\n        type=\"button\"\n        aria-haspopup=\"true\"\n      ></button>\n      <bit-menu #editCollectionMenu>\n        <button\n          type=\"button\"\n          *ngIf=\"canEditCollection\"\n          bitMenuItem\n          (click)=\"editCollection(CollectionDialogTabType.Info)\"\n        >\n          <i class=\"bwi bwi-fw bwi-pencil-square\" aria-hidden=\"true\"></i>\n          {{ \"editInfo\" | i18n }}\n        </button>\n        <button\n          type=\"button\"\n          *ngIf=\"canEditCollection\"\n          bitMenuItem\n          (click)=\"editCollection(CollectionDialogTabType.Access)\"\n        >\n          <i class=\"bwi bwi-fw bwi-users\" aria-hidden=\"true\"></i>\n          {{ \"access\" | i18n }}\n        </button>\n        <button type=\"button\" *ngIf=\"canDeleteCollection\" bitMenuItem (click)=\"deleteCollection()\">\n          <span class=\"tw-text-danger\">\n            <i class=\"bwi bwi-fw bwi-trash\" aria-hidden=\"true\"></i>\n            {{ \"delete\" | i18n }}\n          </span>\n        </button>\n      </bit-menu>\n    </ng-container>\n    <small *ngIf=\"loading\">\n      <i\n        class=\"bwi bwi-spinner bwi-spin text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </small>\n  </ng-container>\n\n  <div *ngIf=\"filter.type !== 'trash'\" class=\"tw-shrink-0\">\n    <div appListDropdown>\n      <ng-container [ngSwitch]=\"extensionRefreshEnabled\">\n        <ng-container *ngSwitchCase=\"true\">\n          <button\n            bitButton\n            buttonType=\"primary\"\n            type=\"button\"\n            [bitMenuTriggerFor]=\"addOptions\"\n            id=\"newItemDropdown\"\n            appA11yTitle=\"{{ 'new' | i18n }}\"\n          >\n            <i class=\"bwi bwi-plus-f\" aria-hidden=\"true\"></i>\n            {{ \"new\" | i18n }}<i class=\"bwi tw-ml-2\" aria-hidden=\"true\"></i>\n          </button>\n          <bit-menu #addOptions aria-labelledby=\"newItemDropdown\">\n            <button type=\"button\" bitMenuItem (click)=\"addCipher(CipherType.Login)\">\n              <i class=\"bwi bwi-globe\" slot=\"start\" aria-hidden=\"true\"></i>\n              {{ \"typeLogin\" | i18n }}\n            </button>\n            <button type=\"button\" bitMenuItem (click)=\"addCipher(CipherType.Card)\">\n              <i class=\"bwi bwi-credit-card\" slot=\"start\" aria-hidden=\"true\"></i>\n              {{ \"typeCard\" | i18n }}\n            </button>\n            <button type=\"button\" bitMenuItem (click)=\"addCipher(CipherType.Identity)\">\n              <i class=\"bwi bwi-id-card\" slot=\"start\" aria-hidden=\"true\"></i>\n              {{ \"typeIdentity\" | i18n }}\n            </button>\n            <button type=\"button\" bitMenuItem (click)=\"addCipher(CipherType.SecureNote)\">\n              <i class=\"bwi bwi-sticky-note\" slot=\"start\" aria-hidden=\"true\"></i>\n              {{ \"note\" | i18n }}\n            </button>\n            <button type=\"button\" bitMenuItem (click)=\"addCipher(CipherType.SshKey)\">\n              <i class=\"bwi bwi-key\" slot=\"start\" aria-hidden=\"true\"></i>\n              {{ \"typeSshKey\" | i18n }}\n            </button>\n            <bit-menu-divider />\n            <button type=\"button\" bitMenuItem (click)=\"addFolder()\">\n              <i class=\"bwi bwi-fw bwi-folder\" aria-hidden=\"true\"></i>\n              {{ \"folder\" | i18n }}\n            </button>\n            <button\n              *ngIf=\"canCreateCollections\"\n              type=\"button\"\n              bitMenuItem\n              (click)=\"addCollection()\"\n            >\n              <i class=\"bwi bwi-fw bwi-collection\" aria-hidden=\"true\"></i>\n              {{ \"collection\" | i18n }}\n            </button>\n          </bit-menu>\n        </ng-container>\n        <ng-container *ngSwitchCase=\"false\">\n          <button\n            bitButton\n            buttonType=\"primary\"\n            type=\"button\"\n            [bitMenuTriggerFor]=\"addOptions\"\n            id=\"newItemDropdown\"\n            appA11yTitle=\"{{ 'new' | i18n }}\"\n          >\n            {{ \"new\" | i18n }}<i class=\"bwi bwi-angle-down tw-ml-2\" aria-hidden=\"true\"></i>\n          </button>\n          <bit-menu #addOptions aria-labelledby=\"newItemDropdown\">\n            <button type=\"button\" bitMenuItem (click)=\"addCipher()\">\n              <i class=\"bwi bwi-fw bwi-globe\" aria-hidden=\"true\"></i>\n              {{ \"item\" | i18n }}\n            </button>\n            <button type=\"button\" bitMenuItem (click)=\"addFolder()\">\n              <i class=\"bwi bwi-fw bwi-folder\" aria-hidden=\"true\"></i>\n              {{ \"folder\" | i18n }}\n            </button>\n            <button\n              *ngIf=\"canCreateCollections\"\n              type=\"button\"\n              bitMenuItem\n              (click)=\"addCollection()\"\n            >\n              <i class=\"bwi bwi-fw bwi-collection\" aria-hidden=\"true\"></i>\n              {{ \"collection\" | i18n }}\n            </button>\n          </bit-menu>\n        </ng-container>\n      </ng-container>\n    </div>\n  </div>\n</app-header>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n} from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { Unassigned, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { BreadcrumbsModule, MenuModule } from \"@bitwarden/components\";\n\nimport { HeaderModule } from \"../../../layouts/header/header.module\";\nimport { SharedModule } from \"../../../shared\";\nimport { CollectionDialogTabType } from \"../../components/collection-dialog\";\nimport { PipesModule } from \"../pipes/pipes.module\";\nimport {\n  All,\n  RoutedVaultFilterModel,\n} from \"../vault-filter/shared/models/routed-vault-filter.model\";\n\n@Component({\n  standalone: true,\n  selector: \"app-vault-header\",\n  templateUrl: \"./vault-header.component.html\",\n  imports: [\n    CommonModule,\n    MenuModule,\n    SharedModule,\n    BreadcrumbsModule,\n    HeaderModule,\n    PipesModule,\n    JslibModule,\n  ],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class VaultHeaderComponent implements OnInit {\n  protected Unassigned = Unassigned;\n  protected All = All;\n  protected CollectionDialogTabType = CollectionDialogTabType;\n  protected CipherType = CipherType;\n  protected extensionRefreshEnabled: boolean;\n\n  /**\n   * Boolean to determine the loading state of the header.\n   * Shows a loading spinner if set to true\n   */\n  @Input() loading: boolean;\n\n  /** Current active filter */\n  @Input() filter: RoutedVaultFilterModel;\n\n  /** All organizations that can be shown */\n  @Input() organizations: Organization[] = [];\n\n  /** Currently selected collection */\n  @Input() collection?: TreeNode<CollectionView>;\n\n  /** Whether 'Collection' option is shown in the 'New' dropdown */\n  @Input() canCreateCollections: boolean;\n\n  /** Emits an event when the new item button is clicked in the header */\n  @Output() onAddCipher = new EventEmitter<CipherType | undefined>();\n\n  /** Emits an event when the new collection button is clicked in the 'New' dropdown menu */\n  @Output() onAddCollection = new EventEmitter<null>();\n\n  /** Emits an event when the new folder button is clicked in the 'New' dropdown menu */\n  @Output() onAddFolder = new EventEmitter<null>();\n\n  /** Emits an event when the edit collection button is clicked in the header */\n  @Output() onEditCollection = new EventEmitter<{ tab: CollectionDialogTabType }>();\n\n  /** Emits an event when the delete collection button is clicked in the header */\n  @Output() onDeleteCollection = new EventEmitter<void>();\n\n  constructor(\n    private i18nService: I18nService,\n    private configService: ConfigService,\n  ) {}\n\n  async ngOnInit() {\n    this.extensionRefreshEnabled = await firstValueFrom(\n      this.configService.getFeatureFlag$(FeatureFlag.ExtensionRefresh),\n    );\n  }\n\n  /**\n   * The id of the organization that is currently being filtered on.\n   * This can come from a collection filter or organization filter, if applied.\n   */\n  protected get activeOrganizationId() {\n    if (this.collection != undefined) {\n      return this.collection.node.organizationId;\n    }\n\n    if (this.filter.organizationId !== undefined) {\n      return this.filter.organizationId;\n    }\n\n    return undefined;\n  }\n\n  protected get activeOrganization() {\n    const organizationId = this.activeOrganizationId;\n    return this.organizations?.find((org) => org.id === organizationId);\n  }\n\n  protected get showBreadcrumbs() {\n    return this.filter.collectionId !== undefined && this.filter.collectionId !== All;\n  }\n\n  protected get title() {\n    if (this.filter.collectionId === Unassigned) {\n      return this.i18nService.t(\"unassigned\");\n    }\n\n    if (this.collection) {\n      return this.collection.node.name;\n    }\n\n    if (this.filter.organizationId === Unassigned) {\n      return this.i18nService.t(\"myVault\");\n    }\n\n    const activeOrganization = this.activeOrganization;\n    if (activeOrganization) {\n      return `${activeOrganization.name} ${this.i18nService.t(\"vault\").toLowerCase()}`;\n    }\n\n    return this.i18nService.t(\"allVaults\");\n  }\n\n  protected get icon() {\n    return this.filter.collectionId && this.filter.collectionId !== All ? \"bwi-collection\" : \"\";\n  }\n\n  /**\n   * A list of collection filters that form a chain from the organization root to currently selected collection.\n   * Begins from the organization root and excludes the currently selected collection.\n   */\n  protected get collections() {\n    if (this.collection == undefined) {\n      return [];\n    }\n\n    const collections = [this.collection];\n    while (collections[collections.length - 1].parent != undefined) {\n      collections.push(collections[collections.length - 1].parent);\n    }\n\n    return collections\n      .slice(1)\n      .reverse()\n      .map((treeNode) => treeNode.node);\n  }\n\n  get canEditCollection(): boolean {\n    // Only edit collections if not editing \"Unassigned\"\n    if (this.collection == null) {\n      return false;\n    }\n\n    // Otherwise, check if we can edit the specified collection\n    const organization = this.organizations.find(\n      (o) => o.id === this.collection?.node.organizationId,\n    );\n    return this.collection.node.canEdit(organization);\n  }\n\n  async editCollection(tab: CollectionDialogTabType): Promise<void> {\n    this.onEditCollection.emit({ tab });\n  }\n\n  get canDeleteCollection(): boolean {\n    // Only delete collections if not deleting \"Unassigned\"\n    if (this.collection === undefined) {\n      return false;\n    }\n\n    // Otherwise, check if we can delete the specified collection\n    const organization = this.organizations.find(\n      (o) => o.id === this.collection?.node.organizationId,\n    );\n\n    return this.collection.node.canDelete(organization);\n  }\n\n  deleteCollection() {\n    this.onDeleteCollection.emit();\n  }\n\n  protected addCipher(cipherType?: CipherType) {\n    this.onAddCipher.emit(cipherType);\n  }\n\n  async addFolder(): Promise<void> {\n    this.onAddFolder.emit();\n  }\n\n  async addCollection(): Promise<void> {\n    this.onAddCollection.emit();\n  }\n}\n","const VaultOnboardingMessages = {\n  HasBwInstalled: \"hasBwInstalled\",\n  checkBwInstalled: \"checkIfBWExtensionInstalled\",\n} as const;\n\nexport { VaultOnboardingMessages };\n","import { NgModule } from \"@angular/core\";\n\nimport { ProgressModule } from \"@bitwarden/components\";\n\nimport { SharedModule } from \"../../shared.module\";\n\nimport { OnboardingTaskComponent } from \"./onboarding-task.component\";\nimport { OnboardingComponent } from \"./onboarding.component\";\n\n@NgModule({\n  imports: [SharedModule, ProgressModule],\n  exports: [OnboardingComponent, OnboardingTaskComponent],\n  declarations: [OnboardingComponent, OnboardingTaskComponent],\n})\nexport class OnboardingModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { VaultOnboardingTasks } from \"../vault-onboarding.service\";\n\nexport abstract class VaultOnboardingService {\n  vaultOnboardingState$: Observable<VaultOnboardingTasks>;\n  abstract setVaultOnboardingTasks(newState: VaultOnboardingTasks): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport {\n  ActiveUserState,\n  StateProvider,\n  UserKeyDefinition,\n  VAULT_ONBOARDING,\n} from \"@bitwarden/common/platform/state\";\n\nimport { VaultOnboardingService as VaultOnboardingServiceAbstraction } from \"./abstraction/vault-onboarding.service\";\n\nexport type VaultOnboardingTasks = {\n  createAccount: boolean;\n  importData: boolean;\n  installExtension: boolean;\n};\n\nconst VAULT_ONBOARDING_KEY = new UserKeyDefinition<VaultOnboardingTasks>(\n  VAULT_ONBOARDING,\n  \"tasks\",\n  {\n    deserializer: (jsonData) => jsonData,\n    clearOn: [], // do not clear tutorials\n  },\n);\n\n@Injectable()\nexport class VaultOnboardingService implements VaultOnboardingServiceAbstraction {\n  private vaultOnboardingState: ActiveUserState<VaultOnboardingTasks>;\n  vaultOnboardingState$: Observable<VaultOnboardingTasks>;\n\n  constructor(private stateProvider: StateProvider) {\n    this.vaultOnboardingState = this.stateProvider.getActive(VAULT_ONBOARDING_KEY);\n    this.vaultOnboardingState$ = this.vaultOnboardingState.state$;\n  }\n\n  async setVaultOnboardingTasks(newState: VaultOnboardingTasks): Promise<void> {\n    await this.vaultOnboardingState.update(() => {\n      return { ...newState };\n    });\n  }\n}\n","<ng-template #content>\n  <i class=\"bwi bwi-fw !tw-mr-4\" [ngClass]=\"completed ? 'bwi-check tw-text-success' : icon\"></i\n  ><span\n    [ngClass]=\"{\n      'tw-text-primary-700 tw-line-through tw-decoration-primary-700 tw-opacity-50': completed,\n    }\"\n    >{{ title }}<i class=\"bwi bwi-angle-right tw-ml-1\"></i\n  ></span>\n</ng-template>\n\n<li class=\"tw-list-none\">\n  <a bitLink *ngIf=\"route\" [routerLink]=\"route\">\n    <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n  </a>\n  <button type=\"button\" bitLink *ngIf=\"!route\" [disabled]=\"isDisabled\">\n    <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n  </button>\n  <div\n    class=\"tw-ml-8 tw-mt-1 tw-text-sm\"\n    [ngClass]=\"{ 'tw-opacity-50': completed }\"\n    (click)=\"handleClick($event)\"\n  >\n    <ng-content></ng-content>\n  </div>\n</li>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"app-onboarding-task\",\n  templateUrl: \"./onboarding-task.component.html\",\n  host: {\n    class: \"tw-max-w-max\",\n  },\n})\nexport class OnboardingTaskComponent {\n  @Input()\n  completed = false;\n\n  @Input()\n  icon = \"bwi-info-circle\";\n\n  @Input()\n  title: string;\n\n  @Input()\n  route: string | any[];\n\n  @Input()\n  isDisabled: boolean = false;\n\n  handleClick(ev: MouseEvent) {\n    /**\n     * If the main `ng-content` is clicked, we don't want to trigger the task's click handler.\n     */\n    ev.stopPropagation();\n  }\n}\n","<details #details class=\"tw-rounded-sm tw-bg-background-alt tw-text-main\" (toggle)=\"toggle()\" open>\n  <summary class=\"tw-list-none tw-p-2 tw-px-4\">\n    <div class=\"tw-flex tw-select-none tw-items-center tw-gap-4\">\n      <i class=\"bwi bwi-dashboard tw-text-3xl tw-text-primary-600\" aria-hidden=\"true\"></i>\n      <div class=\"tw-text-lg\">{{ title }}</div>\n      <bit-progress class=\"tw-flex-1\" [showText]=\"false\" [barWidth]=\"barWidth\"></bit-progress>\n      <span *ngIf=\"tasks.length > 0; else spinner\">\n        {{ \"complete\" | i18n: amountCompleted : tasks.length }}\n      </span>\n      <i\n        class=\"bwi tw-my-auto\"\n        [ngClass]=\"open ? 'bwi-angle-down' : 'bwi-angle-up'\"\n        aria-hidden=\"true\"\n      ></i>\n    </div>\n  </summary>\n  <ul class=\"tw-mb-0 tw-ml-6 tw-flex tw-flex-col tw-gap-4\">\n    <ng-content></ng-content>\n  </ul>\n  <div class=\"tw-p-4 tw-pt-0\">\n    <button bitLink type=\"button\" class=\"tw-ml-auto tw-block\" (click)=\"dismiss.emit()\">\n      {{ \"dismiss\" | i18n }}\n    </button>\n  </div>\n</details>\n\n<ng-template #spinner>\n  <i class=\"bwi bwi-spinner bwi-spin\"></i>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, ContentChildren, EventEmitter, Input, Output, QueryList } from \"@angular/core\";\n\nimport { OnboardingTaskComponent } from \"./onboarding-task.component\";\n\n@Component({\n  selector: \"app-onboarding\",\n  templateUrl: \"./onboarding.component.html\",\n})\nexport class OnboardingComponent {\n  @ContentChildren(OnboardingTaskComponent) tasks: QueryList<OnboardingTaskComponent>;\n  @Input() title: string;\n\n  @Output() dismiss = new EventEmitter<void>();\n\n  protected open = true;\n  protected visible = false;\n\n  protected get amountCompleted(): number {\n    return this.tasks.filter((task) => task.completed).length;\n  }\n\n  protected get barWidth(): number {\n    return this.tasks.length === 0 ? 0 : (this.amountCompleted / this.tasks.length) * 100;\n  }\n\n  protected toggle() {\n    this.open = !this.open;\n  }\n}\n","<div\n  *ngIf=\"isNewAccount && showOnboarding && onboardingTasks$ | async as onboardingTasks\"\n  class=\"tw-mb-6\"\n>\n  <app-onboarding\n    *ngIf=\"onboardingTasks\"\n    [title]=\"'getStarted' | i18n\"\n    (dismiss)=\"hideOnboarding()\"\n  >\n    <app-onboarding-task\n      [title]=\"'createAnAccount' | i18n\"\n      [completed]=\"onboardingTasks.createAccount\"\n      [isDisabled]=\"true\"\n    ></app-onboarding-task>\n\n    <app-onboarding-task\n      [title]=\"'importData' | i18n\"\n      icon=\"bwi-save\"\n      [route]=\"['/tools/import']\"\n      [completed]=\"onboardingTasks.importData\"\n    >\n      <p class=\"tw-pl-1\">\n        {{ \"onboardingImportDataDetailsPartOne\" | i18n }}\n        <button type=\"button\" bitLink (click)=\"emitToAddCipher()\">\n          {{\n            (extensionRefreshEnabled\n              ? \"onboardingImportDataDetailsLoginLink\"\n              : \"onboardingImportDataDetailsLink\"\n            ) | i18n\n          }}\n        </button>\n        <span>\n          {{ \"onboardingImportDataDetailsPartTwoNoOrgs\" | i18n }}\n        </span>\n      </p>\n    </app-onboarding-task>\n\n    <app-onboarding-task\n      [title]=\"'installBrowserExtension' | i18n\"\n      icon=\"bwi-cli\"\n      (click)=\"navigateToExtension()\"\n      route=\"[]\"\n      [completed]=\"onboardingTasks.installExtension\"\n    >\n      <span class=\"tw-pl-1\">\n        {{ \"installBrowserExtensionDetails\" | i18n }}\n      </span>\n    </app-onboarding-task>\n  </app-onboarding>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  Component,\n  OnInit,\n  Input,\n  Output,\n  EventEmitter,\n  OnDestroy,\n  SimpleChanges,\n  OnChanges,\n} from \"@angular/core\";\nimport { Subject, takeUntil, Observable, firstValueFrom, fromEvent } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums/cipher-type\";\nimport { VaultOnboardingMessages } from \"@bitwarden/common/vault/enums/vault-onboarding.enum\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { LinkModule } from \"@bitwarden/components\";\n\nimport { OnboardingModule } from \"../../../shared/components/onboarding/onboarding.module\";\n\nimport { VaultOnboardingService as VaultOnboardingServiceAbstraction } from \"./services/abstraction/vault-onboarding.service\";\nimport { VaultOnboardingService, VaultOnboardingTasks } from \"./services/vault-onboarding.service\";\n\n@Component({\n  standalone: true,\n  imports: [OnboardingModule, CommonModule, JslibModule, LinkModule],\n  providers: [\n    {\n      provide: VaultOnboardingServiceAbstraction,\n      useClass: VaultOnboardingService,\n    },\n  ],\n  selector: \"app-vault-onboarding\",\n  templateUrl: \"vault-onboarding.component.html\",\n})\nexport class VaultOnboardingComponent implements OnInit, OnChanges, OnDestroy {\n  @Input() ciphers: CipherView[];\n  @Input() orgs: Organization[];\n  @Output() onAddCipher = new EventEmitter<CipherType>();\n\n  extensionUrl: string;\n  isIndividualPolicyVault: boolean;\n  private destroy$ = new Subject<void>();\n  isNewAccount: boolean;\n  private readonly onboardingReleaseDate = new Date(\"2024-04-02\");\n\n  protected currentTasks: VaultOnboardingTasks;\n\n  protected onboardingTasks$: Observable<VaultOnboardingTasks>;\n  protected showOnboarding = false;\n  protected extensionRefreshEnabled = false;\n\n  constructor(\n    protected platformUtilsService: PlatformUtilsService,\n    protected policyService: PolicyService,\n    private apiService: ApiService,\n    private vaultOnboardingService: VaultOnboardingServiceAbstraction,\n    private configService: ConfigService,\n  ) {}\n\n  async ngOnInit() {\n    this.onboardingTasks$ = this.vaultOnboardingService.vaultOnboardingState$;\n    await this.setOnboardingTasks();\n    this.setInstallExtLink();\n    this.individualVaultPolicyCheck();\n    this.checkForBrowserExtension();\n    this.extensionRefreshEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.ExtensionRefresh,\n    );\n  }\n\n  async ngOnChanges(changes: SimpleChanges) {\n    if (this.showOnboarding && changes?.ciphers) {\n      const currentTasks = await firstValueFrom(this.onboardingTasks$);\n      const updatedTasks = {\n        createAccount: true,\n        importData: this.ciphers.length > 0,\n        installExtension: currentTasks.installExtension,\n      };\n      await this.vaultOnboardingService.setVaultOnboardingTasks(updatedTasks);\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  checkForBrowserExtension() {\n    if (this.showOnboarding) {\n      fromEvent<MessageEvent>(window, \"message\")\n        .pipe(takeUntil(this.destroy$))\n        .subscribe((event) => {\n          void this.getMessages(event);\n        });\n\n      window.postMessage({ command: VaultOnboardingMessages.checkBwInstalled });\n    }\n  }\n\n  async getMessages(event: any) {\n    if (event.data.command === VaultOnboardingMessages.HasBwInstalled && this.showOnboarding) {\n      const currentTasks = await firstValueFrom(this.onboardingTasks$);\n      const updatedTasks = {\n        createAccount: currentTasks.createAccount,\n        importData: currentTasks.importData,\n        installExtension: true,\n      };\n      await this.vaultOnboardingService.setVaultOnboardingTasks(updatedTasks);\n    }\n  }\n\n  async checkCreationDate() {\n    const userProfile = await this.apiService.getProfile();\n    const profileCreationDate = new Date(userProfile.creationDate);\n\n    this.isNewAccount = this.onboardingReleaseDate < profileCreationDate ? true : false;\n\n    if (!this.isNewAccount) {\n      await this.hideOnboarding();\n    }\n  }\n\n  protected async hideOnboarding() {\n    await this.saveCompletedTasks({\n      createAccount: true,\n      importData: true,\n      installExtension: true,\n    });\n  }\n\n  async setOnboardingTasks() {\n    const currentTasks = await firstValueFrom(this.onboardingTasks$);\n    if (currentTasks == null) {\n      const freshStart = {\n        createAccount: true,\n        importData: this.ciphers?.length > 0,\n        installExtension: false,\n      };\n      await this.saveCompletedTasks(freshStart);\n    } else if (currentTasks) {\n      this.showOnboarding = Object.values(currentTasks).includes(false);\n    }\n\n    if (this.showOnboarding) {\n      await this.checkCreationDate();\n    }\n  }\n\n  private async saveCompletedTasks(vaultTasks: VaultOnboardingTasks) {\n    this.showOnboarding = Object.values(vaultTasks).includes(false);\n    await this.vaultOnboardingService.setVaultOnboardingTasks(vaultTasks);\n  }\n\n  individualVaultPolicyCheck() {\n    this.policyService\n      .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((data) => {\n        this.isIndividualPolicyVault = data;\n      });\n  }\n\n  emitToAddCipher() {\n    this.onAddCipher.emit(CipherType.Login);\n  }\n\n  setInstallExtLink() {\n    if (this.platformUtilsService.isChrome()) {\n      this.extensionUrl =\n        \"https://chromewebstore.google.com/detail/bitwarden-password-manage/nngceckbapebfimnlniiiahkandclblb\";\n    } else if (this.platformUtilsService.isFirefox()) {\n      this.extensionUrl =\n        \"https://addons.mozilla.org/en-US/firefox/addon/bitwarden-password-manager/\";\n    } else if (this.platformUtilsService.isSafari()) {\n      this.extensionUrl = \"https://apps.apple.com/us/app/bitwarden/id1352778147?mt=12\";\n    } else if (this.platformUtilsService.isOpera()) {\n      this.extensionUrl =\n        \"https://addons.opera.com/extensions/details/bitwarden-free-password-manager/\";\n    } else if (this.platformUtilsService.isEdge()) {\n      this.extensionUrl =\n        \"https://microsoftedge.microsoft.com/addons/detail/jbkfoedolllekgbhcbcoahefnbanhhlh\";\n    } else {\n      this.extensionUrl = \"https://bitwarden.com/download/#downloads-web-browser\";\n    }\n  }\n\n  navigateToExtension() {\n    window.open(this.extensionUrl, \"_blank\");\n  }\n}\n","<app-vault-banners\n  [organizationsPaymentStatus]=\"organizationsPaymentStatus$ | async\"\n></app-vault-banners>\n\n<app-vault-header\n  [filter]=\"filter\"\n  [loading]=\"refreshing && !performingInitialLoad\"\n  [organizations]=\"allOrganizations\"\n  [canCreateCollections]=\"canCreateCollections\"\n  [collection]=\"selectedCollection\"\n  (onAddCipher)=\"addCipher($event)\"\n  (onAddCollection)=\"addCollection()\"\n  (onAddFolder)=\"addFolder()\"\n  (onEditCollection)=\"editCollection(selectedCollection.node, $event.tab)\"\n  (onDeleteCollection)=\"deleteCollection(selectedCollection.node)\"\n></app-vault-header>\n\n<app-vault-onboarding\n  [ciphers]=\"ciphers\"\n  [orgs]=\"allOrganizations\"\n  (onAddCipher)=\"addCipher($event)\"\n>\n</app-vault-onboarding>\n\n<div class=\"tw-flex tw-flex-row -tw-mx-2.5\">\n  <div class=\"tw-basis-1/4 tw-max-w-1/4 tw-px-2.5\">\n    <div class=\"groupings\">\n      <div class=\"content\">\n        <div class=\"inner-content\">\n          <app-vault-filter\n            #vaultFilter\n            [activeFilter]=\"activeFilter\"\n            [searchText]=\"currentSearchText$ | async\"\n            (searchTextChanged)=\"filterSearchText($event)\"\n            (onEditFolder)=\"editFolder($event)\"\n          ></app-vault-filter>\n        </div>\n      </div>\n    </div>\n  </div>\n  <div class=\"tw-basis-3/4 tw-max-w-3/4 tw-px-2.5\">\n    <bit-callout type=\"warning\" *ngIf=\"activeFilter.isDeleted\">\n      {{ trashCleanupWarning }}\n    </bit-callout>\n    <app-vault-items\n      [ciphers]=\"ciphers\"\n      [collections]=\"collections\"\n      [allCollections]=\"allCollections\"\n      [allOrganizations]=\"allOrganizations\"\n      [disabled]=\"refreshing\"\n      [showOwner]=\"true\"\n      [showCollections]=\"false\"\n      [showGroups]=\"false\"\n      [showPremiumFeatures]=\"canAccessPremium\"\n      [showBulkMove]=\"showBulkMove\"\n      [showBulkTrashOptions]=\"filter.type === 'trash'\"\n      [useEvents]=\"false\"\n      [showAdminActions]=\"false\"\n      [showBulkAddToCollections]=\"true\"\n      (onEvent)=\"onVaultItemsEvent($event)\"\n    >\n    </app-vault-items>\n    <div\n      *ngIf=\"performingInitialLoad\"\n      class=\"tw-mt-6 tw-flex tw-h-full tw-flex-col tw-items-center tw-justify-start\"\n    >\n      <i\n        class=\"bwi bwi-spinner bwi-spin text-muted\"\n        title=\"{{ 'loading' | i18n }}\"\n        aria-hidden=\"true\"\n      ></i>\n      <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n    </div>\n    <div\n      *ngIf=\"isEmpty && !performingInitialLoad\"\n      class=\"tw-mt-6 tw-flex tw-h-full tw-flex-col tw-items-center tw-justify-start\"\n    >\n      <bit-icon [icon]=\"noItemIcon\" aria-hidden=\"true\"></bit-icon>\n      <p>{{ \"noItemsInList\" | i18n }}</p>\n      <button\n        type=\"button\"\n        buttonType=\"primary\"\n        bitButton\n        (click)=\"addCipher()\"\n        *ngIf=\"filter.type !== 'trash'\"\n      >\n        <i class=\"bwi bwi-plus-f bwi-fw\" aria-hidden=\"true\"></i>\n        {{ \"newItem\" | i18n }}\n      </button>\n    </div>\n  </div>\n</div>\n\n<ng-template #attachments></ng-template>\n<ng-template #folderAddEdit></ng-template>\n<ng-template #cipherAddEdit></ng-template>\n<ng-template #share></ng-template>\n<ng-template #collectionsModal></ng-template>\n<ng-template #updateKeyTemplate></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef } from \"@angular/cdk/dialog\";\nimport {\n  ChangeDetectorRef,\n  Component,\n  NgZone,\n  OnDestroy,\n  OnInit,\n  ViewChild,\n  ViewContainerRef,\n} from \"@angular/core\";\nimport { ActivatedRoute, Params, Router } from \"@angular/router\";\nimport {\n  BehaviorSubject,\n  combineLatest,\n  firstValueFrom,\n  from,\n  lastValueFrom,\n  Observable,\n  of,\n  Subject,\n} from \"rxjs\";\nimport {\n  concatMap,\n  debounceTime,\n  filter,\n  first,\n  map,\n  shareReplay,\n  switchMap,\n  take,\n  takeUntil,\n  tap,\n} from \"rxjs/operators\";\n\nimport {\n  CollectionData,\n  CollectionDetailsResponse,\n  CollectionService,\n  CollectionView,\n  Unassigned,\n} from \"@bitwarden/admin-console/common\";\nimport { SearchPipe } from \"@bitwarden/angular/pipes/search.pipe\";\nimport { ModalService } from \"@bitwarden/angular/services/modal.service\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { SearchService } from \"@bitwarden/common/abstractions/search.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { OrganizationBillingServiceAbstraction } from \"@bitwarden/common/billing/abstractions\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { BillingApiServiceAbstraction } from \"@bitwarden/common/billing/abstractions/billing-api.service.abstraction\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { CipherId, CollectionId, OrganizationId, UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\nimport { DialogService, Icons, ToastService } from \"@bitwarden/components\";\nimport {\n  CipherFormConfig,\n  CollectionAssignmentResult,\n  DecryptionFailureDialogComponent,\n  DefaultCipherFormConfigService,\n  PasswordRepromptService,\n} from \"@bitwarden/vault\";\n\nimport { TrialFlowService } from \"../../billing/services/trial-flow.service\";\nimport { FreeTrial } from \"../../core/types/free-trial\";\nimport { SharedModule } from \"../../shared/shared.module\";\nimport { AssignCollectionsWebComponent } from \"../components/assign-collections\";\nimport {\n  CollectionDialogAction,\n  CollectionDialogTabType,\n  openCollectionDialog,\n} from \"../components/collection-dialog\";\nimport {\n  VaultItemDialogComponent,\n  VaultItemDialogMode,\n  VaultItemDialogResult,\n} from \"../components/vault-item-dialog/vault-item-dialog.component\";\nimport { VaultItem } from \"../components/vault-items/vault-item\";\nimport { VaultItemEvent } from \"../components/vault-items/vault-item-event\";\nimport { VaultItemsModule } from \"../components/vault-items/vault-items.module\";\nimport { getNestedCollectionTree } from \"../utils/collection-utils\";\n\nimport { AddEditComponent } from \"./add-edit.component\";\nimport {\n  AttachmentDialogCloseResult,\n  AttachmentDialogResult,\n  AttachmentsV2Component,\n} from \"./attachments-v2.component\";\nimport { AttachmentsComponent } from \"./attachments.component\";\nimport {\n  BulkDeleteDialogResult,\n  openBulkDeleteDialog,\n} from \"./bulk-action-dialogs/bulk-delete-dialog/bulk-delete-dialog.component\";\nimport {\n  BulkMoveDialogResult,\n  openBulkMoveDialog,\n} from \"./bulk-action-dialogs/bulk-move-dialog/bulk-move-dialog.component\";\nimport { FolderAddEditDialogResult, openFolderAddEditDialog } from \"./folder-add-edit.component\";\nimport { VaultBannersComponent } from \"./vault-banners/vault-banners.component\";\nimport { VaultFilterComponent } from \"./vault-filter/components/vault-filter.component\";\nimport { VaultFilterService } from \"./vault-filter/services/abstractions/vault-filter.service\";\nimport { RoutedVaultFilterBridgeService } from \"./vault-filter/services/routed-vault-filter-bridge.service\";\nimport { RoutedVaultFilterService } from \"./vault-filter/services/routed-vault-filter.service\";\nimport { createFilterFunction } from \"./vault-filter/shared/models/filter-function\";\nimport {\n  All,\n  RoutedVaultFilterModel,\n} from \"./vault-filter/shared/models/routed-vault-filter.model\";\nimport { VaultFilter } from \"./vault-filter/shared/models/vault-filter.model\";\nimport { FolderFilter, OrganizationFilter } from \"./vault-filter/shared/models/vault-filter.type\";\nimport { VaultFilterModule } from \"./vault-filter/vault-filter.module\";\nimport { VaultHeaderComponent } from \"./vault-header/vault-header.component\";\nimport { VaultOnboardingComponent } from \"./vault-onboarding/vault-onboarding.component\";\n\nconst BroadcasterSubscriptionId = \"VaultComponent\";\nconst SearchTextDebounceInterval = 200;\n\n@Component({\n  standalone: true,\n  selector: \"app-vault\",\n  templateUrl: \"vault.component.html\",\n  imports: [\n    VaultHeaderComponent,\n    VaultOnboardingComponent,\n    VaultBannersComponent,\n    VaultFilterModule,\n    VaultItemsModule,\n    SharedModule,\n    DecryptionFailureDialogComponent,\n  ],\n  providers: [\n    RoutedVaultFilterService,\n    RoutedVaultFilterBridgeService,\n    DefaultCipherFormConfigService,\n  ],\n})\nexport class VaultComponent implements OnInit, OnDestroy {\n  @ViewChild(\"vaultFilter\", { static: true }) filterComponent: VaultFilterComponent;\n  @ViewChild(\"attachments\", { read: ViewContainerRef, static: true })\n  attachmentsModalRef: ViewContainerRef;\n  @ViewChild(\"folderAddEdit\", { read: ViewContainerRef, static: true })\n  folderAddEditModalRef: ViewContainerRef;\n  @ViewChild(\"cipherAddEdit\", { read: ViewContainerRef, static: true })\n  cipherAddEditModalRef: ViewContainerRef;\n  @ViewChild(\"share\", { read: ViewContainerRef, static: true }) shareModalRef: ViewContainerRef;\n  @ViewChild(\"collectionsModal\", { read: ViewContainerRef, static: true })\n  collectionsModalRef: ViewContainerRef;\n\n  trashCleanupWarning: string = null;\n  kdfIterations: number;\n  activeFilter: VaultFilter = new VaultFilter();\n\n  protected noItemIcon = Icons.Search;\n  protected performingInitialLoad = true;\n  protected refreshing = false;\n  protected processingEvent = false;\n  protected filter: RoutedVaultFilterModel = {};\n  protected showBulkMove: boolean;\n  protected canAccessPremium: boolean;\n  protected allCollections: CollectionView[];\n  protected allOrganizations: Organization[] = [];\n  protected ciphers: CipherView[];\n  protected collections: CollectionView[];\n  protected isEmpty: boolean;\n  protected selectedCollection: TreeNode<CollectionView> | undefined;\n  protected canCreateCollections = false;\n  protected currentSearchText$: Observable<string>;\n  private activeUserId: UserId;\n  private searchText$ = new Subject<string>();\n  private refresh$ = new BehaviorSubject<void>(null);\n  private destroy$ = new Subject<void>();\n  private extensionRefreshEnabled: boolean;\n  private hasSubscription$ = new BehaviorSubject<boolean>(false);\n\n  private vaultItemDialogRef?: DialogRef<VaultItemDialogResult> | undefined;\n  private readonly unpaidSubscriptionDialog$ = this.organizationService.organizations$.pipe(\n    filter((organizations) => organizations.length === 1),\n    map(([organization]) => organization),\n    switchMap((organization) =>\n      from(this.billingApiService.getOrganizationBillingMetadata(organization.id)).pipe(\n        tap((organizationMetaData) => {\n          this.hasSubscription$.next(organizationMetaData.hasSubscription);\n        }),\n        switchMap((organizationMetaData) =>\n          from(\n            this.trialFlowService.handleUnpaidSubscriptionDialog(\n              organization,\n              organizationMetaData,\n            ),\n          ),\n        ),\n      ),\n    ),\n  );\n\n  protected organizationsPaymentStatus$: Observable<FreeTrial[]> = combineLatest([\n    this.organizationService.organizations$.pipe(\n      map(\n        (organizations) =>\n          organizations?.filter((org) => org.isOwner && org.canViewBillingHistory) ?? [],\n      ),\n    ),\n    this.hasSubscription$,\n  ]).pipe(\n    switchMap(([ownerOrgs, hasSubscription]) => {\n      if (!ownerOrgs || ownerOrgs.length === 0 || !hasSubscription) {\n        return of([]);\n      }\n      return combineLatest(\n        ownerOrgs.map((org) =>\n          combineLatest([\n            this.organizationApiService.getSubscription(org.id),\n            this.organizationBillingService.getPaymentSource(org.id),\n          ]).pipe(\n            map(([subscription, paymentSource]) => {\n              return this.trialFlowService.checkForOrgsWithUpcomingPaymentIssues(\n                org,\n                subscription,\n                paymentSource,\n              );\n            }),\n          ),\n        ),\n      );\n    }),\n    map((results) => results.filter((result) => result.shownBanner)),\n    shareReplay({ refCount: false, bufferSize: 1 }),\n  );\n\n  constructor(\n    private syncService: SyncService,\n    private route: ActivatedRoute,\n    private router: Router,\n    private changeDetectorRef: ChangeDetectorRef,\n    private i18nService: I18nService,\n    private modalService: ModalService,\n    private dialogService: DialogService,\n    private messagingService: MessagingService,\n    private platformUtilsService: PlatformUtilsService,\n    private broadcasterService: BroadcasterService,\n    private ngZone: NgZone,\n    private organizationService: OrganizationService,\n    private vaultFilterService: VaultFilterService,\n    private routedVaultFilterService: RoutedVaultFilterService,\n    private routedVaultFilterBridgeService: RoutedVaultFilterBridgeService,\n    private cipherService: CipherService,\n    private passwordRepromptService: PasswordRepromptService,\n    private collectionService: CollectionService,\n    private logService: LogService,\n    private totpService: TotpService,\n    private eventCollectionService: EventCollectionService,\n    private searchService: SearchService,\n    private searchPipe: SearchPipe,\n    private configService: ConfigService,\n    private apiService: ApiService,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private toastService: ToastService,\n    private accountService: AccountService,\n    private cipherFormConfigService: DefaultCipherFormConfigService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    protected billingApiService: BillingApiServiceAbstraction,\n    private trialFlowService: TrialFlowService,\n    private organizationBillingService: OrganizationBillingServiceAbstraction,\n  ) {}\n\n  async ngOnInit() {\n    this.trashCleanupWarning = this.i18nService.t(\n      this.platformUtilsService.isSelfHost()\n        ? \"trashCleanupWarningSelfHosted\"\n        : \"trashCleanupWarning\",\n    );\n\n    this.activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n\n    const firstSetup$ = this.route.queryParams.pipe(\n      first(),\n      switchMap(async (params: Params) => {\n        await this.syncService.fullSync(false);\n\n        const cipherId = getCipherIdFromParams(params);\n        if (!cipherId) {\n          return;\n        }\n        const cipherView = new CipherView();\n        cipherView.id = cipherId;\n        if (params.action === \"clone\") {\n          await this.cloneCipher(cipherView);\n        } else if (params.action === \"view\") {\n          await this.viewCipher(cipherView);\n        } else if (params.action === \"edit\") {\n          await this.editCipher(cipherView);\n        }\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    this.broadcasterService.subscribe(BroadcasterSubscriptionId, (message: any) => {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.ngZone.run(async () => {\n        switch (message.command) {\n          case \"syncCompleted\":\n            if (message.successfully) {\n              this.refresh();\n              this.changeDetectorRef.detectChanges();\n            }\n            break;\n        }\n      });\n    });\n\n    this.routedVaultFilterBridgeService.activeFilter$\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((activeFilter) => {\n        this.activeFilter = activeFilter;\n      });\n\n    const filter$ = this.routedVaultFilterService.filter$;\n    const allCollections$ = this.collectionService.decryptedCollections$;\n    const nestedCollections$ = allCollections$.pipe(\n      map((collections) => getNestedCollectionTree(collections)),\n    );\n\n    this.searchText$\n      .pipe(debounceTime(SearchTextDebounceInterval), takeUntil(this.destroy$))\n      .subscribe((searchText) =>\n        this.router.navigate([], {\n          queryParams: { search: Utils.isNullOrEmpty(searchText) ? null : searchText },\n          queryParamsHandling: \"merge\",\n          replaceUrl: true,\n        }),\n      );\n\n    this.currentSearchText$ = this.route.queryParams.pipe(map((queryParams) => queryParams.search));\n\n    const ciphers$ = combineLatest([\n      this.cipherService.cipherViews$.pipe(filter((c) => c !== null)),\n      filter$,\n      this.currentSearchText$,\n    ]).pipe(\n      filter(([ciphers, filter]) => ciphers != undefined && filter != undefined),\n      concatMap(async ([ciphers, filter, searchText]) => {\n        const failedCiphers = await firstValueFrom(this.cipherService.failedToDecryptCiphers$);\n        const filterFunction = createFilterFunction(filter);\n        // Append any failed to decrypt ciphers to the top of the cipher list\n        const allCiphers = [...failedCiphers, ...ciphers];\n\n        if (await this.searchService.isSearchable(searchText)) {\n          return await this.searchService.searchCiphers(searchText, [filterFunction], allCiphers);\n        }\n\n        return allCiphers.filter(filterFunction);\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    const collections$ = combineLatest([nestedCollections$, filter$, this.currentSearchText$]).pipe(\n      filter(([collections, filter]) => collections != undefined && filter != undefined),\n      concatMap(async ([collections, filter, searchText]) => {\n        if (filter.collectionId === undefined || filter.collectionId === Unassigned) {\n          return [];\n        }\n        let collectionsToReturn = [];\n        if (filter.organizationId !== undefined && filter.collectionId === All) {\n          collectionsToReturn = collections\n            .filter((c) => c.node.organizationId === filter.organizationId)\n            .map((c) => c.node);\n        } else if (filter.collectionId === All) {\n          collectionsToReturn = collections.map((c) => c.node);\n        } else {\n          const selectedCollection = ServiceUtils.getTreeNodeObjectFromList(\n            collections,\n            filter.collectionId,\n          );\n          collectionsToReturn = selectedCollection?.children.map((c) => c.node) ?? [];\n        }\n\n        if (await this.searchService.isSearchable(searchText)) {\n          collectionsToReturn = this.searchPipe.transform(\n            collectionsToReturn,\n            searchText,\n            (collection) => collection.name,\n            (collection) => collection.id,\n          );\n        }\n\n        return collectionsToReturn;\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    const selectedCollection$ = combineLatest([nestedCollections$, filter$]).pipe(\n      filter(([collections, filter]) => collections != undefined && filter != undefined),\n      map(([collections, filter]) => {\n        if (\n          filter.collectionId === undefined ||\n          filter.collectionId === All ||\n          filter.collectionId === Unassigned\n        ) {\n          return undefined;\n        }\n\n        return ServiceUtils.getTreeNodeObjectFromList(collections, filter.collectionId);\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n\n    firstSetup$\n      .pipe(\n        switchMap(() => this.route.queryParams),\n        // Only process the queryParams if the dialog is not open (only when extension refresh is enabled)\n        filter(() => this.vaultItemDialogRef == undefined || !this.extensionRefreshEnabled),\n        switchMap(async (params) => {\n          const cipherId = getCipherIdFromParams(params);\n          if (cipherId) {\n            if (await this.cipherService.get(cipherId)) {\n              let action = params.action;\n              // Default to \"view\" if extension refresh is enabled\n              if (action == null && this.extensionRefreshEnabled) {\n                action = \"view\";\n              }\n\n              if (action == \"showFailedToDecrypt\") {\n                DecryptionFailureDialogComponent.open(this.dialogService, {\n                  cipherIds: [cipherId as CipherId],\n                });\n                await this.router.navigate([], {\n                  queryParams: { itemId: null, cipherId: null, action: null },\n                  queryParamsHandling: \"merge\",\n                  replaceUrl: true,\n                });\n                return;\n              }\n\n              if (action === \"view\") {\n                await this.viewCipherById(cipherId);\n              } else {\n                await this.editCipherId(cipherId);\n              }\n            } else {\n              this.toastService.showToast({\n                variant: \"error\",\n                title: null,\n                message: this.i18nService.t(\"unknownCipher\"),\n              });\n              await this.router.navigate([], {\n                queryParams: { itemId: null, cipherId: null },\n                queryParamsHandling: \"merge\",\n              });\n            }\n          }\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n\n    firstSetup$\n      .pipe(\n        switchMap(() => this.cipherService.failedToDecryptCiphers$),\n        map((ciphers) => ciphers.filter((c) => !c.isDeleted)),\n        filter((ciphers) => ciphers.length > 0),\n        take(1),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((ciphers) => {\n        DecryptionFailureDialogComponent.open(this.dialogService, {\n          cipherIds: ciphers.map((c) => c.id as CipherId),\n        });\n      });\n\n    this.unpaidSubscriptionDialog$.pipe(takeUntil(this.destroy$)).subscribe();\n\n    firstSetup$\n      .pipe(\n        switchMap(() => this.refresh$),\n        tap(() => (this.refreshing = true)),\n        switchMap(() =>\n          combineLatest([\n            filter$,\n            this.billingAccountProfileStateService.hasPremiumFromAnySource$(this.activeUserId),\n            allCollections$,\n            this.organizationService.organizations$,\n            ciphers$,\n            collections$,\n            selectedCollection$,\n          ]),\n        ),\n        takeUntil(this.destroy$),\n      )\n      .subscribe(\n        ([\n          filter,\n          canAccessPremium,\n          allCollections,\n          allOrganizations,\n          ciphers,\n          collections,\n          selectedCollection,\n        ]) => {\n          this.filter = filter;\n          this.canAccessPremium = canAccessPremium;\n          this.allCollections = allCollections;\n          this.allOrganizations = allOrganizations;\n          this.ciphers = ciphers;\n          this.collections = collections;\n          this.selectedCollection = selectedCollection;\n\n          this.canCreateCollections = allOrganizations?.some(\n            (o) => o.canCreateNewCollections && !o.isProviderUser,\n          );\n\n          this.showBulkMove = filter.type !== \"trash\";\n          this.isEmpty = collections?.length === 0 && ciphers?.length === 0;\n          this.performingInitialLoad = false;\n          this.refreshing = false;\n        },\n      );\n\n    // Check if the extension refresh feature flag is enabled\n    this.extensionRefreshEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.ExtensionRefresh,\n    );\n  }\n\n  ngOnDestroy() {\n    this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n    this.destroy$.next();\n    this.destroy$.complete();\n    this.vaultFilterService.clearOrganizationFilter();\n  }\n\n  async onVaultItemsEvent(event: VaultItemEvent) {\n    this.processingEvent = true;\n    try {\n      switch (event.type) {\n        case \"viewAttachments\":\n          await this.editCipherAttachments(event.item);\n          break;\n        case \"clone\":\n          await this.cloneCipher(event.item);\n          break;\n        case \"restore\":\n          if (event.items.length === 1) {\n            await this.restore(event.items[0]);\n          } else {\n            await this.bulkRestore(event.items);\n          }\n          break;\n        case \"delete\":\n          await this.handleDeleteEvent(event.items);\n          break;\n        case \"moveToFolder\":\n          await this.bulkMove(event.items);\n          break;\n        case \"copyField\":\n          await this.copy(event.item, event.field);\n          break;\n        case \"editCollection\":\n          await this.editCollection(event.item, CollectionDialogTabType.Info);\n          break;\n        case \"viewCollectionAccess\":\n          await this.editCollection(event.item, CollectionDialogTabType.Access);\n          break;\n        case \"assignToCollections\":\n          await this.bulkAssignToCollections(event.items);\n          break;\n      }\n    } finally {\n      this.processingEvent = false;\n    }\n  }\n\n  async applyOrganizationFilter(orgId: string) {\n    if (orgId == null) {\n      orgId = \"MyVault\";\n    }\n    const orgs = await firstValueFrom(this.filterComponent.filters.organizationFilter.data$);\n    const orgNode = ServiceUtils.getTreeNodeObject(orgs, orgId) as TreeNode<OrganizationFilter>;\n    await this.filterComponent.filters?.organizationFilter?.action(orgNode);\n  }\n\n  addFolder = async (): Promise<void> => {\n    openFolderAddEditDialog(this.dialogService);\n  };\n\n  editFolder = async (folder: FolderFilter): Promise<void> => {\n    const dialog = openFolderAddEditDialog(this.dialogService, {\n      data: {\n        folderId: folder.id,\n      },\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n\n    if (result === FolderAddEditDialogResult.Deleted) {\n      await this.router.navigate([], {\n        queryParams: { folderId: null },\n        queryParamsHandling: \"merge\",\n        replaceUrl: true,\n      });\n    }\n  };\n\n  filterSearchText(searchText: string) {\n    this.searchText$.next(searchText);\n  }\n\n  /**\n   * Handles opening the attachments dialog for a cipher.\n   * Runs several checks to ensure that the user has the correct permissions\n   * and then opens the attachments dialog.\n   * Uses the new AttachmentsV2Component if the extensionRefresh feature flag is enabled.\n   *\n   * @param cipher\n   * @returns\n   */\n  async editCipherAttachments(cipher: CipherView) {\n    if (cipher?.reprompt !== 0 && !(await this.passwordRepromptService.showPasswordPrompt())) {\n      await this.go({ cipherId: null, itemId: null });\n      return;\n    }\n\n    if (cipher.organizationId == null && !this.canAccessPremium) {\n      this.messagingService.send(\"premiumRequired\");\n      return;\n    } else if (cipher.organizationId != null) {\n      const org = await this.organizationService.get(cipher.organizationId);\n      if (org != null && (org.maxStorageGb == null || org.maxStorageGb === 0)) {\n        this.messagingService.send(\"upgradeOrganization\", {\n          organizationId: cipher.organizationId,\n        });\n        return;\n      }\n    }\n\n    const canEditAttachments = await this.canEditAttachments(cipher);\n\n    let madeAttachmentChanges = false;\n\n    if (this.extensionRefreshEnabled) {\n      const dialogRef = AttachmentsV2Component.open(this.dialogService, {\n        cipherId: cipher.id as CipherId,\n      });\n\n      const result: AttachmentDialogCloseResult = await lastValueFrom(dialogRef.closed);\n\n      if (\n        result.action === AttachmentDialogResult.Uploaded ||\n        result.action === AttachmentDialogResult.Removed\n      ) {\n        this.refresh();\n      }\n\n      return;\n    }\n\n    const [modal] = await this.modalService.openViewRef(\n      AttachmentsComponent,\n      this.attachmentsModalRef,\n      (comp) => {\n        comp.cipherId = cipher.id;\n        comp.viewOnly = !canEditAttachments;\n        comp.onUploadedAttachment\n          .pipe(takeUntil(this.destroy$))\n          .subscribe(() => (madeAttachmentChanges = true));\n        comp.onDeletedAttachment\n          .pipe(takeUntil(this.destroy$))\n          .subscribe(() => (madeAttachmentChanges = true));\n        comp.onReuploadedAttachment\n          .pipe(takeUntil(this.destroy$))\n          .subscribe(() => (madeAttachmentChanges = true));\n      },\n    );\n\n    modal.onClosed.pipe(takeUntil(this.destroy$)).subscribe(() => {\n      if (madeAttachmentChanges) {\n        this.refresh();\n      }\n      madeAttachmentChanges = false;\n    });\n  }\n\n  /**\n   * Open the combined view / edit dialog for a cipher.\n   * @param mode - Starting mode of the dialog.\n   * @param formConfig - Configuration for the form when editing/adding a cipher.\n   * @param activeCollectionId - The active collection ID.\n   */\n  async openVaultItemDialog(\n    mode: VaultItemDialogMode,\n    formConfig: CipherFormConfig,\n    activeCollectionId?: CollectionId,\n  ) {\n    this.vaultItemDialogRef = VaultItemDialogComponent.open(this.dialogService, {\n      mode,\n      formConfig,\n      activeCollectionId,\n    });\n\n    const result = await lastValueFrom(this.vaultItemDialogRef.closed);\n    this.vaultItemDialogRef = undefined;\n\n    // When the dialog is closed for a premium upgrade, return early as the user\n    // should be navigated to the subscription settings elsewhere\n    if (result === VaultItemDialogResult.PremiumUpgrade) {\n      return;\n    }\n\n    // If the dialog was closed by deleting the cipher, refresh the vault.\n    if (result === VaultItemDialogResult.Deleted || result === VaultItemDialogResult.Saved) {\n      this.refresh();\n    }\n\n    // Clear the query params when the dialog closes\n    await this.go({ cipherId: null, itemId: null, action: null });\n  }\n\n  async addCipher(cipherType?: CipherType) {\n    const type = cipherType ?? this.activeFilter.cipherType;\n\n    if (this.extensionRefreshEnabled) {\n      return this.addCipherV2(type);\n    }\n\n    const component = (await this.editCipher(null)) as AddEditComponent;\n    component.type = type;\n    if (\n      this.activeFilter.organizationId !== \"MyVault\" &&\n      this.activeFilter.organizationId != null\n    ) {\n      component.organizationId = this.activeFilter.organizationId;\n      component.collections = (\n        await firstValueFrom(this.vaultFilterService.filteredCollections$)\n      ).filter((c) => !c.readOnly && c.id != null);\n    }\n    const selectedColId = this.activeFilter.collectionId;\n    if (selectedColId !== \"AllCollections\" && selectedColId != null) {\n      const selectedCollection = (\n        await firstValueFrom(this.vaultFilterService.filteredCollections$)\n      ).find((c) => c.id === selectedColId);\n      component.organizationId = selectedCollection?.organizationId;\n      if (!selectedCollection.readOnly) {\n        component.collectionIds = [selectedColId];\n      }\n    }\n    component.folderId = this.activeFilter.folderId;\n  }\n\n  /**\n   * Opens the add cipher dialog.\n   * @param cipherType The type of cipher to add.\n   * @returns The dialog reference.\n   */\n  async addCipherV2(cipherType?: CipherType) {\n    const cipherFormConfig = await this.cipherFormConfigService.buildConfig(\n      \"add\",\n      null,\n      cipherType,\n    );\n    const collectionId =\n      this.activeFilter.collectionId !== \"AllCollections\" && this.activeFilter.collectionId != null\n        ? this.activeFilter.collectionId\n        : null;\n    let organizationId =\n      this.activeFilter.organizationId !== \"MyVault\" && this.activeFilter.organizationId != null\n        ? this.activeFilter.organizationId\n        : null;\n    // Attempt to get the organization ID from the collection if present\n    if (collectionId) {\n      const organizationIdFromCollection = (\n        await firstValueFrom(this.vaultFilterService.filteredCollections$)\n      ).find((c) => c.id === this.activeFilter.collectionId)?.organizationId;\n      if (organizationIdFromCollection) {\n        organizationId = organizationIdFromCollection;\n      }\n    }\n    cipherFormConfig.initialValues = {\n      organizationId: organizationId as OrganizationId,\n      collectionIds: [collectionId as CollectionId],\n      folderId: this.activeFilter.folderId,\n    };\n\n    await this.openVaultItemDialog(\"form\", cipherFormConfig);\n  }\n\n  async editCipher(cipher: CipherView, cloneMode?: boolean) {\n    return this.editCipherId(cipher?.id, cloneMode);\n  }\n\n  async editCipherId(id: string, cloneMode?: boolean) {\n    const cipher = await this.cipherService.get(id);\n\n    if (\n      cipher &&\n      cipher.reprompt !== 0 &&\n      !(await this.passwordRepromptService.showPasswordPrompt())\n    ) {\n      // didn't pass password prompt, so don't open add / edit modal\n      await this.go({ cipherId: null, itemId: null, action: null });\n      return;\n    }\n\n    if (this.extensionRefreshEnabled) {\n      await this.editCipherIdV2(cipher, cloneMode);\n      return;\n    }\n\n    const [modal, childComponent] = await this.modalService.openViewRef(\n      AddEditComponent,\n      this.cipherAddEditModalRef,\n      (comp) => {\n        comp.cipherId = id;\n        comp.collectionId = this.selectedCollection?.node.id;\n\n        comp.onSavedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n          modal.close();\n          this.refresh();\n        });\n        comp.onDeletedCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n          modal.close();\n          this.refresh();\n        });\n        comp.onRestoredCipher.pipe(takeUntil(this.destroy$)).subscribe(() => {\n          modal.close();\n          this.refresh();\n        });\n      },\n    );\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    modal.onClosedPromise().then(() => {\n      void this.go({ cipherId: null, itemId: null, action: null });\n    });\n\n    return childComponent;\n  }\n\n  /**\n   * Edit a cipher using the new VaultItemDialog.\n   *\n   * @param cipher\n   * @param cloneMode\n   */\n  private async editCipherIdV2(cipher: Cipher, cloneMode?: boolean) {\n    const cipherFormConfig = await this.cipherFormConfigService.buildConfig(\n      cloneMode ? \"clone\" : \"edit\",\n      cipher.id as CipherId,\n      cipher.type,\n    );\n\n    await this.openVaultItemDialog(\"form\", cipherFormConfig);\n  }\n\n  /**\n   * Takes a CipherView and opens a dialog where it can be viewed (wraps viewCipherById).\n   * @param cipher - CipherView\n   * @returns Promise<void>\n   */\n  viewCipher(cipher: CipherView) {\n    return this.viewCipherById(cipher.id);\n  }\n\n  /**\n   * Takes a cipher id and opens a dialog where it can be viewed.\n   * @param id - string\n   * @returns Promise<void>\n   */\n  async viewCipherById(id: string) {\n    const cipher = await this.cipherService.get(id);\n    // If cipher exists (cipher is null when new) and MP reprompt\n    // is on for this cipher, then show password reprompt.\n    if (\n      cipher &&\n      cipher.reprompt !== 0 &&\n      !(await this.passwordRepromptService.showPasswordPrompt())\n    ) {\n      // Didn't pass password prompt, so don't open add / edit modal.\n      await this.go({ cipherId: null, itemId: null, action: null });\n      return;\n    }\n\n    const cipherFormConfig = await this.cipherFormConfigService.buildConfig(\n      cipher.edit ? \"edit\" : \"partial-edit\",\n      cipher.id as CipherId,\n      cipher.type,\n    );\n\n    await this.openVaultItemDialog(\n      \"view\",\n      cipherFormConfig,\n      this.selectedCollection?.node.id as CollectionId,\n    );\n  }\n\n  async addCollection() {\n    const dialog = openCollectionDialog(this.dialogService, {\n      data: {\n        organizationId: this.allOrganizations\n          .filter((o) => o.canCreateNewCollections && !o.isProviderUser)\n          .sort(Utils.getSortFunction(this.i18nService, \"name\"))[0].id,\n        parentCollectionId: this.filter.collectionId,\n        showOrgSelector: true,\n        limitNestedCollections: true,\n      },\n    });\n    const result = await lastValueFrom(dialog.closed);\n    if (result.action === CollectionDialogAction.Saved) {\n      if (result.collection) {\n        // Update CollectionService with the new collection\n        const c = new CollectionData(result.collection as CollectionDetailsResponse);\n        await this.collectionService.upsert(c);\n      }\n      this.refresh();\n    }\n  }\n\n  async editCollection(c: CollectionView, tab: CollectionDialogTabType): Promise<void> {\n    const dialog = openCollectionDialog(this.dialogService, {\n      data: {\n        collectionId: c?.id,\n        organizationId: c.organizationId,\n        initialTab: tab,\n        limitNestedCollections: true,\n      },\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n    if (result.action === CollectionDialogAction.Saved) {\n      if (result.collection) {\n        // Update CollectionService with the new collection\n        const c = new CollectionData(result.collection as CollectionDetailsResponse);\n        await this.collectionService.upsert(c);\n      }\n      this.refresh();\n    } else if (result.action === CollectionDialogAction.Deleted) {\n      await this.collectionService.delete(result.collection?.id);\n      this.refresh();\n      // Navigate away if we deleted the collection we were viewing\n      if (this.selectedCollection?.node.id === c?.id) {\n        await this.router.navigate([], {\n          queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null },\n          queryParamsHandling: \"merge\",\n          replaceUrl: true,\n        });\n      }\n    }\n  }\n\n  async deleteCollection(collection: CollectionView): Promise<void> {\n    const organization = await this.organizationService.get(collection.organizationId);\n    if (!collection.canDelete(organization)) {\n      this.showMissingPermissionsError();\n      return;\n    }\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: collection.name,\n      content: { key: \"deleteCollectionConfirmation\" },\n      type: \"warning\",\n    });\n    if (!confirmed) {\n      return;\n    }\n    try {\n      await this.apiService.deleteCollection(collection.organizationId, collection.id);\n      await this.collectionService.delete(collection.id);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"deletedCollectionId\", collection.name),\n      });\n      // Navigate away if we deleted the collection we were viewing\n      if (this.selectedCollection?.node.id === collection.id) {\n        await this.router.navigate([], {\n          queryParams: { collectionId: this.selectedCollection.parent?.node.id ?? null },\n          queryParamsHandling: \"merge\",\n          replaceUrl: true,\n        });\n      }\n      this.refresh();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async bulkAssignToCollections(ciphers: CipherView[]) {\n    if (!(await this.repromptCipher(ciphers))) {\n      return;\n    }\n\n    if (ciphers.length === 0) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"nothingSelected\"),\n      });\n      return;\n    }\n\n    let availableCollections: CollectionView[] = [];\n    const orgId =\n      this.activeFilter.organizationId ||\n      ciphers.find((c) => c.organizationId !== null)?.organizationId;\n\n    if (orgId && orgId !== \"MyVault\") {\n      const organization = this.allOrganizations.find((o) => o.id === orgId);\n      availableCollections = this.allCollections.filter(\n        (c) => c.organizationId === organization.id && !c.readOnly,\n      );\n    }\n\n    const dialog = AssignCollectionsWebComponent.open(this.dialogService, {\n      data: {\n        ciphers,\n        organizationId: orgId as OrganizationId,\n        availableCollections,\n        activeCollection: this.activeFilter?.selectedCollectionNode?.node,\n      },\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n    if (result === CollectionAssignmentResult.Saved) {\n      this.refresh();\n    }\n  }\n\n  async cloneCipher(cipher: CipherView) {\n    if (cipher.login?.hasFido2Credentials) {\n      const confirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"passkeyNotCopied\" },\n        content: { key: \"passkeyNotCopiedAlert\" },\n        type: \"info\",\n      });\n\n      if (!confirmed) {\n        return false;\n      }\n    }\n\n    const component = await this.editCipher(cipher, true);\n\n    if (component != null) {\n      component.cloneMode = true;\n    }\n  }\n\n  async restore(c: CipherView): Promise<boolean> {\n    if (!c.isDeleted) {\n      return;\n    }\n\n    if (!c.edit) {\n      this.showMissingPermissionsError();\n      return;\n    }\n\n    if (!(await this.repromptCipher([c]))) {\n      return;\n    }\n\n    try {\n      await this.cipherService.restoreWithServer(c.id);\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"restoredItem\"),\n      });\n      this.refresh();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async bulkRestore(ciphers: CipherView[]) {\n    if (ciphers.some((c) => !c.edit)) {\n      this.showMissingPermissionsError();\n      return;\n    }\n\n    if (!(await this.repromptCipher(ciphers))) {\n      return;\n    }\n\n    const selectedCipherIds = ciphers.map((cipher) => cipher.id);\n    if (selectedCipherIds.length === 0) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"nothingSelected\"),\n      });\n      return;\n    }\n\n    await this.cipherService.restoreManyWithServer(selectedCipherIds);\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"restoredItems\"),\n    });\n    this.refresh();\n  }\n\n  private async handleDeleteEvent(items: VaultItem[]) {\n    const ciphers = items.filter((i) => i.collection === undefined).map((i) => i.cipher);\n    const collections = items.filter((i) => i.cipher === undefined).map((i) => i.collection);\n    if (ciphers.length === 1 && collections.length === 0) {\n      await this.deleteCipher(ciphers[0]);\n    } else if (ciphers.length === 0 && collections.length === 1) {\n      await this.deleteCollection(collections[0]);\n    } else {\n      const orgIds = items\n        .filter((i) => i.cipher === undefined)\n        .map((i) => i.collection.organizationId);\n      const orgs = await firstValueFrom(\n        this.organizationService.organizations$.pipe(\n          map((orgs) => orgs.filter((o) => orgIds.includes(o.id))),\n        ),\n      );\n      await this.bulkDelete(ciphers, collections, orgs);\n    }\n  }\n\n  async deleteCipher(c: CipherView): Promise<boolean> {\n    if (!(await this.repromptCipher([c]))) {\n      return;\n    }\n\n    if (!c.edit) {\n      this.showMissingPermissionsError();\n      return;\n    }\n\n    const permanent = c.isDeleted;\n\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: permanent ? \"permanentlyDeleteItem\" : \"deleteItem\" },\n      content: { key: permanent ? \"permanentlyDeleteItemConfirmation\" : \"deleteItemConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return false;\n    }\n\n    try {\n      await this.deleteCipherWithServer(c.id, permanent);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(permanent ? \"permanentlyDeletedItem\" : \"deletedItem\"),\n      });\n      this.refresh();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  async bulkDelete(\n    ciphers: CipherView[],\n    collections: CollectionView[],\n    organizations: Organization[],\n  ) {\n    if (!(await this.repromptCipher(ciphers))) {\n      return;\n    }\n\n    if (ciphers.length === 0 && collections.length === 0) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"nothingSelected\"),\n      });\n      return;\n    }\n\n    const canDeleteCollections =\n      collections == null ||\n      collections.every((c) => c.canDelete(organizations.find((o) => o.id == c.organizationId)));\n    const canDeleteCiphers = ciphers == null || ciphers.every((c) => c.edit);\n\n    if (!canDeleteCollections || !canDeleteCiphers) {\n      this.showMissingPermissionsError();\n      return;\n    }\n\n    const dialog = openBulkDeleteDialog(this.dialogService, {\n      data: {\n        permanent: this.filter.type === \"trash\",\n        cipherIds: ciphers.map((c) => c.id),\n        organizations: organizations,\n        collections: collections,\n      },\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n    if (result === BulkDeleteDialogResult.Deleted) {\n      this.refresh();\n    }\n  }\n\n  async bulkMove(ciphers: CipherView[]) {\n    if (!(await this.repromptCipher(ciphers))) {\n      return;\n    }\n\n    const selectedCipherIds = ciphers.map((cipher) => cipher.id);\n    if (selectedCipherIds.length === 0) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"nothingSelected\"),\n      });\n      return;\n    }\n\n    const dialog = openBulkMoveDialog(this.dialogService, {\n      data: { cipherIds: selectedCipherIds },\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n    if (result === BulkMoveDialogResult.Moved) {\n      this.refresh();\n    }\n  }\n\n  async copy(cipher: CipherView, field: \"username\" | \"password\" | \"totp\") {\n    let aType;\n    let value;\n    let typeI18nKey;\n\n    if (field === \"username\") {\n      aType = \"Username\";\n      value = cipher.login.username;\n      typeI18nKey = \"username\";\n    } else if (field === \"password\") {\n      aType = \"Password\";\n      value = cipher.login.password;\n      typeI18nKey = \"password\";\n    } else if (field === \"totp\") {\n      aType = \"TOTP\";\n      value = await this.totpService.getCode(cipher.login.totp);\n      typeI18nKey = \"verificationCodeTotp\";\n    } else {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"unexpectedError\"),\n      });\n      return;\n    }\n\n    if (\n      this.passwordRepromptService.protectedFields().includes(aType) &&\n      !(await this.repromptCipher([cipher]))\n    ) {\n      return;\n    }\n\n    if (!cipher.viewPassword) {\n      return;\n    }\n\n    this.platformUtilsService.copyToClipboard(value, { window: window });\n    this.toastService.showToast({\n      variant: \"info\",\n      title: null,\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(typeI18nKey)),\n    });\n\n    if (field === \"password\") {\n      await this.eventCollectionService.collect(EventType.Cipher_ClientCopiedPassword, cipher.id);\n    } else if (field === \"totp\") {\n      await this.eventCollectionService.collect(\n        EventType.Cipher_ClientCopiedHiddenField,\n        cipher.id,\n      );\n    }\n  }\n\n  protected deleteCipherWithServer(id: string, permanent: boolean) {\n    return permanent\n      ? this.cipherService.deleteWithServer(id)\n      : this.cipherService.softDeleteWithServer(id);\n  }\n\n  protected async repromptCipher(ciphers: CipherView[]) {\n    const notProtected = !ciphers.find((cipher) => cipher.reprompt !== CipherRepromptType.None);\n\n    return notProtected || (await this.passwordRepromptService.showPasswordPrompt());\n  }\n\n  private refresh() {\n    this.refresh$.next();\n  }\n\n  private async canEditAttachments(cipher: CipherView) {\n    if (cipher.organizationId == null || cipher.edit) {\n      return true;\n    }\n\n    const organization = this.allOrganizations.find((o) => o.id === cipher.organizationId);\n    return organization.canEditAllCiphers;\n  }\n\n  private async go(queryParams: any = null) {\n    if (queryParams == null) {\n      queryParams = {\n        favorites: this.activeFilter.isFavorites || null,\n        type: this.activeFilter.cipherType,\n        folderId: this.activeFilter.folderId,\n        collectionId: this.activeFilter.collectionId,\n        deleted: this.activeFilter.isDeleted || null,\n      };\n    }\n\n    await this.router.navigate([], {\n      relativeTo: this.route,\n      queryParams: queryParams,\n      queryParamsHandling: \"merge\",\n      replaceUrl: true,\n    });\n  }\n\n  private showMissingPermissionsError() {\n    this.toastService.showToast({\n      variant: \"error\",\n      title: null,\n      message: this.i18nService.t(\"missingPermissions\"),\n    });\n  }\n}\n\n/**\n * Allows backwards compatibility with\n * old links that used the original `cipherId` param\n */\nconst getCipherIdFromParams = (params: Params): string => {\n  return params[\"itemId\"] || params[\"cipherId\"];\n};\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nimport { VaultComponent } from \"./vault.component\";\nconst routes: Routes = [\n  {\n    path: \"\",\n    component: VaultComponent,\n    data: { titleId: \"vaults\" },\n  },\n];\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class VaultRoutingModule {}\n","import { NgModule } from \"@angular/core\";\n\nimport { LooseComponentsModule, SharedModule } from \"../../shared\";\nimport { CollectionDialogModule } from \"../components/collection-dialog\";\nimport { CollectionBadgeModule } from \"../org-vault/collection-badge/collection-badge.module\";\nimport { GroupBadgeModule } from \"../org-vault/group-badge/group-badge.module\";\n\nimport { BulkDialogsModule } from \"./bulk-action-dialogs/bulk-dialogs.module\";\nimport { OrganizationBadgeModule } from \"./organization-badge/organization-badge.module\";\nimport { PipesModule } from \"./pipes/pipes.module\";\nimport { VaultRoutingModule } from \"./vault-routing.module\";\nimport { VaultComponent } from \"./vault.component\";\nimport { ViewComponent } from \"./view.component\";\n\n@NgModule({\n  imports: [\n    VaultRoutingModule,\n    OrganizationBadgeModule,\n    GroupBadgeModule,\n    CollectionBadgeModule,\n    PipesModule,\n    SharedModule,\n    LooseComponentsModule,\n    BulkDialogsModule,\n    CollectionDialogModule,\n    VaultComponent,\n    ViewComponent,\n  ],\n})\nexport class VaultModule {}\n","import { NgModule } from \"@angular/core\";\nimport { Route, RouterModule, Routes } from \"@angular/router\";\n\nimport { TwoFactorTimeoutComponent } from \"@bitwarden/angular/auth/components/two-factor-auth/two-factor-auth-expired.component\";\nimport { unauthUiRefreshSwap } from \"@bitwarden/angular/auth/functions/unauth-ui-refresh-route-swap\";\nimport {\n  authGuard,\n  lockGuard,\n  redirectGuard,\n  tdeDecryptionRequiredGuard,\n  unauthGuardFn,\n} from \"@bitwarden/angular/auth/guards\";\nimport { canAccessFeature } from \"@bitwarden/angular/platform/guard/feature-flag.guard\";\nimport { generatorSwap } from \"@bitwarden/angular/tools/generator/generator-swap\";\nimport { NewDeviceVerificationNoticeGuard } from \"@bitwarden/angular/vault/guards\";\nimport {\n  AnonLayoutWrapperComponent,\n  AnonLayoutWrapperData,\n  PasswordHintComponent,\n  RegistrationFinishComponent,\n  RegistrationStartComponent,\n  RegistrationStartSecondaryComponent,\n  RegistrationStartSecondaryComponentData,\n  SetPasswordJitComponent,\n  RegistrationLinkExpiredComponent,\n  LoginComponent,\n  LoginSecondaryContentComponent,\n  LockIcon,\n  TwoFactorTimeoutIcon,\n  UserLockIcon,\n  SsoKeyIcon,\n  LoginViaAuthRequestComponent,\n  DevicesIcon,\n  RegistrationUserAddIcon,\n  RegistrationLockAltIcon,\n  RegistrationExpiredLinkIcon,\n  SsoComponent,\n  VaultIcon,\n  LoginDecryptionOptionsComponent,\n} from \"@bitwarden/auth/angular\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { LockComponent } from \"@bitwarden/key-management/angular\";\nimport {\n  NewDeviceVerificationNoticePageOneComponent,\n  NewDeviceVerificationNoticePageTwoComponent,\n  VaultIcons,\n} from \"@bitwarden/vault\";\n\nimport { twofactorRefactorSwap } from \"../../../../libs/angular/src/utils/two-factor-component-refactor-route-swap\";\nimport { flagEnabled, Flags } from \"../utils/flags\";\n\nimport { VerifyRecoverDeleteOrgComponent } from \"./admin-console/organizations/manage/verify-recover-delete-org.component\";\nimport { AcceptFamilySponsorshipComponent } from \"./admin-console/organizations/sponsorships/accept-family-sponsorship.component\";\nimport { FamiliesForEnterpriseSetupComponent } from \"./admin-console/organizations/sponsorships/families-for-enterprise-setup.component\";\nimport { CreateOrganizationComponent } from \"./admin-console/settings/create-organization.component\";\nimport { deepLinkGuard } from \"./auth/guards/deep-link.guard\";\nimport { HintComponent } from \"./auth/hint.component\";\nimport { LoginDecryptionOptionsComponentV1 } from \"./auth/login/login-decryption-options/login-decryption-options-v1.component\";\nimport { LoginComponentV1 } from \"./auth/login/login-v1.component\";\nimport { LoginViaAuthRequestComponentV1 } from \"./auth/login/login-via-auth-request-v1.component\";\nimport { LoginViaWebAuthnComponent } from \"./auth/login/login-via-webauthn/login-via-webauthn.component\";\nimport { AcceptOrganizationComponent } from \"./auth/organization-invite/accept-organization.component\";\nimport { RecoverDeleteComponent } from \"./auth/recover-delete.component\";\nimport { RecoverTwoFactorComponent } from \"./auth/recover-two-factor.component\";\nimport { RemovePasswordComponent } from \"./auth/remove-password.component\";\nimport { SetPasswordComponent } from \"./auth/set-password.component\";\nimport { AccountComponent } from \"./auth/settings/account/account.component\";\nimport { EmergencyAccessComponent } from \"./auth/settings/emergency-access/emergency-access.component\";\nimport { EmergencyAccessViewComponent } from \"./auth/settings/emergency-access/view/emergency-access-view.component\";\nimport { SecurityRoutingModule } from \"./auth/settings/security/security-routing.module\";\nimport { SsoComponentV1 } from \"./auth/sso-v1.component\";\nimport { CompleteTrialInitiationComponent } from \"./auth/trial-initiation/complete-trial-initiation/complete-trial-initiation.component\";\nimport { freeTrialTextResolver } from \"./auth/trial-initiation/complete-trial-initiation/resolver/free-trial-text.resolver\";\nimport { TrialInitiationComponent } from \"./auth/trial-initiation/trial-initiation.component\";\nimport { TwoFactorAuthComponent } from \"./auth/two-factor-auth.component\";\nimport { TwoFactorComponent } from \"./auth/two-factor.component\";\nimport { UpdatePasswordComponent } from \"./auth/update-password.component\";\nimport { UpdateTempPasswordComponent } from \"./auth/update-temp-password.component\";\nimport { VerifyEmailTokenComponent } from \"./auth/verify-email-token.component\";\nimport { VerifyRecoverDeleteComponent } from \"./auth/verify-recover-delete.component\";\nimport { SponsoredFamiliesComponent } from \"./billing/settings/sponsored-families.component\";\nimport { EnvironmentSelectorComponent } from \"./components/environment-selector/environment-selector.component\";\nimport { RouteDataProperties } from \"./core\";\nimport { FrontendLayoutComponent } from \"./layouts/frontend-layout.component\";\nimport { UserLayoutComponent } from \"./layouts/user-layout.component\";\nimport { RequestSMAccessComponent } from \"./secrets-manager/secrets-manager-landing/request-sm-access.component\";\nimport { SMLandingComponent } from \"./secrets-manager/secrets-manager-landing/sm-landing.component\";\nimport { DomainRulesComponent } from \"./settings/domain-rules.component\";\nimport { PreferencesComponent } from \"./settings/preferences.component\";\nimport { CredentialGeneratorComponent } from \"./tools/credential-generator/credential-generator.component\";\nimport { GeneratorComponent } from \"./tools/generator.component\";\nimport { ReportsModule } from \"./tools/reports\";\nimport { AccessComponent } from \"./tools/send/access.component\";\nimport { SendAccessExplainerComponent } from \"./tools/send/send-access-explainer.component\";\nimport { SendComponent } from \"./tools/send/send.component\";\nimport { VaultModule } from \"./vault/individual-vault/vault.module\";\n\nconst routes: Routes = [\n  {\n    path: \"\",\n    component: FrontendLayoutComponent,\n    data: { doNotSaveUrl: true } satisfies RouteDataProperties,\n    children: [\n      {\n        path: \"\",\n        pathMatch: \"full\",\n        children: [], // Children lets us have an empty component.\n        canActivate: [redirectGuard()], // Redirects either to vault, login, or lock page.\n      },\n      {\n        path: \"login-with-passkey\",\n        component: LoginViaWebAuthnComponent,\n        data: { titleId: \"logInWithPasskey\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"register\",\n        component: TrialInitiationComponent,\n        canActivate: [\n          canAccessFeature(FeatureFlag.EmailVerification, false, \"/signup\", false),\n          unauthGuardFn(),\n        ],\n        data: { titleId: \"createAccount\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"trial\",\n        redirectTo: \"register\",\n        pathMatch: \"full\",\n      },\n      {\n        path: \"set-password\",\n        component: SetPasswordComponent,\n        data: { titleId: \"setMasterPassword\" } satisfies RouteDataProperties,\n      },\n      { path: \"verify-email\", component: VerifyEmailTokenComponent },\n      {\n        path: \"accept-organization\",\n        canActivate: [deepLinkGuard()],\n        component: AcceptOrganizationComponent,\n        data: { titleId: \"joinOrganization\", doNotSaveUrl: false } satisfies RouteDataProperties,\n      },\n      {\n        path: \"accept-families-for-enterprise\",\n        component: AcceptFamilySponsorshipComponent,\n        canActivate: [deepLinkGuard()],\n        data: {\n          titleId: \"acceptFamilySponsorship\",\n          doNotSaveUrl: false,\n        } satisfies RouteDataProperties,\n      },\n      { path: \"recover\", pathMatch: \"full\", redirectTo: \"recover-2fa\" },\n      {\n        path: \"verify-recover-delete-org\",\n        component: VerifyRecoverDeleteOrgComponent,\n        canActivate: [unauthGuardFn()],\n        data: { titleId: \"deleteOrganization\" },\n      },\n      {\n        path: \"update-temp-password\",\n        component: UpdateTempPasswordComponent,\n        canActivate: [authGuard],\n        data: { titleId: \"updateTempPassword\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"update-password\",\n        component: UpdatePasswordComponent,\n        canActivate: [authGuard],\n        data: { titleId: \"updatePassword\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"migrate-legacy-encryption\",\n        loadComponent: () =>\n          import(\"./key-management/migrate-encryption/migrate-legacy-encryption.component\").then(\n            (mod) => mod.MigrateFromLegacyEncryptionComponent,\n          ),\n      },\n    ],\n  },\n  ...unauthUiRefreshSwap(\n    LoginViaAuthRequestComponentV1,\n    AnonLayoutWrapperComponent,\n    {\n      path: \"login-with-device\",\n      data: { titleId: \"loginWithDevice\" } satisfies RouteDataProperties,\n    },\n    {\n      path: \"login-with-device\",\n      data: {\n        pageIcon: DevicesIcon,\n        pageTitle: {\n          key: \"loginInitiated\",\n        },\n        pageSubtitle: {\n          key: \"aNotificationWasSentToYourDevice\",\n        },\n        titleId: \"loginInitiated\",\n      } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      children: [\n        { path: \"\", component: LoginViaAuthRequestComponent },\n        {\n          path: \"\",\n          component: EnvironmentSelectorComponent,\n          outlet: \"environment-selector\",\n        },\n      ],\n    },\n  ),\n  ...unauthUiRefreshSwap(\n    LoginViaAuthRequestComponentV1,\n    AnonLayoutWrapperComponent,\n    {\n      path: \"admin-approval-requested\",\n      data: { titleId: \"adminApprovalRequested\" } satisfies RouteDataProperties,\n    },\n    {\n      path: \"admin-approval-requested\",\n      data: {\n        pageIcon: DevicesIcon,\n        pageTitle: {\n          key: \"adminApprovalRequested\",\n        },\n        pageSubtitle: {\n          key: \"adminApprovalRequestSentToAdmins\",\n        },\n        titleId: \"adminApprovalRequested\",\n      } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      children: [{ path: \"\", component: LoginViaAuthRequestComponent }],\n    },\n  ),\n  ...unauthUiRefreshSwap(\n    AnonLayoutWrapperComponent,\n    AnonLayoutWrapperComponent,\n    {\n      path: \"login\",\n      canActivate: [unauthGuardFn()],\n      children: [\n        {\n          path: \"\",\n          component: LoginComponentV1,\n        },\n        {\n          path: \"\",\n          component: EnvironmentSelectorComponent,\n          outlet: \"environment-selector\",\n        },\n      ],\n      data: {\n        pageTitle: {\n          key: \"logIn\",\n        },\n      },\n    },\n    {\n      path: \"login\",\n      canActivate: [unauthGuardFn()],\n      data: {\n        pageTitle: {\n          key: \"logInToBitwarden\",\n        },\n        pageIcon: VaultIcon,\n      } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      children: [\n        {\n          path: \"\",\n          component: LoginComponent,\n        },\n        {\n          path: \"\",\n          component: LoginSecondaryContentComponent,\n          outlet: \"secondary\",\n        },\n        {\n          path: \"\",\n          component: EnvironmentSelectorComponent,\n          outlet: \"environment-selector\",\n        },\n      ],\n    },\n  ),\n  ...unauthUiRefreshSwap(\n    LoginDecryptionOptionsComponentV1,\n    AnonLayoutWrapperComponent,\n    {\n      path: \"login-initiated\",\n      canActivate: [tdeDecryptionRequiredGuard()],\n    },\n    {\n      path: \"login-initiated\",\n      canActivate: [tdeDecryptionRequiredGuard()],\n      data: {\n        pageIcon: DevicesIcon,\n      },\n      children: [{ path: \"\", component: LoginDecryptionOptionsComponent }],\n    },\n  ),\n  ...unauthUiRefreshSwap(\n    AnonLayoutWrapperComponent,\n    AnonLayoutWrapperComponent,\n    {\n      path: \"hint\",\n      canActivate: [unauthGuardFn()],\n      data: {\n        pageTitle: {\n          key: \"passwordHint\",\n        },\n        titleId: \"passwordHint\",\n      },\n      children: [\n        { path: \"\", component: HintComponent },\n        {\n          path: \"\",\n          component: EnvironmentSelectorComponent,\n          outlet: \"environment-selector\",\n        },\n      ],\n    },\n    {\n      path: \"\",\n      children: [\n        {\n          path: \"hint\",\n          canActivate: [unauthGuardFn()],\n          data: {\n            pageTitle: {\n              key: \"requestPasswordHint\",\n            },\n            pageSubtitle: {\n              key: \"enterYourAccountEmailAddressAndYourPasswordHintWillBeSentToYou\",\n            },\n            pageIcon: UserLockIcon,\n            state: \"hint\",\n          },\n          children: [\n            { path: \"\", component: PasswordHintComponent },\n            {\n              path: \"\",\n              component: EnvironmentSelectorComponent,\n              outlet: \"environment-selector\",\n            },\n          ],\n        },\n      ],\n    },\n  ),\n  {\n    path: \"\",\n    component: AnonLayoutWrapperComponent,\n    children: [\n      {\n        path: \"signup\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n        data: {\n          pageIcon: RegistrationUserAddIcon,\n          pageTitle: {\n            key: \"createAccount\",\n          },\n          titleId: \"createAccount\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: RegistrationStartComponent,\n          },\n          {\n            path: \"\",\n            component: RegistrationStartSecondaryComponent,\n            outlet: \"secondary\",\n            data: {\n              loginRoute: \"/login\",\n            } satisfies RegistrationStartSecondaryComponentData,\n          },\n        ],\n      },\n      {\n        path: \"finish-signup\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n        data: {\n          pageIcon: RegistrationLockAltIcon,\n          titleId: \"setAStrongPassword\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: RegistrationFinishComponent,\n          },\n        ],\n      },\n      {\n        path: \"send/:sendId/:key\",\n        data: {\n          pageTitle: {\n            key: \"viewSend\",\n          },\n          showReadonlyHostname: true,\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: AccessComponent,\n          },\n          {\n            path: \"\",\n            outlet: \"secondary\",\n            component: SendAccessExplainerComponent,\n          },\n        ],\n      },\n      {\n        path: \"set-password-jit\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification)],\n        component: SetPasswordJitComponent,\n        data: {\n          pageTitle: {\n            key: \"joinOrganization\",\n          },\n          pageSubtitle: {\n            key: \"finishJoiningThisOrganizationBySettingAMasterPassword\",\n          },\n        } satisfies AnonLayoutWrapperData,\n      },\n      {\n        path: \"signup-link-expired\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n        data: {\n          pageIcon: RegistrationExpiredLinkIcon,\n          pageTitle: {\n            key: \"expiredLink\",\n          },\n        } satisfies AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: RegistrationLinkExpiredComponent,\n            data: {\n              loginRoute: \"/login\",\n            } satisfies RegistrationStartSecondaryComponentData,\n          },\n        ],\n      },\n      ...unauthUiRefreshSwap(\n        SsoComponentV1,\n        SsoComponent,\n        {\n          path: \"sso\",\n          canActivate: [unauthGuardFn()],\n          data: {\n            pageTitle: {\n              key: \"enterpriseSingleSignOn\",\n            },\n            titleId: \"enterpriseSingleSignOn\",\n          } satisfies RouteDataProperties & AnonLayoutWrapperData,\n          children: [\n            {\n              path: \"\",\n              component: SsoComponentV1,\n            },\n            {\n              path: \"\",\n              component: EnvironmentSelectorComponent,\n              outlet: \"environment-selector\",\n            },\n          ],\n        },\n        {\n          path: \"sso\",\n          canActivate: [unauthGuardFn()],\n          data: {\n            pageTitle: {\n              key: \"singleSignOn\",\n            },\n            titleId: \"enterpriseSingleSignOn\",\n            pageSubtitle: {\n              key: \"singleSignOnEnterOrgIdentifierText\",\n            },\n            titleAreaMaxWidth: \"md\",\n            pageIcon: SsoKeyIcon,\n          } satisfies RouteDataProperties & AnonLayoutWrapperData,\n          children: [\n            {\n              path: \"\",\n              component: SsoComponent,\n            },\n            {\n              path: \"\",\n              component: EnvironmentSelectorComponent,\n              outlet: \"environment-selector\",\n            },\n          ],\n        },\n      ),\n      {\n        path: \"login\",\n        canActivate: [unauthGuardFn()],\n        children: [\n          {\n            path: \"\",\n            component: LoginComponent,\n          },\n          {\n            path: \"\",\n            component: EnvironmentSelectorComponent,\n            outlet: \"environment-selector\",\n          },\n        ],\n        data: {\n          pageTitle: {\n            key: \"logIn\",\n          },\n        },\n      },\n      {\n        path: \"lock\",\n        canActivate: [deepLinkGuard(), lockGuard()],\n        children: [\n          {\n            path: \"\",\n            component: LockComponent,\n          },\n        ],\n        data: {\n          pageTitle: {\n            key: \"yourVaultIsLockedV2\",\n          },\n          pageIcon: LockIcon,\n          showReadonlyHostname: true,\n        } satisfies AnonLayoutWrapperData,\n      },\n      {\n        path: \"2fa\",\n        canActivate: [unauthGuardFn()],\n        children: [\n          ...twofactorRefactorSwap(TwoFactorComponent, TwoFactorAuthComponent, {\n            path: \"\",\n          }),\n          {\n            path: \"\",\n            component: EnvironmentSelectorComponent,\n            outlet: \"environment-selector\",\n          },\n        ],\n        data: {\n          pageTitle: {\n            key: \"verifyIdentity\",\n          },\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      },\n      {\n        path: \"2fa-timeout\",\n        canActivate: [unauthGuardFn()],\n        children: [\n          {\n            path: \"\",\n            component: TwoFactorTimeoutComponent,\n          },\n          {\n            path: \"\",\n            component: EnvironmentSelectorComponent,\n            outlet: \"environment-selector\",\n          },\n        ],\n        data: {\n          pageIcon: TwoFactorTimeoutIcon,\n          pageTitle: {\n            key: \"authenticationTimeout\",\n          },\n          titleId: \"authenticationTimeout\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      },\n      {\n        path: \"recover-2fa\",\n        canActivate: [unauthGuardFn()],\n        children: [\n          {\n            path: \"\",\n            component: RecoverTwoFactorComponent,\n          },\n          {\n            path: \"\",\n            component: EnvironmentSelectorComponent,\n            outlet: \"environment-selector\",\n          },\n        ],\n        data: {\n          pageTitle: {\n            key: \"recoverAccountTwoStep\",\n          },\n          titleId: \"recoverAccountTwoStep\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      },\n      {\n        path: \"accept-emergency\",\n        canActivate: [deepLinkGuard()],\n        data: {\n          pageTitle: {\n            key: \"emergencyAccess\",\n          },\n          titleId: \"acceptEmergency\",\n          doNotSaveUrl: false,\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            loadComponent: () =>\n              import(\"./auth/emergency-access/accept/accept-emergency.component\").then(\n                (mod) => mod.AcceptEmergencyComponent,\n              ),\n          },\n        ],\n      },\n      {\n        path: \"recover-delete\",\n        canActivate: [unauthGuardFn()],\n        data: {\n          pageTitle: {\n            key: \"deleteAccount\",\n          },\n          titleId: \"deleteAccount\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: RecoverDeleteComponent,\n          },\n          {\n            path: \"\",\n            component: EnvironmentSelectorComponent,\n            outlet: \"environment-selector\",\n          },\n        ],\n      },\n      {\n        path: \"verify-recover-delete\",\n        canActivate: [unauthGuardFn()],\n        data: {\n          pageTitle: {\n            key: \"deleteAccount\",\n          },\n          titleId: \"deleteAccount\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n        children: [\n          {\n            path: \"\",\n            component: VerifyRecoverDeleteComponent,\n          },\n        ],\n      },\n      {\n        path: \"remove-password\",\n        component: RemovePasswordComponent,\n        canActivate: [authGuard],\n        data: {\n          pageTitle: {\n            key: \"removeMasterPassword\",\n          },\n          titleId: \"removeMasterPassword\",\n        } satisfies RouteDataProperties & AnonLayoutWrapperData,\n      },\n      {\n        path: \"trial-initiation\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n        component: CompleteTrialInitiationComponent,\n        resolve: {\n          pageTitle: freeTrialTextResolver,\n        },\n        data: {\n          maxWidth: \"3xl\",\n        } satisfies AnonLayoutWrapperData,\n      },\n      {\n        path: \"secrets-manager-trial-initiation\",\n        canActivate: [canAccessFeature(FeatureFlag.EmailVerification), unauthGuardFn()],\n        component: CompleteTrialInitiationComponent,\n        resolve: {\n          pageTitle: freeTrialTextResolver,\n        },\n        data: {\n          maxWidth: \"3xl\",\n        } satisfies AnonLayoutWrapperData,\n      },\n    ],\n  },\n  {\n    path: \"new-device-notice\",\n    component: AnonLayoutWrapperComponent,\n    canActivate: [],\n    children: [\n      {\n        path: \"\",\n        component: NewDeviceVerificationNoticePageOneComponent,\n        data: {\n          pageIcon: VaultIcons.ExclamationTriangle,\n          pageTitle: {\n            key: \"importantNotice\",\n          },\n        },\n      },\n      {\n        path: \"setup\",\n        component: NewDeviceVerificationNoticePageTwoComponent,\n        data: {\n          pageIcon: VaultIcons.UserLock,\n          pageTitle: {\n            key: \"setupTwoStepLogin\",\n          },\n        },\n      },\n    ],\n  },\n  {\n    path: \"\",\n    component: UserLayoutComponent,\n    canActivate: [deepLinkGuard(), authGuard, NewDeviceVerificationNoticeGuard],\n    children: [\n      {\n        path: \"vault\",\n        loadChildren: () => VaultModule,\n      },\n      {\n        path: \"sends\",\n        component: SendComponent,\n        data: { titleId: \"send\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"sm-landing\",\n        component: SMLandingComponent,\n        data: { titleId: \"moreProductsFromBitwarden\" },\n      },\n      {\n        path: \"request-sm-access\",\n        component: RequestSMAccessComponent,\n        data: { titleId: \"requestAccessToSecretsManager\" },\n      },\n      {\n        path: \"create-organization\",\n        component: CreateOrganizationComponent,\n        data: { titleId: \"newOrganization\" } satisfies RouteDataProperties,\n      },\n      {\n        path: \"settings\",\n        children: [\n          { path: \"\", pathMatch: \"full\", redirectTo: \"account\" },\n          {\n            path: \"account\",\n            component: AccountComponent,\n            data: { titleId: \"myAccount\" } satisfies RouteDataProperties,\n          },\n          {\n            path: \"preferences\",\n            component: PreferencesComponent,\n            data: { titleId: \"preferences\" } satisfies RouteDataProperties,\n          },\n          {\n            path: \"security\",\n            loadChildren: () => SecurityRoutingModule,\n          },\n          {\n            path: \"domain-rules\",\n            component: DomainRulesComponent,\n            data: { titleId: \"domainRules\" } satisfies RouteDataProperties,\n          },\n          {\n            path: \"subscription\",\n            loadChildren: () =>\n              import(\"./billing/individual/individual-billing.module\").then(\n                (m) => m.IndividualBillingModule,\n              ),\n          },\n          {\n            path: \"emergency-access\",\n            children: [\n              {\n                path: \"\",\n                component: EmergencyAccessComponent,\n                data: { titleId: \"emergencyAccess\" } satisfies RouteDataProperties,\n              },\n              {\n                path: \":id\",\n                component: EmergencyAccessViewComponent,\n                data: { titleId: \"emergencyAccess\" } satisfies RouteDataProperties,\n              },\n            ],\n          },\n          {\n            path: \"sponsored-families\",\n            component: SponsoredFamiliesComponent,\n            data: { titleId: \"sponsoredFamilies\" } satisfies RouteDataProperties,\n          },\n        ],\n      },\n      {\n        path: \"tools\",\n        canActivate: [authGuard],\n        children: [\n          { path: \"\", pathMatch: \"full\", redirectTo: \"generator\" },\n          {\n            path: \"import\",\n            loadComponent: () =>\n              import(\"./tools/import/import-web.component\").then((mod) => mod.ImportWebComponent),\n            data: {\n              titleId: \"importData\",\n            } satisfies RouteDataProperties,\n          },\n          {\n            path: \"export\",\n            loadComponent: () =>\n              import(\"./tools/vault-export/export-web.component\").then(\n                (mod) => mod.ExportWebComponent,\n              ),\n            data: {\n              titleId: \"exportVault\",\n            } satisfies RouteDataProperties,\n          },\n          ...generatorSwap(GeneratorComponent, CredentialGeneratorComponent, {\n            path: \"generator\",\n            data: { titleId: \"generator\" } satisfies RouteDataProperties,\n          }),\n        ],\n      },\n      {\n        path: \"reports\",\n        loadChildren: () => ReportsModule,\n      },\n      { path: \"setup/families-for-enterprise\", component: FamiliesForEnterpriseSetupComponent },\n    ],\n  },\n  {\n    path: \"organizations\",\n    loadChildren: () =>\n      import(\"./admin-console/organizations/organization.module\").then((m) => m.OrganizationModule),\n  },\n];\n\n@NgModule({\n  imports: [\n    RouterModule.forRoot(routes, {\n      useHash: true,\n      paramsInheritanceStrategy: \"always\",\n      // enableTracing: true,\n    }),\n  ],\n  exports: [RouterModule],\n})\nexport class OssRoutingModule {}\n\nexport function buildFlaggedRoute(flagName: keyof Flags, route: Route): Route {\n  return flagEnabled(flagName)\n    ? route\n    : {\n        path: route.path,\n        redirectTo: \"/\",\n      };\n}\n","import { Type, inject } from \"@angular/core\";\nimport { Route, Routes } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { componentRouteSwap } from \"./component-route-swap\";\n/**\n * Helper function to swap between two components based on the TwoFactorComponentRefactor feature flag.\n * @param defaultComponent - The current non-refactored component to render.\n * @param refreshedComponent - The new refactored component to render.\n * @param defaultOptions - The options to apply to the default component and the refactored component, if alt options are not provided.\n * @param altOptions - The options to apply to the refactored component.\n */\nexport function twofactorRefactorSwap(\n  defaultComponent: Type<any>,\n  refreshedComponent: Type<any>,\n  defaultOptions: Route,\n  altOptions?: Route,\n): Routes {\n  return componentRouteSwap(\n    defaultComponent,\n    refreshedComponent,\n    async () => {\n      const configService = inject(ConfigService);\n      return configService.getFeatureFlag(FeatureFlag.TwoFactorComponentRefactor);\n    },\n    defaultOptions,\n    altOptions,\n  );\n}\n","import { Type, inject } from \"@angular/core\";\nimport { Route, Routes } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\nimport { componentRouteSwap } from \"../../utils/component-route-swap\";\n\n/**\n * Helper function to swap between two components based on the GeneratorToolsModernization feature flag.\n * @param defaultComponent - The current non-refreshed component to render.\n * @param refreshedComponent - The new refreshed component to render.\n * @param options - The shared route options to apply to the default component, and to the alt component if altOptions is not provided.\n * @param altOptions - The alt route options to apply to the alt component.\n */\nexport function generatorSwap(\n  defaultComponent: Type<any>,\n  refreshedComponent: Type<any>,\n  options: Route,\n  altOptions?: Route,\n): Routes {\n  return componentRouteSwap(\n    defaultComponent,\n    refreshedComponent,\n    async () => {\n      const configService = inject(ConfigService);\n      return configService.getFeatureFlag(FeatureFlag.GeneratorToolsModernization);\n    },\n    options,\n    altOptions,\n  );\n}\n","import { NgModule } from \"@angular/core\";\nimport { RouterModule, Routes } from \"@angular/router\";\n\nconst routes: Routes = [{ path: \"**\", redirectTo: \"\" }];\n\n@NgModule({\n  imports: [RouterModule.forChild(routes)],\n  exports: [RouterModule],\n})\nexport class WildcardRoutingModule {}\n","import { DragDropModule } from \"@angular/cdk/drag-drop\";\nimport { LayoutModule } from \"@angular/cdk/layout\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule } from \"@angular/forms\";\nimport { BrowserAnimationsModule } from \"@angular/platform-browser/animations\";\nimport { InfiniteScrollDirective } from \"ngx-infinite-scroll\";\n\nimport { AppComponent } from \"./app.component\";\nimport { CoreModule } from \"./core\";\nimport { OssRoutingModule } from \"./oss-routing.module\";\nimport { OssModule } from \"./oss.module\";\nimport { WildcardRoutingModule } from \"./wildcard-routing.module\";\n\n/**\n * This is the AppModule for the OSS version of Bitwarden.\n * `bitwarden_license/bit-web/app.module.ts` contains the commercial version.\n *\n * You probably do not want to modify this file. Consider editing `oss.module.ts` instead.\n */\n@NgModule({\n  imports: [\n    OssModule,\n    BrowserAnimationsModule,\n    FormsModule,\n    CoreModule,\n    InfiniteScrollDirective,\n    DragDropModule,\n    LayoutModule,\n    OssRoutingModule,\n    WildcardRoutingModule, // Needs to be last to catch all non-existing routes\n  ],\n  declarations: [AppComponent],\n  bootstrap: [AppComponent],\n})\nexport class AppModule {}\n","import { enableProdMode } from \"@angular/core\";\nimport { platformBrowserDynamic } from \"@angular/platform-browser-dynamic\";\n\nimport \"bootstrap\";\nimport \"jquery\";\nimport \"popper.js\";\n\nimport { AppModule } from \"./app/app.module\";\n\nif (process.env.NODE_ENV === \"production\") {\n  enableProdMode();\n}\n\n// FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n// eslint-disable-next-line @typescript-eslint/no-floating-promises\nplatformBrowserDynamic().bootstrapModule(AppModule, { preserveWhitespaces: true });\n","import { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport {\n  OrganizationUserAcceptInitRequest,\n  OrganizationUserAcceptRequest,\n  OrganizationUserBulkConfirmRequest,\n  OrganizationUserConfirmRequest,\n  OrganizationUserInviteRequest,\n  OrganizationUserResetPasswordEnrollmentRequest,\n  OrganizationUserResetPasswordRequest,\n  OrganizationUserUpdateRequest,\n} from \"../models/requests\";\nimport {\n  OrganizationUserBulkPublicKeyResponse,\n  OrganizationUserBulkResponse,\n  OrganizationUserDetailsResponse,\n  OrganizationUserResetPasswordDetailsResponse,\n  OrganizationUserUserDetailsResponse,\n  OrganizationUserUserMiniResponse,\n} from \"../models/responses\";\n\n/**\n * Service for interacting with Organization Users via the API\n */\nexport abstract class OrganizationUserApiService {\n  /**\n   * Retrieve a single organization user by Id\n   * @param organizationId - Identifier for the user's organization\n   * @param id - Organization user identifier\n   * @param options - Options for the request\n   */\n  abstract getOrganizationUser(\n    organizationId: string,\n    id: string,\n    options?: {\n      includeGroups?: boolean;\n    },\n  ): Promise<OrganizationUserDetailsResponse>;\n\n  /**\n   * Retrieve a list of groups Ids the specified organization user belongs to\n   * @param organizationId - Identifier for the user's organization\n   * @param id - Organization user identifier\n   */\n  abstract getOrganizationUserGroups(organizationId: string, id: string): Promise<string[]>;\n\n  /**\n   * Retrieve full details of all users that belong to the specified organization.\n   * This is only accessible to privileged users, if you need a simple listing of basic details, use\n   * {@link getAllMiniUserDetails}.\n   * @param organizationId - Identifier for the organization\n   * @param options - Options for the request\n   */\n  abstract getAllUsers(\n    organizationId: string,\n    options?: {\n      includeCollections?: boolean;\n      includeGroups?: boolean;\n    },\n  ): Promise<ListResponse<OrganizationUserUserDetailsResponse>>;\n\n  /**\n   * Retrieve a list of all users that belong to the specified organization, with basic information only.\n   * This is suitable for lists of names/emails etc. throughout the app and can be accessed by most users.\n   * @param organizationId - Identifier for the organization\n   * @param options - Options for the request\n   */\n  abstract getAllMiniUserDetails(\n    organizationId: string,\n  ): Promise<ListResponse<OrganizationUserUserMiniResponse>>;\n\n  /**\n   * Retrieve reset password details for the specified organization user\n   * @param organizationId - Identifier for the user's organization\n   * @param id - Organization user identifier\n   */\n  abstract getOrganizationUserResetPasswordDetails(\n    organizationId: string,\n    id: string,\n  ): Promise<OrganizationUserResetPasswordDetailsResponse>;\n\n  /**\n   * Retrieve reset password details for many organization users\n   * @param organizationId - Identifier for the organization\n   * @param ids - A list of organization user identifiers\n   */\n  abstract getManyOrganizationUserAccountRecoveryDetails(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserResetPasswordDetailsResponse>>;\n\n  /**\n   * Create new organization user invite(s) for the specified organization\n   * @param organizationId - Identifier for the organization\n   * @param request - New user invitation request details\n   */\n  abstract postOrganizationUserInvite(\n    organizationId: string,\n    request: OrganizationUserInviteRequest,\n  ): Promise<void>;\n\n  /**\n   * Re-invite the specified organization user\n   * @param organizationId - Identifier for the user's organization\n   * @param id - Organization user identifier\n   */\n  abstract postOrganizationUserReinvite(organizationId: string, id: string): Promise<any>;\n\n  /**\n   * Re-invite many organization users for the specified organization\n   * @param organizationId - Identifier for the organization\n   * @param ids - A list of organization user identifiers\n   * @return List of user ids, including both those that were successfully re-invited and those that had an error\n   */\n  abstract postManyOrganizationUserReinvite(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n\n  /**\n   * Accept an invitation to initialize and join an organization created via the Admin Portal **only**.\n   * This is only used once for the initial Owner, because it also creates the organization's encryption keys.\n   * This should not be used for organizations created via the Web client.\n   * @param organizationId - Identifier for the organization to accept\n   * @param id - Organization user identifier\n   * @param request - Request details for accepting the invitation\n   */\n  abstract postOrganizationUserAcceptInit(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserAcceptInitRequest,\n  ): Promise<void>;\n\n  /**\n   * Accept an organization user invitation\n   * @param organizationId - Identifier for the organization to accept\n   * @param id - Organization user identifier\n   * @param request - Request details for accepting the invitation\n   */\n  abstract postOrganizationUserAccept(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserAcceptRequest,\n  ): Promise<void>;\n\n  /**\n   * Confirm an organization user that has accepted their invitation\n   * @param organizationId - Identifier for the organization to confirm\n   * @param id - Organization user identifier\n   * @param request - Request details for confirming the user\n   */\n  abstract postOrganizationUserConfirm(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserConfirmRequest,\n  ): Promise<void>;\n\n  /**\n   * Retrieve a list of the specified users' public keys\n   * @param organizationId - Identifier for the organization to accept\n   * @param ids - A list of organization user identifiers to retrieve public keys for\n   */\n  abstract postOrganizationUsersPublicKey(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkPublicKeyResponse>>;\n\n  /**\n   * Confirm many organization users that have accepted their invitations\n   * @param organizationId - Identifier for the organization to confirm users\n   * @param request - Bulk request details for confirming the user\n   */\n  abstract postOrganizationUserBulkConfirm(\n    organizationId: string,\n    request: OrganizationUserBulkConfirmRequest,\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n\n  /**\n   * Update an organization users\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   * @param request - Request details for updating the user\n   */\n  abstract putOrganizationUser(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserUpdateRequest,\n  ): Promise<void>;\n\n  /**\n   * Update an organization user's reset password enrollment\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param userId - Organization user identifier\n   * @param request - Reset password enrollment details\n   */\n  abstract putOrganizationUserResetPasswordEnrollment(\n    organizationId: string,\n    userId: string,\n    request: OrganizationUserResetPasswordEnrollmentRequest,\n  ): Promise<void>;\n\n  /**\n   * Reset an organization user's password\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   * @param request - Reset password details\n   */\n  abstract putOrganizationUserResetPassword(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserResetPasswordRequest,\n  ): Promise<void>;\n\n  /**\n   * Enable Secrets Manager for many users\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param ids - List of organization user identifiers to enable\n   * @return List of user ids, including both those that were successfully enabled and those that had an error\n   */\n  abstract putOrganizationUserBulkEnableSecretsManager(\n    organizationId: string,\n    ids: string[],\n  ): Promise<void>;\n\n  /**\n   * Remove an organization user\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   */\n  abstract removeOrganizationUser(organizationId: string, id: string): Promise<void>;\n\n  /**\n   * Remove many organization users\n   * @param organizationId - Identifier for the organization the users belongs to\n   * @param ids - List of organization user identifiers to remove\n   * @return List of user ids, including both those that were successfully removed and those that had an error\n   */\n  abstract removeManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n\n  /**\n   * Revoke an organization user's access to the organization\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   */\n  abstract revokeOrganizationUser(organizationId: string, id: string): Promise<void>;\n\n  /**\n   * Revoke many organization users' access to the organization\n   * @param organizationId - Identifier for the organization the users belongs to\n   * @param ids - List of organization user identifiers to revoke\n   * @return List of user ids, including both those that were successfully revoked and those that had an error\n   */\n  abstract revokeManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n\n  /**\n   * Restore an organization user's access to the organization\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   */\n  abstract restoreOrganizationUser(organizationId: string, id: string): Promise<void>;\n\n  /**\n   * Restore many organization users' access to the organization\n   * @param organizationId - Identifier for the organization the users belongs to\n   * @param ids - List of organization user identifiers to restore\n   * @return List of user ids, including both those that were successfully restored and those that had an error\n   */\n  abstract restoreManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n\n  /**\n   * Remove an organization user's access to the organization and delete their account data\n   * @param organizationId - Identifier for the organization the user belongs to\n   * @param id - Organization user identifier\n   */\n  abstract deleteOrganizationUser(organizationId: string, id: string): Promise<void>;\n\n  /**\n   * Delete many organization users\n   * @param organizationId - Identifier for the organization the users belongs to\n   * @param ids - List of organization user identifiers to delete\n   * @return List of user ids, including both those that were successfully deleted and those that had an error\n   */\n  abstract deleteManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>>;\n}\n","export class OrganizationUserBulkRequest {\n  ids: string[];\n\n  constructor(ids: string[]) {\n    this.ids = ids == null ? [] : ids;\n  }\n}\n","import {\n  OrganizationUserStatusType,\n  OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\nimport { SelectionReadOnlyResponse } from \"@bitwarden/common/admin-console/models/response/selection-read-only.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { KdfType } from \"@bitwarden/key-management\";\n\nexport class OrganizationUserResponse extends BaseResponse {\n  id: string;\n  userId: string;\n  type: OrganizationUserType;\n  status: OrganizationUserStatusType;\n  externalId: string;\n  accessSecretsManager: boolean;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  hasMasterPassword: boolean;\n  collections: SelectionReadOnlyResponse[] = [];\n  groups: string[] = [];\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.permissions = new PermissionsApi(this.getResponseProperty(\"Permissions\"));\n    this.externalId = this.getResponseProperty(\"ExternalId\");\n    this.accessSecretsManager = this.getResponseProperty(\"AccessSecretsManager\");\n    this.resetPasswordEnrolled = this.getResponseProperty(\"ResetPasswordEnrolled\");\n    this.hasMasterPassword = this.getResponseProperty(\"HasMasterPassword\");\n\n    const collections = this.getResponseProperty(\"Collections\");\n    if (collections != null) {\n      this.collections = collections.map((c: any) => new SelectionReadOnlyResponse(c));\n    }\n    const groups = this.getResponseProperty(\"Groups\");\n    if (groups != null) {\n      this.groups = groups;\n    }\n  }\n}\n\nexport class OrganizationUserUserDetailsResponse extends OrganizationUserResponse {\n  name: string;\n  email: string;\n  avatarColor: string;\n  twoFactorEnabled: boolean;\n  usesKeyConnector: boolean;\n  managedByOrganization: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.name = this.getResponseProperty(\"Name\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n    this.twoFactorEnabled = this.getResponseProperty(\"TwoFactorEnabled\");\n    this.usesKeyConnector = this.getResponseProperty(\"UsesKeyConnector\") ?? false;\n    this.managedByOrganization = this.getResponseProperty(\"ManagedByOrganization\") ?? false;\n  }\n}\n\nexport class OrganizationUserDetailsResponse extends OrganizationUserResponse {\n  managedByOrganization: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.managedByOrganization = this.getResponseProperty(\"ManagedByOrganization\") ?? false;\n  }\n}\n\nexport class OrganizationUserResetPasswordDetailsResponse extends BaseResponse {\n  organizationUserId: string;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n  resetPasswordKey: string;\n  encryptedPrivateKey: string;\n\n  constructor(response: any) {\n    super(response);\n    this.organizationUserId = this.getResponseProperty(\"OrganizationUserId\");\n    this.kdf = this.getResponseProperty(\"Kdf\");\n    this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n    this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n    this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n    this.resetPasswordKey = this.getResponseProperty(\"ResetPasswordKey\");\n    this.encryptedPrivateKey = this.getResponseProperty(\"EncryptedPrivateKey\");\n  }\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class OrganizationUserBulkResponse extends BaseResponse {\n  id: string;\n  error: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.error = this.getResponseProperty(\"Error\");\n  }\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class OrganizationUserBulkPublicKeyResponse extends BaseResponse {\n  id: string;\n  userId: string;\n  key: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.key = this.getResponseProperty(\"Key\");\n  }\n}\n","import {\n  OrganizationUserStatusType,\n  OrganizationUserType,\n} from \"@bitwarden/common/admin-console/enums\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class OrganizationUserUserMiniResponse extends BaseResponse {\n  id: string;\n  userId: string;\n  email: string;\n  name: string;\n  type: OrganizationUserType;\n  status: OrganizationUserStatusType;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.status = this.getResponseProperty(\"Status\");\n  }\n}\n","import { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { OrganizationUserApiService } from \"../abstractions\";\nimport {\n  OrganizationUserAcceptInitRequest,\n  OrganizationUserAcceptRequest,\n  OrganizationUserBulkConfirmRequest,\n  OrganizationUserConfirmRequest,\n  OrganizationUserInviteRequest,\n  OrganizationUserResetPasswordEnrollmentRequest,\n  OrganizationUserResetPasswordRequest,\n  OrganizationUserUpdateRequest,\n  OrganizationUserBulkRequest,\n} from \"../models/requests\";\nimport {\n  OrganizationUserBulkPublicKeyResponse,\n  OrganizationUserBulkResponse,\n  OrganizationUserDetailsResponse,\n  OrganizationUserResetPasswordDetailsResponse,\n  OrganizationUserUserDetailsResponse,\n  OrganizationUserUserMiniResponse,\n} from \"../models/responses\";\n\nexport class DefaultOrganizationUserApiService implements OrganizationUserApiService {\n  constructor(private apiService: ApiService) {}\n\n  async getOrganizationUser(\n    organizationId: string,\n    id: string,\n    options?: {\n      includeGroups?: boolean;\n    },\n  ): Promise<OrganizationUserDetailsResponse> {\n    const params = new URLSearchParams();\n\n    if (options?.includeGroups) {\n      params.set(\"includeGroups\", \"true\");\n    }\n\n    const r = await this.apiService.send(\n      \"GET\",\n      `/organizations/${organizationId}/users/${id}?${params.toString()}`,\n      null,\n      true,\n      true,\n    );\n    return new OrganizationUserDetailsResponse(r);\n  }\n\n  async getOrganizationUserGroups(organizationId: string, id: string): Promise<string[]> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/groups\",\n      null,\n      true,\n      true,\n    );\n    return r;\n  }\n\n  async getAllUsers(\n    organizationId: string,\n    options?: {\n      includeCollections?: boolean;\n      includeGroups?: boolean;\n    },\n  ): Promise<ListResponse<OrganizationUserUserDetailsResponse>> {\n    const params = new URLSearchParams();\n\n    if (options?.includeCollections) {\n      params.set(\"includeCollections\", \"true\");\n    }\n    if (options?.includeGroups) {\n      params.set(\"includeGroups\", \"true\");\n    }\n\n    const r = await this.apiService.send(\n      \"GET\",\n      `/organizations/${organizationId}/users?${params.toString()}`,\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserUserDetailsResponse);\n  }\n\n  async getAllMiniUserDetails(\n    organizationId: string,\n  ): Promise<ListResponse<OrganizationUserUserMiniResponse>> {\n    const r = await this.apiService.send(\n      \"GET\",\n      `/organizations/${organizationId}/users/mini-details`,\n      null,\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserUserMiniResponse);\n  }\n\n  async getOrganizationUserResetPasswordDetails(\n    organizationId: string,\n    id: string,\n  ): Promise<OrganizationUserResetPasswordDetailsResponse> {\n    const r = await this.apiService.send(\n      \"GET\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/reset-password-details\",\n      null,\n      true,\n      true,\n    );\n    return new OrganizationUserResetPasswordDetailsResponse(r);\n  }\n\n  async getManyOrganizationUserAccountRecoveryDetails(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserResetPasswordDetailsResponse>> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/account-recovery-details\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserResetPasswordDetailsResponse);\n  }\n\n  postOrganizationUserInvite(\n    organizationId: string,\n    request: OrganizationUserInviteRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/invite\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postOrganizationUserReinvite(organizationId: string, id: string): Promise<any> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/reinvite\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async postManyOrganizationUserReinvite(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/reinvite\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n\n  postOrganizationUserAcceptInit(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserAcceptInitRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/accept-init\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postOrganizationUserAccept(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserAcceptRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/accept\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  postOrganizationUserConfirm(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserConfirmRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/confirm\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  async postOrganizationUsersPublicKey(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkPublicKeyResponse>> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/public-keys\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkPublicKeyResponse);\n  }\n\n  async postOrganizationUserBulkConfirm(\n    organizationId: string,\n    request: OrganizationUserBulkConfirmRequest,\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"POST\",\n      \"/organizations/\" + organizationId + \"/users/confirm\",\n      request,\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n\n  async putOrganizationUserBulkEnableSecretsManager(\n    organizationId: string,\n    ids: string[],\n  ): Promise<void> {\n    await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/enable-secrets-manager\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      false,\n    );\n  }\n\n  putOrganizationUser(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserUpdateRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/\" + id,\n      request,\n      true,\n      false,\n    );\n  }\n\n  putOrganizationUserResetPasswordEnrollment(\n    organizationId: string,\n    userId: string,\n    request: OrganizationUserResetPasswordEnrollmentRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/\" + userId + \"/reset-password-enrollment\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  putOrganizationUserResetPassword(\n    organizationId: string,\n    id: string,\n    request: OrganizationUserResetPasswordRequest,\n  ): Promise<void> {\n    return this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/reset-password\",\n      request,\n      true,\n      false,\n    );\n  }\n\n  removeOrganizationUser(organizationId: string, id: string): Promise<any> {\n    return this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/users/\" + id,\n      null,\n      true,\n      false,\n    );\n  }\n\n  async removeManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/users\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n\n  revokeOrganizationUser(organizationId: string, id: string): Promise<void> {\n    return this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/revoke\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async revokeManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/revoke\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n\n  restoreOrganizationUser(organizationId: string, id: string): Promise<void> {\n    return this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/restore\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async restoreManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"PUT\",\n      \"/organizations/\" + organizationId + \"/users/restore\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n\n  deleteOrganizationUser(organizationId: string, id: string): Promise<void> {\n    return this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/users/\" + id + \"/delete-account\",\n      null,\n      true,\n      false,\n    );\n  }\n\n  async deleteManyOrganizationUsers(\n    organizationId: string,\n    ids: string[],\n  ): Promise<ListResponse<OrganizationUserBulkResponse>> {\n    const r = await this.apiService.send(\n      \"DELETE\",\n      \"/organizations/\" + organizationId + \"/users/delete-account\",\n      new OrganizationUserBulkRequest(ids),\n      true,\n      true,\n    );\n    return new ListResponse(r, OrganizationUserBulkResponse);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationKeysRequest } from \"@bitwarden/common/admin-console/models/request/organization-keys.request\";\n\nexport class OrganizationUserAcceptInitRequest {\n  token: string;\n  key: string;\n  keys: OrganizationKeysRequest;\n  collectionName: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class OrganizationUserAcceptRequest {\n  token: string;\n  // Used to auto-enroll in master password reset\n  resetPasswordKey: string;\n}\n","type OrganizationUserBulkRequestEntry = {\n  id: string;\n  key: string;\n};\n\nexport class OrganizationUserBulkConfirmRequest {\n  keys: OrganizationUserBulkRequestEntry[];\n\n  constructor(keys: OrganizationUserBulkRequestEntry[]) {\n    this.keys = keys;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class OrganizationUserConfirmRequest {\n  key: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class OrganizationUserInviteRequest {\n  emails: string[] = [];\n  type: OrganizationUserType;\n  accessSecretsManager: boolean;\n  collections: SelectionReadOnlyRequest[] = [];\n  groups: string[];\n  permissions: PermissionsApi;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class OrganizationUserResetPasswordRequest {\n  newMasterPasswordHash: string;\n  key: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"@bitwarden/common/auth/models/request/secret-verification.request\";\n\nexport class OrganizationUserResetPasswordEnrollmentRequest extends SecretVerificationRequest {\n  resetPasswordKey: string;\n}\n\nexport class OrganizationUserResetPasswordWithIdRequest extends OrganizationUserResetPasswordEnrollmentRequest {\n  organizationId: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { PermissionsApi } from \"@bitwarden/common/admin-console/models/api/permissions.api\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class OrganizationUserUpdateRequest {\n  type: OrganizationUserType;\n  accessSecretsManager: boolean;\n  collections: SelectionReadOnlyRequest[] = [];\n  groups: string[] = [];\n  permissions: PermissionsApi;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionDetailsResponse } from \"@bitwarden/admin-console/common\";\n\nimport { CollectionAccessSelectionView, CollectionAdminView } from \"../models\";\n\nexport abstract class CollectionAdminService {\n  getAll: (organizationId: string) => Promise<CollectionAdminView[]>;\n  get: (organizationId: string, collectionId: string) => Promise<CollectionAdminView | undefined>;\n  save: (collection: CollectionAdminView) => Promise<CollectionDetailsResponse>;\n  delete: (organizationId: string, collectionId: string) => Promise<void>;\n  bulkAssignAccess: (\n    organizationId: string,\n    collectionIds: string[],\n    users: CollectionAccessSelectionView[],\n    groups: CollectionAccessSelectionView[],\n  ) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { CollectionId, OrganizationId, UserId } from \"@bitwarden/common/types/guid\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { CollectionData, Collection, CollectionView } from \"../models\";\n\nexport abstract class CollectionService {\n  encryptedCollections$: Observable<Collection[]>;\n  decryptedCollections$: Observable<CollectionView[]>;\n\n  clearActiveUserCache: () => Promise<void>;\n  encrypt: (model: CollectionView) => Promise<Collection>;\n  decryptedCollectionViews$: (ids: CollectionId[]) => Observable<CollectionView[]>;\n  /**\n   * @deprecated This method will soon be made private\n   * See PM-12375\n   */\n  decryptMany: (\n    collections: Collection[],\n    orgKeys?: Record<OrganizationId, OrgKey>,\n  ) => Promise<CollectionView[]>;\n  get: (id: string) => Promise<Collection>;\n  getAll: () => Promise<Collection[]>;\n  getAllDecrypted: () => Promise<CollectionView[]>;\n  getAllNested: (collections?: CollectionView[]) => Promise<TreeNode<CollectionView>[]>;\n  getNested: (id: string) => Promise<TreeNode<CollectionView>>;\n  upsert: (collection: CollectionData | CollectionData[]) => Promise<any>;\n  replace: (collections: { [id: string]: CollectionData }, userId: UserId) => Promise<any>;\n  clear: (userId?: string) => Promise<void>;\n  delete: (id: string | string[]) => Promise<any>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nexport class BulkCollectionAccessRequest {\n  collectionIds: string[];\n  users: SelectionReadOnlyRequest[];\n  groups: SelectionReadOnlyRequest[];\n}\n","export class View {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"@bitwarden/common/models/view/view\";\n\ninterface SelectionResponseLike {\n  id: string;\n  readOnly: boolean;\n  hidePasswords: boolean;\n  manage: boolean;\n}\n\nexport class CollectionAccessSelectionView extends View {\n  readonly id: string;\n  readonly readOnly: boolean;\n  readonly hidePasswords: boolean;\n  readonly manage: boolean;\n\n  constructor(response?: SelectionResponseLike) {\n    super();\n\n    if (!response) {\n      return;\n    }\n\n    this.id = response.id;\n    this.readOnly = response.readOnly;\n    this.hidePasswords = response.hidePasswords;\n    this.manage = response.manage;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport Domain from \"@bitwarden/common/platform/models/domain/domain-base\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\n\nimport { CollectionData } from \"./collection.data\";\nimport { CollectionView } from \"./collection.view\";\n\nexport class Collection extends Domain {\n  id: string;\n  organizationId: string;\n  name: EncString;\n  externalId: string;\n  readOnly: boolean;\n  hidePasswords: boolean;\n  manage: boolean;\n\n  constructor(obj?: CollectionData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        organizationId: null,\n        name: null,\n        externalId: null,\n        readOnly: null,\n        hidePasswords: null,\n        manage: null,\n      },\n      [\"id\", \"organizationId\", \"readOnly\", \"hidePasswords\", \"manage\"],\n    );\n  }\n\n  decrypt(orgKey: OrgKey): Promise<CollectionView> {\n    return this.decryptObj(\n      new CollectionView(this),\n      {\n        name: null,\n      },\n      this.organizationId,\n      orgKey,\n    );\n  }\n}\n","import { SelectionReadOnlyResponse } from \"@bitwarden/common/admin-console/models/response/selection-read-only.response\";\nimport { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\nimport { CollectionId, OrganizationId } from \"@bitwarden/common/types/guid\";\n\nexport class CollectionResponse extends BaseResponse {\n  id: CollectionId;\n  organizationId: OrganizationId;\n  name: string;\n  externalId: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.externalId = this.getResponseProperty(\"ExternalId\");\n  }\n}\n\nexport class CollectionDetailsResponse extends CollectionResponse {\n  readOnly: boolean;\n  manage: boolean;\n  hidePasswords: boolean;\n\n  /**\n   * Flag indicating the user has been explicitly assigned to this Collection\n   */\n  assigned: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.readOnly = this.getResponseProperty(\"ReadOnly\") || false;\n    this.manage = this.getResponseProperty(\"Manage\") || false;\n    this.hidePasswords = this.getResponseProperty(\"HidePasswords\") || false;\n\n    // Temporary until the API is updated to return this property in AC-2084\n    // For now, we can assume that if the object is 'collectionDetails' then the user is assigned\n    this.assigned = this.getResponseProperty(\"object\") == \"collectionDetails\";\n  }\n}\n\nexport class CollectionAccessDetailsResponse extends CollectionDetailsResponse {\n  groups: SelectionReadOnlyResponse[] = [];\n  users: SelectionReadOnlyResponse[] = [];\n  unmanaged: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.assigned = this.getResponseProperty(\"Assigned\") || false;\n    this.unmanaged = this.getResponseProperty(\"Unmanaged\") || false;\n\n    const groups = this.getResponseProperty(\"Groups\");\n    if (groups != null) {\n      this.groups = groups.map((g: any) => new SelectionReadOnlyResponse(g));\n    }\n\n    const users = this.getResponseProperty(\"Users\");\n    if (users != null) {\n      this.users = users.map((g: any) => new SelectionReadOnlyResponse(g));\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { View } from \"@bitwarden/common/models/view/view\";\nimport { ITreeNodeObject } from \"@bitwarden/common/vault/models/domain/tree-node\";\n\nimport { Collection } from \"./collection\";\nimport { CollectionAccessDetailsResponse } from \"./collection.response\";\n\nexport const NestingDelimiter = \"/\";\n\nexport class CollectionView implements View, ITreeNodeObject {\n  id: string = null;\n  organizationId: string = null;\n  name: string = null;\n  externalId: string = null;\n  // readOnly applies to the items within a collection\n  readOnly: boolean = null;\n  hidePasswords: boolean = null;\n  manage: boolean = null;\n  assigned: boolean = null;\n\n  constructor(c?: Collection | CollectionAccessDetailsResponse) {\n    if (!c) {\n      return;\n    }\n\n    this.id = c.id;\n    this.organizationId = c.organizationId;\n    this.externalId = c.externalId;\n    if (c instanceof Collection) {\n      this.readOnly = c.readOnly;\n      this.hidePasswords = c.hidePasswords;\n      this.manage = c.manage;\n      this.assigned = true;\n    }\n    if (c instanceof CollectionAccessDetailsResponse) {\n      this.assigned = c.assigned;\n    }\n  }\n\n  canEditItems(org: Organization): boolean {\n    if (org != null && org.id !== this.organizationId) {\n      throw new Error(\n        \"Id of the organization provided does not match the org id of the collection.\",\n      );\n    }\n\n    return org?.canEditAllCiphers || this.manage || (this.assigned && !this.readOnly);\n  }\n\n  /**\n   * Returns true if the user can edit a collection (including user and group access) from the individual vault.\n   * Does not include admin permissions - see {@link CollectionAdminView.canEdit}.\n   */\n  canEdit(org: Organization): boolean {\n    if (org != null && org.id !== this.organizationId) {\n      throw new Error(\n        \"Id of the organization provided does not match the org id of the collection.\",\n      );\n    }\n\n    return this.manage;\n  }\n\n  /**\n   * Returns true if the user can delete a collection from the individual vault.\n   * Does not include admin permissions - see {@link CollectionAdminView.canDelete}.\n   */\n  canDelete(org: Organization): boolean {\n    if (org != null && org.id !== this.organizationId) {\n      throw new Error(\n        \"Id of the organization provided does not match the org id of the collection.\",\n      );\n    }\n\n    const canDeleteManagedCollections = !org?.limitCollectionDeletion || org.isAdmin;\n\n    // Only use individual permissions, not admin permissions\n    return canDeleteManagedCollections && this.manage;\n  }\n\n  /**\n   * Returns true if the user can view collection info and access in a read-only state from the individual vault\n   */\n  canViewCollectionInfo(org: Organization | undefined): boolean {\n    return false;\n  }\n\n  static fromJSON(obj: Jsonify<CollectionView>) {\n    return Object.assign(new CollectionView(new Collection()), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\n\nimport { CollectionAccessSelectionView } from \"./collection-access-selection.view\";\nimport { CollectionAccessDetailsResponse } from \"./collection.response\";\nimport { CollectionView } from \"./collection.view\";\n\nexport const Unassigned = \"unassigned\";\n\nexport class CollectionAdminView extends CollectionView {\n  groups: CollectionAccessSelectionView[] = [];\n  users: CollectionAccessSelectionView[] = [];\n\n  /**\n   * Flag indicating the collection has no active user or group assigned to it with CanManage permissions\n   * In this case, the collection can be managed by admins/owners or custom users with appropriate permissions\n   */\n  unmanaged: boolean;\n\n  /**\n   * Flag indicating the user has been explicitly assigned to this Collection\n   */\n  assigned: boolean;\n\n  constructor(response?: CollectionAccessDetailsResponse) {\n    super(response);\n\n    if (!response) {\n      return;\n    }\n\n    this.groups = response.groups\n      ? response.groups.map((g) => new CollectionAccessSelectionView(g))\n      : [];\n\n    this.users = response.users\n      ? response.users.map((g) => new CollectionAccessSelectionView(g))\n      : [];\n\n    this.assigned = response.assigned;\n  }\n\n  /**\n   * Returns true if the user can edit a collection (including user and group access) from the Admin Console.\n   */\n  override canEdit(org: Organization): boolean {\n    return (\n      org?.canEditAnyCollection ||\n      (this.unmanaged && org?.canEditUnmanagedCollections) ||\n      super.canEdit(org)\n    );\n  }\n\n  /**\n   * Returns true if the user can delete a collection from the Admin Console.\n   */\n  override canDelete(org: Organization): boolean {\n    return org?.canDeleteAnyCollection || super.canDelete(org);\n  }\n\n  /**\n   * Whether the user can modify user access to this collection\n   */\n  canEditUserAccess(org: Organization): boolean {\n    return (\n      (org.permissions.manageUsers && org.allowAdminAccessToAllCollectionItems) || this.canEdit(org)\n    );\n  }\n\n  /**\n   * Whether the user can modify group access to this collection\n   */\n  canEditGroupAccess(org: Organization): boolean {\n    return (\n      (org.permissions.manageGroups && org.allowAdminAccessToAllCollectionItems) ||\n      this.canEdit(org)\n    );\n  }\n\n  /**\n   * Returns true if the user can view collection info and access in a read-only state from the Admin Console\n   */\n  override canViewCollectionInfo(org: Organization | undefined): boolean {\n    if (this.isUnassignedCollection) {\n      return false;\n    }\n\n    return this.manage || org?.isAdmin || org?.permissions.editAnyCollection;\n  }\n\n  /**\n   * True if this collection represents the pseudo \"Unassigned\" collection\n   * This is different from the \"unmanaged\" flag, which indicates that no users or groups have access to the collection\n   */\n  get isUnassignedCollection() {\n    return this.id === Unassigned;\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { CollectionId, OrganizationId } from \"@bitwarden/common/types/guid\";\n\nimport { CollectionDetailsResponse } from \"./collection.response\";\n\nexport class CollectionData {\n  id: CollectionId;\n  organizationId: OrganizationId;\n  name: string;\n  externalId: string;\n  readOnly: boolean;\n  manage: boolean;\n  hidePasswords: boolean;\n\n  constructor(response: CollectionDetailsResponse) {\n    this.id = response.id;\n    this.organizationId = response.organizationId;\n    this.name = response.name;\n    this.externalId = response.externalId;\n    this.readOnly = response.readOnly;\n    this.manage = response.manage;\n    this.hidePasswords = response.hidePasswords;\n  }\n\n  static fromJSON(obj: Jsonify<CollectionData>) {\n    return Object.assign(new CollectionData(new CollectionDetailsResponse({})), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\n\nimport { Collection } from \"./collection\";\n\nexport class CollectionRequest {\n  name: string;\n  externalId: string;\n  groups: SelectionReadOnlyRequest[] = [];\n  users: SelectionReadOnlyRequest[] = [];\n\n  constructor(collection?: Collection) {\n    if (collection == null) {\n      return;\n    }\n    this.name = collection.name ? collection.name.encryptedString : null;\n    this.externalId = collection.externalId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Collection } from \"./collection\";\nimport { CollectionRequest } from \"./collection.request\";\n\nexport class CollectionWithIdRequest extends CollectionRequest {\n  id: string;\n\n  constructor(collection?: Collection) {\n    if (collection == null) {\n      return;\n    }\n    super(collection);\n    this.id = collection.id;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { SelectionReadOnlyRequest } from \"@bitwarden/common/admin-console/models/request/selection-read-only.request\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { CollectionAdminService, CollectionService } from \"../abstractions\";\nimport {\n  CollectionData,\n  CollectionRequest,\n  CollectionAccessDetailsResponse,\n  CollectionDetailsResponse,\n  CollectionResponse,\n  BulkCollectionAccessRequest,\n  CollectionAccessSelectionView,\n  CollectionAdminView,\n} from \"../models\";\n\nexport class DefaultCollectionAdminService implements CollectionAdminService {\n  constructor(\n    private apiService: ApiService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private collectionService: CollectionService,\n  ) {}\n\n  async getAll(organizationId: string): Promise<CollectionAdminView[]> {\n    const collectionResponse =\n      await this.apiService.getManyCollectionsWithAccessDetails(organizationId);\n\n    if (collectionResponse?.data == null || collectionResponse.data.length === 0) {\n      return [];\n    }\n\n    return await this.decryptMany(organizationId, collectionResponse.data);\n  }\n\n  async get(\n    organizationId: string,\n    collectionId: string,\n  ): Promise<CollectionAdminView | undefined> {\n    const collectionResponse = await this.apiService.getCollectionAccessDetails(\n      organizationId,\n      collectionId,\n    );\n\n    if (collectionResponse == null) {\n      return undefined;\n    }\n\n    const [view] = await this.decryptMany(organizationId, [collectionResponse]);\n\n    return view;\n  }\n\n  async save(collection: CollectionAdminView): Promise<CollectionDetailsResponse> {\n    const request = await this.encrypt(collection);\n\n    let response: CollectionDetailsResponse;\n    if (collection.id == null) {\n      response = await this.apiService.postCollection(collection.organizationId, request);\n      collection.id = response.id;\n    } else {\n      response = await this.apiService.putCollection(\n        collection.organizationId,\n        collection.id,\n        request,\n      );\n    }\n\n    if (response.assigned) {\n      await this.collectionService.upsert(new CollectionData(response));\n    } else {\n      await this.collectionService.delete(collection.id);\n    }\n\n    return response;\n  }\n\n  async delete(organizationId: string, collectionId: string): Promise<void> {\n    await this.apiService.deleteCollection(organizationId, collectionId);\n  }\n\n  async bulkAssignAccess(\n    organizationId: string,\n    collectionIds: string[],\n    users: CollectionAccessSelectionView[],\n    groups: CollectionAccessSelectionView[],\n  ): Promise<void> {\n    const request = new BulkCollectionAccessRequest();\n    request.collectionIds = collectionIds;\n    request.users = users.map(\n      (u) => new SelectionReadOnlyRequest(u.id, u.readOnly, u.hidePasswords, u.manage),\n    );\n    request.groups = groups.map(\n      (g) => new SelectionReadOnlyRequest(g.id, g.readOnly, g.hidePasswords, g.manage),\n    );\n\n    await this.apiService.send(\n      \"POST\",\n      `/organizations/${organizationId}/collections/bulk-access`,\n      request,\n      true,\n      false,\n    );\n  }\n\n  private async decryptMany(\n    organizationId: string,\n    collections: CollectionResponse[] | CollectionAccessDetailsResponse[],\n  ): Promise<CollectionAdminView[]> {\n    const orgKey = await this.keyService.getOrgKey(organizationId);\n\n    const promises = collections.map(async (c) => {\n      const view = new CollectionAdminView();\n      view.id = c.id;\n      view.name = await this.encryptService.decryptToUtf8(new EncString(c.name), orgKey);\n      view.externalId = c.externalId;\n      view.organizationId = c.organizationId;\n\n      if (isCollectionAccessDetailsResponse(c)) {\n        view.groups = c.groups;\n        view.users = c.users;\n        view.assigned = c.assigned;\n        view.readOnly = c.readOnly;\n        view.hidePasswords = c.hidePasswords;\n        view.manage = c.manage;\n        view.unmanaged = c.unmanaged;\n      }\n\n      return view;\n    });\n\n    return await Promise.all(promises);\n  }\n\n  private async encrypt(model: CollectionAdminView): Promise<CollectionRequest> {\n    if (model.organizationId == null) {\n      throw new Error(\"Collection has no organization id.\");\n    }\n    const key = await this.keyService.getOrgKey(model.organizationId);\n    if (key == null) {\n      throw new Error(\"No key for this collection's organization.\");\n    }\n    const collection = new CollectionRequest();\n    collection.externalId = model.externalId;\n    collection.name = (await this.encryptService.encrypt(model.name, key)).encryptedString;\n    collection.groups = model.groups.map(\n      (group) =>\n        new SelectionReadOnlyRequest(group.id, group.readOnly, group.hidePasswords, group.manage),\n    );\n    collection.users = model.users.map(\n      (user) =>\n        new SelectionReadOnlyRequest(user.id, user.readOnly, user.hidePasswords, user.manage),\n    );\n    return collection;\n  }\n}\n\nfunction isCollectionAccessDetailsResponse(\n  response: CollectionResponse | CollectionAccessDetailsResponse,\n): response is CollectionAccessDetailsResponse {\n  const anyResponse = response as any;\n\n  return anyResponse?.groups instanceof Array && anyResponse?.users instanceof Array;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { combineLatest, firstValueFrom, map, Observable, of, switchMap } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  ActiveUserState,\n  StateProvider,\n  COLLECTION_DATA,\n  DeriveDefinition,\n  DerivedState,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { CollectionId, OrganizationId, UserId } from \"@bitwarden/common/types/guid\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { TreeNode } from \"@bitwarden/common/vault/models/domain/tree-node\";\nimport { ServiceUtils } from \"@bitwarden/common/vault/service-utils\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { CollectionService } from \"../abstractions\";\nimport { Collection, CollectionData, CollectionView } from \"../models\";\n\nexport const ENCRYPTED_COLLECTION_DATA_KEY = UserKeyDefinition.record<CollectionData, CollectionId>(\n  COLLECTION_DATA,\n  \"collections\",\n  {\n    deserializer: (jsonData: Jsonify<CollectionData>) => CollectionData.fromJSON(jsonData),\n    clearOn: [\"logout\"],\n  },\n);\n\nconst DECRYPTED_COLLECTION_DATA_KEY = new DeriveDefinition<\n  [Record<CollectionId, CollectionData>, Record<OrganizationId, OrgKey>],\n  CollectionView[],\n  { collectionService: DefaultCollectionService }\n>(COLLECTION_DATA, \"decryptedCollections\", {\n  deserializer: (obj) => obj.map((collection) => CollectionView.fromJSON(collection)),\n  derive: async ([collections, orgKeys], { collectionService }) => {\n    if (collections == null) {\n      return [];\n    }\n\n    const data = Object.values(collections).map((c) => new Collection(c));\n    return await collectionService.decryptMany(data, orgKeys);\n  },\n});\n\nconst NestingDelimiter = \"/\";\n\nexport class DefaultCollectionService implements CollectionService {\n  private encryptedCollectionDataState: ActiveUserState<Record<CollectionId, CollectionData>>;\n  encryptedCollections$: Observable<Collection[]>;\n  private decryptedCollectionDataState: DerivedState<CollectionView[]>;\n  decryptedCollections$: Observable<CollectionView[]>;\n\n  decryptedCollectionViews$(ids: CollectionId[]): Observable<CollectionView[]> {\n    return this.decryptedCollections$.pipe(\n      map((collections) => collections.filter((c) => ids.includes(c.id as CollectionId))),\n    );\n  }\n\n  constructor(\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private i18nService: I18nService,\n    protected stateProvider: StateProvider,\n  ) {\n    this.encryptedCollectionDataState = this.stateProvider.getActive(ENCRYPTED_COLLECTION_DATA_KEY);\n\n    this.encryptedCollections$ = this.encryptedCollectionDataState.state$.pipe(\n      map((collections) => {\n        if (collections == null) {\n          return [];\n        }\n\n        return Object.values(collections).map((c) => new Collection(c));\n      }),\n    );\n\n    const encryptedCollectionsWithKeys = this.encryptedCollectionDataState.combinedState$.pipe(\n      switchMap(([userId, collectionData]) =>\n        combineLatest([of(collectionData), this.keyService.orgKeys$(userId)]),\n      ),\n    );\n\n    this.decryptedCollectionDataState = this.stateProvider.getDerived(\n      encryptedCollectionsWithKeys,\n      DECRYPTED_COLLECTION_DATA_KEY,\n      { collectionService: this },\n    );\n\n    this.decryptedCollections$ = this.decryptedCollectionDataState.state$;\n  }\n\n  async clearActiveUserCache(): Promise<void> {\n    await this.decryptedCollectionDataState.forceValue(null);\n  }\n\n  async encrypt(model: CollectionView): Promise<Collection> {\n    if (model.organizationId == null) {\n      throw new Error(\"Collection has no organization id.\");\n    }\n    const key = await this.keyService.getOrgKey(model.organizationId);\n    if (key == null) {\n      throw new Error(\"No key for this collection's organization.\");\n    }\n    const collection = new Collection();\n    collection.id = model.id;\n    collection.organizationId = model.organizationId;\n    collection.readOnly = model.readOnly;\n    collection.externalId = model.externalId;\n    collection.name = await this.encryptService.encrypt(model.name, key);\n    return collection;\n  }\n\n  // TODO: this should be private and orgKeys should be required.\n  // See https://bitwarden.atlassian.net/browse/PM-12375\n  async decryptMany(\n    collections: Collection[],\n    orgKeys?: Record<OrganizationId, OrgKey>,\n  ): Promise<CollectionView[]> {\n    if (collections == null || collections.length === 0) {\n      return [];\n    }\n    const decCollections: CollectionView[] = [];\n\n    orgKeys ??= await firstValueFrom(this.keyService.activeUserOrgKeys$);\n\n    const promises: Promise<any>[] = [];\n    collections.forEach((collection) => {\n      promises.push(\n        collection\n          .decrypt(orgKeys[collection.organizationId as OrganizationId])\n          .then((c) => decCollections.push(c)),\n      );\n    });\n    await Promise.all(promises);\n    return decCollections.sort(Utils.getSortFunction(this.i18nService, \"name\"));\n  }\n\n  async get(id: string): Promise<Collection> {\n    return (\n      (await firstValueFrom(\n        this.encryptedCollections$.pipe(map((cs) => cs.find((c) => c.id === id))),\n      )) ?? null\n    );\n  }\n\n  async getAll(): Promise<Collection[]> {\n    return await firstValueFrom(this.encryptedCollections$);\n  }\n\n  async getAllDecrypted(): Promise<CollectionView[]> {\n    return await firstValueFrom(this.decryptedCollections$);\n  }\n\n  async getAllNested(collections: CollectionView[] = null): Promise<TreeNode<CollectionView>[]> {\n    if (collections == null) {\n      collections = await this.getAllDecrypted();\n    }\n    const nodes: TreeNode<CollectionView>[] = [];\n    collections.forEach((c) => {\n      const collectionCopy = new CollectionView();\n      collectionCopy.id = c.id;\n      collectionCopy.organizationId = c.organizationId;\n      const parts = c.name != null ? c.name.replace(/^\\/+|\\/+$/g, \"\").split(NestingDelimiter) : [];\n      ServiceUtils.nestedTraverse(nodes, 0, parts, collectionCopy, null, NestingDelimiter);\n    });\n    return nodes;\n  }\n\n  /**\n   * @deprecated August 30 2022: Moved to new Vault Filter Service\n   * Remove when Desktop and Browser are updated\n   */\n  async getNested(id: string): Promise<TreeNode<CollectionView>> {\n    const collections = await this.getAllNested();\n    return ServiceUtils.getTreeNodeObjectFromList(collections, id) as TreeNode<CollectionView>;\n  }\n\n  async upsert(toUpdate: CollectionData | CollectionData[]): Promise<void> {\n    if (toUpdate == null) {\n      return;\n    }\n    await this.encryptedCollectionDataState.update((collections) => {\n      if (collections == null) {\n        collections = {};\n      }\n      if (Array.isArray(toUpdate)) {\n        toUpdate.forEach((c) => {\n          collections[c.id] = c;\n        });\n      } else {\n        collections[toUpdate.id] = toUpdate;\n      }\n      return collections;\n    });\n  }\n\n  async replace(collections: Record<CollectionId, CollectionData>, userId: UserId): Promise<void> {\n    await this.stateProvider\n      .getUser(userId, ENCRYPTED_COLLECTION_DATA_KEY)\n      .update(() => collections);\n  }\n\n  async clear(userId?: UserId): Promise<void> {\n    if (userId == null) {\n      await this.encryptedCollectionDataState.update(() => null);\n      await this.decryptedCollectionDataState.forceValue(null);\n    } else {\n      await this.stateProvider.getUser(userId, ENCRYPTED_COLLECTION_DATA_KEY).update(() => null);\n    }\n  }\n\n  async delete(id: CollectionId | CollectionId[]): Promise<any> {\n    await this.encryptedCollectionDataState.update((collections) => {\n      if (collections == null) {\n        collections = {};\n      }\n      if (typeof id === \"string\") {\n        delete collections[id];\n      } else {\n        (id as CollectionId[]).forEach((i) => {\n          delete collections[i];\n        });\n      }\n      return collections;\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, NavigationExtras, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nimport {\n  LoginStrategyServiceAbstraction,\n  SsoLoginCredentials,\n  TrustedDeviceUserDecryptionOption,\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SsoPreValidateResponse } from \"@bitwarden/common/auth/models/response/sso-pre-validate.response\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\n@Directive()\nexport class SsoComponent implements OnInit {\n  identifier: string;\n  loggingIn = false;\n\n  formPromise: Promise<AuthResult>;\n  initiateSsoFormPromise: Promise<SsoPreValidateResponse>;\n  onSuccessfulLogin: () => Promise<void>;\n  onSuccessfulLoginNavigate: () => Promise<void>;\n  onSuccessfulLoginTwoFactorNavigate: () => Promise<void>;\n  onSuccessfulLoginChangePasswordNavigate: () => Promise<void>;\n  onSuccessfulLoginForceResetNavigate: () => Promise<void>;\n\n  onSuccessfulLoginTde: () => Promise<void>;\n  onSuccessfulLoginTdeNavigate: () => Promise<void>;\n\n  protected twoFactorRoute = \"2fa\";\n  protected successRoute = \"lock\";\n  protected trustedDeviceEncRoute = \"login-initiated\";\n  protected changePasswordRoute = \"set-password\";\n  protected forcePasswordResetRoute = \"update-temp-password\";\n  protected clientId: string;\n  protected redirectUri: string;\n  protected state: string;\n  protected codeChallenge: string;\n\n  constructor(\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n    protected loginStrategyService: LoginStrategyServiceAbstraction,\n    protected router: Router,\n    protected i18nService: I18nService,\n    protected route: ActivatedRoute,\n    protected stateService: StateService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected apiService: ApiService,\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected environmentService: EnvironmentService,\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected logService: LogService,\n    protected userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    protected configService: ConfigService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected accountService: AccountService,\n    protected toastService: ToastService,\n  ) {}\n\n  async ngOnInit() {\n    // eslint-disable-next-line rxjs/no-async-subscribe\n    this.route.queryParams.pipe(first()).subscribe(async (qParams) => {\n      if (qParams.code != null && qParams.state != null) {\n        const codeVerifier = await this.ssoLoginService.getCodeVerifier();\n        const state = await this.ssoLoginService.getSsoState();\n        await this.ssoLoginService.setCodeVerifier(null);\n        await this.ssoLoginService.setSsoState(null);\n\n        if (qParams.redirectUri != null) {\n          this.redirectUri = qParams.redirectUri;\n        }\n\n        if (\n          qParams.code != null &&\n          codeVerifier != null &&\n          state != null &&\n          this.checkState(state, qParams.state)\n        ) {\n          const ssoOrganizationIdentifier = this.getOrgIdentifierFromState(qParams.state);\n          await this.logIn(qParams.code, codeVerifier, ssoOrganizationIdentifier);\n        }\n      } else if (\n        qParams.clientId != null &&\n        qParams.redirectUri != null &&\n        qParams.state != null &&\n        qParams.codeChallenge != null\n      ) {\n        this.redirectUri = qParams.redirectUri;\n        this.state = qParams.state;\n        this.codeChallenge = qParams.codeChallenge;\n        this.clientId = qParams.clientId;\n      }\n    });\n  }\n\n  async submit(returnUri?: string, includeUserIdentifier?: boolean) {\n    if (this.identifier == null || this.identifier === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"ssoValidationFailed\"),\n        message: this.i18nService.t(\"ssoIdentifierRequired\"),\n      });\n      return;\n    }\n\n    this.initiateSsoFormPromise = this.apiService.preValidateSso(this.identifier);\n    const response = await this.initiateSsoFormPromise;\n\n    const authorizeUrl = await this.buildAuthorizeUrl(\n      returnUri,\n      includeUserIdentifier,\n      response.token,\n    );\n    this.platformUtilsService.launchUri(authorizeUrl, { sameWindow: true });\n  }\n\n  protected async buildAuthorizeUrl(\n    returnUri?: string,\n    includeUserIdentifier?: boolean,\n    token?: string,\n  ): Promise<string> {\n    let codeChallenge = this.codeChallenge;\n    let state = this.state;\n\n    const passwordOptions: any = {\n      type: \"password\",\n      length: 64,\n      uppercase: true,\n      lowercase: true,\n      numbers: true,\n      special: false,\n    };\n\n    if (codeChallenge == null) {\n      const codeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n      const codeVerifierHash = await this.cryptoFunctionService.hash(codeVerifier, \"sha256\");\n      codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n      await this.ssoLoginService.setCodeVerifier(codeVerifier);\n    }\n\n    if (state == null) {\n      state = await this.passwordGenerationService.generatePassword(passwordOptions);\n      if (returnUri) {\n        state += `_returnUri='${returnUri}'`;\n      }\n    }\n\n    // Add Organization Identifier to state\n    state += `_identifier=${this.identifier}`;\n\n    // Save state (regardless of new or existing)\n    await this.ssoLoginService.setSsoState(state);\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    let authorizeUrl =\n      env.getIdentityUrl() +\n      \"/connect/authorize?\" +\n      \"client_id=\" +\n      this.clientId +\n      \"&redirect_uri=\" +\n      encodeURIComponent(this.redirectUri) +\n      \"&\" +\n      \"response_type=code&scope=api offline_access&\" +\n      \"state=\" +\n      state +\n      \"&code_challenge=\" +\n      codeChallenge +\n      \"&\" +\n      \"code_challenge_method=S256&response_mode=query&\" +\n      \"domain_hint=\" +\n      encodeURIComponent(this.identifier) +\n      \"&ssoToken=\" +\n      encodeURIComponent(token);\n\n    if (includeUserIdentifier) {\n      const userIdentifier = await this.apiService.getSsoUserIdentifier();\n      authorizeUrl += `&user_identifier=${encodeURIComponent(userIdentifier)}`;\n    }\n\n    return authorizeUrl;\n  }\n\n  private async logIn(code: string, codeVerifier: string, orgSsoIdentifier: string): Promise<void> {\n    this.loggingIn = true;\n    try {\n      const email = await this.ssoLoginService.getSsoEmail();\n\n      const credentials = new SsoLoginCredentials(\n        code,\n        codeVerifier,\n        this.redirectUri,\n        orgSsoIdentifier,\n        email,\n      );\n      this.formPromise = this.loginStrategyService.logIn(credentials);\n      const authResult = await this.formPromise;\n\n      if (authResult.requiresTwoFactor) {\n        return await this.handleTwoFactorRequired(orgSsoIdentifier);\n      }\n\n      // Everything after the 2FA check is considered a successful login\n      // Just have to figure out where to send the user\n\n      // Save off the OrgSsoIdentifier for use in the TDE flows (or elsewhere)\n      // - TDE login decryption options component\n      // - Browser SSO on extension open\n      // Note: you cannot set this in state before 2FA b/c there won't be an account in state.\n      await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(orgSsoIdentifier);\n\n      // Users enrolled in admin acct recovery can be forced to set a new password after\n      // having the admin set a temp password for them (affects TDE & standard users)\n      if (authResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n        // Weak password is not a valid scenario here b/c we cannot have evaluated a MP yet\n        return await this.handleForcePasswordReset(orgSsoIdentifier);\n      }\n\n      // must come after 2fa check since user decryption options aren't available if 2fa is required\n      const userDecryptionOpts = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptions$,\n      );\n\n      const tdeEnabled = await this.isTrustedDeviceEncEnabled(\n        userDecryptionOpts.trustedDeviceOption,\n      );\n\n      if (tdeEnabled) {\n        return await this.handleTrustedDeviceEncryptionEnabled(\n          authResult,\n          orgSsoIdentifier,\n          userDecryptionOpts,\n        );\n      }\n\n      // In the standard, non TDE case, a user must set password if they don't\n      // have one and they aren't using key connector.\n      // Note: TDE & Key connector are mutually exclusive org config options.\n      const requireSetPassword =\n        !userDecryptionOpts.hasMasterPassword &&\n        userDecryptionOpts.keyConnectorOption === undefined;\n\n      if (requireSetPassword || authResult.resetMasterPassword) {\n        // Change implies going no password -> password in this case\n        return await this.handleChangePasswordRequired(orgSsoIdentifier);\n      }\n\n      // Standard SSO login success case\n      return await this.handleSuccessfulLogin();\n    } catch (e) {\n      await this.handleLoginError(e);\n    }\n  }\n\n  private async isTrustedDeviceEncEnabled(\n    trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n  ): Promise<boolean> {\n    return trustedDeviceOption !== undefined;\n  }\n\n  private async handleTwoFactorRequired(orgIdentifier: string) {\n    await this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginTwoFactorNavigate,\n      [this.twoFactorRoute],\n      {\n        queryParams: {\n          identifier: orgIdentifier,\n          sso: \"true\",\n        },\n      },\n    );\n  }\n\n  private async handleTrustedDeviceEncryptionEnabled(\n    authResult: AuthResult,\n    orgIdentifier: string,\n    userDecryptionOpts: UserDecryptionOptions,\n  ): Promise<void> {\n    // Tde offboarding takes precedence\n    if (\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption.isTdeOffboarding\n    ) {\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeOffboarding,\n        userId,\n      );\n    } else if (\n      // If user doesn't have a MP, but has reset password permission, they must set a MP\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption.hasManageResetPasswordPermission\n    ) {\n      // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n      // Note: we cannot directly navigate in this scenario as we are in a pre-decryption state, and\n      // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n      const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n        userId,\n      );\n    }\n\n    if (this.onSuccessfulLoginTde != null) {\n      // Don't await b/c causes hang on desktop & browser\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLoginTde();\n    }\n\n    // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n    // eslint-disable-next-line @typescript-eslint/no-floating-promises\n    this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginTdeNavigate,\n      // Navigate to TDE page (if user was on trusted device and TDE has decrypted\n      //  their user key, the login-initiated guard will redirect them to the vault)\n      [this.trustedDeviceEncRoute],\n    );\n  }\n\n  private async handleChangePasswordRequired(orgIdentifier: string) {\n    const emailVerification = await this.configService.getFeatureFlag(\n      FeatureFlag.EmailVerification,\n    );\n\n    if (emailVerification) {\n      this.changePasswordRoute = \"set-password-jit\";\n    }\n\n    await this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginChangePasswordNavigate,\n      [this.changePasswordRoute],\n      {\n        queryParams: {\n          identifier: orgIdentifier,\n        },\n      },\n    );\n  }\n\n  private async handleForcePasswordReset(orgIdentifier: string) {\n    await this.navigateViaCallbackOrRoute(\n      this.onSuccessfulLoginForceResetNavigate,\n      [this.forcePasswordResetRoute],\n      {\n        queryParams: {\n          identifier: orgIdentifier,\n        },\n      },\n    );\n  }\n\n  private async handleSuccessfulLogin() {\n    if (this.onSuccessfulLogin != null) {\n      // Don't await b/c causes hang on desktop & browser\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.onSuccessfulLogin();\n    }\n\n    await this.navigateViaCallbackOrRoute(this.onSuccessfulLoginNavigate, [this.successRoute]);\n  }\n\n  private async handleLoginError(e: any) {\n    this.logService.error(e);\n\n    // TODO: Key Connector Service should pass this error message to the logout callback instead of displaying here\n    if (e.message === \"Key Connector error\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"ssoKeyConnectorError\"),\n      });\n    }\n  }\n\n  private async navigateViaCallbackOrRoute(\n    callback: () => Promise<unknown>,\n    commands: unknown[],\n    extras?: NavigationExtras,\n  ): Promise<void> {\n    if (callback) {\n      await callback();\n    } else {\n      await this.router.navigate(commands, extras);\n    }\n  }\n\n  private getOrgIdentifierFromState(state: string): string {\n    if (state === null || state === undefined) {\n      return null;\n    }\n\n    const stateSplit = state.split(\"_identifier=\");\n    return stateSplit.length > 1 ? stateSplit[1] : null;\n  }\n\n  private checkState(state: string, checkState: string): boolean {\n    if (state === null || state === undefined) {\n      return false;\n    }\n    if (checkState === null || checkState === undefined) {\n      return false;\n    }\n\n    const stateSplit = state.split(\"_identifier=\");\n    const checkStateSplit = checkState.split(\"_identifier=\");\n    return stateSplit[0] === checkStateSplit[0];\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const EmailIcon = svgIcon`\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"67\"\n    height=\"64\"\n    fill=\"none\"\n    class=\"tw-text-primary-600\"\n    role=\"img\"\n    aria-label=\"[title]\"\n  >\n    <title>Email</title>\n    <path\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      d=\"m9.28 19.155-5.848 4.363a4 4 0 0 0-1.608 3.206V59a4 4 0 0 0 4 4h56.044a4 4 0 0 0 4-4V26.742a4 4 0 0 0-1.63-3.223L58.3 19.155M42.438 7.49l-6.442-4.736a4 4 0 0 0-4.762.017l-6.324 4.72\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-width=\"2\"\n      d=\"M58.373 30.978V9.473a2 2 0 0 0-2-2H11.318a2 2 0 0 0-2 2v21.505\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      d=\"M64.504 61.637 43.35 42.107a6 6 0 0 0-4.07-1.59H27.421a6 6 0 0 0-4.175 1.69l-20.06 19.43\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-width=\"2\"\n      d=\"m65.181 27.239-22.81 13.623M2.51 27.24l22.81 13.622\"\n    />\n    <rect width=\"35\" height=\"12\" x=\"16.324\" y=\"17.5\" stroke=\"currentColor\" rx=\"6\" />\n    <circle cx=\"21.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"31.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"41.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"26.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"36.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"46.324\" cy=\"23.5\" r=\"1.5\" fill=\"currentColor\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RecoveryCodeIcon = svgIcon`\n  <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    alt=\"rc logo\"\n    width=\"76\"\n    height=\"63\"\n    fill=\"none\"\n    class=\"tw-text-primary-600\"\n    role=\"img\"\n    aria-label=\"[title]\"\n  >\n    <title>Recovery Code</title>\n    <rect\n      width=\"49.459\"\n      height=\"17.255\"\n      x=\"1\"\n      y=\"-1\"\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      rx=\"8.627\"\n      transform=\"matrix(-1 0 0 1 52.15 38.12)\"\n    />\n    <path\n      fill=\"currentColor\"\n      d=\"M7.742 19.337a1 1 0 0 1 1.635-1.152l-1.635 1.152Zm7.499 8.895.576.817a1 1 0 0 1-1.393-.24l.817-.577Zm8.895-7.498a1 1 0 1 1 1.152 1.634l-1.152-1.634Zm44.129 29.953-.776-.631.776.631ZM63.942 8.483l.631-.775-.631.775Zm-42.205 4.323.776.631-.776-.631Zm22.266 49.925a1 1 0 1 1 .063-1.999l-.063 2ZM16.358 27.183a1 1 0 1 1-1.975-.313l1.975.313Zm-6.981-8.998 6.681 9.47-1.634 1.153-6.682-9.47 1.635-1.154Zm5.287 9.23 9.472-6.681 1.152 1.634-9.47 6.681-1.154-1.634ZM67.49 50.056c10.112-12.42 8.241-30.685-4.179-40.797l1.263-1.551C77.85 18.517 79.85 38.042 69.04 51.318l-1.55-1.262ZM63.31 9.259C50.89-.853 32.625 1.018 22.513 13.437l-1.551-1.262C31.772-1.102 51.297-3.102 64.573 7.708l-1.263 1.55ZM44.066 60.732c8.732.275 17.484-3.381 23.423-10.676l1.551 1.263c-6.35 7.799-15.708 11.706-25.037 11.412l.063-1.999ZM22.513 13.437a28.861 28.861 0 0 0-6.155 13.746l-1.975-.313a30.861 30.861 0 0 1 6.579-14.695l1.551 1.262Z\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n      d=\"M36.59 25.167v-5.445c0-4.021 3.806-7.267 8.475-7.267s8.475 3.264 8.475 7.267v5.445\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      d=\"M32.353 37.345v-6.098a6 6 0 0 1 6-6h13.424a6 6 0 0 1 6 6v9.187a6 6 0 0 1-6 6h-.601\"\n    />\n    <path\n      fill=\"currentColor\"\n      d=\"M45.886 35.63c.491-.285.822-.82.822-1.432v-.5c0-.913-.736-1.653-1.643-1.653-.908 0-1.643.74-1.643 1.654v.499c0 .612.33 1.146.82 1.432v1.283c0 .457.368.827.822.827.454 0 .822-.37.822-.827v-1.282Z\"\n    />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 46.001 44.148)\" />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 32.001 44.148)\" />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 18.001 44.148)\" />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 39.001 44.148)\" />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 25.001 44.148)\" />\n    <circle cx=\"2\" cy=\"2\" r=\"2\" fill=\"currentColor\" transform=\"matrix(-1 0 0 1 11.001 44.148)\" />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const TOTPIcon = svgIcon`\n<svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"120\"\n    height=\"62\"\n    fill=\"none\"\n    class=\"tw-text-primary-600\"\n    role=\"img\"\n    aria-label=\"[title]\"\n  >\n    <title>TOTP Authenticator</title>\n    <rect width=\"35\" height=\"12\" x=\"50.324\" y=\"21.5\" stroke=\"currentColor\" rx=\"6\" />\n    <circle cx=\"55.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"65.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"75.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"60.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"70.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <circle cx=\"80.324\" cy=\"27.5\" r=\"1.5\" fill=\"currentColor\" />\n    <path\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n      d=\"M52.703 61h34.706\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-linejoin=\"round\"\n      stroke-width=\"2\"\n      d=\"M63.932 51.166V61M75.16 51.166V61\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      d=\"M38.952 51.166h64.894a6 6 0 0 0 6-6V7a6 6 0 0 0-6-6h-68a6 6 0 0 0-6 6v7.655\"\n    />\n    <path\n      stroke=\"currentColor\"\n      d=\"M38.692 46.517h62.999a4 4 0 0 0 4-4V9.552a4 4 0 0 0-4-4H38.537a4 4 0 0 0-4 4v5.103\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-linecap=\"round\"\n      stroke-linejoin=\"round\"\n      d=\"M32.284 27.382h11.064l-2.912-2.895M43.348 30.276H32.284l2.912 2.895\"\n    />\n    <path\n      stroke=\"currentColor\"\n      stroke-width=\"2\"\n      d=\"M37.846 27.75V19a4 4 0 0 0-4-4h-18a4 4 0 0 0-4 4v38a4 4 0 0 0 4 4h18a4 4 0 0 0 4-4V30.5\"\n    />\n    <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-width=\"2\" d=\"M24.806 18.5h.08\" />\n    <path stroke=\"currentColor\" d=\"M24.846 36a8 8 0 1 0 7.858 6.5\" />\n    <path\n      fill=\"currentColor\"\n      d=\"M21.547 45.36h1.02v-3.64l-1.221.584v-.626l1.215-.575h.657v4.258h1.007v.545h-2.678v-.545ZM25.793 45.358h2.23v.548h-2.948v-.548c.405-.424.76-.799 1.063-1.124a27 27 0 0 0 .627-.687c.216-.263.363-.475.438-.636.076-.164.114-.33.114-.5 0-.27-.08-.48-.24-.633-.158-.153-.376-.23-.653-.23a1.99 1.99 0 0 0-.621.107 3.493 3.493 0 0 0-.69.323v-.658c.224-.106.443-.185.657-.24.217-.053.43-.08.64-.08.475 0 .856.126 1.145.378.29.25.435.578.435.984 0 .207-.049.413-.146.62a3.005 3.005 0 0 1-.468.684c-.122.14-.298.334-.53.581-.23.248-.58.618-1.053 1.11Z\"\n    />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const WebAuthnIcon = svgIcon`\n <svg\n    xmlns=\"http://www.w3.org/2000/svg\"\n    width=\"62.176998\"\n    height=\"60.152\"\n    fill=\"none\"\n    class=\"tw-text-primary-600\"\n    role=\"img\"\n    aria-label=\"[title]\"\n  >\n    <title>Webauthn</title>\n    <g stroke=\"currentColor\" clip-path=\"url(#a)\" transform=\"translate(-6.081,-1.143)\">\n      <path\n        stroke-linecap=\"round\"\n        stroke-linejoin=\"round\"\n        stroke-miterlimit=\"10\"\n        stroke-width=\"2\"\n        d=\"M20.418 33.19c5.614 0 10.42 3.56 12.396 8.533h29.012l5.434 5.522-4.491 4.563h-6.602l-3.413-3.468-3.279 3.24-1.167-1.187-1.303 1.323-3.188-3.24-3.1 3.149H32.86c-1.932 5.065-6.782 8.67-12.44 8.67-7.366 0-13.339-6.069-13.339-13.553 0-7.483 5.928-13.552 13.338-13.552Zm-6.152 16.975c1.841 0 3.368-1.506 3.368-3.422 0-1.871-1.482-3.423-3.368-3.423-1.887 0-3.369 1.506-3.369 3.422 0 1.917 1.527 3.423 3.369 3.423Z\"\n      />\n      <path\n        stroke-linecap=\"round\"\n        d=\"M59.78 44.722H36.32M19.99 36.722c4.036 0 7.569 2.405 9.51 6\"\n      />\n      <circle\n        cx=\"12.24\"\n        cy=\"12.24\"\n        r=\"12.24\"\n        stroke-width=\"2\"\n        transform=\"matrix(-1 0 0 1 50.6 2.143)\"\n      />\n      <path\n        stroke-width=\"2\"\n        d=\"M22.753 33.423c3.836-4.174 9.41-6.8 15.615-6.8 9.698 0 17.857 6.417 20.243 15.13\"\n      />\n    </g>\n    <defs>\n      <clipPath id=\"a\"><path fill=\"#fff\" d=\"M68.5.62H.5v61h68z\" /></clipPath>\n    </defs>\n  </svg>\n`;\n","<ng-container>\n  <!-- TOTP Authenticator -->\n  <bit-icon [icon]=\"Icons.TOTPIcon\" *ngIf=\"provider == 0\"></bit-icon>\n  <!-- Email -->\n  <bit-icon [icon]=\"Icons.EmailIcon\" *ngIf=\"provider == 1\"></bit-icon>\n  <!-- Webauthn -->\n  <bit-icon [icon]=\"Icons.WebAuthnIcon\" *ngIf=\"provider == 7\"></bit-icon>\n  <!-- Recovery Code -->\n  <bit-icon [icon]=\"Icons.RecoveryCodeIcon\" *ngIf=\"provider == 'rc'\"></bit-icon>\n  <!-- Other 2FA Types (Duo, Yubico, U2F as PNG) -->\n  <img\n    [class]=\"'mfaType' + provider\"\n    [alt]=\"name\"\n    *ngIf=\"provider == 2 || provider == 3 || provider == 4 || provider == 5 || provider == 6\"\n  />\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input } from \"@angular/core\";\n\nimport { EmailIcon } from \"../icons/email.icon\";\nimport { RecoveryCodeIcon } from \"../icons/recovery.icon\";\nimport { TOTPIcon } from \"../icons/totp.icon\";\nimport { WebAuthnIcon } from \"../icons/webauthn.icon\";\n\n@Component({\n  selector: \"auth-two-factor-icon\",\n  templateUrl: \"./two-factor-icon.component.html\",\n})\nexport class TwoFactorIconComponent {\n  @Input() provider: any;\n  @Input() name: string;\n\n  protected readonly Icons = {\n    TOTPIcon,\n    EmailIcon,\n    WebAuthnIcon,\n    RecoveryCodeIcon,\n  };\n\n  constructor() {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject } from \"@angular/core\";\nimport {\n  ActivatedRouteSnapshot,\n  CanActivateFn,\n  Router,\n  RouterStateSnapshot,\n  UrlTree,\n} from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { MasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\nexport const authGuard: CanActivateFn = async (\n  route: ActivatedRouteSnapshot,\n  routerState: RouterStateSnapshot,\n): Promise<boolean | UrlTree> => {\n  const authService = inject(AuthService);\n  const router = inject(Router);\n  const messagingService = inject(MessagingService);\n  const keyConnectorService = inject(KeyConnectorService);\n  const accountService = inject(AccountService);\n  const masterPasswordService = inject(MasterPasswordServiceAbstraction);\n\n  const authStatus = await authService.getAuthStatus();\n\n  if (authStatus === AuthenticationStatus.LoggedOut) {\n    messagingService.send(\"authBlocked\", { url: routerState.url });\n    return false;\n  }\n\n  if (authStatus === AuthenticationStatus.Locked) {\n    if (routerState != null) {\n      messagingService.send(\"lockedUrl\", { url: routerState.url });\n    }\n    // TODO PM-9674: when extension refresh is finished, remove promptBiometric\n    // as it has been integrated into the component as a default feature.\n    return router.createUrlTree([\"lock\"], { queryParams: { promptBiometric: true } });\n  }\n\n  if (\n    !routerState.url.includes(\"remove-password\") &&\n    (await keyConnectorService.getConvertAccountRequired())\n  ) {\n    return router.createUrlTree([\"/remove-password\"]);\n  }\n\n  const userId = (await firstValueFrom(accountService.activeAccount$)).id;\n  const forceSetPasswordReason = await firstValueFrom(\n    masterPasswordService.forceSetPasswordReason$(userId),\n  );\n\n  if (\n    forceSetPasswordReason ===\n      ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission &&\n    !routerState.url.includes(\"set-password\")\n  ) {\n    return router.createUrlTree([\"/set-password\"]);\n  }\n\n  if (\n    forceSetPasswordReason !== ForceSetPasswordReason.None &&\n    !routerState.url.includes(\"update-temp-password\")\n  ) {\n    return router.createUrlTree([\"/update-temp-password\"]);\n  }\n\n  return true;\n};\n","import { inject } from \"@angular/core\";\nimport {\n  ActivatedRouteSnapshot,\n  CanActivateFn,\n  Router,\n  RouterStateSnapshot,\n} from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n/**\n * Only allow access to this route if the vault is locked.\n * If TDE is enabled then the user must also have had a user key at some point.\n * Otherwise reject navigation.\n *\n * TODO: This should return Observable<boolean | UrlTree> once we can remove all the promises\n */\nexport function lockGuard(): CanActivateFn {\n  return async (\n    activatedRouteSnapshot: ActivatedRouteSnapshot,\n    routerStateSnapshot: RouterStateSnapshot,\n  ) => {\n    const authService = inject(AuthService);\n    const keyService = inject(KeyService);\n    const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n    const platformUtilService = inject(PlatformUtilsService);\n    const messagingService = inject(MessagingService);\n    const router = inject(Router);\n    const userVerificationService = inject(UserVerificationService);\n    const vaultTimeoutSettingsService = inject(VaultTimeoutSettingsService);\n    const accountService = inject(AccountService);\n\n    const activeUser = await firstValueFrom(accountService.activeAccount$);\n\n    // If no active user, redirect to root:\n    // scenario context: user logs out on lock screen and app will reload lock comp without active user\n    if (!activeUser) {\n      return router.createUrlTree([\"/\"]);\n    }\n\n    const authStatus = await firstValueFrom(authService.authStatusFor$(activeUser.id));\n    if (authStatus !== AuthenticationStatus.Locked) {\n      return router.createUrlTree([\"/\"]);\n    }\n\n    // if user can't lock, they can't access the lock screen\n    const canLock = await vaultTimeoutSettingsService.canLock(activeUser.id);\n    if (!canLock) {\n      return false;\n    }\n\n    // If legacy user on web, redirect to migration page\n    if (await keyService.isLegacyUser()) {\n      if (platformUtilService.getClientType() === ClientType.Web) {\n        return router.createUrlTree([\"migrate-legacy-encryption\"]);\n      }\n      // Log out legacy users on other clients\n      messagingService.send(\"logout\");\n      return false;\n    }\n\n    // User is authN and in locked state.\n\n    const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n\n    // Create special exception which allows users to go from the login-initiated page to the lock page for the approve w/ MP flow\n    // The MP check is necessary to prevent direct manual navigation from other locked state pages for users who don't have a MP\n    if (\n      activatedRouteSnapshot.queryParams[\"from\"] === \"login-initiated\" &&\n      tdeEnabled &&\n      (await userVerificationService.hasMasterPassword())\n    ) {\n      return true;\n    }\n\n    // If authN user with TDE directly navigates to lock, reject that navigation\n    const everHadUserKey = await firstValueFrom(keyService.everHadUserKey$);\n    if (tdeEnabled && !everHadUserKey) {\n      return false;\n    }\n\n    return true;\n  };\n}\n","import { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nexport interface RedirectRoutes {\n  loggedIn: string;\n  loggedOut: string;\n  locked: string;\n  notDecrypted: string;\n}\n\nconst defaultRoutes: RedirectRoutes = {\n  loggedIn: \"/vault\",\n  loggedOut: \"/login\",\n  locked: \"/lock\",\n  notDecrypted: \"/login-initiated\",\n};\n\n/**\n * Guard that consolidates all redirection logic, should be applied to root route.\n *\n * TODO: This should return Observable<boolean | UrlTree> once we can get rid of all the promises\n */\nexport function redirectGuard(overrides: Partial<RedirectRoutes> = {}): CanActivateFn {\n  const routes = { ...defaultRoutes, ...overrides };\n  return async (route) => {\n    const authService = inject(AuthService);\n    const keyService = inject(KeyService);\n    const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n    const logService = inject(LogService);\n    const router = inject(Router);\n\n    const authStatus = await authService.getAuthStatus();\n\n    if (authStatus === AuthenticationStatus.LoggedOut) {\n      return router.createUrlTree([routes.loggedOut], { queryParams: route.queryParams });\n    }\n\n    if (authStatus === AuthenticationStatus.Unlocked) {\n      return router.createUrlTree([routes.loggedIn], { queryParams: route.queryParams });\n    }\n\n    // If locked, TDE is enabled, and the user hasn't decrypted yet, then redirect to the\n    // login decryption options component.\n    const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n    const everHadUserKey = await firstValueFrom(keyService.everHadUserKey$);\n    if (authStatus === AuthenticationStatus.Locked && tdeEnabled && !everHadUserKey) {\n      logService.info(\n        \"Sending user to TDE decryption options. AuthStatus is %s. TDE support is %s. Ever had user key is %s.\",\n        AuthenticationStatus[authStatus],\n        tdeEnabled,\n        everHadUserKey,\n      );\n      return router.createUrlTree([routes.notDecrypted], { queryParams: route.queryParams });\n    }\n\n    if (authStatus === AuthenticationStatus.Locked) {\n      return router.createUrlTree([routes.locked], { queryParams: route.queryParams });\n    }\n\n    return router.createUrlTree([\"/\"]);\n  };\n}\n","import { inject } from \"@angular/core\";\nimport {\n  ActivatedRouteSnapshot,\n  Router,\n  RouterStateSnapshot,\n  CanActivateFn,\n} from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n/**\n * Only allow access to this route if the vault is locked and has never been decrypted.\n * Otherwise redirect to root.\n *\n * TODO: This should return Observable<boolean | UrlTree> once we can get rid of all the promises\n */\nexport function tdeDecryptionRequiredGuard(): CanActivateFn {\n  return async (_: ActivatedRouteSnapshot, state: RouterStateSnapshot) => {\n    const authService = inject(AuthService);\n    const keyService = inject(KeyService);\n    const deviceTrustService = inject(DeviceTrustServiceAbstraction);\n    const logService = inject(LogService);\n    const router = inject(Router);\n\n    const authStatus = await authService.getAuthStatus();\n    const tdeEnabled = await firstValueFrom(deviceTrustService.supportsDeviceTrust$);\n    const everHadUserKey = await firstValueFrom(keyService.everHadUserKey$);\n\n    // We need to determine if we should bypass the decryption options and send the user to the vault.\n    // The ONLY time that we want to send a user to the decryption options is when:\n    // 1. The user's auth status is Locked, AND\n    // 2. TDE is enabled, AND\n    // 3. The user has never had a user key in state since last logout.\n    // The inverse of this is when we should send the user to the vault.\n    if (authStatus !== AuthenticationStatus.Locked || !tdeEnabled || everHadUserKey) {\n      return router.createUrlTree([\"/\"]);\n    }\n\n    logService.info(\n      \"Sending user to TDE decryption options. AuthStatus is %s. TDE support is %s. Ever had user key is %s.\",\n      AuthenticationStatus[authStatus],\n      tdeEnabled,\n      everHadUserKey,\n    );\n\n    return true;\n  };\n}\n","import { inject } from \"@angular/core\";\nimport { CanActivateFn, Router, UrlTree } from \"@angular/router\";\nimport { Observable, map } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\n\ntype UnauthRoutes = {\n  homepage: () => string;\n  locked: string;\n};\n\nconst defaultRoutes: UnauthRoutes = {\n  homepage: () => \"/vault\",\n  locked: \"/lock\",\n};\n\nfunction unauthGuard(routes: UnauthRoutes): Observable<boolean | UrlTree> {\n  const authService = inject(AuthService);\n  const router = inject(Router);\n\n  return authService.activeAccountStatus$.pipe(\n    map((status) => {\n      if (status == null || status === AuthenticationStatus.LoggedOut) {\n        return true;\n      } else if (status === AuthenticationStatus.Locked) {\n        return router.createUrlTree([routes.locked]);\n      } else {\n        return router.createUrlTree([routes.homepage()]);\n      }\n    }),\n  );\n}\n\nexport function unauthGuardFn(overrides: Partial<UnauthRoutes> = {}): CanActivateFn {\n  return () => unauthGuard({ ...defaultRoutes, ...overrides });\n}\n","import { AbstractControl, UntypedFormGroup, ValidationErrors, ValidatorFn } from \"@angular/forms\";\n\nimport { FormGroupControls } from \"../../platform/abstractions/form-validation-errors.service\";\n\nexport class InputsFieldMatch {\n  /**\n   *  Check to ensure two fields do not have the same value\n   *\n   * @deprecated Use compareInputs() instead\n   */\n  static validateInputsDoesntMatch(matchTo: string, errorMessage: string): ValidatorFn {\n    return (control: AbstractControl) => {\n      if (control.parent && control.parent.controls) {\n        return control?.value === (control?.parent?.controls as FormGroupControls)[matchTo].value\n          ? {\n              inputsMatchError: {\n                message: errorMessage,\n              },\n            }\n          : null;\n      }\n\n      return null;\n    };\n  }\n\n  //check to ensure two fields have the same value\n  static validateInputsMatch(matchTo: string, errorMessage: string): ValidatorFn {\n    return (control: AbstractControl) => {\n      if (control.parent && control.parent.controls) {\n        return control?.value === (control?.parent?.controls as FormGroupControls)[matchTo].value\n          ? null\n          : {\n              inputsDoesntMatchError: {\n                message: errorMessage,\n              },\n            };\n      }\n\n      return null;\n    };\n  }\n\n  /**\n   * Checks the formGroup if two fields have the same value and validation is controlled from either field\n   *\n   * @deprecated\n   * Use compareInputs() instead.\n   *\n   * For more info on deprecation\n   * - Do not use untyped `options` object in formBuilder.group() {@link https://angular.dev/api/forms/UntypedFormBuilder}\n   * - Use formBuilder.group() overload with AbstractControlOptions type instead {@link https://angular.dev/api/forms/AbstractControlOptions}\n   *\n   * Remove this method after deprecated instances are replaced\n   */\n  static validateFormInputsMatch(field: string, fieldMatchTo: string, errorMessage: string) {\n    return (formGroup: UntypedFormGroup) => {\n      const fieldCtrl = formGroup.controls[field];\n      const fieldMatchToCtrl = formGroup.controls[fieldMatchTo];\n\n      if (fieldCtrl.value !== fieldMatchToCtrl.value) {\n        fieldMatchToCtrl.setErrors({\n          inputsDoesntMatchError: {\n            message: errorMessage,\n          },\n        });\n      } else {\n        fieldMatchToCtrl.setErrors(null);\n      }\n    };\n  }\n\n  /**\n   * Checks whether two form controls do or do not have the same input value (except for empty string values).\n   *\n   * - Validation is controlled from either form control.\n   * - The error message is displayed under controlB by default, but can be set to controlA.\n   *\n   * @param validationGoal Whether you want to verify that the form control input values match or do not match\n   * @param controlNameA The name of the first form control to compare.\n   * @param controlNameB The name of the second form control to compare.\n   * @param errorMessage The error message to display if there is an error. This will probably\n   *                     be an i18n translated string.\n   * @param showErrorOn The control under which you want to display the error (default is controlB).\n   */\n  static compareInputs(\n    validationGoal: \"match\" | \"doNotMatch\",\n    controlNameA: string,\n    controlNameB: string,\n    errorMessage: string,\n    showErrorOn: \"controlA\" | \"controlB\" = \"controlB\",\n  ): ValidatorFn {\n    return (control: AbstractControl): ValidationErrors | null => {\n      const controlA = control.get(controlNameA);\n      const controlB = control.get(controlNameB);\n\n      if (!controlA || !controlB) {\n        return null;\n      }\n\n      const controlThatShowsError = showErrorOn === \"controlA\" ? controlA : controlB;\n\n      // Don't compare empty strings\n      if (controlA.value === \"\" && controlB.value === \"\") {\n        return pass();\n      }\n\n      const controlValuesMatch = controlA.value === controlB.value;\n\n      if (validationGoal === \"match\") {\n        if (controlValuesMatch) {\n          return pass();\n        } else {\n          return fail();\n        }\n      }\n\n      if (validationGoal === \"doNotMatch\") {\n        if (!controlValuesMatch) {\n          return pass();\n        } else {\n          return fail();\n        }\n      }\n\n      return null; // default return\n\n      function fail() {\n        controlThatShowsError.setErrors({\n          // Preserve any pre-existing errors\n          ...controlThatShowsError.errors,\n          // Add new inputMatchError\n          inputMatchError: {\n            message: errorMessage,\n          },\n        });\n\n        return {\n          inputMatchError: {\n            message: errorMessage,\n          },\n        };\n      }\n\n      function pass(): null {\n        // Get the current errors object\n        const errorsObj = controlThatShowsError?.errors;\n\n        if (errorsObj != null) {\n          // Remove any inputMatchError if it exists, since that is the sole error we are targeting with this validator\n          if (errorsObj?.inputMatchError) {\n            delete errorsObj.inputMatchError;\n          }\n\n          // Check if the errorsObj is now empty\n          const isEmptyObj = Object.keys(errorsObj).length === 0;\n\n          // If the errorsObj is empty, set errors to null, otherwise set the errors to an object of pre-existing errors (other than inputMatchError)\n          controlThatShowsError.setErrors(isEmptyObj ? null : errorsObj);\n        }\n\n        // Return null for this validator\n        return null;\n      }\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogConfig, DialogRef } from \"@angular/cdk/dialog\";\nimport { Component, ElementRef, Inject, OnInit, ViewChild } from \"@angular/core\";\nimport { FormControl, FormGroup, Validators } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { ProviderService } from \"@bitwarden/common/admin-console/abstractions/provider.service\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { Provider } from \"@bitwarden/common/admin-console/models/domain/provider\";\nimport { AccountInfo, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { BitPayInvoiceRequest } from \"@bitwarden/common/billing/models/request/bit-pay-invoice.request\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { DialogService } from \"@bitwarden/components\";\n\nexport type AddAccountCreditDialogParams = {\n  organizationId?: string;\n  providerId?: string;\n};\n\nexport enum AddAccountCreditDialogResultType {\n  Closed = \"closed\",\n  Submitted = \"submitted\",\n}\n\nexport const openAddAccountCreditDialog = (\n  dialogService: DialogService,\n  dialogConfig: DialogConfig<AddAccountCreditDialogParams>,\n) =>\n  dialogService.open<AddAccountCreditDialogResultType, AddAccountCreditDialogParams>(\n    AddAccountCreditDialogComponent,\n    dialogConfig,\n  );\n\ntype PayPalConfig = {\n  businessId?: string;\n  buttonAction?: string;\n  returnUrl?: string;\n  customField?: string;\n  subject?: string;\n};\n\n@Component({\n  templateUrl: \"./add-account-credit-dialog.component.html\",\n})\nexport class AddAccountCreditDialogComponent implements OnInit {\n  @ViewChild(\"payPalForm\", { read: ElementRef, static: true }) payPalForm: ElementRef;\n  protected formGroup = new FormGroup({\n    paymentMethod: new FormControl<PaymentMethodType>(PaymentMethodType.PayPal),\n    creditAmount: new FormControl<number>(null, [Validators.required, Validators.min(0.01)]),\n  });\n  protected payPalConfig: PayPalConfig;\n  protected ResultType = AddAccountCreditDialogResultType;\n\n  private organization?: Organization;\n  private provider?: Provider;\n  private user?: { id: UserId } & AccountInfo;\n\n  constructor(\n    private accountService: AccountService,\n    private apiService: ApiService,\n    private configService: ConfigService,\n    @Inject(DIALOG_DATA) private dialogParams: AddAccountCreditDialogParams,\n    private dialogRef: DialogRef<AddAccountCreditDialogResultType>,\n    private organizationService: OrganizationService,\n    private platformUtilsService: PlatformUtilsService,\n    private providerService: ProviderService,\n  ) {\n    this.payPalConfig = process.env.PAYPAL_CONFIG as PayPalConfig;\n  }\n\n  protected readonly paymentMethodType = PaymentMethodType;\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    if (this.formGroup.value.paymentMethod === PaymentMethodType.PayPal) {\n      this.payPalForm.nativeElement.submit();\n      return;\n    }\n\n    if (this.formGroup.value.paymentMethod === PaymentMethodType.BitPay) {\n      const request = this.getBitPayInvoiceRequest();\n      const bitPayUrl = await this.apiService.postBitPayInvoice(request);\n      this.platformUtilsService.launchUri(bitPayUrl);\n      return;\n    }\n\n    this.dialogRef.close(AddAccountCreditDialogResultType.Submitted);\n  };\n\n  async ngOnInit(): Promise<void> {\n    let payPalCustomField: string;\n\n    if (this.dialogParams.organizationId) {\n      this.formGroup.patchValue({\n        creditAmount: 20.0,\n      });\n      this.organization = await this.organizationService.get(this.dialogParams.organizationId);\n      payPalCustomField = \"organization_id:\" + this.organization.id;\n      this.payPalConfig.subject = this.organization.name;\n    } else if (this.dialogParams.providerId) {\n      this.formGroup.patchValue({\n        creditAmount: 20.0,\n      });\n      this.provider = await this.providerService.get(this.dialogParams.providerId);\n      payPalCustomField = \"provider_id:\" + this.provider.id;\n      this.payPalConfig.subject = this.provider.name;\n    } else {\n      this.formGroup.patchValue({\n        creditAmount: 10.0,\n      });\n      this.user = await firstValueFrom(this.accountService.activeAccount$);\n      payPalCustomField = \"user_id:\" + this.user.id;\n      this.payPalConfig.subject = this.user.email;\n    }\n\n    const region = await firstValueFrom(this.configService.cloudRegion$);\n\n    payPalCustomField += \",account_credit:1\";\n    payPalCustomField += `,region:${region}`;\n\n    this.payPalConfig.customField = payPalCustomField;\n    this.payPalConfig.returnUrl = window.location.href;\n  }\n\n  getBitPayInvoiceRequest(): BitPayInvoiceRequest {\n    const request = new BitPayInvoiceRequest();\n    if (this.organization) {\n      request.name = this.organization.name;\n      request.organizationId = this.organization.id;\n    } else if (this.provider) {\n      request.name = this.provider.name;\n      request.providerId = this.provider.id;\n    } else {\n      request.email = this.user.email;\n      request.userId = this.user.id;\n    }\n\n    request.credit = true;\n    request.amount = this.formGroup.value.creditAmount;\n    request.returnUrl = window.location.href;\n\n    return request;\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog [title]=\"'addCredit' | i18n\">\n    <ng-container bitDialogContent>\n      <p bitTypography=\"body1\">{{ \"creditDelayed\" | i18n }}</p>\n      <div class=\"tw-grid tw-grid-cols-2\">\n        <bit-radio-group formControlName=\"paymentMethod\">\n          <bit-radio-button [value]=\"paymentMethodType.PayPal\">\n            <bit-label> <i class=\"bwi bwi-paypal\"></i>{{ \"payPal\" | i18n }}</bit-label>\n          </bit-radio-button>\n          <bit-radio-button [value]=\"paymentMethodType.BitPay\">\n            <bit-label> <i class=\"bwi bwi-bitcoin\"></i>{{ \"bitcoin\" | i18n }}</bit-label>\n          </bit-radio-button>\n        </bit-radio-group>\n      </div>\n      <div class=\"tw-grid tw-grid-cols-2\">\n        <bit-form-field>\n          <bit-label>{{ \"amount\" | i18n }}</bit-label>\n          <input bitInput type=\"number\" formControlName=\"creditAmount\" step=\"0.01\" required />\n          <span bitPrefix>$USD</span>\n        </bit-form-field>\n      </div>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"submit\" | i18n }}\n      </button>\n      <button\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        [bitDialogClose]=\"ResultType.Closed\"\n      >\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n<form #payPalForm action=\"{{ payPalConfig.buttonAction }}\" method=\"post\" target=\"_top\">\n  <input type=\"hidden\" name=\"cmd\" value=\"_xclick\" />\n  <input type=\"hidden\" name=\"business\" value=\"{{ payPalConfig.businessId }}\" />\n  <input type=\"hidden\" name=\"button_subtype\" value=\"services\" />\n  <input type=\"hidden\" name=\"no_note\" value=\"1\" />\n  <input type=\"hidden\" name=\"no_shipping\" value=\"1\" />\n  <input type=\"hidden\" name=\"rm\" value=\"1\" />\n  <input type=\"hidden\" name=\"return\" value=\"{{ payPalConfig.returnUrl }}\" />\n  <input type=\"hidden\" name=\"cancel_return\" value=\"{{ payPalConfig.returnUrl }}\" />\n  <input type=\"hidden\" name=\"currency_code\" value=\"USD\" />\n  <input type=\"hidden\" name=\"image_url\" value=\"https://bitwarden.com/images/paypal-banner.png\" />\n  <input type=\"hidden\" name=\"bn\" value=\"PP-BuyNowBF:btn_buynow_LG.gif:NonHosted\" />\n  <input type=\"hidden\" name=\"amount\" value=\"{{ formGroup.get('creditAmount').value }}\" />\n  <input type=\"hidden\" name=\"custom\" value=\"{{ payPalConfig.customField }}\" />\n  <input type=\"hidden\" name=\"item_name\" value=\"Bitwarden Account Credit\" />\n  <input type=\"hidden\" name=\"item_number\" value=\"{{ payPalConfig.subject }}\" />\n</form>\n","<ng-container *ngIf=\"loading\">\n  <i\n    class=\"bwi bwi-spinner bwi-spin text-muted\"\n    title=\"{{ 'loading' | i18n }}\"\n    aria-hidden=\"true\"\n  ></i>\n  <span class=\"sr-only\">{{ \"loading\" | i18n }}</span>\n</ng-container>\n<bit-table *ngIf=\"!loading\">\n  <ng-container header>\n    <tr>\n      <th bitCell>{{ \"date\" | i18n }}</th>\n      <th bitCell>{{ \"invoice\" | i18n }}</th>\n      <th bitCell>{{ \"total\" | i18n }}</th>\n      <th bitCell>{{ \"status\" | i18n }}</th>\n      <th bitCell>{{ \"clientDetails\" | i18n }}</th>\n    </tr>\n  </ng-container>\n  <ng-template body>\n    <tr bitRow *ngFor=\"let invoice of invoices\">\n      <td bitCell>{{ invoice.date | date: \"mediumDate\" }}</td>\n      <td bitCell>\n        <a\n          href=\"{{ invoice.url }}\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n          title=\"{{ 'viewInvoice' | i18n }}\"\n        >\n          {{ invoice.number }}\n        </a>\n      </td>\n      <td bitCell>{{ invoice.total | currency: \"$\" }}</td>\n      <td bitCell *ngIf=\"expandInvoiceStatus(invoice) as expandedInvoiceStatus\">\n        <span *ngIf=\"expandedInvoiceStatus === 'open'\">\n          {{ \"open\" | i18n | titlecase }}\n        </span>\n        <span *ngIf=\"expandedInvoiceStatus === 'unpaid'\">\n          <i class=\"bwi bwi-exclamation-circle tw-text-muted\" aria-hidden=\"true\"></i>\n          {{ \"unpaid\" | i18n | titlecase }}\n        </span>\n        <span *ngIf=\"expandedInvoiceStatus === 'paid'\">\n          <i class=\"bwi bwi-check tw-text-success\" aria-hidden=\"true\"></i>\n          {{ \"paid\" | i18n | titlecase }}\n        </span>\n        <span *ngIf=\"expandedInvoiceStatus === 'uncollectible'\">\n          <i class=\"bwi bwi-error tw-text-muted\" aria-hidden=\"true\"></i>\n          {{ \"uncollectible\" | i18n | titlecase }}\n        </span>\n      </td>\n      <td bitCell>\n        <button type=\"button\" bitLink (click)=\"runExport(invoice.id)\">\n          <span class=\"tw-font-normal\">{{ \"downloadCSV\" | i18n }}</span>\n        </button>\n      </td>\n    </tr>\n  </ng-template>\n</bit-table>\n<div *ngIf=\"!invoices || invoices.length === 0\" class=\"tw-mt-10\">\n  <app-no-invoices></app-no-invoices>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport {\n  InvoiceResponse,\n  InvoicesResponse,\n} from \"@bitwarden/common/billing/models/response/invoices.response\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\n\n@Component({\n  selector: \"app-invoices\",\n  templateUrl: \"./invoices.component.html\",\n})\nexport class InvoicesComponent implements OnInit {\n  @Input() startWith?: InvoicesResponse;\n  @Input() getInvoices?: () => Promise<InvoicesResponse>;\n  @Input() getClientInvoiceReport?: (invoiceId: string) => Promise<string>;\n  @Input() getClientInvoiceReportName?: (invoiceResponse: InvoiceResponse) => string;\n\n  protected invoices: InvoiceResponse[] = [];\n  protected loading = true;\n\n  constructor(private fileDownloadService: FileDownloadService) {}\n\n  runExport = async (invoiceId: string): Promise<void> => {\n    const blobData = await this.getClientInvoiceReport(invoiceId);\n    let fileName = \"report.csv\";\n    if (this.getClientInvoiceReportName) {\n      const invoice = this.invoices.find((invoice) => invoice.id === invoiceId);\n      fileName = this.getClientInvoiceReportName(invoice);\n    }\n    this.fileDownloadService.download({\n      fileName,\n      blobData,\n      blobOptions: {\n        type: \"text/csv\",\n      },\n    });\n  };\n\n  async ngOnInit(): Promise<void> {\n    if (this.startWith) {\n      this.invoices = this.startWith.invoices;\n    } else if (this.getInvoices) {\n      const response = await this.getInvoices();\n      this.invoices = response.invoices;\n    }\n    this.loading = false;\n  }\n\n  expandInvoiceStatus = (\n    invoice: InvoiceResponse,\n  ): \"open\" | \"unpaid\" | \"paid\" | \"uncollectible\" => {\n    switch (invoice.status) {\n      case \"open\": {\n        const dueDate = new Date(invoice.dueDate);\n        return dueDate < new Date() ? \"unpaid\" : invoice.status;\n      }\n      case \"paid\":\n      case \"uncollectible\": {\n        return invoice.status;\n      }\n    }\n  };\n}\n","import { Component } from \"@angular/core\";\n\nimport { svgIcon } from \"@bitwarden/components\";\n\nconst partnerTrustIcon = svgIcon`\n<svg width=\"120\" height=\"120\" viewBox=\"0 0 120 120\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path d=\"M69 43.6511C70.1025 44.1328 71.32 44.4 72.6 44.4C77.5706 44.4 81.6 40.3706 81.6 35.4C81.6 30.4294 77.5706 26.4 72.6 26.4C67.6295 26.4 63.6 30.4294 63.6 35.4C63.6 36.0164 63.662 36.6184 63.7801 37.2\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M69 44.8416C70.1522 44.553 71.3559 44.4 72.5943 44.4C80.1533 44.4 86.4194 50.0998 87.5598 57.5529C87.7996 59.1204 86.9541 60 85.3451 60C79.7231 60 75.6474 60 71.4 60\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M51 43.6511C49.8976 44.1328 48.68 44.4 47.4 44.4C42.4295 44.4 38.4 40.3706 38.4 35.4C38.4 30.4294 42.4295 26.4 47.4 26.4C52.3706 26.4 56.4 30.4294 56.4 35.4C56.4 36.0164 56.338 36.6184 56.22 37.2\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M51 44.8416C49.8478 44.553 48.6441 44.4 47.4057 44.4C39.8467 44.4 33.5806 50.0998 32.4402 57.5529C32.2004 59.1204 33.0459 60 34.6549 60C40.2769 60 44.3526 60 48.6 60\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <circle cx=\"60\" cy=\"45.6\" r=\"9\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M72.7451 70.2C62.3773 70.2 57.2682 70.2 46.6437 70.2C45.3864 70.2 44.8665 68.8141 45.0289 67.7529C46.1693 60.2998 52.4354 54.6 59.9943 54.6C67.5533 54.6 73.8194 60.2998 74.9598 67.7529C75.1996 69.3204 74.3541 70.2 72.7451 70.2Z\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M73.557 103.195C74.3197 104.319 74.3197 105.443 73.557 106.272C73.1462 106.745 72.3835 107.041 71.738 107.041C71.6242 107.041 71.5013 107.032 71.3801 107.011C71.3345 108.505 70.5896 109.217 70.0948 109.467C69.7427 109.703 69.3318 109.822 68.9212 109.822C68.8703 109.822 68.8204 109.82 68.7714 109.816C68.7035 109.811 68.6373 109.803 68.5729 109.792C68.5559 110.332 68.3591 110.827 67.9823 111.242C67.6302 111.833 66.926 112.129 66.2808 112.129C66.1045 112.129 65.9874 112.129 65.8112 112.07C65.7753 112.058 65.7381 112.044 65.6997 112.028C65.5215 112.624 65.0169 113.105 64.227 113.431C63.9924 113.49 63.8162 113.49 63.5815 113.49C62.4417 113.49 60.9477 112.633 60.0352 112.028M55.5 88.7567C53.6867 88.9991 51.6246 89.9258 50.4378 90.4744C50.2985 90.5095 50.1797 90.5655 50.0693 90.6176L50.0687 90.6179C49.9937 90.6534 49.9223 90.6871 49.851 90.711C49.5281 90.5373 49.0708 90.3955 48.4995 90.2184C47.5139 89.9127 46.1886 89.5016 44.6287 88.6402C44.3941 88.5219 44.0419 88.581 43.8657 88.8769L37.6461 99.5268C37.4699 99.8226 37.5287 100.178 37.822 100.355L46.8 105.019\" stroke=\"#CED4DC\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M73.7624 103.371C73.6448 103.371 73.4683 103.313 73.3507 103.195L67.7625 97.9108C63.1743 96.7365 61.8803 93.9181 61.4097 92.8024C61.0567 92.8612 60.5273 92.9199 59.645 92.9199C59.2332 93.2135 58.1744 94.0355 56.7039 94.7988C55.3509 95.5034 53.998 95.2098 53.4098 94.2117C53.0568 93.5658 52.998 92.8024 53.351 92.1566C55.7039 87.5766 58.4685 86.6372 60.3509 86.6372C61.4685 86.6372 62.1744 86.9895 62.2332 86.9895L69.2919 90.1015L75.7624 87.1656C75.8801 87.1069 76.0565 87.1069 76.233 87.1656C76.4095 87.2243 76.5271 87.3418 76.5859 87.4592L82.6447 97.8521C82.7623 98.1457 82.6447 98.4393 82.4094 98.6154L74.0565 103.313C73.9389 103.371 73.8801 103.371 73.7624 103.371Z\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M46.6097 107.206C47.0221 108.443 48.394 109.005 49.044 109.195C49.217 109.923 49.5794 110.391 49.9178 110.692C50.5086 111.164 51.1584 111.342 51.7491 111.342C51.9248 111.342 52.0796 111.321 52.2135 111.291C52.2516 111.368 52.2936 111.444 52.3399 111.519C52.8716 112.346 53.8168 112.818 55.2346 112.937C55.3143 112.937 55.3897 112.919 55.4573 112.887C56.0276 113.588 56.9845 114 57.893 114C58.7791 114 59.488 113.527 59.7243 112.759C60.0787 111.223 59.9606 109.628 59.7243 108.742C59.5602 108.031 59.1935 106.763 57.6392 106.673C57.4017 106.121 56.803 105.205 55.4709 105.08C55.1879 105.053 54.9235 105.086 54.6774 105.164C54.4496 104.62 54.0132 103.917 53.2851 103.662C52.7534 103.485 51.9264 103.662 51.1584 104.134C51.1181 104.161 51.0782 104.187 51.0387 104.215C50.6899 103.795 50.1003 103.263 49.3271 103.189C48.6182 103.13 48.0275 103.485 47.4367 104.193C46.5506 105.316 46.3143 106.32 46.6097 107.206Z\" stroke=\"#CED4DC\" stroke-width=\"2\"/>\n    <path d=\"M51.9 104.4C51.5709 104.603 49.9229 105.531 49.5 106.8C49.2 107.7 49.5 108.9 49.8 109.5\" stroke=\"#CED4DC\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M54.6703 105.317C54.1767 105.571 53.0709 106.485 52.597 108.109C52.1231 109.734 52.3995 110.816 52.597 111.155\" stroke=\"#CED4DC\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M57.2 107.263C56.7063 107.517 56.051 108.431 55.7104 109.598C55.3697 110.766 55.5129 112.179 55.7104 112.517\" stroke=\"#CED4DC\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M65.5675 111.739C64.0108 110.96 61.2866 108.431 61.2866 108.431\" stroke=\"#CED4DC\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M68.2914 109.598C66.1686 108.591 62.4538 105.317 62.4538 105.317\" stroke=\"#CED4DC\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M71.4049 106.874C68.9991 105.775 64.789 102.204 64.789 102.204\" stroke=\"#CED4DC\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path d=\"M86.9971 91.8C95.5145 86.0616 101.962 77.753 105.392 68.094C108.822 58.435 109.055 47.9345 106.056 38.134C103.057 28.3336 96.9838 19.7494 88.7289 13.6419C80.474 7.53438 70.4717 4.22518 60.1907 4.20014C49.9096 4.1751 39.8913 7.43554 31.6065 13.5028C23.3217 19.5701 17.2069 28.1245 14.1599 37.9102C11.1128 47.696 11.294 58.1975 14.6768 67.8731C18.0596 77.5486 24.4658 85.8885 32.955 91.6684\" stroke=\"#CED4DC\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M84.6771 88.2C92.4374 82.9725 98.3114 75.4037 101.437 66.6048C104.562 57.8059 104.774 48.2403 102.042 39.3125C99.3091 30.3847 93.7761 22.5649 86.255 17.0012C78.7338 11.4375 69.6207 8.42293 60.2535 8.40012C50.8863 8.37731 41.7585 11.3474 34.2101 16.8745C26.6618 22.4015 21.0905 30.1942 18.3143 39.1086C15.5381 48.023 15.7032 57.5895 18.7853 66.4035C21.8674 75.2176 27.7042 82.8149 35.4388 88.0801\" stroke=\"#CED4DC\" stroke-linecap=\"round\"/>\n</svg>\n`;\n\n@Component({\n  selector: \"app-no-invoices\",\n  template: `<div class=\"tw-flex tw-flex-col tw-items-center tw-text-info\">\n    <bit-icon [icon]=\"icon\"></bit-icon>\n    <p class=\"tw-mt-4\">{{ \"noInvoicesToList\" | i18n }}</p>\n  </div>`,\n})\nexport class NoInvoicesComponent {\n  icon = partnerTrustIcon;\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\">\n    <div class=\"tw-col-span-6\">\n      <bit-form-field disableMargin>\n        <bit-label>{{ \"country\" | i18n }}</bit-label>\n        <bit-select formControlName=\"country\">\n          <bit-option\n            *ngFor=\"let country of countries\"\n            [value]=\"country.value\"\n            [disabled]=\"country.disabled\"\n            [label]=\"country.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n    </div>\n    <div class=\"tw-col-span-6\">\n      <bit-form-field disableMargin>\n        <bit-label>{{ \"zipPostalCode\" | i18n }}</bit-label>\n        <input bitInput type=\"text\" formControlName=\"postalCode\" autocomplete=\"postal-code\" />\n      </bit-form-field>\n    </div>\n    <ng-container *ngIf=\"isTaxSupported\">\n      <div class=\"tw-col-span-6\">\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"address1\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"line1\" autocomplete=\"address-line1\" />\n        </bit-form-field>\n      </div>\n      <div class=\"tw-col-span-6\">\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"address2\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"line2\" autocomplete=\"address-line2\" />\n        </bit-form-field>\n      </div>\n      <div class=\"tw-col-span-6\">\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"cityTown\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"city\" autocomplete=\"address-level2\" />\n        </bit-form-field>\n      </div>\n      <div class=\"tw-col-span-6\">\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"stateProvince\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"state\" autocomplete=\"address-level1\" />\n        </bit-form-field>\n      </div>\n      <div class=\"tw-col-span-6\" *ngIf=\"showTaxIdField\">\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"taxIdNumber\" | i18n }}</bit-label>\n          <input bitInput type=\"text\" formControlName=\"taxId\" />\n        </bit-form-field>\n      </div>\n    </ng-container>\n    <div class=\"tw-col-span-12\" *ngIf=\"!!onSubmit\">\n      <button bitButton bitFormButton buttonType=\"primary\" type=\"submit\">\n        {{ \"submit\" | i18n }}\n      </button>\n    </div>\n  </div>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, Validators } from \"@angular/forms\";\nimport { Subject, takeUntil } from \"rxjs\";\nimport { debounceTime } from \"rxjs/operators\";\n\nimport { TaxServiceAbstraction } from \"@bitwarden/common/billing/abstractions/tax.service.abstraction\";\nimport { CountryListItem, TaxInformation } from \"@bitwarden/common/billing/models/domain\";\n\n@Component({\n  selector: \"app-manage-tax-information\",\n  templateUrl: \"./manage-tax-information.component.html\",\n})\nexport class ManageTaxInformationComponent implements OnInit, OnDestroy {\n  @Input() startWith: TaxInformation;\n  @Input() onSubmit?: (taxInformation: TaxInformation) => Promise<void>;\n  @Input() showTaxIdField: boolean = true;\n\n  /**\n   * Emits when the tax information has changed.\n   */\n  @Output() taxInformationChanged = new EventEmitter<TaxInformation>();\n\n  /**\n   * Emits when the tax information has been updated.\n   */\n  @Output() taxInformationUpdated = new EventEmitter();\n\n  private taxInformation: TaxInformation;\n\n  protected formGroup = this.formBuilder.group({\n    country: [\"\", Validators.required],\n    postalCode: [\"\", Validators.required],\n    taxId: \"\",\n    line1: \"\",\n    line2: \"\",\n    city: \"\",\n    state: \"\",\n  });\n\n  protected isTaxSupported: boolean;\n\n  private destroy$ = new Subject<void>();\n\n  protected readonly countries: CountryListItem[] = this.taxService.getCountries();\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private taxService: TaxServiceAbstraction,\n  ) {}\n\n  getTaxInformation(): TaxInformation {\n    return this.taxInformation;\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n    await this.onSubmit?.(this.taxInformation);\n    this.taxInformationUpdated.emit();\n  };\n\n  validate(): boolean {\n    if (this.formGroup.dirty) {\n      this.formGroup.markAllAsTouched();\n      return this.formGroup.valid;\n    } else {\n      return this.formGroup.valid;\n    }\n  }\n\n  markAllAsTouched() {\n    this.formGroup.markAllAsTouched();\n  }\n\n  async ngOnInit() {\n    if (this.startWith) {\n      this.formGroup.controls.country.setValue(this.startWith.country);\n      this.formGroup.controls.postalCode.setValue(this.startWith.postalCode);\n\n      this.isTaxSupported =\n        this.startWith && this.startWith.country\n          ? await this.taxService.isCountrySupported(this.startWith.country)\n          : false;\n\n      if (this.isTaxSupported) {\n        this.formGroup.controls.taxId.setValue(this.startWith.taxId);\n        this.formGroup.controls.line1.setValue(this.startWith.line1);\n        this.formGroup.controls.line2.setValue(this.startWith.line2);\n        this.formGroup.controls.city.setValue(this.startWith.city);\n        this.formGroup.controls.state.setValue(this.startWith.state);\n      }\n    }\n\n    this.formGroup.valueChanges.pipe(takeUntil(this.destroy$)).subscribe((values) => {\n      this.taxInformation = {\n        country: values.country,\n        postalCode: values.postalCode,\n        taxId: values.taxId,\n        line1: values.line1,\n        line2: values.line2,\n        city: values.city,\n        state: values.state,\n      };\n    });\n\n    this.formGroup.controls.country.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe((country: string) => {\n        this.taxService\n          .isCountrySupported(country)\n          .then((isSupported) => (this.isTaxSupported = isSupported))\n          .catch(() => (this.isTaxSupported = false))\n          .finally(() => {\n            if (!this.isTaxSupported) {\n              this.formGroup.controls.taxId.setValue(null);\n              this.formGroup.controls.line1.setValue(null);\n              this.formGroup.controls.line2.setValue(null);\n              this.formGroup.controls.city.setValue(null);\n              this.formGroup.controls.state.setValue(null);\n            }\n            if (this.taxInformationChanged) {\n              this.taxInformationChanged.emit(this.taxInformation);\n            }\n          });\n      });\n\n    this.formGroup.controls.postalCode.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe(() => {\n        if (this.taxInformationChanged) {\n          this.taxInformationChanged.emit(this.taxInformation);\n        }\n      });\n\n    this.formGroup.controls.taxId.valueChanges\n      .pipe(debounceTime(1000), takeUntil(this.destroy$))\n      .subscribe(() => {\n        if (this.taxInformationChanged) {\n          this.taxInformationChanged.emit(this.taxInformation);\n        }\n      });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<bit-callout [icon]=\"icon\" [title]=\"title\" [type]=\"$any(type)\" [useAlertRole]=\"useAlertRole\">\n  <div class=\"tw-pl-7 tw-m-0\" *ngIf=\"enforcedPolicyOptions\">\n    {{ enforcedPolicyMessage }}\n    <ul>\n      <li *ngIf=\"enforcedPolicyOptions?.minComplexity > 0\">\n        {{ \"policyInEffectMinComplexity\" | i18n: getPasswordScoreAlertDisplay() }}\n      </li>\n      <li *ngIf=\"enforcedPolicyOptions?.minLength > 0\">\n        {{ \"policyInEffectMinLength\" | i18n: enforcedPolicyOptions?.minLength.toString() }}\n      </li>\n      <li *ngIf=\"enforcedPolicyOptions?.requireUpper\">\n        {{ \"policyInEffectUppercase\" | i18n }}\n      </li>\n      <li *ngIf=\"enforcedPolicyOptions?.requireLower\">\n        {{ \"policyInEffectLowercase\" | i18n }}\n      </li>\n      <li *ngIf=\"enforcedPolicyOptions?.requireNumbers\">\n        {{ \"policyInEffectNumbers\" | i18n }}\n      </li>\n      <li *ngIf=\"enforcedPolicyOptions?.requireSpecial\">\n        {{ \"policyInEffectSpecial\" | i18n: \"!@#$%^&*\" }}\n      </li>\n    </ul>\n  </div>\n  <ng-content></ng-content>\n</bit-callout>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CalloutTypes } from \"@bitwarden/components\";\n\n/**\n * @deprecated use the CL's `CalloutComponent` instead\n */\n@Component({\n  selector: \"app-callout\",\n  templateUrl: \"callout.component.html\",\n})\nexport class DeprecatedCalloutComponent implements OnInit {\n  @Input() type: CalloutTypes = \"info\";\n  @Input() icon: string;\n  @Input() title: string;\n  @Input() enforcedPolicyOptions: MasterPasswordPolicyOptions;\n  @Input() enforcedPolicyMessage: string;\n  @Input() useAlertRole = false;\n\n  calloutStyle: string;\n\n  constructor(private i18nService: I18nService) {}\n\n  ngOnInit() {\n    this.calloutStyle = this.type;\n\n    if (this.enforcedPolicyMessage === undefined) {\n      this.enforcedPolicyMessage = this.i18nService.t(\"masterPasswordPolicyInEffect\");\n    }\n  }\n\n  getPasswordScoreAlertDisplay() {\n    if (this.enforcedPolicyOptions == null) {\n      return \"\";\n    }\n\n    let str: string;\n    switch (this.enforcedPolicyOptions.minComplexity) {\n      case 4:\n        str = this.i18nService.t(\"strong\");\n        break;\n      case 3:\n        str = this.i18nService.t(\"good\");\n        break;\n      default:\n        str = this.i18nService.t(\"weak\");\n        break;\n    }\n    return str + \" (\" + this.enforcedPolicyOptions.minComplexity + \")\";\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, Input, OnInit, Renderer2 } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appA11yTitle]\",\n})\nexport class A11yTitleDirective implements OnInit {\n  @Input() set appA11yTitle(title: string) {\n    this.title = title;\n    this.setAttributes();\n  }\n\n  private title: string;\n  private originalTitle: string | null;\n  private originalAriaLabel: string | null;\n\n  constructor(\n    private el: ElementRef,\n    private renderer: Renderer2,\n  ) {}\n\n  ngOnInit() {\n    this.originalTitle = this.el.nativeElement.getAttribute(\"title\");\n    this.originalAriaLabel = this.el.nativeElement.getAttribute(\"aria-label\");\n    this.setAttributes();\n  }\n\n  private setAttributes() {\n    if (this.originalTitle === null) {\n      this.renderer.setAttribute(this.el.nativeElement, \"title\", this.title);\n    }\n    if (this.originalAriaLabel === null) {\n      this.renderer.setAttribute(this.el.nativeElement, \"aria-label\", this.title);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, Input, OnChanges } from \"@angular/core\";\n\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\n\n/**\n * Provides error handling, in particular for any error returned by the server in an api call.\n * Attach it to a <form> element and provide the name of the class property that will hold the api call promise.\n * e.g. <form [appApiAction]=\"this.formPromise\">\n * Any errors/rejections that occur will be intercepted and displayed as error toasts.\n *\n * @deprecated Use the CL's {@link BitSubmitDirective} instead\n */\n@Directive({\n  selector: \"[appApiAction]\",\n})\nexport class ApiActionDirective implements OnChanges {\n  @Input() appApiAction: Promise<any>;\n\n  constructor(\n    private el: ElementRef,\n    private validationService: ValidationService,\n    private logService: LogService,\n  ) {}\n\n  ngOnChanges(changes: any) {\n    if (this.appApiAction == null || this.appApiAction.then == null) {\n      return;\n    }\n\n    this.el.nativeElement.loading = true;\n\n    this.appApiAction.then(\n      (response: any) => {\n        this.el.nativeElement.loading = false;\n      },\n      (e: any) => {\n        this.el.nativeElement.loading = false;\n\n        if ((e as ErrorResponse).captchaRequired) {\n          this.logService.error(\"Captcha required error response: \" + e.getSingleMessage());\n          return;\n        }\n        this.logService?.error(`Received API exception:`, e);\n        this.validationService.showError(e);\n      },\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, HostListener, Input } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ToastService, ToastVariant } from \"@bitwarden/components\";\n\n@Directive({\n  selector: \"[appCopyClick]\",\n})\nexport class CopyClickDirective {\n  private _showToast = false;\n  private toastVariant: ToastVariant = \"success\";\n\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n  ) {}\n\n  @Input(\"appCopyClick\") valueToCopy = \"\";\n\n  /**\n   * When set, the toast displayed will show `<valueLabel> copied`\n   * instead of the default messaging.\n   */\n  @Input() valueLabel: string;\n\n  /**\n   * When set without a value, a success toast will be shown when the value is copied\n   * @example\n   * ```html\n   *  <app-component [appCopyClick]=\"value to copy\" showToast/></app-component>\n   * ```\n   * When set with a value, a toast with the specified variant will be shown when the value is copied\n   *\n   * @example\n   * ```html\n   *  <app-component [appCopyClick]=\"value to copy\" showToast=\"info\"/></app-component>\n   * ```\n   */\n  @Input() set showToast(value: ToastVariant | \"\") {\n    // When the `showToast` is set without a value, an empty string will be passed\n    if (value === \"\") {\n      this._showToast = true;\n    } else {\n      this._showToast = true;\n      this.toastVariant = value;\n    }\n  }\n\n  @HostListener(\"click\") onClick() {\n    this.platformUtilsService.copyToClipboard(this.valueToCopy);\n\n    if (this._showToast) {\n      const message = this.valueLabel\n        ? this.i18nService.t(\"valueCopied\", this.valueLabel)\n        : this.i18nService.t(\"copySuccessful\");\n\n      this.toastService.showToast({\n        variant: this.toastVariant,\n        title: null,\n        message,\n      });\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, Input, OnInit, Renderer2 } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appInputVerbatim]\",\n})\nexport class InputVerbatimDirective implements OnInit {\n  @Input() set appInputVerbatim(condition: boolean | string) {\n    this.disableComplete = condition === \"\" || condition === true;\n  }\n\n  private disableComplete: boolean;\n\n  constructor(\n    private el: ElementRef,\n    private renderer: Renderer2,\n  ) {}\n\n  ngOnInit() {\n    if (this.disableComplete && !this.el.nativeElement.hasAttribute(\"autocomplete\")) {\n      this.renderer.setAttribute(this.el.nativeElement, \"autocomplete\", \"off\");\n    }\n    if (!this.el.nativeElement.hasAttribute(\"autocapitalize\")) {\n      this.renderer.setAttribute(this.el.nativeElement, \"autocapitalize\", \"none\");\n    }\n    if (!this.el.nativeElement.hasAttribute(\"autocorrect\")) {\n      this.renderer.setAttribute(this.el.nativeElement, \"autocorrect\", \"none\");\n    }\n    if (!this.el.nativeElement.hasAttribute(\"spellcheck\")) {\n      this.renderer.setAttribute(this.el.nativeElement, \"spellcheck\", \"false\");\n    }\n    if (!this.el.nativeElement.hasAttribute(\"inputmode\")) {\n      this.renderer.setAttribute(this.el.nativeElement, \"inputmode\", \"verbatim\");\n    }\n  }\n}\n","import { Directive, HostListener } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appStopClick]\",\n})\nexport class StopClickDirective {\n  @HostListener(\"click\", [\"$event\"]) onClick($event: MouseEvent) {\n    $event.preventDefault();\n  }\n}\n","import { Directive, HostListener } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appStopProp]\",\n})\nexport class StopPropDirective {\n  @HostListener(\"click\", [\"$event\"]) onClick($event: MouseEvent) {\n    $event.stopPropagation();\n  }\n}\n","<div\n  class=\"tw-mb-1 tw-min-w-[--bit-toast-width] tw-text-main tw-flex tw-flex-col tw-justify-between tw-rounded-md tw-pointer-events-auto tw-cursor-default tw-overflow-hidden tw-shadow-lg {{\n    bgColor\n  }}\"\n>\n  <div class=\"tw-flex tw-items-center tw-gap-4 tw-px-2 tw-pb-1 tw-pt-2\">\n    <i aria-hidden=\"true\" class=\"bwi tw-text-xl tw-py-1.5 tw-px-2.5 {{ iconClass }}\"></i>\n    <div>\n      <span class=\"tw-sr-only\">{{ variant | i18n }}</span>\n      <p *ngIf=\"title\" data-testid=\"toast-title\" class=\"tw-font-semibold tw-mb-0\">{{ title }}</p>\n      <p\n        bitTypography=\"body2\"\n        *ngFor=\"let m of messageArray\"\n        data-testid=\"toast-message\"\n        class=\"tw-mb-2 last:tw-mb-0\"\n      >\n        {{ m }}\n      </p>\n    </div>\n    <!-- Overriding hover and focus-visible colors for a11y against colored background -->\n    <button\n      class=\"tw-ml-auto hover:tw-border-text-main focus-visible:before:tw-ring-text-main\"\n      bitIconButton=\"bwi-close\"\n      buttonType=\"main\"\n      type=\"button\"\n      (click)=\"this.onClose.emit()\"\n    ></button>\n  </div>\n  <div class=\"tw-h-1 tw-w-full tw-bg-text-main/30\" [style.width]=\"progressWidth + '%'\"></div>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { IconButtonModule } from \"../icon-button\";\nimport { SharedModule } from \"../shared\";\nimport { TypographyModule } from \"../typography\";\n\nexport type ToastVariant = \"success\" | \"error\" | \"info\" | \"warning\";\n\nconst variants: Record<ToastVariant, { icon: string; bgColor: string }> = {\n  success: {\n    icon: \"bwi-check-circle\",\n    bgColor: \"tw-bg-success-100\",\n  },\n  error: {\n    icon: \"bwi-error\",\n    bgColor: \"tw-bg-danger-100\",\n  },\n  info: {\n    icon: \"bwi-info-circle\",\n    bgColor: \"tw-bg-info-100\",\n  },\n  warning: {\n    icon: \"bwi-exclamation-triangle\",\n    bgColor: \"tw-bg-warning-100\",\n  },\n};\n\n@Component({\n  selector: \"bit-toast\",\n  templateUrl: \"toast.component.html\",\n  standalone: true,\n  imports: [SharedModule, IconButtonModule, TypographyModule],\n})\nexport class ToastComponent {\n  @Input() variant: ToastVariant = \"info\";\n\n  /**\n   * The message to display\n   *\n   * Pass an array to render multiple paragraphs.\n   **/\n  @Input({ required: true })\n  message: string | string[];\n\n  /** An optional title to display over the message. */\n  @Input() title: string;\n\n  /**\n   * The percent width of the progress bar, from 0-100\n   **/\n  @Input() progressWidth = 0;\n\n  /** Emits when the user presses the close button */\n  @Output() onClose = new EventEmitter<void>();\n\n  protected get iconClass(): string {\n    return variants[this.variant].icon;\n  }\n\n  protected get bgColor(): string {\n    return variants[this.variant].bgColor;\n  }\n\n  protected get messageArray(): string[] {\n    return Array.isArray(this.message) ? this.message : [this.message];\n  }\n}\n","import { animate, state, style, transition, trigger } from \"@angular/animations\";\nimport { Component } from \"@angular/core\";\nimport { Toast as BaseToastrComponent } from \"ngx-toastr\";\n\nimport { ToastComponent } from \"./toast.component\";\n\n@Component({\n  template: `\n    <bit-toast\n      [title]=\"options?.payload?.title\"\n      [variant]=\"options?.payload?.variant\"\n      [message]=\"options?.payload?.message\"\n      [progressWidth]=\"width()\"\n      (onClose)=\"remove()\"\n    ></bit-toast>\n  `,\n  animations: [\n    trigger(\"flyInOut\", [\n      state(\"inactive\", style({ opacity: 0 })),\n      state(\"active\", style({ opacity: 1 })),\n      state(\"removed\", style({ opacity: 0 })),\n      transition(\"inactive => active\", animate(\"{{ easeTime }}ms {{ easing }}\")),\n      transition(\"active => removed\", animate(\"{{ easeTime }}ms {{ easing }}\")),\n    ]),\n  ],\n  preserveWhitespaces: false,\n  standalone: true,\n  imports: [ToastComponent],\n})\nexport class BitwardenToastrComponent extends BaseToastrComponent {}\n","import { ModuleWithProviders, NgModule } from \"@angular/core\";\nimport { DefaultNoComponentGlobalConfig, GlobalConfig, TOAST_CONFIG } from \"ngx-toastr\";\n\nimport { BitwardenToastrComponent } from \"./toastr.component\";\n\n@NgModule({\n  imports: [BitwardenToastrComponent],\n  exports: [BitwardenToastrComponent],\n})\nexport class ToastModule {\n  static forRoot(config: Partial<GlobalConfig> = {}): ModuleWithProviders<ToastModule> {\n    return {\n      ngModule: ToastModule,\n      providers: [\n        {\n          provide: TOAST_CONFIG,\n          useValue: {\n            default: BitwardenToastrGlobalConfig,\n            config: config,\n          },\n        },\n      ],\n    };\n  }\n}\n\nexport const BitwardenToastrGlobalConfig: GlobalConfig = {\n  ...DefaultNoComponentGlobalConfig,\n  toastComponent: BitwardenToastrComponent,\n  tapToDismiss: false,\n  timeOut: 5000,\n  extendedTimeOut: 2000,\n  maxOpened: 5,\n  autoDismiss: true,\n  progressBar: true,\n};\n","import { Pipe } from \"@angular/core\";\n\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Pipe({\n  name: \"fingerprint\",\n})\nexport class FingerprintPipe {\n  constructor(private keyService: KeyService) {}\n\n  async transform(publicKey: string | Uint8Array, fingerprintMaterial: string): Promise<string> {\n    try {\n      if (typeof publicKey === \"string\") {\n        publicKey = Utils.fromB64ToArray(publicKey);\n      }\n\n      const fingerprint = await this.keyService.getFingerprint(fingerprintMaterial, publicKey);\n\n      if (fingerprint != null) {\n        return fingerprint.join(\"-\");\n      }\n\n      return \"\";\n    } catch {\n      return \"\";\n    }\n  }\n}\n","import { CommonModule, DatePipe } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { FormsModule, ReactiveFormsModule } from \"@angular/forms\";\n\nimport {\n  AddAccountCreditDialogComponent,\n  InvoicesComponent,\n  NoInvoicesComponent,\n  ManageTaxInformationComponent,\n} from \"@bitwarden/angular/billing/components\";\nimport {\n  AsyncActionsModule,\n  AutofocusDirective,\n  ButtonModule,\n  CalloutModule,\n  CheckboxModule,\n  DialogModule,\n  FormFieldModule,\n  IconButtonModule,\n  IconModule,\n  LinkModule,\n  MenuModule,\n  RadioButtonModule,\n  SelectModule,\n  TableModule,\n  ToastModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { TwoFactorIconComponent } from \"./auth/components/two-factor-icon.component\";\nimport { DeprecatedCalloutComponent } from \"./components/callout.component\";\nimport { A11yInvalidDirective } from \"./directives/a11y-invalid.directive\";\nimport { A11yTitleDirective } from \"./directives/a11y-title.directive\";\nimport { ApiActionDirective } from \"./directives/api-action.directive\";\nimport { BoxRowDirective } from \"./directives/box-row.directive\";\nimport { CopyClickDirective } from \"./directives/copy-click.directive\";\nimport { CopyTextDirective } from \"./directives/copy-text.directive\";\nimport { FallbackSrcDirective } from \"./directives/fallback-src.directive\";\nimport { IfFeatureDirective } from \"./directives/if-feature.directive\";\nimport { InputStripSpacesDirective } from \"./directives/input-strip-spaces.directive\";\nimport { InputVerbatimDirective } from \"./directives/input-verbatim.directive\";\nimport { LaunchClickDirective } from \"./directives/launch-click.directive\";\nimport { NotPremiumDirective } from \"./directives/not-premium.directive\";\nimport { StopClickDirective } from \"./directives/stop-click.directive\";\nimport { StopPropDirective } from \"./directives/stop-prop.directive\";\nimport { TextDragDirective } from \"./directives/text-drag.directive\";\nimport { TrueFalseValueDirective } from \"./directives/true-false-value.directive\";\nimport { CreditCardNumberPipe } from \"./pipes/credit-card-number.pipe\";\nimport { PluralizePipe } from \"./pipes/pluralize.pipe\";\nimport { SearchCiphersPipe } from \"./pipes/search-ciphers.pipe\";\nimport { SearchPipe } from \"./pipes/search.pipe\";\nimport { UserNamePipe } from \"./pipes/user-name.pipe\";\nimport { UserTypePipe } from \"./pipes/user-type.pipe\";\nimport { EllipsisPipe } from \"./platform/pipes/ellipsis.pipe\";\nimport { FingerprintPipe } from \"./platform/pipes/fingerprint.pipe\";\nimport { I18nPipe } from \"./platform/pipes/i18n.pipe\";\nimport { PasswordStrengthComponent } from \"./tools/password-strength/password-strength.component\";\nimport { IconComponent } from \"./vault/components/icon.component\";\n\n@NgModule({\n  imports: [\n    ToastModule.forRoot({\n      maxOpened: 5,\n      autoDismiss: true,\n      closeButton: true,\n    }),\n    CommonModule,\n    FormsModule,\n    ReactiveFormsModule,\n    AsyncActionsModule,\n    RadioButtonModule,\n    FormFieldModule,\n    SelectModule,\n    ButtonModule,\n    CalloutModule,\n    CheckboxModule,\n    DialogModule,\n    TypographyModule,\n    TableModule,\n    MenuModule,\n    IconButtonModule,\n    IconModule,\n    LinkModule,\n    IconModule,\n    TextDragDirective,\n  ],\n  declarations: [\n    A11yInvalidDirective,\n    A11yTitleDirective,\n    ApiActionDirective,\n    AutofocusDirective,\n    BoxRowDirective,\n    DeprecatedCalloutComponent,\n    CopyTextDirective,\n    CreditCardNumberPipe,\n    EllipsisPipe,\n    FallbackSrcDirective,\n    I18nPipe,\n    IconComponent,\n    InputStripSpacesDirective,\n    InputVerbatimDirective,\n    NotPremiumDirective,\n    SearchCiphersPipe,\n    SearchPipe,\n    StopClickDirective,\n    StopPropDirective,\n    TrueFalseValueDirective,\n    CopyClickDirective,\n    LaunchClickDirective,\n    UserNamePipe,\n    PasswordStrengthComponent,\n    UserTypePipe,\n    IfFeatureDirective,\n    FingerprintPipe,\n    AddAccountCreditDialogComponent,\n    InvoicesComponent,\n    NoInvoicesComponent,\n    ManageTaxInformationComponent,\n    TwoFactorIconComponent,\n  ],\n  exports: [\n    A11yInvalidDirective,\n    A11yTitleDirective,\n    ApiActionDirective,\n    AutofocusDirective,\n    ToastModule,\n    BoxRowDirective,\n    DeprecatedCalloutComponent,\n    CopyTextDirective,\n    CreditCardNumberPipe,\n    EllipsisPipe,\n    FallbackSrcDirective,\n    I18nPipe,\n    IconComponent,\n    InputStripSpacesDirective,\n    InputVerbatimDirective,\n    NotPremiumDirective,\n    SearchCiphersPipe,\n    SearchPipe,\n    StopClickDirective,\n    StopPropDirective,\n    TrueFalseValueDirective,\n    CopyClickDirective,\n    LaunchClickDirective,\n    UserNamePipe,\n    PasswordStrengthComponent,\n    UserTypePipe,\n    IfFeatureDirective,\n    FingerprintPipe,\n    AddAccountCreditDialogComponent,\n    InvoicesComponent,\n    NoInvoicesComponent,\n    ManageTaxInformationComponent,\n    TwoFactorIconComponent,\n    TextDragDirective,\n  ],\n  providers: [\n    CreditCardNumberPipe,\n    DatePipe,\n    I18nPipe,\n    SearchPipe,\n    UserNamePipe,\n    UserTypePipe,\n    FingerprintPipe,\n    PluralizePipe,\n  ],\n})\nexport class JslibModule {}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\ninterface CardRuleEntry {\n  cardLength: number;\n  blocks: number[];\n}\n\n// See https://baymard.com/checkout-usability/credit-card-patterns for\n// all possible credit card spacing patterns. For now, we just handle\n// the below.\nconst numberFormats: Record<string, CardRuleEntry[]> = {\n  Visa: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n  Mastercard: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n  Maestro: [\n    { cardLength: 16, blocks: [4, 4, 4, 4] },\n    { cardLength: 13, blocks: [4, 4, 5] },\n    { cardLength: 15, blocks: [4, 6, 5] },\n    { cardLength: 19, blocks: [4, 4, 4, 4, 3] },\n  ],\n  Discover: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n  \"Diners Club\": [{ cardLength: 14, blocks: [4, 6, 4] }],\n  JCB: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n  UnionPay: [\n    { cardLength: 16, blocks: [4, 4, 4, 4] },\n    { cardLength: 19, blocks: [6, 13] },\n  ],\n  Amex: [{ cardLength: 15, blocks: [4, 6, 5] }],\n  Other: [{ cardLength: 16, blocks: [4, 4, 4, 4] }],\n};\n\n@Pipe({ name: \"creditCardNumber\" })\nexport class CreditCardNumberPipe implements PipeTransform {\n  transform(creditCardNumber: string, brand: string): string {\n    let rules = numberFormats[brand];\n\n    if (rules == null) {\n      rules = numberFormats[\"Other\"];\n    }\n\n    const cardLength = creditCardNumber.length;\n\n    let matchingRule = rules.find((r) => r.cardLength == cardLength);\n    if (matchingRule == null) {\n      matchingRule = rules[0];\n    }\n\n    const blocks = matchingRule.blocks;\n\n    const chunks: string[] = [];\n    let total = 0;\n\n    blocks.forEach((c) => {\n      chunks.push(creditCardNumber.slice(total, total + c));\n      total += c;\n    });\n\n    // Append the remaining part\n    if (cardLength > total) {\n      chunks.push(creditCardNumber.slice(total));\n    }\n\n    return chunks.join(\" \");\n  }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\n@Pipe({\n  name: \"pluralize\",\n  standalone: true,\n})\nexport class PluralizePipe implements PipeTransform {\n  transform(count: number, singular: string, plural: string): string {\n    return `${count} ${count === 1 ? singular : plural}`;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\ntype PropertyValueFunction<T> = (item: T) => { toString: () => string };\n\n@Pipe({\n  name: \"search\",\n})\nexport class SearchPipe implements PipeTransform {\n  transform<T>(\n    items: T[],\n    searchText: string,\n    prop1?: keyof T,\n    prop2?: keyof T,\n    prop3?: keyof T,\n  ): T[];\n  transform<T>(\n    items: T[],\n    searchText: string,\n    prop1?: PropertyValueFunction<T>,\n    prop2?: PropertyValueFunction<T>,\n    prop3?: PropertyValueFunction<T>,\n  ): T[];\n  transform<T>(\n    items: T[],\n    searchText: string,\n    prop1?: keyof T | PropertyValueFunction<T>,\n    prop2?: keyof T | PropertyValueFunction<T>,\n    prop3?: keyof T | PropertyValueFunction<T>,\n  ): T[] {\n    if (items == null || items.length === 0) {\n      return [];\n    }\n\n    if (searchText == null || searchText.length < 2) {\n      return items;\n    }\n\n    searchText = searchText.trim().toLowerCase();\n    return items.filter((i) => {\n      if (prop1 != null) {\n        const propValue = typeof prop1 === \"function\" ? prop1(i) : i[prop1];\n\n        if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n          return true;\n        }\n      }\n\n      if (prop2 != null) {\n        const propValue = typeof prop2 === \"function\" ? prop2(i) : i[prop2];\n\n        if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n          return true;\n        }\n      }\n\n      if (prop3 != null) {\n        const propValue = typeof prop3 === \"function\" ? prop3(i) : i[prop3];\n\n        if (propValue?.toString().toLowerCase().indexOf(searchText) > -1) {\n          return true;\n        }\n      }\n\n      return false;\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Pipe, PipeTransform } from \"@angular/core\";\n\nexport interface User {\n  name?: string;\n  email?: string;\n}\n\n@Pipe({\n  name: \"userName\",\n})\nexport class UserNamePipe implements PipeTransform {\n  transform(user?: User): string {\n    if (user == null) {\n      return null;\n    }\n\n    if (user.name == null && user.email == null) {\n      return null;\n    }\n\n    return user.name == null || user.name.trim() === \"\" ? user.email : user.name;\n  }\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { OrganizationUserType } from \"@bitwarden/common/admin-console/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n  name: \"userType\",\n})\nexport class UserTypePipe implements PipeTransform {\n  constructor(private i18nService: I18nService) {}\n\n  transform(value?: OrganizationUserType): string {\n    if (value == null) {\n      return this.i18nService.t(\"unknown\");\n    }\n    switch (value) {\n      case OrganizationUserType.Owner:\n        return this.i18nService.t(\"owner\");\n      case OrganizationUserType.Admin:\n        return this.i18nService.t(\"admin\");\n      case OrganizationUserType.User:\n        return this.i18nService.t(\"user\");\n      case OrganizationUserType.Custom:\n        return this.i18nService.t(\"custom\");\n    }\n  }\n}\n","import { AbstractControl } from \"@angular/forms\";\nexport interface AllValidationErrors {\n  controlName: string;\n  errorName: string;\n}\n\nexport interface FormGroupControls {\n  [key: string]: AbstractControl;\n}\n\nexport abstract class FormValidationErrorsService {\n  abstract getFormValidationErrors(controls: FormGroupControls): AllValidationErrors[];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject } from \"@angular/core\";\nimport { CanActivateFn, Router } from \"@angular/router\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\n// Replace this with a type safe lookup of the feature flag values in PM-2282\ntype FlagValue = boolean | number | string;\n\n/**\n * Returns a CanActivateFn that checks if the feature flag is enabled. If not, it shows an \"Access Denied!\"\n * toast and optionally redirects to the specified url.\n * @param featureFlag - The feature flag to check\n * @param requiredFlagValue - Optional value to the feature flag must be equal to, defaults to true\n * @param redirectUrlOnDisabled - Optional url to redirect to if the feature flag is disabled\n * @param showToast - Optional boolean to show a toast if the feature flag is disabled - defaults to true\n */\nexport const canAccessFeature = (\n  featureFlag: FeatureFlag,\n  requiredFlagValue: FlagValue = true,\n  redirectUrlOnDisabled?: string,\n  showToast = true,\n): CanActivateFn => {\n  return async () => {\n    const configService = inject(ConfigService);\n    const toastService = inject(ToastService);\n    const router = inject(Router);\n    const i18nService = inject(I18nService);\n    const logService = inject(LogService);\n\n    try {\n      const flagValue = await configService.getFeatureFlag(featureFlag);\n\n      if (flagValue === requiredFlagValue) {\n        return true;\n      }\n\n      if (showToast) {\n        toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: i18nService.t(\"accessDenied\"),\n        });\n      }\n\n      if (redirectUrlOnDisabled != null) {\n        return router.createUrlTree([redirectUrlOnDisabled]);\n      }\n      return false;\n    } catch (e) {\n      logService.error(e);\n      return false;\n    }\n  };\n};\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n@Pipe({\n  name: \"i18n\",\n})\nexport class I18nPipe implements PipeTransform {\n  constructor(private i18nService: I18nService) {}\n\n  transform(id: string, p1?: string | number, p2?: string | number, p3?: string | number): string {\n    return this.i18nService.t(id, p1, p2, p3);\n  }\n}\n","import { Observable, Subscription } from \"rxjs\";\n\nimport { Theme } from \"@bitwarden/common/platform/enums\";\n\n/**\n * A service for managing and observing the current application theme.\n */\n// FIXME: Rename to ThemingService\nexport abstract class AbstractThemingService {\n  /**\n   * The effective theme based on the user configured choice and the current system theme if\n   * the configured choice is {@link ThemeTypes.System}.\n   */\n  abstract theme$: Observable<Theme>;\n  /**\n   * Listens for effective theme changes and applies changes to the provided document.\n   * @param document The document that should have theme classes applied to it.\n   *\n   * @returns A subscription that can be unsubscribed from to cancel the application of theme classes.\n   */\n  abstract applyThemeChangesTo(document: Document): Subscription;\n}\n","import { Provider } from \"@angular/core\";\nimport { Constructor, Opaque } from \"type-fest\";\n\nimport { SafeInjectionToken } from \"../../services/injection-tokens\";\n\n/**\n * The return type of the {@link safeProvider} helper function.\n * Used to distinguish a type safe provider definition from a non-type safe provider definition.\n */\nexport type SafeProvider = Opaque<Provider>;\n\n// TODO: type-fest also provides a type like this when we upgrade >= 3.7.0\ntype AbstractConstructor<T> = abstract new (...args: any) => T;\n\ntype MapParametersToDeps<T> = {\n  [K in keyof T]: AbstractConstructor<T[K]> | SafeInjectionToken<T[K]>;\n};\n\ntype SafeInjectionTokenType<T> = T extends SafeInjectionToken<infer J> ? J : never;\n\n/**\n * Gets the instance type from a constructor, abstract constructor, or SafeInjectionToken\n */\ntype ProviderInstanceType<T> =\n  T extends SafeInjectionToken<any>\n    ? InstanceType<SafeInjectionTokenType<T>>\n    : T extends Constructor<any> | AbstractConstructor<any>\n      ? InstanceType<T>\n      : never;\n\n/**\n * Represents a dependency provided with the useClass option.\n */\ntype SafeClassProvider<\n  A extends AbstractConstructor<any> | SafeInjectionToken<any>,\n  I extends Constructor<ProviderInstanceType<A>>,\n  D extends MapParametersToDeps<ConstructorParameters<I>>,\n> = {\n  provide: A;\n  useClass: I;\n  deps: D;\n};\n\n/**\n * Represents a dependency provided with the useValue option.\n */\ntype SafeValueProvider<A extends SafeInjectionToken<any>, V extends SafeInjectionTokenType<A>> = {\n  provide: A;\n  useValue: V;\n};\n\n/**\n * Represents a dependency provided with the useFactory option.\n */\ntype SafeFactoryProvider<\n  A extends AbstractConstructor<any> | SafeInjectionToken<any>,\n  I extends (...args: any) => ProviderInstanceType<A>,\n  D extends MapParametersToDeps<Parameters<I>>,\n> = {\n  provide: A;\n  useFactory: I;\n  deps: D;\n  multi?: boolean;\n};\n\n/**\n * Represents a dependency provided with the useExisting option.\n */\ntype SafeExistingProvider<\n  A extends Constructor<any> | AbstractConstructor<any> | SafeInjectionToken<any>,\n  I extends Constructor<ProviderInstanceType<A>> | AbstractConstructor<ProviderInstanceType<A>>,\n> = {\n  provide: A;\n  useExisting: I;\n};\n\n/**\n * Represents a dependency where there is no abstract token, the token is the implementation\n */\ntype SafeConcreteProvider<\n  I extends Constructor<any>,\n  D extends MapParametersToDeps<ConstructorParameters<I>>,\n> = {\n  provide: I;\n  deps: D;\n};\n\n/**\n * If useAngularDecorators: true is specified, do not require a deps array.\n * This is a manual override for where @Injectable decorators are used\n */\ntype UseAngularDecorators<T extends { deps: any }> = Omit<T, \"deps\"> & {\n  useAngularDecorators: true;\n};\n\n/**\n * Represents a type with a deps array that may optionally be overridden with useAngularDecorators\n */\ntype AllowAngularDecorators<T extends { deps: any }> = T | UseAngularDecorators<T>;\n\n/**\n * A factory function that creates a provider for the ngModule providers array.\n * This (almost) guarantees type safety for your provider definition. It does nothing at runtime.\n * Warning: the useAngularDecorators option provides an override where your class uses the Injectable decorator,\n * however this cannot be enforced by the type system and will not cause an error if the decorator is not used.\n * @example safeProvider({ provide: MyService, useClass: DefaultMyService, deps: [AnotherService] })\n * @param provider Your provider object in the usual shape (e.g. using useClass, useValue, useFactory, etc.)\n * @returns The exact same object without modification (pass-through).\n */\nexport const safeProvider = <\n  // types for useClass\n  AClass extends AbstractConstructor<any> | SafeInjectionToken<any>,\n  IClass extends Constructor<ProviderInstanceType<AClass>>,\n  DClass extends MapParametersToDeps<ConstructorParameters<IClass>>,\n  // types for useValue\n  AValue extends SafeInjectionToken<any>,\n  VValue extends SafeInjectionTokenType<AValue>,\n  // types for useFactory\n  AFactory extends AbstractConstructor<any> | SafeInjectionToken<any>,\n  IFactory extends (...args: any) => ProviderInstanceType<AFactory>,\n  DFactory extends MapParametersToDeps<Parameters<IFactory>>,\n  // types for useExisting\n  AExisting extends Constructor<any> | AbstractConstructor<any> | SafeInjectionToken<any>,\n  IExisting extends\n    | Constructor<ProviderInstanceType<AExisting>>\n    | AbstractConstructor<ProviderInstanceType<AExisting>>,\n  // types for no token\n  IConcrete extends Constructor<any>,\n  DConcrete extends MapParametersToDeps<ConstructorParameters<IConcrete>>,\n>(\n  provider:\n    | AllowAngularDecorators<SafeClassProvider<AClass, IClass, DClass>>\n    | SafeValueProvider<AValue, VValue>\n    | AllowAngularDecorators<SafeFactoryProvider<AFactory, IFactory, DFactory>>\n    | SafeExistingProvider<AExisting, IExisting>\n    | AllowAngularDecorators<SafeConcreteProvider<IConcrete, DConcrete>>\n    | Constructor<unknown>,\n): SafeProvider => provider as SafeProvider;\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { InjectionToken } from \"@angular/core\";\nimport { Observable, Subject } from \"rxjs\";\n\nimport { LogoutReason } from \"@bitwarden/auth/common\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { RegionConfig } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport {\n  AbstractStorageService,\n  ObservableStorageService,\n} from \"@bitwarden/common/platform/abstractions/storage.service\";\nimport { Theme } from \"@bitwarden/common/platform/enums\";\nimport { StateFactory } from \"@bitwarden/common/platform/factories/state-factory\";\nimport { Message } from \"@bitwarden/common/platform/messaging\";\nimport { VaultTimeout } from \"@bitwarden/common/types/vault-timeout.type\";\n\ndeclare const tag: unique symbol;\n/**\n * A (more) typesafe version of InjectionToken which will more strictly enforce the generic type parameter.\n * @remarks The default angular implementation does not use the generic type to define the structure of the object,\n * so the structural type system will not complain about a mismatch in the type parameter.\n * This is solved by assigning T to an arbitrary private property.\n */\nexport class SafeInjectionToken<T> extends InjectionToken<T> {\n  private readonly [tag]: T;\n}\n\nexport const WINDOW = new SafeInjectionToken<Window>(\"WINDOW\");\nexport const OBSERVABLE_MEMORY_STORAGE = new SafeInjectionToken<\n  AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_MEMORY_STORAGE\");\nexport const OBSERVABLE_DISK_STORAGE = new SafeInjectionToken<\n  AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_DISK_STORAGE\");\nexport const OBSERVABLE_DISK_LOCAL_STORAGE = new SafeInjectionToken<\n  AbstractStorageService & ObservableStorageService\n>(\"OBSERVABLE_DISK_LOCAL_STORAGE\");\nexport const MEMORY_STORAGE = new SafeInjectionToken<AbstractStorageService>(\"MEMORY_STORAGE\");\nexport const SECURE_STORAGE = new SafeInjectionToken<AbstractStorageService>(\"SECURE_STORAGE\");\nexport const STATE_FACTORY = new SafeInjectionToken<StateFactory>(\"STATE_FACTORY\");\nexport const LOGOUT_CALLBACK = new SafeInjectionToken<\n  (logoutReason: LogoutReason, userId?: string) => Promise<void>\n>(\"LOGOUT_CALLBACK\");\nexport const LOCKED_CALLBACK = new SafeInjectionToken<(userId?: string) => Promise<void>>(\n  \"LOCKED_CALLBACK\",\n);\nexport const SUPPORTS_SECURE_STORAGE = new SafeInjectionToken<boolean>(\"SUPPORTS_SECURE_STORAGE\");\nexport const LOCALES_DIRECTORY = new SafeInjectionToken<string>(\"LOCALES_DIRECTORY\");\nexport const SYSTEM_LANGUAGE = new SafeInjectionToken<string>(\"SYSTEM_LANGUAGE\");\nexport const LOG_MAC_FAILURES = new SafeInjectionToken<boolean>(\"LOG_MAC_FAILURES\");\nexport const SYSTEM_THEME_OBSERVABLE = new SafeInjectionToken<Observable<Theme>>(\n  \"SYSTEM_THEME_OBSERVABLE\",\n);\nexport const DEFAULT_VAULT_TIMEOUT = new SafeInjectionToken<VaultTimeout>(\"DEFAULT_VAULT_TIMEOUT\");\nexport const INTRAPROCESS_MESSAGING_SUBJECT = new SafeInjectionToken<\n  Subject<Message<Record<string, unknown>>>\n>(\"INTRAPROCESS_MESSAGING_SUBJECT\");\nexport const CLIENT_TYPE = new SafeInjectionToken<ClientType>(\"CLIENT_TYPE\");\n\nexport const REFRESH_ACCESS_TOKEN_ERROR_CALLBACK = new SafeInjectionToken<() => void>(\n  \"REFRESH_ACCESS_TOKEN_ERROR_CALLBACK\",\n);\n\n/**\n * Injection token for injecting the NodeJS process.env additional regions into services.\n * Using an injection token allows services to be tested without needing to\n * mock the process.env.\n */\nexport const ENV_ADDITIONAL_REGIONS = new SafeInjectionToken<RegionConfig[]>(\n  \"ENV_ADDITIONAL_REGIONS\",\n);\n","import { Observable, Subject } from \"rxjs\";\nimport { first } from \"rxjs/operators\";\n\nexport class ModalRef {\n  onCreated: Observable<HTMLElement>; // Modal added to the DOM.\n  onClose: Observable<any>; // Initiated close.\n  onClosed: Observable<any>; // Modal was closed (Remove element from DOM)\n  onShow: Observable<void>; // Start showing modal\n  onShown: Observable<void>; // Modal is fully visible\n\n  private readonly _onCreated = new Subject<HTMLElement>();\n  private readonly _onClose = new Subject<any>();\n  private readonly _onClosed = new Subject<any>();\n  private readonly _onShow = new Subject<void>();\n  private readonly _onShown = new Subject<void>();\n  private lastResult: any;\n\n  constructor() {\n    this.onCreated = this._onCreated.asObservable();\n    this.onClose = this._onClose.asObservable();\n    this.onClosed = this._onClosed.asObservable();\n    this.onShow = this._onShow.asObservable();\n    this.onShown = this._onShow.asObservable();\n  }\n\n  show() {\n    this._onShow.next();\n  }\n\n  shown() {\n    this._onShown.next();\n  }\n\n  close(result?: any) {\n    this.lastResult = result;\n    this._onClose.next(result);\n  }\n\n  closed() {\n    this._onClosed.next(this.lastResult);\n  }\n\n  created(el: HTMLElement) {\n    this._onCreated.next(el);\n  }\n\n  onClosedPromise(): Promise<any> {\n    return this.onClosed.pipe(first()).toPromise();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ConfigurableFocusTrap, ConfigurableFocusTrapFactory } from \"@angular/cdk/a11y\";\nimport {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  ComponentRef,\n  ElementRef,\n  OnDestroy,\n  Type,\n  ViewChild,\n  ViewContainerRef,\n} from \"@angular/core\";\n\nimport { ModalRef } from \"./modal.ref\";\n\n@Component({\n  selector: \"app-modal\",\n  template: \"<ng-template #modalContent></ng-template>\",\n})\nexport class DynamicModalComponent implements AfterViewInit, OnDestroy {\n  componentRef: ComponentRef<any>;\n\n  @ViewChild(\"modalContent\", { read: ViewContainerRef, static: true })\n  modalContentRef: ViewContainerRef;\n\n  childComponentType: Type<any>;\n  setComponentParameters: (component: any) => void;\n\n  private focusTrap: ConfigurableFocusTrap;\n\n  constructor(\n    private cd: ChangeDetectorRef,\n    private el: ElementRef<HTMLElement>,\n    private focusTrapFactory: ConfigurableFocusTrapFactory,\n    public modalRef: ModalRef,\n  ) {}\n\n  ngAfterViewInit() {\n    this.loadChildComponent(this.childComponentType);\n    if (this.setComponentParameters != null) {\n      this.setComponentParameters(this.componentRef.instance);\n    }\n    this.cd.detectChanges();\n\n    this.modalRef.created(this.el.nativeElement);\n    this.focusTrap = this.focusTrapFactory.create(\n      this.el.nativeElement.querySelector(\".modal-dialog\"),\n    );\n    if (this.el.nativeElement.querySelector(\"[appAutoFocus]\") == null) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.focusTrap.focusFirstTabbableElementWhenReady();\n    }\n  }\n\n  loadChildComponent(componentType: Type<any>) {\n    this.modalContentRef.clear();\n    this.componentRef = this.modalContentRef.createComponent(componentType);\n  }\n\n  ngOnDestroy() {\n    if (this.componentRef) {\n      this.componentRef.destroy();\n    }\n    this.focusTrap.destroy();\n  }\n\n  close() {\n    this.modalRef.close();\n  }\n\n  getFocus() {\n    const autoFocusEl = this.el.nativeElement.querySelector(\"[appAutoFocus]\") as HTMLElement;\n    autoFocusEl?.focus();\n  }\n}\n","import { InjectFlags, InjectOptions, Injector, ProviderToken } from \"@angular/core\";\n\nexport class ModalInjector implements Injector {\n  constructor(\n    private _parentInjector: Injector,\n    private _additionalTokens: WeakMap<any, any>,\n  ) {}\n\n  get<T>(\n    token: ProviderToken<T>,\n    notFoundValue: undefined,\n    options: InjectOptions & { optional?: false },\n  ): T;\n  get<T>(token: ProviderToken<T>, notFoundValue: null, options: InjectOptions): T;\n  get<T>(token: ProviderToken<T>, notFoundValue?: T, options?: InjectOptions | InjectFlags): T;\n  get<T>(token: ProviderToken<T>, notFoundValue?: T, flags?: InjectFlags): T;\n  get(token: any, notFoundValue?: any): any;\n  get(token: any, notFoundValue?: any, flags?: any): any {\n    return this._additionalTokens.get(token) ?? this._parentInjector.get<any>(token, notFoundValue);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ComponentRef, Injectable, Injector, Type, ViewContainerRef } from \"@angular/core\";\nimport { first } from \"rxjs/operators\";\n\nimport { DynamicModalComponent } from \"../components/modal/dynamic-modal.component\";\nimport { ModalInjector } from \"../components/modal/modal-injector\";\nimport { ModalRef } from \"../components/modal/modal.ref\";\n\n/**\n * @deprecated Use the Component Library's `DialogService` instead.\n */\n@Injectable()\nexport class ModalService {\n  protected modalList: ComponentRef<DynamicModalComponent>[] = [];\n\n  constructor(private injector: Injector) {\n    document.addEventListener(\"keyup\", (event) => {\n      if (event.key === \"Escape\" && this.modalCount > 0) {\n        this.topModal.instance.close();\n      }\n    });\n  }\n\n  get modalCount() {\n    return this.modalList.length;\n  }\n\n  private get topModal() {\n    return this.modalList[this.modalCount - 1];\n  }\n\n  /**\n   * @deprecated Use `dialogService.open` instead.\n   * If replacing an existing call to this method, also remove any `@ViewChild` and `<ng-template>` associated with the\n   * existing usage.\n   */\n  async openViewRef<T>(\n    componentType: Type<T>,\n    viewContainerRef: ViewContainerRef,\n    setComponentParameters: (component: T) => void = null,\n  ): Promise<[ModalRef, T]> {\n    const [modalRef, modalComponentRef] = this.openInternal(viewContainerRef, componentType);\n    modalComponentRef.instance.setComponentParameters = setComponentParameters;\n\n    viewContainerRef.insert(modalComponentRef.hostView);\n\n    await modalRef.onCreated.pipe(first()).toPromise();\n\n    return [modalRef, modalComponentRef.instance.componentRef.instance];\n  }\n\n  closeAll(): void {\n    this.modalList.forEach((modal) => modal.instance.close());\n  }\n\n  protected openInternal(\n    viewContainerRef: ViewContainerRef,\n    componentType: Type<any>,\n  ): [ModalRef, ComponentRef<any>] {\n    const [modalRef, componentRef] = this.createModalComponent(viewContainerRef);\n    componentRef.instance.childComponentType = componentType;\n\n    modalRef.onClosed.pipe(first()).subscribe(() => {\n      componentRef.destroy();\n\n      this.modalList.pop();\n      if (this.modalCount > 0) {\n        this.topModal.instance.getFocus();\n      }\n    });\n\n    this.setupHandlers(modalRef);\n\n    this.modalList.push(componentRef);\n\n    return [modalRef, componentRef];\n  }\n\n  protected setupHandlers(modalRef: ModalRef) {\n    let backdrop: HTMLElement = null;\n\n    // Add backdrop, setup [data-dismiss] handler.\n    modalRef.onCreated.pipe(first()).subscribe((el) => {\n      document.body.classList.add(\"modal-open\");\n\n      const modalEl: HTMLElement = el.querySelector(\".modal\");\n      const dialogEl = modalEl.querySelector(\".modal-dialog\") as HTMLElement;\n\n      backdrop = document.createElement(\"div\");\n      backdrop.className = \"modal-backdrop fade\";\n      backdrop.style.zIndex = `${this.modalCount}040`;\n      modalEl.prepend(backdrop);\n\n      dialogEl.addEventListener(\"click\", (e: Event) => {\n        e.stopPropagation();\n      });\n      dialogEl.style.zIndex = `${this.modalCount}050`;\n\n      const modals = Array.from(\n        el.querySelectorAll('.modal-backdrop, .modal *[data-dismiss=\"modal\"]'),\n      );\n      for (const closeElement of modals) {\n        closeElement.addEventListener(\"click\", () => {\n          modalRef.close();\n        });\n      }\n    });\n\n    // onClose is used in Web to hook into bootstrap. On other projects we pipe it directly to closed.\n    modalRef.onClose.pipe(first()).subscribe(() => {\n      modalRef.closed();\n\n      if (this.modalCount === 0) {\n        document.body.classList.remove(\"modal-open\");\n      }\n    });\n  }\n\n  protected createModalComponent(\n    viewContainerRef: ViewContainerRef,\n  ): [ModalRef, ComponentRef<any>] {\n    const modalRef = new ModalRef();\n\n    const map = new WeakMap();\n    map.set(ModalRef, modalRef);\n\n    const injector = new ModalInjector(this.injector, map);\n    const componentRef = viewContainerRef.createComponent(DynamicModalComponent, { injector });\n\n    return [modalRef, componentRef];\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, OnChanges, Output } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { ProgressModule } from \"@bitwarden/components\";\n\nexport interface PasswordColorText {\n  color: BackgroundTypes;\n  text: string;\n}\nexport type PasswordStrengthScore = 0 | 1 | 2 | 3 | 4;\n\ntype SizeTypes = \"small\" | \"default\" | \"large\";\ntype BackgroundTypes = \"danger\" | \"primary\" | \"success\" | \"warning\";\n\n@Component({\n  selector: \"tools-password-strength\",\n  templateUrl: \"password-strength-v2.component.html\",\n  standalone: true,\n  imports: [CommonModule, JslibModule, ProgressModule],\n})\nexport class PasswordStrengthV2Component implements OnChanges {\n  /**\n   * The size (height) of the password strength component.\n   * Possible values are \"default\", \"small\" and \"large\".\n   */\n  @Input() size: SizeTypes = \"default\";\n  /**\n   * Determines whether to show the password strength score text on the progress bar or not.\n   */\n  @Input() showText = false;\n  /**\n   * Optional email address which can be used as input for the password strength calculation\n   */\n  @Input() email: string;\n  /**\n   * Optional name which can be used as input for the password strength calculation\n   */\n  @Input() name: string;\n  /**\n   * Sets the password value and updates the password strength.\n   *\n   * @param value - password provided by the hosting component\n   */\n  @Input() set password(value: string) {\n    this.updatePasswordStrength(value);\n  }\n  /**\n   * Emits the password strength score.\n   *\n   * @remarks\n   * The password strength score represents the strength of a password.\n   * It is emitted as an event when the password strength changes.\n   */\n  @Output() passwordStrengthScore = new EventEmitter<PasswordStrengthScore>();\n\n  /**\n   * Emits an event with the password score text and color.\n   */\n  @Output() passwordScoreTextWithColor = new EventEmitter<PasswordColorText>();\n\n  passwordScore: PasswordStrengthScore;\n  scoreWidth = 0;\n  color: BackgroundTypes = \"danger\";\n  text: string;\n\n  private passwordStrengthTimeout: number | NodeJS.Timeout;\n\n  constructor(\n    private i18nService: I18nService,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n  ) {}\n\n  ngOnChanges(): void {\n    this.passwordStrengthTimeout = setTimeout(() => {\n      this.scoreWidth = this.passwordScore == null ? 0 : (this.passwordScore + 1) * 20;\n\n      switch (this.passwordScore) {\n        case 4:\n          this.color = \"success\";\n          this.text = this.i18nService.t(\"strong\");\n          break;\n        case 3:\n          this.color = \"primary\";\n          this.text = this.i18nService.t(\"good\");\n          break;\n        case 2:\n          this.color = \"warning\";\n          this.text = this.i18nService.t(\"weak\");\n          break;\n        default:\n          this.color = \"danger\";\n          this.text = this.passwordScore != null ? this.i18nService.t(\"weak\") : null;\n          break;\n      }\n\n      this.passwordScoreTextWithColor.emit({\n        color: this.color,\n        text: this.text,\n      } as PasswordColorText);\n    }, 300);\n  }\n\n  updatePasswordStrength(password: string) {\n    if (this.passwordStrengthTimeout != null) {\n      clearTimeout(this.passwordStrengthTimeout);\n    }\n\n    const strengthResult = this.passwordStrengthService.getPasswordStrength(\n      password,\n      this.email,\n      this.name?.trim().toLowerCase().split(\" \"),\n    );\n    this.passwordScore = strengthResult == null ? null : strengthResult.score;\n    this.passwordStrengthScore.emit(this.passwordScore);\n  }\n}\n","<bit-progress\n  [size]=\"size\"\n  [text]=\"text\"\n  [bgColor]=\"color\"\n  [showText]=\"showText\"\n  [barWidth]=\"scoreWidth\"\n></bit-progress>\n","import { Type } from \"@angular/core\";\nimport { CanMatchFn, Route, Routes } from \"@angular/router\";\n\n/**\n * Helper function to swap between two components based on an async condition. The async condition is evaluated\n * as an `CanMatchFn` and supports Angular dependency injection via `inject()`.\n *\n * @example\n * ```ts\n * const routes = [\n *  ...componentRouteSwap(\n *     defaultComponent,\n *     altComponent,\n *     async () => {\n *       const configService = inject(ConfigService);\n *       return configService.getFeatureFlag(FeatureFlag.SomeFlag);\n *     },\n *     {\n *      path: 'some-path'\n *     }\n *   ),\n *   // Other routes...\n *  ];\n *  ```\n *\n * @param defaultComponent - The default component to render.\n * @param altComponent - The alternate component to render when the condition is met.\n * @param shouldSwapFn - The async function to determine if the alternate component should be rendered.\n * @param options - The shared route options to apply to the default component, and to the alt component if altOptions is not provided.\n * @param altOptions - The alt route options to apply to the alt component.\n */\nexport function componentRouteSwap(\n  defaultComponent: Type<any>,\n  altComponent: Type<any>,\n  shouldSwapFn: CanMatchFn,\n  options: Route,\n  altOptions?: Route,\n): Routes {\n  const defaultRoute = {\n    ...options,\n    component: defaultComponent,\n  };\n\n  const selectedAltOptions = altOptions ?? options;\n\n  const altRoute: Route = {\n    ...selectedAltOptions,\n    component: altComponent,\n    canMatch: [shouldSwapFn, ...(selectedAltOptions.canMatch ?? [])],\n  };\n\n  // Return the alternate route first, so it is evaluated first.\n  return [altRoute, defaultRoute];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, HostListener, Input } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appFallbackSrc]\",\n})\nexport class FallbackSrcDirective {\n  @Input(\"appFallbackSrc\") appFallbackSrc: string;\n\n  /** Only try setting the fallback once. This prevents an infinite loop if the fallback itself is missing. */\n  private tryFallback = true;\n\n  constructor(private el: ElementRef) {}\n\n  @HostListener(\"error\") onError() {\n    if (this.tryFallback) {\n      this.el.nativeElement.src = this.appFallbackSrc;\n      this.tryFallback = false;\n    }\n  }\n}\n","<div class=\"tw-flex tw-justify-center tw-items-center\" aria-hidden=\"true\">\n  <ng-container *ngIf=\"data$ | async as data\">\n    <img\n      [src]=\"data.image\"\n      [appFallbackSrc]=\"data.fallbackImage\"\n      *ngIf=\"data.imageEnabled && data.image\"\n      class=\"tw-h-6 tw-w-6 tw-rounded-md\"\n      alt=\"\"\n      decoding=\"async\"\n      loading=\"lazy\"\n    />\n    <i\n      class=\"tw-text-muted bwi bwi-lg {{ data.icon }}\"\n      *ngIf=\"!data.imageEnabled || !data.image\"\n    ></i>\n  </ng-container>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ChangeDetectionStrategy, Component, Input, OnInit } from \"@angular/core\";\nimport {\n  BehaviorSubject,\n  combineLatest,\n  distinctUntilChanged,\n  filter,\n  map,\n  Observable,\n} from \"rxjs\";\n\nimport { DomainSettingsService } from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { buildCipherIcon } from \"@bitwarden/common/vault/icon/build-cipher-icon\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\n@Component({\n  selector: \"app-vault-icon\",\n  templateUrl: \"icon.component.html\",\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class IconComponent implements OnInit {\n  @Input()\n  set cipher(value: CipherView) {\n    this.cipher$.next(value);\n  }\n\n  protected data$: Observable<{\n    imageEnabled: boolean;\n    image?: string;\n    fallbackImage: string;\n    icon?: string;\n  }>;\n\n  private cipher$ = new BehaviorSubject<CipherView>(undefined);\n\n  constructor(\n    private environmentService: EnvironmentService,\n    private domainSettingsService: DomainSettingsService,\n  ) {}\n\n  async ngOnInit() {\n    this.data$ = combineLatest([\n      this.environmentService.environment$.pipe(map((e) => e.getIconsUrl())),\n      this.domainSettingsService.showFavicons$.pipe(distinctUntilChanged()),\n      this.cipher$.pipe(filter((c) => c !== undefined)),\n    ]).pipe(\n      map(([iconsUrl, showFavicon, cipher]) => buildCipherIcon(iconsUrl, cipher, showFavicon)),\n    );\n  }\n}\n","import { Utils } from \"../../platform/misc/utils\";\nimport { CipherType } from \"../enums/cipher-type\";\nimport { CipherView } from \"../models/view/cipher.view\";\n\nexport function buildCipherIcon(iconsServerUrl: string, cipher: CipherView, showFavicon: boolean) {\n  let icon;\n  let image;\n  let fallbackImage = \"\";\n  const cardIcons: Record<string, string> = {\n    Visa: \"card-visa\",\n    Mastercard: \"card-mastercard\",\n    Amex: \"card-amex\",\n    Discover: \"card-discover\",\n    \"Diners Club\": \"card-diners-club\",\n    JCB: \"card-jcb\",\n    Maestro: \"card-maestro\",\n    UnionPay: \"card-union-pay\",\n    RuPay: \"card-ru-pay\",\n  };\n\n  switch (cipher.type) {\n    case CipherType.Login:\n      icon = \"bwi-globe\";\n\n      if (cipher.login.uri) {\n        let hostnameUri = cipher.login.uri;\n        let isWebsite = false;\n\n        if (hostnameUri.indexOf(\"androidapp://\") === 0) {\n          icon = \"bwi-android\";\n          image = null;\n        } else if (hostnameUri.indexOf(\"iosapp://\") === 0) {\n          icon = \"bwi-apple\";\n          image = null;\n        } else if (\n          showFavicon &&\n          hostnameUri.indexOf(\"://\") === -1 &&\n          hostnameUri.indexOf(\".\") > -1\n        ) {\n          hostnameUri = `http://${hostnameUri}`;\n          isWebsite = true;\n        } else if (showFavicon) {\n          isWebsite = hostnameUri.indexOf(\"http\") === 0 && hostnameUri.indexOf(\".\") > -1;\n        }\n\n        if (isWebsite && (hostnameUri.endsWith(\".onion\") || hostnameUri.endsWith(\".i2p\"))) {\n          image = null;\n          fallbackImage = \"images/bwi-globe.png\";\n          break;\n        }\n\n        if (showFavicon && isWebsite) {\n          try {\n            image = `${iconsServerUrl}/${Utils.getHostname(hostnameUri)}/icon.png`;\n            fallbackImage = \"images/bwi-globe.png\";\n          } catch (e) {\n            // Ignore error since the fallback icon will be shown if image is null.\n          }\n        }\n      } else {\n        image = null;\n      }\n      break;\n    case CipherType.SecureNote:\n      icon = \"bwi-sticky-note\";\n      break;\n    case CipherType.Card:\n      icon = \"bwi-credit-card\";\n      if (showFavicon && cipher.card.brand in cardIcons) {\n        icon = `credit-card-icon ${cardIcons[cipher.card.brand]}`;\n      }\n      break;\n    case CipherType.Identity:\n      icon = \"bwi-id-card\";\n      break;\n    case CipherType.SshKey:\n      icon = \"bwi-key\";\n      break;\n    default:\n      break;\n  }\n\n  return {\n    imageEnabled: showFavicon,\n    image,\n    fallbackImage,\n    icon,\n  };\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const BitwardenLogo = svgIcon`\n<svg version=\"1.1\" viewBox=\"0 0 290 60\" xmlns=\"http://www.w3.org/2000/svg\">\n  <title>Vaultwarden</title>\n  <path class=\"tw-fill-marketing-logo\" d=\"m166 46-4.2-13q-.4-1.2-1.5-5.6h-.17q-.83 3.6-1.5 5.6l-4.3 13h-4l-6.2-23h3.6q2.2 8.6 3.3 13 1.2 4.5 1.3 6.1h.17q.23-1.2.73-3.1.52-1.9.89-3l4.2-13h3.7l4.1 13q1.2 3.6 1.6 6h.17q.083-.75.44-2.3.37-1.6 4.3-17h3.6l-6.3 23zm29 0-.69-3.2h-.17q-1.7 2.1-3.4 2.9-1.7.75-4.2.75-3.4 0-5.3-1.7-1.9-1.7-1.9-5 0-6.9 11-7.2l3.9-.12v-1.4q0-2.7-1.2-4-1.1-1.3-3.7-1.3-2.8 0-6.4 1.7l-1.1-2.6q1.7-.92 3.7-1.4 2-.52 4-.52 4.1 0 6 1.8 2 1.8 2 5.8v16zm-7.8-2.4q3.2 0 5.1-1.8 1.9-1.8 1.9-4.9v-2.1l-3.5.15q-4.1.15-5.9 1.3-1.8 1.1-1.8 3.5 0 1.9 1.1 2.8 1.1.98 3.2.98zm28-21q1.5 0 2.7.25l-.48 3.2q-1.4-.31-2.5-.31-2.8 0-4.7 2.2-2 2.2-2 5.6v12h-3.5v-23h2.8l.4 4.2h.17q1.3-2.2 3.1-3.4 1.8-1.2 3.9-1.2zm22 20h-.19q-2.4 3.5-7.2 3.5-4.5 0-7-3.1-2.5-3.1-2.5-8.7 0-5.6 2.5-8.8 2.5-3.1 6.9-3.1 4.6 0 7.1 3.4h.27l-.15-1.6-.083-1.6v-9.3h3.5v32h-2.8zm-6.9.58q3.5 0 5.1-1.9 1.6-1.9 1.6-6.2v-.73q0-4.8-1.6-6.9-1.6-2.1-5.1-2.1-3 0-4.7 2.4-1.6 2.3-1.6 6.7 0 4.4 1.6 6.6 1.6 2.2 4.7 2.2zm27 2.9q-5.1 0-8-3.1-2.9-3.1-2.9-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9.5 27c-.63 1.7-1.2 3.4-1.6 4.9-.43 1.5-.79 2.9-1.1 4.3-.28-1.4-.63-2.8-1.1-4.4-.43-1.5-.97-3.2-1.6-5l-9.5-27z\"/>\n  <path class=\"tw-fill-marketing-logo\" d=\"m30 .05a.85.85 0 00-.44.37l-1.5 2.5c-.27.022-.53.046-.8.076l-2-2.2a.85.85 0 00-1.4.29l-1 2.8c-.26.074-.51.15-.77.23l-2.4-1.8a.85.85 0 00-1.4.56l-.44 2.9c-.23.12-.47.24-.7.37l-2.7-1.3a.85.85 0 00-1.2.81l.14 3c-.2.16-.4.33-.6.49l-2.9-.72a.85.85 0 00-1 1l.72 2.9c-.17.2-.33.4-.49.6l-3-.14a.85.85 0 00-.81 1.2l1.3 2.7c-.13.23-.25.46-.37.7l-2.9.44a.85.85 0 00-.56 1.4l1.8 2.4c-.081.25-.16.51-.23.77l-2.8 1a.85.85 0 00-.29 1.4l2.2 2c-.03.26-.054.53-.076.8l-2.5 1.5a.85.85 0 000 1.5l2.5 1.5c.022.27.046.53.076.8l-2.2 2a.85.85 0 00.29 1.4l2.8 1c.074.26.15.51.23.77l-1.8 2.4a.85.85 0 00.56 1.4l2.9.44c.12.23.24.47.37.7l-1.3 2.7a.85.85 0 00.81 1.2l3-.14c.16.2.33.4.49.6l-.72 2.9a.85.85 0 001 1l2.9-.72c.2.17.4.33.6.49l-.14 3a.85.85 0 001.2.81l2.7-1.3c.23.13.46.25.7.37l.44 2.9a.85.85 0 001.4.56l2.4-1.8c.25.081.51.16.77.23l1 2.8a.85.85 0 001.4.29l2-2.2c.26.03.53.054.8.076l1.5 2.5a.85.85 0 001.5 0l1.5-2.5c.27-.022.53-.046.8-.076l2 2.2a.85.85 0 001.4-.29l1-2.8c.26-.074.51-.15.77-.23l2.4 1.8a.85.85 0 001.4-.56l.44-2.9c.23-.12.47-.24.7-.37l2.7 1.3a.85.85 0 001.2-.81l-.14-3c.2-.16.4-.33.6-.49l2.9.72a.85.85 0 001-1l-.72-2.9c.17-.2.33-.4.49-.6l3 .14a.85.85 0 00.81-1.2l-1.3-2.7c.13-.23.25-.46.37-.7l2.9-.44a.85.85 0 00.56-1.4l-1.8-2.4c.081-.25.16-.51.23-.77l2.8-1a.85.85 0 00.29-1.4l-2.2-2c.03-.26.054-.53.076-.8l2.5-1.5a.85.85 0 000-1.5l-2.5-1.5c-.022-.27-.046-.53-.076-.8l2.2-2a.85.85 0 00-.29-1.4l-2.8-1c-.074-.26-.15-.51-.23-.77l1.8-2.4a.85.85 0 00-.56-1.4l-2.9-.44c-.12-.23-.24-.47-.37-.7l1.3-2.7a.85.85 0 00-.81-1.2l-3 .14c-.16-.2-.33-.4-.49-.6l.72-2.9a.85.85 0 00-1-1l-2.9.72c-.2-.17-.4-.33-.6-.49l.14-3a.85.85 0 00-1.2-.81l-2.7 1.3c-.23-.13-.46-.25-.7-.37l-.44-2.9a.85.85 0 00-1.4-.56l-2.4 1.8c-.25-.081-.51-.16-.77-.23l-1-2.8a.85.85 0 00-1.4-.29l-2 2.2c-.26-.03-.53-.054-.8-.076l-1.5-2.5a.85.85 0 00-1-.37zm.29 5.4a1.7 1.7 0 011.7 1.7 1.7 1.7 0 01-1.7 1.7 1.7 1.7 0 01-1.7-1.7 1.7 1.7 0 011.7-1.7zm-4 2.9 2.8 2.8a1.7 1.7 0 002.4 0l2.8-2.8c6.6 1.2 12 5.4 15 11l-1.8 3.6a1.7 1.7 0 00.75 2.3l3.6 1.8c.12.92.18 1.9.18 2.8 0 5.8-2.3 11-6 15l-4-.63a1.7 1.7 0 00-2 1.4l-.63 4c-2.8 1.3-6 2.1-9.4 2.1-3.4 0-6.5-.76-9.4-2.1l-.63-4a1.7 1.7 0 00-2-1.4l-4 .63c-3.7-3.9-6-9.2-6-15 0-.96.064-1.9.18-2.8l3.6-1.8a1.7 1.7 0 00.75-2.3l-1.8-3.6c3.1-5.7 8.6-9.8 15-11zm-18 13a1.7 1.7 0 01.48.083 1.7 1.7 0 011.1 2.2 1.7 1.7 0 01-2.2 1.1 1.7 1.7 0 01-1.1-2.2 1.7 1.7 0 011.7-1.2zm43 0a1.7 1.7 0 011.7 1.2 1.7 1.7 0 01-1.1 2.2 1.7 1.7 0 01-2.2-1.1 1.7 1.7 0 011.1-2.2 1.7 1.7 0 01.48-.083zm-35 25a1.7 1.7 0 01.91.32 1.7 1.7 0 01.38 2.4 1.7 1.7 0 01-2.4.38 1.7 1.7 0 01-.38-2.4 1.7 1.7 0 011.5-.7zm27 0a1.7 1.7 0 011.5.7 1.7 1.7 0 01-.38 2.4 1.7 1.7 0 01-2.4-.38 1.7 1.7 0 01.38-2.4 1.7 1.7 0 01.91-.32z\"/>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const BitwardenShield = svgIcon`\n<svg version=\"1.1\" viewBox=\"0 0 60 60\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>Vaultwarden</title>\n <path class=\"tw-fill-marketing-logo\" d=\"m18 11-5.6.00073 15 42h5.3l15-42h-5.6l-9.5 27c-.63 1.7-1.2 3.4-1.6 4.9-.43 1.5-.79 2.9-1.1 4.3-.28-1.4-.63-2.8-1.1-4.4-.43-1.5-.97-3.2-1.6-5l-9.5-27z\"/>\n <path class=\"tw-fill-marketing-logo\" d=\"m30 0.05c-0.19 0.068-0.34 0.2-0.44 0.37l-1.5 2.5c-0.27 0.022-0.53 0.046-0.8 0.076l-2-2.2c-0.43-0.44-1.2-0.29-1.4 0.29l-1 2.8c-0.26 0.074-0.51 0.15-0.77 0.23l-2.4-1.8c-0.52-0.45-1.3-0.12-1.4 0.56l-0.44 2.9c-0.23 0.12-0.47 0.24-0.7 0.37l-2.7-1.3c-0.58-0.26-1.2 0.18-1.2 0.81l0.14 3c-0.2 0.16-0.4 0.33-0.6 0.49l-2.9-0.72c-0.59-0.12-1.1 0.41-1 1l0.72 2.9c-0.17 0.2-0.33 0.4-0.49 0.6l-3-0.14c-0.63-0.027-1.1 0.62-0.81 1.2l1.3 2.7c-0.13 0.23-0.25 0.46-0.37 0.7l-2.9 0.44c-0.68 0.068-1 0.88-0.56 1.4l1.8 2.4c-0.081 0.25-0.16 0.51-0.23 0.77l-2.8 1c-0.58 0.22-0.73 0.97-0.29 1.4l2.2 2c-0.03 0.26-0.054 0.53-0.076 0.8l-2.5 1.5c-0.6 0.32-0.6 1.2 0 1.5l2.5 1.5c0.022 0.27 0.046 0.53 0.076 0.8l-2.2 2c-0.44 0.43-0.29 1.2 0.29 1.4l2.8 1c0.074 0.26 0.15 0.51 0.23 0.77l-1.8 2.4c-0.45 0.52-0.12 1.3 0.56 1.4l2.9 0.44c0.12 0.23 0.24 0.47 0.37 0.7l-1.3 2.7c-0.26 0.58 0.18 1.2 0.81 1.2l3-0.14c0.16 0.2 0.33 0.4 0.49 0.6l-0.72 2.9c-0.12 0.59 0.41 1.1 1 1l2.9-0.72c0.2 0.17 0.4 0.33 0.6 0.49l-0.14 3c-0.027 0.63 0.62 1.1 1.2 0.81l2.7-1.3c0.23 0.13 0.46 0.25 0.7 0.37l0.44 2.9c0.068 0.68 0.88 1 1.4 0.56l2.4-1.8c0.25 0.081 0.51 0.16 0.77 0.23l1 2.8c0.22 0.58 0.97 0.73 1.4 0.29l2-2.2c0.26 0.03 0.53 0.054 0.8 0.076l1.5 2.5c0.32 0.6 1.2 0.6 1.5 0l1.5-2.5c0.27-0.022 0.53-0.046 0.8-0.076l2 2.2c0.43 0.44 1.2 0.29 1.4-0.29l1-2.8c0.26-0.074 0.51-0.15 0.77-0.23l2.4 1.8c0.52 0.45 1.3 0.12 1.4-0.56l0.44-2.9c0.23-0.12 0.47-0.24 0.7-0.37l2.7 1.3c0.58 0.26 1.2-0.18 1.2-0.81l-0.14-3c0.2-0.16 0.4-0.33 0.6-0.49l2.9 0.72c0.59 0.12 1.1-0.41 1-1l-0.72-2.9c0.17-0.2 0.33-0.4 0.49-0.6l3 0.14c0.63 0.027 1.1-0.62 0.81-1.2l-1.3-2.7c0.13-0.23 0.25-0.46 0.37-0.7l2.9-0.44c0.68-0.068 1-0.88 0.56-1.4l-1.8-2.4c0.081-0.25 0.16-0.51 0.23-0.77l2.8-1c0.58-0.22 0.73-0.97 0.29-1.4l-2.2-2c0.03-0.26 0.054-0.53 0.076-0.8l2.5-1.5c0.6-0.32 0.6-1.2 0-1.5l-2.5-1.5c-0.022-0.27-0.046-0.53-0.076-0.8l2.2-2c0.44-0.43 0.29-1.2-0.29-1.4l-2.8-1c-0.074-0.26-0.15-0.51-0.23-0.77l1.8-2.4c0.45-0.52 0.12-1.3-0.56-1.4l-2.9-0.44c-0.12-0.23-0.24-0.47-0.37-0.7l1.3-2.7c0.26-0.58-0.18-1.2-0.81-1.2l-3 0.14c-0.16-0.2-0.33-0.4-0.49-0.6l0.72-2.9c0.12-0.59-0.41-1.1-1-1l-2.9 0.72c-0.2-0.17-0.4-0.33-0.6-0.49l0.14-3c0.027-0.63-0.62-1.1-1.2-0.81l-2.7 1.3c-0.23-0.13-0.46-0.25-0.7-0.37l-0.44-2.9c-0.068-0.68-0.88-1-1.4-0.56l-2.4 1.8c-0.25-0.081-0.51-0.16-0.77-0.23l-1-2.8c-0.22-0.58-0.97-0.73-1.4-0.29l-2 2.2c-0.26-0.03-0.53-0.054-0.8-0.076l-1.5-2.5c-0.2-0.34-0.62-0.5-1-0.37zm0.29 5.4c0.94 0 1.7 0.76 1.7 1.7s-0.76 1.7-1.7 1.7-1.7-0.76-1.7-1.7 0.76-1.7 1.7-1.7zm-4 2.9 2.8 2.8c0.66 0.66 1.7 0.66 2.4 0l2.8-2.8c6.6 1.2 12 5.4 15 11l-1.8 3.6c-0.43 0.84-0.097 1.9 0.75 2.3l3.6 1.8c0.12 0.92 0.18 1.9 0.18 2.8 0 5.8-2.3 11-6 15l-4-0.63c-0.94-0.18-1.8 0.45-2 1.4l-0.63 4c-2.8 1.3-6 2.1-9.4 2.1s-6.5-0.76-9.4-2.1l-0.63-4c-0.15-0.95-1.1-1.6-2-1.4l-4 0.63c-3.7-3.9-6-9.2-6-15 0-0.96 0.064-1.9 0.18-2.8l3.6-1.8c0.85-0.42 1.2-1.5 0.75-2.3l-1.8-3.6c3.1-5.7 8.6-9.8 15-11zm-18 13c0.16 0.0045 0.32 0.032 0.48 0.083 0.93 0.29 1.4 1.3 1.1 2.2-0.29 0.93-1.3 1.4-2.2 1.1-0.93-0.29-1.4-1.3-1.1-2.2 0.23-0.74 0.93-1.2 1.7-1.2zm43 0c0.77-0.034 1.5 0.46 1.7 1.2 0.33 0.91-0.17 1.9-1.1 2.2-0.91 0.33-1.9-0.17-2.2-1.1-0.33-0.91 0.17-1.9 1.1-2.2 0.16-0.051 0.32-0.079 0.48-0.083zm-35 25c0.33 0.017 0.64 0.13 0.91 0.32 0.78 0.55 0.95 1.6 0.38 2.4-0.55 0.78-1.6 0.95-2.4 0.38-0.78-0.55-0.95-1.6-0.38-2.4 0.34-0.48 0.91-0.74 1.5-0.7zm27 0c0.59-0.042 1.2 0.22 1.5 0.7 0.57 0.77 0.4 1.8-0.38 2.4-0.77 0.57-1.8 0.4-2.4-0.38-0.57-0.77-0.4-1.8 0.38-2.4 0.27-0.19 0.58-0.3 0.91-0.32z\"/>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const DevicesIcon = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 120 100\">\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M41.212 87.309c0-.335.271-.606.606-.606H76.97a.606.606 0 0 1 0 1.212H41.818a.606.606 0 0 1-.606-.606Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M53.176 87.31V76.542h1.212V87.31h-1.212Zm12.103 0V76.542h1.212V87.31h-1.212Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M16.363 29.733a8.485 8.485 0 0 1 8.485-8.485h70.303a8.485 8.485 0 0 1 8.485 8.485v3.637h-2.424v-3.637a6.06 6.06 0 0 0-6.06-6.06H24.847a6.06 6.06 0 0 0-6.06 6.06v9.697h-2.425v-9.697Zm9.091 44.849H76.97v2.424H25.454v-2.424Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M21.212 30.34c0-2.344 1.9-4.243 4.242-4.243h69.091c2.343 0 4.243 1.9 4.243 4.242v3.03h-1.212v-3.03a3.03 3.03 0 0 0-3.03-3.03H25.453a3.03 3.03 0 0 0-3.03 3.03v9.091h-1.212v-9.09Zm4.242 40.605H76.97v1.212H25.454v-1.212Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M75.758 38.218a6.06 6.06 0 0 1 6.06-6.06h32.122a6.06 6.06 0 0 1 6.06 6.06v48.485a6.06 6.06 0 0 1-6.06 6.06H81.818a6.06 6.06 0 0 1-6.06-6.06V38.218Zm6.06-3.636a3.636 3.636 0 0 0-3.636 3.636v48.485a3.636 3.636 0 0 0 3.636 3.636h32.122a3.636 3.636 0 0 0 3.636-3.636V38.218a3.636 3.636 0 0 0-3.636-3.636H81.818Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      d=\"M99.394 87.31a1.212 1.212 0 1 1-2.424 0 1.212 1.212 0 0 1 2.424 0Z\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M20.606 40.642H6.061a3.636 3.636 0 0 0-3.637 3.636V80.64a3.636 3.636 0 0 0 3.637 3.637h14.545a3.636 3.636 0 0 0 3.636-3.637V44.278a3.636 3.636 0 0 0-3.636-3.636ZM6.061 38.217A6.06 6.06 0 0 0 0 44.277v36.364a6.06 6.06 0 0 0 6.06 6.061h14.546a6.06 6.06 0 0 0 6.06-6.06V44.277a6.06 6.06 0 0 0-6.06-6.06H6.061Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M12.345 43.556c0-.334.272-.606.606-.606h.753a.606.606 0 1 1 0 1.212h-.753a.606.606 0 0 1-.606-.606Z\"\n      clip-rule=\"evenodd\"\n    />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const LockIcon = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 100\" fill=\"none\">\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M27.5 48.218a9 9 0 0 1 9-9h47a9 9 0 0 1 9 9v7.5h-2v-7.5a7 7 0 0 0-7-7h-47a7 7 0 0 0-7 7v7.5h-2v-7.5Zm2 30.75v3.75a7 7 0 0 0 7 7h47a7 7 0 0 0 7-7v-3.75h2v3.75a9 9 0 0 1-9 9h-47a9 9 0 0 1-9-9v-3.75h2Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M60 10.718c-11.144 0-20 7.942-20 17.414v11.586h-2V28.132C38 17.317 48.007 8.718 60 8.718c11.991 0 22 8.552 22 19.414v11.586h-2V28.132c0-9.516-8.855-17.414-20-17.414ZM32.028 61.28a1 1 0 0 1 1 1v5.678a1 1 0 1 1-2 0v-5.679a1 1 0 0 1 1-1Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M38.452 65.897a1 1 0 0 1-.647 1.258l-5.472 1.755a1 1 0 1 1-.61-1.904l5.471-1.755a1 1 0 0 1 1.258.646Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M31.442 67.147a1 1 0 0 1 1.396.225l3.356 4.646a1 1 0 0 1-1.622 1.171l-3.355-4.646a1 1 0 0 1 .225-1.396Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M32.607 67.143a1 1 0 0 1 .236 1.394l-3.304 4.646a1 1 0 0 1-1.63-1.159l3.304-4.646a1 1 0 0 1 1.394-.235Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M25.656 65.895a1 1 0 0 1 1.26-.644l5.42 1.755a1 1 0 1 1-.616 1.903l-5.42-1.755a1 1 0 0 1-.644-1.26ZM50.508 61.28a1 1 0 0 1 1 1v5.678a1 1 0 1 1-2 0v-5.679a1 1 0 0 1 1-1Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M56.88 65.895a1 1 0 0 1-.644 1.26l-5.42 1.754a1 1 0 1 1-.616-1.903l5.42-1.755a1 1 0 0 1 1.26.644Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M49.922 67.147a1 1 0 0 1 1.397.225l3.355 4.646a1 1 0 1 1-1.621 1.171l-3.356-4.646a1 1 0 0 1 .225-1.396Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M51.093 67.147a1 1 0 0 1 .226 1.396l-3.356 4.646a1 1 0 0 1-1.621-1.17l3.355-4.647a1 1 0 0 1 1.396-.225Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M44.136 65.895a1 1 0 0 1 1.26-.644l5.42 1.755a1 1 0 1 1-.616 1.903l-5.42-1.755a1 1 0 0 1-.644-1.26ZM62.568 72.603a1 1 0 0 1 1-1h10.84a1 1 0 1 1 0 2h-10.84a1 1 0 0 1-1-1ZM81.049 72.603a1 1 0 0 1 1-1h10.84a1 1 0 1 1 0 2H82.05a1 1 0 0 1-1-1Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" d=\"M17.5 67.468c0-7.042 5.708-12.75 12.75-12.75h59.5c7.041 0 12.75 5.708 12.75 12.75s-5.709 12.75-12.75 12.75h-59.5c-7.042 0-12.75-5.708-12.75-12.75Zm12.75-10.75c-5.937 0-10.75 4.813-10.75 10.75s4.813 10.75 10.75 10.75h59.5c5.937 0 10.75-4.813 10.75-10.75s-4.813-10.75-10.75-10.75h-59.5Z\" clip-rule=\"evenodd\"/>\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const UserLockIcon = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 120 100\">\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M0 18.207a7.798 7.798 0 0 1 7.798-7.798H89.38a7.798 7.798 0 0 1 7.799 7.798v8.763h-2.4v-8.763a5.399 5.399 0 0 0-5.398-5.399H7.797A5.399 5.399 0 0 0 2.4 18.207v49.19a5.399 5.399 0 0 0 5.4 5.398h9.483v2.4H7.798A7.798 7.798 0 0 1 0 67.396V18.207Zm49.378 54.588h13.498v2.4H49.378v-2.4Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M88.78 58.398c8.946 0 16.197-7.251 16.197-16.196s-7.251-16.197-16.196-16.197-16.197 7.252-16.197 16.197 7.252 16.196 16.197 16.196Zm0 2.4c10.27 0 18.597-8.326 18.597-18.596s-8.326-18.596-18.596-18.596-18.596 8.326-18.596 18.596S78.51 60.798 88.78 60.798Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M61.005 87.192h54.28c1.303 0 1.833-.344 2.01-.53.128-.134.396-.517.226-1.586-2.187-13.74-14.213-24.278-28.752-24.278S62.203 71.337 60.017 85.076c-.09.57.026 1.226.279 1.662.115.2.23.305.316.359.072.046.184.095.393.095Zm0 2.4h54.28c3.346 0 5.104-1.76 4.605-4.893-2.371-14.903-15.402-26.3-31.121-26.3-15.72 0-28.75 11.397-31.122 26.3-.337 2.121.744 4.893 3.358 4.893Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M77.983 17.607a1.2 1.2 0 0 1-1.2-1.2v-.6a1.2 1.2 0 1 1 2.4 0v.6a1.2 1.2 0 0 1-1.2 1.2Zm5.399 0a1.2 1.2 0 0 1-1.2-1.2v-.498a1.2 1.2 0 1 1 2.4 0v.498a1.2 1.2 0 0 1-1.2 1.2Zm5.398 0a1.2 1.2 0 0 1-1.2-1.2v-.498a1.2 1.2 0 1 1 2.4 0v.498a1.2 1.2 0 0 1-1.2 1.2Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M95.083 20.607H0v-1.2h95.083v1.2ZM15.12 54.571a5.999 5.999 0 0 1 6-5.998h23.23a5.999 5.999 0 0 1 6 5.998V57.2h-2.4v-2.63a3.6 3.6 0 0 0-3.6-3.599H21.12a3.6 3.6 0 0 0-3.6 3.6v2.627h-2.4V54.57Zm2.4 15.825v2.693a3.6 3.6 0 0 0 3.6 3.599h23.23a3.6 3.6 0 0 0 3.6-3.6v-2.692h2.4v2.693a5.999 5.999 0 0 1-6 5.998H21.12a5.999 5.999 0 0 1-6-5.998v-2.693h2.4Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-primary\"\n      fill-rule=\"evenodd\"\n      d=\"M32.479 33.255c-5.31 0-9.641 4.332-9.641 9.64v6.822h-2.4v-6.821c0-6.635 5.406-12.04 12.04-12.04 6.633 0 12.041 5.377 12.041 12.04v6.821h-2.4v-6.821c0-5.334-4.33-9.641-9.64-9.641Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M10.498 63.797a7.498 7.498 0 0 1 7.498-7.498h30.593a7.498 7.498 0 0 1 0 14.997H17.996a7.498 7.498 0 0 1-7.498-7.499Zm43.79 0a5.699 5.699 0 0 0-5.699-5.699H17.996a5.699 5.699 0 0 0 0 11.398h30.593a5.699 5.699 0 0 0 5.7-5.699Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M19.02 60.669a.6.6 0 0 1 .6.6v2.959a.6.6 0 0 1-1.2 0v-2.96a.6.6 0 0 1 .6-.6Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M22.443 63.13a.6.6 0 0 1-.388.755l-2.851.914a.6.6 0 1 1-.367-1.142l2.852-.915a.6.6 0 0 1 .754.388Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M18.67 63.742a.6.6 0 0 1 .837.135l1.748 2.42a.6.6 0 0 1-.972.703l-1.749-2.42a.6.6 0 0 1 .136-.838Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M19.368 63.739a.6.6 0 0 1 .142.837l-1.722 2.42a.6.6 0 0 1-.978-.695l1.722-2.42a.6.6 0 0 1 .836-.142Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M15.626 63.129a.6.6 0 0 1 .755-.386l2.825.914a.6.6 0 0 1-.37 1.142l-2.824-.915a.6.6 0 0 1-.386-.755Zm13.025-2.46a.6.6 0 0 1 .6.6v2.959a.6.6 0 1 1-1.2 0v-2.96a.6.6 0 0 1 .6-.6Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M32.046 63.129a.6.6 0 0 1-.386.755l-2.824.915a.6.6 0 1 1-.37-1.142l2.825-.914a.6.6 0 0 1 .755.386Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M28.3 63.742a.6.6 0 0 1 .837.135l1.749 2.42a.6.6 0 0 1-.973.703l-1.748-2.42a.6.6 0 0 1 .135-.838Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M29.002 63.742a.6.6 0 0 1 .136.837L27.387 67a.6.6 0 0 1-.972-.702l1.749-2.421a.6.6 0 0 1 .837-.136Z\"\n      clip-rule=\"evenodd\"\n    />\n    <path\n      class=\"tw-fill-art-accent\"\n      fill-rule=\"evenodd\"\n      d=\"M25.256 63.129a.6.6 0 0 1 .755-.386l2.825.914a.6.6 0 1 1-.37 1.142l-2.824-.915a.6.6 0 0 1-.386-.755Zm9.601 3.52a.6.6 0 0 1 .6-.6h5.649a.6.6 0 0 1 0 1.2h-5.649a.6.6 0 0 1-.6-.6Zm9.63 0a.6.6 0 0 1 .6-.6h5.65a.6.6 0 0 1 0 1.2h-5.65a.6.6 0 0 1-.6-.6Z\"\n      clip-rule=\"evenodd\"\n    />\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const UserVerificationBiometricsIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"63\" height=\"65\" fill=\"none\">\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M6.539 13.582C12.113 5.786 21.228.7 31.529.7c15.02 0 27.512 10.808 30.203 25.086a2 2 0 1 1-3.93.74C55.457 14.093 44.578 4.7 31.528 4.7c-8.952 0-16.879 4.416-21.736 11.21a2 2 0 0 1-3.254-2.327Zm-.955 5.384A2 2 0 0 1 6.7 21.565a26.876 26.876 0 0 0-1.91 9.988v8.833a2 2 0 1 1-4 0v-8.833c0-4.05.778-7.923 2.195-11.472a2 2 0 0 1 2.599-1.115Zm54.685 10.587a2 2 0 0 1 2 2v8.244a2 2 0 0 1-4 0v-8.244a2 2 0 0 1 2-2Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M8.476 21.293c3.898-8.848 12.751-15.032 23.053-15.032a25.08 25.08 0 0 1 14.296 4.448A2 2 0 1 1 43.552 14a21.08 21.08 0 0 0-12.023-3.739c-8.66 0-16.11 5.196-19.392 12.645a2 2 0 1 1-3.661-1.613Zm39.328-6.481a2 2 0 0 1 2.82.211 25.062 25.062 0 0 1 6.082 16.4v19.629a2 2 0 1 1-4 0V31.423c0-5.27-1.925-10.085-5.114-13.79a2 2 0 0 1 .212-2.821ZM8.728 26.786A2 2 0 0 1 10.49 29c-.09.794-.137 1.603-.137 2.423v19.629a2 2 0 1 1-4 0V31.423c0-.972.055-1.931.163-2.876a2 2 0 0 1 2.213-1.76Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M12.223 31.097c0-10.648 8.647-19.273 19.306-19.273s19.306 8.625 19.306 19.273v25.321a2 2 0 1 1-4 0v-25.32c0-8.433-6.85-15.274-15.306-15.274s-15.305 6.841-15.305 15.273v9.913a2 2 0 1 1-4 0v-9.913Zm2 13.409a2 2 0 0 1 2 2v9.912a2 2 0 1 1-4 0v-9.912a2 2 0 0 1 2-2Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M24.698 19.044a13.418 13.418 0 0 1 6.831-1.857c7.411 0 13.434 5.984 13.434 13.385v7.851a2 2 0 1 1-4 0v-7.851c0-5.175-4.216-9.385-9.434-9.385a9.419 9.419 0 0 0-4.8 1.304 2 2 0 0 1-2.031-3.447Zm-1.76 3.755a2 2 0 0 1 .613 2.762 9.296 9.296 0 0 0-1.456 5.01v29.64a2 2 0 0 1-4 0v-29.64c0-2.63.763-5.087 2.081-7.158a2 2 0 0 1 2.761-.614Zm20.025 20.298a2 2 0 0 1 2 2v15.114a2 2 0 1 1-4 0V45.097a2 2 0 0 1 2-2Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M23.967 30.18c0-4.163 3.408-7.497 7.562-7.497s7.563 3.334 7.563 7.496v12.563a2 2 0 0 1-4 0V30.179c0-1.908-1.573-3.496-3.563-3.496-1.99 0-3.562 1.588-3.562 3.496v31.603a2 2 0 0 1-4 0V30.179ZM37.092 46.04a2 2 0 0 1 2 2v13.74a2 2 0 0 1-4 0v-13.74a2 2 0 0 1 2-2Z\" clip-rule=\"evenodd\"/>\n    <path class=\"tw-fill-secondary-600\" fill=\"#89929F\" fill-rule=\"evenodd\" d=\"M31.546 28.375a2 2 0 0 1 2 2v4.908a2 2 0 1 1-4 0v-4.908a2 2 0 0 1 2-2Zm-.018 10.334a2 2 0 0 1 2.001 1.999l.017 22.25a2 2 0 1 1-4 .003l-.017-22.25a2 2 0 0 1 1.999-2.002Z\" clip-rule=\"evenodd\"/>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const WaveIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 120 100\">\n  <path\n    class=\"tw-stroke-art-primary\"\n    stroke-linejoin=\"round\"\n    stroke-width=\"2\"\n    d=\"M48.603 49.08c.188-.341.365-.688.566-1.022 4.409-7.312 8.826-14.62 13.228-21.936 2.131-3.54.316-7.806-3.688-8.72-2.335-.533-4.776.562-6.204 2.844-2.924 4.673-5.823 9.362-8.732 14.043-2.2 3.542-4.384 7.094-6.609 10.62-1.844 2.926-4.231 5.315-7.246 7.035-1.851 1.057-2.841.543-3.122-1.554-.548-4.105-1.184-8.194-2.445-12.155-1.625-5.1-6.98-7.558-11.909-5.469-1.134.482-1.361.949-1.091 2.137.703 3.086 1.53 6.152 2.06 9.27.79 4.638.403 9.275-.4 13.894a90.84 90.84 0 0 0-1.352 14.404c-.062 4.798 1.476 8.947 4.824 12.337 3.655 3.702 7.422 7.313 11.933 9.989 7.128 4.23 14.348 4.162 21.605.282 3.89-2.08 7.273-4.84 10.478-7.827 8.691-8.101 5.227-5.375 16.072-11.488 4.7-2.65 9.434-5.242 14.15-7.863 2.708-1.505 3.593-4.521 2.146-7.276-1.4-2.666-4.426-3.627-7.186-2.228-6.594 3.345-13.174 6.717-19.76 10.076-.325.165-.652.323-1.085.344.371-.304.734-.619 1.116-.91 7.578-5.801 15.158-11.601 22.737-17.401 1.86-1.425 2.714-3.3 2.344-5.624-.36-2.26-1.707-3.769-3.873-4.483-1.897-.626-3.628-.245-5.257.928-7.792 5.607-15.604 11.188-23.41 16.776-.274.196-.551.389-.974.452.234-.278.454-.572.705-.835 7.24-7.632 14.493-15.25 21.72-22.893 3.354-3.549 1.622-9.313-3.127-10.382-2.274-.512-4.275.06-5.936 1.796-7.056 7.373-14.134 14.721-21.197 22.087-.293.306-.51.686-.764 1.031l-.317-.278Z\"\n  />\n  <path\n    class=\"tw-stroke-art-primary\"\n    stroke-linecap=\"round\"\n    stroke-width=\"2\"\n    d=\"M49.237 2.496c-13.4 0-24.262 10.863-24.262 24.262\"\n  />\n  <path\n    class=\"tw-stroke-art-accent\"\n    stroke-linecap=\"round\"\n    d=\"M46.57 8.895c-8.393 0-15.196 6.804-15.196 15.197\"\n  />\n  <path\n    class=\"tw-stroke-art-primary\"\n    stroke-linecap=\"round\"\n    stroke-width=\"2\"\n    d=\"M84.49 93.027c13.4 0 24.262-10.863 24.262-24.262\"\n  />\n  <path\n    class=\"tw-stroke-art-accent\"\n    stroke-linecap=\"round\"\n    d=\"M87.157 86.628c8.393 0 15.197-6.804 15.197-15.197\"\n  />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const VaultIcon = svgIcon`\n  <svg viewBox=\"0 0 120 100\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <rect x=\"5.61279\" y=\"1.5\" width=\"108.775\" height=\"89.1503\" rx=\"9.25741\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <path d=\"M49.5854 61.4941L49.5854 70.4652\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M49.5854 21.6851L49.5854 30.6562\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M38.6827 56.978L32.3392 63.3215\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M66.8324 28.8286L60.4889 35.1721\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M38.6827 35.1721L32.3392 28.8286\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M66.8324 63.3215L60.4889 56.978\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M74.1788 46.0513L65.2077 46.0513\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <path d=\"M33.6777 46.0513L24.7066 46.0514\" class=\"tw-stroke-art-primary\" stroke-width=\"2\" stroke-linecap=\"round\"/>\n    <ellipse cx=\"49.5855\" cy=\"46.0513\" rx=\"15.0433\" ry=\"15.0433\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <ellipse cx=\"49.5855\" cy=\"46.0513\" rx=\"10.4146\" ry=\"10.4146\" class=\"tw-stroke-art-accent\" />\n    <path d=\"M14.0227 90.6504V95.0286C14.0227 96.9458 15.577 98.5001 17.4942 98.5001H27.9327C29.8499 98.5001 31.4042 96.9458 31.4042 95.0286V90.6504\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <path d=\"M88.595 90.6504V95.0286C88.595 96.9458 90.1492 98.5001 92.0665 98.5001H102.505C104.422 98.5001 105.976 96.9458 105.976 95.0286V90.6504\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <path d=\"M105.977 32.3381L107.588 32.3381C108.866 32.3381 109.902 31.302 109.902 30.0238L109.902 17.271C109.902 15.9928 108.866 14.9566 107.588 14.9566L105.977 14.9566\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <path d=\"M105.977 77.1936L107.588 77.1936C108.866 77.1936 109.902 76.1574 109.902 74.8793L109.902 62.1265C109.902 60.8483 108.866 59.8121 107.588 59.8121L105.977 59.8121\" class=\"tw-stroke-art-primary\" stroke-width=\"2\"/>\n    <rect x=\"14.0227\" y=\"9.9104\" width=\"91.9537\" height=\"72.8902\" rx=\"4.6287\" class=\"tw-stroke-art-accent\" />\n    <path d=\"M101.08 61.8082V75.5593C101.08 76.8375 100.044 77.8737 98.7654 77.8737H45.8796M19.4989 28.7961V17.122C19.4989 15.8438 20.5351 14.8076 21.8133 14.8076H74.5501\" class=\"tw-stroke-art-accent\"  stroke-linecap=\"round\"/>\n  </svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RegistrationUserAddIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\"  viewBox=\"0 0 120 100\" fill=\"none\">\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M0 21.627a7.798 7.798 0 0 1 7.798-7.798H89.38a7.798 7.798 0 0 1 7.799 7.798v8.764h-2.4v-8.764a5.399 5.399 0 0 0-5.398-5.398H7.797A5.399 5.399 0 0 0 2.4 21.627v49.19a5.399 5.399 0 0 0 5.4 5.399h9.483v2.399H7.798A7.798 7.798 0 0 1 0 70.817v-49.19Zm49.378 54.589h13.498v2.399H49.378v-2.4Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\"\n        d=\"M88.78 61.819c8.946 0 16.197-7.252 16.197-16.197s-7.251-16.196-16.196-16.196-16.197 7.251-16.197 16.196S79.836 61.82 88.781 61.82Zm0 2.4c10.27 0 18.597-8.326 18.597-18.597 0-10.27-8.326-18.596-18.596-18.596s-18.596 8.326-18.596 18.596S78.51 64.218 88.78 64.218Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\"\n        d=\"M61.005 90.612h54.28c1.303 0 1.833-.344 2.01-.53.128-.134.396-.517.226-1.586-2.187-13.74-14.213-24.278-28.752-24.278S62.203 74.757 60.017 88.496c-.09.569.026 1.226.279 1.662.115.199.23.305.316.359.072.045.184.095.393.095Zm0 2.4h54.28c3.346 0 5.104-1.76 4.605-4.894-2.371-14.903-15.402-26.3-31.121-26.3-15.72 0-28.75 11.397-31.122 26.3-.337 2.122.744 4.894 3.358 4.894Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-accent\"  fill-rule=\"evenodd\"\n        d=\"M77.983 21.027a1.2 1.2 0 0 1-1.2-1.2v-.6a1.2 1.2 0 0 1 2.4 0v.6a1.2 1.2 0 0 1-1.2 1.2ZM83.382 21.027a1.2 1.2 0 0 1-1.2-1.2v-.497a1.2 1.2 0 1 1 2.4 0v.498a1.2 1.2 0 0 1-1.2 1.2ZM88.78 21.027a1.2 1.2 0 0 1-1.2-1.2v-.497a1.2 1.2 0 1 1 2.4 0v.498a1.2 1.2 0 0 1-1.2 1.2Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M95.083 24.027H0v-1.2h95.083v1.2Z\"\n        clip-rule=\"evenodd\" />\n    <g clip-path=\"url(#a)\">\n        <path class=\"tw-fill-art-accent\" \n            d=\"M32.727 93.11a16.908 16.908 0 0 1-9.477-2.91 17.228 17.228 0 0 1-6.284-7.752 17.467 17.467 0 0 1-.97-9.98 17.343 17.343 0 0 1 4.669-8.843 17.002 17.002 0 0 1 8.735-4.727 16.867 16.867 0 0 1 9.856.982 17.113 17.113 0 0 1 7.656 6.362 17.419 17.419 0 0 1 2.875 9.596 17.4 17.4 0 0 1-5.003 12.208 16.977 16.977 0 0 1-12.057 5.065Zm0-32.245c-2.924 0-5.784.877-8.216 2.523a14.932 14.932 0 0 0-5.447 6.72 15.148 15.148 0 0 0-.84 8.652 15.028 15.028 0 0 0 4.047 7.667 14.729 14.729 0 0 0 7.572 4.098c2.87.578 5.842.281 8.545-.851a14.827 14.827 0 0 0 6.637-5.515 15.11 15.11 0 0 0 2.493-8.319 15.087 15.087 0 0 0-4.336-10.583 14.714 14.714 0 0 0-10.453-4.39l-.002-.002Zm8.82 14.168h-6.9a1.105 1.105 0 0 1-.793-.333 1.149 1.149 0 0 1-.328-.802v-6.99a.81.81 0 0 0-.233-.568.793.793 0 0 0-1.357.569v6.985a1.144 1.144 0 0 1-.328.802 1.115 1.115 0 0 1-.793.332h-6.907a.788.788 0 0 0-.562.237.812.812 0 0 0 0 1.139.79.79 0 0 0 .562.235h6.899c.296 0 .582.12.791.333.21.212.329.5.329.8v6.99c0 .213.084.418.232.57a.788.788 0 0 0 1.125 0 .809.809 0 0 0 .232-.57v-6.98c0-.301.119-.59.329-.802.21-.212.494-.332.79-.332h6.906a.795.795 0 0 0 .795-.806.81.81 0 0 0-.232-.569.791.791 0 0 0-.563-.236l.004-.004h.002Z\" />\n    </g>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RegistrationLockAltIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 100\" fill=\"none\">\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M47.048 77.093a1 1 0 0 1 1 1v5.811a1 1 0 0 1-2 0v-5.811a1 1 0 0 1 1-1Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M53.547 81.8a1 1 0 0 1-.643 1.26l-5.548 1.795a1 1 0 1 1-.616-1.902l5.547-1.797a1 1 0 0 1 1.26.644Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M46.462 83.094a1 1 0 0 1 1.396.225l3.435 4.755a1 1 0 1 1-1.622 1.17l-3.434-4.754a1 1 0 0 1 .225-1.396Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M47.634 83.094a1 1 0 0 1 .225 1.396l-3.434 4.755a1 1 0 1 1-1.621-1.171l3.434-4.755a1 1 0 0 1 1.396-.225Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M40.549 81.8a1 1 0 0 1 1.26-.644l5.547 1.797a1 1 0 1 1-.617 1.902l-5.547-1.796a1 1 0 0 1-.643-1.26ZM65.91 77.093a1 1 0 0 1 1 1v5.811a1 1 0 0 1-2 0v-5.811a1 1 0 0 1 1-1Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M72.463 81.802a1 1 0 0 1-.647 1.258l-5.6 1.796a1 1 0 0 1-.611-1.904l5.6-1.796a1 1 0 0 1 1.258.646Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M65.325 83.094a1 1 0 0 1 1.396.225l3.434 4.755a1 1 0 0 1-1.621 1.17L65.1 84.49a1 1 0 0 1 .225-1.396Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M66.49 83.09a1 1 0 0 1 .235 1.394l-3.382 4.755a1 1 0 1 1-1.63-1.16l3.382-4.754a1 1 0 0 1 1.394-.236Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M59.41 81.8a1 1 0 0 1 1.26-.644l5.548 1.797a1 1 0 1 1-.616 1.902l-5.548-1.796a1 1 0 0 1-.643-1.26ZM77.5 88.5a1 1 0 0 1 1-1h11a1 1 0 1 1 0 2h-11a1 1 0 0 1-1-1ZM94.5 88.5a1 1 0 0 1 1-1h11a1 1 0 0 1 0 2h-11a1 1 0 0 1-1-1Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-accent\"  fill-rule=\"evenodd\"\n        d=\"M105 72.5H46c-5.799 0-10.5 4.701-10.5 10.5v.5C35.5 89.299 40.201 94 46 94h59c5.799 0 10.5-4.701 10.5-10.5V83c0-5.799-4.701-10.5-10.5-10.5Zm-59-2c-6.904 0-12.5 5.596-12.5 12.5v.5C33.5 90.404 39.096 96 46 96h59c6.904 0 12.5-5.596 12.5-12.5V83c0-6.904-5.596-12.5-12.5-12.5H46Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M30.5 42.5a7 7 0 0 0-7 7V85a7 7 0 0 0 7 7h9v2h-9a9 9 0 0 1-9-9V49.5a9 9 0 0 1 9-9h49a9 9 0 0 1 9 9v22.25h-2V49.5a7 7 0 0 0-7-7h-49Z\"\n        clip-rule=\"evenodd\" />\n    <path class=\"tw-fill-art-primary\"  fill-rule=\"evenodd\"\n        d=\"M54.75 5C43.592 5 34.5 14.056 34.5 25.15V41h-2V25.15C32.5 12.943 42.496 3 54.75 3 67.002 3 77 12.889 77 25.15V41h-2V25.15C75 14.005 65.91 5 54.75 5ZM51 54.158c0-1.996 1.543-3.658 3.5-3.658s3.5 1.662 3.5 3.658a3.722 3.722 0 0 1-1.201 2.758L56.8 57v6.106c0 1.298-1.006 2.395-2.3 2.395-1.294 0-2.3-1.097-2.3-2.395V57l.001-.083A3.722 3.722 0 0 1 51 54.158Zm3.5-2.658c-1.357 0-2.5 1.165-2.5 2.658a2.71 2.71 0 0 0 1.029 2.148l.231.18-.043.29c-.011.072-.017.147-.017.223v6.106c0 .795.606 1.395 1.3 1.395.694 0 1.3-.6 1.3-1.395V57c0-.076-.006-.15-.017-.224l-.043-.29.231-.179A2.71 2.71 0 0 0 57 54.158c0-1.493-1.143-2.658-2.5-2.658Z\"\n        clip-rule=\"evenodd\" />\n</svg>`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const SsoKeyIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 100\">\n  <path class=\"tw-fill-art-primary\" d=\"M28.573 23.888c6.488-8.225 16.56-13.51 27.87-13.51 15.454 0 28.595 9.864 33.446 23.62a23.969 23.969 0 0 1 2.844-.168c13.083 0 23.689 10.58 23.689 23.629 0 13.049-10.606 23.628-23.69 23.628H56.445v-2.393h36.289c11.757 0 21.289-9.507 21.289-21.236 0-11.728-9.532-21.235-21.29-21.235-1.182 0-2.34.096-3.469.28l-1.022.168-.315-.984c-4.26-13.293-16.746-22.915-31.482-22.915-10.712 0-20.234 5.083-26.274 12.968l-.31.404-.506.059C16.22 27.718 6.022 38.852 6.022 52.36c0 9.427 4.965 17.696 12.429 22.348l-.954 2.226C9.179 71.897 3.622 62.776 3.622 52.36c0-14.563 10.865-26.595 24.951-28.472Z\"/>\n  <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" d=\"M110.626 64.594a.598.598 0 0 1-.393-.75 18.278 18.278 0 0 0-1.008-13.552 18.326 18.326 0 0 0-7.607-8.025.597.597 0 0 1-.233-.814.6.6 0 0 1 .816-.232 19.52 19.52 0 0 1 8.103 8.548 19.474 19.474 0 0 1 1.074 14.434.6.6 0 0 1-.752.39ZM33.17 30.116c-13.02 0-23.574 10.524-23.574 23.506a.6.6 0 0 1-1.2 0c0-13.642 11.092-24.702 24.773-24.702a.6.6 0 1 1 0 1.196Z\" clip-rule=\"evenodd\"/>\n  <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" d=\"M81.528 43.563a1.198 1.198 0 0 0-1.058-1.306l-11.08-1.273c-.32-.037-.641.055-.892.256L46.665 58.748c-6.998-3.579-15.75-3.07-22.226 2.123-8.84 7.088-10.054 19.941-2.89 28.787 7.168 8.847 20.1 10.352 28.888 3.306 6.524-5.232 8.897-13.726 6.742-21.358l3.146-2.523c.25-.2.41-.493.441-.812l.509-5.09 5.29.609c.32.036.64-.056.89-.257.251-.2.41-.493.442-.812l.144-1.439 1.169.135c.317.036.635-.055.885-.252s.41-.485.446-.8l.612-5.372 5.764.663c.32.036.641-.056.892-.257l2.366-1.897c.25-.201.41-.494.441-.812l.912-9.127ZM68.289 58.904l-1.186-.136c-.32-.037-.64.056-.891.257-.25.2-.41.493-.441.812l-.144 1.438-5.29-.607c-.32-.037-.64.055-.891.256-.25.201-.41.494-.441.812l-.58 5.8-3.384 2.713a1.191 1.191 0 0 0-.389 1.3c2.266 6.94.211 14.794-5.724 19.553-7.726 6.196-19.152 4.902-25.508-2.944-6.357-7.848-5.248-19.19 2.527-25.425 5.886-4.72 13.952-5.061 20.26-1.516.43.241.962.198 1.345-.11l22.063-17.691 9.405 1.08-.745 7.458-1.583 1.27-6.46-.743a1.205 1.205 0 0 0-.885.251c-.25.198-.41.486-.446.801l-.612 5.371Z\" clip-rule=\"evenodd\"/>\n  <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" d=\"M35.251 78.67c2.144 2.647 1.721 6.453-.864 8.526-2.587 2.074-6.414 1.676-8.558-.97-2.137-2.638-1.78-6.405.865-8.525 2.653-2.127 6.468-1.61 8.557.97Zm-2.373 6.665c1.543-1.237 1.823-3.535.503-5.164-1.291-1.595-3.602-1.873-5.179-.609-1.584 1.271-1.829 3.528-.503 5.165 1.32 1.629 3.637 1.845 5.18.608Z\" clip-rule=\"evenodd\"/>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const TwoFactorTimeoutIcon = svgIcon`\n<svg viewBox=\"0 0 120 101\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <path class=\"tw-fill-primary-600\" d=\"M36.1675 38.8485C40.71 28.9376 50.8182 22.0428 62.554 22.0428C78.5399 22.0428 91.499 34.8328 91.499 50.6101C91.499 66.3874 78.5399 79.1774 62.554 79.1774C50.5663 79.1774 40.2756 71.9847 35.8807 61.7246C35.3972 60.5957 34.0779 60.0675 32.9341 60.5447C31.7903 61.022 31.255 62.324 31.7386 63.4529C36.8123 75.2975 48.6962 83.6158 62.554 83.6158C81.0235 83.6158 95.9961 68.8387 95.9961 50.6101C95.9961 32.3816 81.0235 17.6044 62.554 17.6044C48.3746 17.6044 36.2605 26.3121 31.3944 38.6029L27.8472 32.2954C27.2902 31.305 26.0358 30.9537 25.0454 31.5107C24.055 32.0676 23.7036 33.3221 24.2606 34.3125L30.0681 44.6391C30.6251 45.6295 31.8795 45.9809 32.8699 45.4239L43.1965 39.6164C44.187 39.0594 44.5383 37.805 43.9813 36.8146C43.4243 35.8242 42.1699 35.4728 41.1795 36.0298L36.1675 38.8485Z\" />\n  <path class=\"tw-fill-primary-600\" d=\"M72.2625 60.9479C71.8946 61.1944 71.4577 61.3265 71.0118 61.3265C70.4411 61.3265 69.8927 61.1086 69.4781 60.7189L60.6723 52.4767C60.4538 52.272 60.2799 52.0232 60.1595 51.7502C60.0391 51.4772 59.9767 51.1822 59.9767 50.8828V30.3303C59.9767 29.7469 60.2108 29.1877 60.6299 28.7739C61.049 28.36 61.6153 28.1288 62.206 28.1288C62.7968 28.1288 63.363 28.3622 63.7822 28.7739C64.2013 29.1855 64.4353 29.7469 64.4353 30.3303V49.9318L72.5456 57.5268C72.8688 57.8306 73.094 58.2225 73.1899 58.6518C73.2857 59.081 73.2478 59.5301 73.0829 59.9396C72.9179 60.3491 72.6303 60.7013 72.2625 60.9479Z\" />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RegistrationCheckEmailIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 100\" fill=\"none\">\n    <path class=\"tw-stroke-art-primary\"  stroke-linecap=\"round\" stroke-width=\"2.477\"\n        d=\"M104.552 42.242v12.023M48.415 17.31l6.51-4.858a7.43 7.43 0 0 1 8.984.074l1.172.904M24.844 34.897l-6.857 5.116A7.43 7.43 0 0 0 15 45.97v42.366a7.43 7.43 0 0 0 7.43 7.43h74.691a7.43 7.43 0 0 0 7.431-7.43V64.291\" />\n    <path class=\"tw-stroke-art-primary\"  stroke-linecap=\"round\" stroke-width=\"2.477\"\n        d=\"M25.48 50.5V20.058a2.477 2.477 0 0 1 2.476-2.477h32.091\" />\n    <path class=\"tw-stroke-art-accent\" stroke-linecap=\"round\" stroke-width=\"2.477\"\n        d=\"M33.778 27.71h15.674M33.778 37.037h15.217M33.778 46.364h17.728M33.778 55.691h23.206\" />\n    <path class=\"tw-stroke-art-primary\" stroke-width=\"2.477\"\n        d=\"M102.645 93.86 74.211 67.614a12.384 12.384 0 0 0-8.4-3.284H52.41c-3.216 0-6.306 1.251-8.616 3.488L16.904 93.86\" />\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-width=\"2.477\" d=\"m71.36 64.73 8.904-5.106\" />\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-width=\"2.477\" d=\"M1.238-1.238h37.47\"\n        transform=\"matrix(.85856 .5127 .51278 -.85852 15.476 43.85)\" />\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.477\"\n        d=\"M104.722 34.286c0 13.922-11.286 25.207-25.209 25.207-13.922 0-25.208-11.285-25.208-25.207 0-13.92 11.286-25.206 25.208-25.206 13.923 0 25.209 11.285 25.209 25.206Z\" />\n    <path class=\"tw-stroke-art-accent\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.238\"\n        d=\"M101.346 34.287c0 11.972-9.82 21.678-21.932 21.678m0-43.355c-12.113 0-21.932 9.705-21.932 21.677\" />\n    <path class=\"tw-stroke-art-primary\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2.477\"\n        d=\"m99.636 49.689 3.853 3.852 14.322 14.32a3.096 3.096 0 0 1 0 4.379l-.303.303a3.097 3.097 0 0 1-4.379 0l-14.322-14.32-3.852-3.853\" />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const RegistrationExpiredLinkIcon = svgIcon`\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 120 100\" fill=\"none\">\n    <path class=\"tw-art-primary\" fill=\"#175DDC\"\n        d=\"M36.167 38.348c4.543-9.911 14.651-16.806 26.387-16.806 15.986 0 28.945 12.79 28.945 28.567 0 15.777-12.96 28.568-28.945 28.568-11.988 0-22.278-7.193-26.673-17.453-.484-1.13-1.803-1.657-2.947-1.18a2.209 2.209 0 0 0-1.195 2.908c5.073 11.845 16.957 20.163 30.815 20.163 18.47 0 33.442-14.777 33.442-33.006 0-18.228-14.972-33.006-33.442-33.006-14.18 0-26.294 8.708-31.16 20.999l-3.547-6.307a2.057 2.057 0 0 0-3.586 2.017l5.807 10.326a2.057 2.057 0 0 0 2.802.785l10.327-5.808a2.057 2.057 0 1 0-2.018-3.586l-5.012 2.819Z\" />\n    <path class=\"tw-art-primary\" fill=\"#175DDC\"\n        d=\"M72.263 60.447a2.25 2.25 0 0 1-2.785-.229l-8.806-8.242a2.229 2.229 0 0 1-.512-.727 2.148 2.148 0 0 1-.183-.867V29.829c0-.583.234-1.142.653-1.556a2.251 2.251 0 0 1 3.152 0c.42.412.653.973.653 1.556v19.602l8.11 7.595a2.178 2.178 0 0 1 .537 2.413c-.164.41-.452.761-.82 1.008Z\" />\n</svg>`;\n","<main\n  class=\"tw-flex tw-w-full tw-mx-auto tw-flex-col tw-bg-background-alt tw-px-6 tw-pt-6 tw-pb-4 tw-text-main\"\n  [ngClass]=\"{\n    'tw-min-h-screen': clientType === 'web',\n    'tw-min-h-full': clientType === 'browser' || clientType === 'desktop',\n  }\"\n>\n  <a\n    *ngIf=\"!hideLogo\"\n    [routerLink]=\"['/']\"\n    class=\"tw-w-[175px] tw-block tw-mb-12 [&>*]:tw-align-top\"\n  >\n    <bit-icon [icon]=\"logo\"></bit-icon>\n  </a>\n\n  <div\n    class=\"tw-text-center tw-mb-6\"\n    [ngClass]=\"{ 'tw-max-w-md tw-mx-auto': titleAreaMaxWidth === 'md' }\"\n  >\n    <div class=\"tw-mx-auto tw-max-w-28 sm:tw-max-w-32\">\n      <bit-icon [icon]=\"icon\"></bit-icon>\n    </div>\n\n    <ng-container *ngIf=\"title\">\n      <!-- Small screens -->\n      <h1 bitTypography=\"h3\" class=\"tw-mt-2 sm:tw-hidden\">\n        {{ title }}\n      </h1>\n      <!-- Medium to Larger screens -->\n      <h1 bitTypography=\"h2\" class=\"tw-mt-2 tw-hidden sm:tw-block\">\n        {{ title }}\n      </h1>\n    </ng-container>\n\n    <div *ngIf=\"subtitle\" class=\"tw-text-sm sm:tw-text-base\">{{ subtitle }}</div>\n  </div>\n\n  <div\n    class=\"tw-grow tw-w-full tw-max-w-md tw-mx-auto tw-flex tw-flex-col tw-items-center sm:tw-min-w-[28rem]\"\n    [ngClass]=\"{ 'tw-max-w-md': maxWidth === 'md', 'tw-max-w-3xl': maxWidth === '3xl' }\"\n  >\n    <div\n      class=\"tw-rounded-2xl tw-mb-10 tw-mx-auto tw-w-full sm:tw-bg-background sm:tw-border sm:tw-border-solid sm:tw-border-secondary-300 sm:tw-p-8\"\n    >\n      <ng-content></ng-content>\n    </div>\n    <ng-content select=\"[slot=secondary]\"></ng-content>\n  </div>\n\n  <footer *ngIf=\"!hideFooter\" class=\"tw-text-center tw-mt-6\">\n    <div *ngIf=\"showReadonlyHostname\" bitTypography=\"body2\">\n      {{ \"accessing\" | i18n }} {{ hostname }}\n    </div>\n    <ng-container *ngIf=\"!showReadonlyHostname\">\n      <ng-content select=\"[slot=environment-selector]\"></ng-content>\n    </ng-container>\n    <ng-container *ngIf=\"!hideYearAndVersion\">\n      <div bitTypography=\"body2\">Vaultwarden Web</div>\n      <div bitTypography=\"body2\">Version {{ version }}</div>\n      <br />\n      <div class=\"small\">\n        A modified version of the Bitwarden&reg; Web Vault for Vaultwarden (an unofficial rewrite of\n        the Bitwarden&reg; server).<br />\n        Vaultwarden is not associated with the Bitwarden&reg; project nor Bitwarden Inc.\n      </div>\n    </ng-container>\n  </footer>\n</main>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, HostBinding, Input, OnChanges, OnInit, SimpleChanges } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { IconModule, Icon } from \"../../../../components/src/icon\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { SharedModule } from \"../../../../components/src/shared\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { TypographyModule } from \"../../../../components/src/typography\";\nimport { BitwardenLogo, BitwardenShield } from \"../icons\";\n\n@Component({\n  standalone: true,\n  selector: \"auth-anon-layout\",\n  templateUrl: \"./anon-layout.component.html\",\n  imports: [IconModule, CommonModule, TypographyModule, SharedModule, RouterModule],\n})\nexport class AnonLayoutComponent implements OnInit, OnChanges {\n  @HostBinding(\"class\")\n  get classList() {\n    // AnonLayout should take up full height of parent container for proper footer placement.\n    return [\"tw-h-full\"];\n  }\n\n  @Input() title: string;\n  @Input() subtitle: string;\n  @Input() icon: Icon;\n  @Input() showReadonlyHostname: boolean;\n  @Input() hideLogo: boolean = false;\n  @Input() hideFooter: boolean = false;\n\n  /**\n   * Max width of the title area content\n   *\n   * @default null\n   */\n  @Input() titleAreaMaxWidth?: \"md\";\n\n  /**\n   * Max width of the layout content\n   *\n   * @default 'md'\n   */\n  @Input() maxWidth: \"md\" | \"3xl\" = \"md\";\n\n  protected logo = BitwardenLogo;\n  protected year = \"2024\";\n  protected clientType: ClientType;\n  protected hostname: string;\n  protected version: string;\n\n  protected hideYearAndVersion = false;\n\n  constructor(\n    private environmentService: EnvironmentService,\n    private platformUtilsService: PlatformUtilsService,\n  ) {\n    this.year = new Date().getFullYear().toString();\n    this.clientType = this.platformUtilsService.getClientType();\n    this.hideYearAndVersion = this.clientType !== ClientType.Web;\n  }\n\n  async ngOnInit() {\n    this.maxWidth = this.maxWidth ?? \"md\";\n    this.titleAreaMaxWidth = this.titleAreaMaxWidth ?? null;\n    this.hostname = (await firstValueFrom(this.environmentService.environment$)).getHostname();\n    this.version = await this.platformUtilsService.getApplicationVersion();\n\n    // If there is no icon input, then use the default icon\n    if (this.icon == null) {\n      this.icon = BitwardenShield;\n    }\n  }\n\n  async ngOnChanges(changes: SimpleChanges) {\n    if (changes.maxWidth) {\n      this.maxWidth = changes.maxWidth.currentValue ?? \"md\";\n    }\n  }\n}\n","import { Observable } from \"rxjs\";\n\nimport { AnonLayoutWrapperData } from \"./anon-layout-wrapper.component\";\n\n/**\n * A simple data service to allow any child components of the AnonLayoutWrapperComponent to override\n * page route data and dynamically control the data fed into the AnonLayoutComponent via the AnonLayoutWrapperComponent.\n */\nexport abstract class AnonLayoutWrapperDataService {\n  /**\n   *\n   * @param data - The data to set on the AnonLayoutWrapperComponent to feed into the AnonLayoutComponent.\n   */\n  abstract setAnonLayoutWrapperData(data: AnonLayoutWrapperData): void;\n\n  /**\n   * Reactively gets the current AnonLayoutWrapperData.\n   */\n  abstract anonLayoutWrapperData$(): Observable<AnonLayoutWrapperData>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ChangeDetectorRef, Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Data, NavigationEnd, Router, RouterModule } from \"@angular/router\";\nimport { Subject, filter, switchMap, takeUntil, tap } from \"rxjs\";\n\nimport { AnonLayoutComponent } from \"@bitwarden/auth/angular\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Icon, Translation } from \"@bitwarden/components\";\n\nimport { BitwardenShield } from \"../icons\";\n\nimport { AnonLayoutWrapperDataService } from \"./anon-layout-wrapper-data.service\";\n\nexport interface AnonLayoutWrapperData {\n  /**\n   * The optional title of the page.\n   * If a string is provided, it will be presented as is (ex: Organization name)\n   * If a Translation object (supports placeholders) is provided, it will be translated\n   */\n  pageTitle?: string | Translation | null;\n  /**\n   * The optional subtitle of the page.\n   * If a string is provided, it will be presented as is (ex: user's email)\n   * If a Translation object (supports placeholders) is provided, it will be translated\n   */\n  pageSubtitle?: string | Translation | null;\n  /**\n   * The optional icon to display on the page.\n   */\n  pageIcon?: Icon | null;\n  /**\n   * Optional flag to either show the optional environment selector (false) or just a readonly hostname (true).\n   */\n  showReadonlyHostname?: boolean;\n  /**\n   * Optional flag to set the max-width of the page. Defaults to 'md' if not provided.\n   */\n  maxWidth?: \"md\" | \"3xl\";\n  /**\n   * Optional flag to set the max-width of the title area. Defaults to null if not provided.\n   */\n  titleAreaMaxWidth?: \"md\";\n}\n\n@Component({\n  standalone: true,\n  templateUrl: \"anon-layout-wrapper.component.html\",\n  imports: [AnonLayoutComponent, RouterModule],\n})\nexport class AnonLayoutWrapperComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  protected pageTitle: string;\n  protected pageSubtitle: string;\n  protected pageIcon: Icon;\n  protected showReadonlyHostname: boolean;\n  protected maxWidth: \"md\" | \"3xl\";\n  protected titleAreaMaxWidth: \"md\";\n\n  constructor(\n    private router: Router,\n    private route: ActivatedRoute,\n    private i18nService: I18nService,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n    private changeDetectorRef: ChangeDetectorRef,\n  ) {}\n\n  ngOnInit(): void {\n    // Set the initial page data on load\n    this.setAnonLayoutWrapperDataFromRouteData(this.route.snapshot.firstChild?.data);\n    // Listen for page changes and update the page data appropriately\n    this.listenForPageDataChanges();\n    this.listenForServiceDataChanges();\n  }\n\n  private listenForPageDataChanges() {\n    this.router.events\n      .pipe(\n        filter((event) => event instanceof NavigationEnd),\n        // reset page data on page changes\n        tap(() => this.resetPageData()),\n        switchMap(() => this.route.firstChild?.data || null),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((firstChildRouteData: Data | null) => {\n        this.setAnonLayoutWrapperDataFromRouteData(firstChildRouteData);\n      });\n  }\n\n  private setAnonLayoutWrapperDataFromRouteData(firstChildRouteData: Data | null) {\n    if (!firstChildRouteData) {\n      return;\n    }\n\n    if (firstChildRouteData[\"pageTitle\"] !== undefined) {\n      this.pageTitle = this.handleStringOrTranslation(firstChildRouteData[\"pageTitle\"]);\n    }\n\n    if (firstChildRouteData[\"pageSubtitle\"] !== undefined) {\n      this.pageSubtitle = this.handleStringOrTranslation(firstChildRouteData[\"pageSubtitle\"]);\n    }\n\n    if (firstChildRouteData[\"pageIcon\"] !== undefined) {\n      this.pageIcon = firstChildRouteData[\"pageIcon\"];\n    }\n\n    this.showReadonlyHostname = Boolean(firstChildRouteData[\"showReadonlyHostname\"]);\n    this.maxWidth = firstChildRouteData[\"maxWidth\"];\n    this.titleAreaMaxWidth = firstChildRouteData[\"titleAreaMaxWidth\"];\n  }\n\n  private listenForServiceDataChanges() {\n    this.anonLayoutWrapperDataService\n      .anonLayoutWrapperData$()\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((data: AnonLayoutWrapperData) => {\n        this.setAnonLayoutWrapperData(data);\n      });\n  }\n\n  private setAnonLayoutWrapperData(data: AnonLayoutWrapperData) {\n    if (!data) {\n      return;\n    }\n\n    // Null emissions are used to reset the page data as all fields are optional.\n\n    if (data.pageTitle !== undefined) {\n      this.pageTitle =\n        data.pageTitle !== null ? this.handleStringOrTranslation(data.pageTitle) : null;\n    }\n\n    if (data.pageSubtitle !== undefined) {\n      this.pageSubtitle =\n        data.pageSubtitle !== null ? this.handleStringOrTranslation(data.pageSubtitle) : null;\n    }\n\n    if (data.pageIcon !== undefined) {\n      this.pageIcon = data.pageIcon !== null ? data.pageIcon : null;\n    }\n\n    if (data.showReadonlyHostname !== undefined) {\n      this.showReadonlyHostname = data.showReadonlyHostname;\n    }\n\n    // Manually fire change detection to avoid ExpressionChangedAfterItHasBeenCheckedError\n    // when setting the page data from a service\n    this.changeDetectorRef.detectChanges();\n  }\n\n  private handleStringOrTranslation(value: string | Translation): string {\n    if (typeof value === \"string\") {\n      // If it's a string, return it as is\n      return value;\n    }\n\n    // If it's a Translation object, translate it\n    return this.i18nService.t(value.key, ...(value.placeholders ?? []));\n  }\n\n  private resetPageData() {\n    this.pageTitle = null;\n    this.pageSubtitle = null;\n    this.pageIcon = BitwardenShield;\n    this.showReadonlyHostname = null;\n    this.maxWidth = null;\n    this.titleAreaMaxWidth = null;\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<auth-anon-layout\n  [title]=\"pageTitle\"\n  [subtitle]=\"pageSubtitle\"\n  [icon]=\"pageIcon\"\n  [showReadonlyHostname]=\"showReadonlyHostname\"\n  [maxWidth]=\"maxWidth\"\n  [titleAreaMaxWidth]=\"titleAreaMaxWidth\"\n>\n  <router-outlet></router-outlet>\n  <router-outlet slot=\"secondary\" name=\"secondary\"></router-outlet>\n  <router-outlet slot=\"environment-selector\" name=\"environment-selector\"></router-outlet>\n</auth-anon-layout>\n","import { Observable, Subject } from \"rxjs\";\n\nimport { AnonLayoutWrapperDataService } from \"./anon-layout-wrapper-data.service\";\nimport { AnonLayoutWrapperData } from \"./anon-layout-wrapper.component\";\n\nexport class DefaultAnonLayoutWrapperDataService implements AnonLayoutWrapperDataService {\n  protected anonLayoutWrapperDataSubject = new Subject<AnonLayoutWrapperData>();\n\n  setAnonLayoutWrapperData(data: AnonLayoutWrapperData): void {\n    this.anonLayoutWrapperDataSubject.next(data);\n  }\n\n  anonLayoutWrapperData$(): Observable<AnonLayoutWrapperData> {\n    return this.anonLayoutWrapperDataSubject.asObservable();\n  }\n}\n","import { DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { Component, Inject } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ButtonModule, DialogModule, DialogService } from \"@bitwarden/components\";\n\nexport type FingerprintDialogData = {\n  fingerprint: string[];\n};\n\n@Component({\n  templateUrl: \"fingerprint-dialog.component.html\",\n  standalone: true,\n  imports: [JslibModule, ButtonModule, DialogModule],\n})\nexport class FingerprintDialogComponent {\n  constructor(@Inject(DIALOG_DATA) protected data: FingerprintDialogData) {}\n\n  static open(dialogService: DialogService, data: FingerprintDialogData) {\n    return dialogService.open(FingerprintDialogComponent, { data });\n  }\n}\n","<bit-simple-dialog>\n  <i bitDialogIcon class=\"bwi bwi-info-circle tw-text-3xl\" aria-hidden=\"true\"></i>\n  <span bitDialogTitle\n    ><strong>{{ \"yourAccountsFingerprint\" | i18n }}:</strong></span\n  >\n  <span bitDialogContent>\n    {{ data.fingerprint.join(\"-\") }}\n  </span>\n  <ng-container bitDialogFooter>\n    <a\n      bitButton\n      href=\"https://bitwarden.com/help/fingerprint-phrase/\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      buttonType=\"primary\"\n      bitDialogClose\n    >\n      {{ \"learnMore\" | i18n }}\n      <i class=\"bwi bwi-external-link bwi-fw\" aria-hidden=\"true\"></i>\n    </a>\n    <button bitButton type=\"button\" buttonType=\"secondary\" bitDialogClose>\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-simple-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\n\nexport interface PasswordPolicies {\n  policies: Policy[];\n  isPolicyAndAutoEnrollEnabled: boolean;\n  enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions;\n}\n\n/**\n * The `LoginComponentService` allows the single libs/auth `LoginComponent` to\n * delegate all client-specific functionality to client-specific service\n * implementations of `LoginComponentService`.\n *\n * The `LoginComponentService` should not be confused with the\n * `LoginStrategyService`, which is used to determine the login strategy and\n * performs the core login logic.\n */\nexport abstract class LoginComponentService {\n  /**\n   * Gets the organization policies if there is an organization invite.\n   * - Used by: Web\n   */\n  getOrgPolicies: () => Promise<PasswordPolicies | null>;\n\n  /**\n   * Indicates whether login with passkey is supported on the given client\n   */\n  isLoginWithPasskeySupported: () => boolean;\n\n  /**\n   * Launches the SSO flow in a new browser window.\n   * - Used by: Browser, Desktop\n   */\n  launchSsoBrowserWindow: (email: string, clientId: \"browser\" | \"desktop\") => Promise<void>;\n\n  /**\n   * Shows the back button.\n   */\n  showBackButton: (showBackButton: boolean) => void;\n}\n","<!-- \n  # Table of Contents\n\n    This file contains a single consolidated template for all visual clients.\n\n  # UI States\n\n    The template has two UI states, defined by the `LoginUiState` enum:\n      EMAIL_ENTRY: displays the email input field + continue button\n      MASTER_PASSWORD_ENTRY: displays the master password input field + login button\n-->\n\n<form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n  <div [ngClass]=\"{ 'tw-invisible tw-h-0': loginUiState !== LoginUiState.EMAIL_ENTRY }\">\n    <!-- Email Address input -->\n    <bit-form-field>\n      <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n      <input\n        type=\"email\"\n        formControlName=\"email\"\n        bitInput\n        appAutofocus\n        (input)=\"onEmailInput($event)\"\n        (keyup.enter)=\"continuePressed()\"\n      />\n    </bit-form-field>\n\n    <!-- Remember Email input -->\n    <bit-form-control>\n      <input type=\"checkbox\" formControlName=\"rememberEmail\" bitCheckbox />\n      <bit-label>{{ \"rememberEmail\" | i18n }}</bit-label>\n    </bit-form-control>\n\n    <div class=\"tw-grid tw-gap-3\">\n      <!-- Continue button -->\n      <button type=\"button\" bitButton block buttonType=\"primary\" (click)=\"continuePressed()\">\n        {{ \"continue\" | i18n }}\n      </button>\n\n      <div class=\"tw-text-center\">{{ \"or\" | i18n }}</div>\n\n      <!-- Link to Login with Passkey page -->\n      <ng-container *ngIf=\"isLoginWithPasskeySupported()\">\n        <a\n          bitButton\n          block\n          linkType=\"primary\"\n          routerLink=\"/login-with-passkey\"\n          (mousedown)=\"$event.preventDefault()\"\n        >\n          <i class=\"bwi bwi-passkey tw-mr-1\"></i>\n          {{ \"logInWithPasskey\" | i18n }}\n        </a>\n      </ng-container>\n\n      <!-- Button to Login with SSO -->\n      <button type=\"button\" bitButton block buttonType=\"secondary\" (click)=\"handleSsoClick()\">\n        <i class=\"bwi bwi-provider tw-mr-1\"></i>\n        {{ \"useSingleSignOn\" | i18n }}\n      </button>\n    </div>\n  </div>\n\n  <div [ngClass]=\"{ 'tw-invisible tw-h-0': loginUiState !== LoginUiState.MASTER_PASSWORD_ENTRY }\">\n    <!-- Master Password input -->\n    <bit-form-field class=\"!tw-mb-1\">\n      <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n      <input type=\"password\" formControlName=\"masterPassword\" bitInput #masterPasswordInputRef />\n      <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n    </bit-form-field>\n\n    <!-- Link to Password Hint page - doesn't use bit-hint so that it doesn't get hidden on input validation errors -->\n    <a bitLink routerLink=\"/hint\" (click)=\"goToHint()\" class=\"tw-inline-block tw-mb-4\">\n      {{ \"getMasterPasswordHint\" | i18n }}\n    </a>\n\n    <div class=\"tw-grid tw-gap-3\">\n      <!-- Submit button to Login with Master Password -->\n      <button type=\"submit\" bitButton bitFormButton block buttonType=\"primary\">\n        {{ \"loginWithMasterPassword\" | i18n }}\n      </button>\n\n      <!-- Button to Login with Device -->\n      <ng-container *ngIf=\"isKnownDevice\">\n        <div class=\"tw-text-center\">{{ \"or\" | i18n }}</div>\n\n        <button\n          type=\"button\"\n          bitButton\n          block\n          buttonType=\"secondary\"\n          (click)=\"startAuthRequestLogin()\"\n        >\n          <i class=\"bwi bwi-mobile\"></i>\n          {{ \"loginWithDevice\" | i18n }}\n        </button>\n      </ng-container>\n\n      <!-- Back button -->\n      <ng-container *ngIf=\"shouldShowBackButton()\">\n        <button type=\"button\" bitButton block buttonType=\"secondary\" (click)=\"backButtonClicked()\">\n          {{ \"back\" | i18n }}\n        </button>\n      </ng-container>\n    </div>\n  </div>\n</form>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, ElementRef, NgZone, OnDestroy, OnInit, ViewChild } from \"@angular/core\";\nimport { FormBuilder, FormControl, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router, RouterModule } from \"@angular/router\";\nimport { firstValueFrom, Subject, take, takeUntil, tap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  LoginEmailServiceAbstraction,\n  LoginStrategyServiceAbstraction,\n  LoginSuccessHandlerService,\n  PasswordLoginCredentials,\n} from \"@bitwarden/auth/common\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { DevicesApiServiceAbstraction } from \"@bitwarden/common/auth/abstractions/devices-api.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { ClientType, HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CheckboxModule,\n  FormFieldModule,\n  IconButtonModule,\n  LinkModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\nimport { AnonLayoutWrapperDataService } from \"../anon-layout/anon-layout-wrapper-data.service\";\nimport { VaultIcon, WaveIcon } from \"../icons\";\n\nimport { LoginComponentService } from \"./login-component.service\";\n\nconst BroadcasterSubscriptionId = \"LoginComponent\";\n\nexport enum LoginUiState {\n  EMAIL_ENTRY = \"EmailEntry\",\n  MASTER_PASSWORD_ENTRY = \"MasterPasswordEntry\",\n}\n\n@Component({\n  standalone: true,\n  templateUrl: \"./login.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CheckboxModule,\n    CommonModule,\n    FormFieldModule,\n    IconButtonModule,\n    LinkModule,\n    JslibModule,\n    ReactiveFormsModule,\n    RouterModule,\n  ],\n})\nexport class LoginComponent implements OnInit, OnDestroy {\n  @ViewChild(\"masterPasswordInputRef\") masterPasswordInputRef: ElementRef | undefined;\n\n  private destroy$ = new Subject<void>();\n  private enforcedMasterPasswordOptions: MasterPasswordPolicyOptions | undefined = undefined;\n  readonly Icons = { WaveIcon, VaultIcon };\n\n  clientType: ClientType;\n  ClientType = ClientType;\n  LoginUiState = LoginUiState;\n  isKnownDevice = false;\n  loginUiState: LoginUiState = LoginUiState.EMAIL_ENTRY;\n\n  formGroup = this.formBuilder.group(\n    {\n      email: [\"\", [Validators.required, Validators.email]],\n      masterPassword: [\n        \"\",\n        [Validators.required, Validators.minLength(Utils.originalMinimumPasswordLength)],\n      ],\n      rememberEmail: [false],\n    },\n    { updateOn: \"submit\" },\n  );\n\n  get emailFormControl(): FormControl<string | null> {\n    return this.formGroup.controls.email;\n  }\n\n  // Web properties\n  enforcedPasswordPolicyOptions: MasterPasswordPolicyOptions | undefined;\n  policies: Policy[] | undefined;\n  showResetPasswordAutoEnrollWarning = false;\n\n  // Desktop properties\n  deferFocus: boolean | null = null;\n\n  constructor(\n    private activatedRoute: ActivatedRoute,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n    private appIdService: AppIdService,\n    private broadcasterService: BroadcasterService,\n    private devicesApiService: DevicesApiServiceAbstraction,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private loginComponentService: LoginComponentService,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private messagingService: MessagingService,\n    private ngZone: NgZone,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n    private policyService: InternalPolicyService,\n    private router: Router,\n    private toastService: ToastService,\n    private logService: LogService,\n    private validationService: ValidationService,\n    private configService: ConfigService,\n    private loginSuccessHandlerService: LoginSuccessHandlerService,\n  ) {\n    this.clientType = this.platformUtilsService.getClientType();\n  }\n\n  async ngOnInit(): Promise<void> {\n    // Add popstate listener to listen for browser back button clicks\n    window.addEventListener(\"popstate\", this.handlePopState);\n\n    // TODO: remove this when the UnauthenticatedExtensionUIRefresh feature flag is removed.\n    this.listenForUnauthUiRefreshFlagChanges();\n\n    await this.defaultOnInit();\n\n    if (this.clientType === ClientType.Desktop) {\n      await this.desktopOnInit();\n    }\n  }\n\n  ngOnDestroy(): void {\n    // Remove popstate listener\n    window.removeEventListener(\"popstate\", this.handlePopState);\n\n    if (this.clientType === ClientType.Desktop) {\n      // TODO: refactor to not use deprecated broadcaster service.\n      this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n    }\n\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  private listenForUnauthUiRefreshFlagChanges() {\n    this.configService\n      .getFeatureFlag$(FeatureFlag.UnauthenticatedExtensionUIRefresh)\n      .pipe(\n        tap(async (flag) => {\n          // If the flag is turned OFF, we must force a reload to ensure the correct UI is shown\n          if (!flag) {\n            const uniqueQueryParams = {\n              ...this.activatedRoute.queryParams,\n              // adding a unique timestamp to the query params to force a reload\n              t: new Date().getTime().toString(), // Adding a unique timestamp as a query parameter\n            };\n\n            await this.router.navigate([\"/\"], {\n              queryParams: uniqueQueryParams,\n            });\n          }\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  submit = async (): Promise<void> => {\n    if (this.clientType === ClientType.Desktop) {\n      if (this.loginUiState !== LoginUiState.MASTER_PASSWORD_ENTRY) {\n        return;\n      }\n    }\n\n    const { email, masterPassword } = this.formGroup.value;\n\n    this.formGroup.markAllAsTouched();\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    if (!email || !masterPassword) {\n      this.logService.error(\"Email and master password are required\");\n      return;\n    }\n\n    const credentials = new PasswordLoginCredentials(email, masterPassword);\n\n    try {\n      const authResult = await this.loginStrategyService.logIn(credentials);\n\n      await this.saveEmailSettings();\n      await this.handleAuthResult(authResult);\n    } catch (error) {\n      this.logService.error(error);\n      this.handleSubmitError(error);\n    }\n  };\n\n  /**\n   * Handles the error from the submit function.\n   *\n   * @param error The error object.\n   */\n  private handleSubmitError(error: unknown) {\n    // Handle error responses\n    if (error instanceof ErrorResponse) {\n      switch (error.statusCode) {\n        case HttpStatusCode.BadRequest: {\n          if (error.message.toLowerCase().includes(\"username or password is incorrect\")) {\n            this.formGroup.controls.masterPassword.setErrors({\n              error: {\n                message: this.i18nService.t(\"invalidMasterPassword\"),\n              },\n            });\n          } else {\n            // Allow other 400 responses to be handled by toast\n            this.validationService.showError(error);\n          }\n          break;\n        }\n        default: {\n          // Allow all other error codes to be handled by toast\n          this.validationService.showError(error);\n        }\n      }\n    } else {\n      // Allow all other errors to be handled by toast\n      this.validationService.showError(error);\n    }\n  }\n\n  /**\n   * Handles the result of the authentication process.\n   *\n   * @param authResult\n   * @returns A simple `return` statement for each conditional check.\n   *          If you update this method, do not forget to add a `return`\n   *          to each if-condition block where necessary to stop code execution.\n   */\n  private async handleAuthResult(authResult: AuthResult): Promise<void> {\n    if (authResult.requiresEncryptionKeyMigration) {\n      /* Legacy accounts used the master key to encrypt data.\n         Migration is required but only performed on Web. */\n      if (this.clientType === ClientType.Web) {\n        await this.router.navigate([\"migrate-legacy-encryption\"]);\n      } else {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: this.i18nService.t(\"errorOccured\"),\n          message: this.i18nService.t(\"encryptionKeyMigrationRequired\"),\n        });\n      }\n      return;\n    }\n\n    if (authResult.requiresTwoFactor) {\n      await this.router.navigate([\"2fa\"]);\n      return;\n    }\n\n    await this.loginSuccessHandlerService.run(authResult.userId);\n\n    if (authResult.forcePasswordReset != ForceSetPasswordReason.None) {\n      this.loginEmailService.clearValues();\n      await this.router.navigate([\"update-temp-password\"]);\n      return;\n    }\n\n    // If none of the above cases are true, proceed with login...\n    await this.evaluatePassword();\n\n    this.loginEmailService.clearValues();\n\n    if (this.clientType === ClientType.Browser) {\n      await this.router.navigate([\"/tabs/vault\"]);\n    } else {\n      await this.router.navigate([\"vault\"]);\n    }\n  }\n\n  protected async launchSsoBrowserWindow(clientId: \"browser\" | \"desktop\"): Promise<void> {\n    const email = this.emailFormControl.value;\n    if (!email) {\n      this.logService.error(\"Email is required for SSO login\");\n      return;\n    }\n    await this.loginComponentService.launchSsoBrowserWindow(email, clientId);\n  }\n\n  protected async evaluatePassword(): Promise<void> {\n    try {\n      // If we do not have any saved policies, attempt to load them from the service\n      if (this.enforcedMasterPasswordOptions == undefined) {\n        this.enforcedMasterPasswordOptions = await firstValueFrom(\n          this.policyService.masterPasswordPolicyOptions$(),\n        );\n      }\n\n      if (this.requirePasswordChange()) {\n        await this.router.navigate([\"update-password\"]);\n        return;\n      }\n    } catch (e) {\n      // Do not prevent unlock if there is an error evaluating policies\n      this.logService.error(e);\n    }\n  }\n\n  /**\n   * Checks if the master password meets the enforced policy requirements\n   * If not, returns false\n   */\n  private requirePasswordChange(): boolean {\n    if (\n      this.enforcedMasterPasswordOptions == undefined ||\n      !this.enforcedMasterPasswordOptions.enforceOnLogin\n    ) {\n      return false;\n    }\n\n    const masterPassword = this.formGroup.controls.masterPassword.value;\n\n    // Return false if masterPassword is null/undefined since this is only evaluated after successful login\n    if (!masterPassword) {\n      return false;\n    }\n\n    const passwordStrength = this.passwordStrengthService.getPasswordStrength(\n      masterPassword,\n      this.formGroup.value.email ?? undefined,\n    )?.score;\n\n    return !this.policyService.evaluateMasterPassword(\n      passwordStrength,\n      masterPassword,\n      this.enforcedMasterPasswordOptions,\n    );\n  }\n\n  protected async startAuthRequestLogin(): Promise<void> {\n    this.formGroup.get(\"masterPassword\")?.clearValidators();\n    this.formGroup.get(\"masterPassword\")?.updateValueAndValidity();\n\n    if (!this.formGroup.valid) {\n      return;\n    }\n\n    await this.saveEmailSettings();\n    await this.router.navigate([\"/login-with-device\"]);\n  }\n\n  protected async validateEmail(): Promise<boolean> {\n    this.formGroup.controls.email.markAsTouched();\n    this.formGroup.controls.email.updateValueAndValidity({ onlySelf: true, emitEvent: true });\n    return this.formGroup.controls.email.valid;\n  }\n\n  protected async toggleLoginUiState(value: LoginUiState): Promise<void> {\n    this.loginUiState = value;\n\n    if (this.loginUiState === LoginUiState.EMAIL_ENTRY) {\n      this.loginComponentService.showBackButton(false);\n\n      this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n        pageTitle: { key: \"logInToBitwarden\" },\n        pageIcon: this.Icons.VaultIcon,\n        pageSubtitle: null, // remove subtitle when going back to email entry\n      });\n\n      // Reset master password only when going from validated to not validated so that autofill can work properly\n      this.formGroup.controls.masterPassword.reset();\n\n      // Reset known device state when going back to email entry if it is supported\n      this.isKnownDevice = false;\n    } else if (this.loginUiState === LoginUiState.MASTER_PASSWORD_ENTRY) {\n      this.loginComponentService.showBackButton(true);\n      this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n        pageTitle: { key: \"welcomeBack\" },\n        pageSubtitle: this.emailFormControl.value,\n        pageIcon: this.Icons.WaveIcon,\n      });\n\n      // Mark MP as untouched so that, when users enter email and hit enter, the MP field doesn't load with validation errors\n      this.formGroup.controls.masterPassword.markAsUntouched();\n\n      // When email is validated, focus on master password after waiting for input to be rendered\n      if (this.ngZone.isStable) {\n        this.masterPasswordInputRef?.nativeElement?.focus();\n      } else {\n        this.ngZone.onStable.pipe(take(1), takeUntil(this.destroy$)).subscribe(() => {\n          this.masterPasswordInputRef?.nativeElement?.focus();\n        });\n      }\n\n      // Check to see if the device is known so we can show the Login with Device option\n      const email = this.emailFormControl.value;\n      if (email) {\n        await this.getKnownDevice(email);\n      }\n    }\n  }\n\n  /**\n   * Set the email value from the input field.\n   * @param event The event object from the input field.\n   */\n  onEmailInput(event: Event) {\n    const emailInput = event.target as HTMLInputElement;\n    this.formGroup.controls.email.setValue(emailInput.value);\n    this.loginEmailService.setLoginEmail(emailInput.value);\n  }\n\n  isLoginWithPasskeySupported() {\n    return this.loginComponentService.isLoginWithPasskeySupported();\n  }\n\n  protected async goToHint(): Promise<void> {\n    await this.saveEmailSettings();\n    await this.router.navigateByUrl(\"/hint\");\n  }\n\n  protected async saveEmailSettings(): Promise<void> {\n    const email = this.formGroup.value.email;\n    if (!email) {\n      this.logService.error(\"Email is required to save email settings.\");\n      return;\n    }\n\n    await this.loginEmailService.setLoginEmail(email);\n    this.loginEmailService.setRememberEmail(this.formGroup.value.rememberEmail ?? false);\n    await this.loginEmailService.saveEmailSettings();\n  }\n\n  /**\n   * Continue button clicked (or enter key pressed).\n   * Adds the login url to the browser's history so that the back button can be used to go back to the email entry state.\n   * Needs to be separate from the continue() function because that can be triggered by the browser's forward button.\n   */\n  protected async continuePressed() {\n    // Add a new entry to the browser's history so that there is a history entry to go back to\n    history.pushState({}, \"\", window.location.href);\n    await this.continue();\n  }\n\n  /**\n   * Continue to the master password entry state (only if email is validated)\n   */\n  protected async continue(): Promise<void> {\n    const isEmailValid = await this.validateEmail();\n\n    if (isEmailValid) {\n      await this.toggleLoginUiState(LoginUiState.MASTER_PASSWORD_ENTRY);\n    }\n  }\n\n  /**\n   * Call to check if the device is known.\n   * Known means that the user has logged in with this device before.\n   * @param email - The user's email\n   */\n  private async getKnownDevice(email: string): Promise<void> {\n    if (!email) {\n      this.isKnownDevice = false;\n      return;\n    }\n\n    try {\n      const deviceIdentifier = await this.appIdService.getAppId();\n      this.isKnownDevice = await this.devicesApiService.getKnownDevice(email, deviceIdentifier);\n    } catch (e) {\n      this.isKnownDevice = false;\n    }\n  }\n\n  private async loadEmailSettings(): Promise<void> {\n    // Try to load the email from memory first\n    const email = await firstValueFrom(this.loginEmailService.loginEmail$);\n    const rememberEmail = this.loginEmailService.getRememberEmail();\n\n    if (email) {\n      this.formGroup.controls.email.setValue(email);\n      this.formGroup.controls.rememberEmail.setValue(rememberEmail);\n    } else {\n      // If there is no email in memory, check for a storedEmail on disk\n      const storedEmail = await firstValueFrom(this.loginEmailService.storedEmail$);\n\n      if (storedEmail) {\n        this.formGroup.controls.email.setValue(storedEmail);\n        // If there is a storedEmail, rememberEmail defaults to true\n        this.formGroup.controls.rememberEmail.setValue(true);\n      }\n    }\n  }\n\n  private focusInput() {\n    document\n      .getElementById(\n        this.emailFormControl.value == null || this.emailFormControl.value === \"\"\n          ? \"email\"\n          : \"masterPassword\",\n      )\n      ?.focus();\n  }\n\n  private async defaultOnInit(): Promise<void> {\n    // If there's an existing org invite, use it to get the password policies\n    const orgPolicies = await this.loginComponentService.getOrgPolicies();\n\n    this.policies = orgPolicies?.policies;\n    this.showResetPasswordAutoEnrollWarning = orgPolicies?.isPolicyAndAutoEnrollEnabled ?? false;\n\n    let paramEmailIsSet = false;\n\n    const params = await firstValueFrom(this.activatedRoute.queryParams);\n\n    if (params) {\n      const qParamsEmail = params.email;\n\n      // If there is an email in the query params, set that email as the form field value\n      if (qParamsEmail != null && qParamsEmail.indexOf(\"@\") > -1) {\n        this.formGroup.controls.email.setValue(qParamsEmail);\n        paramEmailIsSet = true;\n      }\n    }\n\n    // If there are no params or no email in the query params, loadEmailSettings from state\n    if (!paramEmailIsSet) {\n      await this.loadEmailSettings();\n    }\n\n    // Check to see if the device is known so that we can show the Login with Device option\n    if (this.emailFormControl.value) {\n      await this.getKnownDevice(this.emailFormControl.value);\n    }\n\n    // Backup check to handle unknown case where activatedRoute is not available\n    // This shouldn't happen under normal circumstances\n    if (!this.activatedRoute) {\n      await this.loadEmailSettings();\n    }\n  }\n\n  private async desktopOnInit(): Promise<void> {\n    // TODO: refactor to not use deprecated broadcaster service.\n    this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {\n      this.ngZone.run(() => {\n        switch (message.command) {\n          case \"windowIsFocused\":\n            if (this.deferFocus === null) {\n              this.deferFocus = !message.windowIsFocused;\n              if (!this.deferFocus) {\n                this.focusInput();\n              }\n            } else if (this.deferFocus && message.windowIsFocused) {\n              this.focusInput();\n              this.deferFocus = false;\n            }\n            break;\n          default:\n        }\n      });\n    });\n\n    this.messagingService.send(\"getWindowIsFocused\");\n  }\n\n  /**\n   * Helper function to determine if the back button should be shown.\n   * @returns true if the back button should be shown.\n   */\n  protected shouldShowBackButton(): boolean {\n    return (\n      this.loginUiState === LoginUiState.MASTER_PASSWORD_ENTRY &&\n      this.clientType !== ClientType.Browser\n    );\n  }\n\n  /**\n   * Handle the back button click to transition back to the email entry state.\n   */\n  protected async backButtonClicked() {\n    history.back();\n  }\n\n  /**\n   * Handle the popstate event to transition back to the email entry state when the back button is clicked.\n   * Also handles the case where the user clicks the forward button.\n   * @param event - The popstate event.\n   */\n  private handlePopState = async (event: PopStateEvent) => {\n    if (this.loginUiState === LoginUiState.MASTER_PASSWORD_ENTRY) {\n      // Prevent default navigation when the browser's back button is clicked\n      event.preventDefault();\n      // Transition back to email entry state\n      void this.toggleLoginUiState(LoginUiState.EMAIL_ENTRY);\n    } else if (this.loginUiState === LoginUiState.EMAIL_ENTRY) {\n      // Prevent default navigation when the browser's forward button is clicked\n      event.preventDefault();\n      // Continue to the master password entry state\n      await this.continue();\n    }\n  };\n\n  /**\n   * Handle the SSO button click.\n   * @param event - The event object.\n   */\n  async handleSsoClick() {\n    const isEmailValid = await this.validateEmail();\n\n    if (!isEmailValid) {\n      return;\n    }\n\n    await this.saveEmailSettings();\n\n    if (this.clientType === ClientType.Web) {\n      await this.router.navigate([\"/sso\"], {\n        queryParams: { email: this.formGroup.value.email },\n      });\n      return;\n    }\n\n    await this.launchSsoBrowserWindow(\n      this.clientType === ClientType.Browser ? \"browser\" : \"desktop\",\n    );\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, inject } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { RegisterRouteService } from \"@bitwarden/auth/common\";\nimport { DefaultServerSettingsService } from \"@bitwarden/common/platform/services/default-server-settings.service\";\nimport { LinkModule } from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  imports: [CommonModule, JslibModule, LinkModule, RouterModule],\n  template: `\n    <div class=\"tw-text-center\" *ngIf=\"!(isUserRegistrationDisabled$ | async)\">\n      {{ \"newToBitwarden\" | i18n }}\n      <a bitLink [routerLink]=\"registerRoute$ | async\">{{ \"createAccount\" | i18n }}</a>\n    </div>\n  `,\n})\nexport class LoginSecondaryContentComponent {\n  registerRouteService = inject(RegisterRouteService);\n  serverSettingsService = inject(DefaultServerSettingsService);\n\n  // TODO: remove when email verification flag is removed\n  protected registerRoute$ = this.registerRouteService.registerRoute$();\n\n  protected isUserRegistrationDisabled$ = this.serverSettingsService.isUserRegistrationDisabled$;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport { LoginComponentService, PasswordPolicies } from \"@bitwarden/auth/angular\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nexport class DefaultLoginComponentService implements LoginComponentService {\n  protected clientType: ClientType;\n\n  constructor(\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected environmentService: EnvironmentService,\n    // TODO: refactor to not use deprecated service\n    protected passwordGenerationService: PasswordGenerationServiceAbstraction,\n    protected platformUtilsService: PlatformUtilsService,\n    protected ssoLoginService: SsoLoginServiceAbstraction,\n  ) {}\n\n  async getOrgPolicies(): Promise<PasswordPolicies | null> {\n    return null;\n  }\n\n  isLoginWithPasskeySupported(): boolean {\n    return this.clientType === ClientType.Web;\n  }\n\n  async launchSsoBrowserWindow(\n    email: string,\n    clientId: \"browser\" | \"desktop\",\n  ): Promise<void | null> {\n    // Save email for SSO\n    await this.ssoLoginService.setSsoEmail(email);\n\n    // Generate SSO params\n    const passwordOptions: any = {\n      type: \"password\",\n      length: 64,\n      uppercase: true,\n      lowercase: true,\n      numbers: true,\n      special: false,\n    };\n\n    let state = await this.passwordGenerationService.generatePassword(passwordOptions);\n\n    if (clientId === \"browser\") {\n      // Need to persist the clientId in the state for the extension\n      state += \":clientId=browser\";\n    }\n\n    const codeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n    const codeVerifierHash = await this.cryptoFunctionService.hash(codeVerifier, \"sha256\");\n    const codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n\n    // Save SSO params\n    await this.ssoLoginService.setSsoState(state);\n    await this.ssoLoginService.setCodeVerifier(codeVerifier);\n\n    // Build URL\n    const env = await firstValueFrom(this.environmentService.environment$);\n    const webVaultUrl = env.getWebVaultUrl();\n\n    const redirectUri =\n      clientId === \"browser\"\n        ? webVaultUrl + \"/sso-connector.html\" // Browser\n        : \"bitwarden://sso-callback\"; // Desktop\n\n    // Launch browser window with URL\n    this.platformUtilsService.launchUri(\n      webVaultUrl +\n        \"/#/sso?clientId=\" +\n        clientId +\n        \"&redirectUri=\" +\n        encodeURIComponent(redirectUri) +\n        \"&state=\" +\n        state +\n        \"&codeChallenge=\" +\n        codeChallenge +\n        \"&email=\" +\n        encodeURIComponent(email),\n    );\n  }\n\n  /**\n   * No-op implementation of showBackButton\n   */\n  showBackButton(showBackButton: boolean): void {\n    return;\n  }\n}\n","export abstract class LoginDecryptionOptionsService {\n  /**\n   * Handles client-specific logic that runs after a user was successfully created\n   */\n  abstract handleCreateUserSuccess(): Promise<void | null>;\n  /**\n   * Logs the user out\n   */\n  abstract logOut(): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, DestroyRef, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, FormControl, ReactiveFormsModule } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { catchError, defer, firstValueFrom, from, map, of, switchMap, throwError } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  LoginEmailServiceAbstraction,\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { PasswordResetEnrollmentServiceAbstraction } from \"@bitwarden/common/auth/abstractions/password-reset-enrollment.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CheckboxModule,\n  DialogService,\n  FormFieldModule,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { AnonLayoutWrapperDataService } from \"../anon-layout/anon-layout-wrapper-data.service\";\n\nimport { LoginDecryptionOptionsService } from \"./login-decryption-options.service\";\n\nenum State {\n  NewUser,\n  ExistingUserUntrustedDevice,\n}\n\n@Component({\n  standalone: true,\n  templateUrl: \"./login-decryption-options.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CheckboxModule,\n    CommonModule,\n    FormFieldModule,\n    JslibModule,\n    ReactiveFormsModule,\n    TypographyModule,\n  ],\n})\nexport class LoginDecryptionOptionsComponent implements OnInit {\n  private activeAccountId: UserId;\n  private clientType: ClientType;\n  private email: string;\n\n  protected loading = false;\n  protected state: State;\n  protected State = State;\n\n  protected formGroup = this.formBuilder.group({\n    rememberDevice: [true], // Remember device means for the user to trust the device\n  });\n\n  private get rememberDeviceControl(): FormControl<boolean> {\n    return this.formGroup.controls.rememberDevice;\n  }\n\n  // New User Properties\n  private newUserOrgId: string;\n\n  // Existing User Untrusted Device Properties\n  protected canApproveFromOtherDevice = false;\n  protected canRequestAdminApproval = false;\n  protected canApproveWithMasterPassword = false;\n\n  constructor(\n    private accountService: AccountService,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n    private apiService: ApiService,\n    private destroyRef: DestroyRef,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private keyService: KeyService,\n    private loginDecryptionOptionsService: LoginDecryptionOptionsService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private messagingService: MessagingService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private passwordResetEnrollmentService: PasswordResetEnrollmentServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n    private router: Router,\n    private ssoLoginService: SsoLoginServiceAbstraction,\n    private toastService: ToastService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private validationService: ValidationService,\n  ) {\n    this.clientType === this.platformUtilsService.getClientType();\n  }\n\n  async ngOnInit() {\n    this.loading = true;\n\n    this.activeAccountId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n\n    if (!this.email) {\n      await this.handleMissingEmail();\n      return;\n    }\n\n    this.observeAndPersistRememberDeviceValueChanges();\n    await this.setRememberDeviceDefaultValueFromState();\n\n    try {\n      const userDecryptionOptions = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptions$,\n      );\n\n      if (\n        !userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval &&\n        !userDecryptionOptions?.hasMasterPassword\n      ) {\n        /**\n         * We are dealing with a new account if both are true:\n         * - User does NOT have admin approval (i.e. has not enrolled in admin reset)\n         * - User does NOT have a master password\n         */\n        await this.loadNewUserData();\n      } else {\n        this.loadExistingUserUntrustedDeviceData(userDecryptionOptions);\n      }\n    } catch (err) {\n      this.validationService.showError(err);\n    } finally {\n      this.loading = false;\n    }\n  }\n\n  private async handleMissingEmail() {\n    this.toastService.showToast({\n      variant: \"error\",\n      title: null,\n      message: this.i18nService.t(\"activeUserEmailNotFoundLoggingYouOut\"),\n    });\n\n    setTimeout(async () => {\n      // We can't simply redirect to `/login` because the user is authed and the unauthGuard\n      // will prevent navigation. We must logout the user first via messagingService, which\n      // redirects to `/`, which will be handled by the redirectGuard to navigate the user to `/login`.\n      // The timeout just gives the user a chance to see the error toast before process reload runs on logout.\n      await this.loginDecryptionOptionsService.logOut();\n    }, 5000);\n  }\n\n  private observeAndPersistRememberDeviceValueChanges() {\n    this.rememberDeviceControl.valueChanges\n      .pipe(\n        takeUntilDestroyed(this.destroyRef),\n        switchMap((value) =>\n          defer(() => this.deviceTrustService.setShouldTrustDevice(this.activeAccountId, value)),\n        ),\n      )\n      .subscribe();\n  }\n\n  private async setRememberDeviceDefaultValueFromState() {\n    const rememberDeviceFromState = await this.deviceTrustService.getShouldTrustDevice(\n      this.activeAccountId,\n    );\n\n    const rememberDevice = rememberDeviceFromState ?? true;\n\n    this.rememberDeviceControl.setValue(rememberDevice);\n  }\n\n  private async loadNewUserData() {\n    this.state = State.NewUser;\n\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageTitle: {\n        key: \"loggedInExclamation\",\n      },\n      pageSubtitle: {\n        key: \"rememberThisDeviceToMakeFutureLoginsSeamless\",\n      },\n    });\n\n    const autoEnrollStatus$ = defer(() =>\n      this.ssoLoginService.getActiveUserOrganizationSsoIdentifier(),\n    ).pipe(\n      switchMap((organizationIdentifier) => {\n        if (organizationIdentifier == undefined) {\n          return throwError(() => new Error(this.i18nService.t(\"ssoIdentifierRequired\")));\n        }\n\n        return from(this.organizationApiService.getAutoEnrollStatus(organizationIdentifier));\n      }),\n      catchError((err: unknown) => {\n        this.validationService.showError(err);\n        return of(undefined);\n      }),\n    );\n\n    const autoEnrollStatus = await firstValueFrom(autoEnrollStatus$);\n\n    this.newUserOrgId = autoEnrollStatus.id;\n  }\n\n  private loadExistingUserUntrustedDeviceData(userDecryptionOptions: UserDecryptionOptions) {\n    this.state = State.ExistingUserUntrustedDevice;\n\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageTitle: {\n        key: \"deviceApprovalRequiredV2\",\n      },\n      pageSubtitle: {\n        key: \"selectAnApprovalOptionBelow\",\n      },\n    });\n\n    this.canApproveFromOtherDevice =\n      userDecryptionOptions?.trustedDeviceOption?.hasLoginApprovingDevice || false;\n    this.canRequestAdminApproval =\n      userDecryptionOptions?.trustedDeviceOption?.hasAdminApproval || false;\n    this.canApproveWithMasterPassword = userDecryptionOptions?.hasMasterPassword || false;\n  }\n\n  protected createUser = async () => {\n    if (this.state !== State.NewUser) {\n      return;\n    }\n\n    try {\n      const { publicKey, privateKey } = await this.keyService.initAccount();\n      const keysRequest = new KeysRequest(publicKey, privateKey.encryptedString);\n      await this.apiService.postAccountKeys(keysRequest);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"accountSuccessfullyCreated\"),\n      });\n\n      await this.passwordResetEnrollmentService.enroll(this.newUserOrgId);\n\n      if (this.formGroup.value.rememberDevice) {\n        await this.deviceTrustService.trustDevice(this.activeAccountId);\n      }\n\n      await this.loginDecryptionOptionsService.handleCreateUserSuccess();\n\n      if (this.clientType === ClientType.Desktop) {\n        this.messagingService.send(\"redrawMenu\");\n      }\n\n      await this.handleCreateUserSuccessNavigation();\n    } catch (err) {\n      this.validationService.showError(err);\n    }\n  };\n\n  private async handleCreateUserSuccessNavigation() {\n    if (this.clientType === ClientType.Browser) {\n      await this.router.navigate([\"/tabs/vault\"]);\n    } else {\n      await this.router.navigate([\"/vault\"]);\n    }\n  }\n\n  protected async approveFromOtherDevice() {\n    this.loginEmailService.setLoginEmail(this.email);\n    await this.router.navigate([\"/login-with-device\"]);\n  }\n\n  protected async approveWithMasterPassword() {\n    await this.router.navigate([\"/lock\"], {\n      queryParams: {\n        from: \"login-initiated\",\n      },\n    });\n  }\n\n  protected async requestAdminApproval() {\n    this.loginEmailService.setLoginEmail(this.email);\n    await this.router.navigate([\"/admin-approval-requested\"]);\n  }\n\n  async logOut() {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"logOut\" },\n      content: { key: \"logOutConfirmation\" },\n      acceptButtonText: { key: \"logOut\" },\n      type: \"warning\",\n    });\n\n    const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n    if (confirmed) {\n      this.messagingService.send(\"logout\", { userId: userId });\n    }\n  }\n}\n","<ng-container *ngIf=\"loading\">\n  <div class=\"text-center\">\n    <i\n      class=\"bwi bwi-spinner bwi-spin bwi-2x tw-text-muted\"\n      title=\"{{ 'loading' | i18n }}\"\n      aria-hidden=\"true\"\n    ></i>\n    <span class=\"tw-sr-only\">{{ \"loading\" | i18n }}</span>\n  </div>\n</ng-container>\n\n<form *ngIf=\"!loading\" [formGroup]=\"formGroup\">\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"rememberDevice\" />\n    <bit-label>{{ \"rememberThisDevice\" | i18n }}</bit-label>\n    <bit-hint bitTypography=\"body2\">{{ \"uncheckIfPublicDevice\" | i18n }}</bit-hint>\n  </bit-form-control>\n</form>\n\n<ng-container *ngIf=\"state === State.NewUser\">\n  <button type=\"button\" bitButton block buttonType=\"primary\" [bitAction]=\"createUser\">\n    {{ \"continue\" | i18n }}\n  </button>\n</ng-container>\n\n<ng-container *ngIf=\"state === State.ExistingUserUntrustedDevice\">\n  <div class=\"tw-grid tw-gap-3\">\n    <ng-container *ngIf=\"canApproveFromOtherDevice\">\n      <button type=\"button\" bitButton block buttonType=\"primary\" (click)=\"approveFromOtherDevice()\">\n        {{ \"approveFromYourOtherDevice\" | i18n }}\n      </button>\n\n      <div *ngIf=\"canApproveWithMasterPassword || canRequestAdminApproval\" class=\"tw-text-center\">\n        {{ \"or\" | i18n }}\n      </div>\n    </ng-container>\n\n    <button\n      *ngIf=\"canApproveWithMasterPassword\"\n      type=\"button\"\n      bitButton\n      block\n      buttonType=\"secondary\"\n      (click)=\"approveWithMasterPassword()\"\n    >\n      {{ \"useMasterPassword\" | i18n }}\n    </button>\n\n    <button\n      *ngIf=\"canRequestAdminApproval\"\n      type=\"button\"\n      bitButton\n      block\n      buttonType=\"secondary\"\n      (click)=\"requestAdminApproval()\"\n    >\n      {{ \"requestAdminApproval\" | i18n }}\n    </button>\n\n    <button type=\"button\" bitButton bitFormButton block (click)=\"logOut()\">\n      {{ \"logOut\" | i18n }}\n    </button>\n  </div>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\n\nimport { LoginDecryptionOptionsService } from \"./login-decryption-options.service\";\n\nexport class DefaultLoginDecryptionOptionsService implements LoginDecryptionOptionsService {\n  constructor(protected messagingService: MessagingService) {}\n\n  handleCreateUserSuccess(): Promise<void | null> {\n    return null;\n  }\n\n  async logOut(): Promise<void> {\n    this.messagingService.send(\"logout\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { IsActiveMatchOptions, Router, RouterModule } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  AuthRequestLoginCredentials,\n  AuthRequestServiceAbstraction,\n  LoginEmailServiceAbstraction,\n  LoginStrategyServiceAbstraction,\n  LoginSuccessHandlerService,\n} from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AnonymousHubService } from \"@bitwarden/common/auth/abstractions/anonymous-hub.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthRequestType } from \"@bitwarden/common/auth/enums/auth-request-type\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { AuthRequest } from \"@bitwarden/common/auth/models/request/auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { ClientType, HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ButtonModule, LinkModule, ToastService } from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { AuthRequestApiService } from \"../../common/abstractions/auth-request-api.service\";\n\nenum Flow {\n  StandardAuthRequest, // when user clicks \"Login with device\" from /login or \"Approve from your other device\" from /login-initiated\n  AdminAuthRequest, // when user clicks \"Request admin approval\" from /login-initiated\n}\n\nconst matchOptions: IsActiveMatchOptions = {\n  paths: \"exact\",\n  queryParams: \"ignored\",\n  fragment: \"ignored\",\n  matrixParams: \"ignored\",\n};\n\n@Component({\n  standalone: true,\n  templateUrl: \"./login-via-auth-request.component.html\",\n  imports: [ButtonModule, CommonModule, JslibModule, LinkModule, RouterModule],\n})\nexport class LoginViaAuthRequestComponent implements OnInit, OnDestroy {\n  private authRequest: AuthRequest;\n  private authRequestKeyPair: { publicKey: Uint8Array; privateKey: Uint8Array };\n  private authStatus: AuthenticationStatus;\n  private showResendNotificationTimeoutSeconds = 12;\n\n  protected backToRoute = \"/login\";\n  protected clientType: ClientType;\n  protected ClientType = ClientType;\n  protected email: string;\n  protected fingerprintPhrase: string;\n  protected showResendNotification = false;\n  protected Flow = Flow;\n  protected flow = Flow.StandardAuthRequest;\n\n  constructor(\n    private accountService: AccountService,\n    private anonymousHubService: AnonymousHubService,\n    private appIdService: AppIdService,\n    private authRequestApiService: AuthRequestApiService,\n    private authRequestService: AuthRequestServiceAbstraction,\n    private authService: AuthService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private i18nService: I18nService,\n    private logService: LogService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n    private router: Router,\n    private toastService: ToastService,\n    private validationService: ValidationService,\n    private loginSuccessHandlerService: LoginSuccessHandlerService,\n  ) {\n    this.clientType = this.platformUtilsService.getClientType();\n\n    // Gets SignalR push notification\n    // Only fires on approval to prevent enumeration\n    this.authRequestService.authRequestPushNotification$\n      .pipe(takeUntilDestroyed())\n      .subscribe((requestId) => {\n        this.verifyAndHandleApprovedAuthReq(requestId).catch((e: Error) => {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"error\"),\n            message: e.message,\n          });\n\n          this.logService.error(\"Failed to use approved auth request: \" + e.message);\n        });\n      });\n  }\n\n  async ngOnInit(): Promise<void> {\n    // Get the authStatus early because we use it in both flows\n    this.authStatus = await firstValueFrom(this.authService.activeAccountStatus$);\n\n    const userHasAuthenticatedViaSSO = this.authStatus === AuthenticationStatus.Locked;\n\n    if (userHasAuthenticatedViaSSO) {\n      this.backToRoute = \"/login-initiated\";\n    }\n\n    /**\n     * The LoginViaAuthRequestComponent handles both the `login-with-device` and\n     * the `admin-approval-requested` routes. Therefore we check the route to determine\n     * which flow to initialize.\n     */\n    if (this.router.isActive(\"admin-approval-requested\", matchOptions)) {\n      await this.initAdminAuthRequestFlow();\n    } else {\n      await this.initStandardAuthRequestFlow();\n    }\n  }\n\n  private async initAdminAuthRequestFlow(): Promise<void> {\n    this.flow = Flow.AdminAuthRequest;\n\n    // Get email from state for admin auth requests because it is available and also\n    // prevents it from being lost on refresh as the loginEmailService email does not persist.\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n\n    if (!this.email) {\n      await this.handleMissingEmail();\n      return;\n    }\n\n    // We only allow a single admin approval request to be active at a time\n    // so we must check state to see if we have an existing one or not\n    const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n    const existingAdminAuthRequest = await this.authRequestService.getAdminAuthRequest(userId);\n\n    if (existingAdminAuthRequest) {\n      await this.handleExistingAdminAuthRequest(existingAdminAuthRequest, userId);\n    } else {\n      await this.startAdminAuthRequestLogin();\n    }\n  }\n\n  private async initStandardAuthRequestFlow(): Promise<void> {\n    this.flow = Flow.StandardAuthRequest;\n\n    this.email = await firstValueFrom(this.loginEmailService.loginEmail$);\n\n    if (!this.email) {\n      await this.handleMissingEmail();\n      return;\n    }\n\n    await this.startStandardAuthRequestLogin();\n  }\n\n  private async handleMissingEmail(): Promise<void> {\n    this.toastService.showToast({\n      variant: \"error\",\n      title: null,\n      message: this.i18nService.t(\"userEmailMissing\"),\n    });\n\n    await this.router.navigate([this.backToRoute]);\n  }\n\n  async ngOnDestroy(): Promise<void> {\n    await this.anonymousHubService.stopHubConnection();\n  }\n\n  private async startAdminAuthRequestLogin(): Promise<void> {\n    try {\n      await this.buildAuthRequest(AuthRequestType.AdminApproval);\n\n      const authRequestResponse = await this.authRequestApiService.postAdminAuthRequest(\n        this.authRequest,\n      );\n      const adminAuthReqStorable = new AdminAuthRequestStorable({\n        id: authRequestResponse.id,\n        privateKey: this.authRequestKeyPair.privateKey,\n      });\n\n      const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n      await this.authRequestService.setAdminAuthRequest(adminAuthReqStorable, userId);\n\n      if (authRequestResponse.id) {\n        await this.anonymousHubService.createHubConnection(authRequestResponse.id);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  protected async startStandardAuthRequestLogin(): Promise<void> {\n    this.showResendNotification = false;\n\n    try {\n      await this.buildAuthRequest(AuthRequestType.AuthenticateAndUnlock);\n\n      const authRequestResponse = await this.authRequestApiService.postAuthRequest(\n        this.authRequest,\n      );\n\n      if (authRequestResponse.id) {\n        await this.anonymousHubService.createHubConnection(authRequestResponse.id);\n      }\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    setTimeout(() => {\n      this.showResendNotification = true;\n    }, this.showResendNotificationTimeoutSeconds * 1000);\n  }\n\n  private async buildAuthRequest(authRequestType: AuthRequestType): Promise<void> {\n    const authRequestKeyPairArray = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n\n    this.authRequestKeyPair = {\n      publicKey: authRequestKeyPairArray[0],\n      privateKey: authRequestKeyPairArray[1],\n    };\n\n    const deviceIdentifier = await this.appIdService.getAppId();\n    const publicKey = Utils.fromBufferToB64(this.authRequestKeyPair.publicKey);\n    const accessCode = await this.passwordGenerationService.generatePassword({\n      type: \"password\",\n      length: 25,\n    });\n\n    this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(\n      this.email,\n      this.authRequestKeyPair.publicKey,\n    );\n\n    this.authRequest = new AuthRequest(\n      this.email,\n      deviceIdentifier,\n      publicKey,\n      authRequestType,\n      accessCode,\n    );\n  }\n\n  private async handleExistingAdminAuthRequest(\n    adminAuthRequestStorable: AdminAuthRequestStorable,\n    userId: UserId,\n  ): Promise<void> {\n    // Note: on login, the SSOLoginStrategy will also call to see if an existing admin auth req\n    // has been approved and handle it if so.\n\n    // Regardless, we always retrieve the auth request from the server and verify and handle status changes here as well\n    let adminAuthRequestResponse: AuthRequestResponse;\n\n    try {\n      adminAuthRequestResponse = await this.authRequestApiService.getAuthRequest(\n        adminAuthRequestStorable.id,\n      );\n    } catch (error) {\n      if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n        return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n      }\n    }\n\n    // Request doesn't exist anymore\n    if (!adminAuthRequestResponse) {\n      return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n    }\n\n    // Re-derive the user's fingerprint phrase\n    // It is important to not use the server's public key here as it could have been compromised via MITM\n    const derivedPublicKeyArrayBuffer = await this.cryptoFunctionService.rsaExtractPublicKey(\n      adminAuthRequestStorable.privateKey,\n    );\n    this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(\n      this.email,\n      derivedPublicKeyArrayBuffer,\n    );\n\n    // Request denied\n    if (adminAuthRequestResponse.isAnswered && !adminAuthRequestResponse.requestApproved) {\n      return await this.handleExistingAdminAuthReqDeletedOrDenied(userId);\n    }\n\n    // Request approved\n    if (adminAuthRequestResponse.requestApproved) {\n      return await this.decryptViaApprovedAuthRequest(\n        adminAuthRequestResponse,\n        adminAuthRequestStorable.privateKey,\n        userId,\n      );\n    }\n\n    // Request still pending response from admin\n    // set keypair and create hub connection so that any approvals will be received via push notification\n    this.authRequestKeyPair = { privateKey: adminAuthRequestStorable.privateKey, publicKey: null };\n    await this.anonymousHubService.createHubConnection(adminAuthRequestStorable.id);\n  }\n\n  private async verifyAndHandleApprovedAuthReq(requestId: string): Promise<void> {\n    /**\n     * ***********************************\n     *     Standard Auth Request Flows\n     * ***********************************\n     *\n     * Flow 1: Unauthed user requests approval from device; Approving device has a masterKey in memory.\n     *\n     *         Unauthed user clicks \"Login with device\" > navigates to /login-with-device which creates a StandardAuthRequest\n     *           > receives approval from a device with authRequestPublicKey(masterKey) > decrypts masterKey > decrypts userKey > proceed to vault\n     *\n     * Flow 2: Unauthed user requests approval from device; Approving device does NOT have a masterKey in memory.\n     *\n     *         Unauthed user clicks \"Login with device\" > navigates to /login-with-device which creates a StandardAuthRequest\n     *           > receives approval from a device with authRequestPublicKey(userKey) > decrypts userKey > proceeds to vault\n     *\n     *         Note: this flow is an uncommon scenario and relates to TDE off-boarding. The following describes how a user could get into this flow:\n     *           1) An SSO TD user logs into a device via an Admin auth request approval, therefore this device does NOT have a masterKey in memory.\n     *           2) The org admin...\n     *              (2a) Changes the member decryption options from \"Trusted devices\" to \"Master password\" AND\n     *              (2b) Turns off the \"Require single sign-on authentication\" policy\n     *           3) On another device, the user clicks \"Login with device\", which they can do because the org no longer requires SSO.\n     *           4) The user approves from the device they had previously logged into with SSO TD, which does NOT have a masterKey in memory (see step 1 above).\n     *\n     * Flow 3: Authed SSO TD user requests approval from device; Approving device has a masterKey in memory.\n     *\n     *         SSO TD user authenticates via SSO > navigates to /login-initiated > clicks \"Approve from your other device\"\n     *           > navigates to /login-with-device which creates a StandardAuthRequest > receives approval from device with authRequestPublicKey(masterKey)\n     *             > decrypts masterKey > decrypts userKey > establishes trust (if required) > proceeds to vault\n     *\n     * Flow 4: Authed SSO TD user requests approval from device; Approving device does NOT have a masterKey in memory.\n     *\n     *         SSO TD user authenticates via SSO > navigates to /login-initiated > clicks \"Approve from your other device\"\n     *           > navigates to /login-with-device which creates a StandardAuthRequest > receives approval from device with authRequestPublicKey(userKey)\n     *             > decrypts userKey > establishes trust (if required) > proceeds to vault\n     *\n     * ***********************************\n     *     Admin Auth Request Flow\n     * ***********************************\n     *\n     * Flow: Authed SSO TD user requests admin approval.\n     *\n     *         SSO TD user authenticates via SSO > navigates to /login-initiated > clicks \"Request admin approval\"\n     *           > navigates to /admin-approval-requested which creates an AdminAuthRequest > receives approval from device with authRequestPublicKey(userKey)\n     *             > decrypts userKey > establishes trust (if required) > proceeds to vault\n     *\n     *        Note: TDE users are required to be enrolled in admin password reset, which gives the admin access to the user's userKey.\n     *              This is how admins are able to send over the authRequestPublicKey(userKey) to the user to allow them to unlock.\n     *\n     *\n     *   Summary Table\n     * |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n     * |      Flow       | Auth Status |           Clicks Button [active route]              |       Navigates to        | Approving device has masterKey in memory (see note 1) |\n     * |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n     * | Standard Flow 1 | unauthed    | \"Login with device\"              [/login]           | /login-with-device        | yes                                                   |\n     * | Standard Flow 2 | unauthed    | \"Login with device\"              [/login]           | /login-with-device        | no                                                    |\n     * | Standard Flow 3 | authed      | \"Approve from your other device\" [/login-initiated] | /login-with-device        | yes                                                   |\n     * | Standard Flow 4 | authed      | \"Approve from your other device\" [/login-initiated] | /login-with-device        | no                                                    |                                                |\n     * | Admin Flow      | authed      | \"Request admin approval\"         [/login-initiated] | /admin-approval-requested | NA - admin requests always send encrypted userKey     |\n     * |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n     *    * Note 1: The phrase \"in memory\" here is important. It is possible for a user to have a master password for their account, but not have a masterKey IN MEMORY for\n     *              a specific device. For example, if a user registers an account with a master password, then joins an SSO TD org, then logs in to a device via SSO and\n     *              admin auth request, they are now logged into that device but that device does not have masterKey IN MEMORY.\n     */\n\n    try {\n      const userHasAuthenticatedViaSSO = this.authStatus === AuthenticationStatus.Locked;\n\n      if (userHasAuthenticatedViaSSO) {\n        // Get the auth request from the server\n        // User is authenticated, therefore the endpoint does not require an access code.\n        const authRequestResponse = await this.authRequestApiService.getAuthRequest(requestId);\n\n        if (authRequestResponse.requestApproved) {\n          // Handles Standard Flows 3-4 and Admin Flow\n          await this.handleAuthenticatedFlows(authRequestResponse);\n        }\n      } else {\n        // Get the auth request from the server\n        // User is unauthenticated, therefore the endpoint requires an access code for user verification.\n        const authRequestResponse = await this.authRequestApiService.getAuthResponse(\n          requestId,\n          this.authRequest.accessCode,\n        );\n\n        if (authRequestResponse.requestApproved) {\n          // Handles Standard Flows 1-2\n          await this.handleUnauthenticatedFlows(authRequestResponse, requestId);\n        }\n      }\n    } catch (error) {\n      if (error instanceof ErrorResponse) {\n        await this.router.navigate([this.backToRoute]);\n        this.validationService.showError(error);\n        return;\n      }\n\n      this.logService.error(error);\n    }\n  }\n\n  private async handleAuthenticatedFlows(authRequestResponse: AuthRequestResponse) {\n    const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n\n    await this.decryptViaApprovedAuthRequest(\n      authRequestResponse,\n      this.authRequestKeyPair.privateKey,\n      userId,\n    );\n  }\n\n  private async handleUnauthenticatedFlows(\n    authRequestResponse: AuthRequestResponse,\n    requestId: string,\n  ) {\n    const authRequestLoginCredentials = await this.buildAuthRequestLoginCredentials(\n      requestId,\n      authRequestResponse,\n    );\n\n    // Note: keys are set by AuthRequestLoginStrategy success handling\n    const authResult = await this.loginStrategyService.logIn(authRequestLoginCredentials);\n\n    await this.handlePostLoginNavigation(authResult);\n  }\n\n  private async decryptViaApprovedAuthRequest(\n    authRequestResponse: AuthRequestResponse,\n    privateKey: ArrayBuffer,\n    userId: UserId,\n  ): Promise<void> {\n    /**\n     * See verifyAndHandleApprovedAuthReq() for flow details.\n     *\n     * We determine the type of `key` based on the presence or absence of `masterPasswordHash`:\n     *  - If `masterPasswordHash` has a value, we receive the `key` as an authRequestPublicKey(masterKey) [plus we have authRequestPublicKey(masterPasswordHash)]\n     *  - If `masterPasswordHash` does not have a value, we receive the `key` as an authRequestPublicKey(userKey)\n     */\n\n    if (authRequestResponse.masterPasswordHash) {\n      // ...in Standard Auth Request Flow 3\n      await this.authRequestService.setKeysAfterDecryptingSharedMasterKeyAndHash(\n        authRequestResponse,\n        privateKey,\n        userId,\n      );\n    } else {\n      // ...in Standard Auth Request Flow 4 or Admin Auth Request Flow\n      await this.authRequestService.setUserKeyAfterDecryptingSharedUserKey(\n        authRequestResponse,\n        privateKey,\n        userId,\n      );\n    }\n\n    // clear the admin auth request from state so it cannot be used again (it's a one time use)\n    // TODO: this should eventually be enforced via deleting this on the server once it is used\n    await this.authRequestService.clearAdminAuthRequest(userId);\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"loginApproved\"),\n    });\n\n    // Now that we have a decrypted user key in memory, we can check if we\n    // need to establish trust on the current device\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n    await this.deviceTrustService.trustDeviceIfRequired(activeAccount.id);\n\n    await this.handleSuccessfulLoginNavigation(userId);\n  }\n\n  /**\n   * Takes an `AuthRequestResponse` and decrypts the `key` to build an `AuthRequestLoginCredentials`\n   * object for use in the `AuthRequestLoginStrategy`.\n   *\n   * The credentials object that gets built is affected by whether the `authRequestResponse.key`\n   * is an encrypted MasterKey or an encrypted UserKey.\n   */\n  private async buildAuthRequestLoginCredentials(\n    requestId: string,\n    authRequestResponse: AuthRequestResponse,\n  ): Promise<AuthRequestLoginCredentials> {\n    /**\n     * See verifyAndHandleApprovedAuthReq() for flow details.\n     *\n     * We determine the type of `key` based on the presence or absence of `masterPasswordHash`:\n     *  - If `masterPasswordHash` has a value, we receive the `key` as an authRequestPublicKey(masterKey) [plus we have authRequestPublicKey(masterPasswordHash)]\n     *  - If `masterPasswordHash` does not have a value, we receive the `key` as an authRequestPublicKey(userKey)\n     */\n\n    if (authRequestResponse.masterPasswordHash) {\n      // ...in Standard Auth Request Flow 1\n      const { masterKey, masterKeyHash } =\n        await this.authRequestService.decryptPubKeyEncryptedMasterKeyAndHash(\n          authRequestResponse.key,\n          authRequestResponse.masterPasswordHash,\n          this.authRequestKeyPair.privateKey,\n        );\n\n      return new AuthRequestLoginCredentials(\n        this.email,\n        this.authRequest.accessCode,\n        requestId,\n        null, // no userKey\n        masterKey,\n        masterKeyHash,\n      );\n    } else {\n      // ...in Standard Auth Request Flow 2\n      const userKey = await this.authRequestService.decryptPubKeyEncryptedUserKey(\n        authRequestResponse.key,\n        this.authRequestKeyPair.privateKey,\n      );\n      return new AuthRequestLoginCredentials(\n        this.email,\n        this.authRequest.accessCode,\n        requestId,\n        userKey,\n        null, // no masterKey\n        null, // no masterKeyHash\n      );\n    }\n  }\n\n  private async handleExistingAdminAuthReqDeletedOrDenied(userId: UserId) {\n    // clear the admin auth request from state\n    await this.authRequestService.clearAdminAuthRequest(userId);\n\n    // start new auth request\n    await this.startAdminAuthRequestLogin();\n  }\n\n  private async handlePostLoginNavigation(loginResponse: AuthResult) {\n    if (loginResponse.requiresTwoFactor) {\n      await this.router.navigate([\"2fa\"]);\n    } else if (loginResponse.forcePasswordReset != ForceSetPasswordReason.None) {\n      await this.router.navigate([\"update-temp-password\"]);\n    } else {\n      await this.handleSuccessfulLoginNavigation(loginResponse.userId);\n    }\n  }\n\n  private async handleSuccessfulLoginNavigation(userId: UserId) {\n    if (this.flow === Flow.StandardAuthRequest) {\n      // Only need to set remembered email on standard login with auth req flow\n      await this.loginEmailService.saveEmailSettings();\n    }\n\n    await this.loginSuccessHandlerService.run(userId);\n    await this.router.navigate([\"vault\"]);\n  }\n}\n","<div class=\"tw-text-center\">\n  <ng-container *ngIf=\"flow === Flow.StandardAuthRequest\">\n    <p>{{ \"makeSureYourAccountIsUnlockedAndTheFingerprintEtc\" | i18n }}</p>\n\n    <div class=\"tw-font-semibold\">{{ \"fingerprintPhraseHeader\" | i18n }}</div>\n    <code class=\"tw-text-code\">{{ fingerprintPhrase }}</code>\n\n    <button\n      *ngIf=\"showResendNotification\"\n      type=\"button\"\n      bitButton\n      block\n      buttonType=\"secondary\"\n      class=\"tw-mt-4\"\n      (click)=\"startStandardAuthRequestLogin()\"\n    >\n      {{ \"resendNotification\" | i18n }}\n    </button>\n\n    <div *ngIf=\"clientType !== ClientType.Browser\" class=\"tw-mt-4\">\n      <span>{{ \"needAnotherOptionV1\" | i18n }}</span>\n      <a [routerLink]=\"backToRoute\" bitLink linkType=\"primary\">{{\n        \"viewAllLogInOptions\" | i18n\n      }}</a>\n    </div>\n  </ng-container>\n\n  <ng-container *ngIf=\"flow === Flow.AdminAuthRequest\">\n    <p>{{ \"youWillBeNotifiedOnceTheRequestIsApproved\" | i18n }}</p>\n\n    <div class=\"tw-font-semibold\">{{ \"fingerprintPhraseHeader\" | i18n }}</div>\n    <code class=\"tw-text-code\">{{ fingerprintPhrase }}</code>\n\n    <div class=\"tw-mt-4\">\n      <span>{{ \"troubleLoggingIn\" | i18n }}</span>\n      <a [routerLink]=\"backToRoute\" bitLink linkType=\"primary\">{{\n        \"viewAllLogInOptions\" | i18n\n      }}</a>\n    </div>\n  </ng-container>\n</div>\n","<form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n  <!-- <ng-template> must be within the <form> to ensure that `formControlName` has a parent `formGroup` directive. -->\n  <ng-template #formContentTemplate>\n    <bit-form-field>\n      <bit-label>{{ \"accountEmail\" | i18n }}</bit-label>\n      <input\n        bitInput\n        appAutofocus\n        inputmode=\"email\"\n        appInputVerbatim=\"false\"\n        type=\"email\"\n        formControlName=\"email\"\n      />\n    </bit-form-field>\n\n    <button\n      class=\"tw-mb-2\"\n      type=\"submit\"\n      bitButton\n      bitFormButton\n      buttonType=\"primary\"\n      [block]=\"true\"\n    >\n      {{ \"requestHint\" | i18n }}\n    </button>\n    <button type=\"button\" bitButton buttonType=\"secondary\" (click)=\"cancel()\" [block]=\"true\">\n      {{ \"cancel\" | i18n }}\n    </button>\n  </ng-template>\n\n  <!-- Browser -->\n  <main *ngIf=\"clientType === 'browser'\" tabindex=\"-1\">\n    <ng-container *ngTemplateOutlet=\"formContentTemplate\"></ng-container>\n  </main>\n\n  <!-- Web, Desktop -->\n  <ng-container *ngIf=\"clientType !== 'browser'\">\n    <ng-container *ngTemplateOutlet=\"formContentTemplate\"></ng-container>\n  </ng-container>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { Router, RouterModule } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { LoginEmailServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PasswordHintRequest } from \"@bitwarden/common/auth/models/request/password-hint.request\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  FormFieldModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  templateUrl: \"./password-hint.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CommonModule,\n    FormFieldModule,\n    JslibModule,\n    ReactiveFormsModule,\n    RouterModule,\n  ],\n})\nexport class PasswordHintComponent implements OnInit {\n  protected clientType: ClientType;\n\n  protected formGroup = this.formBuilder.group({\n    email: [\"\", [Validators.required, Validators.email]],\n  });\n\n  protected get email() {\n    return this.formGroup.controls.email.value;\n  }\n\n  constructor(\n    private apiService: ApiService,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private loginEmailService: LoginEmailServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n    private toastService: ToastService,\n    private router: Router,\n  ) {\n    this.clientType = this.platformUtilsService.getClientType();\n  }\n\n  async ngOnInit(): Promise<void> {\n    const email = (await firstValueFrom(this.loginEmailService.loginEmail$)) ?? \"\";\n    this.formGroup.controls.email.setValue(email);\n  }\n\n  submit = async () => {\n    const isEmailValid = this.validateEmailOrShowToast(this.email);\n    if (!isEmailValid) {\n      return;\n    }\n\n    await this.apiService.postPasswordHint(new PasswordHintRequest(this.email));\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"masterPassSent\"),\n    });\n\n    await this.router.navigate([\"login\"]);\n  };\n\n  protected async cancel() {\n    this.loginEmailService.setLoginEmail(this.email);\n    await this.router.navigate([\"login\"]);\n  }\n\n  private validateEmailOrShowToast(email: string): boolean {\n    // If email is null or empty, show error toast and return false\n    if (email == null || email === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"emailRequired\"),\n      });\n      return false;\n    }\n\n    // If not a valid email format, show error toast and return false\n    if (email.indexOf(\"@\") === -1) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"invalidEmail\"),\n      });\n      return false;\n    }\n\n    return true; // email is valid\n  }\n}\n","export class RegisterSendVerificationEmailRequest {\n  constructor(\n    public email: string,\n    public name: string,\n    public receiveMarketingEmails: boolean,\n  ) {}\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle> Self-hosted environment</span>\n    <ng-container bitDialogContent>\n      <bit-form-field>\n        <bit-label>{{ \"baseUrl\" | i18n }}</bit-label>\n        <input\n          id=\"self_hosted_env_settings_form_input_base_url\"\n          bitInput\n          type=\"text\"\n          formControlName=\"baseUrl\"\n          appAutofocus\n          appInputVerbatim\n        />\n        <bit-hint>{{ \"selfHostedBaseUrlHint\" | i18n }}</bit-hint>\n      </bit-form-field>\n\n      <button bitLink linkType=\"primary\" type=\"button\" (click)=\"showCustomEnv = !showCustomEnv\">\n        <i\n          class=\"bwi bwi-fw bwi-sm\"\n          [ngClass]=\"{ 'bwi-angle-right': !showCustomEnv, 'bwi-angle-down': showCustomEnv }\"\n          aria-hidden=\"true\"\n        ></i>\n        {{ \"customEnvironment\" | i18n }}\n      </button>\n\n      <ng-container *ngIf=\"showCustomEnv\">\n        <p bitTypography=\"body1\" class=\"tw-text-muted tw-mt-3\">\n          {{ \"selfHostedCustomEnvHeader\" | i18n }}\n        </p>\n\n        <bit-form-field>\n          <bit-label>{{ \"webVaultUrl\" | i18n }}</bit-label>\n          <input\n            id=\"self_hosted_env_settings_form_input_web_vault_url\"\n            bitInput\n            type=\"text\"\n            formControlName=\"webVaultUrl\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n\n        <bit-form-field>\n          <bit-label>{{ \"apiUrl\" | i18n }}</bit-label>\n          <input\n            id=\"self_hosted_env_settings_form_input_api_url\"\n            bitInput\n            type=\"text\"\n            formControlName=\"apiUrl\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n\n        <bit-form-field>\n          <bit-label>{{ \"identityUrl\" | i18n }}</bit-label>\n          <input\n            id=\"self_hosted_env_settings_form_input_identity_url\"\n            bitInput\n            type=\"text\"\n            formControlName=\"identityUrl\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n\n        <bit-form-field>\n          <bit-label>{{ \"notificationsUrl\" | i18n }}</bit-label>\n          <input\n            id=\"self_hosted_env_settings_form_input_notifications_url\"\n            bitInput\n            type=\"text\"\n            formControlName=\"notificationsUrl\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n\n        <bit-form-field>\n          <bit-label>{{ \"iconsUrl\" | i18n }}</bit-label>\n          <input\n            id=\"self_hosted_env_settings_form_input_icons_url\"\n            bitInput\n            type=\"text\"\n            formControlName=\"iconsUrl\"\n            appInputVerbatim\n          />\n        </bit-form-field>\n      </ng-container>\n\n      <span\n        *ngIf=\"showErrorSummary\"\n        class=\"tw-block tw-text-danger tw-mt-2\"\n        aria-live=\"assertive\"\n        role=\"alert\"\n      >\n        <i class=\"bwi bwi-error\"></i> {{ \"selfHostedEnvFormInvalid\" | i18n }}\n      </span>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ \"save\" | i18n }}\n      </button>\n\n      <button type=\"button\" bitButton bitFormButton buttonType=\"secondary\" (click)=\"cancel()\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n  AbstractControl,\n  FormBuilder,\n  FormControl,\n  FormGroup,\n  ReactiveFormsModule,\n  ValidationErrors,\n  ValidatorFn,\n} from \"@angular/forms\";\nimport { Subject, firstValueFrom, take, filter, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  EnvironmentService,\n  Region,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  DialogService,\n  FormFieldModule,\n  LinkModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\n/**\n * Validator for self-hosted environment settings form.\n * It enforces that at least one URL is provided.\n */\nfunction selfHostedEnvSettingsFormValidator(): ValidatorFn {\n  return (control: AbstractControl): ValidationErrors | null => {\n    const formGroup = control as FormGroup;\n    const baseUrl = formGroup.get(\"baseUrl\")?.value;\n    const webVaultUrl = formGroup.get(\"webVaultUrl\")?.value;\n    const apiUrl = formGroup.get(\"apiUrl\")?.value;\n    const identityUrl = formGroup.get(\"identityUrl\")?.value;\n    const iconsUrl = formGroup.get(\"iconsUrl\")?.value;\n    const notificationsUrl = formGroup.get(\"notificationsUrl\")?.value;\n\n    if (baseUrl || webVaultUrl || apiUrl || identityUrl || iconsUrl || notificationsUrl) {\n      return null; // valid\n    } else {\n      return { atLeastOneUrlIsRequired: true }; // invalid\n    }\n  };\n}\n\n/**\n * Dialog for configuring self-hosted environment settings.\n */\n@Component({\n  standalone: true,\n  selector: \"self-hosted-env-config-dialog\",\n  templateUrl: \"self-hosted-env-config-dialog.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    LinkModule,\n    TypographyModule,\n    ReactiveFormsModule,\n    FormFieldModule,\n    AsyncActionsModule,\n  ],\n})\nexport class SelfHostedEnvConfigDialogComponent implements OnInit, OnDestroy {\n  /**\n   * Opens the dialog.\n   * @param dialogService - Dialog service.\n   * @returns Promise that resolves to true if the dialog was closed with a successful result, false otherwise.\n   */\n  static async open(dialogService: DialogService): Promise<boolean> {\n    const dialogRef = dialogService.open<boolean>(SelfHostedEnvConfigDialogComponent, {\n      disableClose: false,\n    });\n\n    const dialogResult = await firstValueFrom(dialogRef.closed);\n\n    return dialogResult;\n  }\n\n  formGroup = this.formBuilder.group(\n    {\n      baseUrl: [null],\n      webVaultUrl: [null],\n      apiUrl: [null],\n      identityUrl: [null],\n      iconsUrl: [null],\n      notificationsUrl: [null],\n    },\n    { validators: selfHostedEnvSettingsFormValidator() },\n  );\n\n  get baseUrl(): FormControl {\n    return this.formGroup.get(\"baseUrl\") as FormControl;\n  }\n\n  get webVaultUrl(): FormControl {\n    return this.formGroup.get(\"webVaultUrl\") as FormControl;\n  }\n\n  get apiUrl(): FormControl {\n    return this.formGroup.get(\"apiUrl\") as FormControl;\n  }\n\n  get identityUrl(): FormControl {\n    return this.formGroup.get(\"identityUrl\") as FormControl;\n  }\n\n  get iconsUrl(): FormControl {\n    return this.formGroup.get(\"iconsUrl\") as FormControl;\n  }\n\n  get notificationsUrl(): FormControl {\n    return this.formGroup.get(\"notificationsUrl\") as FormControl;\n  }\n\n  showCustomEnv = false;\n  showErrorSummary = false;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private dialogRef: DialogRef<boolean>,\n    private formBuilder: FormBuilder,\n    private environmentService: EnvironmentService,\n  ) {}\n\n  ngOnInit() {\n    /**\n     * Populate the form with the current self-hosted environment settings.\n     */\n    this.environmentService.environment$\n      .pipe(\n        take(1),\n        filter((env) => {\n          const region = env.getRegion();\n          return region === Region.SelfHosted;\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe({\n        next: (env) => {\n          const urls = env.getUrls();\n          this.formGroup.patchValue({\n            baseUrl: urls.base || \"\",\n            webVaultUrl: urls.webVault || \"\",\n            apiUrl: urls.api || \"\",\n            identityUrl: urls.identity || \"\",\n            iconsUrl: urls.icons || \"\",\n            notificationsUrl: urls.notifications || \"\",\n          });\n        },\n      });\n  }\n\n  submit = async () => {\n    this.showErrorSummary = false;\n\n    if (this.formGroup.invalid) {\n      this.showErrorSummary = true;\n      return;\n    }\n\n    await this.environmentService.setEnvironment(Region.SelfHosted, {\n      base: this.baseUrl.value,\n      api: this.apiUrl.value,\n      identity: this.identityUrl.value,\n      webVault: this.webVaultUrl.value,\n      icons: this.iconsUrl.value,\n      notifications: this.notificationsUrl.value,\n    });\n\n    this.dialogRef.close(true);\n  };\n\n  async cancel() {\n    this.dialogRef.close(false);\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<form [formGroup]=\"formGroup\" *ngIf=\"!hideEnvSelector\">\n  <bit-form-field>\n    <bit-label>{{ \"creatingAccountOn\" | i18n }}</bit-label>\n    <bit-select formControlName=\"selectedRegion\" (closed)=\"onSelectClosed()\">\n      <bit-option\n        *ngFor=\"let regionConfig of availableRegionConfigs\"\n        [value]=\"regionConfig\"\n        [label]=\"regionConfig.domain\"\n      ></bit-option>\n      <bit-option\n        *ngIf=\"isDesktopOrBrowserExtension\"\n        [value]=\"ServerEnvironmentType.SelfHosted\"\n        [label]=\"'selfHostedServer' | i18n\"\n      ></bit-option>\n    </bit-select>\n  </bit-form-field>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, FormControl, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { Subject, from, map, of, pairwise, startWith, switchMap, takeUntil, tap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport {\n  Environment,\n  EnvironmentService,\n  Region,\n  RegionConfig,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { DialogService, FormFieldModule, SelectModule, ToastService } from \"@bitwarden/components\";\n\nimport { SelfHostedEnvConfigDialogComponent } from \"../../self-hosted-env-config-dialog/self-hosted-env-config-dialog.component\";\n\n/**\n * Component for selecting the environment to register with in the email verification registration flow.\n * Outputs the selected region to the parent component so it can respond as necessary.\n */\n@Component({\n  standalone: true,\n  selector: \"auth-registration-env-selector\",\n  templateUrl: \"registration-env-selector.component.html\",\n  imports: [CommonModule, JslibModule, ReactiveFormsModule, FormFieldModule, SelectModule],\n})\nexport class RegistrationEnvSelectorComponent implements OnInit, OnDestroy {\n  @Output() selectedRegionChange = new EventEmitter<RegionConfig | Region.SelfHosted | null>();\n\n  ServerEnvironmentType = Region;\n\n  formGroup = this.formBuilder.group({\n    selectedRegion: [null as RegionConfig | Region.SelfHosted | null, Validators.required],\n  });\n\n  get selectedRegion(): FormControl {\n    return this.formGroup.get(\"selectedRegion\") as FormControl;\n  }\n\n  availableRegionConfigs: RegionConfig[] = this.environmentService.availableRegions();\n\n  private selectedRegionFromEnv: RegionConfig | Region.SelfHosted;\n\n  hideEnvSelector = false;\n  isDesktopOrBrowserExtension = false;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private environmentService: EnvironmentService,\n    private dialogService: DialogService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n    private platformUtilsService: PlatformUtilsService,\n  ) {\n    const clientType = platformUtilsService.getClientType();\n    this.isDesktopOrBrowserExtension =\n      clientType === ClientType.Desktop || clientType === ClientType.Browser;\n\n    this.hideEnvSelector = clientType === ClientType.Web && this.platformUtilsService.isSelfHost();\n  }\n\n  async ngOnInit() {\n    if (this.hideEnvSelector) {\n      return;\n    }\n\n    await this.initSelectedRegionAndListenForEnvChanges();\n    this.listenForSelectedRegionChanges();\n  }\n\n  private async initSelectedRegionAndListenForEnvChanges() {\n    this.environmentService.environment$\n      .pipe(\n        map((env: Environment) => {\n          const region: Region = env.getRegion();\n          const regionConfig: RegionConfig = this.availableRegionConfigs.find(\n            (availableRegionConfig) => availableRegionConfig.key === region,\n          );\n\n          if (regionConfig === undefined) {\n            // Self hosted does not have a region config.\n            return Region.SelfHosted;\n          }\n\n          return regionConfig;\n        }),\n        tap((selectedRegionFromEnv: RegionConfig | Region.SelfHosted) => {\n          // Only set the value if it is different from the current value.\n          if (selectedRegionFromEnv !== this.selectedRegion.value) {\n            // Don't emit to avoid triggering the selectedRegion valueChanges subscription\n            // which could loop back to this code.\n            this.selectedRegion.setValue(selectedRegionFromEnv, { emitEvent: false });\n          }\n\n          // Save this off so we can reset the value to the previously selected region\n          // if the self hosted settings are closed without saving.\n          this.selectedRegionFromEnv = selectedRegionFromEnv;\n\n          // Emit the initial value\n          this.selectedRegionChange.emit(selectedRegionFromEnv);\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  /**\n   * Listens for changes to the selected region and updates the form value and emits the selected region.\n   */\n  private listenForSelectedRegionChanges() {\n    this.selectedRegion.valueChanges\n      .pipe(\n        startWith(null), // required so that first user choice is not ignored\n        pairwise(),\n        switchMap(\n          ([prevSelectedRegion, selectedRegion]: [\n            RegionConfig | Region.SelfHosted | null,\n            RegionConfig | Region.SelfHosted | null,\n          ]) => {\n            if (selectedRegion === null) {\n              this.selectedRegionChange.emit(selectedRegion);\n              return of(null);\n            }\n\n            if (selectedRegion !== Region.SelfHosted) {\n              this.selectedRegionChange.emit(selectedRegion);\n              return from(this.environmentService.setEnvironment(selectedRegion.key));\n            }\n\n            return of(null);\n          },\n        ),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  private handleSelfHostedEnvConfigDialogResult(\n    result: boolean | undefined,\n    prevSelectedRegion: RegionConfig | Region.SelfHosted | null,\n  ) {\n    if (result === true) {\n      this.selectedRegionChange.emit(Region.SelfHosted);\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"environmentSaved\"),\n      });\n      return;\n    }\n\n    // Reset the value to the previously selected region or the current env setting\n    // if the self hosted env settings dialog is closed without saving.\n    if (\n      (result === false || result === undefined) &&\n      prevSelectedRegion !== null &&\n      prevSelectedRegion !== Region.SelfHosted\n    ) {\n      this.selectedRegionChange.emit(prevSelectedRegion);\n      this.selectedRegion.setValue(prevSelectedRegion, { emitEvent: false });\n    } else {\n      this.selectedRegionChange.emit(this.selectedRegionFromEnv);\n      this.selectedRegion.setValue(this.selectedRegionFromEnv, { emitEvent: false });\n    }\n  }\n\n  /**\n   * Handles the event when the select is closed.\n   * If the selected region is self-hosted, opens the self-hosted environment settings dialog.\n   */\n  protected async onSelectClosed() {\n    if (this.selectedRegion.value === Region.SelfHosted) {\n      const result = await SelfHostedEnvConfigDialogComponent.open(this.dialogService);\n      return this.handleSelfHostedEnvConfigDialogResult(result, this.selectedRegion.value);\n    }\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterSendVerificationEmailRequest } from \"@bitwarden/common/auth/models/request/registration/register-send-verification-email.request\";\nimport { RegionConfig, Region } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CheckboxModule,\n  FormFieldModule,\n  IconModule,\n  LinkModule,\n} from \"@bitwarden/components\";\n\nimport { LoginEmailService } from \"../../../common\";\nimport { AnonLayoutWrapperDataService } from \"../../anon-layout/anon-layout-wrapper-data.service\";\nimport { RegistrationUserAddIcon } from \"../../icons\";\nimport { RegistrationCheckEmailIcon } from \"../../icons/registration-check-email.icon\";\nimport { RegistrationEnvSelectorComponent } from \"../registration-env-selector/registration-env-selector.component\";\n\nexport enum RegistrationStartState {\n  USER_DATA_ENTRY = \"UserDataEntry\",\n  CHECK_EMAIL = \"CheckEmail\",\n}\n\nconst DEFAULT_MARKETING_EMAILS_PREF_BY_REGION: Record<Region, boolean> = {\n  [Region.US]: true,\n  [Region.EU]: false,\n  [Region.SelfHosted]: false,\n};\n\n@Component({\n  standalone: true,\n  selector: \"auth-registration-start\",\n  templateUrl: \"./registration-start.component.html\",\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n    JslibModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    CheckboxModule,\n    ButtonModule,\n    LinkModule,\n    IconModule,\n    RegistrationEnvSelectorComponent,\n  ],\n})\nexport class RegistrationStartComponent implements OnInit, OnDestroy {\n  @Output() registrationStartStateChange = new EventEmitter<RegistrationStartState>();\n\n  state: RegistrationStartState = RegistrationStartState.USER_DATA_ENTRY;\n  RegistrationStartState = RegistrationStartState;\n\n  isSelfHost = false;\n\n  formGroup = this.formBuilder.group({\n    email: [\"\", [Validators.required, Validators.email]],\n    name: [\"\"],\n    receiveMarketingEmails: [false],\n  });\n\n  get email() {\n    return this.formGroup.controls.email;\n  }\n\n  get name() {\n    return this.formGroup.controls.name;\n  }\n\n  get receiveMarketingEmails() {\n    return this.formGroup.controls.receiveMarketingEmails;\n  }\n\n  emailReadonly: boolean = false;\n\n  showErrorSummary = false;\n\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private route: ActivatedRoute,\n    private platformUtilsService: PlatformUtilsService,\n    private accountApiService: AccountApiService,\n    private router: Router,\n    private loginEmailService: LoginEmailService,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n  ) {\n    this.isSelfHost = platformUtilsService.isSelfHost();\n  }\n\n  async ngOnInit() {\n    // Emit the initial state\n    this.registrationStartStateChange.emit(this.state);\n\n    this.listenForQueryParamChanges();\n\n    /**\n     * If the user has a login email, set the email field to the login email.\n     */\n    this.loginEmailService.loginEmail$.pipe(takeUntil(this.destroy$)).subscribe((email) => {\n      if (email) {\n        this.formGroup.patchValue({ email });\n      }\n    });\n  }\n\n  private listenForQueryParamChanges() {\n    this.route.queryParams.pipe(takeUntil(this.destroy$)).subscribe((qParams) => {\n      if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n        this.email?.setValue(qParams.email);\n        this.emailReadonly = qParams.emailReadonly === \"true\";\n      }\n    });\n  }\n\n  setReceiveMarketingEmailsByRegion(region: RegionConfig | Region.SelfHosted) {\n    let defaultValue;\n    if (region === Region.SelfHosted) {\n      defaultValue = DEFAULT_MARKETING_EMAILS_PREF_BY_REGION[region];\n    } else {\n      const regionKey = (region as RegionConfig).key;\n      defaultValue = DEFAULT_MARKETING_EMAILS_PREF_BY_REGION[regionKey];\n    }\n\n    this.receiveMarketingEmails.setValue(defaultValue);\n  }\n\n  submit = async () => {\n    const valid = this.validateForm();\n\n    if (!valid) {\n      return;\n    }\n\n    // The app expects null for name and not empty string.\n    const sanitizedName = this.name.value === \"\" ? null : this.name.value;\n\n    const request: RegisterSendVerificationEmailRequest = new RegisterSendVerificationEmailRequest(\n      this.email.value,\n      sanitizedName,\n      this.receiveMarketingEmails.value,\n    );\n\n    const result = await this.accountApiService.registerSendVerificationEmail(request);\n\n    if (typeof result === \"string\") {\n      // we received a token, so the env doesn't support email verification\n      // send the user directly to the finish registration page with the token as a query param\n      await this.router.navigate([\"/finish-signup\"], {\n        queryParams: { token: result, email: this.email.value },\n      });\n    }\n\n    // Result is null, so email verification is required\n    this.state = RegistrationStartState.CHECK_EMAIL;\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageTitle: {\n        key: \"checkYourEmail\",\n      },\n      pageIcon: RegistrationCheckEmailIcon,\n    });\n    this.registrationStartStateChange.emit(this.state);\n  };\n\n  handleSelectedRegionChange(region: RegionConfig | Region.SelfHosted | null) {\n    this.isSelfHost = region === Region.SelfHosted;\n\n    if (region !== null) {\n      this.setReceiveMarketingEmailsByRegion(region);\n    }\n  }\n\n  private validateForm(): boolean {\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      this.showErrorSummary = true;\n    }\n\n    return this.formGroup.valid;\n  }\n\n  goBack() {\n    this.state = RegistrationStartState.USER_DATA_ENTRY;\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageIcon: RegistrationUserAddIcon,\n      pageTitle: {\n        key: \"createAccount\",\n      },\n    });\n    this.registrationStartStateChange.emit(this.state);\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<ng-container *ngIf=\"state === RegistrationStartState.USER_DATA_ENTRY\">\n  <form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n    <auth-registration-env-selector\n      (selectedRegionChange)=\"handleSelectedRegionChange($event)\"\n    ></auth-registration-env-selector>\n\n    <bit-form-field>\n      <bit-label>{{ \"emailAddress\" | i18n }}</bit-label>\n      <input\n        id=\"register-start_form_input_email\"\n        bitInput\n        type=\"email\"\n        formControlName=\"email\"\n        [attr.readonly]=\"emailReadonly ? true : null\"\n      />\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"name\" | i18n }}</bit-label>\n      <input id=\"register-start_form_input_name\" bitInput type=\"text\" formControlName=\"name\" />\n    </bit-form-field>\n\n    <bit-form-control *ngIf=\"!isSelfHost\">\n      <input\n        id=\"register-start-form-input-receive-marketing-emails\"\n        type=\"checkbox\"\n        bitCheckbox\n        formControlName=\"receiveMarketingEmails\"\n      />\n      <bit-label for=\"register-start-form-input-receive-marketing-emails\">\n        {{ \"receiveMarketingEmailsV2\" | i18n }}\n        <a\n          bitLink\n          linkType=\"primary\"\n          href=\"https://bitwarden.com/email-preferences\"\n          target=\"_blank\"\n          rel=\"noreferrer\"\n        >\n          {{ \"unsubscribe\" | i18n }}\n        </a>\n        {{ \"atAnyTime\" | i18n }}\n      </bit-label>\n    </bit-form-control>\n\n    <button\n      [block]=\"true\"\n      type=\"submit\"\n      buttonType=\"primary\"\n      bitButton\n      bitFormButton\n      class=\"tw-mb-3\"\n    >\n      {{ \"continue\" | i18n }}\n    </button>\n\n    <p bitTypography=\"helper\" class=\"tw-text-main tw-text-xs tw-mb-0\">\n      {{ \"byContinuingYouAgreeToThe\" | i18n }}\n      <a\n        bitLink\n        linkType=\"primary\"\n        href=\"https://bitwarden.com/terms/\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n        >{{ \"termsOfService\" | i18n }}</a\n      >\n      {{ \"and\" | i18n }}\n      <a\n        bitLink\n        linkType=\"primary\"\n        href=\"https://bitwarden.com/privacy/\"\n        target=\"_blank\"\n        rel=\"noreferrer\"\n        >{{ \"privacyPolicy\" | i18n }}</a\n      >\n    </p>\n\n    <bit-error-summary *ngIf=\"showErrorSummary\" [formGroup]=\"formGroup\"></bit-error-summary></form\n></ng-container>\n\n<ng-container *ngIf=\"state === RegistrationStartState.CHECK_EMAIL\">\n  <div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center\">\n    <p bitTypography=\"body1\" class=\"tw-text-center tw-mb-3 tw-text-main\" id=\"follow_the_link_body\">\n      {{ \"followTheLinkInTheEmailSentTo\" | i18n }}\n      <span class=\"tw-font-bold\">{{ email.value }}</span>\n      {{ \"andContinueCreatingYourAccount\" | i18n }}\n    </p>\n\n    <p bitTypography=\"helper\" class=\"tw-text-center tw-text-main\">\n      {{ \"noEmail\" | i18n }}\n      <a bitLink linkType=\"primary\" class=\"tw-cursor-pointer\" tabindex=\"0\" (click)=\"goBack()\">\n        {{ \"goBack\" | i18n }}\n      </a>\n      {{ \"toEditYourEmailAddress\" | i18n }}\n    </p>\n  </div>\n</ng-container>\n","export class RegisterVerificationEmailClickedRequest {\n  constructor(\n    public email: string,\n    public emailVerificationToken: string,\n  ) {}\n}\n","import { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\n\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nexport abstract class RegistrationFinishService {\n  /**\n   * Retrieves the organization name from an organization invite if it exists.\n   * Organization invites can currently only be accepted on the web.\n   * @returns a promise which resolves to the organization name string or null if no invite exists.\n   */\n  abstract getOrgNameFromOrgInvite(): Promise<string | null>;\n\n  /**\n   * Gets the master password policy options from an organization invite if it exits.\n   * Organization invites can currently only be accepted on the web.\n   */\n  abstract getMasterPasswordPolicyOptsFromOrgInvite(): Promise<MasterPasswordPolicyOptions | null>;\n\n  /**\n   * Finishes the registration process by creating a new user account.\n   *\n   * @param email The email address of the user.\n   * @param passwordInputResult The password input result.\n   * @param emailVerificationToken The optional email verification token. Not present in emailed invite scenarios (ex: org invite).\n   * @param orgSponsoredFreeFamilyPlanToken The optional org sponsored free family plan token.\n   * @param acceptEmergencyAccessInviteToken The optional accept emergency access invite token.\n   * @param emergencyAccessId The optional emergency access id which is required to validate the emergency access invite token.\n   * @param providerInviteToken The optional provider invite token.\n   * @param providerUserId The optional provider user id which is required to validate the provider invite token.\n   * @returns a promise which resolves to the captcha bypass token string upon a successful account creation.\n   */\n  abstract finishRegistration(\n    email: string,\n    passwordInputResult: PasswordInputResult,\n    emailVerificationToken?: string,\n    orgSponsoredFreeFamilyPlanToken?: string,\n    acceptEmergencyAccessInviteToken?: string,\n    emergencyAccessId?: string,\n    providerInviteToken?: string,\n    providerUserId?: string,\n  ): Promise<string>;\n}\n","<div class=\"tw-flex tw-items-center tw-justify-center\" *ngIf=\"loading\">\n  <i class=\"bwi bwi-spinner bwi-spin bwi-3x\" aria-hidden=\"true\"></i>\n</div>\n\n<auth-input-password\n  *ngIf=\"!loading\"\n  [email]=\"email\"\n  [masterPasswordPolicyOptions]=\"masterPasswordPolicyOptions\"\n  [loading]=\"submitting\"\n  (onPasswordFormSubmit)=\"handlePasswordFormSubmit($event)\"\n  [buttonText]=\"'createAccount' | i18n\"\n></auth-input-password>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Params, Router, RouterModule } from \"@angular/router\";\nimport { Subject, firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterVerificationEmailClickedRequest } from \"@bitwarden/common/auth/models/request/registration/register-verification-email-clicked.request\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { ToastService } from \"@bitwarden/components\";\n\nimport { LoginStrategyServiceAbstraction, PasswordLoginCredentials } from \"../../../common\";\nimport { AnonLayoutWrapperDataService } from \"../../anon-layout/anon-layout-wrapper-data.service\";\nimport { InputPasswordComponent } from \"../../input-password/input-password.component\";\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nimport { RegistrationFinishService } from \"./registration-finish.service\";\n\n@Component({\n  standalone: true,\n  selector: \"auth-registration-finish\",\n  templateUrl: \"./registration-finish.component.html\",\n  imports: [CommonModule, JslibModule, RouterModule, InputPasswordComponent],\n})\nexport class RegistrationFinishComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  loading = true;\n  submitting = false;\n  email: string;\n\n  // Note: this token is the email verification token. When it is supplied as a query param,\n  // it either comes from the email verification email or, if email verification is disabled server side\n  // via global settings, it comes directly from the registration-start component directly.\n  // It is not provided when the user is coming from another emailed invite (ex: org invite or enterprise\n  // org sponsored free family plan invite).\n  emailVerificationToken: string;\n\n  // this token is provided when the user is coming from an emailed invite to\n  // setup a free family plan sponsored by an organization but they don't have an account yet.\n  orgSponsoredFreeFamilyPlanToken: string;\n\n  // this token is provided when the user is coming from an emailed invite to accept an emergency access invite\n  acceptEmergencyAccessInviteToken: string;\n  emergencyAccessId: string;\n\n  // This token is provided when the user is coming from an emailed invite to accept a provider invite\n  providerInviteToken: string;\n  providerUserId: string;\n\n  masterPasswordPolicyOptions: MasterPasswordPolicyOptions | null = null;\n\n  constructor(\n    private activatedRoute: ActivatedRoute,\n    private router: Router,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n    private registrationFinishService: RegistrationFinishService,\n    private validationService: ValidationService,\n    private accountApiService: AccountApiService,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private logService: LogService,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n  ) {}\n\n  async ngOnInit() {\n    const qParams = await firstValueFrom(this.activatedRoute.queryParams);\n    this.handleQueryParams(qParams);\n\n    if (\n      qParams.fromEmail &&\n      qParams.fromEmail === \"true\" &&\n      this.email &&\n      this.emailVerificationToken\n    ) {\n      await this.initEmailVerificationFlow();\n    } else {\n      // Org Invite flow OR registration with email verification disabled Flow\n      const orgInviteFlow = await this.initOrgInviteFlowIfPresent();\n\n      if (!orgInviteFlow) {\n        this.initRegistrationWithEmailVerificationDisabledFlow();\n      }\n    }\n\n    this.loading = false;\n  }\n\n  private handleQueryParams(qParams: Params) {\n    if (qParams.email != null && qParams.email.indexOf(\"@\") > -1) {\n      this.email = qParams.email;\n    }\n\n    if (qParams.token != null) {\n      this.emailVerificationToken = qParams.token;\n    }\n\n    if (qParams.orgSponsoredFreeFamilyPlanToken != null) {\n      this.orgSponsoredFreeFamilyPlanToken = qParams.orgSponsoredFreeFamilyPlanToken;\n    }\n\n    if (qParams.acceptEmergencyAccessInviteToken != null && qParams.emergencyAccessId) {\n      this.acceptEmergencyAccessInviteToken = qParams.acceptEmergencyAccessInviteToken;\n      this.emergencyAccessId = qParams.emergencyAccessId;\n    }\n\n    if (qParams.providerInviteToken != null && qParams.providerUserId != null) {\n      this.providerInviteToken = qParams.providerInviteToken;\n      this.providerUserId = qParams.providerUserId;\n    }\n  }\n\n  private async initOrgInviteFlowIfPresent(): Promise<boolean> {\n    this.masterPasswordPolicyOptions =\n      await this.registrationFinishService.getMasterPasswordPolicyOptsFromOrgInvite();\n\n    const orgName = await this.registrationFinishService.getOrgNameFromOrgInvite();\n    if (orgName) {\n      // Org invite exists\n      // Set the page title and subtitle appropriately\n      this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n        pageTitle: {\n          key: \"joinOrganizationName\",\n          placeholders: [orgName],\n        },\n        pageSubtitle: {\n          key: \"finishJoiningThisOrganizationBySettingAMasterPassword\",\n        },\n      });\n      return true;\n    }\n\n    return false;\n  }\n\n  async handlePasswordFormSubmit(passwordInputResult: PasswordInputResult) {\n    this.submitting = true;\n    let captchaBypassToken: string = null;\n    try {\n      captchaBypassToken = await this.registrationFinishService.finishRegistration(\n        this.email,\n        passwordInputResult,\n        this.emailVerificationToken,\n        this.orgSponsoredFreeFamilyPlanToken,\n        this.acceptEmergencyAccessInviteToken,\n        this.emergencyAccessId,\n        this.providerInviteToken,\n        this.providerUserId,\n      );\n    } catch (e) {\n      this.validationService.showError(e);\n      this.submitting = false;\n      return;\n    }\n\n    // Show acct created toast\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"newAccountCreated2\"),\n    });\n\n    // login with the new account\n    try {\n      const credentials = new PasswordLoginCredentials(\n        this.email,\n        passwordInputResult.password,\n        captchaBypassToken,\n        null,\n      );\n\n      const authenticationResult = await this.loginStrategyService.logIn(credentials);\n\n      if (authenticationResult?.requiresTwoFactor) {\n        await this.router.navigate([\"/2fa\"]);\n        return;\n      }\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"youHaveBeenLoggedIn\"),\n      });\n\n      await this.router.navigate([\"/vault\"]);\n    } catch (e) {\n      // If login errors, redirect to login page per product. Don't show error\n      this.logService.error(\"Error logging in after registration: \", e.message);\n      await this.router.navigate([\"/login\"], { queryParams: { email: this.email } });\n    }\n    this.submitting = false;\n  }\n\n  private setDefaultPageTitleAndSubtitle() {\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageTitle: {\n        key: \"setAStrongPassword\",\n      },\n      pageSubtitle: {\n        key: \"finishCreatingYourAccountBySettingAPassword\",\n      },\n    });\n  }\n\n  private async initEmailVerificationFlow() {\n    this.setDefaultPageTitleAndSubtitle();\n    await this.registerVerificationEmailClicked(this.email, this.emailVerificationToken);\n  }\n\n  private async registerVerificationEmailClicked(email: string, emailVerificationToken: string) {\n    const request = new RegisterVerificationEmailClickedRequest(email, emailVerificationToken);\n    try {\n      const result = await this.accountApiService.registerVerificationEmailClicked(request);\n\n      if (result == null) {\n        this.toastService.showToast({\n          title: null,\n          message: this.i18nService.t(\"emailVerifiedV2\"),\n          variant: \"success\",\n        });\n      }\n    } catch (e) {\n      await this.handleRegisterVerificationEmailClickedError(e);\n    }\n  }\n\n  private async handleRegisterVerificationEmailClickedError(e: unknown) {\n    if (e instanceof ErrorResponse) {\n      const errorResponse = e as ErrorResponse;\n      switch (errorResponse.statusCode) {\n        case HttpStatusCode.BadRequest: {\n          if (errorResponse.message.includes(\"Expired link\")) {\n            await this.router.navigate([\"/signup-link-expired\"]);\n          } else {\n            this.validationService.showError(errorResponse);\n          }\n\n          break;\n        }\n        default:\n          this.validationService.showError(errorResponse);\n          break;\n      }\n    } else {\n      this.validationService.showError(e);\n    }\n  }\n\n  private initRegistrationWithEmailVerificationDisabledFlow() {\n    this.setDefaultPageTitleAndSubtitle();\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnDestroy, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { Subject, firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ButtonModule, IconModule } from \"@bitwarden/components\";\n\nimport { RegistrationExpiredLinkIcon } from \"../../icons/registration-expired-link.icon\";\n\n/**\n * RegistrationLinkExpiredComponentData\n * @loginRoute: string - The client specific route to the login page - configured at the app-routing.module level.\n */\nexport interface RegistrationLinkExpiredComponentData {\n  loginRoute: string;\n}\n\n@Component({\n  standalone: true,\n  selector: \"auth-registration-link-expired\",\n  templateUrl: \"./registration-link-expired.component.html\",\n  imports: [CommonModule, JslibModule, RouterModule, IconModule, ButtonModule],\n})\nexport class RegistrationLinkExpiredComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  loginRoute: string;\n\n  readonly Icons = { RegistrationExpiredLinkIcon };\n\n  constructor(private activatedRoute: ActivatedRoute) {}\n\n  async ngOnInit() {\n    const routeData = await firstValueFrom(this.activatedRoute.data);\n\n    this.loginRoute = routeData[\"loginRoute\"];\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<div class=\"tw-flex tw-flex-col tw-items-center tw-justify-center\">\n  <p\n    bitTypography=\"body1\"\n    class=\"tw-text-center tw-mb-3 tw-text-main\"\n    id=\"restart_registration_body\"\n  >\n    {{ \"pleaseRestartRegistrationOrTryLoggingIn\" | i18n }}<br />\n    {{ \"youMayAlreadyHaveAnAccount\" | i18n }}\n  </p>\n\n  <a\n    [block]=\"true\"\n    type=\"button\"\n    buttonType=\"primary\"\n    bitButton\n    class=\"tw-mb-3\"\n    routerLink=\"/signup\"\n  >\n    {{ \"restartRegistration\" | i18n }}\n  </a>\n\n  <a [block]=\"true\" type=\"button\" buttonType=\"secondary\" bitButton [routerLink]=\"loginRoute\">\n    {{ \"logIn\" | i18n }}\n  </a>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, RouterModule } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { LinkModule } from \"@bitwarden/components\";\n\n/**\n * RegistrationStartSecondaryComponentData\n * @loginRoute: string - The client specific route to the login page - configured at the app-routing.module level.\n */\nexport interface RegistrationStartSecondaryComponentData {\n  loginRoute: string;\n}\n\n@Component({\n  standalone: true,\n  selector: \"auth-registration-start-secondary\",\n  templateUrl: \"./registration-start-secondary.component.html\",\n  imports: [CommonModule, JslibModule, RouterModule, LinkModule],\n})\nexport class RegistrationStartSecondaryComponent implements OnInit {\n  loginRoute: string;\n\n  constructor(private activatedRoute: ActivatedRoute) {}\n\n  async ngOnInit() {\n    const routeData = await firstValueFrom(this.activatedRoute.data);\n\n    this.loginRoute = routeData[\"loginRoute\"];\n  }\n}\n","<span\n  >{{ \"alreadyHaveAccount\" | i18n }}\n  <a [routerLink]=\"loginRoute\" bitLink>{{ \"logIn\" | i18n }}</a></span\n>\n","import { KdfType } from \"@bitwarden/key-management\";\n\nimport { KeysRequest } from \"../../../../models/request/keys.request\";\nimport { EncryptedString } from \"../../../../platform/models/domain/enc-string\";\n\nexport class RegisterFinishRequest {\n  constructor(\n    public email: string,\n\n    public masterPasswordHash: string,\n    public masterPasswordHint: string,\n\n    public userSymmetricKey: EncryptedString,\n    public userAsymmetricKeys: KeysRequest,\n\n    public kdf: KdfType,\n    public kdfIterations: number,\n    public kdfMemory?: number,\n    public kdfParallelism?: number,\n\n    public emailVerificationToken?: string,\n    public orgSponsoredFreeFamilyPlanToken?: string,\n    public acceptEmergencyAccessInviteToken?: string,\n    public acceptEmergencyAccessId?: string,\n    public providerInviteToken?: string,\n    public providerUserId?: string,\n\n    // Org Invite data (only applies on web)\n    public organizationUserId?: string,\n    public orgInviteToken?: string,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountApiService } from \"@bitwarden/common/auth/abstractions/account-api.service\";\nimport { RegisterFinishRequest } from \"@bitwarden/common/auth/models/request/registration/register-finish.request\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { EncryptedString, EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { PasswordInputResult } from \"../../input-password/password-input-result\";\n\nimport { RegistrationFinishService } from \"./registration-finish.service\";\n\nexport class DefaultRegistrationFinishService implements RegistrationFinishService {\n  constructor(\n    protected keyService: KeyService,\n    protected accountApiService: AccountApiService,\n  ) {}\n\n  getOrgNameFromOrgInvite(): Promise<string | null> {\n    return null;\n  }\n\n  getMasterPasswordPolicyOptsFromOrgInvite(): Promise<MasterPasswordPolicyOptions | null> {\n    return null;\n  }\n\n  async finishRegistration(\n    email: string,\n    passwordInputResult: PasswordInputResult,\n    emailVerificationToken?: string,\n    orgSponsoredFreeFamilyPlanToken?: string,\n    acceptEmergencyAccessInviteToken?: string,\n    emergencyAccessId?: string,\n    providerInviteToken?: string,\n    providerUserId?: string,\n  ): Promise<string> {\n    const [newUserKey, newEncUserKey] = await this.keyService.makeUserKey(\n      passwordInputResult.masterKey,\n    );\n\n    if (!newUserKey || !newEncUserKey) {\n      throw new Error(\"User key could not be created\");\n    }\n    const userAsymmetricKeys = await this.keyService.makeKeyPair(newUserKey);\n\n    const registerRequest = await this.buildRegisterRequest(\n      email,\n      passwordInputResult,\n      newEncUserKey.encryptedString,\n      userAsymmetricKeys,\n      emailVerificationToken,\n      orgSponsoredFreeFamilyPlanToken,\n      acceptEmergencyAccessInviteToken,\n      emergencyAccessId,\n      providerInviteToken,\n      providerUserId,\n    );\n\n    const capchaBypassToken = await this.accountApiService.registerFinish(registerRequest);\n\n    return capchaBypassToken;\n  }\n\n  protected async buildRegisterRequest(\n    email: string,\n    passwordInputResult: PasswordInputResult,\n    encryptedUserKey: EncryptedString,\n    userAsymmetricKeys: [string, EncString],\n    emailVerificationToken?: string,\n    orgSponsoredFreeFamilyPlanToken?: string, // web only\n    acceptEmergencyAccessInviteToken?: string, // web only\n    emergencyAccessId?: string, // web only\n    providerInviteToken?: string, // web only\n    providerUserId?: string, // web only\n  ): Promise<RegisterFinishRequest> {\n    const userAsymmetricKeysRequest = new KeysRequest(\n      userAsymmetricKeys[0],\n      userAsymmetricKeys[1].encryptedString,\n    );\n\n    const registerFinishRequest = new RegisterFinishRequest(\n      email,\n      passwordInputResult.masterKeyHash,\n      passwordInputResult.hint,\n      encryptedUserKey,\n      userAsymmetricKeysRequest,\n      passwordInputResult.kdfConfig.kdfType,\n      passwordInputResult.kdfConfig.iterations,\n    );\n\n    if (emailVerificationToken) {\n      registerFinishRequest.emailVerificationToken = emailVerificationToken;\n    }\n\n    return registerFinishRequest;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\nimport { PBKDF2KdfConfig } from \"@bitwarden/key-management\";\n\nexport interface SetPasswordCredentials {\n  masterKey: MasterKey;\n  masterKeyHash: string;\n  localMasterKeyHash: string;\n  kdfConfig: PBKDF2KdfConfig;\n  hint: string;\n  orgSsoIdentifier: string;\n  orgId: string;\n  resetPasswordAutoEnroll: boolean;\n  userId: UserId;\n}\n\n/**\n * This service handles setting a password for a \"just-in-time\" provisioned user.\n *\n * A \"just-in-time\" (JIT) provisioned user is a user who does not have a registered account at the\n * time they first click \"Login with SSO\". Once they click \"Login with SSO\" we register the account on\n * the fly (\"just-in-time\").\n */\nexport abstract class SetPasswordJitService {\n  /**\n   * Sets the password for a JIT provisioned user.\n   *\n   * @param credentials An object of the credentials needed to set the password for a JIT provisioned user\n   * @throws If any property on the `credentials` object is null or undefined, or if a protectedUserKey\n   *         or newKeyPair could not be created.\n   */\n  setPassword: (credentials: SetPasswordCredentials) => Promise<void>;\n}\n","<ng-container *ngIf=\"syncLoading\">\n  <i class=\"bwi bwi-spinner bwi-spin tw-mr-2\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n  {{ \"loading\" | i18n }}\n</ng-container>\n\n<ng-container *ngIf=\"!syncLoading\">\n  <app-callout\n    type=\"warning\"\n    title=\"{{ 'resetPasswordPolicyAutoEnroll' | i18n }}\"\n    *ngIf=\"resetPasswordAutoEnroll\"\n  >\n    {{ \"resetPasswordAutoEnrollInviteWarning\" | i18n }}\n  </app-callout>\n\n  <auth-input-password\n    [buttonText]=\"'createAccount' | i18n\"\n    [email]=\"email\"\n    [loading]=\"submitting\"\n    [masterPasswordPolicyOptions]=\"masterPasswordPolicyOptions\"\n    (onPasswordFormSubmit)=\"handlePasswordFormSubmit($event)\"\n  ></auth-input-password>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { ActivatedRoute, Router } from \"@angular/router\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { PolicyApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/policy/policy-api.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { SyncService } from \"@bitwarden/common/vault/abstractions/sync/sync.service.abstraction\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ToastService } from \"../../../../components/src/toast\";\nimport { InputPasswordComponent } from \"../input-password/input-password.component\";\nimport { PasswordInputResult } from \"../input-password/password-input-result\";\n\nimport {\n  SetPasswordCredentials,\n  SetPasswordJitService,\n} from \"./set-password-jit.service.abstraction\";\n\n@Component({\n  standalone: true,\n  selector: \"auth-set-password-jit\",\n  templateUrl: \"set-password-jit.component.html\",\n  imports: [CommonModule, InputPasswordComponent, JslibModule],\n})\nexport class SetPasswordJitComponent implements OnInit {\n  protected email: string;\n  protected masterPasswordPolicyOptions: MasterPasswordPolicyOptions;\n  protected orgId: string;\n  protected orgSsoIdentifier: string;\n  protected resetPasswordAutoEnroll: boolean;\n  protected submitting = false;\n  protected syncLoading = true;\n  protected userId: UserId;\n\n  constructor(\n    private accountService: AccountService,\n    private activatedRoute: ActivatedRoute,\n    private i18nService: I18nService,\n    private organizationApiService: OrganizationApiServiceAbstraction,\n    private policyApiService: PolicyApiServiceAbstraction,\n    private router: Router,\n    private setPasswordJitService: SetPasswordJitService,\n    private syncService: SyncService,\n    private toastService: ToastService,\n    private validationService: ValidationService,\n  ) {}\n\n  async ngOnInit() {\n    this.email = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n    );\n\n    await this.syncService.fullSync(true);\n    this.syncLoading = false;\n\n    await this.handleQueryParams();\n  }\n\n  private async handleQueryParams() {\n    const qParams = await firstValueFrom(this.activatedRoute.queryParams);\n\n    if (qParams.identifier != null) {\n      try {\n        this.orgSsoIdentifier = qParams.identifier;\n\n        const autoEnrollStatus = await this.organizationApiService.getAutoEnrollStatus(\n          this.orgSsoIdentifier,\n        );\n        this.orgId = autoEnrollStatus.id;\n        this.resetPasswordAutoEnroll = autoEnrollStatus.resetPasswordEnabled;\n        this.masterPasswordPolicyOptions =\n          await this.policyApiService.getMasterPasswordPolicyOptsForOrgUser(autoEnrollStatus.id);\n      } catch {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: this.i18nService.t(\"errorOccurred\"),\n        });\n      }\n    }\n  }\n\n  protected async handlePasswordFormSubmit(passwordInputResult: PasswordInputResult) {\n    this.submitting = true;\n\n    const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n    const credentials: SetPasswordCredentials = {\n      ...passwordInputResult,\n      orgSsoIdentifier: this.orgSsoIdentifier,\n      orgId: this.orgId,\n      resetPasswordAutoEnroll: this.resetPasswordAutoEnroll,\n      userId,\n    };\n\n    try {\n      await this.setPasswordJitService.setPassword(credentials);\n    } catch (e) {\n      this.validationService.showError(e);\n      this.submitting = false;\n      return;\n    }\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"accountSuccessfullyCreated\"),\n    });\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\"inviteAccepted\"),\n    });\n\n    this.submitting = false;\n\n    await this.router.navigate([\"vault\"]);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport {\n  OrganizationUserApiService,\n  OrganizationUserResetPasswordEnrollmentRequest,\n} from \"@bitwarden/admin-console/common\";\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrganizationApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization/organization-api.service.abstraction\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SetPasswordRequest } from \"@bitwarden/common/auth/models/request/set-password.request\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { PBKDF2KdfConfig, KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  SetPasswordCredentials,\n  SetPasswordJitService,\n} from \"./set-password-jit.service.abstraction\";\n\nexport class DefaultSetPasswordJitService implements SetPasswordJitService {\n  constructor(\n    protected apiService: ApiService,\n    protected keyService: KeyService,\n    protected encryptService: EncryptService,\n    protected i18nService: I18nService,\n    protected kdfConfigService: KdfConfigService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected organizationApiService: OrganizationApiServiceAbstraction,\n    protected organizationUserApiService: OrganizationUserApiService,\n    protected userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n  ) {}\n\n  async setPassword(credentials: SetPasswordCredentials): Promise<void> {\n    const {\n      masterKey,\n      masterKeyHash,\n      localMasterKeyHash,\n      hint,\n      kdfConfig,\n      orgSsoIdentifier,\n      orgId,\n      resetPasswordAutoEnroll,\n      userId,\n    } = credentials;\n\n    for (const [key, value] of Object.entries(credentials)) {\n      if (value == null) {\n        throw new Error(`${key} not found. Could not set password.`);\n      }\n    }\n\n    const protectedUserKey = await this.makeProtectedUserKey(masterKey, userId);\n    if (protectedUserKey == null) {\n      throw new Error(\"protectedUserKey not found. Could not set password.\");\n    }\n\n    // Since this is an existing JIT provisioned user in a MP encryption org setting first password,\n    // they will not already have a user asymmetric key pair so we must create it for them.\n    const [keyPair, keysRequest] = await this.makeKeyPairAndRequest(protectedUserKey);\n\n    const request = new SetPasswordRequest(\n      masterKeyHash,\n      protectedUserKey[1].encryptedString,\n      hint,\n      orgSsoIdentifier,\n      keysRequest,\n      kdfConfig.kdfType, // kdfConfig is always DEFAULT_KDF_CONFIG (see InputPasswordComponent)\n      kdfConfig.iterations,\n    );\n\n    await this.apiService.setPassword(request);\n\n    // Clear force set password reason to allow navigation back to vault.\n    await this.masterPasswordService.setForceSetPasswordReason(ForceSetPasswordReason.None, userId);\n\n    // User now has a password so update account decryption options in state\n    await this.updateAccountDecryptionProperties(masterKey, kdfConfig, protectedUserKey, userId);\n\n    await this.keyService.setPrivateKey(keyPair[1].encryptedString, userId);\n\n    await this.masterPasswordService.setMasterKeyHash(localMasterKeyHash, userId);\n\n    if (resetPasswordAutoEnroll) {\n      await this.handleResetPasswordAutoEnroll(masterKeyHash, orgId, userId);\n    }\n  }\n\n  private async makeProtectedUserKey(\n    masterKey: MasterKey,\n    userId: UserId,\n  ): Promise<[UserKey, EncString]> {\n    let protectedUserKey: [UserKey, EncString] = null;\n\n    const userKey = await firstValueFrom(this.keyService.userKey$(userId));\n\n    if (userKey == null) {\n      protectedUserKey = await this.keyService.makeUserKey(masterKey);\n    } else {\n      protectedUserKey = await this.keyService.encryptUserKeyWithMasterKey(masterKey);\n    }\n\n    return protectedUserKey;\n  }\n\n  private async makeKeyPairAndRequest(\n    protectedUserKey: [UserKey, EncString],\n  ): Promise<[[string, EncString], KeysRequest]> {\n    const keyPair = await this.keyService.makeKeyPair(protectedUserKey[0]);\n    if (keyPair == null) {\n      throw new Error(\"keyPair not found. Could not set password.\");\n    }\n    const keysRequest = new KeysRequest(keyPair[0], keyPair[1].encryptedString);\n\n    return [keyPair, keysRequest];\n  }\n\n  private async updateAccountDecryptionProperties(\n    masterKey: MasterKey,\n    kdfConfig: PBKDF2KdfConfig,\n    protectedUserKey: [UserKey, EncString],\n    userId: UserId,\n  ) {\n    const userDecryptionOpts = await firstValueFrom(\n      this.userDecryptionOptionsService.userDecryptionOptions$,\n    );\n    userDecryptionOpts.hasMasterPassword = true;\n    await this.userDecryptionOptionsService.setUserDecryptionOptions(userDecryptionOpts);\n    await this.kdfConfigService.setKdfConfig(userId, kdfConfig);\n    await this.masterPasswordService.setMasterKey(masterKey, userId);\n    await this.keyService.setUserKey(protectedUserKey[0], userId);\n  }\n\n  private async handleResetPasswordAutoEnroll(\n    masterKeyHash: string,\n    orgId: string,\n    userId: UserId,\n  ) {\n    const organizationKeys = await this.organizationApiService.getKeys(orgId);\n\n    if (organizationKeys == null) {\n      throw new Error(this.i18nService.t(\"resetPasswordOrgKeysError\"));\n    }\n\n    const publicKey = Utils.fromB64ToArray(organizationKeys.publicKey);\n\n    // RSA Encrypt user key with organization public key\n    const userKey = await firstValueFrom(this.keyService.userKey$(userId));\n\n    if (userKey == null) {\n      throw new Error(\"userKey not found. Could not handle reset password auto enroll.\");\n    }\n\n    const encryptedUserKey = await this.encryptService.rsaEncrypt(userKey.key, publicKey);\n\n    const resetRequest = new OrganizationUserResetPasswordEnrollmentRequest();\n    resetRequest.masterPasswordHash = masterKeyHash;\n    resetRequest.resetPasswordKey = encryptedUserKey.encryptedString;\n\n    await this.organizationUserApiService.putOrganizationUserResetPasswordEnrollment(\n      orgId,\n      userId,\n      resetRequest,\n    );\n  }\n}\n","<form [formGroup]=\"verificationForm\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{\n        dialogOptions.title ? (dialogOptions.title | i18n) : (\"verificationRequired\" | i18n)\n      }}</span\n    >\n    <ng-container bitDialogContent>\n      <!-- Show optional content when verification is server side or client side and verification methods were found. -->\n      <ng-container\n        *ngIf=\"\n          dialogOptions.verificationType !== 'client' ||\n          (dialogOptions.verificationType === 'client' &&\n            activeClientVerificationOption !== ActiveClientVerificationOption.None)\n        \"\n      >\n        <p bitTypography=\"body1\" *ngIf=\"dialogOptions.bodyText\">\n          {{ dialogOptions.bodyText | i18n }}\n        </p>\n\n        <bit-callout\n          *ngIf=\"dialogOptions.calloutOptions\"\n          [type]=\"dialogOptions.calloutOptions.type\"\n        >\n          {{ dialogOptions.calloutOptions.text | i18n }}\n        </bit-callout>\n      </ng-container>\n\n      <!-- Shown when client side verification methods picked and no verification methods found -->\n      <ng-container\n        *ngIf=\"\n          dialogOptions.verificationType === 'client' &&\n          activeClientVerificationOption === ActiveClientVerificationOption.None\n        \"\n      >\n        <p bitTypography=\"body1\">\n          {{ \"verificationRequiredForActionSetPinToContinue\" | i18n }}\n        </p>\n      </ng-container>\n\n      <app-user-verification-form-input\n        [(invalidSecret)]=\"invalidSecret\"\n        formControlName=\"secret\"\n        [verificationType]=\"dialogOptions.verificationType === 'client' ? 'client' : 'server'\"\n        (activeClientVerificationOptionChange)=\"handleActiveClientVerificationOptionChange($event)\"\n        (biometricsVerificationResultChange)=\"handleBiometricsVerificationResultChange($event)\"\n      ></app-user-verification-form-input>\n    </ng-container>\n    <ng-container bitDialogFooter>\n      <!-- Confirm button container - shown for server side validation but hidden if client side validation + biometrics  -->\n      <ng-container\n        *ngIf=\"\n          dialogOptions.verificationType !== 'client' ||\n          (dialogOptions.verificationType === 'client' &&\n            activeClientVerificationOption !== ActiveClientVerificationOption.Biometrics)\n        \"\n      >\n        <!--  Default / custom buttons shown for server verifications or any valid, non biometric client verifications (MP or PIN) -->\n        <ng-container\n          *ngIf=\"activeClientVerificationOption !== ActiveClientVerificationOption.None\"\n        >\n          <!-- Default confirm button -->\n          <button\n            *ngIf=\"!dialogOptions.confirmButtonOptions\"\n            type=\"submit\"\n            bitButton\n            bitFormButton\n            buttonType=\"primary\"\n          >\n            {{ \"submit\" | i18n }}\n          </button>\n\n          <!-- Custom confirm button -->\n          <button\n            *ngIf=\"dialogOptions.confirmButtonOptions\"\n            type=\"submit\"\n            bitButton\n            bitFormButton\n            [buttonType]=\"dialogOptions.confirmButtonOptions.type\"\n          >\n            {{ dialogOptions.confirmButtonOptions.text | i18n }}\n          </button>\n        </ng-container>\n\n        <ng-container\n          *ngIf=\"activeClientVerificationOption === ActiveClientVerificationOption.None\"\n        >\n          <!--\n            For no client verifications found, show set a pin confirm button.\n            Note: this doesn't make sense for web as web doesn't support PINs, but this is how we are handling it for now\n            as the expectation is that only browser and desktop will use the new verificationType 'client' flow.\n            We might genericize this in the future to just tell the user they need to configure a valid user verification option like PIN or Biometrics.\n          -->\n          <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n            {{ \"setPin\" | i18n }}\n          </button>\n        </ng-container>\n      </ng-container>\n\n      <button type=\"button\" bitButton bitFormButton buttonType=\"secondary\" (click)=\"cancel()\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CalloutModule,\n  DialogModule,\n  DialogService,\n  ToastService,\n} from \"@bitwarden/components\";\n\nimport { ActiveClientVerificationOption } from \"./active-client-verification-option.enum\";\nimport {\n  UserVerificationDialogOptions,\n  UserVerificationDialogResult,\n} from \"./user-verification-dialog.types\";\nimport { UserVerificationFormInputComponent } from \"./user-verification-form-input.component\";\n\n@Component({\n  templateUrl: \"user-verification-dialog.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n    JslibModule,\n    ButtonModule,\n    DialogModule,\n    AsyncActionsModule,\n    UserVerificationFormInputComponent,\n    CalloutModule,\n  ],\n})\nexport class UserVerificationDialogComponent {\n  verificationForm = this.formBuilder.group({\n    secret: this.formBuilder.control<VerificationWithSecret | null>(null),\n  });\n\n  get secret() {\n    return this.verificationForm.controls.secret;\n  }\n\n  invalidSecret = false;\n  activeClientVerificationOption: ActiveClientVerificationOption;\n  readonly ActiveClientVerificationOption = ActiveClientVerificationOption;\n\n  constructor(\n    @Inject(DIALOG_DATA) public dialogOptions: UserVerificationDialogOptions,\n    private dialogRef: DialogRef<UserVerificationDialogResult | string>,\n    private formBuilder: FormBuilder,\n    private userVerificationService: UserVerificationService,\n    private platformUtilsService: PlatformUtilsService,\n    private i18nService: I18nService,\n    private toastService: ToastService,\n  ) {}\n\n  /**\n   * Opens the user verification dialog.\n   *\n   * @param {DialogService} dialogService - The service used to open the dialog.\n   * @param {UserVerificationDialogOptions} data - Parameters for configuring the dialog.\n   * @returns {Promise<UserVerificationDialogResult>} A promise that resolves to the result of the user verification process.\n   *\n   * @example\n   * // Example 1: Default, simple scenario\n   * const result = await UserVerificationDialogComponent.open(\n   *   this.dialogService,\n   *   {}\n   * );\n   *\n   * // Handle the result of the dialog based on user action and verification success\n   * if (result.userAction === 'cancel') {\n   *   // User cancelled the dialog\n   *   return;\n   * }\n   *\n   * // User confirmed the dialog so check verification success\n   * if (!result.verificationSuccess) {\n   *   // verification failed\n   *   return;\n   * }\n   *\n   * ----------------------------------------------------------\n   *\n   * @example\n   * // Example 2: Custom scenario\n   * const result = await UserVerificationDialogComponent.open(\n   *   this.dialogService,\n   *   {\n   *     title: 'customTitle',\n   *     bodyText: 'customBodyText',\n   *     calloutOptions: {\n   *       text: 'customCalloutText',\n   *       type: 'warning',\n   *     },\n   *     confirmButtonOptions: {\n   *       text: 'customConfirmButtonText',\n   *       type: 'danger',\n   *     }\n   *   }\n   * );\n   *\n   * // Handle the result of the dialog based on user action and verification success\n   * if (result.userAction === 'cancel') {\n   *   // User cancelled the dialog\n   *   return;\n   * }\n   *\n   * // User confirmed the dialog so check verification success\n   * if (!result.verificationSuccess) {\n   *   // verification failed\n   *   return;\n   * }\n   *\n   * ----------------------------------------------------------\n   *\n   * @example\n   * // Example 3: Client side verification scenario only\n   * const result = await UserVerificationDialogComponent.open(\n   *   this.dialogService,\n   *   { clientSideOnlyVerification: true }\n   * );\n   *\n   * // Handle the result of the dialog based on user action and verification success\n   * if (result.userAction === 'cancel') {\n   *   // User cancelled the dialog\n   *   return;\n   * }\n   *\n   * // User confirmed the dialog so check verification success\n   * if (!result.verificationSuccess) {\n   *   if (result.noAvailableClientVerificationMethods) {\n   *     // No client-side verification methods are available\n   *     // Could send user to configure a verification method like PIN or biometrics\n   *   }\n   *   return;\n   * }\n   *\n   * ----------------------------------------------------------\n   *\n   * @example\n   * // Example 4: Custom user verification validation\n   *\n   * const result = await UserVerificationDialogComponent.open(dialogService, {\n   *   verificationType: {\n   *     type: \"custom\",\n   *     // Pass in a function that will be used to validate the input of the\n   *     // verification dialog, returning true when finished.\n   *     verificationFn: async (secret: VerificationWithSecret) => {\n   *       const request = await userVerificationService.buildRequest<CustomRequestType>(secret);\n   *\n   *      // ... Do something with the custom request type\n   *\n   *       await someServicer.sendMyRequestThatVerfiesUserIdentity(\n   *         // ... Some other data\n   *         request,\n   *       );\n   *       return true;\n   *     },\n   *   },\n   * });\n   *\n   * // ... Evaluate the result as usual\n   */\n  static async open(\n    dialogService: DialogService,\n    data: UserVerificationDialogOptions,\n  ): Promise<UserVerificationDialogResult> {\n    const dialogRef = dialogService.open<UserVerificationDialogResult | string>(\n      UserVerificationDialogComponent,\n      {\n        data,\n      },\n    );\n\n    const dialogResult = await firstValueFrom(dialogRef.closed);\n\n    // An empty string is returned when the user hits the x to close the dialog.\n    // Undefined is returned when the users hits the escape key to close the dialog.\n    if (typeof dialogResult === \"string\" || dialogResult === undefined) {\n      // User used x to close dialog\n      return {\n        userAction: \"cancel\",\n        verificationSuccess: false,\n      };\n    } else {\n      return dialogResult;\n    }\n  }\n\n  handleActiveClientVerificationOptionChange(\n    activeClientVerificationOption: ActiveClientVerificationOption,\n  ) {\n    this.activeClientVerificationOption = activeClientVerificationOption;\n  }\n\n  handleBiometricsVerificationResultChange(biometricsVerificationResult: boolean) {\n    if (biometricsVerificationResult) {\n      this.close({\n        userAction: \"confirm\",\n        verificationSuccess: true,\n        noAvailableClientVerificationMethods: false,\n      });\n    }\n  }\n\n  submit = async () => {\n    if (this.activeClientVerificationOption === ActiveClientVerificationOption.None) {\n      this.close({\n        userAction: \"confirm\",\n        verificationSuccess: false,\n        noAvailableClientVerificationMethods: true,\n      });\n      return;\n    }\n\n    this.verificationForm.markAllAsTouched();\n\n    if (this.verificationForm.invalid) {\n      return;\n    }\n\n    try {\n      if (\n        typeof this.dialogOptions.verificationType === \"object\" &&\n        this.dialogOptions.verificationType.type === \"custom\"\n      ) {\n        const success = await this.dialogOptions.verificationType.verificationFn(this.secret.value);\n        this.close({\n          userAction: \"confirm\",\n          verificationSuccess: success,\n        });\n        return;\n      }\n\n      // TODO: once we migrate all user verification scenarios to use this new implementation,\n      // we should consider refactoring the user verification service handling of the\n      // OTP and MP flows to not throw errors on verification failure.\n      const verificationResult = await this.userVerificationService.verifyUser(this.secret.value);\n\n      if (verificationResult) {\n        this.invalidSecret = false;\n        this.close({\n          userAction: \"confirm\",\n          verificationSuccess: true,\n          noAvailableClientVerificationMethods: false,\n        });\n      } else {\n        this.invalidSecret = true;\n\n        // Only pin should ever get here, but added this check to be safe.\n        if (this.activeClientVerificationOption === ActiveClientVerificationOption.Pin) {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: this.i18nService.t(\"error\"),\n            message: this.i18nService.t(\"invalidPin\"),\n          });\n        } else {\n          this.toastService.showToast({\n            variant: \"error\",\n            title: null,\n            message: this.i18nService.t(\"unexpectedError\"),\n          });\n        }\n      }\n    } catch (e) {\n      // Catch handles OTP and MP verification scenarios as those throw errors on verification failure instead of returning false like PIN and biometrics.\n      this.invalidSecret = true;\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"error\"),\n        message: e.message,\n      });\n      return;\n    }\n  };\n\n  cancel() {\n    this.close({\n      userAction: \"cancel\",\n      verificationSuccess: false,\n    });\n  }\n\n  close(dialogResult: UserVerificationDialogResult) {\n    this.dialogRef.close(dialogResult);\n  }\n}\n","import { ClientType } from \"@bitwarden/common/enums\";\n\nexport type SsoClientType = ClientType.Web | ClientType.Browser | ClientType.Desktop;\n\n/**\n * Abstract class for SSO component services.\n */\nexport abstract class SsoComponentService {\n  /**\n   * Sets the cookies for the SSO component service.\n   * Used to pass translation messages to the SSO connector page (apps/web/src/connectors/sso.ts) during the SSO handoff process.\n   * See implementation in WebSsoComponentService for example usage.\n   */\n  setDocumentCookies?(): void;\n\n  /**\n   * Closes the window.\n   */\n  closeWindow?(): Promise<void>;\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" class=\"tw-container\">\n  <div *ngIf=\"loggingIn\">\n    <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n    {{ \"loading\" | i18n }}\n  </div>\n  <div *ngIf=\"!loggingIn\">\n    <bit-form-field>\n      <bit-label>{{ \"ssoIdentifier\" | i18n }}</bit-label>\n      <input bitInput type=\"text\" formControlName=\"identifier\" appAutofocus />\n    </bit-form-field>\n    <hr />\n    <div class=\"tw-flex tw-gap-2\">\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" [block]=\"true\">\n        {{ \"continue\" | i18n }}\n      </button>\n    </div>\n  </div>\n</form>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormControl, FormGroup, Validators, ReactiveFormsModule } from \"@angular/forms\";\nimport { ActivatedRoute, Router, RouterModule } from \"@angular/router\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  LoginStrategyServiceAbstraction,\n  SsoLoginCredentials,\n  TrustedDeviceUserDecryptionOption,\n  UserDecryptionOptions,\n  UserDecryptionOptionsServiceAbstraction,\n  LoginSuccessHandlerService,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { OrgDomainApiServiceAbstraction } from \"@bitwarden/common/admin-console/abstractions/organization-domain/org-domain-api.service.abstraction\";\nimport { OrganizationDomainSsoDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/organization-domain-sso-details.response\";\nimport { VerifiedOrganizationDomainSsoDetailsResponse } from \"@bitwarden/common/admin-console/abstractions/organization-domain/responses/verified-organization-domain-sso-details.response\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { SsoLoginServiceAbstraction } from \"@bitwarden/common/auth/abstractions/sso-login.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SsoPreValidateResponse } from \"@bitwarden/common/auth/models/response/sso-pre-validate.response\";\nimport { ClientType, HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CheckboxModule,\n  FormFieldModule,\n  IconButtonModule,\n  LinkModule,\n  ToastService,\n} from \"@bitwarden/components\";\nimport { PasswordGenerationServiceAbstraction } from \"@bitwarden/generator-legacy\";\n\nimport { SsoClientType, SsoComponentService } from \"./sso-component.service\";\n\ninterface QueryParams {\n  code?: string;\n  state?: string;\n  redirectUri?: string;\n  clientId?: string;\n  codeChallenge?: string;\n  identifier?: string;\n  email?: string;\n}\n\n/**\n * This component handles the SSO flow.\n */\n@Component({\n  standalone: true,\n  templateUrl: \"sso.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CheckboxModule,\n    CommonModule,\n    FormFieldModule,\n    IconButtonModule,\n    LinkModule,\n    JslibModule,\n    ReactiveFormsModule,\n    RouterModule,\n  ],\n})\nexport class SsoComponent implements OnInit {\n  protected formGroup = new FormGroup({\n    identifier: new FormControl<string | null>(null, [Validators.required]),\n  });\n\n  protected redirectUri: string | undefined;\n  protected loggingIn = false;\n  protected identifier: string | undefined;\n  protected state: string | undefined;\n  protected codeChallenge: string | undefined;\n  protected clientId: SsoClientType | undefined;\n\n  formPromise: Promise<AuthResult> | undefined;\n  initiateSsoFormPromise: Promise<SsoPreValidateResponse> | undefined;\n\n  get identifierFormControl() {\n    return this.formGroup.controls.identifier;\n  }\n\n  constructor(\n    private ssoLoginService: SsoLoginServiceAbstraction,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    private router: Router,\n    private i18nService: I18nService,\n    private route: ActivatedRoute,\n    private orgDomainApiService: OrgDomainApiServiceAbstraction,\n    private validationService: ValidationService,\n    private configService: ConfigService,\n    private platformUtilsService: PlatformUtilsService,\n    private apiService: ApiService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private environmentService: EnvironmentService,\n    private passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private logService: LogService,\n    private userDecryptionOptionsService: UserDecryptionOptionsServiceAbstraction,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private accountService: AccountService,\n    private toastService: ToastService,\n    private ssoComponentService: SsoComponentService,\n    private loginSuccessHandlerService: LoginSuccessHandlerService,\n  ) {\n    environmentService.environment$.pipe(takeUntilDestroyed()).subscribe((env) => {\n      this.redirectUri = env.getWebVaultUrl() + \"/sso-connector.html\";\n    });\n\n    const clientType = this.platformUtilsService.getClientType();\n    if (this.isValidSsoClientType(clientType)) {\n      this.clientId = clientType as SsoClientType;\n    }\n  }\n\n  async ngOnInit() {\n    const qParams: QueryParams = await firstValueFrom(this.route.queryParams);\n\n    // This if statement will pass on the second portion of the SSO flow\n    // where the user has already authenticated with the identity provider\n    if (this.hasCodeOrStateParams(qParams)) {\n      await this.handleCodeAndStateParams(qParams);\n      return;\n    }\n\n    // This if statement will pass on the first portion of the SSO flow\n    if (this.hasRequiredSsoParams(qParams)) {\n      this.setRequiredSsoVariables(qParams);\n      return;\n    }\n\n    if (qParams.identifier != null) {\n      // SSO Org Identifier in query params takes precedence over claimed domains\n      this.identifierFormControl.setValue(qParams.identifier);\n      this.loggingIn = true;\n      await this.submit();\n      return;\n    }\n\n    await this.initializeIdentifierFromEmailOrStorage(qParams);\n  }\n\n  /**\n   * Sets the required SSO variables from the query params\n   * @param qParams - The query params\n   */\n  private setRequiredSsoVariables(qParams: QueryParams): void {\n    this.redirectUri = qParams.redirectUri ?? \"\";\n    this.state = qParams.state ?? \"\";\n    this.codeChallenge = qParams.codeChallenge ?? \"\";\n    const clientId = qParams.clientId ?? \"\";\n    if (this.isValidSsoClientType(clientId)) {\n      this.clientId = clientId;\n    } else {\n      throw new Error(`Invalid SSO client type: ${qParams.clientId}`);\n    }\n  }\n\n  /**\n   * Checks if the value is a valid SSO client type\n   * @param value - The value to check\n   * @returns True if the value is a valid SSO client type, otherwise false\n   */\n  private isValidSsoClientType(value: string): value is SsoClientType {\n    return [ClientType.Web, ClientType.Browser, ClientType.Desktop].includes(value as ClientType);\n  }\n\n  /**\n   * Checks if the query params have the required SSO params\n   * @param qParams - The query params\n   * @returns True if the query params have the required SSO params, false otherwise\n   */\n  private hasRequiredSsoParams(qParams: QueryParams): boolean {\n    return (\n      qParams.clientId != null &&\n      qParams.redirectUri != null &&\n      qParams.state != null &&\n      qParams.codeChallenge != null\n    );\n  }\n\n  /**\n   * Handles the code and state params\n   * @param qParams - The query params\n   */\n  private async handleCodeAndStateParams(qParams: QueryParams): Promise<void> {\n    const codeVerifier = await this.ssoLoginService.getCodeVerifier();\n    const state = await this.ssoLoginService.getSsoState();\n    await this.ssoLoginService.setCodeVerifier(\"\");\n    await this.ssoLoginService.setSsoState(\"\");\n\n    if (qParams.redirectUri != null) {\n      this.redirectUri = qParams.redirectUri;\n    }\n\n    if (\n      qParams.code != null &&\n      codeVerifier != null &&\n      state != null &&\n      this.checkState(state, qParams.state ?? \"\")\n    ) {\n      const ssoOrganizationIdentifier = this.getOrgIdentifierFromState(qParams.state ?? \"\");\n      await this.logIn(qParams.code, codeVerifier, ssoOrganizationIdentifier);\n    }\n  }\n\n  /**\n   * Checks if the query params have a code or state\n   * @param qParams - The query params\n   * @returns True if the query params have a code or state, false otherwise\n   */\n  private hasCodeOrStateParams(qParams: QueryParams): boolean {\n    return qParams.code != null && qParams.state != null;\n  }\n\n  private handleGetClaimedDomainByEmailError(error: unknown): void {\n    if (error instanceof ErrorResponse) {\n      const errorResponse: ErrorResponse = error as ErrorResponse;\n      switch (errorResponse.statusCode) {\n        case HttpStatusCode.NotFound:\n          //this is a valid case for a domain not found\n          return;\n\n        default:\n          this.validationService.showError(errorResponse);\n          break;\n      }\n    }\n  }\n\n  submit = async (): Promise<void> => {\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    const autoSubmit = (await firstValueFrom(this.route.queryParams)).identifier != null;\n\n    this.identifier = this.identifierFormControl.value ?? \"\";\n    await this.ssoLoginService.setOrganizationSsoIdentifier(this.identifier);\n    this.ssoComponentService.setDocumentCookies?.();\n    try {\n      await this.submitSso();\n    } catch (error) {\n      if (autoSubmit) {\n        await this.router.navigate([\"/login\"]);\n      } else {\n        this.validationService.showError(error);\n      }\n    }\n  };\n\n  private async submitSso(returnUri?: string, includeUserIdentifier?: boolean) {\n    if (this.identifier == null || this.identifier === \"\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"ssoValidationFailed\"),\n        message: this.i18nService.t(\"ssoIdentifierRequired\"),\n      });\n      return;\n    }\n\n    if (this.clientId == null) {\n      throw new Error(\"Client ID is required\");\n    }\n\n    this.initiateSsoFormPromise = this.apiService.preValidateSso(this.identifier);\n    const response = await this.initiateSsoFormPromise;\n\n    const authorizeUrl = await this.buildAuthorizeUrl(\n      returnUri,\n      includeUserIdentifier,\n      response.token,\n    );\n    this.platformUtilsService.launchUri(authorizeUrl, { sameWindow: true });\n  }\n\n  private async buildAuthorizeUrl(\n    returnUri?: string,\n    includeUserIdentifier?: boolean,\n    token?: string,\n  ): Promise<string> {\n    let codeChallenge = this.codeChallenge;\n    let state = this.state;\n\n    const passwordOptions = {\n      type: \"password\" as const,\n      length: 64,\n      uppercase: true,\n      lowercase: true,\n      numbers: true,\n      special: false,\n    };\n\n    if (codeChallenge == null) {\n      const codeVerifier = await this.passwordGenerationService.generatePassword(passwordOptions);\n      const codeVerifierHash = await this.cryptoFunctionService.hash(codeVerifier, \"sha256\");\n      codeChallenge = Utils.fromBufferToUrlB64(codeVerifierHash);\n      await this.ssoLoginService.setCodeVerifier(codeVerifier);\n    }\n\n    if (state == null) {\n      state = await this.passwordGenerationService.generatePassword(passwordOptions);\n      if (returnUri) {\n        state += `_returnUri='${returnUri}'`;\n      }\n    }\n\n    // Add Organization Identifier to state\n    state += `_identifier=${this.identifier}`;\n\n    // Save state (regardless of new or existing)\n    await this.ssoLoginService.setSsoState(state);\n\n    const env = await firstValueFrom(this.environmentService.environment$);\n\n    let authorizeUrl =\n      env.getIdentityUrl() +\n      \"/connect/authorize?\" +\n      \"client_id=\" +\n      this.clientId +\n      \"&redirect_uri=\" +\n      encodeURIComponent(this.redirectUri ?? \"\") +\n      \"&\" +\n      \"response_type=code&scope=api offline_access&\" +\n      \"state=\" +\n      state +\n      \"&code_challenge=\" +\n      codeChallenge +\n      \"&\" +\n      \"code_challenge_method=S256&response_mode=query&\" +\n      \"domain_hint=\" +\n      encodeURIComponent(this.identifier ?? \"\") +\n      \"&ssoToken=\" +\n      encodeURIComponent(token ?? \"\");\n\n    if (includeUserIdentifier) {\n      const userIdentifier = await this.apiService.getSsoUserIdentifier();\n      authorizeUrl += `&user_identifier=${encodeURIComponent(userIdentifier)}`;\n    }\n\n    return authorizeUrl;\n  }\n\n  private async logIn(code: string, codeVerifier: string, orgSsoIdentifier: string): Promise<void> {\n    this.loggingIn = true;\n    try {\n      const email = await this.ssoLoginService.getSsoEmail();\n      const redirectUri = this.redirectUri ?? \"\";\n      const credentials = new SsoLoginCredentials(\n        code,\n        codeVerifier,\n        redirectUri,\n        orgSsoIdentifier,\n        email,\n      );\n      this.formPromise = this.loginStrategyService.logIn(credentials);\n      const authResult = await this.formPromise;\n\n      if (authResult.requiresTwoFactor) {\n        return await this.handleTwoFactorRequired(orgSsoIdentifier);\n      }\n\n      // Everything after the 2FA check is considered a successful login\n      // Just have to figure out where to send the user\n      await this.loginSuccessHandlerService.run(authResult.userId);\n\n      // Save off the OrgSsoIdentifier for use in the TDE flows (or elsewhere)\n      // - TDE login decryption options component\n      // - Browser SSO on extension open\n      // Note: you cannot set this in state before 2FA b/c there won't be an account in state.\n      await this.ssoLoginService.setActiveUserOrganizationSsoIdentifier(orgSsoIdentifier);\n\n      // Users enrolled in admin acct recovery can be forced to set a new password after\n      // having the admin set a temp password for them (affects TDE & standard users)\n      if (authResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n        // Weak password is not a valid scenario here b/c we cannot have evaluated a MP yet\n        return await this.handleForcePasswordReset(orgSsoIdentifier);\n      }\n\n      // must come after 2fa check since user decryption options aren't available if 2fa is required\n      const userDecryptionOpts = await firstValueFrom(\n        this.userDecryptionOptionsService.userDecryptionOptions$,\n      );\n\n      const tdeEnabled = userDecryptionOpts.trustedDeviceOption\n        ? await this.isTrustedDeviceEncEnabled(userDecryptionOpts.trustedDeviceOption)\n        : false;\n\n      if (tdeEnabled) {\n        return await this.handleTrustedDeviceEncryptionEnabled(userDecryptionOpts);\n      }\n\n      // In the standard, non TDE case, a user must set password if they don't\n      // have one and they aren't using key connector.\n      // Note: TDE & Key connector are mutually exclusive org config options.\n      const requireSetPassword =\n        !userDecryptionOpts.hasMasterPassword &&\n        userDecryptionOpts.keyConnectorOption === undefined;\n\n      if (requireSetPassword || authResult.resetMasterPassword) {\n        // Change implies going no password -> password in this case\n        return await this.handleChangePasswordRequired(orgSsoIdentifier);\n      }\n\n      // Standard SSO login success case\n      return await this.handleSuccessfulLogin();\n    } catch (e) {\n      await this.handleLoginError(e);\n    }\n  }\n\n  private async isTrustedDeviceEncEnabled(\n    trustedDeviceOption: TrustedDeviceUserDecryptionOption,\n  ): Promise<boolean> {\n    return trustedDeviceOption !== undefined;\n  }\n\n  private async handleTwoFactorRequired(orgIdentifier: string) {\n    await this.router.navigate([\"2fa\"], {\n      queryParams: {\n        identifier: orgIdentifier,\n        sso: \"true\",\n      },\n    });\n  }\n\n  private async handleTrustedDeviceEncryptionEnabled(\n    userDecryptionOpts: UserDecryptionOptions,\n  ): Promise<void> {\n    const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n\n    if (!userId) {\n      return;\n    }\n\n    // Tde offboarding takes precedence\n    if (\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption?.isTdeOffboarding\n    ) {\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeOffboarding,\n        userId,\n      );\n    } else if (\n      // If user doesn't have a MP, but has reset password permission, they must set a MP\n      !userDecryptionOpts.hasMasterPassword &&\n      userDecryptionOpts.trustedDeviceOption?.hasManageResetPasswordPermission\n    ) {\n      // Set flag so that auth guard can redirect to set password screen after decryption (trusted or untrusted device)\n      // Note: we cannot directly navigate in this scenario as we are in a pre-decryption state, and\n      // if you try to set a new MP before decrypting, you will invalidate the user's data by making a new user key.\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ForceSetPasswordReason.TdeUserWithoutPasswordHasPasswordResetPermission,\n        userId,\n      );\n    }\n\n    if (this.ssoComponentService?.closeWindow) {\n      await this.ssoComponentService.closeWindow();\n    } else {\n      await this.router.navigate([\"login-initiated\"]);\n    }\n  }\n\n  private async handleChangePasswordRequired(orgIdentifier: string) {\n    const emailVerification = await this.configService.getFeatureFlag(\n      FeatureFlag.EmailVerification,\n    );\n\n    let route = \"set-password\";\n    if (emailVerification) {\n      route = \"set-password-jit\";\n    }\n\n    await this.router.navigate([route], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  private async handleForcePasswordReset(orgIdentifier: string) {\n    await this.router.navigate([\"update-temp-password\"], {\n      queryParams: {\n        identifier: orgIdentifier,\n      },\n    });\n  }\n\n  private async handleSuccessfulLogin() {\n    await this.router.navigate([\"lock\"]);\n  }\n\n  private async handleLoginError(e: unknown) {\n    this.logService.error(e);\n\n    // TODO: Key Connector Service should pass this error message to the logout callback instead of displaying here\n    if (e instanceof Error && e.message === \"Key Connector error\") {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: \"\",\n        message: this.i18nService.t(\"ssoKeyConnectorError\"),\n      });\n    }\n  }\n\n  private getOrgIdentifierFromState(state: string): string {\n    if (state === null || state === undefined) {\n      return \"\";\n    }\n\n    const stateSplit = state.split(\"_identifier=\");\n    return stateSplit.length > 1 ? stateSplit[1] : \"\";\n  }\n\n  private checkState(state: string, checkState: string): boolean {\n    if (state === null || state === undefined) {\n      return false;\n    }\n    if (checkState === null || checkState === undefined) {\n      return false;\n    }\n\n    const stateSplit = state.split(\"_identifier=\");\n    const checkStateSplit = checkState.split(\"_identifier=\");\n    return stateSplit[0] === checkStateSplit[0];\n  }\n\n  /**\n   * Attempts to initialize the SSO identifier from email or storage.\n   * Note: this flow is written for web but both browser and desktop\n   * redirect here on SSO button click.\n   * @param qParams - The query params\n   */\n  private async initializeIdentifierFromEmailOrStorage(qParams: QueryParams): Promise<void> {\n    // Check if email matches any claimed domains\n    if (qParams.email) {\n      // show loading spinner\n      this.loggingIn = true;\n      try {\n        if (await this.configService.getFeatureFlag(FeatureFlag.VerifiedSsoDomainEndpoint)) {\n          const response: ListResponse<VerifiedOrganizationDomainSsoDetailsResponse> =\n            await this.orgDomainApiService.getVerifiedOrgDomainsByEmail(qParams.email);\n\n          if (response.data.length > 0) {\n            this.identifierFormControl.setValue(response.data[0].organizationIdentifier);\n            await this.submit();\n            return;\n          }\n        } else {\n          const response: OrganizationDomainSsoDetailsResponse =\n            await this.orgDomainApiService.getClaimedOrgDomainByEmail(qParams.email);\n\n          if (response?.ssoAvailable && response?.verifiedDate) {\n            this.identifierFormControl.setValue(response.organizationIdentifier);\n            await this.submit();\n            return;\n          }\n        }\n      } catch (error) {\n        this.handleGetClaimedDomainByEmailError(error);\n      }\n\n      this.loggingIn = false;\n    }\n\n    // Fallback to state svc if domain is unclaimed\n    const storedIdentifier = await this.ssoLoginService.getOrganizationSsoIdentifier();\n    if (storedIdentifier != null) {\n      this.identifierFormControl.setValue(storedIdentifier);\n    }\n  }\n}\n","import { SsoComponentService } from \"./sso-component.service\";\n\nexport class DefaultSsoComponentService implements SsoComponentService {}\n","<bit-dialog>\n  <span bitDialogTitle>{{ \"areYouTryingtoLogin\" | i18n }}</span>\n  <ng-container bitDialogContent>\n    <ng-container *ngIf=\"loading\">\n      <div class=\"tw-flex tw-items-center tw-justify-center\" *ngIf=\"loading\">\n        <i class=\"bwi bwi-spinner bwi-spin bwi-3x\" aria-hidden=\"true\"></i>\n      </div>\n    </ng-container>\n\n    <ng-container *ngIf=\"!loading\">\n      <h4 class=\"tw-mb-3\">{{ \"logInAttemptBy\" | i18n: email }}</h4>\n      <div>\n        <b>{{ \"fingerprintPhraseHeader\" | i18n }}</b>\n        <p class=\"tw-text-code\">{{ fingerprintPhrase }}</p>\n      </div>\n      <div>\n        <b>{{ \"deviceType\" | i18n }}</b>\n        <p>{{ authRequestResponse?.requestDeviceType }}</p>\n      </div>\n      <div>\n        <b>{{ \"ipAddress\" | i18n }}</b>\n        <p>{{ authRequestResponse?.requestIpAddress }}</p>\n      </div>\n      <div>\n        <b>{{ \"time\" | i18n }}</b>\n        <p>{{ requestTimeText }}</p>\n      </div>\n    </ng-container>\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button\n      bitButton\n      type=\"button\"\n      buttonType=\"primary\"\n      [bitAction]=\"approveLogin\"\n      [disabled]=\"loading\"\n    >\n      {{ \"confirmLogIn\" | i18n }}\n    </button>\n    <button\n      bitButton\n      type=\"button\"\n      buttonType=\"secondary\"\n      [bitAction]=\"denyLogin\"\n      [disabled]=\"loading\"\n    >\n      {{ \"denyLogIn\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, OnInit, OnDestroy, Inject } from \"@angular/core\";\nimport { Subject, firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  AuthRequestServiceAbstraction,\n  LoginApprovalComponentServiceAbstraction as LoginApprovalComponentService,\n} from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  DialogService,\n  ToastService,\n} from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nconst RequestTimeOut = 60000 * 15; //15 Minutes\nconst RequestTimeUpdate = 60000 * 5; //5 Minutes\n\nexport interface LoginApprovalDialogParams {\n  notificationId: string;\n}\n\n@Component({\n  selector: \"login-approval\",\n  templateUrl: \"login-approval.component.html\",\n  standalone: true,\n  imports: [CommonModule, AsyncActionsModule, ButtonModule, DialogModule, JslibModule],\n})\nexport class LoginApprovalComponent implements OnInit, OnDestroy {\n  loading = true;\n\n  notificationId: string;\n\n  private destroy$ = new Subject<void>();\n\n  email: string;\n  fingerprintPhrase: string;\n  authRequestResponse: AuthRequestResponse;\n  interval: NodeJS.Timeout;\n  requestTimeText: string;\n\n  constructor(\n    @Inject(DIALOG_DATA) private params: LoginApprovalDialogParams,\n    protected authRequestService: AuthRequestServiceAbstraction,\n    protected accountService: AccountService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected i18nService: I18nService,\n    protected apiService: ApiService,\n    protected appIdService: AppIdService,\n    protected keyService: KeyService,\n    private dialogRef: DialogRef,\n    private toastService: ToastService,\n    private loginApprovalComponentService: LoginApprovalComponentService,\n    private validationService: ValidationService,\n  ) {\n    this.notificationId = params.notificationId;\n  }\n\n  async ngOnDestroy(): Promise<void> {\n    clearInterval(this.interval);\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  async ngOnInit() {\n    if (this.notificationId != null) {\n      try {\n        this.authRequestResponse = await this.apiService.getAuthRequest(this.notificationId);\n      } catch (error) {\n        this.validationService.showError(error);\n      }\n\n      const publicKey = Utils.fromB64ToArray(this.authRequestResponse.publicKey);\n      this.email = await await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.email)),\n      );\n      this.fingerprintPhrase = await this.authRequestService.getFingerprintPhrase(\n        this.email,\n        publicKey,\n      );\n      this.updateTimeText();\n\n      this.interval = setInterval(() => {\n        this.updateTimeText();\n      }, RequestTimeUpdate);\n\n      this.loginApprovalComponentService.showLoginRequestedAlertIfWindowNotVisible(this.email);\n\n      this.loading = false;\n    }\n  }\n\n  /**\n   * Strongly-typed helper to open a LoginApprovalDialog\n   * @param dialogService Instance of the dialog service that will be used to open the dialog\n   * @param data Configuration for the dialog\n   */\n  static open(dialogService: DialogService, data: LoginApprovalDialogParams) {\n    return dialogService.open(LoginApprovalComponent, { data });\n  }\n\n  denyLogin = async () => {\n    await this.retrieveAuthRequestAndRespond(false);\n  };\n\n  approveLogin = async () => {\n    await this.retrieveAuthRequestAndRespond(true);\n  };\n\n  private async retrieveAuthRequestAndRespond(approve: boolean) {\n    this.authRequestResponse = await this.apiService.getAuthRequest(this.notificationId);\n    if (this.authRequestResponse.requestApproved || this.authRequestResponse.responseDate != null) {\n      this.toastService.showToast({\n        variant: \"info\",\n        title: null,\n        message: this.i18nService.t(\"thisRequestIsNoLongerValid\"),\n      });\n    } else {\n      const loginResponse = await this.authRequestService.approveOrDenyAuthRequest(\n        approve,\n        this.authRequestResponse,\n      );\n      this.showResultToast(loginResponse);\n    }\n\n    this.dialogRef.close(approve);\n  }\n\n  showResultToast(loginResponse: AuthRequestResponse) {\n    if (loginResponse.requestApproved) {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\n          \"logInConfirmedForEmailOnDevice\",\n          this.email,\n          loginResponse.requestDeviceType,\n        ),\n      });\n    } else {\n      this.toastService.showToast({\n        variant: \"info\",\n        title: null,\n        message: this.i18nService.t(\"youDeniedALogInAttemptFromAnotherDevice\"),\n      });\n    }\n  }\n\n  updateTimeText() {\n    const requestDate = new Date(this.authRequestResponse.creationDate);\n    const requestDateUTC = Date.UTC(\n      requestDate.getUTCFullYear(),\n      requestDate.getUTCMonth(),\n      requestDate.getDate(),\n      requestDate.getUTCHours(),\n      requestDate.getUTCMinutes(),\n      requestDate.getUTCSeconds(),\n      requestDate.getUTCMilliseconds(),\n    );\n\n    const dateNow = new Date(Date.now());\n    const dateNowUTC = Date.UTC(\n      dateNow.getUTCFullYear(),\n      dateNow.getUTCMonth(),\n      dateNow.getDate(),\n      dateNow.getUTCHours(),\n      dateNow.getUTCMinutes(),\n      dateNow.getUTCSeconds(),\n      dateNow.getUTCMilliseconds(),\n    );\n\n    const diffInMinutes = dateNowUTC - requestDateUTC;\n\n    if (diffInMinutes <= RequestTimeUpdate) {\n      this.requestTimeText = this.i18nService.t(\"justNow\");\n    } else if (diffInMinutes < RequestTimeOut) {\n      this.requestTimeText = this.i18nService.t(\n        \"requestedXMinutesAgo\",\n        (diffInMinutes / 60000).toFixed(),\n      );\n    } else {\n      clearInterval(this.interval);\n      this.dialogRef.close();\n      this.toastService.showToast({\n        variant: \"info\",\n        title: null,\n        message: this.i18nService.t(\"loginRequestHasAlreadyExpired\"),\n      });\n    }\n  }\n}\n","import { LoginApprovalComponentServiceAbstraction } from \"../../common/abstractions/login-approval-component.service.abstraction\";\n\n/**\n * Default implementation of the LoginApprovalComponentServiceAbstraction.\n */\nexport class DefaultLoginApprovalComponentService\n  implements LoginApprovalComponentServiceAbstraction\n{\n  /**\n   * No-op implementation of the showLoginRequestedAlertIfWindowNotVisible method.\n   * @returns\n   */\n  async showLoginRequestedAlertIfWindowNotVisible(email?: string): Promise<void> {\n    return;\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <auth-password-callout\n    *ngIf=\"masterPasswordPolicyOptions\"\n    [policy]=\"masterPasswordPolicyOptions\"\n  ></auth-password-callout>\n\n  <div class=\"tw-mb-6\">\n    <bit-form-field>\n      <bit-label>{{ \"masterPassword\" | i18n }}</bit-label>\n      <input\n        id=\"input-password-form_password\"\n        bitInput\n        type=\"password\"\n        formControlName=\"password\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        [(toggled)]=\"showPassword\"\n      ></button>\n      <bit-hint>\n        <span class=\"tw-font-bold\">{{ \"important\" | i18n }} </span>\n        {{ \"masterPassImportant\" | i18n }}\n        {{ minPasswordLengthMsg }}.\n      </bit-hint>\n    </bit-form-field>\n\n    <tools-password-strength\n      [showText]=\"true\"\n      [email]=\"email\"\n      [password]=\"formGroup.controls.password.value\"\n      (passwordStrengthScore)=\"getPasswordStrengthScore($event)\"\n    ></tools-password-strength>\n  </div>\n\n  <bit-form-field>\n    <bit-label>{{ \"confirmMasterPassword\" | i18n }}</bit-label>\n    <input\n      id=\"input-password-form_confirmed-password\"\n      bitInput\n      type=\"password\"\n      formControlName=\"confirmedPassword\"\n    />\n    <button\n      type=\"button\"\n      bitIconButton\n      bitSuffix\n      bitPasswordInputToggle\n      [(toggled)]=\"showPassword\"\n    ></button>\n  </bit-form-field>\n\n  <bit-form-field>\n    <bit-label>{{ \"masterPassHintLabel\" | i18n }}</bit-label>\n    <input bitInput formControlName=\"hint\" />\n    <bit-hint>\n      {{ \"masterPassHintText\" | i18n: formGroup.value.hint.length : maxHintLength.toString() }}\n    </bit-hint>\n  </bit-form-field>\n\n  <bit-form-control>\n    <input type=\"checkbox\" bitCheckbox formControlName=\"checkForBreaches\" />\n    <bit-label>{{ \"checkForBreaches\" | i18n }}</bit-label>\n  </bit-form-control>\n\n  <button\n    type=\"submit\"\n    bitButton\n    bitFormButton\n    buttonType=\"primary\"\n    [block]=\"btnBlock\"\n    [loading]=\"loading\"\n  >\n    {{ buttonText || (\"setMasterPassword\" | i18n) }}\n  </button>\n\n  <bit-error-summary *ngIf=\"showErrorSummary\" [formGroup]=\"formGroup\"></bit-error-summary>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\nimport { ReactiveFormsModule, FormBuilder, Validators } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  PasswordStrengthScore,\n  PasswordStrengthV2Component,\n} from \"@bitwarden/angular/tools/password-strength/password-strength-v2.component\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CheckboxModule,\n  DialogService,\n  FormFieldModule,\n  IconButtonModule,\n  InputModule,\n  ToastService,\n} from \"@bitwarden/components\";\nimport { DEFAULT_KDF_CONFIG, KeyService } from \"@bitwarden/key-management\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { InputsFieldMatch } from \"../../../../angular/src/auth/validators/inputs-field-match.validator\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { SharedModule } from \"../../../../components/src/shared\";\nimport { PasswordCalloutComponent } from \"../password-callout/password-callout.component\";\n\nimport { PasswordInputResult } from \"./password-input-result\";\n\n@Component({\n  standalone: true,\n  selector: \"auth-input-password\",\n  templateUrl: \"./input-password.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CheckboxModule,\n    FormFieldModule,\n    IconButtonModule,\n    InputModule,\n    ReactiveFormsModule,\n    SharedModule,\n    PasswordCalloutComponent,\n    PasswordStrengthV2Component,\n    JslibModule,\n  ],\n})\nexport class InputPasswordComponent {\n  @Output() onPasswordFormSubmit = new EventEmitter<PasswordInputResult>();\n\n  @Input({ required: true }) email: string;\n  @Input() buttonText: string;\n  @Input() masterPasswordPolicyOptions: MasterPasswordPolicyOptions | null = null;\n  @Input() loading: boolean = false;\n  @Input() btnBlock: boolean = true;\n\n  private minHintLength = 0;\n  protected maxHintLength = 50;\n  protected minPasswordLength = Utils.minimumPasswordLength;\n  protected minPasswordMsg = \"\";\n  protected passwordStrengthScore: PasswordStrengthScore;\n  protected showErrorSummary = false;\n  protected showPassword = false;\n\n  protected formGroup = this.formBuilder.group(\n    {\n      password: [\"\", [Validators.required, Validators.minLength(this.minPasswordLength)]],\n      confirmedPassword: [\"\", Validators.required],\n      hint: [\n        \"\", // must be string (not null) because we check length in validation\n        [Validators.minLength(this.minHintLength), Validators.maxLength(this.maxHintLength)],\n      ],\n      checkForBreaches: true,\n    },\n    {\n      validators: [\n        InputsFieldMatch.compareInputs(\n          \"match\",\n          \"password\",\n          \"confirmedPassword\",\n          this.i18nService.t(\"masterPassDoesntMatch\"),\n        ),\n        InputsFieldMatch.compareInputs(\n          \"doNotMatch\",\n          \"password\",\n          \"hint\",\n          this.i18nService.t(\"hintEqualsPassword\"),\n        ),\n      ],\n    },\n  );\n\n  constructor(\n    private auditService: AuditService,\n    private keyService: KeyService,\n    private dialogService: DialogService,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private policyService: PolicyService,\n    private toastService: ToastService,\n  ) {}\n\n  get minPasswordLengthMsg() {\n    if (\n      this.masterPasswordPolicyOptions != null &&\n      this.masterPasswordPolicyOptions.minLength > 0\n    ) {\n      return this.i18nService.t(\"characterMinimum\", this.masterPasswordPolicyOptions.minLength);\n    } else {\n      return this.i18nService.t(\"characterMinimum\", this.minPasswordLength);\n    }\n  }\n\n  getPasswordStrengthScore(score: PasswordStrengthScore) {\n    this.passwordStrengthScore = score;\n  }\n\n  protected submit = async () => {\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      this.showErrorSummary = true;\n      return;\n    }\n\n    const password = this.formGroup.controls.password.value;\n\n    const passwordEvaluatedSuccessfully = await this.evaluatePassword(\n      password,\n      this.passwordStrengthScore,\n      this.formGroup.controls.checkForBreaches.value,\n    );\n\n    if (!passwordEvaluatedSuccessfully) {\n      return;\n    }\n\n    // Create and hash new master key\n    const kdfConfig = DEFAULT_KDF_CONFIG;\n\n    if (this.email == null) {\n      throw new Error(\"Email is required to create master key.\");\n    }\n\n    const masterKey = await this.keyService.makeMasterKey(\n      password,\n      this.email.trim().toLowerCase(),\n      kdfConfig,\n    );\n\n    const masterKeyHash = await this.keyService.hashMasterKey(password, masterKey);\n\n    const localMasterKeyHash = await this.keyService.hashMasterKey(\n      password,\n      masterKey,\n      HashPurpose.LocalAuthorization,\n    );\n\n    this.onPasswordFormSubmit.emit({\n      masterKey,\n      masterKeyHash,\n      localMasterKeyHash,\n      kdfConfig,\n      hint: this.formGroup.controls.hint.value,\n      password,\n    });\n  };\n\n  // Returns true if the password passes all checks, false otherwise\n  private async evaluatePassword(\n    password: string,\n    passwordStrengthScore: PasswordStrengthScore,\n    checkForBreaches: boolean,\n  ) {\n    // Check if the password is breached, weak, or both\n    const passwordIsBreached =\n      checkForBreaches && (await this.auditService.passwordLeaked(password));\n\n    const passwordWeak = passwordStrengthScore != null && passwordStrengthScore < 3;\n\n    if (passwordIsBreached && passwordWeak) {\n      const userAcceptedDialog = await this.dialogService.openSimpleDialog({\n        title: { key: \"weakAndExposedMasterPassword\" },\n        content: { key: \"weakAndBreachedMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!userAcceptedDialog) {\n        return false;\n      }\n    } else if (passwordWeak) {\n      const userAcceptedDialog = await this.dialogService.openSimpleDialog({\n        title: { key: \"weakMasterPasswordDesc\" },\n        content: { key: \"weakMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!userAcceptedDialog) {\n        return false;\n      }\n    } else if (passwordIsBreached) {\n      const userAcceptedDialog = await this.dialogService.openSimpleDialog({\n        title: { key: \"exposedMasterPassword\" },\n        content: { key: \"exposedMasterPasswordDesc\" },\n        type: \"warning\",\n      });\n\n      if (!userAcceptedDialog) {\n        return false;\n      }\n    }\n\n    // Check if password meets org policy requirements\n    if (\n      this.masterPasswordPolicyOptions != null &&\n      !this.policyService.evaluateMasterPassword(\n        this.passwordStrengthScore,\n        password,\n        this.masterPasswordPolicyOptions,\n      )\n    ) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordPolicyRequirementsNotMet\"),\n      });\n\n      return false;\n    }\n\n    return true;\n  }\n}\n","<bit-callout>\n  {{ message | i18n }}\n\n  <ul *ngIf=\"policy\" class=\"tw-mb-0 tw-ml-8 tw-ps-0\">\n    <li *ngIf=\"policy?.minComplexity > 0\">\n      {{ \"policyInEffectMinComplexity\" | i18n: getPasswordScoreAlertDisplay() }}\n    </li>\n    <li *ngIf=\"policy?.minLength > 0\">\n      {{ \"policyInEffectMinLength\" | i18n: policy?.minLength.toString() }}\n    </li>\n    <li *ngIf=\"policy?.requireUpper\">\n      {{ \"policyInEffectUppercase\" | i18n }}\n    </li>\n    <li *ngIf=\"policy?.requireLower\">\n      {{ \"policyInEffectLowercase\" | i18n }}\n    </li>\n    <li *ngIf=\"policy?.requireNumbers\">\n      {{ \"policyInEffectNumbers\" | i18n }}\n    </li>\n    <li *ngIf=\"policy?.requireSpecial\">\n      {{ \"policyInEffectSpecial\" | i18n: \"!@#$%^&*\" }}\n    </li>\n  </ul>\n</bit-callout>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CalloutModule } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"auth-password-callout\",\n  templateUrl: \"password-callout.component.html\",\n  standalone: true,\n  imports: [CommonModule, JslibModule, CalloutModule],\n})\nexport class PasswordCalloutComponent {\n  @Input() message = \"masterPasswordPolicyInEffect\";\n  @Input() policy: MasterPasswordPolicyOptions;\n\n  constructor(private i18nService: I18nService) {}\n\n  getPasswordScoreAlertDisplay() {\n    let str: string;\n    switch (this.policy.minComplexity) {\n      case 4:\n        str = this.i18nService.t(\"strong\");\n        break;\n      case 3:\n        str = this.i18nService.t(\"good\");\n        break;\n      default:\n        str = this.i18nService.t(\"weak\");\n        break;\n    }\n    return str + \" (\" + this.policy.minComplexity + \")\";\n  }\n}\n","export enum ActiveClientVerificationOption {\n  MasterPassword = \"masterPassword\",\n  Pin = \"pin\",\n  Biometrics = \"biometrics\",\n  None = \"none\",\n}\n","<ng-container *ngIf=\"verificationType === 'client'\">\n  <div class=\"tw-flex tw-flex-col\">\n    <!-- Master password -->\n    <ng-container\n      *ngIf=\"\n        userVerificationOptions.client.masterPassword &&\n        activeClientVerificationOption == ActiveClientVerificationOption.MasterPassword\n      \"\n    >\n      <ng-container *ngTemplateOutlet=\"masterPasswordFormField\"></ng-container>\n    </ng-container>\n\n    <!-- PIN -->\n    <ng-container\n      *ngIf=\"\n        userVerificationOptions.client.pin &&\n        activeClientVerificationOption == ActiveClientVerificationOption.Pin\n      \"\n    >\n      <bit-form-field disableMargin>\n        <bit-label>{{ \"pin\" | i18n }}</bit-label>\n        <input\n          bitInput\n          id=\"pin\"\n          type=\"password\"\n          name=\"pin\"\n          [formControl]=\"secret\"\n          appAutofocus\n          appInputVerbatim\n        />\n        <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n        <bit-hint>{{ \"confirmIdentity\" | i18n }}</bit-hint>\n      </bit-form-field>\n    </ng-container>\n\n    <!-- Biometrics -->\n    <ng-container\n      *ngIf=\"\n        userVerificationOptions.client.biometrics &&\n        activeClientVerificationOption == ActiveClientVerificationOption.Biometrics\n      \"\n    >\n      <div class=\"tw-flex tw-flex-col tw-items-center\">\n        <bit-icon [icon]=\"Icons.UserVerificationBiometricsIcon\" class=\"tw-mb-4\"></bit-icon>\n        <p class=\"tw-font-bold tw-mb-1\">{{ \"verifyWithBiometrics\" | i18n }}</p>\n        <div *ngIf=\"!biometricsVerificationFailed\">\n          <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n          {{ \"awaitingConfirmation\" | i18n }}\n        </div>\n      </div>\n\n      <bit-callout type=\"danger\" *ngIf=\"biometricsVerificationFailed\">\n        {{ \"couldNotCompleteBiometrics\" | i18n }}\n        <button bitLink type=\"button\" linkType=\"primary\" (click)=\"verifyUserViaBiometrics()\">\n          {{ \"tryAgain\" | i18n }}\n        </button>\n      </bit-callout>\n    </ng-container>\n\n    <!-- Alternate verification options if user has more than 1 -->\n    <div\n      class=\"tw-flex tw-flex-col tw-items-center tw-justify-center tw-mt-2\"\n      *ngIf=\"hasMultipleClientVerificationOptions\"\n    >\n      <p class=\"tw-mb-1\">{{ \"needADifferentMethod\" | i18n }}</p>\n\n      <button\n        *ngIf=\"\n          userVerificationOptions.client.biometrics &&\n          activeClientVerificationOption !== ActiveClientVerificationOption.Biometrics\n        \"\n        type=\"button\"\n        class=\"tw-mb-1\"\n        bitLink\n        linkType=\"primary\"\n        (click)=\"activeClientVerificationOption = ActiveClientVerificationOption.Biometrics\"\n      >\n        {{ \"useBiometrics\" | i18n }}\n      </button>\n\n      <button\n        *ngIf=\"\n          userVerificationOptions.client.pin &&\n          activeClientVerificationOption !== ActiveClientVerificationOption.Pin\n        \"\n        type=\"button\"\n        class=\"tw-mb-1\"\n        bitLink\n        linkType=\"primary\"\n        (click)=\"activeClientVerificationOption = ActiveClientVerificationOption.Pin\"\n      >\n        {{ \"usePin\" | i18n }}\n      </button>\n\n      <button\n        *ngIf=\"\n          userVerificationOptions.client.masterPassword &&\n          activeClientVerificationOption !== ActiveClientVerificationOption.MasterPassword\n        \"\n        type=\"button\"\n        bitLink\n        linkType=\"primary\"\n        (click)=\"activeClientVerificationOption = ActiveClientVerificationOption.MasterPassword\"\n      >\n        {{ \"useMasterPassword\" | i18n }}\n      </button>\n    </div>\n  </div>\n</ng-container>\n\n<ng-container *ngIf=\"verificationType === 'server'\">\n  <ng-container *ngIf=\"userVerificationOptions.server.masterPassword\">\n    <ng-container *ngTemplateOutlet=\"masterPasswordFormField\"></ng-container>\n  </ng-container>\n  <ng-container *ngIf=\"userVerificationOptions.server.otp\">\n    <div class=\"tw-mb-6\" *ngIf=\"!sentInitialCode\">\n      <i class=\"bwi bwi-spinner bwi-spin\" title=\"{{ 'loading' | i18n }}\" aria-hidden=\"true\"></i>\n    </div>\n\n    <div class=\"tw-mb-6\" *ngIf=\"sentInitialCode\">\n      {{ \"enterVerificationCodeSentToEmail\" | i18n }}\n\n      <p class=\"mb-0\">\n        <button bitLink type=\"button\" linkType=\"primary\" (click)=\"requestOTP()\">\n          {{ \"resendCode\" | i18n }}\n        </button>\n\n        <span class=\"tw-ml-2 tw-text-success\" role=\"alert\" @sent *ngIf=\"sentCode\">\n          <i class=\"bwi bwi-check-circle\" aria-hidden=\"true\"></i>\n          {{ \"codeSent\" | i18n }}\n        </span>\n      </p>\n    </div>\n\n    <bit-form-field disableMargin>\n      <bit-label>{{ \"verificationCode\" | i18n }}</bit-label>\n      <input\n        bitInput\n        type=\"text\"\n        id=\"verificationCode\"\n        name=\"verificationCode\"\n        [formControl]=\"secret\"\n        appInputVerbatim\n      />\n      <bit-hint>{{ \"confirmIdentity\" | i18n }}</bit-hint>\n    </bit-form-field>\n  </ng-container>\n</ng-container>\n\n<ng-template #masterPasswordFormField>\n  <bit-form-field disableMargin>\n    <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n    <input\n      bitInput\n      id=\"masterPassword\"\n      type=\"password\"\n      name=\"MasterPasswordHash\"\n      [formControl]=\"secret\"\n      appAutofocus\n      appInputVerbatim\n    />\n    <button type=\"button\" bitIconButton bitSuffix bitPasswordInputToggle></button>\n    <bit-hint>{{ \"confirmIdentity\" | i18n }}</bit-hint>\n  </bit-form-field>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { animate, style, transition, trigger } from \"@angular/animations\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport {\n  ControlValueAccessor,\n  FormControl,\n  Validators,\n  NG_VALUE_ACCESSOR,\n  ReactiveFormsModule,\n} from \"@angular/forms\";\nimport { BehaviorSubject, Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { UserVerificationOptions } from \"@bitwarden/common/auth/types/user-verification-options\";\nimport { VerificationWithSecret } from \"@bitwarden/common/auth/types/verification\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CalloutModule,\n  FormFieldModule,\n  IconButtonModule,\n  IconModule,\n  LinkModule,\n} from \"@bitwarden/components\";\n\nimport { UserVerificationBiometricsIcon } from \"../icons\";\n\nimport { ActiveClientVerificationOption } from \"./active-client-verification-option.enum\";\n\n/**\n * Used for general-purpose user verification throughout the app.\n * Collects the user's master password, or if they are not using a password, prompts for an OTP via email.\n * This is exposed to the parent component via the ControlValueAccessor interface (e.g. bind it to a FormControl).\n * Use UserVerificationService to verify the user's input.\n */\n@Component({\n  selector: \"app-user-verification-form-input\",\n  templateUrl: \"user-verification-form-input.component.html\",\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      multi: true,\n      useExisting: UserVerificationFormInputComponent,\n    },\n  ],\n  animations: [\n    trigger(\"sent\", [\n      transition(\":enter\", [style({ opacity: 0 }), animate(\"100ms\", style({ opacity: 1 }))]),\n    ]),\n  ],\n  standalone: true,\n  imports: [\n    CommonModule,\n    ReactiveFormsModule,\n    JslibModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    IconButtonModule,\n    IconModule,\n    LinkModule,\n    ButtonModule,\n    CalloutModule,\n  ],\n})\n// eslint-disable-next-line rxjs-angular/prefer-takeuntil\nexport class UserVerificationFormInputComponent implements ControlValueAccessor, OnInit, OnDestroy {\n  @Input() verificationType: \"server\" | \"client\" = \"server\"; // server represents original behavior\n  private _invalidSecret = false;\n  @Input()\n  get invalidSecret() {\n    return this._invalidSecret;\n  }\n  set invalidSecret(value: boolean) {\n    this._invalidSecret = value;\n    this.invalidSecretChange.emit(value);\n\n    // ISSUE: This is pretty hacky but unfortunately there is no way of knowing if the parent\n    // control has been marked as touched, see: https://github.com/angular/angular/issues/10887\n    // When that functionality has been added we should also look into forwarding reactive form\n    // controls errors so that we don't need a separate input/output `invalidSecret`.\n    if (value) {\n      this.secret.markAsTouched();\n    }\n    this.secret.updateValueAndValidity({ emitEvent: false });\n  }\n  @Output() invalidSecretChange = new EventEmitter<boolean>();\n\n  @Output() activeClientVerificationOptionChange =\n    new EventEmitter<ActiveClientVerificationOption>();\n\n  @Output() biometricsVerificationResultChange = new EventEmitter<boolean>();\n\n  readonly Icons = { UserVerificationBiometricsIcon };\n\n  // default to false to avoid null checks in template\n  userVerificationOptions: UserVerificationOptions = {\n    client: {\n      masterPassword: false,\n      pin: false,\n      biometrics: false,\n    },\n    server: {\n      masterPassword: false,\n      otp: false,\n    },\n  };\n\n  ActiveClientVerificationOption = ActiveClientVerificationOption;\n\n  private _activeClientVerificationOptionSubject =\n    new BehaviorSubject<ActiveClientVerificationOption>(null);\n\n  activeClientVerificationOption$ = this._activeClientVerificationOptionSubject.asObservable();\n\n  set activeClientVerificationOption(value: ActiveClientVerificationOption) {\n    this._activeClientVerificationOptionSubject.next(value);\n  }\n\n  get activeClientVerificationOption(): ActiveClientVerificationOption {\n    return this._activeClientVerificationOptionSubject.getValue();\n  }\n\n  get hasMultipleClientVerificationOptions(): boolean {\n    let optionsCount = 0;\n    if (this.userVerificationOptions.client.masterPassword) {\n      optionsCount++;\n    }\n    if (this.userVerificationOptions.client.pin) {\n      optionsCount++;\n    }\n    if (this.userVerificationOptions.client.biometrics) {\n      optionsCount++;\n    }\n    return optionsCount >= 2;\n  }\n\n  biometricsVerificationFailed = false;\n\n  disableRequestOTP = false;\n  sentInitialCode = false;\n  sentCode = false;\n\n  secret = new FormControl(\"\", [\n    Validators.required,\n    () => {\n      if (this.invalidSecret) {\n        return {\n          invalidSecret: {\n            message: this.getInvalidSecretErrorMessage(),\n          },\n        };\n      }\n    },\n  ]);\n\n  private getInvalidSecretErrorMessage(): string {\n    // must determine client or server\n    if (this.verificationType === \"server\") {\n      return this.userVerificationOptions.server.masterPassword\n        ? this.i18nService.t(\"incorrectPassword\")\n        : this.i18nService.t(\"incorrectCode\");\n    } else {\n      // client\n      if (this.activeClientVerificationOption === ActiveClientVerificationOption.MasterPassword) {\n        return this.i18nService.t(\"incorrectPassword\");\n      } else if (this.activeClientVerificationOption === ActiveClientVerificationOption.Pin) {\n        return this.i18nService.t(\"incorrectPin\");\n      }\n    }\n  }\n\n  private onChange: (value: VerificationWithSecret) => void;\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private userVerificationService: UserVerificationService,\n    private i18nService: I18nService,\n  ) {}\n\n  async ngOnInit() {\n    this.userVerificationOptions =\n      await this.userVerificationService.getAvailableVerificationOptions(this.verificationType);\n\n    if (this.verificationType === \"client\") {\n      this.setDefaultActiveClientVerificationOption();\n      this.setupClientVerificationOptionChangeHandler();\n    } else {\n      if (this.userVerificationOptions.server.otp) {\n        // New design requires requesting on load to prevent user from having to click send code\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.requestOTP();\n      }\n    }\n\n    // Executing secret changes for all non biometrics verification. Biometrics doesn't have a user entered secret.\n    if (this.activeClientVerificationOption !== ActiveClientVerificationOption.Biometrics) {\n      this.processSecretChanges(this.secret.value);\n    }\n\n    this.secret.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((secret: string) => this.processSecretChanges(secret));\n  }\n\n  private setDefaultActiveClientVerificationOption(): void {\n    // Priorities should be Bio > Pin > Master Password for speed based on design\n    if (this.userVerificationOptions.client.biometrics) {\n      this.activeClientVerificationOption = ActiveClientVerificationOption.Biometrics;\n    } else if (this.userVerificationOptions.client.pin) {\n      this.activeClientVerificationOption = ActiveClientVerificationOption.Pin;\n    } else if (this.userVerificationOptions.client.masterPassword) {\n      this.activeClientVerificationOption = ActiveClientVerificationOption.MasterPassword;\n    } else {\n      this.activeClientVerificationOption = ActiveClientVerificationOption.None;\n    }\n  }\n\n  private setupClientVerificationOptionChangeHandler(): void {\n    this.activeClientVerificationOption$\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((activeClientVerificationOption: ActiveClientVerificationOption) => {\n        // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n        // eslint-disable-next-line @typescript-eslint/no-floating-promises\n        this.handleActiveClientVerificationOptionChange(activeClientVerificationOption);\n      });\n  }\n\n  private async handleActiveClientVerificationOptionChange(\n    activeClientVerificationOption: ActiveClientVerificationOption,\n  ): Promise<void> {\n    // Emit to parent component so it can implement behavior if needed.\n    this.activeClientVerificationOptionChange.emit(activeClientVerificationOption);\n\n    // clear secret value when switching verification methods\n    this.secret.setValue(null);\n\n    // Reset validation errors when swapping active client verification options\n    this.secret.markAsUntouched();\n    this.secret.updateValueAndValidity({ emitEvent: false });\n\n    // if changing to biometrics, we need to prompt for biometrics\n    if (activeClientVerificationOption === \"biometrics\") {\n      // reset biometrics failed\n      this.biometricsVerificationFailed = false;\n      await this.verifyUserViaBiometrics();\n    }\n  }\n\n  async verifyUserViaBiometrics() {\n    this.biometricsVerificationFailed = false;\n\n    const biometricsResult = await this.userVerificationService.verifyUser({\n      type: VerificationType.Biometrics,\n    });\n\n    this.biometricsVerificationResultChange.emit(biometricsResult);\n\n    this.biometricsVerificationFailed = !biometricsResult;\n  }\n\n  requestOTP = async () => {\n    if (!this.userVerificationOptions.server.masterPassword) {\n      this.disableRequestOTP = true;\n      try {\n        await this.userVerificationService.requestOTP();\n        this.sentCode = true;\n        this.sentInitialCode = true;\n\n        // after 3 seconds reset sentCode to false\n        setTimeout(() => {\n          this.sentCode = false;\n        }, 3000);\n      } finally {\n        this.disableRequestOTP = false;\n      }\n    }\n  };\n\n  writeValue(obj: any): void {\n    this.secret.setValue(obj);\n  }\n\n  /** Required for NG_VALUE_ACCESSOR */\n  registerOnChange(fn: any): void {\n    this.onChange = fn;\n  }\n\n  /** Required for NG_VALUE_ACCESSOR */\n  registerOnTouched(fn: any): void {\n    // Not implemented\n  }\n\n  setDisabledState?(isDisabled: boolean): void {\n    this.disableRequestOTP = isDisabled;\n    if (isDisabled) {\n      this.secret.disable();\n    } else {\n      this.secret.enable();\n    }\n  }\n\n  processSecretChanges(secret: string) {\n    this.invalidSecret = false;\n\n    // Short circuit secret change handling when biometrics is chosen as biometrics has no secret\n    if (this.activeClientVerificationOption === ActiveClientVerificationOption.Biometrics) {\n      return;\n    }\n\n    if (this.onChange == null) {\n      return;\n    }\n\n    this.onChange({\n      type: this.determineVerificationWithSecretType(),\n      secret: Utils.isNullOrWhitespace(secret) ? null : secret,\n    });\n  }\n\n  private determineVerificationWithSecretType():\n    | VerificationType.MasterPassword\n    | VerificationType.OTP\n    | VerificationType.PIN {\n    if (this.verificationType === \"server\") {\n      return this.userVerificationOptions.server.masterPassword\n        ? VerificationType.MasterPassword\n        : VerificationType.OTP;\n    } else {\n      // client\n      return this.userVerificationOptions.client.masterPassword &&\n        this.activeClientVerificationOption === ActiveClientVerificationOption.MasterPassword\n        ? VerificationType.MasterPassword\n        : VerificationType.PIN;\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<div [formGroup]=\"form\" class=\"tw-mb-4\">\n  <bit-form-field [disableMargin]=\"!showCustom\">\n    <bit-label>{{ \"vaultTimeout1\" | i18n }}</bit-label>\n    <bit-select formControlName=\"vaultTimeout\">\n      <bit-option\n        *ngFor=\"let o of filteredVaultTimeoutOptions\"\n        [value]=\"o.value\"\n        [label]=\"o.name\"\n      ></bit-option>\n    </bit-select>\n  </bit-form-field>\n  <div class=\"tw-grid tw-grid-cols-12 tw-gap-4\" *ngIf=\"showCustom\" formGroupName=\"custom\">\n    <bit-form-field class=\"tw-col-span-6\" disableMargin>\n      <input\n        bitInput\n        type=\"number\"\n        min=\"0\"\n        formControlName=\"hours\"\n        aria-labelledby=\"maximum-error\"\n      />\n      <bit-label>{{ \"hours\" | i18n }}</bit-label>\n    </bit-form-field>\n    <bit-form-field class=\"tw-col-span-6 tw-self-end\" disableMargin>\n      <input\n        bitInput\n        type=\"number\"\n        min=\"0\"\n        name=\"minutes\"\n        formControlName=\"minutes\"\n        aria-labelledby=\"maximum-error\"\n      />\n      <bit-label>{{ \"minutes\" | i18n }}</bit-label>\n    </bit-form-field>\n  </div>\n  <bit-hint *ngIf=\"vaultTimeoutPolicy != null && !exceedsMaximumTimeout\">\n    {{ \"vaultTimeoutPolicyInEffect1\" | i18n: vaultTimeoutPolicyHours : vaultTimeoutPolicyMinutes }}\n  </bit-hint>\n  <small *ngIf=\"!exceedsMinimumTimeout\" class=\"tw-text-danger\">\n    <i class=\"bwi bwi-error\" aria-hidden=\"true\"></i> {{ \"vaultCustomTimeoutMinimum\" | i18n }}\n  </small>\n  <small class=\"tw-text-danger\" *ngIf=\"exceedsMaximumTimeout\" id=\"maximum-error\">\n    <i class=\"bwi bwi-error\" aria-hidden=\"true\"></i>\n    {{\n      \"vaultTimeoutPolicyMaximumError\" | i18n: vaultTimeoutPolicyHours : vaultTimeoutPolicyMinutes\n    }}\n  </small>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnChanges, OnDestroy, OnInit } from \"@angular/core\";\nimport {\n  AbstractControl,\n  ControlValueAccessor,\n  FormBuilder,\n  FormControl,\n  FormGroup,\n  NG_VALIDATORS,\n  NG_VALUE_ACCESSOR,\n  ReactiveFormsModule,\n  ValidationErrors,\n  Validator,\n} from \"@angular/forms\";\nimport { filter, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { VaultTimeout, VaultTimeoutOption } from \"@bitwarden/common/types/vault-timeout.type\";\nimport { FormFieldModule, SelectModule } from \"@bitwarden/components\";\n\ntype VaultTimeoutForm = FormGroup<{\n  vaultTimeout: FormControl<VaultTimeout | null>;\n  custom: FormGroup<{\n    hours: FormControl<number | null>;\n    minutes: FormControl<number | null>;\n  }>;\n}>;\n\ntype VaultTimeoutFormValue = VaultTimeoutForm[\"value\"];\n\n@Component({\n  selector: \"auth-vault-timeout-input\",\n  templateUrl: \"vault-timeout-input.component.html\",\n  standalone: true,\n  imports: [CommonModule, JslibModule, ReactiveFormsModule, FormFieldModule, SelectModule],\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      multi: true,\n      useExisting: VaultTimeoutInputComponent,\n    },\n    {\n      provide: NG_VALIDATORS,\n      multi: true,\n      useExisting: VaultTimeoutInputComponent,\n    },\n  ],\n})\nexport class VaultTimeoutInputComponent\n  implements ControlValueAccessor, Validator, OnInit, OnDestroy, OnChanges\n{\n  protected readonly VaultTimeoutAction = VaultTimeoutAction;\n\n  get showCustom() {\n    return this.form.get(\"vaultTimeout\").value === VaultTimeoutInputComponent.CUSTOM_VALUE;\n  }\n\n  get exceedsMinimumTimeout(): boolean {\n    return (\n      !this.showCustom || this.customTimeInMinutes() > VaultTimeoutInputComponent.MIN_CUSTOM_MINUTES\n    );\n  }\n\n  get exceedsMaximumTimeout(): boolean {\n    return (\n      this.showCustom &&\n      this.customTimeInMinutes() >\n        this.vaultTimeoutPolicyMinutes + 60 * this.vaultTimeoutPolicyHours\n    );\n  }\n\n  get filteredVaultTimeoutOptions(): VaultTimeoutOption[] {\n    // by policy max value\n    if (this.vaultTimeoutPolicy == null || this.vaultTimeoutPolicy.data == null) {\n      return this.vaultTimeoutOptions;\n    }\n\n    return this.vaultTimeoutOptions.filter((option) => {\n      if (typeof option.value === \"number\") {\n        return option.value <= this.vaultTimeoutPolicy.data.minutes;\n      }\n\n      return false;\n    });\n  }\n\n  static CUSTOM_VALUE = -100;\n  static MIN_CUSTOM_MINUTES = 0;\n\n  form: VaultTimeoutForm = this.formBuilder.group({\n    vaultTimeout: [null],\n    custom: this.formBuilder.group({\n      hours: [null],\n      minutes: [null],\n    }),\n  });\n\n  @Input() vaultTimeoutOptions: VaultTimeoutOption[];\n\n  vaultTimeoutPolicy: Policy;\n  vaultTimeoutPolicyHours: number;\n  vaultTimeoutPolicyMinutes: number;\n\n  protected canLockVault$: Observable<boolean>;\n\n  private onChange: (vaultTimeout: VaultTimeout) => void;\n  private validatorChange: () => void;\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private policyService: PolicyService,\n    private vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    private i18nService: I18nService,\n  ) {}\n\n  async ngOnInit() {\n    this.policyService\n      .get$(PolicyType.MaximumVaultTimeout)\n      .pipe(\n        filter((policy) => policy != null),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((policy) => {\n        this.vaultTimeoutPolicy = policy;\n        this.applyVaultTimeoutPolicy();\n      });\n\n    this.form.valueChanges\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((value: VaultTimeoutFormValue) => {\n        if (this.onChange) {\n          this.onChange(this.getVaultTimeout(value));\n        }\n      });\n\n    // Assign the current value to the custom fields\n    // so that if the user goes from a numeric value to custom\n    // we can initialize the custom fields with the current value\n    // ex: user picks 5 min, goes to custom, we want to show 0 hr, 5 min in the custom fields\n    this.form.controls.vaultTimeout.valueChanges\n      .pipe(\n        filter((value) => value !== VaultTimeoutInputComponent.CUSTOM_VALUE),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((value) => {\n        const current = typeof value === \"string\" ? 0 : Math.max(value, 0);\n\n        // This cannot emit an event b/c it would cause form.valueChanges to fire again\n        // and we are already handling that above so just silently update\n        // custom fields when vaultTimeout changes to a non-custom value\n        this.form.patchValue(\n          {\n            custom: {\n              hours: Math.floor(current / 60),\n              minutes: current % 60,\n            },\n          },\n          { emitEvent: false },\n        );\n      });\n\n    this.canLockVault$ = this.vaultTimeoutSettingsService\n      .availableVaultTimeoutActions$()\n      .pipe(map((actions) => actions.includes(VaultTimeoutAction.Lock)));\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  ngOnChanges() {\n    if (\n      !this.vaultTimeoutOptions.find((p) => p.value === VaultTimeoutInputComponent.CUSTOM_VALUE)\n    ) {\n      this.vaultTimeoutOptions.push({\n        name: this.i18nService.t(\"custom\"),\n        value: VaultTimeoutInputComponent.CUSTOM_VALUE,\n      });\n    }\n  }\n\n  getVaultTimeout(value: VaultTimeoutFormValue) {\n    if (value.vaultTimeout !== VaultTimeoutInputComponent.CUSTOM_VALUE) {\n      return value.vaultTimeout;\n    }\n\n    return value.custom.hours * 60 + value.custom.minutes;\n  }\n\n  writeValue(value: number): void {\n    if (value == null) {\n      return;\n    }\n\n    if (this.vaultTimeoutOptions.every((p) => p.value !== value)) {\n      this.form.setValue({\n        vaultTimeout: VaultTimeoutInputComponent.CUSTOM_VALUE,\n        custom: {\n          hours: Math.floor(value / 60),\n          minutes: value % 60,\n        },\n      });\n      return;\n    }\n\n    this.form.patchValue({\n      vaultTimeout: value,\n    });\n  }\n\n  registerOnChange(onChange: any): void {\n    this.onChange = onChange;\n  }\n\n  registerOnTouched(onTouched: any): void {\n    // Empty\n  }\n\n  setDisabledState?(isDisabled: boolean): void {\n    // Empty\n  }\n\n  validate(control: AbstractControl): ValidationErrors {\n    if (this.vaultTimeoutPolicy && this.vaultTimeoutPolicy?.data?.minutes < control.value) {\n      return { policyError: true };\n    }\n\n    if (!this.exceedsMinimumTimeout) {\n      return { minTimeoutError: true };\n    }\n\n    return null;\n  }\n\n  registerOnValidatorChange(fn: () => void): void {\n    this.validatorChange = fn;\n  }\n\n  private customTimeInMinutes() {\n    return this.form.value.custom.hours * 60 + this.form.value.custom.minutes;\n  }\n\n  private applyVaultTimeoutPolicy() {\n    this.vaultTimeoutPolicyHours = Math.floor(this.vaultTimeoutPolicy.data.minutes / 60);\n    this.vaultTimeoutPolicyMinutes = this.vaultTimeoutPolicy.data.minutes % 60;\n\n    this.vaultTimeoutOptions = this.vaultTimeoutOptions.filter((vaultTimeoutOption) => {\n      // Always include the custom option\n      if (vaultTimeoutOption.value === VaultTimeoutInputComponent.CUSTOM_VALUE) {\n        return true;\n      }\n\n      if (typeof vaultTimeoutOption.value === \"number\") {\n        // Include numeric values that are less than or equal to the policy minutes\n        return vaultTimeoutOption.value <= this.vaultTimeoutPolicy.data.minutes;\n      }\n\n      // Exclude all string cases when there's a numeric policy defined\n      return false;\n    });\n\n    // Only call validator change if it's been set\n    if (this.validatorChange) {\n      this.validatorChange();\n    }\n  }\n}\n","import { AuthRequest } from \"@bitwarden/common/auth/models/request/auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\n\nexport abstract class AuthRequestApiService {\n  /**\n   * Gets an auth request by its ID.\n   *\n   * @param requestId The ID of the auth request.\n   * @returns A promise that resolves to the auth request response.\n   */\n  abstract getAuthRequest: (requestId: string) => Promise<AuthRequestResponse>;\n\n  /**\n   * Gets an auth request response by its ID and access code.\n   *\n   * @param requestId The ID of the auth request.\n   * @param accessCode The access code of the auth request.\n   * @returns A promise that resolves to the auth request response.\n   */\n  abstract getAuthResponse: (requestId: string, accessCode: string) => Promise<AuthRequestResponse>;\n\n  /**\n   * Sends an admin auth request.\n   *\n   * @param request The auth request object.\n   * @returns A promise that resolves to the auth request response.\n   */\n  abstract postAdminAuthRequest: (request: AuthRequest) => Promise<AuthRequestResponse>;\n\n  /**\n   * Sends an auth request.\n   *\n   * @param request The auth request object.\n   * @returns A promise that resolves to the auth request response.\n   */\n  abstract postAuthRequest: (request: AuthRequest) => Promise<AuthRequestResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nexport abstract class LoginEmailServiceAbstraction {\n  /**\n   * An observable that monitors the loginEmail in memory.\n   * The loginEmail is the email that is being used in the current login process.\n   */\n  loginEmail$: Observable<string | null>;\n  /**\n   * An observable that monitors the storedEmail on disk.\n   * This will return null if an account is being added.\n   */\n  storedEmail$: Observable<string | null>;\n  /**\n   * Sets the loginEmail in memory.\n   * The loginEmail is the email that is being used in the current login process.\n   */\n  setLoginEmail: (email: string) => Promise<void>;\n  /**\n   * Gets from memory whether or not the email should be stored on disk when `saveEmailSettings` is called.\n   * @returns A boolean stating whether or not the email should be stored on disk.\n   */\n  getRememberEmail: () => boolean;\n  /**\n   * Sets in memory whether or not the email should be stored on disk when `saveEmailSettings` is called.\n   */\n  setRememberEmail: (value: boolean) => void;\n  /**\n   * Sets the email and rememberEmail properties in memory to null.\n   */\n  clearValues: () => void;\n  /**\n   * Saves or clears the email on disk\n   * - If an account is being added, only changes the stored email when rememberEmail is true.\n   * - If rememberEmail is true, sets the email on disk to the current email.\n   * - If rememberEmail is false, sets the email on disk to null.\n   * Always clears the email and rememberEmail properties from memory.\n   * @returns A promise that resolves once the email settings are saved.\n   */\n  saveEmailSettings: () => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\n\nimport {\n  UserApiLoginCredentials,\n  PasswordLoginCredentials,\n  SsoLoginCredentials,\n  AuthRequestLoginCredentials,\n  WebAuthnLoginCredentials,\n} from \"../models/domain/login-credentials\";\n\nexport abstract class LoginStrategyServiceAbstraction {\n  /**\n   * The current strategy being used to authenticate.\n   * Emits null if the session has timed out.\n   */\n  currentAuthType$: Observable<AuthenticationType | null>;\n  /**\n   * If the login strategy uses the email address of the user, this\n   * will return it. Otherwise, it will return null.\n   */\n  getEmail: () => Promise<string | null>;\n  /**\n   * If the user is logging in with a master password, this will return\n   * the master password hash. Otherwise, it will return null.\n   */\n  getMasterPasswordHash: () => Promise<string | null>;\n  /**\n   * If the user is logging in with SSO, this will return\n   * the email auth token. Otherwise, it will return null.\n   * @see {@link SsoLoginStrategyData.ssoEmail2FaSessionToken}\n   */\n  getSsoEmail2FaSessionToken: () => Promise<string | null>;\n  /**\n   * Returns the access code if the user is logging in with an\n   * Auth Request. Otherwise, it will return null.\n   */\n  getAccessCode: () => Promise<string | null>;\n  /**\n   * Returns the auth request ID if the user is logging in with an\n   * Auth Request. Otherwise, it will return null.\n   */\n  getAuthRequestId: () => Promise<string | null>;\n\n  /**\n   * Sends a token request to the server using the provided credentials.\n   */\n  logIn: (\n    credentials:\n      | UserApiLoginCredentials\n      | PasswordLoginCredentials\n      | SsoLoginCredentials\n      | AuthRequestLoginCredentials\n      | WebAuthnLoginCredentials,\n  ) => Promise<AuthResult>;\n  /**\n   * Sends a token request to the server with the provided two factor token\n   * and captcha response. This uses data stored from {@link LoginStrategyServiceAbstraction.logIn},\n   * so that must be called first.\n   * Returns an error if no session data is found.\n   */\n  logInTwoFactor: (\n    twoFactor: TokenTwoFactorRequest,\n    captchaResponse: string,\n  ) => Promise<AuthResult>;\n  /**\n   * Creates a master key from the provided master password and email.\n   */\n  makePreloginKey: (masterPassword: string, email: string) => Promise<MasterKey>;\n  /**\n   * Emits true if the two factor session has expired.\n   */\n  twoFactorTimeout$: Observable<boolean>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserDecryptionOptions } from \"../models\";\n\nexport abstract class UserDecryptionOptionsServiceAbstraction {\n  /**\n   * Returns what decryption options are available for the current user.\n   * @remark This is sent from the server on authentication.\n   */\n  abstract userDecryptionOptions$: Observable<UserDecryptionOptions>;\n  /**\n   * Uses user decryption options to determine if current user has a master password.\n   * @remark This is sent from the server, and does not indicate if the master password\n   * was used to login and/or if a master key is saved locally.\n   */\n  abstract hasMasterPassword$: Observable<boolean>;\n\n  /**\n   * Returns the user decryption options for the given user id.\n   * @param userId The user id to check.\n   */\n  abstract userDecryptionOptionsById$(userId: string): Observable<UserDecryptionOptions>;\n}\n\nexport abstract class InternalUserDecryptionOptionsServiceAbstraction extends UserDecryptionOptionsServiceAbstraction {\n  /**\n   * Sets the current decryption options for the user, contains the current configuration\n   * of the users account related to how they can decrypt their vault.\n   * @remark Intended to be used when user decryption options are received from server, does\n   * not update the server. Consider syncing instead of updating locally.\n   * @param userDecryptionOptions Current user decryption options received from server.\n   */\n  abstract setUserDecryptionOptions(userDecryptionOptions: UserDecryptionOptions): Promise<void>;\n}\n","import { EncString, EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { PinKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { KdfConfig } from \"@bitwarden/key-management\";\n\nimport { PinLockType } from \"../services\";\n\n/**\n * The PinService is used for PIN-based unlocks. Below is a very basic overview of the PIN flow:\n *\n * -- Setting the PIN via {@link SetPinComponent} --\n *\n *    When the user submits the setPinForm:\n\n *    1. We encrypt the PIN with the UserKey and store it on disk as `userKeyEncryptedPin`.\n *\n *    2. We create a PinKey from the PIN, and then use that PinKey to encrypt the UserKey, resulting in\n *       a `pinKeyEncryptedUserKey`, which can be stored in one of two ways depending on what the user selects\n *       for the `requireMasterPasswordOnClientReset` checkbox.\n *\n *       If `requireMasterPasswordOnClientReset` is:\n *       - TRUE, store in memory as `pinKeyEncryptedUserKeyEphemeral` (does NOT persist through a client reset)\n *       - FALSE, store on disk as `pinKeyEncryptedUserKeyPersistent` (persists through a client reset)\n *\n * -- Unlocking with the PIN via {@link LockComponent} --\n *\n *    When the user enters their PIN, we decrypt their UserKey with the PIN and set that UserKey to state.\n */\nexport abstract class PinServiceAbstraction {\n  /**\n   * Gets the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n   */\n  abstract getPinKeyEncryptedUserKeyPersistent: (userId: UserId) => Promise<EncString>;\n\n  /**\n   * Clears the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n   */\n  abstract clearPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise<void>;\n\n  /**\n   * Gets the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n   */\n  abstract getPinKeyEncryptedUserKeyEphemeral: (userId: UserId) => Promise<EncString>;\n\n  /**\n   * Clears the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n   */\n  abstract clearPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise<void>;\n\n  /**\n   * Creates a pinKeyEncryptedUserKey from the provided PIN and UserKey.\n   */\n  abstract createPinKeyEncryptedUserKey: (\n    pin: string,\n    userKey: UserKey,\n    userId: UserId,\n  ) => Promise<EncString>;\n\n  /**\n   * Stores the UserKey, encrypted by the PinKey.\n   * @param storeEphemeralVersion If true, stores an ephemeral version via the private {@link setPinKeyEncryptedUserKeyEphemeral} method.\n   *                              If false, stores a persistent version via the private {@link setPinKeyEncryptedUserKeyPersistent} method.\n   */\n  abstract storePinKeyEncryptedUserKey: (\n    pinKeyEncryptedUserKey: EncString,\n    storeEphemeralVersion: boolean,\n    userId: UserId,\n  ) => Promise<void>;\n\n  /**\n   * Gets the user's PIN, encrypted by the UserKey.\n   */\n  abstract getUserKeyEncryptedPin: (userId: UserId) => Promise<EncString>;\n\n  /**\n   * Sets the user's PIN, encrypted by the UserKey.\n   */\n  abstract setUserKeyEncryptedPin: (\n    userKeyEncryptedPin: EncString,\n    userId: UserId,\n  ) => Promise<void>;\n\n  /**\n   * Creates a PIN, encrypted by the UserKey.\n   */\n  abstract createUserKeyEncryptedPin: (pin: string, userKey: UserKey) => Promise<EncString>;\n\n  /**\n   * Clears the user's PIN, encrypted by the UserKey.\n   */\n  abstract clearUserKeyEncryptedPin(userId: UserId): Promise<void>;\n\n  /**\n   * Gets the old MasterKey, encrypted by the PinKey (formerly called `pinProtected`).\n   * Deprecated and used for migration purposes only.\n   */\n  abstract getOldPinKeyEncryptedMasterKey: (userId: UserId) => Promise<EncryptedString>;\n\n  /**\n   * Clears the old MasterKey, encrypted by the PinKey.\n   */\n  abstract clearOldPinKeyEncryptedMasterKey: (userId: UserId) => Promise<void>;\n\n  /**\n   * Makes a PinKey from the provided PIN.\n   */\n  abstract makePinKey: (pin: string, salt: string, kdfConfig: KdfConfig) => Promise<PinKey>;\n\n  /**\n   * Gets the user's PinLockType {@link PinLockType}.\n   */\n  abstract getPinLockType: (userId: UserId) => Promise<PinLockType>;\n\n  /**\n   * Declares whether or not the user has a PIN set (either persistent or ephemeral).\n   * Note: for ephemeral, this does not check if we actual have an ephemeral PIN-encrypted UserKey stored in memory.\n   * Decryption might not be possible even if this returns true. Use {@link isPinDecryptionAvailable} if decryption is required.\n   */\n  abstract isPinSet: (userId: UserId) => Promise<boolean>;\n\n  /**\n   * Checks if PIN-encrypted keys are stored for the user.\n   * Used for unlock / user verification scenarios where we will need to decrypt the UserKey with the PIN.\n   */\n  abstract isPinDecryptionAvailable: (userId: UserId) => Promise<boolean>;\n\n  /**\n   * Decrypts the UserKey with the provided PIN.\n   *\n   * @remarks - If the user has an old pinKeyEncryptedMasterKey (formerly called `pinProtected`), the UserKey\n   *            will be obtained via the private {@link decryptAndMigrateOldPinKeyEncryptedMasterKey} method.\n   *          - If the user does not have an old pinKeyEncryptedMasterKey, the UserKey will be obtained via the\n   *            private {@link decryptUserKey} method.\n   * @returns UserKey\n   */\n  abstract decryptUserKeyWithPin: (pin: string, userId: UserId) => Promise<UserKey | null>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { AuthRequestPushNotification } from \"@bitwarden/common/models/response/notification.response\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\n\nexport abstract class AuthRequestServiceAbstraction {\n  /** Emits an auth request id when an auth request has been approved. */\n  authRequestPushNotification$: Observable<string>;\n\n  /**\n   * Returns an admin auth request for the given user if it exists.\n   * @param userId The user id.\n   * @throws If `userId` is not provided.\n   */\n  abstract getAdminAuthRequest: (userId: UserId) => Promise<AdminAuthRequestStorable | null>;\n  /**\n   * Sets an admin auth request for the given user.\n   * Note: use {@link clearAdminAuthRequest} to clear the request.\n   * @param authRequest The admin auth request.\n   * @param userId The user id.\n   * @throws If `authRequest` or `userId` is not provided.\n   */\n  abstract setAdminAuthRequest: (\n    authRequest: AdminAuthRequestStorable,\n    userId: UserId,\n  ) => Promise<void>;\n  /**\n   * Clears an admin auth request for the given user.\n   * @param userId The user id.\n   * @throws If `userId` is not provided.\n   */\n  abstract clearAdminAuthRequest: (userId: UserId) => Promise<void>;\n  /**\n   * Approve or deny an auth request.\n   * @param approve True to approve, false to deny.\n   * @param authRequest The auth request to approve or deny, must have an id and key.\n   * @returns The updated auth request, the `requestApproved` field will be true if\n   * approval was successful.\n   * @throws If the auth request is missing an id or key.\n   */\n  abstract approveOrDenyAuthRequest: (\n    approve: boolean,\n    authRequest: AuthRequestResponse,\n  ) => Promise<AuthRequestResponse>;\n  /**\n   * Sets the `UserKey` from an auth request. Auth request must have a `UserKey`.\n   * @param authReqResponse The auth request.\n   * @param authReqPrivateKey The private key corresponding to the public key sent in the auth request.\n   * @param userId The ID of the user for whose account we will set the key.\n   */\n  abstract setUserKeyAfterDecryptingSharedUserKey: (\n    authReqResponse: AuthRequestResponse,\n    authReqPrivateKey: ArrayBuffer,\n    userId: UserId,\n  ) => Promise<void>;\n  /**\n   * Sets the `MasterKey` and `MasterKeyHash` from an auth request. Auth request must have a `MasterKey` and `MasterKeyHash`.\n   * @param authReqResponse The auth request.\n   * @param authReqPrivateKey The private key corresponding to the public key sent in the auth request.\n   * @param userId The ID of the user for whose account we will set the keys.\n   */\n  abstract setKeysAfterDecryptingSharedMasterKeyAndHash: (\n    authReqResponse: AuthRequestResponse,\n    authReqPrivateKey: ArrayBuffer,\n    userId: UserId,\n  ) => Promise<void>;\n  /**\n   * Decrypts a `UserKey` from a public key encrypted `UserKey`.\n   * @param pubKeyEncryptedUserKey The public key encrypted `UserKey`.\n   * @param privateKey The private key corresponding to the public key used to encrypt the `UserKey`.\n   * @returns The decrypted `UserKey`.\n   */\n  abstract decryptPubKeyEncryptedUserKey: (\n    pubKeyEncryptedUserKey: string,\n    privateKey: ArrayBuffer,\n  ) => Promise<UserKey>;\n  /**\n   * Decrypts a `MasterKey` and `MasterKeyHash` from a public key encrypted `MasterKey` and `MasterKeyHash`.\n   * @param pubKeyEncryptedMasterKey The public key encrypted `MasterKey`.\n   * @param pubKeyEncryptedMasterKeyHash The public key encrypted `MasterKeyHash`.\n   * @param privateKey The private key corresponding to the public key used to encrypt the `MasterKey` and `MasterKeyHash`.\n   * @returns The decrypted `MasterKey` and `MasterKeyHash`.\n   */\n  abstract decryptPubKeyEncryptedMasterKeyAndHash: (\n    pubKeyEncryptedMasterKey: string,\n    pubKeyEncryptedMasterKeyHash: string,\n    privateKey: ArrayBuffer,\n  ) => Promise<{ masterKey: MasterKey; masterKeyHash: string }>;\n\n  /**\n   * Handles incoming auth request push notifications.\n   * @param notification push notification.\n   * @remark We should only be receiving approved push notifications to prevent enumeration.\n   */\n  abstract sendAuthRequestPushNotification: (notification: AuthRequestPushNotification) => void;\n\n  /**\n   * Creates a dash-delimited fingerprint for use in confirming the `AuthRequest` between the requesting and approving device.\n   * @param email The email address of the user.\n   * @param publicKey The public key for the user.\n   * @returns The dash-delimited fingerprint phrase.\n   */\n  abstract getFingerprintPhrase(email: string, publicKey: Uint8Array): Promise<string>;\n}\n","/**\n * Abstraction for the LoginApprovalComponent service.\n */\nexport abstract class LoginApprovalComponentServiceAbstraction {\n  /**\n   * Shows a login requested alert if the window is not visible.\n   */\n  abstract showLoginRequestedAlertIfWindowNotVisible: (email?: string) => Promise<void>;\n}\n","import { UserId } from \"@bitwarden/common/types/guid\";\n\nexport abstract class LoginSuccessHandlerService {\n  /**\n   * Runs any service calls required after a successful login.\n   * Service calls that should be included in this method are only those required to be awaited after successful login.\n   * @param userId The user id.\n   */\n  abstract run(userId: UserId): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { PrfKey } from \"@bitwarden/common/types/key\";\n\ndeclare const tag: unique symbol;\n\n/**\n * A set of keys where a `UserKey` is protected by an encrypted public/private key-pair.\n * The `UserKey` is used to encrypt/decrypt data, while the public/private key-pair is\n * used to rotate the `UserKey`.\n *\n * The `PrivateKey` is protected by an `ExternalKey`, such as a `DeviceKey`, or `PrfKey`,\n * and the `PublicKey` is protected by the `UserKey`. This setup allows:\n *\n *   - Access to `UserKey` by knowing the `ExternalKey`\n *   - Rotation to a `NewUserKey` by knowing the current `UserKey`,\n *     without needing access to the `ExternalKey`\n */\nexport class RotateableKeySet<ExternalKey extends SymmetricCryptoKey = SymmetricCryptoKey> {\n  private readonly [tag]: ExternalKey;\n\n  constructor(\n    /** PublicKey encrypted UserKey */\n    readonly encryptedUserKey: EncString,\n\n    /** UserKey encrypted PublicKey */\n    readonly encryptedPublicKey: EncString,\n\n    /** ExternalKey encrypted PrivateKey */\n    readonly encryptedPrivateKey?: EncString,\n  ) {}\n}\n\nexport type PrfKeySet = RotateableKeySet<PrfKey>;\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { WebAuthnLoginAssertionResponseRequest } from \"@bitwarden/common/auth/services/webauthn-login/request/webauthn-login-assertion-response.request\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserKey, MasterKey } from \"@bitwarden/common/types/key\";\n\nexport class PasswordLoginCredentials {\n  readonly type = AuthenticationType.Password;\n\n  constructor(\n    public email: string,\n    public masterPassword: string,\n    // TODO: PM-15162 - captcha is deprecated as part of UI refresh work\n    public captchaToken?: string,\n    public twoFactor?: TokenTwoFactorRequest,\n  ) {}\n}\n\nexport class SsoLoginCredentials {\n  readonly type = AuthenticationType.Sso;\n\n  constructor(\n    public code: string,\n    public codeVerifier: string,\n    public redirectUrl: string,\n    public orgId: string,\n    /**\n     * Optional email address for SSO login.\n     * Used for looking up 2FA token on clients that support remembering 2FA token.\n     */\n    public email?: string,\n    public twoFactor?: TokenTwoFactorRequest,\n  ) {}\n}\n\nexport class UserApiLoginCredentials {\n  readonly type = AuthenticationType.UserApiKey;\n\n  constructor(\n    public clientId: string,\n    public clientSecret: string,\n  ) {}\n}\n\nexport class AuthRequestLoginCredentials {\n  readonly type = AuthenticationType.AuthRequest;\n\n  constructor(\n    public email: string,\n    public accessCode: string,\n    public authRequestId: string,\n    public decryptedUserKey: UserKey,\n    public decryptedMasterKey: MasterKey,\n    public decryptedMasterKeyHash: string,\n    public twoFactor?: TokenTwoFactorRequest,\n  ) {}\n\n  static fromJSON(json: Jsonify<AuthRequestLoginCredentials>) {\n    return Object.assign(\n      new AuthRequestLoginCredentials(\n        json.email,\n        json.accessCode,\n        json.authRequestId,\n        null,\n        null,\n        json.decryptedMasterKeyHash,\n        json.twoFactor\n          ? new TokenTwoFactorRequest(\n              json.twoFactor.provider,\n              json.twoFactor.token,\n              json.twoFactor.remember,\n            )\n          : json.twoFactor,\n      ),\n      {\n        decryptedUserKey: SymmetricCryptoKey.fromJSON(json.decryptedUserKey) as UserKey,\n        decryptedMasterKey: SymmetricCryptoKey.fromJSON(json.decryptedMasterKey) as MasterKey,\n      },\n    );\n  }\n}\n\nexport class WebAuthnLoginCredentials {\n  readonly type = AuthenticationType.WebAuthn;\n\n  constructor(\n    public token: string,\n    public deviceResponse: WebAuthnLoginAssertionResponseRequest,\n    public prfKey?: SymmetricCryptoKey,\n  ) {}\n\n  static fromJSON(json: Jsonify<WebAuthnLoginCredentials>) {\n    return new WebAuthnLoginCredentials(\n      json.token,\n      Object.assign(\n        Object.create(WebAuthnLoginAssertionResponseRequest.prototype),\n        json.deviceResponse,\n      ),\n      SymmetricCryptoKey.fromJSON(json.prfKey),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { KeyConnectorUserDecryptionOptionResponse } from \"@bitwarden/common/auth/models/response/user-decryption-options/key-connector-user-decryption-option.response\";\nimport { TrustedDeviceUserDecryptionOptionResponse } from \"@bitwarden/common/auth/models/response/user-decryption-options/trusted-device-user-decryption-option.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { IdentityTokenResponse } from \"@bitwarden/common/src/auth/models/response/identity-token.response\";\n\n/**\n * Key Connector decryption options. Intended to be sent to the client for use after authentication.\n * @see {@link UserDecryptionOptions}\n */\nexport class KeyConnectorUserDecryptionOption {\n  /** The URL of the key connector configured for this user. */\n  keyConnectorUrl: string;\n\n  /**\n   * Initializes a new instance of the KeyConnectorUserDecryptionOption from a response object.\n   * @param response The key connector user decryption option response object.\n   * @returns A new instance of the KeyConnectorUserDecryptionOption or undefined if `response` is nullish.\n   */\n  static fromResponse(\n    response: KeyConnectorUserDecryptionOptionResponse,\n  ): KeyConnectorUserDecryptionOption | undefined {\n    if (response == null) {\n      return undefined;\n    }\n    const options = new KeyConnectorUserDecryptionOption();\n    options.keyConnectorUrl = response?.keyConnectorUrl ?? null;\n    return options;\n  }\n\n  /**\n   * Initializes a new instance of a KeyConnectorUserDecryptionOption from a JSON object.\n   * @param obj JSON object to deserialize.\n   * @returns A new instance of the KeyConnectorUserDecryptionOption or undefined if `obj` is nullish.\n   */\n  static fromJSON(\n    obj: Jsonify<KeyConnectorUserDecryptionOption>,\n  ): KeyConnectorUserDecryptionOption | undefined {\n    if (obj == null) {\n      return undefined;\n    }\n    return Object.assign(new KeyConnectorUserDecryptionOption(), obj);\n  }\n}\n\n/**\n * Trusted device decryption options. Intended to be sent to the client for use after authentication.\n * @see {@link UserDecryptionOptions}\n */\nexport class TrustedDeviceUserDecryptionOption {\n  /** True if an admin has approved an admin auth request previously made from this device. */\n  hasAdminApproval: boolean;\n  /** True if the user has a device capable of approving an auth request. */\n  hasLoginApprovingDevice: boolean;\n  /** True if the user has manage reset password permission, as these users must be forced to have a master password. */\n  hasManageResetPasswordPermission: boolean;\n  /** True if tde is disabled but user has not set a master password yet. */\n  isTdeOffboarding: boolean;\n\n  /**\n   * Initializes a new instance of the TrustedDeviceUserDecryptionOption from a response object.\n   * @param response The trusted device user decryption option response object.\n   * @returns A new instance of the TrustedDeviceUserDecryptionOption or undefined if `response` is nullish.\n   */\n  static fromResponse(\n    response: TrustedDeviceUserDecryptionOptionResponse,\n  ): TrustedDeviceUserDecryptionOption | undefined {\n    if (response == null) {\n      return undefined;\n    }\n    const options = new TrustedDeviceUserDecryptionOption();\n    options.hasAdminApproval = response?.hasAdminApproval ?? false;\n    options.hasLoginApprovingDevice = response?.hasLoginApprovingDevice ?? false;\n    options.hasManageResetPasswordPermission = response?.hasManageResetPasswordPermission ?? false;\n    options.isTdeOffboarding = response?.isTdeOffboarding ?? false;\n    return options;\n  }\n\n  /**\n   * Initializes a new instance of the TrustedDeviceUserDecryptionOption from a JSON object.\n   * @param obj JSON object to deserialize.\n   * @returns A new instance of the TrustedDeviceUserDecryptionOption or undefined if `obj` is nullish.\n   */\n  static fromJSON(\n    obj: Jsonify<TrustedDeviceUserDecryptionOption>,\n  ): TrustedDeviceUserDecryptionOption | undefined {\n    if (obj == null) {\n      return undefined;\n    }\n    return Object.assign(new TrustedDeviceUserDecryptionOption(), obj);\n  }\n}\n\n/**\n * Represents the decryption options the user has configured on the server. This is intended to be sent\n * to the client on authentication, and can be used to determine how to decrypt the user's vault.\n */\nexport class UserDecryptionOptions {\n  /** True if the user has a master password configured on the server. */\n  hasMasterPassword: boolean;\n  /** {@link TrustedDeviceUserDecryptionOption} */\n  trustedDeviceOption?: TrustedDeviceUserDecryptionOption;\n  /** {@link KeyConnectorUserDecryptionOption} */\n  keyConnectorOption?: KeyConnectorUserDecryptionOption;\n\n  /**\n   * Initializes a new instance of the UserDecryptionOptions from a response object.\n   * @param response user decryption options response object\n   * @returns A new instance of the UserDecryptionOptions.\n   * @throws If the response is nullish, this method will throw an error. User decryption options\n   * are required for client initialization.\n   */\n  // TODO: Change response type to `UserDecryptionOptionsResponse` after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n  static fromResponse(response: IdentityTokenResponse): UserDecryptionOptions {\n    if (response == null) {\n      throw new Error(\"User Decryption Options are required for client initialization.\");\n    }\n\n    const decryptionOptions = new UserDecryptionOptions();\n\n    if (response.userDecryptionOptions) {\n      // If the response has userDecryptionOptions, this means it's on a post-TDE server version and can interrogate\n      // the new decryption options.\n      const responseOptions = response.userDecryptionOptions;\n      decryptionOptions.hasMasterPassword = responseOptions.hasMasterPassword;\n\n      decryptionOptions.trustedDeviceOption = TrustedDeviceUserDecryptionOption.fromResponse(\n        responseOptions.trustedDeviceOption,\n      );\n\n      decryptionOptions.keyConnectorOption = KeyConnectorUserDecryptionOption.fromResponse(\n        responseOptions.keyConnectorOption,\n      );\n    } else {\n      // If the response does not have userDecryptionOptions, this means it's on a pre-TDE server version and so\n      // we must base our decryption options on the presence of the keyConnectorUrl.\n      // Note that the presence of keyConnectorUrl implies that the user does not have a master password, as in pre-TDE\n      // server versions, a master password short-circuited the addition of the keyConnectorUrl to the response.\n      // TODO: remove this check after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n      const usingKeyConnector = response.keyConnectorUrl != null;\n      decryptionOptions.hasMasterPassword = !usingKeyConnector;\n      if (usingKeyConnector) {\n        decryptionOptions.keyConnectorOption = new KeyConnectorUserDecryptionOption();\n        decryptionOptions.keyConnectorOption.keyConnectorUrl = response.keyConnectorUrl;\n      }\n    }\n    return decryptionOptions;\n  }\n\n  /**\n   * Initializes a new instance of the UserDecryptionOptions from a JSON object.\n   * @param obj JSON object to deserialize.\n   * @returns A new instance of the UserDecryptionOptions. Will initialize even if the JSON object is nullish.\n   */\n  static fromJSON(obj: Jsonify<UserDecryptionOptions>): UserDecryptionOptions {\n    const decryptionOptions = Object.assign(new UserDecryptionOptions(), obj);\n\n    decryptionOptions.trustedDeviceOption = TrustedDeviceUserDecryptionOption.fromJSON(\n      obj?.trustedDeviceOption,\n    );\n\n    decryptionOptions.keyConnectorOption = KeyConnectorUserDecryptionOption.fromJSON(\n      obj?.keyConnectorOption,\n    );\n\n    return decryptionOptions;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { MasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { KeyGenerationService } from \"@bitwarden/common/platform/abstractions/key-generation.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { EncString, EncryptedString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport {\n  PIN_DISK,\n  PIN_MEMORY,\n  StateProvider,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, PinKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { KdfConfig, KdfConfigService } from \"@bitwarden/key-management\";\n\nimport { PinServiceAbstraction } from \"../../abstractions/pin.service.abstraction\";\n\n/**\n * - DISABLED   : No PIN set.\n * - PERSISTENT : PIN is set and persists through client reset.\n * - EPHEMERAL  : PIN is set, but does NOT persist through client reset. This means that\n *                after client reset the master password is required to unlock.\n */\nexport type PinLockType = \"DISABLED\" | \"PERSISTENT\" | \"EPHEMERAL\";\n\n/**\n * The persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n *\n * @remarks Persists through a client reset. Used when `requireMasterPasswordOnClientRestart` is disabled.\n * @see SetPinComponent.setPinForm.requireMasterPasswordOnClientRestart\n */\nexport const PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT = new UserKeyDefinition<EncryptedString>(\n  PIN_DISK,\n  \"pinKeyEncryptedUserKeyPersistent\",\n  {\n    deserializer: (jsonValue) => jsonValue,\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * The ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n *\n * @remarks Does NOT persist through a client reset. Used when `requireMasterPasswordOnClientRestart` is enabled.\n * @see SetPinComponent.setPinForm.requireMasterPasswordOnClientRestart\n */\nexport const PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL = new UserKeyDefinition<EncryptedString>(\n  PIN_MEMORY,\n  \"pinKeyEncryptedUserKeyEphemeral\",\n  {\n    deserializer: (jsonValue) => jsonValue,\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * The PIN, encrypted by the UserKey.\n */\nexport const USER_KEY_ENCRYPTED_PIN = new UserKeyDefinition<EncryptedString>(\n  PIN_DISK,\n  \"userKeyEncryptedPin\",\n  {\n    deserializer: (jsonValue) => jsonValue,\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * The old MasterKey, encrypted by the PinKey (formerly called `pinProtected`).\n * Deprecated and used for migration purposes only.\n */\nexport const OLD_PIN_KEY_ENCRYPTED_MASTER_KEY = new UserKeyDefinition<EncryptedString>(\n  PIN_DISK,\n  \"oldPinKeyEncryptedMasterKey\",\n  {\n    deserializer: (jsonValue) => jsonValue,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport class PinService implements PinServiceAbstraction {\n  constructor(\n    private accountService: AccountService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private encryptService: EncryptService,\n    private kdfConfigService: KdfConfigService,\n    private keyGenerationService: KeyGenerationService,\n    private logService: LogService,\n    private masterPasswordService: MasterPasswordServiceAbstraction,\n    private stateProvider: StateProvider,\n    private stateService: StateService,\n  ) {}\n\n  async getPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise<EncString> {\n    this.validateUserId(userId, \"Cannot get pinKeyEncryptedUserKeyPersistent.\");\n\n    return EncString.fromJSON(\n      await firstValueFrom(\n        this.stateProvider.getUserState$(PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, userId),\n      ),\n    );\n  }\n\n  /**\n   * Sets the persistent (stored on disk) version of the UserKey, encrypted by the PinKey.\n   */\n  private async setPinKeyEncryptedUserKeyPersistent(\n    pinKeyEncryptedUserKey: EncString,\n    userId: UserId,\n  ): Promise<void> {\n    this.validateUserId(userId, \"Cannot set pinKeyEncryptedUserKeyPersistent.\");\n\n    if (pinKeyEncryptedUserKey == null) {\n      throw new Error(\n        \"No pinKeyEncryptedUserKey provided. Cannot set pinKeyEncryptedUserKeyPersistent.\",\n      );\n    }\n\n    await this.stateProvider.setUserState(\n      PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT,\n      pinKeyEncryptedUserKey?.encryptedString,\n      userId,\n    );\n  }\n\n  async clearPinKeyEncryptedUserKeyPersistent(userId: UserId): Promise<void> {\n    this.validateUserId(userId, \"Cannot clear pinKeyEncryptedUserKeyPersistent.\");\n\n    await this.stateProvider.setUserState(PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT, null, userId);\n  }\n\n  async getPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise<EncString> {\n    this.validateUserId(userId, \"Cannot get pinKeyEncryptedUserKeyEphemeral.\");\n\n    return EncString.fromJSON(\n      await firstValueFrom(\n        this.stateProvider.getUserState$(PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL, userId),\n      ),\n    );\n  }\n\n  /**\n   * Sets the ephemeral (stored in memory) version of the UserKey, encrypted by the PinKey.\n   */\n  private async setPinKeyEncryptedUserKeyEphemeral(\n    pinKeyEncryptedUserKey: EncString,\n    userId: UserId,\n  ): Promise<void> {\n    this.validateUserId(userId, \"Cannot set pinKeyEncryptedUserKeyEphemeral.\");\n\n    if (pinKeyEncryptedUserKey == null) {\n      throw new Error(\n        \"No pinKeyEncryptedUserKey provided. Cannot set pinKeyEncryptedUserKeyEphemeral.\",\n      );\n    }\n\n    await this.stateProvider.setUserState(\n      PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL,\n      pinKeyEncryptedUserKey?.encryptedString,\n      userId,\n    );\n  }\n\n  async clearPinKeyEncryptedUserKeyEphemeral(userId: UserId): Promise<void> {\n    this.validateUserId(userId, \"Cannot clear pinKeyEncryptedUserKeyEphemeral.\");\n\n    await this.stateProvider.setUserState(PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL, null, userId);\n  }\n\n  async createPinKeyEncryptedUserKey(\n    pin: string,\n    userKey: UserKey,\n    userId: UserId,\n  ): Promise<EncString> {\n    this.validateUserId(userId, \"Cannot create pinKeyEncryptedUserKey.\");\n\n    if (!userKey) {\n      throw new Error(\"No UserKey provided. Cannot create pinKeyEncryptedUserKey.\");\n    }\n\n    const email = await firstValueFrom(\n      this.accountService.accounts$.pipe(map((accounts) => accounts[userId].email)),\n    );\n    const kdfConfig = await this.kdfConfigService.getKdfConfig();\n\n    const pinKey = await this.makePinKey(pin, email, kdfConfig);\n\n    return await this.encryptService.encrypt(userKey.key, pinKey);\n  }\n\n  async storePinKeyEncryptedUserKey(\n    pinKeyEncryptedUserKey: EncString,\n    storeAsEphemeral: boolean,\n    userId: UserId,\n  ): Promise<void> {\n    this.validateUserId(userId, \"Cannot store pinKeyEncryptedUserKey.\");\n\n    if (storeAsEphemeral) {\n      await this.setPinKeyEncryptedUserKeyEphemeral(pinKeyEncryptedUserKey, userId);\n    } else {\n      await this.setPinKeyEncryptedUserKeyPersistent(pinKeyEncryptedUserKey, userId);\n    }\n  }\n\n  async getUserKeyEncryptedPin(userId: UserId): Promise<EncString> {\n    this.validateUserId(userId, \"Cannot get userKeyEncryptedPin.\");\n\n    return EncString.fromJSON(\n      await firstValueFrom(this.stateProvider.getUserState$(USER_KEY_ENCRYPTED_PIN, userId)),\n    );\n  }\n\n  async setUserKeyEncryptedPin(userKeyEncryptedPin: EncString, userId: UserId): Promise<void> {\n    this.validateUserId(userId, \"Cannot set userKeyEncryptedPin.\");\n\n    await this.stateProvider.setUserState(\n      USER_KEY_ENCRYPTED_PIN,\n      userKeyEncryptedPin?.encryptedString,\n      userId,\n    );\n  }\n\n  async clearUserKeyEncryptedPin(userId: UserId): Promise<void> {\n    this.validateUserId(userId, \"Cannot clear userKeyEncryptedPin.\");\n\n    await this.stateProvider.setUserState(USER_KEY_ENCRYPTED_PIN, null, userId);\n  }\n\n  async createUserKeyEncryptedPin(pin: string, userKey: UserKey): Promise<EncString> {\n    if (!userKey) {\n      throw new Error(\"No UserKey provided. Cannot create userKeyEncryptedPin.\");\n    }\n\n    return await this.encryptService.encrypt(pin, userKey);\n  }\n\n  async getOldPinKeyEncryptedMasterKey(userId: UserId): Promise<EncryptedString> {\n    this.validateUserId(userId, \"Cannot get oldPinKeyEncryptedMasterKey.\");\n\n    return await firstValueFrom(\n      this.stateProvider.getUserState$(OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, userId),\n    );\n  }\n\n  async clearOldPinKeyEncryptedMasterKey(userId: UserId): Promise<void> {\n    this.validateUserId(userId, \"Cannot clear oldPinKeyEncryptedMasterKey.\");\n\n    await this.stateProvider.setUserState(OLD_PIN_KEY_ENCRYPTED_MASTER_KEY, null, userId);\n  }\n\n  async makePinKey(pin: string, salt: string, kdfConfig: KdfConfig): Promise<PinKey> {\n    const pinKey = await this.keyGenerationService.deriveKeyFromPassword(pin, salt, kdfConfig);\n    return (await this.keyGenerationService.stretchKey(pinKey)) as PinKey;\n  }\n\n  async getPinLockType(userId: UserId): Promise<PinLockType> {\n    this.validateUserId(userId, \"Cannot get PinLockType.\");\n\n    /**\n     * We can't check the `userKeyEncryptedPin` (formerly called `protectedPin`) for both because old\n     * accounts only used it for MP on Restart\n     */\n    const aUserKeyEncryptedPinIsSet = !!(await this.getUserKeyEncryptedPin(userId));\n    const aPinKeyEncryptedUserKeyPersistentIsSet =\n      !!(await this.getPinKeyEncryptedUserKeyPersistent(userId));\n    const anOldPinKeyEncryptedMasterKeyIsSet =\n      !!(await this.getOldPinKeyEncryptedMasterKey(userId));\n\n    if (aPinKeyEncryptedUserKeyPersistentIsSet || anOldPinKeyEncryptedMasterKeyIsSet) {\n      return \"PERSISTENT\";\n    } else if (\n      aUserKeyEncryptedPinIsSet &&\n      !aPinKeyEncryptedUserKeyPersistentIsSet &&\n      !anOldPinKeyEncryptedMasterKeyIsSet\n    ) {\n      return \"EPHEMERAL\";\n    } else {\n      return \"DISABLED\";\n    }\n  }\n\n  async isPinSet(userId: UserId): Promise<boolean> {\n    this.validateUserId(userId, \"Cannot determine if PIN is set.\");\n\n    return (await this.getPinLockType(userId)) !== \"DISABLED\";\n  }\n\n  async isPinDecryptionAvailable(userId: UserId): Promise<boolean> {\n    this.validateUserId(userId, \"Cannot determine if decryption of user key via PIN is available.\");\n\n    const pinLockType = await this.getPinLockType(userId);\n\n    switch (pinLockType) {\n      case \"DISABLED\":\n        return false;\n      case \"PERSISTENT\":\n        // The above getPinLockType call ensures that we have either a PinKeyEncryptedUserKey or OldPinKeyEncryptedMasterKey set.\n        return true;\n      case \"EPHEMERAL\": {\n        // The above getPinLockType call ensures that we have a UserKeyEncryptedPin set.\n        // However, we must additively check to ensure that we have a set PinKeyEncryptedUserKeyEphemeral b/c otherwise\n        // we cannot take a PIN, derive a PIN key, and decrypt the ephemeral UserKey.\n        const pinKeyEncryptedUserKeyEphemeral =\n          await this.getPinKeyEncryptedUserKeyEphemeral(userId);\n        return Boolean(pinKeyEncryptedUserKeyEphemeral);\n      }\n\n      default: {\n        // Compile-time check for exhaustive switch\n        const _exhaustiveCheck: never = pinLockType;\n        throw new Error(`Unexpected pinLockType: ${_exhaustiveCheck}`);\n      }\n    }\n  }\n\n  async decryptUserKeyWithPin(pin: string, userId: UserId): Promise<UserKey | null> {\n    this.validateUserId(userId, \"Cannot decrypt user key with PIN.\");\n\n    try {\n      const pinLockType = await this.getPinLockType(userId);\n      const requireMasterPasswordOnClientRestart = pinLockType === \"EPHEMERAL\";\n\n      const { pinKeyEncryptedUserKey, oldPinKeyEncryptedMasterKey } =\n        await this.getPinKeyEncryptedKeys(pinLockType, userId);\n\n      const email = await firstValueFrom(\n        this.accountService.accounts$.pipe(map((accounts) => accounts[userId].email)),\n      );\n      const kdfConfig = await this.kdfConfigService.getKdfConfig();\n\n      let userKey: UserKey;\n\n      if (oldPinKeyEncryptedMasterKey) {\n        userKey = await this.decryptAndMigrateOldPinKeyEncryptedMasterKey(\n          userId,\n          pin,\n          email,\n          kdfConfig,\n          requireMasterPasswordOnClientRestart,\n          oldPinKeyEncryptedMasterKey,\n        );\n      } else {\n        userKey = await this.decryptUserKey(userId, pin, email, kdfConfig, pinKeyEncryptedUserKey);\n      }\n\n      if (!userKey) {\n        this.logService.warning(`User key null after pin key decryption.`);\n        return null;\n      }\n\n      if (!(await this.validatePin(userKey, pin, userId))) {\n        this.logService.warning(`Pin key decryption successful but pin validation failed.`);\n        return null;\n      }\n\n      return userKey;\n    } catch (error) {\n      this.logService.error(`Error decrypting user key with pin: ${error}`);\n      return null;\n    }\n  }\n\n  /**\n   * Decrypts the UserKey with the provided PIN.\n   */\n  private async decryptUserKey(\n    userId: UserId,\n    pin: string,\n    salt: string,\n    kdfConfig: KdfConfig,\n    pinKeyEncryptedUserKey?: EncString,\n  ): Promise<UserKey> {\n    this.validateUserId(userId, \"Cannot decrypt user key.\");\n\n    pinKeyEncryptedUserKey ||= await this.getPinKeyEncryptedUserKeyPersistent(userId);\n    pinKeyEncryptedUserKey ||= await this.getPinKeyEncryptedUserKeyEphemeral(userId);\n\n    if (!pinKeyEncryptedUserKey) {\n      throw new Error(\"No pinKeyEncryptedUserKey found.\");\n    }\n\n    const pinKey = await this.makePinKey(pin, salt, kdfConfig);\n    const userKey = await this.encryptService.decryptToBytes(pinKeyEncryptedUserKey, pinKey);\n\n    return new SymmetricCryptoKey(userKey) as UserKey;\n  }\n\n  /**\n   * Creates a new `pinKeyEncryptedUserKey` and clears the `oldPinKeyEncryptedMasterKey`.\n   * @returns UserKey\n   */\n  private async decryptAndMigrateOldPinKeyEncryptedMasterKey(\n    userId: UserId,\n    pin: string,\n    email: string,\n    kdfConfig: KdfConfig,\n    requireMasterPasswordOnClientRestart: boolean,\n    oldPinKeyEncryptedMasterKey: EncString,\n  ): Promise<UserKey> {\n    this.validateUserId(userId, \"Cannot decrypt and migrate oldPinKeyEncryptedMasterKey.\");\n\n    const masterKey = await this.decryptMasterKeyWithPin(\n      userId,\n      pin,\n      email,\n      kdfConfig,\n      oldPinKeyEncryptedMasterKey,\n    );\n\n    const encUserKey = await this.stateService.getEncryptedCryptoSymmetricKey({ userId: userId });\n\n    const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n      masterKey,\n      userId,\n      encUserKey ? new EncString(encUserKey) : undefined,\n    );\n\n    const pinKeyEncryptedUserKey = await this.createPinKeyEncryptedUserKey(pin, userKey, userId);\n    await this.storePinKeyEncryptedUserKey(\n      pinKeyEncryptedUserKey,\n      requireMasterPasswordOnClientRestart,\n      userId,\n    );\n\n    const userKeyEncryptedPin = await this.createUserKeyEncryptedPin(pin, userKey);\n    await this.setUserKeyEncryptedPin(userKeyEncryptedPin, userId);\n\n    await this.clearOldPinKeyEncryptedMasterKey(userId);\n\n    return userKey;\n  }\n\n  // Only for migration purposes\n  private async decryptMasterKeyWithPin(\n    userId: UserId,\n    pin: string,\n    salt: string,\n    kdfConfig: KdfConfig,\n    oldPinKeyEncryptedMasterKey?: EncString,\n  ): Promise<MasterKey> {\n    this.validateUserId(userId, \"Cannot decrypt master key with PIN.\");\n\n    if (!oldPinKeyEncryptedMasterKey) {\n      const oldPinKeyEncryptedMasterKeyString = await this.getOldPinKeyEncryptedMasterKey(userId);\n\n      if (oldPinKeyEncryptedMasterKeyString == null) {\n        throw new Error(\"No oldPinKeyEncrytedMasterKey found.\");\n      }\n\n      oldPinKeyEncryptedMasterKey = new EncString(oldPinKeyEncryptedMasterKeyString);\n    }\n\n    const pinKey = await this.makePinKey(pin, salt, kdfConfig);\n    const masterKey = await this.encryptService.decryptToBytes(oldPinKeyEncryptedMasterKey, pinKey);\n\n    return new SymmetricCryptoKey(masterKey) as MasterKey;\n  }\n\n  /**\n   * Gets the user's `pinKeyEncryptedUserKey` (persistent or ephemeral) and `oldPinKeyEncryptedMasterKey`\n   * (if one exists) based on the user's PinLockType.\n   *\n   * @remarks The `oldPinKeyEncryptedMasterKey` (formerly `pinProtected`) is only used for migration and\n   *          will be null for all migrated accounts.\n   * @throws If PinLockType is 'DISABLED' or if userId is not provided\n   */\n  private async getPinKeyEncryptedKeys(\n    pinLockType: PinLockType,\n    userId: UserId,\n  ): Promise<{ pinKeyEncryptedUserKey: EncString; oldPinKeyEncryptedMasterKey?: EncString }> {\n    this.validateUserId(userId, \"Cannot get PinKey encrypted keys.\");\n\n    switch (pinLockType) {\n      case \"PERSISTENT\": {\n        const pinKeyEncryptedUserKey = await this.getPinKeyEncryptedUserKeyPersistent(userId);\n        const oldPinKeyEncryptedMasterKey = await this.getOldPinKeyEncryptedMasterKey(userId);\n\n        return {\n          pinKeyEncryptedUserKey,\n          oldPinKeyEncryptedMasterKey: oldPinKeyEncryptedMasterKey\n            ? new EncString(oldPinKeyEncryptedMasterKey)\n            : undefined,\n        };\n      }\n      case \"EPHEMERAL\": {\n        const pinKeyEncryptedUserKey = await this.getPinKeyEncryptedUserKeyEphemeral(userId);\n\n        return {\n          pinKeyEncryptedUserKey,\n          oldPinKeyEncryptedMasterKey: undefined, // Going forward, we only migrate non-ephemeral version\n        };\n      }\n      case \"DISABLED\":\n        throw new Error(\"Pin is disabled\");\n      default: {\n        // Compile-time check for exhaustive switch\n        const _exhaustiveCheck: never = pinLockType;\n        return _exhaustiveCheck;\n      }\n    }\n  }\n\n  private async validatePin(userKey: UserKey, pin: string, userId: UserId): Promise<boolean> {\n    this.validateUserId(userId, \"Cannot validate PIN.\");\n\n    const userKeyEncryptedPin = await this.getUserKeyEncryptedPin(userId);\n    const decryptedPin = await this.encryptService.decryptToUtf8(userKeyEncryptedPin, userKey);\n\n    const isPinValid = this.cryptoFunctionService.compareFast(decryptedPin, pin);\n    return isPinValid;\n  }\n\n  /**\n   * Throws a custom error message if user ID is not provided.\n   */\n  private validateUserId(userId: UserId, errorMessage: string = \"\") {\n    if (!userId) {\n      throw new Error(`User ID is required. ${errorMessage}`);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, firstValueFrom, switchMap } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport {\n  GlobalState,\n  KeyDefinition,\n  LOGIN_EMAIL_DISK,\n  LOGIN_EMAIL_MEMORY,\n  StateProvider,\n} from \"../../../../../common/src/platform/state\";\nimport { LoginEmailServiceAbstraction } from \"../../abstractions/login-email.service\";\n\nexport const LOGIN_EMAIL = new KeyDefinition<string>(LOGIN_EMAIL_MEMORY, \"loginEmail\", {\n  deserializer: (value: string) => value,\n});\n\nexport const STORED_EMAIL = new KeyDefinition<string>(LOGIN_EMAIL_DISK, \"storedEmail\", {\n  deserializer: (value: string) => value,\n});\n\nexport class LoginEmailService implements LoginEmailServiceAbstraction {\n  private rememberEmail: boolean;\n\n  // True if an account is currently being added through account switching\n  private readonly addingAccount$: Observable<boolean>;\n\n  private readonly loginEmailState: GlobalState<string>;\n  loginEmail$: Observable<string | null>;\n\n  private readonly storedEmailState: GlobalState<string>;\n  storedEmail$: Observable<string | null>;\n\n  constructor(\n    private accountService: AccountService,\n    private authService: AuthService,\n    private stateProvider: StateProvider,\n  ) {\n    this.loginEmailState = this.stateProvider.getGlobal(LOGIN_EMAIL);\n    this.storedEmailState = this.stateProvider.getGlobal(STORED_EMAIL);\n\n    // In order to determine if an account is being added, we check if any account is not logged out\n    this.addingAccount$ = this.authService.authStatuses$.pipe(\n      switchMap(async (statuses) => {\n        // We don't want to consider the active account since it may have just changed auth status to logged in\n        // which would make this observable think an account is being added\n        const activeUser = await firstValueFrom(this.accountService.activeAccount$);\n        if (activeUser) {\n          delete statuses[activeUser.id];\n        }\n        return Object.values(statuses).some((status) => status !== AuthenticationStatus.LoggedOut);\n      }),\n    );\n\n    this.loginEmail$ = this.loginEmailState.state$;\n\n    this.storedEmail$ = this.storedEmailState.state$.pipe(\n      switchMap(async (storedEmail) => {\n        // When adding an account, we don't show the stored email\n        if (await firstValueFrom(this.addingAccount$)) {\n          return null;\n        }\n        return storedEmail;\n      }),\n    );\n  }\n\n  async setLoginEmail(email: string) {\n    await this.loginEmailState.update((_) => email);\n  }\n\n  getRememberEmail() {\n    return this.rememberEmail;\n  }\n\n  setRememberEmail(value: boolean) {\n    this.rememberEmail = value ?? false;\n  }\n\n  // Note: only clear values on successful login or you are sure they are not needed.\n  // Browser uses these values to maintain the email between login and 2fa components so\n  // we do not want to clear them too early.\n  async clearValues() {\n    await this.setLoginEmail(null);\n    this.rememberEmail = false;\n  }\n\n  async saveEmailSettings() {\n    const addingAccount = await firstValueFrom(this.addingAccount$);\n    const email = await firstValueFrom(this.loginEmail$);\n\n    await this.storedEmailState.update((storedEmail) => {\n      // If we're adding an account, only overwrite the stored email when rememberEmail is true\n      if (addingAccount) {\n        if (this.rememberEmail) {\n          return email;\n        }\n        return storedEmail;\n      }\n\n      // Saving with rememberEmail set to false will clear the stored email\n      if (this.rememberEmail) {\n        return email;\n      }\n      return null;\n    });\n  }\n}\n","export class PreloginRequest {\n  email: string;\n\n  constructor(email: string) {\n    this.email = email;\n  }\n}\n","import { ClientType } from \"../../../../enums\";\nimport { Utils } from \"../../../../platform/misc/utils\";\nimport { CaptchaProtectedRequest } from \"../captcha-protected.request\";\n\nimport { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class PasswordTokenRequest extends TokenRequest implements CaptchaProtectedRequest {\n  constructor(\n    public email: string,\n    public masterPasswordHash: string,\n    public captchaResponse: string,\n    protected twoFactor: TokenTwoFactorRequest,\n    device?: DeviceRequest,\n  ) {\n    super(twoFactor, device);\n  }\n\n  toIdentityToken(clientId: ClientType) {\n    const obj = super.toIdentityToken(clientId);\n\n    obj.grant_type = \"password\";\n    obj.username = this.email;\n    obj.password = this.masterPasswordHash;\n\n    if (this.captchaResponse != null) {\n      obj.captchaResponse = this.captchaResponse;\n    }\n\n    return obj;\n  }\n\n  alterIdentityTokenHeaders(headers: Headers) {\n    headers.set(\"Auth-Email\", Utils.fromUtf8ToUrlB64(this.email));\n  }\n\n  static fromJSON(json: any) {\n    return Object.assign(Object.create(PasswordTokenRequest.prototype), json, {\n      device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n      twoFactor: json.twoFactor\n        ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n        : undefined,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { UserId } from \"../../../types/guid\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { ForceSetPasswordReason } from \"./force-set-password-reason\";\n\nexport class AuthResult {\n  userId: UserId;\n  captchaSiteKey = \"\";\n  // TODO: PM-3287 - Remove this after 3 releases of backwards compatibility. - Target release 2023.12 for removal\n  /**\n   * @deprecated\n   * Replace with using UserDecryptionOptions to determine if the user does\n   * not have a master password and is not using Key Connector.\n   * */\n  resetMasterPassword = false;\n\n  forcePasswordReset: ForceSetPasswordReason = ForceSetPasswordReason.None;\n  twoFactorProviders: Partial<Record<TwoFactorProviderType, Record<string, string>>> = null;\n  ssoEmail2FaSessionToken?: string;\n  email: string;\n  requiresEncryptionKeyMigration: boolean;\n\n  get requiresCaptcha() {\n    return !Utils.isNullOrWhitespace(this.captchaSiteKey);\n  }\n\n  get requiresTwoFactor() {\n    return this.twoFactorProviders != null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BehaviorSubject, filter, firstValueFrom, timeout } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"@bitwarden/common/auth/enums/two-factor-provider-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { DeviceRequest } from \"@bitwarden/common/auth/models/request/identity-token/device.request\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/sso-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { UserApiTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/webauthn-login-token.request\";\nimport { IdentityCaptchaResponse } from \"@bitwarden/common/auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"@bitwarden/common/auth/models/response/identity-two-factor.response\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { KeysRequest } from \"@bitwarden/common/models/request/keys.request\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { Account, AccountProfile } from \"@bitwarden/common/platform/models/domain/account\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  KeyService,\n  Argon2KdfConfig,\n  PBKDF2KdfConfig,\n  KdfConfigService,\n  KdfType,\n} from \"@bitwarden/key-management\";\n\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../abstractions/user-decryption-options.service.abstraction\";\nimport {\n  UserApiLoginCredentials,\n  PasswordLoginCredentials,\n  SsoLoginCredentials,\n  AuthRequestLoginCredentials,\n  WebAuthnLoginCredentials,\n} from \"../models/domain/login-credentials\";\nimport { UserDecryptionOptions } from \"../models/domain/user-decryption-options\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\ntype IdentityResponse = IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse;\n\nexport abstract class LoginStrategyData {\n  tokenRequest:\n    | UserApiTokenRequest\n    | PasswordTokenRequest\n    | SsoTokenRequest\n    | WebAuthnLoginTokenRequest;\n  captchaBypassToken?: string;\n\n  /** User's entered email obtained pre-login. */\n  abstract userEnteredEmail?: string;\n}\n\nexport abstract class LoginStrategy {\n  protected abstract cache: BehaviorSubject<LoginStrategyData>;\n\n  constructor(\n    protected accountService: AccountService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected keyService: KeyService,\n    protected encryptService: EncryptService,\n    protected apiService: ApiService,\n    protected tokenService: TokenService,\n    protected appIdService: AppIdService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected messagingService: MessagingService,\n    protected logService: LogService,\n    protected stateService: StateService,\n    protected twoFactorService: TwoFactorService,\n    protected userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n    protected billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    protected KdfConfigService: KdfConfigService,\n  ) {}\n\n  abstract exportCache(): CacheData;\n\n  abstract logIn(\n    credentials:\n      | UserApiLoginCredentials\n      | PasswordLoginCredentials\n      | SsoLoginCredentials\n      | AuthRequestLoginCredentials\n      | WebAuthnLoginCredentials,\n  ): Promise<AuthResult>;\n\n  async logInTwoFactor(\n    twoFactor: TokenTwoFactorRequest,\n    captchaResponse: string = null,\n  ): Promise<AuthResult> {\n    const data = this.cache.value;\n    data.tokenRequest.setTwoFactor(twoFactor);\n    this.cache.next(data);\n    const [authResult] = await this.startLogIn();\n    return authResult;\n  }\n\n  protected async startLogIn(): Promise<[AuthResult, IdentityResponse]> {\n    await this.twoFactorService.clearSelectedProvider();\n\n    const tokenRequest = this.cache.value.tokenRequest;\n    const response = await this.apiService.postIdentityToken(tokenRequest);\n\n    if (response instanceof IdentityTwoFactorResponse) {\n      return [await this.processTwoFactorResponse(response), response];\n    } else if (response instanceof IdentityCaptchaResponse) {\n      return [await this.processCaptchaResponse(response), response];\n    } else if (response instanceof IdentityTokenResponse) {\n      return [await this.processTokenResponse(response), response];\n    }\n\n    throw new Error(\"Invalid response object.\");\n  }\n\n  protected async buildDeviceRequest() {\n    const appId = await this.appIdService.getAppId();\n    return new DeviceRequest(appId, this.platformUtilsService);\n  }\n\n  /**\n   * Builds the TokenTwoFactorRequest to be used within other login strategies token requests\n   * to the server.\n   * If the user provided a 2FA token in an already created TokenTwoFactorRequest, it will be used.\n   * If not, and the user has previously remembered a 2FA token, it will be used.\n   * If neither of these are true, an empty TokenTwoFactorRequest will be returned.\n   * @param userProvidedTwoFactor - optional - The 2FA token request provided by the caller\n   * @param email - optional - ensure that email is provided for any login strategies that support remember 2FA functionality\n   * @returns a promise which resolves to a TokenTwoFactorRequest to be sent to the server\n   */\n  protected async buildTwoFactor(\n    userProvidedTwoFactor?: TokenTwoFactorRequest,\n    email?: string,\n  ): Promise<TokenTwoFactorRequest> {\n    if (userProvidedTwoFactor != null) {\n      return userProvidedTwoFactor;\n    }\n\n    if (email) {\n      const storedTwoFactorToken = await this.tokenService.getTwoFactorToken(email);\n      if (storedTwoFactorToken != null) {\n        return new TokenTwoFactorRequest(\n          TwoFactorProviderType.Remember,\n          storedTwoFactorToken,\n          false,\n        );\n      }\n    }\n\n    return new TokenTwoFactorRequest();\n  }\n\n  /**\n   * Initializes the account with information from the IdTokenResponse after successful login.\n   * It also sets the access token and refresh token in the token service.\n   *\n   * @param {IdentityTokenResponse} tokenResponse - The response from the server containing the identity token.\n   * @returns {Promise<UserId>} - A promise that resolves the the UserId when the account information has been successfully saved.\n   */\n  protected async saveAccountInformation(tokenResponse: IdentityTokenResponse): Promise<UserId> {\n    const accountInformation = await this.tokenService.decodeAccessToken(tokenResponse.accessToken);\n    const userId = accountInformation.sub as UserId;\n\n    await this.accountService.addAccount(userId, {\n      name: accountInformation.name,\n      email: accountInformation.email,\n      emailVerified: accountInformation.email_verified,\n    });\n\n    await this.accountService.switchAccount(userId);\n\n    await this.stateService.addAccount(\n      new Account({\n        profile: {\n          ...new AccountProfile(),\n          ...{\n            userId,\n            name: accountInformation.name,\n            email: accountInformation.email,\n          },\n        },\n      }),\n    );\n\n    await this.verifyAccountAdded(userId);\n\n    // We must set user decryption options before retrieving vault timeout settings\n    // as the user decryption options help determine the available timeout actions.\n    await this.userDecryptionOptionsService.setUserDecryptionOptions(\n      UserDecryptionOptions.fromResponse(tokenResponse),\n    );\n\n    const vaultTimeoutAction = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n    );\n    const vaultTimeout = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n    );\n\n    // User id will be derived from the access token.\n    await this.tokenService.setTokens(\n      tokenResponse.accessToken,\n      vaultTimeoutAction as VaultTimeoutAction,\n      vaultTimeout,\n      tokenResponse.refreshToken, // Note: CLI login via API key sends undefined for refresh token.\n    );\n\n    await this.KdfConfigService.setKdfConfig(\n      userId as UserId,\n      tokenResponse.kdf === KdfType.PBKDF2_SHA256\n        ? new PBKDF2KdfConfig(tokenResponse.kdfIterations)\n        : new Argon2KdfConfig(\n            tokenResponse.kdfIterations,\n            tokenResponse.kdfMemory,\n            tokenResponse.kdfParallelism,\n          ),\n    );\n\n    await this.billingAccountProfileStateService.setHasPremium(\n      accountInformation.premium,\n      false,\n      userId,\n    );\n    return userId;\n  }\n\n  protected async processTokenResponse(response: IdentityTokenResponse): Promise<AuthResult> {\n    const result = new AuthResult();\n\n    // Old encryption keys must be migrated, but is currently only available on web.\n    // Other clients shouldn't continue the login process.\n    if (this.encryptionKeyMigrationRequired(response)) {\n      result.requiresEncryptionKeyMigration = true;\n      if (this.platformUtilsService.getClientType() !== ClientType.Web) {\n        return result;\n      }\n    }\n\n    result.resetMasterPassword = response.resetMasterPassword;\n\n    // Convert boolean to enum\n    if (response.forcePasswordReset) {\n      result.forcePasswordReset = ForceSetPasswordReason.AdminForcePasswordReset;\n    }\n\n    // Must come before setting keys, user key needs email to update additional keys\n    const userId = await this.saveAccountInformation(response);\n    result.userId = userId;\n\n    if (response.twoFactorToken != null) {\n      // note: we can read email from access token b/c it was saved in saveAccountInformation\n      const userEmail = await this.tokenService.getEmail();\n\n      await this.tokenService.setTwoFactorToken(userEmail, response.twoFactorToken);\n    }\n\n    await this.setMasterKey(response, userId);\n    await this.setUserKey(response, userId);\n    await this.setPrivateKey(response, userId);\n\n    this.messagingService.send(\"loggedIn\");\n\n    return result;\n  }\n\n  // The keys comes from different sources depending on the login strategy\n  protected abstract setMasterKey(response: IdentityTokenResponse, userId: UserId): Promise<void>;\n  protected abstract setUserKey(response: IdentityTokenResponse, userId: UserId): Promise<void>;\n  protected abstract setPrivateKey(response: IdentityTokenResponse, userId: UserId): Promise<void>;\n\n  // Old accounts used master key for encryption. We are forcing migrations but only need to\n  // check on password logins\n  protected encryptionKeyMigrationRequired(response: IdentityTokenResponse): boolean {\n    return false;\n  }\n\n  protected async createKeyPairForOldAccount(userId: UserId) {\n    try {\n      const userKey = await this.keyService.getUserKeyWithLegacySupport(userId);\n      const [publicKey, privateKey] = await this.keyService.makeKeyPair(userKey);\n      await this.apiService.postAccountKeys(new KeysRequest(publicKey, privateKey.encryptedString));\n      return privateKey.encryptedString;\n    } catch (e) {\n      this.logService.error(e);\n    }\n  }\n\n  /**\n   * Handles the response from the server when a 2FA is required.\n   * It clears any existing 2FA token, as it's no longer valid, and sets up the necessary data for the 2FA process.\n   *\n   * @param {IdentityTwoFactorResponse} response - The response from the server indicating that 2FA is required.\n   * @returns {Promise<AuthResult>} - A promise that resolves to an AuthResult object\n   */\n  private async processTwoFactorResponse(response: IdentityTwoFactorResponse): Promise<AuthResult> {\n    // If we get a 2FA required response, then we should clear the 2FA token\n    // just in case as it is no longer valid.\n    await this.clearTwoFactorToken();\n\n    const result = new AuthResult();\n    result.twoFactorProviders = response.twoFactorProviders2;\n\n    await this.twoFactorService.setProviders(response);\n    this.cache.next({ ...this.cache.value, captchaBypassToken: response.captchaToken ?? null });\n    result.ssoEmail2FaSessionToken = response.ssoEmail2faSessionToken;\n    result.email = response.email;\n    return result;\n  }\n\n  /**\n   * Clears the 2FA token from the token service using the user's email if it exists\n   */\n  private async clearTwoFactorToken() {\n    const email = this.cache.value.userEnteredEmail;\n    if (email) {\n      await this.tokenService.clearTwoFactorToken(email);\n    }\n  }\n\n  private async processCaptchaResponse(response: IdentityCaptchaResponse): Promise<AuthResult> {\n    const result = new AuthResult();\n    result.captchaSiteKey = response.siteKey;\n    return result;\n  }\n\n  /**\n   * Verifies that the active account is set after initialization.\n   * Note: In browser there is a slight delay between when active account emits in background,\n   * and when it emits in foreground. We're giving the foreground 1 second to catch up.\n   * If nothing is emitted, we throw an error.\n   */\n  private async verifyAccountAdded(expectedUserId: UserId) {\n    await firstValueFrom(\n      this.accountService.activeAccount$.pipe(\n        filter((account) => account?.id === expectedUserId),\n        timeout({\n          first: 1000,\n          with: () => {\n            throw new Error(\"Expected user never made active user after initialization.\");\n          },\n        }),\n      ),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, Observable, map, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { AuthRequestLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class AuthRequestLoginStrategyData implements LoginStrategyData {\n  tokenRequest: PasswordTokenRequest;\n  captchaBypassToken: string;\n  authRequestCredentials: AuthRequestLoginCredentials;\n\n  static fromJSON(obj: Jsonify<AuthRequestLoginStrategyData>): AuthRequestLoginStrategyData {\n    const data = Object.assign(new AuthRequestLoginStrategyData(), obj, {\n      tokenRequest: PasswordTokenRequest.fromJSON(obj.tokenRequest),\n      authRequestCredentials: AuthRequestLoginCredentials.fromJSON(obj.authRequestCredentials),\n    });\n    return data;\n  }\n}\n\nexport class AuthRequestLoginStrategy extends LoginStrategy {\n  email$: Observable<string>;\n  accessCode$: Observable<string>;\n  authRequestId$: Observable<string>;\n\n  protected cache: BehaviorSubject<AuthRequestLoginStrategyData>;\n\n  constructor(\n    data: AuthRequestLoginStrategyData,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    ...sharedDeps: ConstructorParameters<typeof LoginStrategy>\n  ) {\n    super(...sharedDeps);\n\n    this.cache = new BehaviorSubject(data);\n    this.email$ = this.cache.pipe(map((data) => data.tokenRequest.email));\n    this.accessCode$ = this.cache.pipe(map((data) => data.authRequestCredentials.accessCode));\n    this.authRequestId$ = this.cache.pipe(map((data) => data.authRequestCredentials.authRequestId));\n  }\n\n  override async logIn(credentials: AuthRequestLoginCredentials) {\n    const data = new AuthRequestLoginStrategyData();\n    data.tokenRequest = new PasswordTokenRequest(\n      credentials.email,\n      credentials.accessCode,\n      null,\n      await this.buildTwoFactor(credentials.twoFactor, credentials.email),\n      await this.buildDeviceRequest(),\n    );\n    data.tokenRequest.setAuthRequestAccessCode(credentials.authRequestId);\n    data.authRequestCredentials = credentials;\n    this.cache.next(data);\n\n    const [authResult] = await this.startLogIn();\n    return authResult;\n  }\n\n  override async logInTwoFactor(\n    twoFactor: TokenTwoFactorRequest,\n    captchaResponse: string,\n  ): Promise<AuthResult> {\n    const data = this.cache.value;\n    data.tokenRequest.captchaResponse = captchaResponse ?? data.captchaBypassToken;\n    this.cache.next(data);\n\n    return super.logInTwoFactor(twoFactor);\n  }\n\n  protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n    const authRequestCredentials = this.cache.value.authRequestCredentials;\n    if (\n      authRequestCredentials.decryptedMasterKey &&\n      authRequestCredentials.decryptedMasterKeyHash\n    ) {\n      await this.masterPasswordService.setMasterKey(\n        authRequestCredentials.decryptedMasterKey,\n        userId,\n      );\n      await this.masterPasswordService.setMasterKeyHash(\n        authRequestCredentials.decryptedMasterKeyHash,\n        userId,\n      );\n    }\n  }\n\n  protected override async setUserKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    const authRequestCredentials = this.cache.value.authRequestCredentials;\n    // User now may or may not have a master password\n    // but set the master key encrypted user key if it exists regardless\n    await this.keyService.setMasterKeyEncryptedUserKey(response.key, userId);\n\n    if (authRequestCredentials.decryptedUserKey) {\n      await this.keyService.setUserKey(authRequestCredentials.decryptedUserKey, userId);\n    } else {\n      await this.trySetUserKeyWithMasterKey(userId);\n\n      // Establish trust if required after setting user key\n      await this.deviceTrustService.trustDeviceIfRequired(userId);\n    }\n  }\n\n  private async trySetUserKeyWithMasterKey(userId: UserId): Promise<void> {\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    if (masterKey) {\n      const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n        masterKey,\n        userId,\n      );\n      await this.keyService.setUserKey(userKey, userId);\n    }\n  }\n\n  protected override async setPrivateKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    await this.keyService.setPrivateKey(\n      response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n      userId,\n    );\n  }\n\n  exportCache(): CacheData {\n    return {\n      authRequest: this.cache.value,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BehaviorSubject, firstValueFrom, map, Observable } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { PasswordTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/password-token.request\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { IdentityCaptchaResponse } from \"@bitwarden/common/auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"@bitwarden/common/auth/models/response/identity-two-factor.response\";\nimport { HashPurpose } from \"@bitwarden/common/platform/enums\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\n\nimport { LoginStrategyServiceAbstraction } from \"../abstractions\";\nimport { PasswordLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class PasswordLoginStrategyData implements LoginStrategyData {\n  tokenRequest: PasswordTokenRequest;\n\n  /** User's entered email obtained pre-login. Always present in MP login. */\n  userEnteredEmail: string;\n  /** If 2fa is required, token is returned to bypass captcha */\n  captchaBypassToken?: string;\n  /** The local version of the user's master key hash */\n  localMasterKeyHash: string;\n  /** The user's master key */\n  masterKey: MasterKey;\n  /**\n   * Tracks if the user needs to update their password due to\n   * a password that does not meet an organization's master password policy.\n   */\n  forcePasswordResetReason: ForceSetPasswordReason = ForceSetPasswordReason.None;\n\n  static fromJSON(obj: Jsonify<PasswordLoginStrategyData>): PasswordLoginStrategyData {\n    const data = Object.assign(new PasswordLoginStrategyData(), obj, {\n      tokenRequest: PasswordTokenRequest.fromJSON(obj.tokenRequest),\n      masterKey: SymmetricCryptoKey.fromJSON(obj.masterKey),\n    });\n    return data;\n  }\n}\n\nexport class PasswordLoginStrategy extends LoginStrategy {\n  /** The email address of the user attempting to log in. */\n  email$: Observable<string>;\n  /** The master key hash used for authentication */\n  serverMasterKeyHash$: Observable<string>;\n  /** The local master key hash we store client side */\n  localMasterKeyHash$: Observable<string | null>;\n\n  protected cache: BehaviorSubject<PasswordLoginStrategyData>;\n\n  constructor(\n    data: PasswordLoginStrategyData,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n    private policyService: PolicyService,\n    private loginStrategyService: LoginStrategyServiceAbstraction,\n    ...sharedDeps: ConstructorParameters<typeof LoginStrategy>\n  ) {\n    super(...sharedDeps);\n\n    this.cache = new BehaviorSubject(data);\n    this.email$ = this.cache.pipe(map((state) => state.tokenRequest.email));\n    this.serverMasterKeyHash$ = this.cache.pipe(\n      map((state) => state.tokenRequest.masterPasswordHash),\n    );\n    this.localMasterKeyHash$ = this.cache.pipe(map((state) => state.localMasterKeyHash));\n  }\n\n  override async logIn(credentials: PasswordLoginCredentials) {\n    const { email, masterPassword, captchaToken, twoFactor } = credentials;\n\n    const data = new PasswordLoginStrategyData();\n    data.masterKey = await this.loginStrategyService.makePreloginKey(masterPassword, email);\n    data.userEnteredEmail = email;\n\n    // Hash the password early (before authentication) so we don't persist it in memory in plaintext\n    data.localMasterKeyHash = await this.keyService.hashMasterKey(\n      masterPassword,\n      data.masterKey,\n      HashPurpose.LocalAuthorization,\n    );\n    const serverMasterKeyHash = await this.keyService.hashMasterKey(masterPassword, data.masterKey);\n\n    data.tokenRequest = new PasswordTokenRequest(\n      email,\n      serverMasterKeyHash,\n      captchaToken,\n      await this.buildTwoFactor(twoFactor, email),\n      await this.buildDeviceRequest(),\n    );\n\n    this.cache.next(data);\n\n    const [authResult, identityResponse] = await this.startLogIn();\n\n    if (identityResponse instanceof IdentityCaptchaResponse) {\n      return authResult;\n    }\n\n    const masterPasswordPolicyOptions =\n      this.getMasterPasswordPolicyOptionsFromResponse(identityResponse);\n\n    // The identity result can contain master password policies for the user's organizations\n    if (masterPasswordPolicyOptions?.enforceOnLogin) {\n      // If there is a policy active, evaluate the supplied password before its no longer in memory\n      const meetsRequirements = this.evaluateMasterPassword(\n        credentials,\n        masterPasswordPolicyOptions,\n      );\n      if (meetsRequirements) {\n        return authResult;\n      }\n\n      if (identityResponse instanceof IdentityTwoFactorResponse) {\n        // Save the flag to this strategy for use in 2fa login as the master password is about to pass out of scope\n        this.cache.next({\n          ...this.cache.value,\n          forcePasswordResetReason: ForceSetPasswordReason.WeakMasterPassword,\n        });\n      } else {\n        // Authentication was successful, save the force update password options with the state service\n        await this.masterPasswordService.setForceSetPasswordReason(\n          ForceSetPasswordReason.WeakMasterPassword,\n          authResult.userId, // userId is only available on successful login\n        );\n        authResult.forcePasswordReset = ForceSetPasswordReason.WeakMasterPassword;\n      }\n    }\n    return authResult;\n  }\n\n  override async logInTwoFactor(\n    twoFactor: TokenTwoFactorRequest,\n    captchaResponse: string,\n  ): Promise<AuthResult> {\n    const data = this.cache.value;\n    data.tokenRequest.captchaResponse = captchaResponse ?? data.captchaBypassToken;\n    this.cache.next(data);\n\n    const result = await super.logInTwoFactor(twoFactor);\n\n    // 2FA was successful, save the force update password options with the state service if defined\n    const forcePasswordResetReason = this.cache.value.forcePasswordResetReason;\n    if (\n      !result.requiresTwoFactor &&\n      !result.requiresCaptcha &&\n      forcePasswordResetReason != ForceSetPasswordReason.None\n    ) {\n      await this.masterPasswordService.setForceSetPasswordReason(\n        forcePasswordResetReason,\n        result.userId,\n      );\n      result.forcePasswordReset = forcePasswordResetReason;\n    }\n\n    return result;\n  }\n\n  protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n    const { masterKey, localMasterKeyHash } = this.cache.value;\n    await this.masterPasswordService.setMasterKey(masterKey, userId);\n    await this.masterPasswordService.setMasterKeyHash(localMasterKeyHash, userId);\n  }\n\n  protected override async setUserKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    // If migration is required, we won't have a user key to set yet.\n    if (this.encryptionKeyMigrationRequired(response)) {\n      return;\n    }\n    await this.keyService.setMasterKeyEncryptedUserKey(response.key, userId);\n\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    if (masterKey) {\n      const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n        masterKey,\n        userId,\n      );\n      await this.keyService.setUserKey(userKey, userId);\n    }\n  }\n\n  protected override async setPrivateKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    await this.keyService.setPrivateKey(\n      response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n      userId,\n    );\n  }\n\n  protected override encryptionKeyMigrationRequired(response: IdentityTokenResponse): boolean {\n    return !response.key;\n  }\n\n  private getMasterPasswordPolicyOptionsFromResponse(\n    response: IdentityTokenResponse | IdentityTwoFactorResponse,\n  ): MasterPasswordPolicyOptions {\n    if (response == null) {\n      return null;\n    }\n    return MasterPasswordPolicyOptions.fromResponse(response.masterPasswordPolicy);\n  }\n\n  private evaluateMasterPassword(\n    { masterPassword, email }: PasswordLoginCredentials,\n    options: MasterPasswordPolicyOptions,\n  ): boolean {\n    const passwordStrength = this.passwordStrengthService.getPasswordStrength(\n      masterPassword,\n      email,\n    )?.score;\n\n    return this.policyService.evaluateMasterPassword(passwordStrength, masterPassword, options);\n  }\n\n  exportCache(): CacheData {\n    return {\n      password: this.cache.value,\n    };\n  }\n}\n","import { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class SsoTokenRequest extends TokenRequest {\n  constructor(\n    public code: string,\n    public codeVerifier: string,\n    public redirectUri: string,\n    protected twoFactor: TokenTwoFactorRequest,\n    device?: DeviceRequest,\n  ) {\n    super(twoFactor, device);\n  }\n\n  toIdentityToken(clientId: string) {\n    const obj = super.toIdentityToken(clientId);\n\n    obj.grant_type = \"authorization_code\";\n    obj.code = this.code;\n    obj.code_verifier = this.codeVerifier;\n    obj.redirect_uri = this.redirectUri;\n\n    return obj;\n  }\n\n  static fromJSON(json: any) {\n    return Object.assign(Object.create(SsoTokenRequest.prototype), json, {\n      device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n      twoFactor: json.twoFactor\n        ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n        : undefined,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, Observable, map, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport { SsoTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/sso-token.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { HttpStatusCode } from \"@bitwarden/common/enums\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { AuthRequestServiceAbstraction } from \"../abstractions\";\nimport { SsoLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategyData, LoginStrategy } from \"./login.strategy\";\n\nexport class SsoLoginStrategyData implements LoginStrategyData {\n  captchaBypassToken: string;\n  tokenRequest: SsoTokenRequest;\n  /**\n   * User's entered email obtained pre-login. Present in most SSO flows, but not CLI + SSO Flow.\n   */\n  userEnteredEmail?: string;\n  /**\n   * User email address. Only available after authentication.\n   */\n  email?: string;\n  /**\n   * The organization ID that the user is logging into. Used for Key Connector\n   * purposes after authentication.\n   */\n  orgId: string;\n  /**\n   * A token provided by the server as an authentication factor for sending\n   * email OTPs to the user's configured 2FA email address. This is required\n   * as we don't have a master password hash or other verifiable secret when using SSO.\n   */\n  ssoEmail2FaSessionToken?: string;\n\n  static fromJSON(obj: Jsonify<SsoLoginStrategyData>): SsoLoginStrategyData {\n    return Object.assign(new SsoLoginStrategyData(), obj, {\n      tokenRequest: SsoTokenRequest.fromJSON(obj.tokenRequest),\n    });\n  }\n}\n\nexport class SsoLoginStrategy extends LoginStrategy {\n  /**\n   * @see {@link SsoLoginStrategyData.email}\n   */\n  email$: Observable<string | null>;\n  /**\n   * @see {@link SsoLoginStrategyData.orgId}\n   */\n  orgId$: Observable<string>;\n  /**\n   * @see {@link SsoLoginStrategyData.ssoEmail2FaSessionToken}\n   */\n  ssoEmail2FaSessionToken$: Observable<string | null>;\n\n  protected cache: BehaviorSubject<SsoLoginStrategyData>;\n\n  constructor(\n    data: SsoLoginStrategyData,\n    private keyConnectorService: KeyConnectorService,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private authRequestService: AuthRequestServiceAbstraction,\n    private i18nService: I18nService,\n    ...sharedDeps: ConstructorParameters<typeof LoginStrategy>\n  ) {\n    super(...sharedDeps);\n\n    this.cache = new BehaviorSubject(data);\n    this.email$ = this.cache.pipe(map((state) => state.email));\n    this.orgId$ = this.cache.pipe(map((state) => state.orgId));\n    this.ssoEmail2FaSessionToken$ = this.cache.pipe(map((state) => state.ssoEmail2FaSessionToken));\n  }\n\n  async logIn(credentials: SsoLoginCredentials): Promise<AuthResult> {\n    const data = new SsoLoginStrategyData();\n    data.orgId = credentials.orgId;\n\n    data.userEnteredEmail = credentials.email;\n\n    const deviceRequest = await this.buildDeviceRequest();\n\n    this.logService.info(\"Logging in with appId %s.\", deviceRequest.identifier);\n\n    data.tokenRequest = new SsoTokenRequest(\n      credentials.code,\n      credentials.codeVerifier,\n      credentials.redirectUrl,\n      await this.buildTwoFactor(credentials.twoFactor, credentials.email),\n      deviceRequest,\n    );\n\n    this.cache.next(data);\n\n    const [ssoAuthResult] = await this.startLogIn();\n\n    const email = ssoAuthResult.email;\n    const ssoEmail2FaSessionToken = ssoAuthResult.ssoEmail2FaSessionToken;\n\n    // Auth guard currently handles redirects for this.\n    if (ssoAuthResult.forcePasswordReset == ForceSetPasswordReason.AdminForcePasswordReset) {\n      await this.masterPasswordService.setForceSetPasswordReason(\n        ssoAuthResult.forcePasswordReset,\n        ssoAuthResult.userId,\n      );\n    }\n\n    this.cache.next({\n      ...this.cache.value,\n      email,\n      ssoEmail2FaSessionToken,\n    });\n\n    return ssoAuthResult;\n  }\n\n  protected override async setMasterKey(tokenResponse: IdentityTokenResponse, userId: UserId) {\n    // The only way we can be setting a master key at this point is if we are using Key Connector.\n    // First, check to make sure that we should do so based on the token response.\n    if (this.shouldSetMasterKeyFromKeyConnector(tokenResponse)) {\n      // If we're here, we know that the user should use Key Connector (they have a KeyConnectorUrl) and does not have a master password.\n      // We can now check the key on the token response to see whether they are a brand new user or an existing user.\n      // The presence of a masterKeyEncryptedUserKey indicates that the user has already been provisioned in Key Connector.\n      const newSsoUser = tokenResponse.key == null;\n      if (newSsoUser) {\n        await this.keyConnectorService.convertNewSsoUserToKeyConnector(\n          tokenResponse,\n          this.cache.value.orgId,\n          userId,\n        );\n      } else {\n        const keyConnectorUrl = this.getKeyConnectorUrl(tokenResponse);\n        await this.keyConnectorService.setMasterKeyFromUrl(keyConnectorUrl, userId);\n      }\n    }\n  }\n\n  /**\n   * Determines if it is possible set the `masterKey` from Key Connector.\n   * @param tokenResponse\n   * @returns `true` if the master key can be set from Key Connector, `false` otherwise\n   */\n  private shouldSetMasterKeyFromKeyConnector(tokenResponse: IdentityTokenResponse): boolean {\n    const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n\n    if (userDecryptionOptions != null) {\n      const userHasMasterPassword = userDecryptionOptions.hasMasterPassword;\n      const userHasKeyConnectorUrl =\n        userDecryptionOptions.keyConnectorOption?.keyConnectorUrl != null;\n\n      // In order for us to set the master key from Key Connector, we need to have a Key Connector URL\n      // and the user must not have a master password.\n      return userHasKeyConnectorUrl && !userHasMasterPassword;\n    } else {\n      // In pre-TDE versions of the server, the userDecryptionOptions will not be present.\n      // In this case, we can determine if the user has a master password and has a Key Connector URL by\n      // just checking the keyConnectorUrl property. This is because the server short-circuits on the response\n      // and will not pass back the URL in the response if the user has a master password.\n      // TODO: remove compatibility check after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n      return tokenResponse.keyConnectorUrl != null;\n    }\n  }\n\n  private getKeyConnectorUrl(tokenResponse: IdentityTokenResponse): string {\n    // TODO: remove tokenResponse.keyConnectorUrl reference after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3537)\n    const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n    return (\n      tokenResponse.keyConnectorUrl ?? userDecryptionOptions?.keyConnectorOption?.keyConnectorUrl\n    );\n  }\n\n  // TODO: future passkey login strategy will need to support setting user key (decrypting via TDE or admin approval request)\n  // so might be worth moving this logic to a common place (base login strategy or a separate service?)\n  protected override async setUserKey(\n    tokenResponse: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    const masterKeyEncryptedUserKey = tokenResponse.key;\n\n    // Note: masterKeyEncryptedUserKey is undefined for SSO JIT provisioned users\n    // on account creation and subsequent logins (confirmed or unconfirmed)\n    // but that is fine for TDE so we cannot return if it is undefined\n\n    if (masterKeyEncryptedUserKey) {\n      // set the master key encrypted user key if it exists\n      await this.keyService.setMasterKeyEncryptedUserKey(masterKeyEncryptedUserKey, userId);\n    }\n\n    const userDecryptionOptions = tokenResponse?.userDecryptionOptions;\n\n    // Note: TDE and key connector are mutually exclusive\n    if (userDecryptionOptions?.trustedDeviceOption) {\n      this.logService.info(\"Attempting to set user key with approved admin auth request.\");\n\n      // Try to use the user key from an approved admin request if it exists.\n      // Using it will clear it from state and future requests will use the device key.\n      await this.trySetUserKeyWithApprovedAdminRequestIfExists(userId);\n\n      const hasUserKey = await this.keyService.hasUserKey(userId);\n\n      // Only try to set user key with device key if admin approval request was not successful.\n      if (!hasUserKey) {\n        this.logService.info(\"Attempting to set user key with device key.\");\n\n        await this.trySetUserKeyWithDeviceKey(tokenResponse, userId);\n      }\n    } else if (\n      masterKeyEncryptedUserKey != null &&\n      this.getKeyConnectorUrl(tokenResponse) != null\n    ) {\n      // Key connector enabled for user\n      await this.trySetUserKeyWithMasterKey(userId);\n    }\n\n    // Note: In the traditional SSO flow with MP without key connector, the lock component\n    // is responsible for deriving master key from MP entry and then decrypting the user key\n  }\n\n  private async trySetUserKeyWithApprovedAdminRequestIfExists(userId: UserId): Promise<void> {\n    // At this point a user could have an admin auth request that has been approved\n    const adminAuthReqStorable = await this.authRequestService.getAdminAuthRequest(userId);\n\n    if (!adminAuthReqStorable) {\n      return;\n    }\n\n    // Call server to see if admin auth request has been approved\n    let adminAuthReqResponse: AuthRequestResponse;\n\n    try {\n      adminAuthReqResponse = await this.apiService.getAuthRequest(adminAuthReqStorable.id);\n    } catch (error) {\n      if (error instanceof ErrorResponse && error.statusCode === HttpStatusCode.NotFound) {\n        // if we get a 404, it means the auth request has been deleted so clear it from storage\n        await this.authRequestService.clearAdminAuthRequest(userId);\n      }\n\n      // Always return on an error here as we don't want to block the user from logging in\n      return;\n    }\n\n    if (adminAuthReqResponse?.requestApproved) {\n      // if masterPasswordHash has a value, we will always receive authReqResponse.key\n      // as authRequestPublicKey(masterKey) + authRequestPublicKey(masterPasswordHash)\n      if (adminAuthReqResponse.masterPasswordHash) {\n        await this.authRequestService.setKeysAfterDecryptingSharedMasterKeyAndHash(\n          adminAuthReqResponse,\n          adminAuthReqStorable.privateKey,\n          userId,\n        );\n      } else {\n        // if masterPasswordHash is null, we will always receive authReqResponse.key\n        // as authRequestPublicKey(userKey)\n        await this.authRequestService.setUserKeyAfterDecryptingSharedUserKey(\n          adminAuthReqResponse,\n          adminAuthReqStorable.privateKey,\n          userId,\n        );\n      }\n\n      if (await this.keyService.hasUserKey()) {\n        // Now that we have a decrypted user key in memory, we can check if we\n        // need to establish trust on the current device\n        await this.deviceTrustService.trustDeviceIfRequired(userId);\n\n        // if we successfully decrypted the user key, we can delete the admin auth request out of state\n        // TODO: eventually we post and clean up DB as well once consumed on client\n        await this.authRequestService.clearAdminAuthRequest(userId);\n\n        this.platformUtilsService.showToast(\"success\", null, this.i18nService.t(\"loginApproved\"));\n      }\n    }\n  }\n\n  private async trySetUserKeyWithDeviceKey(\n    tokenResponse: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    const trustedDeviceOption = tokenResponse.userDecryptionOptions?.trustedDeviceOption;\n\n    if (!trustedDeviceOption) {\n      this.logService.error(\"Unable to set user key due to missing trustedDeviceOption.\");\n      return;\n    }\n\n    const deviceKey = await this.deviceTrustService.getDeviceKey(userId);\n    const encDevicePrivateKey = trustedDeviceOption?.encryptedPrivateKey;\n    const encUserKey = trustedDeviceOption?.encryptedUserKey;\n\n    if (!deviceKey || !encDevicePrivateKey || !encUserKey) {\n      if (!deviceKey) {\n        this.logService.warning(\"Unable to set user key due to missing device key.\");\n      } else if (!encDevicePrivateKey || !encUserKey) {\n        // Tell the server that we have a device key, but received no decryption keys\n        await this.deviceTrustService.recordDeviceTrustLoss();\n      }\n      if (!encDevicePrivateKey) {\n        this.logService.warning(\n          \"Unable to set user key due to missing encrypted device private key.\",\n        );\n      }\n      if (!encUserKey) {\n        this.logService.warning(\"Unable to set user key due to missing encrypted user key.\");\n      }\n\n      return;\n    }\n\n    const userKey = await this.deviceTrustService.decryptUserKeyWithDeviceKey(\n      userId,\n      encDevicePrivateKey,\n      encUserKey,\n      deviceKey,\n    );\n\n    if (userKey) {\n      await this.keyService.setUserKey(userKey, userId);\n    }\n  }\n\n  private async trySetUserKeyWithMasterKey(userId: UserId): Promise<void> {\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n\n    // There is a scenario in which the master key is not set here. That will occur if the user\n    // has a master password and is using Key Connector. In that case, we cannot set the master key\n    // because the user hasn't entered their master password yet.\n    // Instead, we'll return here and let the migration to Key Connector handle setting the master key.\n    if (!masterKey) {\n      return;\n    }\n\n    const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey, userId);\n    await this.keyService.setUserKey(userKey, userId);\n  }\n\n  protected override async setPrivateKey(\n    tokenResponse: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    const newSsoUser = tokenResponse.key == null;\n\n    if (!newSsoUser) {\n      await this.keyService.setPrivateKey(\n        tokenResponse.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n        userId,\n      );\n    }\n  }\n\n  exportCache(): CacheData {\n    return {\n      sso: this.cache.value,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { UserApiTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/user-api-token.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { VaultTimeoutAction } from \"@bitwarden/common/enums/vault-timeout-action.enum\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { UserApiLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class UserApiLoginStrategyData implements LoginStrategyData {\n  tokenRequest: UserApiTokenRequest;\n  captchaBypassToken: string;\n\n  static fromJSON(obj: Jsonify<UserApiLoginStrategyData>): UserApiLoginStrategyData {\n    return Object.assign(new UserApiLoginStrategyData(), obj, {\n      tokenRequest: UserApiTokenRequest.fromJSON(obj.tokenRequest),\n    });\n  }\n}\n\nexport class UserApiLoginStrategy extends LoginStrategy {\n  protected cache: BehaviorSubject<UserApiLoginStrategyData>;\n\n  constructor(\n    data: UserApiLoginStrategyData,\n    private environmentService: EnvironmentService,\n    private keyConnectorService: KeyConnectorService,\n    ...sharedDeps: ConstructorParameters<typeof LoginStrategy>\n  ) {\n    super(...sharedDeps);\n\n    this.cache = new BehaviorSubject(data);\n  }\n\n  override async logIn(credentials: UserApiLoginCredentials) {\n    const data = new UserApiLoginStrategyData();\n    data.tokenRequest = new UserApiTokenRequest(\n      credentials.clientId,\n      credentials.clientSecret,\n      await this.buildTwoFactor(),\n      await this.buildDeviceRequest(),\n    );\n    this.cache.next(data);\n\n    const [authResult] = await this.startLogIn();\n    return authResult;\n  }\n\n  protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n    if (response.apiUseKeyConnector) {\n      const env = await firstValueFrom(this.environmentService.environment$);\n      const keyConnectorUrl = env.getKeyConnectorUrl();\n      await this.keyConnectorService.setMasterKeyFromUrl(keyConnectorUrl, userId);\n    }\n  }\n\n  protected override async setUserKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    await this.keyService.setMasterKeyEncryptedUserKey(response.key, userId);\n\n    if (response.apiUseKeyConnector) {\n      const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n      if (masterKey) {\n        const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n          masterKey,\n          userId,\n        );\n        await this.keyService.setUserKey(userKey, userId);\n      }\n    }\n  }\n\n  protected override async setPrivateKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    await this.keyService.setPrivateKey(\n      response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n      userId,\n    );\n  }\n\n  // Overridden to save client ID and secret to token service\n  protected async saveAccountInformation(tokenResponse: IdentityTokenResponse): Promise<UserId> {\n    const userId = await super.saveAccountInformation(tokenResponse);\n\n    const vaultTimeoutAction = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutActionByUserId$(userId),\n    );\n    const vaultTimeout = await firstValueFrom(\n      this.vaultTimeoutSettingsService.getVaultTimeoutByUserId$(userId),\n    );\n\n    const tokenRequest = this.cache.value.tokenRequest;\n\n    await this.tokenService.setClientId(\n      tokenRequest.clientId,\n      vaultTimeoutAction as VaultTimeoutAction,\n      vaultTimeout,\n    );\n    await this.tokenService.setClientSecret(\n      tokenRequest.clientSecret,\n      vaultTimeoutAction as VaultTimeoutAction,\n      vaultTimeout,\n    );\n    return userId;\n  }\n\n  exportCache(): CacheData {\n    return {\n      userApiKey: this.cache.value,\n    };\n  }\n}\n","import { WebAuthnLoginAssertionResponseRequest } from \"../../../services/webauthn-login/request/webauthn-login-assertion-response.request\";\n\nimport { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class WebAuthnLoginTokenRequest extends TokenRequest {\n  constructor(\n    public token: string,\n    public deviceResponse: WebAuthnLoginAssertionResponseRequest,\n    device?: DeviceRequest,\n  ) {\n    super(undefined, device);\n  }\n\n  toIdentityToken(clientId: string) {\n    const obj = super.toIdentityToken(clientId);\n\n    obj.grant_type = \"webauthn\";\n    obj.token = this.token;\n    // must be a string b/c sending as form encoded data\n    obj.deviceResponse = JSON.stringify(this.deviceResponse);\n\n    return obj;\n  }\n\n  static fromJSON(json: any) {\n    return Object.assign(Object.create(WebAuthnLoginTokenRequest.prototype), json, {\n      deviceResponse: WebAuthnLoginAssertionResponseRequest.fromJSON(json.deviceResponse),\n      device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n      twoFactor: json.twoFactor\n        ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n        : undefined,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BehaviorSubject } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { WebAuthnLoginTokenRequest } from \"@bitwarden/common/auth/models/request/identity-token/webauthn-login-token.request\";\nimport { IdentityTokenResponse } from \"@bitwarden/common/auth/models/response/identity-token.response\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\n\nimport { WebAuthnLoginCredentials } from \"../models/domain/login-credentials\";\nimport { CacheData } from \"../services/login-strategies/login-strategy.state\";\n\nimport { LoginStrategy, LoginStrategyData } from \"./login.strategy\";\n\nexport class WebAuthnLoginStrategyData implements LoginStrategyData {\n  tokenRequest: WebAuthnLoginTokenRequest;\n  captchaBypassToken?: string;\n  credentials: WebAuthnLoginCredentials;\n\n  static fromJSON(obj: Jsonify<WebAuthnLoginStrategyData>): WebAuthnLoginStrategyData {\n    return Object.assign(new WebAuthnLoginStrategyData(), obj, {\n      tokenRequest: WebAuthnLoginTokenRequest.fromJSON(obj.tokenRequest),\n      credentials: WebAuthnLoginCredentials.fromJSON(obj.credentials),\n    });\n  }\n}\n\nexport class WebAuthnLoginStrategy extends LoginStrategy {\n  protected cache: BehaviorSubject<WebAuthnLoginStrategyData>;\n\n  constructor(\n    data: WebAuthnLoginStrategyData,\n    ...sharedDeps: ConstructorParameters<typeof LoginStrategy>\n  ) {\n    super(...sharedDeps);\n\n    this.cache = new BehaviorSubject(data);\n  }\n\n  async logIn(credentials: WebAuthnLoginCredentials) {\n    const data = new WebAuthnLoginStrategyData();\n    data.credentials = credentials;\n    data.tokenRequest = new WebAuthnLoginTokenRequest(\n      credentials.token,\n      credentials.deviceResponse,\n      await this.buildDeviceRequest(),\n    );\n    this.cache.next(data);\n\n    const [authResult] = await this.startLogIn();\n    return authResult;\n  }\n\n  async logInTwoFactor(): Promise<AuthResult> {\n    throw new Error(\"2FA not supported yet for WebAuthn Login.\");\n  }\n\n  protected override async setMasterKey(response: IdentityTokenResponse, userId: UserId) {\n    return Promise.resolve();\n  }\n\n  protected override async setUserKey(idTokenResponse: IdentityTokenResponse, userId: UserId) {\n    const masterKeyEncryptedUserKey = idTokenResponse.key;\n\n    if (masterKeyEncryptedUserKey) {\n      // set the master key encrypted user key if it exists\n      await this.keyService.setMasterKeyEncryptedUserKey(masterKeyEncryptedUserKey, userId);\n    }\n\n    const userDecryptionOptions = idTokenResponse?.userDecryptionOptions;\n\n    if (userDecryptionOptions?.webAuthnPrfOption) {\n      const webAuthnPrfOption = idTokenResponse.userDecryptionOptions?.webAuthnPrfOption;\n\n      const credentials = this.cache.value.credentials;\n      // confirm we still have the prf key\n      if (!credentials.prfKey) {\n        return;\n      }\n\n      // decrypt prf encrypted private key\n      const privateKey = await this.encryptService.decryptToBytes(\n        webAuthnPrfOption.encryptedPrivateKey,\n        credentials.prfKey,\n      );\n\n      // decrypt user key with private key\n      const userKey = await this.encryptService.rsaDecrypt(\n        new EncString(webAuthnPrfOption.encryptedUserKey.encryptedString),\n        privateKey,\n      );\n\n      if (userKey) {\n        await this.keyService.setUserKey(new SymmetricCryptoKey(userKey) as UserKey, userId);\n      }\n    }\n  }\n\n  protected override async setPrivateKey(\n    response: IdentityTokenResponse,\n    userId: UserId,\n  ): Promise<void> {\n    await this.keyService.setPrivateKey(\n      response.privateKey ?? (await this.createKeyPairForOldAccount(userId)),\n      userId,\n    );\n  }\n\n  exportCache(): CacheData {\n    return {\n      webAuthn: this.cache.value,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { KeyDefinition, LOGIN_STRATEGY_MEMORY } from \"@bitwarden/common/platform/state\";\n\nimport { AuthRequestLoginStrategyData } from \"../../login-strategies/auth-request-login.strategy\";\nimport { PasswordLoginStrategyData } from \"../../login-strategies/password-login.strategy\";\nimport { SsoLoginStrategyData } from \"../../login-strategies/sso-login.strategy\";\nimport { UserApiLoginStrategyData } from \"../../login-strategies/user-api-login.strategy\";\nimport { WebAuthnLoginStrategyData } from \"../../login-strategies/webauthn-login.strategy\";\n\n/**\n * The current login strategy in use.\n */\nexport const CURRENT_LOGIN_STRATEGY_KEY = new KeyDefinition<AuthenticationType | null>(\n  LOGIN_STRATEGY_MEMORY,\n  \"currentLoginStrategy\",\n  {\n    deserializer: (data) => data,\n  },\n);\n\n/**\n * The expiration date for the login strategy cache.\n * Used as a backup to the timer set on the service.\n */\nexport const CACHE_EXPIRATION_KEY = new KeyDefinition<Date | null>(\n  LOGIN_STRATEGY_MEMORY,\n  \"loginStrategyCacheExpiration\",\n  {\n    deserializer: (data) => (data ? null : new Date(data)),\n  },\n);\n\n/**\n * Auth Request notification for all instances of the login strategy service.\n * Note: this isn't an ideal approach, but allows both a background and\n * foreground instance to send out the notification.\n * TODO: Move to Auth Request service.\n */\nexport const AUTH_REQUEST_PUSH_NOTIFICATION_KEY = new KeyDefinition<string | null>(\n  LOGIN_STRATEGY_MEMORY,\n  \"authRequestPushNotification\",\n  {\n    deserializer: (data) => data,\n  },\n);\n\nexport type CacheData = {\n  password?: PasswordLoginStrategyData;\n  sso?: SsoLoginStrategyData;\n  userApiKey?: UserApiLoginStrategyData;\n  authRequest?: AuthRequestLoginStrategyData;\n  webAuthn?: WebAuthnLoginStrategyData;\n};\n\n/**\n * A cache for login strategies to use for data persistence through\n * the login process.\n */\nexport const CACHE_KEY = new KeyDefinition<CacheData | null>(\n  LOGIN_STRATEGY_MEMORY,\n  \"loginStrategyCache\",\n  {\n    deserializer: (data) => {\n      if (data == null) {\n        return null;\n      }\n      return {\n        password: data.password ? PasswordLoginStrategyData.fromJSON(data.password) : undefined,\n        sso: data.sso ? SsoLoginStrategyData.fromJSON(data.sso) : undefined,\n        userApiKey: data.userApiKey\n          ? UserApiLoginStrategyData.fromJSON(data.userApiKey)\n          : undefined,\n        authRequest: data.authRequest\n          ? AuthRequestLoginStrategyData.fromJSON(data.authRequest)\n          : undefined,\n        webAuthn: data.webAuthn ? WebAuthnLoginStrategyData.fromJSON(data.webAuthn) : undefined,\n      };\n    },\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  combineLatestWith,\n  distinctUntilChanged,\n  firstValueFrom,\n  map,\n  Observable,\n  shareReplay,\n  Subscription,\n  BehaviorSubject,\n} from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { VaultTimeoutSettingsService } from \"@bitwarden/common/abstractions/vault-timeout/vault-timeout-settings.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { KeyConnectorService } from \"@bitwarden/common/auth/abstractions/key-connector.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { TokenService } from \"@bitwarden/common/auth/abstractions/token.service\";\nimport { TwoFactorService } from \"@bitwarden/common/auth/abstractions/two-factor.service\";\nimport { AuthenticationType } from \"@bitwarden/common/auth/enums/authentication-type\";\nimport { AuthResult } from \"@bitwarden/common/auth/models/domain/auth-result\";\nimport { TokenTwoFactorRequest } from \"@bitwarden/common/auth/models/request/identity-token/token-two-factor.request\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { PreloginRequest } from \"@bitwarden/common/models/request/prelogin.request\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EnvironmentService } from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { StateService } from \"@bitwarden/common/platform/abstractions/state.service\";\nimport { TaskSchedulerService, ScheduledTaskNames } from \"@bitwarden/common/platform/scheduling\";\nimport { GlobalState, GlobalStateProvider } from \"@bitwarden/common/platform/state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/src/auth/abstractions/device-trust.service.abstraction\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { MasterKey } from \"@bitwarden/common/types/key\";\nimport {\n  KdfType,\n  KeyService,\n  Argon2KdfConfig,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  KdfConfigService,\n} from \"@bitwarden/key-management\";\n\nimport { AuthRequestServiceAbstraction, LoginStrategyServiceAbstraction } from \"../../abstractions\";\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../../abstractions/user-decryption-options.service.abstraction\";\nimport { AuthRequestLoginStrategy } from \"../../login-strategies/auth-request-login.strategy\";\nimport { LoginStrategy } from \"../../login-strategies/login.strategy\";\nimport { PasswordLoginStrategy } from \"../../login-strategies/password-login.strategy\";\nimport { SsoLoginStrategy } from \"../../login-strategies/sso-login.strategy\";\nimport { UserApiLoginStrategy } from \"../../login-strategies/user-api-login.strategy\";\nimport { WebAuthnLoginStrategy } from \"../../login-strategies/webauthn-login.strategy\";\nimport {\n  UserApiLoginCredentials,\n  PasswordLoginCredentials,\n  SsoLoginCredentials,\n  AuthRequestLoginCredentials,\n  WebAuthnLoginCredentials,\n} from \"../../models\";\n\nimport {\n  AUTH_REQUEST_PUSH_NOTIFICATION_KEY,\n  CURRENT_LOGIN_STRATEGY_KEY,\n  CacheData,\n  CACHE_EXPIRATION_KEY,\n  CACHE_KEY,\n} from \"./login-strategy.state\";\n\nconst sessionTimeoutLength = 5 * 60 * 1000; // 5 minutes\n\nexport class LoginStrategyService implements LoginStrategyServiceAbstraction {\n  private sessionTimeoutSubscription: Subscription;\n  private currentAuthnTypeState: GlobalState<AuthenticationType | null>;\n  private loginStrategyCacheState: GlobalState<CacheData | null>;\n  private loginStrategyCacheExpirationState: GlobalState<Date | null>;\n  private authRequestPushNotificationState: GlobalState<string>;\n  private twoFactorTimeoutSubject = new BehaviorSubject<boolean>(false);\n\n  twoFactorTimeout$: Observable<boolean> = this.twoFactorTimeoutSubject.asObservable();\n\n  private loginStrategy$: Observable<\n    | UserApiLoginStrategy\n    | PasswordLoginStrategy\n    | SsoLoginStrategy\n    | AuthRequestLoginStrategy\n    | WebAuthnLoginStrategy\n    | null\n  >;\n\n  currentAuthType$: Observable<AuthenticationType | null>;\n\n  constructor(\n    protected accountService: AccountService,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected keyService: KeyService,\n    protected apiService: ApiService,\n    protected tokenService: TokenService,\n    protected appIdService: AppIdService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected messagingService: MessagingService,\n    protected logService: LogService,\n    protected keyConnectorService: KeyConnectorService,\n    protected environmentService: EnvironmentService,\n    protected stateService: StateService,\n    protected twoFactorService: TwoFactorService,\n    protected i18nService: I18nService,\n    protected encryptService: EncryptService,\n    protected passwordStrengthService: PasswordStrengthServiceAbstraction,\n    protected policyService: PolicyService,\n    protected deviceTrustService: DeviceTrustServiceAbstraction,\n    protected authRequestService: AuthRequestServiceAbstraction,\n    protected userDecryptionOptionsService: InternalUserDecryptionOptionsServiceAbstraction,\n    protected stateProvider: GlobalStateProvider,\n    protected billingAccountProfileStateService: BillingAccountProfileStateService,\n    protected vaultTimeoutSettingsService: VaultTimeoutSettingsService,\n    protected kdfConfigService: KdfConfigService,\n    protected taskSchedulerService: TaskSchedulerService,\n  ) {\n    this.currentAuthnTypeState = this.stateProvider.get(CURRENT_LOGIN_STRATEGY_KEY);\n    this.loginStrategyCacheState = this.stateProvider.get(CACHE_KEY);\n    this.loginStrategyCacheExpirationState = this.stateProvider.get(CACHE_EXPIRATION_KEY);\n    this.authRequestPushNotificationState = this.stateProvider.get(\n      AUTH_REQUEST_PUSH_NOTIFICATION_KEY,\n    );\n    this.taskSchedulerService.registerTaskHandler(\n      ScheduledTaskNames.loginStrategySessionTimeout,\n      async () => {\n        this.twoFactorTimeoutSubject.next(true);\n        try {\n          await this.clearCache();\n        } catch (e) {\n          this.logService.error(\"Failed to clear cache during session timeout\", e);\n        }\n      },\n    );\n\n    this.currentAuthType$ = this.currentAuthnTypeState.state$;\n    this.loginStrategy$ = this.currentAuthnTypeState.state$.pipe(\n      distinctUntilChanged(),\n      combineLatestWith(this.loginStrategyCacheState.state$),\n      this.initializeLoginStrategy.bind(this),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n  }\n\n  async getEmail(): Promise<string | null> {\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    if (\"email$\" in strategy) {\n      return await firstValueFrom(strategy.email$);\n    }\n    return null;\n  }\n\n  async getMasterPasswordHash(): Promise<string | null> {\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    if (\"serverMasterKeyHash$\" in strategy) {\n      return await firstValueFrom(strategy.serverMasterKeyHash$);\n    }\n    return null;\n  }\n\n  async getSsoEmail2FaSessionToken(): Promise<string | null> {\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    if (\"ssoEmail2FaSessionToken$\" in strategy) {\n      return await firstValueFrom(strategy.ssoEmail2FaSessionToken$);\n    }\n    return null;\n  }\n\n  async getAccessCode(): Promise<string | null> {\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    if (\"accessCode$\" in strategy) {\n      return await firstValueFrom(strategy.accessCode$);\n    }\n    return null;\n  }\n\n  async getAuthRequestId(): Promise<string | null> {\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    if (\"authRequestId$\" in strategy) {\n      return await firstValueFrom(strategy.authRequestId$);\n    }\n    return null;\n  }\n\n  async logIn(\n    credentials:\n      | UserApiLoginCredentials\n      | PasswordLoginCredentials\n      | SsoLoginCredentials\n      | AuthRequestLoginCredentials\n      | WebAuthnLoginCredentials,\n  ): Promise<AuthResult> {\n    await this.clearCache();\n    this.twoFactorTimeoutSubject.next(false);\n\n    await this.currentAuthnTypeState.update((_) => credentials.type);\n\n    const strategy = await firstValueFrom(this.loginStrategy$);\n\n    // Note: We aren't passing the credentials directly to the strategy since they are\n    // created in the popup and can cause DeadObject references on Firefox.\n    // This is a shallow copy, but use deep copy in future if objects are added to credentials\n    // that were created in popup.\n    // If the popup uses its own instance of this service, this can be removed.\n    const ownedCredentials = { ...credentials };\n\n    const result = await strategy.logIn(ownedCredentials as any);\n\n    if (result != null && !result.requiresTwoFactor) {\n      await this.clearCache();\n    } else {\n      // Cache the strategy data so we can attempt again later with 2fa. Cache supports different contexts\n      await this.loginStrategyCacheState.update((_) => strategy.exportCache());\n      await this.startSessionTimeout();\n    }\n\n    return result;\n  }\n\n  async logInTwoFactor(\n    twoFactor: TokenTwoFactorRequest,\n    captchaResponse: string,\n  ): Promise<AuthResult> {\n    if (!(await this.isSessionValid())) {\n      throw new Error(this.i18nService.t(\"sessionTimeout\"));\n    }\n\n    const strategy = await firstValueFrom(this.loginStrategy$);\n    if (strategy == null) {\n      throw new Error(\"No login strategy found.\");\n    }\n\n    try {\n      const result = await strategy.logInTwoFactor(twoFactor, captchaResponse);\n\n      // Only clear cache if 2FA token has been accepted, otherwise we need to be able to try again\n      if (result != null && !result.requiresTwoFactor && !result.requiresCaptcha) {\n        await this.clearCache();\n      }\n      return result;\n    } catch (e) {\n      // API exceptions are okay, but if there are any unhandled client-side errors then clear cache to be safe\n      if (!(e instanceof ErrorResponse)) {\n        await this.clearCache();\n      }\n      throw e;\n    }\n  }\n\n  async makePreloginKey(masterPassword: string, email: string): Promise<MasterKey> {\n    email = email.trim().toLowerCase();\n    let kdfConfig: KdfConfig = null;\n    try {\n      const preloginResponse = await this.apiService.postPrelogin(new PreloginRequest(email));\n      if (preloginResponse != null) {\n        kdfConfig =\n          preloginResponse.kdf === KdfType.PBKDF2_SHA256\n            ? new PBKDF2KdfConfig(preloginResponse.kdfIterations)\n            : new Argon2KdfConfig(\n                preloginResponse.kdfIterations,\n                preloginResponse.kdfMemory,\n                preloginResponse.kdfParallelism,\n              );\n      }\n    } catch (e) {\n      if (e == null || e.statusCode !== 404) {\n        throw e;\n      }\n    }\n\n    kdfConfig.validateKdfConfigForPrelogin();\n\n    return await this.keyService.makeMasterKey(masterPassword, email, kdfConfig);\n  }\n\n  private async clearCache(): Promise<void> {\n    await this.currentAuthnTypeState.update((_) => null);\n    await this.loginStrategyCacheState.update((_) => null);\n    this.twoFactorTimeoutSubject.next(false);\n    await this.clearSessionTimeout();\n  }\n\n  private async startSessionTimeout(): Promise<void> {\n    await this.clearSessionTimeout();\n\n    // This Login Strategy Cache Expiration State value set here is used to clear the cache on re-init\n    // of the application in the case where the timeout is terminated due to a closure of the application\n    // window. The browser extension popup in particular is susceptible to this concern, as the user\n    // is almost always likely to close the popup window before the session timeout is reached.\n    await this.loginStrategyCacheExpirationState.update(\n      (_) => new Date(Date.now() + sessionTimeoutLength),\n    );\n    this.sessionTimeoutSubscription = this.taskSchedulerService.setTimeout(\n      ScheduledTaskNames.loginStrategySessionTimeout,\n      sessionTimeoutLength,\n    );\n  }\n\n  private async clearSessionTimeout(): Promise<void> {\n    await this.loginStrategyCacheExpirationState.update((_) => null);\n    this.sessionTimeoutSubscription?.unsubscribe();\n  }\n\n  private async isSessionValid(): Promise<boolean> {\n    const cache = await firstValueFrom(this.loginStrategyCacheState.state$);\n    if (cache == null) {\n      return false;\n    }\n\n    // If the Login Strategy Cache Expiration State value is less than the current\n    // datetime stamp, then the cache is invalid and should be cleared.\n    const expiration = await firstValueFrom(this.loginStrategyCacheExpirationState.state$);\n    if (expiration != null && expiration < new Date()) {\n      await this.clearCache();\n      return false;\n    }\n    return true;\n  }\n\n  private initializeLoginStrategy(\n    source: Observable<[AuthenticationType | null, CacheData | null]>,\n  ) {\n    const sharedDeps: ConstructorParameters<typeof LoginStrategy> = [\n      this.accountService,\n      this.masterPasswordService,\n      this.keyService,\n      this.encryptService,\n      this.apiService,\n      this.tokenService,\n      this.appIdService,\n      this.platformUtilsService,\n      this.messagingService,\n      this.logService,\n      this.stateService,\n      this.twoFactorService,\n      this.userDecryptionOptionsService,\n      this.billingAccountProfileStateService,\n      this.vaultTimeoutSettingsService,\n      this.kdfConfigService,\n    ];\n\n    return source.pipe(\n      map(([strategy, data]) => {\n        if (strategy == null) {\n          return null;\n        }\n        switch (strategy) {\n          case AuthenticationType.Password:\n            return new PasswordLoginStrategy(\n              data?.password,\n              this.passwordStrengthService,\n              this.policyService,\n              this,\n              ...sharedDeps,\n            );\n          case AuthenticationType.Sso:\n            return new SsoLoginStrategy(\n              data?.sso,\n              this.keyConnectorService,\n              this.deviceTrustService,\n              this.authRequestService,\n              this.i18nService,\n              ...sharedDeps,\n            );\n          case AuthenticationType.UserApiKey:\n            return new UserApiLoginStrategy(\n              data?.userApiKey,\n              this.environmentService,\n              this.keyConnectorService,\n              ...sharedDeps,\n            );\n          case AuthenticationType.AuthRequest:\n            return new AuthRequestLoginStrategy(\n              data?.authRequest,\n              this.deviceTrustService,\n              ...sharedDeps,\n            );\n          case AuthenticationType.WebAuthn:\n            return new WebAuthnLoginStrategy(data?.webAuthn, ...sharedDeps);\n        }\n      }),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, map } from \"rxjs\";\n\nimport {\n  ActiveUserState,\n  StateProvider,\n  USER_DECRYPTION_OPTIONS_DISK,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { UserId } from \"@bitwarden/common/src/types/guid\";\n\nimport { InternalUserDecryptionOptionsServiceAbstraction } from \"../../abstractions/user-decryption-options.service.abstraction\";\nimport { UserDecryptionOptions } from \"../../models\";\n\nexport const USER_DECRYPTION_OPTIONS = new UserKeyDefinition<UserDecryptionOptions>(\n  USER_DECRYPTION_OPTIONS_DISK,\n  \"decryptionOptions\",\n  {\n    deserializer: (decryptionOptions) => UserDecryptionOptions.fromJSON(decryptionOptions),\n    clearOn: [\"logout\"],\n  },\n);\n\nexport class UserDecryptionOptionsService\n  implements InternalUserDecryptionOptionsServiceAbstraction\n{\n  private userDecryptionOptionsState: ActiveUserState<UserDecryptionOptions>;\n\n  userDecryptionOptions$: Observable<UserDecryptionOptions>;\n  hasMasterPassword$: Observable<boolean>;\n\n  constructor(private stateProvider: StateProvider) {\n    this.userDecryptionOptionsState = this.stateProvider.getActive(USER_DECRYPTION_OPTIONS);\n\n    this.userDecryptionOptions$ = this.userDecryptionOptionsState.state$;\n    this.hasMasterPassword$ = this.userDecryptionOptions$.pipe(\n      map((options) => options?.hasMasterPassword ?? false),\n    );\n  }\n\n  userDecryptionOptionsById$(userId: UserId): Observable<UserDecryptionOptions> {\n    return this.stateProvider.getUser(userId, USER_DECRYPTION_OPTIONS).state$;\n  }\n\n  async setUserDecryptionOptions(userDecryptionOptions: UserDecryptionOptions): Promise<void> {\n    await this.userDecryptionOptionsState.update((_) => userDecryptionOptions);\n  }\n}\n","export class PasswordlessAuthRequest {\n  constructor(\n    readonly key: string,\n    readonly masterPasswordHash: string,\n    readonly deviceIdentifier: string,\n    readonly requestApproved: boolean,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, Subject, firstValueFrom } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { AdminAuthRequestStorable } from \"@bitwarden/common/auth/models/domain/admin-auth-req-storable\";\nimport { PasswordlessAuthRequest } from \"@bitwarden/common/auth/models/request/passwordless-auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { AuthRequestPushNotification } from \"@bitwarden/common/models/response/notification.response\";\nimport { AppIdService } from \"@bitwarden/common/platform/abstractions/app-id.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport {\n  AUTH_REQUEST_DISK_LOCAL,\n  StateProvider,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { MasterKey, UserKey } from \"@bitwarden/common/types/key\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { AuthRequestServiceAbstraction } from \"../../abstractions/auth-request.service.abstraction\";\n\n/**\n * Disk-local to maintain consistency between tabs. We don't want to\n * clear this on logout since admin auth requests are long-lived.\n */\nexport const ADMIN_AUTH_REQUEST_KEY = new UserKeyDefinition<Jsonify<AdminAuthRequestStorable>>(\n  AUTH_REQUEST_DISK_LOCAL,\n  \"adminAuthRequest\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n\nexport class AuthRequestService implements AuthRequestServiceAbstraction {\n  private authRequestPushNotificationSubject = new Subject<string>();\n  authRequestPushNotification$: Observable<string>;\n\n  constructor(\n    private appIdService: AppIdService,\n    private accountService: AccountService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private apiService: ApiService,\n    private stateProvider: StateProvider,\n  ) {\n    this.authRequestPushNotification$ = this.authRequestPushNotificationSubject.asObservable();\n  }\n\n  async getAdminAuthRequest(userId: UserId): Promise<AdminAuthRequestStorable | null> {\n    if (userId == null) {\n      throw new Error(\"User ID is required\");\n    }\n\n    const authRequestSerialized = await firstValueFrom(\n      this.stateProvider.getUser(userId, ADMIN_AUTH_REQUEST_KEY).state$,\n    );\n    const adminAuthRequestStorable = AdminAuthRequestStorable.fromJSON(authRequestSerialized);\n    return adminAuthRequestStorable;\n  }\n\n  async setAdminAuthRequest(authRequest: AdminAuthRequestStorable, userId: UserId): Promise<void> {\n    if (userId == null) {\n      throw new Error(\"User ID is required\");\n    }\n    if (authRequest == null) {\n      throw new Error(\"Auth request is required\");\n    }\n\n    await this.stateProvider.setUserState(ADMIN_AUTH_REQUEST_KEY, authRequest.toJSON(), userId);\n  }\n\n  async clearAdminAuthRequest(userId: UserId): Promise<void> {\n    if (userId == null) {\n      throw new Error(\"User ID is required\");\n    }\n\n    await this.stateProvider.setUserState(ADMIN_AUTH_REQUEST_KEY, null, userId);\n  }\n\n  async approveOrDenyAuthRequest(\n    approve: boolean,\n    authRequest: AuthRequestResponse,\n  ): Promise<AuthRequestResponse> {\n    if (!authRequest.id) {\n      throw new Error(\"Auth request has no id\");\n    }\n    if (!authRequest.publicKey) {\n      throw new Error(\"Auth request has no public key\");\n    }\n    const pubKey = Utils.fromB64ToArray(authRequest.publicKey);\n\n    const userId = (await firstValueFrom(this.accountService.activeAccount$)).id;\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    const masterKeyHash = await firstValueFrom(this.masterPasswordService.masterKeyHash$(userId));\n    let encryptedMasterKeyHash;\n    let keyToEncrypt;\n\n    if (masterKey && masterKeyHash) {\n      // Only encrypt the master password hash if masterKey exists as\n      // we won't have a masterKeyHash without a masterKey\n      encryptedMasterKeyHash = await this.encryptService.rsaEncrypt(\n        Utils.fromUtf8ToArray(masterKeyHash),\n        pubKey,\n      );\n      keyToEncrypt = masterKey.encKey;\n    } else {\n      const userKey = await this.keyService.getUserKey();\n      keyToEncrypt = userKey.key;\n    }\n\n    const encryptedKey = await this.encryptService.rsaEncrypt(keyToEncrypt, pubKey);\n\n    const response = new PasswordlessAuthRequest(\n      encryptedKey.encryptedString,\n      encryptedMasterKeyHash?.encryptedString,\n      await this.appIdService.getAppId(),\n      approve,\n    );\n    return await this.apiService.putAuthRequest(authRequest.id, response);\n  }\n\n  async setUserKeyAfterDecryptingSharedUserKey(\n    authReqResponse: AuthRequestResponse,\n    authReqPrivateKey: Uint8Array,\n    userId: UserId,\n  ) {\n    const userKey = await this.decryptPubKeyEncryptedUserKey(\n      authReqResponse.key,\n      authReqPrivateKey,\n    );\n    await this.keyService.setUserKey(userKey, userId);\n  }\n\n  async setKeysAfterDecryptingSharedMasterKeyAndHash(\n    authReqResponse: AuthRequestResponse,\n    authReqPrivateKey: Uint8Array,\n    userId: UserId,\n  ) {\n    const { masterKey, masterKeyHash } = await this.decryptPubKeyEncryptedMasterKeyAndHash(\n      authReqResponse.key,\n      authReqResponse.masterPasswordHash,\n      authReqPrivateKey,\n    );\n\n    // Decrypt and set user key in state\n    const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(masterKey, userId);\n\n    // Set masterKey + masterKeyHash in state after decryption (in case decryption fails)\n    await this.masterPasswordService.setMasterKey(masterKey, userId);\n    await this.masterPasswordService.setMasterKeyHash(masterKeyHash, userId);\n\n    await this.keyService.setUserKey(userKey, userId);\n  }\n\n  // Decryption helpers\n  async decryptPubKeyEncryptedUserKey(\n    pubKeyEncryptedUserKey: string,\n    privateKey: Uint8Array,\n  ): Promise<UserKey> {\n    const decryptedUserKeyBytes = await this.encryptService.rsaDecrypt(\n      new EncString(pubKeyEncryptedUserKey),\n      privateKey,\n    );\n\n    return new SymmetricCryptoKey(decryptedUserKeyBytes) as UserKey;\n  }\n\n  async decryptPubKeyEncryptedMasterKeyAndHash(\n    pubKeyEncryptedMasterKey: string,\n    pubKeyEncryptedMasterKeyHash: string,\n    privateKey: Uint8Array,\n  ): Promise<{ masterKey: MasterKey; masterKeyHash: string }> {\n    const decryptedMasterKeyArrayBuffer = await this.encryptService.rsaDecrypt(\n      new EncString(pubKeyEncryptedMasterKey),\n      privateKey,\n    );\n\n    const decryptedMasterKeyHashArrayBuffer = await this.encryptService.rsaDecrypt(\n      new EncString(pubKeyEncryptedMasterKeyHash),\n      privateKey,\n    );\n\n    const masterKey = new SymmetricCryptoKey(decryptedMasterKeyArrayBuffer) as MasterKey;\n    const masterKeyHash = Utils.fromBufferToUtf8(decryptedMasterKeyHashArrayBuffer);\n\n    return {\n      masterKey,\n      masterKeyHash,\n    };\n  }\n\n  sendAuthRequestPushNotification(notification: AuthRequestPushNotification): void {\n    if (notification.id != null) {\n      this.authRequestPushNotificationSubject.next(notification.id);\n    }\n  }\n\n  async getFingerprintPhrase(email: string, publicKey: Uint8Array): Promise<string> {\n    return (await this.keyService.getFingerprint(email.toLowerCase(), publicKey)).join(\"-\");\n  }\n}\n","import { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AuthRequest } from \"@bitwarden/common/auth/models/request/auth.request\";\nimport { AuthRequestResponse } from \"@bitwarden/common/auth/models/response/auth-request.response\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\n\nimport { AuthRequestApiService } from \"../../abstractions/auth-request-api.service\";\n\nexport class DefaultAuthRequestApiService implements AuthRequestApiService {\n  constructor(\n    private apiService: ApiService,\n    private logService: LogService,\n  ) {}\n\n  async getAuthRequest(requestId: string): Promise<AuthRequestResponse> {\n    try {\n      const path = `/auth-requests/${requestId}`;\n      const response = await this.apiService.send(\"GET\", path, null, true, true);\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async getAuthResponse(requestId: string, accessCode: string): Promise<AuthRequestResponse> {\n    try {\n      const path = `/auth-requests/${requestId}/response?code=${accessCode}`;\n      const response = await this.apiService.send(\"GET\", path, null, false, true);\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async postAdminAuthRequest(request: AuthRequest): Promise<AuthRequestResponse> {\n    try {\n      const response = await this.apiService.send(\n        \"POST\",\n        \"/auth-requests/admin-request\",\n        request,\n        true,\n        true,\n      );\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n\n  async postAuthRequest(request: AuthRequest): Promise<AuthRequestResponse> {\n    try {\n      const response = await this.apiService.send(\"POST\", \"/auth-requests/\", request, false, true);\n\n      return response;\n    } catch (e: unknown) {\n      this.logService.error(e);\n      throw e;\n    }\n  }\n}\n","import { Observable, map } from \"rxjs\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\n\n// This is a temporary service to determine the correct route to use for registration based on the email verification feature flag.\nexport class RegisterRouteService {\n  constructor(private configService: ConfigService) {}\n\n  registerRoute$(): Observable<string> {\n    return this.configService.getFeatureFlag$(FeatureFlag.EmailVerification).pipe(\n      map((emailVerificationEnabled) => {\n        if (emailVerificationEnabled) {\n          return \"/signup\";\n        } else {\n          return \"/register\";\n        }\n      }),\n    );\n  }\n}\n","import { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserAsymmetricKeysRegenerationService } from \"@bitwarden/key-management\";\n\nimport { LoginSuccessHandlerService } from \"../../abstractions/login-success-handler.service\";\n\nexport class DefaultLoginSuccessHandlerService implements LoginSuccessHandlerService {\n  constructor(\n    private syncService: SyncService,\n    private userAsymmetricKeysRegenerationService: UserAsymmetricKeysRegenerationService,\n  ) {}\n  async run(userId: UserId): Promise<void> {\n    await this.syncService.fullSync(true);\n    await this.userAsymmetricKeysRegenerationService.regenerateIfNeeded(userId);\n  }\n}\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nexport function decodeJwtTokenToJson(jwtToken: string): any {\n  if (jwtToken == null) {\n    throw new Error(\"JWT token not found\");\n  }\n\n  const parts = jwtToken.split(\".\");\n  if (parts.length !== 3) {\n    throw new Error(\"JWT must have 3 parts\");\n  }\n\n  // JWT has 3 parts: header, payload, signature separated by '.'\n  // So, grab the payload to decode\n  const encodedPayload = parts[1];\n\n  let decodedPayloadJSON: string;\n  try {\n    // Attempt to decode from URL-safe Base64 to UTF-8\n    decodedPayloadJSON = Utils.fromUrlB64ToUtf8(encodedPayload);\n  } catch (decodingError) {\n    throw new Error(\"Cannot decode the token\");\n  }\n\n  try {\n    // Attempt to parse the JSON payload\n    const decodedToken = JSON.parse(decodedPayloadJSON);\n    return decodedToken;\n  } catch (jsonError) {\n    throw new Error(\"Cannot parse the token's payload into JSON\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  CollectionRequest,\n  CollectionAccessDetailsResponse,\n  CollectionDetailsResponse,\n  CollectionResponse,\n} from \"@bitwarden/admin-console/common\";\n\nimport { OrganizationConnectionType } from \"../admin-console/enums\";\nimport { OrganizationSponsorshipCreateRequest } from \"../admin-console/models/request/organization/organization-sponsorship-create.request\";\nimport { OrganizationSponsorshipRedeemRequest } from \"../admin-console/models/request/organization/organization-sponsorship-redeem.request\";\nimport { OrganizationConnectionRequest } from \"../admin-console/models/request/organization-connection.request\";\nimport { ProviderAddOrganizationRequest } from \"../admin-console/models/request/provider/provider-add-organization.request\";\nimport { ProviderOrganizationCreateRequest } from \"../admin-console/models/request/provider/provider-organization-create.request\";\nimport { ProviderUserAcceptRequest } from \"../admin-console/models/request/provider/provider-user-accept.request\";\nimport { ProviderUserBulkConfirmRequest } from \"../admin-console/models/request/provider/provider-user-bulk-confirm.request\";\nimport { ProviderUserBulkRequest } from \"../admin-console/models/request/provider/provider-user-bulk.request\";\nimport { ProviderUserConfirmRequest } from \"../admin-console/models/request/provider/provider-user-confirm.request\";\nimport { ProviderUserInviteRequest } from \"../admin-console/models/request/provider/provider-user-invite.request\";\nimport { ProviderUserUpdateRequest } from \"../admin-console/models/request/provider/provider-user-update.request\";\nimport { SelectionReadOnlyRequest } from \"../admin-console/models/request/selection-read-only.request\";\nimport {\n  OrganizationConnectionConfigApis,\n  OrganizationConnectionResponse,\n} from \"../admin-console/models/response/organization-connection.response\";\nimport { OrganizationExportResponse } from \"../admin-console/models/response/organization-export.response\";\nimport { OrganizationSponsorshipSyncStatusResponse } from \"../admin-console/models/response/organization-sponsorship-sync-status.response\";\nimport { PreValidateSponsorshipResponse } from \"../admin-console/models/response/pre-validate-sponsorship.response\";\nimport {\n  ProviderOrganizationOrganizationDetailsResponse,\n  ProviderOrganizationResponse,\n} from \"../admin-console/models/response/provider/provider-organization.response\";\nimport { ProviderUserBulkPublicKeyResponse } from \"../admin-console/models/response/provider/provider-user-bulk-public-key.response\";\nimport { ProviderUserBulkResponse } from \"../admin-console/models/response/provider/provider-user-bulk.response\";\nimport {\n  ProviderUserResponse,\n  ProviderUserUserDetailsResponse,\n} from \"../admin-console/models/response/provider/provider-user.response\";\nimport { SelectionReadOnlyResponse } from \"../admin-console/models/response/selection-read-only.response\";\nimport { AuthRequest } from \"../auth/models/request/auth.request\";\nimport { DeviceVerificationRequest } from \"../auth/models/request/device-verification.request\";\nimport { DisableTwoFactorAuthenticatorRequest } from \"../auth/models/request/disable-two-factor-authenticator.request\";\nimport { EmailTokenRequest } from \"../auth/models/request/email-token.request\";\nimport { EmailRequest } from \"../auth/models/request/email.request\";\nimport { PasswordTokenRequest } from \"../auth/models/request/identity-token/password-token.request\";\nimport { SsoTokenRequest } from \"../auth/models/request/identity-token/sso-token.request\";\nimport { UserApiTokenRequest } from \"../auth/models/request/identity-token/user-api-token.request\";\nimport { WebAuthnLoginTokenRequest } from \"../auth/models/request/identity-token/webauthn-login-token.request\";\nimport { KeyConnectorUserKeyRequest } from \"../auth/models/request/key-connector-user-key.request\";\nimport { PasswordHintRequest } from \"../auth/models/request/password-hint.request\";\nimport { PasswordRequest } from \"../auth/models/request/password.request\";\nimport { PasswordlessAuthRequest } from \"../auth/models/request/passwordless-auth.request\";\nimport { SecretVerificationRequest } from \"../auth/models/request/secret-verification.request\";\nimport { SetKeyConnectorKeyRequest } from \"../auth/models/request/set-key-connector-key.request\";\nimport { SetPasswordRequest } from \"../auth/models/request/set-password.request\";\nimport { TwoFactorEmailRequest } from \"../auth/models/request/two-factor-email.request\";\nimport { TwoFactorProviderRequest } from \"../auth/models/request/two-factor-provider.request\";\nimport { TwoFactorRecoveryRequest } from \"../auth/models/request/two-factor-recovery.request\";\nimport { UpdateProfileRequest } from \"../auth/models/request/update-profile.request\";\nimport { UpdateTdeOffboardingPasswordRequest } from \"../auth/models/request/update-tde-offboarding-password.request\";\nimport { UpdateTempPasswordRequest } from \"../auth/models/request/update-temp-password.request\";\nimport { UpdateTwoFactorAuthenticatorRequest } from \"../auth/models/request/update-two-factor-authenticator.request\";\nimport { UpdateTwoFactorDuoRequest } from \"../auth/models/request/update-two-factor-duo.request\";\nimport { UpdateTwoFactorEmailRequest } from \"../auth/models/request/update-two-factor-email.request\";\nimport { UpdateTwoFactorWebAuthnDeleteRequest } from \"../auth/models/request/update-two-factor-web-authn-delete.request\";\nimport { UpdateTwoFactorWebAuthnRequest } from \"../auth/models/request/update-two-factor-web-authn.request\";\nimport { UpdateTwoFactorYubikeyOtpRequest } from \"../auth/models/request/update-two-factor-yubikey-otp.request\";\nimport { ApiKeyResponse } from \"../auth/models/response/api-key.response\";\nimport { AuthRequestResponse } from \"../auth/models/response/auth-request.response\";\nimport { DeviceVerificationResponse } from \"../auth/models/response/device-verification.response\";\nimport { IdentityCaptchaResponse } from \"../auth/models/response/identity-captcha.response\";\nimport { IdentityTokenResponse } from \"../auth/models/response/identity-token.response\";\nimport { IdentityTwoFactorResponse } from \"../auth/models/response/identity-two-factor.response\";\nimport { KeyConnectorUserKeyResponse } from \"../auth/models/response/key-connector-user-key.response\";\nimport { PreloginResponse } from \"../auth/models/response/prelogin.response\";\nimport { RegisterResponse } from \"../auth/models/response/register.response\";\nimport { SsoPreValidateResponse } from \"../auth/models/response/sso-pre-validate.response\";\nimport { TwoFactorAuthenticatorResponse } from \"../auth/models/response/two-factor-authenticator.response\";\nimport { TwoFactorDuoResponse } from \"../auth/models/response/two-factor-duo.response\";\nimport { TwoFactorEmailResponse } from \"../auth/models/response/two-factor-email.response\";\nimport { TwoFactorProviderResponse } from \"../auth/models/response/two-factor-provider.response\";\nimport { TwoFactorRecoverResponse } from \"../auth/models/response/two-factor-recover.response\";\nimport {\n  ChallengeResponse,\n  TwoFactorWebAuthnResponse,\n} from \"../auth/models/response/two-factor-web-authn.response\";\nimport { TwoFactorYubiKeyResponse } from \"../auth/models/response/two-factor-yubi-key.response\";\nimport { BitPayInvoiceRequest } from \"../billing/models/request/bit-pay-invoice.request\";\nimport { PaymentRequest } from \"../billing/models/request/payment.request\";\nimport { TaxInfoUpdateRequest } from \"../billing/models/request/tax-info-update.request\";\nimport { BillingHistoryResponse } from \"../billing/models/response/billing-history.response\";\nimport { BillingPaymentResponse } from \"../billing/models/response/billing-payment.response\";\nimport { PaymentResponse } from \"../billing/models/response/payment.response\";\nimport { PlanResponse } from \"../billing/models/response/plan.response\";\nimport { SubscriptionResponse } from \"../billing/models/response/subscription.response\";\nimport { TaxInfoResponse } from \"../billing/models/response/tax-info.response\";\nimport { TaxRateResponse } from \"../billing/models/response/tax-rate.response\";\nimport { DeleteRecoverRequest } from \"../models/request/delete-recover.request\";\nimport { EventRequest } from \"../models/request/event.request\";\nimport { KdfRequest } from \"../models/request/kdf.request\";\nimport { KeysRequest } from \"../models/request/keys.request\";\nimport { PreloginRequest } from \"../models/request/prelogin.request\";\nimport { RegisterRequest } from \"../models/request/register.request\";\nimport { StorageRequest } from \"../models/request/storage.request\";\nimport { UpdateAvatarRequest } from \"../models/request/update-avatar.request\";\nimport { UpdateDomainsRequest } from \"../models/request/update-domains.request\";\nimport { VerifyDeleteRecoverRequest } from \"../models/request/verify-delete-recover.request\";\nimport { VerifyEmailRequest } from \"../models/request/verify-email.request\";\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\nimport { DomainsResponse } from \"../models/response/domains.response\";\nimport { EventResponse } from \"../models/response/event.response\";\nimport { ListResponse } from \"../models/response/list.response\";\nimport { ProfileResponse } from \"../models/response/profile.response\";\nimport { UserKeyResponse } from \"../models/response/user-key.response\";\nimport { SyncResponse } from \"../platform/sync\";\nimport { UserId } from \"../types/guid\";\nimport { AttachmentRequest } from \"../vault/models/request/attachment.request\";\nimport { CipherBulkDeleteRequest } from \"../vault/models/request/cipher-bulk-delete.request\";\nimport { CipherBulkMoveRequest } from \"../vault/models/request/cipher-bulk-move.request\";\nimport { CipherBulkRestoreRequest } from \"../vault/models/request/cipher-bulk-restore.request\";\nimport { CipherBulkShareRequest } from \"../vault/models/request/cipher-bulk-share.request\";\nimport { CipherCollectionsRequest } from \"../vault/models/request/cipher-collections.request\";\nimport { CipherCreateRequest } from \"../vault/models/request/cipher-create.request\";\nimport { CipherPartialRequest } from \"../vault/models/request/cipher-partial.request\";\nimport { CipherShareRequest } from \"../vault/models/request/cipher-share.request\";\nimport { CipherRequest } from \"../vault/models/request/cipher.request\";\nimport { AttachmentUploadDataResponse } from \"../vault/models/response/attachment-upload-data.response\";\nimport { AttachmentResponse } from \"../vault/models/response/attachment.response\";\nimport { CipherResponse } from \"../vault/models/response/cipher.response\";\nimport { OptionalCipherResponse } from \"../vault/models/response/optional-cipher.response\";\n\n/**\n * @deprecated The `ApiService` class is deprecated and calls should be extracted into individual\n * api services. The `send` method is still allowed to be used within api services. For background\n * of this decision please read https://contributing.bitwarden.com/architecture/adr/refactor-api-service.\n */\nexport abstract class ApiService {\n  send: (\n    method: \"GET\" | \"POST\" | \"PUT\" | \"DELETE\",\n    path: string,\n    body: any,\n    authed: boolean,\n    hasResponse: boolean,\n    apiUrl?: string,\n    alterHeaders?: (headers: Headers) => void,\n  ) => Promise<any>;\n\n  postIdentityToken: (\n    request:\n      | PasswordTokenRequest\n      | SsoTokenRequest\n      | UserApiTokenRequest\n      | WebAuthnLoginTokenRequest,\n  ) => Promise<IdentityTokenResponse | IdentityTwoFactorResponse | IdentityCaptchaResponse>;\n  refreshIdentityToken: () => Promise<any>;\n\n  getProfile: () => Promise<ProfileResponse>;\n  getUserSubscription: () => Promise<SubscriptionResponse>;\n  getTaxInfo: () => Promise<TaxInfoResponse>;\n  putProfile: (request: UpdateProfileRequest) => Promise<ProfileResponse>;\n  putAvatar: (request: UpdateAvatarRequest) => Promise<ProfileResponse>;\n  putTaxInfo: (request: TaxInfoUpdateRequest) => Promise<any>;\n  postPrelogin: (request: PreloginRequest) => Promise<PreloginResponse>;\n  postEmailToken: (request: EmailTokenRequest) => Promise<any>;\n  postEmail: (request: EmailRequest) => Promise<any>;\n  postPassword: (request: PasswordRequest) => Promise<any>;\n  setPassword: (request: SetPasswordRequest) => Promise<any>;\n  postSetKeyConnectorKey: (request: SetKeyConnectorKeyRequest) => Promise<any>;\n  postSecurityStamp: (request: SecretVerificationRequest) => Promise<any>;\n  getAccountRevisionDate: () => Promise<number>;\n  postPasswordHint: (request: PasswordHintRequest) => Promise<any>;\n  postRegister: (request: RegisterRequest) => Promise<RegisterResponse>;\n  postPremium: (data: FormData) => Promise<PaymentResponse>;\n  postReinstatePremium: () => Promise<any>;\n  postAccountStorage: (request: StorageRequest) => Promise<PaymentResponse>;\n  postAccountPayment: (request: PaymentRequest) => Promise<void>;\n  postAccountLicense: (data: FormData) => Promise<any>;\n  postAccountKeys: (request: KeysRequest) => Promise<any>;\n  postAccountVerifyEmail: () => Promise<any>;\n  postAccountVerifyEmailToken: (request: VerifyEmailRequest) => Promise<any>;\n  postAccountRecoverDelete: (request: DeleteRecoverRequest) => Promise<any>;\n  postAccountRecoverDeleteToken: (request: VerifyDeleteRecoverRequest) => Promise<any>;\n  postAccountKdf: (request: KdfRequest) => Promise<any>;\n  postUserApiKey: (id: string, request: SecretVerificationRequest) => Promise<ApiKeyResponse>;\n  postUserRotateApiKey: (id: string, request: SecretVerificationRequest) => Promise<ApiKeyResponse>;\n  putUpdateTempPassword: (request: UpdateTempPasswordRequest) => Promise<any>;\n  putUpdateTdeOffboardingPassword: (request: UpdateTdeOffboardingPasswordRequest) => Promise<any>;\n  postConvertToKeyConnector: () => Promise<void>;\n  //passwordless\n  postAuthRequest: (request: AuthRequest) => Promise<AuthRequestResponse>;\n  postAdminAuthRequest: (request: AuthRequest) => Promise<AuthRequestResponse>;\n  getAuthResponse: (id: string, accessCode: string) => Promise<AuthRequestResponse>;\n  getAuthRequest: (id: string) => Promise<AuthRequestResponse>;\n  putAuthRequest: (id: string, request: PasswordlessAuthRequest) => Promise<AuthRequestResponse>;\n  getAuthRequests: () => Promise<ListResponse<AuthRequestResponse>>;\n  getLastAuthRequest: () => Promise<AuthRequestResponse>;\n\n  getUserBillingHistory: () => Promise<BillingHistoryResponse>;\n  getUserBillingPayment: () => Promise<BillingPaymentResponse>;\n\n  getCipher: (id: string) => Promise<CipherResponse>;\n  getFullCipherDetails: (id: string) => Promise<CipherResponse>;\n  getCipherAdmin: (id: string) => Promise<CipherResponse>;\n  getAttachmentData: (\n    cipherId: string,\n    attachmentId: string,\n    emergencyAccessId?: string,\n  ) => Promise<AttachmentResponse>;\n  getCiphersOrganization: (organizationId: string) => Promise<ListResponse<CipherResponse>>;\n  postCipher: (request: CipherRequest) => Promise<CipherResponse>;\n  postCipherCreate: (request: CipherCreateRequest) => Promise<CipherResponse>;\n  postCipherAdmin: (request: CipherCreateRequest) => Promise<CipherResponse>;\n  putCipher: (id: string, request: CipherRequest) => Promise<CipherResponse>;\n  putPartialCipher: (id: string, request: CipherPartialRequest) => Promise<CipherResponse>;\n  putCipherAdmin: (id: string, request: CipherRequest) => Promise<CipherResponse>;\n  deleteCipher: (id: string) => Promise<any>;\n  deleteCipherAdmin: (id: string) => Promise<any>;\n  deleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;\n  deleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise<any>;\n  putMoveCiphers: (request: CipherBulkMoveRequest) => Promise<any>;\n  putShareCipher: (id: string, request: CipherShareRequest) => Promise<CipherResponse>;\n  putShareCiphers: (request: CipherBulkShareRequest) => Promise<any>;\n  putCipherCollections: (\n    id: string,\n    request: CipherCollectionsRequest,\n  ) => Promise<OptionalCipherResponse>;\n  putCipherCollectionsAdmin: (id: string, request: CipherCollectionsRequest) => Promise<any>;\n  postPurgeCiphers: (request: SecretVerificationRequest, organizationId?: string) => Promise<any>;\n  putDeleteCipher: (id: string) => Promise<any>;\n  putDeleteCipherAdmin: (id: string) => Promise<any>;\n  putDeleteManyCiphers: (request: CipherBulkDeleteRequest) => Promise<any>;\n  putDeleteManyCiphersAdmin: (request: CipherBulkDeleteRequest) => Promise<any>;\n  putRestoreCipher: (id: string) => Promise<CipherResponse>;\n  putRestoreCipherAdmin: (id: string) => Promise<CipherResponse>;\n  putRestoreManyCiphers: (\n    request: CipherBulkRestoreRequest,\n  ) => Promise<ListResponse<CipherResponse>>;\n  putRestoreManyCiphersAdmin: (\n    request: CipherBulkRestoreRequest,\n  ) => Promise<ListResponse<CipherResponse>>;\n\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  postCipherAttachmentLegacy: (id: string, data: FormData) => Promise<CipherResponse>;\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  postCipherAttachmentAdminLegacy: (id: string, data: FormData) => Promise<CipherResponse>;\n  postCipherAttachment: (\n    id: string,\n    request: AttachmentRequest,\n  ) => Promise<AttachmentUploadDataResponse>;\n  deleteCipherAttachment: (id: string, attachmentId: string) => Promise<any>;\n  deleteCipherAttachmentAdmin: (id: string, attachmentId: string) => Promise<any>;\n  postShareCipherAttachment: (\n    id: string,\n    attachmentId: string,\n    data: FormData,\n    organizationId: string,\n  ) => Promise<any>;\n  renewAttachmentUploadUrl: (\n    id: string,\n    attachmentId: string,\n  ) => Promise<AttachmentUploadDataResponse>;\n  postAttachmentFile: (id: string, attachmentId: string, data: FormData) => Promise<any>;\n\n  getUserCollections: () => Promise<ListResponse<CollectionResponse>>;\n  getCollections: (organizationId: string) => Promise<ListResponse<CollectionResponse>>;\n  getCollectionUsers: (organizationId: string, id: string) => Promise<SelectionReadOnlyResponse[]>;\n  getCollectionAccessDetails: (\n    organizationId: string,\n    id: string,\n  ) => Promise<CollectionAccessDetailsResponse>;\n  getManyCollectionsWithAccessDetails: (\n    orgId: string,\n  ) => Promise<ListResponse<CollectionAccessDetailsResponse>>;\n  postCollection: (\n    organizationId: string,\n    request: CollectionRequest,\n  ) => Promise<CollectionDetailsResponse>;\n  putCollectionUsers: (\n    organizationId: string,\n    id: string,\n    request: SelectionReadOnlyRequest[],\n  ) => Promise<any>;\n  putCollection: (\n    organizationId: string,\n    id: string,\n    request: CollectionRequest,\n  ) => Promise<CollectionDetailsResponse>;\n  deleteCollection: (organizationId: string, id: string) => Promise<any>;\n  deleteManyCollections: (organizationId: string, collectionIds: string[]) => Promise<any>;\n  deleteCollectionUser: (\n    organizationId: string,\n    id: string,\n    organizationUserId: string,\n  ) => Promise<any>;\n\n  getGroupUsers: (organizationId: string, id: string) => Promise<string[]>;\n  deleteGroupUser: (organizationId: string, id: string, organizationUserId: string) => Promise<any>;\n\n  getSync: () => Promise<SyncResponse>;\n\n  getSettingsDomains: () => Promise<DomainsResponse>;\n  putSettingsDomains: (request: UpdateDomainsRequest) => Promise<DomainsResponse>;\n\n  getTwoFactorProviders: () => Promise<ListResponse<TwoFactorProviderResponse>>;\n  getTwoFactorOrganizationProviders: (\n    organizationId: string,\n  ) => Promise<ListResponse<TwoFactorProviderResponse>>;\n  getTwoFactorAuthenticator: (\n    request: SecretVerificationRequest,\n  ) => Promise<TwoFactorAuthenticatorResponse>;\n  getTwoFactorEmail: (request: SecretVerificationRequest) => Promise<TwoFactorEmailResponse>;\n  getTwoFactorDuo: (request: SecretVerificationRequest) => Promise<TwoFactorDuoResponse>;\n  getTwoFactorOrganizationDuo: (\n    organizationId: string,\n    request: SecretVerificationRequest,\n  ) => Promise<TwoFactorDuoResponse>;\n  getTwoFactorYubiKey: (request: SecretVerificationRequest) => Promise<TwoFactorYubiKeyResponse>;\n  getTwoFactorWebAuthn: (request: SecretVerificationRequest) => Promise<TwoFactorWebAuthnResponse>;\n  getTwoFactorWebAuthnChallenge: (request: SecretVerificationRequest) => Promise<ChallengeResponse>;\n  getTwoFactorRecover: (request: SecretVerificationRequest) => Promise<TwoFactorRecoverResponse>;\n  putTwoFactorAuthenticator: (\n    request: UpdateTwoFactorAuthenticatorRequest,\n  ) => Promise<TwoFactorAuthenticatorResponse>;\n  deleteTwoFactorAuthenticator: (\n    request: DisableTwoFactorAuthenticatorRequest,\n  ) => Promise<TwoFactorProviderResponse>;\n  putTwoFactorEmail: (request: UpdateTwoFactorEmailRequest) => Promise<TwoFactorEmailResponse>;\n  putTwoFactorDuo: (request: UpdateTwoFactorDuoRequest) => Promise<TwoFactorDuoResponse>;\n  putTwoFactorOrganizationDuo: (\n    organizationId: string,\n    request: UpdateTwoFactorDuoRequest,\n  ) => Promise<TwoFactorDuoResponse>;\n  putTwoFactorYubiKey: (\n    request: UpdateTwoFactorYubikeyOtpRequest,\n  ) => Promise<TwoFactorYubiKeyResponse>;\n  putTwoFactorWebAuthn: (\n    request: UpdateTwoFactorWebAuthnRequest,\n  ) => Promise<TwoFactorWebAuthnResponse>;\n  deleteTwoFactorWebAuthn: (\n    request: UpdateTwoFactorWebAuthnDeleteRequest,\n  ) => Promise<TwoFactorWebAuthnResponse>;\n  putTwoFactorDisable: (request: TwoFactorProviderRequest) => Promise<TwoFactorProviderResponse>;\n  putTwoFactorOrganizationDisable: (\n    organizationId: string,\n    request: TwoFactorProviderRequest,\n  ) => Promise<TwoFactorProviderResponse>;\n  postTwoFactorRecover: (request: TwoFactorRecoveryRequest) => Promise<any>;\n  postTwoFactorEmailSetup: (request: TwoFactorEmailRequest) => Promise<any>;\n  postTwoFactorEmail: (request: TwoFactorEmailRequest) => Promise<any>;\n  getDeviceVerificationSettings: () => Promise<DeviceVerificationResponse>;\n  putDeviceVerificationSettings: (\n    request: DeviceVerificationRequest,\n  ) => Promise<DeviceVerificationResponse>;\n\n  getCloudCommunicationsEnabled: () => Promise<boolean>;\n  abstract getOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    id: string,\n    type: OrganizationConnectionType,\n    configType: { new (response: any): TConfig },\n  ): Promise<OrganizationConnectionResponse<TConfig>>;\n  abstract createOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    request: OrganizationConnectionRequest,\n    configType: { new (response: any): TConfig },\n  ): Promise<OrganizationConnectionResponse<TConfig>>;\n  abstract updateOrganizationConnection<TConfig extends OrganizationConnectionConfigApis>(\n    request: OrganizationConnectionRequest,\n    configType: { new (response: any): TConfig },\n    organizationConnectionId: string,\n  ): Promise<OrganizationConnectionResponse<TConfig>>;\n  deleteOrganizationConnection: (id: string) => Promise<void>;\n  getPlans: () => Promise<ListResponse<PlanResponse>>;\n  getTaxRates: () => Promise<ListResponse<TaxRateResponse>>;\n\n  getProviderUsers: (providerId: string) => Promise<ListResponse<ProviderUserUserDetailsResponse>>;\n  getProviderUser: (providerId: string, id: string) => Promise<ProviderUserResponse>;\n  postProviderUserInvite: (providerId: string, request: ProviderUserInviteRequest) => Promise<any>;\n  postProviderUserReinvite: (providerId: string, id: string) => Promise<any>;\n  postManyProviderUserReinvite: (\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ) => Promise<ListResponse<ProviderUserBulkResponse>>;\n  postProviderUserAccept: (\n    providerId: string,\n    id: string,\n    request: ProviderUserAcceptRequest,\n  ) => Promise<any>;\n  postProviderUserConfirm: (\n    providerId: string,\n    id: string,\n    request: ProviderUserConfirmRequest,\n  ) => Promise<any>;\n  postProviderUsersPublicKey: (\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ) => Promise<ListResponse<ProviderUserBulkPublicKeyResponse>>;\n  postProviderUserBulkConfirm: (\n    providerId: string,\n    request: ProviderUserBulkConfirmRequest,\n  ) => Promise<ListResponse<ProviderUserBulkResponse>>;\n  putProviderUser: (\n    providerId: string,\n    id: string,\n    request: ProviderUserUpdateRequest,\n  ) => Promise<any>;\n  deleteProviderUser: (organizationId: string, id: string) => Promise<any>;\n  deleteManyProviderUsers: (\n    providerId: string,\n    request: ProviderUserBulkRequest,\n  ) => Promise<ListResponse<ProviderUserBulkResponse>>;\n  getProviderClients: (\n    providerId: string,\n  ) => Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>>;\n  postProviderAddOrganization: (\n    providerId: string,\n    request: ProviderAddOrganizationRequest,\n  ) => Promise<any>;\n  postProviderCreateOrganization: (\n    providerId: string,\n    request: ProviderOrganizationCreateRequest,\n  ) => Promise<ProviderOrganizationResponse>;\n  deleteProviderOrganization: (providerId: string, organizationId: string) => Promise<any>;\n\n  getEvents: (start: string, end: string, token: string) => Promise<ListResponse<EventResponse>>;\n  getEventsCipher: (\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ) => Promise<ListResponse<EventResponse>>;\n  getEventsOrganization: (\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ) => Promise<ListResponse<EventResponse>>;\n  getEventsOrganizationUser: (\n    organizationId: string,\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ) => Promise<ListResponse<EventResponse>>;\n  getEventsProvider: (\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ) => Promise<ListResponse<EventResponse>>;\n  getEventsProviderUser: (\n    providerId: string,\n    id: string,\n    start: string,\n    end: string,\n    token: string,\n  ) => Promise<ListResponse<EventResponse>>;\n\n  /**\n   * Posts events for a user\n   * @param request The array of events to upload\n   * @param userId The optional user id the events belong to. If no user id is provided the active user id is used.\n   */\n  postEventsCollect: (request: EventRequest[], userId?: UserId) => Promise<any>;\n\n  deleteSsoUser: (organizationId: string) => Promise<void>;\n  getSsoUserIdentifier: () => Promise<string>;\n\n  getUserPublicKey: (id: string) => Promise<UserKeyResponse>;\n\n  getHibpBreach: (username: string) => Promise<BreachAccountResponse[]>;\n\n  postBitPayInvoice: (request: BitPayInvoiceRequest) => Promise<string>;\n  postSetupPayment: () => Promise<string>;\n\n  getActiveBearerToken: () => Promise<string>;\n  fetch: (request: Request) => Promise<Response>;\n  nativeFetch: (request: Request) => Promise<Response>;\n\n  preValidateSso: (identifier: string) => Promise<SsoPreValidateResponse>;\n\n  postCreateSponsorship: (\n    sponsorshipOrgId: string,\n    request: OrganizationSponsorshipCreateRequest,\n  ) => Promise<void>;\n  getSponsorshipSyncStatus: (\n    sponsoredOrgId: string,\n  ) => Promise<OrganizationSponsorshipSyncStatusResponse>;\n  deleteRevokeSponsorship: (sponsoringOrganizationId: string) => Promise<void>;\n  deleteRemoveSponsorship: (sponsoringOrgId: string) => Promise<void>;\n  postPreValidateSponsorshipToken: (\n    sponsorshipToken: string,\n  ) => Promise<PreValidateSponsorshipResponse>;\n  postRedeemSponsorship: (\n    sponsorshipToken: string,\n    request: OrganizationSponsorshipRedeemRequest,\n  ) => Promise<void>;\n  postResendSponsorshipOffer: (sponsoringOrgId: string) => Promise<void>;\n\n  getMasterKeyFromKeyConnector: (keyConnectorUrl: string) => Promise<KeyConnectorUserKeyResponse>;\n  postUserKeyToKeyConnector: (\n    keyConnectorUrl: string,\n    request: KeyConnectorUserKeyRequest,\n  ) => Promise<void>;\n  getKeyConnectorAlive: (keyConnectorUrl: string) => Promise<void>;\n  getOrganizationExport: (organizationId: string) => Promise<OrganizationExportResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BreachAccountResponse } from \"../models/response/breach-account.response\";\n\nexport abstract class AuditService {\n  passwordLeaked: (password: string) => Promise<number>;\n  breachedAccounts: (username: string) => Promise<BreachAccountResponse[]>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EventType } from \"../../enums\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nexport abstract class EventCollectionService {\n  collectMany: (\n    eventType: EventType,\n    ciphers: CipherView[],\n    uploadImmediately?: boolean,\n  ) => Promise<any>;\n  collect: (\n    eventType: EventType,\n    cipherId?: string,\n    uploadImmediately?: boolean,\n    organizationId?: string,\n  ) => Promise<any>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"../../types/guid\";\n\nexport abstract class EventUploadService {\n  uploadEvents: (userId?: UserId) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class NotificationsService {\n  init: () => Promise<void>;\n  updateConnection: (sync?: boolean) => Promise<void>;\n  reconnectFromActivity: () => Promise<void>;\n  disconnectFromInactivity: () => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { SendView } from \"../tools/send/models/view/send.view\";\nimport { IndexedEntityId } from \"../types/guid\";\nimport { CipherView } from \"../vault/models/view/cipher.view\";\n\nexport abstract class SearchService {\n  indexedEntityId$: Observable<IndexedEntityId | null>;\n\n  clearIndex: () => Promise<void>;\n  isSearchable: (query: string) => Promise<boolean>;\n  indexCiphers: (ciphersToIndex: CipherView[], indexedEntityGuid?: string) => Promise<void>;\n  searchCiphers: (\n    query: string,\n    filter?: ((cipher: CipherView) => boolean) | ((cipher: CipherView) => boolean)[],\n    ciphers?: CipherView[],\n  ) => Promise<CipherView[]>;\n  searchCiphersBasic: (ciphers: CipherView[], query: string, deleted?: boolean) => CipherView[];\n  searchSends: (sends: SendView[], query: string) => SendView[];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\n\nexport abstract class VaultTimeoutSettingsService {\n  /**\n   * Set the vault timeout options for the user\n   * @param vaultTimeout The vault timeout in minutes\n   * @param vaultTimeoutAction The vault timeout action\n   * @param userId The user id to set the data for.\n   */\n  setVaultTimeoutOptions: (\n    userId: UserId,\n    vaultTimeout: VaultTimeout,\n    vaultTimeoutAction: VaultTimeoutAction,\n  ) => Promise<void>;\n\n  /**\n   * Get the available vault timeout actions for the current user\n   *\n   * **NOTE:** This observable is not yet connected to the state service, so it will not update when the state changes\n   * @param userId The user id to check. If not provided, the current user is used\n   */\n  availableVaultTimeoutActions$: (userId?: string) => Observable<VaultTimeoutAction[]>;\n\n  /**\n   * Evaluates the user's available vault timeout actions and returns a boolean representing\n   * if the user can lock or not\n   */\n  canLock: (userId: string) => Promise<boolean>;\n\n  /**\n   * Gets the vault timeout action for the given user id. The returned value is\n   * calculated based on the current state, if a max vault timeout policy applies to the user,\n   * and what the user's available unlock methods are.\n   *\n   * A new action will be emitted if the current state changes or if the user's policy changes and the new policy affects the action.\n   * @param userId - the user id to get the vault timeout action for\n   */\n  getVaultTimeoutActionByUserId$: (userId: string) => Observable<VaultTimeoutAction>;\n\n  /**\n   * Get the vault timeout for the given user id. The returned value is calculated based on the current state\n   * and if a max vault timeout policy applies to the user.\n   *\n   * A new timeout will be emitted if the current state changes or if the user's policy changes and the new policy affects the timeout.\n   * @param userId The user id to get the vault timeout for\n   */\n  getVaultTimeoutByUserId$: (userId: string) => Observable<VaultTimeout>;\n\n  /**\n   * Has the user enabled unlock with Biometric.\n   * @param userId The user id to check. If not provided, the current user is used\n   * @returns boolean true if biometric lock is set\n   */\n  isBiometricLockSet: (userId?: string) => Promise<boolean>;\n\n  clear: (userId?: string) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class VaultTimeoutService {\n  checkVaultTimeout: () => Promise<void>;\n  lock: (userId?: string) => Promise<void>;\n  logOut: (userId?: string) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ListResponse } from \"@bitwarden/common/models/response/list.response\";\n\nimport { OrganizationDomainRequest } from \"../../services/organization-domain/requests/organization-domain.request\";\n\nimport { OrganizationDomainSsoDetailsResponse } from \"./responses/organization-domain-sso-details.response\";\nimport { OrganizationDomainResponse } from \"./responses/organization-domain.response\";\nimport { VerifiedOrganizationDomainSsoDetailsResponse } from \"./responses/verified-organization-domain-sso-details.response\";\n\nexport abstract class OrgDomainApiServiceAbstraction {\n  getAllByOrgId: (orgId: string) => Promise<Array<OrganizationDomainResponse>>;\n  getByOrgIdAndOrgDomainId: (\n    orgId: string,\n    orgDomainId: string,\n  ) => Promise<OrganizationDomainResponse>;\n  post: (\n    orgId: string,\n    orgDomain: OrganizationDomainRequest,\n  ) => Promise<OrganizationDomainResponse>;\n  verify: (orgId: string, orgDomainId: string) => Promise<OrganizationDomainResponse>;\n  delete: (orgId: string, orgDomainId: string) => Promise<any>;\n  getClaimedOrgDomainByEmail: (email: string) => Promise<OrganizationDomainSsoDetailsResponse>;\n  getVerifiedOrgDomainsByEmail: (\n    email: string,\n  ) => Promise<ListResponse<VerifiedOrganizationDomainSsoDetailsResponse>>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\n/**\n * Manages the state of a single organization management preference.\n * Can be used to subscribe to or update a given property.\n */\nexport class OrganizationManagementPreference<T> {\n  state$: Observable<T>;\n  set: (value: T) => Promise<void>;\n\n  constructor(state$: Observable<T>, setFn: (value: T) => Promise<void>) {\n    this.state$ = state$;\n    this.set = setFn;\n  }\n}\n\n/**\n * Publishes state of a given user's personal settings relating to the user experience of managing an organization.\n */\nexport abstract class OrganizationManagementPreferencesService {\n  autoConfirmFingerPrints: OrganizationManagementPreference<boolean>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BillingHistoryResponse } from \"@bitwarden/common/billing/models/response/billing-history.response\";\n\nimport { OrganizationApiKeyRequest } from \"../../../admin-console/models/request/organization-api-key.request\";\nimport { OrganizationSsoRequest } from \"../../../auth/models/request/organization-sso.request\";\nimport { SecretVerificationRequest } from \"../../../auth/models/request/secret-verification.request\";\nimport { ApiKeyResponse } from \"../../../auth/models/response/api-key.response\";\nimport { OrganizationSsoResponse } from \"../../../auth/models/response/organization-sso.response\";\nimport { ExpandedTaxInfoUpdateRequest } from \"../../../billing/models/request/expanded-tax-info-update.request\";\nimport { OrganizationNoPaymentMethodCreateRequest } from \"../../../billing/models/request/organization-no-payment-method-create-request\";\nimport { OrganizationSmSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-sm-subscription-update.request\";\nimport { OrganizationSubscriptionUpdateRequest } from \"../../../billing/models/request/organization-subscription-update.request\";\nimport { PaymentRequest } from \"../../../billing/models/request/payment.request\";\nimport { SecretsManagerSubscribeRequest } from \"../../../billing/models/request/sm-subscribe.request\";\nimport { BillingResponse } from \"../../../billing/models/response/billing.response\";\nimport { OrganizationSubscriptionResponse } from \"../../../billing/models/response/organization-subscription.response\";\nimport { PaymentResponse } from \"../../../billing/models/response/payment.response\";\nimport { TaxInfoResponse } from \"../../../billing/models/response/tax-info.response\";\nimport { ImportDirectoryRequest } from \"../../../models/request/import-directory.request\";\nimport { SeatRequest } from \"../../../models/request/seat.request\";\nimport { StorageRequest } from \"../../../models/request/storage.request\";\nimport { VerifyBankRequest } from \"../../../models/request/verify-bank.request\";\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { OrganizationApiKeyType } from \"../../enums\";\nimport { OrganizationCollectionManagementUpdateRequest } from \"../../models/request/organization-collection-management-update.request\";\nimport { OrganizationCreateRequest } from \"../../models/request/organization-create.request\";\nimport { OrganizationKeysRequest } from \"../../models/request/organization-keys.request\";\nimport { OrganizationUpdateRequest } from \"../../models/request/organization-update.request\";\nimport { OrganizationUpgradeRequest } from \"../../models/request/organization-upgrade.request\";\nimport { OrganizationVerifyDeleteRecoverRequest } from \"../../models/request/organization-verify-delete-recover.request\";\nimport { OrganizationApiKeyInformationResponse } from \"../../models/response/organization-api-key-information.response\";\nimport { OrganizationAutoEnrollStatusResponse } from \"../../models/response/organization-auto-enroll-status.response\";\nimport { OrganizationKeysResponse } from \"../../models/response/organization-keys.response\";\nimport { OrganizationResponse } from \"../../models/response/organization.response\";\nimport { ProfileOrganizationResponse } from \"../../models/response/profile-organization.response\";\n\nexport class OrganizationApiServiceAbstraction {\n  get: (id: string) => Promise<OrganizationResponse>;\n  getBilling: (id: string) => Promise<BillingResponse>;\n  getBillingHistory: (id: string) => Promise<BillingHistoryResponse>;\n  getSubscription: (id: string) => Promise<OrganizationSubscriptionResponse>;\n  getLicense: (id: string, installationId: string) => Promise<unknown>;\n  getAutoEnrollStatus: (identifier: string) => Promise<OrganizationAutoEnrollStatusResponse>;\n  create: (request: OrganizationCreateRequest) => Promise<OrganizationResponse>;\n  createWithoutPayment: (\n    request: OrganizationNoPaymentMethodCreateRequest,\n  ) => Promise<OrganizationResponse>;\n  createLicense: (data: FormData) => Promise<OrganizationResponse>;\n  save: (id: string, request: OrganizationUpdateRequest) => Promise<OrganizationResponse>;\n  updatePayment: (id: string, request: PaymentRequest) => Promise<void>;\n  upgrade: (id: string, request: OrganizationUpgradeRequest) => Promise<PaymentResponse>;\n  updatePasswordManagerSeats: (\n    id: string,\n    request: OrganizationSubscriptionUpdateRequest,\n  ) => Promise<ProfileOrganizationResponse>;\n  updateSecretsManagerSubscription: (\n    id: string,\n    request: OrganizationSmSubscriptionUpdateRequest,\n  ) => Promise<ProfileOrganizationResponse>;\n  updateSeats: (id: string, request: SeatRequest) => Promise<PaymentResponse>;\n  updateStorage: (id: string, request: StorageRequest) => Promise<PaymentResponse>;\n  verifyBank: (id: string, request: VerifyBankRequest) => Promise<void>;\n  reinstate: (id: string) => Promise<void>;\n  leave: (id: string) => Promise<void>;\n  delete: (id: string, request: SecretVerificationRequest) => Promise<void>;\n  deleteUsingToken: (\n    organizationId: string,\n    request: OrganizationVerifyDeleteRecoverRequest,\n  ) => Promise<any>;\n  updateLicense: (id: string, data: FormData) => Promise<void>;\n  importDirectory: (organizationId: string, request: ImportDirectoryRequest) => Promise<void>;\n  getOrCreateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise<ApiKeyResponse>;\n  getApiKeyInformation: (\n    id: string,\n    organizationApiKeyType?: OrganizationApiKeyType,\n  ) => Promise<ListResponse<OrganizationApiKeyInformationResponse>>;\n  rotateApiKey: (id: string, request: OrganizationApiKeyRequest) => Promise<ApiKeyResponse>;\n  getTaxInfo: (id: string) => Promise<TaxInfoResponse>;\n  updateTaxInfo: (id: string, request: ExpandedTaxInfoUpdateRequest) => Promise<void>;\n  getKeys: (id: string) => Promise<OrganizationKeysResponse>;\n  updateKeys: (id: string, request: OrganizationKeysRequest) => Promise<OrganizationKeysResponse>;\n  getSso: (id: string) => Promise<OrganizationSsoResponse>;\n  updateSso: (id: string, request: OrganizationSsoRequest) => Promise<OrganizationSsoResponse>;\n  selfHostedSyncLicense: (id: string) => Promise<void>;\n  subscribeToSecretsManager: (\n    id: string,\n    request: SecretsManagerSubscribeRequest,\n  ) => Promise<ProfileOrganizationResponse>;\n  updateCollectionManagement: (\n    id: string,\n    request: OrganizationCollectionManagementUpdateRequest,\n  ) => Promise<OrganizationResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { OrganizationData } from \"../../models/data/organization.data\";\nimport { Organization } from \"../../models/domain/organization\";\n\nexport function canAccessVaultTab(org: Organization): boolean {\n  return org.canViewAllCollections;\n}\n\nexport function canAccessSettingsTab(org: Organization): boolean {\n  return (\n    org.isOwner ||\n    org.canManagePolicies ||\n    org.canManageSso ||\n    org.canManageScim ||\n    org.canAccessImport ||\n    org.canAccessExport(false) || // Feature flag value doesn't matter here, providers will have access to this group anyway\n    org.canManageDeviceApprovals\n  );\n}\n\nexport function canAccessMembersTab(org: Organization): boolean {\n  return org.canManageUsers || org.canManageUsersPassword;\n}\n\nexport function canAccessGroupsTab(org: Organization): boolean {\n  return org.canManageGroups;\n}\n\nexport function canAccessReportingTab(org: Organization): boolean {\n  return org.canAccessReports || org.canAccessEventLogs;\n}\n\nexport function canAccessBillingTab(org: Organization): boolean {\n  return org.isOwner;\n}\n\nexport function canAccessOrgAdmin(org: Organization): boolean {\n  // Admin console can only be accessed by Owners for disabled organizations\n  if (!org.enabled && !org.isOwner) {\n    return false;\n  }\n  return (\n    canAccessMembersTab(org) ||\n    canAccessGroupsTab(org) ||\n    canAccessReportingTab(org) ||\n    canAccessBillingTab(org) ||\n    canAccessSettingsTab(org) ||\n    canAccessVaultTab(org)\n  );\n}\n\nexport function getOrganizationById(id: string) {\n  return map<Organization[], Organization | undefined>((orgs) => orgs.find((o) => o.id === id));\n}\n\n/**\n * Returns `true` if a user is a member of an organization (rather than only being a ProviderUser)\n * @deprecated Use organizationService.organizations$ with a filter instead\n */\nexport function isMember(org: Organization): boolean {\n  return org.isMember;\n}\n\n/**\n * Publishes an observable stream of organizations. This service is meant to\n * be used widely across Bitwarden as the primary way of fetching organizations.\n * Risky operations like updates are isolated to the\n * internal extension `InternalOrganizationServiceAbstraction`.\n */\nexport abstract class OrganizationService {\n  /**\n   * Publishes state for all organizations under the active user.\n   * @returns An observable list of organizations\n   */\n  organizations$: Observable<Organization[]>;\n\n  // @todo Clean these up. Continuing to expand them is not recommended.\n  // @see https://bitwarden.atlassian.net/browse/AC-2252\n  memberOrganizations$: Observable<Organization[]>;\n  /**\n   * @deprecated This is currently only used in the CLI, and should not be\n   * used in any new calls. Use get$ instead for the time being, and we'll be\n   * removing this method soon. See Jira for details:\n   * https://bitwarden.atlassian.net/browse/AC-2252.\n   */\n  getFromState: (id: string) => Promise<Organization>;\n  /**\n   * Emits true if the user can create or manage a Free Bitwarden Families sponsorship.\n   */\n  canManageSponsorships$: Observable<boolean>;\n  /**\n   * Emits true if any of the user's organizations have a Free Bitwarden Families sponsorship available.\n   */\n  familySponsorshipAvailable$: Observable<boolean>;\n  hasOrganizations: () => Promise<boolean>;\n  get$: (id: string) => Observable<Organization | undefined>;\n  get: (id: string) => Promise<Organization>;\n  /**\n   * @deprecated This method is only used in key connector and will be removed soon as part of https://bitwarden.atlassian.net/browse/AC-2252.\n   */\n  getAll: (userId?: string) => Promise<Organization[]>;\n\n  /**\n   * Publishes state for all organizations for the given user id or the active user.\n   */\n  getAll$: (userId?: UserId) => Observable<Organization[]>;\n}\n\n/**\n * Big scary buttons that **update** organization state. These should only be\n * called from within admin-console scoped code. Extends the base\n * `OrganizationService` for easy access to `get` calls.\n * @internal\n */\nexport abstract class InternalOrganizationServiceAbstraction extends OrganizationService {\n  /**\n   * Replaces state for the provided organization, or creates it if not found.\n   * @param organization The organization state being saved.\n   * @param userId The userId to replace state for. Defaults to the active\n   * user.\n   */\n  upsert: (OrganizationData: OrganizationData) => Promise<void>;\n\n  /**\n   * Replaces state for the entire registered organization list for the active user.\n   * You probably don't want this unless you're calling from a full sync\n   * operation or a logout. See `upsert` for creating & updating a single\n   * organization in the state.\n   * @param organizations A complete list of all organization state for the active\n   * user.\n   * @param userId The userId to replace state for. Defaults to the active\n   * user.\n   */\n  replace: (organizations: { [id: string]: OrganizationData }, userId?: UserId) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { PolicyType } from \"../../enums\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { PolicyRequest } from \"../../models/request/policy.request\";\nimport { PolicyResponse } from \"../../models/response/policy.response\";\n\nexport class PolicyApiServiceAbstraction {\n  getPolicy: (organizationId: string, type: PolicyType) => Promise<PolicyResponse>;\n  getPolicies: (organizationId: string) => Promise<ListResponse<PolicyResponse>>;\n\n  getPoliciesByToken: (\n    organizationId: string,\n    token: string,\n    email: string,\n    organizationUserId: string,\n  ) => Promise<Policy[] | undefined>;\n\n  getMasterPasswordPolicyOptsForOrgUser: (\n    orgId: string,\n  ) => Promise<MasterPasswordPolicyOptions | null>;\n  putPolicy: (organizationId: string, type: PolicyType, request: PolicyRequest) => Promise<any>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../../models/data/policy.data\";\nimport { MasterPasswordPolicyOptions } from \"../../models/domain/master-password-policy-options\";\nimport { Policy } from \"../../models/domain/policy\";\nimport { ResetPasswordPolicyOptions } from \"../../models/domain/reset-password-policy-options\";\n\nexport abstract class PolicyService {\n  /**\n   * All policies for the active user from sync data.\n   * May include policies that are disabled or otherwise do not apply to the user. Be careful using this!\n   * Consider using {@link get$} or {@link getAll$} instead, which will only return policies that should be enforced against the user.\n   */\n  policies$: Observable<Policy[]>;\n\n  /**\n   * @returns the first {@link Policy} found that applies to the active user.\n   * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n   * @param policyType the {@link PolicyType} to search for\n   * @see {@link getAll$} if you need all policies of a given type\n   */\n  get$: (policyType: PolicyType) => Observable<Policy>;\n\n  /**\n   * @returns all {@link Policy} objects of a given type that apply to the specified user (or the active user if not specified).\n   * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n   * @param policyType the {@link PolicyType} to search for\n   */\n  getAll$: (policyType: PolicyType, userId?: UserId) => Observable<Policy[]>;\n\n  /**\n   * All {@link Policy} objects for the specified user (from sync data).\n   * May include policies that are disabled or otherwise do not apply to the user.\n   * Consider using {@link getAll$} instead, which will only return policies that should be enforced against the user.\n   */\n  getAll: (policyType: PolicyType) => Promise<Policy[]>;\n\n  /**\n   * @returns true if a policy of the specified type applies to the active user, otherwise false.\n   * A policy \"applies\" if it is enabled and the user is not exempt (e.g. because they are an Owner).\n   * This does not take into account the policy's configuration - if that is important, use {@link getAll$} to get the\n   * {@link Policy} objects and then filter by Policy.data.\n   */\n  policyAppliesToActiveUser$: (policyType: PolicyType) => Observable<boolean>;\n\n  policyAppliesToUser: (policyType: PolicyType) => Promise<boolean>;\n\n  // Policy specific interfaces\n\n  /**\n   * Combines all Master Password policies that apply to the user.\n   * @returns a set of options which represent the minimum Master Password settings that the user must\n   * comply with in order to comply with **all** Master Password policies.\n   */\n  masterPasswordPolicyOptions$: (policies?: Policy[]) => Observable<MasterPasswordPolicyOptions>;\n\n  /**\n   * Evaluates whether a proposed Master Password complies with all Master Password policies that apply to the user.\n   */\n  evaluateMasterPassword: (\n    passwordStrength: number,\n    newPassword: string,\n    enforcedPolicyOptions?: MasterPasswordPolicyOptions,\n  ) => boolean;\n\n  /**\n   * @returns Reset Password policy options for the specified organization and a boolean indicating whether the policy\n   * is enabled\n   */\n  getResetPasswordPolicyOptions: (\n    policies: Policy[],\n    orgId: string,\n  ) => [ResetPasswordPolicyOptions, boolean];\n}\n\nexport abstract class InternalPolicyService extends PolicyService {\n  upsert: (policy: PolicyData) => Promise<void>;\n  replace: (policies: { [id: string]: PolicyData }, userId: UserId) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { ProviderData } from \"../models/data/provider.data\";\nimport { Provider } from \"../models/domain/provider\";\n\nexport abstract class ProviderService {\n  get$: (id: string) => Observable<Provider>;\n  get: (id: string) => Promise<Provider>;\n  getAll: () => Promise<Provider[]>;\n  save: (providers: { [id: string]: ProviderData }, userId?: UserId) => Promise<any>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ProviderSetupRequest } from \"../../models/request/provider/provider-setup.request\";\nimport { ProviderUpdateRequest } from \"../../models/request/provider/provider-update.request\";\nimport { ProviderVerifyRecoverDeleteRequest } from \"../../models/request/provider/provider-verify-recover-delete.request\";\nimport { ProviderResponse } from \"../../models/response/provider/provider.response\";\n\nexport class ProviderApiServiceAbstraction {\n  postProviderSetup: (id: string, request: ProviderSetupRequest) => Promise<ProviderResponse>;\n  getProvider: (id: string) => Promise<ProviderResponse>;\n  putProvider: (id: string, request: ProviderUpdateRequest) => Promise<ProviderResponse>;\n  providerRecoverDeleteToken: (\n    organizationId: string,\n    request: ProviderVerifyRecoverDeleteRequest,\n  ) => Promise<any>;\n  deleteProvider: (id: string) => Promise<void>;\n}\n","export enum OrganizationApiKeyType {\n  Default = 0,\n  BillingSync = 1,\n  Scim = 2,\n}\n","export enum OrganizationConnectionType {\n  CloudBillingSync = 1,\n  Scim = 2,\n}\n","export enum OrganizationUserStatusType {\n  Invited = 0,\n  Accepted = 1,\n  Confirmed = 2,\n  Revoked = -1,\n}\n","export enum OrganizationUserType {\n  Owner = 0,\n  Admin = 1,\n  User = 2,\n  // Manager = 3 has been intentionally permanently deleted\n  Custom = 4,\n}\n","export enum PolicyType {\n  TwoFactorAuthentication = 0, // Requires users to have 2fa enabled\n  MasterPassword = 1, // Sets minimum requirements for master password complexity\n  PasswordGenerator = 2, // Sets minimum requirements/default type for generated passwords/passphrases\n  SingleOrg = 3, // Allows users to only be apart of one organization\n  RequireSso = 4, // Requires users to authenticate with SSO\n  PersonalOwnership = 5, // Disables personal vault ownership for adding/cloning items\n  DisableSend = 6, // Disables the ability to create and edit Bitwarden Sends\n  SendOptions = 7, // Sets restrictions or defaults for Bitwarden Sends\n  ResetPassword = 8, // Allows orgs to use reset password : also can enable auto-enrollment during invite flow\n  MaximumVaultTimeout = 9, // Sets the maximum allowed vault timeout\n  DisablePersonalVaultExport = 10, // Disable personal vault export\n  ActivateAutofill = 11, // Activates autofill with page load on the browser extension\n  AutomaticAppLogIn = 12, // Enables automatic log in of apps from configured identity provider\n  FreeFamiliesSponsorshipPolicy = 13, // Disables free families plan for organization\n}\n","export enum ProviderType {\n  Msp = 0,\n  Reseller = 1,\n  MultiOrganizationEnterprise = 2,\n}\n","export enum ProviderUserStatusType {\n  Invited = 0,\n  Accepted = 1,\n  Confirmed = 2,\n  Revoked = -1, // Not used, compile-time support only\n}\n","export enum ProviderUserType {\n  ProviderAdmin = 0,\n  ServiceUser = 1,\n}\n","export enum ScimProviderType {\n  Default = 0,\n  AzureAd = 1,\n  Okta = 2,\n  OneLogin = 3,\n  JumpCloud = 4,\n  GoogleWorkspace = 5,\n  Rippling = 6,\n}\n","export enum ProviderStatusType {\n  Pending = 0,\n  Created = 1,\n  Billable = 2,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PermissionsApi extends BaseResponse {\n  accessEventLogs: boolean;\n  accessImportExport: boolean;\n  accessReports: boolean;\n  createNewCollections: boolean;\n  editAnyCollection: boolean;\n  deleteAnyCollection: boolean;\n  manageCiphers: boolean;\n  manageGroups: boolean;\n  manageSso: boolean;\n  managePolicies: boolean;\n  manageUsers: boolean;\n  manageResetPassword: boolean;\n  manageScim: boolean;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return this;\n    }\n    this.accessEventLogs = this.getResponseProperty(\"AccessEventLogs\");\n    this.accessImportExport = this.getResponseProperty(\"AccessImportExport\");\n    this.accessReports = this.getResponseProperty(\"AccessReports\");\n\n    this.createNewCollections = this.getResponseProperty(\"CreateNewCollections\");\n    this.editAnyCollection = this.getResponseProperty(\"EditAnyCollection\");\n    this.deleteAnyCollection = this.getResponseProperty(\"DeleteAnyCollection\");\n\n    this.manageCiphers = this.getResponseProperty(\"ManageCiphers\");\n    this.manageGroups = this.getResponseProperty(\"ManageGroups\");\n    this.manageSso = this.getResponseProperty(\"ManageSso\");\n    this.managePolicies = this.getResponseProperty(\"ManagePolicies\");\n    this.manageUsers = this.getResponseProperty(\"ManageUsers\");\n    this.manageResetPassword = this.getResponseProperty(\"ManageResetPassword\");\n    this.manageScim = this.getResponseProperty(\"ManageScim\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { ProductTierType } from \"../../../billing/enums\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\nimport { ProfileOrganizationResponse } from \"../response/profile-organization.response\";\n\nexport class OrganizationData {\n  id: string;\n  name: string;\n  status: OrganizationUserStatusType;\n  type: OrganizationUserType;\n  enabled: boolean;\n  usePolicies: boolean;\n  useGroups: boolean;\n  useDirectory: boolean;\n  useEvents: boolean;\n  useTotp: boolean;\n  use2fa: boolean;\n  useApi: boolean;\n  useSso: boolean;\n  useKeyConnector: boolean;\n  useScim: boolean;\n  useCustomPermissions: boolean;\n  useResetPassword: boolean;\n  useSecretsManager: boolean;\n  usePasswordManager: boolean;\n  useActivateAutofillPolicy: boolean;\n  selfHost: boolean;\n  usersGetPremium: boolean;\n  seats: number;\n  maxCollections: number;\n  maxStorageGb?: number;\n  ssoBound: boolean;\n  identifier: string;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  userId: string;\n  organizationUserId: string;\n  hasPublicAndPrivateKeys: boolean;\n  providerId: string;\n  providerName: string;\n  providerType?: ProviderType;\n  isProviderUser: boolean;\n  isMember: boolean;\n  familySponsorshipFriendlyName: string;\n  familySponsorshipAvailable: boolean;\n  productTierType: ProductTierType;\n  keyConnectorEnabled: boolean;\n  keyConnectorUrl: string;\n  familySponsorshipLastSyncDate?: Date;\n  familySponsorshipValidUntil?: Date;\n  familySponsorshipToDelete?: boolean;\n  accessSecretsManager: boolean;\n  limitCollectionCreation: boolean;\n  limitCollectionDeletion: boolean;\n  allowAdminAccessToAllCollectionItems: boolean;\n  userIsManagedByOrganization: boolean;\n  useRiskInsights: boolean;\n\n  constructor(\n    response?: ProfileOrganizationResponse,\n    options?: {\n      isMember: boolean;\n      isProviderUser: boolean;\n    },\n  ) {\n    if (response == null) {\n      return;\n    }\n\n    this.id = response.id;\n    this.name = response.name;\n    this.status = response.status;\n    this.type = response.type;\n    this.enabled = response.enabled;\n    this.usePolicies = response.usePolicies;\n    this.useGroups = response.useGroups;\n    this.useDirectory = response.useDirectory;\n    this.useEvents = response.useEvents;\n    this.useTotp = response.useTotp;\n    this.use2fa = response.use2fa;\n    this.useApi = response.useApi;\n    this.useSso = response.useSso;\n    this.useKeyConnector = response.useKeyConnector;\n    this.useScim = response.useScim;\n    this.useCustomPermissions = response.useCustomPermissions;\n    this.useResetPassword = response.useResetPassword;\n    this.useSecretsManager = response.useSecretsManager;\n    this.usePasswordManager = response.usePasswordManager;\n    this.useActivateAutofillPolicy = response.useActivateAutofillPolicy;\n    this.selfHost = response.selfHost;\n    this.usersGetPremium = response.usersGetPremium;\n    this.seats = response.seats;\n    this.maxCollections = response.maxCollections;\n    this.maxStorageGb = response.maxStorageGb;\n    this.ssoBound = response.ssoBound;\n    this.identifier = response.identifier;\n    this.permissions = response.permissions;\n    this.resetPasswordEnrolled = response.resetPasswordEnrolled;\n    this.userId = response.userId;\n    this.organizationUserId = response.organizationUserId;\n    this.hasPublicAndPrivateKeys = response.hasPublicAndPrivateKeys;\n    this.providerId = response.providerId;\n    this.providerName = response.providerName;\n    this.providerType = response.providerType;\n    this.familySponsorshipFriendlyName = response.familySponsorshipFriendlyName;\n    this.familySponsorshipAvailable = response.familySponsorshipAvailable;\n    this.productTierType = response.productTierType;\n    this.keyConnectorEnabled = response.keyConnectorEnabled;\n    this.keyConnectorUrl = response.keyConnectorUrl;\n    this.familySponsorshipLastSyncDate = response.familySponsorshipLastSyncDate;\n    this.familySponsorshipValidUntil = response.familySponsorshipValidUntil;\n    this.familySponsorshipToDelete = response.familySponsorshipToDelete;\n    this.accessSecretsManager = response.accessSecretsManager;\n    this.limitCollectionCreation = response.limitCollectionCreation;\n    this.limitCollectionDeletion = response.limitCollectionDeletion;\n    this.allowAdminAccessToAllCollectionItems = response.allowAdminAccessToAllCollectionItems;\n    this.userIsManagedByOrganization = response.userIsManagedByOrganization;\n    this.useRiskInsights = response.useRiskInsights;\n\n    this.isMember = options.isMember;\n    this.isProviderUser = options.isProviderUser;\n  }\n\n  static fromJSON(obj: Jsonify<OrganizationData>) {\n    return Object.assign(new OrganizationData(), obj, {\n      familySponsorshipLastSyncDate:\n        obj.familySponsorshipLastSyncDate != null\n          ? new Date(obj.familySponsorshipLastSyncDate)\n          : obj.familySponsorshipLastSyncDate,\n      familySponsorshipValidUntil:\n        obj.familySponsorshipValidUntil != null\n          ? new Date(obj.familySponsorshipValidUntil)\n          : obj.familySponsorshipValidUntil,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { Policy } from \"../domain/policy\";\nimport { PolicyResponse } from \"../response/policy.response\";\n\nexport class PolicyData {\n  id: PolicyId;\n  organizationId: string;\n  type: PolicyType;\n  data: Record<string, string | number | boolean>;\n  enabled: boolean;\n\n  constructor(response?: PolicyResponse) {\n    if (response == null) {\n      return;\n    }\n\n    this.id = response.id;\n    this.organizationId = response.organizationId;\n    this.type = response.type;\n    this.data = response.data;\n    this.enabled = response.enabled;\n  }\n\n  static fromPolicy(policy: Policy): PolicyData {\n    return Object.assign(new PolicyData(), policy);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { MasterPasswordPolicyResponse } from \"../../../auth/models/response/master-password-policy.response\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\n\nexport class MasterPasswordPolicyOptions extends Domain {\n  minComplexity = 0;\n  minLength = 0;\n  requireUpper = false;\n  requireLower = false;\n  requireNumbers = false;\n  requireSpecial = false;\n\n  /**\n   * Flag to indicate if the policy should be enforced on login.\n   * If true, and the user's password does not meet the policy requirements,\n   * the user will be forced to update their password.\n   */\n  enforceOnLogin = false;\n\n  static fromResponse(policy: MasterPasswordPolicyResponse): MasterPasswordPolicyOptions {\n    if (policy == null) {\n      return null;\n    }\n    const options = new MasterPasswordPolicyOptions();\n    options.minComplexity = policy.minComplexity;\n    options.minLength = policy.minLength;\n    options.requireUpper = policy.requireUpper;\n    options.requireLower = policy.requireLower;\n    options.requireNumbers = policy.requireNumbers;\n    options.requireSpecial = policy.requireSpecial;\n    options.enforceOnLogin = policy.enforceOnLogin;\n    return options;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { ProductTierType } from \"../../../billing/enums\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\nimport { OrganizationData } from \"../data/organization.data\";\n\nexport class Organization {\n  id: string;\n  name: string;\n  status: OrganizationUserStatusType;\n\n  /**\n   * The member's role in the organization.\n   * Avoid using this for permission checks - use the getters instead (e.g. isOwner, isAdmin, canManageX), because they\n   * properly handle permission inheritance and relationships.\n   */\n  type: OrganizationUserType;\n\n  enabled: boolean;\n  usePolicies: boolean;\n  useGroups: boolean;\n  useDirectory: boolean;\n  useEvents: boolean;\n  useTotp: boolean;\n  use2fa: boolean;\n  useApi: boolean;\n  useSso: boolean;\n  useKeyConnector: boolean;\n  useScim: boolean;\n  useCustomPermissions: boolean;\n  useResetPassword: boolean;\n  useSecretsManager: boolean;\n  usePasswordManager: boolean;\n  useActivateAutofillPolicy: boolean;\n  selfHost: boolean;\n  usersGetPremium: boolean;\n  seats: number;\n  maxCollections: number;\n  maxStorageGb?: number;\n  ssoBound: boolean;\n  identifier: string;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  userId: string;\n  organizationUserId: string;\n  hasPublicAndPrivateKeys: boolean;\n  providerId: string;\n  providerName: string;\n  providerType?: ProviderType;\n  /**\n   * Indicates that a user is a ProviderUser for the organization\n   */\n  isProviderUser: boolean;\n  /**\n   * Indicates that a user is a member for the organization (may be `false` if they have access via a Provider only)\n   */\n  isMember: boolean;\n  familySponsorshipFriendlyName: string;\n  familySponsorshipAvailable: boolean;\n  productTierType: ProductTierType;\n  keyConnectorEnabled: boolean;\n  keyConnectorUrl: string;\n  familySponsorshipLastSyncDate?: Date;\n  familySponsorshipValidUntil?: Date;\n  familySponsorshipToDelete?: boolean;\n  accessSecretsManager: boolean;\n  /**\n   * Refers to the ability for an organization to limit collection creation and deletion to owners and admins only\n   */\n  limitCollectionCreation: boolean;\n  limitCollectionDeletion: boolean;\n\n  /**\n   * Refers to the ability for an owner/admin to access all collection items, regardless of assigned collections\n   */\n  allowAdminAccessToAllCollectionItems: boolean;\n  /**\n   * Indicates if this organization manages the user.\n   * A user is considered managed by an organization if their email domain\n   * matches one of the verified domains of that organization, and the user is a member of it.\n   */\n  userIsManagedByOrganization: boolean;\n  useRiskInsights: boolean;\n\n  constructor(obj?: OrganizationData) {\n    if (obj == null) {\n      return;\n    }\n\n    this.id = obj.id;\n    this.name = obj.name;\n    this.status = obj.status;\n    this.type = obj.type;\n    this.enabled = obj.enabled;\n    this.usePolicies = obj.usePolicies;\n    this.useGroups = obj.useGroups;\n    this.useDirectory = obj.useDirectory;\n    this.useEvents = obj.useEvents;\n    this.useTotp = obj.useTotp;\n    this.use2fa = obj.use2fa;\n    this.useApi = obj.useApi;\n    this.useSso = obj.useSso;\n    this.useKeyConnector = obj.useKeyConnector;\n    this.useScim = obj.useScim;\n    this.useCustomPermissions = obj.useCustomPermissions;\n    this.useResetPassword = obj.useResetPassword;\n    this.useSecretsManager = obj.useSecretsManager;\n    this.usePasswordManager = obj.usePasswordManager;\n    this.useActivateAutofillPolicy = obj.useActivateAutofillPolicy;\n    this.selfHost = obj.selfHost;\n    this.usersGetPremium = obj.usersGetPremium;\n    this.seats = obj.seats;\n    this.maxCollections = obj.maxCollections;\n    this.maxStorageGb = obj.maxStorageGb;\n    this.ssoBound = obj.ssoBound;\n    this.identifier = obj.identifier;\n    this.permissions = obj.permissions;\n    this.resetPasswordEnrolled = obj.resetPasswordEnrolled;\n    this.userId = obj.userId;\n    this.organizationUserId = obj.organizationUserId;\n    this.hasPublicAndPrivateKeys = obj.hasPublicAndPrivateKeys;\n    this.providerId = obj.providerId;\n    this.providerName = obj.providerName;\n    this.providerType = obj.providerType;\n    this.isProviderUser = obj.isProviderUser;\n    this.isMember = obj.isMember;\n    this.familySponsorshipFriendlyName = obj.familySponsorshipFriendlyName;\n    this.familySponsorshipAvailable = obj.familySponsorshipAvailable;\n    this.productTierType = obj.productTierType;\n    this.keyConnectorEnabled = obj.keyConnectorEnabled;\n    this.keyConnectorUrl = obj.keyConnectorUrl;\n    this.familySponsorshipLastSyncDate = obj.familySponsorshipLastSyncDate;\n    this.familySponsorshipValidUntil = obj.familySponsorshipValidUntil;\n    this.familySponsorshipToDelete = obj.familySponsorshipToDelete;\n    this.accessSecretsManager = obj.accessSecretsManager;\n    this.limitCollectionCreation = obj.limitCollectionCreation;\n    this.limitCollectionDeletion = obj.limitCollectionDeletion;\n    this.allowAdminAccessToAllCollectionItems = obj.allowAdminAccessToAllCollectionItems;\n    this.userIsManagedByOrganization = obj.userIsManagedByOrganization;\n    this.useRiskInsights = obj.useRiskInsights;\n  }\n\n  get canAccess() {\n    if (this.isOwner) {\n      return true;\n    }\n    return this.enabled && this.status === OrganizationUserStatusType.Confirmed;\n  }\n\n  /**\n   * Whether a user has Admin permissions or greater\n   */\n  get isAdmin() {\n    return this.type === OrganizationUserType.Admin || this.isOwner;\n  }\n\n  /**\n   * Whether a user has Owner permissions (including ProviderUsers)\n   */\n  get isOwner() {\n    return this.type === OrganizationUserType.Owner || this.isProviderUser;\n  }\n\n  get canAccessEventLogs() {\n    return (this.isAdmin || this.permissions.accessEventLogs) && this.useEvents;\n  }\n\n  /**\n   * Returns true if the user can access the Import page in the Admin Console.\n   * Note: this does not affect user access to the Import page in Password Manager, which can also be used to import\n   * into organization collections.\n   */\n  get canAccessImport() {\n    return (\n      this.isProviderUser ||\n      this.type === OrganizationUserType.Owner ||\n      this.type === OrganizationUserType.Admin ||\n      this.permissions.accessImportExport\n    );\n  }\n\n  canAccessExport(removeProviderExport: boolean) {\n    if (!removeProviderExport && this.isProviderUser) {\n      return true;\n    }\n\n    return (\n      this.isMember &&\n      (this.type === OrganizationUserType.Owner ||\n        this.type === OrganizationUserType.Admin ||\n        this.permissions.accessImportExport)\n    );\n  }\n\n  get canAccessReports() {\n    return this.isAdmin || this.permissions.accessReports;\n  }\n\n  get canCreateNewCollections() {\n    return !this.limitCollectionCreation || this.isAdmin || this.permissions.createNewCollections;\n  }\n\n  get canEditAnyCollection() {\n    // The allowAdminAccessToAllCollectionItems flag can restrict admins\n    // Providers and custom users with canEditAnyCollection are not affected by allowAdminAccessToAllCollectionItems flag\n    return (\n      this.isProviderUser ||\n      (this.type === OrganizationUserType.Custom && this.permissions.editAnyCollection) ||\n      (this.allowAdminAccessToAllCollectionItems && this.isAdmin)\n    );\n  }\n\n  get canEditUnmanagedCollections() {\n    // Any admin or custom user with editAnyCollection permission can edit unmanaged collections\n    return this.isAdmin || this.permissions.editAnyCollection;\n  }\n\n  get canEditUnassignedCiphers() {\n    return (\n      this.type === OrganizationUserType.Admin ||\n      this.type === OrganizationUserType.Owner ||\n      this.permissions.editAnyCollection\n    );\n  }\n\n  get canEditAllCiphers() {\n    // The allowAdminAccessToAllCollectionItems flag can restrict admins\n    // Custom users with canEditAnyCollection are not affected by allowAdminAccessToAllCollectionItems flag\n    return (\n      (this.type === OrganizationUserType.Custom && this.permissions.editAnyCollection) ||\n      (this.allowAdminAccessToAllCollectionItems &&\n        (this.type === OrganizationUserType.Admin || this.type === OrganizationUserType.Owner))\n    );\n  }\n\n  /**\n   * @returns True if the user can delete any collection\n   */\n  get canDeleteAnyCollection() {\n    // Providers and Users with DeleteAnyCollection permission can always delete collections\n    if (this.isProviderUser || this.permissions.deleteAnyCollection) {\n      return true;\n    }\n\n    // If AllowAdminAccessToAllCollectionItems is true, Owners and Admins can delete any collection, regardless of LimitCollectionDeletion setting\n    // Using explicit type checks because provider users are handled above and this mimics the server's permission checks closely\n    if (this.allowAdminAccessToAllCollectionItems) {\n      return this.type == OrganizationUserType.Owner || this.type == OrganizationUserType.Admin;\n    }\n\n    return false;\n  }\n\n  /**\n   * Whether the user can view all collection information, such as collection name and access.\n   * This does not indicate that the user can view items inside any collection - for that, see {@link canEditAllCiphers}\n   */\n  get canViewAllCollections() {\n    // Admins can always see all collections even if collection management settings prevent them from editing them or seeing items\n    return (\n      this.isAdmin || this.permissions.editAnyCollection || this.permissions.deleteAnyCollection\n    );\n  }\n\n  get canManageGroups() {\n    return (this.isAdmin || this.permissions.manageGroups) && this.useGroups;\n  }\n\n  get canManageSso() {\n    return (this.isAdmin || this.permissions.manageSso) && this.useSso;\n  }\n\n  get canManageDomainVerification() {\n    return (this.isAdmin || this.permissions.manageSso) && this.useSso;\n  }\n\n  get canManageScim() {\n    return (this.isAdmin || this.permissions.manageScim) && this.useScim;\n  }\n\n  get canManagePolicies() {\n    return (this.isAdmin || this.permissions.managePolicies) && this.usePolicies;\n  }\n\n  get canManageUsers() {\n    return this.isAdmin || this.permissions.manageUsers;\n  }\n\n  get canManageUsersPassword() {\n    return this.isAdmin || this.permissions.manageResetPassword;\n  }\n\n  get canManageDeviceApprovals() {\n    return (this.isAdmin || this.permissions.manageResetPassword) && this.useSso;\n  }\n\n  get isExemptFromPolicies() {\n    return this.canManagePolicies;\n  }\n\n  get canViewSubscription() {\n    if (this.canEditSubscription) {\n      return true;\n    }\n\n    return this.hasBillableProvider ? this.isProviderUser : this.isOwner;\n  }\n\n  get canEditSubscription() {\n    return this.hasProvider ? this.isProviderUser : this.isOwner;\n  }\n\n  get canEditPaymentMethods() {\n    return this.canEditSubscription;\n  }\n\n  get canViewBillingHistory() {\n    return this.canEditSubscription;\n  }\n\n  get hasProvider() {\n    return this.providerId != null || this.providerName != null;\n  }\n\n  get hasBillableProvider() {\n    return (\n      this.hasProvider &&\n      (this.providerType === ProviderType.Msp ||\n        this.providerType === ProviderType.MultiOrganizationEnterprise)\n    );\n  }\n\n  get hasReseller() {\n    return this.hasProvider && this.providerType === ProviderType.Reseller;\n  }\n\n  get canAccessSecretsManager() {\n    return this.useSecretsManager && this.accessSecretsManager;\n  }\n\n  get isFreeOrg() {\n    // return true if organization needs to be upgraded from a free org\n    return !this.useTotp;\n  }\n\n  get canManageSponsorships() {\n    return this.familySponsorshipAvailable || this.familySponsorshipFriendlyName !== null;\n  }\n\n  static fromJSON(json: Jsonify<Organization>) {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new Organization(), json, {\n      familySponsorshipLastSyncDate: new Date(json.familySponsorshipLastSyncDate),\n      familySponsorshipValidUntil: new Date(json.familySponsorshipValidUntil),\n    });\n  }\n\n  get canAccessIntegrations() {\n    return (\n      (this.productTierType === ProductTierType.Teams ||\n        this.productTierType === ProductTierType.Enterprise) &&\n      (this.isAdmin ||\n        this.permissions.manageUsers ||\n        this.permissions.manageGroups ||\n        this.permissions.accessEventLogs)\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\nimport { PolicyData } from \"../data/policy.data\";\nimport { PolicyResponse } from \"../response/policy.response\";\n\nexport class Policy extends Domain {\n  id: PolicyId;\n  organizationId: string;\n  type: PolicyType;\n  data: any;\n\n  /**\n   * Warning: a user can be exempt from a policy even if the policy is enabled.\n   * @see {@link PolicyService} has methods to tell you whether a policy applies to a user.\n   */\n  enabled: boolean;\n\n  constructor(obj?: PolicyData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.id = obj.id;\n    this.organizationId = obj.organizationId;\n    this.type = obj.type;\n    this.data = obj.data;\n    this.enabled = obj.enabled;\n  }\n\n  static fromResponse(response: PolicyResponse): Policy {\n    return new Policy(new PolicyData(response));\n  }\n\n  static fromListResponse(response: ListResponse<PolicyResponse>): Policy[] | undefined {\n    return response.data?.map((d) => Policy.fromResponse(d)) ?? undefined;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PaymentMethodType } from \"../../../billing/enums\";\nimport { OrganizationNoPaymentMethodCreateRequest } from \"../../../billing/models/request/organization-no-payment-method-create-request\";\n\nexport class OrganizationCreateRequest extends OrganizationNoPaymentMethodCreateRequest {\n  paymentMethodType: PaymentMethodType;\n  paymentToken: string;\n}\n","import { KeysRequest } from \"../../../models/request/keys.request\";\n\nexport class OrganizationKeysRequest extends KeysRequest {\n  constructor(publicKey: string, encryptedPrivateKey: string) {\n    super(publicKey, encryptedPrivateKey);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PlanType } from \"../../../billing/enums\";\n\nimport { OrganizationKeysRequest } from \"./organization-keys.request\";\n\nexport class OrganizationUpgradeRequest {\n  businessName: string;\n  planType: PlanType;\n  additionalSeats: number;\n  additionalStorageGb: number;\n  premiumAccessAddon: boolean;\n  billingAddressCountry: string;\n  billingAddressPostalCode: string;\n  keys: OrganizationKeysRequest;\n\n  useSecretsManager: boolean;\n  additionalSmSeats: number;\n  additionalServiceAccounts: number;\n}\n","export class SelectionReadOnlyRequest {\n  id: string;\n  readOnly: boolean;\n  hidePasswords: boolean;\n  manage: boolean;\n\n  constructor(id: string, readOnly: boolean, hidePasswords: boolean, manage: boolean) {\n    this.id = id;\n    this.readOnly = readOnly;\n    this.hidePasswords = hidePasswords;\n    this.manage = manage;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PlanType } from \"../../../billing/enums\";\nimport { PlanResponse } from \"../../../billing/models/response/plan.response\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class OrganizationResponse extends BaseResponse {\n  id: string;\n  name: string;\n  businessName: string;\n  businessAddress1: string;\n  businessAddress2: string;\n  businessAddress3: string;\n  businessCountry: string;\n  businessTaxNumber: string;\n  billingEmail: string;\n  plan: PlanResponse;\n  planType: PlanType;\n  seats: number;\n  maxAutoscaleSeats: number;\n  maxCollections: number;\n  maxStorageGb: number;\n  useGroups: boolean;\n  useDirectory: boolean;\n  useEvents: boolean;\n  useTotp: boolean;\n  use2fa: boolean;\n  useApi: boolean;\n  useResetPassword: boolean;\n  useSecretsManager: boolean;\n  hasPublicAndPrivateKeys: boolean;\n  usePasswordManager: boolean;\n  smSeats?: number;\n  smServiceAccounts?: number;\n  maxAutoscaleSmSeats?: number;\n  maxAutoscaleSmServiceAccounts?: number;\n  limitCollectionCreation: boolean;\n  limitCollectionDeletion: boolean;\n  allowAdminAccessToAllCollectionItems: boolean;\n  useRiskInsights: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.businessName = this.getResponseProperty(\"BusinessName\");\n    this.businessAddress1 = this.getResponseProperty(\"BusinessAddress1\");\n    this.businessAddress2 = this.getResponseProperty(\"BusinessAddress2\");\n    this.businessAddress3 = this.getResponseProperty(\"BusinessAddress3\");\n    this.businessCountry = this.getResponseProperty(\"BusinessCountry\");\n    this.businessTaxNumber = this.getResponseProperty(\"BusinessTaxNumber\");\n    this.billingEmail = this.getResponseProperty(\"BillingEmail\");\n\n    const plan = this.getResponseProperty(\"Plan\");\n    this.plan = plan == null ? null : new PlanResponse(plan);\n\n    this.planType = this.getResponseProperty(\"PlanType\");\n    this.seats = this.getResponseProperty(\"Seats\");\n    this.maxAutoscaleSeats = this.getResponseProperty(\"MaxAutoscaleSeats\");\n    this.maxCollections = this.getResponseProperty(\"MaxCollections\");\n    this.maxStorageGb = this.getResponseProperty(\"MaxStorageGb\");\n    this.useGroups = this.getResponseProperty(\"UseGroups\");\n    this.useDirectory = this.getResponseProperty(\"UseDirectory\");\n    this.useEvents = this.getResponseProperty(\"UseEvents\");\n    this.useTotp = this.getResponseProperty(\"UseTotp\");\n    this.use2fa = this.getResponseProperty(\"Use2fa\");\n    this.useApi = this.getResponseProperty(\"UseApi\");\n    this.useResetPassword = this.getResponseProperty(\"UseResetPassword\");\n    this.useSecretsManager = this.getResponseProperty(\"UseSecretsManager\");\n    this.hasPublicAndPrivateKeys = this.getResponseProperty(\"HasPublicAndPrivateKeys\");\n    this.usePasswordManager = this.getResponseProperty(\"UsePasswordManager\");\n    this.smSeats = this.getResponseProperty(\"SmSeats\");\n    this.smServiceAccounts = this.getResponseProperty(\"SmServiceAccounts\");\n    this.maxAutoscaleSmSeats = this.getResponseProperty(\"MaxAutoscaleSmSeats\");\n    this.maxAutoscaleSmServiceAccounts = this.getResponseProperty(\"MaxAutoscaleSmServiceAccounts\");\n    this.limitCollectionCreation = this.getResponseProperty(\"LimitCollectionCreation\");\n    this.limitCollectionDeletion = this.getResponseProperty(\"LimitCollectionDeletion\");\n    this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(\n      \"AllowAdminAccessToAllCollectionItems\",\n    );\n    this.useRiskInsights = this.getResponseProperty(\"UseRiskInsights\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { PolicyId } from \"../../../types/guid\";\nimport { PolicyType } from \"../../enums\";\n\nexport class PolicyResponse extends BaseResponse {\n  id: PolicyId;\n  organizationId: string;\n  type: PolicyType;\n  data: any;\n  enabled: boolean;\n  canToggleState: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.data = this.getResponseProperty(\"Data\");\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.canToggleState = this.getResponseProperty(\"CanToggleState\") ?? true;\n  }\n}\n","import { ProductTierType } from \"../../../billing/enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { OrganizationUserStatusType, OrganizationUserType, ProviderType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\n\nexport class ProfileOrganizationResponse extends BaseResponse {\n  id: string;\n  name: string;\n  usePolicies: boolean;\n  useGroups: boolean;\n  useDirectory: boolean;\n  useEvents: boolean;\n  useTotp: boolean;\n  use2fa: boolean;\n  useApi: boolean;\n  useSso: boolean;\n  useKeyConnector: boolean;\n  useScim: boolean;\n  useCustomPermissions: boolean;\n  useResetPassword: boolean;\n  useSecretsManager: boolean;\n  usePasswordManager: boolean;\n  useActivateAutofillPolicy: boolean;\n  selfHost: boolean;\n  usersGetPremium: boolean;\n  seats: number;\n  maxCollections: number;\n  maxStorageGb?: number;\n  key: string;\n  hasPublicAndPrivateKeys: boolean;\n  status: OrganizationUserStatusType;\n  type: OrganizationUserType;\n  enabled: boolean;\n  ssoBound: boolean;\n  identifier: string;\n  permissions: PermissionsApi;\n  resetPasswordEnrolled: boolean;\n  userId: string;\n  organizationUserId: string;\n  providerId: string;\n  providerName: string;\n  providerType?: ProviderType;\n  familySponsorshipFriendlyName: string;\n  familySponsorshipAvailable: boolean;\n  productTierType: ProductTierType;\n  keyConnectorEnabled: boolean;\n  keyConnectorUrl: string;\n  familySponsorshipLastSyncDate?: Date;\n  familySponsorshipValidUntil?: Date;\n  familySponsorshipToDelete?: boolean;\n  accessSecretsManager: boolean;\n  limitCollectionCreation: boolean;\n  limitCollectionDeletion: boolean;\n  allowAdminAccessToAllCollectionItems: boolean;\n  userIsManagedByOrganization: boolean;\n  useRiskInsights: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.usePolicies = this.getResponseProperty(\"UsePolicies\");\n    this.useGroups = this.getResponseProperty(\"UseGroups\");\n    this.useDirectory = this.getResponseProperty(\"UseDirectory\");\n    this.useEvents = this.getResponseProperty(\"UseEvents\");\n    this.useTotp = this.getResponseProperty(\"UseTotp\");\n    this.use2fa = this.getResponseProperty(\"Use2fa\");\n    this.useApi = this.getResponseProperty(\"UseApi\");\n    this.useSso = this.getResponseProperty(\"UseSso\");\n    this.useKeyConnector = this.getResponseProperty(\"UseKeyConnector\") ?? false;\n    this.useScim = this.getResponseProperty(\"UseScim\") ?? false;\n    this.useCustomPermissions = this.getResponseProperty(\"UseCustomPermissions\") ?? false;\n    this.useResetPassword = this.getResponseProperty(\"UseResetPassword\");\n    this.useSecretsManager = this.getResponseProperty(\"UseSecretsManager\");\n    this.usePasswordManager = this.getResponseProperty(\"UsePasswordManager\");\n    this.useActivateAutofillPolicy = this.getResponseProperty(\"UseActivateAutofillPolicy\");\n    this.selfHost = this.getResponseProperty(\"SelfHost\");\n    this.usersGetPremium = this.getResponseProperty(\"UsersGetPremium\");\n    this.seats = this.getResponseProperty(\"Seats\");\n    this.maxCollections = this.getResponseProperty(\"MaxCollections\");\n    this.maxStorageGb = this.getResponseProperty(\"MaxStorageGb\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.hasPublicAndPrivateKeys = this.getResponseProperty(\"HasPublicAndPrivateKeys\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.ssoBound = this.getResponseProperty(\"SsoBound\");\n    this.identifier = this.getResponseProperty(\"Identifier\");\n    this.permissions = new PermissionsApi(this.getResponseProperty(\"permissions\"));\n    this.resetPasswordEnrolled = this.getResponseProperty(\"ResetPasswordEnrolled\");\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.organizationUserId = this.getResponseProperty(\"OrganizationUserId\");\n    this.providerId = this.getResponseProperty(\"ProviderId\");\n    this.providerName = this.getResponseProperty(\"ProviderName\");\n    this.providerType = this.getResponseProperty(\"ProviderType\");\n    this.familySponsorshipFriendlyName = this.getResponseProperty(\"FamilySponsorshipFriendlyName\");\n    this.familySponsorshipAvailable = this.getResponseProperty(\"FamilySponsorshipAvailable\");\n    this.productTierType = this.getResponseProperty(\"ProductTierType\");\n    this.keyConnectorEnabled = this.getResponseProperty(\"KeyConnectorEnabled\") ?? false;\n    this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n    const familySponsorshipLastSyncDateString = this.getResponseProperty(\n      \"FamilySponsorshipLastSyncDate\",\n    );\n    if (familySponsorshipLastSyncDateString) {\n      this.familySponsorshipLastSyncDate = new Date(familySponsorshipLastSyncDateString);\n    }\n    const familySponsorshipValidUntilString = this.getResponseProperty(\n      \"FamilySponsorshipValidUntil\",\n    );\n    if (familySponsorshipValidUntilString) {\n      this.familySponsorshipValidUntil = new Date(familySponsorshipValidUntilString);\n    }\n    this.familySponsorshipToDelete = this.getResponseProperty(\"FamilySponsorshipToDelete\");\n    this.accessSecretsManager = this.getResponseProperty(\"AccessSecretsManager\");\n    this.limitCollectionCreation = this.getResponseProperty(\"LimitCollectionCreation\");\n    this.limitCollectionDeletion = this.getResponseProperty(\"LimitCollectionDeletion\");\n    this.allowAdminAccessToAllCollectionItems = this.getResponseProperty(\n      \"AllowAdminAccessToAllCollectionItems\",\n    );\n    this.userIsManagedByOrganization = this.getResponseProperty(\"UserIsManagedByOrganization\");\n    this.useRiskInsights = this.getResponseProperty(\"UseRiskInsights\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SelectionReadOnlyResponse extends BaseResponse {\n  id: string;\n  readOnly: boolean;\n  hidePasswords: boolean;\n  manage: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.readOnly = this.getResponseProperty(\"ReadOnly\");\n    this.hidePasswords = this.getResponseProperty(\"HidePasswords\");\n    this.manage = this.getResponseProperty(\"Manage\");\n  }\n}\n","import { RegisterFinishRequest } from \"../models/request/registration/register-finish.request\";\nimport { RegisterSendVerificationEmailRequest } from \"../models/request/registration/register-send-verification-email.request\";\nimport { RegisterVerificationEmailClickedRequest } from \"../models/request/registration/register-verification-email-clicked.request\";\nimport { Verification } from \"../types/verification\";\n\nexport abstract class AccountApiService {\n  /**\n   * Deletes an account that has confirmed the operation is authorized\n   *\n   * @param verification - authorizes the account deletion operation.\n   * @returns A promise that resolves when the account is\n   * successfully deleted.\n   */\n  abstract deleteAccount(verification: Verification): Promise<void>;\n\n  /**\n   * Sends a verification email as part of the registration process.\n   *\n   * @param request - The request object containing\n   * information needed to send the verification email, such as the user's email address.\n   * @returns A promise that resolves to a string tokencontaining the user's encrypted\n   * information which must be submitted to complete registration or `null` if\n   * email verification is enabled (users must get the token by clicking a\n   * link in the email that will be sent to them).\n   */\n  abstract registerSendVerificationEmail(\n    request: RegisterSendVerificationEmailRequest,\n  ): Promise<null | string>;\n\n  /**\n   * Raises a server event to identify when users click the email verification link and land\n   * on the registration finish screen.\n   *\n   * @param request - The request object containing the email verification token and the\n   * user's email address (which is required to validate the token)\n   * @returns A promise that resolves when the event is logged on the server succcessfully or a bad\n   * request if the token is invalid for any reason.\n   */\n  abstract registerVerificationEmailClicked(\n    request: RegisterVerificationEmailClickedRequest,\n  ): Promise<void>;\n\n  /**\n   * Completes the registration process.\n   *\n   * @param request - The request object containing the user's email verification token,\n   * the email, hashed MP, newly created user key, and new asymmetric user key pair along\n   * with the KDF information used during the process.\n   * @returns A promise that resolves to a string captcha bypass token when the\n   * registration process is successfully completed.\n   */\n  abstract registerFinish(request: RegisterFinishRequest): Promise<string>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\n/**\n * Holds information about an account for use in the AccountService\n * if more information is added, be sure to update the equality method.\n */\nexport type AccountInfo = {\n  email: string;\n  emailVerified: boolean;\n  name: string | undefined;\n};\n\nexport type Account = { id: UserId } & AccountInfo;\n\nexport function accountInfoEqual(a: AccountInfo, b: AccountInfo) {\n  if (a == null && b == null) {\n    return true;\n  }\n\n  if (a == null || b == null) {\n    return false;\n  }\n\n  const keys = new Set([...Object.keys(a), ...Object.keys(b)]) as Set<keyof AccountInfo>;\n  for (const key of keys) {\n    if (a[key] !== b[key]) {\n      return false;\n    }\n  }\n  return true;\n}\n\nexport abstract class AccountService {\n  accounts$: Observable<Record<UserId, AccountInfo>>;\n\n  activeAccount$: Observable<Account | null>;\n\n  /**\n   * Observable of the last activity time for each account.\n   */\n  accountActivity$: Observable<Record<UserId, Date>>;\n  /** Account list in order of descending recency */\n  sortedUserIds$: Observable<UserId[]>;\n  /** Next account that is not the current active account */\n  nextUpAccount$: Observable<Account>;\n  /**\n   * Updates the `accounts$` observable with the new account data.\n   *\n   * @note Also sets the last active date of the account to `now`.\n   * @param userId\n   * @param accountData\n   */\n  abstract addAccount(userId: UserId, accountData: AccountInfo): Promise<void>;\n  /**\n   * updates the `accounts$` observable with the new preferred name for the account.\n   * @param userId\n   * @param name\n   */\n  abstract setAccountName(userId: UserId, name: string): Promise<void>;\n  /**\n   * updates the `accounts$` observable with the new email for the account.\n   * @param userId\n   * @param email\n   */\n  abstract setAccountEmail(userId: UserId, email: string): Promise<void>;\n  /**\n   * updates the `accounts$` observable with the new email verification status for the account.\n   * @param userId\n   * @param emailVerified\n   */\n  abstract setAccountEmailVerified(userId: UserId, emailVerified: boolean): Promise<void>;\n  /**\n   * Updates the `activeAccount$` observable with the new active account.\n   * @param userId\n   */\n  abstract switchAccount(userId: UserId | null): Promise<void>;\n  /**\n   * Cleans personal information for the given account from the `accounts$` observable. Does not remove the userId from the observable.\n   *\n   * @note Also sets the last active date of the account to `null`.\n   * @param userId\n   */\n  abstract clean(userId: UserId): Promise<void>;\n  /**\n   * Updates the given user's last activity time.\n   * @param userId\n   * @param lastActivity\n   */\n  abstract setAccountActivity(userId: UserId, lastActivity: Date): Promise<void>;\n}\n\nexport abstract class InternalAccountService extends AccountService {\n  abstract delete(): void;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class AnonymousHubService {\n  createHubConnection: (token: string) => Promise<void>;\n  stopHubConnection: () => Promise<void>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { AuthenticationStatus } from \"../enums/authentication-status\";\n\nexport abstract class AuthService {\n  /** Authentication status for the active user */\n  abstract activeAccountStatus$: Observable<AuthenticationStatus>;\n  /** Authentication status for all known users */\n  abstract authStatuses$: Observable<Record<UserId, AuthenticationStatus>>;\n  /**\n   * Returns an observable authentication status for the given user id.\n   * @note userId is a required parameter, null values will always return `AuthenticationStatus.LoggedOut`\n   * @param userId The user id to check for an access token.\n   */\n  abstract authStatusFor$(userId: UserId): Observable<AuthenticationStatus>;\n  /** @deprecated use {@link activeAccountStatus$} instead */\n  abstract getAuthStatus: (userId?: string) => Promise<AuthenticationStatus>;\n  abstract logOut: (callback: () => void, userId?: string) => void;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nexport abstract class AvatarService {\n  /**\n   * An observable monitoring the active user's avatar color.\n   * The observable updates when the avatar color changes.\n   */\n  avatarColor$: Observable<string | null>;\n  /**\n   * Sets the avatar color of the active user\n   *\n   * @param color the color to set the avatar color to\n   * @returns a promise that resolves when the avatar color is set\n   */\n  abstract setAvatarColor(color: string): Promise<void>;\n  /**\n   * Sets the avatar color for the given user, meant to be used via sync.\n   *\n   * @remarks This is meant to be used for getting an updated avatar color from\n   *          the sync endpoint. If the user is changing their avatar color\n   *          on device, you should instead call {@link setAvatarColor}.\n   *\n   * @param userId The user id for the user to set the avatar color for\n   * @param color The color to set the avatar color to\n   */\n  abstract setSyncAvatarColor(userId: UserId, color: string): Promise<void>;\n  /**\n   * Gets the avatar color of the specified user.\n   *\n   * @remarks This is most useful for account switching where we show an\n   *          avatar for each account. If you only need the active user's\n   *          avatar color, use the avatarColor$ observable above instead.\n   *\n   * @param userId the userId of the user whose avatar color should be retreived\n   * @return an Observable that emits a string of the avatar color of the specified user\n   */\n  abstract getUserAvatarColor$(userId: UserId): Observable<string | null>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { UserId } from \"../../types/guid\";\nimport { DeviceKey, UserKey } from \"../../types/key\";\n\nimport { DeviceResponse } from \"./devices/responses/device.response\";\n\nexport abstract class DeviceTrustServiceAbstraction {\n  supportsDeviceTrust$: Observable<boolean>;\n  /**\n   * @description Retrieves the users choice to trust the device which can only happen after decryption\n   * Note: this value should only be used once and then reset\n   */\n  getShouldTrustDevice: (userId: UserId) => Promise<boolean | null>;\n  setShouldTrustDevice: (userId: UserId, value: boolean) => Promise<void>;\n\n  trustDeviceIfRequired: (userId: UserId) => Promise<void>;\n\n  trustDevice: (userId: UserId) => Promise<DeviceResponse>;\n\n  /** Retrieves the device key if it exists from state or secure storage if supported for the active user. */\n  getDeviceKey: (userId: UserId) => Promise<DeviceKey | null>;\n  decryptUserKeyWithDeviceKey: (\n    userId: UserId,\n    encryptedDevicePrivateKey: EncString,\n    encryptedUserKey: EncString,\n    deviceKey: DeviceKey,\n  ) => Promise<UserKey | null>;\n  rotateDevicesTrust: (\n    userId: UserId,\n    newUserKey: UserKey,\n    masterPasswordHash: string,\n  ) => Promise<void>;\n  /**\n   * Notifies the server that the device has a device key, but didn't receive any associated decryption keys.\n   * Note: For debugging purposes only.\n   */\n  recordDeviceTrustLoss: () => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { DeviceResponse } from \"../abstractions/devices/responses/device.response\";\nimport { SecretVerificationRequest } from \"../models/request/secret-verification.request\";\nimport { UpdateDevicesTrustRequest } from \"../models/request/update-devices-trust.request\";\nimport { ProtectedDeviceResponse } from \"../models/response/protected-device.response\";\n\nexport abstract class DevicesApiServiceAbstraction {\n  getKnownDevice: (email: string, deviceIdentifier: string) => Promise<boolean>;\n\n  getDeviceByIdentifier: (deviceIdentifier: string) => Promise<DeviceResponse>;\n\n  getDevices: () => Promise<ListResponse<DeviceResponse>>;\n\n  updateTrustedDeviceKeys: (\n    deviceIdentifier: string,\n    devicePublicKeyEncryptedUserKey: string,\n    userKeyEncryptedDevicePublicKey: string,\n    deviceKeyEncryptedDevicePrivateKey: string,\n  ) => Promise<DeviceResponse>;\n\n  updateTrust: (\n    updateDevicesTrustRequestModel: UpdateDevicesTrustRequest,\n    deviceIdentifier: string,\n  ) => Promise<void>;\n\n  getDeviceKeys: (\n    deviceIdentifier: string,\n    secretVerificationRequest: SecretVerificationRequest,\n  ) => Promise<ProtectedDeviceResponse>;\n\n  /**\n   * Notifies the server that the device has a device key, but didn't receive any associated decryption keys.\n   * Note: For debugging purposes only.\n   * @param deviceIdentifier - current device identifier\n   */\n  postDeviceTrustLoss: (deviceIdentifier: string) => Promise<void>;\n\n  /**\n   * Deactivates a device\n   * @param deviceId - The device ID\n   */\n  deactivateDevice: (deviceId: string) => Promise<void>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { DeviceResponse } from \"./responses/device.response\";\nimport { DeviceView } from \"./views/device.view\";\n\nexport abstract class DevicesServiceAbstraction {\n  abstract getDevices$(): Observable<Array<DeviceView>>;\n  abstract getDeviceByIdentifier$(deviceIdentifier: string): Observable<DeviceView>;\n  abstract isDeviceKnownForUser$(email: string, deviceIdentifier: string): Observable<boolean>;\n  abstract updateTrustedDeviceKeys$(\n    deviceIdentifier: string,\n    devicePublicKeyEncryptedUserKey: string,\n    userKeyEncryptedDevicePublicKey: string,\n    deviceKeyEncryptedDevicePrivateKey: string,\n  ): Observable<DeviceView>;\n  abstract deactivateDevice$(deviceId: string): Observable<void>;\n  abstract getCurrentDevice$(): Observable<DeviceResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DeviceType } from \"../../../../enums\";\nimport { View } from \"../../../../models/view/view\";\nimport { DeviceResponse } from \"../responses/device.response\";\n\nexport class DeviceView implements View {\n  id: string;\n  userId: string;\n  name: string;\n  identifier: string;\n  type: DeviceType;\n  creationDate: string;\n  revisionDate: string;\n  response: DeviceResponse;\n\n  constructor(deviceResponse: DeviceResponse) {\n    Object.assign(this, deviceResponse);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Organization } from \"../../admin-console/models/domain/organization\";\nimport { UserId } from \"../../types/guid\";\nimport { IdentityTokenResponse } from \"../models/response/identity-token.response\";\n\nexport abstract class KeyConnectorService {\n  setMasterKeyFromUrl: (url: string, userId: UserId) => Promise<void>;\n  getManagingOrganization: (userId?: UserId) => Promise<Organization>;\n  getUsesKeyConnector: (userId: UserId) => Promise<boolean>;\n  migrateUser: (userId?: UserId) => Promise<void>;\n  userNeedsMigration: (userId: UserId) => Promise<boolean>;\n  convertNewSsoUserToKeyConnector: (\n    tokenResponse: IdentityTokenResponse,\n    orgId: string,\n    userId: UserId,\n  ) => Promise<void>;\n  setUsesKeyConnector: (enabled: boolean, userId: UserId) => Promise<void>;\n  setConvertAccountRequired: (status: boolean, userId?: UserId) => Promise<void>;\n  getConvertAccountRequired: () => Promise<boolean>;\n  removeConvertAccountRequired: (userId?: UserId) => Promise<void>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { UserId } from \"../../types/guid\";\nimport { MasterKey, UserKey } from \"../../types/key\";\nimport { ForceSetPasswordReason } from \"../models/domain/force-set-password-reason\";\n\nexport abstract class MasterPasswordServiceAbstraction {\n  /**\n   * An observable that emits if the user is being forced to set a password on login and why.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract forceSetPasswordReason$: (userId: UserId) => Observable<ForceSetPasswordReason>;\n  /**\n   * An observable that emits the master key for the user.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract masterKey$: (userId: UserId) => Observable<MasterKey>;\n  /**\n   * An observable that emits the master key hash for the user.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract masterKeyHash$: (userId: UserId) => Observable<string>;\n  /**\n   * Returns the master key encrypted user key for the user.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract getMasterKeyEncryptedUserKey: (userId: UserId) => Promise<EncString>;\n  /**\n   * Decrypts the user key with the provided master key\n   * @param masterKey The user's master key\n   *    * @param userId The desired user\n   * @param userKey The user's encrypted symmetric key\n   * @throws If either the MasterKey or UserKey are not resolved, or if the UserKey encryption type\n   *         is neither AesCbc256_B64 nor AesCbc256_HmacSha256_B64\n   * @returns The user key\n   */\n  abstract decryptUserKeyWithMasterKey: (\n    masterKey: MasterKey,\n    userId: string,\n    userKey?: EncString,\n  ) => Promise<UserKey>;\n}\n\nexport abstract class InternalMasterPasswordServiceAbstraction extends MasterPasswordServiceAbstraction {\n  /**\n   * Set the master key for the user.\n   * Note: Use {@link clearMasterKey} to clear the master key.\n   * @param masterKey The master key.\n   * @param userId The user ID.\n   * @throws If the user ID or master key is missing.\n   */\n  abstract setMasterKey: (masterKey: MasterKey, userId: UserId) => Promise<void>;\n  /**\n   * Clear the master key for the user.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract clearMasterKey: (userId: UserId) => Promise<void>;\n  /**\n   * Set the master key hash for the user.\n   * Note: Use {@link clearMasterKeyHash} to clear the master key hash.\n   * @param masterKeyHash The master key hash.\n   * @param userId The user ID.\n   * @throws If the user ID or master key hash is missing.\n   */\n  abstract setMasterKeyHash: (masterKeyHash: string, userId: UserId) => Promise<void>;\n  /**\n   * Clear the master key hash for the user.\n   * @param userId The user ID.\n   * @throws If the user ID is missing.\n   */\n  abstract clearMasterKeyHash: (userId: UserId) => Promise<void>;\n\n  /**\n   * Set the master key encrypted user key for the user.\n   * @param encryptedKey The master key encrypted user key.\n   * @param userId The user ID.\n   * @throws If the user ID or encrypted key is missing.\n   */\n  abstract setMasterKeyEncryptedUserKey: (encryptedKey: EncString, userId: UserId) => Promise<void>;\n  /**\n   * Set the force set password reason for the user.\n   * @param reason The reason the user is being forced to set a password.\n   * @param userId The user ID.\n   * @throws If the user ID or reason is missing.\n   */\n  abstract setForceSetPasswordReason: (\n    reason: ForceSetPasswordReason,\n    userId: UserId,\n  ) => Promise<void>;\n}\n","import { UserKey } from \"../../types/key\";\n\nexport abstract class PasswordResetEnrollmentServiceAbstraction {\n  /*\n   * Checks the user's enrollment status and enrolls them if required\n   * NOTE: Will also enroll the user in the organization if in the\n   * invited status\n   */\n  abstract enrollIfRequired(organizationSsoIdentifier: string): Promise<void>;\n\n  /**\n   * Enroll current user in password reset\n   * NOTE: Will also enroll the user in the organization if in the\n   * invited status\n   * @param organizationId - Organization in which to enroll the user\n   * @returns Promise that resolves when the user is enrolled\n   * @throws Error if the action fails\n   */\n  abstract enroll(organizationId: string): Promise<void>;\n\n  /**\n   * Enroll user in password reset\n   * NOTE: Will also enroll the user in the organization if in the\n   * invited status\n   * @param organizationId - Organization in which to enroll the user\n   * @param userId - User to enroll\n   * @param userKey - User's symmetric key\n   * @returns Promise that resolves when the user is enrolled\n   * @throws Error if the action fails\n   */\n  abstract enroll(organizationId: string, userId: string, userKey: UserKey): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class SsoLoginServiceAbstraction {\n  /**\n   * Gets the code verifier used for SSO.\n   *\n   * PKCE requires a `code_verifier` to be generated which is then used to derive a `code_challenge`.\n   * While the `code_challenge` is verified upon return from the SSO provider, the `code_verifier` is\n   * sent to the server with the `authorization_code` so that the server can derive the same `code_challenge`\n   * and verify it matches the one sent in the request for the `authorization_code`.\n   * @see https://datatracker.ietf.org/doc/html/rfc7636\n   * @returns The code verifier used for SSO.\n   */\n  getCodeVerifier: () => Promise<string>;\n  /**\n   * Sets the code verifier used for SSO.\n   *\n   * PKCE requires a `code_verifier` to be generated which is then used to derive a `code_challenge`.\n   * While the `code_challenge` is verified upon return from the SSO provider, the `code_verifier` is\n   * sent to the server with the `authorization_code` so that the server can derive the same `code_challenge`\n   * and verify it matches the one sent in the request for the `authorization_code`.\n   * @see https://datatracker.ietf.org/doc/html/rfc7636\n   */\n  setCodeVerifier: (codeVerifier: string) => Promise<void>;\n  /**\n   * Gets the value of the SSO state.\n   *\n   * `state` is a parameter used in the Authorization Code Flow of OAuth 2.0 to prevent CSRF attacks. It is an\n   * opaque value generated on the client and is sent to the authorization server. The authorization server\n   * returns the `state` in the callback and the client verifies that the value returned matches the value sent.\n   * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1\n   * @returns The SSO state.\n   */\n  getSsoState: () => Promise<string>;\n  /**\n   * Sets the value of the SSO state.\n   *\n   * `state` is a parameter used in the Authorization Code Flow of OAuth 2.0 to prevent CSRF attacks. It is an\n   * opaque value generated on the client and is sent to the authorization server. The authorization server\n   * returns the `state` in the callback and the client verifies that the value returned matches the value sent.\n   * @see https://datatracker.ietf.org/doc/html/rfc6749#section-4.1\n   */\n  setSsoState: (ssoState: string) => Promise<void>;\n  /**\n   * Gets the value of the user's organization sso identifier.\n   *\n   * This should only be used during the SSO flow to identify the organization that the user is attempting to log in to.\n   * Do not use this value outside of the SSO login flow.\n   * @returns The user's organization identifier.\n   */\n  getOrganizationSsoIdentifier: () => Promise<string>;\n  /**\n   * Sets the value of the user's organization sso identifier.\n   *\n   * This should only be used during the SSO flow to identify the organization that the user is attempting to log in to.\n   * Do not use this value outside of the SSO login flow.\n   */\n  setOrganizationSsoIdentifier: (organizationIdentifier: string) => Promise<void>;\n  /**\n   * Gets the user's email.\n   * Note: This should only be used during the SSO flow to identify the user that is attempting to log in.\n   * @returns The user's email.\n   */\n  getSsoEmail: () => Promise<string>;\n  /**\n   * Sets the user's email.\n   * Note: This should only be used during the SSO flow to identify the user that is attempting to log in.\n   * @param email The user's email.\n   * @returns A promise that resolves when the email has been set.\n   *\n   */\n  setSsoEmail: (email: string) => Promise<void>;\n  /**\n   * Gets the value of the active user's organization sso identifier.\n   *\n   * This should only be used post successful SSO login once the user is initialized.\n   */\n  getActiveUserOrganizationSsoIdentifier: () => Promise<string>;\n  /**\n   * Sets the value of the active user's organization sso identifier.\n   *\n   * This should only be used post successful SSO login once the user is initialized.\n   */\n  setActiveUserOrganizationSsoIdentifier: (organizationIdentifier: string) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserId } from \"../../types/guid\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\nimport { SetTokensResult } from \"../models/domain/set-tokens-result\";\nimport { DecodedAccessToken } from \"../services/token.service\";\n\nexport abstract class TokenService {\n  /**\n   * Returns an observable that emits a boolean indicating whether the user has an access token.\n   * @param userId The user id to check for an access token.\n   */\n  abstract hasAccessToken$(userId: UserId): Observable<boolean>;\n  /**\n   * Sets the access token, refresh token, API Key Client ID, and API Key Client Secret in memory or disk\n   * based on the given vaultTimeoutAction and vaultTimeout and the derived access token user id.\n   * Note: for platforms that support secure storage, the access & refresh tokens are stored in secure storage instead of on disk.\n   * Note 2: this method also enforces always setting the access token and the refresh token together as\n   * we can retrieve the user id required to set the refresh token from the access token for efficiency.\n   * @param accessToken The access token to set.\n   * @param vaultTimeoutAction The action to take when the vault times out.\n   * @param vaultTimeout The timeout for the vault.\n   * @param refreshToken The optional refresh token to set. Note: this is undefined when using the CLI Login Via API Key flow\n   * @param clientIdClientSecret The API Key Client ID and Client Secret to set.\n   *\n   * @returns A promise that resolves with the SetTokensResult containing the tokens that were set.\n   */\n  setTokens: (\n    accessToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    refreshToken?: string,\n    clientIdClientSecret?: [string, string],\n  ) => Promise<SetTokensResult>;\n\n  /**\n   * Clears the access token, refresh token, API Key Client ID, and API Key Client Secret out of memory, disk, and secure storage if supported.\n   * @param userId The optional user id to clear the tokens for; if not provided, the active user id is used.\n   * @returns A promise that resolves when the tokens have been cleared.\n   */\n  clearTokens: (userId?: UserId) => Promise<void>;\n\n  /**\n   * Sets the access token in memory or disk based on the given vaultTimeoutAction and vaultTimeout\n   * and the user id read off the access token\n   * Note: for platforms that support secure storage, the access & refresh tokens are stored in secure storage instead of on disk.\n   * @param accessToken The access token to set.\n   * @param vaultTimeoutAction The action to take when the vault times out.\n   * @param vaultTimeout The timeout for the vault.\n   * @returns A promise that resolves with the access token that has been set.\n   */\n  setAccessToken: (\n    accessToken: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n  ) => Promise<string>;\n\n  // TODO: revisit having this public clear method approach once the state service is fully deprecated.\n  /**\n   * Clears the access token for the given user id out of memory, disk, and secure storage if supported.\n   * @param userId The optional user id to clear the access token for; if not provided, the active user id is used.\n   * @returns A promise that resolves when the access token has been cleared.\n   *\n   * Note: This method is required so that the StateService doesn't have to inject the VaultTimeoutSettingsService to\n   * pass in the vaultTimeoutAction and vaultTimeout.\n   * This avoids a circular dependency between the StateService, TokenService, and VaultTimeoutSettingsService.\n   */\n  clearAccessToken: (userId?: UserId) => Promise<void>;\n\n  /**\n   * Gets the access token\n   * @param userId - The optional user id to get the access token for; if not provided, the active user is used.\n   * @returns A promise that resolves with the access token or null.\n   */\n  getAccessToken: (userId?: UserId) => Promise<string | null>;\n\n  /**\n   * Gets the refresh token.\n   * @param userId - The optional user id to get the refresh token for; if not provided, the active user is used.\n   * @returns A promise that resolves with the refresh token or null.\n   */\n  getRefreshToken: (userId?: UserId) => Promise<string | null>;\n\n  /**\n   * Sets the API Key Client ID for the active user id in memory or disk based on the given vaultTimeoutAction and vaultTimeout.\n   * @param clientId The API Key Client ID to set.\n   * @param vaultTimeoutAction The action to take when the vault times out.\n   * @param vaultTimeout The timeout for the vault.\n   * @returns A promise that resolves with the API Key Client ID that has been set.\n   */\n  setClientId: (\n    clientId: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId?: UserId,\n  ) => Promise<string>;\n\n  /**\n   * Gets the API Key Client ID for the active user.\n   * @returns A promise that resolves with the API Key Client ID or undefined\n   */\n  getClientId: (userId?: UserId) => Promise<string | undefined>;\n\n  /**\n   * Sets the API Key Client Secret for the active user id in memory or disk based on the given vaultTimeoutAction and vaultTimeout.\n   * @param clientSecret The API Key Client Secret to set.\n   * @param vaultTimeoutAction The action to take when the vault times out.\n   * @param vaultTimeout The timeout for the vault.\n   * @returns A promise that resolves with the client secret that has been set.\n   */\n  setClientSecret: (\n    clientSecret: string,\n    vaultTimeoutAction: VaultTimeoutAction,\n    vaultTimeout: VaultTimeout,\n    userId?: UserId,\n  ) => Promise<string>;\n\n  /**\n   * Gets the API Key Client Secret for the active user.\n   * @returns A promise that resolves with the API Key Client Secret or undefined\n   */\n  getClientSecret: (userId?: UserId) => Promise<string | undefined>;\n\n  /**\n   * Sets the two factor token for the given email in global state.\n   * The two factor token is set when the user checks \"remember me\" when completing two factor\n   * authentication and it is used to bypass two factor authentication for a period of time.\n   * @param email The email to set the two factor token for.\n   * @param twoFactorToken The two factor token to set.\n   * @returns A promise that resolves when the two factor token has been set.\n   */\n  setTwoFactorToken: (email: string, twoFactorToken: string) => Promise<void>;\n\n  /**\n   * Gets the two factor token for the given email.\n   * @param email The email to get the two factor token for.\n   * @returns A promise that resolves with the two factor token for the given email or null if it isn't found.\n   */\n  getTwoFactorToken: (email: string) => Promise<string | null>;\n\n  /**\n   * Clears the two factor token for the given email out of global state.\n   * @param email The email to clear the two factor token for.\n   * @returns A promise that resolves when the two factor token has been cleared.\n   */\n  clearTwoFactorToken: (email: string) => Promise<void>;\n\n  /**\n   * Decodes the access token.\n   * @param tokenOrUserId The access token to decode or the user id to retrieve the access token for, and then decode.\n   * If null, the currently active user's token is used.\n   * @returns A promise that resolves with the decoded access token.\n   */\n  decodeAccessToken: (tokenOrUserId?: string | UserId) => Promise<DecodedAccessToken>;\n\n  /**\n   * Gets the expiration date for the access token. Returns if token can't be decoded or has no expiration\n   * @returns A promise that resolves with the expiration date for the access token.\n   */\n  getTokenExpirationDate: () => Promise<Date | null>;\n\n  /**\n   * Calculates the adjusted time in seconds until the access token expires, considering an optional offset.\n   *\n   * @param {number} [offsetSeconds=0] Optional seconds to subtract from the remaining time,\n   * creating a buffer before actual expiration. Useful for preemptive actions\n   * before token expiry. A value of 0 or omitting this parameter calculates time\n   * based on the actual expiration.\n   * @returns {Promise<number>} Promise resolving to the adjusted seconds remaining.\n   */\n  tokenSecondsRemaining: (offsetSeconds?: number) => Promise<number>;\n\n  /**\n   * Checks if the access token needs to be refreshed.\n   * @param {number} [minutes=5] - Optional number of minutes before the access token expires to consider refreshing it.\n   * @returns A promise that resolves with a boolean indicating if the access token needs to be refreshed.\n   */\n  tokenNeedsRefresh: (minutes?: number) => Promise<boolean>;\n\n  /**\n   * Gets the user id for the active user from the access token.\n   * @returns A promise that resolves with the user id for the active user.\n   * @deprecated Use AccountService.activeAccount$ instead.\n   */\n  getUserId: () => Promise<UserId>;\n\n  /**\n   * Gets the email for the active user from the access token.\n   * @returns A promise that resolves with the email for the active user.\n   * @deprecated Use AccountService.activeAccount$ instead.\n   */\n  getEmail: () => Promise<string>;\n\n  /**\n   * Gets the email verified status for the active user from the access token.\n   * @returns A promise that resolves with the email verified status for the active user.\n   */\n  getEmailVerified: () => Promise<boolean>;\n\n  /**\n   * Gets the name for the active user from the access token.\n   * @returns A promise that resolves with the name for the active user.\n   * @deprecated Use AccountService.activeAccount$ instead.\n   */\n  getName: () => Promise<string>;\n\n  /**\n   * Gets the issuer for the active user from the access token.\n   * @returns A promise that resolves with the issuer for the active user.\n   */\n  getIssuer: () => Promise<string>;\n\n  /**\n   * Gets whether or not the user authenticated via an external mechanism.\n   * @param userId The optional user id to check for external authN status; if not provided, the active user is used.\n   * @returns A promise that resolves with a boolean representing the user's external authN status.\n   */\n  getIsExternal: (userId: UserId) => Promise<boolean>;\n\n  /** Gets the active or passed in user's security stamp */\n  getSecurityStamp: (userId?: UserId) => Promise<string | null>;\n\n  /** Sets the security stamp for the active or passed in user */\n  setSecurityStamp: (securityStamp: string, userId?: UserId) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TwoFactorProviderType } from \"../enums/two-factor-provider-type\";\nimport { IdentityTwoFactorResponse } from \"../models/response/identity-two-factor.response\";\n\nexport interface TwoFactorProviderDetails {\n  type: TwoFactorProviderType;\n  name: string;\n  description: string;\n  priority: number;\n  sort: number;\n  premium: boolean;\n}\n\nexport abstract class TwoFactorService {\n  init: () => void;\n  getSupportedProviders: (win: Window) => Promise<TwoFactorProviderDetails[]>;\n  getDefaultProvider: (webAuthnSupported: boolean) => Promise<TwoFactorProviderType>;\n  setSelectedProvider: (type: TwoFactorProviderType) => Promise<void>;\n  clearSelectedProvider: () => Promise<void>;\n\n  setProviders: (response: IdentityTwoFactorResponse) => Promise<void>;\n  clearProviders: () => Promise<void>;\n  getProviders: () => Promise<Map<TwoFactorProviderType, { [key: string]: string }>>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"../../../types/guid\";\nimport { SecretVerificationRequest } from \"../../models/request/secret-verification.request\";\nimport { UserVerificationOptions } from \"../../types/user-verification-options\";\nimport {\n  MasterPasswordVerification,\n  MasterPasswordVerificationResponse,\n  Verification,\n} from \"../../types/verification\";\n\nexport abstract class UserVerificationService {\n  /**\n   * Returns the available verification options for the user, can be\n   * restricted to a specific type of verification.\n   * @param verificationType Type of verification to restrict the options to\n   * @returns Available verification options for the user\n   */\n  getAvailableVerificationOptions: (\n    verificationType: keyof UserVerificationOptions,\n  ) => Promise<UserVerificationOptions>;\n  /**\n   * Create a new request model to be used for server-side verification\n   * @param verification User-supplied verification data (Master Password or OTP)\n   * @param requestClass The request model to create\n   * @param alreadyHashed Whether the master password is already hashed\n   * @throws Error if the verification data is invalid\n   */\n  buildRequest: <T extends SecretVerificationRequest>(\n    verification: Verification,\n    requestClass?: new () => T,\n    alreadyHashed?: boolean,\n  ) => Promise<T>;\n  /**\n   * Verifies the user using the provided verification data.\n   * PIN or biometrics are verified client-side.\n   * OTP is sent to the server for verification (with no other data)\n   * Master Password verifies client-side first if there is a MP hash, or server-side if not.\n   * @param verification User-supplied verification data (OTP, MP, PIN, or biometrics)\n   * @throws Error if the verification data is invalid or the verification fails\n   */\n  verifyUser: (verification: Verification) => Promise<boolean>;\n  /**\n   * Request a one-time password (OTP) to be sent to the user's email\n   */\n  requestOTP: () => Promise<void>;\n  /**\n   * Check if user has master password or can only use passwordless technologies to log in\n   * Note: This only checks the server, not the local state\n   * @param userId The user id to check. If not provided, the current user is used\n   * @returns True if the user has a master password\n   * @deprecated Use UserDecryptionOptionsService.hasMasterPassword$ instead\n   */\n  hasMasterPassword: (userId?: string) => Promise<boolean>;\n  /**\n   * Check if the user has a master password and has used it during their current session\n   * @param userId The user id to check. If not provided, the current user id used\n   * @returns True if the user has a master password and has used it in the current session\n   */\n  hasMasterPasswordAndMasterKeyHash: (userId?: string) => Promise<boolean>;\n  /**\n   * Verifies the user using the provided master password.\n   * Attempts to verify client-side first, then server-side if necessary.\n   * IMPORTANT: Will throw an error if the master password is invalid.\n   * @param verification Master Password verification data\n   * @param userId The user to verify\n   * @param email The user's email\n   * @throws Error if the master password is invalid\n   * @returns An object containing the master key, and master password policy options if verified on server.\n   */\n  verifyUserByMasterPassword: (\n    verification: MasterPasswordVerification,\n    userId: UserId,\n    email: string,\n  ) => Promise<MasterPasswordVerificationResponse>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PrfKey } from \"../../../types/key\";\n\n/**\n * Contains methods for all crypto operations specific to the WebAuthn login flow.\n */\nexport abstract class WebAuthnLoginPrfKeyServiceAbstraction {\n  /**\n   * Get the salt used to generate the PRF-output used when logging in with WebAuthn.\n   */\n  getLoginWithPrfSalt: () => Promise<ArrayBuffer>;\n\n  /**\n   * Create a symmetric key from the PRF-output by stretching it.\n   * This should be used as `ExternalKey` with `RotateableKeySet`.\n   */\n  createSymmetricKeyFromPrf: (prf: ArrayBuffer) => Promise<PrfKey>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AuthResult } from \"../../models/domain/auth-result\";\nimport { WebAuthnLoginCredentialAssertionOptionsView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion-options.view\";\nimport { WebAuthnLoginCredentialAssertionView } from \"../../models/view/webauthn-login/webauthn-login-credential-assertion.view\";\n\n/**\n * Service for logging in with WebAuthnLogin credentials.\n */\nexport abstract class WebAuthnLoginServiceAbstraction {\n  /**\n   * Gets the credential assertion options needed for initiating the WebAuthn\n   * authentication process. It should provide the challenge and other data\n   * (whether FIDO2 user verification is required, the relying party id, timeout duration for the process to complete, etc.)\n   * for the authenticator.\n   */\n  getCredentialAssertionOptions: () => Promise<WebAuthnLoginCredentialAssertionOptionsView>;\n\n  /**\n   * Asserts the credential. This involves user interaction with the authenticator\n   * to sign a challenge with a private key (proving ownership of the private key).\n   * This will trigger the browsers WebAuthn API to assert a credential. A PRF-output might\n   * be included in the response if the authenticator supports it.\n   *\n   * @param {WebAuthnLoginCredentialAssertionOptionsView} credentialAssertionOptions - The options provided by the\n   * `getCredentialAssertionOptions` method, including the challenge and other data.\n   * @returns {WebAuthnLoginCredentialAssertionView} The assertion obtained from the authenticator.\n   * If the assertion is not successfully obtained, it returns undefined.\n   */\n  assertCredential: (\n    credentialAssertionOptions: WebAuthnLoginCredentialAssertionOptionsView,\n  ) => Promise<WebAuthnLoginCredentialAssertionView | undefined>;\n\n  /**\n   * Logs the user in using the assertion obtained from the authenticator.\n   * It completes the authentication process if the assertion is successfully validated server side:\n   * the server verifies the signed challenge with the corresponding public key.\n   *\n   * @param {WebAuthnLoginCredentialAssertionView} assertion - The assertion obtained from the authenticator\n   * that needs to be validated for login.\n   */\n  logIn: (assertion: WebAuthnLoginCredentialAssertionView) => Promise<AuthResult>;\n}\n","export enum AuthRequestType {\n  AuthenticateAndUnlock = 0,\n  Unlock = 1,\n  AdminApproval = 2,\n}\n","export enum AuthenticationStatus {\n  LoggedOut = 0,\n  Locked = 1,\n  Unlocked = 2,\n}\n","export enum AuthenticationType {\n  Password = 0,\n  Sso = 1,\n  UserApiKey = 2,\n  AuthRequest = 3,\n  WebAuthn = 4,\n}\n","export enum TwoFactorProviderType {\n  Authenticator = 0,\n  Email = 1,\n  Duo = 2,\n  Yubikey = 3,\n  U2f = 4,\n  Remember = 5,\n  OrganizationDuo = 6,\n  WebAuthn = 7,\n}\n","export enum VerificationType {\n  MasterPassword = 0,\n  OTP = 1,\n  PIN = 2,\n  Biometrics = 3,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\n\nexport class AdminAuthRequestStorable {\n  id: string;\n  privateKey: Uint8Array;\n\n  constructor(init?: Partial<AdminAuthRequestStorable>) {\n    if (init) {\n      Object.assign(this, init);\n    }\n  }\n\n  toJSON() {\n    return {\n      id: this.id,\n      privateKey: Utils.fromBufferToByteString(this.privateKey),\n    };\n  }\n\n  static fromJSON(obj: Jsonify<AdminAuthRequestStorable>): AdminAuthRequestStorable {\n    if (obj == null) {\n      return null;\n    }\n\n    let privateKeyBuffer = null;\n    if (obj.privateKey) {\n      privateKeyBuffer = Utils.fromByteStringToArray(obj.privateKey);\n    }\n\n    return new AdminAuthRequestStorable({\n      id: obj.id,\n      privateKey: privateKeyBuffer,\n    });\n  }\n}\n","/*\n * This enum is used to determine if a user should be forced to initially set or reset their password\n * on login (server flag) or unlock via MP (client evaluation).\n */\nexport enum ForceSetPasswordReason {\n  /**\n   * A password reset should not be forced.\n   */\n  None,\n\n  /**\n   * Occurs when an organization admin forces a user to reset their password.\n   * Communicated via server flag.\n   */\n  AdminForcePasswordReset,\n\n  /**\n   * Occurs when a user logs in / unlocks their vault with a master password that does not meet an organization's\n   * master password policy that is enforced on login/unlock.\n   * Only set client side b/c server can't evaluate MP.\n   */\n  WeakMasterPassword,\n\n  /**\n   * Occurs when a TDE user without a password obtains the password reset permission.\n   * Set post login & decryption client side and by server in sync (to catch logged in users).\n   */\n  TdeUserWithoutPasswordHasPasswordResetPermission,\n\n  /**\n   * Occurs when TDE is disabled and master password has to be set.\n   */\n  TdeOffboarding,\n}\n","import { AuthRequestType } from \"../../enums/auth-request-type\";\n\nexport class AuthRequest {\n  constructor(\n    readonly email: string,\n    readonly deviceIdentifier: string,\n    readonly publicKey: string,\n    readonly type: AuthRequestType,\n    readonly accessCode: string,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { DeviceType } from \"../../../../enums\";\nimport { PlatformUtilsService } from \"../../../../platform/abstractions/platform-utils.service\";\n\nexport class DeviceRequest {\n  type: DeviceType;\n  name: string;\n  identifier: string;\n  pushToken?: string;\n\n  constructor(appId: string, platformUtilsService: PlatformUtilsService) {\n    this.type = platformUtilsService.getDevice();\n    this.name = platformUtilsService.getDeviceString();\n    this.identifier = appId;\n    this.pushToken = null;\n  }\n\n  static fromJSON(json: Jsonify<DeviceRequest>) {\n    return Object.assign(Object.create(DeviceRequest.prototype), json);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TwoFactorProviderType } from \"../../../enums/two-factor-provider-type\";\n\nexport class TokenTwoFactorRequest {\n  constructor(\n    public provider: TwoFactorProviderType = null,\n    public token: string = null,\n    public remember: boolean = false,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\n\nexport abstract class TokenRequest {\n  protected device?: DeviceRequest;\n  protected authRequest: string;\n\n  constructor(\n    protected twoFactor?: TokenTwoFactorRequest,\n    device?: DeviceRequest,\n  ) {\n    this.device = device != null ? device : null;\n  }\n\n  // eslint-disable-next-line\n  alterIdentityTokenHeaders(headers: Headers) {\n    // Implemented in subclass if required\n  }\n\n  setTwoFactor(twoFactor: TokenTwoFactorRequest | undefined) {\n    this.twoFactor = twoFactor;\n  }\n\n  setAuthRequestAccessCode(accessCode: string) {\n    this.authRequest = accessCode;\n  }\n\n  protected toIdentityToken(clientId: string) {\n    const obj: any = {\n      scope: \"api offline_access\",\n      client_id: clientId,\n    };\n\n    if (this.device) {\n      obj.deviceType = this.device.type;\n      obj.deviceIdentifier = this.device.identifier;\n      obj.deviceName = this.device.name;\n      // no push tokens for browser apps yet\n      // obj.devicePushToken = this.device.pushToken;\n    }\n\n    //passswordless login\n    if (this.authRequest) {\n      obj.authRequest = this.authRequest;\n    }\n\n    if (this.twoFactor) {\n      if (this.twoFactor.token && this.twoFactor.provider != null) {\n        obj.twoFactorToken = this.twoFactor.token;\n        obj.twoFactorProvider = this.twoFactor.provider;\n        obj.twoFactorRemember = this.twoFactor.remember ? \"1\" : \"0\";\n      }\n    }\n\n    return obj;\n  }\n}\n","import { DeviceRequest } from \"./device.request\";\nimport { TokenTwoFactorRequest } from \"./token-two-factor.request\";\nimport { TokenRequest } from \"./token.request\";\n\nexport class UserApiTokenRequest extends TokenRequest {\n  constructor(\n    public clientId: string,\n    public clientSecret: string,\n    protected twoFactor: TokenTwoFactorRequest,\n    device?: DeviceRequest,\n  ) {\n    super(twoFactor, device);\n  }\n\n  toIdentityToken() {\n    const obj = super.toIdentityToken(this.clientId);\n\n    obj.scope = this.clientId.startsWith(\"organization\") ? \"api.organization\" : \"api\";\n    obj.grant_type = \"client_credentials\";\n    obj.client_secret = this.clientSecret;\n\n    return obj;\n  }\n\n  static fromJSON(json: any) {\n    return Object.assign(Object.create(UserApiTokenRequest.prototype), json, {\n      device: json.device ? DeviceRequest.fromJSON(json.device) : undefined,\n      twoFactor: json.twoFactor\n        ? Object.assign(new TokenTwoFactorRequest(), json.twoFactor)\n        : undefined,\n    });\n  }\n}\n","export class PasswordHintRequest {\n  email: string;\n\n  constructor(email: string) {\n    this.email = email;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class SecretVerificationRequest {\n  masterPasswordHash: string;\n  otp: string;\n  authRequestAccessCode: string;\n}\n","import { KdfType } from \"@bitwarden/key-management\";\n\nimport { KeysRequest } from \"../../../models/request/keys.request\";\n\nexport class SetPasswordRequest {\n  masterPasswordHash: string;\n  key: string;\n  masterPasswordHint: string;\n  keys: KeysRequest | null;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n  orgIdentifier: string;\n\n  constructor(\n    masterPasswordHash: string,\n    key: string,\n    masterPasswordHint: string,\n    orgIdentifier: string,\n    keys: KeysRequest | null,\n    kdf: KdfType,\n    kdfIterations: number,\n    kdfMemory?: number,\n    kdfParallelism?: number,\n  ) {\n    this.masterPasswordHash = masterPasswordHash;\n    this.key = key;\n    this.masterPasswordHint = masterPasswordHint;\n    this.kdf = kdf;\n    this.kdfIterations = kdfIterations;\n    this.kdfMemory = kdfMemory;\n    this.kdfParallelism = kdfParallelism;\n    this.orgIdentifier = orgIdentifier;\n    this.keys = keys;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorEmailRequest extends SecretVerificationRequest {\n  email: string;\n  deviceIdentifier: string;\n  authRequestId: string;\n  ssoEmail2FaSessionToken?: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { SecretVerificationRequest } from \"./secret-verification.request\";\n\nexport class TwoFactorProviderRequest extends SecretVerificationRequest {\n  type: TwoFactorProviderType;\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class IdentityCaptchaResponse extends BaseResponse {\n  siteKey: string;\n\n  constructor(response: any) {\n    super(response);\n    this.siteKey = this.getResponseProperty(\"HCaptcha_SiteKey\");\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport interface IKeyConnectorUserDecryptionOptionServerResponse {\n  KeyConnectorUrl: string;\n}\n\nexport class KeyConnectorUserDecryptionOptionResponse extends BaseResponse {\n  keyConnectorUrl: string;\n\n  constructor(response: IKeyConnectorUserDecryptionOptionServerResponse) {\n    super(response);\n    this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\n\nexport interface ITrustedDeviceUserDecryptionOptionServerResponse {\n  HasAdminApproval: boolean;\n  HasLoginApprovingDevice: boolean;\n  HasManageResetPasswordPermission: boolean;\n  IsTdeOffboarding: boolean;\n  EncryptedPrivateKey?: string;\n  EncryptedUserKey?: string;\n}\n\nexport class TrustedDeviceUserDecryptionOptionResponse extends BaseResponse {\n  hasAdminApproval: boolean;\n  hasLoginApprovingDevice: boolean;\n  hasManageResetPasswordPermission: boolean;\n  isTdeOffboarding: boolean;\n  encryptedPrivateKey: EncString;\n  encryptedUserKey: EncString;\n\n  constructor(response: any) {\n    super(response);\n    this.hasAdminApproval = this.getResponseProperty(\"HasAdminApproval\");\n\n    this.hasLoginApprovingDevice = this.getResponseProperty(\"HasLoginApprovingDevice\");\n    this.hasManageResetPasswordPermission = this.getResponseProperty(\n      \"HasManageResetPasswordPermission\",\n    );\n\n    this.isTdeOffboarding = this.getResponseProperty(\"IsTdeOffboarding\");\n\n    if (response.EncryptedPrivateKey) {\n      this.encryptedPrivateKey = new EncString(this.getResponseProperty(\"EncryptedPrivateKey\"));\n    }\n    if (response.EncryptedUserKey) {\n      this.encryptedUserKey = new EncString(this.getResponseProperty(\"EncryptedUserKey\"));\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\n\nexport interface IWebAuthnPrfDecryptionOptionServerResponse {\n  EncryptedPrivateKey: string;\n  EncryptedUserKey: string;\n}\n\nexport class WebAuthnPrfDecryptionOptionResponse extends BaseResponse {\n  encryptedPrivateKey: EncString;\n  encryptedUserKey: EncString;\n\n  constructor(response: IWebAuthnPrfDecryptionOptionServerResponse) {\n    super(response);\n    if (response.EncryptedPrivateKey) {\n      this.encryptedPrivateKey = new EncString(this.getResponseProperty(\"EncryptedPrivateKey\"));\n    }\n    if (response.EncryptedUserKey) {\n      this.encryptedUserKey = new EncString(this.getResponseProperty(\"EncryptedUserKey\"));\n    }\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nimport {\n  IKeyConnectorUserDecryptionOptionServerResponse,\n  KeyConnectorUserDecryptionOptionResponse,\n} from \"./key-connector-user-decryption-option.response\";\nimport {\n  ITrustedDeviceUserDecryptionOptionServerResponse,\n  TrustedDeviceUserDecryptionOptionResponse,\n} from \"./trusted-device-user-decryption-option.response\";\nimport {\n  IWebAuthnPrfDecryptionOptionServerResponse,\n  WebAuthnPrfDecryptionOptionResponse,\n} from \"./webauthn-prf-decryption-option.response\";\n\nexport interface IUserDecryptionOptionsServerResponse {\n  HasMasterPassword: boolean;\n  TrustedDeviceOption?: ITrustedDeviceUserDecryptionOptionServerResponse;\n  KeyConnectorOption?: IKeyConnectorUserDecryptionOptionServerResponse;\n  WebAuthnPrfOption?: IWebAuthnPrfDecryptionOptionServerResponse;\n}\n\nexport class UserDecryptionOptionsResponse extends BaseResponse {\n  hasMasterPassword: boolean;\n  trustedDeviceOption?: TrustedDeviceUserDecryptionOptionResponse;\n  keyConnectorOption?: KeyConnectorUserDecryptionOptionResponse;\n  webAuthnPrfOption?: WebAuthnPrfDecryptionOptionResponse;\n\n  constructor(response: IUserDecryptionOptionsServerResponse) {\n    super(response);\n\n    this.hasMasterPassword = this.getResponseProperty(\"HasMasterPassword\");\n\n    if (response.TrustedDeviceOption) {\n      this.trustedDeviceOption = new TrustedDeviceUserDecryptionOptionResponse(\n        this.getResponseProperty(\"TrustedDeviceOption\"),\n      );\n    }\n    if (response.KeyConnectorOption) {\n      this.keyConnectorOption = new KeyConnectorUserDecryptionOptionResponse(\n        this.getResponseProperty(\"KeyConnectorOption\"),\n      );\n    }\n    if (response.WebAuthnPrfOption) {\n      this.webAuthnPrfOption = new WebAuthnPrfDecryptionOptionResponse(\n        this.getResponseProperty(\"WebAuthnPrfOption\"),\n      );\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { KdfType } from \"@bitwarden/key-management\";\n\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { MasterPasswordPolicyResponse } from \"./master-password-policy.response\";\nimport { UserDecryptionOptionsResponse } from \"./user-decryption-options/user-decryption-options.response\";\n\nexport class IdentityTokenResponse extends BaseResponse {\n  accessToken: string;\n  expiresIn: number;\n  refreshToken: string;\n  tokenType: string;\n\n  resetMasterPassword: boolean;\n  privateKey: string;\n  key: string;\n  twoFactorToken: string;\n  kdf: KdfType;\n  kdfIterations: number;\n  kdfMemory?: number;\n  kdfParallelism?: number;\n  forcePasswordReset: boolean;\n  masterPasswordPolicy: MasterPasswordPolicyResponse;\n  apiUseKeyConnector: boolean;\n  keyConnectorUrl: string;\n\n  userDecryptionOptions: UserDecryptionOptionsResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.accessToken = response.access_token;\n    this.expiresIn = response.expires_in;\n    this.refreshToken = response.refresh_token;\n    this.tokenType = response.token_type;\n\n    this.resetMasterPassword = this.getResponseProperty(\"ResetMasterPassword\");\n    this.privateKey = this.getResponseProperty(\"PrivateKey\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.twoFactorToken = this.getResponseProperty(\"TwoFactorToken\");\n    this.kdf = this.getResponseProperty(\"Kdf\");\n    this.kdfIterations = this.getResponseProperty(\"KdfIterations\");\n    this.kdfMemory = this.getResponseProperty(\"KdfMemory\");\n    this.kdfParallelism = this.getResponseProperty(\"KdfParallelism\");\n    this.forcePasswordReset = this.getResponseProperty(\"ForcePasswordReset\");\n    this.apiUseKeyConnector = this.getResponseProperty(\"ApiUseKeyConnector\");\n    this.keyConnectorUrl = this.getResponseProperty(\"KeyConnectorUrl\");\n    this.masterPasswordPolicy = new MasterPasswordPolicyResponse(\n      this.getResponseProperty(\"MasterPasswordPolicy\"),\n    );\n\n    if (response.UserDecryptionOptions) {\n      this.userDecryptionOptions = new UserDecryptionOptionsResponse(\n        this.getResponseProperty(\"UserDecryptionOptions\"),\n      );\n    }\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { TwoFactorProviderType } from \"../../enums/two-factor-provider-type\";\n\nimport { MasterPasswordPolicyResponse } from \"./master-password-policy.response\";\n\nexport class IdentityTwoFactorResponse extends BaseResponse {\n  // contains available two-factor providers\n  twoFactorProviders: TwoFactorProviderType[];\n  // a map of two-factor providers to necessary data for completion\n  twoFactorProviders2: Record<TwoFactorProviderType, Record<string, string>>;\n  captchaToken: string;\n  ssoEmail2faSessionToken: string;\n  email?: string;\n  masterPasswordPolicy?: MasterPasswordPolicyResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.captchaToken = this.getResponseProperty(\"CaptchaBypassToken\");\n    this.twoFactorProviders = this.getResponseProperty(\"TwoFactorProviders\");\n    this.twoFactorProviders2 = this.getResponseProperty(\"TwoFactorProviders2\");\n    this.masterPasswordPolicy = new MasterPasswordPolicyResponse(\n      this.getResponseProperty(\"MasterPasswordPolicy\"),\n    );\n\n    this.ssoEmail2faSessionToken = this.getResponseProperty(\"SsoEmail2faSessionToken\");\n    this.email = this.getResponseProperty(\"Email\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class MasterPasswordPolicyResponse extends BaseResponse {\n  minComplexity: number;\n  minLength: number;\n  requireUpper: boolean;\n  requireLower: boolean;\n  requireNumbers: boolean;\n  requireSpecial: boolean;\n\n  /**\n   * Flag to indicate if the policy should be enforced on login.\n   * If true, and the user's password does not meet the policy requirements,\n   * the user will be forced to update their password.\n   */\n  enforceOnLogin: boolean;\n\n  constructor(response: any) {\n    super(response);\n\n    this.minComplexity = this.getResponseProperty(\"MinComplexity\");\n    this.minLength = this.getResponseProperty(\"MinLength\");\n    this.requireUpper = this.getResponseProperty(\"RequireUpper\");\n    this.requireLower = this.getResponseProperty(\"RequireLower\");\n    this.requireNumbers = this.getResponseProperty(\"RequireNumbers\");\n    this.requireSpecial = this.getResponseProperty(\"RequireSpecial\");\n    this.enforceOnLogin = this.getResponseProperty(\"EnforceOnLogin\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { Utils } from \"../../../platform/misc/utils\";\n\nexport class TwoFactorWebAuthnResponse extends BaseResponse {\n  enabled: boolean;\n  keys: KeyResponse[];\n\n  constructor(response: any) {\n    super(response);\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    const keys = this.getResponseProperty(\"Keys\");\n    this.keys = keys == null ? null : keys.map((k: any) => new KeyResponse(k));\n  }\n}\n\nexport class KeyResponse extends BaseResponse {\n  name: string;\n  id: number;\n  migrated: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.name = this.getResponseProperty(\"Name\");\n    this.id = this.getResponseProperty(\"Id\");\n    this.migrated = this.getResponseProperty(\"Migrated\");\n  }\n}\n\nexport class ChallengeResponse extends BaseResponse implements PublicKeyCredentialCreationOptions {\n  attestation?: AttestationConveyancePreference;\n  authenticatorSelection?: AuthenticatorSelectionCriteria;\n  challenge: BufferSource;\n  excludeCredentials?: PublicKeyCredentialDescriptor[];\n  extensions?: AuthenticationExtensionsClientInputs;\n  pubKeyCredParams: PublicKeyCredentialParameters[];\n  rp: PublicKeyCredentialRpEntity;\n  timeout?: number;\n  user: PublicKeyCredentialUserEntity;\n\n  constructor(response: any) {\n    super(response);\n    this.attestation = this.getResponseProperty(\"attestation\");\n    this.authenticatorSelection = this.getResponseProperty(\"authenticatorSelection\");\n    this.challenge = Utils.fromUrlB64ToArray(this.getResponseProperty(\"challenge\"));\n    this.excludeCredentials = this.getResponseProperty(\"excludeCredentials\").map((c: any) => {\n      c.id = Utils.fromUrlB64ToArray(c.id).buffer;\n      return c;\n    });\n    this.extensions = this.getResponseProperty(\"extensions\");\n    this.pubKeyCredParams = this.getResponseProperty(\"pubKeyCredParams\");\n    this.rp = this.getResponseProperty(\"rp\");\n    this.timeout = this.getResponseProperty(\"timeout\");\n\n    const user = this.getResponseProperty(\"user\");\n    user.id = Utils.fromUrlB64ToArray(user.id);\n\n    this.user = user;\n  }\n}\n","import { AssertionOptionsResponse } from \"../../../services/webauthn-login/response/assertion-options.response\";\n\nexport class WebAuthnLoginCredentialAssertionOptionsView {\n  constructor(\n    readonly options: AssertionOptionsResponse,\n    readonly token: string,\n  ) {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { I18nService } from \"../../platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"../../platform/abstractions/platform-utils.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport { GlobalStateProvider, KeyDefinition, TWO_FACTOR_MEMORY } from \"../../platform/state\";\nimport {\n  TwoFactorProviderDetails,\n  TwoFactorService as TwoFactorServiceAbstraction,\n} from \"../abstractions/two-factor.service\";\nimport { TwoFactorProviderType } from \"../enums/two-factor-provider-type\";\nimport { IdentityTwoFactorResponse } from \"../models/response/identity-two-factor.response\";\n\nexport const TwoFactorProviders: Partial<Record<TwoFactorProviderType, TwoFactorProviderDetails>> =\n  {\n    [TwoFactorProviderType.Authenticator]: {\n      type: TwoFactorProviderType.Authenticator,\n      name: null as string,\n      description: null as string,\n      priority: 1,\n      sort: 2,\n      premium: false,\n    },\n    [TwoFactorProviderType.Yubikey]: {\n      type: TwoFactorProviderType.Yubikey,\n      name: null as string,\n      description: null as string,\n      priority: 3,\n      sort: 4,\n      premium: true,\n    },\n    [TwoFactorProviderType.Duo]: {\n      type: TwoFactorProviderType.Duo,\n      name: \"Duo\",\n      description: null as string,\n      priority: 2,\n      sort: 5,\n      premium: true,\n    },\n    [TwoFactorProviderType.OrganizationDuo]: {\n      type: TwoFactorProviderType.OrganizationDuo,\n      name: \"Duo (Organization)\",\n      description: null as string,\n      priority: 10,\n      sort: 6,\n      premium: false,\n    },\n    [TwoFactorProviderType.Email]: {\n      type: TwoFactorProviderType.Email,\n      name: null as string,\n      description: null as string,\n      priority: 0,\n      sort: 1,\n      premium: false,\n    },\n    [TwoFactorProviderType.WebAuthn]: {\n      type: TwoFactorProviderType.WebAuthn,\n      name: null as string,\n      description: null as string,\n      priority: 4,\n      sort: 3,\n      premium: false,\n    },\n  };\n\n// Memory storage as only required during authentication process\nexport const PROVIDERS = KeyDefinition.record<Record<string, string>, TwoFactorProviderType>(\n  TWO_FACTOR_MEMORY,\n  \"providers\",\n  {\n    deserializer: (obj) => obj,\n  },\n);\n\n// Memory storage as only required during authentication process\nexport const SELECTED_PROVIDER = new KeyDefinition<TwoFactorProviderType>(\n  TWO_FACTOR_MEMORY,\n  \"selected\",\n  {\n    deserializer: (obj) => obj,\n  },\n);\n\nexport class TwoFactorService implements TwoFactorServiceAbstraction {\n  private providersState = this.globalStateProvider.get(PROVIDERS);\n  private selectedState = this.globalStateProvider.get(SELECTED_PROVIDER);\n  readonly providers$ = this.providersState.state$.pipe(\n    map((providers) => Utils.recordToMap(providers)),\n  );\n  readonly selected$ = this.selectedState.state$;\n\n  constructor(\n    private i18nService: I18nService,\n    private platformUtilsService: PlatformUtilsService,\n    private globalStateProvider: GlobalStateProvider,\n  ) {}\n\n  init() {\n    TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t(\"emailTitle\");\n    TwoFactorProviders[TwoFactorProviderType.Email].description = this.i18nService.t(\"emailDescV2\");\n\n    TwoFactorProviders[TwoFactorProviderType.Authenticator].name =\n      this.i18nService.t(\"authenticatorAppTitle\");\n    TwoFactorProviders[TwoFactorProviderType.Authenticator].description =\n      this.i18nService.t(\"authenticatorAppDescV2\");\n\n    TwoFactorProviders[TwoFactorProviderType.Duo].description = this.i18nService.t(\"duoDescV2\");\n\n    TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].name =\n      \"Duo (\" + this.i18nService.t(\"organization\") + \")\";\n    TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].description =\n      this.i18nService.t(\"duoOrganizationDesc\");\n\n    TwoFactorProviders[TwoFactorProviderType.WebAuthn].name = this.i18nService.t(\"webAuthnTitle\");\n    TwoFactorProviders[TwoFactorProviderType.WebAuthn].description =\n      this.i18nService.t(\"webAuthnDesc\");\n\n    TwoFactorProviders[TwoFactorProviderType.Yubikey].name = this.i18nService.t(\"yubiKeyTitleV2\");\n    TwoFactorProviders[TwoFactorProviderType.Yubikey].description =\n      this.i18nService.t(\"yubiKeyDesc\");\n  }\n\n  async getSupportedProviders(win: Window): Promise<TwoFactorProviderDetails[]> {\n    const data = await firstValueFrom(this.providers$);\n    const providers: any[] = [];\n    if (data == null) {\n      return providers;\n    }\n\n    if (\n      data.has(TwoFactorProviderType.OrganizationDuo) &&\n      this.platformUtilsService.supportsDuo()\n    ) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.OrganizationDuo]);\n    }\n\n    if (data.has(TwoFactorProviderType.Authenticator)) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.Authenticator]);\n    }\n\n    if (data.has(TwoFactorProviderType.Yubikey)) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.Yubikey]);\n    }\n\n    if (data.has(TwoFactorProviderType.Duo) && this.platformUtilsService.supportsDuo()) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.Duo]);\n    }\n\n    if (\n      data.has(TwoFactorProviderType.WebAuthn) &&\n      this.platformUtilsService.supportsWebAuthn(win)\n    ) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.WebAuthn]);\n    }\n\n    if (data.has(TwoFactorProviderType.Email)) {\n      providers.push(TwoFactorProviders[TwoFactorProviderType.Email]);\n    }\n\n    return providers;\n  }\n\n  async getDefaultProvider(webAuthnSupported: boolean): Promise<TwoFactorProviderType> {\n    const data = await firstValueFrom(this.providers$);\n    const selected = await firstValueFrom(this.selected$);\n    if (data == null) {\n      return null;\n    }\n\n    if (selected != null && data.has(selected)) {\n      return selected;\n    }\n\n    let providerType: TwoFactorProviderType = null;\n    let providerPriority = -1;\n    data.forEach((_value, type) => {\n      const provider = (TwoFactorProviders as any)[type];\n      if (provider != null && provider.priority > providerPriority) {\n        if (type === TwoFactorProviderType.WebAuthn && !webAuthnSupported) {\n          return;\n        }\n\n        providerType = type;\n        providerPriority = provider.priority;\n      }\n    });\n\n    return providerType;\n  }\n\n  async setSelectedProvider(type: TwoFactorProviderType): Promise<void> {\n    await this.selectedState.update(() => type);\n  }\n\n  async clearSelectedProvider(): Promise<void> {\n    await this.selectedState.update(() => null);\n  }\n\n  async setProviders(response: IdentityTwoFactorResponse): Promise<void> {\n    await this.providersState.update(() => response.twoFactorProviders2);\n  }\n\n  async clearProviders(): Promise<void> {\n    await this.providersState.update(() => null);\n  }\n\n  getProviders(): Promise<Map<TwoFactorProviderType, { [key: string]: string }>> {\n    return firstValueFrom(this.providers$);\n  }\n}\n","import { Utils } from \"../../../../platform/misc/utils\";\n\nexport abstract class WebAuthnLoginResponseRequest {\n  id: string;\n  rawId: string;\n  type: string;\n  extensions: Record<string, unknown>;\n\n  constructor(credential: PublicKeyCredential) {\n    this.id = credential.id;\n    this.rawId = Utils.fromBufferToUrlB64(credential.rawId);\n    this.type = credential.type;\n\n    // WARNING: do not add PRF information here by mapping\n    // credential.getClientExtensionResults() into the extensions property,\n    // as it will be sent to the server (leaking credentials).\n    this.extensions = {}; // Extensions are handled client-side\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../../platform/misc/utils\";\n\nimport { WebAuthnLoginResponseRequest } from \"./webauthn-login-response.request\";\n\n// base 64 strings\nexport interface WebAuthnLoginAssertionResponseData {\n  authenticatorData: string;\n  signature: string;\n  clientDataJSON: string;\n  userHandle: string;\n}\n\nexport class WebAuthnLoginAssertionResponseRequest extends WebAuthnLoginResponseRequest {\n  response: WebAuthnLoginAssertionResponseData;\n\n  constructor(credential: PublicKeyCredential) {\n    super(credential);\n\n    if (!(credential.response instanceof AuthenticatorAssertionResponse)) {\n      throw new Error(\"Invalid authenticator response\");\n    }\n\n    this.response = {\n      authenticatorData: Utils.fromBufferToUrlB64(credential.response.authenticatorData),\n      signature: Utils.fromBufferToUrlB64(credential.response.signature),\n      clientDataJSON: Utils.fromBufferToUrlB64(credential.response.clientDataJSON),\n      userHandle: Utils.fromBufferToUrlB64(credential.response.userHandle),\n    };\n  }\n\n  static fromJSON(json: Jsonify<WebAuthnLoginAssertionResponseRequest>) {\n    return Object.assign(Object.create(WebAuthnLoginAssertionResponseRequest.prototype), json);\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\nimport { Utils } from \"../../../../platform/misc/utils\";\n\nexport class AssertionOptionsResponse\n  extends BaseResponse\n  implements PublicKeyCredentialRequestOptions\n{\n  /** A list of credentials that the authenticator is allowed to use; only used for non-discoverable flow */\n  allowCredentials?: PublicKeyCredentialDescriptor[];\n  challenge: BufferSource;\n  extensions?: AuthenticationExtensionsClientInputs;\n  rpId?: string;\n  timeout?: number;\n  userVerification?: UserVerificationRequirement;\n\n  constructor(response: unknown) {\n    super(response);\n    this.allowCredentials = this.getResponseProperty(\"allowCredentials\")?.map((c: any) => ({\n      ...c,\n      id: Utils.fromUrlB64ToArray(c.id).buffer,\n    }));\n    this.challenge = Utils.fromUrlB64ToArray(this.getResponseProperty(\"challenge\"));\n    this.extensions = this.getResponseProperty(\"extensions\");\n    this.rpId = this.getResponseProperty(\"rpId\");\n    this.timeout = this.getResponseProperty(\"timeout\");\n    this.userVerification = this.getResponseProperty(\"userVerification\");\n  }\n}\n","import { BaseResponse } from \"../../../../models/response/base.response\";\n\nimport { AssertionOptionsResponse } from \"./assertion-options.response\";\n\nexport class CredentialAssertionOptionsResponse extends BaseResponse {\n  options: AssertionOptionsResponse;\n  token: string;\n\n  constructor(response: unknown) {\n    super(response);\n    this.options = new AssertionOptionsResponse(this.getResponseProperty(\"options\"));\n    this.token = this.getResponseProperty(\"token\");\n  }\n}\n","export const TYPE_CHECK = {\n  FUNCTION: \"function\",\n  NUMBER: \"number\",\n  STRING: \"string\",\n} as const;\n\nexport const EVENTS = {\n  CHANGE: \"change\",\n  INPUT: \"input\",\n  KEYDOWN: \"keydown\",\n  KEYPRESS: \"keypress\",\n  KEYUP: \"keyup\",\n  BLUR: \"blur\",\n  CLICK: \"click\",\n  FOCUS: \"focus\",\n  FOCUSIN: \"focusin\",\n  FOCUSOUT: \"focusout\",\n  SCROLL: \"scroll\",\n  RESIZE: \"resize\",\n  DOMCONTENTLOADED: \"DOMContentLoaded\",\n  LOAD: \"load\",\n  MESSAGE: \"message\",\n  VISIBILITYCHANGE: \"visibilitychange\",\n  MOUSEENTER: \"mouseenter\",\n  MOUSELEAVE: \"mouseleave\",\n  MOUSEUP: \"mouseup\",\n  MOUSEOUT: \"mouseout\",\n  SUBMIT: \"submit\",\n} as const;\n\nexport const ClearClipboardDelay = {\n  Never: null as null,\n  TenSeconds: 10,\n  TwentySeconds: 20,\n  ThirtySeconds: 30,\n  OneMinute: 60,\n  TwoMinutes: 120,\n  FiveMinutes: 300,\n} as const;\n\n/* Context Menu item Ids */\nexport const AUTOFILL_CARD_ID = \"autofill-card\";\nexport const AUTOFILL_ID = \"autofill\";\nexport const SHOW_AUTOFILL_BUTTON = \"show-autofill-button\";\nexport const AUTOFILL_IDENTITY_ID = \"autofill-identity\";\nexport const COPY_IDENTIFIER_ID = \"copy-identifier\";\nexport const COPY_PASSWORD_ID = \"copy-password\";\nexport const COPY_USERNAME_ID = \"copy-username\";\nexport const COPY_VERIFICATION_CODE_ID = \"copy-totp\";\nexport const CREATE_CARD_ID = \"create-card\";\nexport const CREATE_IDENTITY_ID = \"create-identity\";\nexport const CREATE_LOGIN_ID = \"create-login\";\nexport const GENERATE_PASSWORD_ID = \"generate-password\";\nexport const NOOP_COMMAND_SUFFIX = \"noop\";\nexport const ROOT_ID = \"root\";\nexport const SEPARATOR_ID = \"separator\";\n\nexport const NOTIFICATION_BAR_LIFESPAN_MS = 150000; // 150 seconds\n\nexport const AUTOFILL_OVERLAY_HANDLE_REPOSITION = \"autofill-overlay-handle-reposition-event\";\n\nexport const AUTOFILL_OVERLAY_HANDLE_SCROLL = \"autofill-overlay-handle-scroll-event\";\n\nexport const UPDATE_PASSKEYS_HEADINGS_ON_SCROLL = \"update-passkeys-headings-on-scroll\";\n\nexport const AUTOFILL_TRIGGER_FORM_FIELD_SUBMIT = \"autofill-trigger-form-field-submit\";\n\nexport const AutofillOverlayVisibility = {\n  Off: 0,\n  OnButtonClick: 1,\n  OnFieldFocus: 2,\n} as const;\n\nexport const BrowserClientVendors = {\n  Chrome: \"Chrome\",\n  Opera: \"Opera\",\n  Edge: \"Edge\",\n  Vivaldi: \"Vivaldi\",\n  Unknown: \"Unknown\",\n} as const;\n\nexport const BrowserShortcutsUris = {\n  Chrome: \"chrome://extensions/shortcuts\",\n  Opera: \"opera://extensions/shortcuts\",\n  Edge: \"edge://extensions/shortcuts\",\n  Vivaldi: \"vivaldi://extensions/shortcuts\",\n  Unknown: \"https://bitwarden.com/help/keyboard-shortcuts\",\n} as const;\n\nexport const DisablePasswordManagerUris = {\n  Chrome: \"chrome://settings/autofill\",\n  Opera: \"opera://settings/autofill\",\n  Edge: \"edge://settings/passwords\",\n  Vivaldi: \"vivaldi://settings/autofill\",\n  Unknown: \"https://bitwarden.com/help/disable-browser-autofill/\",\n} as const;\n\nexport const ExtensionCommand = {\n  AutofillCommand: \"autofill_cmd\",\n  AutofillCard: \"autofill_card\",\n  AutofillIdentity: \"autofill_identity\",\n  AutofillLogin: \"autofill_login\",\n  OpenAutofillOverlay: \"open_autofill_overlay\",\n  GeneratePassword: \"generate_password\",\n  OpenPopup: \"open_popup\",\n  LockVault: \"lock_vault\",\n  NoopCommand: \"noop\",\n} as const;\n\nexport type ExtensionCommandType = (typeof ExtensionCommand)[keyof typeof ExtensionCommand];\n\nexport const CLEAR_NOTIFICATION_LOGIN_DATA_DURATION = 60 * 1000; // 1 minute\n\nexport const MAX_DEEP_QUERY_RECURSION_DEPTH = 4;\n\nexport * from \"./match-patterns\";\n","export const CardExpiryDateDelimiters: string[] = [\"/\", \"-\", \".\", \" \"];\n\n// `CardExpiryDateDelimiters` is not intended solely for regex consumption,\n// so we need to format it here\nexport const ExpiryDateDelimitersPattern =\n  \"\\\\\" +\n  CardExpiryDateDelimiters.join(\"\\\\\")\n    // replace space character with the regex whitespace character class\n    .replace(\" \", \"s\");\n\nexport const MonthPattern = \"(([1]{1}[0-2]{1})|(0?[1-9]{1}))\";\n\n// Because we're dealing with expiry dates, we assume the year will be in current or next century (as of 2024)\nexport const ExpiryFullYearPattern = \"2[0-1]{1}\\\\d{2}\";\n\nexport const DelimiterPatternExpression = new RegExp(`[${ExpiryDateDelimitersPattern}]`, \"g\");\n\nexport const IrrelevantExpiryCharactersPatternExpression = new RegExp(\n  // \"nor digits\" to ensure numbers are removed from guidance pattern, which aren't covered by ^\\w\n  `[^\\\\d${ExpiryDateDelimitersPattern}]`,\n  \"g\",\n);\n\nexport const MonthPatternExpression = new RegExp(`^${MonthPattern}$`);\n\nexport const ExpiryFullYearPatternExpression = new RegExp(`^${ExpiryFullYearPattern}$`);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable } from \"rxjs\";\n\nimport { PolicyService } from \"../../admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"../../admin-console/enums\";\nimport {\n  AUTOFILL_SETTINGS_DISK,\n  AUTOFILL_SETTINGS_DISK_LOCAL,\n  ActiveUserState,\n  GlobalState,\n  KeyDefinition,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\nimport { ClearClipboardDelay, AutofillOverlayVisibility } from \"../constants\";\nimport { ClearClipboardDelaySetting, InlineMenuVisibilitySetting } from \"../types\";\n\nconst AUTOFILL_ON_PAGE_LOAD = new UserKeyDefinition(AUTOFILL_SETTINGS_DISK, \"autofillOnPageLoad\", {\n  deserializer: (value: boolean) => value ?? false,\n  clearOn: [],\n});\n\nconst AUTOFILL_ON_PAGE_LOAD_DEFAULT = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK,\n  \"autofillOnPageLoadDefault\",\n  {\n    deserializer: (value: boolean) => value ?? false,\n    clearOn: [],\n  },\n);\n\nconst AUTOFILL_ON_PAGE_LOAD_CALLOUT_DISMISSED = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK,\n  \"autofillOnPageLoadCalloutIsDismissed\",\n  {\n    deserializer: (value: boolean) => value ?? false,\n    clearOn: [],\n  },\n);\n\nconst AUTOFILL_ON_PAGE_LOAD_POLICY_TOAST_HAS_DISPLAYED = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK,\n  \"autofillOnPageLoadPolicyToastHasDisplayed\",\n  {\n    deserializer: (value: boolean) => value ?? false,\n    clearOn: [],\n  },\n);\n\nconst AUTO_COPY_TOTP = new UserKeyDefinition(AUTOFILL_SETTINGS_DISK, \"autoCopyTotp\", {\n  deserializer: (value: boolean) => value ?? true,\n  clearOn: [],\n});\n\nconst INLINE_MENU_VISIBILITY = new KeyDefinition(\n  AUTOFILL_SETTINGS_DISK_LOCAL,\n  \"inlineMenuVisibility\",\n  {\n    deserializer: (value: InlineMenuVisibilitySetting) => value ?? AutofillOverlayVisibility.Off,\n  },\n);\n\nconst SHOW_INLINE_MENU_IDENTITIES = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK,\n  \"showInlineMenuIdentities\",\n  {\n    deserializer: (value: boolean) => value ?? true,\n    clearOn: [],\n  },\n);\n\nconst SHOW_INLINE_MENU_CARDS = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK,\n  \"showInlineMenuCards\",\n  {\n    deserializer: (value: boolean) => value ?? true,\n    clearOn: [],\n  },\n);\n\nconst ENABLE_CONTEXT_MENU = new KeyDefinition(AUTOFILL_SETTINGS_DISK, \"enableContextMenu\", {\n  deserializer: (value: boolean) => value ?? true,\n});\n\nconst CLEAR_CLIPBOARD_DELAY = new UserKeyDefinition(\n  AUTOFILL_SETTINGS_DISK_LOCAL,\n  \"clearClipboardDelay\",\n  {\n    deserializer: (value: ClearClipboardDelaySetting) => value ?? ClearClipboardDelay.Never,\n    clearOn: [],\n  },\n);\n\nexport abstract class AutofillSettingsServiceAbstraction {\n  autofillOnPageLoad$: Observable<boolean>;\n  setAutofillOnPageLoad: (newValue: boolean) => Promise<void>;\n  autofillOnPageLoadDefault$: Observable<boolean>;\n  setAutofillOnPageLoadDefault: (newValue: boolean) => Promise<void>;\n  autofillOnPageLoadCalloutIsDismissed$: Observable<boolean>;\n  setAutofillOnPageLoadCalloutIsDismissed: (newValue: boolean) => Promise<void>;\n  activateAutofillOnPageLoadFromPolicy$: Observable<boolean>;\n  setAutofillOnPageLoadPolicyToastHasDisplayed: (newValue: boolean) => Promise<void>;\n  autofillOnPageLoadPolicyToastHasDisplayed$: Observable<boolean>;\n  autoCopyTotp$: Observable<boolean>;\n  setAutoCopyTotp: (newValue: boolean) => Promise<void>;\n  inlineMenuVisibility$: Observable<InlineMenuVisibilitySetting>;\n  setInlineMenuVisibility: (newValue: InlineMenuVisibilitySetting) => Promise<void>;\n  showInlineMenuIdentities$: Observable<boolean>;\n  setShowInlineMenuIdentities: (newValue: boolean) => Promise<void>;\n  showInlineMenuCards$: Observable<boolean>;\n  setShowInlineMenuCards: (newValue: boolean) => Promise<void>;\n  enableContextMenu$: Observable<boolean>;\n  setEnableContextMenu: (newValue: boolean) => Promise<void>;\n  clearClipboardDelay$: Observable<ClearClipboardDelaySetting>;\n  setClearClipboardDelay: (newValue: ClearClipboardDelaySetting) => Promise<void>;\n}\n\nexport class AutofillSettingsService implements AutofillSettingsServiceAbstraction {\n  private autofillOnPageLoadState: ActiveUserState<boolean>;\n  readonly autofillOnPageLoad$: Observable<boolean>;\n\n  private autofillOnPageLoadDefaultState: ActiveUserState<boolean>;\n  readonly autofillOnPageLoadDefault$: Observable<boolean>;\n\n  private autofillOnPageLoadCalloutIsDismissedState: ActiveUserState<boolean>;\n  readonly autofillOnPageLoadCalloutIsDismissed$: Observable<boolean>;\n\n  readonly activateAutofillOnPageLoadFromPolicy$: Observable<boolean>;\n\n  private autofillOnPageLoadPolicyToastHasDisplayedState: ActiveUserState<boolean>;\n  readonly autofillOnPageLoadPolicyToastHasDisplayed$: Observable<boolean>;\n\n  private autoCopyTotpState: ActiveUserState<boolean>;\n  readonly autoCopyTotp$: Observable<boolean>;\n\n  private inlineMenuVisibilityState: GlobalState<InlineMenuVisibilitySetting>;\n  readonly inlineMenuVisibility$: Observable<InlineMenuVisibilitySetting>;\n\n  private showInlineMenuIdentitiesState: ActiveUserState<boolean>;\n  readonly showInlineMenuIdentities$: Observable<boolean>;\n\n  private showInlineMenuCardsState: ActiveUserState<boolean>;\n  readonly showInlineMenuCards$: Observable<boolean>;\n\n  private enableContextMenuState: GlobalState<boolean>;\n  readonly enableContextMenu$: Observable<boolean>;\n\n  private clearClipboardDelayState: ActiveUserState<ClearClipboardDelaySetting>;\n  readonly clearClipboardDelay$: Observable<ClearClipboardDelaySetting>;\n\n  constructor(\n    private stateProvider: StateProvider,\n    private policyService: PolicyService,\n  ) {\n    this.autofillOnPageLoadState = this.stateProvider.getActive(AUTOFILL_ON_PAGE_LOAD);\n    this.autofillOnPageLoad$ = this.autofillOnPageLoadState.state$.pipe(map((x) => x ?? false));\n\n    this.autofillOnPageLoadDefaultState = this.stateProvider.getActive(\n      AUTOFILL_ON_PAGE_LOAD_DEFAULT,\n    );\n    this.autofillOnPageLoadDefault$ = this.autofillOnPageLoadDefaultState.state$.pipe(\n      map((x) => x ?? true),\n    );\n\n    this.autofillOnPageLoadCalloutIsDismissedState = this.stateProvider.getActive(\n      AUTOFILL_ON_PAGE_LOAD_CALLOUT_DISMISSED,\n    );\n    this.autofillOnPageLoadCalloutIsDismissed$ =\n      this.autofillOnPageLoadCalloutIsDismissedState.state$.pipe(map((x) => x ?? false));\n\n    this.activateAutofillOnPageLoadFromPolicy$ = this.policyService.policyAppliesToActiveUser$(\n      PolicyType.ActivateAutofill,\n    );\n\n    this.autofillOnPageLoadPolicyToastHasDisplayedState = this.stateProvider.getActive(\n      AUTOFILL_ON_PAGE_LOAD_POLICY_TOAST_HAS_DISPLAYED,\n    );\n    this.autofillOnPageLoadPolicyToastHasDisplayed$ =\n      this.autofillOnPageLoadPolicyToastHasDisplayedState.state$.pipe(map((x) => x ?? false));\n\n    this.autoCopyTotpState = this.stateProvider.getActive(AUTO_COPY_TOTP);\n    this.autoCopyTotp$ = this.autoCopyTotpState.state$.pipe(map((x) => x ?? true));\n\n    this.inlineMenuVisibilityState = this.stateProvider.getGlobal(INLINE_MENU_VISIBILITY);\n    this.inlineMenuVisibility$ = this.inlineMenuVisibilityState.state$.pipe(\n      map((x) => x ?? AutofillOverlayVisibility.Off),\n    );\n\n    this.showInlineMenuIdentitiesState = this.stateProvider.getActive(SHOW_INLINE_MENU_IDENTITIES);\n    this.showInlineMenuIdentities$ = this.showInlineMenuIdentitiesState.state$.pipe(\n      map((x) => x ?? true),\n    );\n\n    this.showInlineMenuCardsState = this.stateProvider.getActive(SHOW_INLINE_MENU_CARDS);\n    this.showInlineMenuCards$ = this.showInlineMenuCardsState.state$.pipe(map((x) => x ?? true));\n\n    this.enableContextMenuState = this.stateProvider.getGlobal(ENABLE_CONTEXT_MENU);\n    this.enableContextMenu$ = this.enableContextMenuState.state$.pipe(map((x) => x ?? true));\n\n    this.clearClipboardDelayState = this.stateProvider.getActive(CLEAR_CLIPBOARD_DELAY);\n    this.clearClipboardDelay$ = this.clearClipboardDelayState.state$.pipe(\n      map((x) => x ?? ClearClipboardDelay.Never),\n    );\n  }\n\n  async setAutofillOnPageLoad(newValue: boolean): Promise<void> {\n    await this.autofillOnPageLoadState.update(() => newValue);\n  }\n\n  async setAutofillOnPageLoadDefault(newValue: boolean): Promise<void> {\n    await this.autofillOnPageLoadDefaultState.update(() => newValue);\n  }\n\n  async setAutofillOnPageLoadCalloutIsDismissed(newValue: boolean): Promise<void> {\n    await this.autofillOnPageLoadCalloutIsDismissedState.update(() => newValue);\n  }\n\n  async setAutofillOnPageLoadPolicyToastHasDisplayed(newValue: boolean): Promise<void> {\n    await this.autofillOnPageLoadPolicyToastHasDisplayedState.update(() => newValue);\n  }\n\n  async setAutoCopyTotp(newValue: boolean): Promise<void> {\n    await this.autoCopyTotpState.update(() => newValue);\n  }\n\n  async setInlineMenuVisibility(newValue: InlineMenuVisibilitySetting): Promise<void> {\n    await this.inlineMenuVisibilityState.update(() => newValue);\n  }\n\n  async setShowInlineMenuIdentities(newValue: boolean): Promise<void> {\n    await this.showInlineMenuIdentitiesState.update(() => newValue);\n  }\n\n  async setShowInlineMenuCards(newValue: boolean): Promise<void> {\n    await this.showInlineMenuCardsState.update(() => newValue);\n  }\n\n  async setEnableContextMenu(newValue: boolean): Promise<void> {\n    await this.enableContextMenuState.update(() => newValue);\n  }\n\n  async setClearClipboardDelay(newValue: ClearClipboardDelaySetting): Promise<void> {\n    await this.clearClipboardDelayState.update(() => newValue);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable, switchMap, of } from \"rxjs\";\n\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\n\nimport {\n  NeverDomains,\n  EquivalentDomains,\n  UriMatchStrategySetting,\n  UriMatchStrategy,\n} from \"../../models/domain/domain-service\";\nimport { ConfigService } from \"../../platform/abstractions/config/config.service\";\nimport { Utils } from \"../../platform/misc/utils\";\nimport {\n  DOMAIN_SETTINGS_DISK,\n  ActiveUserState,\n  GlobalState,\n  KeyDefinition,\n  StateProvider,\n  UserKeyDefinition,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\n\nconst SHOW_FAVICONS = new KeyDefinition(DOMAIN_SETTINGS_DISK, \"showFavicons\", {\n  deserializer: (value: boolean) => value ?? true,\n});\n\n// Domain exclusion list for notifications\nconst NEVER_DOMAINS = new KeyDefinition(DOMAIN_SETTINGS_DISK, \"neverDomains\", {\n  deserializer: (value: NeverDomains) => value ?? null,\n});\n\n// Domain exclusion list for content script injections\nconst BLOCKED_INTERACTIONS_URIS = new KeyDefinition(\n  DOMAIN_SETTINGS_DISK,\n  \"blockedInteractionsUris\",\n  {\n    deserializer: (value: NeverDomains) => value ?? {},\n  },\n);\n\nconst EQUIVALENT_DOMAINS = new UserKeyDefinition(DOMAIN_SETTINGS_DISK, \"equivalentDomains\", {\n  deserializer: (value: EquivalentDomains) => value ?? null,\n  clearOn: [\"logout\"],\n});\n\nconst DEFAULT_URI_MATCH_STRATEGY = new UserKeyDefinition(\n  DOMAIN_SETTINGS_DISK,\n  \"defaultUriMatchStrategy\",\n  {\n    deserializer: (value: UriMatchStrategySetting) => value ?? UriMatchStrategy.Domain,\n    clearOn: [],\n  },\n);\n\n/**\n * The Domain Settings service; provides client settings state for \"active client view\" URI concerns\n */\nexport abstract class DomainSettingsService {\n  /**\n   * Indicates if the favicons for ciphers' URIs should be shown instead of a placeholder\n   */\n  showFavicons$: Observable<boolean>;\n  setShowFavicons: (newValue: boolean) => Promise<void>;\n\n  /**\n   * User-specified URIs for which the client notifications should not appear\n   */\n  neverDomains$: Observable<NeverDomains>;\n  setNeverDomains: (newValue: NeverDomains) => Promise<void>;\n\n  /**\n   * User-specified URIs for which client content script injections should not occur, and the state\n   * of banner/notice visibility for those domains within the client\n   */\n  blockedInteractionsUris$: Observable<NeverDomains>;\n  setBlockedInteractionsUris: (newValue: NeverDomains) => Promise<void>;\n\n  /**\n   * URIs which should be treated as equivalent to each other for various concerns (autofill, etc)\n   */\n  equivalentDomains$: Observable<EquivalentDomains>;\n  setEquivalentDomains: (newValue: EquivalentDomains, userId: UserId) => Promise<void>;\n\n  /**\n   * User-specified default for URI-matching strategies (for example, when determining relevant\n   * ciphers for an active browser tab). Can be overridden by cipher-specific settings.\n   */\n  defaultUriMatchStrategy$: Observable<UriMatchStrategySetting>;\n  setDefaultUriMatchStrategy: (newValue: UriMatchStrategySetting) => Promise<void>;\n\n  /**\n   * Helper function for the common resolution of a given URL against equivalent domains\n   */\n  getUrlEquivalentDomains: (url: string) => Observable<Set<string>>;\n}\n\nexport class DefaultDomainSettingsService implements DomainSettingsService {\n  private showFaviconsState: GlobalState<boolean>;\n  readonly showFavicons$: Observable<boolean>;\n\n  private neverDomainsState: GlobalState<NeverDomains>;\n  readonly neverDomains$: Observable<NeverDomains>;\n\n  private blockedInteractionsUrisState: GlobalState<NeverDomains>;\n  readonly blockedInteractionsUris$: Observable<NeverDomains>;\n\n  private equivalentDomainsState: ActiveUserState<EquivalentDomains>;\n  readonly equivalentDomains$: Observable<EquivalentDomains>;\n\n  private defaultUriMatchStrategyState: ActiveUserState<UriMatchStrategySetting>;\n  readonly defaultUriMatchStrategy$: Observable<UriMatchStrategySetting>;\n\n  constructor(\n    private stateProvider: StateProvider,\n    private configService: ConfigService,\n  ) {\n    this.showFaviconsState = this.stateProvider.getGlobal(SHOW_FAVICONS);\n    this.showFavicons$ = this.showFaviconsState.state$.pipe(map((x) => x ?? true));\n\n    this.neverDomainsState = this.stateProvider.getGlobal(NEVER_DOMAINS);\n    this.neverDomains$ = this.neverDomainsState.state$.pipe(map((x) => x ?? null));\n\n    // Needs to be global to prevent pre-login injections\n    this.blockedInteractionsUrisState = this.stateProvider.getGlobal(BLOCKED_INTERACTIONS_URIS);\n\n    this.blockedInteractionsUris$ = this.configService\n      .getFeatureFlag$(FeatureFlag.BlockBrowserInjectionsByDomain)\n      .pipe(\n        switchMap((featureIsEnabled) =>\n          featureIsEnabled ? this.blockedInteractionsUrisState.state$ : of({} as NeverDomains),\n        ),\n        map((disabledUris) => (Object.keys(disabledUris).length ? disabledUris : {})),\n      );\n\n    this.equivalentDomainsState = this.stateProvider.getActive(EQUIVALENT_DOMAINS);\n    this.equivalentDomains$ = this.equivalentDomainsState.state$.pipe(map((x) => x ?? null));\n\n    this.defaultUriMatchStrategyState = this.stateProvider.getActive(DEFAULT_URI_MATCH_STRATEGY);\n    this.defaultUriMatchStrategy$ = this.defaultUriMatchStrategyState.state$.pipe(\n      map((x) => x ?? UriMatchStrategy.Domain),\n    );\n  }\n\n  async setShowFavicons(newValue: boolean): Promise<void> {\n    await this.showFaviconsState.update(() => newValue);\n  }\n\n  async setNeverDomains(newValue: NeverDomains): Promise<void> {\n    await this.neverDomainsState.update(() => newValue);\n  }\n\n  async setBlockedInteractionsUris(newValue: NeverDomains): Promise<void> {\n    await this.blockedInteractionsUrisState.update(() => newValue);\n  }\n\n  async setEquivalentDomains(newValue: EquivalentDomains, userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, EQUIVALENT_DOMAINS).update(() => newValue);\n  }\n\n  async setDefaultUriMatchStrategy(newValue: UriMatchStrategySetting): Promise<void> {\n    await this.defaultUriMatchStrategyState.update(() => newValue);\n  }\n\n  getUrlEquivalentDomains(url: string): Observable<Set<string>> {\n    const domains$ = this.equivalentDomains$.pipe(\n      map((equivalentDomains) => {\n        const domain = Utils.getDomain(url);\n        if (domain == null || equivalentDomains == null) {\n          return new Set() as Set<string>;\n        }\n\n        const equivalents = equivalentDomains.filter((ed) => ed.includes(domain)).flat();\n\n        return new Set(equivalents);\n      }),\n    );\n\n    return domains$;\n  }\n}\n","import {\n  DelimiterPatternExpression,\n  ExpiryFullYearPattern,\n  ExpiryFullYearPatternExpression,\n  IrrelevantExpiryCharactersPatternExpression,\n  MonthPatternExpression,\n} from \"@bitwarden/common/autofill/constants\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\n\ntype NonZeroIntegers = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;\ntype Year = `${NonZeroIntegers}${NonZeroIntegers}${0 | NonZeroIntegers}${0 | NonZeroIntegers}`;\n\n/**\n * Takes a string or number value and returns a string value formatted as a valid 4-digit year\n *\n * @param {(string | number)} yearInput\n * @return {*}  {(Year | null)}\n */\nexport function normalizeExpiryYearFormat(yearInput: string | number): Year | null {\n  // The input[type=\"number\"] is returning a number, convert it to a string\n  // An empty field returns null, avoid casting `\"null\"` to a string\n  const yearInputIsEmpty = yearInput == null || yearInput === \"\";\n  let expirationYear = yearInputIsEmpty ? null : `${yearInput}`;\n\n  // Exit early if year is already formatted correctly or empty\n  if (yearInputIsEmpty || (expirationYear && /^[1-9]{1}\\d{3}$/.test(expirationYear))) {\n    return expirationYear as Year;\n  }\n\n  expirationYear = (expirationYear || \"\")\n    // For safety, because even input[type=\"number\"] will allow decimals\n    .replace(/[^\\d]/g, \"\")\n    // remove any leading zero padding (leave the last leading zero if it ends the string)\n    .replace(/^[0]+(?=.)/, \"\");\n\n  if (expirationYear === \"\") {\n    expirationYear = null;\n  }\n\n  // given the context of payment card expiry, a year character length of 3, or over 4\n  // is more likely to be a mistake than an intentional value for the far past or far future.\n  if (expirationYear && expirationYear.length !== 4) {\n    const paddedYear = (\"00\" + expirationYear).slice(-2);\n    const currentCentury = `${new Date().getFullYear()}`.slice(0, 2);\n\n    expirationYear = currentCentury + paddedYear;\n  }\n\n  return expirationYear as Year | null;\n}\n\n/**\n * Takes a cipher card view and returns \"true\" if the month and year affirmativey indicate\n * the card is expired. Uncertain cases return \"false\".\n *\n * @param {CardView} cipherCard\n * @return {*}  {boolean}\n */\nexport function isCardExpired(cipherCard: CardView): boolean {\n  if (cipherCard) {\n    const { expMonth = null, expYear = null } = cipherCard;\n\n    if (!expYear) {\n      return false;\n    }\n\n    const now = new Date();\n    const normalizedYear = normalizeExpiryYearFormat(expYear);\n    const parsedYear = normalizedYear ? parseInt(normalizedYear, 10) : NaN;\n\n    const expiryYearIsBeforeCurrentYear = parsedYear < now.getFullYear();\n    const expiryYearIsAfterCurrentYear = parsedYear > now.getFullYear();\n\n    // If the expiry year is before the current year, skip checking the month, since it must be expired\n    if (normalizedYear && expiryYearIsBeforeCurrentYear) {\n      return true;\n    }\n\n    // If the expiry year is after the current year, skip checking the month, since it cannot be expired\n    if (normalizedYear && expiryYearIsAfterCurrentYear) {\n      return false;\n    }\n\n    if (normalizedYear && expMonth) {\n      const parsedMonthInteger = parseInt(expMonth, 10);\n      const parsedMonthIsValid = parsedMonthInteger && !isNaN(parsedMonthInteger);\n\n      // If the parsed month value is 0, we don't know when the expiry passes this year, so do not treat it as expired\n      if (!parsedMonthIsValid) {\n        return false;\n      }\n\n      // `Date` months are zero-indexed\n      const parsedMonth = parsedMonthInteger - 1;\n\n      // First day of the next month\n      const cardExpiry = new Date(parsedYear, parsedMonth + 1, 1);\n\n      return cardExpiry <= now;\n    }\n  }\n\n  return false;\n}\n\n/**\n * Attempt to split a string into date segments on the basis of expected formats and delimiter symbols.\n *\n * @param {string} combinedExpiryValue\n * @return {*}  {string[]}\n */\nfunction splitCombinedDateValues(combinedExpiryValue: string): string[] {\n  let sanitizedValue = combinedExpiryValue\n    .replace(IrrelevantExpiryCharactersPatternExpression, \"\")\n    .trim();\n\n  // Do this after initial value replace to avoid identifying leading whitespace as delimiter\n  const parsedDelimiter = sanitizedValue.match(DelimiterPatternExpression)?.[0] || null;\n\n  let dateParts = [sanitizedValue];\n\n  if (parsedDelimiter?.length) {\n    // If the parsed delimiter is a whitespace character, assign 's' (character class) instead\n    const delimiterPattern = /\\s/.test(parsedDelimiter) ? \"\\\\s\" : \"\\\\\" + parsedDelimiter;\n\n    sanitizedValue = sanitizedValue\n      // Remove all other delimiter characters not identified as the delimiter\n      .replace(new RegExp(`[^\\\\d${delimiterPattern}]`, \"g\"), \"\")\n      // Also de-dupe the delimiter character\n      .replace(new RegExp(`[${delimiterPattern}]{2,}`, \"g\"), parsedDelimiter);\n\n    dateParts = sanitizedValue.split(parsedDelimiter);\n  }\n\n  return (\n    dateParts\n      // remove values that have no length\n      .filter((splitValue) => splitValue?.length)\n  );\n}\n\n/**\n * Given an array of split card expiry date parts,\n * returns an array of those values ordered by year then month\n *\n * @param {string[]} splitDateInput\n * @return {*}  {([string | null, string | null])}\n */\nfunction parseDelimitedYearMonthExpiry([firstPart, secondPart]: string[]): [string, string] {\n  // Conditionals here are structured to avoid unnecessary evaluations and are ordered\n  // from more authoritative checks to checks yielding increasingly inferred conclusions\n\n  // If a 4-digit value is found (when there are multiple parts), it can't be month\n  if (ExpiryFullYearPatternExpression.test(firstPart)) {\n    return [firstPart, secondPart];\n  }\n\n  // If a 4-digit value is found (when there are multiple parts), it can't be month\n  if (ExpiryFullYearPatternExpression.test(secondPart)) {\n    return [secondPart, firstPart];\n  }\n\n  // If it's a two digit value that doesn't match against month pattern, assume it's a year\n  if (/\\d{2}/.test(firstPart) && !MonthPatternExpression.test(firstPart)) {\n    return [firstPart, secondPart];\n  }\n\n  // If it's a two digit value that doesn't match against month pattern, assume it's a year\n  if (/\\d{2}/.test(secondPart) && !MonthPatternExpression.test(secondPart)) {\n    return [secondPart, firstPart];\n  }\n\n  // Values are too ambiguous (e.g. \"12/09\"). For the most part,\n  // a month-looking value likely is, at the time of writing (year 2024).\n  let parsedYear = firstPart;\n  let parsedMonth = secondPart;\n\n  if (MonthPatternExpression.test(firstPart)) {\n    parsedYear = secondPart;\n    parsedMonth = firstPart;\n  }\n\n  return [parsedYear, parsedMonth];\n}\n\n/**\n * Given a single string of integers, attempts to identify card expiry date portions within\n * and return values ordered by year then month\n *\n * @param {string} dateInput\n * @return {*}  {([string | null, string | null])}\n */\nfunction parseNonDelimitedYearMonthExpiry(dateInput: string): [string | null, string | null] {\n  if (dateInput.length > 4) {\n    // e.g.\n    // \"052024\"\n    // \"202405\"\n    // \"20245\"\n    // \"52024\"\n\n    // If the value is over 5-characters long, it likely has a full year format in it\n    const [parsedYear, parsedMonth] = dateInput\n      .split(new RegExp(`(?=${ExpiryFullYearPattern})|(?<=${ExpiryFullYearPattern})`, \"g\"))\n      .sort((current: string, next: string) => (current.length > next.length ? -1 : 1));\n\n    return [parsedYear, parsedMonth];\n  }\n\n  if (dateInput.length === 4) {\n    // e.g.\n    // \"0524\"\n    // \"2405\"\n\n    // If the `sanitizedFirstPart` value is a length of 4, it must be split in half, since\n    // neither a year or month will be represented with three characters\n    const splitFirstPartFirstHalf = dateInput.slice(0, 2);\n    const splitFirstPartSecondHalf = dateInput.slice(-2);\n\n    let parsedYear = splitFirstPartSecondHalf;\n    let parsedMonth = splitFirstPartFirstHalf;\n\n    // If the first part doesn't match a month pattern, assume it's a year\n    if (!MonthPatternExpression.test(splitFirstPartFirstHalf)) {\n      parsedYear = splitFirstPartFirstHalf;\n      parsedMonth = splitFirstPartSecondHalf;\n    }\n\n    return [parsedYear, parsedMonth];\n  }\n\n  // e.g.\n  // \"245\"\n  // \"202\"\n  // \"212\"\n  // \"022\"\n  // \"111\"\n\n  // A valid year representation here must be two characters so try to find it first.\n\n  let parsedYear = null;\n  let parsedMonth = null;\n\n  // Split if there is a digit with a leading zero\n  const splitFirstPartOnLeadingZero = dateInput.split(/(?<=0[1-9]{1})|(?=0[1-9]{1})/);\n\n  // Assume a leading zero indicates a month in ambiguous cases (e.g. \"202\"), since we're\n  // dealing with expiry dates and the next two-digit year with a leading zero will be 2100\n  if (splitFirstPartOnLeadingZero.length > 1) {\n    parsedYear = splitFirstPartOnLeadingZero[0];\n    parsedMonth = splitFirstPartOnLeadingZero[1];\n\n    if (splitFirstPartOnLeadingZero[0].startsWith(\"0\")) {\n      parsedMonth = splitFirstPartOnLeadingZero[0];\n      parsedYear = splitFirstPartOnLeadingZero[1];\n    }\n  } else {\n    // Here, a year has to be two-digits, and a month can't be more than one, so assume the first two digits that are greater than the current year is the year representation.\n    parsedYear = dateInput.slice(0, 2);\n    parsedMonth = dateInput.slice(-1);\n\n    const currentYear = new Date().getFullYear();\n    const normalizedYearFormat = normalizeExpiryYearFormat(parsedYear);\n    const normalizedParsedYear = normalizedYearFormat && parseInt(normalizedYearFormat, 10);\n    const normalizedExpiryYearFormat = normalizeExpiryYearFormat(dateInput.slice(-2));\n    const normalizedParsedYearAlternative =\n      normalizedExpiryYearFormat && parseInt(normalizedExpiryYearFormat, 10);\n\n    if (\n      normalizedParsedYear &&\n      normalizedParsedYear < currentYear &&\n      normalizedParsedYearAlternative &&\n      normalizedParsedYearAlternative >= currentYear\n    ) {\n      parsedYear = dateInput.slice(-2);\n      parsedMonth = dateInput.slice(0, 1);\n    }\n  }\n\n  return [parsedYear, parsedMonth];\n}\n\n/**\n * Attempt to parse year and month parts of a combined expiry date value.\n *\n * @param {string} combinedExpiryValue\n * @return {*}  {([string | null, string | null])}\n */\nexport function parseYearMonthExpiry(combinedExpiryValue: string): [Year | null, string | null] {\n  let parsedYear = null;\n  let parsedMonth = null;\n\n  const dateParts = splitCombinedDateValues(combinedExpiryValue);\n\n  if (dateParts.length < 1) {\n    return [null, null];\n  }\n\n  const sanitizedFirstPart =\n    dateParts[0]?.replace(IrrelevantExpiryCharactersPatternExpression, \"\") || \"\";\n  const sanitizedSecondPart =\n    dateParts[1]?.replace(IrrelevantExpiryCharactersPatternExpression, \"\") || \"\";\n\n  // If there is only one date part, no delimiter was found in the passed value\n  if (dateParts.length === 1) {\n    const [parsedNonDelimitedYear, parsedNonDelimitedMonth] =\n      parseNonDelimitedYearMonthExpiry(sanitizedFirstPart);\n\n    parsedYear = parsedNonDelimitedYear;\n    parsedMonth = parsedNonDelimitedMonth;\n  }\n  // There are multiple date parts\n  else {\n    const [parsedDelimitedYear, parsedDelimitedMonth] = parseDelimitedYearMonthExpiry([\n      sanitizedFirstPart,\n      sanitizedSecondPart,\n    ]);\n\n    parsedYear = parsedDelimitedYear;\n    parsedMonth = parsedDelimitedMonth;\n  }\n\n  const normalizedParsedYear = parsedYear ? normalizeExpiryYearFormat(parsedYear) : null;\n  const normalizedParsedMonth = parsedMonth?.replace(/^0+/, \"\").slice(0, 2);\n\n  // Set \"empty\" values to null\n  parsedYear = normalizedParsedYear?.length ? normalizedParsedYear : null;\n  parsedMonth = normalizedParsedMonth?.length ? normalizedParsedMonth : null;\n\n  return [parsedYear, parsedMonth];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  BillingInvoiceResponse,\n  BillingTransactionResponse,\n} from \"@bitwarden/common/billing/models/response/billing.response\";\n\nexport class AccountBillingApiServiceAbstraction {\n  getBillingInvoices: (status?: string, startAfter?: string) => Promise<BillingInvoiceResponse[]>;\n  getBillingTransactions: (startAfter?: string) => Promise<BillingTransactionResponse[]>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../../types/guid\";\n\nexport type BillingAccountProfile = {\n  hasPremiumPersonally: boolean;\n  hasPremiumFromAnyOrganization: boolean;\n};\n\nexport abstract class BillingAccountProfileStateService {\n  /**\n   * Emits `true` when the user's account has been granted premium from any of the\n   * organizations it is a member of. Otherwise, emits `false`\n   */\n  abstract hasPremiumFromAnyOrganization$(userId: UserId): Observable<boolean>;\n\n  /**\n   * Emits `true` when the user's account has an active premium subscription at the\n   * individual user level\n   */\n  abstract hasPremiumPersonally$(userId: UserId): Observable<boolean>;\n\n  /**\n   * Emits `true` when either `hasPremiumPersonally` or `hasPremiumFromAnyOrganization` is `true`\n   */\n  abstract hasPremiumFromAnySource$(userId: UserId): Observable<boolean>;\n\n  /**\n   * Emits `true` when the subscription menu item should be shown in navigation.\n   * This is hidden for organizations that provide premium, except if the user has premium personally\n   * or has a billing history.\n   */\n  abstract canViewSubscription$(userId: UserId): Observable<boolean>;\n\n  /**\n   * Sets the user's premium status fields upon every full sync, either from their personal\n   * subscription to premium, or an organization they're a part of that grants them premium.\n   */\n  abstract setHasPremium(\n    hasPremiumPersonally: boolean,\n    hasPremiumFromAnyOrganization: boolean,\n    userId: UserId,\n  ): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ProviderOrganizationOrganizationDetailsResponse } from \"@bitwarden/common/admin-console/models/response/provider/provider-organization.response\";\nimport { PaymentMethodType } from \"@bitwarden/common/billing/enums\";\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { UpdatePaymentMethodRequest } from \"@bitwarden/common/billing/models/request/update-payment-method.request\";\nimport { VerifyBankAccountRequest } from \"@bitwarden/common/billing/models/request/verify-bank-account.request\";\nimport { InvoicesResponse } from \"@bitwarden/common/billing/models/response/invoices.response\";\nimport { PaymentMethodResponse } from \"@bitwarden/common/billing/models/response/payment-method.response\";\n\nimport { OrganizationCreateRequest } from \"../../admin-console/models/request/organization-create.request\";\nimport { SubscriptionCancellationRequest } from \"../../billing/models/request/subscription-cancellation.request\";\nimport { OrganizationBillingMetadataResponse } from \"../../billing/models/response/organization-billing-metadata.response\";\nimport { PlanResponse } from \"../../billing/models/response/plan.response\";\nimport { ListResponse } from \"../../models/response/list.response\";\nimport { CreateClientOrganizationRequest } from \"../models/request/create-client-organization.request\";\nimport { UpdateClientOrganizationRequest } from \"../models/request/update-client-organization.request\";\nimport { ProviderSubscriptionResponse } from \"../models/response/provider-subscription-response\";\n\nexport abstract class BillingApiServiceAbstraction {\n  cancelOrganizationSubscription: (\n    organizationId: string,\n    request: SubscriptionCancellationRequest,\n  ) => Promise<void>;\n\n  cancelPremiumUserSubscription: (request: SubscriptionCancellationRequest) => Promise<void>;\n\n  createProviderClientOrganization: (\n    providerId: string,\n    request: CreateClientOrganizationRequest,\n  ) => Promise<void>;\n\n  createSetupIntent: (paymentMethodType: PaymentMethodType) => Promise<string>;\n\n  getOrganizationBillingMetadata: (\n    organizationId: string,\n  ) => Promise<OrganizationBillingMetadataResponse>;\n\n  getOrganizationPaymentMethod: (organizationId: string) => Promise<PaymentMethodResponse>;\n\n  getPlans: () => Promise<ListResponse<PlanResponse>>;\n\n  getProviderClientInvoiceReport: (providerId: string, invoiceId: string) => Promise<string>;\n\n  getProviderClientOrganizations: (\n    providerId: string,\n  ) => Promise<ListResponse<ProviderOrganizationOrganizationDetailsResponse>>;\n\n  getProviderInvoices: (providerId: string) => Promise<InvoicesResponse>;\n\n  getProviderSubscription: (providerId: string) => Promise<ProviderSubscriptionResponse>;\n\n  updateOrganizationPaymentMethod: (\n    organizationId: string,\n    request: UpdatePaymentMethodRequest,\n  ) => Promise<void>;\n\n  updateOrganizationTaxInformation: (\n    organizationId: string,\n    request: ExpandedTaxInfoUpdateRequest,\n  ) => Promise<void>;\n\n  updateProviderClientOrganization: (\n    providerId: string,\n    organizationId: string,\n    request: UpdateClientOrganizationRequest,\n  ) => Promise<any>;\n\n  updateProviderTaxInformation: (\n    providerId: string,\n    request: ExpandedTaxInfoUpdateRequest,\n  ) => Promise<void>;\n\n  verifyOrganizationBankAccount: (\n    organizationId: string,\n    request: VerifyBankAccountRequest,\n  ) => Promise<void>;\n\n  restartSubscription: (\n    organizationId: string,\n    request: OrganizationCreateRequest,\n  ) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BillingSourceResponse } from \"@bitwarden/common/billing/models/response/billing.response\";\nimport { PaymentSourceResponse } from \"@bitwarden/common/billing/models/response/payment-source.response\";\n\nimport { OrganizationResponse } from \"../../admin-console/models/response/organization.response\";\nimport { InitiationPath } from \"../../models/request/reference-event.request\";\nimport { PaymentMethodType, PlanType } from \"../enums\";\n\nexport type OrganizationInformation = {\n  name: string;\n  billingEmail: string;\n  businessName?: string;\n  initiationPath?: InitiationPath;\n};\n\nexport type PlanInformation = {\n  type: PlanType;\n  passwordManagerSeats?: number;\n  subscribeToSecretsManager?: boolean;\n  isFromSecretsManagerTrial?: boolean;\n  secretsManagerSeats?: number;\n  secretsManagerServiceAccounts?: number;\n  storage?: number;\n};\n\nexport type BillingInformation = {\n  postalCode: string;\n  country: string;\n  taxId?: string;\n  addressLine1?: string;\n  addressLine2?: string;\n  city?: string;\n  state?: string;\n};\n\nexport type PaymentInformation = {\n  paymentMethod: [string, PaymentMethodType];\n  billing: BillingInformation;\n};\n\nexport type SubscriptionInformation = {\n  organization: OrganizationInformation;\n  plan?: PlanInformation;\n  payment?: PaymentInformation;\n};\n\nexport abstract class OrganizationBillingServiceAbstraction {\n  getPaymentSource: (\n    organizationId: string,\n  ) => Promise<BillingSourceResponse | PaymentSourceResponse>;\n\n  purchaseSubscription: (subscription: SubscriptionInformation) => Promise<OrganizationResponse>;\n\n  purchaseSubscriptionNoPaymentMethod: (\n    subscription: SubscriptionInformation,\n  ) => Promise<OrganizationResponse>;\n\n  startFree: (subscription: SubscriptionInformation) => Promise<OrganizationResponse>;\n\n  restartSubscription: (\n    organizationId: string,\n    subscription: SubscriptionInformation,\n  ) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  BillingInvoiceResponse,\n  BillingTransactionResponse,\n} from \"@bitwarden/common/billing/models/response/billing.response\";\n\nexport class OrganizationBillingApiServiceAbstraction {\n  getBillingInvoices: (\n    id: string,\n    status?: string,\n    startAfter?: string,\n  ) => Promise<BillingInvoiceResponse[]>;\n\n  getBillingTransactions: (\n    id: string,\n    startAfter?: string,\n  ) => Promise<BillingTransactionResponse[]>;\n}\n","import { CountryListItem } from \"@bitwarden/common/billing/models/domain\";\nimport { PreviewIndividualInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-individual-invoice.request\";\nimport { PreviewOrganizationInvoiceRequest } from \"@bitwarden/common/billing/models/request/preview-organization-invoice.request\";\nimport { PreviewInvoiceResponse } from \"@bitwarden/common/billing/models/response/preview-invoice.response\";\n\nexport abstract class TaxServiceAbstraction {\n  abstract getCountries(): CountryListItem[];\n\n  abstract isCountrySupported(country: string): Promise<boolean>;\n\n  abstract previewIndividualInvoice(\n    request: PreviewIndividualInvoiceRequest,\n  ): Promise<PreviewInvoiceResponse>;\n\n  abstract previewOrganizationInvoice(\n    request: PreviewOrganizationInvoiceRequest,\n  ): Promise<PreviewInvoiceResponse>;\n}\n","export enum PaymentMethodType {\n  Card = 0,\n  BankAccount = 1,\n  PayPal = 2,\n  BitPay = 3,\n  Credit = 4,\n  WireTransfer = 5,\n  Check = 8,\n}\n","export enum PlanSponsorshipType {\n  FamiliesForEnterprise = 0,\n}\n","export enum PlanType {\n  Free = 0,\n  FamiliesAnnually2019 = 1,\n  TeamsMonthly2019 = 2,\n  TeamsAnnually2019 = 3,\n  EnterpriseMonthly2019 = 4,\n  EnterpriseAnnually2019 = 5,\n  Custom = 6,\n  FamiliesAnnually = 7,\n  TeamsMonthly2020 = 8,\n  TeamsAnnually2020 = 9,\n  EnterpriseMonthly2020 = 10,\n  EnterpriseAnnually2020 = 11,\n  TeamsMonthly2023 = 12,\n  TeamsAnnually2023 = 13,\n  EnterpriseMonthly2023 = 14,\n  EnterpriseAnnually2023 = 15,\n  TeamsStarter2023 = 16,\n  TeamsMonthly = 17,\n  TeamsAnnually = 18,\n  EnterpriseMonthly = 19,\n  EnterpriseAnnually = 20,\n  TeamsStarter = 21,\n}\n","export enum TransactionType {\n  Charge = 0,\n  Credit = 1,\n  PromotionalCredit = 2,\n  ReferralCredit = 3,\n  Refund = 4,\n}\n","export enum BitwardenProductType {\n  PasswordManager = 0,\n  SecretsManager = 1,\n}\n","export enum ProductTierType {\n  Free = 0,\n  Families = 1,\n  Teams = 2,\n  Enterprise = 3,\n  TeamsStarter = 4,\n}\n\nexport function isNotSelfUpgradable(productType: ProductTierType): boolean {\n  return (\n    productType !== ProductTierType.Free &&\n    productType !== ProductTierType.TeamsStarter &&\n    productType !== ProductTierType.Families\n  );\n}\n","export enum ProductType {\n  PasswordManager = 0,\n  SecretsManager = 1,\n}\n","export enum PlanInterval {\n  Monthly = 0,\n  Annually = 1,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TaxInfoResponse } from \"@bitwarden/common/billing/models/response/tax-info.response\";\n\nexport class TaxInformation {\n  country: string;\n  postalCode: string;\n  taxId: string;\n  line1: string;\n  line2: string;\n  city: string;\n  state: string;\n\n  static empty(): TaxInformation {\n    return {\n      country: null,\n      postalCode: null,\n      taxId: null,\n      line1: null,\n      line2: null,\n      city: null,\n      state: null,\n    };\n  }\n\n  static from(response: TaxInfoResponse | null): TaxInformation {\n    if (response === null) {\n      return TaxInformation.empty();\n    }\n    return {\n      ...response,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class BitPayInvoiceRequest {\n  userId: string;\n  organizationId: string;\n  providerId: string;\n  credit: boolean;\n  amount: number;\n  returnUrl: string;\n  name: string;\n  email: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class TaxInfoUpdateRequest {\n  country: string;\n  postalCode: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TaxInformation } from \"@bitwarden/common/billing/models/domain/tax-information\";\n\nimport { TaxInfoUpdateRequest } from \"./tax-info-update.request\";\n\nexport class ExpandedTaxInfoUpdateRequest extends TaxInfoUpdateRequest {\n  taxId: string;\n  line1: string;\n  line2: string;\n  city: string;\n  state: string;\n\n  static From(taxInformation: TaxInformation): ExpandedTaxInfoUpdateRequest {\n    if (!taxInformation) {\n      return null;\n    }\n\n    const request = new ExpandedTaxInfoUpdateRequest();\n    request.country = taxInformation.country;\n    request.postalCode = taxInformation.postalCode;\n    request.taxId = taxInformation.taxId;\n    request.line1 = taxInformation.line1;\n    request.line2 = taxInformation.line2;\n    request.city = taxInformation.city;\n    request.state = taxInformation.state;\n    return request;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationKeysRequest } from \"../../../admin-console/models/request/organization-keys.request\";\nimport { InitiationPath } from \"../../../models/request/reference-event.request\";\nimport { PlanType } from \"../../enums\";\n\nexport class OrganizationNoPaymentMethodCreateRequest {\n  name: string;\n  businessName: string;\n  billingEmail: string;\n  planType: PlanType;\n  key: string;\n  keys: OrganizationKeysRequest;\n  additionalSeats: number;\n  maxAutoscaleSeats: number;\n  additionalStorageGb: number;\n  premiumAccessAddon: boolean;\n  collectionName: string;\n  taxIdNumber: string;\n  billingAddressLine1: string;\n  billingAddressLine2: string;\n  billingAddressCity: string;\n  billingAddressState: string;\n  billingAddressPostalCode: string;\n  billingAddressCountry: string;\n  useSecretsManager: boolean;\n  additionalSmSeats: number;\n  additionalServiceAccounts: number;\n  isFromSecretsManagerTrial: boolean;\n  initiationPath: InitiationPath;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PaymentMethodType } from \"../../enums\";\n\nimport { ExpandedTaxInfoUpdateRequest } from \"./expanded-tax-info-update.request\";\n\nexport class PaymentRequest extends ExpandedTaxInfoUpdateRequest {\n  paymentMethodType: PaymentMethodType;\n  paymentToken: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ExpandedTaxInfoUpdateRequest } from \"@bitwarden/common/billing/models/request/expanded-tax-info-update.request\";\nimport { TokenizedPaymentSourceRequest } from \"@bitwarden/common/billing/models/request/tokenized-payment-source.request\";\n\nexport class UpdatePaymentMethodRequest {\n  paymentSource: TokenizedPaymentSourceRequest;\n  taxInformation: ExpandedTaxInfoUpdateRequest;\n}\n","import { BaseResponse } from \"@bitwarden/common/models/response/base.response\";\n\nexport class InvoicesResponse extends BaseResponse {\n  invoices: InvoiceResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n    const invoices = this.getResponseProperty(\"Invoices\");\n    if (invoices && invoices.length) {\n      this.invoices = invoices.map((t: any) => new InvoiceResponse(t));\n    }\n  }\n}\n\nexport class InvoiceResponse extends BaseResponse {\n  id: string;\n  date: string;\n  number: string;\n  total: number;\n  status: string;\n  dueDate: string;\n  url: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.date = this.getResponseProperty(\"Date\");\n    this.number = this.getResponseProperty(\"Number\");\n    this.total = this.getResponseProperty(\"Total\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.dueDate = this.getResponseProperty(\"DueDate\");\n    this.url = this.getResponseProperty(\"Url\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { OrganizationResponse } from \"../../../admin-console/models/response/organization.response\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nimport {\n  BillingSubscriptionResponse,\n  BillingSubscriptionUpcomingInvoiceResponse,\n} from \"./subscription.response\";\n\nexport class OrganizationSubscriptionResponse extends OrganizationResponse {\n  storageName: string;\n  storageGb: number;\n  subscription: BillingSubscriptionResponse;\n  upcomingInvoice: BillingSubscriptionUpcomingInvoiceResponse;\n  customerDiscount: BillingCustomerDiscount;\n  expiration: string;\n  expirationWithoutGracePeriod: string;\n\n  constructor(response: any) {\n    super(response);\n    this.storageName = this.getResponseProperty(\"StorageName\");\n    this.storageGb = this.getResponseProperty(\"StorageGb\");\n    const subscription = this.getResponseProperty(\"Subscription\");\n    this.subscription = subscription == null ? null : new BillingSubscriptionResponse(subscription);\n    const upcomingInvoice = this.getResponseProperty(\"UpcomingInvoice\");\n    this.upcomingInvoice =\n      upcomingInvoice == null\n        ? null\n        : new BillingSubscriptionUpcomingInvoiceResponse(upcomingInvoice);\n    const customerDiscount = this.getResponseProperty(\"CustomerDiscount\");\n    this.customerDiscount =\n      customerDiscount == null ? null : new BillingCustomerDiscount(customerDiscount);\n    this.expiration = this.getResponseProperty(\"Expiration\");\n    this.expirationWithoutGracePeriod = this.getResponseProperty(\"ExpirationWithoutGracePeriod\");\n  }\n}\n\nexport class BillingCustomerDiscount extends BaseResponse {\n  id: string;\n  active: boolean;\n  percentOff?: number;\n  appliesTo: string[];\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.active = this.getResponseProperty(\"Active\");\n    this.percentOff = this.getResponseProperty(\"PercentOff\");\n    this.appliesTo = this.getResponseProperty(\"AppliesTo\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ProductTierType, PlanType } from \"../../../billing/enums\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PlanResponse extends BaseResponse {\n  type: PlanType;\n  productTier: ProductTierType;\n  name: string;\n  isAnnual: boolean;\n  nameLocalizationKey: string;\n  descriptionLocalizationKey: string;\n  canBeUsedByBusiness: boolean;\n  trialPeriodDays: number;\n  hasSelfHost: boolean;\n  hasPolicies: boolean;\n  hasGroups: boolean;\n  hasDirectory: boolean;\n  hasEvents: boolean;\n  hasTotp: boolean;\n  has2fa: boolean;\n  hasApi: boolean;\n  hasSso: boolean;\n  hasResetPassword: boolean;\n  usersGetPremium: boolean;\n  upgradeSortOrder: number;\n  displaySortOrder: number;\n  legacyYear: number;\n  disabled: boolean;\n  PasswordManager: PasswordManagerPlanFeaturesResponse;\n  SecretsManager: SecretsManagerPlanFeaturesResponse;\n\n  constructor(response: any) {\n    super(response);\n    this.type = this.getResponseProperty(\"Type\");\n    this.productTier = this.getResponseProperty(\"ProductTier\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.isAnnual = this.getResponseProperty(\"IsAnnual\");\n    this.nameLocalizationKey = this.getResponseProperty(\"NameLocalizationKey\");\n    this.descriptionLocalizationKey = this.getResponseProperty(\"DescriptionLocalizationKey\");\n    this.canBeUsedByBusiness = this.getResponseProperty(\"CanBeUsedByBusiness\");\n    this.trialPeriodDays = this.getResponseProperty(\"TrialPeriodDays\");\n    this.hasSelfHost = this.getResponseProperty(\"HasSelfHost\");\n    this.hasPolicies = this.getResponseProperty(\"HasPolicies\");\n    this.hasGroups = this.getResponseProperty(\"HasGroups\");\n    this.hasDirectory = this.getResponseProperty(\"HasDirectory\");\n    this.hasEvents = this.getResponseProperty(\"HasEvents\");\n    this.hasTotp = this.getResponseProperty(\"HasTotp\");\n    this.has2fa = this.getResponseProperty(\"Has2fa\");\n    this.hasApi = this.getResponseProperty(\"HasApi\");\n    this.hasSso = this.getResponseProperty(\"HasSso\");\n    this.hasResetPassword = this.getResponseProperty(\"HasResetPassword\");\n    this.usersGetPremium = this.getResponseProperty(\"UsersGetPremium\");\n    this.upgradeSortOrder = this.getResponseProperty(\"UpgradeSortOrder\");\n    this.displaySortOrder = this.getResponseProperty(\"DisplaySortOrder\");\n    this.legacyYear = this.getResponseProperty(\"LegacyYear\");\n    this.disabled = this.getResponseProperty(\"Disabled\");\n    const passwordManager = this.getResponseProperty(\"PasswordManager\");\n    const secretsManager = this.getResponseProperty(\"SecretsManager\");\n    this.PasswordManager =\n      passwordManager == null ? null : new PasswordManagerPlanFeaturesResponse(passwordManager);\n    this.SecretsManager =\n      secretsManager == null ? null : new SecretsManagerPlanFeaturesResponse(secretsManager);\n  }\n}\n\nexport class SecretsManagerPlanFeaturesResponse extends BaseResponse {\n  // Seats\n  stripeSeatPlanId: string;\n  baseSeats: number;\n  basePrice: number;\n  seatPrice: number;\n  hasAdditionalSeatsOption: boolean;\n  maxAdditionalSeats: number;\n  maxSeats: number;\n\n  // Service accounts\n  stripeServiceAccountPlanId: string;\n  additionalPricePerServiceAccount: number;\n  baseServiceAccount: number;\n  maxServiceAccount: number;\n  hasAdditionalServiceAccountOption: boolean;\n  maxAdditionalServiceAccounts: number;\n\n  // Features\n  maxProjects: number;\n\n  constructor(response: any) {\n    super(response);\n    this.stripeSeatPlanId = this.getResponseProperty(\"StripeSeatPlanId\");\n    this.baseSeats = this.getResponseProperty(\"BaseSeats\");\n    this.basePrice = this.getResponseProperty(\"BasePrice\");\n    this.seatPrice = this.getResponseProperty(\"SeatPrice\");\n    this.hasAdditionalSeatsOption = this.getResponseProperty(\"HasAdditionalSeatsOption\");\n    this.maxAdditionalSeats = this.getResponseProperty(\"MaxAdditionalSeats\");\n    this.maxSeats = this.getResponseProperty(\"MaxSeats\");\n    this.stripeServiceAccountPlanId = this.getResponseProperty(\"StripeServiceAccountPlanId\");\n    this.additionalPricePerServiceAccount = this.getResponseProperty(\n      \"AdditionalPricePerServiceAccount\",\n    );\n    this.baseServiceAccount = this.getResponseProperty(\"BaseServiceAccount\");\n    this.maxServiceAccount = this.getResponseProperty(\"MaxServiceAccount\");\n    this.hasAdditionalServiceAccountOption = this.getResponseProperty(\n      \"HasAdditionalServiceAccountOption\",\n    );\n    this.maxAdditionalServiceAccounts = this.getResponseProperty(\"MaxAdditionalServiceAccounts\");\n    this.maxProjects = this.getResponseProperty(\"MaxProjects\");\n  }\n}\n\nexport class PasswordManagerPlanFeaturesResponse extends BaseResponse {\n  // Seats\n  stripePlanId: string;\n  stripeSeatPlanId: string;\n  stripeProviderPortalSeatPlanId: string;\n  stripePremiumAccessPlanId: string;\n  basePrice: number;\n  seatPrice: number;\n  providerPortalSeatPrice: number;\n  premiumAccessOptionPrice: number;\n  baseSeats: number;\n  maxAdditionalSeats: number;\n  maxSeats: number;\n  hasPremiumAccessOption: boolean;\n\n  // Storage\n  additionalStoragePricePerGb: number;\n  stripeStoragePlanId: string;\n  baseStorageGb: number;\n  hasAdditionalStorageOption: boolean;\n  maxAdditionalStorage: number;\n  hasAdditionalSeatsOption: boolean;\n\n  // Feature\n  maxCollections: number;\n\n  constructor(response: any) {\n    super(response);\n    this.stripePlanId = this.getResponseProperty(\"StripePlanId\");\n    this.stripeSeatPlanId = this.getResponseProperty(\"StripeSeatPlanId\");\n    this.stripeProviderPortalSeatPlanId = this.getResponseProperty(\n      \"StripeProviderPortalSeatPlanId\",\n    );\n    this.stripeStoragePlanId = this.getResponseProperty(\"StripeStoragePlanId\");\n    this.stripePremiumAccessPlanId = this.getResponseProperty(\"StripePremiumAccessPlanId\");\n    this.basePrice = this.getResponseProperty(\"BasePrice\");\n    this.seatPrice = this.getResponseProperty(\"SeatPrice\");\n    this.providerPortalSeatPrice = this.getResponseProperty(\"ProviderPortalSeatPrice\");\n    this.baseSeats = this.getResponseProperty(\"BaseSeats\");\n    this.maxAdditionalSeats = this.getResponseProperty(\"MaxAdditionalSeats\");\n    this.premiumAccessOptionPrice = this.getResponseProperty(\"PremiumAccessOptionPrice\");\n    this.maxSeats = this.getResponseProperty(\"MaxSeats\");\n    this.additionalStoragePricePerGb = this.getResponseProperty(\"AdditionalStoragePricePerGb\");\n    this.hasAdditionalSeatsOption = this.getResponseProperty(\"HasAdditionalSeatsOption\");\n    this.baseStorageGb = this.getResponseProperty(\"BaseStorageGb\");\n    this.maxCollections = this.getResponseProperty(\"MaxCollections\");\n    this.hasAdditionalStorageOption = this.getResponseProperty(\"HasAdditionalStorageOption\");\n    this.maxAdditionalStorage = this.getResponseProperty(\"MaxAdditionalStorage\");\n    this.hasPremiumAccessOption = this.getResponseProperty(\"HasPremiumAccessOption\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SubscriptionResponse extends BaseResponse {\n  storageName: string;\n  storageGb: number;\n  maxStorageGb: number;\n  subscription: BillingSubscriptionResponse;\n  upcomingInvoice: BillingSubscriptionUpcomingInvoiceResponse;\n  license: any;\n  expiration: string;\n\n  constructor(response: any) {\n    super(response);\n    this.storageName = this.getResponseProperty(\"StorageName\");\n    this.storageGb = this.getResponseProperty(\"StorageGb\");\n    this.maxStorageGb = this.getResponseProperty(\"MaxStorageGb\");\n    this.license = this.getResponseProperty(\"License\");\n    this.expiration = this.getResponseProperty(\"Expiration\");\n    const subscription = this.getResponseProperty(\"Subscription\");\n    const upcomingInvoice = this.getResponseProperty(\"UpcomingInvoice\");\n    this.subscription = subscription == null ? null : new BillingSubscriptionResponse(subscription);\n    this.upcomingInvoice =\n      upcomingInvoice == null\n        ? null\n        : new BillingSubscriptionUpcomingInvoiceResponse(upcomingInvoice);\n  }\n}\n\nexport class BillingSubscriptionResponse extends BaseResponse {\n  trialStartDate: string;\n  trialEndDate: string;\n  periodStartDate: string;\n  periodEndDate: string;\n  cancelledDate: string;\n  cancelAtEndDate: boolean;\n  status: string;\n  cancelled: boolean;\n  items: BillingSubscriptionItemResponse[] = [];\n  collectionMethod: string;\n  suspensionDate?: string;\n  unpaidPeriodEndDate?: string;\n  gracePeriod?: number;\n\n  constructor(response: any) {\n    super(response);\n    this.trialStartDate = this.getResponseProperty(\"TrialStartDate\");\n    this.trialEndDate = this.getResponseProperty(\"TrialEndDate\");\n    this.periodStartDate = this.getResponseProperty(\"PeriodStartDate\");\n    this.periodEndDate = this.getResponseProperty(\"PeriodEndDate\");\n    this.cancelledDate = this.getResponseProperty(\"CancelledDate\");\n    this.cancelAtEndDate = this.getResponseProperty(\"CancelAtEndDate\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.cancelled = this.getResponseProperty(\"Cancelled\");\n    const items = this.getResponseProperty(\"Items\");\n    if (items != null) {\n      this.items = items.map((i: any) => new BillingSubscriptionItemResponse(i));\n    }\n    this.collectionMethod = this.getResponseProperty(\"CollectionMethod\");\n    this.suspensionDate = this.getResponseProperty(\"SuspensionDate\");\n    this.unpaidPeriodEndDate = this.getResponseProperty(\"unpaidPeriodEndDate\");\n    this.gracePeriod = this.getResponseProperty(\"GracePeriod\");\n  }\n}\n\nexport class BillingSubscriptionItemResponse extends BaseResponse {\n  productId: string;\n  name: string;\n  amount: number;\n  quantity: number;\n  interval: string;\n  sponsoredSubscriptionItem: boolean;\n  addonSubscriptionItem: boolean;\n  productName: string;\n\n  constructor(response: any) {\n    super(response);\n    this.productId = this.getResponseProperty(\"ProductId\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.amount = this.getResponseProperty(\"Amount\");\n    this.quantity = this.getResponseProperty(\"Quantity\");\n    this.interval = this.getResponseProperty(\"Interval\");\n    this.sponsoredSubscriptionItem = this.getResponseProperty(\"SponsoredSubscriptionItem\");\n    this.addonSubscriptionItem = this.getResponseProperty(\"AddonSubscriptionItem\");\n  }\n}\n\nexport class BillingSubscriptionUpcomingInvoiceResponse extends BaseResponse {\n  date: string;\n  amount?: number;\n\n  constructor(response: any) {\n    super(response);\n    this.date = this.getResponseProperty(\"Date\");\n    this.amount = this.getResponseProperty(\"Amount\");\n  }\n}\n","export enum DeviceType {\n  Android = 0,\n  iOS = 1,\n  ChromeExtension = 2,\n  FirefoxExtension = 3,\n  OperaExtension = 4,\n  EdgeExtension = 5,\n  WindowsDesktop = 6,\n  MacOsDesktop = 7,\n  LinuxDesktop = 8,\n  ChromeBrowser = 9,\n  FirefoxBrowser = 10,\n  OperaBrowser = 11,\n  EdgeBrowser = 12,\n  IEBrowser = 13,\n  UnknownBrowser = 14,\n  AndroidAmazon = 15,\n  UWP = 16,\n  SafariBrowser = 17,\n  VivaldiBrowser = 18,\n  VivaldiExtension = 19,\n  SafariExtension = 20,\n  SDK = 21,\n  Server = 22,\n  WindowsCLI = 23,\n  MacOsCLI = 24,\n  LinuxCLI = 25,\n}\n\n/**\n * Device type metadata\n * Each device type has a category corresponding to the client type and platform (Android, iOS, Chrome, Firefox, etc.)\n */\ninterface DeviceTypeMetadata {\n  category: \"mobile\" | \"extension\" | \"webVault\" | \"desktop\" | \"cli\" | \"sdk\" | \"server\";\n  platform: string;\n}\n\nexport const DeviceTypeMetadata: Record<DeviceType, DeviceTypeMetadata> = {\n  [DeviceType.Android]: { category: \"mobile\", platform: \"Android\" },\n  [DeviceType.iOS]: { category: \"mobile\", platform: \"iOS\" },\n  [DeviceType.AndroidAmazon]: { category: \"mobile\", platform: \"Amazon\" },\n  [DeviceType.ChromeExtension]: { category: \"extension\", platform: \"Chrome\" },\n  [DeviceType.FirefoxExtension]: { category: \"extension\", platform: \"Firefox\" },\n  [DeviceType.OperaExtension]: { category: \"extension\", platform: \"Opera\" },\n  [DeviceType.EdgeExtension]: { category: \"extension\", platform: \"Edge\" },\n  [DeviceType.VivaldiExtension]: { category: \"extension\", platform: \"Vivaldi\" },\n  [DeviceType.SafariExtension]: { category: \"extension\", platform: \"Safari\" },\n  [DeviceType.ChromeBrowser]: { category: \"webVault\", platform: \"Chrome\" },\n  [DeviceType.FirefoxBrowser]: { category: \"webVault\", platform: \"Firefox\" },\n  [DeviceType.OperaBrowser]: { category: \"webVault\", platform: \"Opera\" },\n  [DeviceType.EdgeBrowser]: { category: \"webVault\", platform: \"Edge\" },\n  [DeviceType.IEBrowser]: { category: \"webVault\", platform: \"IE\" },\n  [DeviceType.SafariBrowser]: { category: \"webVault\", platform: \"Safari\" },\n  [DeviceType.VivaldiBrowser]: { category: \"webVault\", platform: \"Vivaldi\" },\n  [DeviceType.UnknownBrowser]: { category: \"webVault\", platform: \"Unknown\" },\n  [DeviceType.WindowsDesktop]: { category: \"desktop\", platform: \"Windows\" },\n  [DeviceType.MacOsDesktop]: { category: \"desktop\", platform: \"macOS\" },\n  [DeviceType.LinuxDesktop]: { category: \"desktop\", platform: \"Linux\" },\n  [DeviceType.UWP]: { category: \"desktop\", platform: \"Windows UWP\" },\n  [DeviceType.WindowsCLI]: { category: \"cli\", platform: \"Windows\" },\n  [DeviceType.MacOsCLI]: { category: \"cli\", platform: \"macOS\" },\n  [DeviceType.LinuxCLI]: { category: \"cli\", platform: \"Linux\" },\n  [DeviceType.SDK]: { category: \"sdk\", platform: \"\" },\n  [DeviceType.Server]: { category: \"server\", platform: \"\" },\n};\n","/**\n * Feature flags.\n *\n * Flags MUST be short lived and SHALL be removed once enabled.\n */\nexport enum FeatureFlag {\n  BrowserFilelessImport = \"browser-fileless-import\",\n  ItemShare = \"item-share\",\n  GeneratorToolsModernization = \"generator-tools-modernization\",\n  AC1795_UpdatedSubscriptionStatusSection = \"AC-1795_updated-subscription-status-section\",\n  ExtensionRefresh = \"extension-refresh\",\n  PersistPopupView = \"persist-popup-view\",\n  PM4154_BulkEncryptionService = \"PM-4154-bulk-encryption-service\",\n  UseTreeWalkerApiForPageDetailsCollection = \"use-tree-walker-api-for-page-details-collection\",\n  EmailVerification = \"email-verification\",\n  InlineMenuFieldQualification = \"inline-menu-field-qualification\",\n  TwoFactorComponentRefactor = \"two-factor-component-refactor\",\n  InlineMenuPositioningImprovements = \"inline-menu-positioning-improvements\",\n  ProviderClientVaultPrivacyBanner = \"ac-2833-provider-client-vault-privacy-banner\",\n  VaultBulkManagementAction = \"vault-bulk-management-action\",\n  IdpAutoSubmitLogin = \"idp-auto-submit-login\",\n  UnauthenticatedExtensionUIRefresh = \"unauth-ui-refresh\",\n  GenerateIdentityFillScriptRefactor = \"generate-identity-fill-script-refactor\",\n  EnableNewCardCombinedExpiryAutofill = \"enable-new-card-combined-expiry-autofill\",\n  DelayFido2PageScriptInitWithinMv2 = \"delay-fido2-page-script-init-within-mv2\",\n  AccountDeprovisioning = \"pm-10308-account-deprovisioning\",\n  SSHKeyVaultItem = \"ssh-key-vault-item\",\n  SSHAgent = \"ssh-agent\",\n  NotificationBarAddLoginImprovements = \"notification-bar-add-login-improvements\",\n  BlockBrowserInjectionsByDomain = \"block-browser-injections-by-domain\",\n  AC2476_DeprecateStripeSourcesAPI = \"AC-2476-deprecate-stripe-sources-api\",\n  CipherKeyEncryption = \"cipher-key-encryption\",\n  VerifiedSsoDomainEndpoint = \"pm-12337-refactor-sso-details-endpoint\",\n  PM11901_RefactorSelfHostingLicenseUploader = \"PM-11901-refactor-self-hosting-license-uploader\",\n  PM14505AdminConsoleIntegrationPage = \"pm-14505-admin-console-integration-page\",\n  CriticalApps = \"pm-14466-risk-insights-critical-application\",\n  TrialPaymentOptional = \"PM-8163-trial-payment\",\n  SecurityTasks = \"security-tasks\",\n  NewDeviceVerificationTemporaryDismiss = \"new-device-temporary-dismiss\",\n  NewDeviceVerificationPermanentDismiss = \"new-device-permanent-dismiss\",\n  DisableFreeFamiliesSponsorship = \"PM-12274-disable-free-families-sponsorship\",\n  InlineMenuTotp = \"inline-menu-totp\",\n  MacOsNativeCredentialSync = \"macos-native-credential-sync\",\n  PM11360RemoveProviderExportPermission = \"pm-11360-remove-provider-export-permission\",\n  PM12443RemovePagingLogic = \"pm-12443-remove-paging-logic\",\n  PrivateKeyRegeneration = \"pm-12241-private-key-regeneration\",\n  ResellerManagedOrgAlert = \"PM-15814-alert-owners-of-reseller-managed-orgs\",\n}\n\nexport type AllowedFeatureFlagTypes = boolean | number | string;\n\n// Helper to ensure the value is treated as a boolean.\nconst FALSE = false as boolean;\n\n/**\n * Default value for feature flags.\n *\n * DO NOT enable previously disabled flags, REMOVE them instead.\n * We support true as a value as we prefer flags to \"enable\" not \"disable\".\n */\nexport const DefaultFeatureFlagValue = {\n  [FeatureFlag.BrowserFilelessImport]: FALSE,\n  [FeatureFlag.ItemShare]: FALSE,\n  [FeatureFlag.GeneratorToolsModernization]: FALSE,\n  [FeatureFlag.AC1795_UpdatedSubscriptionStatusSection]: FALSE,\n  [FeatureFlag.ExtensionRefresh]: FALSE,\n  [FeatureFlag.PersistPopupView]: FALSE,\n  [FeatureFlag.PM4154_BulkEncryptionService]: FALSE,\n  [FeatureFlag.UseTreeWalkerApiForPageDetailsCollection]: FALSE,\n  [FeatureFlag.EmailVerification]: FALSE,\n  [FeatureFlag.InlineMenuFieldQualification]: FALSE,\n  [FeatureFlag.TwoFactorComponentRefactor]: FALSE,\n  [FeatureFlag.InlineMenuPositioningImprovements]: FALSE,\n  [FeatureFlag.ProviderClientVaultPrivacyBanner]: FALSE,\n  [FeatureFlag.VaultBulkManagementAction]: FALSE,\n  [FeatureFlag.IdpAutoSubmitLogin]: FALSE,\n  [FeatureFlag.UnauthenticatedExtensionUIRefresh]: FALSE,\n  [FeatureFlag.GenerateIdentityFillScriptRefactor]: FALSE,\n  [FeatureFlag.EnableNewCardCombinedExpiryAutofill]: FALSE,\n  [FeatureFlag.DelayFido2PageScriptInitWithinMv2]: FALSE,\n  [FeatureFlag.AccountDeprovisioning]: FALSE,\n  [FeatureFlag.SSHKeyVaultItem]: FALSE,\n  [FeatureFlag.SSHAgent]: FALSE,\n  [FeatureFlag.NotificationBarAddLoginImprovements]: FALSE,\n  [FeatureFlag.BlockBrowserInjectionsByDomain]: FALSE,\n  [FeatureFlag.AC2476_DeprecateStripeSourcesAPI]: FALSE,\n  [FeatureFlag.CipherKeyEncryption]: FALSE,\n  [FeatureFlag.VerifiedSsoDomainEndpoint]: FALSE,\n  [FeatureFlag.PM11901_RefactorSelfHostingLicenseUploader]: FALSE,\n  [FeatureFlag.PM14505AdminConsoleIntegrationPage]: FALSE,\n  [FeatureFlag.CriticalApps]: FALSE,\n  [FeatureFlag.TrialPaymentOptional]: FALSE,\n  [FeatureFlag.SecurityTasks]: FALSE,\n  [FeatureFlag.NewDeviceVerificationTemporaryDismiss]: FALSE,\n  [FeatureFlag.NewDeviceVerificationPermanentDismiss]: FALSE,\n  [FeatureFlag.DisableFreeFamiliesSponsorship]: FALSE,\n  [FeatureFlag.InlineMenuTotp]: FALSE,\n  [FeatureFlag.MacOsNativeCredentialSync]: FALSE,\n  [FeatureFlag.PM11360RemoveProviderExportPermission]: FALSE,\n  [FeatureFlag.PM12443RemovePagingLogic]: FALSE,\n  [FeatureFlag.PrivateKeyRegeneration]: FALSE,\n  [FeatureFlag.ResellerManagedOrgAlert]: FALSE,\n} satisfies Record<FeatureFlag, AllowedFeatureFlagTypes>;\n\nexport type DefaultFeatureFlagValueType = typeof DefaultFeatureFlagValue;\n\nexport type FeatureFlagValueType<Flag extends FeatureFlag> = DefaultFeatureFlagValueType[Flag];\n","/**\n * Hypertext Transfer Protocol (HTTP) response status codes.\n *\n * @see {@link https://en.wikipedia.org/wiki/List_of_HTTP_status_codes}\n * src: https://gist.github.com/RWOverdijk/6cef816cfdf5722228e01cc05fd4b094\n */\nexport enum HttpStatusCode {\n  /**\n   * The server has received the request headers and the client should proceed to send the request body\n   * (in the case of a request for which a body needs to be sent; for example, a POST request).\n   * Sending a large request body to a server after a request has been rejected for inappropriate headers would be inefficient.\n   * To have a server check the request's headers, a client must send Expect: 100-continue as a header in its initial request\n   * and receive a 100 Continue status code in response before sending the body. The response 417 Expectation Failed indicates the request should not be continued.\n   */\n  Continue = 100,\n\n  /**\n   * The requester has asked the server to switch protocols and the server has agreed to do so.\n   */\n  SwitchingProtocols = 101,\n\n  /**\n   * A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request.\n   * This code indicates that the server has received and is processing the request, but no response is available yet.\n   * This prevents the client from timing out and assuming the request was lost.\n   */\n  Processing = 102,\n\n  // **********************************************************************************************************\n  // 200s - SUCCESS\n  // **********************************************************************************************************\n\n  /**\n   * Standard response for successful HTTP requests.\n   * The actual response will depend on the request method used.\n   * In a GET request, the response will contain an entity corresponding to the requested resource.\n   * In a POST request, the response will contain an entity describing or containing the result of the action.\n   */\n  Ok = 200,\n\n  /**\n   * The request has been fulfilled, resulting in the creation of a new resource.\n   */\n  Created = 201,\n\n  /**\n   * The request has been accepted for processing, but the processing has not been completed.\n   * The request might or might not be eventually acted upon, and may be disallowed when processing occurs.\n   */\n  Accepted = 202,\n\n  /**\n   * SINCE HTTP/1.1\n   * The server is a transforming proxy that received a 200 OK from its origin,\n   * but is returning a modified version of the origin's response.\n   */\n  NonAuthoritativeInformation = 203,\n\n  /**\n   * The server successfully processed the request and is not returning any content.\n   */\n  NoContent = 204,\n\n  /**\n   * The server successfully processed the request, but is not returning any content.\n   * Unlike a 204 response, this response requires that the requester reset the document view.\n   */\n  ResetContent = 205,\n\n  /**\n   * The server is delivering only part of the resource (byte serving) due to a range header sent by the client.\n   * The range header is used by HTTP clients to enable resuming of interrupted downloads,\n   * or split a download into multiple simultaneous streams.\n   */\n  PartialContent = 206,\n\n  /**\n   * The message body that follows is an XML message and can contain a number of separate response codes,\n   * depending on how many sub-requests were made.\n   */\n  MultiStatus = 207,\n\n  /**\n   * The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response,\n   * and are not being included again.\n   */\n  AlreadyReported = 208,\n\n  /**\n   * The server has fulfilled a request for the resource,\n   * and the response is a representation of the result of one or more instance-manipulations applied to the current instance.\n   */\n  ImUsed = 226,\n\n  // **********************************************************************************************************\n  // 300s - Redirections\n  // **********************************************************************************************************\n\n  /**\n   * Indicates multiple options for the resource from which the client may choose (via agent-driven content negotiation).\n   * For example, this code could be used to present multiple video format options,\n   * to list files with different filename extensions, or to suggest word-sense disambiguation.\n   */\n  MultipleChoices = 300,\n\n  /**\n   * This and all future requests should be directed to the given URI.\n   */\n  MovedPermanently = 301,\n\n  /**\n   * This is an example of industry practice contradicting the standard.\n   * The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect\n   * (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302\n   * with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307\n   * to distinguish between the two behaviours. However, some Web applications and frameworks\n   * use the 302 status code as if it were the 303.\n   */\n  Found = 302,\n\n  /**\n   * SINCE HTTP/1.1\n   * The response to the request can be found under another URI using a GET method.\n   * When received in response to a POST (or PUT/DELETE), the client should presume that\n   * the server has received the data and should issue a redirect with a separate GET message.\n   */\n  SeeOther = 303,\n\n  /**\n   * Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.\n   * In such case, there is no need to retransmit the resource since the client still has a previously-downloaded copy.\n   */\n  NotModified = 304,\n\n  /**\n   * SINCE HTTP/1.1\n   * The requested resource is available only through a proxy, the address for which is provided in the response.\n   * Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons.\n   */\n  UseProxy = 305,\n\n  /**\n   * No longer used. Originally meant \"Subsequent requests should use the specified proxy.\"\n   */\n  SwitchProxy = 306,\n\n  /**\n   * SINCE HTTP/1.1\n   * In this case, the request should be repeated with another URI; however, future requests should still use the original URI.\n   * In contrast to how 302 was historically implemented, the request method is not allowed to be changed when reissuing the original request.\n   * For example, a POST request should be repeated using another POST request.\n   */\n  TemporaryRedirect = 307,\n\n  /**\n   * The request and all future requests should be repeated using another URI.\n   * 307 and 308 parallel the behaviors of 302 and 301, but do not allow the HTTP method to change.\n   * So, for example, submitting a form to a permanently redirected resource may continue smoothly.\n   */\n  PermanentRedirect = 308,\n\n  // **********************************************************************************************************\n  // 400s - Client / User messed up\n  // **********************************************************************************************************\n\n  /**\n   * The server cannot or will not process the request due to an apparent client error\n   * (e.g., malformed request syntax, too large size, invalid request message framing, or deceptive request routing).\n   */\n  BadRequest = 400,\n\n  /**\n   * Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet\n   * been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the\n   * requested resource. See Basic access authentication and Digest access authentication. 401 semantically means\n   * \"unauthenticated\",i.e. the user does not have the necessary credentials.\n   */\n  Unauthorized = 401,\n\n  /**\n   * Reserved for future use. The original intention was that this code might be used as part of some form of digital\n   * cash or micro payment scheme, but that has not happened, and this code is not usually used.\n   * Google Developers API uses this status if a particular developer has exceeded the daily limit on requests.\n   */\n  PaymentRequired = 402,\n\n  /**\n   * The request was valid, but the server is refusing action.\n   * The user might not have the necessary permissions for a resource.\n   */\n  Forbidden = 403,\n\n  /**\n   * The requested resource could not be found but may be available in the future.\n   * Subsequent requests by the client are permissible.\n   */\n  NotFound = 404,\n\n  /**\n   * A request method is not supported for the requested resource;\n   * for example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource.\n   */\n  MethodNotAllowed = 405,\n\n  /**\n   * The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.\n   */\n  NotAcceptable = 406,\n\n  /**\n   * The client must first authenticate itself with the proxy.\n   */\n  ProxyAuthenticationRequired = 407,\n\n  /**\n   * The server timed out waiting for the request.\n   * According to HTTP specifications:\n   * \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\"\n   */\n  RequestTimeout = 408,\n\n  /**\n   * Indicates that the request could not be processed because of conflict in the request,\n   * such as an edit conflict between multiple simultaneous updates.\n   */\n  Conflict = 409,\n\n  /**\n   * Indicates that the resource requested is no longer available and will not be available again.\n   * This should be used when a resource has been intentionally removed and the resource should be purged.\n   * Upon receiving a 410 status code, the client should not request the resource in the future.\n   * Clients such as search engines should remove the resource from their indices.\n   * Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead.\n   */\n  Gone = 410,\n\n  /**\n   * The request did not specify the length of its content, which is required by the requested resource.\n   */\n  LengthRequired = 411,\n\n  /**\n   * The server does not meet one of the preconditions that the requester put on the request.\n   */\n  PreconditionFailed = 412,\n\n  /**\n   * The request is larger than the server is willing or able to process. Previously called \"Request Entity Too Large\".\n   */\n  PayloadTooLarge = 413,\n\n  /**\n   * The URI provided was too long for the server to process. Often the result of too much data being encoded as a query-string of a GET request,\n   * in which case it should be converted to a POST request.\n   * Called \"Request-URI Too Long\" previously.\n   */\n  UriTooLong = 414,\n\n  /**\n   * The request entity has a media type which the server or resource does not support.\n   * For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format.\n   */\n  UnsupportedMediaType = 415,\n\n  /**\n   * The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.\n   * For example, if the client asked for a part of the file that lies beyond the end of the file.\n   * Called \"Requested Range Not Satisfiable\" previously.\n   */\n  RangeNotSatisfiable = 416,\n\n  /**\n   * The server cannot meet the requirements of the Expect request-header field.\n   */\n  ExpectationFailed = 417,\n\n  /**\n   * This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol,\n   * and is not expected to be implemented by actual HTTP servers. The RFC specifies this code should be returned by\n   * teapots requested to brew coffee. This HTTP status is used as an Easter egg in some websites, including Google.com.\n   */\n  IAmATeapot = 418,\n\n  /**\n   * The request was directed at a server that is not able to produce a response (for example because a connection reuse).\n   */\n  MisdirectedRequest = 421,\n\n  /**\n   * The request was well-formed but was unable to be followed due to semantic errors.\n   */\n  UnprocessableEntity = 422,\n\n  /**\n   * The resource that is being accessed is locked.\n   */\n  Locked = 423,\n\n  /**\n   * The request failed due to failure of a previous request (e.g., a PROPPATCH).\n   */\n  FailedDependency = 424,\n\n  /**\n   * The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.\n   */\n  UpgradeRequired = 426,\n\n  /**\n   * The origin server requires the request to be conditional.\n   * Intended to prevent \"the 'lost update' problem, where a client\n   * GETs a resource's state, modifies it, and PUTs it back to the server,\n   * when meanwhile a third party has modified the state on the server, leading to a conflict.\"\n   */\n  PreconditionRequired = 428,\n\n  /**\n   * The user has sent too many requests in a given amount of time. Intended for use with rate-limiting schemes.\n   */\n  TooManyRequests = 429,\n\n  /**\n   * The server is unwilling to process the request because either an individual header field,\n   * or all the header fields collectively, are too large.\n   */\n  RequestHeaderFieldsTooLarge = 431,\n\n  /**\n   * A server operator has received a legal demand to deny access to a resource or to a set of resources\n   * that includes the requested resource. The code 451 was chosen as a reference to the novel Fahrenheit 451.\n   */\n  UnavailableForLegalReasons = 451,\n\n  // **********************************************************************************************************\n  // 500s - Server messed up\n  // **********************************************************************************************************\n\n  /**\n   * A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.\n   */\n  InternalServerError = 500,\n\n  /**\n   * The server either does not recognize the request method, or it lacks the ability to fulfill the request.\n   * Usually this implies future availability (e.g., a new feature of a web-service API).\n   */\n  NotImplemented = 501,\n\n  /**\n   * The server was acting as a gateway or proxy and received an invalid response from the upstream server.\n   */\n  BadGateway = 502,\n\n  /**\n   * The server is currently unavailable (because it is overloaded or down for maintenance).\n   * Generally, this is a temporary state.\n   */\n  ServiceUnavailable = 503,\n\n  /**\n   * The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.\n   */\n  GatewayTimeout = 504,\n\n  /**\n   * The server does not support the HTTP protocol version used in the request\n   */\n  HttpVersionNotSupported = 505,\n\n  /**\n   * Transparent content negotiation for the request results in a circular reference.\n   */\n  VariantAlsoNegotiates = 506,\n\n  /**\n   * The server is unable to store the representation needed to complete the request.\n   */\n  InsufficientStorage = 507,\n\n  /**\n   * The server detected an infinite loop while processing the request.\n   */\n  LoopDetected = 508,\n\n  /**\n   * Further extensions to the request are required for the server to fulfill it.\n   */\n  NotExtended = 510,\n\n  /**\n   * The client needs to authenticate to gain network access.\n   * Intended for use by intercepting proxies used to control access to the network (e.g., \"captive portals\" used\n   * to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot).\n   */\n  NetworkAuthenticationRequired = 511,\n}\n","export enum ClientType {\n  Web = \"web\",\n  Browser = \"browser\",\n  Desktop = \"desktop\",\n  // Mobile = \"mobile\",\n  Cli = \"cli\",\n  // DirectoryConnector = \"connector\",\n}\n","// Note: the enum key is used to describe the EventSystemUser in the UI. Be careful about changing it.\nexport enum EventSystemUser {\n  SCIM = 1,\n  DomainVerification = 2,\n  PublicApi = 3,\n}\n","// Increment by 100 for each new set of events\nexport enum EventType {\n  User_LoggedIn = 1000,\n  User_ChangedPassword = 1001,\n  User_Updated2fa = 1002,\n  User_Disabled2fa = 1003,\n  User_Recovered2fa = 1004,\n  User_FailedLogIn = 1005,\n  User_FailedLogIn2fa = 1006,\n  User_ClientExportedVault = 1007,\n  User_UpdatedTempPassword = 1008,\n  User_MigratedKeyToKeyConnector = 1009,\n  User_RequestedDeviceApproval = 1010,\n  User_TdeOffboardingPasswordSet = 1011,\n\n  Cipher_Created = 1100,\n  Cipher_Updated = 1101,\n  Cipher_Deleted = 1102,\n  Cipher_AttachmentCreated = 1103,\n  Cipher_AttachmentDeleted = 1104,\n  Cipher_Shared = 1105,\n  Cipher_UpdatedCollections = 1106,\n  Cipher_ClientViewed = 1107,\n  Cipher_ClientToggledPasswordVisible = 1108,\n  Cipher_ClientToggledHiddenFieldVisible = 1109,\n  Cipher_ClientToggledCardCodeVisible = 1110,\n  Cipher_ClientCopiedPassword = 1111,\n  Cipher_ClientCopiedHiddenField = 1112,\n  Cipher_ClientCopiedCardCode = 1113,\n  Cipher_ClientAutofilled = 1114,\n  Cipher_SoftDeleted = 1115,\n  Cipher_Restored = 1116,\n  Cipher_ClientToggledCardNumberVisible = 1117,\n  Cipher_ClientToggledTOTPSeedVisible = 1118,\n\n  Collection_Created = 1300,\n  Collection_Updated = 1301,\n  Collection_Deleted = 1302,\n\n  Group_Created = 1400,\n  Group_Updated = 1401,\n  Group_Deleted = 1402,\n\n  OrganizationUser_Invited = 1500,\n  OrganizationUser_Confirmed = 1501,\n  OrganizationUser_Updated = 1502,\n  OrganizationUser_Removed = 1503,\n  OrganizationUser_UpdatedGroups = 1504,\n  OrganizationUser_UnlinkedSso = 1505,\n  OrganizationUser_ResetPassword_Enroll = 1506,\n  OrganizationUser_ResetPassword_Withdraw = 1507,\n  OrganizationUser_AdminResetPassword = 1508,\n  OrganizationUser_ResetSsoLink = 1509,\n  OrganizationUser_FirstSsoLogin = 1510,\n  OrganizationUser_Revoked = 1511,\n  OrganizationUser_Restored = 1512,\n  OrganizationUser_ApprovedAuthRequest = 1513,\n  OrganizationUser_RejectedAuthRequest = 1514,\n  OrganizationUser_Deleted = 1515,\n  OrganizationUser_Left = 1516,\n\n  Organization_Updated = 1600,\n  Organization_PurgedVault = 1601,\n  Organization_ClientExportedVault = 1602,\n  Organization_VaultAccessed = 1603,\n  Organization_EnabledSso = 1604,\n  Organization_DisabledSso = 1605,\n  Organization_EnabledKeyConnector = 1606,\n  Organization_DisabledKeyConnector = 1607,\n  Organization_SponsorshipsSynced = 1608,\n  Organization_CollectionManagementUpdated = 1609,\n\n  Policy_Updated = 1700,\n\n  ProviderUser_Invited = 1800,\n  ProviderUser_Confirmed = 1801,\n  ProviderUser_Updated = 1802,\n  ProviderUser_Removed = 1803,\n\n  ProviderOrganization_Created = 1900,\n  ProviderOrganization_Added = 1901,\n  ProviderOrganization_Removed = 1902,\n  ProviderOrganization_VaultAccessed = 1903,\n\n  OrganizationDomain_Added = 2000,\n  OrganizationDomain_Removed = 2001,\n  OrganizationDomain_Verified = 2002,\n  OrganizationDomain_NotVerified = 2003,\n\n  Secret_Retrieved = 2100,\n}\n","export enum IntegrationType {\n  Integration = \"integration\",\n  SDK = \"sdk\",\n  SSO = \"sso\",\n  SCIM = \"scim\",\n  BWDC = \"bwdc\",\n  EVENT = \"event\",\n  DEVICE = \"device\",\n}\n","export enum NativeMessagingVersion {\n  One = 1, // Original implementation\n  Latest = One,\n}\n","export enum NotificationType {\n  SyncCipherUpdate = 0,\n  SyncCipherCreate = 1,\n  SyncLoginDelete = 2,\n  SyncFolderDelete = 3,\n  SyncCiphers = 4,\n\n  SyncVault = 5,\n  SyncOrgKeys = 6,\n  SyncFolderCreate = 7,\n  SyncFolderUpdate = 8,\n  SyncCipherDelete = 9,\n  SyncSettings = 10,\n\n  LogOut = 11,\n\n  SyncSendCreate = 12,\n  SyncSendUpdate = 13,\n  SyncSendDelete = 14,\n\n  AuthRequest = 15,\n  AuthRequestResponse = 16,\n\n  SyncOrganizations = 17,\n  SyncOrganizationStatusChanged = 18,\n  SyncOrganizationCollectionSettingChanged = 19,\n}\n","export enum VaultTimeoutAction {\n  Lock = \"lock\",\n  LogOut = \"logOut\",\n}\n","import { AuthService } from \"../../auth/abstractions/auth.service\";\n\nexport abstract class ProcessReloadServiceAbstraction {\n  abstract startProcessReload(authService: AuthService): Promise<void>;\n  abstract cancelProcessReload(): void;\n}\n","/*\n  See full documentation at:\n    https://bitwarden.com/help/uri-match-detection/#match-detection-options\n\n  Domain: \"the top-level domain and second-level domain of the URI match the detected resource\",\n  Host: \"the hostname and (if specified) port of the URI matches the detected resource\",\n  StartsWith: \"the detected resource starts with the URI, regardless of what follows it\",\n  Exact: \"the URI matches the detected resource exactly\",\n  RegularExpression: \"the detected resource matches a specified regular expression\",\n  Never: \"never offer auto-fill for the item\",\n*/\nexport const UriMatchStrategy = {\n  Domain: 0,\n  Host: 1,\n  StartsWith: 2,\n  Exact: 3,\n  RegularExpression: 4,\n  Never: 5,\n} as const;\n\nexport type UriMatchStrategySetting = (typeof UriMatchStrategy)[keyof typeof UriMatchStrategy];\n\n// using uniqueness properties of object shape over Set for ease of state storability\nexport type NeverDomains = { [id: string]: null | { bannerIsDismissed?: boolean } };\nexport type EquivalentDomains = string[][];\n","import { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nexport function safeGetString(value: string | EncString) {\n  if (value == null) {\n    return null;\n  }\n\n  if (typeof value == \"string\") {\n    return value;\n  }\n  return value?.encryptedString;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Card as CardDomain } from \"../../vault/models/domain/card\";\nimport { CardView } from \"../../vault/models/view/card.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class CardExport {\n  static template(): CardExport {\n    const req = new CardExport();\n    req.cardholderName = \"John Doe\";\n    req.brand = \"visa\";\n    req.number = \"4242424242424242\";\n    req.expMonth = \"04\";\n    req.expYear = \"2023\";\n    req.code = \"123\";\n    return req;\n  }\n\n  static toView(req: CardExport, view = new CardView()) {\n    view.cardholderName = req.cardholderName;\n    view.brand = req.brand;\n    view.number = req.number;\n    view.expMonth = req.expMonth;\n    view.expYear = req.expYear;\n    view.code = req.code;\n    return view;\n  }\n\n  static toDomain(req: CardExport, domain = new CardDomain()) {\n    domain.cardholderName = req.cardholderName != null ? new EncString(req.cardholderName) : null;\n    domain.brand = req.brand != null ? new EncString(req.brand) : null;\n    domain.number = req.number != null ? new EncString(req.number) : null;\n    domain.expMonth = req.expMonth != null ? new EncString(req.expMonth) : null;\n    domain.expYear = req.expYear != null ? new EncString(req.expYear) : null;\n    domain.code = req.code != null ? new EncString(req.code) : null;\n    return domain;\n  }\n\n  cardholderName: string;\n  brand: string;\n  number: string;\n  expMonth: string;\n  expYear: string;\n  code: string;\n\n  constructor(o?: CardView | CardDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.cardholderName = safeGetString(o.cardholderName);\n    this.brand = safeGetString(o.brand);\n    this.number = safeGetString(o.number);\n    this.expMonth = safeGetString(o.expMonth);\n    this.expYear = safeGetString(o.expYear);\n    this.code = safeGetString(o.code);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { FieldType, LinkedIdType } from \"../../vault/enums\";\nimport { Field as FieldDomain } from \"../../vault/models/domain/field\";\nimport { FieldView } from \"../../vault/models/view/field.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class FieldExport {\n  static template(): FieldExport {\n    const req = new FieldExport();\n    req.name = \"Field name\";\n    req.value = \"Some value\";\n    req.type = FieldType.Text;\n    return req;\n  }\n\n  static toView(req: FieldExport, view = new FieldView()) {\n    view.type = req.type;\n    view.value = req.value;\n    view.name = req.name;\n    view.linkedId = req.linkedId;\n    return view;\n  }\n\n  static toDomain(req: FieldExport, domain = new FieldDomain()) {\n    domain.type = req.type;\n    domain.value = req.value != null ? new EncString(req.value) : null;\n    domain.name = req.name != null ? new EncString(req.name) : null;\n    domain.linkedId = req.linkedId;\n    return domain;\n  }\n\n  name: string;\n  value: string;\n  type: FieldType;\n  linkedId: LinkedIdType;\n\n  constructor(o?: FieldView | FieldDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.name = safeGetString(o.name);\n    this.value = safeGetString(o.value);\n    this.type = o.type;\n    this.linkedId = o.linkedId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Identity as IdentityDomain } from \"../../vault/models/domain/identity\";\nimport { IdentityView } from \"../../vault/models/view/identity.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class IdentityExport {\n  static template(): IdentityExport {\n    const req = new IdentityExport();\n    req.title = \"Mr\";\n    req.firstName = \"John\";\n    req.middleName = \"William\";\n    req.lastName = \"Doe\";\n    req.address1 = \"123 Any St\";\n    req.address2 = \"Apt #123\";\n    req.address3 = null;\n    req.city = \"New York\";\n    req.state = \"NY\";\n    req.postalCode = \"10001\";\n    req.country = \"US\";\n    req.company = \"Acme Inc.\";\n    req.email = \"john@company.com\";\n    req.phone = \"5555551234\";\n    req.ssn = \"000-123-4567\";\n    req.username = \"jdoe\";\n    req.passportNumber = \"US-123456789\";\n    req.licenseNumber = \"D123-12-123-12333\";\n    return req;\n  }\n\n  static toView(req: IdentityExport, view = new IdentityView()) {\n    view.title = req.title;\n    view.firstName = req.firstName;\n    view.middleName = req.middleName;\n    view.lastName = req.lastName;\n    view.address1 = req.address1;\n    view.address2 = req.address2;\n    view.address3 = req.address3;\n    view.city = req.city;\n    view.state = req.state;\n    view.postalCode = req.postalCode;\n    view.country = req.country;\n    view.company = req.company;\n    view.email = req.email;\n    view.phone = req.phone;\n    view.ssn = req.ssn;\n    view.username = req.username;\n    view.passportNumber = req.passportNumber;\n    view.licenseNumber = req.licenseNumber;\n    return view;\n  }\n\n  static toDomain(req: IdentityExport, domain = new IdentityDomain()) {\n    domain.title = req.title != null ? new EncString(req.title) : null;\n    domain.firstName = req.firstName != null ? new EncString(req.firstName) : null;\n    domain.middleName = req.middleName != null ? new EncString(req.middleName) : null;\n    domain.lastName = req.lastName != null ? new EncString(req.lastName) : null;\n    domain.address1 = req.address1 != null ? new EncString(req.address1) : null;\n    domain.address2 = req.address2 != null ? new EncString(req.address2) : null;\n    domain.address3 = req.address3 != null ? new EncString(req.address3) : null;\n    domain.city = req.city != null ? new EncString(req.city) : null;\n    domain.state = req.state != null ? new EncString(req.state) : null;\n    domain.postalCode = req.postalCode != null ? new EncString(req.postalCode) : null;\n    domain.country = req.country != null ? new EncString(req.country) : null;\n    domain.company = req.company != null ? new EncString(req.company) : null;\n    domain.email = req.email != null ? new EncString(req.email) : null;\n    domain.phone = req.phone != null ? new EncString(req.phone) : null;\n    domain.ssn = req.ssn != null ? new EncString(req.ssn) : null;\n    domain.username = req.username != null ? new EncString(req.username) : null;\n    domain.passportNumber = req.passportNumber != null ? new EncString(req.passportNumber) : null;\n    domain.licenseNumber = req.licenseNumber != null ? new EncString(req.licenseNumber) : null;\n    return domain;\n  }\n\n  title: string;\n  firstName: string;\n  middleName: string;\n  lastName: string;\n  address1: string;\n  address2: string;\n  address3: string;\n  city: string;\n  state: string;\n  postalCode: string;\n  country: string;\n  company: string;\n  email: string;\n  phone: string;\n  ssn: string;\n  username: string;\n  passportNumber: string;\n  licenseNumber: string;\n\n  constructor(o?: IdentityView | IdentityDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.title = safeGetString(o.title);\n    this.firstName = safeGetString(o.firstName);\n    this.middleName = safeGetString(o.middleName);\n    this.lastName = safeGetString(o.lastName);\n    this.address1 = safeGetString(o.address1);\n    this.address2 = safeGetString(o.address2);\n    this.address3 = safeGetString(o.address3);\n    this.city = safeGetString(o.city);\n    this.state = safeGetString(o.state);\n    this.postalCode = safeGetString(o.postalCode);\n    this.country = safeGetString(o.country);\n    this.company = safeGetString(o.company);\n    this.email = safeGetString(o.email);\n    this.phone = safeGetString(o.phone);\n    this.ssn = safeGetString(o.ssn);\n    this.username = safeGetString(o.username);\n    this.passportNumber = safeGetString(o.passportNumber);\n    this.licenseNumber = safeGetString(o.licenseNumber);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Fido2Credential } from \"../../vault/models/domain/fido2-credential\";\nimport { Fido2CredentialView } from \"../../vault/models/view/fido2-credential.view\";\n\nimport { safeGetString } from \"./utils\";\n\n/**\n * Represents format of Fido2 Credentials in JSON exports.\n */\nexport class Fido2CredentialExport {\n  /**\n   * Generates a template for Fido2CredentialExport\n   * @returns Instance of Fido2CredentialExport with predefined values.\n   */\n  static template(): Fido2CredentialExport {\n    const req = new Fido2CredentialExport();\n    req.credentialId = \"keyId\";\n    req.keyType = \"keyType\";\n    req.keyAlgorithm = \"keyAlgorithm\";\n    req.keyCurve = \"keyCurve\";\n    req.keyValue = \"keyValue\";\n    req.rpId = \"rpId\";\n    req.userHandle = \"userHandle\";\n    req.userName = \"userName\";\n    req.counter = \"counter\";\n    req.rpName = \"rpName\";\n    req.userDisplayName = \"userDisplayName\";\n    req.discoverable = \"false\";\n    req.creationDate = null;\n    return req;\n  }\n\n  /**\n   * Converts a Fido2CredentialExport object to its view representation.\n   * @param req - The Fido2CredentialExport object to be converted.\n   * @param view - (Optional) The Fido2CredentialView object to popualte with Fido2CredentialExport data\n   * @returns Fido2CredentialView - The populated view, or a new instance if none was provided.\n   */\n  static toView(req: Fido2CredentialExport, view = new Fido2CredentialView()) {\n    view.credentialId = req.credentialId;\n    view.keyType = req.keyType as \"public-key\";\n    view.keyAlgorithm = req.keyAlgorithm as \"ECDSA\";\n    view.keyCurve = req.keyCurve as \"P-256\";\n    view.keyValue = req.keyValue;\n    view.rpId = req.rpId;\n    view.userHandle = req.userHandle;\n    view.userName = req.userName;\n    view.counter = parseInt(req.counter);\n    view.rpName = req.rpName;\n    view.userDisplayName = req.userDisplayName;\n    view.discoverable = req.discoverable === \"true\";\n    view.creationDate = new Date(req.creationDate);\n    return view;\n  }\n\n  /**\n   * Converts a Fido2CredentialExport object to its domain representation.\n   * @param req - The Fido2CredentialExport object to be converted.\n   * @param domain - (Optional) The Fido2Credential object to popualte with Fido2CredentialExport data\n   * @returns Fido2Credential - The populated domain, or a new instance if none was provided.\n   */\n  static toDomain(req: Fido2CredentialExport, domain = new Fido2Credential()) {\n    domain.credentialId = req.credentialId != null ? new EncString(req.credentialId) : null;\n    domain.keyType = req.keyType != null ? new EncString(req.keyType) : null;\n    domain.keyAlgorithm = req.keyAlgorithm != null ? new EncString(req.keyAlgorithm) : null;\n    domain.keyCurve = req.keyCurve != null ? new EncString(req.keyCurve) : null;\n    domain.keyValue = req.keyValue != null ? new EncString(req.keyValue) : null;\n    domain.rpId = req.rpId != null ? new EncString(req.rpId) : null;\n    domain.userHandle = req.userHandle != null ? new EncString(req.userHandle) : null;\n    domain.userName = req.userName != null ? new EncString(req.userName) : null;\n    domain.counter = req.counter != null ? new EncString(req.counter) : null;\n    domain.rpName = req.rpName != null ? new EncString(req.rpName) : null;\n    domain.userDisplayName =\n      req.userDisplayName != null ? new EncString(req.userDisplayName) : null;\n    domain.discoverable = req.discoverable != null ? new EncString(req.discoverable) : null;\n    domain.creationDate = req.creationDate;\n    return domain;\n  }\n\n  credentialId: string;\n  keyType: string;\n  keyAlgorithm: string;\n  keyCurve: string;\n  keyValue: string;\n  rpId: string;\n  userHandle: string;\n  userName: string;\n  counter: string;\n  rpName: string;\n  userDisplayName: string;\n  discoverable: string;\n  creationDate: Date;\n\n  /**\n   * Constructs a new Fid2CredentialExport instance.\n   *\n   * @param o - The credential storing the data being exported. When not provided, an empty export is created instead.\n   */\n  constructor(o?: Fido2CredentialView | Fido2Credential) {\n    if (o == null) {\n      return;\n    }\n\n    this.credentialId = safeGetString(o.credentialId);\n    this.keyType = safeGetString(o.keyType);\n    this.keyAlgorithm = safeGetString(o.keyAlgorithm);\n    this.keyCurve = safeGetString(o.keyCurve);\n    this.keyValue = safeGetString(o.keyValue);\n    this.rpId = safeGetString(o.rpId);\n    this.userHandle = safeGetString(o.userHandle);\n    this.userName = safeGetString(o.userName);\n    this.counter = safeGetString(String(o.counter));\n    this.rpName = safeGetString(o.rpName);\n    this.userDisplayName = safeGetString(o.userDisplayName);\n    this.discoverable = safeGetString(String(o.discoverable));\n    this.creationDate = o.creationDate;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UriMatchStrategySetting } from \"../../models/domain/domain-service\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { LoginUri as LoginUriDomain } from \"../../vault/models/domain/login-uri\";\nimport { LoginUriView } from \"../../vault/models/view/login-uri.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class LoginUriExport {\n  static template(): LoginUriExport {\n    const req = new LoginUriExport();\n    req.uri = \"https://google.com\";\n    req.match = null;\n    return req;\n  }\n\n  static toView(req: LoginUriExport, view = new LoginUriView()) {\n    view.uri = req.uri;\n    view.match = req.match;\n    return view;\n  }\n\n  static toDomain(req: LoginUriExport, domain = new LoginUriDomain()) {\n    domain.uri = req.uri != null ? new EncString(req.uri) : null;\n    domain.uriChecksum = req.uriChecksum != null ? new EncString(req.uriChecksum) : null;\n    domain.match = req.match;\n    return domain;\n  }\n\n  uri: string;\n  uriChecksum: string | undefined;\n  match: UriMatchStrategySetting = null;\n\n  constructor(o?: LoginUriView | LoginUriDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.uri = safeGetString(o.uri);\n    if (\"uriChecksum\" in o) {\n      this.uriChecksum = o.uriChecksum?.encryptedString;\n    }\n    this.match = o.match;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Login as LoginDomain } from \"../../vault/models/domain/login\";\nimport { LoginView } from \"../../vault/models/view/login.view\";\n\nimport { Fido2CredentialExport } from \"./fido2-credential.export\";\nimport { LoginUriExport } from \"./login-uri.export\";\nimport { safeGetString } from \"./utils\";\n\nexport class LoginExport {\n  static template(): LoginExport {\n    const req = new LoginExport();\n    req.uris = [];\n    req.username = \"jdoe\";\n    req.password = \"myp@ssword123\";\n    req.totp = \"JBSWY3DPEHPK3PXP\";\n    req.fido2Credentials = [Fido2CredentialExport.template()];\n    return req;\n  }\n\n  static toView(req: LoginExport, view = new LoginView()) {\n    if (req.uris != null) {\n      view.uris = req.uris.map((u) => LoginUriExport.toView(u));\n    }\n    view.username = req.username;\n    view.password = req.password;\n    view.totp = req.totp;\n    if (req.fido2Credentials != null) {\n      view.fido2Credentials = req.fido2Credentials.map((key) => Fido2CredentialExport.toView(key));\n    }\n    return view;\n  }\n\n  static toDomain(req: LoginExport, domain = new LoginDomain()) {\n    if (req.uris != null) {\n      domain.uris = req.uris.map((u) => LoginUriExport.toDomain(u));\n    }\n    domain.username = req.username != null ? new EncString(req.username) : null;\n    domain.password = req.password != null ? new EncString(req.password) : null;\n    domain.totp = req.totp != null ? new EncString(req.totp) : null;\n    // Fido2credentials are currently not supported for exports.\n\n    return domain;\n  }\n\n  uris: LoginUriExport[];\n  username: string;\n  password: string;\n  totp: string;\n  fido2Credentials: Fido2CredentialExport[] = [];\n\n  constructor(o?: LoginView | LoginDomain) {\n    if (o == null) {\n      return;\n    }\n\n    if (o.uris != null) {\n      this.uris = o.uris.map((u) => new LoginUriExport(u));\n    }\n\n    if (o.fido2Credentials != null) {\n      this.fido2Credentials = o.fido2Credentials.map((key) => new Fido2CredentialExport(key));\n    }\n\n    this.username = safeGetString(o.username);\n    this.password = safeGetString(o.password);\n    this.totp = safeGetString(o.totp);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Password } from \"../../vault/models/domain/password\";\nimport { PasswordHistoryView } from \"../../vault/models/view/password-history.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class PasswordHistoryExport {\n  static template(): PasswordHistoryExport {\n    const req = new PasswordHistoryExport();\n    req.password = null;\n    req.lastUsedDate = null;\n    return req;\n  }\n\n  static toView(req: PasswordHistoryExport, view = new PasswordHistoryView()) {\n    view.password = req.password;\n    view.lastUsedDate = req.lastUsedDate;\n    return view;\n  }\n\n  static toDomain(req: PasswordHistoryExport, domain = new Password()) {\n    domain.password = req.password != null ? new EncString(req.password) : null;\n    domain.lastUsedDate = req.lastUsedDate;\n    return domain;\n  }\n\n  password: string;\n  lastUsedDate: Date = null;\n\n  constructor(o?: PasswordHistoryView | Password) {\n    if (o == null) {\n      return;\n    }\n\n    this.password = safeGetString(o.password);\n    this.lastUsedDate = o.lastUsedDate;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType } from \"../../vault/enums\";\nimport { SecureNote as SecureNoteDomain } from \"../../vault/models/domain/secure-note\";\nimport { SecureNoteView } from \"../../vault/models/view/secure-note.view\";\n\nexport class SecureNoteExport {\n  static template(): SecureNoteExport {\n    const req = new SecureNoteExport();\n    req.type = SecureNoteType.Generic;\n    return req;\n  }\n\n  static toView(req: SecureNoteExport, view = new SecureNoteView()) {\n    view.type = req.type;\n    return view;\n  }\n\n  static toDomain(req: SecureNoteExport, view = new SecureNoteDomain()) {\n    view.type = req.type;\n    return view;\n  }\n\n  type: SecureNoteType;\n\n  constructor(o?: SecureNoteView | SecureNoteDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.type = o.type;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SshKeyView as SshKeyView } from \"@bitwarden/common/vault/models/view/ssh-key.view\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { SshKey as SshKeyDomain } from \"../../vault/models/domain/ssh-key\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class SshKeyExport {\n  static template(): SshKeyExport {\n    const req = new SshKeyExport();\n    req.privateKey = \"\";\n    req.publicKey = \"\";\n    req.keyFingerprint = \"\";\n    return req;\n  }\n\n  static toView(req: SshKeyExport, view = new SshKeyView()) {\n    view.privateKey = req.privateKey;\n    view.publicKey = req.publicKey;\n    view.keyFingerprint = req.keyFingerprint;\n    return view;\n  }\n\n  static toDomain(req: SshKeyExport, domain = new SshKeyDomain()) {\n    domain.privateKey = req.privateKey != null ? new EncString(req.privateKey) : null;\n    domain.publicKey = req.publicKey != null ? new EncString(req.publicKey) : null;\n    domain.keyFingerprint = req.keyFingerprint != null ? new EncString(req.keyFingerprint) : null;\n    return domain;\n  }\n\n  privateKey: string;\n  publicKey: string;\n  keyFingerprint: string;\n\n  constructor(o?: SshKeyView | SshKeyDomain) {\n    if (o == null) {\n      return;\n    }\n\n    this.privateKey = safeGetString(o.privateKey);\n    this.publicKey = safeGetString(o.publicKey);\n    this.keyFingerprint = safeGetString(o.keyFingerprint);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { CipherRepromptType } from \"../../vault/enums/cipher-reprompt-type\";\nimport { CipherType } from \"../../vault/enums/cipher-type\";\nimport { Cipher as CipherDomain } from \"../../vault/models/domain/cipher\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nimport { CardExport } from \"./card.export\";\nimport { FieldExport } from \"./field.export\";\nimport { IdentityExport } from \"./identity.export\";\nimport { LoginExport } from \"./login.export\";\nimport { PasswordHistoryExport } from \"./password-history.export\";\nimport { SecureNoteExport } from \"./secure-note.export\";\nimport { SshKeyExport } from \"./ssh-key.export\";\nimport { safeGetString } from \"./utils\";\n\nexport class CipherExport {\n  static template(): CipherExport {\n    const req = new CipherExport();\n    req.organizationId = null;\n    req.collectionIds = null;\n    req.folderId = null;\n    req.type = CipherType.Login;\n    req.name = \"Item name\";\n    req.notes = \"Some notes about this item.\";\n    req.favorite = false;\n    req.fields = [];\n    req.login = null;\n    req.secureNote = null;\n    req.card = null;\n    req.identity = null;\n    req.sshKey = null;\n    req.reprompt = CipherRepromptType.None;\n    req.passwordHistory = [];\n    req.creationDate = null;\n    req.revisionDate = null;\n    req.deletedDate = null;\n    return req;\n  }\n\n  static toView(req: CipherExport, view = new CipherView()) {\n    view.type = req.type;\n    view.folderId = req.folderId;\n    if (view.organizationId == null) {\n      view.organizationId = req.organizationId;\n    }\n    if (view.collectionIds || req.collectionIds) {\n      const set = new Set((view.collectionIds ?? []).concat(req.collectionIds ?? []));\n      view.collectionIds = Array.from(set.values());\n    }\n    view.name = req.name;\n    view.notes = req.notes;\n    view.favorite = req.favorite;\n    view.reprompt = req.reprompt ?? CipherRepromptType.None;\n\n    if (req.fields != null) {\n      view.fields = req.fields.map((f) => FieldExport.toView(f));\n    }\n\n    switch (req.type) {\n      case CipherType.Login:\n        view.login = LoginExport.toView(req.login);\n        break;\n      case CipherType.SecureNote:\n        view.secureNote = SecureNoteExport.toView(req.secureNote);\n        break;\n      case CipherType.Card:\n        view.card = CardExport.toView(req.card);\n        break;\n      case CipherType.Identity:\n        view.identity = IdentityExport.toView(req.identity);\n        break;\n      case CipherType.SshKey:\n        view.sshKey = SshKeyExport.toView(req.sshKey);\n    }\n\n    if (req.passwordHistory != null) {\n      view.passwordHistory = req.passwordHistory.map((ph) => PasswordHistoryExport.toView(ph));\n    }\n\n    view.creationDate = req.creationDate;\n    view.revisionDate = req.revisionDate;\n    view.deletedDate = req.deletedDate;\n    return view;\n  }\n\n  static toDomain(req: CipherExport, domain = new CipherDomain()) {\n    domain.type = req.type;\n    domain.folderId = req.folderId;\n    if (domain.organizationId == null) {\n      domain.organizationId = req.organizationId;\n    }\n    domain.name = req.name != null ? new EncString(req.name) : null;\n    domain.notes = req.notes != null ? new EncString(req.notes) : null;\n    domain.favorite = req.favorite;\n    domain.reprompt = req.reprompt ?? CipherRepromptType.None;\n    domain.key = req.key != null ? new EncString(req.key) : null;\n\n    if (req.fields != null) {\n      domain.fields = req.fields.map((f) => FieldExport.toDomain(f));\n    }\n\n    switch (req.type) {\n      case CipherType.Login:\n        domain.login = LoginExport.toDomain(req.login);\n        break;\n      case CipherType.SecureNote:\n        domain.secureNote = SecureNoteExport.toDomain(req.secureNote);\n        break;\n      case CipherType.Card:\n        domain.card = CardExport.toDomain(req.card);\n        break;\n      case CipherType.Identity:\n        domain.identity = IdentityExport.toDomain(req.identity);\n        break;\n      case CipherType.SshKey:\n        domain.sshKey = SshKeyExport.toDomain(req.sshKey);\n        break;\n    }\n\n    if (req.passwordHistory != null) {\n      domain.passwordHistory = req.passwordHistory.map((ph) => PasswordHistoryExport.toDomain(ph));\n    }\n\n    domain.creationDate = req.creationDate;\n    domain.revisionDate = req.revisionDate;\n    domain.deletedDate = req.deletedDate;\n    return domain;\n  }\n\n  type: CipherType;\n  folderId: string;\n  organizationId: string;\n  collectionIds: string[];\n  name: string;\n  notes: string;\n  favorite: boolean;\n  fields: FieldExport[];\n  login: LoginExport;\n  secureNote: SecureNoteExport;\n  card: CardExport;\n  identity: IdentityExport;\n  sshKey: SshKeyExport;\n  reprompt: CipherRepromptType;\n  passwordHistory: PasswordHistoryExport[] = null;\n  revisionDate: Date = null;\n  creationDate: Date = null;\n  deletedDate: Date = null;\n  key: string;\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: CipherView | CipherDomain) {\n    this.organizationId = o.organizationId;\n    this.folderId = o.folderId;\n    this.type = o.type;\n    this.reprompt = o.reprompt;\n\n    this.name = safeGetString(o.name);\n    this.notes = safeGetString(o.notes);\n    if (\"key\" in o) {\n      this.key = o.key?.encryptedString;\n    }\n\n    this.favorite = o.favorite;\n\n    if (o.fields != null) {\n      this.fields = o.fields.map((f) => new FieldExport(f));\n    }\n\n    switch (o.type) {\n      case CipherType.Login:\n        this.login = new LoginExport(o.login);\n        break;\n      case CipherType.SecureNote:\n        this.secureNote = new SecureNoteExport(o.secureNote);\n        break;\n      case CipherType.Card:\n        this.card = new CardExport(o.card);\n        break;\n      case CipherType.Identity:\n        this.identity = new IdentityExport(o.identity);\n        break;\n      case CipherType.SshKey:\n        this.sshKey = new SshKeyExport(o.sshKey);\n        break;\n    }\n\n    if (o.passwordHistory != null) {\n      this.passwordHistory = o.passwordHistory.map((ph) => new PasswordHistoryExport(ph));\n    }\n\n    this.creationDate = o.creationDate;\n    this.revisionDate = o.revisionDate;\n    this.deletedDate = o.deletedDate;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Cipher as CipherDomain } from \"../../vault/models/domain/cipher\";\nimport { CipherView } from \"../../vault/models/view/cipher.view\";\n\nimport { CipherExport } from \"./cipher.export\";\n\nexport class CipherWithIdExport extends CipherExport {\n  id: string;\n  collectionIds: string[];\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: CipherView | CipherDomain) {\n    this.id = o.id;\n    super.build(o);\n    this.collectionIds = o.collectionIds;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Collection as CollectionDomain, CollectionView } from \"@bitwarden/admin-console/common\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class CollectionExport {\n  static template(): CollectionExport {\n    const req = new CollectionExport();\n    req.organizationId = \"00000000-0000-0000-0000-000000000000\";\n    req.name = \"Collection name\";\n    req.externalId = null;\n    return req;\n  }\n\n  static toView(req: CollectionExport, view = new CollectionView()) {\n    view.name = req.name;\n    view.externalId = req.externalId;\n    if (view.organizationId == null) {\n      view.organizationId = req.organizationId;\n    }\n    return view;\n  }\n\n  static toDomain(req: CollectionExport, domain = new CollectionDomain()) {\n    domain.name = req.name != null ? new EncString(req.name) : null;\n    domain.externalId = req.externalId;\n    if (domain.organizationId == null) {\n      domain.organizationId = req.organizationId;\n    }\n    return domain;\n  }\n\n  organizationId: string;\n  name: string;\n  externalId: string;\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: CollectionView | CollectionDomain) {\n    this.organizationId = o.organizationId;\n    this.name = safeGetString(o.name);\n    this.externalId = o.externalId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Collection as CollectionDomain, CollectionView } from \"@bitwarden/admin-console/common\";\n\nimport { CollectionExport } from \"./collection.export\";\n\nexport class CollectionWithIdExport extends CollectionExport {\n  id: string;\n\n  static toView(req: CollectionWithIdExport, view = new CollectionView()) {\n    view.id = req.id;\n    return super.toView(req, view);\n  }\n\n  static toDomain(req: CollectionWithIdExport, domain = new CollectionDomain()) {\n    domain.id = req.id;\n    return super.toDomain(req, domain);\n  }\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: CollectionView | CollectionDomain) {\n    this.id = o.id;\n    super.build(o);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { Folder as FolderDomain } from \"../../vault/models/domain/folder\";\nimport { FolderView } from \"../../vault/models/view/folder.view\";\n\nimport { safeGetString } from \"./utils\";\n\nexport class FolderExport {\n  static template(): FolderExport {\n    const req = new FolderExport();\n    req.name = \"Folder name\";\n    return req;\n  }\n\n  static toView(req: FolderExport, view = new FolderView()) {\n    view.name = req.name;\n    return view;\n  }\n\n  static toDomain(req: FolderExport, domain = new FolderDomain()) {\n    domain.name = req.name != null ? new EncString(req.name) : null;\n    return domain;\n  }\n\n  name: string;\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: FolderView | FolderDomain) {\n    this.name = safeGetString(o.name);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Folder as FolderDomain } from \"../../vault/models/domain/folder\";\nimport { FolderView } from \"../../vault/models/view/folder.view\";\n\nimport { FolderExport } from \"./folder.export\";\n\nexport class FolderWithIdExport extends FolderExport {\n  id: string;\n\n  static toView(req: FolderWithIdExport, view = new FolderView()) {\n    view.id = req.id;\n    return super.toView(req, view);\n  }\n\n  static toDomain(req: FolderWithIdExport, domain = new FolderDomain()) {\n    domain.id = req.id;\n    return super.toDomain(req, domain);\n  }\n\n  // Use build method instead of ctor so that we can control order of JSON stringify for pretty print\n  build(o: FolderView | FolderDomain) {\n    this.id = o.id;\n    super.build(o);\n  }\n}\n","export class KeysRequest {\n  publicKey: string;\n  encryptedPrivateKey: string;\n\n  constructor(publicKey: string, encryptedPrivateKey: string) {\n    this.publicKey = publicKey;\n    this.encryptedPrivateKey = encryptedPrivateKey;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class StorageRequest {\n  storageGbAdjustment: number;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class BaseResponse {\n  private response: any;\n\n  constructor(response: any) {\n    this.response = response;\n  }\n\n  protected getResponseProperty(\n    propertyName: string,\n    response: any = null,\n    exactName = false,\n  ): any {\n    if (propertyName == null || propertyName === \"\") {\n      throw new Error(\"propertyName must not be null/empty.\");\n    }\n    if (response == null && this.response != null) {\n      response = this.response;\n    }\n    if (response == null) {\n      return null;\n    }\n    if (!exactName && response[propertyName] === undefined) {\n      let otherCasePropertyName: string = null;\n      if (propertyName.charAt(0) === propertyName.charAt(0).toUpperCase()) {\n        otherCasePropertyName = propertyName.charAt(0).toLowerCase();\n      } else {\n        otherCasePropertyName = propertyName.charAt(0).toUpperCase();\n      }\n      if (propertyName.length > 1) {\n        otherCasePropertyName += propertyName.slice(1);\n      }\n\n      propertyName = otherCasePropertyName;\n      if (response[propertyName] === undefined) {\n        propertyName = propertyName.toLowerCase();\n      }\n      if (response[propertyName] === undefined) {\n        propertyName = propertyName.toUpperCase();\n      }\n    }\n    return response[propertyName];\n  }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class GlobalDomainResponse extends BaseResponse {\n  type: number;\n  domains: string[];\n  excluded: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.type = this.getResponseProperty(\"Type\");\n    this.domains = this.getResponseProperty(\"Domains\");\n    this.excluded = this.getResponseProperty(\"Excluded\");\n  }\n}\n","import { BaseResponse } from \"./base.response\";\nimport { GlobalDomainResponse } from \"./global-domain.response\";\n\nexport class DomainsResponse extends BaseResponse {\n  equivalentDomains: string[][];\n  globalEquivalentDomains: GlobalDomainResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n    this.equivalentDomains = this.getResponseProperty(\"EquivalentDomains\");\n    const globalEquivalentDomains = this.getResponseProperty(\"GlobalEquivalentDomains\");\n    if (globalEquivalentDomains != null) {\n      this.globalEquivalentDomains = globalEquivalentDomains.map(\n        (d: any) => new GlobalDomainResponse(d),\n      );\n    } else {\n      this.globalEquivalentDomains = [];\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"../../platform/misc/utils\";\n\nimport { BaseResponse } from \"./base.response\";\n\nexport class ErrorResponse extends BaseResponse {\n  message: string;\n  validationErrors: { [key: string]: string[] };\n  statusCode: number;\n  captchaRequired: boolean;\n  captchaSiteKey: string;\n\n  constructor(response: any, status: number, identityResponse?: boolean) {\n    super(response);\n    let errorModel = null;\n    if (response != null) {\n      const responseErrorModel = this.getResponseProperty(\"ErrorModel\");\n      if (responseErrorModel && identityResponse) {\n        errorModel = responseErrorModel;\n      } else {\n        errorModel = response;\n      }\n    }\n\n    if (status === 429) {\n      this.message = \"Rate limit exceeded. Try again later.\";\n    } else if (errorModel) {\n      this.message = this.getResponseProperty(\"Message\", errorModel);\n      this.validationErrors = this.getResponseProperty(\"ValidationErrors\", errorModel);\n      this.captchaSiteKey = this.validationErrors?.HCaptcha_SiteKey?.[0];\n      this.captchaRequired = !Utils.isNullOrWhitespace(this.captchaSiteKey);\n    }\n    this.statusCode = status;\n  }\n\n  getSingleMessage(): string {\n    if (this.validationErrors == null) {\n      return this.message;\n    }\n    for (const key in this.validationErrors) {\n      // eslint-disable-next-line\n      if (!this.validationErrors.hasOwnProperty(key)) {\n        continue;\n      }\n      if (this.validationErrors[key].length) {\n        return this.validationErrors[key][0];\n      }\n    }\n    return this.message;\n  }\n\n  getAllMessages(): string[] {\n    const messages: string[] = [];\n    if (this.validationErrors == null) {\n      return messages;\n    }\n    for (const key in this.validationErrors) {\n      // eslint-disable-next-line\n      if (!this.validationErrors.hasOwnProperty(key)) {\n        continue;\n      }\n      this.validationErrors[key].forEach((item: string) => {\n        let prefix = \"\";\n        if (key.indexOf(\"[\") > -1 && key.indexOf(\"]\") > -1) {\n          const lastSep = key.lastIndexOf(\".\");\n          prefix = key.substr(0, lastSep > -1 ? lastSep : key.length) + \": \";\n        }\n        messages.push(prefix + item);\n      });\n    }\n    return messages;\n  }\n}\n","import { BaseResponse } from \"./base.response\";\n\nexport class ListResponse<T> extends BaseResponse {\n  data: T[];\n  continuationToken: string;\n\n  constructor(response: any, t: new (dataResponse: any) => T) {\n    super(response);\n    const data = this.getResponseProperty(\"Data\");\n    this.data = data == null ? [] : data.map((dr: any) => new t(dr));\n    this.continuationToken = this.getResponseProperty(\"ContinuationToken\");\n  }\n}\n","import { ProfileOrganizationResponse } from \"./profile-organization.response\";\n\nexport class ProfileProviderOrganizationResponse extends ProfileOrganizationResponse {\n  constructor(response: any) {\n    super(response);\n    this.keyConnectorEnabled = false;\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\nimport { ProviderStatusType, ProviderUserStatusType, ProviderUserType } from \"../../enums\";\nimport { PermissionsApi } from \"../api/permissions.api\";\n\nexport class ProfileProviderResponse extends BaseResponse {\n  id: string;\n  name: string;\n  key: string;\n  status: ProviderUserStatusType;\n  type: ProviderUserType;\n  enabled: boolean;\n  permissions: PermissionsApi;\n  userId: string;\n  useEvents: boolean;\n  providerStatus: ProviderStatusType;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.status = this.getResponseProperty(\"Status\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.enabled = this.getResponseProperty(\"Enabled\");\n    this.permissions = new PermissionsApi(this.getResponseProperty(\"permissions\"));\n    this.userId = this.getResponseProperty(\"UserId\");\n    this.useEvents = this.getResponseProperty(\"UseEvents\");\n    this.providerStatus = this.getResponseProperty(\"ProviderStatus\");\n  }\n}\n","import { ProfileOrganizationResponse } from \"../../admin-console/models/response/profile-organization.response\";\nimport { ProfileProviderOrganizationResponse } from \"../../admin-console/models/response/profile-provider-organization.response\";\nimport { ProfileProviderResponse } from \"../../admin-console/models/response/profile-provider.response\";\nimport { UserId } from \"../../types/guid\";\n\nimport { BaseResponse } from \"./base.response\";\n\nexport class ProfileResponse extends BaseResponse {\n  id: UserId;\n  name: string;\n  email: string;\n  emailVerified: boolean;\n  premiumPersonally: boolean;\n  premiumFromOrganization: boolean;\n  culture: string;\n  twoFactorEnabled: boolean;\n  key: string;\n  avatarColor: string;\n  creationDate: string;\n  privateKey: string;\n  securityStamp: string;\n  forcePasswordReset: boolean;\n  usesKeyConnector: boolean;\n  organizations: ProfileOrganizationResponse[] = [];\n  providers: ProfileProviderResponse[] = [];\n  providerOrganizations: ProfileProviderOrganizationResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.emailVerified = this.getResponseProperty(\"EmailVerified\");\n    this.premiumPersonally = this.getResponseProperty(\"Premium\");\n    this.premiumFromOrganization = this.getResponseProperty(\"PremiumFromOrganization\");\n    this.culture = this.getResponseProperty(\"Culture\");\n    this.twoFactorEnabled = this.getResponseProperty(\"TwoFactorEnabled\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.avatarColor = this.getResponseProperty(\"AvatarColor\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.privateKey = this.getResponseProperty(\"PrivateKey\");\n    this.securityStamp = this.getResponseProperty(\"SecurityStamp\");\n    this.forcePasswordReset = this.getResponseProperty(\"ForcePasswordReset\") ?? false;\n    this.usesKeyConnector = this.getResponseProperty(\"UsesKeyConnector\") ?? false;\n\n    const organizations = this.getResponseProperty(\"Organizations\");\n    if (organizations != null) {\n      this.organizations = organizations.map((o: any) => new ProfileOrganizationResponse(o));\n    }\n    const providers = this.getResponseProperty(\"Providers\");\n    if (providers != null) {\n      this.providers = providers.map((o: any) => new ProfileProviderResponse(o));\n    }\n    const providerOrganizations = this.getResponseProperty(\"ProviderOrganizations\");\n    if (providerOrganizations != null) {\n      this.providerOrganizations = providerOrganizations.map(\n        (o: any) => new ProfileProviderOrganizationResponse(o),\n      );\n    }\n  }\n}\n","export abstract class AppIdService {\n  abstract getAppId(): Promise<string>;\n  abstract getAnonymousAppId(): Promise<string>;\n}\n","export interface MessageBase {\n  command: string;\n}\n\n/**\n * @deprecated Use the observable from the appropriate service instead.\n */\nexport abstract class BroadcasterService {\n  /**\n   * @deprecated Use the observable from the appropriate service instead.\n   */\n  abstract subscribe(id: string, messageCallback: (message: MessageBase) => void): void;\n  /**\n   * @deprecated Use the observable from the appropriate service instead.\n   */\n  abstract unsubscribe(id: string): void;\n}\n","import { Decryptable } from \"../interfaces/decryptable.interface\";\nimport { InitializerMetadata } from \"../interfaces/initializer-metadata.interface\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport abstract class BulkEncryptService {\n  abstract decryptItems<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\nimport { SemVer } from \"semver\";\n\nimport { FeatureFlag, FeatureFlagValueType } from \"../../../enums/feature-flag.enum\";\nimport { UserId } from \"../../../types/guid\";\nimport { ServerSettings } from \"../../models/domain/server-settings\";\nimport { Region } from \"../environment.service\";\n\nimport { ServerConfig } from \"./server-config\";\n\nexport abstract class ConfigService {\n  /** The server config of the currently active user */\n  serverConfig$: Observable<ServerConfig | null>;\n  /** The server settings of the currently active user */\n  serverSettings$: Observable<ServerSettings | null>;\n  /** The cloud region of the currently active user */\n  cloudRegion$: Observable<Region>;\n  /**\n   * Retrieves the value of a feature flag for the currently active user\n   * @param key The feature flag to retrieve\n   * @returns An observable that emits the value of the feature flag, updates as the server config changes\n   */\n  getFeatureFlag$: <Flag extends FeatureFlag>(key: Flag) => Observable<FeatureFlagValueType<Flag>>;\n\n  /**\n   * Retrieves the cached feature flag value for a give user. This will NOT call to the server to get\n   * the most up to date feature flag.\n   * @param key The feature flag key to get the value for.\n   * @param userId The user id of the user to get the feature flag value for.\n   */\n  abstract userCachedFeatureFlag$<Flag extends FeatureFlag>(\n    key: Flag,\n    userId: UserId,\n  ): Observable<FeatureFlagValueType<Flag>>;\n\n  /**\n   * Retrieves the value of a feature flag for the currently active user\n   * @param key The feature flag to retrieve\n   * @returns The value of the feature flag\n   */\n  getFeatureFlag: <Flag extends FeatureFlag>(key: Flag) => Promise<FeatureFlagValueType<Flag>>;\n  /**\n   * Verifies whether the server version meets the minimum required version\n   * @param minimumRequiredServerVersion The minimum version required\n   * @returns True if the server version is greater than or equal to the minimum required version\n   */\n  checkServerMeetsVersionRequirement$: (\n    minimumRequiredServerVersion: SemVer,\n  ) => Observable<boolean>;\n\n  /**\n   * Triggers a check that the config for the currently active user is up-to-date. If it is not, it will be fetched from the server and stored.\n   */\n  abstract ensureConfigFetched(): Promise<void>;\n}\n","import { CsprngArray } from \"../../types/csprng\";\nimport { CbcDecryptParameters, EcbDecryptParameters } from \"../models/domain/decrypt-parameters\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport abstract class CryptoFunctionService {\n  abstract pbkdf2(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    algorithm: \"sha256\" | \"sha512\",\n    iterations: number,\n  ): Promise<Uint8Array>;\n  abstract argon2(\n    password: string | Uint8Array,\n    salt: string | Uint8Array,\n    iterations: number,\n    memory: number,\n    parallelism: number,\n  ): Promise<Uint8Array>;\n  abstract hkdf(\n    ikm: Uint8Array,\n    salt: string | Uint8Array,\n    info: string | Uint8Array,\n    outputByteSize: number,\n    algorithm: \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array>;\n  abstract hkdfExpand(\n    prk: Uint8Array,\n    info: string | Uint8Array,\n    outputByteSize: number,\n    algorithm: \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array>;\n  abstract hash(\n    value: string | Uint8Array,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\" | \"md5\",\n  ): Promise<Uint8Array>;\n  abstract hmac(\n    value: Uint8Array,\n    key: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array>;\n  abstract compare(a: Uint8Array, b: Uint8Array): Promise<boolean>;\n  abstract hmacFast(\n    value: Uint8Array | string,\n    key: Uint8Array | string,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\",\n  ): Promise<Uint8Array | string>;\n  abstract compareFast(a: Uint8Array | string, b: Uint8Array | string): Promise<boolean>;\n  abstract aesEncrypt(data: Uint8Array, iv: Uint8Array, key: Uint8Array): Promise<Uint8Array>;\n  abstract aesDecryptFastParameters(\n    data: string,\n    iv: string,\n    mac: string,\n    key: SymmetricCryptoKey,\n  ): CbcDecryptParameters<Uint8Array | string>;\n  abstract aesDecryptFast({\n    mode,\n    parameters,\n  }:\n    | { mode: \"cbc\"; parameters: CbcDecryptParameters<Uint8Array | string> }\n    | { mode: \"ecb\"; parameters: EcbDecryptParameters<Uint8Array | string> }): Promise<string>;\n  abstract aesDecrypt(\n    data: Uint8Array,\n    iv: Uint8Array,\n    key: Uint8Array,\n    mode: \"cbc\" | \"ecb\",\n  ): Promise<Uint8Array>;\n  abstract rsaEncrypt(\n    data: Uint8Array,\n    publicKey: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\",\n  ): Promise<Uint8Array>;\n  abstract rsaDecrypt(\n    data: Uint8Array,\n    privateKey: Uint8Array,\n    algorithm: \"sha1\" | \"sha256\",\n  ): Promise<Uint8Array>;\n  abstract rsaExtractPublicKey(privateKey: Uint8Array): Promise<Uint8Array>;\n  abstract rsaGenerateKeyPair(length: 1024 | 2048 | 4096): Promise<[Uint8Array, Uint8Array]>;\n  /**\n   * Generates a key of the given length suitable for use in AES encryption\n   */\n  abstract aesGenerateKey(bitLength: 128 | 192 | 256 | 512): Promise<CsprngArray>;\n  /**\n   * Generates a random array of bytes of the given length. Uses a cryptographically secure random number generator.\n   *\n   * Do not use this for generating encryption keys. Use aesGenerateKey or rsaGenerateKeyPair instead.\n   */\n  abstract randomBytes(length: number): Promise<CsprngArray>;\n}\n","import { Decryptable } from \"../interfaces/decryptable.interface\";\nimport { Encrypted } from \"../interfaces/encrypted\";\nimport { InitializerMetadata } from \"../interfaces/initializer-metadata.interface\";\nimport { EncArrayBuffer } from \"../models/domain/enc-array-buffer\";\nimport { EncString } from \"../models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../models/domain/symmetric-crypto-key\";\n\nexport abstract class EncryptService {\n  abstract encrypt(plainValue: string | Uint8Array, key: SymmetricCryptoKey): Promise<EncString>;\n  abstract encryptToBytes(plainValue: Uint8Array, key: SymmetricCryptoKey): Promise<EncArrayBuffer>;\n  /**\n   * Decrypts an EncString to a string\n   * @param encString - The EncString to decrypt\n   * @param key - The key to decrypt the EncString with\n   * @param decryptTrace - A string to identify the context of the object being decrypted. This can include: field name, encryption type, cipher id, key type, but should not include\n   * sensitive information like encryption keys or data. This is used for logging when decryption errors occur in order to identify what failed to decrypt\n   * @returns The decrypted string\n   */\n  abstract decryptToUtf8(\n    encString: EncString,\n    key: SymmetricCryptoKey,\n    decryptTrace?: string,\n  ): Promise<string>;\n  /**\n   * Decrypts an Encrypted object to a Uint8Array\n   * @param encThing - The Encrypted object to decrypt\n   * @param key - The key to decrypt the Encrypted object with\n   * @param decryptTrace - A string to identify the context of the object being decrypted. This can include: field name, encryption type, cipher id, key type, but should not include\n   * sensitive information like encryption keys or data. This is used for logging when decryption errors occur in order to identify what failed to decrypt\n   * @returns The decrypted Uint8Array\n   */\n  abstract decryptToBytes(\n    encThing: Encrypted,\n    key: SymmetricCryptoKey,\n    decryptTrace?: string,\n  ): Promise<Uint8Array>;\n  abstract rsaEncrypt(data: Uint8Array, publicKey: Uint8Array): Promise<EncString>;\n  abstract rsaDecrypt(data: EncString, privateKey: Uint8Array): Promise<Uint8Array>;\n  abstract resolveLegacyKey(key: SymmetricCryptoKey, encThing: Encrypted): SymmetricCryptoKey;\n  /**\n   * @deprecated Replaced by BulkEncryptService, remove once the feature is tested and the featureflag PM-4154-multi-worker-encryption-service is removed\n   * @param items The items to decrypt\n   * @param key The key to decrypt the items with\n   */\n  abstract decryptItems<T extends InitializerMetadata>(\n    items: Decryptable<T>[],\n    key: SymmetricCryptoKey,\n  ): Promise<T[]>;\n  /**\n   * Generates a base64-encoded hash of the given value\n   * @param value The value to hash\n   * @param algorithm The hashing algorithm to use\n   */\n  abstract hash(\n    value: string | Uint8Array,\n    algorithm: \"sha1\" | \"sha256\" | \"sha512\",\n  ): Promise<string>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nexport type Urls = {\n  base?: string;\n  webVault?: string;\n  api?: string;\n  identity?: string;\n  icons?: string;\n  notifications?: string;\n  events?: string;\n  keyConnector?: string;\n  scim?: string;\n};\n\n/**\n * A subset of available regions, additional regions can be loaded through configuration.\n */\nexport enum Region {\n  US = \"US\",\n  EU = \"EU\",\n  SelfHosted = \"Self-hosted\",\n}\n\n/**\n * The possible cloud regions.\n */\nexport type CloudRegion = Exclude<Region, Region.SelfHosted>;\n\nexport type RegionConfig = {\n  // Beware this isn't completely true, it's actually a string for custom environments,\n  // which are currently only supported in web where it doesn't matter.\n  key: Region;\n  domain: string;\n  urls: Urls;\n};\n\n/**\n * The Environment interface represents a server environment.\n *\n * It provides methods to retrieve the URLs of the different services.\n */\nexport interface Environment {\n  /**\n   * Retrieve the current region.\n   */\n  getRegion(): Region;\n  /**\n   * Retrieve the urls, should only be used when configuring the environment.\n   */\n  getUrls(): Urls;\n\n  /**\n   * Identify if the region is a cloud environment.\n   *\n   * @returns true if the environment is a cloud environment, false otherwise.\n   */\n  isCloud(): boolean;\n\n  getApiUrl(): string;\n  getEventsUrl(): string;\n  getIconsUrl(): string;\n  getIdentityUrl(): string;\n\n  /**\n   * @deprecated This is currently only used by the CLI. This functionality should be extracted since\n   * the CLI relies on changing environment mid-login.\n   *\n   * @remarks\n   * Expect this to be null unless the CLI has explicitly set it during the login flow.\n   */\n  getKeyConnectorUrl(): string | null;\n  getNotificationsUrl(): string;\n  getScimUrl(): string;\n  getSendUrl(): string;\n  getWebVaultUrl(): string;\n\n  /**\n   * Get a friendly hostname for the environment.\n   *\n   * - For self-hosted this is the web vault url without protocol prefix.\n   * - For cloud environments it's the domain key.\n   */\n  getHostname(): string;\n\n  // Not sure why we provide this, evaluate if we can remove it.\n  hasBaseUrl(): boolean;\n}\n\n/**\n * The environment service. Provides access to set the current environment urls and region.\n */\nexport abstract class EnvironmentService {\n  abstract environment$: Observable<Environment>;\n  abstract cloudWebVaultUrl$: Observable<string>;\n\n  /**\n   * Retrieve all the available regions for environment selectors.\n   *\n   * This currently relies on compile time provided constants, and will not change at runtime.\n   * Expect all builds to include production environments, QA builds to also include QA\n   * environments and dev builds to include localhost.\n   */\n  abstract availableRegions(): RegionConfig[];\n\n  /**\n   * Set the global environment.\n   */\n  abstract setEnvironment(region: Region, urls?: Urls): Promise<Urls>;\n\n  /**\n   * Seed the environment state for a given user based on the global environment.\n   *\n   * @remarks\n   * Expected to be called only by the StateService when adding a new account.\n   */\n  abstract seedUserEnvironment(userId: UserId): Promise<void>;\n\n  /**\n   * Sets the URL of the cloud web vault app based on the region parameter.\n   *\n   * @param userId - The user id to set the cloud web vault app URL for. If null or undefined the global environment is set.\n   * @param region - The region of the cloud web vault app.\n   */\n  abstract setCloudRegion(userId: UserId, region: Region): Promise<void>;\n\n  /**\n   * Get the environment from state. Useful if you need to get the environment for another user.\n   */\n  abstract getEnvironment$(userId?: string): Observable<Environment | undefined>;\n\n  /**\n   * @deprecated Use {@link getEnvironment$} instead.\n   */\n  abstract getEnvironment(userId?: string): Promise<Environment | undefined>;\n}\n","import { FileDownloadRequest } from \"./file-download.request\";\n\nexport abstract class FileDownloadService {\n  abstract download(request: FileDownloadRequest): void;\n}\n","export abstract class TranslationService {\n  abstract supportedTranslationLocales: string[];\n  abstract translationLocale: string;\n  abstract collator: Intl.Collator;\n  abstract localeNames: Map<string, string>;\n  abstract t(id: string, p1?: string | number, p2?: string | number, p3?: string | number): string;\n  abstract translate(id: string, p1?: string, p2?: string, p3?: string): string;\n}\n","import { Observable } from \"rxjs\";\n\nimport { TranslationService } from \"./translation.service\";\n\nexport abstract class I18nService extends TranslationService {\n  abstract userSetLocale$: Observable<string | undefined>;\n  abstract locale$: Observable<string>;\n  abstract setLocale(locale: string): Promise<void>;\n  abstract init(): Promise<void>;\n}\n","import { LogLevelType } from \"../enums/log-level-type.enum\";\n\nexport abstract class LogService {\n  abstract debug(message?: any, ...optionalParams: any[]): void;\n  abstract info(message?: any, ...optionalParams: any[]): void;\n  abstract warning(message?: any, ...optionalParams: any[]): void;\n  abstract error(message?: any, ...optionalParams: any[]): void;\n  abstract write(level: LogLevelType, message?: any, ...optionalParams: any[]): void;\n}\n","import { ClientType, DeviceType } from \"../../enums\";\n\ninterface ToastOptions {\n  timeout?: number;\n}\n\nexport type ClipboardOptions = {\n  allowHistory?: boolean;\n  clearing?: boolean;\n  clearMs?: number;\n  window?: Window;\n};\n\nexport abstract class PlatformUtilsService {\n  abstract getDevice(): DeviceType;\n  abstract getDeviceString(): string;\n  abstract getClientType(): ClientType;\n  abstract isFirefox(): boolean;\n  abstract isChrome(): boolean;\n  abstract isEdge(): boolean;\n  abstract isOpera(): boolean;\n  abstract isVivaldi(): boolean;\n  abstract isSafari(): boolean;\n  abstract isMacAppStore(): boolean;\n  abstract isViewOpen(): Promise<boolean>;\n  abstract launchUri(uri: string, options?: any): void;\n  abstract getApplicationVersion(): Promise<string>;\n  abstract getApplicationVersionNumber(): Promise<string>;\n  abstract supportsWebAuthn(win: Window): boolean;\n  abstract supportsDuo(): boolean;\n  /**\n   * @deprecated use `@bitwarden/components/ToastService.showToast` instead\n   *\n   * Jira: [CL-213](https://bitwarden.atlassian.net/browse/CL-213)\n   */\n  abstract showToast(\n    type: \"error\" | \"success\" | \"warning\" | \"info\",\n    title: string,\n    text: string | string[],\n    options?: ToastOptions,\n  ): void;\n  abstract isDev(): boolean;\n  abstract isSelfHost(): boolean;\n  abstract copyToClipboard(text: string, options?: ClipboardOptions): void | boolean;\n  abstract readFromClipboard(): Promise<string>;\n  abstract supportsSecureStorage(): boolean;\n  abstract getAutofillKeyboardShortcut(): Promise<string>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { BitwardenClient } from \"@bitwarden/sdk-internal\";\n\nimport { UserId } from \"../../../types/guid\";\n\nexport abstract class SdkService {\n  /**\n   * Retrieve the version of the SDK.\n   */\n  version$: Observable<string>;\n\n  /**\n   * Retrieve a client initialized without a user.\n   * This client can only be used for operations that don't require a user context.\n   */\n  client$: Observable<BitwardenClient | undefined>;\n\n  /**\n   * Retrieve a client initialized for a specific user.\n   * This client can be used for operations that require a user context, such as retrieving ciphers\n   * and operations involving crypto. It can also be used for operations that don't require a user context.\n   *\n   * **WARNING:** Do not use `firstValueFrom(userClient$)`! Any operations on the client must be done within the observable.\n   * The client will be destroyed when the observable is no longer subscribed to.\n   * Please let platform know if you need a client that is not destroyed when the observable is no longer subscribed to.\n   *\n   * @param userId\n   */\n  abstract userClient$(userId: UserId): Observable<BitwardenClient>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BiometricKey } from \"../../auth/types/biometric-key\";\nimport { Account } from \"../models/domain/account\";\nimport { StorageOptions } from \"../models/domain/storage-options\";\n\n/**\n * Options for customizing the initiation behavior.\n */\nexport type InitOptions = {\n  /**\n   * Whether or not to run state migrations as part of the init process. Defaults to true.\n   *\n   * If false, the init method will instead wait for migrations to complete before doing its\n   * other init operations. Make sure migrations have either already completed, or will complete\n   * before calling {@link StateService.init} with `runMigrations: false`.\n   */\n  runMigrations?: boolean;\n};\n\nexport abstract class StateService<T extends Account = Account> {\n  addAccount: (account: T) => Promise<void>;\n  clean: (options?: StorageOptions) => Promise<void>;\n  init: (initOptions?: InitOptions) => Promise<void>;\n\n  /**\n   * Gets the user's auto key\n   */\n  getUserKeyAutoUnlock: (options?: StorageOptions) => Promise<string>;\n  /**\n   * Sets the user's auto key\n   */\n  setUserKeyAutoUnlock: (value: string, options?: StorageOptions) => Promise<void>;\n  /**\n   * Gets the user's biometric key\n   */\n  getUserKeyBiometric: (options?: StorageOptions) => Promise<string>;\n  /**\n   * Checks if the user has a biometric key available\n   */\n  hasUserKeyBiometric: (options?: StorageOptions) => Promise<boolean>;\n  /**\n   * Sets the user's biometric key\n   */\n  setUserKeyBiometric: (value: BiometricKey, options?: StorageOptions) => Promise<void>;\n  /**\n   * @deprecated For backwards compatible purposes only, use DesktopAutofillSettingsService\n   */\n  setEnableDuckDuckGoBrowserIntegration: (\n    value: boolean,\n    options?: StorageOptions,\n  ) => Promise<void>;\n  /**\n   * @deprecated For migration purposes only, use getUserKeyMasterKey instead\n   */\n  getEncryptedCryptoSymmetricKey: (options?: StorageOptions) => Promise<string>;\n  /**\n   * @deprecated For migration purposes only, use setUserKeyAuto instead\n   */\n  setCryptoMasterKeyAuto: (value: string, options?: StorageOptions) => Promise<void>;\n  getDuckDuckGoSharedKey: (options?: StorageOptions) => Promise<string>;\n  setDuckDuckGoSharedKey: (value: string, options?: StorageOptions) => Promise<void>;\n\n  /**\n   * @deprecated Use `TokenService.hasAccessToken$()` or `AuthService.authStatusFor$` instead.\n   */\n  getIsAuthenticated: (options?: StorageOptions) => Promise<boolean>;\n\n  /**\n   * @deprecated Use `AccountService.activeAccount$` instead.\n   */\n  getUserId: (options?: StorageOptions) => Promise<string>;\n}\n","export abstract class ValidationService {\n  abstract showError(data: any): string[];\n}\n","export enum EncryptionType {\n  AesCbc256_B64 = 0,\n  AesCbc128_HmacSha256_B64 = 1,\n  AesCbc256_HmacSha256_B64 = 2,\n  Rsa2048_OaepSha256_B64 = 3,\n  Rsa2048_OaepSha1_B64 = 4,\n  Rsa2048_OaepSha256_HmacSha256_B64 = 5,\n  Rsa2048_OaepSha1_HmacSha256_B64 = 6,\n}\n\nexport function encryptionTypeToString(encryptionType: EncryptionType): string {\n  if (encryptionType in EncryptionType) {\n    return EncryptionType[encryptionType];\n  } else {\n    return \"Unknown encryption type \" + encryptionType;\n  }\n}\n\n/** The expected number of parts to a serialized EncString of the given encryption type.\n * For example, an EncString of type AesCbc256_B64 will have 2 parts, and an EncString of type\n * AesCbc128_HmacSha256_B64 will have 3 parts.\n *\n * Example of annotated serialized EncStrings:\n * 0.iv|data\n * 1.iv|data|mac\n * 2.iv|data|mac\n * 3.data\n * 4.data\n *\n * @see EncString\n * @see EncryptionType\n * @see EncString.parseEncryptedString\n */\nexport const EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE = {\n  [EncryptionType.AesCbc256_B64]: 2,\n  [EncryptionType.AesCbc128_HmacSha256_B64]: 3,\n  [EncryptionType.AesCbc256_HmacSha256_B64]: 3,\n  [EncryptionType.Rsa2048_OaepSha256_B64]: 1,\n  [EncryptionType.Rsa2048_OaepSha1_B64]: 1,\n  [EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64]: 2,\n  [EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64]: 2,\n};\n","export enum FileUploadType {\n  Direct = 0,\n  Azure = 1,\n}\n","export enum HashPurpose {\n  ServerAuthorization = 1,\n  LocalAuthorization = 2,\n}\n","export enum HtmlStorageLocation {\n  Local = \"local\",\n  Memory = \"memory\",\n  Session = \"session\",\n}\n","export enum KeySuffixOptions {\n  Auto = \"auto\",\n  Pin = \"pin\",\n}\n","export enum LogLevelType {\n  Debug,\n  Info,\n  Warning,\n  Error,\n}\n","export enum StorageLocation {\n  Both = \"both\",\n  Disk = \"disk\",\n  Memory = \"memory\",\n}\n","/**\n * @deprecated prefer the `ThemeTypes` constants and `Theme` type over unsafe enum types\n **/\nexport enum ThemeType {\n  System = \"system\",\n  Light = \"light\",\n  Dark = \"dark\",\n  Nord = \"nord\",\n  SolarizedDark = \"solarizedDark\",\n}\n\nexport const ThemeTypes = {\n  System: \"system\",\n  Light: \"light\",\n  Dark: \"dark\",\n  Nord: \"nord\",\n  SolarizedDark: \"solarizedDark\",\n} as const;\n\nexport type Theme = (typeof ThemeTypes)[keyof typeof ThemeTypes];\n","import { CommandDefinition } from \"./types\";\n\nclass MultiMessageSender implements MessageSender {\n  constructor(private readonly innerMessageSenders: MessageSender[]) {}\n\n  send<T extends Record<string, unknown>>(\n    commandDefinition: string | CommandDefinition<T>,\n    payload: Record<string, unknown> | T = {},\n  ): void {\n    for (const messageSender of this.innerMessageSenders) {\n      messageSender.send(commandDefinition, payload);\n    }\n  }\n}\n\nexport abstract class MessageSender {\n  /**\n   * A method for sending messages in a type safe manner. The passed in command definition\n   * will require you to provide a compatible type in the payload parameter.\n   *\n   * @example\n   * const MY_COMMAND = new CommandDefinition<{ test: number }>(\"myCommand\");\n   *\n   * this.messageSender.send(MY_COMMAND, { test: 14 });\n   *\n   * @param commandDefinition\n   * @param payload\n   */\n  abstract send<T extends Record<string, unknown>>(\n    commandDefinition: CommandDefinition<T>,\n    payload: T,\n  ): void;\n\n  /**\n   * A legacy method for sending messages in a non-type safe way.\n   *\n   * @remarks Consider defining a {@link CommandDefinition} and passing that in for the first parameter to\n   * get compilation errors when defining an incompatible payload.\n   *\n   * @param command The string based command of your message.\n   * @param payload Extra contextual information regarding the message. Be aware that this payload may\n   *   be serialized and lose all prototype information.\n   */\n  abstract send(command: string, payload?: Record<string, unknown>): void;\n\n  /** Implementation of the other two overloads, read their docs instead. */\n  abstract send<T extends Record<string, unknown>>(\n    commandDefinition: CommandDefinition<T> | string,\n    payload: T | Record<string, unknown>,\n  ): void;\n\n  /**\n   * A helper method for combine multiple {@link MessageSender}'s.\n   * @param messageSenders The message senders that should be combined.\n   * @returns A message sender that will relay all messages to the given message senders.\n   */\n  static combine(...messageSenders: MessageSender[]) {\n    return new MultiMessageSender(messageSenders);\n  }\n\n  /**\n   * A helper property for creating a {@link MessageSender} that sends to nowhere.\n   */\n  static readonly EMPTY: MessageSender = new MultiMessageSender([]);\n}\n","/**\n * Performs deep equality check between two values\n *\n * NOTE: This method uses JSON.stringify to compare objects, which may return false\n * for objects with the same properties but in different order. If order-insensitive\n * comparison becomes necessary in future, consider updating this method to use a comparison\n * that checks for property existence and value equality without regard to order.\n */\nexport function compareValues<T>(value1: T, value2: T): boolean {\n  if (value1 == null && value2 == null) {\n    return true;\n  }\n\n  if (value1 && value2 == null) {\n    return false;\n  }\n\n  if (value1 == null && value2) {\n    return false;\n  }\n\n  if (typeof value1 !== \"object\" || typeof value2 !== \"object\") {\n    return value1 === value2;\n  }\n\n  return JSON.stringify(value1) === JSON.stringify(value2);\n}\n","import { Utils } from \"./utils\";\n\nconst CanLaunchWhitelist = [\n  \"https://\",\n  \"http://\",\n  \"ssh://\",\n  \"ftp://\",\n  \"sftp://\",\n  \"irc://\",\n  \"vnc://\",\n  // https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/remote-desktop-uri\n  \"rdp://\", // Legacy RDP URI scheme\n  \"ms-rd:\", // Preferred RDP URI scheme\n  \"chrome://\",\n  \"iosapp://\",\n  \"androidapp://\",\n];\n\nexport class SafeUrls {\n  static canLaunch(uri: string): boolean {\n    if (Utils.isNullOrWhitespace(uri)) {\n      return false;\n    }\n\n    for (let i = 0; i < CanLaunchWhitelist.length; i++) {\n      if (uri.indexOf(CanLaunchWhitelist[i]) === 0) {\n        return true;\n      }\n    }\n\n    return false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\n/* eslint-disable no-useless-escape */\nimport * as path from \"path\";\n\nimport { Buffer as BufferLib } from \"buffer/\";\nimport { Observable, of, switchMap } from \"rxjs\";\nimport { getHostname, parse } from \"tldts\";\nimport { Merge } from \"type-fest\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyService } from \"../../../../key-management/src/abstractions/key.service\";\nimport { EncryptService } from \"../abstractions/encrypt.service\";\nimport { I18nService } from \"../abstractions/i18n.service\";\n\nconst nodeURL = typeof self === \"undefined\" ? require(\"url\") : null;\n\ndeclare global {\n  /* eslint-disable-next-line no-var */\n  var bitwardenContainerService: BitwardenContainerService;\n}\n\ninterface BitwardenContainerService {\n  getKeyService: () => KeyService;\n  getEncryptService: () => EncryptService;\n}\n\nexport class Utils {\n  static inited = false;\n  static isNode = false;\n  static isBrowser = true;\n  static isMobileBrowser = false;\n  static isAppleMobileBrowser = false;\n  static global: typeof global = null;\n  // Transpiled version of /\\p{Emoji_Presentation}/gu using https://mothereff.in/regexpu. Used for compatability in older browsers.\n  static regexpEmojiPresentation =\n    /(?:[\\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;\n  static readonly validHosts: string[] = [\"localhost\"];\n  static readonly originalMinimumPasswordLength = 8;\n  static readonly minimumPasswordLength = 12;\n  static readonly DomainMatchBlacklist = new Map<string, Set<string>>([\n    [\"google.com\", new Set([\"script.google.com\"])],\n  ]);\n\n  static init() {\n    if (Utils.inited) {\n      return;\n    }\n\n    Utils.inited = true;\n    Utils.isNode =\n      typeof process !== \"undefined\" &&\n      (process as any).release != null &&\n      (process as any).release.name === \"node\";\n    Utils.isBrowser = typeof window !== \"undefined\";\n\n    Utils.isMobileBrowser = Utils.isBrowser && this.isMobile(window);\n    Utils.isAppleMobileBrowser = Utils.isBrowser && this.isAppleMobile(window);\n\n    if (Utils.isNode) {\n      Utils.global = global;\n    } else if (Utils.isBrowser) {\n      Utils.global = window;\n    } else {\n      // If it's not browser or node then it must be a service worker\n      Utils.global = self;\n    }\n  }\n\n  static fromB64ToArray(str: string): Uint8Array {\n    if (str == null) {\n      return null;\n    }\n\n    if (Utils.isNode) {\n      return new Uint8Array(Buffer.from(str, \"base64\"));\n    } else {\n      const binaryString = Utils.global.atob(str);\n      const bytes = new Uint8Array(binaryString.length);\n      for (let i = 0; i < binaryString.length; i++) {\n        bytes[i] = binaryString.charCodeAt(i);\n      }\n      return bytes;\n    }\n  }\n\n  static fromUrlB64ToArray(str: string): Uint8Array {\n    return Utils.fromB64ToArray(Utils.fromUrlB64ToB64(str));\n  }\n\n  static fromHexToArray(str: string): Uint8Array {\n    if (Utils.isNode) {\n      return new Uint8Array(Buffer.from(str, \"hex\"));\n    } else {\n      const bytes = new Uint8Array(str.length / 2);\n      for (let i = 0; i < str.length; i += 2) {\n        bytes[i / 2] = parseInt(str.substr(i, 2), 16);\n      }\n      return bytes;\n    }\n  }\n\n  static fromUtf8ToArray(str: string): Uint8Array {\n    if (Utils.isNode) {\n      return new Uint8Array(Buffer.from(str, \"utf8\"));\n    } else {\n      const strUtf8 = unescape(encodeURIComponent(str));\n      const arr = new Uint8Array(strUtf8.length);\n      for (let i = 0; i < strUtf8.length; i++) {\n        arr[i] = strUtf8.charCodeAt(i);\n      }\n      return arr;\n    }\n  }\n\n  static fromByteStringToArray(str: string): Uint8Array {\n    if (str == null) {\n      return null;\n    }\n    const arr = new Uint8Array(str.length);\n    for (let i = 0; i < str.length; i++) {\n      arr[i] = str.charCodeAt(i);\n    }\n    return arr;\n  }\n\n  static fromBufferToB64(buffer: ArrayBuffer): string {\n    if (buffer == null) {\n      return null;\n    }\n    if (Utils.isNode) {\n      return Buffer.from(buffer).toString(\"base64\");\n    } else {\n      let binary = \"\";\n      const bytes = new Uint8Array(buffer);\n      for (let i = 0; i < bytes.byteLength; i++) {\n        binary += String.fromCharCode(bytes[i]);\n      }\n      return Utils.global.btoa(binary);\n    }\n  }\n\n  static fromBufferToUrlB64(buffer: ArrayBuffer): string {\n    return Utils.fromB64toUrlB64(Utils.fromBufferToB64(buffer));\n  }\n\n  static fromB64toUrlB64(b64Str: string) {\n    return b64Str.replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n  }\n\n  static fromBufferToUtf8(buffer: ArrayBuffer): string {\n    return BufferLib.from(buffer).toString(\"utf8\");\n  }\n\n  static fromBufferToByteString(buffer: ArrayBuffer): string {\n    return String.fromCharCode.apply(null, new Uint8Array(buffer));\n  }\n\n  // ref: https://stackoverflow.com/a/40031979/1090359\n  static fromBufferToHex(buffer: ArrayBuffer): string {\n    if (Utils.isNode) {\n      return Buffer.from(buffer).toString(\"hex\");\n    } else {\n      const bytes = new Uint8Array(buffer);\n      return Array.prototype.map\n        .call(bytes, (x: number) => (\"00\" + x.toString(16)).slice(-2))\n        .join(\"\");\n    }\n  }\n\n  /**\n   * Converts a hex string to an ArrayBuffer.\n   * Note: this doesn't need any Node specific code as parseInt() / ArrayBuffer / Uint8Array\n   * work the same in Node and the browser.\n   * @param {string} hexString - A string of hexadecimal characters.\n   * @returns {ArrayBuffer} The ArrayBuffer representation of the hex string.\n   */\n  static hexStringToArrayBuffer(hexString: string): ArrayBuffer {\n    // Check if the hexString has an even length, as each hex digit represents half a byte (4 bits),\n    // and it takes two hex digits to represent a full byte (8 bits).\n    if (hexString.length % 2 !== 0) {\n      throw \"HexString has to be an even length\";\n    }\n\n    // Create an ArrayBuffer with a length that is half the length of the hex string,\n    // because each pair of hex digits will become a single byte.\n    const arrayBuffer = new ArrayBuffer(hexString.length / 2);\n\n    // Create a Uint8Array view on top of the ArrayBuffer (each position represents a byte)\n    // as ArrayBuffers cannot be edited directly.\n    const uint8Array = new Uint8Array(arrayBuffer);\n\n    // Loop through the bytes\n    for (let i = 0; i < uint8Array.length; i++) {\n      // Extract two hex characters (1 byte)\n      const hexByte = hexString.substr(i * 2, 2);\n\n      // Convert hexByte into a decimal value from base 16. (ex: ff --> 255)\n      const byteValue = parseInt(hexByte, 16);\n\n      // Place the byte value into the uint8Array\n      uint8Array[i] = byteValue;\n    }\n\n    return arrayBuffer;\n  }\n\n  static fromUrlB64ToB64(urlB64Str: string): string {\n    let output = urlB64Str.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    switch (output.length % 4) {\n      case 0:\n        break;\n      case 2:\n        output += \"==\";\n        break;\n      case 3:\n        output += \"=\";\n        break;\n      default:\n        throw new Error(\"Illegal base64url string!\");\n    }\n\n    return output;\n  }\n\n  static fromUrlB64ToUtf8(urlB64Str: string): string {\n    return Utils.fromB64ToUtf8(Utils.fromUrlB64ToB64(urlB64Str));\n  }\n\n  static fromUtf8ToB64(utfStr: string): string {\n    if (Utils.isNode) {\n      return Buffer.from(utfStr, \"utf8\").toString(\"base64\");\n    } else {\n      return decodeURIComponent(escape(Utils.global.btoa(utfStr)));\n    }\n  }\n\n  static fromUtf8ToUrlB64(utfStr: string): string {\n    return Utils.fromBufferToUrlB64(Utils.fromUtf8ToArray(utfStr));\n  }\n\n  static fromB64ToUtf8(b64Str: string): string {\n    if (Utils.isNode) {\n      return Buffer.from(b64Str, \"base64\").toString(\"utf8\");\n    } else {\n      return decodeURIComponent(escape(Utils.global.atob(b64Str)));\n    }\n  }\n\n  // ref: http://stackoverflow.com/a/2117523/1090359\n  static newGuid(): string {\n    return \"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx\".replace(/[xy]/g, (c) => {\n      const r = (Math.random() * 16) | 0;\n      const v = c === \"x\" ? r : (r & 0x3) | 0x8;\n      return v.toString(16);\n    });\n  }\n\n  static guidRegex = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;\n\n  static isGuid(id: string) {\n    return RegExp(Utils.guidRegex, \"i\").test(id);\n  }\n\n  static getHostname(uriString: string): string {\n    if (Utils.isNullOrWhitespace(uriString)) {\n      return null;\n    }\n\n    uriString = uriString.trim();\n\n    if (uriString.startsWith(\"data:\")) {\n      return null;\n    }\n\n    if (uriString.startsWith(\"about:\")) {\n      return null;\n    }\n\n    if (uriString.startsWith(\"file:\")) {\n      return null;\n    }\n\n    // Does uriString contain invalid characters\n    // TODO Needs to possibly be extended, although '!' is a reserved character\n    if (uriString.indexOf(\"!\") > 0) {\n      return null;\n    }\n\n    try {\n      const hostname = getHostname(uriString, { validHosts: this.validHosts });\n      if (hostname != null) {\n        return hostname;\n      }\n    } catch {\n      return null;\n    }\n    return null;\n  }\n\n  static getHost(uriString: string): string {\n    const url = Utils.getUrl(uriString);\n    try {\n      return url != null && url.host !== \"\" ? url.host : null;\n    } catch {\n      return null;\n    }\n  }\n\n  static getDomain(uriString: string): string {\n    if (Utils.isNullOrWhitespace(uriString)) {\n      return null;\n    }\n\n    uriString = uriString.trim();\n\n    if (uriString.startsWith(\"data:\")) {\n      return null;\n    }\n\n    if (uriString.startsWith(\"about:\")) {\n      return null;\n    }\n\n    try {\n      const parseResult = parse(uriString, {\n        validHosts: this.validHosts,\n        allowPrivateDomains: true,\n      });\n      if (parseResult != null && parseResult.hostname != null) {\n        if (parseResult.hostname === \"localhost\" || parseResult.isIp) {\n          return parseResult.hostname;\n        }\n\n        if (parseResult.domain != null) {\n          return parseResult.domain;\n        }\n        return null;\n      }\n    } catch {\n      return null;\n    }\n    return null;\n  }\n\n  static getQueryParams(uriString: string): Map<string, string> {\n    const url = Utils.getUrl(uriString);\n    if (url == null || url.search == null || url.search === \"\") {\n      return null;\n    }\n    const map = new Map<string, string>();\n    const pairs = (url.search[0] === \"?\" ? url.search.substr(1) : url.search).split(\"&\");\n    pairs.forEach((pair) => {\n      const parts = pair.split(\"=\");\n      if (parts.length < 1) {\n        return;\n      }\n      map.set(\n        decodeURIComponent(parts[0]).toLowerCase(),\n        parts[1] == null ? \"\" : decodeURIComponent(parts[1]),\n      );\n    });\n    return map;\n  }\n\n  static getSortFunction<T>(\n    i18nService: I18nService,\n    prop: { [K in keyof T]: T[K] extends string ? K : never }[keyof T],\n  ): (a: T, b: T) => number {\n    return (a, b) => {\n      if (a[prop] == null && b[prop] != null) {\n        return -1;\n      }\n      if (a[prop] != null && b[prop] == null) {\n        return 1;\n      }\n      if (a[prop] == null && b[prop] == null) {\n        return 0;\n      }\n\n      // The `as unknown as string` here is unfortunate because typescript doesn't property understand that the return of T[prop] will be a string\n      return i18nService.collator\n        ? i18nService.collator.compare(a[prop] as unknown as string, b[prop] as unknown as string)\n        : (a[prop] as unknown as string).localeCompare(b[prop] as unknown as string);\n    };\n  }\n\n  static isNullOrWhitespace(str: string): boolean {\n    return str == null || typeof str !== \"string\" || str.trim() === \"\";\n  }\n\n  static isNullOrEmpty(str: string): boolean {\n    return str == null || typeof str !== \"string\" || str == \"\";\n  }\n\n  static isPromise(obj: any): obj is Promise<unknown> {\n    return (\n      obj != undefined && typeof obj[\"then\"] === \"function\" && typeof obj[\"catch\"] === \"function\"\n    );\n  }\n\n  static nameOf<T>(name: string & keyof T) {\n    return name;\n  }\n\n  static assign<T>(target: T, source: Partial<T>): T {\n    return Object.assign(target, source);\n  }\n\n  static iterateEnum<O extends object, K extends keyof O = keyof O>(obj: O) {\n    return (Object.keys(obj).filter((k) => Number.isNaN(+k)) as K[]).map((k) => obj[k]);\n  }\n\n  static getUrl(uriString: string): URL {\n    if (this.isNullOrWhitespace(uriString)) {\n      return null;\n    }\n\n    uriString = uriString.trim();\n\n    return Utils.getUrlObject(uriString);\n  }\n\n  static camelToPascalCase(s: string) {\n    return s.charAt(0).toUpperCase() + s.slice(1);\n  }\n\n  /**\n   * There are a few ways to calculate text color for contrast, this one seems to fit accessibility guidelines best.\n   * https://stackoverflow.com/a/3943023/6869691\n   *\n   * @param {string} bgColor\n   * @param {number} [threshold] see stackoverflow link above\n   * @param {boolean} [svgTextFill]\n   * Indicates if this method is performed on an SVG <text> 'fill' attribute (e.g. <text fill=\"black\"></text>).\n   * This check is necessary because the '!important' tag cannot be used in a 'fill' attribute.\n   */\n  static pickTextColorBasedOnBgColor(bgColor: string, threshold = 186, svgTextFill = false) {\n    const bgColorHexNums = bgColor.charAt(0) === \"#\" ? bgColor.substring(1, 7) : bgColor;\n    const r = parseInt(bgColorHexNums.substring(0, 2), 16); // hexToR\n    const g = parseInt(bgColorHexNums.substring(2, 4), 16); // hexToG\n    const b = parseInt(bgColorHexNums.substring(4, 6), 16); // hexToB\n    const blackColor = svgTextFill ? \"black\" : \"black !important\";\n    const whiteColor = svgTextFill ? \"white\" : \"white !important\";\n    return r * 0.299 + g * 0.587 + b * 0.114 > threshold ? blackColor : whiteColor;\n  }\n\n  static stringToColor(str: string): string {\n    let hash = 0;\n    for (let i = 0; i < str.length; i++) {\n      hash = str.charCodeAt(i) + ((hash << 5) - hash);\n    }\n    let color = \"#\";\n    for (let i = 0; i < 3; i++) {\n      const value = (hash >> (i * 8)) & 0xff;\n      color += (\"00\" + value.toString(16)).substr(-2);\n    }\n    return color;\n  }\n\n  /**\n   * @throws Will throw an error if the ContainerService has not been attached to the window object\n   */\n  static getContainerService(): BitwardenContainerService {\n    if (this.global.bitwardenContainerService == null) {\n      throw new Error(\"global bitwardenContainerService not initialized.\");\n    }\n    return this.global.bitwardenContainerService;\n  }\n\n  static validateHexColor(color: string) {\n    return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(color);\n  }\n\n  /**\n   * Converts map to a Record<string, V> with the same data. Inverse of recordToMap\n   * Useful in toJSON methods, since Maps are not serializable\n   * @param map\n   * @returns\n   */\n  static mapToRecord<K extends string | number, V>(map: Map<K, V>): Record<string, V> {\n    if (map == null) {\n      return null;\n    }\n    if (!(map instanceof Map)) {\n      return map;\n    }\n    return Object.fromEntries(map);\n  }\n\n  /**\n   * Converts record to a Map<string, V> with the same data. Inverse of mapToRecord\n   * Useful in fromJSON methods, since Maps are not serializable\n   *\n   * Warning: If the record has string keys that are numbers, they will be converted to numbers in the map\n   * @param record\n   * @returns\n   */\n  static recordToMap<K extends string | number, V>(record: Record<K, V>): Map<K, V> {\n    if (record == null) {\n      return null;\n    } else if (record instanceof Map) {\n      return record;\n    }\n\n    const entries = Object.entries(record);\n    if (entries.length === 0) {\n      return new Map();\n    }\n\n    if (isNaN(Number(entries[0][0]))) {\n      return new Map(entries) as Map<K, V>;\n    } else {\n      return new Map(entries.map((e) => [Number(e[0]), e[1]])) as Map<K, V>;\n    }\n  }\n\n  /** Applies Object.assign, but converts the type nicely using Type-Fest Merge<Destination, Source> */\n  static merge<Destination, Source>(\n    destination: Destination,\n    source: Source,\n  ): Merge<Destination, Source> {\n    return Object.assign(destination, source) as unknown as Merge<Destination, Source>;\n  }\n\n  /**\n   * encodeURIComponent escapes all characters except the following:\n   * alphabetic, decimal digits, - _ . ! ~ * ' ( )\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent#encoding_for_rfc3986\n   */\n  static encodeRFC3986URIComponent(str: string): string {\n    return encodeURIComponent(str).replace(\n      /[!'()*]/g,\n      (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`,\n    );\n  }\n\n  /**\n   * Normalizes a path for defense against attacks like traversals\n   * @param denormalizedPath\n   * @returns\n   */\n  static normalizePath(denormalizedPath: string): string {\n    return path.normalize(decodeURIComponent(denormalizedPath)).replace(/^(\\.\\.(\\/|\\\\|$))+/, \"\");\n  }\n\n  private static isMobile(win: Window) {\n    let mobile = false;\n    ((a) => {\n      if (\n        /(android|bb\\d+|meego).+mobile|avantgo|bada\\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(\n          a,\n        ) ||\n        /1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\\-(n|u)|c55\\/|capi|ccwa|cdm\\-|cell|chtm|cldc|cmd\\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\\-s|devi|dica|dmob|do(c|p)o|ds(12|\\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\\-|_)|g1 u|g560|gene|gf\\-5|g\\-mo|go(\\.w|od)|gr(ad|un)|haie|hcit|hd\\-(m|p|t)|hei\\-|hi(pt|ta)|hp( i|ip)|hs\\-c|ht(c(\\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\\-(20|go|ma)|i230|iac( |\\-|\\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\\/)|klon|kpt |kwc\\-|kyo(c|k)|le(no|xi)|lg( g|\\/(k|l|u)|50|54|\\-[a-w])|libw|lynx|m1\\-w|m3ga|m50\\/|ma(te|ui|xo)|mc(01|21|ca)|m\\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\\-2|po(ck|rt|se)|prox|psio|pt\\-g|qa\\-a|qc(07|12|21|32|60|\\-[2-7]|i\\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\\-|oo|p\\-)|sdk\\/|se(c(\\-|0|1)|47|mc|nd|ri)|sgh\\-|shar|sie(\\-|m)|sk\\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\\-|v\\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\\-|tdg\\-|tel(i|m)|tim\\-|t\\-mo|to(pl|sh)|ts(70|m\\-|m3|m5)|tx\\-9|up(\\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\\-|your|zeto|zte\\-/i.test(\n          a.substr(0, 4),\n        )\n      ) {\n        mobile = true;\n      }\n    })(win.navigator.userAgent || win.navigator.vendor || (win as any).opera);\n    return mobile || win.navigator.userAgent.match(/iPad/i) != null;\n  }\n\n  static delay(ms: number): Promise<void> {\n    return new Promise((resolve) => setTimeout(resolve, ms));\n  }\n\n  /**\n   * Generate an observable from a function that returns a promise.\n   * Similar to the rxjs function {@link from} with one big exception:\n   * {@link from} will not re-execute the function when observers resubscribe.\n   * {@link Util.asyncToObservable} will execute `generator` for every\n   * subscribe, making it ideal if the value ever needs to be refreshed.\n   * */\n  static asyncToObservable<T>(generator: () => Promise<T>): Observable<T> {\n    return of(undefined).pipe(switchMap(() => generator()));\n  }\n\n  /**\n   * Return the number of days remaining before a target date arrives.\n   * Returns 0 if the day has already passed.\n   */\n  static daysRemaining(targetDate: Date): number {\n    const diffTime = targetDate.getTime() - Date.now();\n    const msPerDay = 86400000;\n    return Math.max(0, Math.floor(diffTime / msPerDay));\n  }\n\n  private static isAppleMobile(win: Window) {\n    return (\n      win.navigator.userAgent.match(/iPhone/i) != null ||\n      win.navigator.userAgent.match(/iPad/i) != null\n    );\n  }\n\n  private static getUrlObject(uriString: string): URL {\n    // All the methods below require a protocol to properly parse a URL string\n    // Assume http if no other protocol is present\n    const hasProtocol = uriString.indexOf(\"://\") > -1;\n    if (!hasProtocol && uriString.indexOf(\".\") > -1) {\n      uriString = \"http://\" + uriString;\n    } else if (!hasProtocol) {\n      return null;\n    }\n\n    try {\n      if (nodeURL != null) {\n        return new nodeURL.URL(uriString);\n      }\n\n      return new URL(uriString);\n    } catch (e) {\n      // Ignore error\n    }\n\n    return null;\n  }\n}\n\nUtils.init();\n","// EFF's Long Wordlist from https://www.eff.org/dice\nexport const EFFLongWordList = [\n  \"abacus\",\n  \"abdomen\",\n  \"abdominal\",\n  \"abide\",\n  \"abiding\",\n  \"ability\",\n  \"ablaze\",\n  \"able\",\n  \"abnormal\",\n  \"abrasion\",\n  \"abrasive\",\n  \"abreast\",\n  \"abridge\",\n  \"abroad\",\n  \"abruptly\",\n  \"absence\",\n  \"absentee\",\n  \"absently\",\n  \"absinthe\",\n  \"absolute\",\n  \"absolve\",\n  \"abstain\",\n  \"abstract\",\n  \"absurd\",\n  \"accent\",\n  \"acclaim\",\n  \"acclimate\",\n  \"accompany\",\n  \"account\",\n  \"accuracy\",\n  \"accurate\",\n  \"accustom\",\n  \"acetone\",\n  \"achiness\",\n  \"aching\",\n  \"acid\",\n  \"acorn\",\n  \"acquaint\",\n  \"acquire\",\n  \"acre\",\n  \"acrobat\",\n  \"acronym\",\n  \"acting\",\n  \"action\",\n  \"activate\",\n  \"activator\",\n  \"active\",\n  \"activism\",\n  \"activist\",\n  \"activity\",\n  \"actress\",\n  \"acts\",\n  \"acutely\",\n  \"acuteness\",\n  \"aeration\",\n  \"aerobics\",\n  \"aerosol\",\n  \"aerospace\",\n  \"afar\",\n  \"affair\",\n  \"affected\",\n  \"affecting\",\n  \"affection\",\n  \"affidavit\",\n  \"affiliate\",\n  \"affirm\",\n  \"affix\",\n  \"afflicted\",\n  \"affluent\",\n  \"afford\",\n  \"affront\",\n  \"aflame\",\n  \"afloat\",\n  \"aflutter\",\n  \"afoot\",\n  \"afraid\",\n  \"afterglow\",\n  \"afterlife\",\n  \"aftermath\",\n  \"aftermost\",\n  \"afternoon\",\n  \"aged\",\n  \"ageless\",\n  \"agency\",\n  \"agenda\",\n  \"agent\",\n  \"aggregate\",\n  \"aghast\",\n  \"agile\",\n  \"agility\",\n  \"aging\",\n  \"agnostic\",\n  \"agonize\",\n  \"agonizing\",\n  \"agony\",\n  \"agreeable\",\n  \"agreeably\",\n  \"agreed\",\n  \"agreeing\",\n  \"agreement\",\n  \"aground\",\n  \"ahead\",\n  \"ahoy\",\n  \"aide\",\n  \"aids\",\n  \"aim\",\n  \"ajar\",\n  \"alabaster\",\n  \"alarm\",\n  \"albatross\",\n  \"album\",\n  \"alfalfa\",\n  \"algebra\",\n  \"algorithm\",\n  \"alias\",\n  \"alibi\",\n  \"alienable\",\n  \"alienate\",\n  \"aliens\",\n  \"alike\",\n  \"alive\",\n  \"alkaline\",\n  \"alkalize\",\n  \"almanac\",\n  \"almighty\",\n  \"almost\",\n  \"aloe\",\n  \"aloft\",\n  \"aloha\",\n  \"alone\",\n  \"alongside\",\n  \"aloof\",\n  \"alphabet\",\n  \"alright\",\n  \"although\",\n  \"altitude\",\n  \"alto\",\n  \"aluminum\",\n  \"alumni\",\n  \"always\",\n  \"amaretto\",\n  \"amaze\",\n  \"amazingly\",\n  \"amber\",\n  \"ambiance\",\n  \"ambiguity\",\n  \"ambiguous\",\n  \"ambition\",\n  \"ambitious\",\n  \"ambulance\",\n  \"ambush\",\n  \"amendable\",\n  \"amendment\",\n  \"amends\",\n  \"amenity\",\n  \"amiable\",\n  \"amicably\",\n  \"amid\",\n  \"amigo\",\n  \"amino\",\n  \"amiss\",\n  \"ammonia\",\n  \"ammonium\",\n  \"amnesty\",\n  \"amniotic\",\n  \"among\",\n  \"amount\",\n  \"amperage\",\n  \"ample\",\n  \"amplifier\",\n  \"amplify\",\n  \"amply\",\n  \"amuck\",\n  \"amulet\",\n  \"amusable\",\n  \"amused\",\n  \"amusement\",\n  \"amuser\",\n  \"amusing\",\n  \"anaconda\",\n  \"anaerobic\",\n  \"anagram\",\n  \"anatomist\",\n  \"anatomy\",\n  \"anchor\",\n  \"anchovy\",\n  \"ancient\",\n  \"android\",\n  \"anemia\",\n  \"anemic\",\n  \"aneurism\",\n  \"anew\",\n  \"angelfish\",\n  \"angelic\",\n  \"anger\",\n  \"angled\",\n  \"angler\",\n  \"angles\",\n  \"angling\",\n  \"angrily\",\n  \"angriness\",\n  \"anguished\",\n  \"angular\",\n  \"animal\",\n  \"animate\",\n  \"animating\",\n  \"animation\",\n  \"animator\",\n  \"anime\",\n  \"animosity\",\n  \"ankle\",\n  \"annex\",\n  \"annotate\",\n  \"announcer\",\n  \"annoying\",\n  \"annually\",\n  \"annuity\",\n  \"anointer\",\n  \"another\",\n  \"answering\",\n  \"antacid\",\n  \"antarctic\",\n  \"anteater\",\n  \"antelope\",\n  \"antennae\",\n  \"anthem\",\n  \"anthill\",\n  \"anthology\",\n  \"antibody\",\n  \"antics\",\n  \"antidote\",\n  \"antihero\",\n  \"antiquely\",\n  \"antiques\",\n  \"antiquity\",\n  \"antirust\",\n  \"antitoxic\",\n  \"antitrust\",\n  \"antiviral\",\n  \"antivirus\",\n  \"antler\",\n  \"antonym\",\n  \"antsy\",\n  \"anvil\",\n  \"anybody\",\n  \"anyhow\",\n  \"anymore\",\n  \"anyone\",\n  \"anyplace\",\n  \"anything\",\n  \"anytime\",\n  \"anyway\",\n  \"anywhere\",\n  \"aorta\",\n  \"apache\",\n  \"apostle\",\n  \"appealing\",\n  \"appear\",\n  \"appease\",\n  \"appeasing\",\n  \"appendage\",\n  \"appendix\",\n  \"appetite\",\n  \"appetizer\",\n  \"applaud\",\n  \"applause\",\n  \"apple\",\n  \"appliance\",\n  \"applicant\",\n  \"applied\",\n  \"apply\",\n  \"appointee\",\n  \"appraisal\",\n  \"appraiser\",\n  \"apprehend\",\n  \"approach\",\n  \"approval\",\n  \"approve\",\n  \"apricot\",\n  \"april\",\n  \"apron\",\n  \"aptitude\",\n  \"aptly\",\n  \"aqua\",\n  \"aqueduct\",\n  \"arbitrary\",\n  \"arbitrate\",\n  \"ardently\",\n  \"area\",\n  \"arena\",\n  \"arguable\",\n  \"arguably\",\n  \"argue\",\n  \"arise\",\n  \"armadillo\",\n  \"armband\",\n  \"armchair\",\n  \"armed\",\n  \"armful\",\n  \"armhole\",\n  \"arming\",\n  \"armless\",\n  \"armoire\",\n  \"armored\",\n  \"armory\",\n  \"armrest\",\n  \"army\",\n  \"aroma\",\n  \"arose\",\n  \"around\",\n  \"arousal\",\n  \"arrange\",\n  \"array\",\n  \"arrest\",\n  \"arrival\",\n  \"arrive\",\n  \"arrogance\",\n  \"arrogant\",\n  \"arson\",\n  \"art\",\n  \"ascend\",\n  \"ascension\",\n  \"ascent\",\n  \"ascertain\",\n  \"ashamed\",\n  \"ashen\",\n  \"ashes\",\n  \"ashy\",\n  \"aside\",\n  \"askew\",\n  \"asleep\",\n  \"asparagus\",\n  \"aspect\",\n  \"aspirate\",\n  \"aspire\",\n  \"aspirin\",\n  \"astonish\",\n  \"astound\",\n  \"astride\",\n  \"astrology\",\n  \"astronaut\",\n  \"astronomy\",\n  \"astute\",\n  \"atlantic\",\n  \"atlas\",\n  \"atom\",\n  \"atonable\",\n  \"atop\",\n  \"atrium\",\n  \"atrocious\",\n  \"atrophy\",\n  \"attach\",\n  \"attain\",\n  \"attempt\",\n  \"attendant\",\n  \"attendee\",\n  \"attention\",\n  \"attentive\",\n  \"attest\",\n  \"attic\",\n  \"attire\",\n  \"attitude\",\n  \"attractor\",\n  \"attribute\",\n  \"atypical\",\n  \"auction\",\n  \"audacious\",\n  \"audacity\",\n  \"audible\",\n  \"audibly\",\n  \"audience\",\n  \"audio\",\n  \"audition\",\n  \"augmented\",\n  \"august\",\n  \"authentic\",\n  \"author\",\n  \"autism\",\n  \"autistic\",\n  \"autograph\",\n  \"automaker\",\n  \"automated\",\n  \"automatic\",\n  \"autopilot\",\n  \"available\",\n  \"avalanche\",\n  \"avatar\",\n  \"avenge\",\n  \"avenging\",\n  \"avenue\",\n  \"average\",\n  \"aversion\",\n  \"avert\",\n  \"aviation\",\n  \"aviator\",\n  \"avid\",\n  \"avoid\",\n  \"await\",\n  \"awaken\",\n  \"award\",\n  \"aware\",\n  \"awhile\",\n  \"awkward\",\n  \"awning\",\n  \"awoke\",\n  \"awry\",\n  \"axis\",\n  \"babble\",\n  \"babbling\",\n  \"babied\",\n  \"baboon\",\n  \"backache\",\n  \"backboard\",\n  \"backboned\",\n  \"backdrop\",\n  \"backed\",\n  \"backer\",\n  \"backfield\",\n  \"backfire\",\n  \"backhand\",\n  \"backing\",\n  \"backlands\",\n  \"backlash\",\n  \"backless\",\n  \"backlight\",\n  \"backlit\",\n  \"backlog\",\n  \"backpack\",\n  \"backpedal\",\n  \"backrest\",\n  \"backroom\",\n  \"backshift\",\n  \"backside\",\n  \"backslid\",\n  \"backspace\",\n  \"backspin\",\n  \"backstab\",\n  \"backstage\",\n  \"backtalk\",\n  \"backtrack\",\n  \"backup\",\n  \"backward\",\n  \"backwash\",\n  \"backwater\",\n  \"backyard\",\n  \"bacon\",\n  \"bacteria\",\n  \"bacterium\",\n  \"badass\",\n  \"badge\",\n  \"badland\",\n  \"badly\",\n  \"badness\",\n  \"baffle\",\n  \"baffling\",\n  \"bagel\",\n  \"bagful\",\n  \"baggage\",\n  \"bagged\",\n  \"baggie\",\n  \"bagginess\",\n  \"bagging\",\n  \"baggy\",\n  \"bagpipe\",\n  \"baguette\",\n  \"baked\",\n  \"bakery\",\n  \"bakeshop\",\n  \"baking\",\n  \"balance\",\n  \"balancing\",\n  \"balcony\",\n  \"balmy\",\n  \"balsamic\",\n  \"bamboo\",\n  \"banana\",\n  \"banish\",\n  \"banister\",\n  \"banjo\",\n  \"bankable\",\n  \"bankbook\",\n  \"banked\",\n  \"banker\",\n  \"banking\",\n  \"banknote\",\n  \"bankroll\",\n  \"banner\",\n  \"bannister\",\n  \"banshee\",\n  \"banter\",\n  \"barbecue\",\n  \"barbed\",\n  \"barbell\",\n  \"barber\",\n  \"barcode\",\n  \"barge\",\n  \"bargraph\",\n  \"barista\",\n  \"baritone\",\n  \"barley\",\n  \"barmaid\",\n  \"barman\",\n  \"barn\",\n  \"barometer\",\n  \"barrack\",\n  \"barracuda\",\n  \"barrel\",\n  \"barrette\",\n  \"barricade\",\n  \"barrier\",\n  \"barstool\",\n  \"bartender\",\n  \"barterer\",\n  \"bash\",\n  \"basically\",\n  \"basics\",\n  \"basil\",\n  \"basin\",\n  \"basis\",\n  \"basket\",\n  \"batboy\",\n  \"batch\",\n  \"bath\",\n  \"baton\",\n  \"bats\",\n  \"battalion\",\n  \"battered\",\n  \"battering\",\n  \"battery\",\n  \"batting\",\n  \"battle\",\n  \"bauble\",\n  \"bazooka\",\n  \"blabber\",\n  \"bladder\",\n  \"blade\",\n  \"blah\",\n  \"blame\",\n  \"blaming\",\n  \"blanching\",\n  \"blandness\",\n  \"blank\",\n  \"blaspheme\",\n  \"blasphemy\",\n  \"blast\",\n  \"blatancy\",\n  \"blatantly\",\n  \"blazer\",\n  \"blazing\",\n  \"bleach\",\n  \"bleak\",\n  \"bleep\",\n  \"blemish\",\n  \"blend\",\n  \"bless\",\n  \"blighted\",\n  \"blimp\",\n  \"bling\",\n  \"blinked\",\n  \"blinker\",\n  \"blinking\",\n  \"blinks\",\n  \"blip\",\n  \"blissful\",\n  \"blitz\",\n  \"blizzard\",\n  \"bloated\",\n  \"bloating\",\n  \"blob\",\n  \"blog\",\n  \"bloomers\",\n  \"blooming\",\n  \"blooper\",\n  \"blot\",\n  \"blouse\",\n  \"blubber\",\n  \"bluff\",\n  \"bluish\",\n  \"blunderer\",\n  \"blunt\",\n  \"blurb\",\n  \"blurred\",\n  \"blurry\",\n  \"blurt\",\n  \"blush\",\n  \"blustery\",\n  \"boaster\",\n  \"boastful\",\n  \"boasting\",\n  \"boat\",\n  \"bobbed\",\n  \"bobbing\",\n  \"bobble\",\n  \"bobcat\",\n  \"bobsled\",\n  \"bobtail\",\n  \"bodacious\",\n  \"body\",\n  \"bogged\",\n  \"boggle\",\n  \"bogus\",\n  \"boil\",\n  \"bok\",\n  \"bolster\",\n  \"bolt\",\n  \"bonanza\",\n  \"bonded\",\n  \"bonding\",\n  \"bondless\",\n  \"boned\",\n  \"bonehead\",\n  \"boneless\",\n  \"bonelike\",\n  \"boney\",\n  \"bonfire\",\n  \"bonnet\",\n  \"bonsai\",\n  \"bonus\",\n  \"bony\",\n  \"boogeyman\",\n  \"boogieman\",\n  \"book\",\n  \"boondocks\",\n  \"booted\",\n  \"booth\",\n  \"bootie\",\n  \"booting\",\n  \"bootlace\",\n  \"bootleg\",\n  \"boots\",\n  \"boozy\",\n  \"borax\",\n  \"boring\",\n  \"borough\",\n  \"borrower\",\n  \"borrowing\",\n  \"boss\",\n  \"botanical\",\n  \"botanist\",\n  \"botany\",\n  \"botch\",\n  \"both\",\n  \"bottle\",\n  \"bottling\",\n  \"bottom\",\n  \"bounce\",\n  \"bouncing\",\n  \"bouncy\",\n  \"bounding\",\n  \"boundless\",\n  \"bountiful\",\n  \"bovine\",\n  \"boxcar\",\n  \"boxer\",\n  \"boxing\",\n  \"boxlike\",\n  \"boxy\",\n  \"breach\",\n  \"breath\",\n  \"breeches\",\n  \"breeching\",\n  \"breeder\",\n  \"breeding\",\n  \"breeze\",\n  \"breezy\",\n  \"brethren\",\n  \"brewery\",\n  \"brewing\",\n  \"briar\",\n  \"bribe\",\n  \"brick\",\n  \"bride\",\n  \"bridged\",\n  \"brigade\",\n  \"bright\",\n  \"brilliant\",\n  \"brim\",\n  \"bring\",\n  \"brink\",\n  \"brisket\",\n  \"briskly\",\n  \"briskness\",\n  \"bristle\",\n  \"brittle\",\n  \"broadband\",\n  \"broadcast\",\n  \"broaden\",\n  \"broadly\",\n  \"broadness\",\n  \"broadside\",\n  \"broadways\",\n  \"broiler\",\n  \"broiling\",\n  \"broken\",\n  \"broker\",\n  \"bronchial\",\n  \"bronco\",\n  \"bronze\",\n  \"bronzing\",\n  \"brook\",\n  \"broom\",\n  \"brought\",\n  \"browbeat\",\n  \"brownnose\",\n  \"browse\",\n  \"browsing\",\n  \"bruising\",\n  \"brunch\",\n  \"brunette\",\n  \"brunt\",\n  \"brush\",\n  \"brussels\",\n  \"brute\",\n  \"brutishly\",\n  \"bubble\",\n  \"bubbling\",\n  \"bubbly\",\n  \"buccaneer\",\n  \"bucked\",\n  \"bucket\",\n  \"buckle\",\n  \"buckshot\",\n  \"buckskin\",\n  \"bucktooth\",\n  \"buckwheat\",\n  \"buddhism\",\n  \"buddhist\",\n  \"budding\",\n  \"buddy\",\n  \"budget\",\n  \"buffalo\",\n  \"buffed\",\n  \"buffer\",\n  \"buffing\",\n  \"buffoon\",\n  \"buggy\",\n  \"bulb\",\n  \"bulge\",\n  \"bulginess\",\n  \"bulgur\",\n  \"bulk\",\n  \"bulldog\",\n  \"bulldozer\",\n  \"bullfight\",\n  \"bullfrog\",\n  \"bullhorn\",\n  \"bullion\",\n  \"bullish\",\n  \"bullpen\",\n  \"bullring\",\n  \"bullseye\",\n  \"bullwhip\",\n  \"bully\",\n  \"bunch\",\n  \"bundle\",\n  \"bungee\",\n  \"bunion\",\n  \"bunkbed\",\n  \"bunkhouse\",\n  \"bunkmate\",\n  \"bunny\",\n  \"bunt\",\n  \"busboy\",\n  \"bush\",\n  \"busily\",\n  \"busload\",\n  \"bust\",\n  \"busybody\",\n  \"buzz\",\n  \"cabana\",\n  \"cabbage\",\n  \"cabbie\",\n  \"cabdriver\",\n  \"cable\",\n  \"caboose\",\n  \"cache\",\n  \"cackle\",\n  \"cacti\",\n  \"cactus\",\n  \"caddie\",\n  \"caddy\",\n  \"cadet\",\n  \"cadillac\",\n  \"cadmium\",\n  \"cage\",\n  \"cahoots\",\n  \"cake\",\n  \"calamari\",\n  \"calamity\",\n  \"calcium\",\n  \"calculate\",\n  \"calculus\",\n  \"caliber\",\n  \"calibrate\",\n  \"calm\",\n  \"caloric\",\n  \"calorie\",\n  \"calzone\",\n  \"camcorder\",\n  \"cameo\",\n  \"camera\",\n  \"camisole\",\n  \"camper\",\n  \"campfire\",\n  \"camping\",\n  \"campsite\",\n  \"campus\",\n  \"canal\",\n  \"canary\",\n  \"cancel\",\n  \"candied\",\n  \"candle\",\n  \"candy\",\n  \"cane\",\n  \"canine\",\n  \"canister\",\n  \"cannabis\",\n  \"canned\",\n  \"canning\",\n  \"cannon\",\n  \"cannot\",\n  \"canola\",\n  \"canon\",\n  \"canopener\",\n  \"canopy\",\n  \"canteen\",\n  \"canyon\",\n  \"capable\",\n  \"capably\",\n  \"capacity\",\n  \"cape\",\n  \"capillary\",\n  \"capital\",\n  \"capitol\",\n  \"capped\",\n  \"capricorn\",\n  \"capsize\",\n  \"capsule\",\n  \"caption\",\n  \"captivate\",\n  \"captive\",\n  \"captivity\",\n  \"capture\",\n  \"caramel\",\n  \"carat\",\n  \"caravan\",\n  \"carbon\",\n  \"cardboard\",\n  \"carded\",\n  \"cardiac\",\n  \"cardigan\",\n  \"cardinal\",\n  \"cardstock\",\n  \"carefully\",\n  \"caregiver\",\n  \"careless\",\n  \"caress\",\n  \"caretaker\",\n  \"cargo\",\n  \"caring\",\n  \"carless\",\n  \"carload\",\n  \"carmaker\",\n  \"carnage\",\n  \"carnation\",\n  \"carnival\",\n  \"carnivore\",\n  \"carol\",\n  \"carpenter\",\n  \"carpentry\",\n  \"carpool\",\n  \"carport\",\n  \"carried\",\n  \"carrot\",\n  \"carrousel\",\n  \"carry\",\n  \"cartel\",\n  \"cartload\",\n  \"carton\",\n  \"cartoon\",\n  \"cartridge\",\n  \"cartwheel\",\n  \"carve\",\n  \"carving\",\n  \"carwash\",\n  \"cascade\",\n  \"case\",\n  \"cash\",\n  \"casing\",\n  \"casino\",\n  \"casket\",\n  \"cassette\",\n  \"casually\",\n  \"casualty\",\n  \"catacomb\",\n  \"catalog\",\n  \"catalyst\",\n  \"catalyze\",\n  \"catapult\",\n  \"cataract\",\n  \"catatonic\",\n  \"catcall\",\n  \"catchable\",\n  \"catcher\",\n  \"catching\",\n  \"catchy\",\n  \"caterer\",\n  \"catering\",\n  \"catfight\",\n  \"catfish\",\n  \"cathedral\",\n  \"cathouse\",\n  \"catlike\",\n  \"catnap\",\n  \"catnip\",\n  \"catsup\",\n  \"cattail\",\n  \"cattishly\",\n  \"cattle\",\n  \"catty\",\n  \"catwalk\",\n  \"caucasian\",\n  \"caucus\",\n  \"causal\",\n  \"causation\",\n  \"cause\",\n  \"causing\",\n  \"cauterize\",\n  \"caution\",\n  \"cautious\",\n  \"cavalier\",\n  \"cavalry\",\n  \"caviar\",\n  \"cavity\",\n  \"cedar\",\n  \"celery\",\n  \"celestial\",\n  \"celibacy\",\n  \"celibate\",\n  \"celtic\",\n  \"cement\",\n  \"census\",\n  \"ceramics\",\n  \"ceremony\",\n  \"certainly\",\n  \"certainty\",\n  \"certified\",\n  \"certify\",\n  \"cesarean\",\n  \"cesspool\",\n  \"chafe\",\n  \"chaffing\",\n  \"chain\",\n  \"chair\",\n  \"chalice\",\n  \"challenge\",\n  \"chamber\",\n  \"chamomile\",\n  \"champion\",\n  \"chance\",\n  \"change\",\n  \"channel\",\n  \"chant\",\n  \"chaos\",\n  \"chaperone\",\n  \"chaplain\",\n  \"chapped\",\n  \"chaps\",\n  \"chapter\",\n  \"character\",\n  \"charbroil\",\n  \"charcoal\",\n  \"charger\",\n  \"charging\",\n  \"chariot\",\n  \"charity\",\n  \"charm\",\n  \"charred\",\n  \"charter\",\n  \"charting\",\n  \"chase\",\n  \"chasing\",\n  \"chaste\",\n  \"chastise\",\n  \"chastity\",\n  \"chatroom\",\n  \"chatter\",\n  \"chatting\",\n  \"chatty\",\n  \"cheating\",\n  \"cheddar\",\n  \"cheek\",\n  \"cheer\",\n  \"cheese\",\n  \"cheesy\",\n  \"chef\",\n  \"chemicals\",\n  \"chemist\",\n  \"chemo\",\n  \"cherisher\",\n  \"cherub\",\n  \"chess\",\n  \"chest\",\n  \"chevron\",\n  \"chevy\",\n  \"chewable\",\n  \"chewer\",\n  \"chewing\",\n  \"chewy\",\n  \"chief\",\n  \"chihuahua\",\n  \"childcare\",\n  \"childhood\",\n  \"childish\",\n  \"childless\",\n  \"childlike\",\n  \"chili\",\n  \"chill\",\n  \"chimp\",\n  \"chip\",\n  \"chirping\",\n  \"chirpy\",\n  \"chitchat\",\n  \"chivalry\",\n  \"chive\",\n  \"chloride\",\n  \"chlorine\",\n  \"choice\",\n  \"chokehold\",\n  \"choking\",\n  \"chomp\",\n  \"chooser\",\n  \"choosing\",\n  \"choosy\",\n  \"chop\",\n  \"chosen\",\n  \"chowder\",\n  \"chowtime\",\n  \"chrome\",\n  \"chubby\",\n  \"chuck\",\n  \"chug\",\n  \"chummy\",\n  \"chump\",\n  \"chunk\",\n  \"churn\",\n  \"chute\",\n  \"cider\",\n  \"cilantro\",\n  \"cinch\",\n  \"cinema\",\n  \"cinnamon\",\n  \"circle\",\n  \"circling\",\n  \"circular\",\n  \"circulate\",\n  \"circus\",\n  \"citable\",\n  \"citadel\",\n  \"citation\",\n  \"citizen\",\n  \"citric\",\n  \"citrus\",\n  \"city\",\n  \"civic\",\n  \"civil\",\n  \"clad\",\n  \"claim\",\n  \"clambake\",\n  \"clammy\",\n  \"clamor\",\n  \"clamp\",\n  \"clamshell\",\n  \"clang\",\n  \"clanking\",\n  \"clapped\",\n  \"clapper\",\n  \"clapping\",\n  \"clarify\",\n  \"clarinet\",\n  \"clarity\",\n  \"clash\",\n  \"clasp\",\n  \"class\",\n  \"clatter\",\n  \"clause\",\n  \"clavicle\",\n  \"claw\",\n  \"clay\",\n  \"clean\",\n  \"clear\",\n  \"cleat\",\n  \"cleaver\",\n  \"cleft\",\n  \"clench\",\n  \"clergyman\",\n  \"clerical\",\n  \"clerk\",\n  \"clever\",\n  \"clicker\",\n  \"client\",\n  \"climate\",\n  \"climatic\",\n  \"cling\",\n  \"clinic\",\n  \"clinking\",\n  \"clip\",\n  \"clique\",\n  \"cloak\",\n  \"clobber\",\n  \"clock\",\n  \"clone\",\n  \"cloning\",\n  \"closable\",\n  \"closure\",\n  \"clothes\",\n  \"clothing\",\n  \"cloud\",\n  \"clover\",\n  \"clubbed\",\n  \"clubbing\",\n  \"clubhouse\",\n  \"clump\",\n  \"clumsily\",\n  \"clumsy\",\n  \"clunky\",\n  \"clustered\",\n  \"clutch\",\n  \"clutter\",\n  \"coach\",\n  \"coagulant\",\n  \"coastal\",\n  \"coaster\",\n  \"coasting\",\n  \"coastland\",\n  \"coastline\",\n  \"coat\",\n  \"coauthor\",\n  \"cobalt\",\n  \"cobbler\",\n  \"cobweb\",\n  \"cocoa\",\n  \"coconut\",\n  \"cod\",\n  \"coeditor\",\n  \"coerce\",\n  \"coexist\",\n  \"coffee\",\n  \"cofounder\",\n  \"cognition\",\n  \"cognitive\",\n  \"cogwheel\",\n  \"coherence\",\n  \"coherent\",\n  \"cohesive\",\n  \"coil\",\n  \"coke\",\n  \"cola\",\n  \"cold\",\n  \"coleslaw\",\n  \"coliseum\",\n  \"collage\",\n  \"collapse\",\n  \"collar\",\n  \"collected\",\n  \"collector\",\n  \"collide\",\n  \"collie\",\n  \"collision\",\n  \"colonial\",\n  \"colonist\",\n  \"colonize\",\n  \"colony\",\n  \"colossal\",\n  \"colt\",\n  \"coma\",\n  \"come\",\n  \"comfort\",\n  \"comfy\",\n  \"comic\",\n  \"coming\",\n  \"comma\",\n  \"commence\",\n  \"commend\",\n  \"comment\",\n  \"commerce\",\n  \"commode\",\n  \"commodity\",\n  \"commodore\",\n  \"common\",\n  \"commotion\",\n  \"commute\",\n  \"commuting\",\n  \"compacted\",\n  \"compacter\",\n  \"compactly\",\n  \"compactor\",\n  \"companion\",\n  \"company\",\n  \"compare\",\n  \"compel\",\n  \"compile\",\n  \"comply\",\n  \"component\",\n  \"composed\",\n  \"composer\",\n  \"composite\",\n  \"compost\",\n  \"composure\",\n  \"compound\",\n  \"compress\",\n  \"comprised\",\n  \"computer\",\n  \"computing\",\n  \"comrade\",\n  \"concave\",\n  \"conceal\",\n  \"conceded\",\n  \"concept\",\n  \"concerned\",\n  \"concert\",\n  \"conch\",\n  \"concierge\",\n  \"concise\",\n  \"conclude\",\n  \"concrete\",\n  \"concur\",\n  \"condense\",\n  \"condiment\",\n  \"condition\",\n  \"condone\",\n  \"conducive\",\n  \"conductor\",\n  \"conduit\",\n  \"cone\",\n  \"confess\",\n  \"confetti\",\n  \"confidant\",\n  \"confident\",\n  \"confider\",\n  \"confiding\",\n  \"configure\",\n  \"confined\",\n  \"confining\",\n  \"confirm\",\n  \"conflict\",\n  \"conform\",\n  \"confound\",\n  \"confront\",\n  \"confused\",\n  \"confusing\",\n  \"confusion\",\n  \"congenial\",\n  \"congested\",\n  \"congrats\",\n  \"congress\",\n  \"conical\",\n  \"conjoined\",\n  \"conjure\",\n  \"conjuror\",\n  \"connected\",\n  \"connector\",\n  \"consensus\",\n  \"consent\",\n  \"console\",\n  \"consoling\",\n  \"consonant\",\n  \"constable\",\n  \"constant\",\n  \"constrain\",\n  \"constrict\",\n  \"construct\",\n  \"consult\",\n  \"consumer\",\n  \"consuming\",\n  \"contact\",\n  \"container\",\n  \"contempt\",\n  \"contend\",\n  \"contented\",\n  \"contently\",\n  \"contents\",\n  \"contest\",\n  \"context\",\n  \"contort\",\n  \"contour\",\n  \"contrite\",\n  \"control\",\n  \"contusion\",\n  \"convene\",\n  \"convent\",\n  \"copartner\",\n  \"cope\",\n  \"copied\",\n  \"copier\",\n  \"copilot\",\n  \"coping\",\n  \"copious\",\n  \"copper\",\n  \"copy\",\n  \"coral\",\n  \"cork\",\n  \"cornball\",\n  \"cornbread\",\n  \"corncob\",\n  \"cornea\",\n  \"corned\",\n  \"corner\",\n  \"cornfield\",\n  \"cornflake\",\n  \"cornhusk\",\n  \"cornmeal\",\n  \"cornstalk\",\n  \"corny\",\n  \"coronary\",\n  \"coroner\",\n  \"corporal\",\n  \"corporate\",\n  \"corral\",\n  \"correct\",\n  \"corridor\",\n  \"corrode\",\n  \"corroding\",\n  \"corrosive\",\n  \"corsage\",\n  \"corset\",\n  \"cortex\",\n  \"cosigner\",\n  \"cosmetics\",\n  \"cosmic\",\n  \"cosmos\",\n  \"cosponsor\",\n  \"cost\",\n  \"cottage\",\n  \"cotton\",\n  \"couch\",\n  \"cough\",\n  \"could\",\n  \"countable\",\n  \"countdown\",\n  \"counting\",\n  \"countless\",\n  \"country\",\n  \"county\",\n  \"courier\",\n  \"covenant\",\n  \"cover\",\n  \"coveted\",\n  \"coveting\",\n  \"coyness\",\n  \"cozily\",\n  \"coziness\",\n  \"cozy\",\n  \"crabbing\",\n  \"crabgrass\",\n  \"crablike\",\n  \"crabmeat\",\n  \"cradle\",\n  \"cradling\",\n  \"crafter\",\n  \"craftily\",\n  \"craftsman\",\n  \"craftwork\",\n  \"crafty\",\n  \"cramp\",\n  \"cranberry\",\n  \"crane\",\n  \"cranial\",\n  \"cranium\",\n  \"crank\",\n  \"crate\",\n  \"crave\",\n  \"craving\",\n  \"crawfish\",\n  \"crawlers\",\n  \"crawling\",\n  \"crayfish\",\n  \"crayon\",\n  \"crazed\",\n  \"crazily\",\n  \"craziness\",\n  \"crazy\",\n  \"creamed\",\n  \"creamer\",\n  \"creamlike\",\n  \"crease\",\n  \"creasing\",\n  \"creatable\",\n  \"create\",\n  \"creation\",\n  \"creative\",\n  \"creature\",\n  \"credible\",\n  \"credibly\",\n  \"credit\",\n  \"creed\",\n  \"creme\",\n  \"creole\",\n  \"crepe\",\n  \"crept\",\n  \"crescent\",\n  \"crested\",\n  \"cresting\",\n  \"crestless\",\n  \"crevice\",\n  \"crewless\",\n  \"crewman\",\n  \"crewmate\",\n  \"crib\",\n  \"cricket\",\n  \"cried\",\n  \"crier\",\n  \"crimp\",\n  \"crimson\",\n  \"cringe\",\n  \"cringing\",\n  \"crinkle\",\n  \"crinkly\",\n  \"crisped\",\n  \"crisping\",\n  \"crisply\",\n  \"crispness\",\n  \"crispy\",\n  \"criteria\",\n  \"critter\",\n  \"croak\",\n  \"crock\",\n  \"crook\",\n  \"croon\",\n  \"crop\",\n  \"cross\",\n  \"crouch\",\n  \"crouton\",\n  \"crowbar\",\n  \"crowd\",\n  \"crown\",\n  \"crucial\",\n  \"crudely\",\n  \"crudeness\",\n  \"cruelly\",\n  \"cruelness\",\n  \"cruelty\",\n  \"crumb\",\n  \"crummiest\",\n  \"crummy\",\n  \"crumpet\",\n  \"crumpled\",\n  \"cruncher\",\n  \"crunching\",\n  \"crunchy\",\n  \"crusader\",\n  \"crushable\",\n  \"crushed\",\n  \"crusher\",\n  \"crushing\",\n  \"crust\",\n  \"crux\",\n  \"crying\",\n  \"cryptic\",\n  \"crystal\",\n  \"cubbyhole\",\n  \"cube\",\n  \"cubical\",\n  \"cubicle\",\n  \"cucumber\",\n  \"cuddle\",\n  \"cuddly\",\n  \"cufflink\",\n  \"culinary\",\n  \"culminate\",\n  \"culpable\",\n  \"culprit\",\n  \"cultivate\",\n  \"cultural\",\n  \"culture\",\n  \"cupbearer\",\n  \"cupcake\",\n  \"cupid\",\n  \"cupped\",\n  \"cupping\",\n  \"curable\",\n  \"curator\",\n  \"curdle\",\n  \"cure\",\n  \"curfew\",\n  \"curing\",\n  \"curled\",\n  \"curler\",\n  \"curliness\",\n  \"curling\",\n  \"curly\",\n  \"curry\",\n  \"curse\",\n  \"cursive\",\n  \"cursor\",\n  \"curtain\",\n  \"curtly\",\n  \"curtsy\",\n  \"curvature\",\n  \"curve\",\n  \"curvy\",\n  \"cushy\",\n  \"cusp\",\n  \"cussed\",\n  \"custard\",\n  \"custodian\",\n  \"custody\",\n  \"customary\",\n  \"customer\",\n  \"customize\",\n  \"customs\",\n  \"cut\",\n  \"cycle\",\n  \"cyclic\",\n  \"cycling\",\n  \"cyclist\",\n  \"cylinder\",\n  \"cymbal\",\n  \"cytoplasm\",\n  \"cytoplast\",\n  \"dab\",\n  \"dad\",\n  \"daffodil\",\n  \"dagger\",\n  \"daily\",\n  \"daintily\",\n  \"dainty\",\n  \"dairy\",\n  \"daisy\",\n  \"dallying\",\n  \"dance\",\n  \"dancing\",\n  \"dandelion\",\n  \"dander\",\n  \"dandruff\",\n  \"dandy\",\n  \"danger\",\n  \"dangle\",\n  \"dangling\",\n  \"daredevil\",\n  \"dares\",\n  \"daringly\",\n  \"darkened\",\n  \"darkening\",\n  \"darkish\",\n  \"darkness\",\n  \"darkroom\",\n  \"darling\",\n  \"darn\",\n  \"dart\",\n  \"darwinism\",\n  \"dash\",\n  \"dastardly\",\n  \"data\",\n  \"datebook\",\n  \"dating\",\n  \"daughter\",\n  \"daunting\",\n  \"dawdler\",\n  \"dawn\",\n  \"daybed\",\n  \"daybreak\",\n  \"daycare\",\n  \"daydream\",\n  \"daylight\",\n  \"daylong\",\n  \"dayroom\",\n  \"daytime\",\n  \"dazzler\",\n  \"dazzling\",\n  \"deacon\",\n  \"deafening\",\n  \"deafness\",\n  \"dealer\",\n  \"dealing\",\n  \"dealmaker\",\n  \"dealt\",\n  \"dean\",\n  \"debatable\",\n  \"debate\",\n  \"debating\",\n  \"debit\",\n  \"debrief\",\n  \"debtless\",\n  \"debtor\",\n  \"debug\",\n  \"debunk\",\n  \"decade\",\n  \"decaf\",\n  \"decal\",\n  \"decathlon\",\n  \"decay\",\n  \"deceased\",\n  \"deceit\",\n  \"deceiver\",\n  \"deceiving\",\n  \"december\",\n  \"decency\",\n  \"decent\",\n  \"deception\",\n  \"deceptive\",\n  \"decibel\",\n  \"decidable\",\n  \"decimal\",\n  \"decimeter\",\n  \"decipher\",\n  \"deck\",\n  \"declared\",\n  \"decline\",\n  \"decode\",\n  \"decompose\",\n  \"decorated\",\n  \"decorator\",\n  \"decoy\",\n  \"decrease\",\n  \"decree\",\n  \"dedicate\",\n  \"dedicator\",\n  \"deduce\",\n  \"deduct\",\n  \"deed\",\n  \"deem\",\n  \"deepen\",\n  \"deeply\",\n  \"deepness\",\n  \"deface\",\n  \"defacing\",\n  \"defame\",\n  \"default\",\n  \"defeat\",\n  \"defection\",\n  \"defective\",\n  \"defendant\",\n  \"defender\",\n  \"defense\",\n  \"defensive\",\n  \"deferral\",\n  \"deferred\",\n  \"defiance\",\n  \"defiant\",\n  \"defile\",\n  \"defiling\",\n  \"define\",\n  \"definite\",\n  \"deflate\",\n  \"deflation\",\n  \"deflator\",\n  \"deflected\",\n  \"deflector\",\n  \"defog\",\n  \"deforest\",\n  \"defraud\",\n  \"defrost\",\n  \"deftly\",\n  \"defuse\",\n  \"defy\",\n  \"degraded\",\n  \"degrading\",\n  \"degrease\",\n  \"degree\",\n  \"dehydrate\",\n  \"deity\",\n  \"dejected\",\n  \"delay\",\n  \"delegate\",\n  \"delegator\",\n  \"delete\",\n  \"deletion\",\n  \"delicacy\",\n  \"delicate\",\n  \"delicious\",\n  \"delighted\",\n  \"delirious\",\n  \"delirium\",\n  \"deliverer\",\n  \"delivery\",\n  \"delouse\",\n  \"delta\",\n  \"deluge\",\n  \"delusion\",\n  \"deluxe\",\n  \"demanding\",\n  \"demeaning\",\n  \"demeanor\",\n  \"demise\",\n  \"democracy\",\n  \"democrat\",\n  \"demote\",\n  \"demotion\",\n  \"demystify\",\n  \"denatured\",\n  \"deniable\",\n  \"denial\",\n  \"denim\",\n  \"denote\",\n  \"dense\",\n  \"density\",\n  \"dental\",\n  \"dentist\",\n  \"denture\",\n  \"deny\",\n  \"deodorant\",\n  \"deodorize\",\n  \"departed\",\n  \"departure\",\n  \"depict\",\n  \"deplete\",\n  \"depletion\",\n  \"deplored\",\n  \"deploy\",\n  \"deport\",\n  \"depose\",\n  \"depraved\",\n  \"depravity\",\n  \"deprecate\",\n  \"depress\",\n  \"deprive\",\n  \"depth\",\n  \"deputize\",\n  \"deputy\",\n  \"derail\",\n  \"deranged\",\n  \"derby\",\n  \"derived\",\n  \"desecrate\",\n  \"deserve\",\n  \"deserving\",\n  \"designate\",\n  \"designed\",\n  \"designer\",\n  \"designing\",\n  \"deskbound\",\n  \"desktop\",\n  \"deskwork\",\n  \"desolate\",\n  \"despair\",\n  \"despise\",\n  \"despite\",\n  \"destiny\",\n  \"destitute\",\n  \"destruct\",\n  \"detached\",\n  \"detail\",\n  \"detection\",\n  \"detective\",\n  \"detector\",\n  \"detention\",\n  \"detergent\",\n  \"detest\",\n  \"detonate\",\n  \"detonator\",\n  \"detoxify\",\n  \"detract\",\n  \"deuce\",\n  \"devalue\",\n  \"deviancy\",\n  \"deviant\",\n  \"deviate\",\n  \"deviation\",\n  \"deviator\",\n  \"device\",\n  \"devious\",\n  \"devotedly\",\n  \"devotee\",\n  \"devotion\",\n  \"devourer\",\n  \"devouring\",\n  \"devoutly\",\n  \"dexterity\",\n  \"dexterous\",\n  \"diabetes\",\n  \"diabetic\",\n  \"diabolic\",\n  \"diagnoses\",\n  \"diagnosis\",\n  \"diagram\",\n  \"dial\",\n  \"diameter\",\n  \"diaper\",\n  \"diaphragm\",\n  \"diary\",\n  \"dice\",\n  \"dicing\",\n  \"dictate\",\n  \"dictation\",\n  \"dictator\",\n  \"difficult\",\n  \"diffused\",\n  \"diffuser\",\n  \"diffusion\",\n  \"diffusive\",\n  \"dig\",\n  \"dilation\",\n  \"diligence\",\n  \"diligent\",\n  \"dill\",\n  \"dilute\",\n  \"dime\",\n  \"diminish\",\n  \"dimly\",\n  \"dimmed\",\n  \"dimmer\",\n  \"dimness\",\n  \"dimple\",\n  \"diner\",\n  \"dingbat\",\n  \"dinghy\",\n  \"dinginess\",\n  \"dingo\",\n  \"dingy\",\n  \"dining\",\n  \"dinner\",\n  \"diocese\",\n  \"dioxide\",\n  \"diploma\",\n  \"dipped\",\n  \"dipper\",\n  \"dipping\",\n  \"directed\",\n  \"direction\",\n  \"directive\",\n  \"directly\",\n  \"directory\",\n  \"direness\",\n  \"dirtiness\",\n  \"disabled\",\n  \"disagree\",\n  \"disallow\",\n  \"disarm\",\n  \"disarray\",\n  \"disaster\",\n  \"disband\",\n  \"disbelief\",\n  \"disburse\",\n  \"discard\",\n  \"discern\",\n  \"discharge\",\n  \"disclose\",\n  \"discolor\",\n  \"discount\",\n  \"discourse\",\n  \"discover\",\n  \"discuss\",\n  \"disdain\",\n  \"disengage\",\n  \"disfigure\",\n  \"disgrace\",\n  \"dish\",\n  \"disinfect\",\n  \"disjoin\",\n  \"disk\",\n  \"dislike\",\n  \"disliking\",\n  \"dislocate\",\n  \"dislodge\",\n  \"disloyal\",\n  \"dismantle\",\n  \"dismay\",\n  \"dismiss\",\n  \"dismount\",\n  \"disobey\",\n  \"disorder\",\n  \"disown\",\n  \"disparate\",\n  \"disparity\",\n  \"dispatch\",\n  \"dispense\",\n  \"dispersal\",\n  \"dispersed\",\n  \"disperser\",\n  \"displace\",\n  \"display\",\n  \"displease\",\n  \"disposal\",\n  \"dispose\",\n  \"disprove\",\n  \"dispute\",\n  \"disregard\",\n  \"disrupt\",\n  \"dissuade\",\n  \"distance\",\n  \"distant\",\n  \"distaste\",\n  \"distill\",\n  \"distinct\",\n  \"distort\",\n  \"distract\",\n  \"distress\",\n  \"district\",\n  \"distrust\",\n  \"ditch\",\n  \"ditto\",\n  \"ditzy\",\n  \"dividable\",\n  \"divided\",\n  \"dividend\",\n  \"dividers\",\n  \"dividing\",\n  \"divinely\",\n  \"diving\",\n  \"divinity\",\n  \"divisible\",\n  \"divisibly\",\n  \"division\",\n  \"divisive\",\n  \"divorcee\",\n  \"dizziness\",\n  \"dizzy\",\n  \"doable\",\n  \"docile\",\n  \"dock\",\n  \"doctrine\",\n  \"document\",\n  \"dodge\",\n  \"dodgy\",\n  \"doily\",\n  \"doing\",\n  \"dole\",\n  \"dollar\",\n  \"dollhouse\",\n  \"dollop\",\n  \"dolly\",\n  \"dolphin\",\n  \"domain\",\n  \"domelike\",\n  \"domestic\",\n  \"dominion\",\n  \"dominoes\",\n  \"donated\",\n  \"donation\",\n  \"donator\",\n  \"donor\",\n  \"donut\",\n  \"doodle\",\n  \"doorbell\",\n  \"doorframe\",\n  \"doorknob\",\n  \"doorman\",\n  \"doormat\",\n  \"doornail\",\n  \"doorpost\",\n  \"doorstep\",\n  \"doorstop\",\n  \"doorway\",\n  \"doozy\",\n  \"dork\",\n  \"dormitory\",\n  \"dorsal\",\n  \"dosage\",\n  \"dose\",\n  \"dotted\",\n  \"doubling\",\n  \"douche\",\n  \"dove\",\n  \"down\",\n  \"dowry\",\n  \"doze\",\n  \"drab\",\n  \"dragging\",\n  \"dragonfly\",\n  \"dragonish\",\n  \"dragster\",\n  \"drainable\",\n  \"drainage\",\n  \"drained\",\n  \"drainer\",\n  \"drainpipe\",\n  \"dramatic\",\n  \"dramatize\",\n  \"drank\",\n  \"drapery\",\n  \"drastic\",\n  \"draw\",\n  \"dreaded\",\n  \"dreadful\",\n  \"dreadlock\",\n  \"dreamboat\",\n  \"dreamily\",\n  \"dreamland\",\n  \"dreamless\",\n  \"dreamlike\",\n  \"dreamt\",\n  \"dreamy\",\n  \"drearily\",\n  \"dreary\",\n  \"drench\",\n  \"dress\",\n  \"drew\",\n  \"dribble\",\n  \"dried\",\n  \"drier\",\n  \"drift\",\n  \"driller\",\n  \"drilling\",\n  \"drinkable\",\n  \"drinking\",\n  \"dripping\",\n  \"drippy\",\n  \"drivable\",\n  \"driven\",\n  \"driver\",\n  \"driveway\",\n  \"driving\",\n  \"drizzle\",\n  \"drizzly\",\n  \"drone\",\n  \"drool\",\n  \"droop\",\n  \"drop-down\",\n  \"dropbox\",\n  \"dropkick\",\n  \"droplet\",\n  \"dropout\",\n  \"dropper\",\n  \"drove\",\n  \"drown\",\n  \"drowsily\",\n  \"drudge\",\n  \"drum\",\n  \"dry\",\n  \"dubbed\",\n  \"dubiously\",\n  \"duchess\",\n  \"duckbill\",\n  \"ducking\",\n  \"duckling\",\n  \"ducktail\",\n  \"ducky\",\n  \"duct\",\n  \"dude\",\n  \"duffel\",\n  \"dugout\",\n  \"duh\",\n  \"duke\",\n  \"duller\",\n  \"dullness\",\n  \"duly\",\n  \"dumping\",\n  \"dumpling\",\n  \"dumpster\",\n  \"duo\",\n  \"dupe\",\n  \"duplex\",\n  \"duplicate\",\n  \"duplicity\",\n  \"durable\",\n  \"durably\",\n  \"duration\",\n  \"duress\",\n  \"during\",\n  \"dusk\",\n  \"dust\",\n  \"dutiful\",\n  \"duty\",\n  \"duvet\",\n  \"dwarf\",\n  \"dweeb\",\n  \"dwelled\",\n  \"dweller\",\n  \"dwelling\",\n  \"dwindle\",\n  \"dwindling\",\n  \"dynamic\",\n  \"dynamite\",\n  \"dynasty\",\n  \"dyslexia\",\n  \"dyslexic\",\n  \"each\",\n  \"eagle\",\n  \"earache\",\n  \"eardrum\",\n  \"earflap\",\n  \"earful\",\n  \"earlobe\",\n  \"early\",\n  \"earmark\",\n  \"earmuff\",\n  \"earphone\",\n  \"earpiece\",\n  \"earplugs\",\n  \"earring\",\n  \"earshot\",\n  \"earthen\",\n  \"earthlike\",\n  \"earthling\",\n  \"earthly\",\n  \"earthworm\",\n  \"earthy\",\n  \"earwig\",\n  \"easeful\",\n  \"easel\",\n  \"easiest\",\n  \"easily\",\n  \"easiness\",\n  \"easing\",\n  \"eastbound\",\n  \"eastcoast\",\n  \"easter\",\n  \"eastward\",\n  \"eatable\",\n  \"eaten\",\n  \"eatery\",\n  \"eating\",\n  \"eats\",\n  \"ebay\",\n  \"ebony\",\n  \"ebook\",\n  \"ecard\",\n  \"eccentric\",\n  \"echo\",\n  \"eclair\",\n  \"eclipse\",\n  \"ecologist\",\n  \"ecology\",\n  \"economic\",\n  \"economist\",\n  \"economy\",\n  \"ecosphere\",\n  \"ecosystem\",\n  \"edge\",\n  \"edginess\",\n  \"edging\",\n  \"edgy\",\n  \"edition\",\n  \"editor\",\n  \"educated\",\n  \"education\",\n  \"educator\",\n  \"eel\",\n  \"effective\",\n  \"effects\",\n  \"efficient\",\n  \"effort\",\n  \"eggbeater\",\n  \"egging\",\n  \"eggnog\",\n  \"eggplant\",\n  \"eggshell\",\n  \"egomaniac\",\n  \"egotism\",\n  \"egotistic\",\n  \"either\",\n  \"eject\",\n  \"elaborate\",\n  \"elastic\",\n  \"elated\",\n  \"elbow\",\n  \"eldercare\",\n  \"elderly\",\n  \"eldest\",\n  \"electable\",\n  \"election\",\n  \"elective\",\n  \"elephant\",\n  \"elevate\",\n  \"elevating\",\n  \"elevation\",\n  \"elevator\",\n  \"eleven\",\n  \"elf\",\n  \"eligible\",\n  \"eligibly\",\n  \"eliminate\",\n  \"elite\",\n  \"elitism\",\n  \"elixir\",\n  \"elk\",\n  \"ellipse\",\n  \"elliptic\",\n  \"elm\",\n  \"elongated\",\n  \"elope\",\n  \"eloquence\",\n  \"eloquent\",\n  \"elsewhere\",\n  \"elude\",\n  \"elusive\",\n  \"elves\",\n  \"email\",\n  \"embargo\",\n  \"embark\",\n  \"embassy\",\n  \"embattled\",\n  \"embellish\",\n  \"ember\",\n  \"embezzle\",\n  \"emblaze\",\n  \"emblem\",\n  \"embody\",\n  \"embolism\",\n  \"emboss\",\n  \"embroider\",\n  \"emcee\",\n  \"emerald\",\n  \"emergency\",\n  \"emission\",\n  \"emit\",\n  \"emote\",\n  \"emoticon\",\n  \"emotion\",\n  \"empathic\",\n  \"empathy\",\n  \"emperor\",\n  \"emphases\",\n  \"emphasis\",\n  \"emphasize\",\n  \"emphatic\",\n  \"empirical\",\n  \"employed\",\n  \"employee\",\n  \"employer\",\n  \"emporium\",\n  \"empower\",\n  \"emptier\",\n  \"emptiness\",\n  \"empty\",\n  \"emu\",\n  \"enable\",\n  \"enactment\",\n  \"enamel\",\n  \"enchanted\",\n  \"enchilada\",\n  \"encircle\",\n  \"enclose\",\n  \"enclosure\",\n  \"encode\",\n  \"encore\",\n  \"encounter\",\n  \"encourage\",\n  \"encroach\",\n  \"encrust\",\n  \"encrypt\",\n  \"endanger\",\n  \"endeared\",\n  \"endearing\",\n  \"ended\",\n  \"ending\",\n  \"endless\",\n  \"endnote\",\n  \"endocrine\",\n  \"endorphin\",\n  \"endorse\",\n  \"endowment\",\n  \"endpoint\",\n  \"endurable\",\n  \"endurance\",\n  \"enduring\",\n  \"energetic\",\n  \"energize\",\n  \"energy\",\n  \"enforced\",\n  \"enforcer\",\n  \"engaged\",\n  \"engaging\",\n  \"engine\",\n  \"engorge\",\n  \"engraved\",\n  \"engraver\",\n  \"engraving\",\n  \"engross\",\n  \"engulf\",\n  \"enhance\",\n  \"enigmatic\",\n  \"enjoyable\",\n  \"enjoyably\",\n  \"enjoyer\",\n  \"enjoying\",\n  \"enjoyment\",\n  \"enlarged\",\n  \"enlarging\",\n  \"enlighten\",\n  \"enlisted\",\n  \"enquirer\",\n  \"enrage\",\n  \"enrich\",\n  \"enroll\",\n  \"enslave\",\n  \"ensnare\",\n  \"ensure\",\n  \"entail\",\n  \"entangled\",\n  \"entering\",\n  \"entertain\",\n  \"enticing\",\n  \"entire\",\n  \"entitle\",\n  \"entity\",\n  \"entomb\",\n  \"entourage\",\n  \"entrap\",\n  \"entree\",\n  \"entrench\",\n  \"entrust\",\n  \"entryway\",\n  \"entwine\",\n  \"enunciate\",\n  \"envelope\",\n  \"enviable\",\n  \"enviably\",\n  \"envious\",\n  \"envision\",\n  \"envoy\",\n  \"envy\",\n  \"enzyme\",\n  \"epic\",\n  \"epidemic\",\n  \"epidermal\",\n  \"epidermis\",\n  \"epidural\",\n  \"epilepsy\",\n  \"epileptic\",\n  \"epilogue\",\n  \"epiphany\",\n  \"episode\",\n  \"equal\",\n  \"equate\",\n  \"equation\",\n  \"equator\",\n  \"equinox\",\n  \"equipment\",\n  \"equity\",\n  \"equivocal\",\n  \"eradicate\",\n  \"erasable\",\n  \"erased\",\n  \"eraser\",\n  \"erasure\",\n  \"ergonomic\",\n  \"errand\",\n  \"errant\",\n  \"erratic\",\n  \"error\",\n  \"erupt\",\n  \"escalate\",\n  \"escalator\",\n  \"escapable\",\n  \"escapade\",\n  \"escapist\",\n  \"escargot\",\n  \"eskimo\",\n  \"esophagus\",\n  \"espionage\",\n  \"espresso\",\n  \"esquire\",\n  \"essay\",\n  \"essence\",\n  \"essential\",\n  \"establish\",\n  \"estate\",\n  \"esteemed\",\n  \"estimate\",\n  \"estimator\",\n  \"estranged\",\n  \"estrogen\",\n  \"etching\",\n  \"eternal\",\n  \"eternity\",\n  \"ethanol\",\n  \"ether\",\n  \"ethically\",\n  \"ethics\",\n  \"euphemism\",\n  \"evacuate\",\n  \"evacuee\",\n  \"evade\",\n  \"evaluate\",\n  \"evaluator\",\n  \"evaporate\",\n  \"evasion\",\n  \"evasive\",\n  \"even\",\n  \"everglade\",\n  \"evergreen\",\n  \"everybody\",\n  \"everyday\",\n  \"everyone\",\n  \"evict\",\n  \"evidence\",\n  \"evident\",\n  \"evil\",\n  \"evoke\",\n  \"evolution\",\n  \"evolve\",\n  \"exact\",\n  \"exalted\",\n  \"example\",\n  \"excavate\",\n  \"excavator\",\n  \"exceeding\",\n  \"exception\",\n  \"excess\",\n  \"exchange\",\n  \"excitable\",\n  \"exciting\",\n  \"exclaim\",\n  \"exclude\",\n  \"excluding\",\n  \"exclusion\",\n  \"exclusive\",\n  \"excretion\",\n  \"excretory\",\n  \"excursion\",\n  \"excusable\",\n  \"excusably\",\n  \"excuse\",\n  \"exemplary\",\n  \"exemplify\",\n  \"exemption\",\n  \"exerciser\",\n  \"exert\",\n  \"exes\",\n  \"exfoliate\",\n  \"exhale\",\n  \"exhaust\",\n  \"exhume\",\n  \"exile\",\n  \"existing\",\n  \"exit\",\n  \"exodus\",\n  \"exonerate\",\n  \"exorcism\",\n  \"exorcist\",\n  \"expand\",\n  \"expanse\",\n  \"expansion\",\n  \"expansive\",\n  \"expectant\",\n  \"expedited\",\n  \"expediter\",\n  \"expel\",\n  \"expend\",\n  \"expenses\",\n  \"expensive\",\n  \"expert\",\n  \"expire\",\n  \"expiring\",\n  \"explain\",\n  \"expletive\",\n  \"explicit\",\n  \"explode\",\n  \"exploit\",\n  \"explore\",\n  \"exploring\",\n  \"exponent\",\n  \"exporter\",\n  \"exposable\",\n  \"expose\",\n  \"exposure\",\n  \"express\",\n  \"expulsion\",\n  \"exquisite\",\n  \"extended\",\n  \"extending\",\n  \"extent\",\n  \"extenuate\",\n  \"exterior\",\n  \"external\",\n  \"extinct\",\n  \"extortion\",\n  \"extradite\",\n  \"extras\",\n  \"extrovert\",\n  \"extrude\",\n  \"extruding\",\n  \"exuberant\",\n  \"fable\",\n  \"fabric\",\n  \"fabulous\",\n  \"facebook\",\n  \"facecloth\",\n  \"facedown\",\n  \"faceless\",\n  \"facelift\",\n  \"faceplate\",\n  \"faceted\",\n  \"facial\",\n  \"facility\",\n  \"facing\",\n  \"facsimile\",\n  \"faction\",\n  \"factoid\",\n  \"factor\",\n  \"factsheet\",\n  \"factual\",\n  \"faculty\",\n  \"fade\",\n  \"fading\",\n  \"failing\",\n  \"falcon\",\n  \"fall\",\n  \"false\",\n  \"falsify\",\n  \"fame\",\n  \"familiar\",\n  \"family\",\n  \"famine\",\n  \"famished\",\n  \"fanatic\",\n  \"fancied\",\n  \"fanciness\",\n  \"fancy\",\n  \"fanfare\",\n  \"fang\",\n  \"fanning\",\n  \"fantasize\",\n  \"fantastic\",\n  \"fantasy\",\n  \"fascism\",\n  \"fastball\",\n  \"faster\",\n  \"fasting\",\n  \"fastness\",\n  \"faucet\",\n  \"favorable\",\n  \"favorably\",\n  \"favored\",\n  \"favoring\",\n  \"favorite\",\n  \"fax\",\n  \"feast\",\n  \"federal\",\n  \"fedora\",\n  \"feeble\",\n  \"feed\",\n  \"feel\",\n  \"feisty\",\n  \"feline\",\n  \"felt-tip\",\n  \"feminine\",\n  \"feminism\",\n  \"feminist\",\n  \"feminize\",\n  \"femur\",\n  \"fence\",\n  \"fencing\",\n  \"fender\",\n  \"ferment\",\n  \"fernlike\",\n  \"ferocious\",\n  \"ferocity\",\n  \"ferret\",\n  \"ferris\",\n  \"ferry\",\n  \"fervor\",\n  \"fester\",\n  \"festival\",\n  \"festive\",\n  \"festivity\",\n  \"fetal\",\n  \"fetch\",\n  \"fever\",\n  \"fiber\",\n  \"fiction\",\n  \"fiddle\",\n  \"fiddling\",\n  \"fidelity\",\n  \"fidgeting\",\n  \"fidgety\",\n  \"fifteen\",\n  \"fifth\",\n  \"fiftieth\",\n  \"fifty\",\n  \"figment\",\n  \"figure\",\n  \"figurine\",\n  \"filing\",\n  \"filled\",\n  \"filler\",\n  \"filling\",\n  \"film\",\n  \"filter\",\n  \"filth\",\n  \"filtrate\",\n  \"finale\",\n  \"finalist\",\n  \"finalize\",\n  \"finally\",\n  \"finance\",\n  \"financial\",\n  \"finch\",\n  \"fineness\",\n  \"finer\",\n  \"finicky\",\n  \"finished\",\n  \"finisher\",\n  \"finishing\",\n  \"finite\",\n  \"finless\",\n  \"finlike\",\n  \"fiscally\",\n  \"fit\",\n  \"five\",\n  \"flaccid\",\n  \"flagman\",\n  \"flagpole\",\n  \"flagship\",\n  \"flagstick\",\n  \"flagstone\",\n  \"flail\",\n  \"flakily\",\n  \"flaky\",\n  \"flame\",\n  \"flammable\",\n  \"flanked\",\n  \"flanking\",\n  \"flannels\",\n  \"flap\",\n  \"flaring\",\n  \"flashback\",\n  \"flashbulb\",\n  \"flashcard\",\n  \"flashily\",\n  \"flashing\",\n  \"flashy\",\n  \"flask\",\n  \"flatbed\",\n  \"flatfoot\",\n  \"flatly\",\n  \"flatness\",\n  \"flatten\",\n  \"flattered\",\n  \"flatterer\",\n  \"flattery\",\n  \"flattop\",\n  \"flatware\",\n  \"flatworm\",\n  \"flavored\",\n  \"flavorful\",\n  \"flavoring\",\n  \"flaxseed\",\n  \"fled\",\n  \"fleshed\",\n  \"fleshy\",\n  \"flick\",\n  \"flier\",\n  \"flight\",\n  \"flinch\",\n  \"fling\",\n  \"flint\",\n  \"flip\",\n  \"flirt\",\n  \"float\",\n  \"flock\",\n  \"flogging\",\n  \"flop\",\n  \"floral\",\n  \"florist\",\n  \"floss\",\n  \"flounder\",\n  \"flyable\",\n  \"flyaway\",\n  \"flyer\",\n  \"flying\",\n  \"flyover\",\n  \"flypaper\",\n  \"foam\",\n  \"foe\",\n  \"fog\",\n  \"foil\",\n  \"folic\",\n  \"folk\",\n  \"follicle\",\n  \"follow\",\n  \"fondling\",\n  \"fondly\",\n  \"fondness\",\n  \"fondue\",\n  \"font\",\n  \"food\",\n  \"fool\",\n  \"footage\",\n  \"football\",\n  \"footbath\",\n  \"footboard\",\n  \"footer\",\n  \"footgear\",\n  \"foothill\",\n  \"foothold\",\n  \"footing\",\n  \"footless\",\n  \"footman\",\n  \"footnote\",\n  \"footpad\",\n  \"footpath\",\n  \"footprint\",\n  \"footrest\",\n  \"footsie\",\n  \"footsore\",\n  \"footwear\",\n  \"footwork\",\n  \"fossil\",\n  \"foster\",\n  \"founder\",\n  \"founding\",\n  \"fountain\",\n  \"fox\",\n  \"foyer\",\n  \"fraction\",\n  \"fracture\",\n  \"fragile\",\n  \"fragility\",\n  \"fragment\",\n  \"fragrance\",\n  \"fragrant\",\n  \"frail\",\n  \"frame\",\n  \"framing\",\n  \"frantic\",\n  \"fraternal\",\n  \"frayed\",\n  \"fraying\",\n  \"frays\",\n  \"freckled\",\n  \"freckles\",\n  \"freebase\",\n  \"freebee\",\n  \"freebie\",\n  \"freedom\",\n  \"freefall\",\n  \"freehand\",\n  \"freeing\",\n  \"freeload\",\n  \"freely\",\n  \"freemason\",\n  \"freeness\",\n  \"freestyle\",\n  \"freeware\",\n  \"freeway\",\n  \"freewill\",\n  \"freezable\",\n  \"freezing\",\n  \"freight\",\n  \"french\",\n  \"frenzied\",\n  \"frenzy\",\n  \"frequency\",\n  \"frequent\",\n  \"fresh\",\n  \"fretful\",\n  \"fretted\",\n  \"friction\",\n  \"friday\",\n  \"fridge\",\n  \"fried\",\n  \"friend\",\n  \"frighten\",\n  \"frightful\",\n  \"frigidity\",\n  \"frigidly\",\n  \"frill\",\n  \"fringe\",\n  \"frisbee\",\n  \"frisk\",\n  \"fritter\",\n  \"frivolous\",\n  \"frolic\",\n  \"from\",\n  \"front\",\n  \"frostbite\",\n  \"frosted\",\n  \"frostily\",\n  \"frosting\",\n  \"frostlike\",\n  \"frosty\",\n  \"froth\",\n  \"frown\",\n  \"frozen\",\n  \"fructose\",\n  \"frugality\",\n  \"frugally\",\n  \"fruit\",\n  \"frustrate\",\n  \"frying\",\n  \"gab\",\n  \"gaffe\",\n  \"gag\",\n  \"gainfully\",\n  \"gaining\",\n  \"gains\",\n  \"gala\",\n  \"gallantly\",\n  \"galleria\",\n  \"gallery\",\n  \"galley\",\n  \"gallon\",\n  \"gallows\",\n  \"gallstone\",\n  \"galore\",\n  \"galvanize\",\n  \"gambling\",\n  \"game\",\n  \"gaming\",\n  \"gamma\",\n  \"gander\",\n  \"gangly\",\n  \"gangrene\",\n  \"gangway\",\n  \"gap\",\n  \"garage\",\n  \"garbage\",\n  \"garden\",\n  \"gargle\",\n  \"garland\",\n  \"garlic\",\n  \"garment\",\n  \"garnet\",\n  \"garnish\",\n  \"garter\",\n  \"gas\",\n  \"gatherer\",\n  \"gathering\",\n  \"gating\",\n  \"gauging\",\n  \"gauntlet\",\n  \"gauze\",\n  \"gave\",\n  \"gawk\",\n  \"gazing\",\n  \"gear\",\n  \"gecko\",\n  \"geek\",\n  \"geiger\",\n  \"gem\",\n  \"gender\",\n  \"generic\",\n  \"generous\",\n  \"genetics\",\n  \"genre\",\n  \"gentile\",\n  \"gentleman\",\n  \"gently\",\n  \"gents\",\n  \"geography\",\n  \"geologic\",\n  \"geologist\",\n  \"geology\",\n  \"geometric\",\n  \"geometry\",\n  \"geranium\",\n  \"gerbil\",\n  \"geriatric\",\n  \"germicide\",\n  \"germinate\",\n  \"germless\",\n  \"germproof\",\n  \"gestate\",\n  \"gestation\",\n  \"gesture\",\n  \"getaway\",\n  \"getting\",\n  \"getup\",\n  \"giant\",\n  \"gibberish\",\n  \"giblet\",\n  \"giddily\",\n  \"giddiness\",\n  \"giddy\",\n  \"gift\",\n  \"gigabyte\",\n  \"gigahertz\",\n  \"gigantic\",\n  \"giggle\",\n  \"giggling\",\n  \"giggly\",\n  \"gigolo\",\n  \"gilled\",\n  \"gills\",\n  \"gimmick\",\n  \"girdle\",\n  \"giveaway\",\n  \"given\",\n  \"giver\",\n  \"giving\",\n  \"gizmo\",\n  \"gizzard\",\n  \"glacial\",\n  \"glacier\",\n  \"glade\",\n  \"gladiator\",\n  \"gladly\",\n  \"glamorous\",\n  \"glamour\",\n  \"glance\",\n  \"glancing\",\n  \"glandular\",\n  \"glare\",\n  \"glaring\",\n  \"glass\",\n  \"glaucoma\",\n  \"glazing\",\n  \"gleaming\",\n  \"gleeful\",\n  \"glider\",\n  \"gliding\",\n  \"glimmer\",\n  \"glimpse\",\n  \"glisten\",\n  \"glitch\",\n  \"glitter\",\n  \"glitzy\",\n  \"gloater\",\n  \"gloating\",\n  \"gloomily\",\n  \"gloomy\",\n  \"glorified\",\n  \"glorifier\",\n  \"glorify\",\n  \"glorious\",\n  \"glory\",\n  \"gloss\",\n  \"glove\",\n  \"glowing\",\n  \"glowworm\",\n  \"glucose\",\n  \"glue\",\n  \"gluten\",\n  \"glutinous\",\n  \"glutton\",\n  \"gnarly\",\n  \"gnat\",\n  \"goal\",\n  \"goatskin\",\n  \"goes\",\n  \"goggles\",\n  \"going\",\n  \"goldfish\",\n  \"goldmine\",\n  \"goldsmith\",\n  \"golf\",\n  \"goliath\",\n  \"gonad\",\n  \"gondola\",\n  \"gone\",\n  \"gong\",\n  \"good\",\n  \"gooey\",\n  \"goofball\",\n  \"goofiness\",\n  \"goofy\",\n  \"google\",\n  \"goon\",\n  \"gopher\",\n  \"gore\",\n  \"gorged\",\n  \"gorgeous\",\n  \"gory\",\n  \"gosling\",\n  \"gossip\",\n  \"gothic\",\n  \"gotten\",\n  \"gout\",\n  \"gown\",\n  \"grab\",\n  \"graceful\",\n  \"graceless\",\n  \"gracious\",\n  \"gradation\",\n  \"graded\",\n  \"grader\",\n  \"gradient\",\n  \"grading\",\n  \"gradually\",\n  \"graduate\",\n  \"graffiti\",\n  \"grafted\",\n  \"grafting\",\n  \"grain\",\n  \"granddad\",\n  \"grandkid\",\n  \"grandly\",\n  \"grandma\",\n  \"grandpa\",\n  \"grandson\",\n  \"granite\",\n  \"granny\",\n  \"granola\",\n  \"grant\",\n  \"granular\",\n  \"grape\",\n  \"graph\",\n  \"grapple\",\n  \"grappling\",\n  \"grasp\",\n  \"grass\",\n  \"gratified\",\n  \"gratify\",\n  \"grating\",\n  \"gratitude\",\n  \"gratuity\",\n  \"gravel\",\n  \"graveness\",\n  \"graves\",\n  \"graveyard\",\n  \"gravitate\",\n  \"gravity\",\n  \"gravy\",\n  \"gray\",\n  \"grazing\",\n  \"greasily\",\n  \"greedily\",\n  \"greedless\",\n  \"greedy\",\n  \"green\",\n  \"greeter\",\n  \"greeting\",\n  \"grew\",\n  \"greyhound\",\n  \"grid\",\n  \"grief\",\n  \"grievance\",\n  \"grieving\",\n  \"grievous\",\n  \"grill\",\n  \"grimace\",\n  \"grimacing\",\n  \"grime\",\n  \"griminess\",\n  \"grimy\",\n  \"grinch\",\n  \"grinning\",\n  \"grip\",\n  \"gristle\",\n  \"grit\",\n  \"groggily\",\n  \"groggy\",\n  \"groin\",\n  \"groom\",\n  \"groove\",\n  \"grooving\",\n  \"groovy\",\n  \"grope\",\n  \"ground\",\n  \"grouped\",\n  \"grout\",\n  \"grove\",\n  \"grower\",\n  \"growing\",\n  \"growl\",\n  \"grub\",\n  \"grudge\",\n  \"grudging\",\n  \"grueling\",\n  \"gruffly\",\n  \"grumble\",\n  \"grumbling\",\n  \"grumbly\",\n  \"grumpily\",\n  \"grunge\",\n  \"grunt\",\n  \"guacamole\",\n  \"guidable\",\n  \"guidance\",\n  \"guide\",\n  \"guiding\",\n  \"guileless\",\n  \"guise\",\n  \"gulf\",\n  \"gullible\",\n  \"gully\",\n  \"gulp\",\n  \"gumball\",\n  \"gumdrop\",\n  \"gumminess\",\n  \"gumming\",\n  \"gummy\",\n  \"gurgle\",\n  \"gurgling\",\n  \"guru\",\n  \"gush\",\n  \"gusto\",\n  \"gusty\",\n  \"gutless\",\n  \"guts\",\n  \"gutter\",\n  \"guy\",\n  \"guzzler\",\n  \"gyration\",\n  \"habitable\",\n  \"habitant\",\n  \"habitat\",\n  \"habitual\",\n  \"hacked\",\n  \"hacker\",\n  \"hacking\",\n  \"hacksaw\",\n  \"had\",\n  \"haggler\",\n  \"haiku\",\n  \"half\",\n  \"halogen\",\n  \"halt\",\n  \"halved\",\n  \"halves\",\n  \"hamburger\",\n  \"hamlet\",\n  \"hammock\",\n  \"hamper\",\n  \"hamster\",\n  \"hamstring\",\n  \"handbag\",\n  \"handball\",\n  \"handbook\",\n  \"handbrake\",\n  \"handcart\",\n  \"handclap\",\n  \"handclasp\",\n  \"handcraft\",\n  \"handcuff\",\n  \"handed\",\n  \"handful\",\n  \"handgrip\",\n  \"handgun\",\n  \"handheld\",\n  \"handiness\",\n  \"handiwork\",\n  \"handlebar\",\n  \"handled\",\n  \"handler\",\n  \"handling\",\n  \"handmade\",\n  \"handoff\",\n  \"handpick\",\n  \"handprint\",\n  \"handrail\",\n  \"handsaw\",\n  \"handset\",\n  \"handsfree\",\n  \"handshake\",\n  \"handstand\",\n  \"handwash\",\n  \"handwork\",\n  \"handwoven\",\n  \"handwrite\",\n  \"handyman\",\n  \"hangnail\",\n  \"hangout\",\n  \"hangover\",\n  \"hangup\",\n  \"hankering\",\n  \"hankie\",\n  \"hanky\",\n  \"haphazard\",\n  \"happening\",\n  \"happier\",\n  \"happiest\",\n  \"happily\",\n  \"happiness\",\n  \"happy\",\n  \"harbor\",\n  \"hardcopy\",\n  \"hardcore\",\n  \"hardcover\",\n  \"harddisk\",\n  \"hardened\",\n  \"hardener\",\n  \"hardening\",\n  \"hardhat\",\n  \"hardhead\",\n  \"hardiness\",\n  \"hardly\",\n  \"hardness\",\n  \"hardship\",\n  \"hardware\",\n  \"hardwired\",\n  \"hardwood\",\n  \"hardy\",\n  \"harmful\",\n  \"harmless\",\n  \"harmonica\",\n  \"harmonics\",\n  \"harmonize\",\n  \"harmony\",\n  \"harness\",\n  \"harpist\",\n  \"harsh\",\n  \"harvest\",\n  \"hash\",\n  \"hassle\",\n  \"haste\",\n  \"hastily\",\n  \"hastiness\",\n  \"hasty\",\n  \"hatbox\",\n  \"hatchback\",\n  \"hatchery\",\n  \"hatchet\",\n  \"hatching\",\n  \"hatchling\",\n  \"hate\",\n  \"hatless\",\n  \"hatred\",\n  \"haunt\",\n  \"haven\",\n  \"hazard\",\n  \"hazelnut\",\n  \"hazily\",\n  \"haziness\",\n  \"hazing\",\n  \"hazy\",\n  \"headache\",\n  \"headband\",\n  \"headboard\",\n  \"headcount\",\n  \"headdress\",\n  \"headed\",\n  \"header\",\n  \"headfirst\",\n  \"headgear\",\n  \"heading\",\n  \"headlamp\",\n  \"headless\",\n  \"headlock\",\n  \"headphone\",\n  \"headpiece\",\n  \"headrest\",\n  \"headroom\",\n  \"headscarf\",\n  \"headset\",\n  \"headsman\",\n  \"headstand\",\n  \"headstone\",\n  \"headway\",\n  \"headwear\",\n  \"heap\",\n  \"heat\",\n  \"heave\",\n  \"heavily\",\n  \"heaviness\",\n  \"heaving\",\n  \"hedge\",\n  \"hedging\",\n  \"heftiness\",\n  \"hefty\",\n  \"helium\",\n  \"helmet\",\n  \"helper\",\n  \"helpful\",\n  \"helping\",\n  \"helpless\",\n  \"helpline\",\n  \"hemlock\",\n  \"hemstitch\",\n  \"hence\",\n  \"henchman\",\n  \"henna\",\n  \"herald\",\n  \"herbal\",\n  \"herbicide\",\n  \"herbs\",\n  \"heritage\",\n  \"hermit\",\n  \"heroics\",\n  \"heroism\",\n  \"herring\",\n  \"herself\",\n  \"hertz\",\n  \"hesitancy\",\n  \"hesitant\",\n  \"hesitate\",\n  \"hexagon\",\n  \"hexagram\",\n  \"hubcap\",\n  \"huddle\",\n  \"huddling\",\n  \"huff\",\n  \"hug\",\n  \"hula\",\n  \"hulk\",\n  \"hull\",\n  \"human\",\n  \"humble\",\n  \"humbling\",\n  \"humbly\",\n  \"humid\",\n  \"humiliate\",\n  \"humility\",\n  \"humming\",\n  \"hummus\",\n  \"humongous\",\n  \"humorist\",\n  \"humorless\",\n  \"humorous\",\n  \"humpback\",\n  \"humped\",\n  \"humvee\",\n  \"hunchback\",\n  \"hundredth\",\n  \"hunger\",\n  \"hungrily\",\n  \"hungry\",\n  \"hunk\",\n  \"hunter\",\n  \"hunting\",\n  \"huntress\",\n  \"huntsman\",\n  \"hurdle\",\n  \"hurled\",\n  \"hurler\",\n  \"hurling\",\n  \"hurray\",\n  \"hurricane\",\n  \"hurried\",\n  \"hurry\",\n  \"hurt\",\n  \"husband\",\n  \"hush\",\n  \"husked\",\n  \"huskiness\",\n  \"hut\",\n  \"hybrid\",\n  \"hydrant\",\n  \"hydrated\",\n  \"hydration\",\n  \"hydrogen\",\n  \"hydroxide\",\n  \"hyperlink\",\n  \"hypertext\",\n  \"hyphen\",\n  \"hypnoses\",\n  \"hypnosis\",\n  \"hypnotic\",\n  \"hypnotism\",\n  \"hypnotist\",\n  \"hypnotize\",\n  \"hypocrisy\",\n  \"hypocrite\",\n  \"ibuprofen\",\n  \"ice\",\n  \"iciness\",\n  \"icing\",\n  \"icky\",\n  \"icon\",\n  \"icy\",\n  \"idealism\",\n  \"idealist\",\n  \"idealize\",\n  \"ideally\",\n  \"idealness\",\n  \"identical\",\n  \"identify\",\n  \"identity\",\n  \"ideology\",\n  \"idiocy\",\n  \"idiom\",\n  \"idly\",\n  \"igloo\",\n  \"ignition\",\n  \"ignore\",\n  \"iguana\",\n  \"illicitly\",\n  \"illusion\",\n  \"illusive\",\n  \"image\",\n  \"imaginary\",\n  \"imagines\",\n  \"imaging\",\n  \"imbecile\",\n  \"imitate\",\n  \"imitation\",\n  \"immature\",\n  \"immerse\",\n  \"immersion\",\n  \"imminent\",\n  \"immobile\",\n  \"immodest\",\n  \"immorally\",\n  \"immortal\",\n  \"immovable\",\n  \"immovably\",\n  \"immunity\",\n  \"immunize\",\n  \"impaired\",\n  \"impale\",\n  \"impart\",\n  \"impatient\",\n  \"impeach\",\n  \"impeding\",\n  \"impending\",\n  \"imperfect\",\n  \"imperial\",\n  \"impish\",\n  \"implant\",\n  \"implement\",\n  \"implicate\",\n  \"implicit\",\n  \"implode\",\n  \"implosion\",\n  \"implosive\",\n  \"imply\",\n  \"impolite\",\n  \"important\",\n  \"importer\",\n  \"impose\",\n  \"imposing\",\n  \"impotence\",\n  \"impotency\",\n  \"impotent\",\n  \"impound\",\n  \"imprecise\",\n  \"imprint\",\n  \"imprison\",\n  \"impromptu\",\n  \"improper\",\n  \"improve\",\n  \"improving\",\n  \"improvise\",\n  \"imprudent\",\n  \"impulse\",\n  \"impulsive\",\n  \"impure\",\n  \"impurity\",\n  \"iodine\",\n  \"iodize\",\n  \"ion\",\n  \"ipad\",\n  \"iphone\",\n  \"ipod\",\n  \"irate\",\n  \"irk\",\n  \"iron\",\n  \"irregular\",\n  \"irrigate\",\n  \"irritable\",\n  \"irritably\",\n  \"irritant\",\n  \"irritate\",\n  \"islamic\",\n  \"islamist\",\n  \"isolated\",\n  \"isolating\",\n  \"isolation\",\n  \"isotope\",\n  \"issue\",\n  \"issuing\",\n  \"italicize\",\n  \"italics\",\n  \"item\",\n  \"itinerary\",\n  \"itunes\",\n  \"ivory\",\n  \"ivy\",\n  \"jab\",\n  \"jackal\",\n  \"jacket\",\n  \"jackknife\",\n  \"jackpot\",\n  \"jailbird\",\n  \"jailbreak\",\n  \"jailer\",\n  \"jailhouse\",\n  \"jalapeno\",\n  \"jam\",\n  \"janitor\",\n  \"january\",\n  \"jargon\",\n  \"jarring\",\n  \"jasmine\",\n  \"jaundice\",\n  \"jaunt\",\n  \"java\",\n  \"jawed\",\n  \"jawless\",\n  \"jawline\",\n  \"jaws\",\n  \"jaybird\",\n  \"jaywalker\",\n  \"jazz\",\n  \"jeep\",\n  \"jeeringly\",\n  \"jellied\",\n  \"jelly\",\n  \"jersey\",\n  \"jester\",\n  \"jet\",\n  \"jiffy\",\n  \"jigsaw\",\n  \"jimmy\",\n  \"jingle\",\n  \"jingling\",\n  \"jinx\",\n  \"jitters\",\n  \"jittery\",\n  \"job\",\n  \"jockey\",\n  \"jockstrap\",\n  \"jogger\",\n  \"jogging\",\n  \"john\",\n  \"joining\",\n  \"jokester\",\n  \"jokingly\",\n  \"jolliness\",\n  \"jolly\",\n  \"jolt\",\n  \"jot\",\n  \"jovial\",\n  \"joyfully\",\n  \"joylessly\",\n  \"joyous\",\n  \"joyride\",\n  \"joystick\",\n  \"jubilance\",\n  \"jubilant\",\n  \"judge\",\n  \"judgingly\",\n  \"judicial\",\n  \"judiciary\",\n  \"judo\",\n  \"juggle\",\n  \"juggling\",\n  \"jugular\",\n  \"juice\",\n  \"juiciness\",\n  \"juicy\",\n  \"jujitsu\",\n  \"jukebox\",\n  \"july\",\n  \"jumble\",\n  \"jumbo\",\n  \"jump\",\n  \"junction\",\n  \"juncture\",\n  \"june\",\n  \"junior\",\n  \"juniper\",\n  \"junkie\",\n  \"junkman\",\n  \"junkyard\",\n  \"jurist\",\n  \"juror\",\n  \"jury\",\n  \"justice\",\n  \"justifier\",\n  \"justify\",\n  \"justly\",\n  \"justness\",\n  \"juvenile\",\n  \"kabob\",\n  \"kangaroo\",\n  \"karaoke\",\n  \"karate\",\n  \"karma\",\n  \"kebab\",\n  \"keenly\",\n  \"keenness\",\n  \"keep\",\n  \"keg\",\n  \"kelp\",\n  \"kennel\",\n  \"kept\",\n  \"kerchief\",\n  \"kerosene\",\n  \"kettle\",\n  \"kick\",\n  \"kiln\",\n  \"kilobyte\",\n  \"kilogram\",\n  \"kilometer\",\n  \"kilowatt\",\n  \"kilt\",\n  \"kimono\",\n  \"kindle\",\n  \"kindling\",\n  \"kindly\",\n  \"kindness\",\n  \"kindred\",\n  \"kinetic\",\n  \"kinfolk\",\n  \"king\",\n  \"kinship\",\n  \"kinsman\",\n  \"kinswoman\",\n  \"kissable\",\n  \"kisser\",\n  \"kissing\",\n  \"kitchen\",\n  \"kite\",\n  \"kitten\",\n  \"kitty\",\n  \"kiwi\",\n  \"kleenex\",\n  \"knapsack\",\n  \"knee\",\n  \"knelt\",\n  \"knickers\",\n  \"knoll\",\n  \"koala\",\n  \"kooky\",\n  \"kosher\",\n  \"krypton\",\n  \"kudos\",\n  \"kung\",\n  \"labored\",\n  \"laborer\",\n  \"laboring\",\n  \"laborious\",\n  \"labrador\",\n  \"ladder\",\n  \"ladies\",\n  \"ladle\",\n  \"ladybug\",\n  \"ladylike\",\n  \"lagged\",\n  \"lagging\",\n  \"lagoon\",\n  \"lair\",\n  \"lake\",\n  \"lance\",\n  \"landed\",\n  \"landfall\",\n  \"landfill\",\n  \"landing\",\n  \"landlady\",\n  \"landless\",\n  \"landline\",\n  \"landlord\",\n  \"landmark\",\n  \"landmass\",\n  \"landmine\",\n  \"landowner\",\n  \"landscape\",\n  \"landside\",\n  \"landslide\",\n  \"language\",\n  \"lankiness\",\n  \"lanky\",\n  \"lantern\",\n  \"lapdog\",\n  \"lapel\",\n  \"lapped\",\n  \"lapping\",\n  \"laptop\",\n  \"lard\",\n  \"large\",\n  \"lark\",\n  \"lash\",\n  \"lasso\",\n  \"last\",\n  \"latch\",\n  \"late\",\n  \"lather\",\n  \"latitude\",\n  \"latrine\",\n  \"latter\",\n  \"latticed\",\n  \"launch\",\n  \"launder\",\n  \"laundry\",\n  \"laurel\",\n  \"lavender\",\n  \"lavish\",\n  \"laxative\",\n  \"lazily\",\n  \"laziness\",\n  \"lazy\",\n  \"lecturer\",\n  \"left\",\n  \"legacy\",\n  \"legal\",\n  \"legend\",\n  \"legged\",\n  \"leggings\",\n  \"legible\",\n  \"legibly\",\n  \"legislate\",\n  \"lego\",\n  \"legroom\",\n  \"legume\",\n  \"legwarmer\",\n  \"legwork\",\n  \"lemon\",\n  \"lend\",\n  \"length\",\n  \"lens\",\n  \"lent\",\n  \"leotard\",\n  \"lesser\",\n  \"letdown\",\n  \"lethargic\",\n  \"lethargy\",\n  \"letter\",\n  \"lettuce\",\n  \"level\",\n  \"leverage\",\n  \"levers\",\n  \"levitate\",\n  \"levitator\",\n  \"liability\",\n  \"liable\",\n  \"liberty\",\n  \"librarian\",\n  \"library\",\n  \"licking\",\n  \"licorice\",\n  \"lid\",\n  \"life\",\n  \"lifter\",\n  \"lifting\",\n  \"liftoff\",\n  \"ligament\",\n  \"likely\",\n  \"likeness\",\n  \"likewise\",\n  \"liking\",\n  \"lilac\",\n  \"lilly\",\n  \"lily\",\n  \"limb\",\n  \"limeade\",\n  \"limelight\",\n  \"limes\",\n  \"limit\",\n  \"limping\",\n  \"limpness\",\n  \"line\",\n  \"lingo\",\n  \"linguini\",\n  \"linguist\",\n  \"lining\",\n  \"linked\",\n  \"linoleum\",\n  \"linseed\",\n  \"lint\",\n  \"lion\",\n  \"lip\",\n  \"liquefy\",\n  \"liqueur\",\n  \"liquid\",\n  \"lisp\",\n  \"list\",\n  \"litigate\",\n  \"litigator\",\n  \"litmus\",\n  \"litter\",\n  \"little\",\n  \"livable\",\n  \"lived\",\n  \"lively\",\n  \"liver\",\n  \"livestock\",\n  \"lividly\",\n  \"living\",\n  \"lizard\",\n  \"lubricant\",\n  \"lubricate\",\n  \"lucid\",\n  \"luckily\",\n  \"luckiness\",\n  \"luckless\",\n  \"lucrative\",\n  \"ludicrous\",\n  \"lugged\",\n  \"lukewarm\",\n  \"lullaby\",\n  \"lumber\",\n  \"luminance\",\n  \"luminous\",\n  \"lumpiness\",\n  \"lumping\",\n  \"lumpish\",\n  \"lunacy\",\n  \"lunar\",\n  \"lunchbox\",\n  \"luncheon\",\n  \"lunchroom\",\n  \"lunchtime\",\n  \"lung\",\n  \"lurch\",\n  \"lure\",\n  \"luridness\",\n  \"lurk\",\n  \"lushly\",\n  \"lushness\",\n  \"luster\",\n  \"lustfully\",\n  \"lustily\",\n  \"lustiness\",\n  \"lustrous\",\n  \"lusty\",\n  \"luxurious\",\n  \"luxury\",\n  \"lying\",\n  \"lyrically\",\n  \"lyricism\",\n  \"lyricist\",\n  \"lyrics\",\n  \"macarena\",\n  \"macaroni\",\n  \"macaw\",\n  \"mace\",\n  \"machine\",\n  \"machinist\",\n  \"magazine\",\n  \"magenta\",\n  \"maggot\",\n  \"magical\",\n  \"magician\",\n  \"magma\",\n  \"magnesium\",\n  \"magnetic\",\n  \"magnetism\",\n  \"magnetize\",\n  \"magnifier\",\n  \"magnify\",\n  \"magnitude\",\n  \"magnolia\",\n  \"mahogany\",\n  \"maimed\",\n  \"majestic\",\n  \"majesty\",\n  \"majorette\",\n  \"majority\",\n  \"makeover\",\n  \"maker\",\n  \"makeshift\",\n  \"making\",\n  \"malformed\",\n  \"malt\",\n  \"mama\",\n  \"mammal\",\n  \"mammary\",\n  \"mammogram\",\n  \"manager\",\n  \"managing\",\n  \"manatee\",\n  \"mandarin\",\n  \"mandate\",\n  \"mandatory\",\n  \"mandolin\",\n  \"manger\",\n  \"mangle\",\n  \"mango\",\n  \"mangy\",\n  \"manhandle\",\n  \"manhole\",\n  \"manhood\",\n  \"manhunt\",\n  \"manicotti\",\n  \"manicure\",\n  \"manifesto\",\n  \"manila\",\n  \"mankind\",\n  \"manlike\",\n  \"manliness\",\n  \"manly\",\n  \"manmade\",\n  \"manned\",\n  \"mannish\",\n  \"manor\",\n  \"manpower\",\n  \"mantis\",\n  \"mantra\",\n  \"manual\",\n  \"many\",\n  \"map\",\n  \"marathon\",\n  \"marauding\",\n  \"marbled\",\n  \"marbles\",\n  \"marbling\",\n  \"march\",\n  \"mardi\",\n  \"margarine\",\n  \"margarita\",\n  \"margin\",\n  \"marigold\",\n  \"marina\",\n  \"marine\",\n  \"marital\",\n  \"maritime\",\n  \"marlin\",\n  \"marmalade\",\n  \"maroon\",\n  \"married\",\n  \"marrow\",\n  \"marry\",\n  \"marshland\",\n  \"marshy\",\n  \"marsupial\",\n  \"marvelous\",\n  \"marxism\",\n  \"mascot\",\n  \"masculine\",\n  \"mashed\",\n  \"mashing\",\n  \"massager\",\n  \"masses\",\n  \"massive\",\n  \"mastiff\",\n  \"matador\",\n  \"matchbook\",\n  \"matchbox\",\n  \"matcher\",\n  \"matching\",\n  \"matchless\",\n  \"material\",\n  \"maternal\",\n  \"maternity\",\n  \"math\",\n  \"mating\",\n  \"matriarch\",\n  \"matrimony\",\n  \"matrix\",\n  \"matron\",\n  \"matted\",\n  \"matter\",\n  \"maturely\",\n  \"maturing\",\n  \"maturity\",\n  \"mauve\",\n  \"maverick\",\n  \"maximize\",\n  \"maximum\",\n  \"maybe\",\n  \"mayday\",\n  \"mayflower\",\n  \"moaner\",\n  \"moaning\",\n  \"mobile\",\n  \"mobility\",\n  \"mobilize\",\n  \"mobster\",\n  \"mocha\",\n  \"mocker\",\n  \"mockup\",\n  \"modified\",\n  \"modify\",\n  \"modular\",\n  \"modulator\",\n  \"module\",\n  \"moisten\",\n  \"moistness\",\n  \"moisture\",\n  \"molar\",\n  \"molasses\",\n  \"mold\",\n  \"molecular\",\n  \"molecule\",\n  \"molehill\",\n  \"mollusk\",\n  \"mom\",\n  \"monastery\",\n  \"monday\",\n  \"monetary\",\n  \"monetize\",\n  \"moneybags\",\n  \"moneyless\",\n  \"moneywise\",\n  \"mongoose\",\n  \"mongrel\",\n  \"monitor\",\n  \"monkhood\",\n  \"monogamy\",\n  \"monogram\",\n  \"monologue\",\n  \"monopoly\",\n  \"monorail\",\n  \"monotone\",\n  \"monotype\",\n  \"monoxide\",\n  \"monsieur\",\n  \"monsoon\",\n  \"monstrous\",\n  \"monthly\",\n  \"monument\",\n  \"moocher\",\n  \"moodiness\",\n  \"moody\",\n  \"mooing\",\n  \"moonbeam\",\n  \"mooned\",\n  \"moonlight\",\n  \"moonlike\",\n  \"moonlit\",\n  \"moonrise\",\n  \"moonscape\",\n  \"moonshine\",\n  \"moonstone\",\n  \"moonwalk\",\n  \"mop\",\n  \"morale\",\n  \"morality\",\n  \"morally\",\n  \"morbidity\",\n  \"morbidly\",\n  \"morphine\",\n  \"morphing\",\n  \"morse\",\n  \"mortality\",\n  \"mortally\",\n  \"mortician\",\n  \"mortified\",\n  \"mortify\",\n  \"mortuary\",\n  \"mosaic\",\n  \"mossy\",\n  \"most\",\n  \"mothball\",\n  \"mothproof\",\n  \"motion\",\n  \"motivate\",\n  \"motivator\",\n  \"motive\",\n  \"motocross\",\n  \"motor\",\n  \"motto\",\n  \"mountable\",\n  \"mountain\",\n  \"mounted\",\n  \"mounting\",\n  \"mourner\",\n  \"mournful\",\n  \"mouse\",\n  \"mousiness\",\n  \"moustache\",\n  \"mousy\",\n  \"mouth\",\n  \"movable\",\n  \"move\",\n  \"movie\",\n  \"moving\",\n  \"mower\",\n  \"mowing\",\n  \"much\",\n  \"muck\",\n  \"mud\",\n  \"mug\",\n  \"mulberry\",\n  \"mulch\",\n  \"mule\",\n  \"mulled\",\n  \"mullets\",\n  \"multiple\",\n  \"multiply\",\n  \"multitask\",\n  \"multitude\",\n  \"mumble\",\n  \"mumbling\",\n  \"mumbo\",\n  \"mummified\",\n  \"mummify\",\n  \"mummy\",\n  \"mumps\",\n  \"munchkin\",\n  \"mundane\",\n  \"municipal\",\n  \"muppet\",\n  \"mural\",\n  \"murkiness\",\n  \"murky\",\n  \"murmuring\",\n  \"muscular\",\n  \"museum\",\n  \"mushily\",\n  \"mushiness\",\n  \"mushroom\",\n  \"mushy\",\n  \"music\",\n  \"musket\",\n  \"muskiness\",\n  \"musky\",\n  \"mustang\",\n  \"mustard\",\n  \"muster\",\n  \"mustiness\",\n  \"musty\",\n  \"mutable\",\n  \"mutate\",\n  \"mutation\",\n  \"mute\",\n  \"mutilated\",\n  \"mutilator\",\n  \"mutiny\",\n  \"mutt\",\n  \"mutual\",\n  \"muzzle\",\n  \"myself\",\n  \"myspace\",\n  \"mystified\",\n  \"mystify\",\n  \"myth\",\n  \"nacho\",\n  \"nag\",\n  \"nail\",\n  \"name\",\n  \"naming\",\n  \"nanny\",\n  \"nanometer\",\n  \"nape\",\n  \"napkin\",\n  \"napped\",\n  \"napping\",\n  \"nappy\",\n  \"narrow\",\n  \"nastily\",\n  \"nastiness\",\n  \"national\",\n  \"native\",\n  \"nativity\",\n  \"natural\",\n  \"nature\",\n  \"naturist\",\n  \"nautical\",\n  \"navigate\",\n  \"navigator\",\n  \"navy\",\n  \"nearby\",\n  \"nearest\",\n  \"nearly\",\n  \"nearness\",\n  \"neatly\",\n  \"neatness\",\n  \"nebula\",\n  \"nebulizer\",\n  \"nectar\",\n  \"negate\",\n  \"negation\",\n  \"negative\",\n  \"neglector\",\n  \"negligee\",\n  \"negligent\",\n  \"negotiate\",\n  \"nemeses\",\n  \"nemesis\",\n  \"neon\",\n  \"nephew\",\n  \"nerd\",\n  \"nervous\",\n  \"nervy\",\n  \"nest\",\n  \"net\",\n  \"neurology\",\n  \"neuron\",\n  \"neurosis\",\n  \"neurotic\",\n  \"neuter\",\n  \"neutron\",\n  \"never\",\n  \"next\",\n  \"nibble\",\n  \"nickname\",\n  \"nicotine\",\n  \"niece\",\n  \"nifty\",\n  \"nimble\",\n  \"nimbly\",\n  \"nineteen\",\n  \"ninetieth\",\n  \"ninja\",\n  \"nintendo\",\n  \"ninth\",\n  \"nuclear\",\n  \"nuclei\",\n  \"nucleus\",\n  \"nugget\",\n  \"nullify\",\n  \"number\",\n  \"numbing\",\n  \"numbly\",\n  \"numbness\",\n  \"numeral\",\n  \"numerate\",\n  \"numerator\",\n  \"numeric\",\n  \"numerous\",\n  \"nuptials\",\n  \"nursery\",\n  \"nursing\",\n  \"nurture\",\n  \"nutcase\",\n  \"nutlike\",\n  \"nutmeg\",\n  \"nutrient\",\n  \"nutshell\",\n  \"nuttiness\",\n  \"nutty\",\n  \"nuzzle\",\n  \"nylon\",\n  \"oaf\",\n  \"oak\",\n  \"oasis\",\n  \"oat\",\n  \"obedience\",\n  \"obedient\",\n  \"obituary\",\n  \"object\",\n  \"obligate\",\n  \"obliged\",\n  \"oblivion\",\n  \"oblivious\",\n  \"oblong\",\n  \"obnoxious\",\n  \"oboe\",\n  \"obscure\",\n  \"obscurity\",\n  \"observant\",\n  \"observer\",\n  \"observing\",\n  \"obsessed\",\n  \"obsession\",\n  \"obsessive\",\n  \"obsolete\",\n  \"obstacle\",\n  \"obstinate\",\n  \"obstruct\",\n  \"obtain\",\n  \"obtrusive\",\n  \"obtuse\",\n  \"obvious\",\n  \"occultist\",\n  \"occupancy\",\n  \"occupant\",\n  \"occupier\",\n  \"occupy\",\n  \"ocean\",\n  \"ocelot\",\n  \"octagon\",\n  \"octane\",\n  \"october\",\n  \"octopus\",\n  \"ogle\",\n  \"oil\",\n  \"oink\",\n  \"ointment\",\n  \"okay\",\n  \"old\",\n  \"olive\",\n  \"olympics\",\n  \"omega\",\n  \"omen\",\n  \"ominous\",\n  \"omission\",\n  \"omit\",\n  \"omnivore\",\n  \"onboard\",\n  \"oncoming\",\n  \"ongoing\",\n  \"onion\",\n  \"online\",\n  \"onlooker\",\n  \"only\",\n  \"onscreen\",\n  \"onset\",\n  \"onshore\",\n  \"onslaught\",\n  \"onstage\",\n  \"onto\",\n  \"onward\",\n  \"onyx\",\n  \"oops\",\n  \"ooze\",\n  \"oozy\",\n  \"opacity\",\n  \"opal\",\n  \"open\",\n  \"operable\",\n  \"operate\",\n  \"operating\",\n  \"operation\",\n  \"operative\",\n  \"operator\",\n  \"opium\",\n  \"opossum\",\n  \"opponent\",\n  \"oppose\",\n  \"opposing\",\n  \"opposite\",\n  \"oppressed\",\n  \"oppressor\",\n  \"opt\",\n  \"opulently\",\n  \"osmosis\",\n  \"other\",\n  \"otter\",\n  \"ouch\",\n  \"ought\",\n  \"ounce\",\n  \"outage\",\n  \"outback\",\n  \"outbid\",\n  \"outboard\",\n  \"outbound\",\n  \"outbreak\",\n  \"outburst\",\n  \"outcast\",\n  \"outclass\",\n  \"outcome\",\n  \"outdated\",\n  \"outdoors\",\n  \"outer\",\n  \"outfield\",\n  \"outfit\",\n  \"outflank\",\n  \"outgoing\",\n  \"outgrow\",\n  \"outhouse\",\n  \"outing\",\n  \"outlast\",\n  \"outlet\",\n  \"outline\",\n  \"outlook\",\n  \"outlying\",\n  \"outmatch\",\n  \"outmost\",\n  \"outnumber\",\n  \"outplayed\",\n  \"outpost\",\n  \"outpour\",\n  \"output\",\n  \"outrage\",\n  \"outrank\",\n  \"outreach\",\n  \"outright\",\n  \"outscore\",\n  \"outsell\",\n  \"outshine\",\n  \"outshoot\",\n  \"outsider\",\n  \"outskirts\",\n  \"outsmart\",\n  \"outsource\",\n  \"outspoken\",\n  \"outtakes\",\n  \"outthink\",\n  \"outward\",\n  \"outweigh\",\n  \"outwit\",\n  \"oval\",\n  \"ovary\",\n  \"oven\",\n  \"overact\",\n  \"overall\",\n  \"overarch\",\n  \"overbid\",\n  \"overbill\",\n  \"overbite\",\n  \"overblown\",\n  \"overboard\",\n  \"overbook\",\n  \"overbuilt\",\n  \"overcast\",\n  \"overcoat\",\n  \"overcome\",\n  \"overcook\",\n  \"overcrowd\",\n  \"overdraft\",\n  \"overdrawn\",\n  \"overdress\",\n  \"overdrive\",\n  \"overdue\",\n  \"overeager\",\n  \"overeater\",\n  \"overexert\",\n  \"overfed\",\n  \"overfeed\",\n  \"overfill\",\n  \"overflow\",\n  \"overfull\",\n  \"overgrown\",\n  \"overhand\",\n  \"overhang\",\n  \"overhaul\",\n  \"overhead\",\n  \"overhear\",\n  \"overheat\",\n  \"overhung\",\n  \"overjoyed\",\n  \"overkill\",\n  \"overlabor\",\n  \"overlaid\",\n  \"overlap\",\n  \"overlay\",\n  \"overload\",\n  \"overlook\",\n  \"overlord\",\n  \"overlying\",\n  \"overnight\",\n  \"overpass\",\n  \"overpay\",\n  \"overplant\",\n  \"overplay\",\n  \"overpower\",\n  \"overprice\",\n  \"overrate\",\n  \"overreach\",\n  \"overreact\",\n  \"override\",\n  \"overripe\",\n  \"overrule\",\n  \"overrun\",\n  \"overshoot\",\n  \"overshot\",\n  \"oversight\",\n  \"oversized\",\n  \"oversleep\",\n  \"oversold\",\n  \"overspend\",\n  \"overstate\",\n  \"overstay\",\n  \"overstep\",\n  \"overstock\",\n  \"overstuff\",\n  \"oversweet\",\n  \"overtake\",\n  \"overthrow\",\n  \"overtime\",\n  \"overtly\",\n  \"overtone\",\n  \"overture\",\n  \"overturn\",\n  \"overuse\",\n  \"overvalue\",\n  \"overview\",\n  \"overwrite\",\n  \"owl\",\n  \"oxford\",\n  \"oxidant\",\n  \"oxidation\",\n  \"oxidize\",\n  \"oxidizing\",\n  \"oxygen\",\n  \"oxymoron\",\n  \"oyster\",\n  \"ozone\",\n  \"paced\",\n  \"pacemaker\",\n  \"pacific\",\n  \"pacifier\",\n  \"pacifism\",\n  \"pacifist\",\n  \"pacify\",\n  \"padded\",\n  \"padding\",\n  \"paddle\",\n  \"paddling\",\n  \"padlock\",\n  \"pagan\",\n  \"pager\",\n  \"paging\",\n  \"pajamas\",\n  \"palace\",\n  \"palatable\",\n  \"palm\",\n  \"palpable\",\n  \"palpitate\",\n  \"paltry\",\n  \"pampered\",\n  \"pamperer\",\n  \"pampers\",\n  \"pamphlet\",\n  \"panama\",\n  \"pancake\",\n  \"pancreas\",\n  \"panda\",\n  \"pandemic\",\n  \"pang\",\n  \"panhandle\",\n  \"panic\",\n  \"panning\",\n  \"panorama\",\n  \"panoramic\",\n  \"panther\",\n  \"pantomime\",\n  \"pantry\",\n  \"pants\",\n  \"pantyhose\",\n  \"paparazzi\",\n  \"papaya\",\n  \"paper\",\n  \"paprika\",\n  \"papyrus\",\n  \"parabola\",\n  \"parachute\",\n  \"parade\",\n  \"paradox\",\n  \"paragraph\",\n  \"parakeet\",\n  \"paralegal\",\n  \"paralyses\",\n  \"paralysis\",\n  \"paralyze\",\n  \"paramedic\",\n  \"parameter\",\n  \"paramount\",\n  \"parasail\",\n  \"parasite\",\n  \"parasitic\",\n  \"parcel\",\n  \"parched\",\n  \"parchment\",\n  \"pardon\",\n  \"parish\",\n  \"parka\",\n  \"parking\",\n  \"parkway\",\n  \"parlor\",\n  \"parmesan\",\n  \"parole\",\n  \"parrot\",\n  \"parsley\",\n  \"parsnip\",\n  \"partake\",\n  \"parted\",\n  \"parting\",\n  \"partition\",\n  \"partly\",\n  \"partner\",\n  \"partridge\",\n  \"party\",\n  \"passable\",\n  \"passably\",\n  \"passage\",\n  \"passcode\",\n  \"passenger\",\n  \"passerby\",\n  \"passing\",\n  \"passion\",\n  \"passive\",\n  \"passivism\",\n  \"passover\",\n  \"passport\",\n  \"password\",\n  \"pasta\",\n  \"pasted\",\n  \"pastel\",\n  \"pastime\",\n  \"pastor\",\n  \"pastrami\",\n  \"pasture\",\n  \"pasty\",\n  \"patchwork\",\n  \"patchy\",\n  \"paternal\",\n  \"paternity\",\n  \"path\",\n  \"patience\",\n  \"patient\",\n  \"patio\",\n  \"patriarch\",\n  \"patriot\",\n  \"patrol\",\n  \"patronage\",\n  \"patronize\",\n  \"pauper\",\n  \"pavement\",\n  \"paver\",\n  \"pavestone\",\n  \"pavilion\",\n  \"paving\",\n  \"pawing\",\n  \"payable\",\n  \"payback\",\n  \"paycheck\",\n  \"payday\",\n  \"payee\",\n  \"payer\",\n  \"paying\",\n  \"payment\",\n  \"payphone\",\n  \"payroll\",\n  \"pebble\",\n  \"pebbly\",\n  \"pecan\",\n  \"pectin\",\n  \"peculiar\",\n  \"peddling\",\n  \"pediatric\",\n  \"pedicure\",\n  \"pedigree\",\n  \"pedometer\",\n  \"pegboard\",\n  \"pelican\",\n  \"pellet\",\n  \"pelt\",\n  \"pelvis\",\n  \"penalize\",\n  \"penalty\",\n  \"pencil\",\n  \"pendant\",\n  \"pending\",\n  \"penholder\",\n  \"penknife\",\n  \"pennant\",\n  \"penniless\",\n  \"penny\",\n  \"penpal\",\n  \"pension\",\n  \"pentagon\",\n  \"pentagram\",\n  \"pep\",\n  \"perceive\",\n  \"percent\",\n  \"perch\",\n  \"percolate\",\n  \"perennial\",\n  \"perfected\",\n  \"perfectly\",\n  \"perfume\",\n  \"periscope\",\n  \"perish\",\n  \"perjurer\",\n  \"perjury\",\n  \"perkiness\",\n  \"perky\",\n  \"perm\",\n  \"peroxide\",\n  \"perpetual\",\n  \"perplexed\",\n  \"persecute\",\n  \"persevere\",\n  \"persuaded\",\n  \"persuader\",\n  \"pesky\",\n  \"peso\",\n  \"pessimism\",\n  \"pessimist\",\n  \"pester\",\n  \"pesticide\",\n  \"petal\",\n  \"petite\",\n  \"petition\",\n  \"petri\",\n  \"petroleum\",\n  \"petted\",\n  \"petticoat\",\n  \"pettiness\",\n  \"petty\",\n  \"petunia\",\n  \"phantom\",\n  \"phobia\",\n  \"phoenix\",\n  \"phonebook\",\n  \"phoney\",\n  \"phonics\",\n  \"phoniness\",\n  \"phony\",\n  \"phosphate\",\n  \"photo\",\n  \"phrase\",\n  \"phrasing\",\n  \"placard\",\n  \"placate\",\n  \"placidly\",\n  \"plank\",\n  \"planner\",\n  \"plant\",\n  \"plasma\",\n  \"plaster\",\n  \"plastic\",\n  \"plated\",\n  \"platform\",\n  \"plating\",\n  \"platinum\",\n  \"platonic\",\n  \"platter\",\n  \"platypus\",\n  \"plausible\",\n  \"plausibly\",\n  \"playable\",\n  \"playback\",\n  \"player\",\n  \"playful\",\n  \"playgroup\",\n  \"playhouse\",\n  \"playing\",\n  \"playlist\",\n  \"playmaker\",\n  \"playmate\",\n  \"playoff\",\n  \"playpen\",\n  \"playroom\",\n  \"playset\",\n  \"plaything\",\n  \"playtime\",\n  \"plaza\",\n  \"pleading\",\n  \"pleat\",\n  \"pledge\",\n  \"plentiful\",\n  \"plenty\",\n  \"plethora\",\n  \"plexiglas\",\n  \"pliable\",\n  \"plod\",\n  \"plop\",\n  \"plot\",\n  \"plow\",\n  \"ploy\",\n  \"pluck\",\n  \"plug\",\n  \"plunder\",\n  \"plunging\",\n  \"plural\",\n  \"plus\",\n  \"plutonium\",\n  \"plywood\",\n  \"poach\",\n  \"pod\",\n  \"poem\",\n  \"poet\",\n  \"pogo\",\n  \"pointed\",\n  \"pointer\",\n  \"pointing\",\n  \"pointless\",\n  \"pointy\",\n  \"poise\",\n  \"poison\",\n  \"poker\",\n  \"poking\",\n  \"polar\",\n  \"police\",\n  \"policy\",\n  \"polio\",\n  \"polish\",\n  \"politely\",\n  \"polka\",\n  \"polo\",\n  \"polyester\",\n  \"polygon\",\n  \"polygraph\",\n  \"polymer\",\n  \"poncho\",\n  \"pond\",\n  \"pony\",\n  \"popcorn\",\n  \"pope\",\n  \"poplar\",\n  \"popper\",\n  \"poppy\",\n  \"popsicle\",\n  \"populace\",\n  \"popular\",\n  \"populate\",\n  \"porcupine\",\n  \"pork\",\n  \"porous\",\n  \"porridge\",\n  \"portable\",\n  \"portal\",\n  \"portfolio\",\n  \"porthole\",\n  \"portion\",\n  \"portly\",\n  \"portside\",\n  \"poser\",\n  \"posh\",\n  \"posing\",\n  \"possible\",\n  \"possibly\",\n  \"possum\",\n  \"postage\",\n  \"postal\",\n  \"postbox\",\n  \"postcard\",\n  \"posted\",\n  \"poster\",\n  \"posting\",\n  \"postnasal\",\n  \"posture\",\n  \"postwar\",\n  \"pouch\",\n  \"pounce\",\n  \"pouncing\",\n  \"pound\",\n  \"pouring\",\n  \"pout\",\n  \"powdered\",\n  \"powdering\",\n  \"powdery\",\n  \"power\",\n  \"powwow\",\n  \"pox\",\n  \"praising\",\n  \"prance\",\n  \"prancing\",\n  \"pranker\",\n  \"prankish\",\n  \"prankster\",\n  \"prayer\",\n  \"praying\",\n  \"preacher\",\n  \"preaching\",\n  \"preachy\",\n  \"preamble\",\n  \"precinct\",\n  \"precise\",\n  \"precision\",\n  \"precook\",\n  \"precut\",\n  \"predator\",\n  \"predefine\",\n  \"predict\",\n  \"preface\",\n  \"prefix\",\n  \"preflight\",\n  \"preformed\",\n  \"pregame\",\n  \"pregnancy\",\n  \"pregnant\",\n  \"preheated\",\n  \"prelaunch\",\n  \"prelaw\",\n  \"prelude\",\n  \"premiere\",\n  \"premises\",\n  \"premium\",\n  \"prenatal\",\n  \"preoccupy\",\n  \"preorder\",\n  \"prepaid\",\n  \"prepay\",\n  \"preplan\",\n  \"preppy\",\n  \"preschool\",\n  \"prescribe\",\n  \"preseason\",\n  \"preset\",\n  \"preshow\",\n  \"president\",\n  \"presoak\",\n  \"press\",\n  \"presume\",\n  \"presuming\",\n  \"preteen\",\n  \"pretended\",\n  \"pretender\",\n  \"pretense\",\n  \"pretext\",\n  \"pretty\",\n  \"pretzel\",\n  \"prevail\",\n  \"prevalent\",\n  \"prevent\",\n  \"preview\",\n  \"previous\",\n  \"prewar\",\n  \"prewashed\",\n  \"prideful\",\n  \"pried\",\n  \"primal\",\n  \"primarily\",\n  \"primary\",\n  \"primate\",\n  \"primer\",\n  \"primp\",\n  \"princess\",\n  \"print\",\n  \"prior\",\n  \"prism\",\n  \"prison\",\n  \"prissy\",\n  \"pristine\",\n  \"privacy\",\n  \"private\",\n  \"privatize\",\n  \"prize\",\n  \"proactive\",\n  \"probable\",\n  \"probably\",\n  \"probation\",\n  \"probe\",\n  \"probing\",\n  \"probiotic\",\n  \"problem\",\n  \"procedure\",\n  \"process\",\n  \"proclaim\",\n  \"procreate\",\n  \"procurer\",\n  \"prodigal\",\n  \"prodigy\",\n  \"produce\",\n  \"product\",\n  \"profane\",\n  \"profanity\",\n  \"professed\",\n  \"professor\",\n  \"profile\",\n  \"profound\",\n  \"profusely\",\n  \"progeny\",\n  \"prognosis\",\n  \"program\",\n  \"progress\",\n  \"projector\",\n  \"prologue\",\n  \"prolonged\",\n  \"promenade\",\n  \"prominent\",\n  \"promoter\",\n  \"promotion\",\n  \"prompter\",\n  \"promptly\",\n  \"prone\",\n  \"prong\",\n  \"pronounce\",\n  \"pronto\",\n  \"proofing\",\n  \"proofread\",\n  \"proofs\",\n  \"propeller\",\n  \"properly\",\n  \"property\",\n  \"proponent\",\n  \"proposal\",\n  \"propose\",\n  \"props\",\n  \"prorate\",\n  \"protector\",\n  \"protegee\",\n  \"proton\",\n  \"prototype\",\n  \"protozoan\",\n  \"protract\",\n  \"protrude\",\n  \"proud\",\n  \"provable\",\n  \"proved\",\n  \"proven\",\n  \"provided\",\n  \"provider\",\n  \"providing\",\n  \"province\",\n  \"proving\",\n  \"provoke\",\n  \"provoking\",\n  \"provolone\",\n  \"prowess\",\n  \"prowler\",\n  \"prowling\",\n  \"proximity\",\n  \"proxy\",\n  \"prozac\",\n  \"prude\",\n  \"prudishly\",\n  \"prune\",\n  \"pruning\",\n  \"pry\",\n  \"psychic\",\n  \"public\",\n  \"publisher\",\n  \"pucker\",\n  \"pueblo\",\n  \"pug\",\n  \"pull\",\n  \"pulmonary\",\n  \"pulp\",\n  \"pulsate\",\n  \"pulse\",\n  \"pulverize\",\n  \"puma\",\n  \"pumice\",\n  \"pummel\",\n  \"punch\",\n  \"punctual\",\n  \"punctuate\",\n  \"punctured\",\n  \"pungent\",\n  \"punisher\",\n  \"punk\",\n  \"pupil\",\n  \"puppet\",\n  \"puppy\",\n  \"purchase\",\n  \"pureblood\",\n  \"purebred\",\n  \"purely\",\n  \"pureness\",\n  \"purgatory\",\n  \"purge\",\n  \"purging\",\n  \"purifier\",\n  \"purify\",\n  \"purist\",\n  \"puritan\",\n  \"purity\",\n  \"purple\",\n  \"purplish\",\n  \"purposely\",\n  \"purr\",\n  \"purse\",\n  \"pursuable\",\n  \"pursuant\",\n  \"pursuit\",\n  \"purveyor\",\n  \"pushcart\",\n  \"pushchair\",\n  \"pusher\",\n  \"pushiness\",\n  \"pushing\",\n  \"pushover\",\n  \"pushpin\",\n  \"pushup\",\n  \"pushy\",\n  \"putdown\",\n  \"putt\",\n  \"puzzle\",\n  \"puzzling\",\n  \"pyramid\",\n  \"pyromania\",\n  \"python\",\n  \"quack\",\n  \"quadrant\",\n  \"quail\",\n  \"quaintly\",\n  \"quake\",\n  \"quaking\",\n  \"qualified\",\n  \"qualifier\",\n  \"qualify\",\n  \"quality\",\n  \"qualm\",\n  \"quantum\",\n  \"quarrel\",\n  \"quarry\",\n  \"quartered\",\n  \"quarterly\",\n  \"quarters\",\n  \"quartet\",\n  \"quench\",\n  \"query\",\n  \"quicken\",\n  \"quickly\",\n  \"quickness\",\n  \"quicksand\",\n  \"quickstep\",\n  \"quiet\",\n  \"quill\",\n  \"quilt\",\n  \"quintet\",\n  \"quintuple\",\n  \"quirk\",\n  \"quit\",\n  \"quiver\",\n  \"quizzical\",\n  \"quotable\",\n  \"quotation\",\n  \"quote\",\n  \"rabid\",\n  \"race\",\n  \"racing\",\n  \"racism\",\n  \"rack\",\n  \"racoon\",\n  \"radar\",\n  \"radial\",\n  \"radiance\",\n  \"radiantly\",\n  \"radiated\",\n  \"radiation\",\n  \"radiator\",\n  \"radio\",\n  \"radish\",\n  \"raffle\",\n  \"raft\",\n  \"rage\",\n  \"ragged\",\n  \"raging\",\n  \"ragweed\",\n  \"raider\",\n  \"railcar\",\n  \"railing\",\n  \"railroad\",\n  \"railway\",\n  \"raisin\",\n  \"rake\",\n  \"raking\",\n  \"rally\",\n  \"ramble\",\n  \"rambling\",\n  \"ramp\",\n  \"ramrod\",\n  \"ranch\",\n  \"rancidity\",\n  \"random\",\n  \"ranged\",\n  \"ranger\",\n  \"ranging\",\n  \"ranked\",\n  \"ranking\",\n  \"ransack\",\n  \"ranting\",\n  \"rants\",\n  \"rare\",\n  \"rarity\",\n  \"rascal\",\n  \"rash\",\n  \"rasping\",\n  \"ravage\",\n  \"raven\",\n  \"ravine\",\n  \"raving\",\n  \"ravioli\",\n  \"ravishing\",\n  \"reabsorb\",\n  \"reach\",\n  \"reacquire\",\n  \"reaction\",\n  \"reactive\",\n  \"reactor\",\n  \"reaffirm\",\n  \"ream\",\n  \"reanalyze\",\n  \"reappear\",\n  \"reapply\",\n  \"reappoint\",\n  \"reapprove\",\n  \"rearrange\",\n  \"rearview\",\n  \"reason\",\n  \"reassign\",\n  \"reassure\",\n  \"reattach\",\n  \"reawake\",\n  \"rebalance\",\n  \"rebate\",\n  \"rebel\",\n  \"rebirth\",\n  \"reboot\",\n  \"reborn\",\n  \"rebound\",\n  \"rebuff\",\n  \"rebuild\",\n  \"rebuilt\",\n  \"reburial\",\n  \"rebuttal\",\n  \"recall\",\n  \"recant\",\n  \"recapture\",\n  \"recast\",\n  \"recede\",\n  \"recent\",\n  \"recess\",\n  \"recharger\",\n  \"recipient\",\n  \"recital\",\n  \"recite\",\n  \"reckless\",\n  \"reclaim\",\n  \"recliner\",\n  \"reclining\",\n  \"recluse\",\n  \"reclusive\",\n  \"recognize\",\n  \"recoil\",\n  \"recollect\",\n  \"recolor\",\n  \"reconcile\",\n  \"reconfirm\",\n  \"reconvene\",\n  \"recopy\",\n  \"record\",\n  \"recount\",\n  \"recoup\",\n  \"recovery\",\n  \"recreate\",\n  \"rectal\",\n  \"rectangle\",\n  \"rectified\",\n  \"rectify\",\n  \"recycled\",\n  \"recycler\",\n  \"recycling\",\n  \"reemerge\",\n  \"reenact\",\n  \"reenter\",\n  \"reentry\",\n  \"reexamine\",\n  \"referable\",\n  \"referee\",\n  \"reference\",\n  \"refill\",\n  \"refinance\",\n  \"refined\",\n  \"refinery\",\n  \"refining\",\n  \"refinish\",\n  \"reflected\",\n  \"reflector\",\n  \"reflex\",\n  \"reflux\",\n  \"refocus\",\n  \"refold\",\n  \"reforest\",\n  \"reformat\",\n  \"reformed\",\n  \"reformer\",\n  \"reformist\",\n  \"refract\",\n  \"refrain\",\n  \"refreeze\",\n  \"refresh\",\n  \"refried\",\n  \"refueling\",\n  \"refund\",\n  \"refurbish\",\n  \"refurnish\",\n  \"refusal\",\n  \"refuse\",\n  \"refusing\",\n  \"refutable\",\n  \"refute\",\n  \"regain\",\n  \"regalia\",\n  \"regally\",\n  \"reggae\",\n  \"regime\",\n  \"region\",\n  \"register\",\n  \"registrar\",\n  \"registry\",\n  \"regress\",\n  \"regretful\",\n  \"regroup\",\n  \"regular\",\n  \"regulate\",\n  \"regulator\",\n  \"rehab\",\n  \"reheat\",\n  \"rehire\",\n  \"rehydrate\",\n  \"reimburse\",\n  \"reissue\",\n  \"reiterate\",\n  \"rejoice\",\n  \"rejoicing\",\n  \"rejoin\",\n  \"rekindle\",\n  \"relapse\",\n  \"relapsing\",\n  \"relatable\",\n  \"related\",\n  \"relation\",\n  \"relative\",\n  \"relax\",\n  \"relay\",\n  \"relearn\",\n  \"release\",\n  \"relenting\",\n  \"reliable\",\n  \"reliably\",\n  \"reliance\",\n  \"reliant\",\n  \"relic\",\n  \"relieve\",\n  \"relieving\",\n  \"relight\",\n  \"relish\",\n  \"relive\",\n  \"reload\",\n  \"relocate\",\n  \"relock\",\n  \"reluctant\",\n  \"rely\",\n  \"remake\",\n  \"remark\",\n  \"remarry\",\n  \"rematch\",\n  \"remedial\",\n  \"remedy\",\n  \"remember\",\n  \"reminder\",\n  \"remindful\",\n  \"remission\",\n  \"remix\",\n  \"remnant\",\n  \"remodeler\",\n  \"remold\",\n  \"remorse\",\n  \"remote\",\n  \"removable\",\n  \"removal\",\n  \"removed\",\n  \"remover\",\n  \"removing\",\n  \"rename\",\n  \"renderer\",\n  \"rendering\",\n  \"rendition\",\n  \"renegade\",\n  \"renewable\",\n  \"renewably\",\n  \"renewal\",\n  \"renewed\",\n  \"renounce\",\n  \"renovate\",\n  \"renovator\",\n  \"rentable\",\n  \"rental\",\n  \"rented\",\n  \"renter\",\n  \"reoccupy\",\n  \"reoccur\",\n  \"reopen\",\n  \"reorder\",\n  \"repackage\",\n  \"repacking\",\n  \"repaint\",\n  \"repair\",\n  \"repave\",\n  \"repaying\",\n  \"repayment\",\n  \"repeal\",\n  \"repeated\",\n  \"repeater\",\n  \"repent\",\n  \"rephrase\",\n  \"replace\",\n  \"replay\",\n  \"replica\",\n  \"reply\",\n  \"reporter\",\n  \"repose\",\n  \"repossess\",\n  \"repost\",\n  \"repressed\",\n  \"reprimand\",\n  \"reprint\",\n  \"reprise\",\n  \"reproach\",\n  \"reprocess\",\n  \"reproduce\",\n  \"reprogram\",\n  \"reps\",\n  \"reptile\",\n  \"reptilian\",\n  \"repugnant\",\n  \"repulsion\",\n  \"repulsive\",\n  \"repurpose\",\n  \"reputable\",\n  \"reputably\",\n  \"request\",\n  \"require\",\n  \"requisite\",\n  \"reroute\",\n  \"rerun\",\n  \"resale\",\n  \"resample\",\n  \"rescuer\",\n  \"reseal\",\n  \"research\",\n  \"reselect\",\n  \"reseller\",\n  \"resemble\",\n  \"resend\",\n  \"resent\",\n  \"reset\",\n  \"reshape\",\n  \"reshoot\",\n  \"reshuffle\",\n  \"residence\",\n  \"residency\",\n  \"resident\",\n  \"residual\",\n  \"residue\",\n  \"resigned\",\n  \"resilient\",\n  \"resistant\",\n  \"resisting\",\n  \"resize\",\n  \"resolute\",\n  \"resolved\",\n  \"resonant\",\n  \"resonate\",\n  \"resort\",\n  \"resource\",\n  \"respect\",\n  \"resubmit\",\n  \"result\",\n  \"resume\",\n  \"resupply\",\n  \"resurface\",\n  \"resurrect\",\n  \"retail\",\n  \"retainer\",\n  \"retaining\",\n  \"retake\",\n  \"retaliate\",\n  \"retention\",\n  \"rethink\",\n  \"retinal\",\n  \"retired\",\n  \"retiree\",\n  \"retiring\",\n  \"retold\",\n  \"retool\",\n  \"retorted\",\n  \"retouch\",\n  \"retrace\",\n  \"retract\",\n  \"retrain\",\n  \"retread\",\n  \"retreat\",\n  \"retrial\",\n  \"retrieval\",\n  \"retriever\",\n  \"retry\",\n  \"return\",\n  \"retying\",\n  \"retype\",\n  \"reunion\",\n  \"reunite\",\n  \"reusable\",\n  \"reuse\",\n  \"reveal\",\n  \"reveler\",\n  \"revenge\",\n  \"revenue\",\n  \"reverb\",\n  \"revered\",\n  \"reverence\",\n  \"reverend\",\n  \"reversal\",\n  \"reverse\",\n  \"reversing\",\n  \"reversion\",\n  \"revert\",\n  \"revisable\",\n  \"revise\",\n  \"revision\",\n  \"revisit\",\n  \"revivable\",\n  \"revival\",\n  \"reviver\",\n  \"reviving\",\n  \"revocable\",\n  \"revoke\",\n  \"revolt\",\n  \"revolver\",\n  \"revolving\",\n  \"reward\",\n  \"rewash\",\n  \"rewind\",\n  \"rewire\",\n  \"reword\",\n  \"rework\",\n  \"rewrap\",\n  \"rewrite\",\n  \"rhyme\",\n  \"ribbon\",\n  \"ribcage\",\n  \"rice\",\n  \"riches\",\n  \"richly\",\n  \"richness\",\n  \"rickety\",\n  \"ricotta\",\n  \"riddance\",\n  \"ridden\",\n  \"ride\",\n  \"riding\",\n  \"rifling\",\n  \"rift\",\n  \"rigging\",\n  \"rigid\",\n  \"rigor\",\n  \"rimless\",\n  \"rimmed\",\n  \"rind\",\n  \"rink\",\n  \"rinse\",\n  \"rinsing\",\n  \"riot\",\n  \"ripcord\",\n  \"ripeness\",\n  \"ripening\",\n  \"ripping\",\n  \"ripple\",\n  \"rippling\",\n  \"riptide\",\n  \"rise\",\n  \"rising\",\n  \"risk\",\n  \"risotto\",\n  \"ritalin\",\n  \"ritzy\",\n  \"rival\",\n  \"riverbank\",\n  \"riverbed\",\n  \"riverboat\",\n  \"riverside\",\n  \"riveter\",\n  \"riveting\",\n  \"roamer\",\n  \"roaming\",\n  \"roast\",\n  \"robbing\",\n  \"robe\",\n  \"robin\",\n  \"robotics\",\n  \"robust\",\n  \"rockband\",\n  \"rocker\",\n  \"rocket\",\n  \"rockfish\",\n  \"rockiness\",\n  \"rocking\",\n  \"rocklike\",\n  \"rockslide\",\n  \"rockstar\",\n  \"rocky\",\n  \"rogue\",\n  \"roman\",\n  \"romp\",\n  \"rope\",\n  \"roping\",\n  \"roster\",\n  \"rosy\",\n  \"rotten\",\n  \"rotting\",\n  \"rotunda\",\n  \"roulette\",\n  \"rounding\",\n  \"roundish\",\n  \"roundness\",\n  \"roundup\",\n  \"roundworm\",\n  \"routine\",\n  \"routing\",\n  \"rover\",\n  \"roving\",\n  \"royal\",\n  \"rubbed\",\n  \"rubber\",\n  \"rubbing\",\n  \"rubble\",\n  \"rubdown\",\n  \"ruby\",\n  \"ruckus\",\n  \"rudder\",\n  \"rug\",\n  \"ruined\",\n  \"rule\",\n  \"rumble\",\n  \"rumbling\",\n  \"rummage\",\n  \"rumor\",\n  \"runaround\",\n  \"rundown\",\n  \"runner\",\n  \"running\",\n  \"runny\",\n  \"runt\",\n  \"runway\",\n  \"rupture\",\n  \"rural\",\n  \"ruse\",\n  \"rush\",\n  \"rust\",\n  \"rut\",\n  \"sabbath\",\n  \"sabotage\",\n  \"sacrament\",\n  \"sacred\",\n  \"sacrifice\",\n  \"sadden\",\n  \"saddlebag\",\n  \"saddled\",\n  \"saddling\",\n  \"sadly\",\n  \"sadness\",\n  \"safari\",\n  \"safeguard\",\n  \"safehouse\",\n  \"safely\",\n  \"safeness\",\n  \"saffron\",\n  \"saga\",\n  \"sage\",\n  \"sagging\",\n  \"saggy\",\n  \"said\",\n  \"saint\",\n  \"sake\",\n  \"salad\",\n  \"salami\",\n  \"salaried\",\n  \"salary\",\n  \"saline\",\n  \"salon\",\n  \"saloon\",\n  \"salsa\",\n  \"salt\",\n  \"salutary\",\n  \"salute\",\n  \"salvage\",\n  \"salvaging\",\n  \"salvation\",\n  \"same\",\n  \"sample\",\n  \"sampling\",\n  \"sanction\",\n  \"sanctity\",\n  \"sanctuary\",\n  \"sandal\",\n  \"sandbag\",\n  \"sandbank\",\n  \"sandbar\",\n  \"sandblast\",\n  \"sandbox\",\n  \"sanded\",\n  \"sandfish\",\n  \"sanding\",\n  \"sandlot\",\n  \"sandpaper\",\n  \"sandpit\",\n  \"sandstone\",\n  \"sandstorm\",\n  \"sandworm\",\n  \"sandy\",\n  \"sanitary\",\n  \"sanitizer\",\n  \"sank\",\n  \"santa\",\n  \"sapling\",\n  \"sappiness\",\n  \"sappy\",\n  \"sarcasm\",\n  \"sarcastic\",\n  \"sardine\",\n  \"sash\",\n  \"sasquatch\",\n  \"sassy\",\n  \"satchel\",\n  \"satiable\",\n  \"satin\",\n  \"satirical\",\n  \"satisfied\",\n  \"satisfy\",\n  \"saturate\",\n  \"saturday\",\n  \"sauciness\",\n  \"saucy\",\n  \"sauna\",\n  \"savage\",\n  \"savanna\",\n  \"saved\",\n  \"savings\",\n  \"savior\",\n  \"savor\",\n  \"saxophone\",\n  \"say\",\n  \"scabbed\",\n  \"scabby\",\n  \"scalded\",\n  \"scalding\",\n  \"scale\",\n  \"scaling\",\n  \"scallion\",\n  \"scallop\",\n  \"scalping\",\n  \"scam\",\n  \"scandal\",\n  \"scanner\",\n  \"scanning\",\n  \"scant\",\n  \"scapegoat\",\n  \"scarce\",\n  \"scarcity\",\n  \"scarecrow\",\n  \"scared\",\n  \"scarf\",\n  \"scarily\",\n  \"scariness\",\n  \"scarring\",\n  \"scary\",\n  \"scavenger\",\n  \"scenic\",\n  \"schedule\",\n  \"schematic\",\n  \"scheme\",\n  \"scheming\",\n  \"schilling\",\n  \"schnapps\",\n  \"scholar\",\n  \"science\",\n  \"scientist\",\n  \"scion\",\n  \"scoff\",\n  \"scolding\",\n  \"scone\",\n  \"scoop\",\n  \"scooter\",\n  \"scope\",\n  \"scorch\",\n  \"scorebook\",\n  \"scorecard\",\n  \"scored\",\n  \"scoreless\",\n  \"scorer\",\n  \"scoring\",\n  \"scorn\",\n  \"scorpion\",\n  \"scotch\",\n  \"scoundrel\",\n  \"scoured\",\n  \"scouring\",\n  \"scouting\",\n  \"scouts\",\n  \"scowling\",\n  \"scrabble\",\n  \"scraggly\",\n  \"scrambled\",\n  \"scrambler\",\n  \"scrap\",\n  \"scratch\",\n  \"scrawny\",\n  \"screen\",\n  \"scribble\",\n  \"scribe\",\n  \"scribing\",\n  \"scrimmage\",\n  \"script\",\n  \"scroll\",\n  \"scrooge\",\n  \"scrounger\",\n  \"scrubbed\",\n  \"scrubber\",\n  \"scruffy\",\n  \"scrunch\",\n  \"scrutiny\",\n  \"scuba\",\n  \"scuff\",\n  \"sculptor\",\n  \"sculpture\",\n  \"scurvy\",\n  \"scuttle\",\n  \"secluded\",\n  \"secluding\",\n  \"seclusion\",\n  \"second\",\n  \"secrecy\",\n  \"secret\",\n  \"sectional\",\n  \"sector\",\n  \"secular\",\n  \"securely\",\n  \"security\",\n  \"sedan\",\n  \"sedate\",\n  \"sedation\",\n  \"sedative\",\n  \"sediment\",\n  \"seduce\",\n  \"seducing\",\n  \"segment\",\n  \"seismic\",\n  \"seizing\",\n  \"seldom\",\n  \"selected\",\n  \"selection\",\n  \"selective\",\n  \"selector\",\n  \"self\",\n  \"seltzer\",\n  \"semantic\",\n  \"semester\",\n  \"semicolon\",\n  \"semifinal\",\n  \"seminar\",\n  \"semisoft\",\n  \"semisweet\",\n  \"senate\",\n  \"senator\",\n  \"send\",\n  \"senior\",\n  \"senorita\",\n  \"sensation\",\n  \"sensitive\",\n  \"sensitize\",\n  \"sensually\",\n  \"sensuous\",\n  \"sepia\",\n  \"september\",\n  \"septic\",\n  \"septum\",\n  \"sequel\",\n  \"sequence\",\n  \"sequester\",\n  \"series\",\n  \"sermon\",\n  \"serotonin\",\n  \"serpent\",\n  \"serrated\",\n  \"serve\",\n  \"service\",\n  \"serving\",\n  \"sesame\",\n  \"sessions\",\n  \"setback\",\n  \"setting\",\n  \"settle\",\n  \"settling\",\n  \"setup\",\n  \"sevenfold\",\n  \"seventeen\",\n  \"seventh\",\n  \"seventy\",\n  \"severity\",\n  \"shabby\",\n  \"shack\",\n  \"shaded\",\n  \"shadily\",\n  \"shadiness\",\n  \"shading\",\n  \"shadow\",\n  \"shady\",\n  \"shaft\",\n  \"shakable\",\n  \"shakily\",\n  \"shakiness\",\n  \"shaking\",\n  \"shaky\",\n  \"shale\",\n  \"shallot\",\n  \"shallow\",\n  \"shame\",\n  \"shampoo\",\n  \"shamrock\",\n  \"shank\",\n  \"shanty\",\n  \"shape\",\n  \"shaping\",\n  \"share\",\n  \"sharpener\",\n  \"sharper\",\n  \"sharpie\",\n  \"sharply\",\n  \"sharpness\",\n  \"shawl\",\n  \"sheath\",\n  \"shed\",\n  \"sheep\",\n  \"sheet\",\n  \"shelf\",\n  \"shell\",\n  \"shelter\",\n  \"shelve\",\n  \"shelving\",\n  \"sherry\",\n  \"shield\",\n  \"shifter\",\n  \"shifting\",\n  \"shiftless\",\n  \"shifty\",\n  \"shimmer\",\n  \"shimmy\",\n  \"shindig\",\n  \"shine\",\n  \"shingle\",\n  \"shininess\",\n  \"shining\",\n  \"shiny\",\n  \"ship\",\n  \"shirt\",\n  \"shivering\",\n  \"shock\",\n  \"shone\",\n  \"shoplift\",\n  \"shopper\",\n  \"shopping\",\n  \"shoptalk\",\n  \"shore\",\n  \"shortage\",\n  \"shortcake\",\n  \"shortcut\",\n  \"shorten\",\n  \"shorter\",\n  \"shorthand\",\n  \"shortlist\",\n  \"shortly\",\n  \"shortness\",\n  \"shorts\",\n  \"shortwave\",\n  \"shorty\",\n  \"shout\",\n  \"shove\",\n  \"showbiz\",\n  \"showcase\",\n  \"showdown\",\n  \"shower\",\n  \"showgirl\",\n  \"showing\",\n  \"showman\",\n  \"shown\",\n  \"showoff\",\n  \"showpiece\",\n  \"showplace\",\n  \"showroom\",\n  \"showy\",\n  \"shrank\",\n  \"shrapnel\",\n  \"shredder\",\n  \"shredding\",\n  \"shrewdly\",\n  \"shriek\",\n  \"shrill\",\n  \"shrimp\",\n  \"shrine\",\n  \"shrink\",\n  \"shrivel\",\n  \"shrouded\",\n  \"shrubbery\",\n  \"shrubs\",\n  \"shrug\",\n  \"shrunk\",\n  \"shucking\",\n  \"shudder\",\n  \"shuffle\",\n  \"shuffling\",\n  \"shun\",\n  \"shush\",\n  \"shut\",\n  \"shy\",\n  \"siamese\",\n  \"siberian\",\n  \"sibling\",\n  \"siding\",\n  \"sierra\",\n  \"siesta\",\n  \"sift\",\n  \"sighing\",\n  \"silenced\",\n  \"silencer\",\n  \"silent\",\n  \"silica\",\n  \"silicon\",\n  \"silk\",\n  \"silliness\",\n  \"silly\",\n  \"silo\",\n  \"silt\",\n  \"silver\",\n  \"similarly\",\n  \"simile\",\n  \"simmering\",\n  \"simple\",\n  \"simplify\",\n  \"simply\",\n  \"sincere\",\n  \"sincerity\",\n  \"singer\",\n  \"singing\",\n  \"single\",\n  \"singular\",\n  \"sinister\",\n  \"sinless\",\n  \"sinner\",\n  \"sinuous\",\n  \"sip\",\n  \"siren\",\n  \"sister\",\n  \"sitcom\",\n  \"sitter\",\n  \"sitting\",\n  \"situated\",\n  \"situation\",\n  \"sixfold\",\n  \"sixteen\",\n  \"sixth\",\n  \"sixties\",\n  \"sixtieth\",\n  \"sixtyfold\",\n  \"sizable\",\n  \"sizably\",\n  \"size\",\n  \"sizing\",\n  \"sizzle\",\n  \"sizzling\",\n  \"skater\",\n  \"skating\",\n  \"skedaddle\",\n  \"skeletal\",\n  \"skeleton\",\n  \"skeptic\",\n  \"sketch\",\n  \"skewed\",\n  \"skewer\",\n  \"skid\",\n  \"skied\",\n  \"skier\",\n  \"skies\",\n  \"skiing\",\n  \"skilled\",\n  \"skillet\",\n  \"skillful\",\n  \"skimmed\",\n  \"skimmer\",\n  \"skimming\",\n  \"skimpily\",\n  \"skincare\",\n  \"skinhead\",\n  \"skinless\",\n  \"skinning\",\n  \"skinny\",\n  \"skintight\",\n  \"skipper\",\n  \"skipping\",\n  \"skirmish\",\n  \"skirt\",\n  \"skittle\",\n  \"skydiver\",\n  \"skylight\",\n  \"skyline\",\n  \"skype\",\n  \"skyrocket\",\n  \"skyward\",\n  \"slab\",\n  \"slacked\",\n  \"slacker\",\n  \"slacking\",\n  \"slackness\",\n  \"slacks\",\n  \"slain\",\n  \"slam\",\n  \"slander\",\n  \"slang\",\n  \"slapping\",\n  \"slapstick\",\n  \"slashed\",\n  \"slashing\",\n  \"slate\",\n  \"slather\",\n  \"slaw\",\n  \"sled\",\n  \"sleek\",\n  \"sleep\",\n  \"sleet\",\n  \"sleeve\",\n  \"slept\",\n  \"sliceable\",\n  \"sliced\",\n  \"slicer\",\n  \"slicing\",\n  \"slick\",\n  \"slider\",\n  \"slideshow\",\n  \"sliding\",\n  \"slighted\",\n  \"slighting\",\n  \"slightly\",\n  \"slimness\",\n  \"slimy\",\n  \"slinging\",\n  \"slingshot\",\n  \"slinky\",\n  \"slip\",\n  \"slit\",\n  \"sliver\",\n  \"slobbery\",\n  \"slogan\",\n  \"sloped\",\n  \"sloping\",\n  \"sloppily\",\n  \"sloppy\",\n  \"slot\",\n  \"slouching\",\n  \"slouchy\",\n  \"sludge\",\n  \"slug\",\n  \"slum\",\n  \"slurp\",\n  \"slush\",\n  \"sly\",\n  \"small\",\n  \"smartly\",\n  \"smartness\",\n  \"smasher\",\n  \"smashing\",\n  \"smashup\",\n  \"smell\",\n  \"smelting\",\n  \"smile\",\n  \"smilingly\",\n  \"smirk\",\n  \"smite\",\n  \"smith\",\n  \"smitten\",\n  \"smock\",\n  \"smog\",\n  \"smoked\",\n  \"smokeless\",\n  \"smokiness\",\n  \"smoking\",\n  \"smoky\",\n  \"smolder\",\n  \"smooth\",\n  \"smother\",\n  \"smudge\",\n  \"smudgy\",\n  \"smuggler\",\n  \"smuggling\",\n  \"smugly\",\n  \"smugness\",\n  \"snack\",\n  \"snagged\",\n  \"snaking\",\n  \"snap\",\n  \"snare\",\n  \"snarl\",\n  \"snazzy\",\n  \"sneak\",\n  \"sneer\",\n  \"sneeze\",\n  \"sneezing\",\n  \"snide\",\n  \"sniff\",\n  \"snippet\",\n  \"snipping\",\n  \"snitch\",\n  \"snooper\",\n  \"snooze\",\n  \"snore\",\n  \"snoring\",\n  \"snorkel\",\n  \"snort\",\n  \"snout\",\n  \"snowbird\",\n  \"snowboard\",\n  \"snowbound\",\n  \"snowcap\",\n  \"snowdrift\",\n  \"snowdrop\",\n  \"snowfall\",\n  \"snowfield\",\n  \"snowflake\",\n  \"snowiness\",\n  \"snowless\",\n  \"snowman\",\n  \"snowplow\",\n  \"snowshoe\",\n  \"snowstorm\",\n  \"snowsuit\",\n  \"snowy\",\n  \"snub\",\n  \"snuff\",\n  \"snuggle\",\n  \"snugly\",\n  \"snugness\",\n  \"speak\",\n  \"spearfish\",\n  \"spearhead\",\n  \"spearman\",\n  \"spearmint\",\n  \"species\",\n  \"specimen\",\n  \"specked\",\n  \"speckled\",\n  \"specks\",\n  \"spectacle\",\n  \"spectator\",\n  \"spectrum\",\n  \"speculate\",\n  \"speech\",\n  \"speed\",\n  \"spellbind\",\n  \"speller\",\n  \"spelling\",\n  \"spendable\",\n  \"spender\",\n  \"spending\",\n  \"spent\",\n  \"spew\",\n  \"sphere\",\n  \"spherical\",\n  \"sphinx\",\n  \"spider\",\n  \"spied\",\n  \"spiffy\",\n  \"spill\",\n  \"spilt\",\n  \"spinach\",\n  \"spinal\",\n  \"spindle\",\n  \"spinner\",\n  \"spinning\",\n  \"spinout\",\n  \"spinster\",\n  \"spiny\",\n  \"spiral\",\n  \"spirited\",\n  \"spiritism\",\n  \"spirits\",\n  \"spiritual\",\n  \"splashed\",\n  \"splashing\",\n  \"splashy\",\n  \"splatter\",\n  \"spleen\",\n  \"splendid\",\n  \"splendor\",\n  \"splice\",\n  \"splicing\",\n  \"splinter\",\n  \"splotchy\",\n  \"splurge\",\n  \"spoilage\",\n  \"spoiled\",\n  \"spoiler\",\n  \"spoiling\",\n  \"spoils\",\n  \"spoken\",\n  \"spokesman\",\n  \"sponge\",\n  \"spongy\",\n  \"sponsor\",\n  \"spoof\",\n  \"spookily\",\n  \"spooky\",\n  \"spool\",\n  \"spoon\",\n  \"spore\",\n  \"sporting\",\n  \"sports\",\n  \"sporty\",\n  \"spotless\",\n  \"spotlight\",\n  \"spotted\",\n  \"spotter\",\n  \"spotting\",\n  \"spotty\",\n  \"spousal\",\n  \"spouse\",\n  \"spout\",\n  \"sprain\",\n  \"sprang\",\n  \"sprawl\",\n  \"spray\",\n  \"spree\",\n  \"sprig\",\n  \"spring\",\n  \"sprinkled\",\n  \"sprinkler\",\n  \"sprint\",\n  \"sprite\",\n  \"sprout\",\n  \"spruce\",\n  \"sprung\",\n  \"spry\",\n  \"spud\",\n  \"spur\",\n  \"sputter\",\n  \"spyglass\",\n  \"squabble\",\n  \"squad\",\n  \"squall\",\n  \"squander\",\n  \"squash\",\n  \"squatted\",\n  \"squatter\",\n  \"squatting\",\n  \"squeak\",\n  \"squealer\",\n  \"squealing\",\n  \"squeamish\",\n  \"squeegee\",\n  \"squeeze\",\n  \"squeezing\",\n  \"squid\",\n  \"squiggle\",\n  \"squiggly\",\n  \"squint\",\n  \"squire\",\n  \"squirt\",\n  \"squishier\",\n  \"squishy\",\n  \"stability\",\n  \"stabilize\",\n  \"stable\",\n  \"stack\",\n  \"stadium\",\n  \"staff\",\n  \"stage\",\n  \"staging\",\n  \"stagnant\",\n  \"stagnate\",\n  \"stainable\",\n  \"stained\",\n  \"staining\",\n  \"stainless\",\n  \"stalemate\",\n  \"staleness\",\n  \"stalling\",\n  \"stallion\",\n  \"stamina\",\n  \"stammer\",\n  \"stamp\",\n  \"stand\",\n  \"stank\",\n  \"staple\",\n  \"stapling\",\n  \"starboard\",\n  \"starch\",\n  \"stardom\",\n  \"stardust\",\n  \"starfish\",\n  \"stargazer\",\n  \"staring\",\n  \"stark\",\n  \"starless\",\n  \"starlet\",\n  \"starlight\",\n  \"starlit\",\n  \"starring\",\n  \"starry\",\n  \"starship\",\n  \"starter\",\n  \"starting\",\n  \"startle\",\n  \"startling\",\n  \"startup\",\n  \"starved\",\n  \"starving\",\n  \"stash\",\n  \"state\",\n  \"static\",\n  \"statistic\",\n  \"statue\",\n  \"stature\",\n  \"status\",\n  \"statute\",\n  \"statutory\",\n  \"staunch\",\n  \"stays\",\n  \"steadfast\",\n  \"steadier\",\n  \"steadily\",\n  \"steadying\",\n  \"steam\",\n  \"steed\",\n  \"steep\",\n  \"steerable\",\n  \"steering\",\n  \"steersman\",\n  \"stegosaur\",\n  \"stellar\",\n  \"stem\",\n  \"stench\",\n  \"stencil\",\n  \"step\",\n  \"stereo\",\n  \"sterile\",\n  \"sterility\",\n  \"sterilize\",\n  \"sterling\",\n  \"sternness\",\n  \"sternum\",\n  \"stew\",\n  \"stick\",\n  \"stiffen\",\n  \"stiffly\",\n  \"stiffness\",\n  \"stifle\",\n  \"stifling\",\n  \"stillness\",\n  \"stilt\",\n  \"stimulant\",\n  \"stimulate\",\n  \"stimuli\",\n  \"stimulus\",\n  \"stinger\",\n  \"stingily\",\n  \"stinging\",\n  \"stingray\",\n  \"stingy\",\n  \"stinking\",\n  \"stinky\",\n  \"stipend\",\n  \"stipulate\",\n  \"stir\",\n  \"stitch\",\n  \"stock\",\n  \"stoic\",\n  \"stoke\",\n  \"stole\",\n  \"stomp\",\n  \"stonewall\",\n  \"stoneware\",\n  \"stonework\",\n  \"stoning\",\n  \"stony\",\n  \"stood\",\n  \"stooge\",\n  \"stool\",\n  \"stoop\",\n  \"stoplight\",\n  \"stoppable\",\n  \"stoppage\",\n  \"stopped\",\n  \"stopper\",\n  \"stopping\",\n  \"stopwatch\",\n  \"storable\",\n  \"storage\",\n  \"storeroom\",\n  \"storewide\",\n  \"storm\",\n  \"stout\",\n  \"stove\",\n  \"stowaway\",\n  \"stowing\",\n  \"straddle\",\n  \"straggler\",\n  \"strained\",\n  \"strainer\",\n  \"straining\",\n  \"strangely\",\n  \"stranger\",\n  \"strangle\",\n  \"strategic\",\n  \"strategy\",\n  \"stratus\",\n  \"straw\",\n  \"stray\",\n  \"streak\",\n  \"stream\",\n  \"street\",\n  \"strength\",\n  \"strenuous\",\n  \"strep\",\n  \"stress\",\n  \"stretch\",\n  \"strewn\",\n  \"stricken\",\n  \"strict\",\n  \"stride\",\n  \"strife\",\n  \"strike\",\n  \"striking\",\n  \"strive\",\n  \"striving\",\n  \"strobe\",\n  \"strode\",\n  \"stroller\",\n  \"strongbox\",\n  \"strongly\",\n  \"strongman\",\n  \"struck\",\n  \"structure\",\n  \"strudel\",\n  \"struggle\",\n  \"strum\",\n  \"strung\",\n  \"strut\",\n  \"stubbed\",\n  \"stubble\",\n  \"stubbly\",\n  \"stubborn\",\n  \"stucco\",\n  \"stuck\",\n  \"student\",\n  \"studied\",\n  \"studio\",\n  \"study\",\n  \"stuffed\",\n  \"stuffing\",\n  \"stuffy\",\n  \"stumble\",\n  \"stumbling\",\n  \"stump\",\n  \"stung\",\n  \"stunned\",\n  \"stunner\",\n  \"stunning\",\n  \"stunt\",\n  \"stupor\",\n  \"sturdily\",\n  \"sturdy\",\n  \"styling\",\n  \"stylishly\",\n  \"stylist\",\n  \"stylized\",\n  \"stylus\",\n  \"suave\",\n  \"subarctic\",\n  \"subatomic\",\n  \"subdivide\",\n  \"subdued\",\n  \"subduing\",\n  \"subfloor\",\n  \"subgroup\",\n  \"subheader\",\n  \"subject\",\n  \"sublease\",\n  \"sublet\",\n  \"sublevel\",\n  \"sublime\",\n  \"submarine\",\n  \"submerge\",\n  \"submersed\",\n  \"submitter\",\n  \"subpanel\",\n  \"subpar\",\n  \"subplot\",\n  \"subprime\",\n  \"subscribe\",\n  \"subscript\",\n  \"subsector\",\n  \"subside\",\n  \"subsiding\",\n  \"subsidize\",\n  \"subsidy\",\n  \"subsoil\",\n  \"subsonic\",\n  \"substance\",\n  \"subsystem\",\n  \"subtext\",\n  \"subtitle\",\n  \"subtly\",\n  \"subtotal\",\n  \"subtract\",\n  \"subtype\",\n  \"suburb\",\n  \"subway\",\n  \"subwoofer\",\n  \"subzero\",\n  \"succulent\",\n  \"such\",\n  \"suction\",\n  \"sudden\",\n  \"sudoku\",\n  \"suds\",\n  \"sufferer\",\n  \"suffering\",\n  \"suffice\",\n  \"suffix\",\n  \"suffocate\",\n  \"suffrage\",\n  \"sugar\",\n  \"suggest\",\n  \"suing\",\n  \"suitable\",\n  \"suitably\",\n  \"suitcase\",\n  \"suitor\",\n  \"sulfate\",\n  \"sulfide\",\n  \"sulfite\",\n  \"sulfur\",\n  \"sulk\",\n  \"sullen\",\n  \"sulphate\",\n  \"sulphuric\",\n  \"sultry\",\n  \"superbowl\",\n  \"superglue\",\n  \"superhero\",\n  \"superior\",\n  \"superjet\",\n  \"superman\",\n  \"supermom\",\n  \"supernova\",\n  \"supervise\",\n  \"supper\",\n  \"supplier\",\n  \"supply\",\n  \"support\",\n  \"supremacy\",\n  \"supreme\",\n  \"surcharge\",\n  \"surely\",\n  \"sureness\",\n  \"surface\",\n  \"surfacing\",\n  \"surfboard\",\n  \"surfer\",\n  \"surgery\",\n  \"surgical\",\n  \"surging\",\n  \"surname\",\n  \"surpass\",\n  \"surplus\",\n  \"surprise\",\n  \"surreal\",\n  \"surrender\",\n  \"surrogate\",\n  \"surround\",\n  \"survey\",\n  \"survival\",\n  \"survive\",\n  \"surviving\",\n  \"survivor\",\n  \"sushi\",\n  \"suspect\",\n  \"suspend\",\n  \"suspense\",\n  \"sustained\",\n  \"sustainer\",\n  \"swab\",\n  \"swaddling\",\n  \"swagger\",\n  \"swampland\",\n  \"swan\",\n  \"swapping\",\n  \"swarm\",\n  \"sway\",\n  \"swear\",\n  \"sweat\",\n  \"sweep\",\n  \"swell\",\n  \"swept\",\n  \"swerve\",\n  \"swifter\",\n  \"swiftly\",\n  \"swiftness\",\n  \"swimmable\",\n  \"swimmer\",\n  \"swimming\",\n  \"swimsuit\",\n  \"swimwear\",\n  \"swinger\",\n  \"swinging\",\n  \"swipe\",\n  \"swirl\",\n  \"switch\",\n  \"swivel\",\n  \"swizzle\",\n  \"swooned\",\n  \"swoop\",\n  \"swoosh\",\n  \"swore\",\n  \"sworn\",\n  \"swung\",\n  \"sycamore\",\n  \"sympathy\",\n  \"symphonic\",\n  \"symphony\",\n  \"symptom\",\n  \"synapse\",\n  \"syndrome\",\n  \"synergy\",\n  \"synopses\",\n  \"synopsis\",\n  \"synthesis\",\n  \"synthetic\",\n  \"syrup\",\n  \"system\",\n  \"t-shirt\",\n  \"tabasco\",\n  \"tabby\",\n  \"tableful\",\n  \"tables\",\n  \"tablet\",\n  \"tableware\",\n  \"tabloid\",\n  \"tackiness\",\n  \"tacking\",\n  \"tackle\",\n  \"tackling\",\n  \"tacky\",\n  \"taco\",\n  \"tactful\",\n  \"tactical\",\n  \"tactics\",\n  \"tactile\",\n  \"tactless\",\n  \"tadpole\",\n  \"taekwondo\",\n  \"tag\",\n  \"tainted\",\n  \"take\",\n  \"taking\",\n  \"talcum\",\n  \"talisman\",\n  \"tall\",\n  \"talon\",\n  \"tamale\",\n  \"tameness\",\n  \"tamer\",\n  \"tamper\",\n  \"tank\",\n  \"tanned\",\n  \"tannery\",\n  \"tanning\",\n  \"tantrum\",\n  \"tapeless\",\n  \"tapered\",\n  \"tapering\",\n  \"tapestry\",\n  \"tapioca\",\n  \"tapping\",\n  \"taps\",\n  \"tarantula\",\n  \"target\",\n  \"tarmac\",\n  \"tarnish\",\n  \"tarot\",\n  \"tartar\",\n  \"tartly\",\n  \"tartness\",\n  \"task\",\n  \"tassel\",\n  \"taste\",\n  \"tastiness\",\n  \"tasting\",\n  \"tasty\",\n  \"tattered\",\n  \"tattle\",\n  \"tattling\",\n  \"tattoo\",\n  \"taunt\",\n  \"tavern\",\n  \"thank\",\n  \"that\",\n  \"thaw\",\n  \"theater\",\n  \"theatrics\",\n  \"thee\",\n  \"theft\",\n  \"theme\",\n  \"theology\",\n  \"theorize\",\n  \"thermal\",\n  \"thermos\",\n  \"thesaurus\",\n  \"these\",\n  \"thesis\",\n  \"thespian\",\n  \"thicken\",\n  \"thicket\",\n  \"thickness\",\n  \"thieving\",\n  \"thievish\",\n  \"thigh\",\n  \"thimble\",\n  \"thing\",\n  \"think\",\n  \"thinly\",\n  \"thinner\",\n  \"thinness\",\n  \"thinning\",\n  \"thirstily\",\n  \"thirsting\",\n  \"thirsty\",\n  \"thirteen\",\n  \"thirty\",\n  \"thong\",\n  \"thorn\",\n  \"those\",\n  \"thousand\",\n  \"thrash\",\n  \"thread\",\n  \"threaten\",\n  \"threefold\",\n  \"thrift\",\n  \"thrill\",\n  \"thrive\",\n  \"thriving\",\n  \"throat\",\n  \"throbbing\",\n  \"throng\",\n  \"throttle\",\n  \"throwaway\",\n  \"throwback\",\n  \"thrower\",\n  \"throwing\",\n  \"thud\",\n  \"thumb\",\n  \"thumping\",\n  \"thursday\",\n  \"thus\",\n  \"thwarting\",\n  \"thyself\",\n  \"tiara\",\n  \"tibia\",\n  \"tidal\",\n  \"tidbit\",\n  \"tidiness\",\n  \"tidings\",\n  \"tidy\",\n  \"tiger\",\n  \"tighten\",\n  \"tightly\",\n  \"tightness\",\n  \"tightrope\",\n  \"tightwad\",\n  \"tigress\",\n  \"tile\",\n  \"tiling\",\n  \"till\",\n  \"tilt\",\n  \"timid\",\n  \"timing\",\n  \"timothy\",\n  \"tinderbox\",\n  \"tinfoil\",\n  \"tingle\",\n  \"tingling\",\n  \"tingly\",\n  \"tinker\",\n  \"tinkling\",\n  \"tinsel\",\n  \"tinsmith\",\n  \"tint\",\n  \"tinwork\",\n  \"tiny\",\n  \"tipoff\",\n  \"tipped\",\n  \"tipper\",\n  \"tipping\",\n  \"tiptoeing\",\n  \"tiptop\",\n  \"tiring\",\n  \"tissue\",\n  \"trace\",\n  \"tracing\",\n  \"track\",\n  \"traction\",\n  \"tractor\",\n  \"trade\",\n  \"trading\",\n  \"tradition\",\n  \"traffic\",\n  \"tragedy\",\n  \"trailing\",\n  \"trailside\",\n  \"train\",\n  \"traitor\",\n  \"trance\",\n  \"tranquil\",\n  \"transfer\",\n  \"transform\",\n  \"translate\",\n  \"transpire\",\n  \"transport\",\n  \"transpose\",\n  \"trapdoor\",\n  \"trapeze\",\n  \"trapezoid\",\n  \"trapped\",\n  \"trapper\",\n  \"trapping\",\n  \"traps\",\n  \"trash\",\n  \"travel\",\n  \"traverse\",\n  \"travesty\",\n  \"tray\",\n  \"treachery\",\n  \"treading\",\n  \"treadmill\",\n  \"treason\",\n  \"treat\",\n  \"treble\",\n  \"tree\",\n  \"trekker\",\n  \"tremble\",\n  \"trembling\",\n  \"tremor\",\n  \"trench\",\n  \"trend\",\n  \"trespass\",\n  \"triage\",\n  \"trial\",\n  \"triangle\",\n  \"tribesman\",\n  \"tribunal\",\n  \"tribune\",\n  \"tributary\",\n  \"tribute\",\n  \"triceps\",\n  \"trickery\",\n  \"trickily\",\n  \"tricking\",\n  \"trickle\",\n  \"trickster\",\n  \"tricky\",\n  \"tricolor\",\n  \"tricycle\",\n  \"trident\",\n  \"tried\",\n  \"trifle\",\n  \"trifocals\",\n  \"trillion\",\n  \"trilogy\",\n  \"trimester\",\n  \"trimmer\",\n  \"trimming\",\n  \"trimness\",\n  \"trinity\",\n  \"trio\",\n  \"tripod\",\n  \"tripping\",\n  \"triumph\",\n  \"trivial\",\n  \"trodden\",\n  \"trolling\",\n  \"trombone\",\n  \"trophy\",\n  \"tropical\",\n  \"tropics\",\n  \"trouble\",\n  \"troubling\",\n  \"trough\",\n  \"trousers\",\n  \"trout\",\n  \"trowel\",\n  \"truce\",\n  \"truck\",\n  \"truffle\",\n  \"trump\",\n  \"trunks\",\n  \"trustable\",\n  \"trustee\",\n  \"trustful\",\n  \"trusting\",\n  \"trustless\",\n  \"truth\",\n  \"try\",\n  \"tubby\",\n  \"tubeless\",\n  \"tubular\",\n  \"tucking\",\n  \"tuesday\",\n  \"tug\",\n  \"tuition\",\n  \"tulip\",\n  \"tumble\",\n  \"tumbling\",\n  \"tummy\",\n  \"turban\",\n  \"turbine\",\n  \"turbofan\",\n  \"turbojet\",\n  \"turbulent\",\n  \"turf\",\n  \"turkey\",\n  \"turmoil\",\n  \"turret\",\n  \"turtle\",\n  \"tusk\",\n  \"tutor\",\n  \"tutu\",\n  \"tux\",\n  \"tweak\",\n  \"tweed\",\n  \"tweet\",\n  \"tweezers\",\n  \"twelve\",\n  \"twentieth\",\n  \"twenty\",\n  \"twerp\",\n  \"twice\",\n  \"twiddle\",\n  \"twiddling\",\n  \"twig\",\n  \"twilight\",\n  \"twine\",\n  \"twins\",\n  \"twirl\",\n  \"twistable\",\n  \"twisted\",\n  \"twister\",\n  \"twisting\",\n  \"twisty\",\n  \"twitch\",\n  \"twitter\",\n  \"tycoon\",\n  \"tying\",\n  \"tyke\",\n  \"udder\",\n  \"ultimate\",\n  \"ultimatum\",\n  \"ultra\",\n  \"umbilical\",\n  \"umbrella\",\n  \"umpire\",\n  \"unabashed\",\n  \"unable\",\n  \"unadorned\",\n  \"unadvised\",\n  \"unafraid\",\n  \"unaired\",\n  \"unaligned\",\n  \"unaltered\",\n  \"unarmored\",\n  \"unashamed\",\n  \"unaudited\",\n  \"unawake\",\n  \"unaware\",\n  \"unbaked\",\n  \"unbalance\",\n  \"unbeaten\",\n  \"unbend\",\n  \"unbent\",\n  \"unbiased\",\n  \"unbitten\",\n  \"unblended\",\n  \"unblessed\",\n  \"unblock\",\n  \"unbolted\",\n  \"unbounded\",\n  \"unboxed\",\n  \"unbraided\",\n  \"unbridle\",\n  \"unbroken\",\n  \"unbuckled\",\n  \"unbundle\",\n  \"unburned\",\n  \"unbutton\",\n  \"uncanny\",\n  \"uncapped\",\n  \"uncaring\",\n  \"uncertain\",\n  \"unchain\",\n  \"unchanged\",\n  \"uncharted\",\n  \"uncheck\",\n  \"uncivil\",\n  \"unclad\",\n  \"unclaimed\",\n  \"unclamped\",\n  \"unclasp\",\n  \"uncle\",\n  \"unclip\",\n  \"uncloak\",\n  \"unclog\",\n  \"unclothed\",\n  \"uncoated\",\n  \"uncoiled\",\n  \"uncolored\",\n  \"uncombed\",\n  \"uncommon\",\n  \"uncooked\",\n  \"uncork\",\n  \"uncorrupt\",\n  \"uncounted\",\n  \"uncouple\",\n  \"uncouth\",\n  \"uncover\",\n  \"uncross\",\n  \"uncrown\",\n  \"uncrushed\",\n  \"uncured\",\n  \"uncurious\",\n  \"uncurled\",\n  \"uncut\",\n  \"undamaged\",\n  \"undated\",\n  \"undaunted\",\n  \"undead\",\n  \"undecided\",\n  \"undefined\",\n  \"underage\",\n  \"underarm\",\n  \"undercoat\",\n  \"undercook\",\n  \"undercut\",\n  \"underdog\",\n  \"underdone\",\n  \"underfed\",\n  \"underfeed\",\n  \"underfoot\",\n  \"undergo\",\n  \"undergrad\",\n  \"underhand\",\n  \"underline\",\n  \"underling\",\n  \"undermine\",\n  \"undermost\",\n  \"underpaid\",\n  \"underpass\",\n  \"underpay\",\n  \"underrate\",\n  \"undertake\",\n  \"undertone\",\n  \"undertook\",\n  \"undertow\",\n  \"underuse\",\n  \"underwear\",\n  \"underwent\",\n  \"underwire\",\n  \"undesired\",\n  \"undiluted\",\n  \"undivided\",\n  \"undocked\",\n  \"undoing\",\n  \"undone\",\n  \"undrafted\",\n  \"undress\",\n  \"undrilled\",\n  \"undusted\",\n  \"undying\",\n  \"unearned\",\n  \"unearth\",\n  \"unease\",\n  \"uneasily\",\n  \"uneasy\",\n  \"uneatable\",\n  \"uneaten\",\n  \"unedited\",\n  \"unelected\",\n  \"unending\",\n  \"unengaged\",\n  \"unenvied\",\n  \"unequal\",\n  \"unethical\",\n  \"uneven\",\n  \"unexpired\",\n  \"unexposed\",\n  \"unfailing\",\n  \"unfair\",\n  \"unfasten\",\n  \"unfazed\",\n  \"unfeeling\",\n  \"unfiled\",\n  \"unfilled\",\n  \"unfitted\",\n  \"unfitting\",\n  \"unfixable\",\n  \"unfixed\",\n  \"unflawed\",\n  \"unfocused\",\n  \"unfold\",\n  \"unfounded\",\n  \"unframed\",\n  \"unfreeze\",\n  \"unfrosted\",\n  \"unfrozen\",\n  \"unfunded\",\n  \"unglazed\",\n  \"ungloved\",\n  \"unglue\",\n  \"ungodly\",\n  \"ungraded\",\n  \"ungreased\",\n  \"unguarded\",\n  \"unguided\",\n  \"unhappily\",\n  \"unhappy\",\n  \"unharmed\",\n  \"unhealthy\",\n  \"unheard\",\n  \"unhearing\",\n  \"unheated\",\n  \"unhelpful\",\n  \"unhidden\",\n  \"unhinge\",\n  \"unhitched\",\n  \"unholy\",\n  \"unhook\",\n  \"unicorn\",\n  \"unicycle\",\n  \"unified\",\n  \"unifier\",\n  \"uniformed\",\n  \"uniformly\",\n  \"unify\",\n  \"unimpeded\",\n  \"uninjured\",\n  \"uninstall\",\n  \"uninsured\",\n  \"uninvited\",\n  \"union\",\n  \"uniquely\",\n  \"unisexual\",\n  \"unison\",\n  \"unissued\",\n  \"unit\",\n  \"universal\",\n  \"universe\",\n  \"unjustly\",\n  \"unkempt\",\n  \"unkind\",\n  \"unknotted\",\n  \"unknowing\",\n  \"unknown\",\n  \"unlaced\",\n  \"unlatch\",\n  \"unlawful\",\n  \"unleaded\",\n  \"unlearned\",\n  \"unleash\",\n  \"unless\",\n  \"unleveled\",\n  \"unlighted\",\n  \"unlikable\",\n  \"unlimited\",\n  \"unlined\",\n  \"unlinked\",\n  \"unlisted\",\n  \"unlit\",\n  \"unlivable\",\n  \"unloaded\",\n  \"unloader\",\n  \"unlocked\",\n  \"unlocking\",\n  \"unlovable\",\n  \"unloved\",\n  \"unlovely\",\n  \"unloving\",\n  \"unluckily\",\n  \"unlucky\",\n  \"unmade\",\n  \"unmanaged\",\n  \"unmanned\",\n  \"unmapped\",\n  \"unmarked\",\n  \"unmasked\",\n  \"unmasking\",\n  \"unmatched\",\n  \"unmindful\",\n  \"unmixable\",\n  \"unmixed\",\n  \"unmolded\",\n  \"unmoral\",\n  \"unmovable\",\n  \"unmoved\",\n  \"unmoving\",\n  \"unnamable\",\n  \"unnamed\",\n  \"unnatural\",\n  \"unneeded\",\n  \"unnerve\",\n  \"unnerving\",\n  \"unnoticed\",\n  \"unopened\",\n  \"unopposed\",\n  \"unpack\",\n  \"unpadded\",\n  \"unpaid\",\n  \"unpainted\",\n  \"unpaired\",\n  \"unpaved\",\n  \"unpeeled\",\n  \"unpicked\",\n  \"unpiloted\",\n  \"unpinned\",\n  \"unplanned\",\n  \"unplanted\",\n  \"unpleased\",\n  \"unpledged\",\n  \"unplowed\",\n  \"unplug\",\n  \"unpopular\",\n  \"unproven\",\n  \"unquote\",\n  \"unranked\",\n  \"unrated\",\n  \"unraveled\",\n  \"unreached\",\n  \"unread\",\n  \"unreal\",\n  \"unreeling\",\n  \"unrefined\",\n  \"unrelated\",\n  \"unrented\",\n  \"unrest\",\n  \"unretired\",\n  \"unrevised\",\n  \"unrigged\",\n  \"unripe\",\n  \"unrivaled\",\n  \"unroasted\",\n  \"unrobed\",\n  \"unroll\",\n  \"unruffled\",\n  \"unruly\",\n  \"unrushed\",\n  \"unsaddle\",\n  \"unsafe\",\n  \"unsaid\",\n  \"unsalted\",\n  \"unsaved\",\n  \"unsavory\",\n  \"unscathed\",\n  \"unscented\",\n  \"unscrew\",\n  \"unsealed\",\n  \"unseated\",\n  \"unsecured\",\n  \"unseeing\",\n  \"unseemly\",\n  \"unseen\",\n  \"unselect\",\n  \"unselfish\",\n  \"unsent\",\n  \"unsettled\",\n  \"unshackle\",\n  \"unshaken\",\n  \"unshaved\",\n  \"unshaven\",\n  \"unsheathe\",\n  \"unshipped\",\n  \"unsightly\",\n  \"unsigned\",\n  \"unskilled\",\n  \"unsliced\",\n  \"unsmooth\",\n  \"unsnap\",\n  \"unsocial\",\n  \"unsoiled\",\n  \"unsold\",\n  \"unsolved\",\n  \"unsorted\",\n  \"unspoiled\",\n  \"unspoken\",\n  \"unstable\",\n  \"unstaffed\",\n  \"unstamped\",\n  \"unsteady\",\n  \"unsterile\",\n  \"unstirred\",\n  \"unstitch\",\n  \"unstopped\",\n  \"unstuck\",\n  \"unstuffed\",\n  \"unstylish\",\n  \"unsubtle\",\n  \"unsubtly\",\n  \"unsuited\",\n  \"unsure\",\n  \"unsworn\",\n  \"untagged\",\n  \"untainted\",\n  \"untaken\",\n  \"untamed\",\n  \"untangled\",\n  \"untapped\",\n  \"untaxed\",\n  \"unthawed\",\n  \"unthread\",\n  \"untidy\",\n  \"untie\",\n  \"until\",\n  \"untimed\",\n  \"untimely\",\n  \"untitled\",\n  \"untoasted\",\n  \"untold\",\n  \"untouched\",\n  \"untracked\",\n  \"untrained\",\n  \"untreated\",\n  \"untried\",\n  \"untrimmed\",\n  \"untrue\",\n  \"untruth\",\n  \"unturned\",\n  \"untwist\",\n  \"untying\",\n  \"unusable\",\n  \"unused\",\n  \"unusual\",\n  \"unvalued\",\n  \"unvaried\",\n  \"unvarying\",\n  \"unveiled\",\n  \"unveiling\",\n  \"unvented\",\n  \"unviable\",\n  \"unvisited\",\n  \"unvocal\",\n  \"unwanted\",\n  \"unwarlike\",\n  \"unwary\",\n  \"unwashed\",\n  \"unwatched\",\n  \"unweave\",\n  \"unwed\",\n  \"unwelcome\",\n  \"unwell\",\n  \"unwieldy\",\n  \"unwilling\",\n  \"unwind\",\n  \"unwired\",\n  \"unwitting\",\n  \"unwomanly\",\n  \"unworldly\",\n  \"unworn\",\n  \"unworried\",\n  \"unworthy\",\n  \"unwound\",\n  \"unwoven\",\n  \"unwrapped\",\n  \"unwritten\",\n  \"unzip\",\n  \"upbeat\",\n  \"upchuck\",\n  \"upcoming\",\n  \"upcountry\",\n  \"update\",\n  \"upfront\",\n  \"upgrade\",\n  \"upheaval\",\n  \"upheld\",\n  \"uphill\",\n  \"uphold\",\n  \"uplifted\",\n  \"uplifting\",\n  \"upload\",\n  \"upon\",\n  \"upper\",\n  \"upright\",\n  \"uprising\",\n  \"upriver\",\n  \"uproar\",\n  \"uproot\",\n  \"upscale\",\n  \"upside\",\n  \"upstage\",\n  \"upstairs\",\n  \"upstart\",\n  \"upstate\",\n  \"upstream\",\n  \"upstroke\",\n  \"upswing\",\n  \"uptake\",\n  \"uptight\",\n  \"uptown\",\n  \"upturned\",\n  \"upward\",\n  \"upwind\",\n  \"uranium\",\n  \"urban\",\n  \"urchin\",\n  \"urethane\",\n  \"urgency\",\n  \"urgent\",\n  \"urging\",\n  \"urologist\",\n  \"urology\",\n  \"usable\",\n  \"usage\",\n  \"useable\",\n  \"used\",\n  \"uselessly\",\n  \"user\",\n  \"usher\",\n  \"usual\",\n  \"utensil\",\n  \"utility\",\n  \"utilize\",\n  \"utmost\",\n  \"utopia\",\n  \"utter\",\n  \"vacancy\",\n  \"vacant\",\n  \"vacate\",\n  \"vacation\",\n  \"vagabond\",\n  \"vagrancy\",\n  \"vagrantly\",\n  \"vaguely\",\n  \"vagueness\",\n  \"valiant\",\n  \"valid\",\n  \"valium\",\n  \"valley\",\n  \"valuables\",\n  \"value\",\n  \"vanilla\",\n  \"vanish\",\n  \"vanity\",\n  \"vanquish\",\n  \"vantage\",\n  \"vaporizer\",\n  \"variable\",\n  \"variably\",\n  \"varied\",\n  \"variety\",\n  \"various\",\n  \"varmint\",\n  \"varnish\",\n  \"varsity\",\n  \"varying\",\n  \"vascular\",\n  \"vaseline\",\n  \"vastly\",\n  \"vastness\",\n  \"veal\",\n  \"vegan\",\n  \"veggie\",\n  \"vehicular\",\n  \"velcro\",\n  \"velocity\",\n  \"velvet\",\n  \"vendetta\",\n  \"vending\",\n  \"vendor\",\n  \"veneering\",\n  \"vengeful\",\n  \"venomous\",\n  \"ventricle\",\n  \"venture\",\n  \"venue\",\n  \"venus\",\n  \"verbalize\",\n  \"verbally\",\n  \"verbose\",\n  \"verdict\",\n  \"verify\",\n  \"verse\",\n  \"version\",\n  \"versus\",\n  \"vertebrae\",\n  \"vertical\",\n  \"vertigo\",\n  \"very\",\n  \"vessel\",\n  \"vest\",\n  \"veteran\",\n  \"veto\",\n  \"vexingly\",\n  \"viability\",\n  \"viable\",\n  \"vibes\",\n  \"vice\",\n  \"vicinity\",\n  \"victory\",\n  \"video\",\n  \"viewable\",\n  \"viewer\",\n  \"viewing\",\n  \"viewless\",\n  \"viewpoint\",\n  \"vigorous\",\n  \"village\",\n  \"villain\",\n  \"vindicate\",\n  \"vineyard\",\n  \"vintage\",\n  \"violate\",\n  \"violation\",\n  \"violator\",\n  \"violet\",\n  \"violin\",\n  \"viper\",\n  \"viral\",\n  \"virtual\",\n  \"virtuous\",\n  \"virus\",\n  \"visa\",\n  \"viscosity\",\n  \"viscous\",\n  \"viselike\",\n  \"visible\",\n  \"visibly\",\n  \"vision\",\n  \"visiting\",\n  \"visitor\",\n  \"visor\",\n  \"vista\",\n  \"vitality\",\n  \"vitalize\",\n  \"vitally\",\n  \"vitamins\",\n  \"vivacious\",\n  \"vividly\",\n  \"vividness\",\n  \"vixen\",\n  \"vocalist\",\n  \"vocalize\",\n  \"vocally\",\n  \"vocation\",\n  \"voice\",\n  \"voicing\",\n  \"void\",\n  \"volatile\",\n  \"volley\",\n  \"voltage\",\n  \"volumes\",\n  \"voter\",\n  \"voting\",\n  \"voucher\",\n  \"vowed\",\n  \"vowel\",\n  \"voyage\",\n  \"wackiness\",\n  \"wad\",\n  \"wafer\",\n  \"waffle\",\n  \"waged\",\n  \"wager\",\n  \"wages\",\n  \"waggle\",\n  \"wagon\",\n  \"wake\",\n  \"waking\",\n  \"walk\",\n  \"walmart\",\n  \"walnut\",\n  \"walrus\",\n  \"waltz\",\n  \"wand\",\n  \"wannabe\",\n  \"wanted\",\n  \"wanting\",\n  \"wasabi\",\n  \"washable\",\n  \"washbasin\",\n  \"washboard\",\n  \"washbowl\",\n  \"washcloth\",\n  \"washday\",\n  \"washed\",\n  \"washer\",\n  \"washhouse\",\n  \"washing\",\n  \"washout\",\n  \"washroom\",\n  \"washstand\",\n  \"washtub\",\n  \"wasp\",\n  \"wasting\",\n  \"watch\",\n  \"water\",\n  \"waviness\",\n  \"waving\",\n  \"wavy\",\n  \"whacking\",\n  \"whacky\",\n  \"wham\",\n  \"wharf\",\n  \"wheat\",\n  \"whenever\",\n  \"whiff\",\n  \"whimsical\",\n  \"whinny\",\n  \"whiny\",\n  \"whisking\",\n  \"whoever\",\n  \"whole\",\n  \"whomever\",\n  \"whoopee\",\n  \"whooping\",\n  \"whoops\",\n  \"why\",\n  \"wick\",\n  \"widely\",\n  \"widen\",\n  \"widget\",\n  \"widow\",\n  \"width\",\n  \"wieldable\",\n  \"wielder\",\n  \"wife\",\n  \"wifi\",\n  \"wikipedia\",\n  \"wildcard\",\n  \"wildcat\",\n  \"wilder\",\n  \"wildfire\",\n  \"wildfowl\",\n  \"wildland\",\n  \"wildlife\",\n  \"wildly\",\n  \"wildness\",\n  \"willed\",\n  \"willfully\",\n  \"willing\",\n  \"willow\",\n  \"willpower\",\n  \"wilt\",\n  \"wimp\",\n  \"wince\",\n  \"wincing\",\n  \"wind\",\n  \"wing\",\n  \"winking\",\n  \"winner\",\n  \"winnings\",\n  \"winter\",\n  \"wipe\",\n  \"wired\",\n  \"wireless\",\n  \"wiring\",\n  \"wiry\",\n  \"wisdom\",\n  \"wise\",\n  \"wish\",\n  \"wisplike\",\n  \"wispy\",\n  \"wistful\",\n  \"wizard\",\n  \"wobble\",\n  \"wobbling\",\n  \"wobbly\",\n  \"wok\",\n  \"wolf\",\n  \"wolverine\",\n  \"womanhood\",\n  \"womankind\",\n  \"womanless\",\n  \"womanlike\",\n  \"womanly\",\n  \"womb\",\n  \"woof\",\n  \"wooing\",\n  \"wool\",\n  \"woozy\",\n  \"word\",\n  \"work\",\n  \"worried\",\n  \"worrier\",\n  \"worrisome\",\n  \"worry\",\n  \"worsening\",\n  \"worshiper\",\n  \"worst\",\n  \"wound\",\n  \"woven\",\n  \"wow\",\n  \"wrangle\",\n  \"wrath\",\n  \"wreath\",\n  \"wreckage\",\n  \"wrecker\",\n  \"wrecking\",\n  \"wrench\",\n  \"wriggle\",\n  \"wriggly\",\n  \"wrinkle\",\n  \"wrinkly\",\n  \"wrist\",\n  \"writing\",\n  \"written\",\n  \"wrongdoer\",\n  \"wronged\",\n  \"wrongful\",\n  \"wrongly\",\n  \"wrongness\",\n  \"wrought\",\n  \"xbox\",\n  \"xerox\",\n  \"yahoo\",\n  \"yam\",\n  \"yanking\",\n  \"yapping\",\n  \"yard\",\n  \"yarn\",\n  \"yeah\",\n  \"yearbook\",\n  \"yearling\",\n  \"yearly\",\n  \"yearning\",\n  \"yeast\",\n  \"yelling\",\n  \"yelp\",\n  \"yen\",\n  \"yesterday\",\n  \"yiddish\",\n  \"yield\",\n  \"yin\",\n  \"yippee\",\n  \"yo-yo\",\n  \"yodel\",\n  \"yoga\",\n  \"yogurt\",\n  \"yonder\",\n  \"yoyo\",\n  \"yummy\",\n  \"zap\",\n  \"zealous\",\n  \"zebra\",\n  \"zen\",\n  \"zeppelin\",\n  \"zero\",\n  \"zestfully\",\n  \"zesty\",\n  \"zigzagged\",\n  \"zipfile\",\n  \"zipping\",\n  \"zippy\",\n  \"zips\",\n  \"zit\",\n  \"zodiac\",\n  \"zombie\",\n  \"zone\",\n  \"zoning\",\n  \"zookeeper\",\n  \"zoologist\",\n  \"zoology\",\n  \"zoom\",\n];\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { DeepJsonify } from \"../../../types/deep-jsonify\";\nimport { Utils } from \"../../misc/utils\";\n\nimport { SymmetricCryptoKey } from \"./symmetric-crypto-key\";\n\nexport class EncryptionPair<TEncrypted, TDecrypted> {\n  encrypted?: TEncrypted;\n  decrypted?: TDecrypted;\n\n  toJSON() {\n    return {\n      encrypted: this.encrypted,\n      decrypted:\n        this.decrypted instanceof ArrayBuffer\n          ? Utils.fromBufferToByteString(this.decrypted)\n          : this.decrypted,\n    };\n  }\n\n  static fromJSON<TEncrypted, TDecrypted>(\n    obj: { encrypted?: Jsonify<TEncrypted>; decrypted?: string | Jsonify<TDecrypted> },\n    decryptedFromJson?: (decObj: Jsonify<TDecrypted> | string) => TDecrypted,\n    encryptedFromJson?: (encObj: Jsonify<TEncrypted>) => TEncrypted,\n  ) {\n    if (obj == null) {\n      return null;\n    }\n\n    const pair = new EncryptionPair<TEncrypted, TDecrypted>();\n    if (obj?.encrypted != null) {\n      pair.encrypted = encryptedFromJson\n        ? encryptedFromJson(obj.encrypted)\n        : (obj.encrypted as TEncrypted);\n    }\n    if (obj?.decrypted != null) {\n      pair.decrypted = decryptedFromJson\n        ? decryptedFromJson(obj.decrypted)\n        : (obj.decrypted as TDecrypted);\n    }\n    return pair;\n  }\n}\n\nexport class AccountKeys {\n  publicKey?: Uint8Array;\n\n  /** @deprecated July 2023, left for migration purposes*/\n  cryptoMasterKeyAuto?: string;\n  /** @deprecated July 2023, left for migration purposes*/\n  cryptoSymmetricKey?: EncryptionPair<string, SymmetricCryptoKey> = new EncryptionPair<\n    string,\n    SymmetricCryptoKey\n  >();\n\n  toJSON() {\n    // If you pass undefined into fromBufferToByteString, you will get an empty string back\n    // which will cause all sorts of headaches down the line when you try to getPublicKey\n    // and expect a Uint8Array and get an empty string instead.\n    return Utils.merge(this, {\n      publicKey: this.publicKey ? Utils.fromBufferToByteString(this.publicKey) : undefined,\n    });\n  }\n\n  static fromJSON(obj: DeepJsonify<AccountKeys>): AccountKeys {\n    if (obj == null) {\n      return null;\n    }\n    return Object.assign(new AccountKeys(), obj, {\n      cryptoSymmetricKey: EncryptionPair.fromJSON(\n        obj?.cryptoSymmetricKey,\n        SymmetricCryptoKey.fromJSON,\n      ),\n      publicKey: Utils.fromByteStringToArray(obj?.publicKey),\n    });\n  }\n\n  static initRecordEncryptionPairsFromJSON(obj: any) {\n    return EncryptionPair.fromJSON(obj, (decObj: any) => {\n      if (obj == null) {\n        return null;\n      }\n\n      const record: Record<string, SymmetricCryptoKey> = {};\n      for (const id in decObj) {\n        record[id] = SymmetricCryptoKey.fromJSON(decObj[id]);\n      }\n      return record;\n    });\n  }\n}\n\nexport class AccountProfile {\n  name?: string;\n  email?: string;\n  emailVerified?: boolean;\n  userId?: string;\n\n  static fromJSON(obj: Jsonify<AccountProfile>): AccountProfile {\n    if (obj == null) {\n      return null;\n    }\n\n    return Object.assign(new AccountProfile(), obj);\n  }\n}\n\nexport class Account {\n  keys?: AccountKeys = new AccountKeys();\n  profile?: AccountProfile = new AccountProfile();\n\n  constructor(init: Partial<Account>) {\n    Object.assign(this, {\n      keys: {\n        ...new AccountKeys(),\n        ...init?.keys,\n      },\n      profile: {\n        ...new AccountProfile(),\n        ...init?.profile,\n      },\n    });\n  }\n\n  static fromJSON(json: Jsonify<Account>): Account {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new Account({}), json, {\n      keys: AccountKeys.fromJSON(json?.keys),\n      profile: AccountProfile.fromJSON(json?.profile),\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ConditionalExcept, ConditionalKeys, Constructor } from \"type-fest\";\n\nimport { View } from \"../../../models/view/view\";\nimport { EncryptService } from \"../../abstractions/encrypt.service\";\n\nimport { EncString } from \"./enc-string\";\nimport { SymmetricCryptoKey } from \"./symmetric-crypto-key\";\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype EncStringKeys<T> = ConditionalKeys<ConditionalExcept<T, Function>, EncString>;\nexport type DecryptedObject<\n  TEncryptedObject,\n  TDecryptedKeys extends EncStringKeys<TEncryptedObject>,\n> = Record<TDecryptedKeys, string> & Omit<TEncryptedObject, TDecryptedKeys>;\n\n// https://contributing.bitwarden.com/architecture/clients/data-model#domain\nexport default class Domain {\n  protected buildDomainModel<D extends Domain>(\n    domain: D,\n    dataObj: any,\n    map: any,\n    notEncList: any[] = [],\n  ) {\n    for (const prop in map) {\n      // eslint-disable-next-line\n      if (!map.hasOwnProperty(prop)) {\n        continue;\n      }\n\n      const objProp = dataObj[map[prop] || prop];\n      if (notEncList.indexOf(prop) > -1) {\n        (domain as any)[prop] = objProp ? objProp : null;\n      } else {\n        (domain as any)[prop] = objProp ? new EncString(objProp) : null;\n      }\n    }\n  }\n  protected buildDataModel<D extends Domain>(\n    domain: D,\n    dataObj: any,\n    map: any,\n    notEncStringList: any[] = [],\n  ) {\n    for (const prop in map) {\n      // eslint-disable-next-line\n      if (!map.hasOwnProperty(prop)) {\n        continue;\n      }\n\n      const objProp = (domain as any)[map[prop] || prop];\n      if (notEncStringList.indexOf(prop) > -1) {\n        (dataObj as any)[prop] = objProp != null ? objProp : null;\n      } else {\n        (dataObj as any)[prop] = objProp != null ? (objProp as EncString).encryptedString : null;\n      }\n    }\n  }\n\n  protected async decryptObj<T extends View>(\n    viewModel: T,\n    map: any,\n    orgId: string,\n    key: SymmetricCryptoKey = null,\n    objectContext: string = \"No Domain Context\",\n  ): Promise<T> {\n    const promises = [];\n    const self: any = this;\n\n    for (const prop in map) {\n      // eslint-disable-next-line\n      if (!map.hasOwnProperty(prop)) {\n        continue;\n      }\n\n      (function (theProp) {\n        const p = Promise.resolve()\n          .then(() => {\n            const mapProp = map[theProp] || theProp;\n            if (self[mapProp]) {\n              return self[mapProp].decrypt(\n                orgId,\n                key,\n                `Property: ${prop}; ObjectContext: ${objectContext}`,\n              );\n            }\n            return null;\n          })\n          .then((val: any) => {\n            (viewModel as any)[theProp] = val;\n          });\n        promises.push(p);\n      })(prop);\n    }\n\n    await Promise.all(promises);\n    return viewModel;\n  }\n\n  /**\n   * Decrypts the requested properties of the domain object with the provided key and encrypt service.\n   *\n   * If a property is null, the result will be null.\n   * @see {@link EncString.decryptWithKey} for more details on decryption behavior.\n   *\n   * @param encryptedProperties The properties to decrypt. Type restricted to EncString properties of the domain object.\n   * @param key The key to use for decryption.\n   * @param encryptService The encryption service to use for decryption.\n   * @param _ The constructor of the domain object. Used for type inference if the domain object is not automatically inferred.\n   * @returns An object with the requested properties decrypted and the rest of the domain object untouched.\n   */\n  protected async decryptObjWithKey<\n    TThis extends Domain,\n    const TEncryptedKeys extends EncStringKeys<TThis>,\n  >(\n    this: TThis,\n    encryptedProperties: TEncryptedKeys[],\n    key: SymmetricCryptoKey,\n    encryptService: EncryptService,\n    _: Constructor<TThis> = this.constructor as Constructor<TThis>,\n    objectContext: string = \"No Domain Context\",\n  ): Promise<DecryptedObject<TThis, TEncryptedKeys>> {\n    const promises = [];\n\n    for (const prop of encryptedProperties) {\n      const value = (this as any)[prop] as EncString;\n      promises.push(\n        this.decryptProperty(\n          prop,\n          value,\n          key,\n          encryptService,\n          `Property: ${prop.toString()}; ObjectContext: ${objectContext}`,\n        ),\n      );\n    }\n\n    const decryptedObjects = await Promise.all(promises);\n    const decryptedObject = decryptedObjects.reduce(\n      (acc, obj) => {\n        return { ...acc, ...obj };\n      },\n      { ...this },\n    );\n    return decryptedObject as DecryptedObject<TThis, TEncryptedKeys>;\n  }\n\n  private async decryptProperty<const TEncryptedKeys extends EncStringKeys<this>>(\n    propertyKey: TEncryptedKeys,\n    value: EncString,\n    key: SymmetricCryptoKey,\n    encryptService: EncryptService,\n    decryptTrace: string,\n  ) {\n    let decrypted: string = null;\n    if (value) {\n      decrypted = await value.decryptWithKey(key, encryptService, decryptTrace);\n    } else {\n      decrypted = null;\n    }\n    return {\n      [propertyKey]: decrypted,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncryptionType } from \"../../enums\";\nimport { Encrypted } from \"../../interfaces/encrypted\";\n\nconst ENC_TYPE_LENGTH = 1;\nconst IV_LENGTH = 16;\nconst MAC_LENGTH = 32;\nconst MIN_DATA_LENGTH = 1;\n\nexport class EncArrayBuffer implements Encrypted {\n  readonly encryptionType: EncryptionType = null;\n  readonly dataBytes: Uint8Array = null;\n  readonly ivBytes: Uint8Array = null;\n  readonly macBytes: Uint8Array = null;\n\n  constructor(readonly buffer: Uint8Array) {\n    const encBytes = buffer;\n    const encType = encBytes[0];\n\n    switch (encType) {\n      case EncryptionType.AesCbc128_HmacSha256_B64:\n      case EncryptionType.AesCbc256_HmacSha256_B64: {\n        const minimumLength = ENC_TYPE_LENGTH + IV_LENGTH + MAC_LENGTH + MIN_DATA_LENGTH;\n        if (encBytes.length < minimumLength) {\n          this.throwDecryptionError();\n        }\n\n        this.ivBytes = encBytes.slice(ENC_TYPE_LENGTH, ENC_TYPE_LENGTH + IV_LENGTH);\n        this.macBytes = encBytes.slice(\n          ENC_TYPE_LENGTH + IV_LENGTH,\n          ENC_TYPE_LENGTH + IV_LENGTH + MAC_LENGTH,\n        );\n        this.dataBytes = encBytes.slice(ENC_TYPE_LENGTH + IV_LENGTH + MAC_LENGTH);\n        break;\n      }\n      case EncryptionType.AesCbc256_B64: {\n        const minimumLength = ENC_TYPE_LENGTH + IV_LENGTH + MIN_DATA_LENGTH;\n        if (encBytes.length < minimumLength) {\n          this.throwDecryptionError();\n        }\n\n        this.ivBytes = encBytes.slice(ENC_TYPE_LENGTH, ENC_TYPE_LENGTH + IV_LENGTH);\n        this.dataBytes = encBytes.slice(ENC_TYPE_LENGTH + IV_LENGTH);\n        break;\n      }\n      default:\n        this.throwDecryptionError();\n    }\n\n    this.encryptionType = encType;\n  }\n\n  private throwDecryptionError() {\n    throw new Error(\n      \"Error parsing encrypted ArrayBuffer: data is corrupted or has an invalid format.\",\n    );\n  }\n\n  static async fromResponse(response: {\n    arrayBuffer: () => Promise<ArrayBuffer>;\n  }): Promise<EncArrayBuffer> {\n    const buffer = await response.arrayBuffer();\n    if (buffer == null) {\n      throw new Error(\"Cannot create EncArrayBuffer from Response - Response is empty\");\n    }\n    return new EncArrayBuffer(new Uint8Array(buffer));\n  }\n\n  static fromB64(b64: string) {\n    const buffer = Utils.fromB64ToArray(b64);\n    return new EncArrayBuffer(buffer);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify, Opaque } from \"type-fest\";\n\nimport { EncryptService } from \"../../abstractions/encrypt.service\";\nimport { EncryptionType, EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE } from \"../../enums\";\nimport { Encrypted } from \"../../interfaces/encrypted\";\nimport { Utils } from \"../../misc/utils\";\n\nimport { SymmetricCryptoKey } from \"./symmetric-crypto-key\";\n\nexport const DECRYPT_ERROR = \"[error: cannot decrypt]\";\n\nexport class EncString implements Encrypted {\n  encryptedString?: EncryptedString;\n  encryptionType?: EncryptionType;\n  decryptedValue?: string;\n  data?: string;\n  iv?: string;\n  mac?: string;\n\n  constructor(\n    encryptedStringOrType: string | EncryptionType,\n    data?: string,\n    iv?: string,\n    mac?: string,\n  ) {\n    if (data != null) {\n      this.initFromData(encryptedStringOrType as EncryptionType, data, iv, mac);\n    } else {\n      this.initFromEncryptedString(encryptedStringOrType as string);\n    }\n  }\n\n  get ivBytes(): Uint8Array {\n    return this.iv == null ? null : Utils.fromB64ToArray(this.iv);\n  }\n\n  get macBytes(): Uint8Array {\n    return this.mac == null ? null : Utils.fromB64ToArray(this.mac);\n  }\n\n  get dataBytes(): Uint8Array {\n    return this.data == null ? null : Utils.fromB64ToArray(this.data);\n  }\n\n  toJSON() {\n    return this.encryptedString as string;\n  }\n\n  static fromJSON(obj: Jsonify<EncString>): EncString {\n    if (obj == null) {\n      return null;\n    }\n\n    return new EncString(obj);\n  }\n\n  private initFromData(encType: EncryptionType, data: string, iv: string, mac: string) {\n    if (iv != null) {\n      this.encryptedString = (encType + \".\" + iv + \"|\" + data) as EncryptedString;\n    } else {\n      this.encryptedString = (encType + \".\" + data) as EncryptedString;\n    }\n\n    // mac\n    if (mac != null) {\n      this.encryptedString = (this.encryptedString + \"|\" + mac) as EncryptedString;\n    }\n\n    this.encryptionType = encType;\n    this.data = data;\n    this.iv = iv;\n    this.mac = mac;\n  }\n\n  private initFromEncryptedString(encryptedString: string) {\n    this.encryptedString = encryptedString as EncryptedString;\n    if (!this.encryptedString) {\n      return;\n    }\n\n    const { encType, encPieces } = EncString.parseEncryptedString(this.encryptedString);\n\n    this.encryptionType = encType;\n\n    if (encPieces.length !== EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE[encType]) {\n      return;\n    }\n\n    switch (encType) {\n      case EncryptionType.AesCbc128_HmacSha256_B64:\n      case EncryptionType.AesCbc256_HmacSha256_B64:\n        this.iv = encPieces[0];\n        this.data = encPieces[1];\n        this.mac = encPieces[2];\n        break;\n      case EncryptionType.AesCbc256_B64:\n        this.iv = encPieces[0];\n        this.data = encPieces[1];\n        break;\n      case EncryptionType.Rsa2048_OaepSha256_B64:\n      case EncryptionType.Rsa2048_OaepSha1_B64:\n        this.data = encPieces[0];\n        break;\n      case EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64:\n      case EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64:\n        this.data = encPieces[0];\n        this.mac = encPieces[1];\n        break;\n      default:\n        return;\n    }\n  }\n\n  private static parseEncryptedString(encryptedString: string): {\n    encType: EncryptionType;\n    encPieces: string[];\n  } {\n    const headerPieces = encryptedString.split(\".\");\n    let encType: EncryptionType;\n    let encPieces: string[] = null;\n\n    if (headerPieces.length === 2) {\n      try {\n        encType = parseInt(headerPieces[0], null);\n        encPieces = headerPieces[1].split(\"|\");\n      } catch (e) {\n        return { encType: NaN, encPieces: [] };\n      }\n    } else {\n      encPieces = encryptedString.split(\"|\");\n      encType =\n        encPieces.length === 3\n          ? EncryptionType.AesCbc128_HmacSha256_B64\n          : EncryptionType.AesCbc256_B64;\n    }\n\n    return {\n      encType,\n      encPieces,\n    };\n  }\n\n  static isSerializedEncString(s: string): boolean {\n    if (s == null) {\n      return false;\n    }\n\n    const { encType, encPieces } = this.parseEncryptedString(s);\n\n    if (isNaN(encType) || encPieces.length === 0) {\n      return false;\n    }\n\n    return EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE[encType] === encPieces.length;\n  }\n\n  async decrypt(orgId: string, key: SymmetricCryptoKey = null, context?: string): Promise<string> {\n    if (this.decryptedValue != null) {\n      return this.decryptedValue;\n    }\n\n    let decryptTrace = \"provided-key\";\n    try {\n      if (key == null) {\n        key = await this.getKeyForDecryption(orgId);\n        decryptTrace = orgId == null ? `domain-orgkey-${orgId}` : \"domain-userkey|masterkey\";\n        if (orgId != null) {\n          decryptTrace = `domain-orgkey-${orgId}`;\n        } else {\n          const cryptoService = Utils.getContainerService().getKeyService();\n          decryptTrace =\n            (await cryptoService.getUserKey()) == null\n              ? \"domain-withlegacysupport-masterkey\"\n              : \"domain-withlegacysupport-userkey\";\n        }\n      }\n      if (key == null) {\n        throw new Error(\"No key to decrypt EncString with orgId \" + orgId);\n      }\n\n      const encryptService = Utils.getContainerService().getEncryptService();\n      this.decryptedValue = await encryptService.decryptToUtf8(\n        this,\n        key,\n        decryptTrace == null ? context : `${decryptTrace}${context || \"\"}`,\n      );\n    } catch (e) {\n      this.decryptedValue = DECRYPT_ERROR;\n    }\n    return this.decryptedValue;\n  }\n\n  async decryptWithKey(\n    key: SymmetricCryptoKey,\n    encryptService: EncryptService,\n    decryptTrace: string = \"domain-withkey\",\n  ): Promise<string> {\n    try {\n      if (key == null) {\n        throw new Error(\"No key to decrypt EncString\");\n      }\n\n      this.decryptedValue = await encryptService.decryptToUtf8(this, key, decryptTrace);\n    } catch (e) {\n      this.decryptedValue = DECRYPT_ERROR;\n    }\n\n    return this.decryptedValue;\n  }\n  private async getKeyForDecryption(orgId: string) {\n    const keyService = Utils.getContainerService().getKeyService();\n    return orgId != null\n      ? await keyService.getOrgKey(orgId)\n      : await keyService.getUserKeyWithLegacySupport();\n  }\n}\n\nexport type EncryptedString = Opaque<string, \"EncString\">;\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { EncryptionType } from \"../../enums\";\n\nexport class SymmetricCryptoKey {\n  key: Uint8Array;\n  encKey: Uint8Array;\n  macKey?: Uint8Array;\n  encType: EncryptionType;\n\n  keyB64: string;\n  encKeyB64: string;\n  macKeyB64: string;\n\n  meta: any;\n\n  constructor(key: Uint8Array, encType?: EncryptionType) {\n    if (key == null) {\n      throw new Error(\"Must provide key\");\n    }\n\n    if (encType == null) {\n      if (key.byteLength === 32) {\n        encType = EncryptionType.AesCbc256_B64;\n      } else if (key.byteLength === 64) {\n        encType = EncryptionType.AesCbc256_HmacSha256_B64;\n      } else {\n        throw new Error(\"Unable to determine encType.\");\n      }\n    }\n\n    this.key = key;\n    this.encType = encType;\n\n    if (encType === EncryptionType.AesCbc256_B64 && key.byteLength === 32) {\n      this.encKey = key;\n      this.macKey = null;\n    } else if (encType === EncryptionType.AesCbc128_HmacSha256_B64 && key.byteLength === 32) {\n      this.encKey = key.slice(0, 16);\n      this.macKey = key.slice(16, 32);\n    } else if (encType === EncryptionType.AesCbc256_HmacSha256_B64 && key.byteLength === 64) {\n      this.encKey = key.slice(0, 32);\n      this.macKey = key.slice(32, 64);\n    } else {\n      throw new Error(\"Unsupported encType/key length.\");\n    }\n\n    this.keyB64 = Utils.fromBufferToB64(this.key);\n    this.encKeyB64 = Utils.fromBufferToB64(this.encKey);\n    if (this.macKey != null) {\n      this.macKeyB64 = Utils.fromBufferToB64(this.macKey);\n    }\n  }\n\n  toJSON() {\n    // The whole object is constructed from the initial key, so just store the B64 key\n    return { keyB64: this.keyB64 };\n  }\n\n  static fromString(s: string): SymmetricCryptoKey {\n    if (s == null) {\n      return null;\n    }\n\n    const arrayBuffer = Utils.fromB64ToArray(s);\n    return new SymmetricCryptoKey(arrayBuffer);\n  }\n\n  static fromJSON(obj: Jsonify<SymmetricCryptoKey>): SymmetricCryptoKey {\n    return SymmetricCryptoKey.fromString(obj?.keyB64);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Subscription } from \"rxjs\";\n\nimport { ScheduledTaskName } from \"./scheduled-task-name.enum\";\n\nexport abstract class TaskSchedulerService {\n  protected taskHandlers: Map<string, () => void>;\n  abstract setTimeout(taskName: ScheduledTaskName, delayInMs: number): Subscription;\n  abstract setInterval(\n    taskName: ScheduledTaskName,\n    intervalInMs: number,\n    initialDelayInMs?: number,\n  ): Subscription;\n  abstract registerTaskHandler(taskName: ScheduledTaskName, handler: () => void): void;\n  abstract unregisterTaskHandler(taskName: ScheduledTaskName): void;\n  protected abstract triggerTask(taskName: ScheduledTaskName, periodInMinutes?: number): void;\n}\n","import { Subscription } from \"rxjs\";\n\nimport { LogService } from \"../abstractions/log.service\";\nimport { ScheduledTaskName } from \"../scheduling/scheduled-task-name.enum\";\nimport { TaskSchedulerService } from \"../scheduling/task-scheduler.service\";\n\nexport class DefaultTaskSchedulerService extends TaskSchedulerService {\n  constructor(protected logService: LogService) {\n    super();\n\n    this.taskHandlers = new Map();\n  }\n\n  /**\n   * Sets a timeout and returns the timeout id.\n   *\n   * @param taskName - The name of the task. Unused in the base implementation.\n   * @param delayInMs - The delay in milliseconds.\n   */\n  setTimeout(taskName: ScheduledTaskName, delayInMs: number): Subscription {\n    this.validateRegisteredTask(taskName);\n\n    const timeoutHandle = globalThis.setTimeout(() => this.triggerTask(taskName), delayInMs);\n    return new Subscription(() => globalThis.clearTimeout(timeoutHandle));\n  }\n\n  /**\n   * Sets an interval and returns the interval id.\n   *\n   * @param taskName - The name of the task. Unused in the base implementation.\n   * @param intervalInMs - The interval in milliseconds.\n   * @param _initialDelayInMs - The initial delay in milliseconds. Unused in the base implementation.\n   */\n  setInterval(\n    taskName: ScheduledTaskName,\n    intervalInMs: number,\n    _initialDelayInMs?: number,\n  ): Subscription {\n    this.validateRegisteredTask(taskName);\n\n    const intervalHandle = globalThis.setInterval(() => this.triggerTask(taskName), intervalInMs);\n\n    return new Subscription(() => globalThis.clearInterval(intervalHandle));\n  }\n\n  /**\n   * Registers a task handler.\n   *\n   * @param taskName - The name of the task.\n   * @param handler - The task handler.\n   */\n  registerTaskHandler(taskName: ScheduledTaskName, handler: () => void) {\n    const existingHandler = this.taskHandlers.get(taskName);\n    if (existingHandler) {\n      this.logService.warning(`Task handler for ${taskName} already exists. Overwriting.`);\n      this.unregisterTaskHandler(taskName);\n    }\n\n    this.taskHandlers.set(taskName, handler);\n  }\n\n  /**\n   * Unregisters a task handler.\n   *\n   * @param taskName - The name of the task.\n   */\n  unregisterTaskHandler(taskName: ScheduledTaskName) {\n    this.taskHandlers.delete(taskName);\n  }\n\n  /**\n   * Triggers a task.\n   *\n   * @param taskName - The name of the task.\n   * @param _periodInMinutes - The period in minutes. Unused in the base implementation.\n   */\n  protected async triggerTask(\n    taskName: ScheduledTaskName,\n    _periodInMinutes?: number,\n  ): Promise<void> {\n    const handler = this.taskHandlers.get(taskName);\n    if (handler) {\n      handler();\n    }\n  }\n\n  /**\n   * Validates that a task handler is registered.\n   *\n   * @param taskName - The name of the task.\n   */\n  protected validateRegisteredTask(taskName: ScheduledTaskName): void {\n    if (!this.taskHandlers.has(taskName)) {\n      throw new Error(`Task handler for ${taskName} not registered. Unable to schedule task.`);\n    }\n  }\n}\n","export const ScheduledTaskNames = {\n  generatePasswordClearClipboardTimeout: \"generatePasswordClearClipboardTimeout\",\n  systemClearClipboardTimeout: \"systemClearClipboardTimeout\",\n  loginStrategySessionTimeout: \"loginStrategySessionTimeout\",\n  notificationsReconnectTimeout: \"notificationsReconnectTimeout\",\n  fido2ClientAbortTimeout: \"fido2ClientAbortTimeout\",\n  scheduleNextSyncInterval: \"scheduleNextSyncInterval\",\n  eventUploadsInterval: \"eventUploadsInterval\",\n  vaultTimeoutCheckInterval: \"vaultTimeoutCheckInterval\",\n} as const;\n\nexport type ScheduledTaskName = (typeof ScheduledTaskNames)[keyof typeof ScheduledTaskNames];\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LogService as LogServiceAbstraction } from \"../abstractions/log.service\";\nimport { LogLevelType } from \"../enums/log-level-type.enum\";\n\nexport class ConsoleLogService implements LogServiceAbstraction {\n  protected timersMap: Map<string, [number, number]> = new Map();\n\n  constructor(\n    protected isDev: boolean,\n    protected filter: (level: LogLevelType) => boolean = null,\n  ) {}\n\n  debug(message?: any, ...optionalParams: any[]) {\n    if (!this.isDev) {\n      return;\n    }\n    this.write(LogLevelType.Debug, message, ...optionalParams);\n  }\n\n  info(message?: any, ...optionalParams: any[]) {\n    this.write(LogLevelType.Info, message, ...optionalParams);\n  }\n\n  warning(message?: any, ...optionalParams: any[]) {\n    this.write(LogLevelType.Warning, message, ...optionalParams);\n  }\n\n  error(message?: any, ...optionalParams: any[]) {\n    this.write(LogLevelType.Error, message, ...optionalParams);\n  }\n\n  write(level: LogLevelType, message?: any, ...optionalParams: any[]) {\n    if (this.filter != null && this.filter(level)) {\n      return;\n    }\n\n    switch (level) {\n      case LogLevelType.Debug:\n        // eslint-disable-next-line\n        console.log(message, ...optionalParams);\n        break;\n      case LogLevelType.Info:\n        // eslint-disable-next-line\n        console.log(message, ...optionalParams);\n        break;\n      case LogLevelType.Warning:\n        // eslint-disable-next-line\n        console.warn(message, ...optionalParams);\n        break;\n      case LogLevelType.Error:\n        // eslint-disable-next-line\n        console.error(message, ...optionalParams);\n        break;\n      default:\n        break;\n    }\n  }\n}\n","export enum InitializerKey {\n  Cipher = 0,\n  CipherView = 1,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\nimport { map } from \"rxjs/operators\";\n\nimport { ConfigService } from \"../abstractions/config/config.service\";\nimport { ServerSettings } from \"../models/domain/server-settings\";\n\nexport class DefaultServerSettingsService {\n  constructor(private configService: ConfigService) {}\n\n  getSettings$(): Observable<ServerSettings> {\n    return this.configService.serverSettings$;\n  }\n\n  get isUserRegistrationDisabled$(): Observable<boolean> {\n    return this.getSettings$().pipe(\n      map((settings: ServerSettings) => settings.disableUserRegistration),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\n/**\n *\n * @param elementDeserializer\n * @returns\n */\nexport function array<T>(\n  elementDeserializer: (element: Jsonify<T>) => T,\n): (array: Jsonify<T[]>) => T[] {\n  return (array) => {\n    if (array == null) {\n      return null;\n    }\n\n    return array.map((element) => elementDeserializer(element));\n  };\n}\n\n/**\n *\n * @param valueDeserializer\n */\nexport function record<T, TKey extends string | number = string>(\n  valueDeserializer: (value: Jsonify<T>) => T,\n): (record: Jsonify<Record<TKey, T>>) => Record<TKey, T> {\n  return (jsonValue: Jsonify<Record<TKey, T> | null>) => {\n    if (jsonValue == null) {\n      return null;\n    }\n\n    const output: Record<TKey, T> = {} as any;\n    Object.entries(jsonValue).forEach(([key, value]) => {\n      output[key as TKey] = valueDeserializer(value);\n    });\n    return output;\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { UserId } from \"../../types/guid\";\nimport { DerivedStateDependencies, StorageKey } from \"../../types/state\";\n\nimport { KeyDefinition } from \"./key-definition\";\nimport { StateDefinition } from \"./state-definition\";\nimport { UserKeyDefinition } from \"./user-key-definition\";\n\ndeclare const depShapeMarker: unique symbol;\n/**\n * A set of options for customizing the behavior of a {@link DeriveDefinition}\n */\ntype DeriveDefinitionOptions<TFrom, TTo, TDeps extends DerivedStateDependencies = never> = {\n  /**\n   * A function to use to convert values from TFrom to TTo. This is called on each emit of the parent state observable\n   * and the resulting value will be emitted from the derived state observable.\n   *\n   * @param from Populated with the latest emission from the parent state observable.\n   * @param deps Populated with the dependencies passed into the constructor of the derived state.\n   * These are constant for the lifetime of the derived state.\n   * @returns  The derived state value or a Promise that resolves to the derived state value.\n   */\n  derive: (from: TFrom, deps: TDeps) => TTo | Promise<TTo>;\n  /**\n   * A function to use to safely convert your type from json to your expected type.\n   *\n   * **Important:** Your data may be serialized/deserialized at any time and this\n   *  callback needs to be able to faithfully re-initialize from the JSON object representation of your type.\n   *\n   * @param jsonValue The JSON object representation of your state.\n   * @returns The fully typed version of your state.\n   */\n  deserializer: (serialized: Jsonify<TTo>) => TTo;\n  /**\n   * An object defining the dependencies of the derive function. The keys of the object are the names of the dependencies\n   * and the values are the types of the dependencies.\n   *\n   * for example:\n   * ```\n   * {\n   *   myService: MyService,\n   *   myOtherService: MyOtherService,\n   * }\n   * ```\n   */\n  [depShapeMarker]?: TDeps;\n  /**\n   * The number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   * Defaults to 1000ms.\n   */\n  cleanupDelayMs?: number;\n  /**\n   * Whether or not to clear the derived state when cleanup occurs. Defaults to true.\n   */\n  clearOnCleanup?: boolean;\n};\n\n/**\n * DeriveDefinitions describe state derived from another observable, the value type of which is given by `TFrom`.\n *\n * The StateDefinition is used to describe the domain of the state, and the DeriveDefinition\n * sub-divides that domain into specific keys. These keys are used to cache data in memory and enables derived state to\n * be calculated once regardless of multiple execution contexts.\n */\n\nexport class DeriveDefinition<TFrom, TTo, TDeps extends DerivedStateDependencies> {\n  /**\n   * Creates a new instance of a DeriveDefinition. Derived state is always stored in memory, so the storage location\n   * defined in @link{StateDefinition} is ignored.\n   *\n   * @param stateDefinition The state definition for which this key belongs to.\n   * @param uniqueDerivationName The name of the key, this should be unique per domain.\n   * @param options A set of options to customize the behavior of {@link DeriveDefinition}.\n   * @param options.derive A function to use to convert values from TFrom to TTo. This is called on each emit of the parent state observable\n   * and the resulting value will be emitted from the derived state observable.\n   * @param options.cleanupDelayMs The number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   * Defaults to 1000ms.\n   * @param options.dependencyShape An object defining the dependencies of the derive function. The keys of the object are the names of the dependencies\n   * and the values are the types of the dependencies.\n   * for example:\n   * ```\n   * {\n   *   myService: MyService,\n   *   myOtherService: MyOtherService,\n   * }\n   * ```\n   *\n   * @param options.deserializer A function to use to safely convert your type from json to your expected type.\n   *   Your data may be serialized/deserialized at any time and this needs callback needs to be able to faithfully re-initialize\n   *   from the JSON object representation of your type.\n   */\n  constructor(\n    readonly stateDefinition: StateDefinition,\n    readonly uniqueDerivationName: string,\n    readonly options: DeriveDefinitionOptions<TFrom, TTo, TDeps>,\n  ) {}\n\n  /**\n   * Factory that produces a {@link DeriveDefinition} from a {@link KeyDefinition} or {@link DeriveDefinition} and new name.\n   *\n   * If a `KeyDefinition` is passed in, the returned definition will have the same key as the given key definition, but\n   * will not collide with it in storage, even if they both reside in memory.\n   *\n   * If a `DeriveDefinition` is passed in, the returned definition will instead use the name given in the second position\n   * of the tuple. It is up to you to ensure this is unique within the domain of derived state.\n   *\n   * @param options A set of options to customize the behavior of {@link DeriveDefinition}.\n   * @param options.derive A function to use to convert values from TFrom to TTo. This is called on each emit of the parent state observable\n   * and the resulting value will be emitted from the derived state observable.\n   * @param options.cleanupDelayMs The number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   * Defaults to 1000ms.\n   * @param options.dependencyShape An object defining the dependencies of the derive function. The keys of the object are the names of the dependencies\n   * and the values are the types of the dependencies.\n   * for example:\n   * ```\n   * {\n   *   myService: MyService,\n   *   myOtherService: MyOtherService,\n   * }\n   * ```\n   *\n   * @param options.deserializer A function to use to safely convert your type from json to your expected type.\n   *   Your data may be serialized/deserialized at any time and this needs callback needs to be able to faithfully re-initialize\n   *   from the JSON object representation of your type.\n   * @param definition\n   * @param options\n   * @returns\n   */\n  static from<TFrom, TTo, TDeps extends DerivedStateDependencies = never>(\n    definition:\n      | KeyDefinition<TFrom>\n      | UserKeyDefinition<TFrom>\n      | [DeriveDefinition<unknown, TFrom, DerivedStateDependencies>, string],\n    options: DeriveDefinitionOptions<TFrom, TTo, TDeps>,\n  ) {\n    if (isFromDeriveDefinition(definition)) {\n      return new DeriveDefinition(definition[0].stateDefinition, definition[1], options);\n    } else {\n      return new DeriveDefinition(definition.stateDefinition, definition.key, options);\n    }\n  }\n\n  static fromWithUserId<TKeyDef, TTo, TDeps extends DerivedStateDependencies = never>(\n    definition:\n      | KeyDefinition<TKeyDef>\n      | UserKeyDefinition<TKeyDef>\n      | [DeriveDefinition<unknown, TKeyDef, DerivedStateDependencies>, string],\n    options: DeriveDefinitionOptions<[UserId, TKeyDef], TTo, TDeps>,\n  ) {\n    if (isFromDeriveDefinition(definition)) {\n      return new DeriveDefinition(definition[0].stateDefinition, definition[1], options);\n    } else {\n      return new DeriveDefinition(definition.stateDefinition, definition.key, options);\n    }\n  }\n\n  get derive() {\n    return this.options.derive;\n  }\n\n  deserialize(serialized: Jsonify<TTo>): TTo {\n    return this.options.deserializer(serialized);\n  }\n\n  get cleanupDelayMs() {\n    return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);\n  }\n\n  get clearOnCleanup() {\n    return this.options.clearOnCleanup ?? true;\n  }\n\n  buildCacheKey(): string {\n    return `derived_${this.stateDefinition.name}_${this.uniqueDerivationName}`;\n  }\n\n  /**\n   * Creates a {@link StorageKey} that points to the data for the given derived definition.\n   * @returns A key that is ready to be used in a storage service to get data.\n   */\n  get storageKey(): StorageKey {\n    return `derived_${this.stateDefinition.name}_${this.uniqueDerivationName}` as StorageKey;\n  }\n}\n\nfunction isFromDeriveDefinition(\n  definition:\n    | KeyDefinition<unknown>\n    | UserKeyDefinition<unknown>\n    | [DeriveDefinition<unknown, unknown, DerivedStateDependencies>, string],\n): definition is [DeriveDefinition<unknown, unknown, DerivedStateDependencies>, string] {\n  return Array.isArray(definition);\n}\n","import { Observable } from \"rxjs\";\n\nimport { DerivedStateDependencies } from \"../../types/state\";\n\nimport { DeriveDefinition } from \"./derive-definition\";\nimport { DerivedState } from \"./derived-state\";\n\n/**\n * State derived from an observable and a derive function\n */\nexport abstract class DerivedStateProvider {\n  /**\n   * Creates a derived state observable from a parent state observable, a deriveDefinition, and the dependencies\n   * required by the deriveDefinition\n   * @param parentState$ The parent state observable\n   * @param deriveDefinition The deriveDefinition that defines conversion from the parent state to the derived state as\n   * well as some memory persistent information.\n   * @param dependencies The dependencies of the derive function\n   */\n  abstract get<TFrom, TTo, TDeps extends DerivedStateDependencies>(\n    parentState$: Observable<TFrom>,\n    deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,\n    dependencies: TDeps,\n  ): DerivedState<TTo>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { DerivedStateDependencies } from \"../../types/state\";\n\nimport { DeriveDefinition } from \"./derive-definition\";\nimport { DerivedState } from \"./derived-state\";\nimport { GlobalState } from \"./global-state\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in docs\nimport { GlobalStateProvider } from \"./global-state.provider\";\nimport { KeyDefinition } from \"./key-definition\";\nimport { UserKeyDefinition } from \"./user-key-definition\";\nimport { ActiveUserState, SingleUserState } from \"./user-state\";\n// eslint-disable-next-line @typescript-eslint/no-unused-vars -- used in docs\nimport { ActiveUserStateProvider, SingleUserStateProvider } from \"./user-state.provider\";\n\n/** Convenience wrapper class for {@link ActiveUserStateProvider}, {@link SingleUserStateProvider},\n * and {@link GlobalStateProvider}.\n */\nexport abstract class StateProvider {\n  /** @see{@link ActiveUserStateProvider.activeUserId$} */\n  abstract activeUserId$: Observable<UserId | undefined>;\n\n  /**\n   * Gets a state observable for a given key and userId.\n   *\n   * @remarks If userId is falsy the observable returned will attempt to point to the currently active user _and not update if the active user changes_.\n   * This is different to how `getActive` works and more similar to `getUser` for whatever user happens to be active at the time of the call.\n   * If no user happens to be active at the time this method is called with a falsy userId then this observable will not emit a value until\n   * a user becomes active. If you are not confident a user is active at the time this method is called, you may want to pipe a call to `timeout`\n   * or instead call {@link getUserStateOrDefault$} and supply a value you would rather have given in the case of no passed in userId and no active user.\n   *\n   * @param keyDefinition - The key definition for the state you want to get.\n   * @param userId - The userId for which you want the state for. If not provided, the state for the currently active user will be returned.\n   */\n  abstract getUserState$<T>(keyDefinition: UserKeyDefinition<T>, userId?: UserId): Observable<T>;\n\n  /**\n   * Gets a state observable for a given key and userId\n   *\n   * @remarks If userId is falsy the observable return will first attempt to point to the currently active user but will not follow subsequent active user changes,\n   * if there is no immediately available active user, then it will fallback to returning a default value in an observable that immediately completes.\n   *\n   * @param keyDefinition - The key definition for the state you want to get.\n   * @param config.userId - The userId for which you want the state for. If not provided, the state for the currently active user will be returned.\n   * @param config.defaultValue - The default value that should be wrapped in an observable if no active user is immediately available and no truthy userId is passed in.\n   */\n  abstract getUserStateOrDefault$<T>(\n    keyDefinition: UserKeyDefinition<T>,\n    config: { userId: UserId | undefined; defaultValue?: T },\n  ): Observable<T>;\n\n  /**\n   * Sets the state for a given key and userId.\n   *\n   * @overload\n   * @param keyDefinition - The key definition for the state you want to set.\n   * @param value - The value to set the state to.\n   * @param userId - The userId for which you want to set the state for. If not provided, the state for the currently active user will be set.\n   */\n  abstract setUserState<T>(\n    keyDefinition: UserKeyDefinition<T>,\n    value: T,\n    userId?: UserId,\n  ): Promise<[UserId, T]>;\n\n  /** @see{@link ActiveUserStateProvider.get} */\n  abstract getActive<T>(userKeyDefinition: UserKeyDefinition<T>): ActiveUserState<T>;\n\n  /** @see{@link SingleUserStateProvider.get} */\n  abstract getUser<T>(userId: UserId, userKeyDefinition: UserKeyDefinition<T>): SingleUserState<T>;\n\n  /** @see{@link GlobalStateProvider.get} */\n  abstract getGlobal<T>(keyDefinition: KeyDefinition<T>): GlobalState<T>;\n  abstract getDerived<TFrom, TTo, TDeps extends DerivedStateDependencies>(\n    parentState$: Observable<TFrom>,\n    deriveDefinition: DeriveDefinition<TFrom, TTo, TDeps>,\n    dependencies: TDeps,\n  ): DerivedState<TTo>;\n}\n","import { GlobalState } from \"./global-state\";\nimport { KeyDefinition } from \"./key-definition\";\n\n/**\n * A provider for getting an implementation of global state scoped to the given key.\n */\nexport abstract class GlobalStateProvider {\n  /**\n   * Gets a {@link GlobalState} scoped to the given {@link KeyDefinition}\n   * @param keyDefinition - The {@link KeyDefinition} for which you want the state for.\n   */\n  abstract get<T>(keyDefinition: KeyDefinition<T>): GlobalState<T>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\n\nimport { UserKeyDefinition } from \"./user-key-definition\";\nimport { ActiveUserState, SingleUserState } from \"./user-state\";\n\n/** A provider for getting an implementation of state scoped to a given key and userId */\nexport abstract class SingleUserStateProvider {\n  /**\n   * Gets a {@link SingleUserState} scoped to the given {@link UserKeyDefinition} and {@link UserId}\n   *\n   * @param userId - The {@link UserId} for which you want the user state for.\n   * @param userKeyDefinition - The {@link UserKeyDefinition} for which you want the user state for.\n   */\n  abstract get<T>(userId: UserId, userKeyDefinition: UserKeyDefinition<T>): SingleUserState<T>;\n}\n\n/** A provider for getting an implementation of state scoped to a given key, but always pointing\n * to the currently active user\n */\nexport abstract class ActiveUserStateProvider {\n  /**\n   * Convenience re-emission of active user ID from {@link AccountService.activeAccount$}\n   */\n  abstract activeUserId$: Observable<UserId | undefined>;\n\n  /**\n   * Gets a {@link ActiveUserState} scoped to the given {@link KeyDefinition}, but updates when active user changes such\n   * that the emitted values always represents the state for the currently active user.\n   *\n   * @param keyDefinition - The {@link UserKeyDefinition} for which you want the user state for.\n   */\n  abstract get<T>(userKeyDefinition: UserKeyDefinition<T>): ActiveUserState<T>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { StorageKey } from \"../../types/state\";\n\nimport { array, record } from \"./deserialization-helpers\";\nimport { StateDefinition } from \"./state-definition\";\n\nexport type DebugOptions = {\n  /**\n   * When true, logs will be written that look like the following:\n   *\n   * ```\n   * \"Updating 'global_myState_myKey' from null to non-null\"\n   * \"Updating 'user_32265eda-62ff-4797-9ead-22214772f888_myState_myKey' from non-null to null.\"\n   * ```\n   *\n   * It does not include the value of the data, only whether it is null or non-null.\n   */\n  enableUpdateLogging?: boolean;\n\n  /**\n   * When true, logs will be written that look like the following everytime a value is retrieved from storage.\n   *\n   * \"Retrieving 'global_myState_myKey' from storage, value is null.\"\n   * \"Retrieving 'user_32265eda-62ff-4797-9ead-22214772f888_myState_myKey' from storage, value is non-null.\"\n   */\n  enableRetrievalLogging?: boolean;\n};\n\n/**\n * A set of options for customizing the behavior of a {@link KeyDefinition}\n */\nexport type KeyDefinitionOptions<T> = {\n  /**\n   * A function to use to safely convert your type from json to your expected type.\n   *\n   * **Important:** Your data may be serialized/deserialized at any time and this\n   *  callback needs to be able to faithfully re-initialize from the JSON object representation of your type.\n   *\n   * @param jsonValue The JSON object representation of your state.\n   * @returns The fully typed version of your state.\n   */\n  readonly deserializer: (jsonValue: Jsonify<T>) => T;\n  /**\n   * The number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   * Defaults to 1000ms.\n   */\n  readonly cleanupDelayMs?: number;\n\n  /**\n   * Options for configuring the debugging behavior, see individual options for more info.\n   */\n  readonly debug?: DebugOptions;\n};\n\n/**\n * KeyDefinitions describe the precise location to store data for a given piece of state.\n * The StateDefinition is used to describe the domain of the state, and the KeyDefinition\n * sub-divides that domain into specific keys.\n */\nexport class KeyDefinition<T> {\n  readonly debug: Required<DebugOptions>;\n\n  /**\n   * Creates a new instance of a KeyDefinition\n   * @param stateDefinition The state definition for which this key belongs to.\n   * @param key The name of the key, this should be unique per domain.\n   * @param options A set of options to customize the behavior of {@link KeyDefinition}. All options are required.\n   * @param options.deserializer A function to use to safely convert your type from json to your expected type.\n   *   Your data may be serialized/deserialized at any time and this needs callback needs to be able to faithfully re-initialize\n   *   from the JSON object representation of your type.\n   */\n  constructor(\n    readonly stateDefinition: StateDefinition,\n    readonly key: string,\n    private readonly options: KeyDefinitionOptions<T>,\n  ) {\n    if (options.deserializer == null) {\n      throw new Error(`'deserializer' is a required property on key ${this.errorKeyName}`);\n    }\n\n    if (options.cleanupDelayMs < 0) {\n      throw new Error(\n        `'cleanupDelayMs' must be greater than or equal to 0. Value of ${options.cleanupDelayMs} passed to key ${this.errorKeyName} `,\n      );\n    }\n\n    // Normalize optional debug options\n    const { enableUpdateLogging = false, enableRetrievalLogging = false } = options.debug ?? {};\n    this.debug = {\n      enableUpdateLogging,\n      enableRetrievalLogging,\n    };\n  }\n\n  /**\n   * Gets the deserializer configured for this {@link KeyDefinition}\n   */\n  get deserializer() {\n    return this.options.deserializer;\n  }\n\n  /**\n   * Gets the number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   */\n  get cleanupDelayMs() {\n    return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);\n  }\n\n  /**\n   * Creates a {@link KeyDefinition} for state that is an array.\n   * @param stateDefinition The state definition to be added to the KeyDefinition\n   * @param key The key to be added to the KeyDefinition\n   * @param options The options to customize the final {@link KeyDefinition}.\n   * @returns A {@link KeyDefinition} initialized for arrays, the options run\n   * the deserializer on the provided options for each element of an array.\n   *\n   * @example\n   * ```typescript\n   * const MY_KEY = KeyDefinition.array<MyArrayElement>(MY_STATE, \"key\", {\n   *   deserializer: (myJsonElement) => convertToElement(myJsonElement),\n   * });\n   * ```\n   */\n  static array<T>(\n    stateDefinition: StateDefinition,\n    key: string,\n    // We have them provide options for the element of the array, depending on future options we add, this could get a little weird.\n    options: KeyDefinitionOptions<T>, // The array helper forces  an initialValue of an empty array\n  ) {\n    return new KeyDefinition<T[]>(stateDefinition, key, {\n      ...options,\n      deserializer: array((e) => options.deserializer(e)),\n    });\n  }\n\n  /**\n   * Creates a {@link KeyDefinition} for state that is a record.\n   * @param stateDefinition The state definition to be added to the KeyDefinition\n   * @param key The key to be added to the KeyDefinition\n   * @param options The options to customize the final {@link KeyDefinition}.\n   * @returns A {@link KeyDefinition} that contains a serializer that will run the provided deserializer for each\n   * value in a record and returns every key as a string.\n   *\n   * @example\n   * ```typescript\n   * const MY_KEY = KeyDefinition.record<MyRecordValue>(MY_STATE, \"key\", {\n   *   deserializer: (myJsonValue) => convertToValue(myJsonValue),\n   * });\n   * ```\n   */\n  static record<T, TKey extends string | number = string>(\n    stateDefinition: StateDefinition,\n    key: string,\n    // We have them provide options for the value of the record, depending on future options we add, this could get a little weird.\n    options: KeyDefinitionOptions<T>, // The array helper forces an initialValue of an empty record\n  ) {\n    return new KeyDefinition<Record<TKey, T>>(stateDefinition, key, {\n      ...options,\n      deserializer: record((v) => options.deserializer(v)),\n    });\n  }\n\n  get fullName() {\n    return `${this.stateDefinition.name}_${this.key}`;\n  }\n\n  protected get errorKeyName() {\n    return `${this.stateDefinition.name} > ${this.key}`;\n  }\n}\n\n/**\n * Creates a {@link StorageKey}\n * @param keyDefinition The key definition of which data the key should point to.\n * @returns A key that is ready to be used in a storage service to get data.\n */\nexport function globalKeyBuilder(keyDefinition: KeyDefinition<unknown>): StorageKey {\n  return `global_${keyDefinition.stateDefinition.name}_${keyDefinition.key}` as StorageKey;\n}\n","/**\n * Default storage location options.\n *\n * `disk` generally means state that is accessible between restarts of the application,\n * with the exception of the web client. In web this means `sessionStorage`. The data\n * persists through refreshes of the page but not available once that tab is closed or\n * from any other tabs.\n *\n * `memory` means that the information stored there goes away during application\n * restarts.\n */\nexport type StorageLocation = \"disk\" | \"memory\";\n\n/**\n * *Note*: The property names of this object should match exactly with the string values of the {@link ClientType} enum\n */\nexport type ClientLocations = {\n  /**\n   * Overriding storage location for the web client.\n   *\n   * Includes an extra storage location to store data in `localStorage`\n   * that is available from different tabs and after a tab has closed.\n   */\n  web: StorageLocation | \"disk-local\";\n  /**\n   * Overriding storage location for browser clients.\n   *\n   * `\"memory-large-object\"` is used to store non-countable objects in memory. This exists due to limited persistent memory available to browser extensions.\n   *\n   * `\"disk-backup-local-storage\"` is used to store object in both disk and in `localStorage`. Data is stored in both locations but is only retrieved\n   * from `localStorage` when a null-ish value is retrieved from disk first.\n   */\n  browser: StorageLocation | \"memory-large-object\" | \"disk-backup-local-storage\";\n  /**\n   * Overriding storage location for desktop clients.\n   */\n  //desktop: StorageLocation;\n  /**\n   * Overriding storage location for CLI clients.\n   */\n  //cli: StorageLocation;\n};\n\n/**\n * Defines the base location and instruction of where this state is expected to be located.\n */\nexport class StateDefinition {\n  readonly storageLocationOverrides: Partial<ClientLocations>;\n\n  /**\n   * Creates a new instance of {@link StateDefinition}, the creation of which is owned by the platform team.\n   * @param name The name of the state, this needs to be unique from all other {@link StateDefinition}'s.\n   * @param defaultStorageLocation The location of where this state should be stored.\n   */\n  constructor(\n    readonly name: string,\n    readonly defaultStorageLocation: StorageLocation,\n    storageLocationOverrides?: Partial<ClientLocations>,\n  ) {\n    this.storageLocationOverrides = storageLocationOverrides ?? {};\n  }\n}\n","import { StateDefinition } from \"./state-definition\";\n\n/**\n * `StateDefinition`s comes with some rules, to facilitate a quick review from\n * platform of this file, ensure you follow these rules, the ones marked with (tested)\n * have unit tests that you can run locally.\n *\n * 1. (tested) Names should not be null or undefined\n * 2. (tested) Name and storage location should be unique\n * 3. (tested) Name and storage location can't differ from another export by only casing\n * 4. (tested) Name should be longer than 3 characters. It should be descriptive, but brief.\n * 5. (tested) Name should not contain spaces or underscores\n * 6. Name should be human readable\n * 7. Name should be in camelCase format (unit tests ensure the first character is lowercase)\n * 8. Teams should only use state definitions they have created\n * 9. StateDefinitions should only be used for keys relating to the state name they chose\n *\n */\n\n// Admin Console\n\nexport const ORGANIZATIONS_DISK = new StateDefinition(\"organizations\", \"disk\");\nexport const POLICIES_DISK = new StateDefinition(\"policies\", \"disk\");\nexport const PROVIDERS_DISK = new StateDefinition(\"providers\", \"disk\");\nexport const ORGANIZATION_MANAGEMENT_PREFERENCES_DISK = new StateDefinition(\n  \"organizationManagementPreferences\",\n  \"disk\",\n  {\n    web: \"disk-local\",\n  },\n);\nexport const AC_BANNERS_DISMISSED_DISK = new StateDefinition(\"acBannersDismissed\", \"disk\", {\n  web: \"disk-local\",\n});\n\n// Billing\nexport const BILLING_DISK = new StateDefinition(\"billing\", \"disk\");\n\n// Auth\n\nexport const ACCOUNT_DISK = new StateDefinition(\"account\", \"disk\");\nexport const ACCOUNT_MEMORY = new StateDefinition(\"account\", \"memory\");\nexport const AUTH_REQUEST_DISK_LOCAL = new StateDefinition(\"authRequestLocal\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const AVATAR_DISK = new StateDefinition(\"avatar\", \"disk\", { web: \"disk-local\" });\nexport const DEVICE_TRUST_DISK_LOCAL = new StateDefinition(\"deviceTrust\", \"disk\", {\n  web: \"disk-local\",\n  browser: \"disk-backup-local-storage\",\n});\nexport const KDF_CONFIG_DISK = new StateDefinition(\"kdfConfig\", \"disk\");\nexport const KEY_CONNECTOR_DISK = new StateDefinition(\"keyConnector\", \"disk\");\nexport const LOGIN_EMAIL_DISK = new StateDefinition(\"loginEmail\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const LOGIN_EMAIL_MEMORY = new StateDefinition(\"loginEmail\", \"memory\");\nexport const LOGIN_STRATEGY_MEMORY = new StateDefinition(\"loginStrategy\", \"memory\");\nexport const MASTER_PASSWORD_DISK = new StateDefinition(\"masterPassword\", \"disk\");\nexport const MASTER_PASSWORD_MEMORY = new StateDefinition(\"masterPassword\", \"memory\");\nexport const PIN_DISK = new StateDefinition(\"pinUnlock\", \"disk\");\nexport const PIN_MEMORY = new StateDefinition(\"pinUnlock\", \"memory\");\nexport const ROUTER_DISK = new StateDefinition(\"router\", \"disk\");\nexport const SSO_DISK = new StateDefinition(\"ssoLogin\", \"disk\");\nexport const TOKEN_DISK = new StateDefinition(\"token\", \"disk\");\nexport const TOKEN_DISK_LOCAL = new StateDefinition(\"tokenDiskLocal\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const TOKEN_MEMORY = new StateDefinition(\"token\", \"memory\");\nexport const TWO_FACTOR_MEMORY = new StateDefinition(\"twoFactor\", \"memory\");\nexport const USER_DECRYPTION_OPTIONS_DISK = new StateDefinition(\"userDecryptionOptions\", \"disk\");\nexport const ORGANIZATION_INVITE_DISK = new StateDefinition(\"organizationInvite\", \"disk\");\nexport const VAULT_TIMEOUT_SETTINGS_DISK_LOCAL = new StateDefinition(\n  \"vaultTimeoutSettings\",\n  \"disk\",\n  {\n    web: \"disk-local\",\n  },\n);\n\n// Autofill\n\nexport const BADGE_SETTINGS_DISK = new StateDefinition(\"badgeSettings\", \"disk\");\nexport const USER_NOTIFICATION_SETTINGS_DISK = new StateDefinition(\n  \"userNotificationSettings\",\n  \"disk\",\n);\n\nexport const DOMAIN_SETTINGS_DISK = new StateDefinition(\"domainSettings\", \"disk\");\nexport const AUTOFILL_SETTINGS_DISK = new StateDefinition(\"autofillSettings\", \"disk\");\nexport const AUTOFILL_SETTINGS_DISK_LOCAL = new StateDefinition(\"autofillSettingsLocal\", \"disk\", {\n  web: \"disk-local\",\n});\n\n// Components\n\nexport const NEW_WEB_LAYOUT_BANNER_DISK = new StateDefinition(\"newWebLayoutBanner\", \"disk\", {\n  web: \"disk-local\",\n});\n\n// Platform\n\nexport const APPLICATION_ID_DISK = new StateDefinition(\"applicationId\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const BIOMETRIC_SETTINGS_DISK = new StateDefinition(\"biometricSettings\", \"disk\");\nexport const CLEAR_EVENT_DISK = new StateDefinition(\"clearEvent\", \"disk\");\nexport const CONFIG_DISK = new StateDefinition(\"config\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const CRYPTO_DISK = new StateDefinition(\"crypto\", \"disk\");\nexport const CRYPTO_MEMORY = new StateDefinition(\"crypto\", \"memory\");\nexport const DESKTOP_SETTINGS_DISK = new StateDefinition(\"desktopSettings\", \"disk\");\nexport const ENVIRONMENT_DISK = new StateDefinition(\"environment\", \"disk\");\nexport const ENVIRONMENT_MEMORY = new StateDefinition(\"environment\", \"memory\");\nexport const POPUP_VIEW_MEMORY = new StateDefinition(\"popupView\", \"memory\", {\n  browser: \"memory-large-object\",\n});\nexport const SYNC_DISK = new StateDefinition(\"sync\", \"disk\", { web: \"memory\" });\nexport const THEMING_DISK = new StateDefinition(\"theming\", \"disk\", { web: \"disk-local\" });\nexport const TRANSLATION_DISK = new StateDefinition(\"translation\", \"disk\", { web: \"disk-local\" });\nexport const ANIMATION_DISK = new StateDefinition(\"animation\", \"disk\");\nexport const TASK_SCHEDULER_DISK = new StateDefinition(\"taskScheduler\", \"disk\");\n\n// Design System\n\nexport const POPUP_STYLE_DISK = new StateDefinition(\"popupStyle\", \"disk\");\n\n// Secrets Manager\n\nexport const SM_ONBOARDING_DISK = new StateDefinition(\"smOnboarding\", \"disk\", {\n  web: \"disk-local\",\n});\n\n// Tools\n\nexport const GENERATOR_DISK = new StateDefinition(\"generator\", \"disk\");\nexport const GENERATOR_MEMORY = new StateDefinition(\"generator\", \"memory\");\nexport const BROWSER_SEND_MEMORY = new StateDefinition(\"sendBrowser\", \"memory\");\nexport const EVENT_COLLECTION_DISK = new StateDefinition(\"eventCollection\", \"disk\");\nexport const SEND_DISK = new StateDefinition(\"encryptedSend\", \"disk\", {\n  web: \"memory\",\n});\nexport const SEND_MEMORY = new StateDefinition(\"decryptedSend\", \"memory\", {\n  browser: \"memory-large-object\",\n});\n\n// Vault\n\nexport const COLLECTION_DATA = new StateDefinition(\"collection\", \"disk\", {\n  web: \"memory\",\n});\nexport const FOLDER_DISK = new StateDefinition(\"folder\", \"disk\", { web: \"memory\" });\nexport const FOLDER_MEMORY = new StateDefinition(\"decryptedFolders\", \"memory\", {\n  browser: \"memory-large-object\",\n});\nexport const VAULT_FILTER_DISK = new StateDefinition(\"vaultFilter\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const VAULT_ONBOARDING = new StateDefinition(\"vaultOnboarding\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const VAULT_SETTINGS_DISK = new StateDefinition(\"vaultSettings\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const VAULT_BROWSER_MEMORY = new StateDefinition(\"vaultBrowser\", \"memory\", {\n  browser: \"memory-large-object\",\n});\nexport const VAULT_SEARCH_MEMORY = new StateDefinition(\"vaultSearch\", \"memory\", {\n  browser: \"memory-large-object\",\n});\nexport const CIPHERS_DISK = new StateDefinition(\"ciphers\", \"disk\", { web: \"memory\" });\nexport const CIPHERS_DISK_LOCAL = new StateDefinition(\"ciphersLocal\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const CIPHERS_MEMORY = new StateDefinition(\"ciphersMemory\", \"memory\", {\n  browser: \"memory-large-object\",\n});\nexport const PREMIUM_BANNER_DISK_LOCAL = new StateDefinition(\"premiumBannerReprompt\", \"disk\", {\n  web: \"disk-local\",\n});\nexport const BANNERS_DISMISSED_DISK = new StateDefinition(\"bannersDismissed\", \"disk\");\nexport const VAULT_BROWSER_UI_ONBOARDING = new StateDefinition(\"vaultBrowserUiOnboarding\", \"disk\");\nexport const NEW_DEVICE_VERIFICATION_NOTICE = new StateDefinition(\n  \"newDeviceVerificationNotice\",\n  \"disk\",\n  {\n    web: \"disk-local\",\n  },\n);\nexport const VAULT_APPEARANCE = new StateDefinition(\"vaultAppearance\", \"disk\");\n","import { PossibleLocation, StorageServiceProvider } from \"../services/storage-service.provider\";\n\nimport { GlobalState } from \"./global-state\";\nimport { GlobalStateProvider } from \"./global-state.provider\";\nimport { KeyDefinition } from \"./key-definition\";\nimport { CLEAR_EVENT_DISK } from \"./state-definitions\";\nimport { ClearEvent, UserKeyDefinition } from \"./user-key-definition\";\n\nexport type StateEventInfo = {\n  state: string;\n  key: string;\n  location: PossibleLocation;\n};\n\nexport const STATE_LOCK_EVENT = KeyDefinition.array<StateEventInfo>(CLEAR_EVENT_DISK, \"lock\", {\n  deserializer: (e) => e,\n});\n\nexport const STATE_LOGOUT_EVENT = KeyDefinition.array<StateEventInfo>(CLEAR_EVENT_DISK, \"logout\", {\n  deserializer: (e) => e,\n});\n\nexport class StateEventRegistrarService {\n  private readonly stateEventStateMap: { [Prop in ClearEvent]: GlobalState<StateEventInfo[]> };\n\n  constructor(\n    globalStateProvider: GlobalStateProvider,\n    private storageServiceProvider: StorageServiceProvider,\n  ) {\n    this.stateEventStateMap = {\n      lock: globalStateProvider.get(STATE_LOCK_EVENT),\n      logout: globalStateProvider.get(STATE_LOGOUT_EVENT),\n    };\n  }\n\n  async registerEvents(keyDefinition: UserKeyDefinition<unknown>) {\n    for (const clearEvent of keyDefinition.clearOn) {\n      const eventState = this.stateEventStateMap[clearEvent];\n      // Determine the storage location for this\n      const [storageLocation] = this.storageServiceProvider.get(\n        keyDefinition.stateDefinition.defaultStorageLocation,\n        keyDefinition.stateDefinition.storageLocationOverrides,\n      );\n\n      const newEvent: StateEventInfo = {\n        state: keyDefinition.stateDefinition.name,\n        key: keyDefinition.key,\n        location: storageLocation,\n      };\n\n      // Only update the event state if the existing list doesn't have a matching entry\n      await eventState.update(\n        (existingTickets) => {\n          existingTickets ??= [];\n          existingTickets.push(newEvent);\n          return existingTickets;\n        },\n        {\n          shouldUpdate: (currentTickets) => {\n            return (\n              // If the current tickets are null, then it will for sure be added\n              currentTickets == null ||\n              // If an existing match couldn't be found, we also need to add one\n              currentTickets.findIndex(\n                (e) =>\n                  e.state === newEvent.state &&\n                  e.key === newEvent.key &&\n                  e.location === newEvent.location,\n              ) === -1\n            );\n          },\n        },\n      );\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom } from \"rxjs\";\n\nimport { UserId } from \"../../types/guid\";\nimport { StorageServiceProvider } from \"../services/storage-service.provider\";\n\nimport { GlobalState } from \"./global-state\";\nimport { GlobalStateProvider } from \"./global-state.provider\";\nimport { StateDefinition, StorageLocation } from \"./state-definition\";\nimport {\n  STATE_LOCK_EVENT,\n  STATE_LOGOUT_EVENT,\n  StateEventInfo,\n} from \"./state-event-registrar.service\";\nimport { ClearEvent, UserKeyDefinition } from \"./user-key-definition\";\n\nexport class StateEventRunnerService {\n  private readonly stateEventMap: { [Prop in ClearEvent]: GlobalState<StateEventInfo[]> };\n\n  constructor(\n    globalStateProvider: GlobalStateProvider,\n    private storageServiceProvider: StorageServiceProvider,\n  ) {\n    this.stateEventMap = {\n      lock: globalStateProvider.get(STATE_LOCK_EVENT),\n      logout: globalStateProvider.get(STATE_LOGOUT_EVENT),\n    };\n  }\n\n  async handleEvent(event: ClearEvent, userId: UserId) {\n    let tickets = await firstValueFrom(this.stateEventMap[event].state$);\n    tickets ??= [];\n\n    const failures: string[] = [];\n\n    for (const ticket of tickets) {\n      try {\n        const [, service] = this.storageServiceProvider.get(\n          ticket.location,\n          {}, // The storage location is already the computed storage location for this client\n        );\n\n        const ticketStorageKey = this.storageKeyFor(userId, ticket);\n\n        // Evaluate current value so we can avoid writing to state if we don't need to\n        const currentValue = await service.get(ticketStorageKey);\n        if (currentValue != null) {\n          await service.remove(ticketStorageKey);\n        }\n      } catch (err: unknown) {\n        let errorMessage = \"Unknown Error\";\n        if (typeof err === \"object\" && \"message\" in err && typeof err.message === \"string\") {\n          errorMessage = err.message;\n        }\n\n        failures.push(\n          `${errorMessage} in ${ticket.state} > ${ticket.key} located ${ticket.location}`,\n        );\n      }\n    }\n\n    if (failures.length > 0) {\n      // Throw aggregated error\n      throw new Error(\n        `One or more errors occurred while handling event '${event}' for user ${userId}.\\n${failures.join(\"\\n\")}`,\n      );\n    }\n  }\n\n  private storageKeyFor(userId: UserId, ticket: StateEventInfo) {\n    const userKey = new UserKeyDefinition<unknown>(\n      new StateDefinition(ticket.state, ticket.location as unknown as StorageLocation),\n      ticket.key,\n      {\n        deserializer: (v) => v,\n        clearOn: [],\n      },\n    );\n    return userKey.buildKey(userId);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"../../types/guid\";\nimport { StorageKey } from \"../../types/state\";\nimport { Utils } from \"../misc/utils\";\n\nimport { array, record } from \"./deserialization-helpers\";\nimport { DebugOptions, KeyDefinitionOptions } from \"./key-definition\";\nimport { StateDefinition } from \"./state-definition\";\n\nexport type ClearEvent = \"lock\" | \"logout\";\n\nexport type UserKeyDefinitionOptions<T> = KeyDefinitionOptions<T> & {\n  clearOn: ClearEvent[];\n};\n\nconst USER_KEY_DEFINITION_MARKER: unique symbol = Symbol(\"UserKeyDefinition\");\n\nexport class UserKeyDefinition<T> {\n  readonly [USER_KEY_DEFINITION_MARKER] = true;\n  /**\n   * A unique array of events that the state stored at this key should be cleared on.\n   */\n  readonly clearOn: ClearEvent[];\n\n  /**\n   * Normalized options used for debugging purposes.\n   */\n  readonly debug: Required<DebugOptions>;\n\n  constructor(\n    readonly stateDefinition: StateDefinition,\n    readonly key: string,\n    private readonly options: UserKeyDefinitionOptions<T>,\n  ) {\n    if (options.deserializer == null) {\n      throw new Error(`'deserializer' is a required property on key ${this.errorKeyName}`);\n    }\n\n    if (options.cleanupDelayMs < 0) {\n      throw new Error(\n        `'cleanupDelayMs' must be greater than or equal to 0. Value of ${options.cleanupDelayMs} passed to key ${this.errorKeyName} `,\n      );\n    }\n\n    // Filter out repeat values\n    this.clearOn = Array.from(new Set(options.clearOn));\n\n    // Normalize optional debug options\n    const { enableUpdateLogging = false, enableRetrievalLogging = false } = options.debug ?? {};\n    this.debug = {\n      enableUpdateLogging,\n      enableRetrievalLogging,\n    };\n  }\n\n  /**\n   * Gets the deserializer configured for this {@link KeyDefinition}\n   */\n  get deserializer() {\n    return this.options.deserializer;\n  }\n\n  /**\n   * Gets the number of milliseconds to wait before cleaning up the state after the last subscriber has unsubscribed.\n   */\n  get cleanupDelayMs() {\n    return this.options.cleanupDelayMs < 0 ? 0 : (this.options.cleanupDelayMs ?? 1000);\n  }\n\n  /**\n   * Creates a {@link UserKeyDefinition} for state that is an array.\n   * @param stateDefinition The state definition to be added to the UserKeyDefinition\n   * @param key The key to be added to the KeyDefinition\n   * @param options The options to customize the final {@link UserKeyDefinition}.\n   * @returns A {@link UserKeyDefinition} initialized for arrays, the options run\n   * the deserializer on the provided options for each element of an array\n   * **unless that array is null, in which case it will return an empty list.**\n   *\n   * @example\n   * ```typescript\n   * const MY_KEY = UserKeyDefinition.array<MyArrayElement>(MY_STATE, \"key\", {\n   *   deserializer: (myJsonElement) => convertToElement(myJsonElement),\n   * });\n   * ```\n   */\n  static array<T>(\n    stateDefinition: StateDefinition,\n    key: string,\n    // We have them provide options for the element of the array, depending on future options we add, this could get a little weird.\n    options: UserKeyDefinitionOptions<T>,\n  ) {\n    return new UserKeyDefinition<T[]>(stateDefinition, key, {\n      ...options,\n      deserializer: array((e) => options.deserializer(e)),\n    });\n  }\n\n  /**\n   * Creates a {@link UserKeyDefinition} for state that is a record.\n   * @param stateDefinition The state definition to be added to the UserKeyDefinition\n   * @param key The key to be added to the KeyDefinition\n   * @param options The options to customize the final {@link UserKeyDefinition}.\n   * @returns A {@link UserKeyDefinition} that contains a serializer that will run the provided deserializer for each\n   * value in a record and returns every key as a string **unless that record is null, in which case it will return an record.**\n   *\n   * @example\n   * ```typescript\n   * const MY_KEY = UserKeyDefinition.record<MyRecordValue>(MY_STATE, \"key\", {\n   *   deserializer: (myJsonValue) => convertToValue(myJsonValue),\n   * });\n   * ```\n   */\n  static record<T, TKey extends string | number = string>(\n    stateDefinition: StateDefinition,\n    key: string,\n    // We have them provide options for the value of the record, depending on future options we add, this could get a little weird.\n    options: UserKeyDefinitionOptions<T>, // The array helper forces an initialValue of an empty record\n  ) {\n    return new UserKeyDefinition<Record<TKey, T>>(stateDefinition, key, {\n      ...options,\n      deserializer: record((v) => options.deserializer(v)),\n    });\n  }\n\n  get fullName() {\n    return `${this.stateDefinition.name}_${this.key}`;\n  }\n\n  buildKey(userId: UserId) {\n    if (!Utils.isGuid(userId)) {\n      throw new Error(\n        `You cannot build a user key without a valid UserId, building for key ${this.fullName}`,\n      );\n    }\n    return `user_${userId}_${this.stateDefinition.name}_${this.key}` as StorageKey;\n  }\n\n  private get errorKeyName() {\n    return `${this.stateDefinition.name} > ${this.key}`;\n  }\n}\n","import { Observable } from \"rxjs\";\n\nimport {\n  SyncCipherNotification,\n  SyncFolderNotification,\n  SyncSendNotification,\n} from \"../../models/response/notification.response\";\nimport { UserId } from \"../../types/guid\";\n\n/**\n * A class encapsulating sync operations and data.\n */\nexport abstract class SyncService {\n  /**\n   * A boolean indicating if a sync is currently in progress via this instance and this instance only.\n   *\n   * @deprecated Trusting this property is not safe as it only tells if the current instance is currently\n   * doing a sync operation but does not tell if another instance of SyncService is doing a sync operation.\n   */\n  abstract syncInProgress: boolean;\n\n  /**\n   * Gets the date of the last sync for the currently active user.\n   *\n   * @returns The date of the last sync or null if there is no active user or the active user has not synced before.\n   *\n   * @deprecated Use {@link lastSync$} to get an observable stream of a given users last sync date instead.\n   */\n  abstract getLastSync(): Promise<Date | null>;\n\n  /**\n   * Retrieves a stream of the given users last sync date. Or null if the user has not synced before.\n   * @param userId The user id of the user to get the stream for.\n   */\n  abstract lastSync$(userId: UserId): Observable<Date | null>;\n\n  /**\n   * Retrieves a stream of the currently active user's last sync date.\n   * Or null if there is no current active user or the active user has not synced before.\n   */\n  abstract activeUserLastSync$(): Observable<Date | null>;\n\n  /**\n   * Optionally does a full sync operation including going to the server to gather the source\n   * of truth and set that data to state.\n   * @param forceSync A boolean dictating if a sync should be forced. If `true` a sync will happen\n   * as long as the current user is authenticated. If `false` it will only sync if either a sync\n   * has not happened before or the last sync date for the active user is before their account\n   * revision date. Try to always use `false` if possible.\n   *\n   * @param allowThrowOnError A boolean dictating whether or not caught errors should be rethrown.\n   * `true` if they can be rethrown, `false` if they should not be rethrown.\n   */\n  abstract fullSync(forceSync: boolean, allowThrowOnError?: boolean): Promise<boolean>;\n\n  abstract syncUpsertFolder(\n    notification: SyncFolderNotification,\n    isEdit: boolean,\n    userId: UserId,\n  ): Promise<boolean>;\n  abstract syncDeleteFolder(notification: SyncFolderNotification, userId: UserId): Promise<boolean>;\n  abstract syncUpsertCipher(\n    notification: SyncCipherNotification,\n    isEdit: boolean,\n  ): Promise<boolean>;\n  abstract syncDeleteCipher(notification: SyncFolderNotification): Promise<boolean>;\n  abstract syncUpsertSend(notification: SyncSendNotification, isEdit: boolean): Promise<boolean>;\n  abstract syncDeleteSend(notification: SyncSendNotification): Promise<boolean>;\n}\n","import { CollectionDetailsResponse } from \"@bitwarden/admin-console/common\";\n\nimport { PolicyResponse } from \"../../admin-console/models/response/policy.response\";\nimport { BaseResponse } from \"../../models/response/base.response\";\nimport { DomainsResponse } from \"../../models/response/domains.response\";\nimport { ProfileResponse } from \"../../models/response/profile.response\";\nimport { SendResponse } from \"../../tools/send/models/response/send.response\";\nimport { CipherResponse } from \"../../vault/models/response/cipher.response\";\nimport { FolderResponse } from \"../../vault/models/response/folder.response\";\n\nexport class SyncResponse extends BaseResponse {\n  profile?: ProfileResponse;\n  folders: FolderResponse[] = [];\n  collections: CollectionDetailsResponse[] = [];\n  ciphers: CipherResponse[] = [];\n  domains?: DomainsResponse;\n  policies?: PolicyResponse[] = [];\n  sends: SendResponse[] = [];\n\n  constructor(response: any) {\n    super(response);\n\n    const profile = this.getResponseProperty(\"Profile\");\n    if (profile != null) {\n      this.profile = new ProfileResponse(profile);\n    }\n\n    const folders = this.getResponseProperty(\"Folders\");\n    if (folders != null) {\n      this.folders = folders.map((f: any) => new FolderResponse(f));\n    }\n\n    const collections = this.getResponseProperty(\"Collections\");\n    if (collections != null) {\n      this.collections = collections.map((c: any) => new CollectionDetailsResponse(c));\n    }\n\n    const ciphers = this.getResponseProperty(\"Ciphers\");\n    if (ciphers != null) {\n      this.ciphers = ciphers.map((c: any) => new CipherResponse(c));\n    }\n\n    const domains = this.getResponseProperty(\"Domains\");\n    if (domains != null) {\n      this.domains = new DomainsResponse(domains);\n    }\n\n    const policies = this.getResponseProperty(\"Policies\");\n    if (policies != null) {\n      this.policies = policies.map((p: any) => new PolicyResponse(p));\n    }\n\n    const sends = this.getResponseProperty(\"Sends\");\n    if (sends != null) {\n      this.sends = sends.map((s: any) => new SendResponse(s));\n    }\n  }\n}\n","import { Observable, combineLatest, map } from \"rxjs\";\n\nimport { FeatureFlag } from \"../../enums/feature-flag.enum\";\nimport { ConfigService } from \"../abstractions/config/config.service\";\nimport { ThemeType } from \"../enums\";\nimport { GlobalStateProvider, KeyDefinition, THEMING_DISK } from \"../state\";\n\nexport abstract class ThemeStateService {\n  /**\n   * The users selected theme.\n   */\n  abstract selectedTheme$: Observable<ThemeType>;\n\n  /**\n   * A method for updating the current users configured theme.\n   * @param theme The chosen user theme.\n   */\n  abstract setSelectedTheme(theme: ThemeType): Promise<void>;\n}\n\nexport const THEME_SELECTION = new KeyDefinition<ThemeType>(THEMING_DISK, \"selection\", {\n  deserializer: (s) => s,\n});\n\nexport class DefaultThemeStateService implements ThemeStateService {\n  private readonly selectedThemeState = this.globalStateProvider.get(THEME_SELECTION);\n\n  selectedTheme$ = combineLatest([\n    this.selectedThemeState.state$,\n    this.configService.getFeatureFlag$(FeatureFlag.ExtensionRefresh),\n  ]).pipe(\n    map(([theme, isExtensionRefresh]) => {\n      // The extension refresh should not allow for Nord or SolarizedDark\n      // Default the user to their system theme\n      if (isExtensionRefresh && [ThemeType.Nord, ThemeType.SolarizedDark].includes(theme)) {\n        return ThemeType.System;\n      }\n\n      return theme;\n    }),\n    map((theme) => theme ?? this.defaultTheme),\n  );\n\n  constructor(\n    private globalStateProvider: GlobalStateProvider,\n    private configService: ConfigService,\n    private defaultTheme: ThemeType = ThemeType.System,\n  ) {}\n\n  async setSelectedTheme(theme: ThemeType): Promise<void> {\n    await this.selectedThemeState.update(() => theme, {\n      shouldUpdate: (currentTheme) => currentTheme !== theme,\n    });\n  }\n}\n","import { VaultTimeoutAction } from \"../../enums/vault-timeout-action.enum\";\nimport { UserKeyDefinition, VAULT_TIMEOUT_SETTINGS_DISK_LOCAL } from \"../../platform/state\";\nimport { VaultTimeout } from \"../../types/vault-timeout.type\";\n\n/**\n * Settings use disk storage and local storage on web so settings can persist after logout\n * in order for us to know if the user's chose to never lock their vault or not.\n * When the user has never lock selected, we have to set the user key in memory\n * from the user auto unlock key stored on disk on client bootstrap.\n */\nexport const VAULT_TIMEOUT_ACTION = new UserKeyDefinition<VaultTimeoutAction>(\n  VAULT_TIMEOUT_SETTINGS_DISK_LOCAL,\n  \"vaultTimeoutAction\",\n  {\n    deserializer: (vaultTimeoutAction) => vaultTimeoutAction,\n    clearOn: [], // persisted on logout\n  },\n);\n\nexport const VAULT_TIMEOUT = new UserKeyDefinition<VaultTimeout>(\n  VAULT_TIMEOUT_SETTINGS_DISK_LOCAL,\n  \"vaultTimeout\",\n  {\n    deserializer: (vaultTimeout) => vaultTimeout,\n    clearOn: [], // persisted on logout\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\n\n/** An encryption strategy that protects a type's secrets with\n *  user-specific keys. This strategy is bound to a specific user.\n */\nexport abstract class UserEncryptor {\n  /** Identifies the user bound to the encryptor. */\n  readonly userId: UserId;\n\n  /** Protects secrets in `value` with a user-specific key.\n   *  @param secret the object to protect. This object is mutated during encryption.\n   *  @returns a promise that resolves to a tuple. The tuple's first property contains\n   *    the encrypted secret and whose second property contains an object w/ disclosed\n   *    properties.\n   *   @throws If `value` is `null` or `undefined`, the promise rejects with an error.\n   */\n  abstract encrypt<Secret>(secret: Jsonify<Secret>): Promise<EncString>;\n\n  /** Combines protected secrets and disclosed data into a type that can be\n   *  rehydrated into a domain object.\n   *  @param secret an encrypted JSON payload containing encrypted secrets.\n   *  @returns a promise that resolves to the raw state. This state *is not* a\n   *    class. It contains only data that can be round-tripped through JSON,\n   *    and lacks members such as a prototype or bound functions.\n   *  @throws If `secret` or `disclosed` is `null` or `undefined`, the promise\n   *    rejects with an error.\n   */\n  abstract decrypt<Secret>(secret: EncString): Promise<Jsonify<Secret>>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { UserKey } from \"../../types/key\";\nimport { DataPacker } from \"../state/data-packer.abstraction\";\n\nimport { UserEncryptor } from \"./user-encryptor.abstraction\";\n\n/** A classification strategy that protects a type's secrets by encrypting them\n *  with a `UserKey`\n */\nexport class UserKeyEncryptor extends UserEncryptor {\n  /** Instantiates the encryptor\n   *  @param userId identifies the user bound to the encryptor.\n   *  @param encryptService protects properties of `Secret`.\n   *  @param keyService looks up the user key when protecting data.\n   *  @param dataPacker packs and unpacks data classified as secrets.\n   */\n  constructor(\n    readonly userId: UserId,\n    private readonly encryptService: EncryptService,\n    private readonly key: UserKey,\n    private readonly dataPacker: DataPacker,\n  ) {\n    super();\n    this.assertHasValue(\"userId\", userId);\n    this.assertHasValue(\"key\", key);\n    this.assertHasValue(\"dataPacker\", dataPacker);\n    this.assertHasValue(\"encryptService\", encryptService);\n  }\n\n  async encrypt<Secret>(secret: Jsonify<Secret>): Promise<EncString> {\n    this.assertHasValue(\"secret\", secret);\n\n    let packed = this.dataPacker.pack(secret);\n    const encrypted = await this.encryptService.encrypt(packed, this.key);\n    packed = null;\n\n    return encrypted;\n  }\n\n  async decrypt<Secret>(secret: EncString): Promise<Jsonify<Secret>> {\n    this.assertHasValue(\"secret\", secret);\n\n    let decrypted = await this.encryptService.decryptToUtf8(secret, this.key);\n    const unpacked = this.dataPacker.unpack<Secret>(decrypted);\n    decrypted = null;\n\n    return unpacked;\n  }\n\n  private assertHasValue(name: string, value: any) {\n    if (value === undefined || value === null) {\n      throw new Error(`${name} cannot be null or undefined`);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { IntegrationRequest } from \"./integration-request\";\nimport { JsonRpc } from \"./rpc\";\n\n/** Makes remote procedure calls using a RESTful interface. */\nexport class RestClient {\n  constructor(\n    private api: ApiService,\n    private i18n: I18nService,\n  ) {}\n\n  /** uses the fetch API to request a JSON payload. */\n  // FIXME: once legacy password generator is removed, replace forwarder-specific error\n  //   messages with RPC-generalized ones.\n  async fetchJson<Parameters extends IntegrationRequest, Result>(\n    rpc: JsonRpc<Parameters, Result>,\n    params: Parameters,\n  ): Promise<Result> {\n    // run the request\n    const request = rpc.toRequest(params);\n    const response = await this.api.nativeFetch(request);\n\n    let result: Result = undefined;\n    let errorKey: string = undefined;\n    let errorMessage: string = undefined;\n\n    const commonError = await this.detectCommonErrors(response);\n    if (commonError) {\n      [errorKey, errorMessage] = commonError;\n    } else if (rpc.hasJsonPayload(response)) {\n      [result, errorMessage] = rpc.processJson(await response.json());\n    }\n\n    if (result) {\n      return result;\n    }\n\n    // handle failures\n    errorKey ??= errorMessage ? \"forwarderError\" : \"forwarderUnknownError\";\n    const error = this.i18n.t(errorKey, rpc.requestor.name, errorMessage);\n    throw error;\n  }\n\n  private async detectCommonErrors(response: Response): Promise<[string, string] | undefined> {\n    if (response.status === 401 || response.status === 403) {\n      const message = await this.tryGetErrorMessage(response);\n      const key = message ? \"forwaderInvalidTokenWithMessage\" : \"forwaderInvalidToken\";\n      return [key, message];\n    } else if (response.status >= 400) {\n      const message = await this.tryGetErrorMessage(response);\n      const key = message ? \"forwarderError\" : \"forwarderUnknownError\";\n      return [key, message];\n    }\n  }\n\n  private async tryGetErrorMessage(response: Response) {\n    const body = (await response.text()) ?? \"\";\n\n    // nullish continues processing; false returns undefined\n    // FIXME: inspect content-type header to determine extraction process\n    const error =\n      this.tryFindErrorAsJson(body) ?? this.tryFindErrorAsText(body) ?? response.statusText;\n\n    return error || undefined;\n  }\n\n  private tryFindErrorAsJson(body: string) {\n    // tryParse JSON object or string\n    const parsable = body.startsWith(\"{\") || body.startsWith(`'`) || body.startsWith(`\"`);\n    if (!parsable) {\n      // fail-and-continue because it's not JSON\n      return undefined;\n    }\n    let parsed = undefined;\n    try {\n      parsed = JSON.parse(body);\n    } catch {\n      // fail-and-exit in case `body` is malformed JSON\n      return false;\n    }\n\n    // could be a string\n    if (parsed && typeof parsed === \"string\") {\n      return parsed;\n    }\n\n    // could be { error?: T, message?: U }\n    const error = parsed.error?.toString() ?? null;\n    const message = parsed.message?.toString() ?? null;\n\n    // `false` signals no message found\n    const result = error && message ? `${error}: ${message}` : (error ?? message ?? false);\n\n    return result;\n  }\n\n  private tryFindErrorAsText(body: string) {\n    if (!body.length || body.includes(\"<\")) {\n      return undefined;\n    }\n\n    return body;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ZXCVBNResult } from \"zxcvbn\";\n\nexport abstract class PasswordStrengthServiceAbstraction {\n  getPasswordStrength: (password: string, email?: string, userInputs?: string[]) => ZXCVBNResult;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as zxcvbn from \"zxcvbn\";\n\nimport { PasswordStrengthServiceAbstraction } from \"./password-strength.service.abstraction\";\n\nexport class PasswordStrengthService implements PasswordStrengthServiceAbstraction {\n  /**\n   * Calculates a password strength score using zxcvbn.\n   * @param password The password to calculate the strength of.\n   * @param emailInput An unparsed email address to use as user input.\n   * @param userInputs An array of additional user inputs to use when calculating the strength.\n   */\n  getPasswordStrength(\n    password: string,\n    emailInput: string = null,\n    userInputs: string[] = null,\n  ): zxcvbn.ZXCVBNResult {\n    if (password == null || password.length === 0) {\n      return null;\n    }\n    const globalUserInputs = [\n      \"bitwarden\",\n      \"bit\",\n      \"warden\",\n      ...(userInputs ?? []),\n      ...this.emailToUserInputs(emailInput),\n    ];\n    // Use a hash set to get rid of any duplicate user inputs\n    const finalUserInputs = Array.from(new Set(globalUserInputs));\n    const result = zxcvbn(password, finalUserInputs);\n    return result;\n  }\n\n  /**\n   * Convert an email address into a list of user inputs for zxcvbn by\n   * taking the local part of the email address and splitting it into words.\n   * @param email\n   * @private\n   */\n  private emailToUserInputs(email: string): string[] {\n    if (email == null || email.length === 0) {\n      return [];\n    }\n    const atPosition = email.indexOf(\"@\");\n    if (atPosition < 0) {\n      return [];\n    }\n    return email\n      .substring(0, atPosition)\n      .trim()\n      .toLowerCase()\n      .split(/[^A-Za-z0-9]/);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  map,\n  distinctUntilChanged,\n  OperatorFunction,\n  Observable,\n  ignoreElements,\n  endWith,\n  race,\n  pipe,\n  connect,\n  ReplaySubject,\n  concat,\n  zip,\n  first,\n  takeUntil,\n  withLatestFrom,\n  concatMap,\n  startWith,\n  pairwise,\n} from \"rxjs\";\n\n/** Returns its input. */\nfunction identity(value: any): any {\n  return value;\n}\n\n/** Combines its arguments into a plain old javascript object. */\nfunction expectedAndActualValue(expectedValue: any, actualValue: any) {\n  return {\n    expectedValue,\n    actualValue,\n  };\n}\n\n/**\n * An observable operator that throws an error when the stream's\n *   value changes. Uses strict (`===`) comparison checks.\n * @param extract a function that identifies the member to compare;\n *   defaults to the identity function\n * @param error a function that packages the expected and failed\n *   values into an error.\n * @returns a stream of values that emits when the input emits,\n *   completes when the input completes, and errors when either the\n *   input errors or the comparison fails.\n */\nexport function errorOnChange<Input, Extracted>(\n  extract: (value: Input) => Extracted = identity,\n  error: (expectedValue: Extracted, actualValue: Extracted) => unknown = expectedAndActualValue,\n): OperatorFunction<Input, Input> {\n  return pipe(\n    startWith(null),\n    pairwise(),\n    map(([expected, actual], i) => {\n      // always let the first value through\n      if (i === 0) {\n        return actual;\n      }\n\n      const expectedValue = extract(expected);\n      const actualValue = extract(actual);\n\n      // fail the stream if the state desyncs from its initial value\n      if (expectedValue === actualValue) {\n        return actual;\n      } else {\n        throw error(expectedValue, actualValue);\n      }\n    }),\n  );\n}\n\n/**\n * An observable operator that reduces an emitted collection to a single object,\n * returning a default if all items are ignored.\n * @param reduce The reduce function to apply to the filtered collection. The\n *  first argument is the accumulator, and the second is the current item. The\n *  return value is the new accumulator.\n * @param defaultValue The default value to return if the collection is empty. The\n *   default value is also the initial value of the accumulator.\n */\nexport function reduceCollection<Item, Accumulator>(\n  reduce: (acc: Accumulator, value: Item) => Accumulator,\n  defaultValue: Accumulator,\n): OperatorFunction<Item[], Accumulator> {\n  return map((values: Item[]) => {\n    const reduced = (values ?? []).reduce(reduce, structuredClone(defaultValue));\n    return reduced;\n  });\n}\n\n/**\n * An observable operator that emits distinct values by checking that all\n *   values in the previous entry match the next entry. This method emits\n *   when a key is added and does not when a key is removed.\n * @remarks This method checks objects. It does not check items in arrays.\n */\nexport function distinctIfShallowMatch<Item>(): OperatorFunction<Item, Item> {\n  return distinctUntilChanged((previous, current) => {\n    let isDistinct = true;\n\n    for (const key in current) {\n      isDistinct &&= previous[key] === current[key];\n    }\n\n    return isDistinct;\n  });\n}\n\n/** Create an observable that, once subscribed, emits `true` then completes when\n *   any input completes. If an input is already complete when the subscription\n *   occurs, it emits immediately.\n *  @param watch$ the observable(s) to watch for completion; if an array is passed,\n *   null and undefined members are ignored. If `watch$` is empty, `anyComplete`\n *   will never complete.\n *  @returns An observable that emits `true` when any of its inputs\n *   complete. The observable forwards the first error from its input.\n *  @remarks This method is particularly useful in combination with `takeUntil` and\n *   streams that are not guaranteed to complete on their own.\n */\nexport function anyComplete(watch$: Observable<any> | Observable<any>[]): Observable<any> {\n  if (Array.isArray(watch$)) {\n    const completes$ = watch$\n      .filter((w$) => !!w$)\n      .map((w$) => w$.pipe(ignoreElements(), endWith(true)));\n    const completed$ = race(completes$);\n    return completed$;\n  } else {\n    return watch$.pipe(ignoreElements(), endWith(true));\n  }\n}\n\n/**\n * Create an observable that delays the input stream until all watches have\n *  emitted a value. The watched values are not included in the source stream.\n *  The last emission from the source is output when all the watches have\n *  emitted at least once.\n * @param watch$ the observable(s) to watch for readiness. If `watch$` is empty,\n *  `ready` will never emit.\n * @returns An observable that emits when the source stream emits. The observable\n *   errors if one of its watches completes before emitting. It also errors if one\n *   of its watches errors.\n */\nexport function ready<T>(watch$: Observable<any> | Observable<any>[]) {\n  const watching$ = Array.isArray(watch$) ? watch$ : [watch$];\n  return pipe(\n    connect<T, Observable<T>>((source$) => {\n      // this subscription is safe because `source$` connects only after there\n      // is an external subscriber.\n      const source = new ReplaySubject<T>(1);\n      source$.subscribe(source);\n\n      // `concat` is subscribed immediately after it's returned, at which point\n      // `zip` blocks until all items in `watching$` are ready. If that occurs\n      // after `source$` is hot, then the replay subject sends the last-captured\n      // emission through immediately. Otherwise, `ready` waits for the next\n      // emission\n      return concat(zip(watching$).pipe(first(), ignoreElements()), source).pipe(\n        takeUntil(anyComplete(source)),\n      );\n    }),\n  );\n}\n\nexport function withLatestReady<Source, Watch>(\n  watch$: Observable<Watch>,\n): OperatorFunction<Source, [Source, Watch]> {\n  return connect((source$) => {\n    // these subscriptions are safe because `source$` connects only after there\n    // is an external subscriber.\n    const source = new ReplaySubject<Source>(1);\n    source$.subscribe(source);\n    const watch = new ReplaySubject<Watch>(1);\n    watch$.subscribe(watch);\n\n    // `concat` is subscribed immediately after it's returned, at which point\n    // `zip` blocks until all items in `watching$` are ready. If that occurs\n    // after `source$` is hot, then the replay subject sends the last-captured\n    // emission through immediately. Otherwise, `ready` waits for the next\n    // emission\n    return concat(zip(watch).pipe(first(), ignoreElements()), source).pipe(\n      withLatestFrom(watch),\n      takeUntil(anyComplete(source)),\n    );\n  });\n}\n\n/**\n * Create an observable that emits the latest value of the source stream\n *  when `watch$` emits. If `watch$` emits before the stream emits, then\n *  an emission occurs as soon as a value becomes ready.\n * @param watch$ the observable that triggers emissions\n * @returns An observable that emits when `watch$` emits. The observable\n *  errors if its source stream errors. It also errors if `on` errors. It\n *  completes if its watch completes.\n *\n * @remarks This works like `audit`, but it repeats emissions when\n *  watch$ fires.\n */\nexport function on<T>(watch$: Observable<any>) {\n  return pipe(\n    connect<T, Observable<T>>((source$) => {\n      const source = new ReplaySubject<T>(1);\n      source$.subscribe(source);\n\n      return watch$\n        .pipe(\n          ready(source),\n          concatMap(() => source.pipe(first())),\n        )\n        .pipe(takeUntil(anyComplete(source)));\n    }),\n  );\n}\n","export enum SendType {\n  Text = 0,\n  File = 1,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class SendFileApi extends BaseResponse {\n  id: string;\n  fileName: string;\n  size: string;\n  sizeName: string;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.id = this.getResponseProperty(\"Id\");\n    this.fileName = this.getResponseProperty(\"FileName\");\n    this.size = this.getResponseProperty(\"Size\");\n    this.sizeName = this.getResponseProperty(\"SizeName\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\n\nexport class SendTextApi extends BaseResponse {\n  text: string;\n  hidden: boolean;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.text = this.getResponseProperty(\"Text\");\n    this.hidden = this.getResponseProperty(\"Hidden\") || false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../../platform/models/domain/symmetric-crypto-key\";\nimport { SendFileData } from \"../data/send-file.data\";\nimport { SendFileView } from \"../view/send-file.view\";\n\nexport class SendFile extends Domain {\n  id: string;\n  size: string;\n  sizeName: string;\n  fileName: EncString;\n\n  constructor(obj?: SendFileData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.size = obj.size;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        sizeName: null,\n        fileName: null,\n      },\n      [\"id\", \"sizeName\"],\n    );\n  }\n\n  async decrypt(key: SymmetricCryptoKey): Promise<SendFileView> {\n    const view = await this.decryptObj(\n      new SendFileView(this),\n      {\n        fileName: null,\n      },\n      null,\n      key,\n    );\n    return view;\n  }\n\n  static fromJSON(obj: Jsonify<SendFile>) {\n    if (obj == null) {\n      return null;\n    }\n\n    return Object.assign(new SendFile(), obj, {\n      fileName: EncString.fromJSON(obj.fileName),\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../../platform/models/domain/symmetric-crypto-key\";\nimport { SendTextData } from \"../data/send-text.data\";\nimport { SendTextView } from \"../view/send-text.view\";\n\nexport class SendText extends Domain {\n  text: EncString;\n  hidden: boolean;\n\n  constructor(obj?: SendTextData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.hidden = obj.hidden;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        text: null,\n      },\n      [],\n    );\n  }\n\n  decrypt(key: SymmetricCryptoKey): Promise<SendTextView> {\n    return this.decryptObj(\n      new SendTextView(this),\n      {\n        text: null,\n      },\n      null,\n      key,\n    );\n  }\n\n  static fromJSON(obj: Jsonify<SendText>) {\n    if (obj == null) {\n      return null;\n    }\n\n    return Object.assign(new SendText(), obj, {\n      text: EncString.fromJSON(obj.text),\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../../platform/misc/utils\";\nimport Domain from \"../../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../../platform/models/domain/enc-string\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendData } from \"../data/send.data\";\nimport { SendView } from \"../view/send.view\";\n\nimport { SendFile } from \"./send-file\";\nimport { SendText } from \"./send-text\";\n\nexport class Send extends Domain {\n  id: string;\n  accessId: string;\n  type: SendType;\n  name: EncString;\n  notes: EncString;\n  file: SendFile;\n  text: SendText;\n  key: EncString;\n  maxAccessCount?: number;\n  accessCount: number;\n  revisionDate: Date;\n  expirationDate: Date;\n  deletionDate: Date;\n  password: string;\n  disabled: boolean;\n  hideEmail: boolean;\n\n  constructor(obj?: SendData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        accessId: null,\n        name: null,\n        notes: null,\n        key: null,\n      },\n      [\"id\", \"accessId\"],\n    );\n\n    this.type = obj.type;\n    this.maxAccessCount = obj.maxAccessCount;\n    this.accessCount = obj.accessCount;\n    this.password = obj.password;\n    this.disabled = obj.disabled;\n    this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;\n    this.deletionDate = obj.deletionDate != null ? new Date(obj.deletionDate) : null;\n    this.expirationDate = obj.expirationDate != null ? new Date(obj.expirationDate) : null;\n    this.hideEmail = obj.hideEmail;\n\n    switch (this.type) {\n      case SendType.Text:\n        this.text = new SendText(obj.text);\n        break;\n      case SendType.File:\n        this.file = new SendFile(obj.file);\n        break;\n      default:\n        break;\n    }\n  }\n\n  async decrypt(): Promise<SendView> {\n    const model = new SendView(this);\n\n    const keyService = Utils.getContainerService().getKeyService();\n    const encryptService = Utils.getContainerService().getEncryptService();\n\n    try {\n      const sendKeyEncryptionKey = await keyService.getUserKey();\n      model.key = await encryptService.decryptToBytes(this.key, sendKeyEncryptionKey);\n      model.cryptoKey = await keyService.makeSendKey(model.key);\n    } catch (e) {\n      // TODO: error?\n    }\n\n    await this.decryptObj(\n      model,\n      {\n        name: null,\n        notes: null,\n      },\n      null,\n      model.cryptoKey,\n    );\n\n    switch (this.type) {\n      case SendType.File:\n        model.file = await this.file.decrypt(model.cryptoKey);\n        break;\n      case SendType.Text:\n        model.text = await this.text.decrypt(model.cryptoKey);\n        break;\n      default:\n        break;\n    }\n\n    return model;\n  }\n\n  static fromJSON(obj: Jsonify<Send>) {\n    if (obj == null) {\n      return null;\n    }\n\n    const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);\n    const expirationDate = obj.expirationDate == null ? null : new Date(obj.expirationDate);\n    const deletionDate = obj.deletionDate == null ? null : new Date(obj.deletionDate);\n\n    return Object.assign(new Send(), obj, {\n      key: EncString.fromJSON(obj.key),\n      name: EncString.fromJSON(obj.name),\n      notes: EncString.fromJSON(obj.notes),\n      text: SendText.fromJSON(obj.text),\n      file: SendFile.fromJSON(obj.file),\n      revisionDate,\n      expirationDate,\n      deletionDate,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../../models/response/base.response\";\nimport { SendType } from \"../../enums/send-type\";\nimport { SendFileApi } from \"../api/send-file.api\";\nimport { SendTextApi } from \"../api/send-text.api\";\n\nexport class SendResponse extends BaseResponse {\n  id: string;\n  accessId: string;\n  type: SendType;\n  name: string;\n  notes: string;\n  file: SendFileApi;\n  text: SendTextApi;\n  key: string;\n  maxAccessCount?: number;\n  accessCount: number;\n  revisionDate: string;\n  expirationDate: string;\n  deletionDate: string;\n  password: string;\n  disable: boolean;\n  hideEmail: boolean;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.accessId = this.getResponseProperty(\"AccessId\");\n    this.type = this.getResponseProperty(\"Type\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.notes = this.getResponseProperty(\"Notes\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.maxAccessCount = this.getResponseProperty(\"MaxAccessCount\");\n    this.accessCount = this.getResponseProperty(\"AccessCount\");\n    this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n    this.expirationDate = this.getResponseProperty(\"ExpirationDate\");\n    this.deletionDate = this.getResponseProperty(\"DeletionDate\");\n    this.password = this.getResponseProperty(\"Password\");\n    this.disable = this.getResponseProperty(\"Disabled\") || false;\n    this.hideEmail = this.getResponseProperty(\"HideEmail\") || false;\n\n    const text = this.getResponseProperty(\"Text\");\n    if (text != null) {\n      this.text = new SendTextApi(text);\n    }\n\n    const file = this.getResponseProperty(\"File\");\n    if (file != null) {\n      this.file = new SendFileApi(file);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../../models/view/view\";\nimport { DeepJsonify } from \"../../../../types/deep-jsonify\";\nimport { SendFile } from \"../domain/send-file\";\n\nexport class SendFileView implements View {\n  id: string = null;\n  size: string = null;\n  sizeName: string = null;\n  fileName: string = null;\n\n  constructor(f?: SendFile) {\n    if (!f) {\n      return;\n    }\n\n    this.id = f.id;\n    this.size = f.size;\n    this.sizeName = f.sizeName;\n  }\n\n  get fileSize(): number {\n    try {\n      if (this.size != null) {\n        return parseInt(this.size, null);\n      }\n    } catch {\n      // Invalid file size.\n    }\n    return 0;\n  }\n\n  static fromJSON(json: DeepJsonify<SendFileView>) {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new SendFileView(), json);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../../models/view/view\";\nimport { DeepJsonify } from \"../../../../types/deep-jsonify\";\nimport { SendText } from \"../domain/send-text\";\n\nexport class SendTextView implements View {\n  text: string = null;\n  hidden: boolean;\n\n  constructor(t?: SendText) {\n    if (!t) {\n      return;\n    }\n\n    this.hidden = t.hidden;\n  }\n\n  get maskedText(): string {\n    return this.text != null ? \"••••••••\" : null;\n  }\n\n  static fromJSON(json: DeepJsonify<SendTextView>) {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new SendTextView(), json);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../../models/view/view\";\nimport { Utils } from \"../../../../platform/misc/utils\";\nimport { SymmetricCryptoKey } from \"../../../../platform/models/domain/symmetric-crypto-key\";\nimport { DeepJsonify } from \"../../../../types/deep-jsonify\";\nimport { SendType } from \"../../enums/send-type\";\nimport { Send } from \"../domain/send\";\n\nimport { SendFileView } from \"./send-file.view\";\nimport { SendTextView } from \"./send-text.view\";\n\nexport class SendView implements View {\n  id: string = null;\n  accessId: string = null;\n  name: string = null;\n  notes: string = null;\n  key: Uint8Array;\n  cryptoKey: SymmetricCryptoKey;\n  type: SendType = null;\n  text = new SendTextView();\n  file = new SendFileView();\n  maxAccessCount?: number = null;\n  accessCount = 0;\n  revisionDate: Date = null;\n  deletionDate: Date = null;\n  expirationDate: Date = null;\n  password: string = null;\n  disabled = false;\n  hideEmail = false;\n\n  constructor(s?: Send) {\n    if (!s) {\n      return;\n    }\n\n    this.id = s.id;\n    this.accessId = s.accessId;\n    this.type = s.type;\n    this.maxAccessCount = s.maxAccessCount;\n    this.accessCount = s.accessCount;\n    this.revisionDate = s.revisionDate;\n    this.deletionDate = s.deletionDate;\n    this.expirationDate = s.expirationDate;\n    this.disabled = s.disabled;\n    this.password = s.password;\n    this.hideEmail = s.hideEmail;\n  }\n\n  get urlB64Key(): string {\n    return Utils.fromBufferToUrlB64(this.key);\n  }\n\n  get maxAccessCountReached(): boolean {\n    if (this.maxAccessCount == null) {\n      return false;\n    }\n    return this.accessCount >= this.maxAccessCount;\n  }\n\n  get expired(): boolean {\n    if (this.expirationDate == null) {\n      return false;\n    }\n    return this.expirationDate <= new Date();\n  }\n\n  get pendingDelete(): boolean {\n    return this.deletionDate <= new Date();\n  }\n\n  toJSON() {\n    return Utils.merge(\n      { ...this },\n      {\n        key: Utils.fromBufferToB64(this.key),\n      },\n    );\n  }\n\n  static fromJSON(json: DeepJsonify<SendView>) {\n    if (json == null) {\n      return null;\n    }\n\n    return Object.assign(new SendView(), json, {\n      key: Utils.fromB64ToArray(json.key),\n      cryptoKey: SymmetricCryptoKey.fromJSON(json.cryptoKey),\n      text: SendTextView.fromJSON(json.text),\n      file: SendFileView.fromJSON(json.file),\n      revisionDate: json.revisionDate == null ? null : new Date(json.revisionDate),\n      deletionDate: json.deletionDate == null ? null : new Date(json.deletionDate),\n      expirationDate: json.expirationDate == null ? null : new Date(json.expirationDate),\n    });\n  }\n}\n","export const SEND_KDF_ITERATIONS = 100000;\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ListResponse } from \"../../../models/response/list.response\";\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { Send } from \"../models/domain/send\";\nimport { SendAccessRequest } from \"../models/request/send-access.request\";\nimport { SendRequest } from \"../models/request/send.request\";\nimport { SendAccessResponse } from \"../models/response/send-access.response\";\nimport { SendFileDownloadDataResponse } from \"../models/response/send-file-download-data.response\";\nimport { SendFileUploadDataResponse } from \"../models/response/send-file-upload-data.response\";\nimport { SendResponse } from \"../models/response/send.response\";\nimport { SendAccessView } from \"../models/view/send-access.view\";\n\nexport abstract class SendApiService {\n  getSend: (id: string) => Promise<SendResponse>;\n  postSendAccess: (\n    id: string,\n    request: SendAccessRequest,\n    apiUrl?: string,\n  ) => Promise<SendAccessResponse>;\n  getSends: () => Promise<ListResponse<SendResponse>>;\n  postSend: (request: SendRequest) => Promise<SendResponse>;\n  postFileTypeSend: (request: SendRequest) => Promise<SendFileUploadDataResponse>;\n  postSendFile: (sendId: string, fileId: string, data: FormData) => Promise<any>;\n  /**\n   * @deprecated Mar 25 2021: This method has been deprecated in favor of direct uploads.\n   * This method still exists for backward compatibility with old server versions.\n   */\n  postSendFileLegacy: (data: FormData) => Promise<SendResponse>;\n  putSend: (id: string, request: SendRequest) => Promise<SendResponse>;\n  putSendRemovePassword: (id: string) => Promise<SendResponse>;\n  deleteSend: (id: string) => Promise<any>;\n  getSendFileDownloadData: (\n    send: SendAccessView,\n    request: SendAccessRequest,\n    apiUrl?: string,\n  ) => Promise<SendFileDownloadDataResponse>;\n  renewSendFileUploadUrl: (sendId: string, fileId: string) => Promise<SendFileUploadDataResponse>;\n  removePassword: (id: string) => Promise<any>;\n  delete: (id: string) => Promise<any>;\n  save: (sendData: [Send, EncArrayBuffer]) => Promise<Send>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserKeyRotationDataProvider } from \"@bitwarden/key-management\";\n\nimport { EncArrayBuffer } from \"../../../platform/models/domain/enc-array-buffer\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { SendData } from \"../models/data/send.data\";\nimport { Send } from \"../models/domain/send\";\nimport { SendWithIdRequest } from \"../models/request/send-with-id.request\";\nimport { SendView } from \"../models/view/send.view\";\n\nexport abstract class SendService implements UserKeyRotationDataProvider<SendWithIdRequest> {\n  sends$: Observable<Send[]>;\n  sendViews$: Observable<SendView[]>;\n\n  encrypt: (\n    model: SendView,\n    file: File | ArrayBuffer,\n    password: string,\n    key?: SymmetricCryptoKey,\n  ) => Promise<[Send, EncArrayBuffer]>;\n  /**\n   * Provides a send for a determined id\n   * updates after a change occurs to the send that matches the id\n   * @param id The id of the desired send\n   * @returns An observable that listens to the value of the desired send\n   */\n  get$: (id: string) => Observable<Send | undefined>;\n  /**\n   * Provides re-encrypted user sends for the key rotation process\n   * @param newUserKey The new user key to use for re-encryption\n   * @throws Error if the new user key is null or undefined\n   * @returns A list of user sends that have been re-encrypted with the new user key\n   */\n  getRotatedData: (\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ) => Promise<SendWithIdRequest[]>;\n  /**\n   * @deprecated Do not call this, use the sends$ observable collection\n   */\n  getAll: () => Promise<Send[]>;\n  /**\n   * @deprecated Only use in CLI\n   */\n  getFromState: (id: string) => Promise<Send>;\n  /**\n   * @deprecated Only use in CLI\n   */\n  getAllDecryptedFromState: () => Promise<SendView[]>;\n}\n\nexport abstract class InternalSendService extends SendService {\n  upsert: (send: SendData | SendData[]) => Promise<any>;\n  replace: (sends: { [id: string]: SendData }, userId: UserId) => Promise<void>;\n  delete: (id: string | string[]) => Promise<any>;\n}\n","import { UserKeyDefinition, UserKeyDefinitionOptions } from \"../../platform/state\";\n// eslint-disable-next-line -- `StateDefinition` used as an argument\nimport { StateDefinition } from \"../../platform/state/state-definition\";\n\n/** A set of options for customizing the behavior of a {@link BufferedKeyDefinition}\n */\nexport type BufferedKeyDefinitionOptions<Input, Output, Dependency> =\n  UserKeyDefinitionOptions<Input> & {\n    /** Checks whether the input type can be converted to the output type.\n     *  @param input the data that is rolling over.\n     *  @returns `true` if the definition is valid, otherwise `false`. If this\n     *  function is not specified, any truthy input is valid.\n     *\n     * @remarks this is intended for cases where you're working with validated or\n     * signed data. It should be used to prevent data from being \"laundered\" through\n     * synchronized state.\n     */\n    isValid?: (input: Input, dependency: Dependency) => Promise<boolean>;\n\n    /** Transforms the input data format to its output format.\n     *  @param input the data that is rolling over.\n     *  @returns the converted value. If this function is not specified, the value\n     *  is asserted as the output type.\n     *\n     * @remarks This is intended for converting between, say, a replication format\n     * and a disk format or rotating encryption keys.\n     */\n    map?: (input: Input, dependency: Dependency) => Promise<Output>;\n\n    /** Checks whether an overwrite should occur\n     *  @param dependency the latest value from the dependency observable provided\n     *    to the buffered state.\n     *  @returns `true` if a overwrite should occur, otherwise `false`. If this\n     *   function is not specified, overwrites occur when the dependency is truthy.\n     *\n     *  @remarks This is intended for waiting to overwrite until a dependency becomes\n     *   available (e.g. an encryption key or a user confirmation).\n     */\n    shouldOverwrite?: (dependency: Dependency) => boolean;\n  };\n\n/** Storage and mapping settings for data stored by a `BufferedState`.\n */\nexport class BufferedKeyDefinition<Input, Output = Input, Dependency = true> {\n  /**\n   * Defines a buffered state\n   * @param stateDefinition The domain of the buffer\n   * @param key Domain key that identifies the buffered value. This key must\n   *    not be reused in any capacity.\n   * @param options Configures the operation of the buffered state.\n   */\n  constructor(\n    readonly stateDefinition: StateDefinition,\n    readonly key: string,\n    readonly options: BufferedKeyDefinitionOptions<Input, Output, Dependency>,\n  ) {}\n\n  /** Converts the buffered key definition to a state provider\n   *  key definition\n   */\n  toKeyDefinition() {\n    const bufferedKey = new UserKeyDefinition<Input>(this.stateDefinition, this.key, this.options);\n\n    return bufferedKey;\n  }\n\n  /** Checks whether the dependency triggers an overwrite. */\n  shouldOverwrite(dependency: Dependency) {\n    const shouldOverwrite = this.options?.shouldOverwrite;\n    if (shouldOverwrite) {\n      return shouldOverwrite(dependency);\n    }\n\n    return dependency ? true : false;\n  }\n\n  /** Converts the input data format to its output format.\n   *  @returns the converted value.\n   */\n  map(input: Input, dependency: Dependency) {\n    const map = this.options?.map;\n    if (map) {\n      return map(input, dependency);\n    }\n\n    return Promise.resolve(input as unknown as Output);\n  }\n\n  /** Checks whether the input type can be converted to the output type.\n   *  @returns `true` if the definition is defined and valid, otherwise `false`.\n   */\n  isValid(input: Input, dependency: Dependency) {\n    if (input === null) {\n      return Promise.resolve(false);\n    }\n\n    const isValid = this.options?.isValid;\n    if (isValid) {\n      return isValid(input, dependency);\n    }\n\n    return Promise.resolve(input ? true : false);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, combineLatest, concatMap, filter, map, of, concat, merge } from \"rxjs\";\n\nimport {\n  StateProvider,\n  SingleUserState,\n  CombinedState,\n  StateUpdateOptions,\n} from \"../../platform/state\";\n\nimport { BufferedKeyDefinition } from \"./buffered-key-definition\";\n\n/** Stateful storage that overwrites one state with a buffered state.\n *  When a overwrite occurs, the input state is automatically deleted.\n *  @remarks The buffered state can only overwrite non-nullish values. If the\n *   buffer key contains `null` or `undefined`, it will do nothing.\n */\nexport class BufferedState<Input, Output, Dependency> implements SingleUserState<Output> {\n  /**\n   * Instantiate a buffered state\n   * @param provider constructs the buffer.\n   * @param key defines the buffer location.\n   * @param output updates when a overwrite occurs\n   * @param dependency$ provides data the buffer depends upon to evaluate and\n   *   transform its data. If this is omitted, then `true` is injected as\n   *   a dependency, which with a default output will trigger a overwrite immediately.\n   *\n   * @remarks `dependency$` enables overwrite control during dynamic circumstances,\n   *   such as when a overwrite should occur only if a user key is available.\n   */\n  constructor(\n    provider: StateProvider,\n    private key: BufferedKeyDefinition<Input, Output, Dependency>,\n    private output: SingleUserState<Output>,\n    dependency$: Observable<Dependency> = null,\n  ) {\n    this.bufferedState = provider.getUser(output.userId, key.toKeyDefinition());\n\n    // overwrite the output value\n    const hasValue$ = concat(of(null), this.bufferedState.state$).pipe(\n      map((buffer) => (buffer ?? null) !== null),\n    );\n    const overwriteDependency$ = (dependency$ ?? of(true as unknown as Dependency)).pipe(\n      map((dependency) => [key.shouldOverwrite(dependency), dependency] as const),\n    );\n    const overwrite$ = combineLatest([hasValue$, overwriteDependency$]).pipe(\n      concatMap(async ([hasValue, [shouldOverwrite, dependency]]) => {\n        if (hasValue && shouldOverwrite) {\n          await this.overwriteOutput(dependency);\n        }\n        return [false, null] as const;\n      }),\n    );\n\n    // drive overwrites only when there's a subscription;\n    // the output state determines when emissions occur\n    const output$ = this.output.state$.pipe(map((output) => [true, output] as const));\n    this.state$ = merge(overwrite$, output$).pipe(\n      filter(([emit]) => emit),\n      map(([, output]) => output),\n    );\n\n    this.combinedState$ = this.state$.pipe(map((state) => [this.output.userId, state]));\n\n    this.bufferedState$ = this.bufferedState.state$;\n  }\n\n  private bufferedState: SingleUserState<Input>;\n\n  private async overwriteOutput(dependency: Dependency) {\n    // take the latest value from the buffer\n    let buffered: Input;\n    await this.bufferedState.update((state) => {\n      buffered = state ?? null;\n      return null;\n    });\n\n    // update the output state\n    const isValid = await this.key.isValid(buffered, dependency);\n    if (isValid) {\n      const output = await this.key.map(buffered, dependency);\n      await this.output.update(() => output);\n    }\n  }\n\n  /** {@link SingleUserState.userId} */\n  get userId() {\n    return this.output.userId;\n  }\n\n  /** Observes changes to the output state. This updates when the output\n   *  state updates, when the buffer is moved to the output, and when `BufferedState.buffer`\n   *  is invoked.\n   */\n  readonly state$: Observable<Output>;\n\n  /** {@link SingleUserState.combinedState$} */\n  readonly combinedState$: Observable<CombinedState<Output>>;\n\n  /** Buffers a value state. The buffered state overwrites the output\n   *  state when a subscription occurs.\n   *  @param value the state to roll over. Setting this to `null` or `undefined`\n   *  has no effect.\n   */\n  async buffer(value: Input): Promise<void> {\n    const normalized = value ?? null;\n    if (normalized !== null) {\n      await this.bufferedState.update(() => normalized);\n    }\n  }\n\n  /** The data presently being buffered. This emits the pending value each time\n   *  new buffer data is provided. It emits null when the buffer is empty.\n   */\n  readonly bufferedState$: Observable<Input>;\n\n  /** Updates the output state.\n   *  @param configureState a callback that returns an updated output\n   *   state. The callback receives the state's present value as its\n   *   first argument and the dependencies listed in `options.combinedLatestWith`\n   *   as its second argument.\n   *  @param options configures how the update is applied. See {@link StateUpdateOptions}.\n   */\n  update<TCombine>(\n    configureState: (state: Output, dependencies: TCombine) => Output,\n    options: StateUpdateOptions<Output, TCombine> = null,\n  ): Promise<Output> {\n    return this.output.update(configureState, options);\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\n/** A packing strategy that packs data into a string.\n */\nexport abstract class DataPacker {\n  /**\n   * Packs value into a string format.\n   * @type {Data} is the type of data being protected.\n   * @param value is packed into the string\n   * @returns the packed string\n   */\n  abstract pack<Data>(value: Jsonify<Data>): string;\n\n  /** Unpacks a string produced by pack.\n   * @param packedValue is the string to unpack\n   * @type {Data} is the type of data being protected.\n   * @returns the data stored within the secret.\n   * @throws when `packedValue` has an invalid format.\n   */\n  abstract unpack<Data>(packedValue: string): Jsonify<Data>;\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../platform/misc/utils\";\n\nimport { DataPacker as DataPackerAbstraction } from \"./data-packer.abstraction\";\n\nconst DATA_PACKING = Object.freeze({\n  /** The character to use for padding. */\n  padding: \"0\",\n\n  /** The character dividing packed data. */\n  divider: \"|\",\n\n  /** A regular expression for detecting invalid padding. When the character\n   *  changes, this should be updated to include the new padding pattern.\n   */\n  hasInvalidPadding: /[^0]/,\n});\n\n/** A packing strategy that conceals the length of secret data by padding it\n *  to a multiple of the frame size.\n *  @example\n *  // packed === \"24|e2Zvbzp0cnVlfQ==|0000\"\n *  const packer = new SecretPacker(24);\n *  const packed = packer.pack({ foo: true });\n */\nexport class PaddedDataPacker extends DataPackerAbstraction {\n  /** Instantiates the padded data packer\n   *  @param frameSize The size of the dataframe used to pad encrypted values.\n   */\n  constructor(private readonly frameSize: number) {\n    super();\n  }\n\n  /**\n   * Packs value into a string format that conceals the length by obscuring it\n   * with the frameSize.\n   * @see {@link DataPackerAbstraction.unpack}\n   */\n  pack<Secret>(value: Jsonify<Secret>) {\n    // encode the value\n    const json = JSON.stringify(value);\n    const b64 = Utils.fromUtf8ToB64(json);\n\n    // calculate packing metadata\n    const frameSize = JSON.stringify(this.frameSize);\n    const separatorLength = 2 * DATA_PACKING.divider.length; // there are 2 separators\n    const payloadLength = b64.length + frameSize.length + separatorLength;\n    const paddingLength = this.frameSize - (payloadLength % this.frameSize);\n\n    // pack the data, thereby concealing its length\n    const padding = DATA_PACKING.padding.repeat(paddingLength);\n    const packed = `${frameSize}|${b64}|${padding}`;\n\n    return packed;\n  }\n\n  /** {@link DataPackerAbstraction.unpack} */\n  unpack<Secret>(secret: string): Jsonify<Secret> {\n    // frame size is stored before the JSON payload in base 10\n    const frameEndIndex = secret.indexOf(DATA_PACKING.divider);\n    if (frameEndIndex < 1) {\n      throw new Error(\"missing frame size\");\n    }\n    const frameSize = parseInt(secret.slice(0, frameEndIndex), 10);\n    const dataStartIndex = frameEndIndex + 1;\n\n    // The decrypted string should be a multiple of the frame length\n    if (secret.length % frameSize > 0) {\n      throw new Error(\"invalid length\");\n    }\n\n    // encoded data terminates with the divider, followed by the padding character\n    const dataEndIndex = secret.lastIndexOf(DATA_PACKING.divider);\n    if (dataEndIndex == frameEndIndex) {\n      throw new Error(\"missing json object\");\n    }\n    const paddingStartIndex = dataEndIndex + 1;\n\n    // If the padding contains invalid padding characters then the padding could be used\n    // as a side channel for arbitrary data.\n    if (secret.slice(paddingStartIndex).match(DATA_PACKING.hasInvalidPadding)) {\n      throw new Error(\"invalid padding\");\n    }\n\n    // remove frame size and padding\n    const b64 = secret.slice(dataStartIndex, dataEndIndex);\n\n    // unpack the stored data\n    const json = Utils.fromB64ToUtf8(b64);\n    const unpacked = JSON.parse(json);\n\n    return unpacked;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserKeyDefinitionOptions, UserKeyDefinition } from \"../../platform/state\";\n// eslint-disable-next-line -- `StateDefinition` used as an argument\nimport { StateDefinition } from \"../../platform/state/state-definition\";\nimport { ClassifiedFormat } from \"./classified-format\";\nimport { Classifier } from \"./classifier\";\n\n/** Encryption and storage settings for data stored by a `SecretState`.\n */\nexport class SecretKeyDefinition<Outer, Id, Inner extends object, Disclosed, Secret> {\n  private constructor(\n    readonly stateDefinition: StateDefinition,\n    readonly key: string,\n    readonly classifier: Classifier<Inner, Disclosed, Secret>,\n    readonly options: UserKeyDefinitionOptions<Inner>,\n    // type erasure is necessary here because typescript doesn't support\n    // higher kinded types that generalize over collections. The invariants\n    // needed to make this typesafe are maintained by the static factories.\n    readonly deconstruct: (value: any) => [Id, any][],\n    readonly reconstruct: ([inners, ids]: (readonly [Id, any])[]) => Outer,\n  ) {}\n\n  /** Converts the secret key to the `KeyDefinition` used for secret storage. */\n  toEncryptedStateKey() {\n    const secretKey = new UserKeyDefinition<ClassifiedFormat<Id, Disclosed>[]>(\n      this.stateDefinition,\n      this.key,\n      {\n        cleanupDelayMs: this.options.cleanupDelayMs,\n        deserializer: (jsonValue) => jsonValue as ClassifiedFormat<Id, Disclosed>[],\n        // Clear encrypted state on logout\n        clearOn: this.options.clearOn,\n      },\n    );\n\n    return secretKey;\n  }\n\n  /**\n   * Define a secret state for a single value\n   * @param stateDefinition The domain of the secret's durable state.\n   * @param key Domain key that identifies the stored value. This key must not be reused\n   *    in any capacity.\n   * @param classifier Partitions the value into encrypted, discarded, and public data.\n   * @param options Configures the operation of the secret state.\n   */\n  static value<Value extends object, Disclosed, Secret>(\n    stateDefinition: StateDefinition,\n    key: string,\n    classifier: Classifier<Value, Disclosed, Secret>,\n    options: UserKeyDefinitionOptions<Value>,\n  ) {\n    return new SecretKeyDefinition<Value, void, Value, Disclosed, Secret>(\n      stateDefinition,\n      key,\n      classifier,\n      options,\n      (value) => [[null, value]],\n      ([[, inner]]) => inner,\n    );\n  }\n\n  /**\n   * Define a secret state for an array of values. Each item is encrypted separately.\n   * @param stateDefinition The domain of the secret's durable state.\n   * @param key Domain key that identifies the stored items. This key must not be reused\n   *    in any capacity.\n   * @param classifier Partitions each item into encrypted, discarded, and public data.\n   * @param options Configures the operation of the secret state.\n   */\n  static array<Item extends object, Disclosed, Secret>(\n    stateDefinition: StateDefinition,\n    key: string,\n    classifier: Classifier<Item, Disclosed, Secret>,\n    options: UserKeyDefinitionOptions<Item>,\n  ) {\n    return new SecretKeyDefinition<Item[], number, Item, Disclosed, Secret>(\n      stateDefinition,\n      key,\n      classifier,\n      options,\n      (value) => value.map((v: any, id: number) => [id, v]),\n      (values) => values.map(([, v]) => v),\n    );\n  }\n\n  /**\n   * Define a secret state for a record. Each property is encrypted separately.\n   * @param stateDefinition The domain of the secret's durable state.\n   * @param key Domain key that identifies the stored properties. This key must not be reused\n   *    in any capacity.\n   * @param classifier Partitions each property into encrypted, discarded, and public data.\n   * @param options Configures the operation of the secret state.\n   */\n  static record<Item extends object, Disclosed, Secret, Id extends string | number>(\n    stateDefinition: StateDefinition,\n    key: string,\n    classifier: Classifier<Item, Disclosed, Secret>,\n    options: UserKeyDefinitionOptions<Item>,\n  ) {\n    return new SecretKeyDefinition<Record<Id, Item>, Id, Item, Disclosed, Secret>(\n      stateDefinition,\n      key,\n      classifier,\n      options,\n      (value) => Object.entries(value) as [Id, Item][],\n      (values) => Object.fromEntries(values) as Record<Id, Item>,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, map, concatMap, share, ReplaySubject, timer, combineLatest, of } from \"rxjs\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport {\n  SingleUserState,\n  StateProvider,\n  StateUpdateOptions,\n  CombinedState,\n} from \"../../platform/state\";\nimport { UserId } from \"../../types/guid\";\nimport { UserEncryptor } from \"../cryptography/user-encryptor.abstraction\";\n\nimport { ClassifiedFormat } from \"./classified-format\";\nimport { SecretKeyDefinition } from \"./secret-key-definition\";\n\nconst ONE_MINUTE = 1000 * 60;\n\n/** Stores account-specific secrets protected by a UserKeyEncryptor.\n *\n *  @remarks This state store changes the structure of `Plaintext` during\n *  storage, and requires user keys to operate. It is incompatible with sync,\n *  which expects the disk storage format to be identical to the sync format.\n *\n *  DO NOT USE THIS for synchronized data.\n */\nexport class SecretState<Outer, Id, Plaintext extends object, Disclosed, Secret>\n  implements SingleUserState<Outer>\n{\n  // The constructor is private to avoid creating a circular dependency when\n  // wiring the derived and secret states together.\n  private constructor(\n    private readonly key: SecretKeyDefinition<Outer, Id, Plaintext, Disclosed, Secret>,\n    private readonly $encryptor: Observable<UserEncryptor>,\n    userId: UserId,\n    provider: StateProvider,\n  ) {\n    // construct the backing store\n    this.encryptedState = provider.getUser(userId, key.toEncryptedStateKey());\n\n    // cache plaintext\n    this.combinedState$ = combineLatest([this.encryptedState.combinedState$, this.$encryptor]).pipe(\n      concatMap(\n        async ([[userId, state], encryptor]) =>\n          [userId, await this.declassifyAll(encryptor, state)] as [UserId, Outer],\n      ),\n      share({\n        connector: () => {\n          return new ReplaySubject<[UserId, Outer]>(1);\n        },\n        resetOnRefCountZero: () => timer(key.options.cleanupDelayMs ?? ONE_MINUTE),\n      }),\n    );\n\n    this.state$ = this.combinedState$.pipe(map(([, state]) => state));\n  }\n\n  private readonly encryptedState: SingleUserState<ClassifiedFormat<Id, Disclosed>[]>;\n\n  /** {@link SingleUserState.userId} */\n  get userId() {\n    return this.encryptedState.userId;\n  }\n\n  /** Observes changes to the decrypted secret state. The observer\n   *  updates after the secret has been recorded to state storage.\n   *  @returns `undefined` when the account is locked.\n   */\n  readonly state$: Observable<Outer>;\n\n  /** {@link SingleUserState.combinedState$} */\n  readonly combinedState$: Observable<CombinedState<Outer>>;\n\n  /** Creates a secret state bound to an account encryptor. The account must be unlocked\n   *  when this method is called.\n   *  @param userId: the user to which the secret state is bound.\n   *  @param key Converts between a declassified secret and its formal type.\n   *  @param provider constructs state objects.\n   *  @param encryptor protects `Secret` data.\n   *  @throws when `key.stateDefinition` is backed by memory storage.\n   *  @remarks Secrets are written to a secret store as a named tuple. Data classification is\n   *    determined by the encryptor's classifier. Secret-classification data is jsonified,\n   *    encrypted, and stored in a `secret` property. Disclosed-classification data is stored\n   *    in a `disclosed` property. Omitted-classification data is not stored.\n   */\n  static from<Outer, Id, TFrom extends object, Disclosed, Secret>(\n    userId: UserId,\n    key: SecretKeyDefinition<Outer, Id, TFrom, Disclosed, Secret>,\n    provider: StateProvider,\n    encryptor$: Observable<UserEncryptor>,\n  ) {\n    const secretState = new SecretState(key, encryptor$, userId, provider);\n    return secretState;\n  }\n\n  private async declassifyItem(\n    encryptor: UserEncryptor,\n    { id, secret, disclosed }: ClassifiedFormat<Id, Disclosed>,\n  ) {\n    const encrypted = EncString.fromJSON(secret);\n    const decrypted = await encryptor.decrypt(encrypted);\n\n    const declassified = this.key.classifier.declassify(disclosed, decrypted);\n    const result = [id, this.key.options.deserializer(declassified)] as const;\n\n    return result;\n  }\n\n  private async declassifyAll(encryptor: UserEncryptor, data: ClassifiedFormat<Id, Disclosed>[]) {\n    // fail fast if there's no value\n    if (data === null || data === undefined) {\n      return null;\n    }\n\n    // decrypt each item\n    const decryptTasks = data.map(async (item) => this.declassifyItem(encryptor, item));\n\n    // reconstruct expected type\n    const results = await Promise.all(decryptTasks);\n    const result = this.key.reconstruct(results);\n\n    return result;\n  }\n\n  private async classifyItem(encryptor: UserEncryptor, [id, item]: [Id, Plaintext]) {\n    const classified = this.key.classifier.classify(item);\n    const encrypted = await encryptor.encrypt(classified.secret);\n\n    // the deserializer in the plaintextState's `derive` configuration always runs, but\n    // `encryptedState` is not guaranteed to serialize the data, so it's necessary to\n    // round-trip `encrypted` proactively.\n    const serialized = {\n      id,\n      secret: JSON.parse(JSON.stringify(encrypted)),\n      disclosed: classified.disclosed,\n    } as ClassifiedFormat<Id, Disclosed>;\n\n    return serialized;\n  }\n\n  private async classifyAll(encryptor: UserEncryptor, data: Outer) {\n    // fail fast if there's no value\n    if (data === null || data === undefined) {\n      return null;\n    }\n\n    // convert the object to a list format so that all encrypt and decrypt\n    // operations are self-similar\n    const desconstructed = this.key.deconstruct(data);\n\n    // encrypt each value individually\n    const classifyTasks = desconstructed.map(async (item) => this.classifyItem(encryptor, item));\n    const classified = await Promise.all(classifyTasks);\n\n    return classified;\n  }\n\n  /** Updates the secret stored by this state.\n   *  @param configureState a callback that returns an updated decrypted\n   *   secret state. The callback receives the state's present value as its\n   *   first argument and the dependencies listed in `options.combinedLatestWith`\n   *   as its second argument.\n   *  @param options configures how the update is applied. See {@link StateUpdateOptions}.\n   *  @returns a promise that resolves with the updated value read from the state.\n   *   The round-trip encrypts, decrypts, and deserializes the data, producing a new\n   *   object.\n   *  @remarks `configureState` must return a JSON-serializable object.\n   *   If there are properties of your class which are not JSON-serializable,\n   *   they can be lost when the secret state updates its backing store.\n   */\n  async update<TCombine>(\n    configureState: (state: Outer, dependencies: TCombine) => Outer,\n    options: StateUpdateOptions<Outer, TCombine> = null,\n  ): Promise<Outer> {\n    const combineLatestWith = combineLatest([\n      options?.combineLatestWith ?? of(null),\n      this.$encryptor,\n    ]);\n\n    // read the backing store\n    let latestClassified: ClassifiedFormat<Id, Disclosed>[];\n    let latestCombined: TCombine;\n    let latestEncryptor: UserEncryptor;\n    await this.encryptedState.update((c) => c, {\n      shouldUpdate: (latest, combined) => {\n        latestClassified = latest;\n        [latestCombined, latestEncryptor] = combined;\n        return false;\n      },\n      combineLatestWith,\n    });\n\n    // exit early if there's no update to apply\n    const latestDeclassified = await this.declassifyAll(latestEncryptor, latestClassified);\n    const shouldUpdate = options?.shouldUpdate?.(latestDeclassified, latestCombined) ?? true;\n    if (!shouldUpdate) {\n      return latestDeclassified;\n    }\n\n    // apply the update\n    const updatedDeclassified = configureState(latestDeclassified, latestCombined);\n    const updatedClassified = await this.classifyAll(latestEncryptor, updatedDeclassified);\n    await this.encryptedState.update(() => updatedClassified);\n\n    return updatedDeclassified;\n  }\n}\n","// Note: the below comments are just for documenting what they used to be.\nexport const VaultTimeoutStringType = {\n  Never: \"never\", // null\n  OnRestart: \"onRestart\", // -1\n  OnLocked: \"onLocked\", // -2\n  OnSleep: \"onSleep\", // -3\n  OnIdle: \"onIdle\", // -4\n} as const;\n\nexport type VaultTimeout =\n  | number // 0 or positive numbers only\n  | (typeof VaultTimeoutStringType)[keyof typeof VaultTimeoutStringType];\n\nexport interface VaultTimeoutOption {\n  name: string;\n  value: VaultTimeout;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { LocalData } from \"@bitwarden/common/vault/models/data/local.data\";\nimport { UserKeyRotationDataProvider } from \"@bitwarden/key-management\";\n\nimport { UriMatchStrategySetting } from \"../../models/domain/domain-service\";\nimport { SymmetricCryptoKey } from \"../../platform/models/domain/symmetric-crypto-key\";\nimport { CipherId, CollectionId, OrganizationId, UserId } from \"../../types/guid\";\nimport { UserKey } from \"../../types/key\";\nimport { CipherType } from \"../enums/cipher-type\";\nimport { CipherData } from \"../models/data/cipher.data\";\nimport { Cipher } from \"../models/domain/cipher\";\nimport { Field } from \"../models/domain/field\";\nimport { CipherWithIdRequest } from \"../models/request/cipher-with-id.request\";\nimport { CipherView } from \"../models/view/cipher.view\";\nimport { FieldView } from \"../models/view/field.view\";\nimport { AddEditCipherInfo } from \"../types/add-edit-cipher-info\";\n\nexport abstract class CipherService implements UserKeyRotationDataProvider<CipherWithIdRequest> {\n  cipherViews$: Observable<CipherView[]>;\n  ciphers$: Observable<Record<CipherId, CipherData>>;\n  localData$: Observable<Record<CipherId, LocalData>>;\n  /**\n   *  An observable monitoring the add/edit cipher info saved to memory.\n   */\n  addEditCipherInfo$: Observable<AddEditCipherInfo>;\n  /**\n   * Observable that emits an array of cipherViews that failed to decrypt. Does not emit until decryption has completed.\n   *\n   * An empty array indicates that all ciphers were successfully decrypted.\n   */\n  failedToDecryptCiphers$: Observable<CipherView[]>;\n  clearCache: (userId?: string) => Promise<void>;\n  encrypt: (\n    model: CipherView,\n    userId: UserId,\n    keyForEncryption?: SymmetricCryptoKey,\n    keyForCipherKeyDecryption?: SymmetricCryptoKey,\n    originalCipher?: Cipher,\n  ) => Promise<Cipher>;\n  encryptFields: (fieldsModel: FieldView[], key: SymmetricCryptoKey) => Promise<Field[]>;\n  encryptField: (fieldModel: FieldView, key: SymmetricCryptoKey) => Promise<Field>;\n  get: (id: string) => Promise<Cipher>;\n  getAll: () => Promise<Cipher[]>;\n  getAllDecrypted: () => Promise<CipherView[]>;\n  getAllDecryptedForGrouping: (groupingId: string, folder?: boolean) => Promise<CipherView[]>;\n  getAllDecryptedForUrl: (\n    url: string,\n    includeOtherTypes?: CipherType[],\n    defaultMatch?: UriMatchStrategySetting,\n  ) => Promise<CipherView[]>;\n  filterCiphersForUrl: (\n    ciphers: CipherView[],\n    url: string,\n    includeOtherTypes?: CipherType[],\n    defaultMatch?: UriMatchStrategySetting,\n  ) => Promise<CipherView[]>;\n  getAllFromApiForOrganization: (organizationId: string) => Promise<CipherView[]>;\n  /**\n   * Gets ciphers belonging to the specified organization that the user has explicit collection level access to.\n   * Ciphers that are not assigned to any collections are only included for users with admin access.\n   */\n  getManyFromApiForOrganization: (organizationId: string) => Promise<CipherView[]>;\n  getLastUsedForUrl: (url: string, autofillOnPageLoad: boolean) => Promise<CipherView>;\n  getLastLaunchedForUrl: (url: string, autofillOnPageLoad: boolean) => Promise<CipherView>;\n  getNextCipherForUrl: (url: string) => Promise<CipherView>;\n  updateLastUsedIndexForUrl: (url: string) => void;\n  updateLastUsedDate: (id: string) => Promise<void>;\n  updateLastLaunchedDate: (id: string) => Promise<void>;\n  saveNeverDomain: (domain: string) => Promise<void>;\n  /**\n   * Create a cipher with the server\n   *\n   * @param cipher The cipher to create\n   * @param orgAdmin If true, the request is submitted as an organization admin request\n   *\n   * @returns A promise that resolves to the created cipher\n   */\n  createWithServer: (cipher: Cipher, orgAdmin?: boolean) => Promise<Cipher>;\n  /**\n   * Update a cipher with the server\n   * @param cipher The cipher to update\n   * @param orgAdmin If true, the request is submitted as an organization admin request\n   * @param isNotClone If true, the cipher is not a clone and should be treated as a new cipher\n   *\n   * @returns A promise that resolves to the updated cipher\n   */\n  updateWithServer: (cipher: Cipher, orgAdmin?: boolean, isNotClone?: boolean) => Promise<Cipher>;\n  shareWithServer: (\n    cipher: CipherView,\n    organizationId: string,\n    collectionIds: string[],\n    userId: UserId,\n  ) => Promise<any>;\n  shareManyWithServer: (\n    ciphers: CipherView[],\n    organizationId: string,\n    collectionIds: string[],\n    userId: UserId,\n  ) => Promise<any>;\n  saveAttachmentWithServer: (\n    cipher: Cipher,\n    unencryptedFile: any,\n    userId: UserId,\n    admin?: boolean,\n  ) => Promise<Cipher>;\n  saveAttachmentRawWithServer: (\n    cipher: Cipher,\n    filename: string,\n    data: ArrayBuffer,\n    userId: UserId,\n    admin?: boolean,\n  ) => Promise<Cipher>;\n  /**\n   * Save the collections for a cipher with the server\n   *\n   * @param cipher The cipher to save collections for\n   *\n   * @returns A promise that resolves when the collections have been saved\n   */\n  saveCollectionsWithServer: (cipher: Cipher) => Promise<Cipher>;\n\n  /**\n   * Save the collections for a cipher with the server as an admin.\n   * Used for Unassigned ciphers or when the user only has admin access to the cipher (not assigned normally).\n   * @param cipher\n   */\n  saveCollectionsWithServerAdmin: (cipher: Cipher) => Promise<Cipher>;\n  /**\n   * Bulk update collections for many ciphers with the server\n   * @param orgId\n   * @param cipherIds\n   * @param collectionIds\n   * @param removeCollections - If true, the collections will be removed from the ciphers, otherwise they will be added\n   */\n  bulkUpdateCollectionsWithServer: (\n    orgId: OrganizationId,\n    cipherIds: CipherId[],\n    collectionIds: CollectionId[],\n    removeCollections: boolean,\n  ) => Promise<void>;\n  /**\n   * Update the local store of CipherData with the provided data. Values are upserted into the existing store.\n   *\n   * @param cipher The cipher data to upsert. Can be a single CipherData object or an array of CipherData objects.\n   * @returns A promise that resolves to a record of updated cipher store, keyed by their cipher ID. Returns all ciphers, not just those updated\n   */\n  upsert: (cipher: CipherData | CipherData[]) => Promise<Record<CipherId, CipherData>>;\n  replace: (ciphers: { [id: string]: CipherData }, userId: UserId) => Promise<any>;\n  clear: (userId?: string) => Promise<void>;\n  moveManyWithServer: (ids: string[], folderId: string) => Promise<any>;\n  delete: (id: string | string[]) => Promise<any>;\n  deleteWithServer: (id: string, asAdmin?: boolean) => Promise<any>;\n  deleteManyWithServer: (ids: string[], asAdmin?: boolean) => Promise<any>;\n  deleteAttachment: (id: string, attachmentId: string) => Promise<void>;\n  deleteAttachmentWithServer: (id: string, attachmentId: string) => Promise<void>;\n  sortCiphersByLastUsed: (a: CipherView, b: CipherView) => number;\n  sortCiphersByLastUsedThenName: (a: CipherView, b: CipherView) => number;\n  getLocaleSortingFunction: () => (a: CipherView, b: CipherView) => number;\n  softDelete: (id: string | string[]) => Promise<any>;\n  softDeleteWithServer: (id: string, asAdmin?: boolean) => Promise<any>;\n  softDeleteManyWithServer: (ids: string[], asAdmin?: boolean) => Promise<any>;\n  restore: (\n    cipher: { id: string; revisionDate: string } | { id: string; revisionDate: string }[],\n  ) => Promise<any>;\n  restoreWithServer: (id: string, asAdmin?: boolean) => Promise<any>;\n  restoreManyWithServer: (ids: string[], orgId?: string) => Promise<void>;\n  getKeyForCipherKeyDecryption: (cipher: Cipher, userId: UserId) => Promise<any>;\n  setAddEditCipherInfo: (value: AddEditCipherInfo) => Promise<void>;\n  /**\n   * Returns user ciphers re-encrypted with the new user key.\n   * @param originalUserKey the original user key\n   * @param newUserKey the new user key\n   * @param userId the user id\n   * @throws Error if new user key is null\n   * @returns a list of user ciphers that have been re-encrypted with the new user key\n   */\n  getRotatedData: (\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ) => Promise<CipherWithIdRequest[]>;\n  getNextCardCipher: () => Promise<CipherView>;\n  getNextIdentityCipher: () => Promise<CipherView>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { Folder } from \"../../models/domain/folder\";\nimport { FolderResponse } from \"../../models/response/folder.response\";\n\nexport class FolderApiServiceAbstraction {\n  save: (folder: Folder, userId: UserId) => Promise<any>;\n  delete: (id: string, userId: UserId) => Promise<any>;\n  get: (id: string) => Promise<FolderResponse>;\n  deleteAll: (userId: UserId) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserKeyRotationDataProvider } from \"@bitwarden/key-management\";\n\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { UserId } from \"../../../types/guid\";\nimport { UserKey } from \"../../../types/key\";\nimport { FolderData } from \"../../models/data/folder.data\";\nimport { Folder } from \"../../models/domain/folder\";\nimport { FolderWithIdRequest } from \"../../models/request/folder-with-id.request\";\nimport { FolderView } from \"../../models/view/folder.view\";\n\nexport abstract class FolderService implements UserKeyRotationDataProvider<FolderWithIdRequest> {\n  folders$: (userId: UserId) => Observable<Folder[]>;\n  folderViews$: (userId: UserId) => Observable<FolderView[]>;\n\n  clearDecryptedFolderState: (userId: UserId) => Promise<void>;\n  encrypt: (model: FolderView, key: SymmetricCryptoKey) => Promise<Folder>;\n  get: (id: string, userId: UserId) => Promise<Folder>;\n  getDecrypted$: (id: string, userId: UserId) => Observable<FolderView | undefined>;\n  /**\n   * @deprecated Use firstValueFrom(folders$) directly instead\n   * @param userId The user id\n   * @returns Promise of folders array\n   */\n  getAllFromState: (userId: UserId) => Promise<Folder[]>;\n  /**\n   * @deprecated Only use in CLI!\n   */\n  getFromState: (id: string, userId: UserId) => Promise<Folder>;\n  /**\n   * @deprecated Only use in CLI!\n   */\n  getAllDecryptedFromState: (userId: UserId) => Promise<FolderView[]>;\n  /**\n   * Returns user folders re-encrypted with the new user key.\n   * @param originalUserKey the original user key\n   * @param newUserKey the new user key\n   * @param userId the user id\n   * @throws Error if new user key is null\n   * @returns a list of user folders that have been re-encrypted with the new user key\n   */\n  getRotatedData: (\n    originalUserKey: UserKey,\n    newUserKey: UserKey,\n    userId: UserId,\n  ) => Promise<FolderWithIdRequest[]>;\n}\n\nexport abstract class InternalFolderService extends FolderService {\n  upsert: (folder: FolderData | FolderData[], userId: UserId) => Promise<void>;\n  replace: (folders: { [id: string]: FolderData }, userId: UserId) => Promise<void>;\n  clear: (userId: UserId) => Promise<void>;\n  delete: (id: string | string[], userId: UserId) => Promise<any>;\n}\n","/**\n * This interface defines the a contract for a service that prompts the user to upgrade to premium.\n * It ensures that PremiumUpgradePromptService contains a promptForPremium method.\n */\nexport abstract class PremiumUpgradePromptService {\n  abstract promptForPremium(organizationId?: string): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class TotpService {\n  getCode: (key: string) => Promise<string>;\n  getTimeInterval: (key: string) => number;\n}\n","import { CipherView } from \"../models/view/cipher.view\";\n\n/**\n * The ViewPasswordHistoryService is responsible for displaying the password history for a cipher.\n */\nexport abstract class ViewPasswordHistoryService {\n  abstract viewPasswordHistory(cipher: CipherView): Promise<void>;\n}\n","export enum CipherRepromptType {\n  None = 0,\n  Password = 1,\n}\n","export enum CipherType {\n  Login = 1,\n  SecureNote = 2,\n  Card = 3,\n  Identity = 4,\n  SshKey = 5,\n}\n","export enum FieldType {\n  Text = 0,\n  Hidden = 1,\n  Boolean = 2,\n  Linked = 3,\n}\n","export type LinkedIdType = LoginLinkedId | CardLinkedId | IdentityLinkedId;\n\n// LoginView\nexport enum LoginLinkedId {\n  Username = 100,\n  Password = 101,\n}\n\n// CardView\nexport enum CardLinkedId {\n  CardholderName = 300,\n  ExpMonth = 301,\n  ExpYear = 302,\n  Code = 303,\n  Brand = 304,\n  Number = 305,\n}\n\n// IdentityView\nexport enum IdentityLinkedId {\n  Title = 400,\n  MiddleName = 401,\n  Address1 = 402,\n  Address2 = 403,\n  Address3 = 404,\n  City = 405,\n  State = 406,\n  PostalCode = 407,\n  Country = 408,\n  Company = 409,\n  Email = 410,\n  Phone = 411,\n  Ssn = 412,\n  Username = 413,\n  PassportNumber = 414,\n  LicenseNumber = 415,\n  FirstName = 416,\n  LastName = 417,\n  FullName = 418,\n}\n","export enum SecureNoteType {\n  Generic = 0,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LinkedIdType } from \"./enums\";\nimport { ItemView } from \"./models/view/item.view\";\n\ntype LinkedMetadataAttributes = {\n  /**\n   * The i18n key used to describe the decorated class property in the UI.\n   * If it is null, then the name of the class property will be used as the i18n key.\n   */\n  i18nKey?: string;\n\n  /**\n   * The position of the individual field to be applied when sorted.\n   */\n  sortPosition: number;\n};\n\nexport class LinkedMetadata {\n  private readonly _i18nKey: string;\n  readonly sortPosition: number;\n\n  constructor(\n    readonly propertyKey: string,\n    attributes: LinkedMetadataAttributes,\n  ) {\n    this._i18nKey = attributes?.i18nKey;\n    this.sortPosition = attributes.sortPosition;\n  }\n\n  get i18nKey() {\n    return this._i18nKey ?? this.propertyKey;\n  }\n}\n\n/**\n * A decorator used to set metadata used by Linked custom fields. Apply it to a class property or getter to make it\n *    available as a Linked custom field option.\n * @param id - A unique value that is saved in the Field model. It is used to look up the decorated class property.\n * @param options - {@link LinkedMetadataAttributes}\n */\nexport function linkedFieldOption(id: LinkedIdType, attributes: LinkedMetadataAttributes) {\n  return (prototype: ItemView, propertyKey: string) => {\n    if (prototype.linkedFieldOptions == null) {\n      prototype.linkedFieldOptions = new Map<LinkedIdType, LinkedMetadata>();\n    }\n\n    prototype.linkedFieldOptions.set(id, new LinkedMetadata(propertyKey, attributes));\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class CardApi extends BaseResponse {\n  cardholderName: string;\n  brand: string;\n  number: string;\n  expMonth: string;\n  expYear: string;\n  code: string;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.cardholderName = this.getResponseProperty(\"CardholderName\");\n    this.brand = this.getResponseProperty(\"Brand\");\n    this.number = this.getResponseProperty(\"Number\");\n    this.expMonth = this.getResponseProperty(\"ExpMonth\");\n    this.expYear = this.getResponseProperty(\"ExpYear\");\n    this.code = this.getResponseProperty(\"Code\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class Fido2CredentialApi extends BaseResponse {\n  credentialId: string;\n  keyType: \"public-key\";\n  keyAlgorithm: \"ECDSA\";\n  keyCurve: \"P-256\";\n  keyValue: string;\n  rpId: string;\n  userHandle: string;\n  userName: string;\n  counter: string;\n  rpName: string;\n  userDisplayName: string;\n  discoverable: string;\n  creationDate: string;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n\n    this.credentialId = this.getResponseProperty(\"CredentialId\");\n    this.keyType = this.getResponseProperty(\"KeyType\");\n    this.keyAlgorithm = this.getResponseProperty(\"KeyAlgorithm\");\n    this.keyCurve = this.getResponseProperty(\"KeyCurve\");\n    this.keyValue = this.getResponseProperty(\"keyValue\");\n    this.rpId = this.getResponseProperty(\"RpId\");\n    this.userHandle = this.getResponseProperty(\"UserHandle\");\n    this.userName = this.getResponseProperty(\"UserName\");\n    this.counter = this.getResponseProperty(\"Counter\");\n    this.rpName = this.getResponseProperty(\"RpName\");\n    this.userDisplayName = this.getResponseProperty(\"UserDisplayName\");\n    this.discoverable = this.getResponseProperty(\"Discoverable\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { FieldType, LinkedIdType } from \"../../enums\";\n\nexport class FieldApi extends BaseResponse {\n  name: string;\n  value: string;\n  type: FieldType;\n  linkedId: LinkedIdType;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.type = this.getResponseProperty(\"Type\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.value = this.getResponseProperty(\"Value\");\n    this.linkedId = this.getResponseProperty(\"linkedId\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class IdentityApi extends BaseResponse {\n  title: string;\n  firstName: string;\n  middleName: string;\n  lastName: string;\n  address1: string;\n  address2: string;\n  address3: string;\n  city: string;\n  state: string;\n  postalCode: string;\n  country: string;\n  company: string;\n  email: string;\n  phone: string;\n  ssn: string;\n  username: string;\n  passportNumber: string;\n  licenseNumber: string;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.title = this.getResponseProperty(\"Title\");\n    this.firstName = this.getResponseProperty(\"FirstName\");\n    this.middleName = this.getResponseProperty(\"MiddleName\");\n    this.lastName = this.getResponseProperty(\"LastName\");\n    this.address1 = this.getResponseProperty(\"Address1\");\n    this.address2 = this.getResponseProperty(\"Address2\");\n    this.address3 = this.getResponseProperty(\"Address3\");\n    this.city = this.getResponseProperty(\"City\");\n    this.state = this.getResponseProperty(\"State\");\n    this.postalCode = this.getResponseProperty(\"PostalCode\");\n    this.country = this.getResponseProperty(\"Country\");\n    this.company = this.getResponseProperty(\"Company\");\n    this.email = this.getResponseProperty(\"Email\");\n    this.phone = this.getResponseProperty(\"Phone\");\n    this.ssn = this.getResponseProperty(\"SSN\");\n    this.username = this.getResponseProperty(\"Username\");\n    this.passportNumber = this.getResponseProperty(\"PassportNumber\");\n    this.licenseNumber = this.getResponseProperty(\"LicenseNumber\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UriMatchStrategySetting } from \"../../../models/domain/domain-service\";\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class LoginUriApi extends BaseResponse {\n  uri: string;\n  uriChecksum: string;\n  match: UriMatchStrategySetting = null;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.uri = this.getResponseProperty(\"Uri\");\n    this.uriChecksum = this.getResponseProperty(\"UriChecksum\");\n    const match = this.getResponseProperty(\"Match\");\n    this.match = match != null ? match : null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { JsonObject } from \"type-fest\";\n\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nimport { Fido2CredentialApi } from \"./fido2-credential.api\";\nimport { LoginUriApi } from \"./login-uri.api\";\n\nexport class LoginApi extends BaseResponse {\n  uris: LoginUriApi[];\n  username: string;\n  password: string;\n  passwordRevisionDate: string;\n  totp: string;\n  autofillOnPageLoad: boolean;\n  fido2Credentials?: Fido2CredentialApi[];\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.username = this.getResponseProperty(\"Username\");\n    this.password = this.getResponseProperty(\"Password\");\n    this.passwordRevisionDate = this.getResponseProperty(\"PasswordRevisionDate\");\n    this.totp = this.getResponseProperty(\"Totp\");\n    this.autofillOnPageLoad = this.getResponseProperty(\"AutofillOnPageLoad\");\n\n    const uris = this.getResponseProperty(\"Uris\");\n    if (uris != null) {\n      this.uris = uris.map((u: any) => new LoginUriApi(u));\n    }\n\n    const fido2Credentials = this.getResponseProperty(\"Fido2Credentials\");\n    if (fido2Credentials != null) {\n      this.fido2Credentials = fido2Credentials.map(\n        (key: JsonObject) => new Fido2CredentialApi(key),\n      );\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { SecureNoteType } from \"../../enums\";\n\nexport class SecureNoteApi extends BaseResponse {\n  type: SecureNoteType;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.type = this.getResponseProperty(\"Type\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class SshKeyApi extends BaseResponse {\n  privateKey: string;\n  publicKey: string;\n  keyFingerprint: string;\n\n  constructor(data: any = null) {\n    super(data);\n    if (data == null) {\n      return;\n    }\n    this.privateKey = this.getResponseProperty(\"PrivateKey\");\n    this.publicKey = this.getResponseProperty(\"PublicKey\");\n    this.keyFingerprint = this.getResponseProperty(\"KeyFingerprint\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { AttachmentResponse } from \"../response/attachment.response\";\n\nexport class AttachmentData {\n  id: string;\n  url: string;\n  fileName: string;\n  key: string;\n  size: string;\n  sizeName: string;\n\n  constructor(response?: AttachmentResponse) {\n    if (response == null) {\n      return;\n    }\n    this.id = response.id;\n    this.url = response.url;\n    this.fileName = response.fileName;\n    this.key = response.key;\n    this.size = response.size;\n    this.sizeName = response.sizeName;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CardApi } from \"../api/card.api\";\n\nexport class CardData {\n  cardholderName: string;\n  brand: string;\n  number: string;\n  expMonth: string;\n  expYear: string;\n  code: string;\n\n  constructor(data?: CardApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.cardholderName = data.cardholderName;\n    this.brand = data.brand;\n    this.number = data.number;\n    this.expMonth = data.expMonth;\n    this.expYear = data.expYear;\n    this.code = data.code;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { CipherRepromptType } from \"../../enums/cipher-reprompt-type\";\nimport { CipherType } from \"../../enums/cipher-type\";\nimport { CipherResponse } from \"../response/cipher.response\";\n\nimport { AttachmentData } from \"./attachment.data\";\nimport { CardData } from \"./card.data\";\nimport { FieldData } from \"./field.data\";\nimport { IdentityData } from \"./identity.data\";\nimport { LoginData } from \"./login.data\";\nimport { PasswordHistoryData } from \"./password-history.data\";\nimport { SecureNoteData } from \"./secure-note.data\";\nimport { SshKeyData } from \"./ssh-key.data\";\n\nexport class CipherData {\n  id: string;\n  organizationId: string;\n  folderId: string;\n  edit: boolean;\n  viewPassword: boolean;\n  organizationUseTotp: boolean;\n  favorite: boolean;\n  revisionDate: string;\n  type: CipherType;\n  name: string;\n  notes: string;\n  login?: LoginData;\n  secureNote?: SecureNoteData;\n  card?: CardData;\n  identity?: IdentityData;\n  sshKey?: SshKeyData;\n  fields?: FieldData[];\n  attachments?: AttachmentData[];\n  passwordHistory?: PasswordHistoryData[];\n  collectionIds?: string[];\n  creationDate: string;\n  deletedDate: string;\n  reprompt: CipherRepromptType;\n  key: string;\n\n  constructor(response?: CipherResponse, collectionIds?: string[]) {\n    if (response == null) {\n      return;\n    }\n\n    this.id = response.id;\n    this.organizationId = response.organizationId;\n    this.folderId = response.folderId;\n    this.edit = response.edit;\n    this.viewPassword = response.viewPassword;\n    this.organizationUseTotp = response.organizationUseTotp;\n    this.favorite = response.favorite;\n    this.revisionDate = response.revisionDate;\n    this.type = response.type;\n    this.name = response.name;\n    this.notes = response.notes;\n    this.collectionIds = collectionIds != null ? collectionIds : response.collectionIds;\n    this.creationDate = response.creationDate;\n    this.deletedDate = response.deletedDate;\n    this.reprompt = response.reprompt;\n    this.key = response.key;\n\n    switch (this.type) {\n      case CipherType.Login:\n        this.login = new LoginData(response.login);\n        break;\n      case CipherType.SecureNote:\n        this.secureNote = new SecureNoteData(response.secureNote);\n        break;\n      case CipherType.Card:\n        this.card = new CardData(response.card);\n        break;\n      case CipherType.Identity:\n        this.identity = new IdentityData(response.identity);\n        break;\n      case CipherType.SshKey:\n        this.sshKey = new SshKeyData(response.sshKey);\n        break;\n      default:\n        break;\n    }\n\n    if (response.fields != null) {\n      this.fields = response.fields.map((f) => new FieldData(f));\n    }\n    if (response.attachments != null) {\n      this.attachments = response.attachments.map((a) => new AttachmentData(a));\n    }\n    if (response.passwordHistory != null) {\n      this.passwordHistory = response.passwordHistory.map((ph) => new PasswordHistoryData(ph));\n    }\n  }\n\n  static fromJSON(obj: Jsonify<CipherData>) {\n    return Object.assign(new CipherData(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Fido2CredentialApi } from \"../api/fido2-credential.api\";\n\nexport class Fido2CredentialData {\n  credentialId: string;\n  keyType: \"public-key\";\n  keyAlgorithm: \"ECDSA\";\n  keyCurve: \"P-256\";\n  keyValue: string;\n  rpId: string;\n  userHandle: string;\n  userName: string;\n  counter: string;\n  rpName: string;\n  userDisplayName: string;\n  discoverable: string;\n  creationDate: string;\n\n  constructor(data?: Fido2CredentialApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.credentialId = data.credentialId;\n    this.keyType = data.keyType;\n    this.keyAlgorithm = data.keyAlgorithm;\n    this.keyCurve = data.keyCurve;\n    this.keyValue = data.keyValue;\n    this.rpId = data.rpId;\n    this.userHandle = data.userHandle;\n    this.userName = data.userName;\n    this.counter = data.counter;\n    this.rpName = data.rpName;\n    this.userDisplayName = data.userDisplayName;\n    this.discoverable = data.discoverable;\n    this.creationDate = data.creationDate;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType, LinkedIdType } from \"../../enums\";\nimport { FieldApi } from \"../api/field.api\";\n\nexport class FieldData {\n  type: FieldType;\n  name: string;\n  value: string;\n  linkedId: LinkedIdType;\n\n  constructor(response?: FieldApi) {\n    if (response == null) {\n      return;\n    }\n    this.type = response.type;\n    this.name = response.name;\n    this.value = response.value;\n    this.linkedId = response.linkedId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { IdentityApi } from \"../api/identity.api\";\n\nexport class IdentityData {\n  title: string;\n  firstName: string;\n  middleName: string;\n  lastName: string;\n  address1: string;\n  address2: string;\n  address3: string;\n  city: string;\n  state: string;\n  postalCode: string;\n  country: string;\n  company: string;\n  email: string;\n  phone: string;\n  ssn: string;\n  username: string;\n  passportNumber: string;\n  licenseNumber: string;\n\n  constructor(data?: IdentityApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.title = data.title;\n    this.firstName = data.firstName;\n    this.middleName = data.middleName;\n    this.lastName = data.lastName;\n    this.address1 = data.address1;\n    this.address2 = data.address2;\n    this.address3 = data.address3;\n    this.city = data.city;\n    this.state = data.state;\n    this.postalCode = data.postalCode;\n    this.country = data.country;\n    this.company = data.company;\n    this.email = data.email;\n    this.phone = data.phone;\n    this.ssn = data.ssn;\n    this.username = data.username;\n    this.passportNumber = data.passportNumber;\n    this.licenseNumber = data.licenseNumber;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UriMatchStrategySetting } from \"../../../models/domain/domain-service\";\nimport { LoginUriApi } from \"../api/login-uri.api\";\n\nexport class LoginUriData {\n  uri: string;\n  uriChecksum: string;\n  match: UriMatchStrategySetting = null;\n\n  constructor(data?: LoginUriApi) {\n    if (data == null) {\n      return;\n    }\n    this.uri = data.uri;\n    this.uriChecksum = data.uriChecksum;\n    this.match = data.match;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LoginApi } from \"../api/login.api\";\n\nimport { Fido2CredentialData } from \"./fido2-credential.data\";\nimport { LoginUriData } from \"./login-uri.data\";\n\nexport class LoginData {\n  uris: LoginUriData[];\n  username: string;\n  password: string;\n  passwordRevisionDate: string;\n  totp: string;\n  autofillOnPageLoad: boolean;\n  fido2Credentials?: Fido2CredentialData[];\n\n  constructor(data?: LoginApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.username = data.username;\n    this.password = data.password;\n    this.passwordRevisionDate = data.passwordRevisionDate;\n    this.totp = data.totp;\n    this.autofillOnPageLoad = data.autofillOnPageLoad;\n\n    if (data.uris) {\n      this.uris = data.uris.map((u) => new LoginUriData(u));\n    }\n\n    if (data.fido2Credentials) {\n      this.fido2Credentials = data.fido2Credentials?.map((key) => new Fido2CredentialData(key));\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PasswordHistoryResponse } from \"../response/password-history.response\";\n\nexport class PasswordHistoryData {\n  password: string;\n  lastUsedDate: string;\n\n  constructor(response?: PasswordHistoryResponse) {\n    if (response == null) {\n      return;\n    }\n\n    this.password = response.password;\n    this.lastUsedDate = response.lastUsedDate;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType } from \"../../enums\";\nimport { SecureNoteApi } from \"../api/secure-note.api\";\n\nexport class SecureNoteData {\n  type: SecureNoteType;\n\n  constructor(data?: SecureNoteApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.type = data.type;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SshKeyApi } from \"../api/ssh-key.api\";\n\nexport class SshKeyData {\n  privateKey: string;\n  publicKey: string;\n  keyFingerprint: string;\n\n  constructor(data?: SshKeyApi) {\n    if (data == null) {\n      return;\n    }\n\n    this.privateKey = data.privateKey;\n    this.publicKey = data.publicKey;\n    this.keyFingerprint = data.keyFingerprint;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { AttachmentData } from \"../data/attachment.data\";\nimport { AttachmentView } from \"../view/attachment.view\";\n\nexport class Attachment extends Domain {\n  id: string;\n  url: string;\n  size: string;\n  sizeName: string; // Readable size, ex: \"4.2 KB\" or \"1.43 GB\"\n  key: EncString;\n  fileName: EncString;\n\n  constructor(obj?: AttachmentData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.size = obj.size;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        url: null,\n        sizeName: null,\n        fileName: null,\n        key: null,\n      },\n      [\"id\", \"url\", \"sizeName\"],\n    );\n  }\n\n  async decrypt(\n    orgId: string,\n    context = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<AttachmentView> {\n    const view = await this.decryptObj(\n      new AttachmentView(this),\n      {\n        fileName: null,\n      },\n      orgId,\n      encKey,\n      \"DomainType: Attachment; \" + context,\n    );\n\n    if (this.key != null) {\n      view.key = await this.decryptAttachmentKey(orgId, encKey);\n    }\n\n    return view;\n  }\n\n  private async decryptAttachmentKey(orgId: string, encKey?: SymmetricCryptoKey) {\n    try {\n      if (encKey == null) {\n        encKey = await this.getKeyForDecryption(orgId);\n      }\n\n      const encryptService = Utils.getContainerService().getEncryptService();\n      const decValue = await encryptService.decryptToBytes(this.key, encKey);\n      return new SymmetricCryptoKey(decValue);\n    } catch (e) {\n      // TODO: error?\n    }\n  }\n\n  private async getKeyForDecryption(orgId: string) {\n    const keyService = Utils.getContainerService().getKeyService();\n    return orgId != null\n      ? await keyService.getOrgKey(orgId)\n      : await keyService.getUserKeyWithLegacySupport();\n  }\n\n  toAttachmentData(): AttachmentData {\n    const a = new AttachmentData();\n    a.size = this.size;\n    this.buildDataModel(\n      this,\n      a,\n      {\n        id: null,\n        url: null,\n        sizeName: null,\n        fileName: null,\n        key: null,\n      },\n      [\"id\", \"url\", \"sizeName\"],\n    );\n    return a;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Attachment>>): Attachment {\n    if (obj == null) {\n      return null;\n    }\n\n    const key = EncString.fromJSON(obj.key);\n    const fileName = EncString.fromJSON(obj.fileName);\n\n    return Object.assign(new Attachment(), obj, {\n      key,\n      fileName,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { CardData } from \"../data/card.data\";\nimport { CardView } from \"../view/card.view\";\n\nexport class Card extends Domain {\n  cardholderName: EncString;\n  brand: EncString;\n  number: EncString;\n  expMonth: EncString;\n  expYear: EncString;\n  code: EncString;\n\n  constructor(obj?: CardData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        cardholderName: null,\n        brand: null,\n        number: null,\n        expMonth: null,\n        expYear: null,\n        code: null,\n      },\n      [],\n    );\n  }\n\n  async decrypt(\n    orgId: string,\n    context = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<CardView> {\n    return this.decryptObj(\n      new CardView(),\n      {\n        cardholderName: null,\n        brand: null,\n        number: null,\n        expMonth: null,\n        expYear: null,\n        code: null,\n      },\n      orgId,\n      encKey,\n      \"DomainType: Card; \" + context,\n    );\n  }\n\n  toCardData(): CardData {\n    const c = new CardData();\n    this.buildDataModel(this, c, {\n      cardholderName: null,\n      brand: null,\n      number: null,\n      expMonth: null,\n      expYear: null,\n      code: null,\n    });\n    return c;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Card>>): Card {\n    if (obj == null) {\n      return null;\n    }\n\n    const cardholderName = EncString.fromJSON(obj.cardholderName);\n    const brand = EncString.fromJSON(obj.brand);\n    const number = EncString.fromJSON(obj.number);\n    const expMonth = EncString.fromJSON(obj.expMonth);\n    const expYear = EncString.fromJSON(obj.expYear);\n    const code = EncString.fromJSON(obj.code);\n    return Object.assign(new Card(), obj, {\n      cardholderName,\n      brand,\n      number,\n      expMonth,\n      expYear,\n      code,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Decryptable } from \"../../../platform/interfaces/decryptable.interface\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { InitializerKey } from \"../../../platform/services/cryptography/initializer-key\";\nimport { CipherRepromptType } from \"../../enums/cipher-reprompt-type\";\nimport { CipherType } from \"../../enums/cipher-type\";\nimport { CipherData } from \"../data/cipher.data\";\nimport { LocalData } from \"../data/local.data\";\nimport { CipherView } from \"../view/cipher.view\";\n\nimport { Attachment } from \"./attachment\";\nimport { Card } from \"./card\";\nimport { Field } from \"./field\";\nimport { Identity } from \"./identity\";\nimport { Login } from \"./login\";\nimport { Password } from \"./password\";\nimport { SecureNote } from \"./secure-note\";\nimport { SshKey } from \"./ssh-key\";\n\nexport class Cipher extends Domain implements Decryptable<CipherView> {\n  readonly initializerKey = InitializerKey.Cipher;\n\n  id: string;\n  organizationId: string;\n  folderId: string;\n  name: EncString;\n  notes: EncString;\n  type: CipherType;\n  favorite: boolean;\n  organizationUseTotp: boolean;\n  edit: boolean;\n  viewPassword: boolean;\n  revisionDate: Date;\n  localData: LocalData;\n  login: Login;\n  identity: Identity;\n  card: Card;\n  secureNote: SecureNote;\n  sshKey: SshKey;\n  attachments: Attachment[];\n  fields: Field[];\n  passwordHistory: Password[];\n  collectionIds: string[];\n  creationDate: Date;\n  deletedDate: Date;\n  reprompt: CipherRepromptType;\n  key: EncString;\n\n  constructor(obj?: CipherData, localData: LocalData = null) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        organizationId: null,\n        folderId: null,\n        name: null,\n        notes: null,\n        key: null,\n      },\n      [\"id\", \"organizationId\", \"folderId\"],\n    );\n\n    this.type = obj.type;\n    this.favorite = obj.favorite;\n    this.organizationUseTotp = obj.organizationUseTotp;\n    this.edit = obj.edit;\n    if (obj.viewPassword != null) {\n      this.viewPassword = obj.viewPassword;\n    } else {\n      this.viewPassword = true; // Default for already synced Ciphers without viewPassword\n    }\n    this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;\n    this.collectionIds = obj.collectionIds;\n    this.localData = localData;\n    this.creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;\n    this.deletedDate = obj.deletedDate != null ? new Date(obj.deletedDate) : null;\n    this.reprompt = obj.reprompt;\n\n    switch (this.type) {\n      case CipherType.Login:\n        this.login = new Login(obj.login);\n        break;\n      case CipherType.SecureNote:\n        this.secureNote = new SecureNote(obj.secureNote);\n        break;\n      case CipherType.Card:\n        this.card = new Card(obj.card);\n        break;\n      case CipherType.Identity:\n        this.identity = new Identity(obj.identity);\n        break;\n      case CipherType.SshKey:\n        this.sshKey = new SshKey(obj.sshKey);\n        break;\n      default:\n        break;\n    }\n\n    if (obj.attachments != null) {\n      this.attachments = obj.attachments.map((a) => new Attachment(a));\n    } else {\n      this.attachments = null;\n    }\n\n    if (obj.fields != null) {\n      this.fields = obj.fields.map((f) => new Field(f));\n    } else {\n      this.fields = null;\n    }\n\n    if (obj.passwordHistory != null) {\n      this.passwordHistory = obj.passwordHistory.map((ph) => new Password(ph));\n    } else {\n      this.passwordHistory = null;\n    }\n  }\n\n  // We are passing the organizationId into the EncString.decrypt() method here, but because the encKey will always be\n  // present and so the organizationId will not be used.\n  // We will refactor the EncString.decrypt() in https://bitwarden.atlassian.net/browse/PM-3762 to remove the dependency on the organizationId.\n  async decrypt(encKey: SymmetricCryptoKey): Promise<CipherView> {\n    const model = new CipherView(this);\n    let bypassValidation = true;\n\n    if (this.key != null) {\n      const encryptService = Utils.getContainerService().getEncryptService();\n      const keyBytes = await encryptService.decryptToBytes(\n        this.key,\n        encKey,\n        `Cipher Id: ${this.id}; Content: CipherKey; IsEncryptedByOrgKey: ${this.organizationId != null}`,\n      );\n      if (keyBytes == null) {\n        model.name = \"[error: cannot decrypt]\";\n        model.decryptionFailure = true;\n        return model;\n      }\n      encKey = new SymmetricCryptoKey(keyBytes);\n      bypassValidation = false;\n    }\n\n    await this.decryptObj(\n      model,\n      {\n        name: null,\n        notes: null,\n      },\n      this.organizationId,\n      encKey,\n    );\n\n    switch (this.type) {\n      case CipherType.Login:\n        model.login = await this.login.decrypt(\n          this.organizationId,\n          bypassValidation,\n          `Cipher Id: ${this.id}`,\n          encKey,\n        );\n        break;\n      case CipherType.SecureNote:\n        model.secureNote = await this.secureNote.decrypt(\n          this.organizationId,\n          `Cipher Id: ${this.id}`,\n          encKey,\n        );\n        break;\n      case CipherType.Card:\n        model.card = await this.card.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);\n        break;\n      case CipherType.Identity:\n        model.identity = await this.identity.decrypt(\n          this.organizationId,\n          `Cipher Id: ${this.id}`,\n          encKey,\n        );\n        break;\n      case CipherType.SshKey:\n        model.sshKey = await this.sshKey.decrypt(\n          this.organizationId,\n          `Cipher Id: ${this.id}`,\n          encKey,\n        );\n        break;\n      default:\n        break;\n    }\n\n    if (this.attachments != null && this.attachments.length > 0) {\n      const attachments: any[] = [];\n      await this.attachments.reduce((promise, attachment) => {\n        return promise\n          .then(() => {\n            return attachment.decrypt(this.organizationId, `Cipher Id: ${this.id}`, encKey);\n          })\n          .then((decAttachment) => {\n            attachments.push(decAttachment);\n          });\n      }, Promise.resolve());\n      model.attachments = attachments;\n    }\n\n    if (this.fields != null && this.fields.length > 0) {\n      const fields: any[] = [];\n      await this.fields.reduce((promise, field) => {\n        return promise\n          .then(() => {\n            return field.decrypt(this.organizationId, encKey);\n          })\n          .then((decField) => {\n            fields.push(decField);\n          });\n      }, Promise.resolve());\n      model.fields = fields;\n    }\n\n    if (this.passwordHistory != null && this.passwordHistory.length > 0) {\n      const passwordHistory: any[] = [];\n      await this.passwordHistory.reduce((promise, ph) => {\n        return promise\n          .then(() => {\n            return ph.decrypt(this.organizationId, encKey);\n          })\n          .then((decPh) => {\n            passwordHistory.push(decPh);\n          });\n      }, Promise.resolve());\n      model.passwordHistory = passwordHistory;\n    }\n\n    return model;\n  }\n\n  toCipherData(): CipherData {\n    const c = new CipherData();\n    c.id = this.id;\n    c.organizationId = this.organizationId;\n    c.folderId = this.folderId;\n    c.edit = this.edit;\n    c.viewPassword = this.viewPassword;\n    c.organizationUseTotp = this.organizationUseTotp;\n    c.favorite = this.favorite;\n    c.revisionDate = this.revisionDate != null ? this.revisionDate.toISOString() : null;\n    c.type = this.type;\n    c.collectionIds = this.collectionIds;\n    c.creationDate = this.creationDate != null ? this.creationDate.toISOString() : null;\n    c.deletedDate = this.deletedDate != null ? this.deletedDate.toISOString() : null;\n    c.reprompt = this.reprompt;\n    c.key = this.key?.encryptedString;\n\n    this.buildDataModel(this, c, {\n      name: null,\n      notes: null,\n    });\n\n    switch (c.type) {\n      case CipherType.Login:\n        c.login = this.login.toLoginData();\n        break;\n      case CipherType.SecureNote:\n        c.secureNote = this.secureNote.toSecureNoteData();\n        break;\n      case CipherType.Card:\n        c.card = this.card.toCardData();\n        break;\n      case CipherType.Identity:\n        c.identity = this.identity.toIdentityData();\n        break;\n      case CipherType.SshKey:\n        c.sshKey = this.sshKey.toSshKeyData();\n        break;\n      default:\n        break;\n    }\n\n    if (this.fields != null) {\n      c.fields = this.fields.map((f) => f.toFieldData());\n    }\n    if (this.attachments != null) {\n      c.attachments = this.attachments.map((a) => a.toAttachmentData());\n    }\n    if (this.passwordHistory != null) {\n      c.passwordHistory = this.passwordHistory.map((ph) => ph.toPasswordHistoryData());\n    }\n    return c;\n  }\n\n  static fromJSON(obj: Jsonify<Cipher>) {\n    if (obj == null) {\n      return null;\n    }\n\n    const domain = new Cipher();\n    const name = EncString.fromJSON(obj.name);\n    const notes = EncString.fromJSON(obj.notes);\n    const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);\n    const deletedDate = obj.deletedDate == null ? null : new Date(obj.deletedDate);\n    const attachments = obj.attachments?.map((a: any) => Attachment.fromJSON(a));\n    const fields = obj.fields?.map((f: any) => Field.fromJSON(f));\n    const passwordHistory = obj.passwordHistory?.map((ph: any) => Password.fromJSON(ph));\n    const key = EncString.fromJSON(obj.key);\n\n    Object.assign(domain, obj, {\n      name,\n      notes,\n      revisionDate,\n      deletedDate,\n      attachments,\n      fields,\n      passwordHistory,\n      key,\n    });\n\n    switch (obj.type) {\n      case CipherType.Card:\n        domain.card = Card.fromJSON(obj.card);\n        break;\n      case CipherType.Identity:\n        domain.identity = Identity.fromJSON(obj.identity);\n        break;\n      case CipherType.Login:\n        domain.login = Login.fromJSON(obj.login);\n        break;\n      case CipherType.SecureNote:\n        domain.secureNote = SecureNote.fromJSON(obj.secureNote);\n        break;\n      case CipherType.SshKey:\n        domain.sshKey = SshKey.fromJSON(obj.sshKey);\n        break;\n      default:\n        break;\n    }\n\n    return domain;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { Fido2CredentialData } from \"../data/fido2-credential.data\";\nimport { Fido2CredentialView } from \"../view/fido2-credential.view\";\n\nexport class Fido2Credential extends Domain {\n  credentialId: EncString | null = null;\n  keyType: EncString;\n  keyAlgorithm: EncString;\n  keyCurve: EncString;\n  keyValue: EncString;\n  rpId: EncString;\n  userHandle: EncString;\n  userName: EncString;\n  counter: EncString;\n  rpName: EncString;\n  userDisplayName: EncString;\n  discoverable: EncString;\n  creationDate: Date;\n\n  constructor(obj?: Fido2CredentialData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        credentialId: null,\n        keyType: null,\n        keyAlgorithm: null,\n        keyCurve: null,\n        keyValue: null,\n        rpId: null,\n        userHandle: null,\n        userName: null,\n        counter: null,\n        rpName: null,\n        userDisplayName: null,\n        discoverable: null,\n      },\n      [],\n    );\n    this.creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;\n  }\n\n  async decrypt(orgId: string, encKey?: SymmetricCryptoKey): Promise<Fido2CredentialView> {\n    const view = await this.decryptObj(\n      new Fido2CredentialView(),\n      {\n        credentialId: null,\n        keyType: null,\n        keyAlgorithm: null,\n        keyCurve: null,\n        keyValue: null,\n        rpId: null,\n        userHandle: null,\n        userName: null,\n        rpName: null,\n        userDisplayName: null,\n        discoverable: null,\n      },\n      orgId,\n      encKey,\n    );\n\n    const { counter } = await this.decryptObj(\n      { counter: \"\" },\n      {\n        counter: null,\n      },\n      orgId,\n      encKey,\n    );\n    // Counter will end up as NaN if this fails\n    view.counter = parseInt(counter);\n\n    const { discoverable } = await this.decryptObj(\n      { discoverable: \"\" },\n      {\n        discoverable: null,\n      },\n      orgId,\n      encKey,\n    );\n    view.discoverable = discoverable === \"true\";\n    view.creationDate = this.creationDate;\n\n    return view;\n  }\n\n  toFido2CredentialData(): Fido2CredentialData {\n    const i = new Fido2CredentialData();\n    i.creationDate = this.creationDate.toISOString();\n    this.buildDataModel(this, i, {\n      credentialId: null,\n      keyType: null,\n      keyAlgorithm: null,\n      keyCurve: null,\n      keyValue: null,\n      rpId: null,\n      userHandle: null,\n      userName: null,\n      counter: null,\n      rpName: null,\n      userDisplayName: null,\n      discoverable: null,\n    });\n    return i;\n  }\n\n  static fromJSON(obj: Jsonify<Fido2Credential>): Fido2Credential {\n    if (obj == null) {\n      return null;\n    }\n\n    const credentialId = EncString.fromJSON(obj.credentialId);\n    const keyType = EncString.fromJSON(obj.keyType);\n    const keyAlgorithm = EncString.fromJSON(obj.keyAlgorithm);\n    const keyCurve = EncString.fromJSON(obj.keyCurve);\n    const keyValue = EncString.fromJSON(obj.keyValue);\n    const rpId = EncString.fromJSON(obj.rpId);\n    const userHandle = EncString.fromJSON(obj.userHandle);\n    const userName = EncString.fromJSON(obj.userName);\n    const counter = EncString.fromJSON(obj.counter);\n    const rpName = EncString.fromJSON(obj.rpName);\n    const userDisplayName = EncString.fromJSON(obj.userDisplayName);\n    const discoverable = EncString.fromJSON(obj.discoverable);\n    const creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;\n\n    return Object.assign(new Fido2Credential(), obj, {\n      credentialId,\n      keyType,\n      keyAlgorithm,\n      keyCurve,\n      keyValue,\n      rpId,\n      userHandle,\n      userName,\n      counter,\n      rpName,\n      userDisplayName,\n      discoverable,\n      creationDate,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { FieldType, LinkedIdType } from \"../../enums\";\nimport { FieldData } from \"../data/field.data\";\nimport { FieldView } from \"../view/field.view\";\n\nexport class Field extends Domain {\n  name: EncString;\n  value: EncString;\n  type: FieldType;\n  linkedId: LinkedIdType;\n\n  constructor(obj?: FieldData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.type = obj.type;\n    this.linkedId = obj.linkedId;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        name: null,\n        value: null,\n      },\n      [],\n    );\n  }\n\n  decrypt(orgId: string, encKey?: SymmetricCryptoKey): Promise<FieldView> {\n    return this.decryptObj(\n      new FieldView(this),\n      {\n        name: null,\n        value: null,\n      },\n      orgId,\n      encKey,\n    );\n  }\n\n  toFieldData(): FieldData {\n    const f = new FieldData();\n    this.buildDataModel(\n      this,\n      f,\n      {\n        name: null,\n        value: null,\n        type: null,\n        linkedId: null,\n      },\n      [\"type\", \"linkedId\"],\n    );\n    return f;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Field>>): Field {\n    if (obj == null) {\n      return null;\n    }\n\n    const name = EncString.fromJSON(obj.name);\n    const value = EncString.fromJSON(obj.value);\n\n    return Object.assign(new Field(), obj, {\n      name,\n      value,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { FolderData } from \"../data/folder.data\";\nimport { FolderView } from \"../view/folder.view\";\n\nexport class Test extends Domain {\n  id: string;\n  name: EncString;\n  revisionDate: Date;\n}\n\nexport class Folder extends Domain {\n  id: string;\n  name: EncString;\n  revisionDate: Date;\n\n  constructor(obj?: FolderData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        id: null,\n        name: null,\n      },\n      [\"id\"],\n    );\n\n    this.revisionDate = obj.revisionDate != null ? new Date(obj.revisionDate) : null;\n  }\n\n  decrypt(): Promise<FolderView> {\n    return this.decryptObj(\n      new FolderView(this),\n      {\n        name: null,\n      },\n      null,\n    );\n  }\n\n  async decryptWithKey(\n    key: SymmetricCryptoKey,\n    encryptService: EncryptService,\n  ): Promise<FolderView> {\n    const decrypted = await this.decryptObjWithKey([\"name\"], key, encryptService, Folder);\n\n    const view = new FolderView(decrypted);\n    view.name = decrypted.name;\n    return view;\n  }\n\n  static fromJSON(obj: Jsonify<Folder>) {\n    const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);\n    return Object.assign(new Folder(), obj, { name: EncString.fromJSON(obj.name), revisionDate });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { IdentityData } from \"../data/identity.data\";\nimport { IdentityView } from \"../view/identity.view\";\n\nexport class Identity extends Domain {\n  title: EncString;\n  firstName: EncString;\n  middleName: EncString;\n  lastName: EncString;\n  address1: EncString;\n  address2: EncString;\n  address3: EncString;\n  city: EncString;\n  state: EncString;\n  postalCode: EncString;\n  country: EncString;\n  company: EncString;\n  email: EncString;\n  phone: EncString;\n  ssn: EncString;\n  username: EncString;\n  passportNumber: EncString;\n  licenseNumber: EncString;\n\n  constructor(obj?: IdentityData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        title: null,\n        firstName: null,\n        middleName: null,\n        lastName: null,\n        address1: null,\n        address2: null,\n        address3: null,\n        city: null,\n        state: null,\n        postalCode: null,\n        country: null,\n        company: null,\n        email: null,\n        phone: null,\n        ssn: null,\n        username: null,\n        passportNumber: null,\n        licenseNumber: null,\n      },\n      [],\n    );\n  }\n\n  decrypt(\n    orgId: string,\n    context: string = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<IdentityView> {\n    return this.decryptObj(\n      new IdentityView(),\n      {\n        title: null,\n        firstName: null,\n        middleName: null,\n        lastName: null,\n        address1: null,\n        address2: null,\n        address3: null,\n        city: null,\n        state: null,\n        postalCode: null,\n        country: null,\n        company: null,\n        email: null,\n        phone: null,\n        ssn: null,\n        username: null,\n        passportNumber: null,\n        licenseNumber: null,\n      },\n      orgId,\n      encKey,\n      \"DomainType: Identity; \" + context,\n    );\n  }\n\n  toIdentityData(): IdentityData {\n    const i = new IdentityData();\n    this.buildDataModel(this, i, {\n      title: null,\n      firstName: null,\n      middleName: null,\n      lastName: null,\n      address1: null,\n      address2: null,\n      address3: null,\n      city: null,\n      state: null,\n      postalCode: null,\n      country: null,\n      company: null,\n      email: null,\n      phone: null,\n      ssn: null,\n      username: null,\n      passportNumber: null,\n      licenseNumber: null,\n    });\n    return i;\n  }\n\n  static fromJSON(obj: Jsonify<Identity>): Identity {\n    if (obj == null) {\n      return null;\n    }\n\n    const title = EncString.fromJSON(obj.title);\n    const firstName = EncString.fromJSON(obj.firstName);\n    const middleName = EncString.fromJSON(obj.middleName);\n    const lastName = EncString.fromJSON(obj.lastName);\n    const address1 = EncString.fromJSON(obj.address1);\n    const address2 = EncString.fromJSON(obj.address2);\n    const address3 = EncString.fromJSON(obj.address3);\n    const city = EncString.fromJSON(obj.city);\n    const state = EncString.fromJSON(obj.state);\n    const postalCode = EncString.fromJSON(obj.postalCode);\n    const country = EncString.fromJSON(obj.country);\n    const company = EncString.fromJSON(obj.company);\n    const email = EncString.fromJSON(obj.email);\n    const phone = EncString.fromJSON(obj.phone);\n    const ssn = EncString.fromJSON(obj.ssn);\n    const username = EncString.fromJSON(obj.username);\n    const passportNumber = EncString.fromJSON(obj.passportNumber);\n    const licenseNumber = EncString.fromJSON(obj.licenseNumber);\n\n    return Object.assign(new Identity(), obj, {\n      title,\n      firstName,\n      middleName,\n      lastName,\n      address1,\n      address2,\n      address3,\n      city,\n      state,\n      postalCode,\n      country,\n      company,\n      email,\n      phone,\n      ssn,\n      username,\n      passportNumber,\n      licenseNumber,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { UriMatchStrategySetting } from \"../../../models/domain/domain-service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { LoginUriData } from \"../data/login-uri.data\";\nimport { LoginUriView } from \"../view/login-uri.view\";\n\nexport class LoginUri extends Domain {\n  uri: EncString;\n  uriChecksum: EncString | undefined;\n  match: UriMatchStrategySetting;\n\n  constructor(obj?: LoginUriData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.match = obj.match;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        uri: null,\n        uriChecksum: null,\n      },\n      [],\n    );\n  }\n\n  decrypt(\n    orgId: string,\n    context: string = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<LoginUriView> {\n    return this.decryptObj(\n      new LoginUriView(this),\n      {\n        uri: null,\n      },\n      orgId,\n      encKey,\n      context,\n    );\n  }\n\n  async validateChecksum(clearTextUri: string, orgId: string, encKey: SymmetricCryptoKey) {\n    if (this.uriChecksum == null) {\n      return false;\n    }\n\n    const keyService = Utils.getContainerService().getEncryptService();\n    const localChecksum = await keyService.hash(clearTextUri, \"sha256\");\n\n    const remoteChecksum = await this.uriChecksum.decrypt(orgId, encKey);\n    return remoteChecksum === localChecksum;\n  }\n\n  toLoginUriData(): LoginUriData {\n    const u = new LoginUriData();\n    this.buildDataModel(\n      this,\n      u,\n      {\n        uri: null,\n        uriChecksum: null,\n        match: null,\n      },\n      [\"match\"],\n    );\n    return u;\n  }\n\n  static fromJSON(obj: Jsonify<LoginUri>): LoginUri {\n    if (obj == null) {\n      return null;\n    }\n\n    const uri = EncString.fromJSON(obj.uri);\n    const uriChecksum = EncString.fromJSON(obj.uriChecksum);\n    return Object.assign(new LoginUri(), obj, {\n      uri,\n      uriChecksum,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { LoginData } from \"../data/login.data\";\nimport { LoginView } from \"../view/login.view\";\n\nimport { Fido2Credential } from \"./fido2-credential\";\nimport { LoginUri } from \"./login-uri\";\n\nexport class Login extends Domain {\n  uris: LoginUri[];\n  username: EncString;\n  password: EncString;\n  passwordRevisionDate?: Date;\n  totp: EncString;\n  autofillOnPageLoad: boolean;\n  fido2Credentials: Fido2Credential[];\n\n  constructor(obj?: LoginData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.passwordRevisionDate =\n      obj.passwordRevisionDate != null ? new Date(obj.passwordRevisionDate) : null;\n    this.autofillOnPageLoad = obj.autofillOnPageLoad;\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        username: null,\n        password: null,\n        totp: null,\n      },\n      [],\n    );\n\n    if (obj.uris) {\n      this.uris = [];\n      obj.uris.forEach((u) => {\n        this.uris.push(new LoginUri(u));\n      });\n    }\n\n    if (obj.fido2Credentials) {\n      this.fido2Credentials = obj.fido2Credentials.map((key) => new Fido2Credential(key));\n    }\n  }\n\n  async decrypt(\n    orgId: string,\n    bypassValidation: boolean,\n    context: string = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<LoginView> {\n    const view = await this.decryptObj(\n      new LoginView(this),\n      {\n        username: null,\n        password: null,\n        totp: null,\n      },\n      orgId,\n      encKey,\n      `DomainType: Login; ${context}`,\n    );\n\n    if (this.uris != null) {\n      view.uris = [];\n      for (let i = 0; i < this.uris.length; i++) {\n        // If the uri is null, there is nothing to decrypt or validate\n        if (this.uris[i].uri == null) {\n          continue;\n        }\n\n        const uri = await this.uris[i].decrypt(orgId, context, encKey);\n        // URIs are shared remotely after decryption\n        // we need to validate that the string hasn't been changed by a compromised server\n        // This validation is tied to the existence of cypher.key for backwards compatibility\n        // So we bypass the validation if there's no cipher.key or procceed with the validation and\n        // Skip the value if it's been tampered with.\n        if (bypassValidation || (await this.uris[i].validateChecksum(uri.uri, orgId, encKey))) {\n          view.uris.push(uri);\n        }\n      }\n    }\n\n    if (this.fido2Credentials != null) {\n      view.fido2Credentials = await Promise.all(\n        this.fido2Credentials.map((key) => key.decrypt(orgId, encKey)),\n      );\n    }\n\n    return view;\n  }\n\n  toLoginData(): LoginData {\n    const l = new LoginData();\n    l.passwordRevisionDate =\n      this.passwordRevisionDate != null ? this.passwordRevisionDate.toISOString() : null;\n    l.autofillOnPageLoad = this.autofillOnPageLoad;\n    this.buildDataModel(this, l, {\n      username: null,\n      password: null,\n      totp: null,\n    });\n\n    if (this.uris != null && this.uris.length > 0) {\n      l.uris = [];\n      this.uris.forEach((u) => {\n        l.uris.push(u.toLoginUriData());\n      });\n    }\n\n    if (this.fido2Credentials != null && this.fido2Credentials.length > 0) {\n      l.fido2Credentials = this.fido2Credentials.map((key) => key.toFido2CredentialData());\n    }\n\n    return l;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Login>>): Login {\n    if (obj == null) {\n      return null;\n    }\n\n    const username = EncString.fromJSON(obj.username);\n    const password = EncString.fromJSON(obj.password);\n    const totp = EncString.fromJSON(obj.totp);\n    const passwordRevisionDate =\n      obj.passwordRevisionDate == null ? null : new Date(obj.passwordRevisionDate);\n    const uris = obj.uris?.map((uri: any) => LoginUri.fromJSON(uri));\n    const fido2Credentials =\n      obj.fido2Credentials?.map((key) => Fido2Credential.fromJSON(key)) ?? [];\n\n    return Object.assign(new Login(), obj, {\n      username,\n      password,\n      totp,\n      passwordRevisionDate,\n      uris,\n      fido2Credentials,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { PasswordHistoryData } from \"../data/password-history.data\";\nimport { PasswordHistoryView } from \"../view/password-history.view\";\n\nexport class Password extends Domain {\n  password: EncString;\n  lastUsedDate: Date;\n\n  constructor(obj?: PasswordHistoryData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(this, obj, {\n      password: null,\n    });\n    this.lastUsedDate = new Date(obj.lastUsedDate);\n  }\n\n  decrypt(orgId: string, encKey?: SymmetricCryptoKey): Promise<PasswordHistoryView> {\n    return this.decryptObj(\n      new PasswordHistoryView(this),\n      {\n        password: null,\n      },\n      orgId,\n      encKey,\n      \"DomainType: PasswordHistory\",\n    );\n  }\n\n  toPasswordHistoryData(): PasswordHistoryData {\n    const ph = new PasswordHistoryData();\n    ph.lastUsedDate = this.lastUsedDate.toISOString();\n    this.buildDataModel(this, ph, {\n      password: null,\n    });\n    return ph;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Password>>): Password {\n    if (obj == null) {\n      return null;\n    }\n\n    const password = EncString.fromJSON(obj.password);\n    const lastUsedDate = obj.lastUsedDate == null ? null : new Date(obj.lastUsedDate);\n\n    return Object.assign(new Password(), obj, {\n      password,\n      lastUsedDate,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { SecureNoteType } from \"../../enums\";\nimport { SecureNoteData } from \"../data/secure-note.data\";\nimport { SecureNoteView } from \"../view/secure-note.view\";\n\nexport class SecureNote extends Domain {\n  type: SecureNoteType;\n\n  constructor(obj?: SecureNoteData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.type = obj.type;\n  }\n\n  async decrypt(\n    orgId: string,\n    context = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<SecureNoteView> {\n    return new SecureNoteView(this);\n  }\n\n  toSecureNoteData(): SecureNoteData {\n    const n = new SecureNoteData();\n    n.type = this.type;\n    return n;\n  }\n\n  static fromJSON(obj: Jsonify<SecureNote>): SecureNote {\n    if (obj == null) {\n      return null;\n    }\n\n    return Object.assign(new SecureNote(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport Domain from \"../../../platform/models/domain/domain-base\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { SshKeyData } from \"../data/ssh-key.data\";\nimport { SshKeyView } from \"../view/ssh-key.view\";\n\nexport class SshKey extends Domain {\n  privateKey: EncString;\n  publicKey: EncString;\n  keyFingerprint: EncString;\n\n  constructor(obj?: SshKeyData) {\n    super();\n    if (obj == null) {\n      return;\n    }\n\n    this.buildDomainModel(\n      this,\n      obj,\n      {\n        privateKey: null,\n        publicKey: null,\n        keyFingerprint: null,\n      },\n      [],\n    );\n  }\n\n  decrypt(\n    orgId: string,\n    context = \"No Cipher Context\",\n    encKey?: SymmetricCryptoKey,\n  ): Promise<SshKeyView> {\n    return this.decryptObj(\n      new SshKeyView(),\n      {\n        privateKey: null,\n        publicKey: null,\n        keyFingerprint: null,\n      },\n      orgId,\n      encKey,\n      \"DomainType: SshKey; \" + context,\n    );\n  }\n\n  toSshKeyData(): SshKeyData {\n    const c = new SshKeyData();\n    this.buildDataModel(this, c, {\n      privateKey: null,\n      publicKey: null,\n      keyFingerprint: null,\n    });\n    return c;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<SshKey>>): SshKey {\n    if (obj == null) {\n      return null;\n    }\n\n    const privateKey = EncString.fromJSON(obj.privateKey);\n    const publicKey = EncString.fromJSON(obj.publicKey);\n    const keyFingerprint = EncString.fromJSON(obj.keyFingerprint);\n    return Object.assign(new SshKey(), obj, {\n      privateKey,\n      publicKey,\n      keyFingerprint,\n    });\n  }\n}\n","export class TreeNode<T extends ITreeNodeObject> {\n  node: T;\n  parent: TreeNode<T>;\n  children: TreeNode<T>[] = [];\n\n  constructor(node: T, parent: TreeNode<T>, name?: string, id?: string) {\n    this.parent = parent;\n    this.node = node;\n    if (name) {\n      this.node.name = name;\n    }\n    if (id) {\n      this.node.id = id;\n    }\n  }\n}\n\nexport interface ITreeNodeObject {\n  id: string;\n  name: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class CipherBulkDeleteRequest {\n  ids: string[];\n  organizationId: string;\n\n  constructor(ids: string[], organizationId?: string) {\n    this.ids = ids == null ? [] : ids;\n    this.organizationId = organizationId;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class AttachmentRequest {\n  fileName: string;\n  key: string;\n  fileSize: number;\n  adminRequest: boolean;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherRepromptType } from \"../../enums/cipher-reprompt-type\";\nimport { CipherType } from \"../../enums/cipher-type\";\nimport { CardApi } from \"../api/card.api\";\nimport { Fido2CredentialApi } from \"../api/fido2-credential.api\";\nimport { FieldApi } from \"../api/field.api\";\nimport { IdentityApi } from \"../api/identity.api\";\nimport { LoginUriApi } from \"../api/login-uri.api\";\nimport { LoginApi } from \"../api/login.api\";\nimport { SecureNoteApi } from \"../api/secure-note.api\";\nimport { SshKeyApi } from \"../api/ssh-key.api\";\nimport { Cipher } from \"../domain/cipher\";\n\nimport { AttachmentRequest } from \"./attachment.request\";\nimport { PasswordHistoryRequest } from \"./password-history.request\";\n\nexport class CipherRequest {\n  type: CipherType;\n  folderId: string;\n  organizationId: string;\n  name: string;\n  notes: string;\n  favorite: boolean;\n  login: LoginApi;\n  secureNote: SecureNoteApi;\n  card: CardApi;\n  identity: IdentityApi;\n  sshKey: SshKeyApi;\n  fields: FieldApi[];\n  passwordHistory: PasswordHistoryRequest[];\n  // Deprecated, remove at some point and rename attachments2 to attachments\n  attachments: { [id: string]: string };\n  attachments2: { [id: string]: AttachmentRequest };\n  lastKnownRevisionDate: Date;\n  reprompt: CipherRepromptType;\n  key: string;\n\n  constructor(cipher: Cipher) {\n    this.type = cipher.type;\n    this.folderId = cipher.folderId;\n    this.organizationId = cipher.organizationId;\n    this.name = cipher.name ? cipher.name.encryptedString : null;\n    this.notes = cipher.notes ? cipher.notes.encryptedString : null;\n    this.favorite = cipher.favorite;\n    this.lastKnownRevisionDate = cipher.revisionDate;\n    this.reprompt = cipher.reprompt;\n    this.key = cipher.key?.encryptedString;\n\n    switch (this.type) {\n      case CipherType.Login:\n        this.login = new LoginApi();\n        this.login.uris =\n          cipher.login.uris?.map((u) => {\n            const uri = new LoginUriApi();\n            uri.uri = u.uri != null ? u.uri.encryptedString : null;\n            uri.match = u.match != null ? u.match : null;\n            uri.uriChecksum = u.uriChecksum != null ? u.uriChecksum.encryptedString : null;\n            return uri;\n          }) ?? [];\n        this.login.username = cipher.login.username ? cipher.login.username.encryptedString : null;\n        this.login.password = cipher.login.password ? cipher.login.password.encryptedString : null;\n        this.login.passwordRevisionDate =\n          cipher.login.passwordRevisionDate != null\n            ? cipher.login.passwordRevisionDate.toISOString()\n            : null;\n        this.login.totp = cipher.login.totp ? cipher.login.totp.encryptedString : null;\n        this.login.autofillOnPageLoad = cipher.login.autofillOnPageLoad;\n\n        if (cipher.login.fido2Credentials != null) {\n          this.login.fido2Credentials = cipher.login.fido2Credentials.map((key) => {\n            const keyApi = new Fido2CredentialApi();\n            keyApi.credentialId =\n              key.credentialId != null ? key.credentialId.encryptedString : null;\n            keyApi.keyType =\n              key.keyType != null ? (key.keyType.encryptedString as \"public-key\") : null;\n            keyApi.keyAlgorithm =\n              key.keyAlgorithm != null ? (key.keyAlgorithm.encryptedString as \"ECDSA\") : null;\n            keyApi.keyCurve =\n              key.keyCurve != null ? (key.keyCurve.encryptedString as \"P-256\") : null;\n            keyApi.keyValue = key.keyValue != null ? key.keyValue.encryptedString : null;\n            keyApi.rpId = key.rpId != null ? key.rpId.encryptedString : null;\n            keyApi.rpName = key.rpName != null ? key.rpName.encryptedString : null;\n            keyApi.counter = key.counter != null ? key.counter.encryptedString : null;\n            keyApi.userHandle = key.userHandle != null ? key.userHandle.encryptedString : null;\n            keyApi.userName = key.userName != null ? key.userName.encryptedString : null;\n            keyApi.userDisplayName =\n              key.userDisplayName != null ? key.userDisplayName.encryptedString : null;\n            keyApi.discoverable =\n              key.discoverable != null ? key.discoverable.encryptedString : null;\n            keyApi.creationDate = key.creationDate != null ? key.creationDate.toISOString() : null;\n            return keyApi;\n          });\n        }\n        break;\n      case CipherType.SecureNote:\n        this.secureNote = new SecureNoteApi();\n        this.secureNote.type = cipher.secureNote.type;\n        break;\n      case CipherType.SshKey:\n        this.sshKey = new SshKeyApi();\n        this.sshKey.privateKey =\n          cipher.sshKey.privateKey != null ? cipher.sshKey.privateKey.encryptedString : null;\n        this.sshKey.publicKey =\n          cipher.sshKey.publicKey != null ? cipher.sshKey.publicKey.encryptedString : null;\n        this.sshKey.keyFingerprint =\n          cipher.sshKey.keyFingerprint != null\n            ? cipher.sshKey.keyFingerprint.encryptedString\n            : null;\n        break;\n      case CipherType.Card:\n        this.card = new CardApi();\n        this.card.cardholderName =\n          cipher.card.cardholderName != null ? cipher.card.cardholderName.encryptedString : null;\n        this.card.brand = cipher.card.brand != null ? cipher.card.brand.encryptedString : null;\n        this.card.number = cipher.card.number != null ? cipher.card.number.encryptedString : null;\n        this.card.expMonth =\n          cipher.card.expMonth != null ? cipher.card.expMonth.encryptedString : null;\n        this.card.expYear =\n          cipher.card.expYear != null ? cipher.card.expYear.encryptedString : null;\n        this.card.code = cipher.card.code != null ? cipher.card.code.encryptedString : null;\n        break;\n      case CipherType.Identity:\n        this.identity = new IdentityApi();\n        this.identity.title =\n          cipher.identity.title != null ? cipher.identity.title.encryptedString : null;\n        this.identity.firstName =\n          cipher.identity.firstName != null ? cipher.identity.firstName.encryptedString : null;\n        this.identity.middleName =\n          cipher.identity.middleName != null ? cipher.identity.middleName.encryptedString : null;\n        this.identity.lastName =\n          cipher.identity.lastName != null ? cipher.identity.lastName.encryptedString : null;\n        this.identity.address1 =\n          cipher.identity.address1 != null ? cipher.identity.address1.encryptedString : null;\n        this.identity.address2 =\n          cipher.identity.address2 != null ? cipher.identity.address2.encryptedString : null;\n        this.identity.address3 =\n          cipher.identity.address3 != null ? cipher.identity.address3.encryptedString : null;\n        this.identity.city =\n          cipher.identity.city != null ? cipher.identity.city.encryptedString : null;\n        this.identity.state =\n          cipher.identity.state != null ? cipher.identity.state.encryptedString : null;\n        this.identity.postalCode =\n          cipher.identity.postalCode != null ? cipher.identity.postalCode.encryptedString : null;\n        this.identity.country =\n          cipher.identity.country != null ? cipher.identity.country.encryptedString : null;\n        this.identity.company =\n          cipher.identity.company != null ? cipher.identity.company.encryptedString : null;\n        this.identity.email =\n          cipher.identity.email != null ? cipher.identity.email.encryptedString : null;\n        this.identity.phone =\n          cipher.identity.phone != null ? cipher.identity.phone.encryptedString : null;\n        this.identity.ssn =\n          cipher.identity.ssn != null ? cipher.identity.ssn.encryptedString : null;\n        this.identity.username =\n          cipher.identity.username != null ? cipher.identity.username.encryptedString : null;\n        this.identity.passportNumber =\n          cipher.identity.passportNumber != null\n            ? cipher.identity.passportNumber.encryptedString\n            : null;\n        this.identity.licenseNumber =\n          cipher.identity.licenseNumber != null\n            ? cipher.identity.licenseNumber.encryptedString\n            : null;\n        break;\n      default:\n        break;\n    }\n\n    if (cipher.fields != null) {\n      this.fields = cipher.fields.map((f) => {\n        const field = new FieldApi();\n        field.type = f.type;\n        field.name = f.name ? f.name.encryptedString : null;\n        field.value = f.value ? f.value.encryptedString : null;\n        field.linkedId = f.linkedId;\n        return field;\n      });\n    }\n\n    if (cipher.passwordHistory != null) {\n      this.passwordHistory = [];\n      cipher.passwordHistory.forEach((ph) => {\n        this.passwordHistory.push({\n          lastUsedDate: ph.lastUsedDate,\n          password: ph.password ? ph.password.encryptedString : null,\n        });\n      });\n    }\n\n    if (cipher.attachments != null) {\n      this.attachments = {};\n      this.attachments2 = {};\n      cipher.attachments.forEach((attachment) => {\n        const fileName = attachment.fileName ? attachment.fileName.encryptedString : null;\n        this.attachments[attachment.id] = fileName;\n        const attachmentRequest = new AttachmentRequest();\n        attachmentRequest.fileName = fileName;\n        if (attachment.key != null) {\n          attachmentRequest.key = attachment.key.encryptedString;\n        }\n        this.attachments2[attachment.id] = attachmentRequest;\n      });\n    }\n  }\n}\n","import { Folder } from \"../domain/folder\";\n\nimport { FolderRequest } from \"./folder.request\";\n\nexport class FolderWithIdRequest extends FolderRequest {\n  id: string;\n\n  constructor(folder: Folder) {\n    super(folder);\n    this.id = folder.id;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Folder } from \"../domain/folder\";\n\nexport class FolderRequest {\n  name: string;\n\n  constructor(folder: Folder) {\n    this.name = folder.name ? folder.name.encryptedString : null;\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class AttachmentResponse extends BaseResponse {\n  id: string;\n  url: string;\n  fileName: string;\n  key: string;\n  size: string;\n  sizeName: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.url = this.getResponseProperty(\"Url\");\n    this.fileName = this.getResponseProperty(\"FileName\");\n    this.key = this.getResponseProperty(\"Key\");\n    this.size = this.getResponseProperty(\"Size\");\n    this.sizeName = this.getResponseProperty(\"SizeName\");\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class PasswordHistoryResponse extends BaseResponse {\n  password: string;\n  lastUsedDate: string;\n\n  constructor(response: any) {\n    super(response);\n    this.password = this.getResponseProperty(\"Password\");\n    this.lastUsedDate = this.getResponseProperty(\"LastUsedDate\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BaseResponse } from \"../../../models/response/base.response\";\nimport { CipherRepromptType } from \"../../enums/cipher-reprompt-type\";\nimport { CardApi } from \"../api/card.api\";\nimport { FieldApi } from \"../api/field.api\";\nimport { IdentityApi } from \"../api/identity.api\";\nimport { LoginApi } from \"../api/login.api\";\nimport { SecureNoteApi } from \"../api/secure-note.api\";\nimport { SshKeyApi } from \"../api/ssh-key.api\";\n\nimport { AttachmentResponse } from \"./attachment.response\";\nimport { PasswordHistoryResponse } from \"./password-history.response\";\n\nexport class CipherResponse extends BaseResponse {\n  id: string;\n  organizationId: string;\n  folderId: string;\n  type: number;\n  name: string;\n  notes: string;\n  fields: FieldApi[];\n  login: LoginApi;\n  card: CardApi;\n  identity: IdentityApi;\n  secureNote: SecureNoteApi;\n  sshKey: SshKeyApi;\n  favorite: boolean;\n  edit: boolean;\n  viewPassword: boolean;\n  organizationUseTotp: boolean;\n  revisionDate: string;\n  attachments: AttachmentResponse[];\n  passwordHistory: PasswordHistoryResponse[];\n  collectionIds: string[];\n  creationDate: string;\n  deletedDate: string;\n  reprompt: CipherRepromptType;\n  key: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.organizationId = this.getResponseProperty(\"OrganizationId\");\n    this.folderId = this.getResponseProperty(\"FolderId\") || null;\n    this.type = this.getResponseProperty(\"Type\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.notes = this.getResponseProperty(\"Notes\");\n    this.favorite = this.getResponseProperty(\"Favorite\") || false;\n    this.edit = !!this.getResponseProperty(\"Edit\");\n    if (this.getResponseProperty(\"ViewPassword\") == null) {\n      this.viewPassword = true;\n    } else {\n      this.viewPassword = this.getResponseProperty(\"ViewPassword\");\n    }\n    this.organizationUseTotp = this.getResponseProperty(\"OrganizationUseTotp\");\n    this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n    this.collectionIds = this.getResponseProperty(\"CollectionIds\");\n    this.creationDate = this.getResponseProperty(\"CreationDate\");\n    this.deletedDate = this.getResponseProperty(\"DeletedDate\");\n\n    const login = this.getResponseProperty(\"Login\");\n    if (login != null) {\n      this.login = new LoginApi(login);\n    }\n\n    const card = this.getResponseProperty(\"Card\");\n    if (card != null) {\n      this.card = new CardApi(card);\n    }\n\n    const identity = this.getResponseProperty(\"Identity\");\n    if (identity != null) {\n      this.identity = new IdentityApi(identity);\n    }\n\n    const secureNote = this.getResponseProperty(\"SecureNote\");\n    if (secureNote != null) {\n      this.secureNote = new SecureNoteApi(secureNote);\n    }\n\n    const sshKey = this.getResponseProperty(\"sshKey\");\n    if (sshKey != null) {\n      this.sshKey = new SshKeyApi(sshKey);\n    }\n\n    const fields = this.getResponseProperty(\"Fields\");\n    if (fields != null) {\n      this.fields = fields.map((f: any) => new FieldApi(f));\n    }\n\n    const attachments = this.getResponseProperty(\"Attachments\");\n    if (attachments != null) {\n      this.attachments = attachments.map((a: any) => new AttachmentResponse(a));\n    }\n\n    const passwordHistory = this.getResponseProperty(\"PasswordHistory\");\n    if (passwordHistory != null) {\n      this.passwordHistory = passwordHistory.map((h: any) => new PasswordHistoryResponse(h));\n    }\n\n    this.reprompt = this.getResponseProperty(\"Reprompt\") || CipherRepromptType.None;\n    this.key = this.getResponseProperty(\"Key\") || null;\n  }\n}\n","import { BaseResponse } from \"../../../models/response/base.response\";\n\nexport class FolderResponse extends BaseResponse {\n  id: string;\n  name: string;\n  revisionDate: string;\n\n  constructor(response: any) {\n    super(response);\n    this.id = this.getResponseProperty(\"Id\");\n    this.name = this.getResponseProperty(\"Name\");\n    this.revisionDate = this.getResponseProperty(\"RevisionDate\");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { View } from \"../../../models/view/view\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { Attachment } from \"../domain/attachment\";\n\nexport class AttachmentView implements View {\n  id: string = null;\n  url: string = null;\n  size: string = null;\n  sizeName: string = null;\n  fileName: string = null;\n  key: SymmetricCryptoKey = null;\n\n  constructor(a?: Attachment) {\n    if (!a) {\n      return;\n    }\n\n    this.id = a.id;\n    this.url = a.url;\n    this.size = a.size;\n    this.sizeName = a.sizeName;\n  }\n\n  get fileSize(): number {\n    try {\n      if (this.size != null) {\n        return parseInt(this.size, null);\n      }\n    } catch {\n      // Invalid file size.\n    }\n    return 0;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<AttachmentView>>): AttachmentView {\n    const key = obj.key == null ? null : SymmetricCryptoKey.fromJSON(obj.key);\n    return Object.assign(new AttachmentView(), obj, { key: key });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { normalizeExpiryYearFormat } from \"../../../autofill/utils\";\nimport { CardLinkedId as LinkedId } from \"../../enums\";\nimport { linkedFieldOption } from \"../../linked-field-option.decorator\";\n\nimport { ItemView } from \"./item.view\";\n\nexport class CardView extends ItemView {\n  @linkedFieldOption(LinkedId.CardholderName, { sortPosition: 0 })\n  cardholderName: string = null;\n  @linkedFieldOption(LinkedId.ExpMonth, { sortPosition: 3, i18nKey: \"expirationMonth\" })\n  expMonth: string = null;\n  @linkedFieldOption(LinkedId.ExpYear, { sortPosition: 4, i18nKey: \"expirationYear\" })\n  expYear: string = null;\n  @linkedFieldOption(LinkedId.Code, { sortPosition: 5, i18nKey: \"securityCode\" })\n  code: string = null;\n\n  private _brand: string = null;\n  private _number: string = null;\n  private _subTitle: string = null;\n\n  get maskedCode(): string {\n    return this.code != null ? \"•\".repeat(this.code.length) : null;\n  }\n\n  get maskedNumber(): string {\n    return this.number != null ? \"•\".repeat(this.number.length) : null;\n  }\n\n  @linkedFieldOption(LinkedId.Brand, { sortPosition: 2 })\n  get brand(): string {\n    return this._brand;\n  }\n  set brand(value: string) {\n    this._brand = value;\n    this._subTitle = null;\n  }\n\n  @linkedFieldOption(LinkedId.Number, { sortPosition: 1 })\n  get number(): string {\n    return this._number;\n  }\n  set number(value: string) {\n    this._number = value;\n    this._subTitle = null;\n  }\n\n  get subTitle(): string {\n    if (this._subTitle == null) {\n      this._subTitle = this.brand;\n      if (this.number != null && this.number.length >= 4) {\n        if (this._subTitle != null && this._subTitle !== \"\") {\n          this._subTitle += \", \";\n        } else {\n          this._subTitle = \"\";\n        }\n\n        // Show last 5 on amex, last 4 for all others\n        const count =\n          this.number.length >= 5 && this.number.match(new RegExp(\"^3[47]\")) != null ? 5 : 4;\n        this._subTitle += \"*\" + this.number.substr(this.number.length - count);\n      }\n    }\n    return this._subTitle;\n  }\n\n  get expiration(): string {\n    const normalizedYear = normalizeExpiryYearFormat(this.expYear);\n\n    if (!this.expMonth && !normalizedYear) {\n      return null;\n    }\n\n    let exp = this.expMonth != null ? (\"0\" + this.expMonth).slice(-2) : \"__\";\n    exp += \" / \" + (normalizedYear || \"____\");\n\n    return exp;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<CardView>>): CardView {\n    return Object.assign(new CardView(), obj);\n  }\n\n  // ref https://stackoverflow.com/a/5911300\n  static getCardBrandByPatterns(cardNum: string): string {\n    if (cardNum == null || typeof cardNum !== \"string\" || cardNum.trim() === \"\") {\n      return null;\n    }\n\n    // Visa\n    let re = new RegExp(\"^4\");\n    if (cardNum.match(re) != null) {\n      return \"Visa\";\n    }\n\n    // Mastercard\n    // Updated for Mastercard 2017 BINs expansion\n    if (\n      /^(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(\n        cardNum,\n      )\n    ) {\n      return \"Mastercard\";\n    }\n\n    // AMEX\n    re = new RegExp(\"^3[47]\");\n    if (cardNum.match(re) != null) {\n      return \"Amex\";\n    }\n\n    // Discover\n    re = new RegExp(\n      \"^(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)\",\n    );\n    if (cardNum.match(re) != null) {\n      return \"Discover\";\n    }\n\n    // Diners\n    re = new RegExp(\"^36\");\n    if (cardNum.match(re) != null) {\n      return \"Diners Club\";\n    }\n\n    // Diners - Carte Blanche\n    re = new RegExp(\"^30[0-5]\");\n    if (cardNum.match(re) != null) {\n      return \"Diners Club\";\n    }\n\n    // JCB\n    re = new RegExp(\"^35(2[89]|[3-8][0-9])\");\n    if (cardNum.match(re) != null) {\n      return \"JCB\";\n    }\n\n    // Visa Electron\n    re = new RegExp(\"^(4026|417500|4508|4844|491(3|7))\");\n    if (cardNum.match(re) != null) {\n      return \"Visa\";\n    }\n\n    return null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../models/view/view\";\nimport { InitializerMetadata } from \"../../../platform/interfaces/initializer-metadata.interface\";\nimport { InitializerKey } from \"../../../platform/services/cryptography/initializer-key\";\nimport { DeepJsonify } from \"../../../types/deep-jsonify\";\nimport { CipherType, LinkedIdType } from \"../../enums\";\nimport { CipherRepromptType } from \"../../enums/cipher-reprompt-type\";\nimport { LocalData } from \"../data/local.data\";\nimport { Cipher } from \"../domain/cipher\";\n\nimport { AttachmentView } from \"./attachment.view\";\nimport { CardView } from \"./card.view\";\nimport { FieldView } from \"./field.view\";\nimport { IdentityView } from \"./identity.view\";\nimport { LoginView } from \"./login.view\";\nimport { PasswordHistoryView } from \"./password-history.view\";\nimport { SecureNoteView } from \"./secure-note.view\";\nimport { SshKeyView } from \"./ssh-key.view\";\n\nexport class CipherView implements View, InitializerMetadata {\n  readonly initializerKey = InitializerKey.CipherView;\n\n  id: string = null;\n  organizationId: string = null;\n  folderId: string = null;\n  name: string = null;\n  notes: string = null;\n  type: CipherType = null;\n  favorite = false;\n  organizationUseTotp = false;\n  edit = false;\n  viewPassword = true;\n  localData: LocalData;\n  login = new LoginView();\n  identity = new IdentityView();\n  card = new CardView();\n  secureNote = new SecureNoteView();\n  sshKey = new SshKeyView();\n  attachments: AttachmentView[] = null;\n  fields: FieldView[] = null;\n  passwordHistory: PasswordHistoryView[] = null;\n  collectionIds: string[] = null;\n  revisionDate: Date = null;\n  creationDate: Date = null;\n  deletedDate: Date = null;\n  reprompt: CipherRepromptType = CipherRepromptType.None;\n\n  /**\n   * Flag to indicate if the cipher decryption failed.\n   */\n  decryptionFailure = false;\n\n  constructor(c?: Cipher) {\n    if (!c) {\n      return;\n    }\n\n    this.id = c.id;\n    this.organizationId = c.organizationId;\n    this.folderId = c.folderId;\n    this.favorite = c.favorite;\n    this.organizationUseTotp = c.organizationUseTotp;\n    this.edit = c.edit;\n    this.viewPassword = c.viewPassword;\n    this.type = c.type;\n    this.localData = c.localData;\n    this.collectionIds = c.collectionIds;\n    this.revisionDate = c.revisionDate;\n    this.creationDate = c.creationDate;\n    this.deletedDate = c.deletedDate;\n    // Old locally stored ciphers might have reprompt == null. If so set it to None.\n    this.reprompt = c.reprompt ?? CipherRepromptType.None;\n  }\n\n  private get item() {\n    switch (this.type) {\n      case CipherType.Login:\n        return this.login;\n      case CipherType.SecureNote:\n        return this.secureNote;\n      case CipherType.Card:\n        return this.card;\n      case CipherType.Identity:\n        return this.identity;\n      case CipherType.SshKey:\n        return this.sshKey;\n      default:\n        break;\n    }\n\n    return null;\n  }\n\n  get subTitle(): string {\n    return this.item?.subTitle;\n  }\n\n  get hasPasswordHistory(): boolean {\n    return this.passwordHistory && this.passwordHistory.length > 0;\n  }\n\n  get hasAttachments(): boolean {\n    return this.attachments && this.attachments.length > 0;\n  }\n\n  get hasOldAttachments(): boolean {\n    if (this.hasAttachments) {\n      for (let i = 0; i < this.attachments.length; i++) {\n        if (this.attachments[i].key == null) {\n          return true;\n        }\n      }\n    }\n    return false;\n  }\n\n  get hasFields(): boolean {\n    return this.fields && this.fields.length > 0;\n  }\n\n  get passwordRevisionDisplayDate(): Date {\n    if (this.type !== CipherType.Login || this.login == null) {\n      return null;\n    } else if (this.login.password == null || this.login.password === \"\") {\n      return null;\n    }\n    return this.login.passwordRevisionDate;\n  }\n\n  get isDeleted(): boolean {\n    return this.deletedDate != null;\n  }\n\n  get linkedFieldOptions() {\n    return this.item?.linkedFieldOptions;\n  }\n\n  get isUnassigned(): boolean {\n    return (\n      this.organizationId != null && (this.collectionIds == null || this.collectionIds.length === 0)\n    );\n  }\n\n  /**\n   * Determines if the cipher can be launched in a new browser tab.\n   */\n  get canLaunch(): boolean {\n    return this.type === CipherType.Login && this.login.canLaunch;\n  }\n\n  linkedFieldValue(id: LinkedIdType) {\n    const linkedFieldOption = this.linkedFieldOptions?.get(id);\n    if (linkedFieldOption == null) {\n      return null;\n    }\n\n    const item = this.item;\n    return this.item[linkedFieldOption.propertyKey as keyof typeof item];\n  }\n\n  linkedFieldI18nKey(id: LinkedIdType): string {\n    return this.linkedFieldOptions.get(id)?.i18nKey;\n  }\n\n  // This is used as a marker to indicate that the cipher view object still has its prototype\n  toJSON() {\n    return this;\n  }\n\n  static fromJSON(obj: Partial<DeepJsonify<CipherView>>): CipherView {\n    if (obj == null) {\n      return null;\n    }\n\n    const view = new CipherView();\n    const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);\n    const deletedDate = obj.deletedDate == null ? null : new Date(obj.deletedDate);\n    const attachments = obj.attachments?.map((a: any) => AttachmentView.fromJSON(a));\n    const fields = obj.fields?.map((f: any) => FieldView.fromJSON(f));\n    const passwordHistory = obj.passwordHistory?.map((ph: any) => PasswordHistoryView.fromJSON(ph));\n\n    Object.assign(view, obj, {\n      revisionDate: revisionDate,\n      deletedDate: deletedDate,\n      attachments: attachments,\n      fields: fields,\n      passwordHistory: passwordHistory,\n    });\n\n    switch (obj.type) {\n      case CipherType.Card:\n        view.card = CardView.fromJSON(obj.card);\n        break;\n      case CipherType.Identity:\n        view.identity = IdentityView.fromJSON(obj.identity);\n        break;\n      case CipherType.Login:\n        view.login = LoginView.fromJSON(obj.login);\n        break;\n      case CipherType.SecureNote:\n        view.secureNote = SecureNoteView.fromJSON(obj.secureNote);\n        break;\n      case CipherType.SshKey:\n        view.sshKey = SshKeyView.fromJSON(obj.sshKey);\n        break;\n      default:\n        break;\n    }\n\n    return view;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { ItemView } from \"./item.view\";\n\nexport class Fido2CredentialView extends ItemView {\n  credentialId: string;\n  keyType: \"public-key\";\n  keyAlgorithm: \"ECDSA\";\n  keyCurve: \"P-256\";\n  keyValue: string;\n  rpId: string;\n  userHandle: string;\n  userName: string;\n  counter: number;\n  rpName: string;\n  userDisplayName: string;\n  discoverable: boolean;\n  creationDate: Date = null;\n\n  get subTitle(): string {\n    return this.userDisplayName;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<Fido2CredentialView>>): Fido2CredentialView {\n    const creationDate = obj.creationDate != null ? new Date(obj.creationDate) : null;\n    return Object.assign(new Fido2CredentialView(), obj, {\n      creationDate,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { View } from \"../../../models/view/view\";\nimport { FieldType, LinkedIdType } from \"../../enums\";\nimport { Field } from \"../domain/field\";\n\nexport class FieldView implements View {\n  name: string = null;\n  value: string = null;\n  type: FieldType = null;\n  newField = false; // Marks if the field is new and hasn't been saved\n  showValue = false;\n  showCount = false;\n  linkedId: LinkedIdType = null;\n\n  constructor(f?: Field) {\n    if (!f) {\n      return;\n    }\n\n    this.type = f.type;\n    this.linkedId = f.linkedId;\n  }\n\n  get maskedValue(): string {\n    return this.value != null ? \"••••••••\" : null;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<FieldView>>): FieldView {\n    return Object.assign(new FieldView(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { View } from \"../../../models/view/view\";\nimport { DecryptedObject } from \"../../../platform/models/domain/domain-base\";\nimport { Folder } from \"../domain/folder\";\nimport { ITreeNodeObject } from \"../domain/tree-node\";\n\nexport class FolderView implements View, ITreeNodeObject {\n  id: string = null;\n  name: string = null;\n  revisionDate: Date = null;\n\n  constructor(f?: Folder | DecryptedObject<Folder, \"name\">) {\n    if (!f) {\n      return;\n    }\n\n    this.id = f.id;\n    this.revisionDate = f.revisionDate;\n  }\n\n  static fromJSON(obj: Jsonify<FolderView>) {\n    const revisionDate = obj.revisionDate == null ? null : new Date(obj.revisionDate);\n    return Object.assign(new FolderView(), obj, { revisionDate });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { IdentityLinkedId as LinkedId } from \"../../enums\";\nimport { linkedFieldOption } from \"../../linked-field-option.decorator\";\n\nimport { ItemView } from \"./item.view\";\n\nexport class IdentityView extends ItemView {\n  @linkedFieldOption(LinkedId.Title, { sortPosition: 0 })\n  title: string = null;\n  @linkedFieldOption(LinkedId.MiddleName, { sortPosition: 2 })\n  middleName: string = null;\n  @linkedFieldOption(LinkedId.Address1, { sortPosition: 12 })\n  address1: string = null;\n  @linkedFieldOption(LinkedId.Address2, { sortPosition: 13 })\n  address2: string = null;\n  @linkedFieldOption(LinkedId.Address3, { sortPosition: 14 })\n  address3: string = null;\n  @linkedFieldOption(LinkedId.City, { sortPosition: 15, i18nKey: \"cityTown\" })\n  city: string = null;\n  @linkedFieldOption(LinkedId.State, { sortPosition: 16, i18nKey: \"stateProvince\" })\n  state: string = null;\n  @linkedFieldOption(LinkedId.PostalCode, { sortPosition: 17, i18nKey: \"zipPostalCode\" })\n  postalCode: string = null;\n  @linkedFieldOption(LinkedId.Country, { sortPosition: 18 })\n  country: string = null;\n  @linkedFieldOption(LinkedId.Company, { sortPosition: 6 })\n  company: string = null;\n  @linkedFieldOption(LinkedId.Email, { sortPosition: 10 })\n  email: string = null;\n  @linkedFieldOption(LinkedId.Phone, { sortPosition: 11 })\n  phone: string = null;\n  @linkedFieldOption(LinkedId.Ssn, { sortPosition: 7 })\n  ssn: string = null;\n  @linkedFieldOption(LinkedId.Username, { sortPosition: 5 })\n  username: string = null;\n  @linkedFieldOption(LinkedId.PassportNumber, { sortPosition: 8 })\n  passportNumber: string = null;\n  @linkedFieldOption(LinkedId.LicenseNumber, { sortPosition: 9 })\n  licenseNumber: string = null;\n\n  private _firstName: string = null;\n  private _lastName: string = null;\n  private _subTitle: string = null;\n\n  constructor() {\n    super();\n  }\n\n  @linkedFieldOption(LinkedId.FirstName, { sortPosition: 1 })\n  get firstName(): string {\n    return this._firstName;\n  }\n  set firstName(value: string) {\n    this._firstName = value;\n    this._subTitle = null;\n  }\n\n  @linkedFieldOption(LinkedId.LastName, { sortPosition: 4 })\n  get lastName(): string {\n    return this._lastName;\n  }\n  set lastName(value: string) {\n    this._lastName = value;\n    this._subTitle = null;\n  }\n\n  get subTitle(): string {\n    if (this._subTitle == null && (this.firstName != null || this.lastName != null)) {\n      this._subTitle = \"\";\n      if (this.firstName != null) {\n        this._subTitle = this.firstName;\n      }\n      if (this.lastName != null) {\n        if (this._subTitle !== \"\") {\n          this._subTitle += \" \";\n        }\n        this._subTitle += this.lastName;\n      }\n    }\n\n    return this._subTitle;\n  }\n\n  @linkedFieldOption(LinkedId.FullName, { sortPosition: 3 })\n  get fullName(): string {\n    if (\n      this.title != null ||\n      this.firstName != null ||\n      this.middleName != null ||\n      this.lastName != null\n    ) {\n      let name = \"\";\n      if (this.title != null) {\n        name += this.title + \" \";\n      }\n      if (this.firstName != null) {\n        name += this.firstName + \" \";\n      }\n      if (this.middleName != null) {\n        name += this.middleName + \" \";\n      }\n      if (this.lastName != null) {\n        name += this.lastName;\n      }\n      return name.trim();\n    }\n\n    return null;\n  }\n\n  get fullAddress(): string {\n    let address = this.address1;\n    if (!Utils.isNullOrWhitespace(this.address2)) {\n      if (!Utils.isNullOrWhitespace(address)) {\n        address += \", \";\n      }\n      address += this.address2;\n    }\n    if (!Utils.isNullOrWhitespace(this.address3)) {\n      if (!Utils.isNullOrWhitespace(address)) {\n        address += \", \";\n      }\n      address += this.address3;\n    }\n    return address;\n  }\n\n  get fullAddressPart2(): string {\n    if (this.city == null && this.state == null && this.postalCode == null) {\n      return null;\n    }\n    const city = this.city || \"-\";\n    const state = this.state;\n    const postalCode = this.postalCode || \"-\";\n    let addressPart2 = city;\n    if (!Utils.isNullOrWhitespace(state)) {\n      addressPart2 += \", \" + state;\n    }\n    addressPart2 += \", \" + postalCode;\n    return addressPart2;\n  }\n\n  get fullAddressForCopy(): string {\n    let address = this.fullAddress;\n    if (this.city != null || this.state != null || this.postalCode != null) {\n      address += \"\\n\" + this.fullAddressPart2;\n    }\n    if (this.country != null) {\n      address += \"\\n\" + this.country;\n    }\n    return address;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<IdentityView>>): IdentityView {\n    return Object.assign(new IdentityView(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { View } from \"../../../models/view/view\";\nimport { LinkedMetadata } from \"../../linked-field-option.decorator\";\n\nexport abstract class ItemView implements View {\n  linkedFieldOptions: Map<number, LinkedMetadata>;\n  abstract get subTitle(): string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { UriMatchStrategy, UriMatchStrategySetting } from \"../../../models/domain/domain-service\";\nimport { View } from \"../../../models/view/view\";\nimport { SafeUrls } from \"../../../platform/misc/safe-urls\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { LoginUri } from \"../domain/login-uri\";\n\nexport class LoginUriView implements View {\n  match: UriMatchStrategySetting = null;\n\n  private _uri: string = null;\n  private _domain: string = null;\n  private _hostname: string = null;\n  private _host: string = null;\n  private _canLaunch: boolean = null;\n\n  constructor(u?: LoginUri) {\n    if (!u) {\n      return;\n    }\n\n    this.match = u.match;\n  }\n\n  get uri(): string {\n    return this._uri;\n  }\n  set uri(value: string) {\n    this._uri = value;\n    this._domain = null;\n    this._canLaunch = null;\n  }\n\n  get domain(): string {\n    if (this._domain == null && this.uri != null) {\n      this._domain = Utils.getDomain(this.uri);\n      if (this._domain === \"\") {\n        this._domain = null;\n      }\n    }\n\n    return this._domain;\n  }\n\n  get hostname(): string {\n    if (this.match === UriMatchStrategy.RegularExpression) {\n      return null;\n    }\n    if (this._hostname == null && this.uri != null) {\n      this._hostname = Utils.getHostname(this.uri);\n      if (this._hostname === \"\") {\n        this._hostname = null;\n      }\n    }\n\n    return this._hostname;\n  }\n\n  get host(): string {\n    if (this.match === UriMatchStrategy.RegularExpression) {\n      return null;\n    }\n    if (this._host == null && this.uri != null) {\n      this._host = Utils.getHost(this.uri);\n      if (this._host === \"\") {\n        this._host = null;\n      }\n    }\n\n    return this._host;\n  }\n\n  get hostnameOrUri(): string {\n    return this.hostname != null ? this.hostname : this.uri;\n  }\n\n  get hostOrUri(): string {\n    return this.host != null ? this.host : this.uri;\n  }\n\n  get isWebsite(): boolean {\n    return (\n      this.uri != null &&\n      (this.uri.indexOf(\"http://\") === 0 ||\n        this.uri.indexOf(\"https://\") === 0 ||\n        (this.uri.indexOf(\"://\") < 0 && !Utils.isNullOrWhitespace(Utils.getDomain(this.uri))))\n    );\n  }\n\n  get canLaunch(): boolean {\n    if (this._canLaunch != null) {\n      return this._canLaunch;\n    }\n    if (this.uri != null && this.match !== UriMatchStrategy.RegularExpression) {\n      this._canLaunch = SafeUrls.canLaunch(this.launchUri);\n    } else {\n      this._canLaunch = false;\n    }\n    return this._canLaunch;\n  }\n\n  get launchUri(): string {\n    return this.uri.indexOf(\"://\") < 0 && !Utils.isNullOrWhitespace(Utils.getDomain(this.uri))\n      ? \"http://\" + this.uri\n      : this.uri;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<LoginUriView>>): LoginUriView {\n    return Object.assign(new LoginUriView(), obj);\n  }\n\n  matchesUri(\n    targetUri: string,\n    equivalentDomains: Set<string>,\n    defaultUriMatch: UriMatchStrategySetting = null,\n  ): boolean {\n    if (!this.uri || !targetUri) {\n      return false;\n    }\n\n    let matchType = this.match ?? defaultUriMatch;\n    matchType ??= UriMatchStrategy.Domain;\n\n    const targetDomain = Utils.getDomain(targetUri);\n    const matchDomains = equivalentDomains.add(targetDomain);\n\n    switch (matchType) {\n      case UriMatchStrategy.Domain:\n        return this.matchesDomain(targetUri, matchDomains);\n      case UriMatchStrategy.Host: {\n        const urlHost = Utils.getHost(targetUri);\n        return urlHost != null && urlHost === Utils.getHost(this.uri);\n      }\n      case UriMatchStrategy.Exact:\n        return targetUri === this.uri;\n      case UriMatchStrategy.StartsWith:\n        return targetUri.startsWith(this.uri);\n      case UriMatchStrategy.RegularExpression:\n        try {\n          const regex = new RegExp(this.uri, \"i\");\n          return regex.test(targetUri);\n        } catch (e) {\n          // Invalid regex\n          return false;\n        }\n      case UriMatchStrategy.Never:\n        return false;\n      default:\n        break;\n    }\n\n    return false;\n  }\n\n  private matchesDomain(targetUri: string, matchDomains: Set<string>) {\n    if (targetUri == null || this.domain == null || !matchDomains.has(this.domain)) {\n      return false;\n    }\n\n    if (Utils.DomainMatchBlacklist.has(this.domain)) {\n      const domainUrlHost = Utils.getHost(targetUri);\n      return !Utils.DomainMatchBlacklist.get(this.domain).has(domainUrlHost);\n    }\n\n    return true;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { UriMatchStrategySetting } from \"../../../models/domain/domain-service\";\nimport { Utils } from \"../../../platform/misc/utils\";\nimport { DeepJsonify } from \"../../../types/deep-jsonify\";\nimport { LoginLinkedId as LinkedId } from \"../../enums\";\nimport { linkedFieldOption } from \"../../linked-field-option.decorator\";\nimport { Login } from \"../domain/login\";\n\nimport { Fido2CredentialView } from \"./fido2-credential.view\";\nimport { ItemView } from \"./item.view\";\nimport { LoginUriView } from \"./login-uri.view\";\n\nexport class LoginView extends ItemView {\n  @linkedFieldOption(LinkedId.Username, { sortPosition: 0 })\n  username: string = null;\n  @linkedFieldOption(LinkedId.Password, { sortPosition: 1 })\n  password: string = null;\n\n  passwordRevisionDate?: Date = null;\n  totp: string = null;\n  uris: LoginUriView[] = [];\n  autofillOnPageLoad: boolean = null;\n  fido2Credentials: Fido2CredentialView[] = null;\n\n  constructor(l?: Login) {\n    super();\n    if (!l) {\n      return;\n    }\n\n    this.passwordRevisionDate = l.passwordRevisionDate;\n    this.autofillOnPageLoad = l.autofillOnPageLoad;\n  }\n\n  get uri(): string {\n    return this.hasUris ? this.uris[0].uri : null;\n  }\n\n  get maskedPassword(): string {\n    return this.password != null ? \"••••••••\" : null;\n  }\n\n  get subTitle(): string {\n    // if there's a passkey available, use that as a fallback\n    if (Utils.isNullOrEmpty(this.username) && this.fido2Credentials?.length > 0) {\n      return this.fido2Credentials[0].userName;\n    }\n\n    return this.username;\n  }\n\n  get canLaunch(): boolean {\n    return this.hasUris && this.uris.some((u) => u.canLaunch);\n  }\n\n  get hasTotp(): boolean {\n    return !Utils.isNullOrWhitespace(this.totp);\n  }\n\n  get launchUri(): string {\n    if (this.hasUris) {\n      const uri = this.uris.find((u) => u.canLaunch);\n      if (uri != null) {\n        return uri.launchUri;\n      }\n    }\n    return null;\n  }\n\n  get hasUris(): boolean {\n    return this.uris != null && this.uris.length > 0;\n  }\n\n  get hasFido2Credentials(): boolean {\n    return this.fido2Credentials != null && this.fido2Credentials.length > 0;\n  }\n\n  matchesUri(\n    targetUri: string,\n    equivalentDomains: Set<string>,\n    defaultUriMatch: UriMatchStrategySetting = null,\n  ): boolean {\n    if (this.uris == null) {\n      return false;\n    }\n\n    return this.uris.some((uri) => uri.matchesUri(targetUri, equivalentDomains, defaultUriMatch));\n  }\n\n  static fromJSON(obj: Partial<DeepJsonify<LoginView>>): LoginView {\n    const passwordRevisionDate =\n      obj.passwordRevisionDate == null ? null : new Date(obj.passwordRevisionDate);\n    const uris = obj.uris.map((uri) => LoginUriView.fromJSON(uri));\n    const fido2Credentials = obj.fido2Credentials?.map((key) => Fido2CredentialView.fromJSON(key));\n\n    return Object.assign(new LoginView(), obj, {\n      passwordRevisionDate,\n      uris,\n      fido2Credentials,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { View } from \"../../../models/view/view\";\nimport { Password } from \"../domain/password\";\n\nexport class PasswordHistoryView implements View {\n  password: string = null;\n  lastUsedDate: Date = null;\n\n  constructor(ph?: Password) {\n    if (!ph) {\n      return;\n    }\n\n    this.lastUsedDate = ph.lastUsedDate;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<PasswordHistoryView>>): PasswordHistoryView {\n    const lastUsedDate = obj.lastUsedDate == null ? null : new Date(obj.lastUsedDate);\n\n    return Object.assign(new PasswordHistoryView(), obj, {\n      lastUsedDate: lastUsedDate,\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { SecureNoteType } from \"../../enums\";\nimport { SecureNote } from \"../domain/secure-note\";\n\nimport { ItemView } from \"./item.view\";\n\nexport class SecureNoteView extends ItemView {\n  type: SecureNoteType = null;\n\n  constructor(n?: SecureNote) {\n    super();\n    if (!n) {\n      return;\n    }\n\n    this.type = n.type;\n  }\n\n  get subTitle(): string {\n    return null;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<SecureNoteView>>): SecureNoteView {\n    return Object.assign(new SecureNoteView(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { SshKey } from \"../domain/ssh-key\";\n\nimport { ItemView } from \"./item.view\";\n\nexport class SshKeyView extends ItemView {\n  privateKey: string = null;\n  publicKey: string = null;\n  keyFingerprint: string = null;\n\n  constructor(n?: SshKey) {\n    super();\n    if (!n) {\n      return;\n    }\n  }\n\n  get maskedPrivateKey(): string {\n    if (!this.privateKey || this.privateKey.length === 0) {\n      return \"\";\n    }\n\n    let lines = this.privateKey.split(\"\\n\").filter((l) => l.trim() !== \"\");\n    lines = lines.map((l, i) => {\n      if (i === 0 || i === lines.length - 1) {\n        return l;\n      }\n      return this.maskLine(l);\n    });\n    return lines.join(\"\\n\");\n  }\n\n  private maskLine(line: string): string {\n    return \"•\".repeat(32);\n  }\n\n  get subTitle(): string {\n    return this.keyFingerprint;\n  }\n\n  static fromJSON(obj: Partial<Jsonify<SshKeyView>>): SshKeyView {\n    return Object.assign(new SshKeyView(), obj);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ITreeNodeObject, TreeNode } from \"./models/domain/tree-node\";\n\nexport class ServiceUtils {\n  /**\n   * Recursively adds a node to nodeTree\n   * @param {TreeNode<ITreeNodeObject>[]} nodeTree - An array of TreeNodes that the node will be added to\n   * @param {number} partIndex - Index of the `parts` array that is being processed\n   * @param {string[]} parts - Array of strings that represent the path to the `obj` node\n   * @param {ITreeNodeObject} obj - The node to be added to the tree\n   * @param {ITreeNodeObject} parent - The parent node of the `obj` node\n   * @param {string} delimiter - The delimiter used to split the path string, will be used to combine the path for missing nodes\n   */\n  static nestedTraverse(\n    nodeTree: TreeNode<ITreeNodeObject>[],\n    partIndex: number,\n    parts: string[],\n    obj: ITreeNodeObject,\n    parent: TreeNode<ITreeNodeObject> | undefined,\n    delimiter: string,\n  ) {\n    if (parts.length <= partIndex) {\n      return;\n    }\n\n    const end: boolean = partIndex === parts.length - 1;\n    const partName: string = parts[partIndex];\n\n    for (let i = 0; i < nodeTree.length; i++) {\n      if (nodeTree[i].node.name !== partName) {\n        continue;\n      }\n      if (end && nodeTree[i].node.id !== obj.id) {\n        // Another node exists with the same name as the node being added\n        nodeTree.push(new TreeNode(obj, parent, partName));\n        return;\n      }\n      // Move down the tree to the next level\n      ServiceUtils.nestedTraverse(\n        nodeTree[i].children,\n        partIndex + 1,\n        parts,\n        obj,\n        nodeTree[i],\n        delimiter,\n      );\n      return;\n    }\n\n    // If there's no node here with the same name...\n    if (nodeTree.filter((n) => n.node.name === partName).length === 0) {\n      // And we're at the end of the path given, add the node\n      if (end) {\n        nodeTree.push(new TreeNode(obj, parent, partName));\n        return;\n      }\n      // And we're not at the end of the path, combine the current name with the next name\n      // 1, *1.2, 1.2.1 becomes\n      // 1, *1.2/1.2.1\n      const newPartName = partName + delimiter + parts[partIndex + 1];\n      ServiceUtils.nestedTraverse(\n        nodeTree,\n        0,\n        [newPartName, ...parts.slice(partIndex + 2)],\n        obj,\n        parent,\n        delimiter,\n      );\n    }\n  }\n\n  /**\n   * Searches a tree for a node with a matching `id`\n   * @param {TreeNode<T>} nodeTree - A single TreeNode branch that will be searched\n   * @param {string} id - The id of the node to be found\n   * @returns {TreeNode<T>} The node with a matching `id`\n   */\n  static getTreeNodeObject<T extends ITreeNodeObject>(\n    nodeTree: TreeNode<T>,\n    id: string,\n  ): TreeNode<T> {\n    if (nodeTree.node.id === id) {\n      return nodeTree;\n    }\n    for (let i = 0; i < nodeTree.children.length; i++) {\n      if (nodeTree.children[i].children != null) {\n        const node = ServiceUtils.getTreeNodeObject(nodeTree.children[i], id);\n        if (node !== null) {\n          return node;\n        }\n      }\n    }\n    return null;\n  }\n\n  /**\n   * Searches an array of tree nodes for a node with a matching `id`\n   * @param {TreeNode<T>} nodeTree - An array of TreeNode branches that will be searched\n   * @param {string} id - The id of the node to be found\n   * @returns {TreeNode<T>} The node with a matching `id`\n   */\n  static getTreeNodeObjectFromList<T extends ITreeNodeObject>(\n    nodeTree: TreeNode<T>[],\n    id: string,\n  ): TreeNode<T> {\n    for (let i = 0; i < nodeTree.length; i++) {\n      if (nodeTree[i].node.id === id) {\n        return nodeTree[i];\n      } else if (nodeTree[i].children != null) {\n        const node = ServiceUtils.getTreeNodeObjectFromList(nodeTree[i].children, id);\n        if (node !== null) {\n          return node;\n        }\n      }\n    }\n    return null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { map, Observable, of, shareReplay, switchMap } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { CollectionId } from \"@bitwarden/common/types/guid\";\n\nimport { Cipher } from \"../models/domain/cipher\";\nimport { CipherView } from \"../models/view/cipher.view\";\n\n/**\n * Represents either a cipher or a cipher view.\n */\ntype CipherLike = Cipher | CipherView;\n\n/**\n * Service for managing user cipher authorization.\n */\nexport abstract class CipherAuthorizationService {\n  /**\n   * Determines if the user can delete the specified cipher.\n   *\n   * @param {CipherLike} cipher - The cipher object to evaluate for deletion permissions.\n   * @param {CollectionId[]} [allowedCollections] - Optional. The selected collection id from the vault filter.\n   * @param {boolean} isAdminConsoleAction - Optional. A flag indicating if the action is being performed from the admin console.\n   *\n   * @returns {Observable<boolean>} - An observable that emits a boolean value indicating if the user can delete the cipher.\n   */\n  canDeleteCipher$: (\n    cipher: CipherLike,\n    allowedCollections?: CollectionId[],\n    isAdminConsoleAction?: boolean,\n  ) => Observable<boolean>;\n\n  /**\n   * Determines if the user can clone the specified cipher.\n   *\n   * @param {CipherLike} cipher - The cipher object to evaluate for cloning permissions.\n   * @param {boolean} isAdminConsoleAction - Optional. A flag indicating if the action is being performed from the admin console.\n   *\n   * @returns {Observable<boolean>} - An observable that emits a boolean value indicating if the user can clone the cipher.\n   */\n  canCloneCipher$: (cipher: CipherLike, isAdminConsoleAction?: boolean) => Observable<boolean>;\n}\n\n/**\n * {@link CipherAuthorizationService}\n */\nexport class DefaultCipherAuthorizationService implements CipherAuthorizationService {\n  constructor(\n    private collectionService: CollectionService,\n    private organizationService: OrganizationService,\n  ) {}\n\n  /**\n   *\n   * {@link CipherAuthorizationService.canDeleteCipher$}\n   */\n  canDeleteCipher$(\n    cipher: CipherLike,\n    allowedCollections?: CollectionId[],\n    isAdminConsoleAction?: boolean,\n  ): Observable<boolean> {\n    if (cipher.organizationId == null) {\n      return of(true);\n    }\n\n    return this.organizationService.get$(cipher.organizationId).pipe(\n      switchMap((organization) => {\n        if (isAdminConsoleAction) {\n          // If the user is an admin, they can delete an unassigned cipher\n          if (!cipher.collectionIds || cipher.collectionIds.length === 0) {\n            return of(organization?.canEditUnassignedCiphers === true);\n          }\n\n          if (organization?.canEditAllCiphers) {\n            return of(true);\n          }\n        }\n\n        return this.collectionService\n          .decryptedCollectionViews$(cipher.collectionIds as CollectionId[])\n          .pipe(\n            map((allCollections) => {\n              const shouldFilter = allowedCollections?.some(Boolean);\n\n              const collections = shouldFilter\n                ? allCollections.filter((c) => allowedCollections.includes(c.id as CollectionId))\n                : allCollections;\n\n              return collections.some((collection) => collection.manage);\n            }),\n          );\n      }),\n    );\n  }\n\n  /**\n   * {@link CipherAuthorizationService.canCloneCipher$}\n   */\n  canCloneCipher$(cipher: CipherLike, isAdminConsoleAction?: boolean): Observable<boolean> {\n    if (cipher.organizationId == null) {\n      return of(true);\n    }\n\n    return this.organizationService.get$(cipher.organizationId).pipe(\n      switchMap((organization) => {\n        // Admins and custom users can always clone when in the Admin Console\n        if (\n          isAdminConsoleAction &&\n          (organization.isAdmin || organization.permissions?.editAnyCollection)\n        ) {\n          return of(true);\n        }\n\n        return this.collectionService\n          .decryptedCollectionViews$(cipher.collectionIds as CollectionId[])\n          .pipe(map((allCollections) => allCollections.some((collection) => collection.manage)));\n      }),\n      shareReplay({ bufferSize: 1, refCount: false }),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ContentChild, Directive, ElementRef, HostBinding } from \"@angular/core\";\n\nimport { FocusableElement } from \"../shared/focusable-element\";\n\n@Directive({\n  selector: \"bitA11yCell\",\n  standalone: true,\n  providers: [{ provide: FocusableElement, useExisting: A11yCellDirective }],\n})\nexport class A11yCellDirective implements FocusableElement {\n  @HostBinding(\"attr.role\")\n  role: \"gridcell\" | null;\n\n  @ContentChild(FocusableElement)\n  private focusableChild: FocusableElement;\n\n  getFocusTarget() {\n    let focusTarget: HTMLElement;\n    if (this.focusableChild) {\n      focusTarget = this.focusableChild.getFocusTarget();\n    } else {\n      focusTarget = this.elementRef.nativeElement.querySelector(\"button, a\");\n    }\n\n    if (!focusTarget) {\n      return this.elementRef.nativeElement;\n    }\n\n    return focusTarget;\n  }\n\n  constructor(private elementRef: ElementRef<HTMLElement>) {}\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BitActionDirective } from \"./bit-action.directive\";\nimport { BitSubmitDirective } from \"./bit-submit.directive\";\nimport { BitFormButtonDirective } from \"./form-button.directive\";\n\n@NgModule({\n  imports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective],\n  exports: [BitActionDirective, BitFormButtonDirective, BitSubmitDirective],\n})\nexport class AsyncActionsModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, HostListener, Input, OnDestroy, Optional } from \"@angular/core\";\nimport { BehaviorSubject, finalize, Subject, takeUntil, tap } from \"rxjs\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\n\nimport { ButtonLikeAbstraction } from \"../shared/button-like.abstraction\";\nimport { FunctionReturningAwaitable, functionToObservable } from \"../utils/function-to-observable\";\n\n/**\n * Allow a single button to perform async actions on click and reflect the progress in the UI by automatically\n * activating the loading effect while the action is processed.\n */\n@Directive({\n  selector: \"[bitAction]\",\n  standalone: true,\n})\nexport class BitActionDirective implements OnDestroy {\n  private destroy$ = new Subject<void>();\n  private _loading$ = new BehaviorSubject<boolean>(false);\n\n  disabled = false;\n\n  @Input(\"bitAction\") handler: FunctionReturningAwaitable;\n\n  readonly loading$ = this._loading$.asObservable();\n\n  constructor(\n    private buttonComponent: ButtonLikeAbstraction,\n    @Optional() private validationService?: ValidationService,\n    @Optional() private logService?: LogService,\n  ) {}\n\n  get loading() {\n    return this._loading$.value;\n  }\n\n  set loading(value: boolean) {\n    this._loading$.next(value);\n    this.buttonComponent.loading = value;\n  }\n\n  @HostListener(\"click\")\n  protected async onClick() {\n    if (!this.handler || this.loading || this.disabled || this.buttonComponent.disabled) {\n      return;\n    }\n\n    this.loading = true;\n    functionToObservable(this.handler)\n      .pipe(\n        tap({\n          error: (err: unknown) => {\n            this.logService?.error(`Async action exception: ${err}`);\n            this.validationService?.showError(err);\n          },\n        }),\n        finalize(() => (this.loading = false)),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, Input, OnDestroy, OnInit, Optional } from \"@angular/core\";\nimport { FormGroupDirective } from \"@angular/forms\";\nimport { BehaviorSubject, catchError, filter, of, Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { ValidationService } from \"@bitwarden/common/platform/abstractions/validation.service\";\n\nimport { FunctionReturningAwaitable, functionToObservable } from \"../utils/function-to-observable\";\n\n/**\n * Allow a form to perform async actions on submit, disabling the form while the action is processing.\n */\n@Directive({\n  selector: \"[formGroup][bitSubmit]\",\n  standalone: true,\n})\nexport class BitSubmitDirective implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n  private _loading$ = new BehaviorSubject<boolean>(false);\n  private _disabled$ = new BehaviorSubject<boolean>(false);\n\n  @Input(\"bitSubmit\") handler: FunctionReturningAwaitable;\n\n  @Input() allowDisabledFormSubmit?: boolean = false;\n\n  readonly loading$ = this._loading$.asObservable();\n  readonly disabled$ = this._disabled$.asObservable();\n\n  constructor(\n    private formGroupDirective: FormGroupDirective,\n    @Optional() validationService?: ValidationService,\n    @Optional() logService?: LogService,\n  ) {\n    formGroupDirective.ngSubmit\n      .pipe(\n        filter(() => !this.disabled),\n        switchMap(() => {\n          // Calling functionToObservable executes the sync part of the handler\n          // allowing the function to check form validity before it gets disabled.\n          const awaitable = functionToObservable(this.handler);\n\n          // Disable form\n          this.loading = true;\n\n          return awaitable.pipe(\n            catchError((err: unknown) => {\n              logService?.error(`Async submit exception: ${err}`);\n              validationService?.showError(err);\n              return of(undefined);\n            }),\n          );\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe({\n        next: () => (this.loading = false),\n        complete: () => (this.loading = false),\n      });\n  }\n\n  ngOnInit(): void {\n    this.formGroupDirective.statusChanges.pipe(takeUntil(this.destroy$)).subscribe((c) => {\n      if (this.allowDisabledFormSubmit) {\n        this._disabled$.next(false);\n      } else {\n        this._disabled$.next(c === \"DISABLED\");\n      }\n    });\n  }\n\n  get disabled() {\n    return this._disabled$.value;\n  }\n\n  set disabled(value: boolean) {\n    this._disabled$.next(value);\n  }\n\n  get loading() {\n    return this._loading$.value;\n  }\n\n  set loading(value: boolean) {\n    this.disabled = value;\n    this._loading$.next(value);\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, Input, OnDestroy, Optional } from \"@angular/core\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { ButtonLikeAbstraction } from \"../shared/button-like.abstraction\";\n\nimport { BitActionDirective } from \"./bit-action.directive\";\nimport { BitSubmitDirective } from \"./bit-submit.directive\";\n\n/**\n * This directive has two purposes:\n *\n * When attached to a submit button:\n * - Activates the button loading effect while the form is processing an async submit action.\n * - Disables the button while a `bitAction` directive on another button is being processed.\n *\n * When attached to a button with `bitAction` directive inside of a form:\n * - Disables the button while the `bitSubmit` directive is processing an async submit action.\n * - Disables the button while a `bitAction` directive on another button is being processed.\n * - Disables form submission while the `bitAction` directive is processing an async action.\n *\n * Note: you must use a directive that implements the ButtonLikeAbstraction (bitButton or bitIconButton for example)\n * along with this one in order to avoid provider errors.\n */\n@Directive({\n  selector: \"button[bitFormButton]\",\n  standalone: true,\n})\nexport class BitFormButtonDirective implements OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  @Input() type: string;\n  @Input() disabled?: boolean;\n\n  constructor(\n    buttonComponent: ButtonLikeAbstraction,\n    @Optional() submitDirective?: BitSubmitDirective,\n    @Optional() actionDirective?: BitActionDirective,\n  ) {\n    if (submitDirective && buttonComponent) {\n      submitDirective.loading$.pipe(takeUntil(this.destroy$)).subscribe((loading) => {\n        if (this.type === \"submit\") {\n          buttonComponent.loading = loading;\n        } else {\n          buttonComponent.disabled = this.disabled || loading;\n        }\n      });\n\n      submitDirective.disabled$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {\n        if (this.disabled !== false) {\n          buttonComponent.disabled = this.disabled || disabled;\n        }\n      });\n    }\n\n    if (submitDirective && actionDirective) {\n      actionDirective.loading$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {\n        submitDirective.disabled = disabled;\n      });\n\n      submitDirective.disabled$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {\n        actionDirective.disabled = disabled;\n      });\n    }\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf, NgClass } from \"@angular/common\";\nimport { Component, Input, OnChanges } from \"@angular/core\";\nimport { DomSanitizer, SafeResourceUrl } from \"@angular/platform-browser\";\n\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\ntype SizeTypes = \"xlarge\" | \"large\" | \"default\" | \"small\" | \"xsmall\";\n\nconst SizeClasses: Record<SizeTypes, string[]> = {\n  xlarge: [\"tw-h-24\", \"tw-w-24\"],\n  large: [\"tw-h-16\", \"tw-w-16\"],\n  default: [\"tw-h-10\", \"tw-w-10\"],\n  small: [\"tw-h-7\", \"tw-w-7\"],\n  xsmall: [\"tw-h-6\", \"tw-w-6\"],\n};\n\n@Component({\n  selector: \"bit-avatar\",\n  template: `<img *ngIf=\"src\" [src]=\"src\" title=\"{{ title || text }}\" [ngClass]=\"classList\" />`,\n  standalone: true,\n  imports: [NgIf, NgClass],\n})\nexport class AvatarComponent implements OnChanges {\n  @Input() border = false;\n  @Input() color?: string;\n  @Input() id?: string;\n  @Input() text?: string;\n  @Input() title: string;\n  @Input() size: SizeTypes = \"default\";\n\n  private svgCharCount = 2;\n  private svgFontSize = 20;\n  private svgFontWeight = 300;\n  private svgSize = 48;\n  src: SafeResourceUrl;\n\n  constructor(public sanitizer: DomSanitizer) {}\n\n  ngOnChanges() {\n    this.generate();\n  }\n\n  get classList() {\n    return [\"tw-rounded-full\"]\n      .concat(SizeClasses[this.size] ?? [])\n      .concat(this.border ? [\"tw-border\", \"tw-border-solid\", \"tw-border-secondary-600\"] : []);\n  }\n\n  private generate() {\n    let chars: string = null;\n    const upperCaseText = this.text?.toUpperCase() ?? \"\";\n\n    chars = this.getFirstLetters(upperCaseText, this.svgCharCount);\n\n    if (chars == null) {\n      chars = this.unicodeSafeSubstring(upperCaseText, this.svgCharCount);\n    }\n\n    // If the chars contain an emoji, only show it.\n    if (chars.match(Utils.regexpEmojiPresentation)) {\n      chars = chars.match(Utils.regexpEmojiPresentation)[0];\n    }\n\n    let svg: HTMLElement;\n    let hexColor = this.color;\n\n    if (!Utils.isNullOrWhitespace(this.color)) {\n      svg = this.createSvgElement(this.svgSize, hexColor);\n    } else if (!Utils.isNullOrWhitespace(this.id)) {\n      hexColor = Utils.stringToColor(this.id.toString());\n      svg = this.createSvgElement(this.svgSize, hexColor);\n    } else {\n      hexColor = Utils.stringToColor(upperCaseText);\n      svg = this.createSvgElement(this.svgSize, hexColor);\n    }\n\n    const charObj = this.createTextElement(chars, hexColor);\n    svg.appendChild(charObj);\n    const html = window.document.createElement(\"div\").appendChild(svg).outerHTML;\n    const svgHtml = window.btoa(unescape(encodeURIComponent(html)));\n\n    // This is safe because the only user provided value, chars is set using `textContent`\n    this.src = this.sanitizer.bypassSecurityTrustResourceUrl(\n      \"data:image/svg+xml;base64,\" + svgHtml,\n    );\n  }\n\n  private getFirstLetters(data: string, count: number): string {\n    const parts = data.split(\" \");\n    if (parts.length > 1) {\n      let text = \"\";\n      for (let i = 0; i < count; i++) {\n        text += this.unicodeSafeSubstring(parts[i], 1);\n      }\n      return text;\n    }\n    return null;\n  }\n\n  private createSvgElement(size: number, color: string): HTMLElement {\n    const svgTag = window.document.createElement(\"svg\");\n    svgTag.setAttribute(\"xmlns\", \"http://www.w3.org/2000/svg\");\n    svgTag.setAttribute(\"pointer-events\", \"none\");\n    svgTag.setAttribute(\"width\", size.toString());\n    svgTag.setAttribute(\"height\", size.toString());\n    svgTag.style.backgroundColor = color;\n    svgTag.style.width = size + \"px\";\n    svgTag.style.height = size + \"px\";\n    return svgTag;\n  }\n\n  private createTextElement(character: string, color: string): HTMLElement {\n    const textTag = window.document.createElement(\"text\");\n    textTag.setAttribute(\"text-anchor\", \"middle\");\n    textTag.setAttribute(\"y\", \"50%\");\n    textTag.setAttribute(\"x\", \"50%\");\n    textTag.setAttribute(\"dy\", \"0.35em\");\n    textTag.setAttribute(\"pointer-events\", \"auto\");\n    textTag.setAttribute(\"fill\", Utils.pickTextColorBasedOnBgColor(color, 135, true));\n    textTag.setAttribute(\n      \"font-family\",\n      '\"DM Sans\",\"Helvetica Neue\",Helvetica,Arial,' +\n        'sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\"',\n    );\n    // Warning do not use innerHTML here, characters are user provided\n    textTag.textContent = character;\n    textTag.style.fontWeight = this.svgFontWeight.toString();\n    textTag.style.fontSize = this.svgFontSize + \"px\";\n    return textTag;\n  }\n\n  private unicodeSafeSubstring(str: string, count: number) {\n    const characters = str.match(/./gu);\n    return characters != null ? characters.slice(0, count).join(\"\") : \"\";\n  }\n}\n","<div class=\"tw-inline-flex tw-flex-wrap tw-gap-2\">\n  <ng-container *ngFor=\"let item of filteredItems; let last = last\">\n    <span bitBadge [variant]=\"variant\" [truncate]=\"truncate\">\n      {{ item }}\n    </span>\n    <span class=\"tw-sr-only\" *ngIf=\"!last || isFiltered\">, </span>\n  </ng-container>\n  <span *ngIf=\"isFiltered\" bitBadge [variant]=\"variant\">\n    {{ \"plusNMore\" | i18n: (items.length - filteredItems.length).toString() }}\n  </span>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnChanges } from \"@angular/core\";\n\nimport { BadgeModule, BadgeVariant } from \"../badge\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\n@Component({\n  selector: \"bit-badge-list\",\n  templateUrl: \"badge-list.component.html\",\n  standalone: true,\n  imports: [CommonModule, BadgeModule, I18nPipe],\n})\nexport class BadgeListComponent implements OnChanges {\n  private _maxItems: number;\n\n  protected filteredItems: string[] = [];\n  protected isFiltered = false;\n\n  @Input() variant: BadgeVariant = \"primary\";\n  @Input() items: string[] = [];\n  @Input() truncate = true;\n\n  @Input()\n  get maxItems(): number | undefined {\n    return this._maxItems;\n  }\n\n  set maxItems(value: number | undefined) {\n    this._maxItems = value == undefined ? undefined : Math.max(1, value);\n  }\n\n  ngOnChanges() {\n    if (this.maxItems == undefined || this.items.length <= this.maxItems) {\n      this.filteredItems = this.items;\n    } else {\n      this.filteredItems = this.items.slice(0, this.maxItems - 1);\n    }\n    this.isFiltered = this.items.length > this.filteredItems.length;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, ElementRef, HostBinding, Input } from \"@angular/core\";\n\nimport { FocusableElement } from \"../shared/focusable-element\";\n\nexport type BadgeVariant = \"primary\" | \"secondary\" | \"success\" | \"danger\" | \"warning\" | \"info\";\n\nconst styles: Record<BadgeVariant, string[]> = {\n  primary: [\"tw-bg-primary-100\", \"tw-border-primary-700\", \"!tw-text-primary-700\"],\n  secondary: [\"tw-bg-secondary-100\", \"tw-border-secondary-700\", \"!tw-text-secondary-700\"],\n  success: [\"tw-bg-success-100\", \"tw-border-success-700\", \"!tw-text-success-700\"],\n  danger: [\"tw-bg-danger-100\", \"tw-border-danger-700\", \"!tw-text-danger-700\"],\n  warning: [\"tw-bg-warning-100\", \"tw-border-warning-700\", \"!tw-text-warning-700\"],\n  info: [\"tw-bg-info-100\", \"tw-border-info-700\", \"!tw-text-info-700\"],\n};\n\nconst hoverStyles: Record<BadgeVariant, string[]> = {\n  primary: [\"hover:tw-bg-primary-600\", \"hover:tw-border-primary-600\", \"hover:!tw-text-contrast\"],\n  secondary: [\n    \"hover:tw-bg-secondary-600\",\n    \"hover:tw-border-secondary-600\",\n    \"hover:!tw-text-contrast\",\n  ],\n  success: [\"hover:tw-bg-success-600\", \"hover:tw-border-success-600\", \"hover:!tw-text-contrast\"],\n  danger: [\"hover:tw-bg-danger-600\", \"hover:tw-border-danger-600\", \"hover:!tw-text-contrast\"],\n  warning: [\"hover:tw-bg-warning-600\", \"hover:tw-border-warning-600\", \"hover:!tw-text-black\"],\n  info: [\"hover:tw-bg-info-600\", \"hover:tw-border-info-600\", \"hover:!tw-text-black\"],\n};\n\n@Component({\n  selector: \"span[bitBadge], a[bitBadge], button[bitBadge]\",\n  providers: [{ provide: FocusableElement, useExisting: BadgeComponent }],\n  imports: [CommonModule],\n  templateUrl: \"badge.component.html\",\n  standalone: true,\n})\nexport class BadgeComponent implements FocusableElement {\n  @HostBinding(\"class\") get classList() {\n    return [\n      \"tw-inline-block\",\n      \"tw-py-1\",\n      \"tw-px-2\",\n      \"tw-font-medium\",\n      \"tw-text-center\",\n      \"tw-align-text-top\",\n      \"tw-rounded-full\",\n      \"tw-border-[0.5px]\",\n      \"tw-border-solid\",\n      \"tw-box-border\",\n      \"tw-whitespace-nowrap\",\n      \"tw-text-xs\",\n      \"hover:tw-no-underline\",\n      \"focus-visible:tw-outline-none\",\n      \"focus-visible:tw-ring-2\",\n      \"focus-visible:tw-ring-offset-2\",\n      \"focus-visible:tw-ring-primary-600\",\n      \"disabled:tw-bg-secondary-300\",\n      \"disabled:hover:tw-bg-secondary-300\",\n      \"disabled:tw-border-secondary-300\",\n      \"disabled:hover:tw-border-secondary-300\",\n      \"disabled:!tw-text-muted\",\n      \"disabled:hover:!tw-text-muted\",\n      \"disabled:tw-cursor-not-allowed\",\n    ]\n      .concat(styles[this.variant])\n      .concat(this.hasHoverEffects ? [...hoverStyles[this.variant], \"tw-min-w-10\"] : [])\n      .concat(this.truncate ? this.maxWidthClass : []);\n  }\n  @HostBinding(\"attr.title\") get titleAttr() {\n    if (this.title !== undefined) {\n      return this.title;\n    }\n    return this.truncate ? this.el.nativeElement.textContent.trim() : null;\n  }\n\n  /**\n   * Optional override for the automatic badge title when truncating.\n   */\n  @Input() title?: string;\n\n  /**\n   * Variant, sets the background color of the badge.\n   */\n  @Input() variant: BadgeVariant = \"primary\";\n\n  /**\n   * Truncate long text\n   */\n  @Input() truncate = true;\n\n  @Input() maxWidthClass: `tw-max-w-${string}` = \"tw-max-w-40\";\n\n  getFocusTarget() {\n    return this.el.nativeElement;\n  }\n\n  private hasHoverEffects = false;\n\n  constructor(private el: ElementRef<HTMLElement>) {\n    this.hasHoverEffects = el?.nativeElement?.nodeName != \"SPAN\";\n  }\n}\n","<span [ngClass]=\"{ 'tw-truncate tw-block': truncate }\">\n  <ng-content></ng-content>\n</span>\n","import { NgModule } from \"@angular/core\";\n\nimport { BadgeComponent } from \"./badge.component\";\n\n@NgModule({\n  imports: [BadgeComponent],\n  exports: [BadgeComponent],\n})\nexport class BadgeModule {}\n","<div\n  class=\"tw-flex tw-items-center tw-gap-2 tw-p-2 tw-pl-4 tw-text-main tw-border-transparent tw-bg-clip-padding tw-border-solid tw-border-b tw-border-0\"\n  [ngClass]=\"bannerClass\"\n  [attr.role]=\"useAlertRole ? 'status' : null\"\n  [attr.aria-live]=\"useAlertRole ? 'polite' : null\"\n>\n  <i class=\"bwi tw-align-middle tw-text-base\" [ngClass]=\"icon\" *ngIf=\"icon\" aria-hidden=\"true\"></i>\n  <!-- Overriding focus-visible color for link buttons for a11y against colored background -->\n  <span class=\"tw-grow tw-text-base [&>button[bitlink]:focus-visible:before]:!tw-ring-text-main\">\n    <ng-content></ng-content>\n  </span>\n  <!-- Overriding hover and focus-visible colors for a11y against colored background -->\n  <button\n    *ngIf=\"showClose\"\n    class=\"hover:tw-border-text-main focus-visible:before:tw-ring-text-main\"\n    type=\"button\"\n    bitIconButton=\"bwi-close\"\n    buttonType=\"main\"\n    size=\"default\"\n    (click)=\"onClose.emit()\"\n    [attr.title]=\"'close' | i18n\"\n    [attr.aria-label]=\"'close' | i18n\"\n  ></button>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit, Output, EventEmitter } from \"@angular/core\";\n\nimport { IconButtonModule } from \"../icon-button\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\ntype BannerTypes = \"premium\" | \"info\" | \"warning\" | \"danger\";\n\nconst defaultIcon: Record<BannerTypes, string> = {\n  premium: \"bwi-star\",\n  info: \"bwi-info-circle\",\n  warning: \"bwi-exclamation-triangle\",\n  danger: \"bwi-error\",\n};\n\n@Component({\n  selector: \"bit-banner\",\n  templateUrl: \"./banner.component.html\",\n  standalone: true,\n  imports: [CommonModule, IconButtonModule, I18nPipe],\n})\nexport class BannerComponent implements OnInit {\n  @Input(\"bannerType\") bannerType: BannerTypes = \"info\";\n  @Input() icon: string;\n  @Input() useAlertRole = true;\n  @Input() showClose = true;\n\n  @Output() onClose = new EventEmitter<void>();\n\n  ngOnInit(): void {\n    this.icon ??= defaultIcon[this.bannerType];\n  }\n\n  get bannerClass() {\n    switch (this.bannerType) {\n      case \"danger\":\n        return \"tw-bg-danger-100 tw-border-b-danger-700\";\n      case \"info\":\n        return \"tw-bg-info-100 tw-border-b-info-700\";\n      case \"premium\":\n        return \"tw-bg-success-100 tw-border-b-success-700\";\n      case \"warning\":\n        return \"tw-bg-warning-100 tw-border-b-warning-700\";\n    }\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BannerComponent } from \"./banner.component\";\n\n@NgModule({\n  imports: [BannerComponent],\n  exports: [BannerComponent],\n})\nexport class BannerModule {}\n","<ng-template>\n  <i *ngIf=\"icon\" class=\"bwi {{ icon }} !tw-mr-2\" aria-hidden=\"true\"></i><ng-content></ng-content>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from \"@angular/core\";\nimport { QueryParamsHandling } from \"@angular/router\";\n\n@Component({\n  selector: \"bit-breadcrumb\",\n  templateUrl: \"./breadcrumb.component.html\",\n  standalone: true,\n  imports: [NgIf],\n})\nexport class BreadcrumbComponent {\n  @Input()\n  icon?: string;\n\n  @Input()\n  route?: string | any[] = undefined;\n\n  @Input()\n  queryParams?: Record<string, string> = {};\n\n  @Input()\n  queryParamsHandling?: QueryParamsHandling;\n\n  @Output()\n  click = new EventEmitter();\n\n  @ViewChild(TemplateRef, { static: true }) content: TemplateRef<unknown>;\n\n  onClick(args: unknown) {\n    this.click.next(args);\n  }\n}\n","<ng-container *ngFor=\"let breadcrumb of beforeOverflow; let last = last\">\n  <ng-container *ngIf=\"breadcrumb.route\">\n    <a\n      bitLink\n      linkType=\"primary\"\n      class=\"tw-my-2 tw-inline-block\"\n      [routerLink]=\"breadcrumb.route\"\n      [queryParams]=\"breadcrumb.queryParams\"\n      [queryParamsHandling]=\"breadcrumb.queryParamsHandling\"\n    >\n      <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n    </a>\n  </ng-container>\n  <ng-container *ngIf=\"!breadcrumb.route\">\n    <button\n      type=\"button\"\n      bitLink\n      linkType=\"primary\"\n      class=\"tw-my-2 tw-inline-block\"\n      (click)=\"breadcrumb.onClick($event)\"\n    >\n      <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n    </button>\n  </ng-container>\n  <i *ngIf=\"!last\" class=\"bwi bwi-angle-right tw-mx-1.5 tw-text-main\"></i>\n</ng-container>\n\n<ng-container *ngIf=\"hasOverflow\">\n  <i *ngIf=\"beforeOverflow.length > 0\" class=\"bwi bwi-angle-right tw-mx-1.5 tw-text-main\"></i>\n\n  <button\n    type=\"button\"\n    bitIconButton=\"bwi-ellipsis-h\"\n    [bitMenuTriggerFor]=\"overflowMenu\"\n    size=\"small\"\n    aria-haspopup\n  ></button>\n\n  <bit-menu #overflowMenu>\n    <ng-container *ngFor=\"let breadcrumb of overflow\">\n      <ng-container *ngIf=\"breadcrumb.route\">\n        <a\n          bitMenuItem\n          linkType=\"primary\"\n          [routerLink]=\"breadcrumb.route\"\n          [queryParams]=\"breadcrumb.queryParams\"\n          [queryParamsHandling]=\"breadcrumb.queryParamsHandling\"\n        >\n          <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n        </a>\n      </ng-container>\n      <ng-container *ngIf=\"!breadcrumb.route\">\n        <button type=\"button\" bitMenuItem linkType=\"primary\" (click)=\"breadcrumb.onClick($event)\">\n          <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n        </button>\n      </ng-container>\n    </ng-container>\n  </bit-menu>\n  <i class=\"bwi bwi-angle-right tw-mx-1.5 tw-text-main\"></i>\n\n  <ng-container *ngFor=\"let breadcrumb of afterOverflow; let last = last\">\n    <ng-container *ngIf=\"breadcrumb.route\">\n      <a\n        bitLink\n        linkType=\"primary\"\n        class=\"tw-my-2 tw-inline-block\"\n        [routerLink]=\"breadcrumb.route\"\n        [queryParams]=\"breadcrumb.queryParams\"\n        [queryParamsHandling]=\"breadcrumb.queryParamsHandling\"\n      >\n        <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n      </a>\n    </ng-container>\n    <ng-container *ngIf=\"!breadcrumb.route\">\n      <button\n        type=\"button\"\n        bitLink\n        linkType=\"primary\"\n        class=\"tw-my-2 tw-inline-block\"\n        (click)=\"breadcrumb.onClick($event)\"\n      >\n        <ng-container [ngTemplateOutlet]=\"breadcrumb.content\"></ng-container>\n      </button>\n    </ng-container>\n    <i *ngIf=\"!last\" class=\"bwi bwi-angle-right tw-mx-1.5 tw-text-main\"></i>\n  </ng-container>\n</ng-container>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, ContentChildren, Input, QueryList } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { IconButtonModule } from \"../icon-button\";\nimport { LinkModule } from \"../link\";\nimport { MenuModule } from \"../menu\";\n\nimport { BreadcrumbComponent } from \"./breadcrumb.component\";\n\n@Component({\n  selector: \"bit-breadcrumbs\",\n  templateUrl: \"./breadcrumbs.component.html\",\n  standalone: true,\n  imports: [CommonModule, LinkModule, RouterModule, IconButtonModule, MenuModule],\n})\nexport class BreadcrumbsComponent {\n  @Input()\n  show = 3;\n\n  private breadcrumbs: BreadcrumbComponent[] = [];\n\n  @ContentChildren(BreadcrumbComponent)\n  protected set breadcrumbList(value: QueryList<BreadcrumbComponent>) {\n    this.breadcrumbs = value.toArray();\n  }\n\n  protected get beforeOverflow() {\n    if (this.hasOverflow) {\n      return this.breadcrumbs.slice(0, this.show - 1);\n    }\n\n    return this.breadcrumbs;\n  }\n\n  protected get overflow() {\n    return this.breadcrumbs.slice(this.show - 1, -1);\n  }\n\n  protected get afterOverflow() {\n    return this.breadcrumbs.slice(-1);\n  }\n\n  protected get hasOverflow() {\n    return this.breadcrumbs.length > this.show;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BreadcrumbComponent } from \"./breadcrumb.component\";\nimport { BreadcrumbsComponent } from \"./breadcrumbs.component\";\n\n@NgModule({\n  imports: [BreadcrumbsComponent, BreadcrumbComponent],\n  exports: [BreadcrumbsComponent, BreadcrumbComponent],\n})\nexport class BreadcrumbsModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { NgClass } from \"@angular/common\";\nimport { Input, HostBinding, Component } from \"@angular/core\";\n\nimport { ButtonLikeAbstraction, ButtonType } from \"../shared/button-like.abstraction\";\n\nconst focusRing = [\n  \"focus-visible:tw-ring-2\",\n  \"focus-visible:tw-ring-offset-2\",\n  \"focus-visible:tw-ring-primary-600\",\n  \"focus-visible:tw-z-10\",\n];\n\nconst buttonStyles: Record<ButtonType, string[]> = {\n  primary: [\n    \"tw-border-primary-600\",\n    \"tw-bg-primary-600\",\n    \"!tw-text-contrast\",\n    \"hover:tw-bg-primary-700\",\n    \"hover:tw-border-primary-700\",\n    ...focusRing,\n  ],\n  secondary: [\n    \"tw-bg-transparent\",\n    \"tw-border-primary-600\",\n    \"!tw-text-primary-600\",\n    \"hover:tw-bg-primary-600\",\n    \"hover:tw-border-primary-600\",\n    \"hover:!tw-text-contrast\",\n    ...focusRing,\n  ],\n  danger: [\n    \"tw-bg-transparent\",\n    \"tw-border-danger-600\",\n    \"!tw-text-danger\",\n    \"hover:tw-bg-danger-600\",\n    \"hover:tw-border-danger-600\",\n    \"hover:!tw-text-contrast\",\n    ...focusRing,\n  ],\n  unstyled: [],\n};\n\n@Component({\n  selector: \"button[bitButton], a[bitButton]\",\n  templateUrl: \"button.component.html\",\n  providers: [{ provide: ButtonLikeAbstraction, useExisting: ButtonComponent }],\n  standalone: true,\n  imports: [NgClass],\n})\nexport class ButtonComponent implements ButtonLikeAbstraction {\n  @HostBinding(\"class\") get classList() {\n    return [\n      \"tw-font-semibold\",\n      \"tw-py-1.5\",\n      \"tw-px-3\",\n      \"tw-rounded-full\",\n      \"tw-transition\",\n      \"tw-border-2\",\n      \"tw-border-solid\",\n      \"tw-text-center\",\n      \"tw-no-underline\",\n      \"hover:tw-no-underline\",\n      \"focus:tw-outline-none\",\n      \"disabled:tw-bg-secondary-300\",\n      \"disabled:hover:tw-bg-secondary-300\",\n      \"disabled:tw-border-secondary-300\",\n      \"disabled:hover:tw-border-secondary-300\",\n      \"disabled:!tw-text-muted\",\n      \"disabled:hover:!tw-text-muted\",\n      \"disabled:tw-cursor-not-allowed\",\n      \"disabled:hover:tw-no-underline\",\n    ]\n      .concat(this.block ? [\"tw-w-full\", \"tw-block\"] : [\"tw-inline-block\"])\n      .concat(buttonStyles[this.buttonType ?? \"secondary\"]);\n  }\n\n  @HostBinding(\"attr.disabled\")\n  get disabledAttr() {\n    const disabled = this.disabled != null && this.disabled !== false;\n    return disabled || this.loading ? true : null;\n  }\n\n  @Input() buttonType: ButtonType;\n\n  private _block = false;\n\n  @Input()\n  get block(): boolean {\n    return this._block;\n  }\n\n  set block(value: boolean | \"\") {\n    this._block = coerceBooleanProperty(value);\n  }\n\n  @Input() loading = false;\n\n  @Input() disabled = false;\n}\n","<span class=\"tw-relative\">\n  <span [ngClass]=\"{ 'tw-invisible': loading }\">\n    <ng-content></ng-content>\n  </span>\n  <span\n    class=\"tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center\"\n    [ngClass]=\"{ 'tw-invisible': !loading }\"\n  >\n    <i class=\"bwi bwi-spinner bwi-lg bwi-spin\" aria-hidden=\"true\"></i>\n  </span>\n</span>\n","import { NgModule } from \"@angular/core\";\n\nimport { ButtonComponent } from \"./button.component\";\n\n@NgModule({\n  imports: [ButtonComponent],\n  exports: [ButtonComponent],\n})\nexport class ButtonModule {}\n","<aside\n  class=\"tw-mb-4 tw-box-border tw-rounded-lg tw-border tw-border-l-4 tw-border-solid tw-bg-background tw-pl-3 tw-pr-2 tw-py-2 tw-leading-5 tw-text-main\"\n  [ngClass]=\"calloutClass\"\n  [attr.aria-labelledby]=\"titleId\"\n>\n  <header id=\"{{ titleId }}\" class=\"tw-mb-1 tw-mt-0 tw-text-base tw-font-semibold\" *ngIf=\"title\">\n    <i class=\"bwi\" [ngClass]=\"[icon, headerClass]\" *ngIf=\"icon\" aria-hidden=\"true\"></i>\n    {{ title }}\n  </header>\n  <div bitTypography=\"body2\">\n    <ng-content></ng-content>\n  </div>\n</aside>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { SharedModule } from \"../shared\";\nimport { TypographyModule } from \"../typography\";\n\nexport type CalloutTypes = \"success\" | \"info\" | \"warning\" | \"danger\";\n\nconst defaultIcon: Record<CalloutTypes, string> = {\n  success: \"bwi-check\",\n  info: \"bwi-info-circle\",\n  warning: \"bwi-exclamation-triangle\",\n  danger: \"bwi-error\",\n};\n\nconst defaultI18n: Partial<Record<CalloutTypes, string>> = {\n  warning: \"warning\",\n  danger: \"error\",\n};\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-callout\",\n  templateUrl: \"callout.component.html\",\n  standalone: true,\n  imports: [SharedModule, TypographyModule],\n})\nexport class CalloutComponent implements OnInit {\n  @Input() type: CalloutTypes = \"info\";\n  @Input() icon: string;\n  @Input() title: string;\n  @Input() useAlertRole = false;\n  protected titleId = `bit-callout-title-${nextId++}`;\n\n  constructor(private i18nService: I18nService) {}\n\n  ngOnInit() {\n    this.icon ??= defaultIcon[this.type];\n    if (this.title == null && defaultI18n[this.type] != null) {\n      this.title = this.i18nService.t(defaultI18n[this.type]);\n    }\n  }\n\n  get calloutClass() {\n    switch (this.type) {\n      case \"danger\":\n        return \"tw-border-danger-600\";\n      case \"info\":\n        return \"tw-border-info-600\";\n      case \"success\":\n        return \"tw-border-success-600\";\n      case \"warning\":\n        return \"tw-border-warning-600\";\n    }\n  }\n\n  get headerClass() {\n    switch (this.type) {\n      case \"danger\":\n        return \"!tw-text-danger\";\n      case \"info\":\n        return \"!tw-text-info\";\n      case \"success\":\n        return \"!tw-text-success\";\n      case \"warning\":\n        return \"!tw-text-warning\";\n    }\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { CalloutComponent } from \"./callout.component\";\n\n@NgModule({\n  imports: [CalloutComponent],\n  exports: [CalloutComponent],\n})\nexport class CalloutModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { ChangeDetectionStrategy, Component } from \"@angular/core\";\n\n@Component({\n  selector: \"bit-card\",\n  standalone: true,\n  imports: [CommonModule],\n  template: `<ng-content></ng-content>`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    class:\n      \"tw-box-border tw-block tw-bg-background tw-text-main tw-border-solid tw-border-b tw-border-0 tw-border-b-secondary-300 [&:not(bit-layout_*)]:tw-rounded-lg [&:not(bit-layout_*)]:tw-border-b-shadow tw-py-4 bit-compact:tw-py-3 tw-px-3 bit-compact:tw-px-2\",\n  },\n})\nexport class CardComponent {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, HostBinding, Input, Optional, Self } from \"@angular/core\";\nimport { NgControl, Validators } from \"@angular/forms\";\n\nimport { BitFormControlAbstraction } from \"../form-control\";\n\n@Component({\n  selector: \"input[type=checkbox][bitCheckbox]\",\n  template: \"\",\n  providers: [{ provide: BitFormControlAbstraction, useExisting: CheckboxComponent }],\n  standalone: true,\n})\nexport class CheckboxComponent implements BitFormControlAbstraction {\n  @HostBinding(\"class\")\n  protected inputClasses = [\n    \"tw-appearance-none\",\n    \"tw-outline-none\",\n    \"tw-relative\",\n    \"tw-transition\",\n    \"tw-cursor-pointer\",\n    \"tw-inline-block\",\n    \"tw-align-sub\",\n    \"tw-rounded\",\n    \"tw-border\",\n    \"tw-border-solid\",\n    \"tw-border-secondary-500\",\n    \"tw-h-[1.12rem]\",\n    \"tw-w-[1.12rem]\",\n    \"tw-mr-1.5\",\n    \"tw-flex-none\", // Flexbox fix for bit-form-control\n\n    \"before:tw-content-['']\",\n    \"before:tw-block\",\n    \"before:tw-absolute\",\n    \"before:tw-inset-0\",\n\n    \"hover:tw-border-2\",\n    \"[&>label]:tw-border-2\",\n\n    // if it exists, the parent form control handles focus\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-2\",\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-offset-2\",\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-primary-600\",\n\n    \"disabled:tw-cursor-auto\",\n    \"disabled:tw-border\",\n    \"disabled:hover:tw-border\",\n    \"disabled:tw-bg-secondary-100\",\n    \"disabled:hover:tw-bg-secondary-100\",\n\n    \"checked:tw-bg-primary-600\",\n    \"checked:tw-border-primary-600\",\n    \"checked:hover:tw-bg-primary-700\",\n    \"checked:hover:tw-border-primary-700\",\n    \"[&>label:hover]:checked:tw-bg-primary-700\",\n    \"[&>label:hover]:checked:tw-border-primary-700\",\n    \"checked:before:tw-bg-text-contrast\",\n    \"checked:before:tw-mask-position-[center]\",\n    \"checked:before:tw-mask-repeat-[no-repeat]\",\n    \"checked:disabled:tw-border-secondary-100\",\n    \"checked:disabled:hover:tw-border-secondary-100\",\n    \"checked:disabled:tw-bg-secondary-100\",\n    \"checked:disabled:before:tw-bg-text-muted\",\n\n    \"[&:not(:indeterminate)]:checked:before:tw-mask-image-[var(--mask-image)]\",\n    \"indeterminate:before:tw-mask-image-[var(--indeterminate-mask-image)]\",\n\n    \"indeterminate:tw-bg-primary-600\",\n    \"indeterminate:tw-border-primary-600\",\n    \"indeterminate:hover:tw-bg-primary-700\",\n    \"indeterminate:hover:tw-border-primary-700\",\n    \"[&>label:hover]:indeterminate:tw-bg-primary-700\",\n    \"[&>label:hover]:indeterminate:tw-border-primary-700\",\n    \"indeterminate:before:tw-bg-text-contrast\",\n    \"indeterminate:before:tw-mask-position-[center]\",\n    \"indeterminate:before:tw-mask-repeat-[no-repeat]\",\n    \"indeterminate:before:tw-mask-image-[var(--indeterminate-mask-image)]\",\n    \"indeterminate:disabled:tw-border-secondary-100\",\n    \"indeterminate:disabled:tw-bg-secondary-100\",\n    \"indeterminate:disabled:before:tw-bg-text-muted\",\n  ];\n\n  constructor(@Optional() @Self() private ngControl?: NgControl) {}\n\n  @HostBinding(\"style.--mask-image\")\n  protected maskImage =\n    `url('data:image/svg+xml,%3Csvg class=\"svg\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"10\" height=\"10\" viewBox=\"0 0 10 10\"%3E%3Cpath d=\"M0.5 6.2L2.9 8.6L9.5 1.4\" fill=\"none\" stroke=\"white\" stroke-width=\"2\"%3E%3C/path%3E%3C/svg%3E')`;\n\n  @HostBinding(\"style.--indeterminate-mask-image\")\n  protected indeterminateImage =\n    `url('data:image/svg+xml,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" fill=\"none\" viewBox=\"0 0 13 13\"%3E%3Cpath stroke=\"%23fff\" stroke-width=\"2\" d=\"M2.5 6.5h8\"/%3E%3C/svg%3E%0A')`;\n\n  @HostBinding()\n  @Input()\n  get disabled() {\n    return this._disabled ?? this.ngControl?.disabled ?? false;\n  }\n  set disabled(value: any) {\n    this._disabled = value != null && value !== false;\n  }\n  private _disabled: boolean;\n\n  @Input()\n  get required() {\n    return (\n      this._required ?? this.ngControl?.control?.hasValidator(Validators.requiredTrue) ?? false\n    );\n  }\n  set required(value: any) {\n    this._required = value != null && value !== false;\n  }\n  private _required: boolean;\n\n  get hasError() {\n    return this.ngControl?.status === \"INVALID\" && this.ngControl?.touched;\n  }\n\n  get error(): [string, any] {\n    const key = Object.keys(this.ngControl.errors)[0];\n    return [key, this.ngControl.errors[key]];\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { CheckboxComponent } from \"./checkbox.component\";\n\n@NgModule({\n  imports: [CheckboxComponent],\n  exports: [CheckboxComponent],\n})\nexport class CheckboxModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgFor, NgIf } from \"@angular/common\";\nimport { Component, HostBinding, Input } from \"@angular/core\";\n\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nenum CharacterType {\n  Letter,\n  Emoji,\n  Special,\n  Number,\n}\n\n@Component({\n  selector: \"bit-color-password\",\n  template: `<span\n    *ngFor=\"let character of passwordArray; index as i\"\n    [class]=\"getCharacterClass(character)\"\n  >\n    <span>{{ character }}</span>\n    <span *ngIf=\"showCount\" class=\"tw-whitespace-nowrap tw-text-xs tw-leading-5 tw-text-main\">{{\n      i + 1\n    }}</span>\n  </span>`,\n  preserveWhitespaces: false,\n  standalone: true,\n  imports: [NgFor, NgIf],\n})\nexport class ColorPasswordComponent {\n  @Input() password: string = null;\n  @Input() showCount = false;\n\n  characterStyles: Record<CharacterType, string[]> = {\n    [CharacterType.Emoji]: [],\n    [CharacterType.Letter]: [\"tw-text-main\"],\n    [CharacterType.Special]: [\"tw-text-danger\"],\n    [CharacterType.Number]: [\"tw-text-primary-600\"],\n  };\n\n  @HostBinding(\"class\")\n  get classList() {\n    return [\"tw-min-w-0\", \"tw-whitespace-pre-wrap\", \"tw-break-all\"];\n  }\n\n  get passwordArray() {\n    // Convert to an array to handle cases that strings have special characters, i.e.: emoji.\n    return Array.from(this.password);\n  }\n\n  getCharacterClass(character: string) {\n    const charType = this.getCharacterType(character);\n    const charClass = this.characterStyles[charType];\n\n    if (this.showCount) {\n      return charClass.concat([\n        \"tw-inline-flex\",\n        \"tw-flex-col\",\n        \"tw-items-center\",\n        \"tw-w-7\",\n        \"tw-py-1\",\n        \"odd:tw-bg-secondary-100\",\n        \"even:tw-bg-background\",\n      ]);\n    }\n\n    return charClass;\n  }\n\n  private getCharacterType(character: string): CharacterType {\n    if (character.match(Utils.regexpEmojiPresentation)) {\n      return CharacterType.Emoji;\n    }\n\n    if (character.match(/\\d/)) {\n      return CharacterType.Number;\n    }\n\n    const specials = [\"&\", \"<\", \">\", \" \"];\n    if (specials.includes(character) || character.match(/[^\\w ]/)) {\n      return CharacterType.Special;\n    }\n\n    return CharacterType.Letter;\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ColorPasswordComponent } from \"./color-password.component\";\n\n@NgModule({\n  imports: [ColorPasswordComponent],\n  exports: [ColorPasswordComponent],\n})\nexport class ColorPasswordModule {}\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\n/**\n * Generic container that constrains page content width.\n */\n@Component({\n  selector: \"bit-container\",\n  templateUrl: \"container.component.html\",\n  imports: [CommonModule],\n  standalone: true,\n})\nexport class ContainerComponent {}\n","<div class=\"tw-max-w-4xl\">\n  <ng-content></ng-content>\n</div>\n","import { style, animate, trigger, transition, group } from \"@angular/animations\";\n\nexport const fadeIn = trigger(\"fadeIn\", [\n  transition(\":enter\", [\n    style({ opacity: 0, transform: \"translateY(-50px)\" }),\n    group([\n      animate(\"0.15s linear\", style({ opacity: 1 })),\n      animate(\"0.3s ease-out\", style({ transform: \"none\" })),\n    ]),\n  ]),\n]);\n","import { DialogModule as CdkDialogModule } from \"@angular/cdk/dialog\";\nimport { NgModule } from \"@angular/core\";\n\nimport { DialogComponent } from \"./dialog/dialog.component\";\nimport { DialogService } from \"./dialog.service\";\nimport { DialogCloseDirective } from \"./directives/dialog-close.directive\";\nimport { IconDirective, SimpleDialogComponent } from \"./simple-dialog/simple-dialog.component\";\n\n@NgModule({\n  imports: [\n    CdkDialogModule,\n    DialogCloseDirective,\n    DialogComponent,\n    SimpleDialogComponent,\n    IconDirective,\n  ],\n  exports: [\n    CdkDialogModule,\n    DialogCloseDirective,\n    DialogComponent,\n    IconDirective,\n    SimpleDialogComponent,\n  ],\n  providers: [DialogService],\n})\nexport class DialogModule {}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"accept\">\n  <bit-simple-dialog>\n    <i bitDialogIcon class=\"bwi tw-text-3xl\" [class]=\"iconClasses\" aria-hidden=\"true\"></i>\n\n    <span bitDialogTitle>{{ title }}</span>\n\n    <div bitDialogContent>{{ content }}</div>\n\n    <ng-container bitDialogFooter>\n      <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\">\n        {{ acceptButtonText }}\n      </button>\n\n      <button\n        *ngIf=\"showCancelButton\"\n        type=\"button\"\n        bitButton\n        bitFormButton\n        buttonType=\"secondary\"\n        (click)=\"dialogRef.close(false)\"\n      >\n        {{ cancelButtonText }}\n      </button>\n    </ng-container>\n  </bit-simple-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DialogRef, DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { NgIf } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormGroup, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { SimpleDialogOptions, SimpleDialogType, Translation } from \"../..\";\nimport { BitSubmitDirective } from \"../../../async-actions/bit-submit.directive\";\nimport { BitFormButtonDirective } from \"../../../async-actions/form-button.directive\";\nimport { ButtonComponent } from \"../../../button/button.component\";\nimport { SimpleDialogComponent, IconDirective } from \"../simple-dialog.component\";\n\nconst DEFAULT_ICON: Record<SimpleDialogType, string> = {\n  primary: \"bwi-business\",\n  success: \"bwi-star\",\n  info: \"bwi-info-circle\",\n  warning: \"bwi-exclamation-triangle\",\n  danger: \"bwi-error\",\n};\n\nconst DEFAULT_COLOR: Record<SimpleDialogType, string> = {\n  primary: \"tw-text-primary-600\",\n  success: \"tw-text-success\",\n  info: \"tw-text-info\",\n  warning: \"tw-text-warning\",\n  danger: \"tw-text-danger\",\n};\n\n@Component({\n  templateUrl: \"./simple-configurable-dialog.component.html\",\n  standalone: true,\n  imports: [\n    ReactiveFormsModule,\n    BitSubmitDirective,\n    SimpleDialogComponent,\n    IconDirective,\n    ButtonComponent,\n    BitFormButtonDirective,\n    NgIf,\n  ],\n})\nexport class SimpleConfigurableDialogComponent {\n  get iconClasses() {\n    return [\n      this.simpleDialogOpts.icon ?? DEFAULT_ICON[this.simpleDialogOpts.type],\n      DEFAULT_COLOR[this.simpleDialogOpts.type],\n    ];\n  }\n\n  protected title: string;\n  protected content: string;\n  protected acceptButtonText: string;\n  protected cancelButtonText: string;\n  protected formGroup = new FormGroup({});\n\n  protected showCancelButton = this.simpleDialogOpts.cancelButtonText !== null;\n\n  constructor(\n    public dialogRef: DialogRef,\n    private i18nService: I18nService,\n    @Inject(DIALOG_DATA) public simpleDialogOpts?: SimpleDialogOptions,\n  ) {\n    this.localizeText();\n  }\n\n  protected accept = async () => {\n    if (this.simpleDialogOpts.acceptAction) {\n      await this.simpleDialogOpts.acceptAction();\n    }\n\n    this.dialogRef.close(true);\n  };\n\n  private localizeText() {\n    this.title = this.translate(this.simpleDialogOpts.title);\n    this.content = this.translate(this.simpleDialogOpts.content);\n    this.acceptButtonText = this.translate(this.simpleDialogOpts.acceptButtonText, \"yes\");\n\n    if (this.showCancelButton) {\n      // If accept text is overridden, use cancel, otherwise no\n      this.cancelButtonText = this.translate(\n        this.simpleDialogOpts.cancelButtonText,\n        this.simpleDialogOpts.acceptButtonText !== undefined ? \"cancel\" : \"no\",\n      );\n    }\n  }\n\n  private translate(translation: string | Translation, defaultKey?: string): string {\n    // Translation interface use implies we must localize.\n    if (typeof translation === \"object\") {\n      return this.i18nService.t(translation.key, ...(translation.placeholders ?? []));\n    }\n\n    // Use string that is already translated or use default key post translate\n    return translation ?? this.i18nService.t(defaultKey);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  DEFAULT_DIALOG_CONFIG,\n  Dialog,\n  DialogConfig,\n  DialogRef,\n  DIALOG_SCROLL_STRATEGY,\n} from \"@angular/cdk/dialog\";\nimport { ComponentType, Overlay, OverlayContainer, ScrollStrategy } from \"@angular/cdk/overlay\";\nimport {\n  Inject,\n  Injectable,\n  Injector,\n  OnDestroy,\n  Optional,\n  SkipSelf,\n  TemplateRef,\n} from \"@angular/core\";\nimport { NavigationEnd, Router } from \"@angular/router\";\nimport { filter, firstValueFrom, Subject, switchMap, takeUntil } from \"rxjs\";\n\nimport { AuthService } from \"@bitwarden/common/auth/abstractions/auth.service\";\nimport { AuthenticationStatus } from \"@bitwarden/common/auth/enums/authentication-status\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { SimpleConfigurableDialogComponent } from \"./simple-dialog/simple-configurable-dialog/simple-configurable-dialog.component\";\nimport { SimpleDialogOptions, Translation } from \"./simple-dialog/types\";\n\n/**\n * The default `BlockScrollStrategy` does not work well with virtual scrolling.\n *\n * https://github.com/angular/components/issues/7390\n */\nclass CustomBlockScrollStrategy implements ScrollStrategy {\n  enable() {\n    document.body.classList.add(\"tw-overflow-hidden\");\n  }\n\n  disable() {\n    document.body.classList.remove(\"tw-overflow-hidden\");\n  }\n\n  /** Noop */\n  attach() {}\n\n  /** Noop */\n  detach() {}\n}\n\n@Injectable()\nexport class DialogService extends Dialog implements OnDestroy {\n  private _destroy$ = new Subject<void>();\n\n  private backDropClasses = [\"tw-fixed\", \"tw-bg-black\", \"tw-bg-opacity-30\", \"tw-inset-0\"];\n\n  private defaultScrollStrategy = new CustomBlockScrollStrategy();\n\n  constructor(\n    /** Parent class constructor */\n    _overlay: Overlay,\n    _injector: Injector,\n    @Optional() @Inject(DEFAULT_DIALOG_CONFIG) _defaultOptions: DialogConfig,\n    @Optional() @SkipSelf() _parentDialog: Dialog,\n    _overlayContainer: OverlayContainer,\n    @Inject(DIALOG_SCROLL_STRATEGY) scrollStrategy: any,\n\n    /** Not in parent class */\n    @Optional() router: Router,\n    @Optional() authService: AuthService,\n\n    protected i18nService: I18nService,\n  ) {\n    super(_overlay, _injector, _defaultOptions, _parentDialog, _overlayContainer, scrollStrategy);\n\n    /** Close all open dialogs if the vault locks */\n    if (router && authService) {\n      router.events\n        .pipe(\n          filter((event) => event instanceof NavigationEnd),\n          switchMap(() => authService.getAuthStatus()),\n          filter((v) => v !== AuthenticationStatus.Unlocked),\n          takeUntil(this._destroy$),\n        )\n        .subscribe(() => this.closeAll());\n    }\n  }\n\n  override ngOnDestroy(): void {\n    this._destroy$.next();\n    this._destroy$.complete();\n    super.ngOnDestroy();\n  }\n\n  override open<R = unknown, D = unknown, C = unknown>(\n    componentOrTemplateRef: ComponentType<C> | TemplateRef<C>,\n    config?: DialogConfig<D, DialogRef<R, C>>,\n  ): DialogRef<R, C> {\n    config = {\n      backdropClass: this.backDropClasses,\n      scrollStrategy: this.defaultScrollStrategy,\n      ...config,\n    };\n\n    return super.open(componentOrTemplateRef, config);\n  }\n\n  /**\n   * Opens a simple dialog, returns true if the user accepted the dialog.\n   *\n   * @param {SimpleDialogOptions} simpleDialogOptions - An object containing options for the dialog.\n   * @returns `boolean` - True if the user accepted the dialog, false otherwise.\n   */\n  async openSimpleDialog(simpleDialogOptions: SimpleDialogOptions): Promise<boolean> {\n    const dialogRef = this.openSimpleDialogRef(simpleDialogOptions);\n\n    return firstValueFrom(dialogRef.closed);\n  }\n\n  /**\n   * Opens a simple dialog.\n   *\n   * You should probably use `openSimpleDialog` instead, unless you need to programmatically close the dialog.\n   *\n   * @param {SimpleDialogOptions} simpleDialogOptions - An object containing options for the dialog.\n   * @returns `DialogRef` - The reference to the opened dialog.\n   * Contains a closed observable which can be subscribed to for determining which button\n   * a user pressed\n   */\n  openSimpleDialogRef(simpleDialogOptions: SimpleDialogOptions): DialogRef<boolean> {\n    return this.open<boolean, SimpleDialogOptions>(SimpleConfigurableDialogComponent, {\n      data: simpleDialogOptions,\n      disableClose: simpleDialogOptions.disableClose,\n    });\n  }\n\n  protected translate(translation: string | Translation, defaultKey?: string): string {\n    if (translation == null && defaultKey == null) {\n      return null;\n    }\n\n    if (translation == null) {\n      return this.i18nService.t(defaultKey);\n    }\n\n    // Translation interface use implies we must localize.\n    if (typeof translation === \"object\") {\n      return this.i18nService.t(translation.key, ...(translation.placeholders ?? []));\n    }\n\n    return translation;\n  }\n}\n","<section\n  class=\"tw-flex tw-w-full tw-flex-col tw-self-center tw-overflow-hidden tw-rounded-xl tw-border tw-border-solid tw-border-secondary-300 tw-bg-background tw-text-main\"\n  [ngClass]=\"width\"\n  @fadeIn\n>\n  <header\n    class=\"tw-flex tw-justify-between tw-items-center tw-gap-4 tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300 tw-p-4\"\n  >\n    <h1\n      bitDialogTitleContainer\n      bitTypography=\"h3\"\n      noMargin\n      class=\"tw-text-main tw-mb-0 tw-truncate\"\n    >\n      {{ title }}\n      <span *ngIf=\"subtitle\" class=\"tw-text-muted tw-font-normal tw-text-sm\">\n        {{ subtitle }}\n      </span>\n      <ng-content select=\"[bitDialogTitle]\"></ng-content>\n    </h1>\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-close\"\n      buttonType=\"main\"\n      size=\"default\"\n      bitDialogClose\n      [attr.title]=\"'close' | i18n\"\n      [attr.aria-label]=\"'close' | i18n\"\n    ></button>\n  </header>\n\n  <div\n    class=\"tw-relative tw-flex tw-flex-col tw-overflow-hidden\"\n    [ngClass]=\"{\n      'tw-min-h-60': loading,\n    }\"\n  >\n    <div\n      *ngIf=\"loading\"\n      class=\"tw-absolute tw-flex tw-h-full tw-w-full tw-items-center tw-justify-center\"\n    >\n      <i class=\"bwi bwi-spinner bwi-spin bwi-lg\" [attr.aria-label]=\"'loading' | i18n\"></i>\n    </div>\n    <div\n      [ngClass]=\"{\n        'tw-p-4': !disablePadding,\n        'tw-overflow-y-auto': !loading,\n        'tw-invisible tw-overflow-y-hidden': loading,\n        'tw-bg-background': background === 'default',\n        'tw-bg-background-alt': background === 'alt',\n      }\"\n    >\n      <ng-content select=\"[bitDialogContent]\"></ng-content>\n    </div>\n  </div>\n\n  <footer\n    class=\"tw-flex tw-flex-row tw-items-center tw-gap-2 tw-border-0 tw-border-t tw-border-solid tw-border-secondary-300 tw-bg-background tw-p-4\"\n  >\n    <ng-content select=\"[bitDialogFooter]\"></ng-content>\n  </footer>\n</section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, HostBinding, Input } from \"@angular/core\";\n\nimport { BitIconButtonComponent } from \"../../icon-button/icon-button.component\";\nimport { I18nPipe } from \"../../shared/i18n.pipe\";\nimport { TypographyDirective } from \"../../typography/typography.directive\";\nimport { fadeIn } from \"../animations\";\nimport { DialogCloseDirective } from \"../directives/dialog-close.directive\";\nimport { DialogTitleContainerDirective } from \"../directives/dialog-title-container.directive\";\n\n@Component({\n  selector: \"bit-dialog\",\n  templateUrl: \"./dialog.component.html\",\n  animations: [fadeIn],\n  standalone: true,\n  imports: [\n    CommonModule,\n    DialogTitleContainerDirective,\n    TypographyDirective,\n    BitIconButtonComponent,\n    DialogCloseDirective,\n    I18nPipe,\n  ],\n})\nexport class DialogComponent {\n  /** Background color */\n  @Input()\n  background: \"default\" | \"alt\" = \"default\";\n\n  /**\n   * Dialog size, more complex dialogs should use large, otherwise default is fine.\n   */\n  @Input() dialogSize: \"small\" | \"default\" | \"large\" = \"default\";\n\n  /**\n   * Title to show in the dialog's header\n   */\n  @Input() title: string;\n\n  /**\n   * Subtitle to show in the dialog's header\n   */\n  @Input() subtitle: string;\n\n  private _disablePadding = false;\n  /**\n   * Disable the built-in padding on the dialog, for use with tabbed dialogs.\n   */\n  @Input() set disablePadding(value: boolean | \"\") {\n    this._disablePadding = coerceBooleanProperty(value);\n  }\n  get disablePadding() {\n    return this._disablePadding;\n  }\n\n  /**\n   * Mark the dialog as loading which replaces the content with a spinner.\n   */\n  @Input() loading = false;\n\n  @HostBinding(\"class\") get classes() {\n    return [\"tw-flex\", \"tw-flex-col\", \"tw-max-h-screen\", \"tw-w-screen\", \"tw-p-4\"].concat(\n      this.width,\n    );\n  }\n\n  get width() {\n    switch (this.dialogSize) {\n      case \"small\": {\n        return \"tw-max-w-sm\";\n      }\n      case \"large\": {\n        return \"tw-max-w-3xl\";\n      }\n      default: {\n        return \"tw-max-w-xl\";\n      }\n    }\n  }\n}\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Directive, HostBinding, HostListener, Input, Optional } from \"@angular/core\";\n\n@Directive({\n  selector: \"[bitDialogClose]\",\n  standalone: true,\n})\nexport class DialogCloseDirective {\n  @Input(\"bitDialogClose\") dialogResult: any;\n\n  constructor(@Optional() public dialogRef: DialogRef) {}\n\n  @HostBinding(\"attr.disabled\")\n  get disableClose() {\n    return this.dialogRef?.disableClose ? true : null;\n  }\n\n  @HostListener(\"click\")\n  close(): void {\n    if (this.disableClose) {\n      return;\n    }\n\n    this.dialogRef.close(this.dialogResult);\n  }\n}\n","import { CdkDialogContainer, DialogRef } from \"@angular/cdk/dialog\";\nimport { Directive, HostBinding, Input, OnInit, Optional } from \"@angular/core\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Directive({\n  selector: \"[bitDialogTitleContainer]\",\n  standalone: true,\n})\nexport class DialogTitleContainerDirective implements OnInit {\n  @HostBinding(\"id\") id = `bit-dialog-title-${nextId++}`;\n\n  @Input() simple = false;\n\n  constructor(@Optional() private dialogRef: DialogRef<any>) {}\n\n  ngOnInit(): void {\n    // Based on angular/components, licensed under MIT\n    // https://github.com/angular/components/blob/14.2.0/src/material/dialog/dialog-content-directives.ts#L121-L128\n    if (this.dialogRef) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      Promise.resolve().then(() => {\n        const container = this.dialogRef.containerInstance as CdkDialogContainer;\n\n        if (container && container._ariaLabelledByQueue.length === 0) {\n          container._ariaLabelledByQueue.push(this.id);\n        }\n      });\n    }\n  }\n}\n","<div\n  class=\"tw-my-4 tw-flex tw-max-h-screen tw-w-96 tw-max-w-90vw tw-flex-col tw-overflow-hidden tw-rounded-3xl tw-border tw-border-solid tw-border-secondary-300 tw-bg-text-contrast tw-text-main\"\n  @fadeIn\n>\n  <div class=\"tw-flex tw-flex-col tw-items-center tw-gap-2 tw-px-4 tw-pt-4 tw-text-center\">\n    <ng-container *ngIf=\"hasIcon; else elseBlock\">\n      <ng-content select=\"[bitDialogIcon]\"></ng-content>\n    </ng-container>\n    <ng-template #elseBlock>\n      <i class=\"bwi bwi-exclamation-triangle tw-text-3xl tw-text-warning\" aria-hidden=\"true\"></i>\n    </ng-template>\n    <h1\n      bitDialogTitleContainer\n      bitTypography=\"h3\"\n      noMargin\n      class=\"tw-w-full tw-text-main tw-break-words tw-hyphens-auto\"\n    >\n      <ng-content select=\"[bitDialogTitle]\"></ng-content>\n    </h1>\n  </div>\n  <div\n    class=\"tw-overflow-y-auto tw-px-4 tw-pb-4 tw-text-center tw-text-base tw-break-words tw-hyphens-auto\"\n  >\n    <ng-content select=\"[bitDialogContent]\"></ng-content>\n  </div>\n  <div\n    class=\"tw-flex tw-flex-row tw-gap-2 tw-border-0 tw-border-t tw-border-solid tw-border-secondary-300 tw-p-4\"\n  >\n    <ng-content select=\"[bitDialogFooter]\"></ng-content>\n  </div>\n</div>\n","import { NgIf } from \"@angular/common\";\nimport { Component, ContentChild, Directive } from \"@angular/core\";\n\nimport { TypographyDirective } from \"../../typography/typography.directive\";\nimport { fadeIn } from \"../animations\";\nimport { DialogTitleContainerDirective } from \"../directives/dialog-title-container.directive\";\n\n@Directive({\n  selector: \"[bitDialogIcon]\",\n  standalone: true,\n})\nexport class IconDirective {}\n\n@Component({\n  selector: \"bit-simple-dialog\",\n  templateUrl: \"./simple-dialog.component.html\",\n  animations: [fadeIn],\n  standalone: true,\n  imports: [NgIf, DialogTitleContainerDirective, TypographyDirective],\n})\nexport class SimpleDialogComponent {\n  @ContentChild(IconDirective) icon!: IconDirective;\n\n  get hasIcon() {\n    return this.icon != null;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport abstract class BitFormControlAbstraction {\n  disabled: boolean;\n  required: boolean;\n  hasError: boolean;\n  error: [string, any];\n}\n","<label\n  class=\"tw-transition tw-select-none tw-mb-0 tw-inline-flex tw-rounded tw-p-0.5 has-[:focus-visible]:tw-ring has-[:focus-visible]:tw-ring-primary-600\"\n  [ngClass]=\"[formControl.disabled ? 'tw-cursor-auto' : 'tw-cursor-pointer']\"\n>\n  <ng-content></ng-content>\n  <span\n    class=\"tw-inline-flex tw-flex-col\"\n    [ngClass]=\"formControl.disabled ? 'tw-text-muted' : 'tw-text-main'\"\n  >\n    <span bitTypography=\"body2\">\n      <ng-content select=\"bit-label\"></ng-content>\n      <span *ngIf=\"required\" class=\"tw-text-xs tw-font-normal\"> ({{ \"required\" | i18n }})</span>\n    </span>\n    <ng-content select=\"bit-hint\" *ngIf=\"!hasError\"></ng-content>\n  </span>\n</label>\n<div *ngIf=\"hasError\" class=\"tw-mt-1 tw-text-danger tw-text-xs tw-ml-0.5\">\n  <i class=\"bwi bwi-error\"></i> {{ displayError }}\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { NgClass, NgIf } from \"@angular/common\";\nimport { Component, ContentChild, HostBinding, Input } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { I18nPipe } from \"../shared/i18n.pipe\";\nimport { TypographyDirective } from \"../typography/typography.directive\";\n\nimport { BitFormControlAbstraction } from \"./form-control.abstraction\";\n\n@Component({\n  selector: \"bit-form-control\",\n  templateUrl: \"form-control.component.html\",\n  standalone: true,\n  imports: [NgClass, TypographyDirective, NgIf, I18nPipe],\n})\nexport class FormControlComponent {\n  @Input() label: string;\n\n  private _inline = false;\n  @Input() get inline() {\n    return this._inline;\n  }\n  set inline(value: boolean | \"\") {\n    this._inline = coerceBooleanProperty(value);\n  }\n\n  private _disableMargin = false;\n  @Input() set disableMargin(value: boolean | \"\") {\n    this._disableMargin = coerceBooleanProperty(value);\n  }\n  get disableMargin() {\n    return this._disableMargin;\n  }\n\n  @ContentChild(BitFormControlAbstraction) protected formControl: BitFormControlAbstraction;\n\n  @HostBinding(\"class\") get classes() {\n    return []\n      .concat(this.inline ? [\"tw-inline-block\", \"tw-mr-4\"] : [\"tw-block\"])\n      .concat(this.disableMargin ? [] : [\"tw-mb-4\"]);\n  }\n\n  constructor(private i18nService: I18nService) {}\n\n  get required() {\n    return this.formControl.required;\n  }\n\n  get hasError() {\n    return this.formControl.hasError;\n  }\n\n  get error() {\n    return this.formControl.error;\n  }\n\n  get displayError() {\n    switch (this.error[0]) {\n      case \"required\":\n        return this.i18nService.t(\"inputRequired\");\n      default:\n        // Attempt to show a custom error message.\n        if (this.error[1]?.message) {\n          return this.error[1]?.message;\n        }\n\n        return this.error;\n    }\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { FormControlComponent } from \"./form-control.component\";\nimport { BitHintComponent } from \"./hint.component\";\nimport { BitLabel } from \"./label.component\";\n\n@NgModule({\n  imports: [BitLabel, FormControlComponent, BitHintComponent],\n  exports: [FormControlComponent, BitLabel, BitHintComponent],\n})\nexport class FormControlModule {}\n","import { Directive, HostBinding } from \"@angular/core\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Directive({\n  selector: \"bit-hint\",\n  host: {\n    class: \"tw-text-muted tw-font-normal tw-inline-block tw-mt-1 tw-text-xs\",\n  },\n  standalone: true,\n})\nexport class BitHintComponent {\n  @HostBinding() id = `bit-hint-${nextId++}`;\n}\n","<ng-template #endSlotContent>\n  <ng-content select=\"[slot=end]\"></ng-content>\n</ng-template>\n\n<!-- labels inside a form control (checkbox, radio button) should not truncate -->\n<span [ngClass]=\"{ 'tw-truncate': !isInsideFormControl }\">\n  <ng-content></ng-content>\n  <ng-container *ngIf=\"isInsideFormControl\">\n    <ng-container *ngTemplateOutlet=\"endSlotContent\"></ng-container>\n  </ng-container>\n</span>\n<ng-container *ngIf=\"!isInsideFormControl\">\n  <ng-container *ngTemplateOutlet=\"endSlotContent\"></ng-container>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, ElementRef, HostBinding, Input, Optional } from \"@angular/core\";\n\nimport { FormControlComponent } from \"./form-control.component\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-label\",\n  standalone: true,\n  templateUrl: \"label.component.html\",\n  imports: [CommonModule],\n})\nexport class BitLabel {\n  constructor(\n    private elementRef: ElementRef<HTMLInputElement>,\n    @Optional() private parentFormControl: FormControlComponent,\n  ) {}\n\n  @HostBinding(\"class\") @Input() get classList() {\n    return [\"tw-inline-flex\", \"tw-gap-1\", \"tw-items-baseline\", \"tw-flex-row\", \"tw-min-w-0\"];\n  }\n\n  @HostBinding(\"title\") get title() {\n    return this.elementRef.nativeElement.textContent.trim();\n  }\n\n  @HostBinding() @Input() id = `bit-label-${nextId++}`;\n\n  get isInsideFormControl() {\n    return !!this.parentFormControl;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { AbstractControl, UntypedFormGroup } from \"@angular/forms\";\n\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\n@Component({\n  selector: \"bit-error-summary\",\n  template: ` <ng-container *ngIf=\"errorCount > 0\">\n    <i class=\"bwi bwi-error\"></i> {{ \"fieldsNeedAttention\" | i18n: errorString }}\n  </ng-container>`,\n  host: {\n    class: \"tw-block tw-text-danger tw-mt-2\",\n    \"aria-live\": \"assertive\",\n  },\n  standalone: true,\n  imports: [NgIf, I18nPipe],\n})\nexport class BitErrorSummary {\n  @Input()\n  formGroup: UntypedFormGroup;\n\n  get errorCount(): number {\n    return this.getErrorCount(this.formGroup);\n  }\n\n  get errorString() {\n    return this.errorCount.toString();\n  }\n\n  private getErrorCount(form: UntypedFormGroup): number {\n    return Object.values(form.controls).reduce((acc: number, control: AbstractControl) => {\n      if (control instanceof UntypedFormGroup) {\n        return acc + this.getErrorCount(control);\n      }\n\n      if (control.errors == null) {\n        return acc;\n      }\n\n      if (!control.dirty && control.untouched) {\n        return acc;\n      }\n\n      return acc + Object.keys(control.errors).length;\n    }, 0);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport type InputTypes =\n  | \"text\"\n  | \"password\"\n  | \"number\"\n  | \"datetime-local\"\n  | \"email\"\n  | \"checkbox\"\n  | \"search\"\n  | \"file\"\n  | \"date\"\n  | \"time\";\n\nexport abstract class BitFormFieldControl {\n  ariaDescribedBy: string;\n  id: string;\n  labelForId: string;\n  required: boolean;\n  hasError: boolean;\n  error: [string, any];\n  type?: InputTypes;\n  spellcheck?: boolean;\n  readOnly?: boolean;\n  focus?: () => void;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, HostBinding, Input } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-error\",\n  template: `<i class=\"bwi bwi-error\"></i> {{ displayError }}`,\n  host: {\n    class: \"tw-block tw-mt-1 tw-text-danger tw-text-xs\",\n    \"aria-live\": \"assertive\",\n  },\n  standalone: true,\n})\nexport class BitErrorComponent {\n  @HostBinding() id = `bit-error-${nextId++}`;\n\n  @Input() error: [string, any];\n\n  constructor(private i18nService: I18nService) {}\n\n  get displayError() {\n    switch (this.error[0]) {\n      case \"required\":\n        return this.i18nService.t(\"inputRequired\");\n      case \"email\":\n        return this.i18nService.t(\"inputEmail\");\n      case \"minlength\":\n        return this.i18nService.t(\"inputMinLength\", this.error[1]?.requiredLength);\n      case \"maxlength\":\n        return this.i18nService.t(\"inputMaxLength\", this.error[1]?.requiredLength);\n      case \"min\":\n        return this.i18nService.t(\"inputMinValue\", this.error[1]?.min);\n      case \"max\":\n        return this.i18nService.t(\"inputMaxValue\", this.error[1]?.max);\n      case \"forbiddenCharacters\":\n        return this.i18nService.t(\"inputForbiddenCharacters\", this.error[1]?.characters.join(\", \"));\n      case \"multipleEmails\":\n        return this.i18nService.t(\"multipleInputEmails\");\n      case \"trim\":\n        return this.i18nService.t(\"inputTrimValidator\");\n      default:\n        // Attempt to show a custom error message.\n        if (this.error[1]?.message) {\n          return this.error[1]?.message;\n        }\n\n        return this.error;\n    }\n  }\n}\n","<!-- We need to use templates since the content slots are repeated between the readonly and read-write views. -->\n<ng-template #defaultContent>\n  <ng-content></ng-content>\n</ng-template>\n\n<ng-template #labelContent>\n  <ng-content select=\"bit-label\"></ng-content>\n</ng-template>\n\n<ng-template #prefixContent>\n  <ng-content select=\"[bitPrefix]\"></ng-content>\n</ng-template>\n\n<ng-template #suffixContent>\n  <ng-content select=\"[bitSuffix]\"></ng-content>\n</ng-template>\n\n<div *ngIf=\"!readOnly; else readOnlyView\" class=\"tw-w-full tw-relative tw-group/bit-form-field\">\n  <div class=\"tw-absolute tw-w-full tw-h-full tw-top-0 tw-pointer-events-none tw-z-20\">\n    <div class=\"tw-w-full tw-h-full tw-flex\">\n      <div\n        class=\"tw-min-w-3 tw-border-r-0 group-focus-within/bit-form-field:tw-border-r-0 !tw-rounded-l-lg\"\n        [ngClass]=\"inputBorderClasses\"\n      ></div>\n      <div\n        class=\"tw-px-1 tw-shrink tw-min-w-0 tw-mt-px tw-border-x-0 tw-border-t-0 group-focus-within/bit-form-field:tw-border-x-0 group-focus-within/bit-form-field:tw-border-t-0 tw-hidden group-has-[bit-label]/bit-form-field:tw-block\"\n        [ngClass]=\"inputBorderClasses\"\n      >\n        <label\n          class=\"tw-flex tw-gap-1 tw-text-sm tw-text-muted -tw-translate-y-[0.675rem] tw-mb-0 tw-max-w-full tw-pointer-events-auto\"\n          [attr.for]=\"input.labelForId\"\n        >\n          <ng-container *ngTemplateOutlet=\"labelContent\"></ng-container>\n          <span *ngIf=\"input.required\" class=\"tw-text-[0.625rem] tw-relative tw-bottom-[-1px]\">\n            ({{ \"required\" | i18n }})</span\n          >\n        </label>\n      </div>\n      <div\n        class=\"tw-min-w-3 tw-grow tw-border-l-0 group-focus-within/bit-form-field:tw-border-l-0 !tw-rounded-r-lg\"\n        [ngClass]=\"inputBorderClasses\"\n      ></div>\n    </div>\n  </div>\n  <div\n    class=\"tw-gap-1 tw-bg-background tw-rounded-lg tw-flex tw-min-h-11 [&:not(:has(button:enabled)):has(input:read-only)]:tw-bg-secondary-100 [&:not(:has(button:enabled)):has(textarea:read-only)]:tw-bg-secondary-100\"\n  >\n    <div\n      #prefixContainer\n      class=\"tw-flex tw-items-center tw-gap-1 tw-pl-3 tw-py-2\"\n      [hidden]=\"!prefixHasChildren()\"\n    >\n      <ng-container *ngTemplateOutlet=\"prefixContent\"></ng-container>\n    </div>\n    <div\n      class=\"default-content tw-w-full tw-relative tw-py-2 has-[bit-select]:tw-p-0 has-[bit-multi-select]:tw-p-0 has-[input:read-only:not([hidden])]:tw-bg-secondary-100 has-[textarea:read-only:not([hidden])]:tw-bg-secondary-100\"\n      [ngClass]=\"[\n        prefixHasChildren() ? '' : 'tw-rounded-l-lg tw-pl-3',\n        suffixHasChildren() ? '' : 'tw-rounded-r-lg tw-pr-3',\n      ]\"\n    >\n      <ng-container *ngTemplateOutlet=\"defaultContent\"></ng-container>\n    </div>\n    <div\n      #suffixContainer\n      class=\"tw-flex tw-items-center tw-gap-1 tw-pr-3 tw-py-2\"\n      [hidden]=\"!suffixHasChildren()\"\n    >\n      <ng-container *ngTemplateOutlet=\"suffixContent\"></ng-container>\n    </div>\n  </div>\n</div>\n\n<ng-template #readOnlyView>\n  <div class=\"tw-w-full tw-relative\">\n    <label\n      class=\"tw-flex tw-gap-1 tw-text-sm tw-text-muted tw-mb-0 tw-max-w-full\"\n      [attr.for]=\"input.labelForId\"\n    >\n      <ng-container *ngTemplateOutlet=\"labelContent\"></ng-container>\n    </label>\n    <div\n      class=\"tw-gap-1 tw-flex tw-min-h-[1.85rem] tw-border-0 tw-border-solid\"\n      [ngClass]=\"{\n        'tw-border-secondary-300/50 tw-border-b tw-pb-[2px]': !disableReadOnlyBorder,\n        'tw-border-transparent tw-pb-[3px]': disableReadOnlyBorder,\n      }\"\n    >\n      <div\n        #prefixContainer\n        [hidden]=\"!prefixHasChildren()\"\n        class=\"tw-flex tw-items-center tw-gap-1 tw-pl-1\"\n      >\n        <ng-container *ngTemplateOutlet=\"prefixContent\"></ng-container>\n      </div>\n      <div\n        class=\"default-content tw-w-full tw-pb-0 tw-relative [&>*]:tw-p-0 [&>*::selection]:tw-bg-primary-700 [&>*::selection]:tw-text-contrast\"\n      >\n        <ng-container *ngTemplateOutlet=\"defaultContent\"></ng-container>\n      </div>\n      <div\n        #suffixContainer\n        [hidden]=\"!suffixHasChildren()\"\n        class=\"tw-flex tw-items-center tw-gap-1 tw-pr-1\"\n      >\n        <ng-container *ngTemplateOutlet=\"suffixContent\"></ng-container>\n      </div>\n    </div>\n  </div>\n</ng-template>\n\n<ng-container [ngSwitch]=\"input.hasError\">\n  <ng-content select=\"bit-hint\" *ngSwitchCase=\"false\"></ng-content>\n  <bit-error [error]=\"input.error\" *ngSwitchCase=\"true\"></bit-error>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  booleanAttribute,\n  Component,\n  ContentChild,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  Input,\n  ViewChild,\n  signal,\n} from \"@angular/core\";\n\nimport { BitHintComponent } from \"../form-control/hint.component\";\nimport { BitLabel } from \"../form-control/label.component\";\nimport { inputBorderClasses } from \"../input/input.directive\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nimport { BitErrorComponent } from \"./error.component\";\nimport { BitFormFieldControl } from \"./form-field-control\";\n\n@Component({\n  selector: \"bit-form-field\",\n  templateUrl: \"./form-field.component.html\",\n  standalone: true,\n  imports: [CommonModule, BitErrorComponent, I18nPipe],\n})\nexport class BitFormFieldComponent implements AfterContentChecked {\n  @ContentChild(BitFormFieldControl) input: BitFormFieldControl;\n  @ContentChild(BitHintComponent) hint: BitHintComponent;\n  @ContentChild(BitLabel) label: BitLabel;\n\n  @ViewChild(\"prefixContainer\") prefixContainer: ElementRef<HTMLDivElement>;\n  @ViewChild(\"suffixContainer\") suffixContainer: ElementRef<HTMLDivElement>;\n\n  @ViewChild(BitErrorComponent) error: BitErrorComponent;\n\n  @Input({ transform: booleanAttribute })\n  disableMargin = false;\n\n  /** If `true`, remove the bottom border for `readonly` inputs */\n  @Input({ transform: booleanAttribute })\n  disableReadOnlyBorder = false;\n\n  protected prefixHasChildren = signal(false);\n  protected suffixHasChildren = signal(false);\n\n  get inputBorderClasses(): string {\n    const shouldFocusBorderAppear = this.defaultContentIsFocused();\n\n    const groupClasses = [\n      this.input.hasError\n        ? \"group-hover/bit-form-field:tw-border-danger-700\"\n        : \"group-hover/bit-form-field:tw-border-primary-600\",\n      // the next 2 selectors override the above hover selectors when the input (or text area) is non-interactive (i.e. readonly, disabled)\n      \"group-has-[input:read-only]/bit-form-field:group-hover/bit-form-field:tw-border-secondary-500\",\n      \"group-has-[textarea:read-only]/bit-form-field:group-hover/bit-form-field:tw-border-secondary-500\",\n      \"group-focus-within/bit-form-field:tw-outline-none\",\n      shouldFocusBorderAppear ? \"group-focus-within/bit-form-field:tw-border-2\" : \"\",\n      shouldFocusBorderAppear ? \"group-focus-within/bit-form-field:tw-border-primary-600\" : \"\",\n      shouldFocusBorderAppear\n        ? \"group-focus-within/bit-form-field:group-hover/bit-form-field:tw-border-primary-600\"\n        : \"\",\n    ];\n\n    const baseInputBorderClasses = inputBorderClasses(this.input.hasError);\n\n    const borderClasses = baseInputBorderClasses.concat(groupClasses);\n\n    return borderClasses.join(\" \");\n  }\n\n  @HostBinding(\"class\")\n  get classList() {\n    return [\"tw-block\"]\n      .concat(this.disableMargin ? [] : [\"tw-mb-4\", \"bit-compact:tw-mb-3\"])\n      .concat(this.readOnly ? [] : \"tw-pt-2\");\n  }\n\n  /**\n   * If the currently focused element is not part of the default content, then we don't want to show focus on the\n   * input field itself.\n   *\n   * This is necessary because the `tw-group/bit-form-field` wraps the input and any prefix/suffix\n   * buttons\n   */\n  protected defaultContentIsFocused = signal(false);\n  @HostListener(\"focusin\", [\"$event.target\"])\n  onFocusIn(target: HTMLElement) {\n    this.defaultContentIsFocused.set(target.matches(\".default-content *:focus-visible\"));\n  }\n  @HostListener(\"focusout\")\n  onFocusOut() {\n    this.defaultContentIsFocused.set(false);\n  }\n\n  protected get readOnly(): boolean {\n    return this.input.readOnly;\n  }\n\n  ngAfterContentChecked(): void {\n    if (this.error) {\n      this.input.ariaDescribedBy = this.error.id;\n    } else if (this.hint) {\n      this.input.ariaDescribedBy = this.hint.id;\n    } else {\n      this.input.ariaDescribedBy = undefined;\n    }\n\n    this.prefixHasChildren.set(this.prefixContainer?.nativeElement.childElementCount > 0);\n    this.suffixHasChildren.set(this.suffixContainer?.nativeElement.childElementCount > 0);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { FormControlModule } from \"../form-control\";\nimport { InputModule } from \"../input/input.module\";\nimport { MultiSelectModule } from \"../multi-select/multi-select.module\";\n\nimport { BitErrorSummary } from \"./error-summary.component\";\nimport { BitErrorComponent } from \"./error.component\";\nimport { BitFormFieldComponent } from \"./form-field.component\";\nimport { BitPasswordInputToggleDirective } from \"./password-input-toggle.directive\";\nimport { BitPrefixDirective } from \"./prefix.directive\";\nimport { BitSuffixDirective } from \"./suffix.directive\";\n\n@NgModule({\n  imports: [\n    FormControlModule,\n    InputModule,\n    MultiSelectModule,\n\n    BitErrorComponent,\n    BitErrorSummary,\n    BitFormFieldComponent,\n    BitPasswordInputToggleDirective,\n    BitPrefixDirective,\n    BitSuffixDirective,\n  ],\n  exports: [\n    FormControlModule,\n    InputModule,\n    MultiSelectModule,\n\n    BitErrorComponent,\n    BitErrorSummary,\n    BitFormFieldComponent,\n    BitPasswordInputToggleDirective,\n    BitPrefixDirective,\n    BitSuffixDirective,\n  ],\n})\nexport class FormFieldModule {}\n","import {\n  AfterContentInit,\n  Directive,\n  EventEmitter,\n  Host,\n  HostBinding,\n  HostListener,\n  Input,\n  OnChanges,\n  Output,\n} from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BitIconButtonComponent } from \"../icon-button/icon-button.component\";\n\nimport { BitFormFieldComponent } from \"./form-field.component\";\n\n@Directive({\n  selector: \"[bitPasswordInputToggle]\",\n  standalone: true,\n})\nexport class BitPasswordInputToggleDirective implements AfterContentInit, OnChanges {\n  /**\n   * Whether the input is toggled to show the password.\n   */\n  @HostBinding(\"attr.aria-pressed\") @Input() toggled = false;\n  @Output() toggledChange = new EventEmitter<boolean>();\n\n  @HostBinding(\"attr.title\") title = this.i18nService.t(\"toggleVisibility\");\n  @HostBinding(\"attr.aria-label\") label = this.i18nService.t(\"toggleVisibility\");\n\n  /**\n   * Click handler to toggle the state of the input type.\n   */\n  @HostListener(\"click\") onClick() {\n    this.toggled = !this.toggled;\n    this.toggledChange.emit(this.toggled);\n\n    this.update();\n  }\n\n  constructor(\n    @Host() private button: BitIconButtonComponent,\n    private formField: BitFormFieldComponent,\n    private i18nService: I18nService,\n  ) {}\n\n  get icon() {\n    return this.toggled ? \"bwi-eye-slash\" : \"bwi-eye\";\n  }\n\n  ngOnChanges(): void {\n    this.update();\n  }\n\n  ngAfterContentInit(): void {\n    if (this.formField.input?.type) {\n      this.toggled = this.formField.input.type !== \"password\";\n    }\n    this.button.icon = this.icon;\n  }\n\n  private update() {\n    this.button.icon = this.icon;\n    if (this.formField.input?.type != null) {\n      this.formField.input.type = this.toggled ? \"text\" : \"password\";\n      this.formField.input.spellcheck = this.toggled ? false : undefined;\n    }\n  }\n}\n","import { Directive, HostBinding, Input, OnInit, Optional } from \"@angular/core\";\n\nimport { BitIconButtonComponent } from \"../icon-button/icon-button.component\";\n\n@Directive({\n  selector: \"[bitPrefix]\",\n  standalone: true,\n})\nexport class BitPrefixDirective implements OnInit {\n  @HostBinding(\"class\") @Input() get classList() {\n    return [\"tw-text-muted\"];\n  }\n\n  constructor(@Optional() private iconButtonComponent: BitIconButtonComponent) {}\n\n  ngOnInit() {\n    if (this.iconButtonComponent) {\n      this.iconButtonComponent.size = \"small\";\n    }\n  }\n}\n","import { Directive, HostBinding, Input, OnInit, Optional } from \"@angular/core\";\n\nimport { BitIconButtonComponent } from \"../icon-button/icon-button.component\";\n\n@Directive({\n  selector: \"[bitSuffix]\",\n  standalone: true,\n})\nexport class BitSuffixDirective implements OnInit {\n  @HostBinding(\"class\") @Input() get classList() {\n    return [\"tw-text-muted\"];\n  }\n\n  constructor(@Optional() private iconButtonComponent: BitIconButtonComponent) {}\n\n  ngOnInit() {\n    if (this.iconButtonComponent) {\n      this.iconButtonComponent.size = \"small\";\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgClass } from \"@angular/common\";\nimport { Component, ElementRef, HostBinding, Input } from \"@angular/core\";\n\nimport { ButtonLikeAbstraction, ButtonType } from \"../shared/button-like.abstraction\";\nimport { FocusableElement } from \"../shared/focusable-element\";\n\nexport type IconButtonType = ButtonType | \"contrast\" | \"main\" | \"muted\" | \"light\";\n\nconst focusRing = [\n  // Workaround for box-shadow with transparent offset issue:\n  // https://github.com/tailwindlabs/tailwindcss/issues/3595\n  // Remove `before:` and use regular `tw-ring` when browser no longer has bug, or better:\n  // switch to `outline` with `outline-offset` when Safari supports border radius on outline.\n  // Using `box-shadow` to create outlines is a hack and as such `outline` should be preferred.\n  \"tw-relative\",\n  \"before:tw-content-['']\",\n  \"before:tw-block\",\n  \"before:tw-absolute\",\n  \"before:-tw-inset-[2px]\",\n  \"before:tw-rounded-lg\",\n  \"before:tw-transition\",\n  \"before:tw-ring-2\",\n  \"before:tw-ring-transparent\",\n  \"focus-visible:tw-z-10\",\n];\n\nconst styles: Record<IconButtonType, string[]> = {\n  contrast: [\n    \"tw-bg-transparent\",\n    \"!tw-text-contrast\",\n    \"tw-border-transparent\",\n    \"hover:tw-bg-transparent-hover\",\n    \"hover:tw-border-text-contrast\",\n    \"focus-visible:before:tw-ring-text-contrast\",\n    \"disabled:tw-opacity-60\",\n    \"disabled:hover:tw-border-transparent\",\n    \"disabled:hover:tw-bg-transparent\",\n    ...focusRing,\n  ],\n  main: [\n    \"tw-bg-transparent\",\n    \"!tw-text-main\",\n    \"tw-border-transparent\",\n    \"hover:tw-bg-transparent-hover\",\n    \"hover:tw-border-primary-600\",\n    \"focus-visible:before:tw-ring-primary-600\",\n    \"disabled:!tw-text-secondary-300\",\n    \"disabled:hover:tw-border-transparent\",\n    \"disabled:hover:tw-bg-transparent\",\n    ...focusRing,\n  ],\n  muted: [\n    \"tw-bg-transparent\",\n    \"!tw-text-muted\",\n    \"tw-border-transparent\",\n    \"aria-expanded:tw-bg-text-muted\",\n    \"aria-expanded:!tw-text-contrast\",\n    \"hover:tw-bg-transparent-hover\",\n    \"hover:tw-border-primary-600\",\n    \"focus-visible:before:tw-ring-primary-600\",\n    \"disabled:!tw-text-secondary-300\",\n    \"aria-expanded:hover:tw-bg-secondary-700\",\n    \"aria-expanded:hover:tw-border-secondary-700\",\n    \"disabled:hover:tw-border-transparent\",\n    \"disabled:hover:tw-bg-transparent\",\n    ...focusRing,\n  ],\n  primary: [\n    \"tw-bg-primary-600\",\n    \"!tw-text-contrast\",\n    \"tw-border-primary-600\",\n    \"hover:tw-bg-primary-600\",\n    \"hover:tw-border-primary-600\",\n    \"focus-visible:before:tw-ring-primary-600\",\n    \"disabled:tw-opacity-60\",\n    \"disabled:hover:tw-border-primary-600\",\n    \"disabled:hover:tw-bg-primary-600\",\n    ...focusRing,\n  ],\n  secondary: [\n    \"tw-bg-transparent\",\n    \"!tw-text-muted\",\n    \"tw-border-text-muted\",\n    \"hover:!tw-text-contrast\",\n    \"hover:tw-bg-text-muted\",\n    \"focus-visible:before:tw-ring-primary-600\",\n    \"disabled:tw-opacity-60\",\n    \"disabled:hover:tw-border-text-muted\",\n    \"disabled:hover:tw-bg-transparent\",\n    \"disabled:hover:!tw-text-muted\",\n    ...focusRing,\n  ],\n  danger: [\n    \"tw-bg-transparent\",\n    \"!tw-text-danger-600\",\n    \"tw-border-transparent\",\n    \"hover:!tw-text-danger-600\",\n    \"hover:tw-bg-transparent\",\n    \"hover:tw-border-primary-600\",\n    \"focus-visible:before:tw-ring-primary-600\",\n    \"disabled:!tw-text-secondary-300\",\n    \"disabled:hover:tw-border-transparent\",\n    \"disabled:hover:tw-bg-transparent\",\n    \"disabled:hover:!tw-text-secondary-300\",\n    ...focusRing,\n  ],\n  light: [\n    \"tw-bg-transparent\",\n    \"!tw-text-alt2\",\n    \"tw-border-transparent\",\n    \"hover:tw-bg-transparent-hover\",\n    \"hover:tw-border-text-alt2\",\n    \"focus-visible:before:tw-ring-text-alt2\",\n    \"disabled:tw-opacity-60\",\n    \"disabled:hover:tw-border-transparent\",\n    \"disabled:hover:tw-bg-transparent\",\n    ...focusRing,\n  ],\n  unstyled: [],\n};\n\nexport type IconButtonSize = \"default\" | \"small\";\n\nconst sizes: Record<IconButtonSize, string[]> = {\n  default: [\"tw-px-2.5\", \"tw-py-1.5\"],\n  small: [\"tw-leading-none\", \"tw-text-base\", \"tw-p-1\"],\n};\n\n@Component({\n  selector: \"button[bitIconButton]:not(button[bitButton])\",\n  templateUrl: \"icon-button.component.html\",\n  providers: [\n    { provide: ButtonLikeAbstraction, useExisting: BitIconButtonComponent },\n    { provide: FocusableElement, useExisting: BitIconButtonComponent },\n  ],\n  standalone: true,\n  imports: [NgClass],\n})\nexport class BitIconButtonComponent implements ButtonLikeAbstraction, FocusableElement {\n  @Input(\"bitIconButton\") icon: string;\n\n  @Input() buttonType: IconButtonType;\n\n  @Input() size: IconButtonSize = \"default\";\n\n  @HostBinding(\"class\") get classList() {\n    return [\n      \"tw-font-semibold\",\n      \"tw-border\",\n      \"tw-border-solid\",\n      \"tw-rounded-lg\",\n      \"tw-transition\",\n      \"hover:tw-no-underline\",\n      \"focus:tw-outline-none\",\n    ]\n      .concat(styles[this.buttonType ?? \"main\"])\n      .concat(sizes[this.size]);\n  }\n\n  get iconClass() {\n    return [this.icon, \"!tw-m-0\"];\n  }\n\n  @HostBinding(\"attr.disabled\")\n  get disabledAttr() {\n    const disabled = this.disabled != null && this.disabled !== false;\n    return disabled || this.loading ? true : null;\n  }\n\n  @Input() loading = false;\n  @Input() disabled = false;\n\n  getFocusTarget() {\n    return this.elementRef.nativeElement;\n  }\n\n  constructor(private elementRef: ElementRef) {}\n}\n","<span class=\"tw-relative\">\n  <span [ngClass]=\"{ 'tw-invisible': loading }\">\n    <i class=\"bwi\" [ngClass]=\"iconClass\" aria-hidden=\"true\"></i>\n  </span>\n  <span\n    class=\"tw-absolute tw-inset-0 tw-flex tw-items-center tw-justify-center\"\n    [ngClass]=\"{ 'tw-invisible': !loading }\"\n  >\n    <i\n      class=\"bwi bwi-spinner bwi-spin\"\n      aria-hidden=\"true\"\n      [ngClass]=\"{ 'bwi-lg': size === 'default' }\"\n    ></i>\n  </span>\n</span>\n","import { NgModule } from \"@angular/core\";\n\nimport { BitIconButtonComponent } from \"./icon-button.component\";\n\n@NgModule({\n  imports: [BitIconButtonComponent],\n  exports: [BitIconButtonComponent],\n})\nexport class IconButtonModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, HostBinding, Input } from \"@angular/core\";\nimport { DomSanitizer, SafeHtml } from \"@angular/platform-browser\";\n\nimport { Icon, isIcon } from \"./icon\";\n\n@Component({\n  selector: \"bit-icon\",\n  template: ``,\n  standalone: true,\n})\nexport class BitIconComponent {\n  @Input() set icon(icon: Icon) {\n    if (!isIcon(icon)) {\n      this.innerHtml = \"\";\n      return;\n    }\n\n    const svg = icon.svg;\n    this.innerHtml = this.domSanitizer.bypassSecurityTrustHtml(svg);\n  }\n\n  @HostBinding() innerHtml: SafeHtml;\n\n  constructor(private domSanitizer: DomSanitizer) {}\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BitIconComponent } from \"./icon.component\";\n\n@NgModule({\n  imports: [BitIconComponent],\n  exports: [BitIconComponent],\n})\nexport class IconModule {}\n","class Icon {\n  constructor(readonly svg: string) {}\n}\n\n// We only export the type to prohibit the creation of Icons without using\n// the `svgIcon` template literal tag.\nexport type { Icon };\n\nexport function isIcon(icon: unknown): icon is Icon {\n  return icon instanceof Icon;\n}\n\nexport class DynamicContentNotAllowedError extends Error {\n  constructor() {\n    super(\"Dynamic content in icons is not allowed due to risk of user-injected XSS.\");\n  }\n}\n\nexport function svgIcon(strings: TemplateStringsArray, ...values: unknown[]): Icon {\n  if (values.length > 0) {\n    throw new DynamicContentNotAllowedError();\n  }\n\n  return new Icon(strings[0]);\n}\n","import { svgIcon } from \"../icon\";\n\nexport const Search = svgIcon`\n<svg width=\"120\" height=\"120\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <g opacity=\".49\">\n    <path class=\"tw-fill-secondary-300\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M40.36 73.256a30.004 30.004 0 0 0 10.346 1.826c16.282 0 29.482-12.912 29.482-28.84 0-.384-.008-.766-.023-1.145h28.726v39.57H40.36v-11.41Z\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M21.546 46.241c0 15.929 13.2 28.841 29.482 28.841S80.51 62.17 80.51 46.241c0-15.928-13.2-28.841-29.482-28.841S21.546 30.313 21.546 46.241Z\" stroke-width=\"4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path class=\"tw-fill-secondary-600\" d=\"M35.36 70.595a1.2 1.2 0 0 0-2.4 0h2.4Zm77.475-30.356a2.343 2.343 0 0 1 2.365 2.33h2.4c0-2.593-2.107-4.73-4.765-4.73v2.4Zm2.365 2.33v46.047h2.4V42.57h-2.4Zm0 46.047c0 1.293-1.058 2.33-2.365 2.33v2.4c2.59 0 4.765-2.069 4.765-4.73h-2.4Zm-2.365 2.33h-75.11v2.4h75.11v-2.4Zm-75.11 0a2.343 2.343 0 0 1-2.365-2.33h-2.4c0 2.594 2.107 4.73 4.766 4.73v-2.4Zm-2.365-2.33v-18.02h-2.4v18.02h2.4Zm44.508-48.377h32.967v-2.4H79.868v2.4Z\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M79.907 45.287h29.114v39.57H40.487V73.051\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M57.356 102.56h35.849\" stroke-width=\"4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M68.954 92.147v10.413m11.599-10.413v10.413\" stroke-width=\"4\" stroke-linejoin=\"round\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"m27.44 64.945-4.51 4.51L5.72 86.663a3 3 0 0 0 0 4.243l1.238 1.238a3 3 0 0 0 4.243 0L28.41 74.936l4.51-4.51\" stroke-width=\"4\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M101.293 53.154H85.178m16.115 6.043H90.214m-5.036 0h-7.553m23.668 6.043h-7.05m-5.54 0h-15.61m28.2 6.042H85.178m-5.538 0h-8.562m30.215 6.043H78.632m-5.539 0H60m-5.54 0h-8.057\" stroke-width=\"2\" stroke-linecap=\"round\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M29.164 33.01h41.529a2.4 2.4 0 0 1 2.4 2.4v6.28a2.4 2.4 0 0 1-2.4 2.4h-41.53a2.4 2.4 0 0 1-2.4-2.4v-6.28a2.4 2.4 0 0 1 2.4-2.4Z\" stroke-width=\"4\" />\n    <path class=\"tw-stroke-secondary-600\" d=\"M22.735 54.16h34.361a2.4 2.4 0 0 1 2.4 2.4v6.28a2.4 2.4 0 0 1-2.4 2.4H28.778m50.358-11.08h-6.161a2.4 2.4 0 0 0-2.4 2.4v6.414a2.266 2.266 0 0 0 2.266 2.265\" stroke-width=\"4\" stroke-linecap=\"round\" />\n  </g>\n</svg>\n`;\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, ElementRef, Input, NgZone, OnInit, Optional } from \"@angular/core\";\nimport { take } from \"rxjs/operators\";\n\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { FocusableElement } from \"../shared/focusable-element\";\n\n/**\n * Directive to focus an element.\n *\n * @remarks\n *\n * If the component provides the `FocusableElement` interface, the `focus`\n * method will be called. Otherwise, the native element will be focused.\n */\n@Directive({\n  selector: \"[appAutofocus], [bitAutofocus]\",\n})\nexport class AutofocusDirective implements OnInit {\n  @Input() set appAutofocus(condition: boolean | string) {\n    this.autofocus = condition === \"\" || condition === true;\n  }\n\n  private autofocus: boolean;\n\n  constructor(\n    private el: ElementRef,\n    private ngZone: NgZone,\n    @Optional() private focusableElement: FocusableElement,\n  ) {}\n\n  ngOnInit() {\n    if (!Utils.isMobileBrowser && this.autofocus) {\n      if (this.ngZone.isStable) {\n        this.focus();\n      } else {\n        this.ngZone.onStable.pipe(take(1)).subscribe(this.focus.bind(this));\n      }\n    }\n  }\n\n  private focus() {\n    if (this.focusableElement) {\n      this.focusableElement.getFocusTarget().focus();\n    } else {\n      this.el.nativeElement.focus();\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Directive,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  Input,\n  NgZone,\n  Optional,\n  Self,\n} from \"@angular/core\";\nimport { NgControl, Validators } from \"@angular/forms\";\n\nimport { BitFormFieldControl, InputTypes } from \"../form-field/form-field-control\";\nimport { BitFormFieldComponent } from \"../form-field/form-field.component\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\nexport function inputBorderClasses(error: boolean) {\n  return [\n    \"tw-border\",\n    \"!tw-border-solid\",\n    error ? \"tw-border-danger-600\" : \"tw-border-secondary-500\",\n    \"focus:tw-outline-none\",\n  ];\n}\n\n@Directive({\n  selector: \"input[bitInput], select[bitInput], textarea[bitInput]\",\n  providers: [{ provide: BitFormFieldControl, useExisting: BitInputDirective }],\n  standalone: true,\n})\nexport class BitInputDirective implements BitFormFieldControl {\n  @HostBinding(\"class\") @Input() get classList() {\n    const classes = [\n      \"tw-block\",\n      \"tw-w-full\",\n      \"tw-h-full\",\n      \"tw-text-main\",\n      \"tw-placeholder-text-muted\",\n      \"tw-bg-background\",\n      \"tw-border-none\",\n      \"focus:tw-outline-none\",\n      \"[&:is(input,textarea):disabled]:tw-bg-secondary-100\",\n    ];\n\n    if (this.parentFormField === null) {\n      classes.push(...inputBorderClasses(this.hasError), ...this.standaloneInputClasses);\n    }\n\n    return classes.filter((s) => s != \"\");\n  }\n\n  @HostBinding() @Input() id = `bit-input-${nextId++}`;\n\n  @HostBinding(\"attr.aria-describedby\") ariaDescribedBy: string;\n\n  @HostBinding(\"attr.aria-invalid\") get ariaInvalid() {\n    return this.hasError ? true : undefined;\n  }\n\n  @HostBinding(\"attr.type\") @Input() type?: InputTypes;\n\n  @HostBinding(\"attr.spellcheck\") @Input() spellcheck?: boolean;\n\n  @HostBinding()\n  @Input()\n  get required() {\n    return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n  }\n  set required(value: any) {\n    this._required = value != null && value !== false;\n  }\n  private _required: boolean;\n\n  @Input() hasPrefix = false;\n  @Input() hasSuffix = false;\n\n  @Input() showErrorsWhenDisabled? = false;\n\n  get labelForId(): string {\n    return this.id;\n  }\n\n  @HostListener(\"input\")\n  onInput() {\n    this.ngControl?.control?.markAsUntouched();\n  }\n\n  get hasError() {\n    if (this.showErrorsWhenDisabled) {\n      return (\n        (this.ngControl?.status === \"INVALID\" || this.ngControl?.status === \"DISABLED\") &&\n        this.ngControl?.touched &&\n        this.ngControl?.errors != null\n      );\n    } else {\n      return this.ngControl?.status === \"INVALID\" && this.ngControl?.touched;\n    }\n  }\n\n  get error(): [string, any] {\n    const key = Object.keys(this.ngControl.errors)[0];\n    return [key, this.ngControl.errors[key]];\n  }\n\n  constructor(\n    @Optional() @Self() private ngControl: NgControl,\n    private ngZone: NgZone,\n    private elementRef: ElementRef<HTMLInputElement>,\n    @Optional() private parentFormField: BitFormFieldComponent,\n  ) {}\n\n  focus() {\n    this.ngZone.runOutsideAngular(() => {\n      const end = this.elementRef.nativeElement.value.length;\n      this.elementRef.nativeElement.setSelectionRange(end, end);\n      this.elementRef.nativeElement.focus();\n    });\n  }\n\n  get readOnly(): boolean {\n    return this.elementRef.nativeElement.readOnly;\n  }\n\n  get standaloneInputClasses() {\n    return [\n      \"tw-px-3\",\n      \"tw-py-2\",\n      \"tw-rounded-lg\",\n      // Hover\n      this.hasError ? \"hover:tw-border-danger-700\" : \"hover:tw-border-primary-600\",\n      // Focus\n      \"focus:hover:tw-border-primary-600\",\n      \"disabled:tw-bg-secondary-100\",\n      \"disabled:hover:tw-border-secondary-500\",\n      \"focus:tw-border-primary-600\",\n      \"focus:tw-ring-1\",\n      \"focus:tw-ring-inset\",\n      \"focus:tw-ring-primary-600\",\n      \"focus:tw-z-10\",\n    ];\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { BitInputDirective } from \"./input.directive\";\n\n@NgModule({\n  imports: [BitInputDirective],\n  exports: [BitInputDirective],\n})\nexport class InputModule {}\n","import { Component } from \"@angular/core\";\n\nimport { A11yCellDirective } from \"../a11y/a11y-cell.directive\";\n\n@Component({\n  selector: \"bit-item-action\",\n  standalone: true,\n  imports: [],\n  template: `<ng-content></ng-content>`,\n  providers: [{ provide: A11yCellDirective, useExisting: ItemActionComponent }],\n  host: {\n    class:\n      /**\n       * `top` and `bottom` units should be kept in sync with `item-content.component.ts`'s y-axis padding.\n       * we want this `:after` element to be the same height as the `item-content`\n       */\n      \"[&>button]:tw-relative [&>button:not([bit-item-content])]:after:tw-content-[''] [&>button]:after:tw-absolute [&>button]:after:tw-block bit-compact:[&>button]:after:tw-top-[-0.7rem] bit-compact:[&>button]:after:tw-bottom-[-0.7rem] [&>button]:after:tw-top-[-0.8rem] [&>button]:after:tw-bottom-[-0.80rem] [&>button]:after:tw-right-[-0.25rem] [&>button]:after:tw-left-[-0.25rem]\",\n  },\n})\nexport class ItemActionComponent extends A11yCellDirective {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  ChangeDetectionStrategy,\n  Component,\n  ElementRef,\n  signal,\n  ViewChild,\n} from \"@angular/core\";\n\nimport { TypographyModule } from \"../typography\";\n\n@Component({\n  selector: \"bit-item-content, [bit-item-content]\",\n  standalone: true,\n  imports: [CommonModule, TypographyModule],\n  templateUrl: `item-content.component.html`,\n  host: {\n    class:\n      /**\n       * y-axis padding should be kept in sync with `item-action.component.ts`'s `top` and `bottom` units.\n       * we want this to be the same height as the `item-action`'s `:after` element\n       */\n      \"fvw-target tw-outline-none tw-text-main hover:tw-text-main tw-no-underline hover:tw-no-underline tw-text-base tw-py-2 tw-px-4 bit-compact:tw-py-1.5 bit-compact:tw-px-2 tw-bg-transparent tw-w-full tw-border-none tw-flex tw-gap-4 tw-items-center tw-justify-between\",\n  },\n  changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ItemContentComponent implements AfterContentChecked {\n  @ViewChild(\"endSlot\") endSlot: ElementRef<HTMLDivElement>;\n\n  protected endSlotHasChildren = signal(false);\n\n  ngAfterContentChecked(): void {\n    this.endSlotHasChildren.set(this.endSlot?.nativeElement.childElementCount > 0);\n  }\n}\n","<div class=\"tw-flex tw-gap-2 tw-items-center tw-w-full tw-min-w-0\">\n  <ng-content select=\"[slot=start]\"></ng-content>\n\n  <div class=\"tw-flex tw-flex-col tw-items-start tw-text-start tw-w-full tw-truncate [&_p]:tw-mb-0\">\n    <div\n      bitTypography=\"body2\"\n      class=\"tw-text-main tw-truncate tw-inline-flex tw-items-center tw-gap-1.5 tw-w-full\"\n    >\n      <div class=\"tw-truncate\">\n        <ng-content></ng-content>\n      </div>\n      <div class=\"tw-flex-grow\">\n        <ng-content select=\"[slot=default-trailing]\"></ng-content>\n      </div>\n    </div>\n    <div bitTypography=\"helper\" class=\"tw-text-muted tw-w-full tw-truncate\">\n      <ng-content select=\"[slot=secondary]\"></ng-content>\n    </div>\n  </div>\n</div>\n\n<div class=\"tw-flex tw-gap-2 tw-items-center\" #endSlot [hidden]=\"!endSlotHasChildren()\">\n  <ng-content select=\"[slot=end]\"></ng-content>\n</div>\n","import { ChangeDetectionStrategy, Component } from \"@angular/core\";\n\n@Component({\n  selector: \"bit-item-group\",\n  standalone: true,\n  imports: [],\n  template: `<ng-content></ng-content>`,\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  host: {\n    class: \"tw-block\",\n  },\n})\nexport class ItemGroupComponent {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  AfterViewInit,\n  ContentChildren,\n  Directive,\n  HostBinding,\n  QueryList,\n  ViewChildren,\n} from \"@angular/core\";\n\nimport { A11yCellDirective } from \"./a11y-cell.directive\";\n\n@Directive({\n  selector: \"bitA11yRow\",\n  standalone: true,\n})\nexport class A11yRowDirective implements AfterViewInit {\n  @HostBinding(\"attr.role\")\n  role: \"row\" | null;\n\n  cells: A11yCellDirective[];\n\n  @ViewChildren(A11yCellDirective)\n  private viewCells: QueryList<A11yCellDirective>;\n\n  @ContentChildren(A11yCellDirective)\n  private contentCells: QueryList<A11yCellDirective>;\n\n  ngAfterViewInit(): void {\n    this.cells = [...this.viewCells, ...this.contentCells];\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport {\n  ChangeDetectionStrategy,\n  Component,\n  HostBinding,\n  HostListener,\n  signal,\n} from \"@angular/core\";\n\nimport { A11yRowDirective } from \"../a11y/a11y-row.directive\";\n\nimport { ItemActionComponent } from \"./item-action.component\";\n\n@Component({\n  selector: \"bit-item\",\n  standalone: true,\n  imports: [CommonModule, ItemActionComponent],\n  changeDetection: ChangeDetectionStrategy.OnPush,\n  templateUrl: \"item.component.html\",\n  providers: [{ provide: A11yRowDirective, useExisting: ItemComponent }],\n  host: {\n    class:\n      \"tw-block tw-box-border tw-overflow-hidden tw-flex tw-bg-background [&:has(.item-main-content_button:hover,.item-main-content_a:hover)]:tw-cursor-pointer [&:has(.item-main-content_button:hover,.item-main-content_a:hover)]:tw-bg-primary-100 tw-text-main tw-border-solid tw-border-b tw-border-0 [&:not(bit-layout_*)]:tw-rounded-lg bit-compact:[&:not(bit-layout_*)]:tw-rounded-none bit-compact:[&:not(bit-layout_*)]:last-of-type:tw-rounded-b-lg bit-compact:[&:not(bit-layout_*)]:first-of-type:tw-rounded-t-lg tw-min-h-9 tw-mb-1.5 bit-compact:tw-mb-0\",\n  },\n})\nexport class ItemComponent extends A11yRowDirective {\n  /**\n   * We have `:focus-within` and `:focus-visible` but no `:focus-visible-within`\n   */\n  protected focusVisibleWithin = signal(false);\n  @HostListener(\"focusin\", [\"$event.target\"])\n  onFocusIn(target: HTMLElement) {\n    this.focusVisibleWithin.set(target.matches(\".fvw-target:focus-visible\"));\n  }\n  @HostListener(\"focusout\")\n  onFocusOut() {\n    this.focusVisibleWithin.set(false);\n  }\n\n  @HostBinding(\"class\") get classList(): string[] {\n    return [\n      this.focusVisibleWithin()\n        ? \"tw-z-10 tw-rounded tw-outline-none tw-ring-2 bit-compact:tw-ring-inset tw-ring-primary-600 tw-border-transparent\".split(\n            \" \",\n          )\n        : \"tw-border-b-shadow\",\n    ].flat();\n  }\n}\n","<bit-item-action class=\"item-main-content tw-flex tw-flex-1 tw-overflow-hidden\">\n  <ng-content></ng-content>\n</bit-item-action>\n\n<div\n  #endSlot\n  class=\"tw-p-2 tw-flex tw-gap-1 tw-items-center\"\n  [hidden]=\"endSlot.childElementCount === 0\"\n>\n  <ng-content select=\"[slot=end]\"></ng-content>\n</div>\n","import { NgModule } from \"@angular/core\";\n\nimport { ItemActionComponent } from \"./item-action.component\";\nimport { ItemContentComponent } from \"./item-content.component\";\nimport { ItemGroupComponent } from \"./item-group.component\";\nimport { ItemComponent } from \"./item.component\";\n\n@NgModule({\n  imports: [ItemComponent, ItemContentComponent, ItemActionComponent, ItemGroupComponent],\n  exports: [ItemComponent, ItemContentComponent, ItemActionComponent, ItemGroupComponent],\n})\nexport class ItemModule {}\n","<div\n  class=\"tw-fixed tw-z-50 tw-w-full tw-flex tw-justify-center tw-opacity-0 focus-within:tw-opacity-100 tw-pointer-events-none focus-within:tw-pointer-events-auto\"\n>\n  <nav class=\"tw-bg-background-alt3 tw-rounded-md tw-rounded-t-none tw-py-2 tw-text-alt2\">\n    <a\n      bitLink\n      class=\"tw-mx-6 focus-visible:before:!tw-ring-0\"\n      [fragment]=\"mainContentId\"\n      [routerLink]=\"[]\"\n      (click)=\"focusMainContent()\"\n      linkType=\"light\"\n      >{{ \"skipToContent\" | i18n }}</a\n    >\n  </nav>\n</div>\n<div class=\"tw-flex tw-w-full\">\n  <ng-content select=\"bit-side-nav, [slot=side-nav]\"></ng-content>\n  <main\n    [id]=\"mainContentId\"\n    tabindex=\"-1\"\n    class=\"tw-overflow-auto tw-min-w-0 tw-flex-1 tw-bg-background tw-p-6 md:tw-ml-0 tw-ml-16\"\n  >\n    <ng-content></ng-content>\n\n    <!-- overlay backdrop for side-nav -->\n    <div\n      *ngIf=\"{\n        open: sideNavService.open$ | async,\n      } as data\"\n      class=\"tw-pointer-events-none tw-fixed tw-inset-0 tw-z-10 tw-bg-black tw-bg-opacity-0 motion-safe:tw-transition-colors md:tw-hidden\"\n      [ngClass]=\"[data.open ? 'tw-bg-opacity-30 md:tw-bg-opacity-0' : 'tw-bg-opacity-0']\"\n    >\n      <div\n        *ngIf=\"data.open\"\n        (click)=\"sideNavService.toggle()\"\n        class=\"tw-pointer-events-auto tw-h-full tw-w-full\"\n      ></div>\n    </div>\n  </main>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { LinkModule } from \"../link\";\nimport { SideNavService } from \"../navigation/side-nav.service\";\nimport { SharedModule } from \"../shared\";\n\n@Component({\n  selector: \"bit-layout\",\n  templateUrl: \"layout.component.html\",\n  standalone: true,\n  imports: [CommonModule, SharedModule, LinkModule, RouterModule],\n})\nexport class LayoutComponent {\n  protected mainContentId = \"main-content\";\n\n  constructor(protected sideNavService: SideNavService) {}\n\n  focusMainContent() {\n    document.getElementById(this.mainContentId)?.focus();\n  }\n}\n","import { Input, HostBinding, Directive } from \"@angular/core\";\n\nexport type LinkType = \"primary\" | \"secondary\" | \"contrast\" | \"light\";\n\nconst linkStyles: Record<LinkType, string[]> = {\n  primary: [\n    \"!tw-text-primary-600\",\n    \"hover:!tw-text-primary-700\",\n    \"focus-visible:before:tw-ring-primary-600\",\n  ],\n  secondary: [\"!tw-text-main\", \"hover:!tw-text-main\", \"focus-visible:before:tw-ring-primary-600\"],\n  contrast: [\n    \"!tw-text-contrast\",\n    \"hover:!tw-text-contrast\",\n    \"focus-visible:before:tw-ring-text-contrast\",\n  ],\n  light: [\"!tw-text-alt2\", \"hover:!tw-text-alt2\", \"focus-visible:before:tw-ring-text-alt2\"],\n};\n\nconst commonStyles = [\n  \"tw-text-unset\",\n  \"tw-leading-none\",\n  \"tw-px-0\",\n  \"tw-py-0.5\",\n  \"tw-font-semibold\",\n  \"tw-bg-transparent\",\n  \"tw-border-0\",\n  \"tw-border-none\",\n  \"tw-rounded\",\n  \"tw-transition\",\n  \"tw-no-underline\",\n  \"hover:tw-underline\",\n  \"hover:tw-decoration-1\",\n  \"disabled:tw-no-underline\",\n  \"disabled:tw-cursor-not-allowed\",\n  \"disabled:!tw-text-secondary-300\",\n  \"disabled:hover:!tw-text-secondary-300\",\n  \"disabled:hover:tw-no-underline\",\n  \"focus-visible:tw-outline-none\",\n  \"focus-visible:tw-underline\",\n  \"focus-visible:tw-decoration-1\",\n\n  // Workaround for html button tag not being able to be set to `display: inline`\n  // and at the same time not being able to use `tw-ring-offset` because of box-shadow issue.\n  // https://github.com/w3c/csswg-drafts/issues/3226\n  // Add `tw-inline`, add `tw-py-0.5` and use regular `tw-ring` if issue is fixed.\n  //\n  // https://github.com/tailwindlabs/tailwindcss/issues/3595\n  // Remove `before:` and use regular `tw-ring` when browser no longer has bug, or better:\n  // switch to `outline` with `outline-offset` when Safari supports border radius on outline.\n  // Using `box-shadow` to create outlines is a hack and as such `outline` should be preferred.\n  \"tw-relative\",\n  \"before:tw-content-['']\",\n  \"before:tw-block\",\n  \"before:tw-absolute\",\n  \"before:-tw-inset-x-[0.1em]\",\n  \"before:tw-rounded-md\",\n  \"before:tw-transition\",\n  \"focus-visible:before:tw-ring-2\",\n  \"focus-visible:tw-z-10\",\n];\n\n@Directive()\nabstract class LinkDirective {\n  @Input()\n  linkType: LinkType = \"primary\";\n}\n\n@Directive({\n  selector: \"a[bitLink]\",\n  standalone: true,\n})\nexport class AnchorLinkDirective extends LinkDirective {\n  @HostBinding(\"class\") get classList() {\n    return [\"before:-tw-inset-y-[0.125rem]\"]\n      .concat(commonStyles)\n      .concat(linkStyles[this.linkType] ?? []);\n  }\n}\n\n@Directive({\n  selector: \"button[bitLink]\",\n  standalone: true,\n})\nexport class ButtonLinkDirective extends LinkDirective {\n  @HostBinding(\"class\") get classList() {\n    return [\"before:-tw-inset-y-[0.25rem]\"]\n      .concat(commonStyles)\n      .concat(linkStyles[this.linkType] ?? []);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { AnchorLinkDirective, ButtonLinkDirective } from \"./link.directive\";\n\n@NgModule({\n  imports: [AnchorLinkDirective, ButtonLinkDirective],\n  exports: [AnchorLinkDirective, ButtonLinkDirective],\n})\nexport class LinkModule {}\n","import { Component } from \"@angular/core\";\n\n@Component({\n  selector: \"bit-menu-divider\",\n  templateUrl: \"./menu-divider.component.html\",\n  standalone: true,\n})\nexport class MenuDividerComponent {}\n","<div\n  class=\"tw-my-2 tw-border-0 tw-border-t tw-border-solid tw-border-t-secondary-500\"\n  role=\"separator\"\n  aria-hidden=\"true\"\n></div>\n","import { FocusableOption } from \"@angular/cdk/a11y\";\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { NgClass } from \"@angular/common\";\nimport { Component, ElementRef, HostBinding, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"[bitMenuItem]\",\n  templateUrl: \"menu-item.component.html\",\n  standalone: true,\n  imports: [NgClass],\n})\nexport class MenuItemDirective implements FocusableOption {\n  @HostBinding(\"class\") classList = [\n    \"tw-block\",\n    \"tw-w-full\",\n    \"tw-py-1.5\",\n    \"tw-px-3\",\n    \"!tw-text-main\",\n    \"!tw-no-underline\",\n    \"tw-cursor-pointer\",\n    \"tw-border-none\",\n    \"tw-bg-background\",\n    \"tw-text-left\",\n    \"hover:tw-bg-primary-100\",\n    \"focus-visible:tw-z-50\",\n    \"focus-visible:tw-outline-none\",\n    \"focus-visible:tw-ring-2\",\n    \"focus-visible:tw-rounded-lg\",\n    \"focus-visible:tw-ring-inset\",\n    \"focus-visible:tw-ring-primary-600\",\n    \"active:!tw-ring-0\",\n    \"active:!tw-ring-offset-0\",\n    \"disabled:!tw-text-muted\",\n    \"disabled:hover:tw-bg-background\",\n    \"disabled:tw-cursor-not-allowed\",\n  ];\n  @HostBinding(\"attr.role\") role = \"menuitem\";\n  @HostBinding(\"tabIndex\") tabIndex = \"-1\";\n  @HostBinding(\"attr.disabled\") get disabledAttr() {\n    return this.disabled || null; // native disabled attr must be null when false\n  }\n\n  @Input({ transform: coerceBooleanProperty }) disabled?: boolean = false;\n\n  constructor(public elementRef: ElementRef<HTMLButtonElement>) {}\n\n  focus() {\n    this.elementRef.nativeElement.focus();\n  }\n}\n","<div class=\"tw-flex tw-w-full tw-justify-between tw-items-center tw-gap-2\">\n  <span class=\"tw-flex tw-gap-2 tw-items-center tw-overflow-hidden\">\n    <span #startSlot [ngClass]=\"{ 'tw-hidden': startSlot.childElementCount === 0 }\">\n      <ng-content select=\"[slot=start]\"></ng-content>\n    </span>\n    <span class=\"tw-truncate\"><ng-content></ng-content></span>\n  </span>\n  <span #endSlot [ngClass]=\"{ 'tw-hidden': endSlot.childElementCount === 0 }\">\n    <ng-content select=\"[slot=end]\"></ng-content>\n  </span>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n  Directive,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  Input,\n  OnDestroy,\n  ViewContainerRef,\n} from \"@angular/core\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { filter, mergeWith } from \"rxjs/operators\";\n\nimport { MenuComponent } from \"./menu.component\";\n\n@Directive({\n  selector: \"[bitMenuTriggerFor]\",\n  exportAs: \"menuTrigger\",\n  standalone: true,\n})\nexport class MenuTriggerForDirective implements OnDestroy {\n  @HostBinding(\"attr.aria-expanded\") isOpen = false;\n  @HostBinding(\"attr.aria-haspopup\") get hasPopup(): \"menu\" | \"dialog\" {\n    return this.menu?.ariaRole || \"menu\";\n  }\n  @HostBinding(\"attr.role\")\n  @Input()\n  role = \"button\";\n\n  @Input(\"bitMenuTriggerFor\") menu: MenuComponent;\n\n  private overlayRef: OverlayRef;\n  private defaultMenuConfig: OverlayConfig = {\n    panelClass: \"bit-menu-panel\",\n    hasBackdrop: true,\n    backdropClass: [\"cdk-overlay-transparent-backdrop\", \"bit-menu-panel-backdrop\"],\n    scrollStrategy: this.overlay.scrollStrategies.reposition(),\n    positionStrategy: this.overlay\n      .position()\n      .flexibleConnectedTo(this.elementRef)\n      .withPositions([\n        {\n          originX: \"start\",\n          originY: \"bottom\",\n          overlayX: \"start\",\n          overlayY: \"top\",\n        },\n        {\n          originX: \"end\",\n          originY: \"bottom\",\n          overlayX: \"end\",\n          overlayY: \"top\",\n        },\n      ])\n      .withLockedPosition(true)\n      .withFlexibleDimensions(false)\n      .withPush(true),\n  };\n  private closedEventsSub: Subscription;\n  private keyDownEventsSub: Subscription;\n\n  constructor(\n    private elementRef: ElementRef<HTMLElement>,\n    private viewContainerRef: ViewContainerRef,\n    private overlay: Overlay,\n  ) {}\n\n  @HostListener(\"click\") toggleMenu() {\n    this.isOpen ? this.destroyMenu() : this.openMenu();\n  }\n\n  ngOnDestroy() {\n    this.disposeAll();\n  }\n\n  private openMenu() {\n    if (this.menu == null) {\n      throw new Error(\"Cannot find bit-menu element\");\n    }\n\n    this.isOpen = true;\n    this.overlayRef = this.overlay.create(this.defaultMenuConfig);\n\n    const templatePortal = new TemplatePortal(this.menu.templateRef, this.viewContainerRef);\n    this.overlayRef.attach(templatePortal);\n\n    this.closedEventsSub = this.getClosedEvents().subscribe((event: KeyboardEvent | undefined) => {\n      if ([\"Tab\", \"Escape\"].includes(event?.key)) {\n        // Required to ensure tab order resumes correctly\n        this.elementRef.nativeElement.focus();\n      }\n      this.destroyMenu();\n    });\n    if (this.menu.keyManager) {\n      this.menu.keyManager.setFirstItemActive();\n      this.keyDownEventsSub = this.overlayRef\n        .keydownEvents()\n        .subscribe((event: KeyboardEvent) => this.menu.keyManager.onKeydown(event));\n    }\n  }\n\n  private destroyMenu() {\n    if (this.overlayRef == null || !this.isOpen) {\n      return;\n    }\n\n    this.isOpen = false;\n    this.disposeAll();\n    this.menu.closed.emit();\n  }\n\n  private getClosedEvents(): Observable<any> {\n    const detachments = this.overlayRef.detachments();\n    const escKey = this.overlayRef.keydownEvents().pipe(\n      filter((event: KeyboardEvent) => {\n        const keys = this.menu.ariaRole === \"menu\" ? [\"Escape\", \"Tab\"] : [\"Escape\"];\n        return keys.includes(event.key);\n      }),\n    );\n    const backdrop = this.overlayRef.backdropClick();\n    const menuClosed = this.menu.closed;\n\n    return detachments.pipe(mergeWith(escKey, backdrop, menuClosed));\n  }\n\n  private disposeAll() {\n    this.closedEventsSub?.unsubscribe();\n    this.overlayRef?.dispose();\n    this.keyDownEventsSub?.unsubscribe();\n  }\n}\n","<ng-template>\n  <div\n    (click)=\"closed.emit()\"\n    class=\"tw-flex tw-shrink-0 tw-flex-col tw-rounded-lg tw-border tw-border-solid tw-border-secondary-500 tw-bg-background tw-bg-clip-padding tw-py-1 tw-overflow-y-auto\"\n    [attr.role]=\"ariaRole\"\n    [attr.aria-label]=\"ariaLabel\"\n    cdkTrapFocus\n    [cdkTrapFocusAutoCapture]=\"ariaRole === 'dialog'\"\n  >\n    <ng-content></ng-content>\n  </div>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FocusKeyManager, CdkTrapFocus } from \"@angular/cdk/a11y\";\nimport {\n  Component,\n  Output,\n  TemplateRef,\n  ViewChild,\n  EventEmitter,\n  ContentChildren,\n  QueryList,\n  AfterContentInit,\n  Input,\n} from \"@angular/core\";\n\nimport { MenuItemDirective } from \"./menu-item.directive\";\n\n@Component({\n  selector: \"bit-menu\",\n  templateUrl: \"./menu.component.html\",\n  exportAs: \"menuComponent\",\n  standalone: true,\n  imports: [CdkTrapFocus],\n})\nexport class MenuComponent implements AfterContentInit {\n  @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n  @Output() closed = new EventEmitter<void>();\n  @ContentChildren(MenuItemDirective, { descendants: true })\n  menuItems: QueryList<MenuItemDirective>;\n  keyManager?: FocusKeyManager<MenuItemDirective>;\n\n  @Input() ariaRole: \"menu\" | \"dialog\" = \"menu\";\n\n  @Input() ariaLabel: string;\n\n  ngAfterContentInit() {\n    if (this.ariaRole === \"menu\") {\n      this.keyManager = new FocusKeyManager(this.menuItems)\n        .withWrap()\n        .skipPredicate((item) => item.disabled);\n    }\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { MenuDividerComponent } from \"./menu-divider.component\";\nimport { MenuItemDirective } from \"./menu-item.directive\";\nimport { MenuTriggerForDirective } from \"./menu-trigger-for.directive\";\nimport { MenuComponent } from \"./menu.component\";\n\n@NgModule({\n  imports: [MenuComponent, MenuTriggerForDirective, MenuItemDirective, MenuDividerComponent],\n  exports: [MenuComponent, MenuTriggerForDirective, MenuItemDirective, MenuDividerComponent],\n})\nexport class MenuModule {}\n","<ng-select\n  [items]=\"baseItems\"\n  [(ngModel)]=\"selectedItems\"\n  (ngModelChange)=\"onChange($event)\"\n  (blur)=\"onBlur()\"\n  bindLabel=\"listName\"\n  groupBy=\"parentGrouping\"\n  [placeholder]=\"placeholder\"\n  [loading]=\"loading\"\n  [loadingText]=\"loadingText\"\n  notFoundText=\"{{ 'multiSelectNotFound' | i18n }}\"\n  clearAllText=\"{{ 'multiSelectClearAll' | i18n }}\"\n  [multiple]=\"true\"\n  [closeOnSelect]=\"false\"\n  (close)=\"onDropdownClosed()\"\n  [disabled]=\"disabled\"\n  [clearSearchOnAdd]=\"true\"\n  [labelForId]=\"labelForId\"\n  [keyDownFn]=\"keyDown\"\n  appendTo=\"body\"\n>\n  <ng-template ng-loadingspinner-tmp>\n    <i class=\"bwi bwi-spinner bwi-spin tw-mr-1\" [title]=\"loadingText\" aria-hidden=\"true\"></i>\n  </ng-template>\n  <ng-template ng-label-tmp let-item=\"item\" let-clear=\"clear\">\n    <button\n      type=\"button\"\n      bitBadge\n      variant=\"primary\"\n      class=\"tw-mr-1 disabled:tw-border-0 tw-flex tw-gap-1.5 tw-items-center\"\n      [disabled]=\"disabled\"\n      (click)=\"clear(item)\"\n    >\n      <i *ngIf=\"item.icon != null\" class=\"bwi bwi-fw {{ item.icon }}\" aria-hidden=\"true\"></i>\n      <span class=\"tw-truncate\">\n        {{ item.labelName }}\n      </span>\n      <i class=\"bwi bwi-fw bwi-close bwi-sm\" aria-hidden=\"true\"></i>\n    </button>\n  </ng-template>\n  <ng-template ng-option-tmp let-item=\"item\">\n    <div class=\"tw-flex\">\n      <div class=\"tw-w-7 tw-flex-none\">\n        <i *ngIf=\"isSelected(item)\" class=\"bwi bwi-fw bwi-check\" aria-hidden=\"true\"></i>\n      </div>\n      <div class=\"tw-mr-2 tw-flex-initial\">\n        <i *ngIf=\"item.icon != null\" class=\"bwi bwi-fw {{ item.icon }}\" aria-hidden=\"true\"></i>\n      </div>\n      <div class=\"tw-flex-1\">\n        {{ item.listName }}\n      </div>\n    </div>\n  </ng-template>\n</ng-select>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { hasModifierKey } from \"@angular/cdk/keycodes\";\nimport { NgIf } from \"@angular/common\";\nimport {\n  Component,\n  Input,\n  OnInit,\n  Output,\n  ViewChild,\n  EventEmitter,\n  HostBinding,\n  Optional,\n  Self,\n} from \"@angular/core\";\nimport {\n  ControlValueAccessor,\n  NgControl,\n  Validators,\n  ReactiveFormsModule,\n  FormsModule,\n} from \"@angular/forms\";\nimport { NgSelectComponent, NgSelectModule } from \"@ng-select/ng-select\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BadgeModule } from \"../badge\";\nimport { BitFormFieldControl } from \"../form-field/form-field-control\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nimport { SelectItemView } from \"./models/select-item-view\";\n\n// Increments for each instance of this component\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-multi-select\",\n  templateUrl: \"./multi-select.component.html\",\n  providers: [{ provide: BitFormFieldControl, useExisting: MultiSelectComponent }],\n  standalone: true,\n  imports: [NgSelectModule, ReactiveFormsModule, FormsModule, BadgeModule, NgIf, I18nPipe],\n})\n/**\n * This component has been implemented to only support Multi-select list events\n */\nexport class MultiSelectComponent implements OnInit, BitFormFieldControl, ControlValueAccessor {\n  @ViewChild(NgSelectComponent) select: NgSelectComponent;\n\n  // Parent component should only pass selectable items (complete list - selected items = baseItems)\n  @Input() baseItems: SelectItemView[];\n  // Defaults to native ng-select behavior - set to \"true\" to clear selected items on dropdown close\n  @Input() removeSelectedItems = false;\n  @Input() placeholder: string;\n  @Input() loading = false;\n  @Input({ transform: coerceBooleanProperty }) disabled?: boolean;\n\n  // Internal tracking of selected items\n  protected selectedItems: SelectItemView[];\n\n  // Default values for our implementation\n  loadingText: string;\n\n  protected searchInputId = `search-input-${nextId++}`;\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  private notifyOnChange?: (value: SelectItemView[]) => void;\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  private notifyOnTouched?: () => void;\n\n  @Output() onItemsConfirmed = new EventEmitter<any[]>();\n\n  constructor(\n    private i18nService: I18nService,\n    @Optional() @Self() private ngControl?: NgControl,\n  ) {\n    if (ngControl != null) {\n      ngControl.valueAccessor = this;\n    }\n  }\n\n  ngOnInit(): void {\n    // Default Text Values\n    this.placeholder = this.placeholder ?? this.i18nService.t(\"multiSelectPlaceholder\");\n    this.loadingText = this.i18nService.t(\"multiSelectLoading\");\n  }\n\n  /** Function for customizing keyboard navigation */\n  /** Needs to be arrow function to retain `this` scope. */\n  keyDown = (event: KeyboardEvent) => {\n    if (!this.select.isOpen && event.key === \"Enter\" && !hasModifierKey(event)) {\n      return false;\n    }\n\n    if (this.select.isOpen && event.key === \"Escape\" && !hasModifierKey(event)) {\n      this.selectedItems = [];\n      this.select.close();\n      event.stopPropagation();\n      return false;\n    }\n\n    return true;\n  };\n\n  /** Helper method for showing selected state in custom template */\n  isSelected(item: any): boolean {\n    return this.selectedItems?.find((selected) => selected.id === item.id) != undefined;\n  }\n\n  /**\n   * The `close` callback will act as the only trigger for signifying the user's intent of completing the selection\n   * of items. Selected items will be emitted to the parent component in order to allow for separate data handling.\n   */\n  onDropdownClosed(): void {\n    // Early exit\n    if (this.selectedItems == null || this.selectedItems.length == 0) {\n      return;\n    }\n\n    // Emit results to parent component\n    this.onItemsConfirmed.emit(this.selectedItems);\n\n    // Remove selected items from base list based on input property\n    if (this.removeSelectedItems) {\n      let updatedBaseItems = this.baseItems;\n      this.selectedItems.forEach((selectedItem) => {\n        updatedBaseItems = updatedBaseItems.filter((item) => selectedItem.id !== item.id);\n      });\n\n      // Reset Lists\n      this.selectedItems = null;\n      this.baseItems = updatedBaseItems;\n    }\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  writeValue(obj: SelectItemView[]): void {\n    this.selectedItems = obj;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnChange(fn: (value: SelectItemView[]) => void): void {\n    this.notifyOnChange = fn;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnTouched(fn: any): void {\n    this.notifyOnTouched = fn;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  protected onChange(items: SelectItemView[]) {\n    if (!this.notifyOnChange) {\n      return;\n    }\n\n    this.notifyOnChange(items);\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  protected onBlur() {\n    if (!this.notifyOnTouched) {\n      return;\n    }\n\n    this.notifyOnTouched();\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding(\"attr.aria-describedby\")\n  get ariaDescribedBy() {\n    return this._ariaDescribedBy;\n  }\n  set ariaDescribedBy(value: string) {\n    this._ariaDescribedBy = value;\n    this.select?.searchInput.nativeElement.setAttribute(\"aria-describedby\", value);\n  }\n  private _ariaDescribedBy: string;\n\n  /**Implemented as part of BitFormFieldControl */\n  get labelForId() {\n    return this.searchInputId;\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding() @Input() id = `bit-multi-select-${nextId++}`;\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding(\"attr.required\")\n  @Input()\n  get required() {\n    return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n  }\n  set required(value: any) {\n    this._required = value != null && value !== false;\n  }\n  private _required: boolean;\n\n  /**Implemented as part of BitFormFieldControl */\n  get hasError() {\n    return this.ngControl?.status === \"INVALID\" && this.ngControl?.touched;\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  get error(): [string, any] {\n    const key = Object.keys(this.ngControl?.errors)[0];\n    return [key, this.ngControl?.errors[key]];\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { MultiSelectComponent } from \"./multi-select.component\";\n\n@NgModule({\n  imports: [MultiSelectComponent],\n  exports: [MultiSelectComponent],\n})\nexport class MultiSelectModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Directive, EventEmitter, Input, Output } from \"@angular/core\";\nimport { RouterLink, RouterLinkActive } from \"@angular/router\";\n\n/**\n * `NavGroupComponent` builds upon `NavItemComponent`. This class represents the properties that are passed down to `NavItemComponent`.\n */\n@Directive()\nexport abstract class NavBaseComponent {\n  /**\n   * Text to display in main content\n   */\n  @Input() text: string;\n\n  /**\n   * `aria-label` for main content\n   */\n  @Input() ariaLabel: string;\n\n  /**\n   * Optional icon, e.g. `\"bwi-collection\"`\n   */\n  @Input() icon: string;\n\n  /**\n   * Optional route to be passed to internal `routerLink`. If not provided, the nav component will render as a button.\n   *\n   * See: {@link RouterLink.routerLink}\n   *\n   * ---\n   *\n   * We can't name this \"routerLink\" because Angular will mount the `RouterLink` directive.\n   *\n   * See: {@link https://github.com/angular/angular/issues/24482}\n   */\n  @Input() route?: RouterLink[\"routerLink\"];\n\n  /**\n   * Passed to internal `routerLink`\n   *\n   * See {@link RouterLink.relativeTo}\n   */\n  @Input() relativeTo?: RouterLink[\"relativeTo\"];\n\n  /**\n   * Passed to internal `routerLink`\n   *\n   * See {@link RouterLinkActive.routerLinkActiveOptions}\n   */\n  @Input() routerLinkActiveOptions?: RouterLinkActive[\"routerLinkActiveOptions\"] = {\n    paths: \"subset\",\n    queryParams: \"ignored\",\n    fragment: \"ignored\",\n    matrixParams: \"ignored\",\n  };\n\n  /**\n   * If this item is used within a tree, set `variant` to `\"tree\"`\n   */\n  @Input() variant: \"default\" | \"tree\" = \"default\";\n\n  /**\n   * Depth level when nested inside of a `'tree'` variant\n   */\n  @Input() treeDepth = 0;\n\n  /**\n   * If `true`, do not change styles when nav item is active.\n   */\n  @Input() hideActiveStyles = false;\n\n  /**\n   * Fires when main content is clicked\n   */\n  @Output() mainContentClicked: EventEmitter<MouseEvent> = new EventEmitter();\n}\n","<div *ngIf=\"sideNavService.open$ | async\" class=\"tw-h-px tw-w-full tw-bg-secondary-300\"></div>\n","import { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\n\nimport { SideNavService } from \"./side-nav.service\";\n\n@Component({\n  selector: \"bit-nav-divider\",\n  templateUrl: \"./nav-divider.component.html\",\n  standalone: true,\n  imports: [CommonModule],\n})\nexport class NavDividerComponent {\n  constructor(protected sideNavService: SideNavService) {}\n}\n","<!-- This a higher order component that composes `NavItemComponent`  -->\n<ng-container *ngIf=\"!hideIfEmpty || nestedNavComponents.length > 0\">\n  <bit-nav-item\n    [text]=\"text\"\n    [icon]=\"icon\"\n    [route]=\"route\"\n    [relativeTo]=\"relativeTo\"\n    [routerLinkActiveOptions]=\"routerLinkActiveOptions\"\n    [variant]=\"variant\"\n    [treeDepth]=\"treeDepth\"\n    (mainContentClicked)=\"handleMainContentClicked()\"\n    [ariaLabel]=\"ariaLabel\"\n    [hideActiveStyles]=\"parentHideActiveStyles\"\n  >\n    <ng-template #button>\n      <button\n        type=\"button\"\n        class=\"tw-ml-auto\"\n        [bitIconButton]=\"\n          open ? 'bwi-angle-up' : variant === 'tree' ? 'bwi-angle-right' : 'bwi-angle-down'\n        \"\n        [buttonType]=\"'light'\"\n        (click)=\"toggle($event)\"\n        size=\"small\"\n        [title]=\"'toggleCollapse' | i18n\"\n        aria-haspopup=\"true\"\n        [attr.aria-expanded]=\"open.toString()\"\n        [attr.aria-controls]=\"contentId\"\n        [attr.aria-label]=\"['toggleCollapse' | i18n, text].join(' ')\"\n      ></button>\n    </ng-template>\n\n    <!-- Show toggle to the left for trees otherwise to the right -->\n    <ng-container slot=\"start\" *ngIf=\"variant === 'tree'\">\n      <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n    </ng-container>\n    <ng-container slot=\"end\">\n      <ng-content select=\"[slot=end]\"></ng-content>\n      <ng-container *ngIf=\"variant !== 'tree'\">\n        <ng-container *ngTemplateOutlet=\"button\"></ng-container>\n      </ng-container>\n    </ng-container>\n  </bit-nav-item>\n\n  <!-- [attr.aria-controls] of the above button expects a unique ID on the controlled element -->\n  <ng-container *ngIf=\"sideNavService.open$ | async\">\n    <div\n      *ngIf=\"open\"\n      [attr.id]=\"contentId\"\n      [attr.aria-label]=\"[text, 'submenu' | i18n].join(' ')\"\n      role=\"group\"\n    >\n      <ng-content></ng-content>\n    </div>\n  </ng-container>\n</ng-container>\n","import { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentInit,\n  booleanAttribute,\n  Component,\n  ContentChildren,\n  EventEmitter,\n  Input,\n  Optional,\n  Output,\n  QueryList,\n  SkipSelf,\n} from \"@angular/core\";\n\nimport { IconButtonModule } from \"../icon-button\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nimport { NavBaseComponent } from \"./nav-base.component\";\nimport { NavGroupAbstraction, NavItemComponent } from \"./nav-item.component\";\nimport { SideNavService } from \"./side-nav.service\";\n\n@Component({\n  selector: \"bit-nav-group\",\n  templateUrl: \"./nav-group.component.html\",\n  providers: [\n    { provide: NavBaseComponent, useExisting: NavGroupComponent },\n    { provide: NavGroupAbstraction, useExisting: NavGroupComponent },\n  ],\n  standalone: true,\n  imports: [CommonModule, NavItemComponent, IconButtonModule, I18nPipe],\n})\nexport class NavGroupComponent extends NavBaseComponent implements AfterContentInit {\n  @ContentChildren(NavBaseComponent, {\n    descendants: true,\n  })\n  nestedNavComponents!: QueryList<NavBaseComponent>;\n\n  /** When the side nav is open, the parent nav item should not show active styles when open. */\n  protected get parentHideActiveStyles(): boolean {\n    return this.hideActiveStyles || (this.open && this.sideNavService.open);\n  }\n\n  /**\n   * UID for `[attr.aria-controls]`\n   */\n  protected contentId = Math.random().toString(36).substring(2);\n\n  /**\n   * Is `true` if the expanded content is visible\n   */\n  @Input()\n  open = false;\n\n  /**\n   * Automatically hide the nav group if there are no child buttons\n   */\n  @Input({ transform: booleanAttribute })\n  hideIfEmpty = false;\n\n  @Output()\n  openChange = new EventEmitter<boolean>();\n\n  constructor(\n    protected sideNavService: SideNavService,\n    @Optional() @SkipSelf() private parentNavGroup: NavGroupComponent,\n  ) {\n    super();\n  }\n\n  setOpen(isOpen: boolean) {\n    this.open = isOpen;\n    this.openChange.emit(this.open);\n    this.open && this.parentNavGroup?.setOpen(this.open);\n  }\n\n  protected toggle(event?: MouseEvent) {\n    event?.stopPropagation();\n    this.setOpen(!this.open);\n  }\n\n  /**\n   * - For any nested NavGroupComponents or NavItemComponents, increment the `treeDepth` by 1.\n   */\n  private initNestedStyles() {\n    if (this.variant !== \"tree\") {\n      return;\n    }\n    [...this.nestedNavComponents].forEach((navGroupOrItem) => {\n      navGroupOrItem.treeDepth += 1;\n    });\n  }\n\n  protected handleMainContentClicked() {\n    if (!this.sideNavService.open) {\n      if (!this.route) {\n        this.sideNavService.setOpen();\n      }\n      this.open = true;\n    } else {\n      this.toggle();\n    }\n    this.mainContentClicked.emit();\n  }\n\n  ngAfterContentInit(): void {\n    this.initNestedStyles();\n  }\n}\n","<ng-container\n  *ngIf=\"{\n    open: sideNavService.open$ | async,\n  } as data\"\n>\n  <div\n    *ngIf=\"data.open || icon\"\n    class=\"tw-relative\"\n    [ngClass]=\"[\n      showActiveStyles\n        ? 'tw-bg-background-alt4'\n        : 'tw-bg-background-alt3 hover:tw-bg-primary-300/60',\n      fvwStyles$ | async,\n    ]\"\n  >\n    <div\n      [ngStyle]=\"{\n        'padding-left': data.open ? (variant === 'tree' ? 2.5 : 1) + treeDepth * 1.5 + 'rem' : '0',\n      }\"\n      class=\"tw-relative tw-flex\"\n    >\n      <div [ngClass]=\"[variant === 'tree' ? 'tw-py-1' : 'tw-py-2']\">\n        <div\n          #slotStart\n          class=\"[&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:!tw-text-alt2\"\n        >\n          <ng-content select=\"[slot=start]\"></ng-content>\n        </div>\n        <!-- Default content for #slotStart (for consistent sizing) -->\n        <div\n          *ngIf=\"slotStart.childElementCount === 0\"\n          [ngClass]=\"{\n            'tw-w-0': variant !== 'tree',\n          }\"\n        >\n          <button\n            type=\"button\"\n            class=\"tw-invisible\"\n            [bitIconButton]=\"'bwi-angle-down'\"\n            size=\"small\"\n            aria-hidden=\"true\"\n          ></button>\n        </div>\n      </div>\n\n      <ng-container *ngIf=\"route; then isAnchor; else isButton\"></ng-container>\n\n      <!-- Main content of `NavItem` -->\n      <ng-template #anchorAndButtonContent>\n        <div\n          [title]=\"text\"\n          class=\"tw-truncate\"\n          [ngClass]=\"[\n            variant === 'tree' ? 'tw-py-1' : 'tw-py-2',\n            data.open ? 'tw-pr-4' : 'tw-text-center',\n          ]\"\n        >\n          <i\n            class=\"bwi bwi-fw tw-text-alt2 tw-mx-1 {{ icon }}\"\n            [attr.aria-hidden]=\"data.open\"\n            [attr.aria-label]=\"text\"\n          ></i\n          ><span\n            *ngIf=\"data.open\"\n            [ngClass]=\"showActiveStyles ? 'tw-font-bold' : 'tw-font-semibold'\"\n            >{{ text }}</span\n          >\n        </div>\n      </ng-template>\n\n      <!-- Show if a value was passed to `this.to` -->\n      <ng-template #isAnchor>\n        <!-- The `fvw` class passes focus to `this.focusVisibleWithin$` -->\n        <!-- The following `class` field should match the `#isButton` class field below -->\n        <a\n          class=\"fvw tw-w-full tw-truncate tw-border-none tw-bg-transparent tw-p-0 tw-text-start !tw-text-alt2 hover:tw-text-alt2 hover:tw-no-underline focus:tw-outline-none\"\n          [routerLink]=\"route\"\n          [relativeTo]=\"relativeTo\"\n          [attr.aria-label]=\"ariaLabel || text\"\n          routerLinkActive\n          [routerLinkActiveOptions]=\"routerLinkActiveOptions\"\n          [ariaCurrentWhenActive]=\"'page'\"\n          (isActiveChange)=\"setIsActive($event)\"\n          (click)=\"mainContentClicked.emit()\"\n        >\n          <ng-container *ngTemplateOutlet=\"anchorAndButtonContent\"></ng-container>\n        </a>\n      </ng-template>\n\n      <!-- Show if `this.to` is falsy -->\n      <ng-template #isButton>\n        <!-- Class field should match `#isAnchor` class field above -->\n        <button\n          type=\"button\"\n          class=\"fvw tw-w-full tw-truncate tw-border-none tw-bg-transparent tw-p-0 tw-text-start !tw-text-alt2 hover:tw-text-alt2 hover:tw-no-underline focus:tw-outline-none\"\n          (click)=\"mainContentClicked.emit()\"\n        >\n          <ng-container *ngTemplateOutlet=\"anchorAndButtonContent\"></ng-container>\n        </button>\n      </ng-template>\n\n      <div\n        *ngIf=\"data.open\"\n        class=\"tw-flex -tw-ml-3 tw-pr-4 tw-gap-1 [&>*:focus-visible::before]:!tw-ring-text-alt2 [&>*:hover]:!tw-border-text-alt2 [&>*]:tw-text-alt2 empty:tw-hidden\"\n        [ngClass]=\"[variant === 'tree' ? 'tw-py-1' : 'tw-py-2']\"\n      >\n        <ng-content select=\"[slot=end]\"></ng-content>\n      </div>\n    </div>\n  </div>\n</ng-container>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, HostListener, Input, Optional } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\nimport { BehaviorSubject, map } from \"rxjs\";\n\nimport { IconButtonModule } from \"../icon-button\";\n\nimport { NavBaseComponent } from \"./nav-base.component\";\nimport { SideNavService } from \"./side-nav.service\";\n\n// Resolves a circular dependency between `NavItemComponent` and `NavItemGroup` when using standalone components.\nexport abstract class NavGroupAbstraction {\n  abstract setOpen(open: boolean): void;\n}\n\n@Component({\n  selector: \"bit-nav-item\",\n  templateUrl: \"./nav-item.component.html\",\n  providers: [{ provide: NavBaseComponent, useExisting: NavItemComponent }],\n  standalone: true,\n  imports: [CommonModule, IconButtonModule, RouterModule],\n})\nexport class NavItemComponent extends NavBaseComponent {\n  /** Forces active styles to be shown, regardless of the `routerLinkActiveOptions` */\n  @Input() forceActiveStyles? = false;\n\n  /**\n   * Is `true` if `to` matches the current route\n   */\n  private _isActive = false;\n  protected setIsActive(isActive: boolean) {\n    this._isActive = isActive;\n    if (this._isActive && this.parentNavGroup) {\n      this.parentNavGroup.setOpen(true);\n    }\n  }\n  protected get showActiveStyles() {\n    return this.forceActiveStyles || (this._isActive && !this.hideActiveStyles);\n  }\n\n  /**\n   * The design spec calls for the an outline to wrap the entire element when the template's anchor/button has :focus-visible.\n   * Usually, we would use :focus-within for this. However, that matches when a child element has :focus instead of :focus-visible.\n   *\n   * Currently, the browser does not have a pseudo selector that combines these two, e.g. :focus-visible-within (WICG/focus-visible#151)\n   * To make our own :focus-visible-within functionality, we use event delegation on the host and manually check if the focus target (denoted with the .fvw class) matches :focus-visible. We then map that state to some styles, so the entire component can have an outline.\n   */\n  protected focusVisibleWithin$ = new BehaviorSubject(false);\n  protected fvwStyles$ = this.focusVisibleWithin$.pipe(\n    map((value) =>\n      value ? \"tw-z-10 tw-rounded tw-outline-none tw-ring tw-ring-inset tw-ring-text-alt2\" : \"\",\n    ),\n  );\n  @HostListener(\"focusin\", [\"$event.target\"])\n  onFocusIn(target: HTMLElement) {\n    this.focusVisibleWithin$.next(target.matches(\".fvw:focus-visible\"));\n  }\n  @HostListener(\"focusout\")\n  onFocusOut() {\n    this.focusVisibleWithin$.next(false);\n  }\n\n  constructor(\n    protected sideNavService: SideNavService,\n    @Optional() private parentNavGroup: NavGroupAbstraction,\n  ) {\n    super();\n  }\n}\n","<div *ngIf=\"sideNavService.open\" class=\"tw-sticky tw-top-0 tw-z-50\">\n  <a\n    [routerLink]=\"route\"\n    class=\"tw-px-5 tw-pb-5 tw-pt-7 tw-block tw-bg-background-alt3 tw-outline-none focus-visible:tw-ring focus-visible:tw-ring-inset focus-visible:tw-ring-text-alt2\"\n    [attr.aria-label]=\"label\"\n    [title]=\"label\"\n    routerLinkActive\n    [ariaCurrentWhenActive]=\"'page'\"\n  >\n    <bit-icon [icon]=\"openIcon\"></bit-icon>\n  </a>\n</div>\n<bit-nav-item\n  class=\"tw-block tw-pt-7\"\n  [hideActiveStyles]=\"true\"\n  [route]=\"route\"\n  [icon]=\"closedIcon\"\n  *ngIf=\"!sideNavService.open\"\n  [text]=\"label\"\n></bit-nav-item>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { RouterLinkActive, RouterLink } from \"@angular/router\";\n\nimport { Icon } from \"../icon\";\nimport { BitIconComponent } from \"../icon/icon.component\";\n\nimport { NavItemComponent } from \"./nav-item.component\";\nimport { SideNavService } from \"./side-nav.service\";\n\n@Component({\n  selector: \"bit-nav-logo\",\n  templateUrl: \"./nav-logo.component.html\",\n  standalone: true,\n  imports: [NgIf, RouterLinkActive, RouterLink, BitIconComponent, NavItemComponent],\n})\nexport class NavLogoComponent {\n  /** Icon that is displayed when the side nav is closed */\n  @Input() closedIcon = \"bwi-shield\";\n\n  /** Icon that is displayed when the side nav is open */\n  @Input({ required: true }) openIcon: Icon;\n\n  /**\n   * Route to be passed to internal `routerLink`\n   */\n  @Input({ required: true }) route: string | any[];\n\n  /** Passed to `attr.aria-label` and `attr.title` */\n  @Input({ required: true }) label: string;\n\n  constructor(protected sideNavService: SideNavService) {}\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { NavDividerComponent } from \"./nav-divider.component\";\nimport { NavGroupComponent } from \"./nav-group.component\";\nimport { NavItemComponent } from \"./nav-item.component\";\nimport { NavLogoComponent } from \"./nav-logo.component\";\nimport { SideNavComponent } from \"./side-nav.component\";\n\n@NgModule({\n  imports: [\n    NavDividerComponent,\n    NavGroupComponent,\n    NavItemComponent,\n    NavLogoComponent,\n    SideNavComponent,\n  ],\n  exports: [\n    NavDividerComponent,\n    NavGroupComponent,\n    NavItemComponent,\n    NavLogoComponent,\n    SideNavComponent,\n  ],\n})\nexport class NavigationModule {}\n","<nav\n  *ngIf=\"{\n    open: sideNavService.open$ | async,\n    isOverlay: sideNavService.isOverlay$ | async,\n  } as data\"\n  id=\"bit-side-nav\"\n  class=\"tw-fixed md:tw-sticky tw-inset-y-0 tw-left-0 tw-z-30 tw-flex tw-h-screen tw-flex-col tw-overscroll-none tw-overflow-auto tw-bg-background-alt3 tw-outline-none\"\n  [ngClass]=\"{ 'tw-w-60': data.open }\"\n  [ngStyle]=\"\n    variant === 'secondary' && {\n      '--color-text-alt2': 'var(--color-text-main)',\n      '--color-background-alt3': 'var(--color-secondary-100)',\n      '--color-background-alt4': 'var(--color-secondary-300)',\n    }\n  \"\n  [cdkTrapFocus]=\"data.isOverlay\"\n  [attr.role]=\"data.isOverlay ? 'dialog' : null\"\n  [attr.aria-modal]=\"data.isOverlay ? 'true' : null\"\n  (keydown)=\"handleKeyDown($event)\"\n>\n  <ng-content></ng-content>\n  <div class=\"tw-sticky tw-bottom-0 tw-left-0 tw-z-20 tw-mt-auto tw-w-full tw-bg-background-alt3\">\n    <bit-nav-divider></bit-nav-divider>\n    <ng-container *ngIf=\"data.open\">\n      <ng-content select=\"[slot=footer]\"></ng-content>\n    </ng-container>\n    <div class=\"tw-mx-0.5 tw-my-4 tw-w-[3.75rem]\">\n      <button\n        #toggleButton\n        type=\"button\"\n        class=\"tw-mx-auto tw-block tw-max-w-fit\"\n        [bitIconButton]=\"data.open ? 'bwi-angle-left' : 'bwi-angle-right'\"\n        buttonType=\"light\"\n        size=\"small\"\n        (click)=\"sideNavService.toggle()\"\n        [attr.aria-label]=\"'toggleSideNavigation' | i18n\"\n        [attr.aria-expanded]=\"data.open\"\n        aria-controls=\"bit-side-nav\"\n      ></button>\n    </div>\n  </div>\n</nav>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CdkTrapFocus } from \"@angular/cdk/a11y\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, ElementRef, Input, ViewChild } from \"@angular/core\";\n\nimport { BitIconButtonComponent } from \"../icon-button/icon-button.component\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nimport { NavDividerComponent } from \"./nav-divider.component\";\nimport { SideNavService } from \"./side-nav.service\";\n\nexport type SideNavVariant = \"primary\" | \"secondary\";\n\n@Component({\n  selector: \"bit-side-nav\",\n  templateUrl: \"side-nav.component.html\",\n  standalone: true,\n  imports: [CommonModule, CdkTrapFocus, NavDividerComponent, BitIconButtonComponent, I18nPipe],\n})\nexport class SideNavComponent {\n  @Input() variant: SideNavVariant = \"primary\";\n\n  @ViewChild(\"toggleButton\", { read: ElementRef, static: true })\n  private toggleButton: ElementRef<HTMLButtonElement>;\n\n  constructor(protected sideNavService: SideNavService) {}\n\n  protected handleKeyDown = (event: KeyboardEvent) => {\n    if (event.key === \"Escape\") {\n      this.sideNavService.setClose();\n      this.toggleButton?.nativeElement.focus();\n      return false;\n    }\n\n    return true;\n  };\n}\n","import { Injectable } from \"@angular/core\";\nimport { BehaviorSubject, Observable, combineLatest, fromEvent, map, startWith } from \"rxjs\";\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class SideNavService {\n  private _open$ = new BehaviorSubject<boolean>(!window.matchMedia(\"(max-width: 768px)\").matches);\n  open$ = this._open$.asObservable();\n\n  isOverlay$ = combineLatest([this.open$, media(\"(max-width: 768px)\")]).pipe(\n    map(([open, isSmallScreen]) => open && isSmallScreen),\n  );\n\n  get open() {\n    return this._open$.getValue();\n  }\n\n  setOpen() {\n    this._open$.next(true);\n  }\n\n  setClose() {\n    this._open$.next(false);\n  }\n\n  toggle() {\n    const curr = this._open$.getValue();\n    if (curr) {\n      this.setClose();\n    } else {\n      this.setOpen();\n    }\n  }\n}\n\nexport const media = (query: string): Observable<boolean> => {\n  const mediaQuery = window.matchMedia(query);\n  return fromEvent<MediaQueryList>(mediaQuery, \"change\").pipe(\n    startWith(mediaQuery),\n    map((list: MediaQueryList) => list.matches),\n  );\n};\n","import { Component, Input } from \"@angular/core\";\n\nimport { Icons } from \"..\";\nimport { BitIconComponent } from \"../icon/icon.component\";\n\n/**\n * Component for displaying a message when there are no items to display. Expects title, description and button slots.\n */\n@Component({\n  selector: \"bit-no-items\",\n  templateUrl: \"./no-items.component.html\",\n  standalone: true,\n  imports: [BitIconComponent],\n})\nexport class NoItemsComponent {\n  @Input() icon = Icons.Search;\n}\n","<div class=\"tw-mx-auto tw-flex tw-flex-col tw-items-center tw-justify-center tw-pt-6\">\n  <div class=\"tw-max-w-sm tw-flex tw-flex-col tw-items-center\">\n    <bit-icon [icon]=\"icon\" aria-hidden=\"true\"></bit-icon>\n    <h3 class=\"tw-font-semibold tw-text-center\">\n      <ng-content select=\"[slot=title]\"></ng-content>\n    </h3>\n    <p class=\"tw-text-center\">\n      <ng-content select=\"[slot=description]\"></ng-content>\n    </p>\n  </div>\n  <div class=\"tw-space-x-2\">\n    <ng-content select=\"[slot=button]\"></ng-content>\n  </div>\n</div>\n","import { NgModule } from \"@angular/core\";\n\nimport { NoItemsComponent } from \"./no-items.component\";\n\n@NgModule({\n  imports: [NoItemsComponent],\n  exports: [NoItemsComponent],\n})\nexport class NoItemsModule {}\n","import { ConnectedPosition } from \"@angular/cdk/overlay\";\n\nconst ORIGIN_OFFSET_PX = 6;\nconst OVERLAY_OFFSET_PX = 24;\n\nexport type PositionIdentifier =\n  | \"right-start\"\n  | \"right-center\"\n  | \"right-end\"\n  | \"left-start\"\n  | \"left-center\"\n  | \"left-end\"\n  | \"below-start\"\n  | \"below-center\"\n  | \"below-end\"\n  | \"above-start\"\n  | \"above-center\"\n  | \"above-end\";\n\nexport interface DefaultPosition extends ConnectedPosition {\n  id: PositionIdentifier;\n}\n\nexport const defaultPositions: DefaultPosition[] = [\n  /**\n   * The order of these positions matters. The Popover component will use\n   * the first position that fits within the viewport.\n   */\n\n  // Popover opens to right of trigger\n  {\n    id: \"right-start\",\n    offsetX: ORIGIN_OFFSET_PX,\n    offsetY: -OVERLAY_OFFSET_PX,\n    originX: \"end\",\n    originY: \"center\",\n    overlayX: \"start\",\n    overlayY: \"top\",\n    panelClass: [\"bit-popover-right\", \"bit-popover-right-start\"],\n  },\n  {\n    id: \"right-center\",\n    offsetX: ORIGIN_OFFSET_PX,\n    originX: \"end\",\n    originY: \"center\",\n    overlayX: \"start\",\n    overlayY: \"center\",\n    panelClass: [\"bit-popover-right\", \"bit-popover-right-center\"],\n  },\n  {\n    id: \"right-end\",\n    offsetX: ORIGIN_OFFSET_PX,\n    offsetY: OVERLAY_OFFSET_PX,\n    originX: \"end\",\n    originY: \"center\",\n    overlayX: \"start\",\n    overlayY: \"bottom\",\n    panelClass: [\"bit-popover-right\", \"bit-popover-right-end\"],\n  },\n  // ... to left of trigger\n  {\n    id: \"left-start\",\n    offsetX: -ORIGIN_OFFSET_PX,\n    offsetY: -OVERLAY_OFFSET_PX,\n    originX: \"start\",\n    originY: \"center\",\n    overlayX: \"end\",\n    overlayY: \"top\",\n    panelClass: [\"bit-popover-left\", \"bit-popover-left-start\"],\n  },\n  {\n    id: \"left-center\",\n    offsetX: -ORIGIN_OFFSET_PX,\n    originX: \"start\",\n    originY: \"center\",\n    overlayX: \"end\",\n    overlayY: \"center\",\n    panelClass: [\"bit-popover-left\", \"bit-popover-left-center\"],\n  },\n  {\n    id: \"left-end\",\n    offsetX: -ORIGIN_OFFSET_PX,\n    offsetY: OVERLAY_OFFSET_PX,\n    originX: \"start\",\n    originY: \"center\",\n    overlayX: \"end\",\n    overlayY: \"bottom\",\n    panelClass: [\"bit-popover-left\", \"bit-popover-left-end\"],\n  },\n  // ... below trigger\n  {\n    id: \"below-center\",\n    offsetY: ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"bottom\",\n    overlayX: \"center\",\n    overlayY: \"top\",\n    panelClass: [\"bit-popover-below\", \"bit-popover-below-center\"],\n  },\n  {\n    id: \"below-start\",\n    offsetX: -OVERLAY_OFFSET_PX,\n    offsetY: ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"bottom\",\n    overlayX: \"start\",\n    overlayY: \"top\",\n    panelClass: [\"bit-popover-below\", \"bit-popover-below-start\"],\n  },\n  {\n    id: \"below-end\",\n    offsetX: OVERLAY_OFFSET_PX,\n    offsetY: ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"bottom\",\n    overlayX: \"end\",\n    overlayY: \"top\",\n    panelClass: [\"bit-popover-below\", \"bit-popover-below-end\"],\n  },\n  // ... above trigger\n  {\n    id: \"above-center\",\n    offsetY: -ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"top\",\n    overlayX: \"center\",\n    overlayY: \"bottom\",\n    panelClass: [\"bit-popover-above\", \"bit-popover-above-center\"],\n  },\n  {\n    id: \"above-start\",\n    offsetX: -OVERLAY_OFFSET_PX,\n    offsetY: -ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"top\",\n    overlayX: \"start\",\n    overlayY: \"bottom\",\n    panelClass: [\"bit-popover-above\", \"bit-popover-above-start\"],\n  },\n  {\n    id: \"above-end\",\n    offsetX: OVERLAY_OFFSET_PX,\n    offsetY: -ORIGIN_OFFSET_PX,\n    originX: \"center\",\n    originY: \"top\",\n    overlayX: \"end\",\n    overlayY: \"bottom\",\n    panelClass: [\"bit-popover-above\", \"bit-popover-above-end\"],\n  },\n];\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Overlay, OverlayConfig, OverlayRef } from \"@angular/cdk/overlay\";\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n  AfterViewInit,\n  Directive,\n  ElementRef,\n  HostBinding,\n  HostListener,\n  Input,\n  OnDestroy,\n  ViewContainerRef,\n} from \"@angular/core\";\nimport { Observable, Subscription, filter, mergeWith } from \"rxjs\";\n\nimport { defaultPositions } from \"./default-positions\";\nimport { PopoverComponent } from \"./popover.component\";\n\n@Directive({\n  selector: \"[bitPopoverTriggerFor]\",\n  standalone: true,\n  exportAs: \"popoverTrigger\",\n})\nexport class PopoverTriggerForDirective implements OnDestroy, AfterViewInit {\n  @Input()\n  @HostBinding(\"attr.aria-expanded\")\n  popoverOpen = false;\n\n  @Input(\"bitPopoverTriggerFor\")\n  popover: PopoverComponent;\n\n  @Input(\"position\")\n  position: string;\n\n  private overlayRef: OverlayRef;\n  private closedEventsSub: Subscription;\n\n  get positions() {\n    if (!this.position) {\n      return defaultPositions;\n    }\n\n    const preferredPosition = defaultPositions.find((position) => position.id === this.position);\n\n    if (preferredPosition) {\n      return [preferredPosition, ...defaultPositions];\n    }\n\n    return defaultPositions;\n  }\n\n  get defaultPopoverConfig(): OverlayConfig {\n    return {\n      hasBackdrop: true,\n      backdropClass: \"cdk-overlay-transparent-backdrop\",\n      scrollStrategy: this.overlay.scrollStrategies.reposition(),\n      positionStrategy: this.overlay\n        .position()\n        .flexibleConnectedTo(this.elementRef)\n        .withPositions(this.positions)\n        .withLockedPosition(true)\n        .withFlexibleDimensions(false)\n        .withPush(true),\n    };\n  }\n\n  constructor(\n    private elementRef: ElementRef<HTMLElement>,\n    private viewContainerRef: ViewContainerRef,\n    private overlay: Overlay,\n  ) {}\n\n  @HostListener(\"click\")\n  togglePopover() {\n    if (this.popoverOpen) {\n      this.closePopover();\n    } else {\n      this.openPopover();\n    }\n  }\n\n  private openPopover() {\n    this.popoverOpen = true;\n    this.overlayRef = this.overlay.create(this.defaultPopoverConfig);\n\n    const templatePortal = new TemplatePortal(this.popover.templateRef, this.viewContainerRef);\n\n    this.overlayRef.attach(templatePortal);\n    this.closedEventsSub = this.getClosedEvents().subscribe(() => {\n      this.destroyPopover();\n    });\n  }\n\n  private getClosedEvents(): Observable<any> {\n    const detachments = this.overlayRef.detachments();\n    const escKey = this.overlayRef\n      .keydownEvents()\n      .pipe(filter((event: KeyboardEvent) => event.key === \"Escape\"));\n    const backdrop = this.overlayRef.backdropClick();\n    const popoverClosed = this.popover.closed;\n\n    return detachments.pipe(mergeWith(escKey, backdrop, popoverClosed));\n  }\n\n  private destroyPopover() {\n    if (this.overlayRef == null || !this.popoverOpen) {\n      return;\n    }\n\n    this.popoverOpen = false;\n    this.disposeAll();\n  }\n\n  private disposeAll() {\n    this.closedEventsSub?.unsubscribe();\n    this.overlayRef?.dispose();\n  }\n\n  ngAfterViewInit() {\n    if (this.popoverOpen) {\n      this.openPopover();\n    }\n  }\n\n  ngOnDestroy() {\n    this.disposeAll();\n  }\n\n  closePopover() {\n    this.destroyPopover();\n  }\n}\n","<ng-template>\n  <section cdkTrapFocus cdkTrapFocusAutoCapture class=\"tw-relative\" role=\"dialog\" aria-modal=\"true\">\n    <div class=\"tw-overflow-hidden tw-rounded-md tw-border tw-border-solid tw-border-secondary-300\">\n      <div\n        class=\"tw-relative tw-z-20 tw-w-72 tw-break-words tw-bg-background tw-pb-4 tw-pt-2 tw-text-main\"\n      >\n        <div class=\"tw-mb-1 tw-mr-2 tw-flex tw-items-start tw-justify-between tw-gap-4 tw-pl-4\">\n          <h2 class=\"tw-mb-0 tw-mt-1 tw-text-base tw-font-semibold\">\n            {{ title }}\n          </h2>\n          <button\n            type=\"button\"\n            bitIconButton=\"bwi-close\"\n            [attr.title]=\"'close' | i18n\"\n            [attr.aria-label]=\"'close' | i18n\"\n            (click)=\"closed.emit()\"\n          ></button>\n        </div>\n        <div class=\"tw-px-4\">\n          <ng-content></ng-content>\n        </div>\n      </div>\n    </div>\n    <div class=\"bit-popover-arrow\"></div>\n  </section>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { A11yModule } from \"@angular/cdk/a11y\";\nimport { Component, EventEmitter, Input, Output, TemplateRef, ViewChild } from \"@angular/core\";\n\nimport { IconButtonModule } from \"../icon-button/icon-button.module\";\nimport { SharedModule } from \"../shared/shared.module\";\n\n@Component({\n  standalone: true,\n  selector: \"bit-popover\",\n  imports: [A11yModule, IconButtonModule, SharedModule],\n  templateUrl: \"./popover.component.html\",\n  exportAs: \"popoverComponent\",\n})\nexport class PopoverComponent {\n  @ViewChild(TemplateRef) templateRef: TemplateRef<any>;\n  @Input() title = \"\";\n  @Output() closed = new EventEmitter();\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { PopoverTriggerForDirective } from \"./popover-trigger-for.directive\";\nimport { PopoverComponent } from \"./popover.component\";\n\n@NgModule({\n  imports: [PopoverComponent, PopoverTriggerForDirective],\n  exports: [PopoverComponent, PopoverTriggerForDirective],\n})\nexport class PopoverModule {}\n","<div [ngClass]=\"outerBarStyles\">\n  <div\n    [ngClass]=\"innerBarStyles\"\n    role=\"progressbar\"\n    aria-valuemin=\"0\"\n    aria-valuemax=\"100\"\n    attr.aria-valuenow=\"{{ barWidth }}\"\n    [ngStyle]=\"{ width: barWidth + '%' }\"\n  >\n    <div\n      *ngIf=\"displayText\"\n      class=\"tw-flex tw-h-full tw-flex-wrap tw-items-center tw-overflow-hidden\"\n    >\n      <!-- If text is too long to fit, wrap it below to hide -->\n      <div class=\"tw-h-full\">&nbsp;</div>\n      <div class=\"tw-pr-1\">{{ textContent }}</div>\n    </div>\n  </div>\n</div>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\ntype SizeTypes = \"small\" | \"default\" | \"large\";\ntype BackgroundTypes = \"danger\" | \"primary\" | \"success\" | \"warning\";\n\nconst SizeClasses: Record<SizeTypes, string[]> = {\n  small: [\"tw-h-1\"],\n  default: [\"tw-h-4\"],\n  large: [\"tw-h-6\"],\n};\n\nconst BackgroundClasses: Record<BackgroundTypes, string[]> = {\n  danger: [\"tw-bg-danger-600\"],\n  primary: [\"tw-bg-primary-600\"],\n  success: [\"tw-bg-success-600\"],\n  warning: [\"tw-bg-warning-600\"],\n};\n\n@Component({\n  selector: \"bit-progress\",\n  templateUrl: \"./progress.component.html\",\n  standalone: true,\n  imports: [CommonModule],\n})\nexport class ProgressComponent {\n  @Input() barWidth = 0;\n  @Input() bgColor: BackgroundTypes = \"primary\";\n  @Input() showText = true;\n  @Input() size: SizeTypes = \"default\";\n  @Input() text?: string;\n\n  get displayText() {\n    return this.showText && this.size !== \"small\";\n  }\n\n  get outerBarStyles() {\n    return [\"tw-overflow-hidden\", \"tw-rounded\", \"tw-bg-secondary-100\"].concat(\n      SizeClasses[this.size],\n    );\n  }\n\n  get innerBarStyles() {\n    return [\n      \"tw-flex\",\n      \"tw-justify-center\",\n      \"tw-items-center\",\n      \"tw-whitespace-nowrap\",\n      \"tw-text-xs\",\n      \"tw-font-semibold\",\n      \"tw-text-contrast\",\n      \"tw-transition-all\",\n    ]\n      .concat(SizeClasses[this.size])\n      .concat(BackgroundClasses[this.bgColor]);\n  }\n\n  get textContent() {\n    return this.text || this.barWidth + \"%\";\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { ProgressComponent } from \"./progress.component\";\n\n@NgModule({\n  imports: [ProgressComponent],\n  exports: [ProgressComponent],\n})\nexport class ProgressModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, HostBinding, Input, Optional, Self } from \"@angular/core\";\nimport { NgControl, Validators } from \"@angular/forms\";\n\nimport { BitFormControlAbstraction } from \"../form-control\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"input[type=radio][bitRadio]\",\n  template: \"\",\n  providers: [{ provide: BitFormControlAbstraction, useExisting: RadioInputComponent }],\n  standalone: true,\n})\nexport class RadioInputComponent implements BitFormControlAbstraction {\n  @HostBinding(\"attr.id\") @Input() id = `bit-radio-input-${nextId++}`;\n\n  @HostBinding(\"class\")\n  protected inputClasses = [\n    \"tw-appearance-none\",\n    \"tw-outline-none\",\n    \"tw-relative\",\n    \"tw-transition\",\n    \"tw-cursor-pointer\",\n    \"tw-inline-block\",\n    \"tw-rounded-full\",\n    \"tw-border\",\n    \"tw-border-solid\",\n    \"tw-border-secondary-600\",\n    \"tw-w-[1.12rem]\",\n    \"tw-h-[1.12rem]\",\n    \"tw-mr-1.5\",\n    \"tw-flex-none\", // Flexbox fix for bit-form-control\n\n    \"hover:tw-border-2\",\n    \"[&>label:hover]:tw-border-2\",\n\n    // if it exists, the parent form control handles focus\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-2\",\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-offset-2\",\n    \"[&:not(bit-form-control_*)]:focus-visible:tw-ring-primary-600\",\n\n    \"before:tw-content-['']\",\n    \"before:tw-transition\",\n    \"before:tw-block\",\n    \"before:tw-absolute\",\n    \"before:tw-rounded-full\",\n    \"before:tw-inset-[2px]\",\n\n    \"disabled:tw-cursor-auto\",\n    \"disabled:tw-bg-secondary-100\",\n    \"disabled:hover:tw-border\",\n\n    \"checked:tw-bg-text-contrast\",\n    \"checked:tw-border-primary-600\",\n    \"checked:tw-border-2\",\n\n    \"checked:hover:tw-border-2\",\n    \"checked:hover:tw-border-primary-700\",\n    \"checked:hover:before:tw-bg-primary-700\",\n    \"[&>label:hover]:checked:tw-bg-primary-700\",\n    \"[&>label:hover]:checked:tw-border-primary-700\",\n\n    \"checked:before:tw-bg-primary-600\",\n\n    \"checked:disabled:tw-border-secondary-600\",\n    \"checked:disabled:hover:tw-border-secondary-600\",\n    \"checked:disabled:hover:tw-border-2\",\n    \"checked:disabled:tw-bg-background\",\n\n    \"checked:disabled:hover:before:tw-bg-secondary-600\",\n    \"checked:disabled:before:tw-bg-secondary-600\",\n  ];\n\n  constructor(@Optional() @Self() private ngControl?: NgControl) {}\n\n  @HostBinding()\n  @Input()\n  get disabled() {\n    return this._disabled ?? this.ngControl?.disabled ?? false;\n  }\n  set disabled(value: any) {\n    this._disabled = value != null && value !== false;\n  }\n  private _disabled: boolean;\n\n  @Input()\n  get required() {\n    return (\n      this._required ?? this.ngControl?.control?.hasValidator(Validators.requiredTrue) ?? false\n    );\n  }\n  set required(value: any) {\n    this._required = value != null && value !== false;\n  }\n  private _required: boolean;\n\n  get hasError() {\n    return this.ngControl?.status === \"INVALID\" && this.ngControl?.touched;\n  }\n\n  get error(): [string, any] {\n    const key = Object.keys(this.ngControl.errors)[0];\n    return [key, this.ngControl.errors[key]];\n  }\n}\n","import { Component, HostBinding, Input } from \"@angular/core\";\n\nimport { FormControlModule } from \"../form-control/form-control.module\";\n\nimport { RadioGroupComponent } from \"./radio-group.component\";\nimport { RadioInputComponent } from \"./radio-input.component\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-radio-button\",\n  templateUrl: \"radio-button.component.html\",\n  standalone: true,\n  imports: [FormControlModule, RadioInputComponent],\n})\nexport class RadioButtonComponent {\n  @HostBinding(\"attr.id\") @Input() id = `bit-radio-button-${nextId++}`;\n  @HostBinding(\"class\") get classList() {\n    return [this.block ? \"tw-block\" : \"tw-inline-block\", \"tw-mb-1\"];\n  }\n\n  @Input() value: unknown;\n  @Input() disabled = false;\n\n  constructor(private groupComponent: RadioGroupComponent) {}\n\n  get inputId() {\n    return `${this.id}-input`;\n  }\n\n  get name() {\n    return this.groupComponent.name;\n  }\n\n  get selected() {\n    return this.groupComponent.selected === this.value;\n  }\n\n  get groupDisabled() {\n    return this.groupComponent.disabled;\n  }\n\n  get block() {\n    return this.groupComponent.block;\n  }\n\n  protected onInputChange() {\n    this.groupComponent.onInputChange(this.value);\n  }\n\n  protected onBlur() {\n    this.groupComponent.onBlur();\n  }\n}\n","<bit-form-control [inline]=\"!block\" disableMargin>\n  <input\n    type=\"radio\"\n    bitRadio\n    [id]=\"inputId\"\n    [disabled]=\"groupDisabled || disabled\"\n    [value]=\"value\"\n    [checked]=\"selected\"\n    (change)=\"onInputChange()\"\n    (blur)=\"onBlur()\"\n  />\n\n  <ng-content select=\"bit-label\" ngProjectAs=\"bit-label\"></ng-content>\n  <ng-content select=\"bit-hint\" ngProjectAs=\"bit-hint\"></ng-content>\n</bit-form-control>\n","import { NgModule } from \"@angular/core\";\n\nimport { FormControlModule } from \"../form-control\";\n\nimport { RadioButtonComponent } from \"./radio-button.component\";\nimport { RadioGroupComponent } from \"./radio-group.component\";\nimport { RadioInputComponent } from \"./radio-input.component\";\n\n@NgModule({\n  imports: [FormControlModule, RadioInputComponent, RadioButtonComponent, RadioGroupComponent],\n  exports: [FormControlModule, RadioInputComponent, RadioButtonComponent, RadioGroupComponent],\n})\nexport class RadioButtonModule {}\n","<ng-container *ngIf=\"label\">\n  <fieldset>\n    <legend class=\"tw-mb-1 tw-block tw-text-sm tw-font-semibold tw-text-main\">\n      <ng-content select=\"bit-label\"></ng-content>\n      <span *ngIf=\"required\" class=\"tw-text-xs tw-font-normal\"> ({{ \"required\" | i18n }})</span>\n    </legend>\n    <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n  </fieldset>\n</ng-container>\n\n<ng-container *ngIf=\"!label\">\n  <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n</ng-container>\n\n<ng-template #content>\n  <div>\n    <ng-content></ng-content>\n  </div>\n  <ng-content select=\"bit-hint\" ngProjectAs=\"bit-hint\"></ng-content>\n</ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf, NgTemplateOutlet } from \"@angular/common\";\nimport { Component, ContentChild, HostBinding, Input, Optional, Self } from \"@angular/core\";\nimport { ControlValueAccessor, NgControl, Validators } from \"@angular/forms\";\n\nimport { BitLabel } from \"../form-control/label.component\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-radio-group\",\n  templateUrl: \"radio-group.component.html\",\n  standalone: true,\n  imports: [NgIf, NgTemplateOutlet, I18nPipe],\n})\nexport class RadioGroupComponent implements ControlValueAccessor {\n  selected: unknown;\n  disabled = false;\n\n  private _name?: string;\n  @Input() get name() {\n    return this._name ?? this.ngControl?.name?.toString();\n  }\n  set name(value: string) {\n    this._name = value;\n  }\n\n  @Input() block = false;\n\n  @HostBinding(\"attr.role\") role = \"radiogroup\";\n  @HostBinding(\"attr.id\") @Input() id = `bit-radio-group-${nextId++}`;\n  @HostBinding(\"class\") classList = [\"tw-block\", \"tw-mb-4\"];\n\n  @ContentChild(BitLabel) protected label: BitLabel;\n\n  constructor(@Optional() @Self() private ngControl?: NgControl) {\n    if (ngControl != null) {\n      ngControl.valueAccessor = this;\n    }\n  }\n\n  get required() {\n    return this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n  }\n\n  // ControlValueAccessor\n  onChange: (value: unknown) => void;\n  onTouched: () => void;\n\n  writeValue(value: boolean): void {\n    this.selected = value;\n  }\n\n  registerOnChange(fn: (value: unknown) => void): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: () => void): void {\n    this.onTouched = fn;\n  }\n\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n  }\n\n  onInputChange(value: unknown) {\n    this.selected = value;\n    this.onChange(this.selected);\n  }\n\n  onBlur() {\n    this.onTouched();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, ElementRef, Input, ViewChild } from \"@angular/core\";\nimport {\n  ControlValueAccessor,\n  NG_VALUE_ACCESSOR,\n  ReactiveFormsModule,\n  FormsModule,\n} from \"@angular/forms\";\n\nimport { isBrowserSafariApi } from \"@bitwarden/platform\";\n\nimport { InputModule } from \"../input/input.module\";\nimport { FocusableElement } from \"../shared/focusable-element\";\nimport { I18nPipe } from \"../shared/i18n.pipe\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-search\",\n  templateUrl: \"./search.component.html\",\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      multi: true,\n      useExisting: SearchComponent,\n    },\n    {\n      provide: FocusableElement,\n      useExisting: SearchComponent,\n    },\n  ],\n  standalone: true,\n  imports: [InputModule, ReactiveFormsModule, FormsModule, I18nPipe],\n})\nexport class SearchComponent implements ControlValueAccessor, FocusableElement {\n  private notifyOnChange: (v: string) => void;\n  private notifyOnTouch: () => void;\n\n  @ViewChild(\"input\") private input: ElementRef<HTMLInputElement>;\n\n  protected id = `search-id-${nextId++}`;\n  protected searchText: string;\n  // Use `type=\"text\"` for Safari to improve rendering performance\n  protected inputType = isBrowserSafariApi() ? (\"text\" as const) : (\"search\" as const);\n\n  @Input() disabled: boolean;\n  @Input() placeholder: string;\n  @Input() autocomplete: string;\n\n  getFocusTarget() {\n    return this.input.nativeElement;\n  }\n\n  onChange(searchText: string) {\n    if (this.notifyOnChange != undefined) {\n      this.notifyOnChange(searchText);\n    }\n  }\n\n  onTouch() {\n    if (this.notifyOnTouch != undefined) {\n      this.notifyOnTouch();\n    }\n  }\n\n  registerOnChange(fn: (v: string) => void): void {\n    this.notifyOnChange = fn;\n  }\n\n  registerOnTouched(fn: () => void): void {\n    this.notifyOnTouch = fn;\n  }\n\n  writeValue(searchText: string): void {\n    this.searchText = searchText;\n  }\n\n  setDisabledState(isDisabled: boolean) {\n    this.disabled = isDisabled;\n  }\n}\n","export function isBrowserSafariApi(): boolean {\n  return (\n    navigator.userAgent.indexOf(\" Safari/\") !== -1 &&\n    navigator.userAgent.indexOf(\" Chrome/\") === -1 &&\n    navigator.userAgent.indexOf(\" Chromium/\") === -1\n  );\n}\n","<label class=\"tw-sr-only\" [for]=\"id\">{{ \"search\" | i18n }}</label>\n<div class=\"tw-relative tw-flex tw-items-center\">\n  <label\n    [for]=\"id\"\n    aria-hidden=\"true\"\n    class=\"tw-absolute tw-left-2 tw-z-20 !tw-mb-0 tw-cursor-text\"\n  >\n    <i class=\"bwi bwi-search bwi-fw tw-text-muted\"></i>\n  </label>\n  <input\n    #input\n    bitInput\n    [type]=\"inputType\"\n    [id]=\"id\"\n    [placeholder]=\"placeholder ?? ('search' | i18n)\"\n    class=\"tw-pl-9\"\n    [ngModel]=\"searchText\"\n    (ngModelChange)=\"onChange($event)\"\n    (blur)=\"onTouch()\"\n    [disabled]=\"disabled\"\n    [attr.autocomplete]=\"autocomplete\"\n  />\n</div>\n","import { NgModule } from \"@angular/core\";\n\nimport { SearchComponent } from \"./search.component\";\n\n@NgModule({\n  imports: [SearchComponent],\n  exports: [SearchComponent],\n})\nexport class SearchModule {}\n","import { Component } from \"@angular/core\";\n\nimport { TypographyModule } from \"../typography\";\n\n@Component({\n  standalone: true,\n  selector: \"bit-section-header\",\n  templateUrl: \"./section-header.component.html\",\n  imports: [TypographyModule],\n  host: {\n    class:\n      // apply bottom and x padding when a `bit-card` or `bit-item` is the immediate sibling, or nested in the immediate sibling\n      \"tw-block has-[+_*_bit-card]:tw-pb-1 has-[+_bit-card]:tw-pb-1 has-[+_*_bit-item]:tw-pb-1 has-[+_bit-item]:tw-pb-1 has-[+_*_bit-card]:tw-px-1 has-[+_bit-card]:tw-px-1 has-[+_*_bit-item]:tw-px-1 has-[+_bit-item]:tw-px-1\",\n  },\n})\nexport class SectionHeaderComponent {}\n","<div class=\"tw-flex tw-justify-between tw-items-end tw-gap-1\">\n  <div class=\"[&>*]:tw-mb-0 [&>*]:tw-text-main tw-flex tw-items-center tw-gap-1\">\n    <ng-content></ng-content>\n  </div>\n  <div class=\"tw-text-muted -tw-mb-0.5\">\n    <ng-content select=\"[slot=end]\"></ng-content>\n  </div>\n</div>\n","import { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"bit-section\",\n  standalone: true,\n  imports: [CommonModule],\n  template: `\n    <section\n      [ngClass]=\"{\n        'tw-mb-5 bit-compact:tw-mb-4 [&:not(bit-dialog_*):not(popup-page_*)]:md:tw-mb-12':\n          !disableMargin,\n      }\"\n    >\n      <ng-content></ng-content>\n    </section>\n  `,\n})\nexport class SectionComponent {\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, Input, booleanAttribute } from \"@angular/core\";\n\nimport { Option } from \"./option\";\n\n@Component({\n  selector: \"bit-option\",\n  template: `<ng-template><ng-content></ng-content></ng-template>`,\n  standalone: true,\n})\nexport class OptionComponent<T = unknown> implements Option<T> {\n  @Input()\n  icon?: string;\n\n  @Input({ required: true })\n  value: T;\n\n  @Input({ required: true })\n  label: string;\n\n  @Input({ transform: booleanAttribute })\n  disabled: boolean;\n}\n","<ng-select\n  [(ngModel)]=\"selectedOption\"\n  (ngModelChange)=\"onChange($event)\"\n  [disabled]=\"disabled\"\n  [placeholder]=\"placeholder\"\n  [items]=\"items\"\n  (blur)=\"onBlur()\"\n  [labelForId]=\"labelForId\"\n  [clearable]=\"false\"\n  (close)=\"onClose()\"\n  appendTo=\"body\"\n>\n  <ng-template ng-option-tmp let-item=\"item\">\n    <div class=\"tw-flex\" [title]=\"item.label\">\n      <div class=\"tw-mr-2 tw-flex-initial\">\n        <i *ngIf=\"item.icon != null\" class=\"bwi bwi-fw {{ item.icon }}\" aria-hidden=\"true\"></i>\n      </div>\n      <div class=\"tw-flex-1 tw-text-ellipsis tw-overflow-hidden\">\n        {{ item.label }}\n      </div>\n    </div>\n  </ng-template>\n</ng-select>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport {\n  Component,\n  ContentChildren,\n  HostBinding,\n  Input,\n  Optional,\n  QueryList,\n  Self,\n  ViewChild,\n  Output,\n  EventEmitter,\n} from \"@angular/core\";\nimport {\n  ControlValueAccessor,\n  NgControl,\n  Validators,\n  ReactiveFormsModule,\n  FormsModule,\n} from \"@angular/forms\";\nimport { NgSelectComponent, NgSelectModule } from \"@ng-select/ng-select\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\nimport { BitFormFieldControl } from \"../form-field\";\n\nimport { Option } from \"./option\";\nimport { OptionComponent } from \"./option.component\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-select\",\n  templateUrl: \"select.component.html\",\n  providers: [{ provide: BitFormFieldControl, useExisting: SelectComponent }],\n  standalone: true,\n  imports: [NgSelectModule, ReactiveFormsModule, FormsModule, NgIf],\n})\nexport class SelectComponent<T> implements BitFormFieldControl, ControlValueAccessor {\n  @ViewChild(NgSelectComponent) select: NgSelectComponent;\n\n  /** Optional: Options can be provided using an array input or using `bit-option` */\n  @Input() items: Option<T>[] = [];\n  @Input() placeholder = this.i18nService.t(\"selectPlaceholder\");\n  @Output() closed = new EventEmitter();\n\n  protected selectedValue: T;\n  protected selectedOption: Option<T>;\n  protected searchInputId = `bit-select-search-input-${nextId++}`;\n\n  private notifyOnChange?: (value: T) => void;\n  private notifyOnTouched?: () => void;\n\n  constructor(\n    private i18nService: I18nService,\n    @Optional() @Self() private ngControl?: NgControl,\n  ) {\n    if (ngControl != null) {\n      ngControl.valueAccessor = this;\n    }\n  }\n\n  @ContentChildren(OptionComponent)\n  protected set options(value: QueryList<OptionComponent<T>>) {\n    if (value == null || value.length == 0) {\n      return;\n    }\n    this.items = value.toArray();\n    this.selectedOption = this.findSelectedOption(this.items, this.selectedValue);\n  }\n\n  @HostBinding(\"class\") protected classes = [\"tw-block\", \"tw-w-full\", \"tw-h-full\"];\n\n  // Usings a separate getter for the HostBinding to get around an unexplained angular error\n  @HostBinding(\"attr.disabled\")\n  get disabledAttr() {\n    return this.disabled || null;\n  }\n  @Input()\n  get disabled() {\n    return this._disabled ?? this.ngControl?.disabled ?? false;\n  }\n  set disabled(value: any) {\n    this._disabled = value != null && value !== false;\n  }\n  private _disabled: boolean;\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  writeValue(obj: T): void {\n    this.selectedValue = obj;\n    this.selectedOption = this.findSelectedOption(this.items, this.selectedValue);\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnChange(fn: (value: T) => void): void {\n    this.notifyOnChange = fn;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  registerOnTouched(fn: any): void {\n    this.notifyOnTouched = fn;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  setDisabledState(isDisabled: boolean): void {\n    this.disabled = isDisabled;\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  protected onChange(option: Option<T> | null) {\n    if (!this.notifyOnChange) {\n      return;\n    }\n\n    this.notifyOnChange(option?.value);\n  }\n\n  /**Implemented as part of NG_VALUE_ACCESSOR */\n  protected onBlur() {\n    if (!this.notifyOnTouched) {\n      return;\n    }\n\n    this.notifyOnTouched();\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding(\"attr.aria-describedby\")\n  get ariaDescribedBy() {\n    return this._ariaDescribedBy;\n  }\n  set ariaDescribedBy(value: string) {\n    this._ariaDescribedBy = value;\n    this.select?.searchInput.nativeElement.setAttribute(\"aria-describedby\", value);\n  }\n  private _ariaDescribedBy: string;\n\n  /**Implemented as part of BitFormFieldControl */\n  get labelForId() {\n    return this.searchInputId;\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding() @Input() id = `bit-multi-select-${nextId++}`;\n\n  /**Implemented as part of BitFormFieldControl */\n  @HostBinding(\"attr.required\")\n  @Input()\n  get required() {\n    return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;\n  }\n  set required(value: any) {\n    this._required = value != null && value !== false;\n  }\n  private _required: boolean;\n\n  /**Implemented as part of BitFormFieldControl */\n  get hasError() {\n    return this.ngControl?.status === \"INVALID\" && this.ngControl?.touched;\n  }\n\n  /**Implemented as part of BitFormFieldControl */\n  get error(): [string, any] {\n    const key = Object.keys(this.ngControl?.errors)[0];\n    return [key, this.ngControl?.errors[key]];\n  }\n\n  private findSelectedOption(items: Option<T>[], value: T): Option<T> | undefined {\n    return items.find((item) => item.value === value);\n  }\n\n  /**Emits the closed event. */\n  protected onClose() {\n    this.closed.emit();\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { OptionComponent } from \"./option.component\";\nimport { SelectComponent } from \"./select.component\";\n\n@NgModule({\n  imports: [SelectComponent, OptionComponent],\n  exports: [SelectComponent, OptionComponent],\n})\nexport class SelectModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport type ButtonType = \"primary\" | \"secondary\" | \"danger\" | \"unstyled\";\n\nexport abstract class ButtonLikeAbstraction {\n  loading: boolean;\n  disabled: boolean;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\n/**\n * Interface for implementing focusable components.\n *\n * Used by the `AutofocusDirective` and `A11yGridDirective`.\n */\nexport abstract class FocusableElement {\n  getFocusTarget: () => HTMLElement;\n}\n","import { Pipe, PipeTransform } from \"@angular/core\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\n\n/**\n * Temporarily duplicate this pipe\n */\n@Pipe({\n  name: \"i18n\",\n  standalone: true,\n})\nexport class I18nPipe implements PipeTransform {\n  constructor(private i18nService: I18nService) {}\n\n  transform(id: string, p1?: string, p2?: string, p3?: string): string {\n    return this.i18nService.t(id, p1, p2, p3);\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { I18nPipe } from \"./i18n.pipe\";\n\n@NgModule({\n  imports: [CommonModule, I18nPipe],\n  exports: [CommonModule, I18nPipe],\n})\nexport class SharedModule {}\n","import { Directive, HostBinding } from \"@angular/core\";\n\n@Directive({\n  selector: \"th[bitCell], td[bitCell]\",\n  standalone: true,\n})\nexport class CellDirective {\n  @HostBinding(\"class\") get classList() {\n    return [\"tw-p-3\"];\n  }\n}\n","import { Directive, HostBinding, Input } from \"@angular/core\";\n\n@Directive({\n  selector: \"tr[bitRow]\",\n  standalone: true,\n})\nexport class RowDirective {\n  @Input() alignContent: \"top\" | \"middle\" | \"bottom\" | \"baseline\" = \"middle\";\n\n  get alignmentClass(): string {\n    switch (this.alignContent) {\n      case \"top\":\n        return \"tw-align-top\";\n      case \"middle\":\n        return \"tw-align-middle\";\n      case \"bottom\":\n        return \"tw-align-bottom\";\n      default:\n        return \"tw-align-baseline\";\n    }\n  }\n\n  @HostBinding(\"class\") get classList() {\n    return [\n      \"tw-border-0\",\n      \"tw-border-b\",\n      \"tw-border-secondary-300\",\n      \"tw-border-solid\",\n      \"hover:tw-bg-background-alt\",\n      \"last:tw-border-0\",\n      this.alignmentClass,\n    ];\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { NgClass } from \"@angular/common\";\nimport { Component, HostBinding, Input, OnInit } from \"@angular/core\";\n\nimport type { SortDirection, SortFn } from \"./table-data-source\";\nimport { TableComponent } from \"./table.component\";\n\n@Component({\n  selector: \"th[bitSortable]\",\n  template: `\n    <button [ngClass]=\"classList\" [attr.aria-pressed]=\"isActive\" (click)=\"setActive()\">\n      <ng-content></ng-content>\n      <i class=\"bwi tw-ml-2\" [ngClass]=\"icon\"></i>\n    </button>\n  `,\n  standalone: true,\n  imports: [NgClass],\n})\nexport class SortableComponent implements OnInit {\n  /**\n   * Mark the column as sortable and specify the key to sort by\n   */\n  @Input() bitSortable: string;\n\n  private _default: SortDirection | boolean = false;\n  /**\n   * Mark the column as the default sort column\n   */\n  @Input() set default(value: SortDirection | boolean | \"\") {\n    if (value === \"desc\" || value === \"asc\") {\n      this._default = value;\n    } else {\n      this._default = coerceBooleanProperty(value) ? \"asc\" : false;\n    }\n  }\n\n  /**\n   * Custom sorting function\n   *\n   * @example\n   * fn = (a, b) => a.name.localeCompare(b.name)\n   *\n   * fn = (a, b, direction) => {\n   *  const result = a.name.localeCompare(b.name)\n   *  return direction === 'asc' ? result : -result;\n   * }\n   */\n  @Input() fn: SortFn;\n\n  constructor(private table: TableComponent) {}\n\n  ngOnInit(): void {\n    if (this._default && !this.isActive) {\n      this.setActive();\n    }\n  }\n\n  @HostBinding(\"attr.aria-sort\") get ariaSort() {\n    if (!this.isActive) {\n      return undefined;\n    }\n    return this.sort.direction === \"asc\" ? \"ascending\" : \"descending\";\n  }\n\n  protected setActive() {\n    if (this.table.dataSource) {\n      const defaultDirection = this._default === \"desc\" ? \"desc\" : \"asc\";\n      const direction = this.isActive\n        ? this.direction === \"asc\"\n          ? \"desc\"\n          : \"asc\"\n        : defaultDirection;\n\n      this.table.dataSource.sort = {\n        column: this.bitSortable,\n        direction: direction,\n        fn: this.fn,\n      };\n    }\n  }\n\n  private get sort() {\n    return this.table.dataSource?.sort;\n  }\n\n  get isActive() {\n    return this.sort?.column === this.bitSortable;\n  }\n\n  get direction() {\n    return this.sort?.direction;\n  }\n\n  get icon() {\n    if (!this.isActive) {\n      return \"bwi-up-down-btn\";\n    }\n    return this.direction === \"asc\" ? \"bwi-up-solid\" : \"bwi-down-solid\";\n  }\n\n  get classList() {\n    return [\n      \"tw-min-w-max\",\n\n      // Offset to border and padding\n      \"-tw-m-1.5\",\n      \"tw-font-bold\",\n\n      // Below is copied from BitIconButtonComponent\n      \"tw-border\",\n      \"tw-border-solid\",\n      \"tw-rounded\",\n      \"tw-transition\",\n      \"hover:tw-no-underline\",\n      \"focus:tw-outline-none\",\n\n      \"tw-bg-transparent\",\n      \"!tw-text-muted\",\n      \"tw-border-transparent\",\n      \"hover:tw-bg-transparent-hover\",\n      \"hover:tw-border-primary-700\",\n      \"focus-visible:before:tw-ring-primary-700\",\n      \"disabled:tw-opacity-60\",\n      \"disabled:hover:tw-border-transparent\",\n      \"disabled:hover:tw-bg-transparent\",\n\n      // Workaround for box-shadow with transparent offset issue:\n      // https://github.com/tailwindlabs/tailwindcss/issues/3595\n      // Remove `before:` and use regular `tw-ring` when browser no longer has bug, or better:\n      // switch to `outline` with `outline-offset` when Safari supports border radius on outline.\n      // Using `box-shadow` to create outlines is a hack and as such `outline` should be preferred.\n      \"tw-relative\",\n      \"before:tw-content-['']\",\n      \"before:tw-block\",\n      \"before:tw-absolute\",\n      \"before:-tw-inset-[3px]\",\n      \"before:tw-rounded-md\",\n      \"before:tw-transition\",\n      \"before:tw-ring\",\n      \"before:tw-ring-transparent\",\n      \"focus-visible:tw-z-10\",\n    ];\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { _isNumberValue } from \"@angular/cdk/coercion\";\nimport { DataSource } from \"@angular/cdk/collections\";\nimport { BehaviorSubject, combineLatest, map, Observable, Subscription } from \"rxjs\";\n\nexport type SortDirection = \"asc\" | \"desc\";\nexport type SortFn = (a: any, b: any, direction?: SortDirection) => number;\nexport type Sort = {\n  column?: string;\n  direction: SortDirection;\n  fn?: SortFn;\n};\n\nexport type FilterFn<T> = (data: T) => boolean;\n\n// Loosely based on CDK TableDataSource\n//  https://github.com/angular/components/blob/main/src/material/table/table-data-source.ts\nexport class TableDataSource<T> extends DataSource<T> {\n  private readonly _data: BehaviorSubject<T[]>;\n  private readonly _sort: BehaviorSubject<Sort>;\n  private readonly _filter = new BehaviorSubject<string | FilterFn<T>>(null);\n  private readonly _renderData = new BehaviorSubject<T[]>([]);\n  private _renderChangesSubscription: Subscription | null = null;\n\n  /**\n   * The filtered set of data that has been matched by the filter string, or all the data if there\n   * is no filter. Useful for knowing the set of data the table represents.\n   * For example, a 'selectAll()' function would likely want to select the set of filtered data\n   * shown to the user rather than all the data.\n   */\n  filteredData: T[];\n\n  constructor() {\n    super();\n    this._data = new BehaviorSubject([]);\n    this._sort = new BehaviorSubject({ direction: \"asc\" });\n  }\n\n  get data() {\n    return this._data.value;\n  }\n\n  set data(data: T[]) {\n    data = Array.isArray(data) ? data : [];\n    this._data.next(data);\n    // Normally the `filteredData` is updated by the re-render\n    // subscription, but that won't happen if it's inactive.\n    if (!this._renderChangesSubscription) {\n      this.filterData(data);\n    }\n  }\n\n  set sort(sort: Sort) {\n    this._sort.next(sort);\n  }\n\n  get sort() {\n    return this._sort.value;\n  }\n\n  /**\n   * Filter to apply to the `data`.\n   *\n   * If a string is provided, it will be converted to a filter using {@link simpleStringFilter}\n   **/\n  get filter() {\n    return this._filter.value;\n  }\n  set filter(filter: string | FilterFn<T>) {\n    this._filter.next(filter);\n    // Normally the `filteredData` is updated by the re-render\n    // subscription, but that won't happen if it's inactive.\n    if (!this._renderChangesSubscription) {\n      this.filterData(this.data);\n    }\n  }\n\n  connect(): Observable<T[]> {\n    if (!this._renderChangesSubscription) {\n      this.updateChangeSubscription();\n    }\n\n    return this._renderData;\n  }\n\n  disconnect(): void {\n    this._renderChangesSubscription?.unsubscribe();\n    this._renderChangesSubscription = null;\n  }\n\n  private updateChangeSubscription() {\n    const filteredData = combineLatest([this._data, this._filter]).pipe(\n      map(([data]) => this.filterData(data)),\n    );\n\n    const orderedData = combineLatest([filteredData, this._sort]).pipe(\n      map(([data, sort]) => this.orderData(data, sort)),\n    );\n\n    this._renderChangesSubscription?.unsubscribe();\n    this._renderChangesSubscription = orderedData.subscribe((data) => this._renderData.next(data));\n  }\n\n  private filterData(data: T[]): T[] {\n    const filter =\n      typeof this.filter === \"string\"\n        ? TableDataSource.simpleStringFilter(this.filter)\n        : this.filter;\n    this.filteredData = this.filter == null ? data : data.filter((obj) => filter(obj));\n\n    return this.filteredData;\n  }\n\n  private orderData(data: T[], sort: Sort): T[] {\n    if (!sort) {\n      return data;\n    }\n\n    return this.sortData(data, sort);\n  }\n\n  /**\n   * Copied from https://github.com/angular/components/blob/main/src/material/table/table-data-source.ts\n   * License: MIT\n   * Copyright (c) 2022 Google LLC.\n   *\n   * Data accessor function that is used for accessing data properties for sorting through\n   * the default sortData function.\n   * This default function assumes that the sort header IDs (which defaults to the column name)\n   * matches the data's properties (e.g. column Xyz represents data['Xyz']).\n   * May be set to a custom function for different behavior.\n   * @param data Data object that is being accessed.\n   * @param sortHeaderId The name of the column that represents the data.\n   */\n  protected sortingDataAccessor(data: T, sortHeaderId: string): string | number {\n    const value = (data as unknown as Record<string, any>)[sortHeaderId];\n\n    if (_isNumberValue(value)) {\n      const numberValue = Number(value);\n\n      return numberValue < Number.MAX_SAFE_INTEGER ? numberValue : value;\n    }\n\n    return value;\n  }\n\n  /**\n   * Copied from https://github.com/angular/components/blob/main/src/material/table/table-data-source.ts\n   * License: MIT\n   * Copyright (c) 2022 Google LLC.\n   *\n   * Gets a sorted copy of the data array based on the state of the MatSort. Called\n   * after changes are made to the filtered data or when sort changes are emitted from MatSort.\n   * By default, the function retrieves the active sort and its direction and compares data\n   * by retrieving data using the sortingDataAccessor. May be overridden for a custom implementation\n   * of data ordering.\n   * @param data The array of data that should be sorted.\n   * @param sort The connected MatSort that holds the current sort state.\n   */\n  protected sortData(data: T[], sort: Sort): T[] {\n    const column = sort.column;\n    const directionModifier = sort.direction === \"asc\" ? 1 : -1;\n    if (!column) {\n      return data;\n    }\n\n    return data.sort((a, b) => {\n      // If a custom sort function is provided, use it instead of the default.\n      if (sort.fn) {\n        return sort.fn(a, b, sort.direction) * directionModifier;\n      }\n\n      let valueA = this.sortingDataAccessor(a, column);\n      let valueB = this.sortingDataAccessor(b, column);\n\n      // If there are data in the column that can be converted to a number,\n      // it must be ensured that the rest of the data\n      // is of the same type so as not to order incorrectly.\n      const valueAType = typeof valueA;\n      const valueBType = typeof valueB;\n\n      if (valueAType !== valueBType) {\n        if (valueAType === \"number\") {\n          valueA += \"\";\n        }\n        if (valueBType === \"number\") {\n          valueB += \"\";\n        }\n      }\n\n      if (typeof valueA === \"string\" && typeof valueB === \"string\") {\n        return valueA.localeCompare(valueB) * directionModifier;\n      }\n\n      // If both valueA and valueB exist (truthy), then compare the two. Otherwise, check if\n      // one value exists while the other doesn't. In this case, existing value should come last.\n      // This avoids inconsistent results when comparing values to undefined/null.\n      // If neither value exists, return 0 (equal).\n      let comparatorResult = 0;\n      if (valueA != null && valueB != null) {\n        // Check if one value is greater than the other; if equal, comparatorResult should remain 0.\n        if (valueA > valueB) {\n          comparatorResult = 1;\n        } else if (valueA < valueB) {\n          comparatorResult = -1;\n        }\n      } else if (valueA != null) {\n        comparatorResult = 1;\n      } else if (valueB != null) {\n        comparatorResult = -1;\n      }\n\n      return comparatorResult * directionModifier;\n    });\n  }\n\n  /**\n   * Modified from https://github.com/angular/components/blob/main/src/material/table/table-data-source.ts\n   * License: MIT\n   * Copyright (c) 2022 Google LLC.\n   *\n   * @param filter the string to search for\n   * @returns a function that checks if a data object matches the provided `filter` string. Each data object\n   * is converted to a string of its properties and returns true if the filter has\n   * at least one occurrence in that string. The filter string has its whitespace\n   * trimmed and the match is case-insensitive.\n   */\n  static readonly simpleStringFilter = <T>(filter: string): FilterFn<T> => {\n    return (data: T): boolean => {\n      if (!filter) {\n        return true;\n      }\n\n      // Transform the data into a lowercase string of all property values.\n      const dataStr = Object.keys(data as unknown as Record<string, any>)\n        .reduce((currentTerm: string, key: string) => {\n          // Use an obscure Unicode character to delimit the words in the concatenated string.\n          // This avoids matches where the values of two columns combined will match the user's query\n          // (e.g. `Flute` and `Stop` will match `Test`). The character is intended to be something\n          // that has a very low chance of being typed in by somebody in a text field. This one in\n          // particular is \"White up-pointing triangle with dot\" from\n          // https://en.wikipedia.org/wiki/List_of_Unicode_characters\n          return currentTerm + (data as unknown as Record<string, any>)[key] + \"◬\";\n        }, \"\")\n        .toLowerCase();\n\n      // Transform the filter by converting it to lowercase and removing whitespace.\n      const transformedFilter = filter.trim().toLowerCase();\n\n      return dataStr.indexOf(transformedFilter) != -1;\n    };\n  };\n}\n","<cdk-virtual-scroll-viewport\n  scrollWindow\n  [itemSize]=\"rowSize\"\n  [ngStyle]=\"{ paddingBottom: headerHeight + 'px' }\"\n>\n  <table [ngClass]=\"tableClass\">\n    <thead\n      class=\"tw-border-0 tw-border-b-2 tw-border-solid tw-border-secondary-300 tw-font-bold tw-text-muted\"\n    >\n      <tr>\n        <ng-content select=\"[header]\"></ng-content>\n      </tr>\n    </thead>\n    <tbody>\n      <tr *cdkVirtualFor=\"let r of rows$; trackBy: trackBy\" bitRow>\n        <ng-container *ngTemplateOutlet=\"rowDef.template; context: { $implicit: r }\"></ng-container>\n      </tr>\n    </tbody>\n  </table>\n</cdk-virtual-scroll-viewport>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  CdkVirtualScrollViewport,\n  CdkVirtualScrollableWindow,\n  CdkFixedSizeVirtualScroll,\n  CdkVirtualForOf,\n} from \"@angular/cdk/scrolling\";\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  Component,\n  ContentChild,\n  Input,\n  OnDestroy,\n  TemplateRef,\n  Directive,\n  NgZone,\n  AfterViewInit,\n  ElementRef,\n  TrackByFunction,\n} from \"@angular/core\";\n\nimport { RowDirective } from \"./row.directive\";\nimport { TableComponent } from \"./table.component\";\n\n/**\n * Helper directive for defining the row template.\n *\n * ```html\n * <ng-template bitRowDef let-row>\n *   <td bitCell>{{ row.id }}</td>\n * </ng-template>\n * ```\n */\n@Directive({\n  selector: \"[bitRowDef]\",\n  standalone: true,\n})\nexport class BitRowDef {\n  constructor(public template: TemplateRef<any>) {}\n}\n\n/**\n * Scrollable table component.\n *\n * Utilizes virtual scrolling to render large datasets.\n */\n@Component({\n  selector: \"bit-table-scroll\",\n  templateUrl: \"./table-scroll.component.html\",\n  providers: [{ provide: TableComponent, useExisting: TableScrollComponent }],\n  standalone: true,\n  imports: [\n    CommonModule,\n    CdkVirtualScrollViewport,\n    CdkVirtualScrollableWindow,\n    CdkFixedSizeVirtualScroll,\n    CdkVirtualForOf,\n    RowDirective,\n  ],\n})\nexport class TableScrollComponent\n  extends TableComponent\n  implements AfterContentChecked, AfterViewInit, OnDestroy\n{\n  /** The size of the rows in the list (in pixels). */\n  @Input({ required: true }) rowSize: number;\n\n  /** Optional trackBy function. */\n  @Input() trackBy: TrackByFunction<any> | undefined;\n\n  @ContentChild(BitRowDef) protected rowDef: BitRowDef;\n\n  /**\n   * Height of the thead element (in pixels).\n   *\n   * Used to increase the table's total height to avoid items being cut off.\n   */\n  protected headerHeight = 0;\n\n  /**\n   * Observer for table header, applies padding on resize.\n   */\n  private headerObserver: ResizeObserver;\n\n  constructor(\n    private zone: NgZone,\n    private el: ElementRef,\n  ) {\n    super();\n  }\n\n  ngAfterViewInit(): void {\n    this.headerObserver = new ResizeObserver((entries) => {\n      this.zone.run(() => {\n        this.headerHeight = entries[0].contentRect.height;\n      });\n    });\n\n    this.headerObserver.observe(this.el.nativeElement.querySelector(\"thead\"));\n  }\n\n  override ngOnDestroy(): void {\n    super.ngOnDestroy();\n\n    if (this.headerObserver) {\n      this.headerObserver.disconnect();\n    }\n  }\n}\n","<table [ngClass]=\"tableClass\">\n  <thead\n    class=\"tw-border-0 tw-border-b-2 tw-border-solid tw-border-secondary-300 tw-font-bold tw-text-muted\"\n  >\n    <ng-content select=\"[header]\"></ng-content>\n  </thead>\n  <tbody>\n    <ng-container\n      *ngTemplateOutlet=\"templateVariable.template; context: { $implicit: rows$ }\"\n    ></ng-container>\n  </tbody>\n</table>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { isDataSource } from \"@angular/cdk/collections\";\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  Component,\n  ContentChild,\n  Directive,\n  Input,\n  OnDestroy,\n  TemplateRef,\n} from \"@angular/core\";\nimport { Observable } from \"rxjs\";\n\nimport { TableDataSource } from \"./table-data-source\";\n\n@Directive({\n  selector: \"ng-template[body]\",\n  standalone: true,\n})\nexport class TableBodyDirective {\n  // eslint-disable-next-line @typescript-eslint/explicit-member-accessibility\n  constructor(public readonly template: TemplateRef<any>) {}\n}\n\n@Component({\n  selector: \"bit-table\",\n  templateUrl: \"./table.component.html\",\n  standalone: true,\n  imports: [CommonModule],\n})\nexport class TableComponent implements OnDestroy, AfterContentChecked {\n  @Input() dataSource: TableDataSource<any>;\n  @Input() layout: \"auto\" | \"fixed\" = \"auto\";\n\n  @ContentChild(TableBodyDirective) templateVariable: TableBodyDirective;\n\n  protected rows$: Observable<any[]>;\n\n  private _initialized = false;\n\n  get tableClass() {\n    return [\n      \"tw-w-full\",\n      \"tw-leading-normal\",\n      \"tw-text-main\",\n      \"tw-border-collapse\",\n      \"tw-text-start\",\n      this.layout === \"auto\" ? \"tw-table-auto\" : \"tw-table-fixed\",\n    ];\n  }\n\n  ngAfterContentChecked(): void {\n    if (!this._initialized && isDataSource(this.dataSource)) {\n      this._initialized = true;\n\n      const dataStream = this.dataSource.connect();\n      this.rows$ = dataStream;\n    }\n  }\n\n  ngOnDestroy(): void {\n    if (isDataSource(this.dataSource)) {\n      this.dataSource.disconnect();\n    }\n  }\n}\n","import { ScrollingModule } from \"@angular/cdk/scrolling\";\nimport { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\n\nimport { CellDirective } from \"./cell.directive\";\nimport { RowDirective } from \"./row.directive\";\nimport { SortableComponent } from \"./sortable.component\";\nimport { BitRowDef, TableScrollComponent } from \"./table-scroll.component\";\nimport { TableBodyDirective, TableComponent } from \"./table.component\";\n\n@NgModule({\n  imports: [\n    CommonModule,\n    ScrollingModule,\n    BitRowDef,\n    CellDirective,\n    RowDirective,\n    SortableComponent,\n    TableBodyDirective,\n    TableComponent,\n    TableScrollComponent,\n  ],\n  exports: [\n    BitRowDef,\n    CellDirective,\n    RowDirective,\n    SortableComponent,\n    TableBodyDirective,\n    TableComponent,\n    TableScrollComponent,\n  ],\n})\nexport class TableModule {}\n","import { Component } from \"@angular/core\";\n\n/**\n * Component used for styling the tab header/background for both content and navigation tabs\n */\n@Component({\n  selector: \"bit-tab-header\",\n  host: {\n    class:\n      \"tw-h-16 tw-pl-4 tw-bg-background-alt tw-flex tw-items-end tw-border-0 tw-border-b tw-border-solid tw-border-secondary-300\",\n  },\n  template: `<ng-content></ng-content>`,\n  standalone: true,\n})\nexport class TabHeaderComponent {}\n","import { Directive } from \"@angular/core\";\n\n/**\n * Directive used for styling the container for bit tab labels\n */\n@Directive({\n  selector: \"[bitTabListContainer]\",\n  host: {\n    class: \"tw-inline-flex tw-flex-wrap tw-leading-5\",\n  },\n  standalone: true,\n})\nexport class TabListContainerDirective {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FocusableOption } from \"@angular/cdk/a11y\";\nimport { Directive, ElementRef, HostBinding, Input } from \"@angular/core\";\n\n/**\n * Directive used for styling tab header items for both nav links (anchor tags)\n * and content tabs (button tags)\n */\n@Directive({\n  selector: \"[bitTabListItem]\",\n  standalone: true,\n})\nexport class TabListItemDirective implements FocusableOption {\n  @Input() active: boolean;\n  @Input() disabled: boolean;\n\n  @HostBinding(\"attr.disabled\")\n  get disabledAttr() {\n    return this.disabled || null; // native disabled attr must be null when false\n  }\n\n  constructor(private elementRef: ElementRef) {}\n\n  focus() {\n    this.elementRef.nativeElement.focus();\n  }\n\n  click() {\n    this.elementRef.nativeElement.click();\n  }\n\n  @HostBinding(\"class\")\n  get classList(): string[] {\n    return this.baseClassList\n      .concat(this.active ? this.activeClassList : [])\n      .concat(this.disabled ? this.disabledClassList : [])\n      .concat(this.textColorClassList);\n  }\n\n  /**\n   * Classes used for styling tab item text color.\n   * Separate text color class list required to override bootstrap classes in Web.\n   */\n  get textColorClassList(): string[] {\n    if (this.disabled) {\n      return [\"!tw-text-muted\", \"hover:!tw-text-muted\"];\n    }\n    if (this.active) {\n      return [\"!tw-text-primary-600\", \"hover:!tw-text-primary-700\"];\n    }\n    return [\"!tw-text-main\", \"hover:!tw-text-main\"];\n  }\n\n  get baseClassList(): string[] {\n    return [\n      \"tw-block\",\n      \"tw-relative\",\n      \"tw-py-2\",\n      \"tw-px-4\",\n      \"tw-font-semibold\",\n      \"tw-transition\",\n      \"tw-rounded-t\",\n      \"tw-border-0\",\n      \"tw-border-x\",\n      \"tw-border-t-4\",\n      \"tw-border-transparent\",\n      \"tw-border-solid\",\n      \"tw-bg-transparent\",\n      \"hover:tw-underline\",\n      \"focus-visible:tw-z-10\",\n      \"focus-visible:tw-outline-none\",\n      \"focus-visible:tw-ring-2\",\n      \"focus-visible:tw-ring-primary-700\",\n    ];\n  }\n\n  get disabledClassList(): string[] {\n    return [\"!tw-bg-secondary-100\", \"!tw-no-underline\", \"tw-cursor-not-allowed\"];\n  }\n\n  get activeClassList(): string[] {\n    return [\n      \"tw--mb-px\",\n      \"tw-border-x-secondary-300\",\n      \"tw-border-t-primary-600\",\n      \"tw-border-b\",\n      \"tw-border-b-background\",\n      \"!tw-bg-background\",\n      \"hover:tw-border-t-primary-700\",\n      \"focus-visible:tw-border-t-primary-700\",\n      \"focus-visible:!tw-text-primary-700\",\n    ];\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TemplatePortal, CdkPortalOutlet } from \"@angular/cdk/portal\";\nimport { Component, HostBinding, Input } from \"@angular/core\";\n\n@Component({\n  selector: \"bit-tab-body\",\n  templateUrl: \"tab-body.component.html\",\n  standalone: true,\n  imports: [CdkPortalOutlet],\n})\nexport class TabBodyComponent {\n  private _firstRender: boolean;\n\n  @Input() content: TemplatePortal;\n  @Input() preserveContent = false;\n\n  @HostBinding(\"attr.hidden\") get hidden() {\n    return !this.active || null;\n  }\n\n  @Input()\n  get active() {\n    return this._active;\n  }\n  set active(value: boolean) {\n    this._active = value;\n    if (this._active) {\n      this._firstRender = true;\n    }\n  }\n  private _active: boolean;\n\n  /**\n   * The tab content to render.\n   * Inactive tabs that have never been rendered/active do not have their\n   * content rendered by default for performance. If `preserveContent` is `true`\n   * then the content persists after the first time content is rendered.\n   */\n  get tabContent() {\n    if (this.active) {\n      return this.content;\n    }\n    if (this.preserveContent && this._firstRender) {\n      return this.content;\n    }\n    return null;\n  }\n}\n","<ng-template [cdkPortalOutlet]=\"tabContent\"></ng-template>\n","<bit-tab-header>\n  <div\n    bitTabListContainer\n    role=\"tablist\"\n    [attr.aria-label]=\"label\"\n    (keydown)=\"keyManager.onKeydown($event)\"\n  >\n    <button\n      bitTabListItem\n      *ngFor=\"let tab of tabs; let i = index\"\n      type=\"button\"\n      role=\"tab\"\n      [id]=\"getTabLabelId(i)\"\n      [active]=\"tab.isActive\"\n      [disabled]=\"tab.disabled\"\n      [attr.aria-selected]=\"selectedIndex === i\"\n      [attr.tabindex]=\"selectedIndex === i ? 0 : -1\"\n      (click)=\"selectTab(i)\"\n    >\n      <ng-container [ngTemplateOutlet]=\"content\"></ng-container>\n\n      <ng-template #content>\n        <ng-template [ngIf]=\"tab.templateLabel\" [ngIfElse]=\"tabTextLabel\">\n          <ng-container [ngTemplateOutlet]=\"tab.templateLabel.templateRef\"></ng-container>\n        </ng-template>\n\n        <ng-template #tabTextLabel>{{ tab.textLabel }}</ng-template>\n      </ng-template>\n    </button>\n  </div>\n</bit-tab-header>\n<div class=\"tw-px-4 tw-pt-5\">\n  <bit-tab-body\n    role=\"tabpanel\"\n    *ngFor=\"let tab of tabs; let i = index\"\n    [id]=\"getTabContentId(i)\"\n    [attr.tabindex]=\"tab.contentTabIndex\"\n    [attr.labeledby]=\"getTabLabelId(i)\"\n    [active]=\"tab.isActive\"\n    [content]=\"tab.content\"\n    [preserveContent]=\"preserveContent\"\n  >\n  </bit-tab-body>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FocusKeyManager } from \"@angular/cdk/a11y\";\nimport { coerceNumberProperty } from \"@angular/cdk/coercion\";\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  AfterContentInit,\n  AfterViewInit,\n  Component,\n  ContentChildren,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  Output,\n  QueryList,\n  ViewChildren,\n} from \"@angular/core\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { TabHeaderComponent } from \"../shared/tab-header.component\";\nimport { TabListContainerDirective } from \"../shared/tab-list-container.directive\";\nimport { TabListItemDirective } from \"../shared/tab-list-item.directive\";\n\nimport { TabBodyComponent } from \"./tab-body.component\";\nimport { TabComponent } from \"./tab.component\";\n\n/** Used to generate unique ID's for each tab component */\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-tab-group\",\n  templateUrl: \"./tab-group.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    TabHeaderComponent,\n    TabListContainerDirective,\n    TabListItemDirective,\n    TabBodyComponent,\n  ],\n})\nexport class TabGroupComponent\n  implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy\n{\n  private readonly _groupId: number;\n  private readonly destroy$ = new Subject<void>();\n  private _indexToSelect: number | null = 0;\n\n  /**\n   * Aria label for the tab list menu\n   */\n  @Input() label = \"\";\n\n  /**\n   * Keep the content of off-screen tabs in the DOM.\n   * Useful for keeping <audio> or <video> elements from re-initializing\n   * after navigating between tabs.\n   */\n  @Input() preserveContent = false;\n\n  @ContentChildren(TabComponent) tabs: QueryList<TabComponent>;\n  @ViewChildren(TabListItemDirective) tabLabels: QueryList<TabListItemDirective>;\n\n  /** The index of the active tab. */\n  @Input()\n  get selectedIndex(): number | null {\n    return this._selectedIndex;\n  }\n  set selectedIndex(value: number) {\n    this._indexToSelect = coerceNumberProperty(value, null);\n  }\n  private _selectedIndex: number | null = null;\n\n  /** Output to enable support for two-way binding on `[(selectedIndex)]` */\n  @Output() readonly selectedIndexChange: EventEmitter<number> = new EventEmitter<number>();\n\n  /** Event emitted when the tab selection has changed. */\n  @Output() readonly selectedTabChange: EventEmitter<BitTabChangeEvent> =\n    new EventEmitter<BitTabChangeEvent>();\n\n  /**\n   * Focus key manager for keeping tab controls accessible.\n   * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role#keyboard_interactions\n   */\n  keyManager: FocusKeyManager<TabListItemDirective>;\n\n  constructor() {\n    this._groupId = nextId++;\n  }\n\n  protected getTabContentId(id: number): string {\n    return `bit-tab-content-${this._groupId}-${id}`;\n  }\n\n  protected getTabLabelId(id: number): string {\n    return `bit-tab-label-${this._groupId}-${id}`;\n  }\n\n  selectTab(index: number) {\n    this.selectedIndex = index;\n  }\n\n  /**\n   * After content is checked, the tab group knows what tabs are defined and which index\n   * should be currently selected.\n   */\n  ngAfterContentChecked(): void {\n    const indexToSelect = (this._indexToSelect = this._clampTabIndex(this._indexToSelect));\n\n    if (this._selectedIndex != indexToSelect) {\n      const isFirstRun = this._selectedIndex == null;\n\n      if (!isFirstRun) {\n        this.selectedTabChange.emit({\n          index: indexToSelect,\n          tab: this.tabs.toArray()[indexToSelect],\n        });\n      }\n\n      // These values need to be updated after change detection as\n      // the checked content may have references to them.\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      Promise.resolve().then(() => {\n        this.tabs.forEach((tab, index) => (tab.isActive = index === indexToSelect));\n\n        if (!isFirstRun) {\n          this.selectedIndexChange.emit(indexToSelect);\n        }\n      });\n\n      // Manually update the _selectedIndex and keyManager active item\n      this._selectedIndex = indexToSelect;\n      if (this.keyManager) {\n        this.keyManager.setActiveItem(indexToSelect);\n      }\n    }\n  }\n\n  ngAfterViewInit(): void {\n    this.keyManager = new FocusKeyManager(this.tabLabels)\n      .withHorizontalOrientation(\"ltr\")\n      .withWrap()\n      .withHomeAndEnd();\n  }\n\n  ngAfterContentInit() {\n    // Subscribe to any changes in the number of tabs, in order to be able\n    // to re-render content when new tabs are added or removed.\n    this.tabs.changes.pipe(takeUntil(this.destroy$)).subscribe(() => {\n      const indexToSelect = this._clampTabIndex(this._indexToSelect);\n\n      // If the selected tab didn't explicitly change, keep the previously\n      // selected tab selected/active\n      if (indexToSelect === this._selectedIndex) {\n        const tabs = this.tabs.toArray();\n        let selectedTab: TabComponent | undefined;\n\n        for (let i = 0; i < tabs.length; i++) {\n          if (tabs[i].isActive) {\n            // Set both _indexToSelect and _selectedIndex to avoid firing a change\n            // event which could cause an infinite loop if adding a tab within the\n            // selectedIndexChange event\n            this._indexToSelect = this._selectedIndex = i;\n            selectedTab = tabs[i];\n            break;\n          }\n        }\n\n        // No active tab found and a tab does exist means the active tab\n        // was removed, so a new active tab must be set manually\n        if (!selectedTab && tabs[indexToSelect]) {\n          tabs[indexToSelect].isActive = true;\n          this.selectedTabChange.emit({\n            index: indexToSelect,\n            tab: tabs[indexToSelect],\n          });\n        }\n      }\n    });\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  private _clampTabIndex(index: number): number {\n    return Math.min(this.tabs.length - 1, Math.max(index || 0, 0));\n  }\n}\n\nexport class BitTabChangeEvent {\n  /**\n   * The currently selected tab index\n   */\n  index: number;\n  /**\n   * The currently selected tab\n   */\n  tab: TabComponent;\n}\n","import { Directive, TemplateRef } from \"@angular/core\";\n\n/**\n * Used to identify template based tab labels (allows complex labels instead of just plaintext)\n *\n * @example\n * ```\n * <bit-tab>\n *   <ng-template bitTabLabel>\n *     <i class=\"bwi bwi-search\"></i> Search\n *   </ng-template>\n *\n *   <p>Tab Content</p>\n * </bit-tab>\n * ```\n */\n@Directive({\n  selector: \"[bitTabLabel]\",\n  standalone: true,\n})\nexport class TabLabelDirective {\n  constructor(public templateRef: TemplateRef<unknown>) {}\n}\n","<ng-template><ng-content></ng-content></ng-template>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { TemplatePortal } from \"@angular/cdk/portal\";\nimport {\n  Component,\n  ContentChild,\n  Input,\n  OnInit,\n  TemplateRef,\n  ViewChild,\n  ViewContainerRef,\n} from \"@angular/core\";\n\nimport { TabLabelDirective } from \"./tab-label.directive\";\n\n@Component({\n  selector: \"bit-tab\",\n  templateUrl: \"./tab.component.html\",\n  host: {\n    role: \"tabpanel\",\n  },\n  standalone: true,\n})\nexport class TabComponent implements OnInit {\n  @Input() disabled = false;\n  @Input(\"label\") textLabel = \"\";\n\n  /**\n   * Optional tabIndex for the tabPanel that contains this tab's content.\n   *\n   * If the tabpanel does not contain any focusable elements or the first element with content is not focusable,\n   * this should be set to 0 to include it in the tab sequence of the page.\n   *\n   * @remarks See note 4 of https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/\n   */\n  @Input() contentTabIndex: number | undefined;\n\n  @ViewChild(TemplateRef, { static: true }) implicitContent: TemplateRef<unknown>;\n  @ContentChild(TabLabelDirective) templateLabel: TabLabelDirective;\n\n  private _contentPortal: TemplatePortal | null = null;\n\n  get content(): TemplatePortal | null {\n    return this._contentPortal;\n  }\n\n  isActive: boolean;\n\n  constructor(private _viewContainerRef: ViewContainerRef) {}\n\n  ngOnInit(): void {\n    this._contentPortal = new TemplatePortal(this.implicitContent, this._viewContainerRef);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FocusableOption } from \"@angular/cdk/a11y\";\nimport { AfterViewInit, Component, HostListener, Input, OnDestroy, ViewChild } from \"@angular/core\";\nimport { IsActiveMatchOptions, RouterLinkActive, RouterModule } from \"@angular/router\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { TabListItemDirective } from \"../shared/tab-list-item.directive\";\n\nimport { TabNavBarComponent } from \"./tab-nav-bar.component\";\n\n@Component({\n  selector: \"bit-tab-link\",\n  templateUrl: \"tab-link.component.html\",\n  standalone: true,\n  imports: [TabListItemDirective, RouterModule],\n})\nexport class TabLinkComponent implements FocusableOption, AfterViewInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  @ViewChild(TabListItemDirective) tabItem: TabListItemDirective;\n  @ViewChild(\"rla\") routerLinkActive: RouterLinkActive;\n\n  readonly routerLinkMatchOptions: IsActiveMatchOptions = {\n    queryParams: \"ignored\",\n    matrixParams: \"ignored\",\n    paths: \"subset\",\n    fragment: \"ignored\",\n  };\n\n  @Input() route: string | any[];\n  @Input() disabled = false;\n\n  @HostListener(\"keydown\", [\"$event\"]) onKeyDown(event: KeyboardEvent) {\n    if (event.code === \"Space\") {\n      this.tabItem.click();\n    }\n  }\n\n  get active() {\n    return this.routerLinkActive?.isActive ?? false;\n  }\n\n  constructor(private _tabNavBar: TabNavBarComponent) {}\n\n  focus(): void {\n    this.tabItem.focus();\n  }\n\n  ngAfterViewInit() {\n    // The active state of tab links are tracked via the routerLinkActive directive\n    // We need to watch for changes to tell the parent nav group when the tab is active\n    this.routerLinkActive.isActiveChange\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((_) => this._tabNavBar.updateActiveLink());\n  }\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","<a\n  bitTabListItem\n  [routerLink]=\"disabled ? null : route\"\n  routerLinkActive\n  [routerLinkActiveOptions]=\"routerLinkMatchOptions\"\n  #rla=\"routerLinkActive\"\n  [active]=\"rla.isActive\"\n  [disabled]=\"disabled\"\n  [attr.aria-disabled]=\"disabled\"\n  ariaCurrentWhenActive=\"page\"\n  role=\"link\"\n  class=\"tw-flex tw-group/tab hover:tw-no-underline\"\n>\n  <div class=\"group-hover/tab:tw-underline\">\n    <ng-content></ng-content>\n  </div>\n  <div class=\"tw-font-normal tw-ml-2 empty:tw-ml-0\">\n    <ng-content select=\"[slot=end]\"></ng-content>\n  </div>\n</a>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FocusKeyManager } from \"@angular/cdk/a11y\";\nimport {\n  AfterContentInit,\n  Component,\n  ContentChildren,\n  forwardRef,\n  Input,\n  QueryList,\n} from \"@angular/core\";\n\nimport { TabHeaderComponent } from \"../shared/tab-header.component\";\nimport { TabListContainerDirective } from \"../shared/tab-list-container.directive\";\n\nimport { TabLinkComponent } from \"./tab-link.component\";\n\n@Component({\n  selector: \"bit-tab-nav-bar\",\n  templateUrl: \"tab-nav-bar.component.html\",\n  host: {\n    class: \"tw-block\",\n  },\n  standalone: true,\n  imports: [TabHeaderComponent, TabListContainerDirective],\n})\nexport class TabNavBarComponent implements AfterContentInit {\n  @ContentChildren(forwardRef(() => TabLinkComponent)) tabLabels: QueryList<TabLinkComponent>;\n  @Input() label = \"\";\n\n  /**\n   * Focus key manager for keeping tab controls accessible.\n   * https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/tablist_role#keyboard_interactions\n   */\n  keyManager: FocusKeyManager<TabLinkComponent>;\n\n  ngAfterContentInit(): void {\n    this.keyManager = new FocusKeyManager(this.tabLabels)\n      .withHorizontalOrientation(\"ltr\")\n      .withWrap()\n      .withHomeAndEnd();\n  }\n\n  updateActiveLink() {\n    // Keep the keyManager in sync with active tabs\n    const items = this.tabLabels.toArray();\n    for (let i = 0; i < items.length; i++) {\n      if (items[i].active) {\n        this.keyManager.updateActiveItem(i);\n      }\n    }\n  }\n}\n","<bit-tab-header>\n  <nav bitTabListContainer [attr.aria-label]=\"label\" (keydown)=\"keyManager.onKeydown($event)\">\n    <ng-content></ng-content>\n  </nav>\n</bit-tab-header>\n","/**\n * Given a toast message, calculate the ideal timeout length following:\n * a minimum of 5 seconds + 1 extra second per 120 additional words\n *\n * @param message the toast message to be displayed\n * @returns the timeout length in milliseconds\n */\nexport const calculateToastTimeout = (message: string | string[]): number => {\n  const paragraphs = Array.isArray(message) ? message : [message];\n  const numWords = paragraphs\n    .map((paragraph) => paragraph.split(/\\s+/).filter((word) => word !== \"\"))\n    .flat().length;\n  return 5000 + Math.floor(numWords / 120) * 1000;\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Injectable } from \"@angular/core\";\nimport { IndividualConfig, ToastrService } from \"ngx-toastr\";\n\nimport type { ToastComponent } from \"./toast.component\";\nimport { calculateToastTimeout } from \"./utils\";\n\nexport type ToastOptions = {\n  /**\n   * The duration the toast will persist in milliseconds\n   **/\n  timeout?: number;\n} & Pick<ToastComponent, \"message\" | \"variant\" | \"title\">;\n\n/**\n * Presents toast notifications\n **/\n@Injectable({ providedIn: \"root\" })\nexport class ToastService {\n  constructor(private toastrService: ToastrService) {}\n\n  showToast(options: ToastOptions): void {\n    const toastrConfig: Partial<IndividualConfig> = {\n      payload: {\n        message: options.message,\n        variant: options.variant,\n        title: options.title,\n      },\n      timeOut:\n        options.timeout != null && options.timeout > 0\n          ? options.timeout\n          : calculateToastTimeout(options.message),\n    };\n\n    this.toastrService.show(null, options.title, toastrConfig);\n  }\n\n  /**\n   * @deprecated use `showToast` instead\n   *\n   * Converts options object from PlatformUtilsService\n   **/\n  _showToast(options: {\n    type: \"error\" | \"success\" | \"warning\" | \"info\";\n    title: string;\n    text: string | string[];\n    options?: {\n      timeout?: number;\n    };\n  }) {\n    this.showToast({\n      message: options.text,\n      variant: options.type,\n      title: options.title,\n      timeout: options.options?.timeout,\n    });\n  }\n}\n","import {\n  booleanAttribute,\n  Component,\n  EventEmitter,\n  HostBinding,\n  Input,\n  Output,\n} from \"@angular/core\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-toggle-group\",\n  templateUrl: \"./toggle-group.component.html\",\n  preserveWhitespaces: false,\n  standalone: true,\n})\nexport class ToggleGroupComponent<TValue = unknown> {\n  private id = nextId++;\n  name = `bit-toggle-group-${this.id}`;\n\n  @Input({ transform: booleanAttribute }) fullWidth?: boolean;\n  @Input() selected?: TValue;\n  @Output() selectedChange = new EventEmitter<TValue>();\n\n  @HostBinding(\"attr.role\") role = \"radiogroup\";\n  @HostBinding(\"class\")\n  get classList() {\n    return [\"tw-flex\"].concat(this.fullWidth ? [\"tw-w-full\", \"[&>*]:tw-flex-1\"] : []);\n  }\n\n  onInputInteraction(value: TValue) {\n    this.selected = value;\n    this.selectedChange.emit(value);\n  }\n}\n","<ng-content></ng-content>\n","import { NgModule } from \"@angular/core\";\n\nimport { ToggleGroupComponent } from \"./toggle-group.component\";\nimport { ToggleComponent } from \"./toggle.component\";\n\n@NgModule({\n  imports: [ToggleGroupComponent, ToggleComponent],\n  exports: [ToggleGroupComponent, ToggleComponent],\n})\nexport class ToggleGroupModule {}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgClass } from \"@angular/common\";\nimport {\n  AfterContentChecked,\n  AfterViewInit,\n  Component,\n  ElementRef,\n  HostBinding,\n  Input,\n  signal,\n  ViewChild,\n} from \"@angular/core\";\n\nimport { ToggleGroupComponent } from \"./toggle-group.component\";\n\nlet nextId = 0;\n\n@Component({\n  selector: \"bit-toggle\",\n  templateUrl: \"./toggle.component.html\",\n  preserveWhitespaces: false,\n  standalone: true,\n  imports: [NgClass],\n})\nexport class ToggleComponent<TValue> implements AfterContentChecked, AfterViewInit {\n  id = nextId++;\n\n  @Input() value?: TValue;\n  @ViewChild(\"labelContent\") labelContent: ElementRef<HTMLSpanElement>;\n  @ViewChild(\"bitBadgeContainer\") bitBadgeContainer: ElementRef<HTMLSpanElement>;\n\n  constructor(private groupComponent: ToggleGroupComponent<TValue>) {}\n\n  @HostBinding(\"tabIndex\") tabIndex = \"-1\";\n  @HostBinding(\"class\") classList = [\"tw-group/toggle\", \"tw-flex\", \"tw-min-w-16\"];\n\n  protected bitBadgeContainerHasChidlren = signal(false);\n  protected labelTitle = signal<string>(null);\n\n  get name() {\n    return this.groupComponent.name;\n  }\n\n  get selected() {\n    return this.groupComponent.selected === this.value;\n  }\n\n  get inputClasses() {\n    return [\"tw-peer/toggle-input\", \"tw-appearance-none\", \"tw-outline-none\"];\n  }\n\n  get labelClasses() {\n    return [\n      \"tw-h-full\",\n      \"tw-w-full\",\n      \"tw-flex\",\n      \"tw-items-center\",\n      \"tw-justify-center\",\n      \"tw-gap-1.5\",\n      \"!tw-font-semibold\",\n      \"tw-leading-5\",\n      \"tw-transition\",\n      \"tw-text-center\",\n      \"tw-text-sm\",\n      \"tw-border-primary-600\",\n      \"!tw-text-primary-600\",\n      \"tw-border-solid\",\n      \"tw-border-y\",\n      \"tw-border-r\",\n      \"tw-border-l-0\",\n      \"tw-cursor-pointer\",\n      \"hover:tw-bg-primary-100\",\n\n      \"group-first-of-type/toggle:tw-border-l\",\n      \"group-first-of-type/toggle:tw-rounded-l-full\",\n      \"group-last-of-type/toggle:tw-rounded-r-full\",\n\n      \"peer-focus-visible/toggle-input:tw-outline-none\",\n      \"peer-focus-visible/toggle-input:tw-ring\",\n      \"peer-focus-visible/toggle-input:tw-ring-offset-2\",\n      \"peer-focus-visible/toggle-input:tw-ring-primary-600\",\n      \"peer-focus-visible/toggle-input:tw-z-10\",\n      \"peer-focus-visible/toggle-input:tw-bg-primary-600\",\n      \"peer-focus-visible/toggle-input:tw-border-primary-600\",\n      \"peer-focus-visible/toggle-input:!tw-text-contrast\",\n\n      \"peer-checked/toggle-input:tw-bg-primary-600\",\n      \"peer-checked/toggle-input:tw-border-primary-600\",\n      \"peer-checked/toggle-input:!tw-text-contrast\",\n      \"tw-py-1.5\",\n      \"tw-px-3\",\n\n      // Fix for bootstrap styles that add bottom margin\n      \"!tw-mb-0\",\n    ];\n  }\n\n  onInputInteraction() {\n    this.groupComponent.onInputInteraction(this.value);\n  }\n\n  ngAfterContentChecked() {\n    this.bitBadgeContainerHasChidlren.set(\n      this.bitBadgeContainer?.nativeElement.childElementCount > 0,\n    );\n  }\n\n  ngAfterViewInit() {\n    const labelText = this.labelContent?.nativeElement.innerText;\n    if (labelText) {\n      this.labelTitle.set(labelText);\n    }\n  }\n}\n","<input\n  type=\"radio\"\n  id=\"bit-toggle-{{ id }}\"\n  [name]=\"name\"\n  [ngClass]=\"inputClasses\"\n  [checked]=\"selected\"\n  (change)=\"onInputInteraction()\"\n/>\n<label for=\"bit-toggle-{{ id }}\" [ngClass]=\"labelClasses\" [title]=\"labelTitle()\">\n  <span class=\"tw-line-clamp-2 tw-break-words\" #labelContent>\n    <ng-content></ng-content>\n  </span>\n  <span class=\"tw-shrink-0\" #bitBadgeContainer [hidden]=\"!bitBadgeContainerHasChidlren()\">\n    <ng-content select=\"[bitBadge]\"></ng-content>\n  </span>\n</label>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { Directive, HostBinding, Input } from \"@angular/core\";\n\ntype TypographyType = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\" | \"body1\" | \"body2\" | \"helper\";\n\nconst styles: Record<TypographyType, string[]> = {\n  h1: [\"!tw-text-3xl\", \"tw-font-semibold\", \"tw-text-main\"],\n  h2: [\"!tw-text-2xl\", \"tw-font-semibold\", \"tw-text-main\"],\n  h3: [\"!tw-text-xl\", \"tw-font-semibold\", \"tw-text-main\"],\n  h4: [\"!tw-text-lg\", \"tw-font-semibold\", \"tw-text-main\"],\n  h5: [\"!tw-text-base\", \"tw-font-bold\", \"tw-text-main\"],\n  h6: [\"!tw-text-sm\", \"tw-font-bold\", \"tw-text-main\"],\n  body1: [\"!tw-text-base\"],\n  body2: [\"!tw-text-sm\"],\n  helper: [\"!tw-text-xs\"],\n};\n\nconst margins: Record<TypographyType, string[]> = {\n  h1: [\"tw-mb-2\"],\n  h2: [\"tw-mb-2\"],\n  h3: [\"tw-mb-2\"],\n  h4: [\"tw-mb-2\"],\n  h5: [\"tw-mb-1.5\"],\n  h6: [\"tw-mb-1.5\"],\n  body1: [],\n  body2: [],\n  helper: [],\n};\n\n@Directive({\n  selector: \"[bitTypography]\",\n  standalone: true,\n})\nexport class TypographyDirective {\n  @Input(\"bitTypography\") bitTypography: TypographyType;\n\n  private _margin = true;\n  @Input()\n  set noMargin(value: boolean | \"\") {\n    this._margin = !coerceBooleanProperty(value);\n  }\n\n  @HostBinding(\"class\") get classList() {\n    return styles[this.bitTypography].concat(this._margin ? margins[this.bitTypography] : []);\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { TypographyDirective } from \"./typography.directive\";\n\n@NgModule({\n  imports: [TypographyDirective],\n  exports: [TypographyDirective],\n})\nexport class TypographyModule {}\n","import { from, Observable, of, throwError } from \"rxjs\";\n\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nexport type FunctionReturningAwaitable =\n  | (() => unknown)\n  | (() => Promise<unknown>)\n  | (() => Observable<unknown>);\n\nexport function functionToObservable(func: FunctionReturningAwaitable): Observable<unknown> {\n  let awaitable: unknown;\n  try {\n    awaitable = func();\n  } catch (error) {\n    return throwError(() => error);\n  }\n\n  if (Utils.isPromise(awaitable)) {\n    return from(awaitable);\n  }\n\n  if (awaitable instanceof Observable) {\n    return awaitable;\n  }\n\n  return of(awaitable);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportCiphersRequest } from \"@bitwarden/common/models/request/import-ciphers.request\";\nimport { ImportOrganizationCiphersRequest } from \"@bitwarden/common/models/request/import-organization-ciphers.request\";\n\nexport abstract class ImportApiServiceAbstraction {\n  postImportCiphers: (request: ImportCiphersRequest) => Promise<any>;\n  postImportOrganizationCiphers: (\n    organizationId: string,\n    request: ImportOrganizationCiphersRequest,\n  ) => Promise<any>;\n}\n","import { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ImportCiphersRequest } from \"@bitwarden/common/models/request/import-ciphers.request\";\nimport { ImportOrganizationCiphersRequest } from \"@bitwarden/common/models/request/import-organization-ciphers.request\";\n\nimport { ImportApiServiceAbstraction } from \"./import-api.service.abstraction\";\n\nexport class ImportApiService implements ImportApiServiceAbstraction {\n  constructor(private apiService: ApiService) {}\n\n  async postImportCiphers(request: ImportCiphersRequest): Promise<any> {\n    return await this.apiService.send(\"POST\", \"/ciphers/import\", request, true, false);\n  }\n\n  async postImportOrganizationCiphers(\n    organizationId: string,\n    request: ImportOrganizationCiphersRequest,\n  ): Promise<any> {\n    return await this.apiService.send(\n      \"POST\",\n      \"/ciphers/import-organization?organizationId=\" + organizationId,\n      request,\n      true,\n      false,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\nimport { Importer } from \"../importers/importer\";\nimport { ImportOption, ImportType } from \"../models/import-options\";\nimport { ImportResult } from \"../models/import-result\";\n\nexport abstract class ImportServiceAbstraction {\n  featuredImportOptions: readonly ImportOption[];\n  regularImportOptions: readonly ImportOption[];\n  getImportOptions: () => ImportOption[];\n  import: (\n    importer: Importer,\n    fileContents: string,\n    organizationId?: string,\n    selectedImportTarget?: FolderView | CollectionView,\n    canAccessImportExport?: boolean,\n  ) => Promise<ImportResult>;\n  getImporter: (\n    format: ImportType | \"bitwardenpasswordprotected\",\n    promptForPassword_callback: () => Promise<string>,\n    organizationId: string,\n  ) => Importer;\n}\n","import { CipherRequest } from \"../../vault/models/request/cipher.request\";\nimport { FolderWithIdRequest } from \"../../vault/models/request/folder-with-id.request\";\n\nimport { KvpRequest } from \"./kvp.request\";\n\nexport class ImportCiphersRequest {\n  ciphers: CipherRequest[] = [];\n  folders: FolderWithIdRequest[] = [];\n  folderRelationships: KvpRequest<number, number>[] = [];\n}\n","import { CollectionWithIdRequest } from \"@bitwarden/admin-console/common\";\n\nimport { CipherRequest } from \"../../vault/models/request/cipher.request\";\n\nimport { KvpRequest } from \"./kvp.request\";\n\nexport class ImportOrganizationCiphersRequest {\n  ciphers: CipherRequest[] = [];\n  collections: CollectionWithIdRequest[] = [];\n  collectionRelationships: KvpRequest<number, number>[] = [];\n}\n","export class KvpRequest<TK, TV> {\n  key: TK;\n  value: TV;\n\n  constructor(key: TK, value: TV) {\n    this.key = key;\n    this.value = value;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\nexport class ImportResult {\n  success = false;\n  errorMessage: string;\n  ciphers: CipherView[] = [];\n  folders: FolderView[] = [];\n  folderRelationships: [number, number][] = [];\n  collections: CollectionView[] = [];\n  collectionRelationships: [number, number][] = [];\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as papa from \"papaparse\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { normalizeExpiryYearFormat } from \"@bitwarden/common/autofill/utils\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { ConsoleLogService } from \"@bitwarden/common/platform/services/console-log.service\";\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { LoginUriView } from \"@bitwarden/common/vault/models/view/login-uri.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nexport abstract class BaseImporter {\n  organizationId: string = null;\n\n  protected logService: LogService = new ConsoleLogService(false);\n\n  protected newLineRegex = /(?:\\r\\n|\\r|\\n)/;\n\n  protected passwordFieldNames = [\n    \"password\",\n    \"pass word\",\n    \"passphrase\",\n    \"pass phrase\",\n    \"pass\",\n    \"code\",\n    \"code word\",\n    \"codeword\",\n    \"secret\",\n    \"secret word\",\n    \"personpwd\",\n    \"key\",\n    \"keyword\",\n    \"key word\",\n    \"keyphrase\",\n    \"key phrase\",\n    \"form_pw\",\n    \"wppassword\",\n    \"pin\",\n    \"pwd\",\n    \"pw\",\n    \"pword\",\n    \"passwd\",\n    \"p\",\n    \"serial\",\n    \"serial#\",\n    \"license key\",\n    \"reg #\",\n\n    // Non-English names\n    \"passwort\",\n  ];\n\n  protected usernameFieldNames = [\n    \"user\",\n    \"name\",\n    \"user name\",\n    \"username\",\n    \"login name\",\n    \"email\",\n    \"e-mail\",\n    \"id\",\n    \"userid\",\n    \"user id\",\n    \"login\",\n    \"form_loginname\",\n    \"wpname\",\n    \"mail\",\n    \"loginid\",\n    \"login id\",\n    \"log\",\n    \"personlogin\",\n    \"first name\",\n    \"last name\",\n    \"card#\",\n    \"account #\",\n    \"member\",\n    \"member #\",\n\n    // Non-English names\n    \"nom\",\n    \"benutzername\",\n  ];\n\n  protected notesFieldNames = [\n    \"note\",\n    \"notes\",\n    \"comment\",\n    \"comments\",\n    \"memo\",\n    \"description\",\n    \"free form\",\n    \"freeform\",\n    \"free text\",\n    \"freetext\",\n    \"free\",\n\n    // Non-English names\n    \"kommentar\",\n  ];\n\n  protected uriFieldNames: string[] = [\n    \"url\",\n    \"hyper link\",\n    \"hyperlink\",\n    \"link\",\n    \"host\",\n    \"hostname\",\n    \"host name\",\n    \"server\",\n    \"address\",\n    \"hyper ref\",\n    \"href\",\n    \"web\",\n    \"website\",\n    \"web site\",\n    \"site\",\n    \"web-site\",\n    \"uri\",\n\n    // Non-English names\n    \"ort\",\n    \"adresse\",\n  ];\n\n  protected parseCsvOptions = {\n    encoding: \"UTF-8\",\n    skipEmptyLines: false,\n  };\n\n  protected get organization() {\n    return this.organizationId != null;\n  }\n\n  protected parseXml(data: string): Document {\n    // Ensure there are no external entity elements in the XML to prevent against XXE attacks.\n    if (!this.validateNoExternalEntities(data)) {\n      return null;\n    }\n    const parser = new DOMParser();\n    const doc = parser.parseFromString(data, \"application/xml\");\n    return doc != null && doc.querySelector(\"parsererror\") == null ? doc : null;\n  }\n\n  protected parseCsv(data: string, header: boolean, options: any = {}): any[] {\n    const parseOptions: papa.ParseConfig<string> = Object.assign(\n      { header: header },\n      this.parseCsvOptions,\n      options,\n    );\n    data = this.splitNewLine(data).join(\"\\n\").trim();\n    const result = papa.parse(data, parseOptions);\n    if (result.errors != null && result.errors.length > 0) {\n      result.errors.forEach((e) => {\n        if (e.row != null) {\n          this.logService.warning(\"Error parsing row \" + e.row + \": \" + e.message);\n        }\n      });\n    }\n    return result.data && result.data.length > 0 ? result.data : null;\n  }\n\n  protected parseSingleRowCsv(rowData: string) {\n    if (this.isNullOrWhitespace(rowData)) {\n      return null;\n    }\n    const parsedRow = this.parseCsv(rowData, false);\n    if (parsedRow != null && parsedRow.length > 0 && parsedRow[0].length > 0) {\n      return parsedRow[0];\n    }\n    return null;\n  }\n\n  protected makeUriArray(uri: string | string[]): LoginUriView[] {\n    if (uri == null) {\n      return null;\n    }\n\n    if (typeof uri === \"string\") {\n      const loginUri = new LoginUriView();\n      loginUri.uri = this.fixUri(uri);\n      if (this.isNullOrWhitespace(loginUri.uri)) {\n        return null;\n      }\n      loginUri.match = null;\n      return [loginUri];\n    }\n\n    if (uri.length > 0) {\n      const returnArr: LoginUriView[] = [];\n      uri.forEach((u) => {\n        const loginUri = new LoginUriView();\n        loginUri.uri = this.fixUri(u);\n        if (this.isNullOrWhitespace(loginUri.uri)) {\n          return;\n        }\n        loginUri.match = null;\n        returnArr.push(loginUri);\n      });\n      return returnArr.length === 0 ? null : returnArr;\n    }\n\n    return null;\n  }\n\n  protected fixUri(uri: string) {\n    if (uri == null) {\n      return null;\n    }\n    uri = uri.trim();\n    if (uri.indexOf(\"://\") === -1 && uri.indexOf(\".\") >= 0) {\n      uri = \"http://\" + uri;\n    }\n    if (uri.length > 1000) {\n      return uri.substring(0, 1000);\n    }\n    return uri;\n  }\n\n  protected nameFromUrl(url: string) {\n    const hostname = Utils.getHostname(url);\n    if (this.isNullOrWhitespace(hostname)) {\n      return null;\n    }\n    return hostname.startsWith(\"www.\") ? hostname.replace(\"www.\", \"\") : hostname;\n  }\n\n  protected isNullOrWhitespace(str: string): boolean {\n    return Utils.isNullOrWhitespace(str);\n  }\n\n  protected getValueOrDefault(str: string, defaultValue: string = null): string {\n    if (this.isNullOrWhitespace(str)) {\n      return defaultValue;\n    }\n    return str;\n  }\n\n  protected splitNewLine(str: string): string[] {\n    return str.split(this.newLineRegex);\n  }\n\n  protected setCardExpiration(cipher: CipherView, expiration: string): boolean {\n    if (this.isNullOrWhitespace(expiration)) {\n      return false;\n    }\n\n    expiration = expiration.replace(/\\s/g, \"\");\n\n    const monthRegex = \"0?(?<month>[1-9]|1[0-2])\";\n    const yearRegex = \"(?<year>(?:[1-2][0-9])?[0-9]{2})\";\n    const expiryRegex = new RegExp(`^${monthRegex}/${yearRegex}$`);\n\n    const expiryMatch = expiration.match(expiryRegex);\n\n    if (!expiryMatch) {\n      return false;\n    }\n\n    cipher.card.expMonth = expiryMatch.groups.month;\n    const year: string = expiryMatch.groups.year;\n    cipher.card.expYear = normalizeExpiryYearFormat(year);\n\n    return true;\n  }\n\n  protected moveFoldersToCollections(result: ImportResult) {\n    result.folderRelationships.forEach((r) => result.collectionRelationships.push(r));\n    result.collections = result.folders.map((f) => {\n      const collection = new CollectionView();\n      collection.name = f.name;\n      collection.id = f.id;\n      return collection;\n    });\n    result.folderRelationships = [];\n    result.folders = [];\n  }\n\n  protected querySelectorDirectChild(parentEl: Element, query: string) {\n    const els = this.querySelectorAllDirectChild(parentEl, query);\n    return els.length === 0 ? null : els[0];\n  }\n\n  protected querySelectorAllDirectChild(parentEl: Element, query: string) {\n    return Array.from(parentEl.querySelectorAll(query)).filter((el) => el.parentNode === parentEl);\n  }\n\n  protected initLoginCipher() {\n    const cipher = new CipherView();\n    cipher.favorite = false;\n    cipher.notes = \"\";\n    cipher.fields = [];\n    cipher.login = new LoginView();\n    cipher.type = CipherType.Login;\n    return cipher;\n  }\n\n  protected cleanupCipher(cipher: CipherView) {\n    if (cipher == null) {\n      return;\n    }\n    if (cipher.type !== CipherType.Login) {\n      cipher.login = null;\n    }\n    if (this.isNullOrWhitespace(cipher.name)) {\n      cipher.name = \"--\";\n    }\n    if (this.isNullOrWhitespace(cipher.notes)) {\n      cipher.notes = null;\n    } else {\n      cipher.notes = cipher.notes.trim();\n    }\n    if (cipher.fields != null && cipher.fields.length === 0) {\n      cipher.fields = null;\n    }\n    if (cipher.passwordHistory != null && cipher.passwordHistory.length === 0) {\n      cipher.passwordHistory = null;\n    }\n  }\n\n  protected processKvp(\n    cipher: CipherView,\n    key: string,\n    value: string,\n    type: FieldType = FieldType.Text,\n  ) {\n    if (this.isNullOrWhitespace(value)) {\n      return;\n    }\n    if (this.isNullOrWhitespace(key)) {\n      key = \"\";\n    }\n    if (value.length > 200 || value.trim().search(this.newLineRegex) > -1) {\n      if (cipher.notes == null) {\n        cipher.notes = \"\";\n      }\n      cipher.notes += key + \": \" + this.splitNewLine(value).join(\"\\n\") + \"\\n\";\n    } else {\n      if (cipher.fields == null) {\n        cipher.fields = [];\n      }\n      const field = new FieldView();\n      field.type = type;\n      field.name = key;\n      field.value = value;\n      cipher.fields.push(field);\n    }\n  }\n\n  protected processFolder(\n    result: ImportResult,\n    folderName: string,\n    addRelationship: boolean = true,\n  ) {\n    if (this.isNullOrWhitespace(folderName)) {\n      return;\n    }\n\n    let folderIndex = result.folders.length;\n    // Replace backslashes with forward slashes, ensuring we create sub-folders\n    folderName = folderName.replace(\"\\\\\", \"/\");\n    let addFolder = true;\n\n    for (let i = 0; i < result.folders.length; i++) {\n      if (result.folders[i].name === folderName) {\n        addFolder = false;\n        folderIndex = i;\n        break;\n      }\n    }\n\n    if (addFolder) {\n      const f = new FolderView();\n      f.name = folderName;\n      result.folders.push(f);\n    }\n\n    //Some folders can have sub-folders but no ciphers directly, we should not add to the folderRelationships array\n    if (addRelationship) {\n      result.folderRelationships.push([result.ciphers.length, folderIndex]);\n    }\n  }\n\n  protected convertToNoteIfNeeded(cipher: CipherView) {\n    if (\n      cipher.type === CipherType.Login &&\n      this.isNullOrWhitespace(cipher.login.username) &&\n      this.isNullOrWhitespace(cipher.login.password) &&\n      (cipher.login.uris == null || cipher.login.uris.length === 0)\n    ) {\n      cipher.type = CipherType.SecureNote;\n      cipher.secureNote = new SecureNoteView();\n      cipher.secureNote.type = SecureNoteType.Generic;\n    }\n  }\n\n  protected processFullName(cipher: CipherView, fullName: string) {\n    if (this.isNullOrWhitespace(fullName)) {\n      return;\n    }\n\n    const nameParts = fullName.split(\" \");\n    if (nameParts.length > 0) {\n      cipher.identity.firstName = this.getValueOrDefault(nameParts[0]);\n    }\n    if (nameParts.length === 2) {\n      cipher.identity.lastName = this.getValueOrDefault(nameParts[1]);\n    } else if (nameParts.length >= 3) {\n      cipher.identity.middleName = this.getValueOrDefault(nameParts[1]);\n      cipher.identity.lastName = nameParts.slice(2, nameParts.length).join(\" \");\n    }\n  }\n\n  private validateNoExternalEntities(data: string): boolean {\n    const regex = new RegExp(\"<!ENTITY\", \"i\");\n    const hasExternalEntities = regex.test(data);\n    return !hasExternalEntities;\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class AscendoCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 2) {\n        return;\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value[value.length - 1]);\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n\n      if (value.length > 2 && value.length % 2 === 0) {\n        for (let i = 0; i < value.length - 2; i += 2) {\n          const val: string = value[i + 2];\n          const field: string = value[i + 1];\n          if (this.isNullOrWhitespace(val) || this.isNullOrWhitespace(field)) {\n            continue;\n          }\n\n          const fieldLower = field.toLowerCase();\n          if (cipher.login.password == null && this.passwordFieldNames.indexOf(fieldLower) > -1) {\n            cipher.login.password = this.getValueOrDefault(val);\n          } else if (\n            cipher.login.username == null &&\n            this.usernameFieldNames.indexOf(fieldLower) > -1\n          ) {\n            cipher.login.username = this.getValueOrDefault(val);\n          } else if (\n            (cipher.login.uris == null || cipher.login.uris.length === 0) &&\n            this.uriFieldNames.indexOf(fieldLower) > -1\n          ) {\n            cipher.login.uris = this.makeUriArray(val);\n          } else {\n            this.processKvp(cipher, field, val);\n          }\n        }\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class AvastCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.name);\n      cipher.login.uris = this.makeUriArray(value.web);\n      cipher.login.password = this.getValueOrDefault(value.password);\n      cipher.login.username = this.getValueOrDefault(value.login);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class AvastJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = JSON.parse(data);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    if (results.logins != null) {\n      results.logins.forEach((value: any) => {\n        const cipher = this.initLoginCipher();\n        cipher.name = this.getValueOrDefault(value.custName);\n        cipher.notes = this.getValueOrDefault(value.note);\n        cipher.login.uris = this.makeUriArray(value.url);\n        cipher.login.password = this.getValueOrDefault(value.pwd);\n        cipher.login.username = this.getValueOrDefault(value.loginName);\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      });\n    }\n\n    if (results.notes != null) {\n      results.notes.forEach((value: any) => {\n        const cipher = this.initLoginCipher();\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote.type = SecureNoteType.Generic;\n        cipher.name = this.getValueOrDefault(value.label);\n        cipher.notes = this.getValueOrDefault(value.text);\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      });\n    }\n\n    if (results.cards != null) {\n      results.cards.forEach((value: any) => {\n        const cipher = this.initLoginCipher();\n        cipher.type = CipherType.Card;\n        cipher.name = this.getValueOrDefault(value.custName);\n        cipher.notes = this.getValueOrDefault(value.note);\n        cipher.card.cardholderName = this.getValueOrDefault(value.holderName);\n        cipher.card.number = this.getValueOrDefault(value.cardNumber);\n        cipher.card.code = this.getValueOrDefault(value.cvv);\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        if (value.expirationDate != null) {\n          if (value.expirationDate.month != null) {\n            cipher.card.expMonth = value.expirationDate.month + \"\";\n          }\n          if (value.expirationDate.year != null) {\n            cipher.card.expYear = value.expirationDate.year + \"\";\n          }\n        }\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      });\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class AviraCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(\n        value.name,\n        this.getValueOrDefault(this.nameFromUrl(value.website), \"--\"),\n      );\n      cipher.login.uris = this.makeUriArray(value.website);\n      cipher.login.password = this.getValueOrDefault(value.password);\n\n      if (\n        this.isNullOrWhitespace(value.username) &&\n        !this.isNullOrWhitespace(value.secondary_username)\n      ) {\n        cipher.login.username = value.secondary_username;\n      } else {\n        cipher.login.username = this.getValueOrDefault(value.username);\n        cipher.notes = this.getValueOrDefault(value.secondary_username);\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class BlackBerryCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.grouping === \"list\") {\n        return;\n      }\n      const cipher = this.initLoginCipher();\n      cipher.favorite = value.fav === \"1\";\n      cipher.name = this.getValueOrDefault(value.name);\n      cipher.notes = this.getValueOrDefault(value.extra);\n      if (value.grouping !== \"note\") {\n        cipher.login.uris = this.makeUriArray(value.url);\n        cipher.login.password = this.getValueOrDefault(value.password);\n        cipher.login.username = this.getValueOrDefault(value.username);\n      }\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class ChromeCsvImporter extends BaseImporter implements Importer {\n  private androidPatternRegex = new RegExp(\"^android:\\\\/\\\\/.*(?<=@)(.*)(?=\\\\/)\");\n\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      let name = value.name;\n      if (!name && this.androidPatternRegex.test(value.url)) {\n        name = value.url.match(this.androidPatternRegex)[1];\n      }\n      cipher.name = this.getValueOrDefault(name, \"--\");\n      cipher.login.username = this.getValueOrDefault(value.username);\n      cipher.login.password = this.getValueOrDefault(value.password);\n      cipher.login.uris = this.makeUriArray(value.url);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class BitwardenCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (this.organization && !this.isNullOrWhitespace(value.collections)) {\n        const collections = (value.collections as string).split(\",\");\n        collections.forEach((col) => {\n          let addCollection = true;\n          let collectionIndex = result.collections.length;\n\n          for (let i = 0; i < result.collections.length; i++) {\n            if (result.collections[i].name === col) {\n              addCollection = false;\n              collectionIndex = i;\n              break;\n            }\n          }\n\n          if (addCollection) {\n            const collection = new CollectionView();\n            collection.name = col;\n            result.collections.push(collection);\n          }\n\n          result.collectionRelationships.push([result.ciphers.length, collectionIndex]);\n        });\n      } else if (!this.organization) {\n        this.processFolder(result, value.folder);\n      }\n\n      const cipher = new CipherView();\n      cipher.favorite =\n        !this.organization && this.getValueOrDefault(value.favorite, \"0\") !== \"0\" ? true : false;\n      cipher.type = CipherType.Login;\n      cipher.notes = this.getValueOrDefault(value.notes);\n      cipher.name = this.getValueOrDefault(value.name, \"--\");\n      try {\n        cipher.reprompt = parseInt(\n          this.getValueOrDefault(value.reprompt, CipherRepromptType.None.toString()),\n          10,\n        );\n      } catch (e) {\n        // eslint-disable-next-line\n        console.error(\"Unable to parse reprompt value\", e);\n        cipher.reprompt = CipherRepromptType.None;\n      }\n\n      if (!this.isNullOrWhitespace(value.fields)) {\n        const fields = this.splitNewLine(value.fields);\n        for (let i = 0; i < fields.length; i++) {\n          if (this.isNullOrWhitespace(fields[i])) {\n            continue;\n          }\n\n          const delimPosition = fields[i].lastIndexOf(\": \");\n          if (delimPosition === -1) {\n            continue;\n          }\n\n          if (cipher.fields == null) {\n            cipher.fields = [];\n          }\n\n          const field = new FieldView();\n          field.name = fields[i].substr(0, delimPosition);\n          field.value = null;\n          field.type = FieldType.Text;\n          if (fields[i].length > delimPosition + 2) {\n            field.value = fields[i].substr(delimPosition + 2);\n          }\n          cipher.fields.push(field);\n        }\n      }\n\n      const valueType = value.type != null ? value.type.toLowerCase() : null;\n      switch (valueType) {\n        case \"note\":\n          cipher.type = CipherType.SecureNote;\n          cipher.secureNote = new SecureNoteView();\n          cipher.secureNote.type = SecureNoteType.Generic;\n          break;\n        default: {\n          cipher.type = CipherType.Login;\n          cipher.login = new LoginView();\n          cipher.login.totp = this.getValueOrDefault(value.login_totp || value.totp);\n          cipher.login.username = this.getValueOrDefault(value.login_username || value.username);\n          cipher.login.password = this.getValueOrDefault(value.login_password || value.password);\n          const uris = this.parseSingleRowCsv(value.login_uri || value.uri);\n          cipher.login.uris = this.makeUriArray(uris);\n          break;\n        }\n      }\n\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport {\n  CipherWithIdExport,\n  CollectionWithIdExport,\n  FolderWithIdExport,\n} from \"@bitwarden/common/models/export\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { KeyService } from \"@bitwarden/key-management\";\nimport {\n  BitwardenEncryptedIndividualJsonExport,\n  BitwardenEncryptedOrgJsonExport,\n  BitwardenJsonExport,\n  BitwardenUnEncryptedIndividualJsonExport,\n  BitwardenUnEncryptedOrgJsonExport,\n} from \"@bitwarden/vault-export-core\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class BitwardenJsonImporter extends BaseImporter implements Importer {\n  private result: ImportResult;\n\n  protected constructor(\n    protected keyService: KeyService,\n    protected encryptService: EncryptService,\n    protected i18nService: I18nService,\n    protected cipherService: CipherService,\n    protected pinService: PinServiceAbstraction,\n    protected accountService: AccountService,\n  ) {\n    super();\n  }\n\n  async parse(data: string): Promise<ImportResult> {\n    this.result = new ImportResult();\n    const results: BitwardenJsonExport = JSON.parse(data);\n    if (results == null || results.items == null) {\n      this.result.success = false;\n      return this.result;\n    }\n\n    if (results.encrypted) {\n      await this.parseEncrypted(results as any);\n    } else {\n      await this.parseDecrypted(results as any);\n    }\n\n    return this.result;\n  }\n\n  private async parseEncrypted(\n    results: BitwardenEncryptedIndividualJsonExport | BitwardenEncryptedOrgJsonExport,\n  ) {\n    if (results.encKeyValidation_DO_NOT_EDIT != null) {\n      let keyForDecryption: SymmetricCryptoKey = await this.keyService.getOrgKey(\n        this.organizationId,\n      );\n      if (keyForDecryption == null) {\n        keyForDecryption = await this.keyService.getUserKeyWithLegacySupport();\n      }\n      const encKeyValidation = new EncString(results.encKeyValidation_DO_NOT_EDIT);\n      const encKeyValidationDecrypt = await this.encryptService.decryptToUtf8(\n        encKeyValidation,\n        keyForDecryption,\n      );\n      if (encKeyValidationDecrypt === null) {\n        this.result.success = false;\n        this.result.errorMessage = this.i18nService.t(\"importEncKeyError\");\n        return;\n      }\n    }\n\n    const groupingsMap = this.organization\n      ? await this.parseCollections(results as BitwardenEncryptedOrgJsonExport)\n      : await this.parseFolders(results as BitwardenEncryptedIndividualJsonExport);\n\n    for (const c of results.items) {\n      const cipher = CipherWithIdExport.toDomain(c);\n      // reset ids incase they were set for some reason\n      cipher.id = null;\n      cipher.organizationId = this.organizationId;\n      cipher.collectionIds = null;\n\n      // make sure password history is limited\n      if (cipher.passwordHistory != null && cipher.passwordHistory.length > 5) {\n        cipher.passwordHistory = cipher.passwordHistory.slice(0, 5);\n      }\n\n      if (!this.organization && c.folderId != null && groupingsMap.has(c.folderId)) {\n        this.result.folderRelationships.push([\n          this.result.ciphers.length,\n          groupingsMap.get(c.folderId),\n        ]);\n      } else if (this.organization && c.collectionIds != null) {\n        c.collectionIds.forEach((cId) => {\n          if (groupingsMap.has(cId)) {\n            this.result.collectionRelationships.push([\n              this.result.ciphers.length,\n              groupingsMap.get(cId),\n            ]);\n          }\n        });\n      }\n\n      const activeUserId = await firstValueFrom(\n        this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n      );\n      const view = await cipher.decrypt(\n        await this.cipherService.getKeyForCipherKeyDecryption(cipher, activeUserId),\n      );\n      this.cleanupCipher(view);\n      this.result.ciphers.push(view);\n    }\n\n    this.result.success = true;\n  }\n\n  private async parseDecrypted(\n    results: BitwardenUnEncryptedIndividualJsonExport | BitwardenUnEncryptedOrgJsonExport,\n  ) {\n    const groupingsMap = this.organization\n      ? await this.parseCollections(results as BitwardenUnEncryptedOrgJsonExport)\n      : await this.parseFolders(results as BitwardenUnEncryptedIndividualJsonExport);\n\n    results.items.forEach((c) => {\n      const cipher = CipherWithIdExport.toView(c);\n      // reset ids incase they were set for some reason\n      cipher.id = null;\n      cipher.organizationId = null;\n      cipher.collectionIds = null;\n\n      // make sure password history is limited\n      if (cipher.passwordHistory != null && cipher.passwordHistory.length > 5) {\n        cipher.passwordHistory = cipher.passwordHistory.slice(0, 5);\n      }\n\n      if (!this.organization && c.folderId != null && groupingsMap.has(c.folderId)) {\n        this.result.folderRelationships.push([\n          this.result.ciphers.length,\n          groupingsMap.get(c.folderId),\n        ]);\n      } else if (this.organization && c.collectionIds != null) {\n        c.collectionIds.forEach((cId) => {\n          if (groupingsMap.has(cId)) {\n            this.result.collectionRelationships.push([\n              this.result.ciphers.length,\n              groupingsMap.get(cId),\n            ]);\n          }\n        });\n      }\n\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n\n    this.result.success = true;\n  }\n\n  private async parseFolders(\n    data: BitwardenUnEncryptedIndividualJsonExport | BitwardenEncryptedIndividualJsonExport,\n  ): Promise<Map<string, number>> | null {\n    if (data.folders == null) {\n      return null;\n    }\n\n    const groupingsMap = new Map<string, number>();\n\n    for (const f of data.folders) {\n      let folderView: FolderView;\n      if (data.encrypted) {\n        const folder = FolderWithIdExport.toDomain(f);\n        if (folder != null) {\n          folderView = await folder.decrypt();\n        }\n      } else {\n        folderView = FolderWithIdExport.toView(f);\n      }\n\n      if (folderView != null) {\n        groupingsMap.set(f.id, this.result.folders.length);\n        this.result.folders.push(folderView);\n      }\n    }\n    return groupingsMap;\n  }\n\n  private async parseCollections(\n    data: BitwardenUnEncryptedOrgJsonExport | BitwardenEncryptedOrgJsonExport,\n  ): Promise<Map<string, number>> | null {\n    if (data.collections == null) {\n      return null;\n    }\n\n    const groupingsMap = new Map<string, number>();\n\n    for (const c of data.collections) {\n      let collectionView: CollectionView;\n      if (data.encrypted) {\n        const collection = CollectionWithIdExport.toDomain(c);\n        collection.organizationId = this.organizationId;\n        collectionView = await firstValueFrom(this.keyService.activeUserOrgKeys$).then((orgKeys) =>\n          collection.decrypt(orgKeys[c.organizationId as OrganizationId]),\n        );\n      } else {\n        collectionView = CollectionWithIdExport.toView(c);\n        collectionView.organizationId = null;\n      }\n\n      if (collectionView != null) {\n        groupingsMap.set(c.id, this.result.collections.length);\n        this.result.collections.push(collectionView);\n      }\n    }\n    return groupingsMap;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"@bitwarden/common/platform/models/domain/symmetric-crypto-key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport {\n  Argon2KdfConfig,\n  KdfConfig,\n  PBKDF2KdfConfig,\n  KeyService,\n  KdfType,\n} from \"@bitwarden/key-management\";\nimport { BitwardenPasswordProtectedFileFormat } from \"@bitwarden/vault-export-core\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { Importer } from \"../importer\";\n\nimport { BitwardenJsonImporter } from \"./bitwarden-json-importer\";\n\nexport class BitwardenPasswordProtectedImporter extends BitwardenJsonImporter implements Importer {\n  private key: SymmetricCryptoKey;\n\n  constructor(\n    keyService: KeyService,\n    encryptService: EncryptService,\n    i18nService: I18nService,\n    cipherService: CipherService,\n    pinService: PinServiceAbstraction,\n    accountService: AccountService,\n    private promptForPassword_callback: () => Promise<string>,\n  ) {\n    super(keyService, encryptService, i18nService, cipherService, pinService, accountService);\n  }\n\n  async parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const parsedData: BitwardenPasswordProtectedFileFormat = JSON.parse(data);\n\n    if (!parsedData) {\n      result.success = false;\n      return result;\n    }\n\n    // File is unencrypted\n    if (!parsedData?.encrypted) {\n      return await super.parse(data);\n    }\n\n    // File is account-encrypted\n    if (!parsedData?.passwordProtected) {\n      return await super.parse(data);\n    }\n\n    if (this.cannotParseFile(parsedData)) {\n      result.success = false;\n      return result;\n    }\n\n    // File is password-protected\n    const password = await this.promptForPassword_callback();\n    if (!(await this.checkPassword(parsedData, password))) {\n      result.success = false;\n      result.errorMessage = this.i18nService.t(\"invalidFilePassword\");\n      return result;\n    }\n\n    const encData = new EncString(parsedData.data);\n    const clearTextData = await this.encryptService.decryptToUtf8(encData, this.key);\n    return await super.parse(clearTextData);\n  }\n\n  private async checkPassword(\n    jdoc: BitwardenPasswordProtectedFileFormat,\n    password: string,\n  ): Promise<boolean> {\n    if (this.isNullOrWhitespace(password)) {\n      return false;\n    }\n\n    const kdfConfig: KdfConfig =\n      jdoc.kdfType === KdfType.PBKDF2_SHA256\n        ? new PBKDF2KdfConfig(jdoc.kdfIterations)\n        : new Argon2KdfConfig(jdoc.kdfIterations, jdoc.kdfMemory, jdoc.kdfParallelism);\n\n    this.key = await this.pinService.makePinKey(password, jdoc.salt, kdfConfig);\n\n    const encKeyValidation = new EncString(jdoc.encKeyValidation_DO_NOT_EDIT);\n\n    const encKeyValidationDecrypt = await this.encryptService.decryptToUtf8(\n      encKeyValidation,\n      this.key,\n    );\n    if (encKeyValidationDecrypt === null) {\n      return false;\n    }\n    return true;\n  }\n\n  private cannotParseFile(jdoc: BitwardenPasswordProtectedFileFormat): boolean {\n    return (\n      !jdoc ||\n      !jdoc.encrypted ||\n      !jdoc.passwordProtected ||\n      !jdoc.salt ||\n      !jdoc.kdfIterations ||\n      typeof jdoc.kdfIterations !== \"number\" ||\n      jdoc.kdfType == null ||\n      KdfType[jdoc.kdfType] == null ||\n      !jdoc.encKeyValidation_DO_NOT_EDIT ||\n      !jdoc.data\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class BlurCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.label === \"null\") {\n        value.label = null;\n      }\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(\n        value.label,\n        this.getValueOrDefault(this.nameFromUrl(value.domain), \"--\"),\n      );\n      cipher.login.uris = this.makeUriArray(value.domain);\n      cipher.login.password = this.getValueOrDefault(value.password);\n\n      if (this.isNullOrWhitespace(value.email) && !this.isNullOrWhitespace(value.username)) {\n        cipher.login.username = value.username;\n      } else {\n        cipher.login.username = this.getValueOrDefault(value.email);\n        cipher.notes = this.getValueOrDefault(value.username);\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nconst OfficialProps = [\"!group_id\", \"!group_name\", \"title\", \"username\", \"password\", \"URL\", \"id\"];\n\nexport class ButtercupCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      this.processFolder(result, this.getValueOrDefault(value[\"!group_name\"]));\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.title, \"--\");\n      cipher.login.username = this.getValueOrDefault(value.username);\n      cipher.login.password = this.getValueOrDefault(value.password);\n      cipher.login.uris = this.makeUriArray(value.URL);\n\n      let processingCustomFields = false;\n      for (const prop in value) {\n        // eslint-disable-next-line\n        if (value.hasOwnProperty(prop)) {\n          if (!processingCustomFields && OfficialProps.indexOf(prop) === -1) {\n            processingCustomFields = true;\n          }\n          if (processingCustomFields) {\n            this.processKvp(cipher, prop, value[prop]);\n          }\n        }\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class ClipperzHtmlImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const textarea = doc.querySelector(\"textarea\");\n    if (textarea == null || this.isNullOrWhitespace(textarea.textContent)) {\n      result.errorMessage = \"Missing textarea.\";\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const entries = JSON.parse(textarea.textContent);\n    entries.forEach((entry: any) => {\n      const cipher = this.initLoginCipher();\n      if (!this.isNullOrWhitespace(entry.label)) {\n        cipher.name = entry.label.split(\" \")[0];\n      }\n      if (entry.data != null && !this.isNullOrWhitespace(entry.data.notes)) {\n        cipher.notes = entry.data.notes.split(\"\\\\n\").join(\"\\n\");\n      }\n\n      if (entry.currentVersion != null && entry.currentVersion.fields != null) {\n        for (const property in entry.currentVersion.fields) {\n          // eslint-disable-next-line\n          if (!entry.currentVersion.fields.hasOwnProperty(property)) {\n            continue;\n          }\n\n          const field = entry.currentVersion.fields[property];\n          const actionType = field.actionType != null ? field.actionType.toLowerCase() : null;\n          switch (actionType) {\n            case \"password\":\n              cipher.login.password = this.getValueOrDefault(field.value);\n              break;\n            case \"email\":\n            case \"username\":\n            case \"user\":\n            case \"name\":\n              cipher.login.username = this.getValueOrDefault(field.value);\n              break;\n            case \"url\":\n              cipher.login.uris = this.makeUriArray(field.value);\n              break;\n            default: {\n              const labelLower = field.label != null ? field.label.toLowerCase() : null;\n              if (\n                cipher.login.password == null &&\n                this.passwordFieldNames.indexOf(labelLower) > -1\n              ) {\n                cipher.login.password = this.getValueOrDefault(field.value);\n              } else if (\n                cipher.login.username == null &&\n                this.usernameFieldNames.indexOf(labelLower) > -1\n              ) {\n                cipher.login.username = this.getValueOrDefault(field.value);\n              } else if (\n                (cipher.login.uris == null || cipher.login.uris.length === 0) &&\n                this.uriFieldNames.indexOf(labelLower) > -1\n              ) {\n                cipher.login.uris = this.makeUriArray(field.value);\n              } else {\n                this.processKvp(cipher, field.label, field.value);\n              }\n              break;\n            }\n          }\n        }\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class CodebookCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      this.processFolder(result, this.getValueOrDefault(value.Category));\n\n      const cipher = this.initLoginCipher();\n      cipher.favorite = this.getValueOrDefault(value.Favorite) === \"True\";\n      cipher.name = this.getValueOrDefault(value.Entry, \"--\");\n      cipher.notes = this.getValueOrDefault(value.Note);\n      cipher.login.username = this.getValueOrDefault(value.Username, value.Email);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.totp = this.getValueOrDefault(value.TOTP);\n      cipher.login.uris = this.makeUriArray(value.Website);\n\n      if (!this.isNullOrWhitespace(value.Username)) {\n        this.processKvp(cipher, \"Email\", value.Email);\n      }\n      this.processKvp(cipher, \"Phone\", value.Phone);\n      this.processKvp(cipher, \"PIN\", value.PIN);\n      this.processKvp(cipher, \"Account\", value.Account);\n      this.processKvp(cipher, \"Date\", value.Date);\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport {\n  CredentialsRecord,\n  IdRecord,\n  PaymentsRecord,\n  PersonalInformationRecord,\n  SecureNoteRecord,\n} from \"./types/dashlane-csv-types\";\n\nconst _mappedCredentialsColumns = new Set([\n  \"title\",\n  \"note\",\n  \"username\",\n  \"password\",\n  \"url\",\n  \"otpSecret\",\n  \"category\",\n]);\n\nconst _mappedPersonalInfoAsIdentityColumns = new Set([\n  \"type\",\n  \"title\",\n  \"first_name\",\n  \"middle_name\",\n  \"last_name\",\n  \"login\",\n  \"email\",\n  \"phone_number\",\n  \"address\",\n  \"country\",\n  \"state\",\n  \"city\",\n  \"zip\",\n  // Skip item_name as we already have set a combined name\n  \"item_name\",\n]);\n\nconst _mappedSecureNoteColumns = new Set([\"title\", \"note\"]);\n\nexport class DashlaneCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    if (results[0].type != null && results[0].title != null) {\n      const personalRecords = results as PersonalInformationRecord[];\n\n      // If personalRecords has only one \"name\" then create an Identity-Cipher\n      if (personalRecords.filter((x) => x.type === \"name\").length === 1) {\n        const cipher = this.initLoginCipher();\n        cipher.type = CipherType.Identity;\n        cipher.identity = new IdentityView();\n        results.forEach((row) => {\n          this.parsePersonalInformationRecordAsIdentity(cipher, row);\n        });\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n        result.success = true;\n        return Promise.resolve(result);\n      }\n    }\n\n    results.forEach((row) => {\n      const cipher = this.initLoginCipher();\n\n      const rowKeys = Object.keys(row);\n      if (rowKeys[0] === \"username\") {\n        this.processFolder(result, row.category);\n        this.parseCredentialsRecord(cipher, row);\n      }\n\n      if (rowKeys[0] === \"type\" && rowKeys[1] === \"account_name\") {\n        this.parsePaymentRecord(cipher, row);\n      }\n\n      if (rowKeys[0] === \"type\" && rowKeys[1] === \"number\") {\n        this.parseIdRecord(cipher, row);\n      }\n\n      if ((rowKeys[0] === \"type\") != null && rowKeys[1] === \"title\") {\n        this.parsePersonalInformationRecord(cipher, row);\n      }\n\n      if (rowKeys[0] === \"title\" && rowKeys[1] === \"note\") {\n        this.parseSecureNoteRecords(cipher, row);\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  parseCredentialsRecord(cipher: CipherView, row: CredentialsRecord) {\n    cipher.type = CipherType.Login;\n    cipher.login = new LoginView();\n\n    cipher.name = row.title;\n    cipher.notes = row.note;\n    cipher.login.username = row.username;\n    cipher.login.password = row.password;\n    cipher.login.totp = Object.keys(row).includes(\"otpUrl\") ? row.otpUrl : row.otpSecret;\n    cipher.login.uris = this.makeUriArray(row.url);\n\n    this.importUnmappedFields(cipher, row, _mappedCredentialsColumns);\n  }\n\n  parsePaymentRecord(cipher: CipherView, row: PaymentsRecord) {\n    cipher.type = CipherType.Card;\n    cipher.card = new CardView();\n\n    cipher.name = row.account_name;\n    let mappedValues: string[] = [];\n    switch (row.type) {\n      case \"credit_card\":\n        cipher.card.cardholderName = row.account_name;\n        cipher.card.number = row.cc_number;\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        cipher.card.code = row.code;\n        this.setCardExpiration(cipher, `${row.expiration_month}/${row.expiration_year}`);\n\n        // If you add more mapped fields please extend this\n        mappedValues = [\n          \"account_name\",\n          \"account_holder\",\n          \"cc_number\",\n          \"code\",\n          \"expiration_month\",\n          \"expiration_year\",\n        ];\n        break;\n      case \"bank\":\n        cipher.card.cardholderName = row.account_holder;\n        cipher.card.number = row.account_number;\n\n        // If you add more mapped fields please extend this\n        mappedValues = [\"account_name\", \"account_holder\", \"account_number\"];\n        break;\n      default:\n        break;\n    }\n\n    this.importUnmappedFields(cipher, row, new Set(mappedValues));\n  }\n\n  parseIdRecord(cipher: CipherView, row: IdRecord) {\n    cipher.type = CipherType.Identity;\n    cipher.identity = new IdentityView();\n\n    const mappedValues: string[] = [\"name\", \"number\"];\n    switch (row.type) {\n      case \"card\":\n        cipher.name = `${row.name} ${row.type}`;\n        this.processFullName(cipher, row.name);\n        cipher.identity.licenseNumber = row.number;\n        break;\n      case \"passport\":\n        cipher.name = `${row.name} ${row.type}`;\n        this.processFullName(cipher, row.name);\n        cipher.identity.passportNumber = row.number;\n        break;\n      case \"license\":\n        cipher.name = `${row.name} ${row.type}`;\n        this.processFullName(cipher, row.name);\n        cipher.identity.licenseNumber = row.number;\n        cipher.identity.state = row.state;\n\n        mappedValues.push(\"state\");\n        break;\n      case \"social_security\":\n        cipher.name = `${row.name} ${row.type}`;\n        this.processFullName(cipher, row.name);\n        cipher.identity.ssn = row.number;\n        break;\n      case \"tax_number\":\n        cipher.name = row.type;\n        cipher.identity.licenseNumber = row.number;\n        break;\n\n      default:\n        break;\n    }\n\n    // If you add more mapped fields please extend this\n    this.importUnmappedFields(cipher, row, new Set(mappedValues));\n  }\n\n  parsePersonalInformationRecord(cipher: CipherView, row: PersonalInformationRecord) {\n    cipher.type = CipherType.SecureNote;\n    cipher.secureNote.type = SecureNoteType.Generic;\n    if (row.type === \"name\") {\n      cipher.name = `${row.title} ${row.first_name} ${row.middle_name} ${row.last_name}`\n        .replace(\"  \", \" \")\n        .trim();\n    } else {\n      cipher.name = row.item_name;\n    }\n\n    const dataRow = row as any;\n    Object.keys(row).forEach((key) => {\n      this.processKvp(cipher, key, dataRow[key]);\n    });\n  }\n\n  parsePersonalInformationRecordAsIdentity(cipher: CipherView, row: PersonalInformationRecord) {\n    switch (row.type) {\n      case \"name\":\n        this.processFullName(cipher, `${row.first_name} ${row.middle_name} ${row.last_name}`);\n        cipher.identity.title = row.title;\n        cipher.name = cipher.identity.fullName;\n\n        cipher.identity.username = row.login;\n        break;\n      case \"email\":\n        cipher.identity.email = row.email;\n        break;\n      case \"number\":\n        cipher.identity.phone = row.phone_number;\n        break;\n      case \"address\":\n        cipher.identity.address1 = row.address;\n        cipher.identity.city = row.city;\n        cipher.identity.postalCode = row.zip;\n        cipher.identity.state = row.state;\n        cipher.identity.country = row.country;\n        break;\n      default:\n        break;\n    }\n\n    this.importUnmappedFields(cipher, row, _mappedPersonalInfoAsIdentityColumns);\n  }\n\n  parseSecureNoteRecords(cipher: CipherView, row: SecureNoteRecord) {\n    cipher.type = CipherType.SecureNote;\n    cipher.secureNote.type = SecureNoteType.Generic;\n    cipher.name = row.title;\n    cipher.notes = row.note;\n\n    this.importUnmappedFields(cipher, row, _mappedSecureNoteColumns);\n  }\n\n  importUnmappedFields(cipher: CipherView, row: any, mappedValues: Set<string>) {\n    const unmappedFields = Object.keys(row).filter((x) => !mappedValues.has(x));\n    unmappedFields.forEach((key) => {\n      const item = row as any;\n      this.processKvp(cipher, key, item[key]);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nconst HandledResults = new Set([\n  \"ADDRESS\",\n  \"AUTHENTIFIANT\",\n  \"BANKSTATEMENT\",\n  \"IDCARD\",\n  \"IDENTITY\",\n  \"PAYMENTMEANS_CREDITCARD\",\n  \"PAYMENTMEAN_PAYPAL\",\n  \"EMAIL\",\n]);\n\nexport class DashlaneJsonImporter extends BaseImporter implements Importer {\n  private result: ImportResult;\n\n  parse(data: string): Promise<ImportResult> {\n    this.result = new ImportResult();\n    const results = JSON.parse(data);\n    if (results == null || results.length === 0) {\n      this.result.success = false;\n      return Promise.resolve(this.result);\n    }\n\n    if (results.ADDRESS != null) {\n      this.processAddress(results.ADDRESS);\n    }\n    if (results.AUTHENTIFIANT != null) {\n      this.processAuth(results.AUTHENTIFIANT);\n    }\n    if (results.BANKSTATEMENT != null) {\n      this.processNote(results.BANKSTATEMENT, \"BankAccountName\");\n    }\n    if (results.IDCARD != null) {\n      this.processNote(results.IDCARD, \"Fullname\");\n    }\n    if (results.PAYMENTMEANS_CREDITCARD != null) {\n      this.processCard(results.PAYMENTMEANS_CREDITCARD);\n    }\n    if (results.IDENTITY != null) {\n      this.processIdentity(results.IDENTITY);\n    }\n\n    for (const key in results) {\n      // eslint-disable-next-line\n      if (results.hasOwnProperty(key) && !HandledResults.has(key)) {\n        this.processNote(results[key], null, \"Generic Note\");\n      }\n    }\n\n    this.result.success = true;\n    return Promise.resolve(this.result);\n  }\n\n  private processAuth(results: any[]) {\n    results.forEach((credential: any) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(credential.title);\n\n      cipher.login.username = this.getValueOrDefault(\n        credential.login,\n        this.getValueOrDefault(credential.secondaryLogin),\n      );\n      if (this.isNullOrWhitespace(cipher.login.username)) {\n        cipher.login.username = this.getValueOrDefault(credential.email);\n      } else if (!this.isNullOrWhitespace(credential.email)) {\n        cipher.notes = \"Email: \" + credential.email + \"\\n\";\n      }\n\n      cipher.login.password = this.getValueOrDefault(credential.password);\n      cipher.login.uris = this.makeUriArray(credential.domain);\n      cipher.notes += this.getValueOrDefault(credential.note, \"\");\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n  }\n\n  private processIdentity(results: any[]) {\n    results.forEach((obj: any) => {\n      const cipher = new CipherView();\n      cipher.identity = new IdentityView();\n      cipher.type = CipherType.Identity;\n      cipher.name = this.getValueOrDefault(obj.fullName, \"\");\n      const nameParts = cipher.name.split(\" \");\n      if (nameParts.length > 0) {\n        cipher.identity.firstName = this.getValueOrDefault(nameParts[0]);\n      }\n      if (nameParts.length === 2) {\n        cipher.identity.lastName = this.getValueOrDefault(nameParts[1]);\n      } else if (nameParts.length === 3) {\n        cipher.identity.middleName = this.getValueOrDefault(nameParts[1]);\n        cipher.identity.lastName = this.getValueOrDefault(nameParts[2]);\n      }\n      cipher.identity.username = this.getValueOrDefault(obj.pseudo);\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n  }\n\n  private processAddress(results: any[]) {\n    results.forEach((obj: any) => {\n      const cipher = new CipherView();\n      cipher.identity = new IdentityView();\n      cipher.type = CipherType.Identity;\n      cipher.name = this.getValueOrDefault(obj.addressName);\n      cipher.identity.address1 = this.getValueOrDefault(obj.addressFull);\n      cipher.identity.city = this.getValueOrDefault(obj.city);\n      cipher.identity.state = this.getValueOrDefault(obj.state);\n      cipher.identity.postalCode = this.getValueOrDefault(obj.zipcode);\n      cipher.identity.country = this.getValueOrDefault(obj.country);\n      if (cipher.identity.country != null) {\n        cipher.identity.country = cipher.identity.country.toUpperCase();\n      }\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n  }\n\n  private processCard(results: any[]) {\n    results.forEach((obj: any) => {\n      const cipher = new CipherView();\n      cipher.card = new CardView();\n      cipher.type = CipherType.Card;\n      cipher.name = this.getValueOrDefault(obj.bank);\n      cipher.card.number = this.getValueOrDefault(obj.cardNumber);\n      cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n      cipher.card.cardholderName = this.getValueOrDefault(obj.owner);\n      if (!this.isNullOrWhitespace(cipher.card.brand)) {\n        if (this.isNullOrWhitespace(cipher.name)) {\n          cipher.name = cipher.card.brand;\n        } else {\n          cipher.name += \" - \" + cipher.card.brand;\n        }\n      }\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n  }\n\n  private processNote(results: any[], nameProperty: string, name: string = null) {\n    results.forEach((obj: any) => {\n      const cipher = new CipherView();\n      cipher.secureNote = new SecureNoteView();\n      cipher.type = CipherType.SecureNote;\n      cipher.secureNote.type = SecureNoteType.Generic;\n      if (name != null) {\n        cipher.name = name;\n      } else {\n        cipher.name = this.getValueOrDefault(obj[nameProperty]);\n      }\n      for (const key in obj) {\n        // eslint-disable-next-line\n        if (obj.hasOwnProperty(key) && key !== nameProperty) {\n          this.processKvp(cipher, key, obj[key].toString());\n        }\n      }\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class EncryptrCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.Label, \"--\");\n      cipher.notes = this.getValueOrDefault(value.Notes);\n      const text = this.getValueOrDefault(value.Text);\n      if (!this.isNullOrWhitespace(text)) {\n        if (this.isNullOrWhitespace(cipher.notes)) {\n          cipher.notes = text;\n        } else {\n          cipher.notes += \"\\n\\n\" + text;\n        }\n      }\n\n      const type = value[\"Entry Type\"];\n      if (type === \"Password\") {\n        cipher.login.username = this.getValueOrDefault(value.Username);\n        cipher.login.password = this.getValueOrDefault(value.Password);\n        cipher.login.uris = this.makeUriArray(value[\"Site URL\"]);\n      } else if (type === \"Credit Card\") {\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n        cipher.card.cardholderName = this.getValueOrDefault(value[\"Name on card\"]);\n        cipher.card.number = this.getValueOrDefault(value[\"Card Number\"]);\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        cipher.card.code = this.getValueOrDefault(value.CVV);\n        const expiry = this.getValueOrDefault(value.Expiry);\n        if (!this.isNullOrWhitespace(expiry)) {\n          const expParts = expiry.split(\"/\");\n          if (expParts.length > 1) {\n            cipher.card.expMonth = parseInt(expParts[0], null).toString();\n            cipher.card.expYear = (2000 + parseInt(expParts[1], null)).toString();\n          }\n        }\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class EnpassCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    let firstRow = true;\n    results.forEach((value) => {\n      if (value.length < 2 || (firstRow && (value[0] === \"Title\" || value[0] === \"title\"))) {\n        firstRow = false;\n        return;\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value[value.length - 1]);\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n\n      if (\n        value.length === 2 ||\n        (!this.containsField(value, \"username\") &&\n          !this.containsField(value, \"password\") &&\n          !this.containsField(value, \"email\") &&\n          !this.containsField(value, \"url\"))\n      ) {\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote = new SecureNoteView();\n        cipher.secureNote.type = SecureNoteType.Generic;\n      }\n\n      if (\n        this.containsField(value, \"cardholder\") &&\n        this.containsField(value, \"number\") &&\n        this.containsField(value, \"expiry date\")\n      ) {\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n      }\n\n      if (value.length > 2 && value.length % 2 === 0) {\n        for (let i = 0; i < value.length - 2; i += 2) {\n          const fieldValue: string = value[i + 2];\n          if (this.isNullOrWhitespace(fieldValue)) {\n            continue;\n          }\n\n          const fieldName: string = value[i + 1];\n          const fieldNameLower = fieldName.toLowerCase();\n\n          if (cipher.type === CipherType.Login) {\n            if (\n              fieldNameLower === \"url\" &&\n              (cipher.login.uris == null || cipher.login.uris.length === 0)\n            ) {\n              cipher.login.uris = this.makeUriArray(fieldValue);\n              continue;\n            } else if (\n              (fieldNameLower === \"username\" || fieldNameLower === \"email\") &&\n              this.isNullOrWhitespace(cipher.login.username)\n            ) {\n              cipher.login.username = fieldValue;\n              continue;\n            } else if (\n              fieldNameLower === \"password\" &&\n              this.isNullOrWhitespace(cipher.login.password)\n            ) {\n              cipher.login.password = fieldValue;\n              continue;\n            } else if (fieldNameLower === \"totp\" && this.isNullOrWhitespace(cipher.login.totp)) {\n              cipher.login.totp = fieldValue;\n              continue;\n            }\n          } else if (cipher.type === CipherType.Card) {\n            if (\n              fieldNameLower === \"cardholder\" &&\n              this.isNullOrWhitespace(cipher.card.cardholderName)\n            ) {\n              cipher.card.cardholderName = fieldValue;\n              continue;\n            } else if (fieldNameLower === \"number\" && this.isNullOrWhitespace(cipher.card.number)) {\n              cipher.card.number = fieldValue;\n              cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n              continue;\n            } else if (fieldNameLower === \"cvc\" && this.isNullOrWhitespace(cipher.card.code)) {\n              cipher.card.code = fieldValue;\n              continue;\n            } else if (\n              fieldNameLower === \"expiry date\" &&\n              this.isNullOrWhitespace(cipher.card.expMonth) &&\n              this.isNullOrWhitespace(cipher.card.expYear)\n            ) {\n              if (this.setCardExpiration(cipher, fieldValue)) {\n                continue;\n              }\n            } else if (fieldNameLower === \"type\") {\n              // Skip since brand was determined from number above\n              continue;\n            }\n          }\n\n          this.processKvp(cipher, fieldName, fieldValue);\n        }\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private containsField(fields: any[], name: string) {\n    if (fields == null || name == null) {\n      return false;\n    }\n    return (\n      fields.filter((f) => !this.isNullOrWhitespace(f) && f.toLowerCase() === name.toLowerCase())\n        .length > 0\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { EnpassJsonFile, EnpassFolder, EnpassField } from \"./types/enpass-json-type\";\n\ntype EnpassFolderTreeItem = EnpassFolder & { children: EnpassFolderTreeItem[] };\nconst androidUrlRegex = new RegExp(\"androidapp://.*==@\", \"g\");\n\nexport class EnpassJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results: EnpassJsonFile = JSON.parse(data);\n    if (results == null || results.items == null || results.items.length === 0) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const foldersMap = new Map<string, string>();\n    const foldersIndexMap = new Map<string, number>();\n    const folderTree = this.buildFolderTree(results.folders);\n    this.flattenFolderTree(null, folderTree, foldersMap);\n    foldersMap.forEach((val, key) => {\n      foldersIndexMap.set(key, result.folders.length);\n      const f = new FolderView();\n      f.name = val;\n      result.folders.push(f);\n    });\n\n    results.items.forEach((item) => {\n      if (item.folders != null && item.folders.length > 0 && foldersIndexMap.has(item.folders[0])) {\n        result.folderRelationships.push([\n          result.ciphers.length,\n          foldersIndexMap.get(item.folders[0]),\n        ]);\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(item.title);\n      cipher.favorite = item.favorite > 0;\n\n      if (item.template_type != null && item.fields != null && item.fields.length > 0) {\n        if (\n          item.template_type.indexOf(\"login.\") === 0 ||\n          item.template_type.indexOf(\"password.\") === 0\n        ) {\n          this.processLogin(cipher, item.fields);\n        } else if (item.template_type.indexOf(\"creditcard.\") === 0) {\n          this.processCard(cipher, item.fields);\n        } else if (\n          item.template_type.indexOf(\"identity.\") < 0 &&\n          item.fields.some((f) => f.type === \"password\" && !this.isNullOrWhitespace(f.value))\n        ) {\n          this.processLogin(cipher, item.fields);\n        } else {\n          this.processNote(cipher, item.fields);\n        }\n      }\n\n      cipher.notes += \"\\n\" + this.getValueOrDefault(item.note, \"\");\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private processLogin(cipher: CipherView, fields: EnpassField[]) {\n    const urls: string[] = [];\n    fields.forEach((field) => {\n      if (this.isNullOrWhitespace(field.value) || field.type === \"section\") {\n        return;\n      }\n\n      if (\n        (field.type === \"username\" || field.type === \"email\") &&\n        this.isNullOrWhitespace(cipher.login.username)\n      ) {\n        cipher.login.username = field.value;\n      } else if (field.type === \"password\" && this.isNullOrWhitespace(cipher.login.password)) {\n        cipher.login.password = field.value;\n      } else if (field.type === \"totp\" && this.isNullOrWhitespace(cipher.login.totp)) {\n        cipher.login.totp = field.value;\n      } else if (field.type === \"url\") {\n        urls.push(field.value);\n      } else if (field.type === \".Android#\") {\n        let cleanedValue = field.value.startsWith(\"androidapp://\")\n          ? field.value\n          : \"androidapp://\" + field.value;\n        cleanedValue = cleanedValue.replace(\"android://\", \"\");\n        cleanedValue = cleanedValue.replace(androidUrlRegex, \"androidapp://\");\n        urls.push(cleanedValue);\n      } else {\n        this.processKvp(\n          cipher,\n          field.label,\n          field.value,\n          field.sensitive === 1 ? FieldType.Hidden : FieldType.Text,\n        );\n      }\n    });\n    cipher.login.uris = this.makeUriArray(urls);\n  }\n\n  private processCard(cipher: CipherView, fields: EnpassField[]) {\n    cipher.card = new CardView();\n    cipher.type = CipherType.Card;\n    fields.forEach((field) => {\n      if (\n        this.isNullOrWhitespace(field.value) ||\n        field.type === \"section\" ||\n        field.type === \"ccType\"\n      ) {\n        return;\n      }\n\n      if (field.type === \"ccName\" && this.isNullOrWhitespace(cipher.card.cardholderName)) {\n        cipher.card.cardholderName = field.value;\n      } else if (field.type === \"ccNumber\" && this.isNullOrWhitespace(cipher.card.number)) {\n        cipher.card.number = field.value;\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n      } else if (field.type === \"ccCvc\" && this.isNullOrWhitespace(cipher.card.code)) {\n        cipher.card.code = field.value;\n      } else if (field.type === \"ccExpiry\" && this.isNullOrWhitespace(cipher.card.expYear)) {\n        if (!this.setCardExpiration(cipher, field.value)) {\n          this.processKvp(\n            cipher,\n            field.label,\n            field.value,\n            field.sensitive === 1 ? FieldType.Hidden : FieldType.Text,\n          );\n        }\n      } else {\n        this.processKvp(\n          cipher,\n          field.label,\n          field.value,\n          field.sensitive === 1 ? FieldType.Hidden : FieldType.Text,\n        );\n      }\n    });\n  }\n\n  private processNote(cipher: CipherView, fields: EnpassField[]) {\n    fields.forEach((field) => {\n      if (this.isNullOrWhitespace(field.value) || field.type === \"section\") {\n        return;\n      }\n      this.processKvp(\n        cipher,\n        field.label,\n        field.value,\n        field.sensitive === 1 ? FieldType.Hidden : FieldType.Text,\n      );\n    });\n  }\n\n  private buildFolderTree(folders: EnpassFolder[]): EnpassFolderTreeItem[] {\n    if (folders == null) {\n      return [];\n    }\n    const folderTree: EnpassFolderTreeItem[] = [];\n    const map = new Map<string, EnpassFolderTreeItem>([]);\n    folders.forEach((obj: EnpassFolderTreeItem) => {\n      map.set(obj.uuid, obj);\n      obj.children = [];\n    });\n    folders.forEach((obj: EnpassFolderTreeItem) => {\n      if (obj.parent_uuid != null && obj.parent_uuid !== \"\" && map.has(obj.parent_uuid)) {\n        map.get(obj.parent_uuid).children.push(obj);\n      } else {\n        folderTree.push(obj);\n      }\n    });\n    return folderTree;\n  }\n\n  private flattenFolderTree(\n    titlePrefix: string,\n    tree: EnpassFolderTreeItem[],\n    map: Map<string, string>,\n  ) {\n    if (tree == null) {\n      return;\n    }\n    tree.forEach((f) => {\n      if (f.title != null && f.title.trim() !== \"\") {\n        let title = f.title.trim();\n        if (titlePrefix != null && titlePrefix.trim() !== \"\") {\n          title = titlePrefix + \"/\" + title;\n        }\n        map.set(f.uuid, title);\n        if (f.children != null && f.children.length !== 0) {\n          this.flattenFolderTree(title, f.children, map);\n        }\n      }\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class FirefoxCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results\n      .filter((value) => {\n        return value.url !== \"chrome://FirefoxAccounts\";\n      })\n      .forEach((value) => {\n        const cipher = this.initLoginCipher();\n        const url = this.getValueOrDefault(value.url, this.getValueOrDefault(value.hostname));\n        cipher.name = this.getValueOrDefault(this.nameFromUrl(url), \"--\");\n        cipher.login.username = this.getValueOrDefault(value.username);\n        cipher.login.password = this.getValueOrDefault(value.password);\n        cipher.login.uris = this.makeUriArray(url);\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","export interface FskFile {\n  data: Data;\n}\n\nexport interface Data {\n  [key: string]: FskEntry;\n}\n\nexport enum FskEntryTypesEnum {\n  Login = 1,\n  CreditCard = 2,\n}\n\nexport interface FskEntry {\n  color: string;\n  creditCvv: string;\n  creditExpiry: string;\n  creditNumber: string;\n  favorite: number; // UNIX timestamp\n  notes: string;\n  password: string;\n  passwordList: PasswordList[];\n  passwordModifiedDate: number; // UNIX timestamp\n  rev: string | number;\n  service: string;\n  style: string;\n  type: FskEntryTypesEnum;\n  url: string;\n  username: string;\n  createdDate: number; // UNIX timestamp\n  modifiedDate: number; // UNIX timestamp\n}\n\nexport interface PasswordList {\n  changedate: string;\n  password: string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { FskEntry, FskEntryTypesEnum, FskFile } from \"./fsecure-fsk-types\";\n\nexport class FSecureFskImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results: FskFile = JSON.parse(data);\n    if (results == null || results.data == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    for (const key in results.data) {\n      // eslint-disable-next-line\n      if (!results.data.hasOwnProperty(key)) {\n        continue;\n      }\n\n      const value = results.data[key];\n      const cipher = this.parseEntry(value);\n      result.ciphers.push(cipher);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private parseEntry(entry: FskEntry): CipherView {\n    const cipher = this.initLoginCipher();\n    cipher.name = this.getValueOrDefault(entry.service);\n    cipher.notes = this.getValueOrDefault(entry.notes);\n    cipher.favorite = entry.favorite > 0;\n\n    switch (entry.type) {\n      case FskEntryTypesEnum.Login:\n        this.handleLoginEntry(entry, cipher);\n        break;\n      case FskEntryTypesEnum.CreditCard:\n        this.handleCreditCardEntry(entry, cipher);\n        break;\n      default:\n        return;\n        break;\n    }\n\n    this.convertToNoteIfNeeded(cipher);\n    this.cleanupCipher(cipher);\n    return cipher;\n  }\n\n  private handleLoginEntry(entry: FskEntry, cipher: CipherView) {\n    cipher.login.username = this.getValueOrDefault(entry.username);\n    cipher.login.password = this.getValueOrDefault(entry.password);\n    cipher.login.uris = this.makeUriArray(entry.url);\n  }\n\n  private handleCreditCardEntry(entry: FskEntry, cipher: CipherView) {\n    cipher.type = CipherType.Card;\n    cipher.card = new CardView();\n    cipher.card.cardholderName = this.getValueOrDefault(entry.username);\n    cipher.card.number = this.getValueOrDefault(entry.creditNumber);\n    cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n    cipher.card.code = this.getValueOrDefault(entry.creditCvv);\n    if (!this.isNullOrWhitespace(entry.creditExpiry)) {\n      if (!this.setCardExpiration(cipher, entry.creditExpiry)) {\n        this.processKvp(cipher, \"Expiration\", entry.creditExpiry);\n      }\n    }\n    if (!this.isNullOrWhitespace(entry.password)) {\n      this.processKvp(cipher, \"PIN\", entry.password);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class GnomeJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = JSON.parse(data);\n    if (results == null || Object.keys(results).length === 0) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    for (const keyRing in results) {\n      if (\n        !results.hasOwnProperty(keyRing) || // eslint-disable-line\n        this.isNullOrWhitespace(keyRing) ||\n        results[keyRing].length === 0\n      ) {\n        continue;\n      }\n\n      results[keyRing].forEach((value: any) => {\n        if (\n          this.isNullOrWhitespace(value.display_name) ||\n          value.display_name.indexOf(\"http\") !== 0\n        ) {\n          return;\n        }\n\n        this.processFolder(result, keyRing);\n        const cipher = this.initLoginCipher();\n        cipher.name = value.display_name.replace(\"http://\", \"\").replace(\"https://\", \"\");\n        if (cipher.name.length > 30) {\n          cipher.name = cipher.name.substring(0, 30);\n        }\n        cipher.login.password = this.getValueOrDefault(value.secret);\n        cipher.login.uris = this.makeUriArray(value.display_name);\n\n        if (value.attributes != null) {\n          cipher.login.username =\n            value.attributes != null\n              ? this.getValueOrDefault(value.attributes.username_value)\n              : null;\n          for (const attr in value.attributes) {\n            if (\n              !value.attributes.hasOwnProperty(attr) || // eslint-disable-line\n              attr === \"username_value\" ||\n              attr === \"xdg:schema\"\n            ) {\n              continue;\n            }\n            this.processKvp(cipher, attr, value.attributes[attr]);\n          }\n        }\n\n        this.convertToNoteIfNeeded(cipher);\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      });\n    }\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nconst NotesHeader = \"Notes\\n\\n\";\nconst ApplicationsHeader = \"Applications\\n\\n\";\nconst WebsitesHeader = \"Websites\\n\\n\";\nconst Delimiter = \"\\n---\\n\";\n\nexport class KasperskyTxtImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n\n    let notesData: string;\n    let applicationsData: string;\n    let websitesData: string;\n    let workingData = this.splitNewLine(data).join(\"\\n\");\n\n    if (workingData.indexOf(NotesHeader) !== -1) {\n      const parts = workingData.split(NotesHeader);\n      if (parts.length > 1) {\n        workingData = parts[0];\n        notesData = parts[1];\n      }\n    }\n    if (workingData.indexOf(ApplicationsHeader) !== -1) {\n      const parts = workingData.split(ApplicationsHeader);\n      if (parts.length > 1) {\n        workingData = parts[0];\n        applicationsData = parts[1];\n      }\n    }\n    if (workingData.indexOf(WebsitesHeader) === 0) {\n      const parts = workingData.split(WebsitesHeader);\n      if (parts.length > 1) {\n        workingData = parts[0];\n        websitesData = parts[1];\n      }\n    }\n\n    const notes = this.parseDataCategory(notesData);\n    const applications = this.parseDataCategory(applicationsData);\n    const websites = this.parseDataCategory(websitesData);\n\n    notes.forEach((n) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(n.get(\"Name\"));\n      cipher.notes = this.getValueOrDefault(n.get(\"Text\"));\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    websites.concat(applications).forEach((w) => {\n      const cipher = this.initLoginCipher();\n      const nameKey = w.has(\"Website name\") ? \"Website name\" : \"Application\";\n      cipher.name = this.getValueOrDefault(w.get(nameKey), \"\");\n      if (!this.isNullOrWhitespace(w.get(\"Login name\"))) {\n        if (!this.isNullOrWhitespace(cipher.name)) {\n          cipher.name += \": \";\n        }\n        cipher.name += w.get(\"Login name\");\n      }\n      cipher.notes = this.getValueOrDefault(w.get(\"Comment\"));\n      if (w.has(\"Website URL\")) {\n        cipher.login.uris = this.makeUriArray(w.get(\"Website URL\"));\n      }\n      cipher.login.username = this.getValueOrDefault(w.get(\"Login\"));\n      cipher.login.password = this.getValueOrDefault(w.get(\"Password\"));\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private parseDataCategory(data: string): Map<string, string>[] {\n    if (this.isNullOrWhitespace(data) || data.indexOf(Delimiter) === -1) {\n      return [];\n    }\n    const items: Map<string, string>[] = [];\n    data.split(Delimiter).forEach((p) => {\n      if (p.indexOf(\"\\n\") === -1) {\n        return;\n      }\n      const item = new Map<string, string>();\n      let itemComment: string;\n      let itemCommentKey: string;\n      p.split(\"\\n\").forEach((l) => {\n        if (itemComment != null) {\n          itemComment += \"\\n\" + l;\n          return;\n        }\n        const colonIndex = l.indexOf(\":\");\n        let key: string;\n        let val: string;\n        if (colonIndex === -1) {\n          return;\n        } else {\n          key = l.substring(0, colonIndex);\n          if (l.length > colonIndex + 1) {\n            val = l.substring(colonIndex + 2);\n          }\n        }\n        if (key != null) {\n          item.set(key, val);\n        }\n        if (key === \"Comment\" || key === \"Text\") {\n          itemComment = val;\n          itemCommentKey = key;\n        }\n      });\n      if (itemComment != null && itemCommentKey != null) {\n        item.set(itemCommentKey, itemComment);\n      }\n      if (item.size === 0) {\n        return;\n      }\n      items.push(item);\n    });\n    return items;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType } from \"@bitwarden/common/vault/enums\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class KeePass2XmlImporter extends BaseImporter implements Importer {\n  result = new ImportResult();\n\n  parse(data: string): Promise<ImportResult> {\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      this.result.success = false;\n      return Promise.resolve(this.result);\n    }\n\n    //Note: The doc.querySelector(\"KeePassFile > Root > Group\") no longers works on node and we have to breakdown the query by nodes\n    const KeePassFileNode = doc.querySelector(\"KeePassFile\");\n\n    if (KeePassFileNode == null) {\n      this.result.errorMessage = \"Missing `KeePassFile` node.\";\n      this.result.success = false;\n      return Promise.resolve(this.result);\n    }\n\n    const RootNode = KeePassFileNode.querySelector(\"Root\");\n    if (RootNode == null) {\n      this.result.errorMessage = \"Missing `KeePassFile > Root` node.\";\n      this.result.success = false;\n      return Promise.resolve(this.result);\n    }\n\n    const rootGroup = RootNode.querySelector(\"Group\");\n    if (rootGroup == null) {\n      this.result.errorMessage = \"Missing `KeePassFile > Root > Group` node.\";\n      this.result.success = false;\n      return Promise.resolve(this.result);\n    }\n\n    this.traverse(rootGroup, true, \"\");\n\n    if (this.organization) {\n      this.moveFoldersToCollections(this.result);\n    }\n\n    this.result.success = true;\n    return Promise.resolve(this.result);\n  }\n\n  traverse(node: Element, isRootNode: boolean, groupPrefixName: string) {\n    const folderIndex = this.result.folders.length;\n    let groupName = groupPrefixName;\n\n    if (!isRootNode) {\n      if (groupName !== \"\") {\n        groupName += \"/\";\n      }\n      const nameEl = this.querySelectorDirectChild(node, \"Name\");\n      groupName += nameEl == null ? \"-\" : nameEl.textContent;\n      const folder = new FolderView();\n      folder.name = groupName;\n      this.result.folders.push(folder);\n    }\n\n    this.querySelectorAllDirectChild(node, \"Entry\").forEach((entry) => {\n      const cipherIndex = this.result.ciphers.length;\n\n      const cipher = this.initLoginCipher();\n      this.querySelectorAllDirectChild(entry, \"String\").forEach((entryString) => {\n        const valueEl = this.querySelectorDirectChild(entryString, \"Value\");\n        const value = valueEl != null ? valueEl.textContent : null;\n        if (this.isNullOrWhitespace(value)) {\n          return;\n        }\n        const keyEl = this.querySelectorDirectChild(entryString, \"Key\");\n        const key = keyEl != null ? keyEl.textContent : null;\n\n        if (key === \"URL\") {\n          cipher.login.uris = this.makeUriArray(value);\n        } else if (key === \"UserName\") {\n          cipher.login.username = value;\n        } else if (key === \"Password\") {\n          cipher.login.password = value;\n        } else if (key === \"otp\") {\n          cipher.login.totp = value.replace(\"key=\", \"\");\n        } else if (key === \"Title\") {\n          cipher.name = value;\n        } else if (key === \"Notes\") {\n          cipher.notes += value + \"\\n\";\n        } else {\n          let type = FieldType.Text;\n          const attrs = valueEl.attributes as any;\n          if (\n            attrs.length > 0 &&\n            attrs.ProtectInMemory != null &&\n            attrs.ProtectInMemory.value === \"True\"\n          ) {\n            type = FieldType.Hidden;\n          }\n          this.processKvp(cipher, key, value, type);\n        }\n      });\n\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n\n      if (!isRootNode) {\n        this.result.folderRelationships.push([cipherIndex, folderIndex]);\n      }\n    });\n\n    this.querySelectorAllDirectChild(node, \"Group\").forEach((group) => {\n      this.traverse(group, false, groupName);\n    });\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class KeePassXCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (this.isNullOrWhitespace(value.Title)) {\n        return;\n      }\n\n      value.Group =\n        !this.isNullOrWhitespace(value.Group) && value.Group.startsWith(\"Root/\")\n          ? value.Group.replace(\"Root/\", \"\")\n          : value.Group;\n      const groupName = !this.isNullOrWhitespace(value.Group) ? value.Group : null;\n      this.processFolder(result, groupName);\n\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value.Notes);\n      cipher.name = this.getValueOrDefault(value.Title, \"--\");\n      cipher.login.username = this.getValueOrDefault(value.Username);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.uris = this.makeUriArray(value.URL);\n      cipher.login.totp = this.getValueOrDefault(value.TOTP);\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class KeeperCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 6) {\n        return;\n      }\n\n      this.processFolder(result, value[0]);\n      const cipher = this.initLoginCipher();\n\n      const notes = this.getValueOrDefault(value[5]);\n      if (notes) {\n        cipher.notes = `${notes}\\n`;\n      }\n\n      cipher.name = this.getValueOrDefault(value[1], \"--\");\n      cipher.login.username = this.getValueOrDefault(value[2]);\n      cipher.login.password = this.getValueOrDefault(value[3]);\n      cipher.login.uris = this.makeUriArray(value[4]);\n\n      if (value.length > 7) {\n        // we have some custom fields.\n        for (let i = 7; i < value.length; i = i + 2) {\n          if (value[i] == \"TFC:Keeper\") {\n            cipher.login.totp = value[i + 1];\n          } else {\n            this.processKvp(cipher, value[i], value[i + 1]);\n          }\n        }\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class LastPassCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipherIndex = result.ciphers.length;\n      let folderIndex = result.folders.length;\n      let grouping = value.grouping;\n      if (grouping != null) {\n        // eslint-disable-next-line\n        grouping = grouping.replace(/\\\\/g, \"/\").replace(/[\\x00-\\x1F\\x7F-\\x9F]/g, \"\");\n      }\n      const hasFolder = this.getValueOrDefault(grouping, \"(none)\") !== \"(none)\";\n      let addFolder = hasFolder;\n\n      if (hasFolder) {\n        for (let i = 0; i < result.folders.length; i++) {\n          if (result.folders[i].name === grouping) {\n            addFolder = false;\n            folderIndex = i;\n            break;\n          }\n        }\n      }\n\n      const cipher = this.buildBaseCipher(value);\n      if (cipher.type === CipherType.Login) {\n        cipher.notes = this.getValueOrDefault(value.extra);\n        cipher.login = new LoginView();\n        cipher.login.uris = this.makeUriArray(value.url);\n        cipher.login.username = this.getValueOrDefault(value.username);\n        cipher.login.password = this.getValueOrDefault(value.password);\n        cipher.login.totp = this.getValueOrDefault(value.totp);\n      } else if (cipher.type === CipherType.SecureNote) {\n        this.parseSecureNote(value, cipher);\n      } else if (cipher.type === CipherType.Card) {\n        cipher.card = this.parseCard(value);\n        cipher.notes = this.getValueOrDefault(value.notes);\n      } else if (cipher.type === CipherType.Identity) {\n        cipher.identity = this.parseIdentity(value);\n        cipher.notes = this.getValueOrDefault(value.notes);\n        if (!this.isNullOrWhitespace(value.ccnum)) {\n          // there is a card on this identity too\n          const cardCipher = this.buildBaseCipher(value);\n          cardCipher.identity = null;\n          cardCipher.type = CipherType.Card;\n          cardCipher.card = this.parseCard(value);\n          result.ciphers.push(cardCipher);\n        }\n      }\n\n      result.ciphers.push(cipher);\n\n      if (addFolder) {\n        const f = new FolderView();\n        f.name = grouping;\n        result.folders.push(f);\n      }\n      if (hasFolder) {\n        result.folderRelationships.push([cipherIndex, folderIndex]);\n      }\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private buildBaseCipher(value: any) {\n    const cipher = new CipherView();\n    // eslint-disable-next-line\n    if (value.hasOwnProperty(\"profilename\") && value.hasOwnProperty(\"profilelanguage\")) {\n      // form fill\n      cipher.favorite = false;\n      cipher.name = this.getValueOrDefault(value.profilename, \"--\");\n      cipher.type = CipherType.Card;\n\n      if (\n        !this.isNullOrWhitespace(value.title) ||\n        !this.isNullOrWhitespace(value.firstname) ||\n        !this.isNullOrWhitespace(value.lastname) ||\n        !this.isNullOrWhitespace(value.address1) ||\n        !this.isNullOrWhitespace(value.phone) ||\n        !this.isNullOrWhitespace(value.username) ||\n        !this.isNullOrWhitespace(value.email)\n      ) {\n        cipher.type = CipherType.Identity;\n      }\n    } else {\n      // site or secure note\n      cipher.favorite = !this.organization && this.getValueOrDefault(value.fav, \"0\") === \"1\";\n      cipher.name = this.getValueOrDefault(value.name, \"--\");\n      cipher.type = value.url === \"http://sn\" ? CipherType.SecureNote : CipherType.Login;\n    }\n    return cipher;\n  }\n\n  private parseCard(value: any): CardView {\n    const card = new CardView();\n    card.cardholderName = this.getValueOrDefault(value.ccname);\n    card.number = this.getValueOrDefault(value.ccnum);\n    card.code = this.getValueOrDefault(value.cccsc);\n    card.brand = CardView.getCardBrandByPatterns(card.number);\n\n    if (!this.isNullOrWhitespace(value.ccexp) && value.ccexp.indexOf(\"-\") > -1) {\n      const ccexpParts = (value.ccexp as string).split(\"-\");\n      if (ccexpParts.length > 1) {\n        card.expYear = ccexpParts[0];\n        card.expMonth = ccexpParts[1];\n        if (card.expMonth.length === 2 && card.expMonth[0] === \"0\") {\n          card.expMonth = card.expMonth[1];\n        }\n      }\n    }\n\n    return card;\n  }\n\n  private parseIdentity(value: any): IdentityView {\n    const identity = new IdentityView();\n    identity.title = this.getValueOrDefault(value.title);\n    identity.firstName = this.getValueOrDefault(value.firstname);\n    identity.middleName = this.getValueOrDefault(value.middlename);\n    identity.lastName = this.getValueOrDefault(value.lastname);\n    identity.username = this.getValueOrDefault(value.username);\n    identity.company = this.getValueOrDefault(value.company);\n    identity.ssn = this.getValueOrDefault(value.ssn);\n    identity.address1 = this.getValueOrDefault(value.address1);\n    identity.address2 = this.getValueOrDefault(value.address2);\n    identity.address3 = this.getValueOrDefault(value.address3);\n    identity.city = this.getValueOrDefault(value.city);\n    identity.state = this.getValueOrDefault(value.state);\n    identity.postalCode = this.getValueOrDefault(value.zip);\n    identity.country = this.getValueOrDefault(value.country);\n    identity.email = this.getValueOrDefault(value.email);\n    identity.phone = this.getValueOrDefault(value.phone);\n\n    if (!this.isNullOrWhitespace(identity.title)) {\n      identity.title = identity.title.charAt(0).toUpperCase() + identity.title.slice(1);\n    }\n\n    return identity;\n  }\n\n  private parseSecureNote(value: any, cipher: CipherView) {\n    const extraParts = this.splitNewLine(value.extra);\n    let processedNote = false;\n\n    if (extraParts.length) {\n      const typeParts = extraParts[0].split(\":\");\n      if (\n        typeParts.length > 1 &&\n        typeParts[0] === \"NoteType\" &&\n        (typeParts[1] === \"Credit Card\" || typeParts[1] === \"Address\")\n      ) {\n        if (typeParts[1] === \"Credit Card\") {\n          const mappedData = this.parseSecureNoteMapping<CardView>(cipher, extraParts, {\n            Number: \"number\",\n            \"Name on Card\": \"cardholderName\",\n            \"Security Code\": \"code\",\n            // LP provides date in a format like 'June,2020'\n            // Store in expMonth, then parse and modify\n            \"Expiration Date\": \"expMonth\",\n          });\n\n          if (this.isNullOrWhitespace(mappedData.expMonth) || mappedData.expMonth === \",\") {\n            // No expiration data\n            mappedData.expMonth = undefined;\n          } else {\n            const [monthString, year] = mappedData.expMonth.split(\",\");\n            // Parse month name into number\n            if (!this.isNullOrWhitespace(monthString)) {\n              const month = new Date(Date.parse(monthString.trim() + \" 1, 2012\")).getMonth() + 1;\n              if (isNaN(month)) {\n                mappedData.expMonth = undefined;\n              } else {\n                mappedData.expMonth = month.toString();\n              }\n            } else {\n              mappedData.expMonth = undefined;\n            }\n            if (!this.isNullOrWhitespace(year)) {\n              mappedData.expYear = year;\n            }\n          }\n\n          cipher.type = CipherType.Card;\n          cipher.card = mappedData;\n        } else if (typeParts[1] === \"Address\") {\n          const mappedData = this.parseSecureNoteMapping<IdentityView>(cipher, extraParts, {\n            Title: \"title\",\n            \"First Name\": \"firstName\",\n            \"Last Name\": \"lastName\",\n            \"Middle Name\": \"middleName\",\n            Company: \"company\",\n            \"Address 1\": \"address1\",\n            \"Address 2\": \"address2\",\n            \"Address 3\": \"address3\",\n            \"City / Town\": \"city\",\n            State: \"state\",\n            \"Zip / Postal Code\": \"postalCode\",\n            Country: \"country\",\n            \"Email Address\": \"email\",\n            Username: \"username\",\n          });\n          cipher.type = CipherType.Identity;\n          cipher.identity = mappedData;\n        }\n        processedNote = true;\n      }\n    }\n\n    if (!processedNote) {\n      cipher.secureNote = new SecureNoteView();\n      cipher.secureNote.type = SecureNoteType.Generic;\n      cipher.notes = this.getValueOrDefault(value.extra);\n    }\n  }\n\n  private parseSecureNoteMapping<T>(cipher: CipherView, extraParts: string[], map: any): T {\n    const dataObj: any = {};\n\n    let processingNotes = false;\n    extraParts.forEach((extraPart) => {\n      let key: string = null;\n      let val: string = null;\n      if (!processingNotes) {\n        if (this.isNullOrWhitespace(extraPart)) {\n          return;\n        }\n        const colonIndex = extraPart.indexOf(\":\");\n        if (colonIndex === -1) {\n          key = extraPart;\n        } else {\n          key = extraPart.substring(0, colonIndex);\n          if (extraPart.length > colonIndex) {\n            val = extraPart.substring(colonIndex + 1);\n          }\n        }\n        if (this.isNullOrWhitespace(key) || this.isNullOrWhitespace(val) || key === \"NoteType\") {\n          return;\n        }\n      }\n\n      if (processingNotes) {\n        cipher.notes += \"\\n\" + extraPart;\n      } else if (key === \"Notes\") {\n        if (!this.isNullOrWhitespace(cipher.notes)) {\n          cipher.notes += \"\\n\" + val;\n        } else {\n          cipher.notes = val;\n        }\n        processingNotes = true;\n        // eslint-disable-next-line\n      } else if (map.hasOwnProperty(key)) {\n        dataObj[map[key]] = val;\n      } else {\n        this.processKvp(cipher, key, val);\n      }\n    });\n\n    return dataObj;\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class LogMeOnceCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 4) {\n        return;\n      }\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n      cipher.login.username = this.getValueOrDefault(value[2]);\n      cipher.login.password = this.getValueOrDefault(value[3]);\n      cipher.login.uris = this.makeUriArray(value[1]);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class MeldiumCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.DisplayName, \"--\");\n      cipher.notes = this.getValueOrDefault(value.Notes);\n      cipher.login.username = this.getValueOrDefault(value.UserName);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.uris = this.makeUriArray(value.Url);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class MSecureCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false, { delimiter: \",\" });\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 3) {\n        return;\n      }\n\n      const folderName =\n        this.getValueOrDefault(value[2], \"Unassigned\") !== \"Unassigned\" ? value[2] : null;\n      this.processFolder(result, folderName);\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[0].split(\"|\")[0], \"--\");\n\n      if (value[1] === \"Web Logins\" || value[1] === \"Login\") {\n        cipher.login.username = this.getValueOrDefault(this.splitValueRetainingLastPart(value[5]));\n        cipher.login.uris = this.makeUriArray(this.splitValueRetainingLastPart(value[4]));\n        cipher.login.password = this.getValueOrDefault(this.splitValueRetainingLastPart(value[6]));\n        cipher.notes = !this.isNullOrWhitespace(value[3]) ? value[3].split(\"\\\\n\").join(\"\\n\") : null;\n      } else if (value[1] === \"Credit Card\") {\n        cipher.type = CipherType.Card;\n        cipher.card.number = this.getValueOrDefault(this.splitValueRetainingLastPart(value[4]));\n\n        const [month, year] = this.getValueOrDefault(\n          this.splitValueRetainingLastPart(value[5]),\n        ).split(\"/\");\n        cipher.card.expMonth = month.trim();\n        cipher.card.expYear = year.trim();\n        cipher.card.code = this.getValueOrDefault(this.splitValueRetainingLastPart(value[6]));\n        cipher.card.cardholderName = this.getValueOrDefault(\n          this.splitValueRetainingLastPart(value[7]),\n        );\n        cipher.card.brand = this.getValueOrDefault(this.splitValueRetainingLastPart(value[9]));\n        cipher.notes =\n          this.getValueOrDefault(value[8].split(\"|\")[0]) +\n          \": \" +\n          this.getValueOrDefault(this.splitValueRetainingLastPart(value[8]), \"\") +\n          \"\\n\" +\n          this.getValueOrDefault(value[10].split(\"|\")[0]) +\n          \": \" +\n          this.getValueOrDefault(this.splitValueRetainingLastPart(value[10]), \"\") +\n          \"\\n\" +\n          this.getValueOrDefault(value[11].split(\"|\")[0]) +\n          \": \" +\n          this.getValueOrDefault(this.splitValueRetainingLastPart(value[11]), \"\");\n      } else if (value.length > 3) {\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote = new SecureNoteView();\n        cipher.secureNote.type = SecureNoteType.Generic;\n        for (let i = 3; i < value.length; i++) {\n          if (!this.isNullOrWhitespace(value[i])) {\n            cipher.notes += value[i] + \"\\n\";\n          }\n        }\n      }\n\n      if (\n        !this.isNullOrWhitespace(value[1]) &&\n        cipher.type !== CipherType.Login &&\n        cipher.type !== CipherType.Card\n      ) {\n        cipher.name = value[1] + \": \" + cipher.name;\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  // mSecure returns values separated by \"|\" where after the second separator is the value\n  // like \"Password|8|myPassword\", we want to keep the \"myPassword\" but also ensure that if\n  // the value contains any \"|\" it works fine\n  private splitValueRetainingLastPart(value: string) {\n    return value.split(\"|\").slice(0, 2).concat(value.split(\"|\").slice(2).join(\"|\")).pop();\n  }\n}\n","import { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nconst mappedBaseColumns = [\"nickname\", \"additionalInfo\"];\nconst _mappedUserAccountColumns = new Set(\n  mappedBaseColumns.concat([\"url\", \"username\", \"password\", \"twofaSecret\"]),\n);\nconst _mappedCreditCardColumns = new Set(\n  mappedBaseColumns.concat([\"cardNumber\", \"cardName\", \"exp_month\", \"exp_year\", \"cvv\"]),\n);\n\nconst _mappedIdentityColumns = new Set(\n  mappedBaseColumns.concat([\n    \"title\",\n    \"firstName\",\n    \"middleName\",\n    \"lastName\",\n    \"email\",\n    \"firstAddressLine\",\n    \"secondAddressLine\",\n    \"city\",\n    \"country\",\n    \"zipCode\",\n  ]),\n);\n\nconst _mappedIdCardColumns = new Set(mappedBaseColumns.concat([\"idName\", \"idNumber\", \"idCountry\"]));\n\nconst _mappedTwoFaColumns = new Set(mappedBaseColumns.concat([\"authToken\"]));\n\nconst _mappedUserNoteColumns = new Set(mappedBaseColumns.concat([\"content\"]));\n\nexport class MykiCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.nickname, \"--\");\n      cipher.notes = this.getValueOrDefault(value.additionalInfo);\n\n      if (value.url !== undefined) {\n        // Accounts\n        cipher.login.uris = this.makeUriArray(value.url);\n        cipher.login.username = this.getValueOrDefault(value.username);\n        cipher.login.password = this.getValueOrDefault(value.password);\n        cipher.login.totp = this.getValueOrDefault(value.twofaSecret);\n\n        this.importUnmappedFields(cipher, value, _mappedUserAccountColumns);\n      } else if (value.authToken !== undefined) {\n        // TwoFA\n        cipher.login.totp = this.getValueOrDefault(value.authToken);\n\n        this.importUnmappedFields(cipher, value, _mappedTwoFaColumns);\n      } else if (value.cardNumber !== undefined) {\n        // Cards\n        cipher.card = new CardView();\n        cipher.type = CipherType.Card;\n        cipher.card.cardholderName = this.getValueOrDefault(value.cardName);\n        cipher.card.number = this.getValueOrDefault(value.cardNumber);\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        cipher.card.expMonth = this.getValueOrDefault(value.exp_month);\n        cipher.card.expYear = this.getValueOrDefault(value.exp_year);\n        cipher.card.code = this.getValueOrDefault(value.cvv);\n\n        this.importUnmappedFields(cipher, value, _mappedCreditCardColumns);\n      } else if (value.firstName !== undefined) {\n        // Identities\n        cipher.identity = new IdentityView();\n        cipher.type = CipherType.Identity;\n        cipher.identity.title = this.getValueOrDefault(value.title);\n        cipher.identity.firstName = this.getValueOrDefault(value.firstName);\n        cipher.identity.middleName = this.getValueOrDefault(value.middleName);\n        cipher.identity.lastName = this.getValueOrDefault(value.lastName);\n        cipher.identity.phone = this.getValueOrDefault(value.number);\n        cipher.identity.email = this.getValueOrDefault(value.email);\n        cipher.identity.address1 = this.getValueOrDefault(value.firstAddressLine);\n        cipher.identity.address2 = this.getValueOrDefault(value.secondAddressLine);\n        cipher.identity.city = this.getValueOrDefault(value.city);\n        cipher.identity.country = this.getValueOrDefault(value.country);\n        cipher.identity.postalCode = this.getValueOrDefault(value.zipCode);\n\n        this.importUnmappedFields(cipher, value, _mappedIdentityColumns);\n      } else if (value.idType !== undefined) {\n        // IdCards\n\n        cipher.identity = new IdentityView();\n        cipher.type = CipherType.Identity;\n        this.processFullName(cipher, value.idName);\n        cipher.identity.country = this.getValueOrDefault(value.idCountry);\n\n        switch (value.idType) {\n          // case \"Driver's License\":\n          // case \"ID Card\":\n          // case \"Outdoor License\":\n          // case \"Software License\":\n          // case \"Tax Number\":\n          // case \"Bank Account\":\n          // case \"Insurance Card\":\n          // case \"Health Card\":\n          // case \"Membership\":\n          // case \"Database\":\n          // case \"Reward Program\":\n          // case \"Tour Visa\":\n          case \"Passport\":\n            cipher.identity.passportNumber = value.idNumber;\n            break;\n          case \"Social Security\":\n            cipher.identity.ssn = value.idNumber;\n            break;\n          default:\n            cipher.identity.licenseNumber = value.idNumber;\n            break;\n        }\n\n        this.importUnmappedFields(cipher, value, _mappedIdCardColumns);\n      } else if (value.content !== undefined) {\n        // Notes\n        cipher.secureNote = new SecureNoteView();\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote.type = SecureNoteType.Generic;\n        cipher.notes = this.getValueOrDefault(value.content);\n\n        this.importUnmappedFields(cipher, value, _mappedUserNoteColumns);\n      } else {\n        return;\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  importUnmappedFields(cipher: CipherView, row: any, mappedValues: Set<string>) {\n    const unmappedFields = Object.keys(row).filter((x) => !mappedValues.has(x));\n    unmappedFields.forEach((key) => {\n      const item = row as any;\n      this.processKvp(cipher, key, item[key]);\n    });\n  }\n}\n","import { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { LoginRecord } from \"./netwrix-passwordsecure-csv-types\";\n\nconst _mappedColumns = new Set([\n  \"Organisationseinheit\",\n  \"Informationen\",\n  \"Beschreibung\",\n  \"Benutzername\",\n  \"Passwort\",\n  \"Internetseite\",\n  \"One-Time Passwort\",\n]);\n\n/**\n * Importer for Netwrix Password Secure CSV files.\n * @see https://www.netwrix.com/enterprise_password_management_software.html\n */\nexport class NetwrixPasswordSecureCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((row: LoginRecord) => {\n      this.processFolder(result, row.Organisationseinheit);\n      const cipher = this.initLoginCipher();\n\n      const notes = this.getValueOrDefault(row.Informationen);\n      if (notes) {\n        cipher.notes = `${notes}\\n`;\n      }\n\n      cipher.name = this.getValueOrDefault(row.Beschreibung, \"--\");\n      cipher.login.username = this.getValueOrDefault(row.Benutzername);\n      cipher.login.password = this.getValueOrDefault(row.Passwort);\n      cipher.login.uris = this.makeUriArray(row.Internetseite);\n\n      cipher.login.totp = this.getValueOrDefault(row[\"One-Time Passwort\"]);\n\n      this.importUnmappedFields(cipher, row, _mappedColumns);\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private importUnmappedFields(cipher: CipherView, row: any, mappedValues: Set<string>) {\n    const unmappedFields = Object.keys(row).filter((x) => !mappedValues.has(x));\n    unmappedFields.forEach((key) => {\n      const item = row as any;\n      this.processKvp(cipher, key, item[key]);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SecureNoteType, CipherType, FieldType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\ntype NordPassCsvParsed = {\n  name: string;\n  url: string;\n  additional_urls: string;\n  username: string;\n  password: string;\n  note: string;\n  cardholdername: string;\n  cardnumber: string;\n  cvc: string;\n  expirydate: string;\n  zipcode: string;\n  folder: string;\n  full_name: string;\n  phone_number: string;\n  email: string;\n  address1: string;\n  address2: string;\n  city: string;\n  country: string;\n  state: string;\n  type: string;\n  custom_fields: string;\n};\n\ntype NordPassCustomField = {\n  label: string;\n  type: string;\n  value: string;\n};\n\nexport class NordPassCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results: NordPassCsvParsed[] = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((record) => {\n      const recordType = this.evaluateType(record);\n      if (recordType === undefined) {\n        return;\n      }\n\n      this.processFolder(result, record.folder);\n\n      const cipher = new CipherView();\n      cipher.name = this.getValueOrDefault(record.name, \"--\");\n      cipher.notes = this.getValueOrDefault(record.note);\n\n      if (record.custom_fields) {\n        const customFieldsParsed: NordPassCustomField[] = JSON.parse(record.custom_fields);\n        if (customFieldsParsed && customFieldsParsed.length > 0) {\n          customFieldsParsed.forEach((field) => {\n            let fieldType = FieldType.Text;\n\n            if (field.type == \"hidden\") {\n              fieldType = FieldType.Hidden;\n            }\n\n            this.processKvp(cipher, field.label, field.value, fieldType);\n          });\n        }\n      }\n\n      switch (recordType) {\n        case CipherType.Login:\n          cipher.type = CipherType.Login;\n          cipher.login = new LoginView();\n          cipher.login.username = this.getValueOrDefault(record.username);\n          cipher.login.password = this.getValueOrDefault(record.password);\n          if (record.additional_urls) {\n            const additionalUrlsParsed: string[] = JSON.parse(record.additional_urls);\n            const uris = [record.url, ...additionalUrlsParsed];\n            cipher.login.uris = this.makeUriArray(uris);\n          } else {\n            cipher.login.uris = this.makeUriArray(record.url);\n          }\n          break;\n        case CipherType.Card:\n          cipher.type = CipherType.Card;\n          cipher.card.cardholderName = this.getValueOrDefault(record.cardholdername);\n          cipher.card.number = this.getValueOrDefault(record.cardnumber);\n          cipher.card.code = this.getValueOrDefault(record.cvc);\n          cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n          this.setCardExpiration(cipher, record.expirydate);\n          break;\n\n        case CipherType.Identity:\n          cipher.type = CipherType.Identity;\n\n          this.processFullName(cipher, this.getValueOrDefault(record.full_name));\n          cipher.identity.address1 = this.getValueOrDefault(record.address1);\n          cipher.identity.address2 = this.getValueOrDefault(record.address2);\n          cipher.identity.city = this.getValueOrDefault(record.city);\n          cipher.identity.state = this.getValueOrDefault(record.state);\n          cipher.identity.postalCode = this.getValueOrDefault(record.zipcode);\n          cipher.identity.country = this.getValueOrDefault(record.country);\n          if (cipher.identity.country != null) {\n            cipher.identity.country = cipher.identity.country.toUpperCase();\n          }\n          cipher.identity.email = this.getValueOrDefault(record.email);\n          cipher.identity.phone = this.getValueOrDefault(record.phone_number);\n          break;\n        case CipherType.SecureNote:\n          cipher.type = CipherType.SecureNote;\n          cipher.secureNote.type = SecureNoteType.Generic;\n          break;\n        default:\n          break;\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private evaluateType(record: NordPassCsvParsed): CipherType {\n    switch (record.type) {\n      case \"password\":\n        return CipherType.Login;\n      case \"credit_card\":\n        return CipherType.Card;\n      case \"note\":\n        return CipherType.SecureNote;\n      case \"identity\":\n        return CipherType.Identity;\n    }\n\n    return undefined;\n  }\n}\n","export interface ExportData {\n  accounts?: AccountsEntity[] | null;\n}\nexport interface AccountsEntity {\n  attrs: AccountAttributes;\n  vaults?: VaultsEntity[] | null;\n}\nexport interface AccountAttributes {\n  accountName: string;\n  name: string;\n  avatar: string;\n  email: string;\n  uuid: string;\n  domain: string;\n}\nexport interface VaultsEntity {\n  attrs: VaultAttributes;\n  items?: Item[] | null;\n}\nexport interface VaultAttributes {\n  uuid: string;\n  desc: string;\n  avatar: string;\n  name: string;\n  type: string;\n}\n\nexport enum CategoryEnum {\n  Login = \"001\",\n  CreditCard = \"002\",\n  SecureNote = \"003\",\n  Identity = \"004\",\n  Password = \"005\",\n  Document = \"006\",\n  SoftwareLicense = \"100\",\n  BankAccount = \"101\",\n  Database = \"102\",\n  DriversLicense = \"103\",\n  OutdoorLicense = \"104\",\n  Membership = \"105\",\n  Passport = \"106\",\n  RewardsProgram = \"107\",\n  SocialSecurityNumber = \"108\",\n  WirelessRouter = \"109\",\n  Server = \"110\",\n  EmailAccount = \"111\",\n  API_Credential = \"112\",\n  MedicalRecord = \"113\",\n}\n\nexport interface Item {\n  uuid: string;\n  favIndex: number;\n  createdAt: number;\n  updatedAt: number;\n  state: \"active\" | \"archived\";\n  categoryUuid: string;\n  details: Details;\n  overview: Overview;\n}\nexport interface Details {\n  loginFields?: (LoginFieldsEntity | null)[] | null;\n  notesPlain?: string | null;\n  sections?: (SectionsEntity | null)[] | null;\n  passwordHistory?: (PasswordHistoryEntity | null)[] | null;\n  documentAttributes?: DocumentAttributes | null;\n  password?: string | null;\n}\n\nexport enum LoginFieldTypeEnum {\n  TextOrHtml = \"T\",\n  EmailAddress = \"E\",\n  URL = \"U\",\n  Number = \"N\",\n  Password = \"P\",\n  TextArea = \"A\",\n  PhoneNumber = \"TEL\",\n  CheckBox = \"C\",\n}\nexport interface LoginFieldsEntity {\n  value: string;\n  id: string;\n  name: string;\n  fieldType: LoginFieldTypeEnum | string;\n  designation?: string | null;\n}\nexport interface SectionsEntity {\n  title: string;\n  name?: string | null;\n  fields?: FieldsEntity[] | null;\n  hideAddAnotherField?: boolean | null;\n}\nexport interface FieldsEntity {\n  title: string;\n  id: string;\n  value: Value;\n  guarded: boolean;\n  multiline: boolean;\n  dontGenerate: boolean;\n  placeholder?: string;\n  inputTraits: InputTraits;\n  clipboardFilter?: string | null;\n}\nexport interface Value {\n  totp?: string | null;\n  date?: number | null;\n  string?: string | null;\n  concealed?: string | null;\n  email?: Email | null;\n  phone?: string | null;\n  menu?: string | null;\n  gender?: string | null;\n  monthYear?: number | null;\n  url?: string | null;\n  address?: Address | null;\n  creditCardType?: string | null;\n  creditCardNumber?: string | null;\n  reference?: string | null;\n}\n\nexport interface Email {\n  email_address: string;\n  provider: string;\n}\n\nexport interface Address {\n  street: string;\n  city: string;\n  country: string;\n  zip: string;\n  state: string;\n}\nexport interface InputTraits {\n  keyboard: string;\n  correction: string;\n  capitalization: string;\n}\nexport interface PasswordHistoryEntity {\n  value: string;\n  time: number;\n}\nexport interface DocumentAttributes {\n  fileName: string;\n  documentId: string;\n  decryptedSize: number;\n}\nexport interface Overview {\n  subtitle: string;\n  title: string;\n  url: string;\n  urls?: UrlsEntity[] | null;\n  ps?: number | null;\n  pbe?: number | null;\n  pgrng?: boolean | null;\n  tags?: string[] | null;\n  icons?: string | null;\n  watchtowerExclusions?: string | null;\n}\nexport interface UrlsEntity {\n  label: string;\n  url: string;\n}\n","import { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { PasswordHistoryView } from \"@bitwarden/common/vault/models/view/password-history.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nexport class OnePassword1PifImporter extends BaseImporter implements Importer {\n  result = new ImportResult();\n\n  parse(data: string): Promise<ImportResult> {\n    data.split(this.newLineRegex).forEach((line) => {\n      if (this.isNullOrWhitespace(line) || line[0] !== \"{\") {\n        return;\n      }\n      const item = JSON.parse(line);\n      if (item.trashed === true) {\n        return;\n      }\n      const cipher = this.initLoginCipher();\n\n      if (this.isNullOrWhitespace(item.hmac)) {\n        this.processStandardItem(item, cipher);\n      } else {\n        this.processWinOpVaultItem(item, cipher);\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      this.result.ciphers.push(cipher);\n    });\n\n    this.result.success = true;\n    return Promise.resolve(this.result);\n  }\n\n  private processWinOpVaultItem(item: any, cipher: CipherView) {\n    if (item.overview != null) {\n      cipher.name = this.getValueOrDefault(item.overview.title);\n      if (item.overview.URLs != null) {\n        const urls: string[] = [];\n        item.overview.URLs.forEach((url: any) => {\n          if (!this.isNullOrWhitespace(url.u)) {\n            urls.push(url.u);\n          }\n        });\n        cipher.login.uris = this.makeUriArray(urls);\n      }\n    }\n\n    if (item.details != null) {\n      if (item.details.passwordHistory != null) {\n        this.parsePasswordHistory(item.details.passwordHistory, cipher);\n      }\n      if (\n        !this.isNullOrWhitespace(item.details.ccnum) ||\n        !this.isNullOrWhitespace(item.details.cvv)\n      ) {\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n      } else if (\n        !this.isNullOrWhitespace(item.details.firstname) ||\n        !this.isNullOrWhitespace(item.details.address1)\n      ) {\n        cipher.type = CipherType.Identity;\n        cipher.identity = new IdentityView();\n      }\n      if (cipher.type === CipherType.Login && !this.isNullOrWhitespace(item.details.password)) {\n        cipher.login.password = item.details.password;\n      }\n      if (!this.isNullOrWhitespace(item.details.notesPlain)) {\n        cipher.notes = item.details.notesPlain.split(this.newLineRegex).join(\"\\n\") + \"\\n\";\n      }\n      if (item.details.fields != null) {\n        this.parseFields(item.details.fields, cipher, \"designation\", \"value\", \"name\");\n      }\n      if (item.details.sections != null) {\n        item.details.sections.forEach((section: any) => {\n          if (section.fields != null) {\n            this.parseFields(section.fields, cipher, \"n\", \"v\", \"t\");\n          }\n        });\n      }\n    }\n  }\n\n  private processStandardItem(item: any, cipher: CipherView) {\n    cipher.favorite = item.openContents && item.openContents.faveIndex ? true : false;\n    cipher.name = this.getValueOrDefault(item.title);\n\n    if (item.typeName === \"securenotes.SecureNote\") {\n      cipher.type = CipherType.SecureNote;\n      cipher.secureNote = new SecureNoteView();\n      cipher.secureNote.type = SecureNoteType.Generic;\n    } else if (item.typeName === \"wallet.financial.CreditCard\") {\n      cipher.type = CipherType.Card;\n      cipher.card = new CardView();\n    } else if (item.typeName === \"identities.Identity\") {\n      cipher.type = CipherType.Identity;\n      cipher.identity = new IdentityView();\n    } else {\n      cipher.login.uris = this.makeUriArray(item.location);\n    }\n\n    if (item.secureContents != null) {\n      if (item.secureContents.passwordHistory != null) {\n        this.parsePasswordHistory(item.secureContents.passwordHistory, cipher);\n      }\n      if (!this.isNullOrWhitespace(item.secureContents.notesPlain)) {\n        cipher.notes = item.secureContents.notesPlain.split(this.newLineRegex).join(\"\\n\") + \"\\n\";\n      }\n      if (cipher.type === CipherType.Login) {\n        if (!this.isNullOrWhitespace(item.secureContents.password)) {\n          cipher.login.password = item.secureContents.password;\n        }\n        if (item.secureContents.URLs != null) {\n          const urls: string[] = [];\n          item.secureContents.URLs.forEach((u: any) => {\n            if (!this.isNullOrWhitespace(u.url)) {\n              urls.push(u.url);\n            }\n          });\n          if (urls.length > 0) {\n            cipher.login.uris = this.makeUriArray(urls);\n          }\n        }\n      }\n      if (item.secureContents.fields != null) {\n        this.parseFields(item.secureContents.fields, cipher, \"designation\", \"value\", \"name\");\n      }\n      if (item.secureContents.sections != null) {\n        item.secureContents.sections.forEach((section: any) => {\n          if (section.fields != null) {\n            this.parseFields(section.fields, cipher, \"n\", \"v\", \"t\");\n          }\n        });\n      }\n    }\n  }\n\n  private parsePasswordHistory(items: any[], cipher: CipherView) {\n    const maxSize = items.length > 5 ? 5 : items.length;\n    cipher.passwordHistory = items\n      .filter((h: any) => !this.isNullOrWhitespace(h.value) && h.time != null)\n      .sort((a, b) => b.time - a.time)\n      .slice(0, maxSize)\n      .map((h: any) => {\n        const ph = new PasswordHistoryView();\n        ph.password = h.value;\n        ph.lastUsedDate = new Date((\"\" + h.time).length >= 13 ? h.time : h.time * 1000);\n        return ph;\n      });\n  }\n\n  private parseFields(\n    fields: any[],\n    cipher: CipherView,\n    designationKey: string,\n    valueKey: string,\n    nameKey: string,\n  ) {\n    fields.forEach((field: any) => {\n      if (field[valueKey] == null || field[valueKey].toString().trim() === \"\") {\n        return;\n      }\n\n      // TODO: when date FieldType exists, store this as a date field type instead of formatted Text if k is 'date'\n      const fieldValue =\n        field.k === \"date\"\n          ? new Date(field[valueKey] * 1000).toUTCString()\n          : field[valueKey].toString();\n      const fieldDesignation =\n        field[designationKey] != null ? field[designationKey].toString() : null;\n\n      if (cipher.type === CipherType.Login) {\n        if (this.isNullOrWhitespace(cipher.login.username) && fieldDesignation === \"username\") {\n          cipher.login.username = fieldValue;\n          return;\n        } else if (\n          this.isNullOrWhitespace(cipher.login.password) &&\n          fieldDesignation === \"password\"\n        ) {\n          cipher.login.password = fieldValue;\n          return;\n        } else if (\n          this.isNullOrWhitespace(cipher.login.totp) &&\n          fieldDesignation != null &&\n          fieldDesignation.startsWith(\"TOTP_\")\n        ) {\n          cipher.login.totp = fieldValue;\n          return;\n        }\n      } else if (cipher.type === CipherType.Card) {\n        if (this.isNullOrWhitespace(cipher.card.number) && fieldDesignation === \"ccnum\") {\n          cipher.card.number = fieldValue;\n          cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n          return;\n        } else if (this.isNullOrWhitespace(cipher.card.code) && fieldDesignation === \"cvv\") {\n          cipher.card.code = fieldValue;\n          return;\n        } else if (\n          this.isNullOrWhitespace(cipher.card.cardholderName) &&\n          fieldDesignation === \"cardholder\"\n        ) {\n          cipher.card.cardholderName = fieldValue;\n          return;\n        } else if (\n          this.isNullOrWhitespace(cipher.card.expiration) &&\n          fieldDesignation === \"expiry\" &&\n          fieldValue.length === 6\n        ) {\n          cipher.card.expMonth = (fieldValue as string).substr(4, 2);\n          if (cipher.card.expMonth[0] === \"0\") {\n            cipher.card.expMonth = cipher.card.expMonth.substr(1, 1);\n          }\n          cipher.card.expYear = (fieldValue as string).substr(0, 4);\n          return;\n        } else if (fieldDesignation === \"type\") {\n          // Skip since brand was determined from number above\n          return;\n        }\n      } else if (cipher.type === CipherType.Identity) {\n        const identity = cipher.identity;\n        if (this.isNullOrWhitespace(identity.firstName) && fieldDesignation === \"firstname\") {\n          identity.firstName = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.lastName) && fieldDesignation === \"lastname\") {\n          identity.lastName = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.middleName) && fieldDesignation === \"initial\") {\n          identity.middleName = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.phone) && fieldDesignation === \"defphone\") {\n          identity.phone = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.company) && fieldDesignation === \"company\") {\n          identity.company = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.email) && fieldDesignation === \"email\") {\n          identity.email = fieldValue;\n          return;\n        } else if (this.isNullOrWhitespace(identity.username) && fieldDesignation === \"username\") {\n          identity.username = fieldValue;\n          return;\n        } else if (fieldDesignation === \"address\") {\n          // fieldValue is an object casted into a string, so access the plain value instead\n          const { street, city, country, zip } = field[valueKey];\n          identity.address1 = this.getValueOrDefault(street);\n          identity.city = this.getValueOrDefault(city);\n          if (!this.isNullOrWhitespace(country)) {\n            identity.country = country.toUpperCase();\n          }\n          identity.postalCode = this.getValueOrDefault(zip);\n          return;\n        }\n      }\n\n      const fieldName = this.isNullOrWhitespace(field[nameKey]) ? \"no_name\" : field[nameKey];\n      if (\n        fieldName === \"password\" &&\n        cipher.passwordHistory != null &&\n        cipher.passwordHistory.some((h) => h.password === fieldValue)\n      ) {\n        return;\n      }\n\n      const fieldType = field.k === \"concealed\" ? FieldType.Hidden : FieldType.Text;\n      this.processKvp(cipher, fieldName, fieldValue, fieldType);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums/cipher-reprompt-type\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport { PasswordHistoryView } from \"@bitwarden/common/vault/models/view/password-history.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport {\n  CategoryEnum,\n  Details,\n  ExportData,\n  FieldsEntity,\n  Item,\n  LoginFieldTypeEnum,\n  Overview,\n  PasswordHistoryEntity,\n  SectionsEntity,\n  UrlsEntity,\n  Value,\n  VaultsEntity,\n} from \"./types/onepassword-1pux-importer-types\";\n\nexport class OnePassword1PuxImporter extends BaseImporter implements Importer {\n  result = new ImportResult();\n\n  parse(data: string): Promise<ImportResult> {\n    const exportData: ExportData = JSON.parse(data);\n\n    const account = exportData.accounts[0];\n    // TODO Add handling of multiple vaults\n    // const personalVaults = account.vaults[0].filter((v) => v.attrs.type === VaultAttributeTypeEnum.Personal);\n    account.vaults.forEach((vault: VaultsEntity) => {\n      vault.items.forEach((item: Item) => {\n        if (item.state === \"archived\") {\n          return;\n        }\n\n        const cipher = this.initLoginCipher();\n\n        const category = item.categoryUuid as CategoryEnum;\n        switch (category) {\n          case CategoryEnum.Login:\n          case CategoryEnum.Database:\n          case CategoryEnum.Password:\n          case CategoryEnum.WirelessRouter:\n          case CategoryEnum.Server:\n          case CategoryEnum.API_Credential:\n            cipher.type = CipherType.Login;\n            cipher.login = new LoginView();\n            break;\n          case CategoryEnum.CreditCard:\n          case CategoryEnum.BankAccount:\n            cipher.type = CipherType.Card;\n            cipher.card = new CardView();\n            break;\n          case CategoryEnum.SecureNote:\n          case CategoryEnum.SoftwareLicense:\n          case CategoryEnum.EmailAccount:\n          case CategoryEnum.MedicalRecord:\n            // case CategoryEnum.Document:\n            cipher.type = CipherType.SecureNote;\n            cipher.secureNote = new SecureNoteView();\n            cipher.secureNote.type = SecureNoteType.Generic;\n            break;\n          case CategoryEnum.Identity:\n          case CategoryEnum.DriversLicense:\n          case CategoryEnum.OutdoorLicense:\n          case CategoryEnum.Membership:\n          case CategoryEnum.Passport:\n          case CategoryEnum.RewardsProgram:\n          case CategoryEnum.SocialSecurityNumber:\n            cipher.type = CipherType.Identity;\n            cipher.identity = new IdentityView();\n            break;\n          default:\n            break;\n        }\n\n        cipher.favorite = item.favIndex === 1 ? true : false;\n\n        this.processOverview(item.overview, cipher);\n\n        this.processLoginFields(item, cipher);\n\n        this.processDetails(category, item.details, cipher);\n\n        this.parsePasswordHistory(item.details.passwordHistory, cipher);\n\n        this.processSections(category, item.details.sections, cipher);\n\n        if (!this.isNullOrWhitespace(item.details.notesPlain)) {\n          cipher.notes = item.details.notesPlain.split(this.newLineRegex).join(\"\\n\") + \"\\n\";\n        }\n\n        this.convertToNoteIfNeeded(cipher);\n        this.cleanupCipher(cipher);\n        this.result.ciphers.push(cipher);\n      });\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(this.result);\n    }\n\n    this.result.success = true;\n    return Promise.resolve(this.result);\n  }\n\n  private processOverview(overview: Overview, cipher: CipherView) {\n    if (overview == null) {\n      return;\n    }\n\n    cipher.name = this.getValueOrDefault(overview.title);\n\n    if (overview.urls != null) {\n      const urls: string[] = [];\n      overview.urls.forEach((url: UrlsEntity) => {\n        if (!this.isNullOrWhitespace(url.url)) {\n          urls.push(url.url);\n        }\n      });\n      cipher.login.uris = this.makeUriArray(urls);\n    }\n\n    if (overview.tags != null && overview.tags.length > 0) {\n      const folderName = this.capitalize(overview.tags[0]);\n      this.processFolder(this.result, folderName);\n    }\n  }\n\n  private capitalize(inputString: string): string {\n    return inputString.trim().replace(/\\w\\S*/g, (w) => w.replace(/^\\w/, (c) => c.toUpperCase()));\n  }\n\n  private processLoginFields(item: Item, cipher: CipherView) {\n    if (item.details == null) {\n      return;\n    }\n\n    if (item.details.loginFields == null || item.details.loginFields.length === 0) {\n      return;\n    }\n\n    item.details.loginFields.forEach((loginField) => {\n      if (loginField.designation === \"username\" && loginField.value !== \"\") {\n        cipher.type = CipherType.Login;\n        cipher.login.username = loginField.value;\n        return;\n      }\n\n      if (loginField.designation === \"password\" && loginField.value !== \"\") {\n        cipher.type = CipherType.Login;\n        cipher.login.password = loginField.value;\n        return;\n      }\n\n      let fieldValue = loginField.value;\n      let fieldType: FieldType = FieldType.Text;\n      switch (loginField.fieldType) {\n        case LoginFieldTypeEnum.Password:\n          fieldType = FieldType.Hidden;\n          break;\n        case LoginFieldTypeEnum.CheckBox:\n          fieldValue = loginField.value !== \"\" ? \"true\" : \"false\";\n          fieldType = FieldType.Boolean;\n          break;\n        default:\n          break;\n      }\n      this.processKvp(cipher, loginField.name, fieldValue, fieldType);\n    });\n  }\n\n  private processDetails(category: CategoryEnum, details: Details, cipher: CipherView) {\n    if (category !== CategoryEnum.Password) {\n      return;\n    }\n\n    if (details == null) {\n      return;\n    }\n    cipher.login.password = details.password;\n  }\n\n  private processSections(category: CategoryEnum, sections: SectionsEntity[], cipher: CipherView) {\n    if (sections == null || sections.length === 0) {\n      return;\n    }\n\n    sections.forEach((section: SectionsEntity) => {\n      if (section.fields == null) {\n        return;\n      }\n\n      this.parseSectionFields(category, section.fields, cipher, section.title);\n    });\n  }\n\n  private parseSectionFields(\n    category: CategoryEnum,\n    fields: FieldsEntity[],\n    cipher: CipherView,\n    sectionTitle: string,\n  ) {\n    fields.forEach((field: FieldsEntity) => {\n      const valueKey = Object.keys(field.value)[0];\n      const anyField = field as any;\n\n      if (\n        anyField.value == null ||\n        anyField.value[valueKey] == null ||\n        anyField.value[valueKey] === \"\"\n      ) {\n        return;\n      }\n\n      const fieldName = this.getFieldName(field.title, sectionTitle);\n      const fieldValue = this.extractValue(field.value, valueKey);\n\n      if (cipher.type === CipherType.Login) {\n        if (this.fillLogin(field, fieldValue, cipher)) {\n          return;\n        }\n\n        switch (category) {\n          case CategoryEnum.Login:\n          case CategoryEnum.Database:\n          case CategoryEnum.EmailAccount:\n          case CategoryEnum.WirelessRouter:\n            break;\n\n          case CategoryEnum.Server:\n            if (this.isNullOrWhitespace(cipher.login.uri) && field.id === \"url\") {\n              cipher.login.uris = this.makeUriArray(fieldValue);\n              return;\n            }\n            break;\n\n          case CategoryEnum.API_Credential:\n            if (this.fillApiCredentials(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          default:\n            break;\n        }\n      } else if (cipher.type === CipherType.Card) {\n        if (this.fillCreditCard(field, fieldValue, cipher)) {\n          return;\n        }\n\n        if (category === CategoryEnum.BankAccount) {\n          if (this.fillBankAccount(field, fieldValue, cipher)) {\n            return;\n          }\n        }\n      } else if (cipher.type === CipherType.Identity) {\n        if (this.fillIdentity(field, fieldValue, cipher, valueKey)) {\n          return;\n        }\n        if (valueKey === \"address\") {\n          // fieldValue is an object casted into a string, so access the plain value instead\n          const { street, city, country, zip, state } = field.value.address;\n          cipher.identity.address1 = this.getValueOrDefault(street);\n          cipher.identity.city = this.getValueOrDefault(city);\n          if (!this.isNullOrWhitespace(country)) {\n            cipher.identity.country = country.toUpperCase();\n          }\n          cipher.identity.postalCode = this.getValueOrDefault(zip);\n          cipher.identity.state = this.getValueOrDefault(state);\n          return;\n        }\n\n        switch (category) {\n          case CategoryEnum.Identity:\n            break;\n          case CategoryEnum.DriversLicense:\n            if (this.fillDriversLicense(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          case CategoryEnum.OutdoorLicense:\n            if (this.fillOutdoorLicense(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          case CategoryEnum.Membership:\n            if (this.fillMembership(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          case CategoryEnum.Passport:\n            if (this.fillPassport(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          case CategoryEnum.RewardsProgram:\n            if (this.fillRewardsProgram(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          case CategoryEnum.SocialSecurityNumber:\n            if (this.fillSSN(field, fieldValue, cipher)) {\n              return;\n            }\n            break;\n          default:\n            break;\n        }\n      }\n\n      if (valueKey === \"email\") {\n        // fieldValue is an object casted into a string, so access the plain value instead\n        const { email_address, provider } = field.value.email;\n        this.processKvp(cipher, fieldName, email_address, FieldType.Text);\n        this.processKvp(cipher, \"provider\", provider, FieldType.Text);\n        return;\n      }\n\n      // Do not include a password field if it's already in the history\n      if (\n        field.title === \"password\" &&\n        cipher.passwordHistory != null &&\n        cipher.passwordHistory.some((h) => h.password === fieldValue)\n      ) {\n        return;\n      }\n\n      // TODO ?? If one of the fields is marked as guarded, then activate Password-Reprompt for the entire item\n      if (field.guarded && cipher.reprompt === CipherRepromptType.None) {\n        cipher.reprompt = CipherRepromptType.Password;\n      }\n\n      const fieldType = valueKey === \"concealed\" ? FieldType.Hidden : FieldType.Text;\n      this.processKvp(cipher, fieldName, fieldValue, fieldType);\n    });\n  }\n\n  // Use the title if available. If not use the sectionTitle if available.\n  // Default to an empty string in all other cases.\n  private getFieldName(title: string, sectionTitle?: string): string {\n    if (!this.isNullOrWhitespace(title)) {\n      return title;\n    }\n\n    if (!this.isNullOrWhitespace(sectionTitle)) {\n      return sectionTitle;\n    }\n\n    return \"\";\n  }\n\n  private extractValue(value: Value, valueKey: string): string {\n    if (valueKey === \"date\") {\n      return new Date(value.date * 1000).toUTCString();\n    }\n\n    if (valueKey === \"monthYear\") {\n      return value.monthYear.toString();\n    }\n\n    return (value as any)[valueKey];\n  }\n\n  private fillLogin(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    const fieldName = this.getFieldName(field.title);\n\n    if (this.isNullOrWhitespace(cipher.login.username) && fieldName === \"username\") {\n      cipher.login.username = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.login.password) && fieldName === \"password\") {\n      cipher.login.password = fieldValue;\n      return true;\n    }\n\n    if (\n      this.isNullOrWhitespace(cipher.login.totp) &&\n      field.id != null &&\n      field.id.startsWith(\"TOTP_\")\n    ) {\n      cipher.login.totp = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillApiCredentials(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    const fieldName = this.getFieldName(field.title);\n\n    if (this.isNullOrWhitespace(cipher.login.password) && fieldName === \"credential\") {\n      cipher.login.password = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.login.uri) && fieldName === \"hostname\") {\n      cipher.login.uris = this.makeUriArray(fieldValue);\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillCreditCard(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.card.number) && field.id === \"ccnum\") {\n      cipher.card.number = fieldValue;\n      cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.card.code) && field.id === \"cvv\") {\n      cipher.card.code = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.card.cardholderName) && field.id === \"cardholder\") {\n      cipher.card.cardholderName = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.card.expiration) && field.id === \"expiry\") {\n      const monthYear: string = fieldValue.toString().trim();\n      cipher.card.expMonth = monthYear.substring(4, 6);\n      if (cipher.card.expMonth[0] === \"0\") {\n        cipher.card.expMonth = cipher.card.expMonth.substring(1, 2);\n      }\n      cipher.card.expYear = monthYear.substring(0, 4);\n      return true;\n    }\n\n    if (field.id === \"type\") {\n      // Skip since brand was determined from number above\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillBankAccount(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.card.cardholderName) && field.id === \"owner\") {\n      cipher.card.cardholderName = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillIdentity(\n    field: FieldsEntity,\n    fieldValue: string,\n    cipher: CipherView,\n    valueKey: string,\n  ): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"firstname\") {\n      cipher.identity.firstName = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.lastName) && field.id === \"lastname\") {\n      cipher.identity.lastName = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.middleName) && field.id === \"initial\") {\n      cipher.identity.middleName = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.phone) && field.id === \"defphone\") {\n      cipher.identity.phone = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.company) && field.id === \"company\") {\n      cipher.identity.company = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.email)) {\n      if (valueKey === \"email\") {\n        const { email_address, provider } = field.value.email;\n        cipher.identity.email = this.getValueOrDefault(email_address);\n        this.processKvp(cipher, \"provider\", provider, FieldType.Text);\n        return true;\n      }\n\n      if (field.id === \"email\") {\n        cipher.identity.email = fieldValue;\n        return true;\n      }\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.username) && field.id === \"username\") {\n      cipher.identity.username = fieldValue;\n      return true;\n    }\n    return false;\n  }\n\n  private fillDriversLicense(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"fullname\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.address1) && field.id === \"address\") {\n      cipher.identity.address1 = fieldValue;\n      return true;\n    }\n\n    // TODO ISO code\n    if (this.isNullOrWhitespace(cipher.identity.country) && field.id === \"country\") {\n      cipher.identity.country = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.state) && field.id === \"state\") {\n      cipher.identity.state = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.licenseNumber) && field.id === \"number\") {\n      cipher.identity.licenseNumber = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillOutdoorLicense(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"name\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    // TODO ISO code\n    if (this.isNullOrWhitespace(cipher.identity.country) && field.id === \"country\") {\n      cipher.identity.country = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.state) && field.id === \"state\") {\n      cipher.identity.state = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillMembership(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"member_name\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.company) && field.id === \"org_name\") {\n      cipher.identity.company = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.phone) && field.id === \"phone\") {\n      cipher.identity.phone = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillPassport(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"fullname\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    // TODO Iso\n    if (this.isNullOrWhitespace(cipher.identity.country) && field.id === \"issuing_country\") {\n      cipher.identity.country = fieldValue;\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.passportNumber) && field.id === \"number\") {\n      cipher.identity.passportNumber = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillRewardsProgram(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"member_name\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.company) && field.id === \"company_name\") {\n      cipher.identity.company = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private fillSSN(field: FieldsEntity, fieldValue: string, cipher: CipherView): boolean {\n    if (this.isNullOrWhitespace(cipher.identity.firstName) && field.id === \"name\") {\n      this.processFullName(cipher, fieldValue);\n      return true;\n    }\n\n    if (this.isNullOrWhitespace(cipher.identity.ssn) && field.id === \"number\") {\n      cipher.identity.ssn = fieldValue;\n      return true;\n    }\n\n    return false;\n  }\n\n  private parsePasswordHistory(historyItems: PasswordHistoryEntity[], cipher: CipherView) {\n    if (historyItems == null || historyItems.length === 0) {\n      return;\n    }\n\n    const maxSize = historyItems.length > 5 ? 5 : historyItems.length;\n    cipher.passwordHistory = historyItems\n      .filter((h: any) => !this.isNullOrWhitespace(h.value) && h.time != null)\n      .sort((a, b) => b.time - a.time)\n      .slice(0, maxSize)\n      .map((h: any) => {\n        const ph = new PasswordHistoryView();\n        ph.password = h.value;\n        ph.lastUsedDate = new Date((\"\" + h.time).length >= 13 ? h.time : h.time * 1000);\n        return ph;\n      });\n  }\n}\n","import { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nexport class CipherImportContext {\n  lowerProperty: string;\n  constructor(\n    public importRecord: any,\n    public property: string,\n    public cipher: CipherView,\n  ) {\n    this.lowerProperty = property.toLowerCase();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { CipherImportContext } from \"./cipher-import-context\";\n\nexport const IgnoredProperties = [\n  \"ainfo\",\n  \"autosubmit\",\n  \"notesplain\",\n  \"ps\",\n  \"scope\",\n  \"tags\",\n  \"title\",\n  \"uuid\",\n  \"notes\",\n];\n\nexport abstract class OnePasswordCsvImporter extends BaseImporter implements Importer {\n  protected loginPropertyParsers = [\n    this.setLoginUsername,\n    this.setLoginPassword,\n    this.setLoginUris,\n  ];\n  protected creditCardPropertyParsers = [\n    this.setCreditCardNumber,\n    this.setCreditCardVerification,\n    this.setCreditCardCardholderName,\n    this.setCreditCardExpiry,\n  ];\n  protected identityPropertyParsers = [\n    this.setIdentityFirstName,\n    this.setIdentityInitial,\n    this.setIdentityLastName,\n    this.setIdentityUserName,\n    this.setIdentityEmail,\n    this.setIdentityPhone,\n    this.setIdentityCompany,\n  ];\n\n  abstract setCipherType(value: any, cipher: CipherView): void;\n\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true, {\n      quoteChar: '\"',\n      escapeChar: \"\\\\\",\n    });\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (this.isNullOrWhitespace(this.getProp(value, \"title\"))) {\n        return;\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(this.getProp(value, \"title\"), \"--\");\n\n      this.setNotes(value, cipher);\n\n      this.setCipherType(value, cipher);\n\n      let altUsername: string = null;\n      for (const property in value) {\n        // eslint-disable-next-line\n        if (!value.hasOwnProperty(property) || this.isNullOrWhitespace(value[property])) {\n          continue;\n        }\n\n        const context = new CipherImportContext(value, property, cipher);\n        if (cipher.type === CipherType.Login && this.setKnownLoginValue(context)) {\n          continue;\n        } else if (cipher.type === CipherType.Card && this.setKnownCreditCardValue(context)) {\n          continue;\n        } else if (cipher.type === CipherType.Identity && this.setKnownIdentityValue(context)) {\n          continue;\n        }\n\n        altUsername = this.setUnknownValue(context, altUsername);\n      }\n\n      if (\n        cipher.type === CipherType.Login &&\n        !this.isNullOrWhitespace(altUsername) &&\n        this.isNullOrWhitespace(cipher.login.username) &&\n        altUsername.indexOf(\"://\") === -1\n      ) {\n        cipher.login.username = altUsername;\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  protected getProp(obj: any, name: string): any {\n    const lowerObj = Object.entries(obj).reduce((agg: any, entry: [string, any]) => {\n      agg[entry[0].toLowerCase()] = entry[1];\n      return agg;\n    }, {});\n    return lowerObj[name.toLowerCase()];\n  }\n\n  protected getPropByRegexp(obj: any, regexp: RegExp): any {\n    const matchingKeys = Object.keys(obj).reduce((agg: string[], key: string) => {\n      if (key.match(regexp)) {\n        agg.push(key);\n      }\n      return agg;\n    }, []);\n    if (matchingKeys.length === 0) {\n      return null;\n    } else {\n      return obj[matchingKeys[0]];\n    }\n  }\n\n  protected getPropIncluding(obj: any, name: string): any {\n    const includesMap = Object.keys(obj).reduce((agg: string[], entry: string) => {\n      if (entry.toLowerCase().includes(name.toLowerCase())) {\n        agg.push(entry);\n      }\n      return agg;\n    }, []);\n    if (includesMap.length === 0) {\n      return null;\n    } else {\n      return obj[includesMap[0]];\n    }\n  }\n\n  protected setNotes(importRecord: any, cipher: CipherView) {\n    cipher.notes =\n      this.getValueOrDefault(this.getProp(importRecord, \"notesPlain\"), \"\") +\n      \"\\n\" +\n      this.getValueOrDefault(this.getProp(importRecord, \"notes\"), \"\") +\n      \"\\n\";\n    cipher.notes.trim();\n  }\n\n  protected setKnownLoginValue(context: CipherImportContext): boolean {\n    return this.loginPropertyParsers.reduce((agg: boolean, func) => {\n      if (!agg) {\n        agg = func.bind(this)(context);\n      }\n      return agg;\n    }, false);\n  }\n\n  protected setKnownCreditCardValue(context: CipherImportContext): boolean {\n    return this.creditCardPropertyParsers.reduce((agg: boolean, func) => {\n      if (!agg) {\n        agg = func.bind(this)(context);\n      }\n      return agg;\n    }, false);\n  }\n\n  protected setKnownIdentityValue(context: CipherImportContext): boolean {\n    return this.identityPropertyParsers.reduce((agg: boolean, func) => {\n      if (!agg) {\n        agg = func.bind(this)(context);\n      }\n      return agg;\n    }, false);\n  }\n\n  protected setUnknownValue(context: CipherImportContext, altUsername: string): string {\n    if (\n      IgnoredProperties.indexOf(context.lowerProperty) === -1 &&\n      !context.lowerProperty.startsWith(\"section:\") &&\n      !context.lowerProperty.startsWith(\"section \")\n    ) {\n      if (altUsername == null && context.lowerProperty === \"email\") {\n        return context.importRecord[context.property];\n      } else if (\n        context.lowerProperty === \"created date\" ||\n        context.lowerProperty === \"modified date\"\n      ) {\n        const readableDate = new Date(\n          parseInt(context.importRecord[context.property], 10) * 1000,\n        ).toUTCString();\n        this.processKvp(context.cipher, \"1Password \" + context.property, readableDate);\n        return null;\n      }\n      if (\n        context.lowerProperty.includes(\"password\") ||\n        context.lowerProperty.includes(\"key\") ||\n        context.lowerProperty.includes(\"secret\")\n      ) {\n        this.processKvp(\n          context.cipher,\n          context.property,\n          context.importRecord[context.property],\n          FieldType.Hidden,\n        );\n      } else {\n        this.processKvp(context.cipher, context.property, context.importRecord[context.property]);\n      }\n    }\n    return null;\n  }\n\n  protected setIdentityFirstName(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.firstName) &&\n      context.lowerProperty.includes(\"first name\")\n    ) {\n      context.cipher.identity.firstName = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityInitial(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.middleName) &&\n      context.lowerProperty.includes(\"initial\")\n    ) {\n      context.cipher.identity.middleName = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityLastName(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.lastName) &&\n      context.lowerProperty.includes(\"last name\")\n    ) {\n      context.cipher.identity.lastName = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityUserName(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.username) &&\n      context.lowerProperty.includes(\"username\")\n    ) {\n      context.cipher.identity.username = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityCompany(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.company) &&\n      context.lowerProperty.includes(\"company\")\n    ) {\n      context.cipher.identity.company = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityPhone(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.phone) &&\n      context.lowerProperty.includes(\"default phone\")\n    ) {\n      context.cipher.identity.phone = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setIdentityEmail(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.identity.email) &&\n      context.lowerProperty.includes(\"email\")\n    ) {\n      context.cipher.identity.email = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setCreditCardNumber(context: CipherImportContext): boolean {\n    if (\n      this.isNullOrWhitespace(context.cipher.card.number) &&\n      context.lowerProperty.includes(\"number\")\n    ) {\n      context.cipher.card.number = context.importRecord[context.property];\n      context.cipher.card.brand = CardView.getCardBrandByPatterns(context.cipher.card.number);\n      return true;\n    }\n    return false;\n  }\n\n  protected setCreditCardVerification(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.card.code) &&\n      context.lowerProperty.includes(\"verification number\")\n    ) {\n      context.cipher.card.code = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setCreditCardCardholderName(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.card.cardholderName) &&\n      context.lowerProperty.includes(\"cardholder name\")\n    ) {\n      context.cipher.card.cardholderName = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setCreditCardExpiry(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.card.expiration) &&\n      context.lowerProperty.includes(\"expiry date\") &&\n      context.importRecord[context.property].length === 7\n    ) {\n      context.cipher.card.expMonth = (context.importRecord[context.property] as string).substr(\n        0,\n        2,\n      );\n      if (context.cipher.card.expMonth[0] === \"0\") {\n        context.cipher.card.expMonth = context.cipher.card.expMonth.substr(1, 1);\n      }\n      context.cipher.card.expYear = (context.importRecord[context.property] as string).substr(3, 4);\n      return true;\n    }\n    return false;\n  }\n\n  protected setLoginPassword(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.login.password) &&\n      context.lowerProperty === \"password\"\n    ) {\n      context.cipher.login.password = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setLoginUsername(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.login.username) &&\n      context.lowerProperty === \"username\"\n    ) {\n      context.cipher.login.username = context.importRecord[context.property];\n      return true;\n    }\n    return false;\n  }\n\n  protected setLoginUris(context: CipherImportContext) {\n    if (\n      (context.cipher.login.uris == null || context.cipher.login.uris.length === 0) &&\n      context.lowerProperty === \"urls\"\n    ) {\n      const urls = context.importRecord[context.property].split(this.newLineRegex);\n      context.cipher.login.uris = this.makeUriArray(urls);\n      return true;\n    } else if (context.lowerProperty === \"url\") {\n      if (context.cipher.login.uris == null) {\n        context.cipher.login.uris = [];\n      }\n      context.cipher.login.uris.concat(this.makeUriArray(context.importRecord[context.property]));\n      return true;\n    }\n    return false;\n  }\n}\n","import { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\n\nimport { Importer } from \"../importer\";\n\nimport { IgnoredProperties, OnePasswordCsvImporter } from \"./onepassword-csv-importer\";\n\nexport class OnePasswordMacCsvImporter extends OnePasswordCsvImporter implements Importer {\n  setCipherType(value: any, cipher: CipherView) {\n    const onePassType = this.getValueOrDefault(this.getProp(value, \"type\"), \"Login\");\n    switch (onePassType) {\n      case \"Credit Card\":\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n        IgnoredProperties.push(\"type\");\n        break;\n      case \"Identity\":\n        cipher.type = CipherType.Identity;\n        cipher.identity = new IdentityView();\n        IgnoredProperties.push(\"type\");\n        break;\n      case \"Login\":\n      case \"Secure Note\":\n        IgnoredProperties.push(\"type\");\n        break;\n      default:\n        break;\n    }\n  }\n}\n","import { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\n\nimport { Importer } from \"../importer\";\n\nimport { CipherImportContext } from \"./cipher-import-context\";\nimport { OnePasswordCsvImporter } from \"./onepassword-csv-importer\";\n\nexport class OnePasswordWinCsvImporter extends OnePasswordCsvImporter implements Importer {\n  constructor() {\n    super();\n    this.identityPropertyParsers.push(this.setIdentityAddress);\n  }\n\n  setCipherType(value: any, cipher: CipherView) {\n    cipher.type = CipherType.Login;\n    cipher.login = new LoginView();\n\n    if (\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /\\d+: number/i)) &&\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /\\d+: expiry date/i))\n    ) {\n      cipher.type = CipherType.Card;\n      cipher.card = new CardView();\n    }\n\n    if (\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /name \\d+: first name/i)) ||\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /name \\d+: initial/i)) ||\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /name \\d+: last name/i)) ||\n      !this.isNullOrWhitespace(this.getPropByRegexp(value, /internet \\d+: email/i))\n    ) {\n      cipher.type = CipherType.Identity;\n      cipher.identity = new IdentityView();\n    }\n  }\n\n  setIdentityAddress(context: CipherImportContext) {\n    if (context.lowerProperty.match(/address \\d+: address/i)) {\n      this.processKvp(context.cipher, \"address\", context.importRecord[context.property]);\n      return true;\n    }\n    return false;\n  }\n\n  setCreditCardExpiry(context: CipherImportContext) {\n    if (\n      this.isNullOrWhitespace(context.cipher.card.expiration) &&\n      context.lowerProperty.includes(\"expiry date\")\n    ) {\n      const expSplit = (context.importRecord[context.property] as string).split(\"/\");\n      context.cipher.card.expMonth = expSplit[0];\n      if (context.cipher.card.expMonth[0] === \"0\" && context.cipher.card.expMonth.length === 2) {\n        context.cipher.card.expMonth = context.cipher.card.expMonth.substr(1, 1);\n      }\n      context.cipher.card.expYear = expSplit[2].length > 4 ? expSplit[2].substr(0, 4) : expSplit[2];\n      return true;\n    }\n    return false;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PadlockCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    let headers: string[] = null;\n    results.forEach((value) => {\n      if (headers == null) {\n        headers = value.map((v: string) => v);\n        return;\n      }\n\n      if (value.length < 2 || value.length !== headers.length) {\n        return;\n      }\n\n      if (!this.isNullOrWhitespace(value[1])) {\n        if (this.organization) {\n          const tags = (value[1] as string).split(\",\");\n          tags.forEach((tag) => {\n            tag = tag.trim();\n            let addCollection = true;\n            let collectionIndex = result.collections.length;\n\n            for (let i = 0; i < result.collections.length; i++) {\n              if (result.collections[i].name === tag) {\n                addCollection = false;\n                collectionIndex = i;\n                break;\n              }\n            }\n\n            if (addCollection) {\n              const collection = new CollectionView();\n              collection.name = tag;\n              result.collections.push(collection);\n            }\n\n            result.collectionRelationships.push([result.ciphers.length, collectionIndex]);\n          });\n        } else {\n          const tags = (value[1] as string).split(\",\");\n          const tag = tags.length > 0 ? tags[0].trim() : null;\n          this.processFolder(result, tag);\n        }\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n\n      for (let i = 2; i < value.length; i++) {\n        const header = headers[i].trim().toLowerCase();\n        if (this.isNullOrWhitespace(value[i]) || this.isNullOrWhitespace(header)) {\n          continue;\n        }\n\n        if (this.usernameFieldNames.indexOf(header) > -1) {\n          cipher.login.username = value[i];\n        } else if (this.passwordFieldNames.indexOf(header) > -1) {\n          cipher.login.password = value[i];\n        } else if (this.uriFieldNames.indexOf(header) > -1) {\n          cipher.login.uris = this.makeUriArray(value[i]);\n        } else {\n          this.processKvp(cipher, headers[i], value[i]);\n        }\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PassKeepCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      this.processFolder(result, this.getValue(\"category\", value));\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValue(\"description\", value);\n      cipher.name = this.getValueOrDefault(this.getValue(\"title\", value), \"--\");\n      cipher.login.username = this.getValue(\"username\", value);\n      cipher.login.password = this.getValue(\"password\", value);\n      cipher.login.uris = this.makeUriArray(this.getValue(\"site\", value));\n      this.processKvp(cipher, \"Password 2\", this.getValue(\"password2\", value));\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private getValue(key: string, value: any) {\n    return this.getValueOrDefault(value[key], this.getValueOrDefault(value[\" \" + key]));\n  }\n}\n","import { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { PasskyJsonExport } from \"./passky-json-types\";\n\nexport class PasskyJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const passkyExport: PasskyJsonExport = JSON.parse(data);\n    if (\n      passkyExport == null ||\n      passkyExport.passwords == null ||\n      passkyExport.passwords.length === 0\n    ) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    if (passkyExport.encrypted == true) {\n      result.success = false;\n      result.errorMessage = \"Unable to import an encrypted passky backup.\";\n      return Promise.resolve(result);\n    }\n\n    passkyExport.passwords.forEach((record) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = record.website;\n      cipher.login.username = record.username;\n      cipher.login.password = record.password;\n\n      cipher.login.uris = this.makeUriArray(record.website);\n      cipher.notes = record.message;\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PassmanJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = JSON.parse(data);\n    if (results == null || results.length === 0) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((credential: any) => {\n      if (credential.tags != null && credential.tags.length > 0) {\n        const folderName = credential.tags[0].text;\n        this.processFolder(result, folderName);\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = credential.label;\n\n      cipher.login.username = this.getValueOrDefault(credential.username);\n      if (this.isNullOrWhitespace(cipher.login.username)) {\n        cipher.login.username = this.getValueOrDefault(credential.email);\n      } else if (!this.isNullOrWhitespace(credential.email)) {\n        cipher.notes = \"Email: \" + credential.email + \"\\n\";\n      }\n\n      cipher.login.password = this.getValueOrDefault(credential.password);\n      cipher.login.uris = this.makeUriArray(credential.url);\n      cipher.notes += this.getValueOrDefault(credential.description, \"\");\n      if (credential.otp != null) {\n        cipher.login.totp = this.getValueOrDefault(credential.otp.secret);\n      }\n\n      if (credential.custom_fields != null) {\n        credential.custom_fields.forEach((customField: any) => {\n          switch (customField.field_type) {\n            case \"text\":\n            case \"password\":\n              this.processKvp(cipher, customField.label, customField.value);\n              break;\n          }\n        });\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { CollectionView } from \"@bitwarden/admin-console/common\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PasspackCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const tagsJson = !this.isNullOrWhitespace(value.Tags) ? JSON.parse(value.Tags) : null;\n      const tags: string[] =\n        tagsJson != null && tagsJson.tags != null && tagsJson.tags.length > 0\n          ? tagsJson.tags\n              .map((tagJson: string) => {\n                try {\n                  const t = JSON.parse(tagJson);\n                  return this.getValueOrDefault(t.tag);\n                } catch {\n                  // Ignore error\n                }\n                return null;\n              })\n              .filter((t: string) => !this.isNullOrWhitespace(t))\n          : null;\n\n      if (this.organization && tags != null && tags.length > 0) {\n        tags.forEach((tag) => {\n          let addCollection = true;\n          let collectionIndex = result.collections.length;\n\n          for (let i = 0; i < result.collections.length; i++) {\n            if (result.collections[i].name === tag) {\n              addCollection = false;\n              collectionIndex = i;\n              break;\n            }\n          }\n\n          if (addCollection) {\n            const collection = new CollectionView();\n            collection.name = tag;\n            result.collections.push(collection);\n          }\n\n          result.collectionRelationships.push([result.ciphers.length, collectionIndex]);\n        });\n      } else if (!this.organization && tags != null && tags.length > 0) {\n        this.processFolder(result, tags[0]);\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value.Notes, \"\");\n      cipher.notes += \"\\n\\n\" + this.getValueOrDefault(value[\"Shared Notes\"], \"\") + \"\\n\";\n      cipher.name = this.getValueOrDefault(value[\"Entry Name\"], \"--\");\n      cipher.login.username = this.getValueOrDefault(value[\"User ID\"]);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.uris = this.makeUriArray(value.URL);\n\n      if (value.__parsed_extra != null && value.__parsed_extra.length > 0) {\n        value.__parsed_extra.forEach((extra: string) => {\n          if (!this.isNullOrWhitespace(extra)) {\n            cipher.notes += \"\\n\" + extra;\n          }\n        });\n      }\n\n      const fieldsJson = !this.isNullOrWhitespace(value[\"Extra Fields\"])\n        ? JSON.parse(value[\"Extra Fields\"])\n        : null;\n      const fields =\n        fieldsJson != null && fieldsJson.extraFields != null && fieldsJson.extraFields.length > 0\n          ? fieldsJson.extraFields.map((fieldJson: string) => {\n              try {\n                return JSON.parse(fieldJson);\n              } catch {\n                // Ignore error\n              }\n              return null;\n            })\n          : null;\n      if (fields != null) {\n        fields.forEach((f: any) => {\n          if (f != null) {\n            this.processKvp(cipher, f.name, f.data);\n          }\n        });\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PasswordAgentCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    let newVersion = true;\n    results.forEach((value) => {\n      if (value.length !== 5 && value.length < 9) {\n        return;\n      }\n      const altFormat = value.length === 10 && value[0] === \"0\";\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[altFormat ? 1 : 0], \"--\");\n      cipher.login.username = this.getValueOrDefault(value[altFormat ? 2 : 1]);\n      cipher.login.password = this.getValueOrDefault(value[altFormat ? 3 : 2]);\n      if (value.length === 5) {\n        newVersion = false;\n        cipher.notes = this.getValueOrDefault(value[4]);\n        cipher.login.uris = this.makeUriArray(value[3]);\n      } else {\n        const folder = this.getValueOrDefault(value[altFormat ? 9 : 8], \"(None)\");\n        let folderName = folder !== \"(None)\" ? folder.split(\"\\\\\").join(\"/\") : null;\n        if (folderName != null) {\n          folderName = folder.split(\" > \").join(\"/\");\n          folderName = folder.split(\">\").join(\"/\");\n        }\n        this.processFolder(result, folderName);\n        cipher.notes = this.getValueOrDefault(value[altFormat ? 5 : 3]);\n        cipher.login.uris = this.makeUriArray(value[4]);\n      }\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (newVersion && this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PasswordBossJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = JSON.parse(data);\n    if (results == null || results.items == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const foldersMap = new Map<string, string>();\n    results.folders.forEach((value: any) => {\n      foldersMap.set(value.id, value.name);\n    });\n    const foldersIndexMap = new Map<string, number>();\n    foldersMap.forEach((val, key) => {\n      foldersIndexMap.set(key, result.folders.length);\n      const f = new FolderView();\n      f.name = val;\n      result.folders.push(f);\n    });\n\n    results.items.forEach((value: any) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.name, \"--\");\n      cipher.login.uris = this.makeUriArray(value.login_url);\n\n      if (value.folder != null && foldersIndexMap.has(value.folder)) {\n        result.folderRelationships.push([result.ciphers.length, foldersIndexMap.get(value.folder)]);\n      }\n\n      if (value.identifiers == null) {\n        return;\n      }\n\n      if (!this.isNullOrWhitespace(value.identifiers.notes)) {\n        cipher.notes = value.identifiers.notes.split(\"\\\\r\\\\n\").join(\"\\n\").split(\"\\\\n\").join(\"\\n\");\n      }\n\n      if (value.type === \"CreditCard\") {\n        cipher.card = new CardView();\n        cipher.type = CipherType.Card;\n      }\n\n      for (const property in value.identifiers) {\n        // eslint-disable-next-line\n        if (!value.identifiers.hasOwnProperty(property)) {\n          continue;\n        }\n        const valObj = value.identifiers[property];\n        const val = valObj != null ? valObj.toString() : null;\n        if (\n          this.isNullOrWhitespace(val) ||\n          property === \"notes\" ||\n          property === \"ignoreItemInSecurityScore\"\n        ) {\n          continue;\n        }\n\n        if (property === \"custom_fields\") {\n          valObj.forEach((cf: any) => {\n            this.processKvp(cipher, cf.name, cf.value);\n          });\n          continue;\n        }\n\n        if (cipher.type === CipherType.Card) {\n          if (property === \"cardNumber\") {\n            cipher.card.number = val;\n            cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n            continue;\n          } else if (property === \"nameOnCard\") {\n            cipher.card.cardholderName = val;\n            continue;\n          } else if (property === \"security_code\") {\n            cipher.card.code = val;\n            continue;\n          } else if (property === \"expires\") {\n            try {\n              const expDate = new Date(val);\n              cipher.card.expYear = expDate.getFullYear().toString();\n              cipher.card.expMonth = (expDate.getMonth() + 1).toString();\n            } catch {\n              // Ignore error\n            }\n            continue;\n          } else if (property === \"cardType\") {\n            continue;\n          }\n        } else {\n          if (\n            (property === \"username\" || property === \"email\") &&\n            this.isNullOrWhitespace(cipher.login.username)\n          ) {\n            cipher.login.username = val;\n            continue;\n          } else if (property === \"password\") {\n            cipher.login.password = val;\n            continue;\n          } else if (property === \"totp\") {\n            cipher.login.totp = val;\n            continue;\n          } else if (\n            (cipher.login.uris == null || cipher.login.uris.length === 0) &&\n            this.uriFieldNames.indexOf(property) > -1\n          ) {\n            cipher.login.uris = this.makeUriArray(val);\n            continue;\n          }\n        }\n\n        this.processKvp(cipher, property, val);\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PasswordDragonXmlImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const records = doc.querySelectorAll(\"PasswordManager > record\");\n    Array.from(records).forEach((record) => {\n      const category = this.querySelectorDirectChild(record, \"Category\");\n      const categoryText =\n        category != null &&\n        !this.isNullOrWhitespace(category.textContent) &&\n        category.textContent !== \"Unfiled\"\n          ? category.textContent\n          : null;\n      this.processFolder(result, categoryText);\n\n      const accountName = this.querySelectorDirectChild(record, \"Account-Name\");\n      const userId = this.querySelectorDirectChild(record, \"User-Id\");\n      const password = this.querySelectorDirectChild(record, \"Password\");\n      const url = this.querySelectorDirectChild(record, \"URL\");\n      const notes = this.querySelectorDirectChild(record, \"Notes\");\n      const cipher = this.initLoginCipher();\n      cipher.name =\n        accountName != null ? this.getValueOrDefault(accountName.textContent, \"--\") : \"--\";\n      cipher.notes = notes != null ? this.getValueOrDefault(notes.textContent) : \"\";\n      cipher.login.username = userId != null ? this.getValueOrDefault(userId.textContent) : null;\n      cipher.login.password =\n        password != null ? this.getValueOrDefault(password.textContent) : null;\n      cipher.login.uris = url != null ? this.makeUriArray(url.textContent) : null;\n\n      const attributes: string[] = [];\n      for (let i = 1; i <= 10; i++) {\n        attributes.push(\"Attribute-\" + i);\n      }\n\n      this.querySelectorAllDirectChild(record, attributes.join(\",\")).forEach((attr) => {\n        if (this.isNullOrWhitespace(attr.textContent) || attr.textContent === \"null\") {\n          return;\n        }\n        this.processKvp(cipher, attr.tagName, attr.textContent);\n      });\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\n/** This is the importer for the xml format from pwsafe.org  */\nexport class PasswordSafeXmlImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const passwordSafe = doc.querySelector(\"passwordsafe\");\n    if (passwordSafe == null) {\n      result.errorMessage = \"Missing `passwordsafe` node.\";\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const notesDelimiter = passwordSafe.getAttribute(\"delimiter\");\n    const entries = doc.querySelectorAll(\"passwordsafe > entry\");\n    Array.from(entries).forEach((entry) => {\n      const group = this.querySelectorDirectChild(entry, \"group\");\n      const groupText =\n        group != null && !this.isNullOrWhitespace(group.textContent)\n          ? group.textContent.split(\".\").join(\"/\")\n          : null;\n      this.processFolder(result, groupText);\n\n      const title = this.querySelectorDirectChild(entry, \"title\");\n      const username = this.querySelectorDirectChild(entry, \"username\");\n      const email = this.querySelectorDirectChild(entry, \"email\");\n      const password = this.querySelectorDirectChild(entry, \"password\");\n      const url = this.querySelectorDirectChild(entry, \"url\");\n      const notes = this.querySelectorDirectChild(entry, \"notes\");\n      const cipher = this.initLoginCipher();\n      cipher.name = title != null ? this.getValueOrDefault(title.textContent, \"--\") : \"--\";\n      cipher.notes =\n        notes != null\n          ? this.getValueOrDefault(notes.textContent, \"\").split(notesDelimiter).join(\"\\n\")\n          : null;\n      cipher.login.username =\n        username != null ? this.getValueOrDefault(username.textContent) : null;\n      cipher.login.password =\n        password != null ? this.getValueOrDefault(password.textContent) : null;\n      cipher.login.uris = url != null ? this.makeUriArray(url.textContent) : null;\n\n      if (this.isNullOrWhitespace(cipher.login.username) && email != null) {\n        cipher.login.username = this.getValueOrDefault(email.textContent);\n      } else if (email != null && !this.isNullOrWhitespace(email.textContent)) {\n        cipher.notes = this.isNullOrWhitespace(cipher.notes)\n          ? \"Email: \" + email.textContent\n          : cipher.notes + \"\\n\" + \"Email: \" + email.textContent;\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class PasswordWalletTxtImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 1) {\n        return;\n      }\n      if (value.length > 5) {\n        this.processFolder(result, value[5]);\n      }\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n      if (value.length > 4) {\n        cipher.notes = this.getValueOrDefault(value[4], \"\").split(\"¬\").join(\"\\n\");\n      }\n      if (value.length > 2) {\n        cipher.login.username = this.getValueOrDefault(value[2]);\n      }\n      if (value.length > 3) {\n        cipher.login.password = this.getValueOrDefault(value[3]);\n      }\n      if (value.length > 1) {\n        cipher.login.uris = this.makeUriArray(value[1]);\n      }\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","export const dutchHeaderTranslations: { [key: string]: string } = {\n  Titel: \"Title\",\n  Gebruikersnaam: \"Username\",\n  Wachtwoord: \"Password\",\n  Gewijzigd: \"Modified\",\n  Gemaakt: \"Created\",\n  \"Verloopt op\": \"Expire on\",\n  Beschrijving: \"Description\",\n  \"Gewijzigd door\": \"Modified by\",\n};\n","export const germanHeaderTranslations: { [key: string]: string } = {\n  Titel: \"Title\",\n  Benutzername: \"Username\",\n  Konto: \"Account\",\n  Passwort: \"Password\",\n  \"Geändert am\": \"Modified\",\n  \"Erstellt am\": \"Created\",\n  \"Läuft ab am\": \"Expire on\",\n  Beschreibung: \"Description\",\n  \"Geändert von\": \"Modified by\",\n};\n","import { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nconst _mappedColumns = new Set([\"Title\", \"Username\", \"URL\", \"Password\", \"Description\"]);\nimport { dutchHeaderTranslations } from \"./dutch-csv-headers\";\nimport { germanHeaderTranslations } from \"./german-csv-headers\";\n\n/* Translates the headers from non-English to English\n * This is necessary because the parser only maps English headers to ciphers\n * Currently only supports German and Dutch translations\n */\nfunction translateIntoEnglishHeaders(header: string): string {\n  const translations: { [key: string]: string } = {\n    // The header column 'User name' is parsed by the parser, but cannot be used as a variable. This converts it to a valid variable name, prior to parsing.\n    \"User name\": \"Username\",\n    ...germanHeaderTranslations,\n    ...dutchHeaderTranslations,\n  };\n\n  return translations[header] || header;\n}\n\n/**\n * PasswordXP CSV importer\n */\nexport class PasswordXPCsvImporter extends BaseImporter implements Importer {\n  /**\n   * Parses the PasswordXP CSV data.\n   * @param data\n   */\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true, {\n      skipEmptyLines: true,\n      transformHeader: translateIntoEnglishHeaders,\n    });\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    // If the first row (header check) does not contain the column \"Title\", then the data is invalid (no translation found)\n    if (!results[0].Title) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    let currentFolderName = \"\";\n    results.forEach((row) => {\n      // Skip rows starting with '>>>' as they indicate items following have no folder assigned to them\n      if (row.Title == \">>>\") {\n        return;\n      }\n\n      const title = row.Title;\n      // If the title is in the format [title], then it is a folder name\n      if (title.startsWith(\"[\") && title.endsWith(\"]\")) {\n        currentFolderName = title.startsWith(\"/\")\n          ? title.replace(\"/\", \"\")\n          : title.substring(1, title.length - 1);\n        return;\n      }\n\n      if (!Utils.isNullOrWhitespace(currentFolderName)) {\n        this.processFolder(result, currentFolderName);\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(row.Title);\n      cipher.login.username = this.getValueOrDefault(row.Username);\n      cipher.notes = this.getValueOrDefault(row.Description);\n      cipher.login.uris = this.makeUriArray(row.URL);\n      cipher.login.password = this.getValueOrDefault(row.Password);\n\n      this.importUnmappedFields(cipher, row, _mappedColumns);\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private importUnmappedFields(cipher: CipherView, row: any, mappedValues: Set<string>) {\n    const unmappedFields = Object.keys(row).filter((x) => !mappedValues.has(x));\n    unmappedFields.forEach((key) => {\n      const item = row as any;\n      this.processKvp(cipher, key, item[key]);\n    });\n  }\n}\n","export function processNames(\n  fullname: string | null,\n  firstname: string | null,\n  middlename: string | null,\n  lastname: string | null,\n) {\n  let mappedFirstName = firstname;\n  let mappedMiddleName = middlename;\n  let mappedLastName = lastname;\n\n  if (fullname) {\n    const parts = fullname.trim().split(/\\s+/);\n\n    // Assign parts to first, middle, and last name based on the number of parts\n    mappedFirstName = parts[0] || firstname;\n    mappedLastName = parts.length > 1 ? parts[parts.length - 1] : lastname;\n    mappedMiddleName = parts.length > 2 ? parts.slice(1, -1).join(\" \") : middlename;\n  }\n\n  return { mappedFirstName, mappedMiddleName, mappedLastName };\n}\n","export type ProtonPassJsonFile = {\n  version: string;\n  userId: string;\n  encrypted: boolean;\n  vaults: Record<string, ProtonPassVault>;\n};\n\nexport type ProtonPassVault = {\n  name: string;\n  description: string;\n  display: {\n    color: number;\n    icon: number;\n  };\n  items: ProtonPassItem[];\n};\n\nexport type ProtonPassItem = {\n  itemId: string;\n  shareId: string;\n  data: ProtonPassItemData;\n  state: ProtonPassItemState;\n  aliasEmail: string | null;\n  contentFormatVersion: number;\n  createTime: number;\n  modifyTime: number;\n  pinned: boolean;\n};\n\nexport enum ProtonPassItemState {\n  ACTIVE = 1,\n  TRASHED = 2,\n}\n\nexport type ProtonPassItemData = {\n  metadata: ProtonPassItemMetadata;\n  extraFields: ProtonPassItemExtraField[];\n  platformSpecific?: any;\n  type: \"login\" | \"alias\" | \"creditCard\" | \"note\" | \"identity\";\n  content:\n    | ProtonPassLoginItemContent\n    | ProtonPassCreditCardItemContent\n    | ProtonPassIdentityItemContent;\n};\n\nexport type ProtonPassItemMetadata = {\n  name: string;\n  note: string;\n  itemUuid: string;\n};\n\nexport type ProtonPassItemExtraField = {\n  fieldName: string;\n  type: string;\n  data: ProtonPassItemExtraFieldData;\n};\n\nexport type ProtonPassItemExtraFieldData = {\n  content?: string;\n  totpUri?: string;\n};\n\nexport type ProtonPassLoginItemContent = {\n  itemEmail?: string;\n  password?: string;\n  urls?: string[];\n  totpUri?: string;\n  passkeys: [];\n  itemUsername?: string;\n};\n\nexport type ProtonPassCreditCardItemContent = {\n  cardholderName?: string;\n  cardType?: number;\n  number?: string;\n  verificationNumber?: string;\n  expirationDate?: string;\n  pin?: string;\n};\n\nexport type ProtonPassIdentityItemExtraSection = {\n  sectionName?: string;\n  sectionFields?: ProtonPassItemExtraField[];\n};\n\nexport type ProtonPassIdentityItemContent = {\n  fullName?: string;\n  email?: string;\n  phoneNumber?: string;\n  firstName?: string;\n  middleName?: string;\n  lastName?: string;\n  birthdate?: string;\n  gender?: string;\n  extraPersonalDetails?: ProtonPassItemExtraField[];\n  organization?: string;\n  streetAddress?: string;\n  zipOrPostalCode?: string;\n  city?: string;\n  stateOrProvince?: string;\n  countryOrRegion?: string;\n  floor?: string;\n  county?: string;\n  extraAddressDetails?: ProtonPassItemExtraField[];\n  socialSecurityNumber?: string;\n  passportNumber?: string;\n  licenseNumber?: string;\n  website?: string;\n  xHandle?: string;\n  secondPhoneNumber?: string;\n  linkedin?: string;\n  reddit?: string;\n  facebook?: string;\n  yahoo?: string;\n  instagram?: string;\n  extraContactDetails?: ProtonPassItemExtraField[];\n  company?: string;\n  jobTitle?: string;\n  personalWebsite?: string;\n  workPhoneNumber?: string;\n  workEmail?: string;\n  extraWorkDetails?: ProtonPassItemExtraField[];\n  extraSections?: ProtonPassIdentityItemExtraSection[];\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport { processNames } from \"./protonpass-import-utils\";\nimport {\n  ProtonPassCreditCardItemContent,\n  ProtonPassIdentityItemContent,\n  ProtonPassIdentityItemExtraSection,\n  ProtonPassItemExtraField,\n  ProtonPassItemState,\n  ProtonPassJsonFile,\n  ProtonPassLoginItemContent,\n} from \"./types/protonpass-json-type\";\n\nexport class ProtonPassJsonImporter extends BaseImporter implements Importer {\n  private mappedIdentityItemKeys = [\n    \"fullName\",\n    \"firstName\",\n    \"middleName\",\n    \"lastName\",\n    \"email\",\n    \"phoneNumber\",\n    \"company\",\n    \"socialSecurityNumber\",\n    \"passportNumber\",\n    \"licenseNumber\",\n    \"organization\",\n    \"streetAddress\",\n    \"floor\",\n    \"county\",\n    \"city\",\n    \"stateOrProvince\",\n    \"zipOrPostalCode\",\n    \"countryOrRegion\",\n  ];\n\n  private identityItemExtraFieldsKeys = [\n    \"extraPersonalDetails\",\n    \"extraAddressDetails\",\n    \"extraContactDetails\",\n    \"extraWorkDetails\",\n    \"extraSections\",\n  ];\n\n  constructor(private i18nService: I18nService) {\n    super();\n  }\n\n  private processIdentityItemUnmappedAndExtraFields(\n    cipher: CipherView,\n    identityItem: ProtonPassIdentityItemContent,\n  ) {\n    Object.keys(identityItem).forEach((key) => {\n      if (\n        !this.mappedIdentityItemKeys.includes(key) &&\n        !this.identityItemExtraFieldsKeys.includes(key)\n      ) {\n        this.processKvp(\n          cipher,\n          key,\n          identityItem[key as keyof ProtonPassIdentityItemContent] as string,\n        );\n        return;\n      }\n\n      if (this.identityItemExtraFieldsKeys.includes(key)) {\n        if (key !== \"extraSections\") {\n          const extraFields = identityItem[\n            key as keyof ProtonPassIdentityItemContent\n          ] as ProtonPassItemExtraField[];\n\n          extraFields?.forEach((extraField) => {\n            this.processKvp(\n              cipher,\n              extraField.fieldName,\n              extraField.data.content,\n              extraField.type === \"hidden\" ? FieldType.Hidden : FieldType.Text,\n            );\n          });\n        } else {\n          const extraSections = identityItem[\n            key as keyof ProtonPassIdentityItemContent\n          ] as ProtonPassIdentityItemExtraSection[];\n\n          extraSections?.forEach((extraSection) => {\n            extraSection.sectionFields?.forEach((extraField) => {\n              this.processKvp(\n                cipher,\n                extraField.fieldName,\n                extraField.data.content,\n                extraField.type === \"hidden\" ? FieldType.Hidden : FieldType.Text,\n              );\n            });\n          });\n        }\n      }\n    });\n  }\n\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results: ProtonPassJsonFile = JSON.parse(data);\n    if (results == null || results.vaults == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    if (results.encrypted) {\n      result.success = false;\n      result.errorMessage = this.i18nService.t(\"unsupportedEncryptedImport\");\n      return Promise.resolve(result);\n    }\n\n    for (const [, vault] of Object.entries(results.vaults)) {\n      for (const item of vault.items) {\n        if (item.state == ProtonPassItemState.TRASHED) {\n          continue;\n        }\n\n        const cipher = this.initLoginCipher();\n        cipher.name = this.getValueOrDefault(item.data.metadata.name, \"--\");\n        cipher.notes = this.getValueOrDefault(item.data.metadata.note);\n        cipher.favorite = item.pinned;\n\n        switch (item.data.type) {\n          case \"login\": {\n            const loginContent = item.data.content as ProtonPassLoginItemContent;\n            cipher.login.uris = this.makeUriArray(loginContent.urls);\n\n            cipher.login.username = this.getValueOrDefault(loginContent.itemUsername);\n            // if the cipher has no username then the email is used as the username\n            if (cipher.login.username == null) {\n              cipher.login.username = this.getValueOrDefault(loginContent.itemEmail);\n            } else {\n              this.processKvp(cipher, \"email\", loginContent.itemEmail);\n            }\n\n            cipher.login.password = this.getValueOrDefault(loginContent.password);\n            cipher.login.totp = this.getValueOrDefault(loginContent.totpUri);\n            for (const extraField of item.data.extraFields) {\n              this.processKvp(\n                cipher,\n                extraField.fieldName,\n                extraField.type == \"totp\" ? extraField.data.totpUri : extraField.data.content,\n                extraField.type == \"text\" ? FieldType.Text : FieldType.Hidden,\n              );\n            }\n            break;\n          }\n          case \"note\":\n            cipher.type = CipherType.SecureNote;\n            cipher.secureNote = new SecureNoteView();\n            cipher.secureNote.type = SecureNoteType.Generic;\n            break;\n          case \"creditCard\": {\n            const creditCardContent = item.data.content as ProtonPassCreditCardItemContent;\n            cipher.type = CipherType.Card;\n            cipher.card = new CardView();\n            cipher.card.cardholderName = this.getValueOrDefault(creditCardContent.cardholderName);\n            cipher.card.number = this.getValueOrDefault(creditCardContent.number);\n            cipher.card.brand = CardView.getCardBrandByPatterns(creditCardContent.number);\n            cipher.card.code = this.getValueOrDefault(creditCardContent.verificationNumber);\n\n            if (!this.isNullOrWhitespace(creditCardContent.expirationDate)) {\n              cipher.card.expMonth = creditCardContent.expirationDate.substring(5, 7);\n              cipher.card.expMonth = cipher.card.expMonth.replace(/^0+/, \"\");\n              cipher.card.expYear = creditCardContent.expirationDate.substring(0, 4);\n            }\n\n            if (!this.isNullOrWhitespace(creditCardContent.pin)) {\n              this.processKvp(cipher, \"PIN\", creditCardContent.pin, FieldType.Hidden);\n            }\n\n            break;\n          }\n          case \"identity\": {\n            const identityContent = item.data.content as ProtonPassIdentityItemContent;\n            cipher.type = CipherType.Identity;\n            cipher.identity = new IdentityView();\n\n            const { mappedFirstName, mappedMiddleName, mappedLastName } = processNames(\n              this.getValueOrDefault(identityContent.fullName),\n              this.getValueOrDefault(identityContent.firstName),\n              this.getValueOrDefault(identityContent.middleName),\n              this.getValueOrDefault(identityContent.lastName),\n            );\n            cipher.identity.firstName = mappedFirstName;\n            cipher.identity.middleName = mappedMiddleName;\n            cipher.identity.lastName = mappedLastName;\n\n            cipher.identity.email = this.getValueOrDefault(identityContent.email);\n            cipher.identity.phone = this.getValueOrDefault(identityContent.phoneNumber);\n            cipher.identity.company = this.getValueOrDefault(identityContent.company);\n            cipher.identity.ssn = this.getValueOrDefault(identityContent.socialSecurityNumber);\n            cipher.identity.passportNumber = this.getValueOrDefault(identityContent.passportNumber);\n            cipher.identity.licenseNumber = this.getValueOrDefault(identityContent.licenseNumber);\n\n            const address3 =\n              `${identityContent.floor ?? \"\"} ${identityContent.county ?? \"\"}`.trim();\n            cipher.identity.address1 = this.getValueOrDefault(identityContent.organization);\n            cipher.identity.address2 = this.getValueOrDefault(identityContent.streetAddress);\n            cipher.identity.address3 = this.getValueOrDefault(address3);\n\n            cipher.identity.city = this.getValueOrDefault(identityContent.city);\n            cipher.identity.state = this.getValueOrDefault(identityContent.stateOrProvince);\n            cipher.identity.postalCode = this.getValueOrDefault(identityContent.zipOrPostalCode);\n            cipher.identity.country = this.getValueOrDefault(identityContent.countryOrRegion);\n            this.processIdentityItemUnmappedAndExtraFields(cipher, identityContent);\n\n            for (const extraField of item.data.extraFields) {\n              this.processKvp(\n                cipher,\n                extraField.fieldName,\n                extraField.data.content,\n                extraField.type === \"hidden\" ? FieldType.Hidden : FieldType.Text,\n              );\n            }\n            break;\n          }\n          default:\n            continue;\n        }\n\n        this.processFolder(result, vault.name);\n        this.cleanupCipher(cipher);\n        result.ciphers.push(cipher);\n      }\n    }\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../../models/import-result\";\nimport { BaseImporter } from \"../base-importer\";\nimport { Importer } from \"../importer\";\n\nimport {\n  AppPasswordEntry,\n  BookmarkEntry,\n  EnvironmentVariablesEntry,\n  FoldersEntity,\n  GPGEntry,\n  NotesEntry,\n  PsonoItemTypes,\n  PsonoJsonExport,\n  TOTPEntry,\n  WebsitePasswordEntry,\n} from \"./psono-json-types\";\n\nexport class PsonoJsonImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const psonoExport: PsonoJsonExport = JSON.parse(data);\n    if (psonoExport == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    this.parseFolders(result, psonoExport.folders);\n    this.handleItemParsing(result, psonoExport.items);\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private parseFolders(result: ImportResult, folders: FoldersEntity[], parentName?: string) {\n    if (folders == null || folders.length === 0) {\n      return;\n    }\n\n    folders.forEach((folder) => {\n      const folderHasItems = folder.items != null && folder.items.length > 0;\n      const folderHasSubfolders = folder.folders != null && folder.folders.length > 0;\n\n      if (!folderHasItems && !folderHasSubfolders) {\n        return;\n      }\n\n      if (!Utils.isNullOrWhitespace(parentName)) {\n        folder.name = parentName + \"/\" + folder.name;\n      }\n\n      if (folderHasSubfolders) {\n        this.parseFolders(result, folder.folders, folder.name);\n      }\n\n      if (!folderHasItems) {\n        this.processFolder(result, folder.name, folderHasItems);\n      } else {\n        this.handleItemParsing(result, folder.items, folder.name);\n      }\n    });\n  }\n\n  private handleItemParsing(result: ImportResult, items?: PsonoItemTypes[], folderName?: string) {\n    if (items == null || items.length === 0) {\n      return;\n    }\n\n    items.forEach((record) => {\n      const cipher = this.parsePsonoItem(record);\n      this.processFolder(result, folderName, true);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n  }\n\n  private parsePsonoItem(item: PsonoItemTypes): CipherView {\n    const cipher = this.initLoginCipher();\n\n    switch (item.type) {\n      case \"website_password\":\n        this.parseWebsiteLogins(item, cipher);\n        break;\n      case \"application_password\":\n        this.parseApplicationPasswords(item, cipher);\n        break;\n      case \"environment_variables\":\n        this.parseEnvironmentVariables(item, cipher);\n        break;\n      case \"totp\":\n        this.parseTOTP(item, cipher);\n        break;\n      case \"bookmark\":\n        this.parseBookmarks(item, cipher);\n        break;\n      // Skipping this until we can save GPG into notes/custom fields\n      // case \"mail_gpg_own_key\":\n      //   this.parseGPG(item, cipher);\n      //   break;\n      case \"note\":\n        this.parseNotes(item, cipher);\n        break;\n      default:\n        break;\n    }\n\n    return cipher;\n  }\n\n  readonly WEBSITE_mappedValues = new Set([\n    \"type\",\n    \"name\",\n    \"website_password_title\",\n    \"website_password_notes\",\n    \"website_password_username\",\n    \"website_password_password\",\n    \"website_password_url\",\n    \"autosubmit\",\n    \"website_password_auto_submit\",\n    \"urlfilter\",\n    \"website_password_url_filter\",\n  ]);\n  private parseWebsiteLogins(entry: WebsitePasswordEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"website_password\") {\n      return;\n    }\n\n    cipher.name = entry.website_password_title;\n    cipher.notes = entry.website_password_notes;\n\n    cipher.login.username = entry.website_password_username;\n    cipher.login.password = entry.website_password_password;\n\n    cipher.login.uris = this.makeUriArray(entry.website_password_url);\n\n    this.processKvp(\n      cipher,\n      \"website_password_auto_submit\",\n      entry.website_password_auto_submit?.toString(),\n      FieldType.Boolean,\n    );\n\n    this.processKvp(cipher, \"website_password_url_filter\", entry.website_password_url_filter);\n\n    this.importUnmappedFields(cipher, entry, this.WEBSITE_mappedValues);\n  }\n\n  readonly APP_PWD_mappedValues = new Set([\n    \"type\",\n    \"name\",\n    \"application_password_title\",\n    \"application_password_notes\",\n    \"application_password_username\",\n    \"application_password_password\",\n  ]);\n  private parseApplicationPasswords(entry: AppPasswordEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"application_password\") {\n      return;\n    }\n\n    cipher.name = entry.application_password_title;\n    cipher.notes = entry.application_password_notes;\n\n    cipher.login.username = entry.application_password_username;\n    cipher.login.password = entry.application_password_password;\n\n    this.importUnmappedFields(cipher, entry, this.APP_PWD_mappedValues);\n  }\n\n  readonly BOOKMARK_mappedValues = new Set([\n    \"type\",\n    \"name\",\n    \"bookmark_title\",\n    \"bookmark_notes\",\n    \"bookmark_url\",\n  ]);\n  private parseBookmarks(entry: BookmarkEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"bookmark\") {\n      return;\n    }\n\n    cipher.name = entry.bookmark_title;\n    cipher.notes = entry.bookmark_notes;\n\n    cipher.login.uris = this.makeUriArray(entry.bookmark_url);\n\n    this.importUnmappedFields(cipher, entry, this.BOOKMARK_mappedValues);\n  }\n\n  readonly NOTES_mappedValues = new Set([\"type\", \"name\", \"note_title\", \"note_notes\"]);\n  private parseNotes(entry: NotesEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"note\") {\n      return;\n    }\n    cipher.type = CipherType.SecureNote;\n    cipher.secureNote = new SecureNoteView();\n    cipher.secureNote.type = SecureNoteType.Generic;\n    cipher.name = entry.note_title;\n    cipher.notes = entry.note_notes;\n\n    this.importUnmappedFields(cipher, entry, this.NOTES_mappedValues);\n  }\n\n  readonly TOTP_mappedValues = new Set([\"type\", \"name\", \"totp_title\", \"totp_notes\", \"totp_code\"]);\n  private parseTOTP(entry: TOTPEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"totp\") {\n      return;\n    }\n\n    cipher.name = entry.totp_title;\n    cipher.notes = entry.totp_notes;\n\n    cipher.login.totp = entry.totp_code;\n\n    this.importUnmappedFields(cipher, entry, this.TOTP_mappedValues);\n  }\n\n  readonly ENV_VARIABLES_mappedValues = new Set([\n    \"type\",\n    \"name\",\n    \"environment_variables_title\",\n    \"environment_variables_notes\",\n    \"environment_variables_variables\",\n  ]);\n  private parseEnvironmentVariables(entry: EnvironmentVariablesEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"environment_variables\") {\n      return;\n    }\n\n    cipher.type = CipherType.SecureNote;\n    cipher.secureNote = new SecureNoteView();\n    cipher.secureNote.type = SecureNoteType.Generic;\n    cipher.name = entry.environment_variables_title;\n    cipher.notes = entry.environment_variables_notes;\n\n    entry.environment_variables_variables.forEach((KvPair) => {\n      this.processKvp(cipher, KvPair.key, KvPair.value);\n    });\n\n    this.importUnmappedFields(cipher, entry, this.ENV_VARIABLES_mappedValues);\n  }\n\n  readonly GPG_mappedValues = new Set([\n    \"type\",\n    \"name\",\n    \"mail_gpg_own_key_title\",\n    \"mail_gpg_own_key_public\",\n    \"mail_gpg_own_key_name\",\n    \"mail_gpg_own_key_email\",\n    \"mail_gpg_own_key_private\",\n  ]);\n  private parseGPG(entry: GPGEntry, cipher: CipherView) {\n    if (entry == null || entry.type != \"mail_gpg_own_key\") {\n      return;\n    }\n\n    cipher.type = CipherType.SecureNote;\n    cipher.secureNote = new SecureNoteView();\n    cipher.secureNote.type = SecureNoteType.Generic;\n    cipher.name = entry.mail_gpg_own_key_title;\n    cipher.notes = entry.mail_gpg_own_key_public;\n\n    this.processKvp(cipher, \"mail_gpg_own_key_name\", entry.mail_gpg_own_key_name);\n    this.processKvp(cipher, \"mail_gpg_own_key_email\", entry.mail_gpg_own_key_email);\n    this.processKvp(\n      cipher,\n      \"mail_gpg_own_key_private\",\n      entry.mail_gpg_own_key_private,\n      FieldType.Hidden,\n    );\n\n    this.importUnmappedFields(cipher, entry, this.GPG_mappedValues);\n  }\n\n  private importUnmappedFields(\n    cipher: CipherView,\n    entry: PsonoItemTypes,\n    mappedValues: Set<string>,\n  ) {\n    const unmappedFields = Object.keys(entry).filter((x) => !mappedValues.has(x));\n    unmappedFields.forEach((key) => {\n      const item = entry as any;\n      this.processKvp(cipher, key, item[key].toString());\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class RememBearCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.trash === \"true\") {\n        return;\n      }\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.name);\n      cipher.notes = this.getValueOrDefault(value.notes);\n      if (value.type === \"LoginItem\") {\n        cipher.login.uris = this.makeUriArray(value.website);\n        cipher.login.password = this.getValueOrDefault(value.password);\n        cipher.login.username = this.getValueOrDefault(value.username);\n      } else if (value.type === \"CreditCardItem\") {\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n        cipher.card.cardholderName = this.getValueOrDefault(value.cardholder);\n        cipher.card.number = this.getValueOrDefault(value.number);\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        cipher.card.code = this.getValueOrDefault(value.verification);\n\n        try {\n          const expMonth = this.getValueOrDefault(value.expiryMonth);\n          if (expMonth != null) {\n            const expMonthNumber = parseInt(expMonth, null);\n            if (expMonthNumber != null && expMonthNumber >= 1 && expMonthNumber <= 12) {\n              cipher.card.expMonth = expMonthNumber.toString();\n            }\n          }\n        } catch {\n          // Ignore error\n        }\n        try {\n          const expYear = this.getValueOrDefault(value.expiryYear);\n          if (expYear != null) {\n            const expYearNumber = parseInt(expYear, null);\n            if (expYearNumber != null) {\n              cipher.card.expYear = expYearNumber.toString();\n            }\n          }\n        } catch {\n          // Ignore error\n        }\n\n        const pin = this.getValueOrDefault(value.pin);\n        if (pin != null) {\n          this.processKvp(cipher, \"PIN\", pin);\n        }\n        const zip = this.getValueOrDefault(value.zipCode);\n        if (zip != null) {\n          this.processKvp(cipher, \"Zip Code\", zip);\n        }\n      }\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class RoboFormCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    let i = 1;\n    results.forEach((value) => {\n      const folder =\n        !this.isNullOrWhitespace(value.Folder) && value.Folder.startsWith(\"/\")\n          ? value.Folder.replace(\"/\", \"\")\n          : value.Folder;\n      const folderName = !this.isNullOrWhitespace(folder) ? folder : null;\n      this.processFolder(result, folderName);\n\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value.Note);\n      cipher.name = this.getValueOrDefault(value.Name, \"--\");\n      cipher.login.username = this.getValueOrDefault(value.Login);\n      cipher.login.password = this.getValueOrDefault(value.Pwd);\n      cipher.login.uris = this.makeUriArray(value.Url);\n\n      if (!this.isNullOrWhitespace(value.Rf_fields)) {\n        let fields: string[] = [value.Rf_fields];\n        if (value.__parsed_extra != null && value.__parsed_extra.length > 0) {\n          fields = fields.concat(value.__parsed_extra);\n        }\n        fields.forEach((field: string) => {\n          const parts = field.split(\":\");\n          if (parts.length < 3) {\n            return;\n          }\n          const key = parts[0] === \"-no-name-\" ? null : parts[0];\n          const val = parts.length === 4 && parts[2] === \"rck\" ? parts[1] : parts[2];\n          this.processKvp(cipher, key, val);\n        });\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n\n      if (\n        i === results.length &&\n        cipher.name === \"--\" &&\n        this.isNullOrWhitespace(cipher.login.password)\n      ) {\n        return;\n      }\n\n      result.ciphers.push(cipher);\n      i++;\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class SafariCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.Title, \"--\");\n      cipher.login.username = this.getValueOrDefault(value.Username);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.uris = this.makeUriArray(value.Url ?? value.URL);\n      cipher.login.totp = this.getValueOrDefault(value.OTPAuth);\n      cipher.notes = this.getValueOrDefault(value.Notes);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { FieldType, SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class SafeInCloudXmlImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const db = doc.querySelector(\"database\");\n    if (db == null) {\n      result.errorMessage = \"Missing `database` node.\";\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const foldersMap = new Map<string, number>();\n\n    Array.from(doc.querySelectorAll(\"database > label\")).forEach((labelEl) => {\n      const name = labelEl.getAttribute(\"name\");\n      const id = labelEl.getAttribute(\"id\");\n      if (!this.isNullOrWhitespace(name) && !this.isNullOrWhitespace(id)) {\n        foldersMap.set(id, result.folders.length);\n        const folder = new FolderView();\n        folder.name = name;\n        result.folders.push(folder);\n      }\n    });\n\n    Array.from(doc.querySelectorAll(\"database > card\")).forEach((cardEl) => {\n      if (cardEl.getAttribute(\"template\") === \"true\" || cardEl.getAttribute(\"deleted\") === \"true\") {\n        return;\n      }\n\n      const labelIdEl = this.querySelectorDirectChild(cardEl, \"label_id\");\n      if (labelIdEl != null) {\n        const labelId = labelIdEl.textContent;\n        if (!this.isNullOrWhitespace(labelId) && foldersMap.has(labelId)) {\n          result.folderRelationships.push([result.ciphers.length, foldersMap.get(labelId)]);\n        }\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(cardEl.getAttribute(\"title\"), \"--\");\n\n      if (cardEl.getAttribute(\"star\") === \"true\") {\n        cipher.favorite = true;\n      }\n\n      const cardType = cardEl.getAttribute(\"type\");\n      if (cardType === \"note\") {\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote = new SecureNoteView();\n        cipher.secureNote.type = SecureNoteType.Generic;\n      } else {\n        Array.from(this.querySelectorAllDirectChild(cardEl, \"field\")).forEach((fieldEl) => {\n          const text = fieldEl.textContent;\n          if (this.isNullOrWhitespace(text)) {\n            return;\n          }\n          const name = fieldEl.getAttribute(\"name\");\n          const fieldType = this.getValueOrDefault(fieldEl.getAttribute(\"type\"), \"\").toLowerCase();\n          if (fieldType === \"login\") {\n            cipher.login.username = text;\n          } else if (fieldType === \"password\" || fieldType === \"secret\") {\n            // safeInCloud allows for more than one password. we just insert them here and find the one used as password later\n            this.processKvp(cipher, name, text, FieldType.Hidden);\n          } else if (fieldType === \"one_time_password\") {\n            cipher.login.totp = text;\n          } else if (fieldType === \"notes\") {\n            cipher.notes += text + \"\\n\";\n          } else if (fieldType === \"weblogin\" || fieldType === \"website\") {\n            cipher.login.uris.push(...this.makeUriArray(text));\n          } else {\n            this.processKvp(cipher, name, text);\n          }\n        });\n      }\n\n      Array.from(this.querySelectorAllDirectChild(cardEl, \"notes\")).forEach((notesEl) => {\n        cipher.notes += notesEl.textContent + \"\\n\";\n      });\n\n      this.setPassword(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  // Choose a password from all passwords. Take one that has password in its name, or the first one if there is no such entry\n  // if its name is password, we can safely remove it form the fields. otherwise, it would maybe be best to keep it as a hidden field\n  setPassword(cipher: CipherView) {\n    const candidates = cipher.fields.filter((field) => field.type === FieldType.Hidden);\n    if (!candidates.length) {\n      return;\n    }\n\n    let choice: FieldView;\n    for (const field of candidates) {\n      if (this.passwordFieldNames.includes(field.name.toLowerCase())) {\n        choice = field;\n        cipher.fields = cipher.fields.filter((f) => f !== choice);\n        break;\n      }\n    }\n\n    if (!choice) {\n      choice = candidates[0];\n    }\n\n    cipher.login.password = choice.value;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class SaferPassCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(this.nameFromUrl(value.url), \"--\");\n      cipher.notes = this.getValueOrDefault(value.notes);\n      cipher.login.username = this.getValueOrDefault(value.username);\n      cipher.login.password = this.getValueOrDefault(value.password);\n      cipher.login.uris = this.makeUriArray(value.url);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class SecureSafeCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    // The url field can be in different case formats.\n    const urlField = Object.keys(results[0]).find((k) => /url/i.test(k));\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.Title);\n      cipher.notes = this.getValueOrDefault(value.Comment);\n      cipher.login.uris = this.makeUriArray(value[urlField]);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.username = this.getValueOrDefault(value.Username);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class SplashIdCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length < 3) {\n        return;\n      }\n\n      this.processFolder(result, this.getValueOrDefault(value[value.length - 1]));\n      const cipher = this.initLoginCipher();\n      cipher.notes = this.getValueOrDefault(value[value.length - 2], \"\");\n      cipher.name = this.getValueOrDefault(value[1], \"--\");\n\n      if (value[0] === \"Web Logins\" || value[0] === \"Servers\" || value[0] === \"Email Accounts\") {\n        cipher.login.username = this.getValueOrDefault(value[2]);\n        cipher.login.password = this.getValueOrDefault(value[3]);\n        cipher.login.uris = this.makeUriArray(value[4]);\n        this.parseFieldsToNotes(cipher, 5, value);\n      } else {\n        this.parseFieldsToNotes(cipher, 2, value);\n      }\n\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private parseFieldsToNotes(cipher: CipherView, startIndex: number, value: any) {\n    // last 3 rows do not get parsed\n    for (let i = startIndex; i < value.length - 3; i++) {\n      if (this.isNullOrWhitespace(value[i])) {\n        continue;\n      }\n      cipher.notes += value[i] + \"\\n\";\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class StickyPasswordXmlImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const doc = this.parseXml(data);\n    if (doc == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    const loginNodes = doc.querySelectorAll(\"root > Database > Logins > Login\");\n    Array.from(loginNodes).forEach((loginNode) => {\n      const accountId = loginNode.getAttribute(\"ID\");\n      if (this.isNullOrWhitespace(accountId)) {\n        return;\n      }\n\n      const usernameText = loginNode.getAttribute(\"Name\");\n      const passwordText = loginNode.getAttribute(\"Password\");\n      let titleText: string = null;\n      let linkText: string = null;\n      let notesText: string = null;\n      let groupId: string = null;\n      let groupText: string = null;\n\n      const accountLogin = doc.querySelector(\n        \"root > Database > Accounts > Account > \" +\n          'LoginLinks > Login[SourceLoginID=\"' +\n          accountId +\n          '\"]',\n      );\n      if (accountLogin != null) {\n        const account = accountLogin.parentElement.parentElement;\n        if (account != null) {\n          titleText = account.getAttribute(\"Name\");\n          linkText = account.getAttribute(\"Link\");\n          groupId = account.getAttribute(\"ParentID\");\n          notesText = account.getAttribute(\"Comments\");\n          if (!this.isNullOrWhitespace(notesText)) {\n            notesText = notesText.split(\"/n\").join(\"\\n\");\n          }\n        }\n      }\n\n      if (!this.isNullOrWhitespace(groupId)) {\n        groupText = this.buildGroupText(doc, groupId, \"\");\n        this.processFolder(result, groupText);\n      }\n\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(titleText, \"--\");\n      cipher.notes = this.getValueOrDefault(notesText);\n      cipher.login.username = this.getValueOrDefault(usernameText);\n      cipher.login.password = this.getValueOrDefault(passwordText);\n      cipher.login.uris = this.makeUriArray(linkText);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  buildGroupText(doc: Document, groupId: string, groupText: string): string {\n    const group = doc.querySelector('root > Database > Groups > Group[ID=\"' + groupId + '\"]');\n    if (group == null) {\n      return groupText;\n    }\n    if (!this.isNullOrWhitespace(groupText)) {\n      groupText = \"/\" + groupText;\n    }\n    groupText = group.getAttribute(\"Name\") + groupText;\n    return this.buildGroupText(doc, group.getAttribute(\"ParentID\"), groupText);\n  }\n}\n","import { SecureNoteType, CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { SecureNoteView } from \"@bitwarden/common/vault/models/view/secure-note.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nconst PropertiesToIgnore = [\n  \"kind\",\n  \"autologin\",\n  \"favorite\",\n  \"hexcolor\",\n  \"protectedwithpassword\",\n  \"subdomainonly\",\n  \"type\",\n  \"tk_export_version\",\n  \"note\",\n  \"title\",\n  \"document_content\",\n];\n\nexport class TrueKeyCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.favorite = this.getValueOrDefault(value.favorite, \"\").toLowerCase() === \"true\";\n      cipher.name = this.getValueOrDefault(value.name, \"--\");\n      cipher.notes = this.getValueOrDefault(value.memo, \"\");\n      cipher.login.username = this.getValueOrDefault(value.login);\n      cipher.login.password = this.getValueOrDefault(value.password);\n      cipher.login.uris = this.makeUriArray(value.url);\n\n      if (value.kind !== \"login\") {\n        cipher.name = this.getValueOrDefault(value.title, \"--\");\n        cipher.notes = this.getValueOrDefault(value.note, \"\");\n      }\n\n      if (value.kind === \"cc\") {\n        cipher.type = CipherType.Card;\n        cipher.card = new CardView();\n        cipher.card.cardholderName = this.getValueOrDefault(value.cardholder);\n        cipher.card.number = this.getValueOrDefault(value.number);\n        cipher.card.brand = CardView.getCardBrandByPatterns(cipher.card.number);\n        if (!this.isNullOrWhitespace(value.expiryDate)) {\n          try {\n            const expDate = new Date(value.expiryDate);\n            cipher.card.expYear = expDate.getFullYear().toString();\n            cipher.card.expMonth = (expDate.getMonth() + 1).toString();\n          } catch {\n            // Ignore error\n          }\n        }\n      } else if (value.kind !== \"login\") {\n        cipher.type = CipherType.SecureNote;\n        cipher.secureNote = new SecureNoteView();\n        cipher.secureNote.type = SecureNoteType.Generic;\n        if (!this.isNullOrWhitespace(cipher.notes)) {\n          cipher.notes = this.getValueOrDefault(value.document_content, \"\");\n        }\n        for (const property in value) {\n          if (\n            value.hasOwnProperty(property) && // eslint-disable-line\n            PropertiesToIgnore.indexOf(property.toLowerCase()) < 0 &&\n            !this.isNullOrWhitespace(value[property])\n          ) {\n            this.processKvp(cipher, property, value[property]);\n          }\n        }\n      }\n\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class UpmCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, false);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      if (value.length !== 5) {\n        return;\n      }\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value[0], \"--\");\n      cipher.notes = this.getValueOrDefault(value[4]);\n      cipher.login.username = this.getValueOrDefault(value[1]);\n      cipher.login.password = this.getValueOrDefault(value[2]);\n      cipher.login.uris = this.makeUriArray(value[3]);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","import { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class YotiCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n\n    results.forEach((value) => {\n      const cipher = this.initLoginCipher();\n      cipher.name = this.getValueOrDefault(value.Name, \"--\");\n      cipher.login.username = this.getValueOrDefault(value[\"User name\"]);\n      cipher.login.password = this.getValueOrDefault(value.Password);\n      cipher.login.uris = this.makeUriArray(value.URL);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { ImportResult } from \"../models/import-result\";\n\nimport { BaseImporter } from \"./base-importer\";\nimport { Importer } from \"./importer\";\n\nexport class ZohoVaultCsvImporter extends BaseImporter implements Importer {\n  parse(data: string): Promise<ImportResult> {\n    const result = new ImportResult();\n    const results = this.parseCsv(data, true);\n    if (results == null) {\n      result.success = false;\n      return Promise.resolve(result);\n    }\n    results.forEach((value) => {\n      if (\n        this.isNullOrWhitespace(value[\"Password Name\"]) &&\n        this.isNullOrWhitespace(value[\"Secret Name\"])\n      ) {\n        return;\n      }\n      this.processFolder(result, this.getValueOrDefault(value[\"Folder Name\"]));\n      const cipher = this.initLoginCipher();\n      cipher.favorite = this.getValueOrDefault(value.Favorite, \"0\") === \"1\";\n      cipher.notes = this.getValueOrDefault(value.Notes);\n      cipher.name = this.getValueOrDefault(\n        value[\"Password Name\"],\n        this.getValueOrDefault(value[\"Secret Name\"], \"--\"),\n      );\n      cipher.login.uris = this.makeUriArray(\n        this.getValueOrDefault(value[\"Password URL\"], this.getValueOrDefault(value[\"Secret URL\"])),\n      );\n      cipher.login.totp = this.getValueOrDefault(value[\"login_totp\"]);\n      this.parseData(cipher, value.SecretData);\n      this.parseData(cipher, value.CustomData);\n      this.convertToNoteIfNeeded(cipher);\n      this.cleanupCipher(cipher);\n      result.ciphers.push(cipher);\n    });\n\n    if (this.organization) {\n      this.moveFoldersToCollections(result);\n    }\n\n    result.success = true;\n    return Promise.resolve(result);\n  }\n\n  private parseData(cipher: CipherView, data: string) {\n    if (this.isNullOrWhitespace(data)) {\n      return;\n    }\n    const dataLines = this.splitNewLine(data);\n    dataLines.forEach((line) => {\n      const delimPosition = line.indexOf(\":\");\n      if (delimPosition < 0) {\n        return;\n      }\n      const field = line.substring(0, delimPosition);\n      const value = line.length > delimPosition ? line.substring(delimPosition + 1) : null;\n      if (\n        this.isNullOrWhitespace(field) ||\n        this.isNullOrWhitespace(value) ||\n        field === \"SecretType\"\n      ) {\n        return;\n      }\n      const fieldLower = field.toLowerCase();\n      if (cipher.login.username == null && this.usernameFieldNames.indexOf(fieldLower) > -1) {\n        cipher.login.username = value;\n      } else if (\n        cipher.login.password == null &&\n        this.passwordFieldNames.indexOf(fieldLower) > -1\n      ) {\n        cipher.login.password = value;\n      } else {\n        this.processKvp(cipher, field, value);\n      }\n    });\n  }\n}\n","export interface ImportOption {\n  id: string;\n  name: string;\n}\n\nexport const featuredImportOptions = [\n  { id: \"bitwardenjson\", name: \"Bitwarden (json)\" },\n  { id: \"bitwardencsv\", name: \"Bitwarden (csv)\" },\n  { id: \"chromecsv\", name: \"Chrome (csv)\" },\n  { id: \"dashlanecsv\", name: \"Dashlane (csv)\" },\n  { id: \"firefoxcsv\", name: \"Firefox (csv)\" },\n  { id: \"keepass2xml\", name: \"KeePass 2 (xml)\" },\n  { id: \"lastpasscsv\", name: \"LastPass\" },\n  { id: \"safaricsv\", name: \"Safari and macOS (csv)\" },\n  { id: \"1password1pux\", name: \"1Password (1pux/json)\" },\n] as const;\n\nexport const regularImportOptions = [\n  { id: \"keepassxcsv\", name: \"KeePassX (csv)\" },\n  { id: \"1password1pif\", name: \"1Password (1pif)\" },\n  { id: \"1passwordwincsv\", name: \"1Password 6 and 7 Windows (csv)\" },\n  { id: \"1passwordmaccsv\", name: \"1Password 6 and 7 Mac (csv)\" },\n  { id: \"dashlanejson\", name: \"Dashlane (json)\" },\n  { id: \"roboformcsv\", name: \"RoboForm (csv)\" },\n  { id: \"keepercsv\", name: \"Keeper (csv)\" },\n  // Temporarily remove this option for the Feb release\n  // { id: \"keeperjson\", name: \"Keeper (json)\" },\n  { id: \"enpasscsv\", name: \"Enpass (csv)\" },\n  { id: \"enpassjson\", name: \"Enpass (json)\" },\n  { id: \"protonpass\", name: \"ProtonPass (zip/json)\" },\n  { id: \"safeincloudxml\", name: \"SafeInCloud (xml)\" },\n  { id: \"pwsafexml\", name: \"Password Safe - pwsafe.org (xml)\" },\n  { id: \"stickypasswordxml\", name: \"Sticky Password (xml)\" },\n  { id: \"msecurecsv\", name: \"mSecure (csv)\" },\n  { id: \"truekeycsv\", name: \"True Key (csv)\" },\n  { id: \"passwordbossjson\", name: \"Password Boss (json)\" },\n  { id: \"zohovaultcsv\", name: \"Zoho Vault (csv)\" },\n  { id: \"splashidcsv\", name: \"SplashID (csv)\" },\n  { id: \"passworddragonxml\", name: \"Password Dragon (xml)\" },\n  { id: \"padlockcsv\", name: \"Padlock (csv)\" },\n  { id: \"passboltcsv\", name: \"Passbolt (csv)\" },\n  { id: \"clipperzhtml\", name: \"Clipperz (html)\" },\n  { id: \"aviracsv\", name: \"Avira (csv)\" },\n  { id: \"saferpasscsv\", name: \"SaferPass (csv)\" },\n  { id: \"upmcsv\", name: \"Universal Password Manager (csv)\" },\n  { id: \"ascendocsv\", name: \"Ascendo DataVault (csv)\" },\n  { id: \"meldiumcsv\", name: \"Meldium (csv)\" },\n  { id: \"passkeepcsv\", name: \"PassKeep (csv)\" },\n  { id: \"operacsv\", name: \"Opera (csv)\" },\n  { id: \"vivaldicsv\", name: \"Vivaldi (csv)\" },\n  { id: \"gnomejson\", name: \"GNOME Passwords and Keys/Seahorse (json)\" },\n  { id: \"blurcsv\", name: \"Blur (csv)\" },\n  { id: \"passwordagentcsv\", name: \"Password Agent (csv)\" },\n  { id: \"passpackcsv\", name: \"Passpack (csv)\" },\n  { id: \"passmanjson\", name: \"Passman (json)\" },\n  { id: \"avastcsv\", name: \"Avast Passwords (csv)\" },\n  { id: \"avastjson\", name: \"Avast Passwords (json)\" },\n  { id: \"fsecurefsk\", name: \"F-Secure KEY (fsk)\" },\n  { id: \"kasperskytxt\", name: \"Kaspersky Password Manager (txt)\" },\n  { id: \"remembearcsv\", name: \"RememBear (csv)\" },\n  { id: \"passwordwallettxt\", name: \"PasswordWallet (txt)\" },\n  { id: \"mykicsv\", name: \"Myki (csv)\" },\n  { id: \"securesafecsv\", name: \"SecureSafe (csv)\" },\n  { id: \"logmeoncecsv\", name: \"LogMeOnce (csv)\" },\n  { id: \"blackberrycsv\", name: \"BlackBerry Password Keeper (csv)\" },\n  { id: \"buttercupcsv\", name: \"Buttercup (csv)\" },\n  { id: \"codebookcsv\", name: \"Codebook (csv)\" },\n  { id: \"encryptrcsv\", name: \"Encryptr (csv)\" },\n  { id: \"yoticsv\", name: \"Yoti (csv)\" },\n  { id: \"nordpasscsv\", name: \"Nordpass (csv)\" },\n  { id: \"psonojson\", name: \"Psono (json)\" },\n  { id: \"passkyjson\", name: \"Passky (json)\" },\n  { id: \"passwordxpcsv\", name: \"Password XP (csv)\" },\n  { id: \"netwrixpasswordsecure\", name: \"Netwrix Password Secure (csv)\" },\n] as const;\n\nexport type ImportType =\n  | (typeof featuredImportOptions)[number][\"id\"]\n  | (typeof regularImportOptions)[number][\"id\"];\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport {\n  CollectionService,\n  CollectionWithIdRequest,\n  CollectionView,\n} from \"@bitwarden/admin-console/common\";\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { ImportCiphersRequest } from \"@bitwarden/common/models/request/import-ciphers.request\";\nimport { ImportOrganizationCiphersRequest } from \"@bitwarden/common/models/request/import-organization-ciphers.request\";\nimport { KvpRequest } from \"@bitwarden/common/models/request/kvp.request\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherRequest } from \"@bitwarden/common/vault/models/request/cipher.request\";\nimport { FolderWithIdRequest } from \"@bitwarden/common/vault/models/request/folder-with-id.request\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  AscendoCsvImporter,\n  AvastCsvImporter,\n  AvastJsonImporter,\n  AviraCsvImporter,\n  BitwardenCsvImporter,\n  BitwardenPasswordProtectedImporter,\n  BlackBerryCsvImporter,\n  BlurCsvImporter,\n  ButtercupCsvImporter,\n  ChromeCsvImporter,\n  ClipperzHtmlImporter,\n  CodebookCsvImporter,\n  DashlaneCsvImporter,\n  DashlaneJsonImporter,\n  EncryptrCsvImporter,\n  EnpassCsvImporter,\n  EnpassJsonImporter,\n  FirefoxCsvImporter,\n  FSecureFskImporter,\n  GnomeJsonImporter,\n  KasperskyTxtImporter,\n  KeePass2XmlImporter,\n  KeePassXCsvImporter,\n  KeeperCsvImporter,\n  // KeeperJsonImporter,\n  LastPassCsvImporter,\n  LogMeOnceCsvImporter,\n  MSecureCsvImporter,\n  MeldiumCsvImporter,\n  MykiCsvImporter,\n  NetwrixPasswordSecureCsvImporter,\n  NordPassCsvImporter,\n  OnePassword1PifImporter,\n  OnePassword1PuxImporter,\n  OnePasswordMacCsvImporter,\n  OnePasswordWinCsvImporter,\n  PadlockCsvImporter,\n  PassKeepCsvImporter,\n  PasskyJsonImporter,\n  PassmanJsonImporter,\n  PasspackCsvImporter,\n  PasswordAgentCsvImporter,\n  PasswordBossJsonImporter,\n  PasswordDragonXmlImporter,\n  PasswordSafeXmlImporter,\n  PasswordWalletTxtImporter,\n  ProtonPassJsonImporter,\n  PsonoJsonImporter,\n  RememBearCsvImporter,\n  RoboFormCsvImporter,\n  SafariCsvImporter,\n  SafeInCloudXmlImporter,\n  SaferPassCsvImporter,\n  SecureSafeCsvImporter,\n  SplashIdCsvImporter,\n  StickyPasswordXmlImporter,\n  TrueKeyCsvImporter,\n  UpmCsvImporter,\n  YotiCsvImporter,\n  ZohoVaultCsvImporter,\n  PasswordXPCsvImporter,\n} from \"../importers\";\nimport { Importer } from \"../importers/importer\";\nimport {\n  featuredImportOptions,\n  ImportOption,\n  ImportType,\n  regularImportOptions,\n} from \"../models/import-options\";\nimport { ImportResult } from \"../models/import-result\";\nimport { ImportApiServiceAbstraction } from \"../services/import-api.service.abstraction\";\nimport { ImportServiceAbstraction } from \"../services/import.service.abstraction\";\n\nexport class ImportService implements ImportServiceAbstraction {\n  featuredImportOptions = featuredImportOptions as readonly ImportOption[];\n\n  regularImportOptions = regularImportOptions as readonly ImportOption[];\n\n  constructor(\n    private cipherService: CipherService,\n    private folderService: FolderService,\n    private importApiService: ImportApiServiceAbstraction,\n    private i18nService: I18nService,\n    private collectionService: CollectionService,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n    private pinService: PinServiceAbstraction,\n    private accountService: AccountService,\n  ) {}\n\n  getImportOptions(): ImportOption[] {\n    return this.featuredImportOptions.concat(this.regularImportOptions);\n  }\n\n  async import(\n    importer: Importer,\n    fileContents: string,\n    organizationId: string = null,\n    selectedImportTarget: FolderView | CollectionView = null,\n    canAccessImportExport: boolean,\n  ): Promise<ImportResult> {\n    let importResult: ImportResult;\n    try {\n      importResult = await importer.parse(fileContents);\n    } catch (error) {\n      if (error instanceof SyntaxError) {\n        throw new Error(this.i18nService.t(\"importFormatError\"));\n      }\n      throw error;\n    }\n\n    if (!importResult.success) {\n      if (!Utils.isNullOrWhitespace(importResult.errorMessage)) {\n        throw new Error(importResult.errorMessage);\n      }\n      throw new Error(this.i18nService.t(\"importFormatError\"));\n    }\n\n    if (importResult.folders.length === 0 && importResult.ciphers.length === 0) {\n      throw new Error(this.i18nService.t(\"importNothingError\"));\n    }\n\n    if (importResult.ciphers.length > 0) {\n      const halfway = Math.floor(importResult.ciphers.length / 2);\n      const last = importResult.ciphers.length - 1;\n\n      if (\n        this.badData(importResult.ciphers[0]) &&\n        this.badData(importResult.ciphers[halfway]) &&\n        this.badData(importResult.ciphers[last])\n      ) {\n        throw new Error(this.i18nService.t(\"importFormatError\"));\n      }\n    }\n\n    if (organizationId && !selectedImportTarget && !canAccessImportExport) {\n      const hasUnassignedCollections =\n        importResult.collectionRelationships.length < importResult.ciphers.length;\n      if (hasUnassignedCollections) {\n        throw new Error(this.i18nService.t(\"importUnassignedItemsError\"));\n      }\n    }\n\n    try {\n      await this.setImportTarget(importResult, organizationId, selectedImportTarget);\n      if (organizationId != null) {\n        await this.handleOrganizationalImport(importResult, organizationId);\n      } else {\n        await this.handleIndividualImport(importResult);\n      }\n    } catch (error) {\n      const errorResponse = new ErrorResponse(error, 400);\n      throw this.handleServerError(errorResponse, importResult);\n    }\n    return importResult;\n  }\n\n  getImporter(\n    format: ImportType | \"bitwardenpasswordprotected\",\n    promptForPassword_callback: () => Promise<string>,\n    organizationId: string = null,\n  ): Importer {\n    if (promptForPassword_callback == null) {\n      return null;\n    }\n\n    const importer = this.getImporterInstance(format, promptForPassword_callback);\n    if (importer == null) {\n      return null;\n    }\n    importer.organizationId = organizationId;\n    return importer;\n  }\n\n  private getImporterInstance(\n    format: ImportType | \"bitwardenpasswordprotected\",\n    promptForPassword_callback: () => Promise<string>,\n  ) {\n    if (format == null) {\n      return null;\n    }\n\n    switch (format) {\n      case \"bitwardencsv\":\n        return new BitwardenCsvImporter();\n      case \"bitwardenjson\":\n      case \"bitwardenpasswordprotected\":\n        return new BitwardenPasswordProtectedImporter(\n          this.keyService,\n          this.encryptService,\n          this.i18nService,\n          this.cipherService,\n          this.pinService,\n          this.accountService,\n          promptForPassword_callback,\n        );\n      case \"lastpasscsv\":\n      case \"passboltcsv\":\n        return new LastPassCsvImporter();\n      case \"keepassxcsv\":\n        return new KeePassXCsvImporter();\n      case \"aviracsv\":\n        return new AviraCsvImporter();\n      case \"blurcsv\":\n        return new BlurCsvImporter();\n      case \"safeincloudxml\":\n        return new SafeInCloudXmlImporter();\n      case \"padlockcsv\":\n        return new PadlockCsvImporter();\n      case \"keepass2xml\":\n        return new KeePass2XmlImporter();\n      case \"chromecsv\":\n      case \"operacsv\":\n      case \"vivaldicsv\":\n        return new ChromeCsvImporter();\n      case \"firefoxcsv\":\n        return new FirefoxCsvImporter();\n      case \"upmcsv\":\n        return new UpmCsvImporter();\n      case \"saferpasscsv\":\n        return new SaferPassCsvImporter();\n      case \"safaricsv\":\n        return new SafariCsvImporter();\n      case \"meldiumcsv\":\n        return new MeldiumCsvImporter();\n      case \"1password1pif\":\n        return new OnePassword1PifImporter();\n      case \"1password1pux\":\n        return new OnePassword1PuxImporter();\n      case \"1passwordwincsv\":\n        return new OnePasswordWinCsvImporter();\n      case \"1passwordmaccsv\":\n        return new OnePasswordMacCsvImporter();\n      case \"keepercsv\":\n        return new KeeperCsvImporter();\n      // case \"keeperjson\":\n      //   return new KeeperJsonImporter();\n      case \"passworddragonxml\":\n        return new PasswordDragonXmlImporter();\n      case \"enpasscsv\":\n        return new EnpassCsvImporter();\n      case \"enpassjson\":\n        return new EnpassJsonImporter();\n      case \"pwsafexml\":\n        return new PasswordSafeXmlImporter();\n      case \"dashlanecsv\":\n        return new DashlaneCsvImporter();\n      case \"dashlanejson\":\n        return new DashlaneJsonImporter();\n      case \"msecurecsv\":\n        return new MSecureCsvImporter();\n      case \"stickypasswordxml\":\n        return new StickyPasswordXmlImporter();\n      case \"truekeycsv\":\n        return new TrueKeyCsvImporter();\n      case \"clipperzhtml\":\n        return new ClipperzHtmlImporter();\n      case \"roboformcsv\":\n        return new RoboFormCsvImporter();\n      case \"ascendocsv\":\n        return new AscendoCsvImporter();\n      case \"passwordbossjson\":\n        return new PasswordBossJsonImporter();\n      case \"zohovaultcsv\":\n        return new ZohoVaultCsvImporter();\n      case \"splashidcsv\":\n        return new SplashIdCsvImporter();\n      case \"passkeepcsv\":\n        return new PassKeepCsvImporter();\n      case \"gnomejson\":\n        return new GnomeJsonImporter();\n      case \"passwordagentcsv\":\n        return new PasswordAgentCsvImporter();\n      case \"passpackcsv\":\n        return new PasspackCsvImporter();\n      case \"passmanjson\":\n        return new PassmanJsonImporter();\n      case \"avastcsv\":\n        return new AvastCsvImporter();\n      case \"avastjson\":\n        return new AvastJsonImporter();\n      case \"fsecurefsk\":\n        return new FSecureFskImporter();\n      case \"kasperskytxt\":\n        return new KasperskyTxtImporter();\n      case \"remembearcsv\":\n        return new RememBearCsvImporter();\n      case \"passwordwallettxt\":\n        return new PasswordWalletTxtImporter();\n      case \"mykicsv\":\n        return new MykiCsvImporter();\n      case \"securesafecsv\":\n        return new SecureSafeCsvImporter();\n      case \"logmeoncecsv\":\n        return new LogMeOnceCsvImporter();\n      case \"blackberrycsv\":\n        return new BlackBerryCsvImporter();\n      case \"buttercupcsv\":\n        return new ButtercupCsvImporter();\n      case \"codebookcsv\":\n        return new CodebookCsvImporter();\n      case \"encryptrcsv\":\n        return new EncryptrCsvImporter();\n      case \"yoticsv\":\n        return new YotiCsvImporter();\n      case \"nordpasscsv\":\n        return new NordPassCsvImporter();\n      case \"psonojson\":\n        return new PsonoJsonImporter();\n      case \"passkyjson\":\n        return new PasskyJsonImporter();\n      case \"protonpass\":\n        return new ProtonPassJsonImporter(this.i18nService);\n      case \"passwordxpcsv\":\n        return new PasswordXPCsvImporter();\n      case \"netwrixpasswordsecure\":\n        return new NetwrixPasswordSecureCsvImporter();\n      default:\n        return null;\n    }\n  }\n\n  private async handleIndividualImport(importResult: ImportResult) {\n    const request = new ImportCiphersRequest();\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    for (let i = 0; i < importResult.ciphers.length; i++) {\n      const c = await this.cipherService.encrypt(importResult.ciphers[i], activeUserId);\n      request.ciphers.push(new CipherRequest(c));\n    }\n    const userKey = await this.keyService.getUserKeyWithLegacySupport(activeUserId);\n    if (importResult.folders != null) {\n      for (let i = 0; i < importResult.folders.length; i++) {\n        const f = await this.folderService.encrypt(importResult.folders[i], userKey);\n        request.folders.push(new FolderWithIdRequest(f));\n      }\n    }\n    if (importResult.folderRelationships != null) {\n      importResult.folderRelationships.forEach((r) =>\n        request.folderRelationships.push(new KvpRequest(r[0], r[1])),\n      );\n    }\n    return await this.importApiService.postImportCiphers(request);\n  }\n\n  private async handleOrganizationalImport(importResult: ImportResult, organizationId: string) {\n    const request = new ImportOrganizationCiphersRequest();\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    for (let i = 0; i < importResult.ciphers.length; i++) {\n      importResult.ciphers[i].organizationId = organizationId;\n      const c = await this.cipherService.encrypt(importResult.ciphers[i], activeUserId);\n      request.ciphers.push(new CipherRequest(c));\n    }\n    if (importResult.collections != null) {\n      for (let i = 0; i < importResult.collections.length; i++) {\n        importResult.collections[i].organizationId = organizationId;\n        const c = await this.collectionService.encrypt(importResult.collections[i]);\n        request.collections.push(new CollectionWithIdRequest(c));\n      }\n    }\n    if (importResult.collectionRelationships != null) {\n      importResult.collectionRelationships.forEach((r) =>\n        request.collectionRelationships.push(new KvpRequest(r[0], r[1])),\n      );\n    }\n    return await this.importApiService.postImportOrganizationCiphers(organizationId, request);\n  }\n\n  private badData(c: CipherView) {\n    return (\n      (c.name == null || c.name === \"--\") &&\n      c.type === CipherType.Login &&\n      c.login != null &&\n      Utils.isNullOrWhitespace(c.login.password)\n    );\n  }\n\n  private handleServerError(errorResponse: ErrorResponse, importResult: ImportResult): Error {\n    if (errorResponse.validationErrors == null) {\n      return new Error(errorResponse.message);\n    }\n\n    let errorMessage = \"\";\n\n    Object.entries(errorResponse.validationErrors).forEach(([key, value], index) => {\n      let item;\n      let itemType;\n      const i = Number(key.match(/[0-9]+/)[0]);\n\n      switch (key.match(/^\\w+/)[0]) {\n        case \"Ciphers\":\n          item = importResult.ciphers[i];\n          itemType = CipherType[item.type];\n          break;\n        case \"Folders\":\n          item = importResult.folders[i];\n          itemType = \"Folder\";\n          break;\n        case \"Collections\":\n          item = importResult.collections[i];\n          itemType = \"Collection\";\n          break;\n        default:\n          return;\n      }\n\n      if (index > 0) {\n        errorMessage += \"\\n\\n\";\n      }\n\n      if (itemType !== \"Folder\" && itemType !== \"Collection\") {\n        errorMessage += \"[\" + (i + 1) + \"] \";\n      }\n\n      errorMessage += \"[\" + itemType + '] \"' + item.name + '\": ' + value;\n    });\n\n    return new Error(errorMessage);\n  }\n\n  private async setImportTarget(\n    importResult: ImportResult,\n    organizationId: string,\n    importTarget: FolderView | CollectionView,\n  ) {\n    if (!importTarget) {\n      return;\n    }\n\n    if (organizationId) {\n      if (!(importTarget instanceof CollectionView)) {\n        throw new Error(this.i18nService.t(\"errorAssigningTargetCollection\"));\n      }\n\n      const noCollectionRelationShips: [number, number][] = [];\n      importResult.ciphers.forEach((c, index) => {\n        if (\n          !Array.isArray(importResult.collectionRelationships) ||\n          !importResult.collectionRelationships.some(([cipherPos]) => cipherPos === index)\n        ) {\n          noCollectionRelationShips.push([index, 0]);\n        }\n      });\n\n      const collections: CollectionView[] = [...importResult.collections];\n      importResult.collections = [importTarget as CollectionView];\n      collections.map((x) => {\n        const f = new CollectionView();\n        f.name = `${importTarget.name}/${x.name}`;\n        importResult.collections.push(f);\n      });\n\n      const relationships: [number, number][] = [...importResult.collectionRelationships];\n      importResult.collectionRelationships = [...noCollectionRelationShips];\n      relationships.map((x) => {\n        importResult.collectionRelationships.push([x[0], x[1] + 1]);\n      });\n\n      return;\n    }\n\n    if (!(importTarget instanceof FolderView)) {\n      throw new Error(this.i18nService.t(\"errorAssigningTargetFolder\"));\n    }\n\n    const noFolderRelationShips: [number, number][] = [];\n    importResult.ciphers.forEach((c, index) => {\n      if (Utils.isNullOrEmpty(c.folderId)) {\n        c.folderId = importTarget.id;\n        noFolderRelationShips.push([index, 0]);\n      }\n    });\n\n    const folders: FolderView[] = [...importResult.folders];\n    importResult.folders = [importTarget as FolderView];\n    folders.map((x) => {\n      const newFolderName = `${importTarget.name}/${x.name}`;\n      const f = new FolderView();\n      f.name = newFolderName;\n      importResult.folders.push(f);\n    });\n\n    const relationships: [number, number][] = [...importResult.folderRelationships];\n    importResult.folderRelationships = [...noFolderRelationShips];\n    relationships.map((x) => {\n      importResult.folderRelationships.push([x[0], x[1] + 1]);\n    });\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\n\nexport abstract class ImportCollectionServiceAbstraction {\n  getAllAdminCollections: (organizationId: string) => Promise<CollectionView[]>;\n}\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { BiometricsStatus } from \"@bitwarden/key-management\";\n\n// ex: type UnlockOptionValue = \"masterPassword\" | \"pin\" | \"biometrics\"\nexport type UnlockOptionValue = (typeof UnlockOption)[keyof typeof UnlockOption];\n\nexport const UnlockOption = Object.freeze({\n  MasterPassword: \"masterPassword\",\n  Pin: \"pin\",\n  Biometrics: \"biometrics\",\n}) satisfies { [Prop in keyof UnlockOptions as Capitalize<Prop>]: Prop };\n\nexport type UnlockOptions = {\n  masterPassword: {\n    enabled: boolean;\n  };\n  pin: {\n    enabled: boolean;\n  };\n  biometrics: {\n    enabled: boolean;\n    biometricsStatus: BiometricsStatus;\n  };\n};\n\n/**\n * The LockComponentService is a service which allows the single libs/auth LockComponent to delegate all\n * client specific functionality to client specific services implementations of LockComponentService.\n */\nexport abstract class LockComponentService {\n  // Extension\n  abstract getBiometricsError(error: any): string | null;\n  abstract getPreviousUrl(): string | null;\n\n  // Desktop only\n  abstract isWindowVisible(): Promise<boolean>;\n  abstract getBiometricsUnlockBtnText(): string;\n\n  // Multi client\n  abstract getAvailableUnlockOptions$(userId: UserId): Observable<UnlockOptions>;\n}\n","<ng-template #loading>\n  <div class=\"tw-flex tw-items-center tw-justify-center\" *ngIf=\"loading\">\n    <i class=\"bwi bwi-spinner bwi-spin bwi-3x\" aria-hidden=\"true\"></i>\n  </div>\n</ng-template>\n\n<ng-container *ngIf=\"unlockOptions; else loading\">\n  <!-- Biometrics Unlock -->\n  <ng-container *ngIf=\"activeUnlockOption === UnlockOption.Biometrics\">\n    <button\n      type=\"button\"\n      bitButton\n      buttonType=\"primary\"\n      class=\"tw-mb-3\"\n      [disabled]=\"unlockingViaBiometrics || !biometricsAvailable\"\n      [loading]=\"unlockingViaBiometrics\"\n      block\n      (click)=\"unlockViaBiometrics()\"\n    >\n      <span> {{ biometricUnlockBtnText | i18n }}</span>\n    </button>\n\n    <div class=\"tw-flex tw-flex-col tw-space-y-3\">\n      <p class=\"tw-text-center tw-mb-0\">{{ \"or\" | i18n }}</p>\n\n      <ng-container *ngIf=\"unlockOptions.pin.enabled\">\n        <button\n          type=\"button\"\n          bitButton\n          buttonType=\"secondary\"\n          block\n          (click)=\"activeUnlockOption = UnlockOption.Pin\"\n        >\n          {{ \"unlockWithPin\" | i18n }}\n        </button>\n      </ng-container>\n\n      <ng-container *ngIf=\"unlockOptions.masterPassword.enabled\">\n        <button\n          type=\"button\"\n          bitButton\n          buttonType=\"secondary\"\n          block\n          (click)=\"activeUnlockOption = UnlockOption.MasterPassword\"\n        >\n          {{ \"unlockWithMasterPassword\" | i18n }}\n        </button>\n      </ng-container>\n\n      <button type=\"button\" bitButton block (click)=\"logOut()\">\n        {{ \"logOut\" | i18n }}\n      </button>\n    </div>\n  </ng-container>\n\n  <!-- PIN Unlock -->\n  <ng-container *ngIf=\"unlockOptions.pin.enabled && activeUnlockOption === UnlockOption.Pin\">\n    <form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n      <bit-form-field>\n        <bit-label>{{ \"pin\" | i18n }}</bit-label>\n        <input\n          type=\"password\"\n          formControlName=\"pin\"\n          bitInput\n          appAutofocus\n          name=\"pin\"\n          class=\"tw-font-mono\"\n          required\n          appInputVerbatim\n        />\n        <button\n          type=\"button\"\n          bitIconButton\n          bitSuffix\n          bitPasswordInputToggle\n          [(toggled)]=\"showPassword\"\n        ></button>\n      </bit-form-field>\n\n      <div class=\"tw-flex tw-flex-col tw-space-y-3\">\n        <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" block>\n          {{ \"unlock\" | i18n }}\n        </button>\n\n        <p class=\"tw-text-center\">{{ \"or\" | i18n }}</p>\n\n        <ng-container *ngIf=\"showBiometrics\">\n          <button\n            type=\"button\"\n            bitButton\n            bitFormButton\n            buttonType=\"secondary\"\n            [disabled]=\"!biometricsAvailable\"\n            block\n            (click)=\"activeUnlockOption = UnlockOption.Biometrics\"\n          >\n            <span> {{ biometricUnlockBtnText | i18n }}</span>\n          </button>\n        </ng-container>\n\n        <ng-container *ngIf=\"unlockOptions.masterPassword.enabled\">\n          <button\n            type=\"button\"\n            bitButton\n            bitFormButton\n            buttonType=\"secondary\"\n            block\n            (click)=\"activeUnlockOption = UnlockOption.MasterPassword\"\n          >\n            {{ \"unlockWithMasterPassword\" | i18n }}\n          </button>\n        </ng-container>\n\n        <button type=\"button\" bitButton bitFormButton block (click)=\"logOut()\">\n          {{ \"logOut\" | i18n }}\n        </button>\n      </div>\n    </form>\n  </ng-container>\n\n  <!-- MP Unlock -->\n  <ng-container\n    *ngIf=\"\n      unlockOptions.masterPassword.enabled && activeUnlockOption === UnlockOption.MasterPassword\n    \"\n  >\n    <form [bitSubmit]=\"submit\" [formGroup]=\"formGroup\">\n      <bit-form-field>\n        <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n        <input\n          type=\"password\"\n          formControlName=\"masterPassword\"\n          bitInput\n          appAutofocus\n          name=\"masterPassword\"\n          class=\"tw-font-mono\"\n          required\n          appInputVerbatim\n        />\n        <button\n          type=\"button\"\n          bitIconButton\n          bitSuffix\n          bitPasswordInputToggle\n          [(toggled)]=\"showPassword\"\n        ></button>\n\n        <!-- [attr.aria-pressed]=\"showPassword\" -->\n      </bit-form-field>\n\n      <div class=\"tw-flex tw-flex-col tw-space-y-3\">\n        <button type=\"submit\" bitButton bitFormButton buttonType=\"primary\" block>\n          {{ \"unlock\" | i18n }}\n        </button>\n\n        <p class=\"tw-text-center\">{{ \"or\" | i18n }}</p>\n\n        <ng-container *ngIf=\"showBiometrics\">\n          <button\n            type=\"button\"\n            bitButton\n            bitFormButton\n            buttonType=\"secondary\"\n            [disabled]=\"!biometricsAvailable\"\n            block\n            (click)=\"activeUnlockOption = UnlockOption.Biometrics\"\n          >\n            <span> {{ biometricUnlockBtnText | i18n }}</span>\n          </button>\n        </ng-container>\n\n        <ng-container *ngIf=\"unlockOptions.pin.enabled\">\n          <button\n            type=\"button\"\n            bitButton\n            bitFormButton\n            buttonType=\"secondary\"\n            block\n            (click)=\"activeUnlockOption = UnlockOption.Pin\"\n          >\n            {{ \"unlockWithPin\" | i18n }}\n          </button>\n        </ng-container>\n\n        <button type=\"button\" bitButton bitFormButton block (click)=\"logOut()\">\n          {{ \"logOut\" | i18n }}\n        </button>\n      </div>\n    </form>\n  </ng-container>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, NgZone, OnDestroy, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormGroup, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport {\n  BehaviorSubject,\n  firstValueFrom,\n  interval,\n  mergeMap,\n  Subject,\n  switchMap,\n  take,\n  takeUntil,\n} from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AnonLayoutWrapperDataService } from \"@bitwarden/auth/angular\";\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { InternalPolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { MasterPasswordPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/master-password-policy-options\";\nimport { Account, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { DeviceTrustServiceAbstraction } from \"@bitwarden/common/auth/abstractions/device-trust.service.abstraction\";\nimport { InternalMasterPasswordServiceAbstraction } from \"@bitwarden/common/auth/abstractions/master-password.service.abstraction\";\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { VerificationType } from \"@bitwarden/common/auth/enums/verification-type\";\nimport { ForceSetPasswordReason } from \"@bitwarden/common/auth/models/domain/force-set-password-reason\";\nimport {\n  MasterPasswordVerification,\n  MasterPasswordVerificationResponse,\n} from \"@bitwarden/common/auth/types/verification\";\nimport { ClientType, DeviceType } from \"@bitwarden/common/enums\";\nimport { BroadcasterService } from \"@bitwarden/common/platform/abstractions/broadcaster.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { MessagingService } from \"@bitwarden/common/platform/abstractions/messaging.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { SyncService } from \"@bitwarden/common/platform/sync\";\nimport { PasswordStrengthServiceAbstraction } from \"@bitwarden/common/tools/password-strength\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogService,\n  FormFieldModule,\n  IconButtonModule,\n  ToastService,\n} from \"@bitwarden/components\";\nimport {\n  KeyService,\n  BiometricStateService,\n  BiometricsService,\n  BiometricsStatus,\n  UserAsymmetricKeysRegenerationService,\n} from \"@bitwarden/key-management\";\n\nimport {\n  UnlockOption,\n  LockComponentService,\n  UnlockOptions,\n  UnlockOptionValue,\n} from \"../services/lock-component.service\";\n\nconst BroadcasterSubscriptionId = \"LockComponent\";\n\nconst clientTypeToSuccessRouteRecord: Partial<Record<ClientType, string>> = {\n  [ClientType.Web]: \"vault\",\n  [ClientType.Desktop]: \"vault\",\n  [ClientType.Browser]: \"/tabs/current\",\n};\n\n/// The minimum amount of time to wait after a process reload for a biometrics auto prompt to be possible\n/// Fixes safari autoprompt behavior\nconst AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY = 5000;\n@Component({\n  selector: \"bit-lock\",\n  templateUrl: \"lock.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    ButtonModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    IconButtonModule,\n  ],\n})\nexport class LockComponent implements OnInit, OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  activeAccount: Account | null;\n\n  clientType: ClientType;\n  ClientType = ClientType;\n\n  unlockOptions: UnlockOptions = null;\n\n  UnlockOption = UnlockOption;\n\n  private _activeUnlockOptionBSubject: BehaviorSubject<UnlockOptionValue> =\n    new BehaviorSubject<UnlockOptionValue>(null);\n\n  activeUnlockOption$ = this._activeUnlockOptionBSubject.asObservable();\n\n  set activeUnlockOption(value: UnlockOptionValue) {\n    this._activeUnlockOptionBSubject.next(value);\n  }\n\n  get activeUnlockOption(): UnlockOptionValue {\n    return this._activeUnlockOptionBSubject.value;\n  }\n\n  private invalidPinAttempts = 0;\n\n  biometricUnlockBtnText: string;\n\n  // masterPassword = \"\";\n  showPassword = false;\n  private enforcedMasterPasswordOptions: MasterPasswordPolicyOptions = undefined;\n\n  forcePasswordResetRoute = \"update-temp-password\";\n\n  formGroup: FormGroup;\n\n  // Desktop properties:\n  private deferFocus: boolean = null;\n  private biometricAsked = false;\n\n  defaultUnlockOptionSetForUser = false;\n\n  unlockingViaBiometrics = false;\n\n  constructor(\n    private accountService: AccountService,\n    private pinService: PinServiceAbstraction,\n    private userVerificationService: UserVerificationService,\n    private keyService: KeyService,\n    private platformUtilsService: PlatformUtilsService,\n    private router: Router,\n    private dialogService: DialogService,\n    private messagingService: MessagingService,\n    private biometricStateService: BiometricStateService,\n    private ngZone: NgZone,\n    private i18nService: I18nService,\n    private masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    private logService: LogService,\n    private deviceTrustService: DeviceTrustServiceAbstraction,\n    private syncService: SyncService,\n    private policyService: InternalPolicyService,\n    private passwordStrengthService: PasswordStrengthServiceAbstraction,\n    private formBuilder: FormBuilder,\n    private toastService: ToastService,\n    private userAsymmetricKeysRegenerationService: UserAsymmetricKeysRegenerationService,\n\n    private biometricService: BiometricsService,\n\n    private lockComponentService: LockComponentService,\n    private anonLayoutWrapperDataService: AnonLayoutWrapperDataService,\n\n    // desktop deps\n    private broadcasterService: BroadcasterService,\n  ) {}\n\n  async ngOnInit() {\n    this.listenForActiveUnlockOptionChanges();\n\n    // Listen for active account changes\n    this.listenForActiveAccountChanges();\n\n    this.listenForUnlockOptionsChanges();\n\n    // Identify client\n    this.clientType = this.platformUtilsService.getClientType();\n\n    if (this.clientType === \"desktop\") {\n      await this.desktopOnInit();\n    } else if (this.clientType === ClientType.Browser) {\n      this.biometricUnlockBtnText = this.lockComponentService.getBiometricsUnlockBtnText();\n    }\n  }\n\n  private listenForUnlockOptionsChanges() {\n    interval(1000)\n      .pipe(\n        mergeMap(async () => {\n          this.unlockOptions = await firstValueFrom(\n            this.lockComponentService.getAvailableUnlockOptions$(this.activeAccount.id),\n          );\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  // Base component methods\n  private listenForActiveUnlockOptionChanges() {\n    this.activeUnlockOption$\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((activeUnlockOption: UnlockOptionValue) => {\n        if (activeUnlockOption === UnlockOption.Pin) {\n          this.buildPinForm();\n        } else if (activeUnlockOption === UnlockOption.MasterPassword) {\n          this.buildMasterPasswordForm();\n        }\n      });\n  }\n\n  private buildMasterPasswordForm() {\n    this.formGroup = this.formBuilder.group(\n      {\n        masterPassword: [\"\", [Validators.required]],\n      },\n      { updateOn: \"submit\" },\n    );\n  }\n\n  private buildPinForm() {\n    this.formGroup = this.formBuilder.group(\n      {\n        pin: [\"\", [Validators.required]],\n      },\n      { updateOn: \"submit\" },\n    );\n  }\n\n  private listenForActiveAccountChanges() {\n    this.accountService.activeAccount$\n      .pipe(\n        switchMap((account) => {\n          return this.handleActiveAccountChange(account);\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe();\n  }\n\n  private async handleActiveAccountChange(activeAccount: Account | null) {\n    this.activeAccount = activeAccount;\n\n    this.resetDataOnActiveAccountChange();\n\n    if (activeAccount == null) {\n      return;\n    }\n    // this account may be unlocked, prevent any prompts so we can redirect to vault\n    if (await this.keyService.hasUserKeyInMemory(activeAccount.id)) {\n      return;\n    }\n\n    this.setEmailAsPageSubtitle(activeAccount.email);\n\n    this.unlockOptions = await firstValueFrom(\n      this.lockComponentService.getAvailableUnlockOptions$(activeAccount.id),\n    );\n\n    this.setDefaultActiveUnlockOption(this.unlockOptions);\n\n    if (this.unlockOptions.biometrics.enabled) {\n      await this.handleBiometricsUnlockEnabled();\n    }\n  }\n\n  private resetDataOnActiveAccountChange() {\n    this.defaultUnlockOptionSetForUser = false;\n    this.unlockOptions = null;\n    this.activeUnlockOption = null;\n    this.formGroup = null; // new form group will be created based on new active unlock option\n\n    // Desktop properties:\n    this.biometricAsked = false;\n  }\n\n  private setEmailAsPageSubtitle(email: string) {\n    this.anonLayoutWrapperDataService.setAnonLayoutWrapperData({\n      pageSubtitle: email,\n    });\n  }\n\n  private setDefaultActiveUnlockOption(unlockOptions: UnlockOptions) {\n    // Priorities should be Biometrics > Pin > Master Password for speed\n    if (unlockOptions.biometrics.enabled) {\n      this.activeUnlockOption = UnlockOption.Biometrics;\n    } else if (unlockOptions.pin.enabled) {\n      this.activeUnlockOption = UnlockOption.Pin;\n    } else if (unlockOptions.masterPassword.enabled) {\n      this.activeUnlockOption = UnlockOption.MasterPassword;\n    }\n  }\n\n  private async handleBiometricsUnlockEnabled() {\n    this.biometricUnlockBtnText = this.lockComponentService.getBiometricsUnlockBtnText();\n\n    const autoPromptBiometrics = await firstValueFrom(\n      this.biometricStateService.promptAutomatically$,\n    );\n\n    // TODO: PM-12546 - we need to make our biometric autoprompt experience consistent between the\n    // desktop and extension.\n    if (this.clientType === \"desktop\") {\n      if (autoPromptBiometrics) {\n        await this.desktopAutoPromptBiometrics();\n      }\n    }\n\n    if (this.clientType === \"browser\") {\n      // Firefox closes the popup when unfocused, so this would block all unlock methods\n      if (this.platformUtilsService.getDevice() === DeviceType.FirefoxExtension) {\n        return;\n      }\n\n      if (\n        this.unlockOptions.biometrics.enabled &&\n        autoPromptBiometrics &&\n        (await this.biometricService.getShouldAutopromptNow())\n      ) {\n        await this.biometricService.setShouldAutopromptNow(false);\n\n        const lastProcessReload = await this.biometricStateService.getLastProcessReload();\n        if (\n          lastProcessReload == null ||\n          isNaN(lastProcessReload.getTime()) ||\n          Date.now() - lastProcessReload.getTime() > AUTOPROMPT_BIOMETRICS_PROCESS_RELOAD_DELAY\n        ) {\n          await this.unlockViaBiometrics();\n        }\n      }\n    }\n  }\n\n  // Note: this submit method is only used for unlock methods that require a form and user input.\n  // For biometrics unlock, the method is called directly.\n  submit = async (): Promise<void> => {\n    if (this.activeUnlockOption === UnlockOption.Pin) {\n      return await this.unlockViaPin();\n    }\n\n    await this.unlockViaMasterPassword();\n  };\n\n  async logOut() {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"logOut\" },\n      content: { key: \"logOutConfirmation\" },\n      acceptButtonText: { key: \"logOut\" },\n      type: \"warning\",\n    });\n\n    if (confirmed) {\n      this.messagingService.send(\"logout\", { userId: this.activeAccount.id });\n    }\n  }\n\n  async unlockViaBiometrics(): Promise<void> {\n    this.unlockingViaBiometrics = true;\n\n    if (!this.unlockOptions.biometrics.enabled) {\n      this.unlockingViaBiometrics = false;\n      return;\n    }\n\n    try {\n      await this.biometricStateService.setUserPromptCancelled();\n      const userKey = await this.biometricService.unlockWithBiometricsForUser(\n        this.activeAccount.id,\n      );\n\n      // If user cancels biometric prompt, userKey is undefined.\n      if (userKey) {\n        await this.setUserKeyAndContinue(userKey, false);\n      }\n\n      this.unlockingViaBiometrics = false;\n    } catch (e) {\n      // Cancelling is a valid action.\n      if (e?.message === \"canceled\") {\n        this.unlockingViaBiometrics = false;\n        return;\n      }\n\n      let biometricTranslatedErrorDesc;\n\n      if (this.clientType === \"browser\") {\n        const biometricErrorDescTranslationKey = this.lockComponentService.getBiometricsError(e);\n\n        if (biometricErrorDescTranslationKey) {\n          biometricTranslatedErrorDesc = this.i18nService.t(biometricErrorDescTranslationKey);\n        }\n      }\n\n      // if no translation key found, show generic error message\n      if (!biometricTranslatedErrorDesc) {\n        biometricTranslatedErrorDesc = this.i18nService.t(\"unexpectedError\");\n      }\n\n      const confirmed = await this.dialogService.openSimpleDialog({\n        title: { key: \"error\" },\n        content: biometricTranslatedErrorDesc,\n        acceptButtonText: { key: \"tryAgain\" },\n        type: \"danger\",\n      });\n\n      if (confirmed) {\n        // try again\n        await this.unlockViaBiometrics();\n      }\n\n      this.unlockingViaBiometrics = false;\n    }\n  }\n\n  togglePassword() {\n    this.showPassword = !this.showPassword;\n    const input = document.getElementById(\n      this.unlockOptions.pin.enabled ? \"pin\" : \"masterPassword\",\n    );\n    if (this.ngZone.isStable) {\n      input.focus();\n    } else {\n      // eslint-disable-next-line rxjs-angular/prefer-takeuntil\n      this.ngZone.onStable.pipe(take(1)).subscribe(() => input.focus());\n    }\n  }\n\n  private validatePin(): boolean {\n    if (this.formGroup.invalid) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"pinRequired\"),\n      });\n      return false;\n    }\n\n    return true;\n  }\n\n  private async unlockViaPin() {\n    if (!this.validatePin()) {\n      return;\n    }\n\n    const pin = this.formGroup.controls.pin.value;\n\n    const MAX_INVALID_PIN_ENTRY_ATTEMPTS = 5;\n\n    try {\n      const userKey = await this.pinService.decryptUserKeyWithPin(pin, this.activeAccount.id);\n\n      if (userKey) {\n        await this.setUserKeyAndContinue(userKey);\n        return; // successfully unlocked\n      }\n\n      // Failure state: invalid PIN or failed decryption\n      this.invalidPinAttempts++;\n\n      // Log user out if they have entered an invalid PIN too many times\n      if (this.invalidPinAttempts >= MAX_INVALID_PIN_ENTRY_ATTEMPTS) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message: this.i18nService.t(\"tooManyInvalidPinEntryAttemptsLoggingOut\"),\n        });\n        this.messagingService.send(\"logout\");\n        return;\n      }\n\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"invalidPin\"),\n      });\n    } catch {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"unexpectedError\"),\n      });\n    }\n  }\n\n  private validateMasterPassword(): boolean {\n    if (this.formGroup.invalid) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"masterPasswordRequired\"),\n      });\n      return false;\n    }\n\n    return true;\n  }\n\n  private async unlockViaMasterPassword() {\n    if (!this.validateMasterPassword()) {\n      return;\n    }\n\n    const masterPassword = this.formGroup.controls.masterPassword.value;\n\n    const verification = {\n      type: VerificationType.MasterPassword,\n      secret: masterPassword,\n    } as MasterPasswordVerification;\n\n    let passwordValid = false;\n    let masterPasswordVerificationResponse: MasterPasswordVerificationResponse;\n    try {\n      masterPasswordVerificationResponse =\n        await this.userVerificationService.verifyUserByMasterPassword(\n          verification,\n          this.activeAccount.id,\n          this.activeAccount.email,\n        );\n\n      this.enforcedMasterPasswordOptions = MasterPasswordPolicyOptions.fromResponse(\n        masterPasswordVerificationResponse.policyOptions,\n      );\n      passwordValid = true;\n    } catch (e) {\n      this.logService.error(e);\n    }\n\n    if (!passwordValid) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"invalidMasterPassword\"),\n      });\n      return;\n    }\n\n    const userKey = await this.masterPasswordService.decryptUserKeyWithMasterKey(\n      masterPasswordVerificationResponse.masterKey,\n      this.activeAccount.id,\n    );\n    await this.setUserKeyAndContinue(userKey, true);\n  }\n\n  private async setUserKeyAndContinue(key: UserKey, evaluatePasswordAfterUnlock = false) {\n    await this.keyService.setUserKey(key, this.activeAccount.id);\n\n    // Now that we have a decrypted user key in memory, we can check if we\n    // need to establish trust on the current device\n    await this.deviceTrustService.trustDeviceIfRequired(this.activeAccount.id);\n\n    await this.doContinue(evaluatePasswordAfterUnlock);\n  }\n\n  private async doContinue(evaluatePasswordAfterUnlock: boolean) {\n    await this.biometricStateService.resetUserPromptCancelled();\n    this.messagingService.send(\"unlocked\");\n\n    if (evaluatePasswordAfterUnlock) {\n      try {\n        // If we do not have any saved policies, attempt to load them from the service\n        if (this.enforcedMasterPasswordOptions == undefined) {\n          this.enforcedMasterPasswordOptions = await firstValueFrom(\n            this.policyService.masterPasswordPolicyOptions$(),\n          );\n        }\n\n        if (this.requirePasswordChange()) {\n          const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;\n          await this.masterPasswordService.setForceSetPasswordReason(\n            ForceSetPasswordReason.WeakMasterPassword,\n            userId,\n          );\n          await this.router.navigate([this.forcePasswordResetRoute]);\n          return;\n        }\n      } catch (e) {\n        // Do not prevent unlock if there is an error evaluating policies\n        this.logService.error(e);\n      }\n    }\n\n    // Vault can be de-synced since notifications get ignored while locked. Need to check whether sync is required using the sync service.\n    await this.syncService.fullSync(false);\n\n    await this.userAsymmetricKeysRegenerationService.regenerateIfNeeded(this.activeAccount.id);\n\n    if (this.clientType === \"browser\") {\n      const previousUrl = this.lockComponentService.getPreviousUrl();\n      /**\n       * In a passkey flow, the `previousUrl` will still be `/fido2?<queryParams>` at this point\n       * because the `/lock` route doesn't save the URL in the `BrowserRouterService`. This is\n       * handled by the `doNotSaveUrl` property on the `/lock` route in `app-routing.module.ts`.\n       */\n      if (previousUrl) {\n        await this.router.navigateByUrl(previousUrl);\n        return;\n      }\n    }\n\n    // determine success route based on client type\n    const successRoute = clientTypeToSuccessRouteRecord[this.clientType];\n    await this.router.navigate([successRoute]);\n  }\n\n  /**\n   * Checks if the master password meets the enforced policy requirements\n   * If not, returns false\n   */\n  private requirePasswordChange(): boolean {\n    if (\n      this.enforcedMasterPasswordOptions == undefined ||\n      !this.enforcedMasterPasswordOptions.enforceOnLogin\n    ) {\n      return false;\n    }\n\n    const masterPassword = this.formGroup.controls.masterPassword.value;\n\n    const passwordStrength = this.passwordStrengthService.getPasswordStrength(\n      masterPassword,\n      this.activeAccount.email,\n    )?.score;\n\n    return !this.policyService.evaluateMasterPassword(\n      passwordStrength,\n      masterPassword,\n      this.enforcedMasterPasswordOptions,\n    );\n  }\n\n  // -----------------------------------------------------------------------------------------------\n  // Desktop methods:\n  // -----------------------------------------------------------------------------------------------\n\n  async desktopOnInit() {\n    this.biometricUnlockBtnText = this.lockComponentService.getBiometricsUnlockBtnText();\n\n    // TODO: move this into a WindowService and subscribe to messages via MessageListener service.\n    this.broadcasterService.subscribe(BroadcasterSubscriptionId, async (message: any) => {\n      this.ngZone.run(() => {\n        switch (message.command) {\n          case \"windowHidden\":\n            this.onWindowHidden();\n            break;\n          case \"windowIsFocused\":\n            if (this.deferFocus === null) {\n              this.deferFocus = !message.windowIsFocused;\n              if (!this.deferFocus) {\n                this.focusInput();\n              }\n            } else if (this.deferFocus && message.windowIsFocused) {\n              this.focusInput();\n              this.deferFocus = false;\n            }\n            break;\n          default:\n        }\n      });\n    });\n    this.messagingService.send(\"getWindowIsFocused\");\n  }\n\n  private async desktopAutoPromptBiometrics() {\n    if (!this.unlockOptions?.biometrics?.enabled || this.biometricAsked) {\n      return;\n    }\n\n    if (!(await this.biometricService.getShouldAutopromptNow())) {\n      return;\n    }\n\n    // prevent the biometric prompt from showing if the user has already cancelled it\n    if (await firstValueFrom(this.biometricStateService.promptCancelled$)) {\n      return;\n    }\n\n    const windowVisible = await this.lockComponentService.isWindowVisible();\n\n    if (windowVisible) {\n      this.biometricAsked = true;\n      await this.unlockViaBiometrics();\n    }\n  }\n\n  onWindowHidden() {\n    this.showPassword = false;\n  }\n\n  private focusInput() {\n    if (this.unlockOptions) {\n      document.getElementById(this.unlockOptions.pin.enabled ? \"pin\" : \"masterPassword\")?.focus();\n    }\n  }\n\n  // -----------------------------------------------------------------------------------------------\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n\n    if (this.clientType === \"desktop\") {\n      this.broadcasterService.unsubscribe(BroadcasterSubscriptionId);\n    }\n  }\n\n  get biometricsAvailable(): boolean {\n    return this.unlockOptions.biometrics.enabled;\n  }\n\n  get showBiometrics(): boolean {\n    return (\n      this.unlockOptions.biometrics.biometricsStatus !== BiometricsStatus.PlatformUnsupported &&\n      this.unlockOptions.biometrics.biometricsStatus !== BiometricsStatus.NotEnabledLocally\n    );\n  }\n\n  get biometricUnavailabilityReason(): string {\n    switch (this.unlockOptions.biometrics.biometricsStatus) {\n      case BiometricsStatus.Available:\n        return \"\";\n      case BiometricsStatus.UnlockNeeded:\n        return this.i18nService.t(\"biometricsStatusHelptextUnlockNeeded\");\n      case BiometricsStatus.HardwareUnavailable:\n        return this.i18nService.t(\"biometricsStatusHelptextHardwareUnavailable\");\n      case BiometricsStatus.AutoSetupNeeded:\n        return this.i18nService.t(\"biometricsStatusHelptextAutoSetupNeeded\");\n      case BiometricsStatus.ManualSetupNeeded:\n        return this.i18nService.t(\"biometricsStatusHelptextManualSetupNeeded\");\n      case BiometricsStatus.NotEnabledInConnectedDesktopApp:\n        return this.i18nService.t(\n          \"biometricsStatusHelptextNotEnabledInDesktop\",\n          this.activeAccount.email,\n        );\n      case BiometricsStatus.NotEnabledLocally:\n        return this.i18nService.t(\n          \"biometricsStatusHelptextNotEnabledInDesktop\",\n          this.activeAccount.email,\n        );\n      case BiometricsStatus.DesktopDisconnected:\n        return this.i18nService.t(\"biometricsStatusHelptextDesktopDisconnected\");\n      default:\n        return (\n          this.i18nService.t(\"biometricsStatusHelptextUnavailableReasonUnknown\") +\n          this.unlockOptions.biometrics.biometricsStatus\n        );\n    }\n  }\n}\n","// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncryptedString } from \"../../../common/src/platform/models/domain/enc-string\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport {\n  KeyDefinition,\n  BIOMETRIC_SETTINGS_DISK,\n  UserKeyDefinition,\n} from \"../../../common/src/platform/state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { UserId } from \"../../../common/src/types/guid\";\n\n/**\n * Indicates whether the user elected to store a biometric key to unlock their vault.\n */\nexport const BIOMETRIC_UNLOCK_ENABLED = new UserKeyDefinition<boolean>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"biometricUnlockEnabled\",\n  {\n    deserializer: (obj: any) => obj,\n    clearOn: [],\n  },\n);\n\n/**\n * Boolean indicating the user has elected to require a password to use their biometric key upon starting the application.\n *\n * A true setting controls whether {@link ENCRYPTED_CLIENT_KEY_HALF} is set.\n */\nexport const REQUIRE_PASSWORD_ON_START = new UserKeyDefinition<boolean>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"requirePasswordOnStart\",\n  {\n    deserializer: (value: any) => value,\n    clearOn: [],\n  },\n);\n\n/**\n * If the user has elected to require a password on first unlock of an application instance, this key will store the\n * encrypted client key half used to unlock the vault.\n *\n * For operating systems without application-level key storage, this key half is concatenated with a signature\n * provided by the OS and used to encrypt the biometric key prior to storage.\n */\nexport const ENCRYPTED_CLIENT_KEY_HALF = new UserKeyDefinition<EncryptedString>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"clientKeyHalf\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"logout\"],\n  },\n);\n\n/**\n * Indicates the user has been warned about the security implications of using biometrics and, depending on the OS,\n * recommended to require a password on first unlock of an application instance.\n */\nexport const DISMISSED_REQUIRE_PASSWORD_ON_START_CALLOUT = new UserKeyDefinition<boolean>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"dismissedBiometricRequirePasswordOnStartCallout\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [],\n  },\n);\n\n/**\n * Stores whether the user has elected to cancel the biometric prompt. This is stored on disk due to process-reload\n * wiping memory state. We don't want to prompt the user again if they've elected to cancel.\n */\nexport const PROMPT_CANCELLED = KeyDefinition.record<boolean, UserId>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"promptCancelled\",\n  {\n    deserializer: (obj) => obj,\n  },\n);\n\n/**\n * Stores whether the user has elected to automatically prompt for biometric unlock on application start.\n */\nexport const PROMPT_AUTOMATICALLY = new UserKeyDefinition<boolean>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"promptAutomatically\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [],\n  },\n);\n\n/**\n * Stores whether or not IPC handshake has been validated this session.\n */\nexport const FINGERPRINT_VALIDATED = new KeyDefinition<boolean>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"fingerprintValidated\",\n  {\n    deserializer: (obj) => obj,\n  },\n);\n\n/**\n * Last process reload time\n */\nexport const LAST_PROCESS_RELOAD = new KeyDefinition<Date>(\n  BIOMETRIC_SETTINGS_DISK,\n  \"lastProcessReload\",\n  {\n    deserializer: (obj) => new Date(obj),\n  },\n);\n","export enum BiometricsStatus {\n  /** For the biometrics interface, this means that biometric unlock is available and can be used. Querying for the user specifically, this means that biometric can be used for to unlock this user */\n  Available,\n  /** Biometrics cannot be used, because the userkey needs to first be unlocked by the user's password, because unlock needs some volatile data that is not available on app-start */\n  UnlockNeeded,\n  /** Biometric hardware is not available (i.e laptop folded shut, sensor unplugged) */\n  HardwareUnavailable,\n  /** Only relevant for linux, this means that polkit policies need to be set up and that can happen automatically */\n  AutoSetupNeeded,\n  /** Only relevant for linux, this means that polkit policies need to be set up but that needs to be done manually */\n  ManualSetupNeeded,\n  /** Biometrics is not implemented for this platform (i.e web) */\n  PlatformUnsupported,\n  /** Browser extension cannot connect to the desktop app to use biometrics */\n  DesktopDisconnected,\n  /** Biometrics is not enabled in the desktop app/extension (current app) */\n  NotEnabledLocally,\n  /** Only on browser extension; Biometrics is not enabled in the desktop app */\n  NotEnabledInConnectedDesktopApp,\n  /** Browser extension does not have the permission to talk to the desktop app */\n  NativeMessagingPermissionMissing,\n}\n","export enum BiometricsCommands {\n  /** Perform biometric authentication for the system's user. Does not require setup, and does not return cryptographic material, only yes or no. */\n  AuthenticateWithBiometrics = \"authenticateWithBiometrics\",\n  /** Get biometric status of the system, and can be used before biometrics is set up. Only returns data about the biometrics system, not about availability of cryptographic material */\n  GetBiometricsStatus = \"getBiometricsStatus\",\n  /** Perform biometric authentication for the system's user for the given bitwarden account's credentials. This returns cryptographic material that can be used to unlock the vault. */\n  UnlockWithBiometricsForUser = \"unlockWithBiometricsForUser\",\n  /** Get biometric status for a specific user account. This includes both information about availability of cryptographic material (is the user configured for biometric unlock? is a masterpassword unlock needed? But also information about the biometric system's availability in a single status) */\n  GetBiometricsStatusForUser = \"getBiometricsStatusForUser\",\n\n  // legacy\n  Unlock = \"biometricUnlock\",\n  IsAvailable = \"biometricUnlockAvailable\",\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable, firstValueFrom, map, combineLatest } from \"rxjs\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncryptedString, EncString } from \"../../../common/src/platform/models/domain/enc-string\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ActiveUserState, GlobalState, StateProvider } from \"../../../common/src/platform/state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { UserId } from \"../../../common/src/types/guid\";\n\nimport {\n  BIOMETRIC_UNLOCK_ENABLED,\n  ENCRYPTED_CLIENT_KEY_HALF,\n  REQUIRE_PASSWORD_ON_START,\n  DISMISSED_REQUIRE_PASSWORD_ON_START_CALLOUT,\n  PROMPT_AUTOMATICALLY,\n  PROMPT_CANCELLED,\n  FINGERPRINT_VALIDATED,\n  LAST_PROCESS_RELOAD,\n} from \"./biometric.state\";\n\nexport abstract class BiometricStateService {\n  /**\n   * `true` if the currently active user has elected to store a biometric key to unlock their vault.\n   */\n  abstract biometricUnlockEnabled$: Observable<boolean>; // used to be biometricUnlock\n  /**\n   * If the user has elected to require a password on first unlock of an application instance, this key will store the\n   * encrypted client key half used to unlock the vault.\n   *\n   * Tracks the currently active user\n   */\n  abstract encryptedClientKeyHalf$: Observable<EncString | undefined>;\n  /**\n   * whether or not a password is required on first unlock after opening the application\n   *\n   * tracks the currently active user\n   */\n  abstract requirePasswordOnStart$: Observable<boolean>;\n  /**\n   * Indicates the user has been warned about the security implications of using biometrics and, depending on the OS,\n   *\n   * tracks the currently active user.\n   */\n  abstract dismissedRequirePasswordOnStartCallout$: Observable<boolean>;\n  /**\n   * Whether the user has cancelled the biometric prompt.\n   *\n   * tracks the currently active user\n   */\n  abstract promptCancelled$: Observable<boolean>;\n  /**\n   * Whether the user has elected to automatically prompt for biometrics.\n   *\n   * tracks the currently active user\n   */\n  abstract promptAutomatically$: Observable<boolean>;\n  /**\n   * Whether or not IPC fingerprint has been validated by the user this session.\n   */\n  abstract fingerprintValidated$: Observable<boolean>;\n\n  /**\n   * Updates the require password on start state for the currently active user.\n   *\n   * If false, the encrypted client key half will be removed.\n   * @param value whether or not a password is required on first unlock after opening the application\n   */\n  abstract setRequirePasswordOnStart(value: boolean): Promise<void>;\n  /**\n   * Updates the biometric unlock enabled state for the currently active user.\n   * @param enabled whether or not to store a biometric key to unlock the vault\n   */\n  abstract setBiometricUnlockEnabled(enabled: boolean): Promise<void>;\n  /**\n   * Gets the biometric unlock enabled state for the given user.\n   * @param userId user Id to check\n   */\n  abstract getBiometricUnlockEnabled(userId: UserId): Promise<boolean>;\n  abstract setEncryptedClientKeyHalf(encryptedKeyHalf: EncString, userId?: UserId): Promise<void>;\n  abstract getEncryptedClientKeyHalf(userId: UserId): Promise<EncString>;\n  abstract getRequirePasswordOnStart(userId: UserId): Promise<boolean>;\n  abstract removeEncryptedClientKeyHalf(userId: UserId): Promise<void>;\n  /**\n   * Updates the active user's state to reflect that they've been warned about requiring password on start.\n   */\n  abstract setDismissedRequirePasswordOnStartCallout(): Promise<void>;\n  /**\n   * Updates the active user's state to reflect that they've cancelled the biometric prompt.\n   */\n  abstract setUserPromptCancelled(): Promise<void>;\n  /**\n   * Resets the given user's state to reflect that they haven't cancelled the biometric prompt.\n   * @param userId the user to reset the prompt cancelled state for. If not provided, the currently active user will be used.\n   */\n  abstract resetUserPromptCancelled(userId?: UserId): Promise<void>;\n  /**\n   * Resets all user's state to reflect that they haven't cancelled the biometric prompt.\n   */\n  abstract resetAllPromptCancelled(): Promise<void>;\n  /**\n   * Updates the currently active user's setting for auto prompting for biometrics on application start and lock\n   * @param prompt Whether or not to prompt for biometrics on application start.\n   */\n  abstract setPromptAutomatically(prompt: boolean): Promise<void>;\n  /**\n   * Updates whether or not IPC has been validated by the user this session\n   * @param validated the value to save\n   */\n  abstract setFingerprintValidated(validated: boolean): Promise<void>;\n\n  abstract updateLastProcessReload(): Promise<void>;\n\n  abstract getLastProcessReload(): Promise<Date>;\n\n  abstract logout(userId: UserId): Promise<void>;\n}\n\nexport class DefaultBiometricStateService implements BiometricStateService {\n  private biometricUnlockEnabledState: ActiveUserState<boolean>;\n  private requirePasswordOnStartState: ActiveUserState<boolean>;\n  private encryptedClientKeyHalfState: ActiveUserState<EncryptedString | undefined>;\n  private dismissedRequirePasswordOnStartCalloutState: ActiveUserState<boolean>;\n  private promptCancelledState: GlobalState<Record<UserId, boolean>>;\n  private promptAutomaticallyState: ActiveUserState<boolean>;\n  private fingerprintValidatedState: GlobalState<boolean>;\n  private lastProcessReloadState: GlobalState<Date>;\n  biometricUnlockEnabled$: Observable<boolean>;\n  encryptedClientKeyHalf$: Observable<EncString | undefined>;\n  requirePasswordOnStart$: Observable<boolean>;\n  dismissedRequirePasswordOnStartCallout$: Observable<boolean>;\n  promptCancelled$: Observable<boolean>;\n  promptAutomatically$: Observable<boolean>;\n  fingerprintValidated$: Observable<boolean>;\n  lastProcessReload$: Observable<Date>;\n\n  constructor(private stateProvider: StateProvider) {\n    this.biometricUnlockEnabledState = this.stateProvider.getActive(BIOMETRIC_UNLOCK_ENABLED);\n    this.biometricUnlockEnabled$ = this.biometricUnlockEnabledState.state$.pipe(map(Boolean));\n\n    this.requirePasswordOnStartState = this.stateProvider.getActive(REQUIRE_PASSWORD_ON_START);\n    this.requirePasswordOnStart$ = this.requirePasswordOnStartState.state$.pipe(\n      map((value) => !!value),\n    );\n\n    this.encryptedClientKeyHalfState = this.stateProvider.getActive(ENCRYPTED_CLIENT_KEY_HALF);\n    this.encryptedClientKeyHalf$ = this.encryptedClientKeyHalfState.state$.pipe(\n      map(encryptedClientKeyHalfToEncString),\n    );\n\n    this.dismissedRequirePasswordOnStartCalloutState = this.stateProvider.getActive(\n      DISMISSED_REQUIRE_PASSWORD_ON_START_CALLOUT,\n    );\n    this.dismissedRequirePasswordOnStartCallout$ =\n      this.dismissedRequirePasswordOnStartCalloutState.state$.pipe(map(Boolean));\n\n    this.promptCancelledState = this.stateProvider.getGlobal(PROMPT_CANCELLED);\n    this.promptCancelled$ = combineLatest([\n      this.stateProvider.activeUserId$,\n      this.promptCancelledState.state$,\n    ]).pipe(\n      map(([userId, record]) => {\n        return record?.[userId] ?? false;\n      }),\n    );\n    this.promptAutomaticallyState = this.stateProvider.getActive(PROMPT_AUTOMATICALLY);\n    this.promptAutomatically$ = this.promptAutomaticallyState.state$.pipe(map(Boolean));\n\n    this.fingerprintValidatedState = this.stateProvider.getGlobal(FINGERPRINT_VALIDATED);\n    this.fingerprintValidated$ = this.fingerprintValidatedState.state$.pipe(map(Boolean));\n\n    this.lastProcessReloadState = this.stateProvider.getGlobal(LAST_PROCESS_RELOAD);\n    this.lastProcessReload$ = this.lastProcessReloadState.state$;\n  }\n\n  async setBiometricUnlockEnabled(enabled: boolean): Promise<void> {\n    await this.biometricUnlockEnabledState.update(() => enabled);\n  }\n\n  async getBiometricUnlockEnabled(userId: UserId): Promise<boolean> {\n    return await firstValueFrom(\n      this.stateProvider.getUser(userId, BIOMETRIC_UNLOCK_ENABLED).state$.pipe(map(Boolean)),\n    );\n  }\n\n  async setRequirePasswordOnStart(value: boolean): Promise<void> {\n    let currentActiveId: UserId;\n    await this.requirePasswordOnStartState.update(\n      (_, [userId]) => {\n        currentActiveId = userId;\n        return value;\n      },\n      {\n        combineLatestWith: this.requirePasswordOnStartState.combinedState$,\n      },\n    );\n    if (!value) {\n      await this.removeEncryptedClientKeyHalf(currentActiveId);\n    }\n  }\n\n  async setEncryptedClientKeyHalf(encryptedKeyHalf: EncString, userId?: UserId): Promise<void> {\n    const value = encryptedKeyHalf?.encryptedString ?? null;\n    if (userId) {\n      await this.stateProvider.getUser(userId, ENCRYPTED_CLIENT_KEY_HALF).update(() => value);\n    } else {\n      await this.encryptedClientKeyHalfState.update(() => value);\n    }\n  }\n\n  async removeEncryptedClientKeyHalf(userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, ENCRYPTED_CLIENT_KEY_HALF).update(() => null);\n  }\n\n  async getRequirePasswordOnStart(userId: UserId): Promise<boolean> {\n    return !!(await firstValueFrom(\n      this.stateProvider.getUser(userId, REQUIRE_PASSWORD_ON_START).state$,\n    ));\n  }\n\n  async getEncryptedClientKeyHalf(userId: UserId): Promise<EncString> {\n    return await firstValueFrom(\n      this.stateProvider\n        .getUser(userId, ENCRYPTED_CLIENT_KEY_HALF)\n        .state$.pipe(map(encryptedClientKeyHalfToEncString)),\n    );\n  }\n\n  async logout(userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, ENCRYPTED_CLIENT_KEY_HALF).update(() => null);\n    await this.resetUserPromptCancelled(userId);\n    // Persist auto prompt setting through logout\n    // Persist dismissed require password on start callout through logout\n  }\n\n  async setDismissedRequirePasswordOnStartCallout(): Promise<void> {\n    await this.dismissedRequirePasswordOnStartCalloutState.update(() => true);\n  }\n\n  async resetUserPromptCancelled(userId: UserId): Promise<void> {\n    await this.stateProvider.getGlobal(PROMPT_CANCELLED).update(\n      (data, activeUserId) => {\n        delete data[userId ?? activeUserId];\n        return data;\n      },\n      {\n        combineLatestWith: this.stateProvider.activeUserId$,\n        shouldUpdate: (data, activeUserId) => data?.[userId ?? activeUserId] != null,\n      },\n    );\n  }\n\n  async setUserPromptCancelled(): Promise<void> {\n    await this.promptCancelledState.update(\n      (record, userId) => {\n        record ??= {};\n        record[userId] = true;\n        return record;\n      },\n      {\n        combineLatestWith: this.stateProvider.activeUserId$,\n        shouldUpdate: (_, userId) => {\n          if (userId == null) {\n            throw new Error(\n              \"Cannot update biometric prompt cancelled state without an active user\",\n            );\n          }\n          return true;\n        },\n      },\n    );\n  }\n\n  async resetAllPromptCancelled(): Promise<void> {\n    await this.promptCancelledState.update(() => null);\n  }\n\n  async setPromptAutomatically(prompt: boolean): Promise<void> {\n    await this.promptAutomaticallyState.update(() => prompt);\n  }\n\n  async setFingerprintValidated(validated: boolean): Promise<void> {\n    await this.fingerprintValidatedState.update(() => validated);\n  }\n\n  async updateLastProcessReload(): Promise<void> {\n    await this.lastProcessReloadState.update(() => new Date());\n  }\n\n  async getLastProcessReload(): Promise<Date> {\n    return await firstValueFrom(this.lastProcessReload$);\n  }\n}\n\nfunction encryptedClientKeyHalfToEncString(\n  encryptedKeyHalf: EncryptedString | undefined,\n): EncString {\n  return encryptedKeyHalf == null ? null : new EncString(encryptedKeyHalf);\n}\n","import { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\n\nimport { BiometricsStatus } from \"./biometrics-status\";\n\n/**\n * The biometrics service is used to provide access to the status of and access to biometric functionality on the platforms.\n */\nexport abstract class BiometricsService {\n  supportsBiometric() {\n    throw new Error(\"Method not implemented.\");\n  }\n  /**\n   * Performs a biometric prompt, without unlocking any keys\n   * @returns true if the biometric prompt was successful, false otherwise\n   */\n  abstract authenticateWithBiometrics(): Promise<boolean>;\n\n  /**\n   * Gets the status of biometrics for the platform system states.\n   * @returns the status of biometrics\n   */\n  abstract getBiometricsStatus(): Promise<BiometricsStatus>;\n\n  /**\n   * Retrieves a userkey for the provided user, as present in the biometrics system.\n   * THIS NEEDS TO BE VERIFIED FOR RECENCY AND VALIDITY\n   * @param userId the user to unlock\n   * @returns the user key\n   */\n  abstract unlockWithBiometricsForUser(userId: UserId): Promise<UserKey | null>;\n\n  /**\n   * Gets the status of biometrics for a current user. This includes system states (hardware unavailable) but also user specific states (needs unlock with master-password).\n   * @param userId the user to check the biometrics status for\n   * @returns the status of biometrics for the user\n   */\n  abstract getBiometricsStatusForUser(userId: UserId): Promise<BiometricsStatus>;\n\n  abstract getShouldAutopromptNow(): Promise<boolean>;\n  abstract setShouldAutopromptNow(value: boolean): Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { EncryptedOrganizationKeyData } from \"@bitwarden/common/admin-console/models/data/encrypted-organization-key.data\";\nimport { KdfConfig } from \"@bitwarden/key-management\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileOrganizationResponse } from \"../../../common/src/admin-console/models/response/profile-organization.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileProviderOrganizationResponse } from \"../../../common/src/admin-console/models/response/profile-provider-organization.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileProviderResponse } from \"../../../common/src/admin-console/models/response/profile-provider.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeySuffixOptions, HashPurpose } from \"../../../common/src/platform/enums\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncryptedString, EncString } from \"../../../common/src/platform/models/domain/enc-string\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { SymmetricCryptoKey } from \"../../../common/src/platform/models/domain/symmetric-crypto-key\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { OrganizationId, UserId } from \"../../../common/src/types/guid\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport {\n  UserKey,\n  MasterKey,\n  OrgKey,\n  ProviderKey,\n  CipherKey,\n  UserPrivateKey,\n  UserPublicKey,\n} from \"../../../common/src/types/key\";\n\nexport class UserPrivateKeyDecryptionFailedError extends Error {\n  constructor() {\n    super(\"Failed to decrypt the user's private key.\");\n  }\n}\n\n/**\n * An object containing all the users key needed to decrypt a users personal and organization vaults.\n */\nexport type CipherDecryptionKeys = {\n  /**\n   * A users {@link UserKey} that is useful for decrypted ciphers in the users personal vault.\n   */\n  userKey: UserKey;\n\n  /**\n   * A users decrypted organization keys.\n   */\n  orgKeys: Record<OrganizationId, OrgKey>;\n};\n\nexport abstract class KeyService {\n  /**\n   * Retrieves a stream of the given users {@see UserKey} values. Can emit null if the user does not have a user key, e.g. the user\n   * is in a locked or logged out state.\n   * @param userId The user id of the user to get the {@see UserKey} for.\n   */\n  abstract userKey$(userId: UserId): Observable<UserKey>;\n  /**\n   * Returns the an observable key for the given user id.\n   *\n   * @note this observable represents only user keys stored in memory. A null value does not indicate that we cannot load a user key from storage.\n   * @param userId The desired user\n   */\n  abstract getInMemoryUserKeyFor$(userId: UserId): Observable<UserKey>;\n  /**\n   * Sets the provided user key and stores\n   * any other necessary versions (such as auto, biometrics,\n   * or pin)\n   *\n   * @throws when key is null. Lock the account to clear a key\n   * @param key The user key to set\n   * @param userId The desired user\n   */\n  abstract setUserKey(key: UserKey, userId?: string): Promise<void>;\n  /**\n   * Sets the provided user keys and stores any other necessary versions\n   * (such as auto, biometrics, or pin).\n   * Also sets the user's encrypted private key in storage and\n   * clears the decrypted private key from memory\n   * Note: does not clear the private key if null is provided\n   *\n   * @throws Error when userKey, encPrivateKey or userId is null\n   * @throws UserPrivateKeyDecryptionFailedError when the userKey cannot decrypt encPrivateKey\n   * @param userKey The user key to set\n   * @param encPrivateKey An encrypted private key\n   * @param userId The desired user\n   */\n  abstract setUserKeys(userKey: UserKey, encPrivateKey: string, userId: UserId): Promise<void>;\n  /**\n   * Gets the user key from memory and sets it again,\n   * kicking off a refresh of any additional keys\n   * (such as auto, biometrics, or pin)\n   */\n  abstract refreshAdditionalKeys(): Promise<void>;\n  /**\n   * Observable value that returns whether or not the currently active user has ever had auser key,\n   * i.e. has ever been unlocked/decrypted. This is key for differentiating between TDE locked and standard locked states.\n   */\n  abstract everHadUserKey$: Observable<boolean>;\n  /**\n   * Retrieves the user key\n   * @param userId The desired user\n   * @returns The user key\n   *\n   * @deprecated Use {@link userKey$} with a required {@link UserId} instead.\n   */\n  abstract getUserKey(userId?: string): Promise<UserKey>;\n\n  /**\n   * Checks if the user is using an old encryption scheme that used the master key\n   * for encryption of data instead of the user key.\n   */\n  abstract isLegacyUser(masterKey?: MasterKey, userId?: string): Promise<boolean>;\n\n  /**\n   * Use for encryption/decryption of data in order to support legacy\n   * encryption models. It will return the user key if available,\n   * if not it will return the master key.\n   *\n   * @deprecated Please provide the userId of the user you want the user key for.\n   */\n  abstract getUserKeyWithLegacySupport(): Promise<UserKey>;\n\n  /**\n   * Use for encryption/decryption of data in order to support legacy\n   * encryption models. It will return the user key if available,\n   * if not it will return the master key.\n   * @param userId The desired user\n   */\n  abstract getUserKeyWithLegacySupport(userId: UserId): Promise<UserKey>;\n  /**\n   * Retrieves the user key from storage\n   * @param keySuffix The desired version of the user's key to retrieve\n   * @param userId The desired user\n   * @returns The user key\n   */\n  abstract getUserKeyFromStorage(keySuffix: KeySuffixOptions, userId?: string): Promise<UserKey>;\n\n  /**\n   * Determines whether the user key is available for the given user.\n   * @param userId The desired user. If not provided, the active user will be used. If no active user exists, the method will return false.\n   * @returns True if the user key is available\n   */\n  abstract hasUserKey(userId?: UserId): Promise<boolean>;\n  /**\n   * Determines whether the user key is available for the given user in memory.\n   * @param userId The desired user. If not provided, the active user will be used. If no active user exists, the method will return false.\n   * @returns True if the user key is available\n   */\n  abstract hasUserKeyInMemory(userId?: string): Promise<boolean>;\n  /**\n   * @param keySuffix The desired version of the user's key to check\n   * @param userId The desired user\n   * @returns True if the provided version of the user key is stored\n   */\n  abstract hasUserKeyStored(keySuffix: KeySuffixOptions, userId?: string): Promise<boolean>;\n  /**\n   * Generates a new user key\n   * @param masterKey The user's master key\n   * @returns A new user key and the master key protected version of it\n   */\n  abstract makeUserKey(key: MasterKey): Promise<[UserKey, EncString]>;\n  /**\n   * Clears the user's stored version of the user key\n   * @param keySuffix The desired version of the key to clear\n   * @param userId The desired user\n   */\n  abstract clearStoredUserKey(keySuffix: KeySuffixOptions, userId?: string): Promise<void>;\n  /**\n   * Stores the master key encrypted user key\n   * @param userKeyMasterKey The master key encrypted user key to set\n   * @param userId The desired user\n   */\n  abstract setMasterKeyEncryptedUserKey(UserKeyMasterKey: string, userId: string): Promise<void>;\n  /**\n   * @param password The user's master password that will be used to derive a master key if one isn't found\n   * @param userId The desired user\n   */\n  abstract getOrDeriveMasterKey(password: string, userId?: string): Promise<MasterKey>;\n  /**\n   * Generates a master key from the provided password\n   * @param password The user's master password\n   * @param email The user's email\n   * @param KdfConfig The user's key derivation function configuration\n   * @returns A master key derived from the provided password\n   */\n  abstract makeMasterKey(password: string, email: string, KdfConfig: KdfConfig): Promise<MasterKey>;\n  /**\n   * Encrypts the existing (or provided) user key with the\n   * provided master key\n   * @param masterKey The user's master key\n   * @param userKey The user key\n   * @returns The user key and the master key protected version of it\n   */\n  abstract encryptUserKeyWithMasterKey(\n    masterKey: MasterKey,\n    userKey?: UserKey,\n  ): Promise<[UserKey, EncString]>;\n  /**\n   * Creates a master password hash from the user's master password. Can\n   * be used for local authentication or for server authentication depending\n   * on the hashPurpose provided.\n   * @param password The user's master password\n   * @param key The user's master key\n   * @param hashPurpose The iterations to use for the hash\n   * @returns The user's master password hash\n   */\n  abstract hashMasterKey(\n    password: string,\n    key: MasterKey,\n    hashPurpose?: HashPurpose,\n  ): Promise<string>;\n  /**\n   * Compares the provided master password to the stored password hash.\n   * @param masterPassword The user's master password\n   * @param key The user's master key\n   * @param userId The id of the user to do the operation for.\n   * @returns True if the provided master password matches either the stored\n   * key hash or the server key hash\n   */\n  abstract compareKeyHash(\n    masterPassword: string,\n    masterKey: MasterKey,\n    userId: UserId,\n  ): Promise<boolean>;\n  /**\n   * Stores the encrypted organization keys and clears any decrypted\n   * organization keys currently in memory\n   * @param orgs The organizations to set keys for\n   * @param providerOrgs The provider organizations to set keys for\n   * @param userId The user id of the user to set the org keys for\n   */\n  abstract setOrgKeys(\n    orgs: ProfileOrganizationResponse[],\n    providerOrgs: ProfileProviderOrganizationResponse[],\n    userId: UserId,\n  ): Promise<void>;\n  /**\n   * Retrieves a stream of the active users organization keys,\n   * will NOT emit any value if there is no active user.\n   *\n   * @deprecated Use {@link orgKeys$} with a required {@link UserId} instead.\n   */\n  abstract activeUserOrgKeys$: Observable<Record<OrganizationId, OrgKey>>;\n  /**\n   * Returns the organization's symmetric key\n   * @deprecated Use the observable userOrgKeys$ and `map` to the desired {@link OrgKey} instead\n   * @param orgId The desired organization\n   * @returns The organization's symmetric key\n   */\n  abstract getOrgKey(orgId: string): Promise<OrgKey>;\n  /**\n   * Uses the org key to derive a new symmetric key for encrypting data\n   * @param orgKey The organization's symmetric key\n   */\n  abstract makeDataEncKey<T extends UserKey | OrgKey>(\n    key: T,\n  ): Promise<[SymmetricCryptoKey, EncString]>;\n\n  /**\n   * Stores the provider keys for a given user.\n   * @param orgs The provider orgs for which to save the keys from.\n   * @param userId The user id of the user for which to store the keys for.\n   */\n  abstract setProviderKeys(orgs: ProfileProviderResponse[], userId: UserId): Promise<void>;\n  /**\n   * @param providerId The desired provider\n   * @returns The provider's symmetric key\n   */\n  abstract getProviderKey(providerId: string): Promise<ProviderKey>;\n  /**\n   * Creates a new organization key and encrypts it with the user's public key.\n   * This method can also return Provider keys for creating new Provider users.\n   * @returns The new encrypted org key and the decrypted key itself\n   */\n  abstract makeOrgKey<T extends OrgKey | ProviderKey>(): Promise<[EncString, T]>;\n  /**\n   * Sets the user's encrypted private key in storage and\n   * clears the decrypted private key from memory\n   * Note: does not clear the private key if null is provided\n   * @param encPrivateKey An encrypted private key\n   */\n  abstract setPrivateKey(encPrivateKey: string, userId: UserId): Promise<void>;\n  /**\n   * Returns the private key from memory. If not available, decrypts it\n   * from storage and stores it in memory\n   * @returns The user's private key\n   *\n   * @throws An error if there is no user currently active.\n   *\n   * @deprecated Use {@link userPrivateKey$} instead.\n   */\n  abstract getPrivateKey(): Promise<Uint8Array>;\n\n  /**\n   * Gets an observable stream of the given users decrypted private key, will emit null if the user\n   * doesn't have a UserKey to decrypt the encrypted private key or null if the user doesn't have an\n   * encrypted private key at all.\n   *\n   * @param userId The user id of the user to get the data for.\n   */\n  abstract userPrivateKey$(userId: UserId): Observable<UserPrivateKey>;\n\n  /**\n   * Gets an observable stream of the given users encrypted private key, will emit null if the user\n   * doesn't have an encrypted private key at all.\n   *\n   * @param userId The user id of the user to get the data for.\n   *\n   * @deprecated Temporary function to allow the SDK to be initialized after the login process, it\n   * will be removed when auth has been migrated to the SDK.\n   */\n  abstract userEncryptedPrivateKey$(userId: UserId): Observable<EncryptedString>;\n\n  /**\n   * Gets an observable stream of the given users decrypted private key with legacy support,\n   * will emit null if the user doesn't have a UserKey to decrypt the encrypted private key\n   * or null if the user doesn't have an encrypted private key at all.\n   *\n   * @param userId The user id of the user to get the data for.\n   */\n  abstract userPrivateKeyWithLegacySupport$(userId: UserId): Observable<UserPrivateKey>;\n\n  /**\n   * Generates a fingerprint phrase for the user based on their public key\n   * @param fingerprintMaterial Fingerprint material\n   * @param publicKey The user's public key\n   * @returns The user's fingerprint phrase\n   */\n  abstract getFingerprint(fingerprintMaterial: string, publicKey?: Uint8Array): Promise<string[]>;\n  /**\n   * Generates a new keypair\n   * @param key A key to encrypt the private key with. If not provided,\n   * defaults to the user key\n   * @returns A new keypair: [publicKey in Base64, encrypted privateKey]\n   * @throws If the provided key is a null-ish value.\n   */\n  abstract makeKeyPair(key: SymmetricCryptoKey): Promise<[string, EncString]>;\n  /**\n   * Clears the user's pin keys from storage\n   * Note: This will remove the stored pin and as a result,\n   * disable pin protection for the user\n   * @param userId The desired user\n   */\n  abstract clearPinKeys(userId?: string): Promise<void>;\n  /**\n   * @param keyMaterial The key material to derive the send key from\n   * @returns A new send key\n   */\n  abstract makeSendKey(keyMaterial: Uint8Array): Promise<SymmetricCryptoKey>;\n  /**\n   * Clears all of the user's keys from storage\n   * @param userId The user's Id\n   */\n  abstract clearKeys(userId?: string): Promise<any>;\n  abstract randomNumber(min: number, max: number): Promise<number>;\n  /**\n   * Generates a new cipher key\n   * @returns A new cipher key\n   */\n  abstract makeCipherKey(): Promise<CipherKey>;\n\n  /**\n   * Initialize all necessary crypto keys needed for a new account.\n   * Warning! This completely replaces any existing keys!\n   * @returns The user's newly created  public key, private key, and encrypted private key\n   *\n   * @throws An error if there is no user currently active.\n   */\n  abstract initAccount(): Promise<{\n    userKey: UserKey;\n    publicKey: string;\n    privateKey: EncString;\n  }>;\n  /**\n   * Previously, the master key was used for any additional key like the biometrics or pin key.\n   * We have switched to using the user key for these purposes. This method is for clearing the state\n   * of the older keys on logout or post migration.\n   * @param keySuffix The desired type of key to clear\n   * @param userId The desired user\n   */\n  abstract clearDeprecatedKeys(keySuffix: KeySuffixOptions, userId?: string): Promise<void>;\n\n  /**\n   * Retrieves all the keys needed for decrypting Ciphers\n   * @param userId The user id of the keys to retrieve or null if the user is not Unlocked\n   * @param legacySupport `true` if you need to support retrieving the legacy version of the users key, `false` if\n   * you do not need legacy support. Use `true` by necessity only. Defaults to `false`. Legacy support is for users\n   * that may not have updated to use the new {@link UserKey} yet.\n   *\n   * @throws If an invalid user id is passed in.\n   */\n  abstract cipherDecryptionKeys$(\n    userId: UserId,\n    legacySupport?: boolean,\n  ): Observable<CipherDecryptionKeys | null>;\n\n  /**\n   * Gets an observable of org keys for the given user.\n   * @param userId The user id of the user of which to get the keys for.\n   * @return An observable stream of the users organization keys if they are unlocked, or null if the user is not unlocked.\n   * The observable will stay alive through locks/unlocks.\n   *\n   * @throws If an invalid user id is passed in.\n   */\n  abstract orgKeys$(userId: UserId): Observable<Record<OrganizationId, OrgKey> | null>;\n\n  /**\n   * Gets an observable stream of the given users encrypted organisation keys.\n   *\n   * @param userId The user id of the user to get the data for.\n   *\n   * @deprecated Temporary function to allow the SDK to be initialized after the login process, it\n   * will be removed when auth has been migrated to the SDK.\n   */\n  abstract encryptedOrgKeys$(\n    userId: UserId,\n  ): Observable<Record<OrganizationId, EncryptedOrganizationKeyData>>;\n\n  /**\n   * Gets an observable stream of the users public key. If the user is does not have\n   * a {@link UserKey} or {@link UserPrivateKey} that is decryptable, this will emit null.\n   *\n   * @param userId The user id of the user of which to get the public key for.\n   *\n   * @throws If an invalid user id is passed in.\n   */\n  abstract userPublicKey$(userId: UserId): Observable<UserPublicKey>;\n\n  /**\n   * Validates that a userkey is correct for a given user\n   * @param key The key to validate\n   * @param userId The user id for the key\n   */\n  abstract validateUserKey(key: UserKey, userId: UserId): Promise<boolean>;\n}\n","import { EncryptService } from \"../../../platform/abstractions/encrypt.service\";\nimport { EncString } from \"../../../platform/models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../../platform/models/domain/symmetric-crypto-key\";\nimport { OrgKey, UserPrivateKey } from \"../../../types/key\";\nimport { EncryptedOrganizationKeyData } from \"../data/encrypted-organization-key.data\";\n\nexport abstract class BaseEncryptedOrganizationKey {\n  abstract get encryptedOrganizationKey(): EncString;\n\n  static fromData(data: EncryptedOrganizationKeyData) {\n    switch (data.type) {\n      case \"organization\":\n        return new EncryptedOrganizationKey(data.key);\n\n      case \"provider\":\n        return new ProviderEncryptedOrganizationKey(data.key, data.providerId);\n\n      default:\n        return null;\n    }\n  }\n\n  static isProviderEncrypted(\n    key: EncryptedOrganizationKey | ProviderEncryptedOrganizationKey,\n  ): key is ProviderEncryptedOrganizationKey {\n    return key.toData().type === \"provider\";\n  }\n}\n\nexport class EncryptedOrganizationKey implements BaseEncryptedOrganizationKey {\n  constructor(private key: string) {}\n\n  async decrypt(encryptService: EncryptService, privateKey: UserPrivateKey) {\n    const decValue = await encryptService.rsaDecrypt(this.encryptedOrganizationKey, privateKey);\n    return new SymmetricCryptoKey(decValue) as OrgKey;\n  }\n\n  get encryptedOrganizationKey() {\n    return new EncString(this.key);\n  }\n\n  toData(): EncryptedOrganizationKeyData {\n    return {\n      type: \"organization\",\n      key: this.key,\n    };\n  }\n}\n\nexport class ProviderEncryptedOrganizationKey implements BaseEncryptedOrganizationKey {\n  constructor(\n    private key: string,\n    private providerId: string,\n  ) {}\n\n  async decrypt(encryptService: EncryptService, providerKeys: Record<string, SymmetricCryptoKey>) {\n    const decValue = await encryptService.decryptToBytes(\n      new EncString(this.key),\n      providerKeys[this.providerId],\n    );\n    return new SymmetricCryptoKey(decValue) as OrgKey;\n  }\n\n  get encryptedOrganizationKey() {\n    return new EncString(this.key);\n  }\n\n  toData(): EncryptedOrganizationKeyData {\n    return {\n      type: \"provider\",\n      key: this.key,\n      providerId: this.providerId,\n    };\n  }\n}\n","import { EncryptedOrganizationKeyData } from \"../../../admin-console/models/data/encrypted-organization-key.data\";\nimport { OrganizationId } from \"../../../types/guid\";\nimport { CRYPTO_DISK, UserKeyDefinition } from \"../../state\";\n\nexport const USER_ENCRYPTED_ORGANIZATION_KEYS = UserKeyDefinition.record<\n  EncryptedOrganizationKeyData,\n  OrganizationId\n>(CRYPTO_DISK, \"organizationKeys\", {\n  deserializer: (obj) => obj,\n  clearOn: [\"logout\"],\n});\n","import { ProviderId } from \"../../../types/guid\";\nimport { EncryptedString } from \"../../models/domain/enc-string\";\nimport { CRYPTO_DISK, UserKeyDefinition } from \"../../state\";\n\nexport const USER_ENCRYPTED_PROVIDER_KEYS = UserKeyDefinition.record<EncryptedString, ProviderId>(\n  CRYPTO_DISK,\n  \"providerKeys\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"logout\"],\n  },\n);\n","import { UserKey } from \"../../../types/key\";\nimport { EncryptedString } from \"../../models/domain/enc-string\";\nimport { SymmetricCryptoKey } from \"../../models/domain/symmetric-crypto-key\";\nimport { CRYPTO_DISK, CRYPTO_MEMORY, UserKeyDefinition } from \"../../state\";\n\nexport const USER_EVER_HAD_USER_KEY = new UserKeyDefinition<boolean>(\n  CRYPTO_DISK,\n  \"everHadUserKey\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const USER_ENCRYPTED_PRIVATE_KEY = new UserKeyDefinition<EncryptedString>(\n  CRYPTO_DISK,\n  \"privateKey\",\n  {\n    deserializer: (obj) => obj,\n    clearOn: [\"logout\"],\n  },\n);\n\nexport const USER_KEY = new UserKeyDefinition<UserKey>(CRYPTO_MEMORY, \"userKey\", {\n  deserializer: (obj) => SymmetricCryptoKey.fromJSON(obj) as UserKey,\n  clearOn: [\"logout\", \"lock\"],\n});\n","export enum KdfType {\n  PBKDF2_SHA256 = 0,\n  Argon2id = 1,\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as bigInt from \"big-integer\";\nimport {\n  NEVER,\n  Observable,\n  combineLatest,\n  firstValueFrom,\n  forkJoin,\n  map,\n  of,\n  switchMap,\n} from \"rxjs\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { PinServiceAbstraction } from \"../../auth/src/common/abstractions\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncryptedOrganizationKeyData } from \"../../common/src/admin-console/models/data/encrypted-organization-key.data\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { BaseEncryptedOrganizationKey } from \"../../common/src/admin-console/models/domain/encrypted-organization-key\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileOrganizationResponse } from \"../../common/src/admin-console/models/response/profile-organization.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileProviderOrganizationResponse } from \"../../common/src/admin-console/models/response/profile-provider-organization.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ProfileProviderResponse } from \"../../common/src/admin-console/models/response/profile-provider.response\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { AccountService } from \"../../common/src/auth/abstractions/account.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { InternalMasterPasswordServiceAbstraction } from \"../../common/src/auth/abstractions/master-password.service.abstraction\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { CryptoFunctionService } from \"../../common/src/platform/abstractions/crypto-function.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncryptService } from \"../../common/src/platform/abstractions/encrypt.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeyGenerationService } from \"../../common/src/platform/abstractions/key-generation.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { LogService } from \"../../common/src/platform/abstractions/log.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { PlatformUtilsService } from \"../../common/src/platform/abstractions/platform-utils.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { StateService } from \"../../common/src/platform/abstractions/state.service\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KeySuffixOptions, HashPurpose } from \"../../common/src/platform/enums\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { convertValues } from \"../../common/src/platform/misc/convert-values\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { Utils } from \"../../common/src/platform/misc/utils\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EFFLongWordList } from \"../../common/src/platform/misc/wordlist\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { EncString, EncryptedString } from \"../../common/src/platform/models/domain/enc-string\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { SymmetricCryptoKey } from \"../../common/src/platform/models/domain/symmetric-crypto-key\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { USER_ENCRYPTED_ORGANIZATION_KEYS } from \"../../common/src/platform/services/key-state/org-keys.state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { USER_ENCRYPTED_PROVIDER_KEYS } from \"../../common/src/platform/services/key-state/provider-keys.state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport {\n  USER_ENCRYPTED_PRIVATE_KEY,\n  USER_EVER_HAD_USER_KEY,\n  USER_KEY,\n} from \"../../common/src/platform/services/key-state/user-key.state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { ActiveUserState, StateProvider } from \"../../common/src/platform/state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { VAULT_TIMEOUT } from \"../../common/src/services/vault-timeout/vault-timeout-settings.state\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { CsprngArray } from \"../../common/src/types/csprng\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { OrganizationId, ProviderId, UserId } from \"../../common/src/types/guid\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport {\n  OrgKey,\n  UserKey,\n  MasterKey,\n  ProviderKey,\n  CipherKey,\n  UserPrivateKey,\n  UserPublicKey,\n} from \"../../common/src/types/key\";\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { VaultTimeoutStringType } from \"../../common/src/types/vault-timeout.type\";\n\nimport { KdfConfigService } from \"./abstractions/kdf-config.service\";\nimport {\n  CipherDecryptionKeys,\n  KeyService as KeyServiceAbstraction,\n  UserPrivateKeyDecryptionFailedError,\n} from \"./abstractions/key.service\";\nimport { KdfConfig } from \"./models/kdf-config\";\n\nexport class DefaultKeyService implements KeyServiceAbstraction {\n  private readonly activeUserEverHadUserKey: ActiveUserState<boolean>;\n\n  readonly everHadUserKey$: Observable<boolean>;\n\n  readonly activeUserOrgKeys$: Observable<Record<OrganizationId, OrgKey>>;\n\n  constructor(\n    protected pinService: PinServiceAbstraction,\n    protected masterPasswordService: InternalMasterPasswordServiceAbstraction,\n    protected keyGenerationService: KeyGenerationService,\n    protected cryptoFunctionService: CryptoFunctionService,\n    protected encryptService: EncryptService,\n    protected platformUtilService: PlatformUtilsService,\n    protected logService: LogService,\n    protected stateService: StateService,\n    protected accountService: AccountService,\n    protected stateProvider: StateProvider,\n    protected kdfConfigService: KdfConfigService,\n  ) {\n    // User Key\n    this.activeUserEverHadUserKey = stateProvider.getActive(USER_EVER_HAD_USER_KEY);\n    this.everHadUserKey$ = this.activeUserEverHadUserKey.state$.pipe(map((x) => x ?? false));\n\n    this.activeUserOrgKeys$ = this.stateProvider.activeUserId$.pipe(\n      switchMap((userId) => (userId != null ? this.orgKeys$(userId) : NEVER)),\n    );\n  }\n\n  async setUserKey(key: UserKey, userId: UserId): Promise<void> {\n    if (key == null) {\n      throw new Error(\"No key provided. Lock the user to clear the key\");\n    }\n    if (userId == null) {\n      throw new Error(\"No userId provided.\");\n    }\n\n    // Set userId to ensure we have one for the account status update\n    await this.stateProvider.setUserState(USER_KEY, key, userId);\n    await this.stateProvider.setUserState(USER_EVER_HAD_USER_KEY, true, userId);\n\n    await this.storeAdditionalKeys(key, userId);\n  }\n\n  async setUserKeys(\n    userKey: UserKey,\n    encPrivateKey: EncryptedString,\n    userId: UserId,\n  ): Promise<void> {\n    if (userKey == null) {\n      throw new Error(\"No userKey provided. Lock the user to clear the key\");\n    }\n    if (encPrivateKey == null) {\n      throw new Error(\"No encPrivateKey provided.\");\n    }\n    if (userId == null) {\n      throw new Error(\"No userId provided.\");\n    }\n\n    const decryptedPrivateKey = await this.decryptPrivateKey(encPrivateKey, userKey);\n    if (decryptedPrivateKey == null) {\n      throw new UserPrivateKeyDecryptionFailedError();\n    }\n\n    await this.setUserKey(userKey, userId);\n    await this.setPrivateKey(encPrivateKey, userId);\n  }\n\n  async refreshAdditionalKeys(): Promise<void> {\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (activeUserId == null) {\n      throw new Error(\"Can only refresh keys while there is an active user.\");\n    }\n\n    const key = await this.getUserKey(activeUserId);\n    await this.setUserKey(key, activeUserId);\n  }\n\n  getInMemoryUserKeyFor$(userId: UserId): Observable<UserKey> {\n    return this.stateProvider.getUserState$(USER_KEY, userId);\n  }\n\n  async getUserKey(userId?: UserId): Promise<UserKey> {\n    const userKey = await firstValueFrom(this.stateProvider.getUserState$(USER_KEY, userId));\n    return userKey;\n  }\n\n  async isLegacyUser(masterKey?: MasterKey, userId?: UserId): Promise<boolean> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    masterKey ??= await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n\n    return await this.validateUserKey(masterKey as unknown as UserKey, userId);\n  }\n\n  // TODO: legacy support for user key is no longer needed since we require users to migrate on login\n  async getUserKeyWithLegacySupport(userId?: UserId): Promise<UserKey> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n    const userKey = await this.getUserKey(userId);\n    if (userKey) {\n      return userKey;\n    }\n\n    // Legacy support: encryption used to be done with the master key (derived from master password).\n    // Users who have not migrated will have a null user key and must use the master key instead.\n    const masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    return masterKey as unknown as UserKey;\n  }\n\n  async getUserKeyFromStorage(keySuffix: KeySuffixOptions, userId?: UserId): Promise<UserKey> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    const userKey = await this.getKeyFromStorage(keySuffix, userId);\n    if (userKey) {\n      if (!(await this.validateUserKey(userKey, userId))) {\n        this.logService.warning(\"Invalid key, throwing away stored keys\");\n        await this.clearAllStoredUserKeys(userId);\n      }\n      return userKey;\n    }\n  }\n\n  async hasUserKey(userId?: UserId): Promise<boolean> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    if (userId == null) {\n      return false;\n    }\n    return await this.hasUserKeyInMemory(userId);\n  }\n\n  async hasUserKeyInMemory(userId?: UserId): Promise<boolean> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    if (userId == null) {\n      return false;\n    }\n\n    return (await firstValueFrom(this.stateProvider.getUserState$(USER_KEY, userId))) != null;\n  }\n\n  async hasUserKeyStored(keySuffix: KeySuffixOptions, userId?: UserId): Promise<boolean> {\n    return (await this.getKeyFromStorage(keySuffix, userId)) != null;\n  }\n\n  async makeUserKey(masterKey: MasterKey): Promise<[UserKey, EncString]> {\n    if (!masterKey) {\n      const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n      masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    }\n    if (masterKey == null) {\n      throw new Error(\"No Master Key found.\");\n    }\n\n    const newUserKey = await this.keyGenerationService.createKey(512);\n    return this.buildProtectedSymmetricKey(masterKey, newUserKey.key);\n  }\n\n  /**\n   * Clears the user key. Clears all stored versions of the user keys as well, such as the biometrics key\n   * @param userId The desired user\n   */\n  private async clearUserKey(userId: UserId): Promise<void> {\n    if (userId == null) {\n      // nothing to do\n      return;\n    }\n    // Set userId to ensure we have one for the account status update\n    await this.stateProvider.setUserState(USER_KEY, null, userId);\n    await this.clearAllStoredUserKeys(userId);\n  }\n\n  async clearStoredUserKey(keySuffix: KeySuffixOptions, userId?: UserId): Promise<void> {\n    if (keySuffix === KeySuffixOptions.Auto) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.clearDeprecatedKeys(KeySuffixOptions.Auto, userId);\n    }\n    if (keySuffix === KeySuffixOptions.Pin) {\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n      // FIXME: Verify that this floating promise is intentional. If it is, add an explanatory comment and ensure there is proper error handling.\n      // eslint-disable-next-line @typescript-eslint/no-floating-promises\n      this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n    }\n  }\n\n  async setMasterKeyEncryptedUserKey(userKeyMasterKey: string, userId: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    await this.masterPasswordService.setMasterKeyEncryptedUserKey(\n      new EncString(userKeyMasterKey),\n      userId,\n    );\n  }\n\n  // TODO: Move to MasterPasswordService\n  async getOrDeriveMasterKey(password: string, userId?: UserId) {\n    const [resolvedUserId, email] = await firstValueFrom(\n      combineLatest([this.accountService.activeAccount$, this.accountService.accounts$]).pipe(\n        map(([activeAccount, accounts]) => {\n          userId ??= activeAccount?.id;\n          return [userId, accounts[userId]?.email];\n        }),\n      ),\n    );\n    let masterKey = await firstValueFrom(this.masterPasswordService.masterKey$(resolvedUserId));\n    return (masterKey ||= await this.makeMasterKey(\n      password,\n      email,\n      await this.kdfConfigService.getKdfConfig(),\n    ));\n  }\n\n  /**\n   * Derive a master key from a password and email.\n   *\n   * @remarks\n   * Does not validate the kdf config to ensure it satisfies the minimum requirements for the given kdf type.\n   * TODO: Move to MasterPasswordService\n   */\n  async makeMasterKey(password: string, email: string, KdfConfig: KdfConfig): Promise<MasterKey> {\n    return (await this.keyGenerationService.deriveKeyFromPassword(\n      password,\n      email,\n      KdfConfig,\n    )) as MasterKey;\n  }\n\n  async encryptUserKeyWithMasterKey(\n    masterKey: MasterKey,\n    userKey?: UserKey,\n  ): Promise<[UserKey, EncString]> {\n    userKey ||= await this.getUserKey();\n    return await this.buildProtectedSymmetricKey(masterKey, userKey.key);\n  }\n\n  // TODO: move to MasterPasswordService\n  async hashMasterKey(\n    password: string,\n    key: MasterKey,\n    hashPurpose?: HashPurpose,\n  ): Promise<string> {\n    if (!key) {\n      const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n      key = await firstValueFrom(this.masterPasswordService.masterKey$(userId));\n    }\n\n    if (password == null || key == null) {\n      throw new Error(\"Invalid parameters.\");\n    }\n\n    const iterations = hashPurpose === HashPurpose.LocalAuthorization ? 2 : 1;\n    const hash = await this.cryptoFunctionService.pbkdf2(key.key, password, \"sha256\", iterations);\n    return Utils.fromBufferToB64(hash);\n  }\n\n  // TODO: move to MasterPasswordService\n  async compareKeyHash(\n    masterPassword: string,\n    masterKey: MasterKey,\n    userId: UserId,\n  ): Promise<boolean> {\n    if (masterKey == null) {\n      throw new Error(\"'masterKey' is required to be non-null.\");\n    }\n\n    if (masterPassword == null) {\n      // If they don't give us a master password, we can't hash it, and therefore\n      // it will never match what we have stored.\n      return false;\n    }\n\n    // Retrieve the current password hash\n    const storedPasswordHash = await firstValueFrom(\n      this.masterPasswordService.masterKeyHash$(userId),\n    );\n\n    if (storedPasswordHash == null) {\n      return false;\n    }\n\n    // Hash the key for local use\n    const localKeyHash = await this.hashMasterKey(\n      masterPassword,\n      masterKey,\n      HashPurpose.LocalAuthorization,\n    );\n\n    // Check if the stored hash is already equal to the hash we create locally\n    if (localKeyHash == null || storedPasswordHash !== localKeyHash) {\n      return false;\n    }\n\n    return true;\n  }\n\n  async setOrgKeys(\n    orgs: ProfileOrganizationResponse[],\n    providerOrgs: ProfileProviderOrganizationResponse[],\n    userId: UserId,\n  ): Promise<void> {\n    await this.stateProvider.getUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS).update(() => {\n      const encOrgKeyData: { [orgId: string]: EncryptedOrganizationKeyData } = {};\n\n      orgs.forEach((org) => {\n        encOrgKeyData[org.id] = {\n          type: \"organization\",\n          key: org.key,\n        };\n      });\n\n      providerOrgs.forEach((org) => {\n        encOrgKeyData[org.id] = {\n          type: \"provider\",\n          providerId: org.providerId,\n          key: org.key,\n        };\n      });\n      return encOrgKeyData;\n    });\n  }\n\n  async getOrgKey(orgId: OrganizationId): Promise<OrgKey> {\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n    if (activeUserId == null) {\n      throw new Error(\"A user must be active to retrieve an org key\");\n    }\n    const orgKeys = await firstValueFrom(this.orgKeys$(activeUserId));\n    return orgKeys[orgId];\n  }\n\n  async makeDataEncKey<T extends OrgKey | UserKey>(\n    key: T,\n  ): Promise<[SymmetricCryptoKey, EncString]> {\n    if (key == null) {\n      throw new Error(\"No key provided\");\n    }\n\n    const newSymKey = await this.keyGenerationService.createKey(512);\n    return this.buildProtectedSymmetricKey(key, newSymKey.key);\n  }\n\n  private async clearOrgKeys(userId: UserId): Promise<void> {\n    if (userId == null) {\n      // nothing to do\n      return;\n    }\n    await this.stateProvider.setUserState(USER_ENCRYPTED_ORGANIZATION_KEYS, null, userId);\n  }\n\n  async setProviderKeys(providers: ProfileProviderResponse[], userId: UserId): Promise<void> {\n    await this.stateProvider.getUser(userId, USER_ENCRYPTED_PROVIDER_KEYS).update(() => {\n      const encProviderKeys: { [providerId: ProviderId]: EncryptedString } = {};\n\n      providers.forEach((provider) => {\n        encProviderKeys[provider.id as ProviderId] = provider.key as EncryptedString;\n      });\n\n      return encProviderKeys;\n    });\n  }\n\n  // TODO: Deprecate in favor of observable\n  async getProviderKey(providerId: ProviderId): Promise<ProviderKey> {\n    if (providerId == null) {\n      return null;\n    }\n\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n    const providerKeys = await firstValueFrom(this.providerKeys$(activeUserId));\n\n    return providerKeys[providerId] ?? null;\n  }\n\n  private async clearProviderKeys(userId: UserId): Promise<void> {\n    if (userId == null) {\n      // nothing to do\n      return;\n    }\n    await this.stateProvider.setUserState(USER_ENCRYPTED_PROVIDER_KEYS, null, userId);\n  }\n\n  // TODO: Make userId required\n  async makeOrgKey<T extends OrgKey | ProviderKey>(userId?: UserId): Promise<[EncString, T]> {\n    const shareKey = await this.keyGenerationService.createKey(512);\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n    const publicKey = await firstValueFrom(this.userPublicKey$(userId));\n    const encShareKey = await this.encryptService.rsaEncrypt(shareKey.key, publicKey);\n    return [encShareKey, shareKey as T];\n  }\n\n  async setPrivateKey(encPrivateKey: EncryptedString, userId: UserId): Promise<void> {\n    if (encPrivateKey == null) {\n      return;\n    }\n\n    await this.stateProvider\n      .getUser(userId, USER_ENCRYPTED_PRIVATE_KEY)\n      .update(() => encPrivateKey);\n  }\n\n  async getPrivateKey(): Promise<Uint8Array> {\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (activeUserId == null) {\n      throw new Error(\"User must be active while attempting to retrieve private key.\");\n    }\n\n    return await firstValueFrom(this.userPrivateKey$(activeUserId));\n  }\n\n  // TODO: Make public key required\n  async getFingerprint(fingerprintMaterial: string, publicKey?: Uint8Array): Promise<string[]> {\n    if (publicKey == null) {\n      const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n      publicKey = await firstValueFrom(this.userPublicKey$(activeUserId));\n    }\n\n    if (publicKey === null) {\n      throw new Error(\"No public key available.\");\n    }\n    const keyFingerprint = await this.cryptoFunctionService.hash(publicKey, \"sha256\");\n    const userFingerprint = await this.cryptoFunctionService.hkdfExpand(\n      keyFingerprint,\n      fingerprintMaterial,\n      32,\n      \"sha256\",\n    );\n    return this.hashPhrase(userFingerprint);\n  }\n\n  async makeKeyPair(key: SymmetricCryptoKey): Promise<[string, EncString]> {\n    if (key == null) {\n      throw new Error(\"'key' is a required parameter and must be non-null.\");\n    }\n\n    const keyPair = await this.cryptoFunctionService.rsaGenerateKeyPair(2048);\n    const publicB64 = Utils.fromBufferToB64(keyPair[0]);\n    const privateEnc = await this.encryptService.encrypt(keyPair[1], key);\n    return [publicB64, privateEnc];\n  }\n\n  /**\n   * Clears the user's key pair\n   * @param userId The desired user\n   */\n  private async clearKeyPair(userId: UserId): Promise<void[]> {\n    if (userId == null) {\n      // nothing to do\n      return;\n    }\n\n    await this.stateProvider.setUserState(USER_ENCRYPTED_PRIVATE_KEY, null, userId);\n  }\n\n  async clearPinKeys(userId?: UserId): Promise<void> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (userId == null) {\n      throw new Error(\"Cannot clear PIN keys, no user Id resolved.\");\n    }\n\n    await this.pinService.clearPinKeyEncryptedUserKeyPersistent(userId);\n    await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n    await this.pinService.clearUserKeyEncryptedPin(userId);\n    await this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n  }\n\n  async makeSendKey(keyMaterial: CsprngArray): Promise<SymmetricCryptoKey> {\n    return await this.keyGenerationService.deriveKeyFromMaterial(\n      keyMaterial,\n      \"bitwarden-send\",\n      \"send\",\n    );\n  }\n\n  async makeCipherKey(): Promise<CipherKey> {\n    return (await this.keyGenerationService.createKey(512)) as CipherKey;\n  }\n\n  async clearKeys(userId?: UserId): Promise<any> {\n    userId ??= await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (userId == null) {\n      throw new Error(\"Cannot clear keys, no user Id resolved.\");\n    }\n\n    await this.masterPasswordService.clearMasterKeyHash(userId);\n    await this.clearUserKey(userId);\n    await this.clearOrgKeys(userId);\n    await this.clearProviderKeys(userId);\n    await this.clearKeyPair(userId);\n    await this.clearPinKeys(userId);\n    await this.stateProvider.setUserState(USER_EVER_HAD_USER_KEY, null, userId);\n  }\n\n  // EFForg/OpenWireless\n  // ref https://github.com/EFForg/OpenWireless/blob/master/app/js/diceware.js\n  async randomNumber(min: number, max: number): Promise<number> {\n    let rval = 0;\n    const range = max - min + 1;\n    const bitsNeeded = Math.ceil(Math.log2(range));\n    if (bitsNeeded > 53) {\n      throw new Error(\"We cannot generate numbers larger than 53 bits.\");\n    }\n\n    const bytesNeeded = Math.ceil(bitsNeeded / 8);\n    const mask = Math.pow(2, bitsNeeded) - 1;\n    // 7776 -> (2^13 = 8192) -1 == 8191 or 0x00001111 11111111\n\n    // Fill a byte array with N random numbers\n    const byteArray = new Uint8Array(await this.cryptoFunctionService.randomBytes(bytesNeeded));\n\n    let p = (bytesNeeded - 1) * 8;\n    for (let i = 0; i < bytesNeeded; i++) {\n      rval += byteArray[i] * Math.pow(2, p);\n      p -= 8;\n    }\n\n    // Use & to apply the mask and reduce the number of recursive lookups\n    rval = rval & mask;\n\n    if (rval >= range) {\n      // Integer out of acceptable range\n      return this.randomNumber(min, max);\n    }\n\n    // Return an integer that falls within the range\n    return min + rval;\n  }\n\n  // ---HELPERS---\n  async validateUserKey(key: UserKey, userId: UserId): Promise<boolean> {\n    if (!key) {\n      return false;\n    }\n\n    try {\n      const encPrivateKey = await firstValueFrom(\n        this.stateProvider.getUser(userId, USER_ENCRYPTED_PRIVATE_KEY).state$,\n      );\n\n      if (encPrivateKey == null) {\n        return false;\n      }\n\n      // Can decrypt private key\n      const privateKey = await this.decryptPrivateKey(encPrivateKey, key);\n\n      if (privateKey == null) {\n        // failed to decrypt\n        return false;\n      }\n\n      // Can successfully derive public key\n      const publicKey = await this.derivePublicKey(privateKey);\n\n      if (publicKey == null) {\n        // failed to decrypt\n        return false;\n      }\n    } catch (e) {\n      return false;\n    }\n\n    return true;\n  }\n\n  /**\n   * Initialize all necessary crypto keys needed for a new account.\n   * Warning! This completely replaces any existing keys!\n   */\n  async initAccount(): Promise<{\n    userKey: UserKey;\n    publicKey: string;\n    privateKey: EncString;\n  }> {\n    const activeUserId = await firstValueFrom(this.stateProvider.activeUserId$);\n\n    if (activeUserId == null) {\n      throw new Error(\"Cannot initilize an account if one is not active.\");\n    }\n\n    // Verify user key doesn't exist\n    const existingUserKey = await this.getUserKey(activeUserId);\n\n    if (existingUserKey != null) {\n      this.logService.error(\"Tried to initialize account with existing user key.\");\n      throw new Error(\"Cannot initialize account, keys already exist.\");\n    }\n\n    const userKey = (await this.keyGenerationService.createKey(512)) as UserKey;\n    const [publicKey, privateKey] = await this.makeKeyPair(userKey);\n    await this.setUserKey(userKey, activeUserId);\n    await this.stateProvider\n      .getUser(activeUserId, USER_ENCRYPTED_PRIVATE_KEY)\n      .update(() => privateKey.encryptedString);\n\n    return {\n      userKey,\n      publicKey,\n      privateKey,\n    };\n  }\n\n  /**\n   * Generates any additional keys if needed. Additional keys are\n   * keys such as biometrics, auto, and pin keys.\n   * Useful to make sure other keys stay in sync when the user key\n   * has been rotated.\n   * @param key The user key\n   * @param userId The desired user\n   */\n  protected async storeAdditionalKeys(key: UserKey, userId: UserId) {\n    const storeAuto = await this.shouldStoreKey(KeySuffixOptions.Auto, userId);\n    if (storeAuto) {\n      await this.stateService.setUserKeyAutoUnlock(key.keyB64, { userId: userId });\n    } else {\n      await this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n    }\n    await this.clearDeprecatedKeys(KeySuffixOptions.Auto, userId);\n\n    const storePin = await this.shouldStoreKey(KeySuffixOptions.Pin, userId);\n    if (storePin) {\n      // Decrypt userKeyEncryptedPin with user key\n      const pin = await this.encryptService.decryptToUtf8(\n        await this.pinService.getUserKeyEncryptedPin(userId),\n        key,\n      );\n\n      const pinKeyEncryptedUserKey = await this.pinService.createPinKeyEncryptedUserKey(\n        pin,\n        key,\n        userId,\n      );\n      const noPreExistingPersistentKey =\n        (await this.pinService.getPinKeyEncryptedUserKeyPersistent(userId)) == null;\n\n      await this.pinService.storePinKeyEncryptedUserKey(\n        pinKeyEncryptedUserKey,\n        noPreExistingPersistentKey,\n        userId,\n      );\n      // We can't always clear deprecated keys because the pin is only\n      // migrated once used to unlock\n      await this.clearDeprecatedKeys(KeySuffixOptions.Pin, userId);\n    } else {\n      await this.pinService.clearPinKeyEncryptedUserKeyPersistent(userId);\n      await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n    }\n  }\n\n  protected async shouldStoreKey(keySuffix: KeySuffixOptions, userId?: UserId) {\n    let shouldStoreKey = false;\n    switch (keySuffix) {\n      case KeySuffixOptions.Auto: {\n        // TODO: Sharing the UserKeyDefinition is temporary to get around a circ dep issue between\n        // the VaultTimeoutSettingsSvc and this service.\n        // This should be fixed as part of the PM-7082 - Auto Key Service work.\n        const vaultTimeout = await firstValueFrom(\n          this.stateProvider.getUserState$(VAULT_TIMEOUT, userId),\n        );\n\n        shouldStoreKey = vaultTimeout == VaultTimeoutStringType.Never;\n        break;\n      }\n      case KeySuffixOptions.Pin: {\n        const userKeyEncryptedPin = await this.pinService.getUserKeyEncryptedPin(userId);\n        shouldStoreKey = !!userKeyEncryptedPin;\n        break;\n      }\n    }\n    return shouldStoreKey;\n  }\n\n  protected async getKeyFromStorage(\n    keySuffix: KeySuffixOptions,\n    userId?: UserId,\n  ): Promise<UserKey> {\n    if (keySuffix === KeySuffixOptions.Auto) {\n      const userKey = await this.stateService.getUserKeyAutoUnlock({ userId: userId });\n      if (userKey) {\n        return new SymmetricCryptoKey(Utils.fromB64ToArray(userKey)) as UserKey;\n      }\n    }\n    return null;\n  }\n\n  protected async clearAllStoredUserKeys(userId?: UserId): Promise<void> {\n    await this.stateService.setUserKeyAutoUnlock(null, { userId: userId });\n    await this.pinService.clearPinKeyEncryptedUserKeyEphemeral(userId);\n  }\n\n  private async hashPhrase(hash: Uint8Array, minimumEntropy = 64) {\n    const entropyPerWord = Math.log(EFFLongWordList.length) / Math.log(2);\n    let numWords = Math.ceil(minimumEntropy / entropyPerWord);\n\n    const hashArr = Array.from(new Uint8Array(hash));\n    const entropyAvailable = hashArr.length * 4;\n    if (numWords * entropyPerWord > entropyAvailable) {\n      throw new Error(\"Output entropy of hash function is too small\");\n    }\n\n    const phrase: string[] = [];\n    let hashNumber = bigInt.fromArray(hashArr, 256);\n    while (numWords--) {\n      const remainder = hashNumber.mod(EFFLongWordList.length);\n      hashNumber = hashNumber.divide(EFFLongWordList.length);\n      phrase.push(EFFLongWordList[remainder as any]);\n    }\n    return phrase;\n  }\n\n  private async buildProtectedSymmetricKey<T extends SymmetricCryptoKey>(\n    encryptionKey: SymmetricCryptoKey,\n    newSymKey: Uint8Array,\n  ): Promise<[T, EncString]> {\n    let protectedSymKey: EncString = null;\n    if (encryptionKey.key.byteLength === 32) {\n      const stretchedEncryptionKey = await this.keyGenerationService.stretchKey(encryptionKey);\n      protectedSymKey = await this.encryptService.encrypt(newSymKey, stretchedEncryptionKey);\n    } else if (encryptionKey.key.byteLength === 64) {\n      protectedSymKey = await this.encryptService.encrypt(newSymKey, encryptionKey);\n    } else {\n      throw new Error(\"Invalid key size.\");\n    }\n    return [new SymmetricCryptoKey(newSymKey) as T, protectedSymKey];\n  }\n\n  // --LEGACY METHODS--\n  // We previously used the master key for additional keys, but now we use the user key.\n  // These methods support migrating the old keys to the new ones.\n  // TODO: Remove after 2023.10 release (https://bitwarden.atlassian.net/browse/PM-3475)\n\n  async clearDeprecatedKeys(keySuffix: KeySuffixOptions, userId?: UserId) {\n    if (keySuffix === KeySuffixOptions.Auto) {\n      await this.stateService.setCryptoMasterKeyAuto(null, { userId: userId });\n    } else if (keySuffix === KeySuffixOptions.Pin) {\n      await this.pinService.clearOldPinKeyEncryptedMasterKey(userId);\n    }\n  }\n\n  userKey$(userId: UserId): Observable<UserKey> {\n    return this.stateProvider.getUser(userId, USER_KEY).state$;\n  }\n\n  private userKeyWithLegacySupport$(userId: UserId) {\n    return this.userKey$(userId).pipe(\n      switchMap((userKey) => {\n        if (userKey != null) {\n          return of(userKey);\n        }\n\n        // Legacy path\n        return this.masterPasswordService.masterKey$(userId).pipe(\n          switchMap(async (masterKey) => {\n            if (!(await this.validateUserKey(masterKey as unknown as UserKey, userId))) {\n              // We don't have a UserKey or a valid MasterKey\n              return null;\n            }\n\n            // The master key is valid meaning, the org keys and such are encrypted with this key\n            return masterKey as unknown as UserKey;\n          }),\n        );\n      }),\n    );\n  }\n\n  userPublicKey$(userId: UserId) {\n    return this.userPrivateKey$(userId).pipe(\n      switchMap(async (pk) => await this.derivePublicKey(pk)),\n    );\n  }\n\n  private async derivePublicKey(privateKey: UserPrivateKey) {\n    if (privateKey == null) {\n      return null;\n    }\n\n    return (await this.cryptoFunctionService.rsaExtractPublicKey(privateKey)) as UserPublicKey;\n  }\n\n  userPrivateKey$(userId: UserId): Observable<UserPrivateKey> {\n    return this.userPrivateKeyHelper$(userId, false).pipe(map((keys) => keys?.userPrivateKey));\n  }\n\n  userEncryptedPrivateKey$(userId: UserId): Observable<EncryptedString> {\n    return this.stateProvider.getUser(userId, USER_ENCRYPTED_PRIVATE_KEY).state$;\n  }\n\n  userPrivateKeyWithLegacySupport$(userId: UserId): Observable<UserPrivateKey> {\n    return this.userPrivateKeyHelper$(userId, true).pipe(map((keys) => keys?.userPrivateKey));\n  }\n\n  private userPrivateKeyHelper$(userId: UserId, legacySupport: boolean) {\n    const userKey$ = legacySupport ? this.userKeyWithLegacySupport$(userId) : this.userKey$(userId);\n    return userKey$.pipe(\n      switchMap((userKey) => {\n        if (userKey == null) {\n          return of(null);\n        }\n\n        return this.stateProvider.getUser(userId, USER_ENCRYPTED_PRIVATE_KEY).state$.pipe(\n          switchMap(\n            async (encryptedPrivateKey) =>\n              await this.decryptPrivateKey(encryptedPrivateKey, userKey),\n          ),\n          // Combine outerscope info with user private key\n          map((userPrivateKey) => ({\n            userKey,\n            userPrivateKey,\n          })),\n        );\n      }),\n    );\n  }\n\n  private async decryptPrivateKey(encryptedPrivateKey: EncryptedString, key: SymmetricCryptoKey) {\n    if (encryptedPrivateKey == null) {\n      return null;\n    }\n\n    return (await this.encryptService.decryptToBytes(\n      new EncString(encryptedPrivateKey),\n      key,\n      \"Content: Encrypted Private Key\",\n    )) as UserPrivateKey;\n  }\n\n  providerKeys$(userId: UserId) {\n    return this.userPrivateKey$(userId).pipe(\n      switchMap((userPrivateKey) => {\n        if (userPrivateKey == null) {\n          return of(null);\n        }\n\n        return this.providerKeysHelper$(userId, userPrivateKey);\n      }),\n    );\n  }\n\n  /**\n   * A helper for decrypting provider keys that requires a user id and that users decrypted private key\n   * this is helpful for when you may have already grabbed the user private key and don't want to redo\n   * that work to get the provider keys.\n   */\n  private providerKeysHelper$(\n    userId: UserId,\n    userPrivateKey: UserPrivateKey,\n  ): Observable<Record<ProviderId, ProviderKey>> {\n    return this.stateProvider.getUser(userId, USER_ENCRYPTED_PROVIDER_KEYS).state$.pipe(\n      // Convert each value in the record to it's own decryption observable\n      convertValues(async (_, value) => {\n        const decrypted = await this.encryptService.rsaDecrypt(\n          new EncString(value),\n          userPrivateKey,\n        );\n        return new SymmetricCryptoKey(decrypted) as ProviderKey;\n      }),\n      // switchMap since there are no side effects\n      switchMap((encryptedProviderKeys) => {\n        if (encryptedProviderKeys == null) {\n          return of(null);\n        }\n\n        // Can't give an empty record to forkJoin\n        if (Object.keys(encryptedProviderKeys).length === 0) {\n          return of({});\n        }\n\n        return forkJoin(encryptedProviderKeys);\n      }),\n    );\n  }\n\n  orgKeys$(userId: UserId): Observable<Record<OrganizationId, OrgKey> | null> {\n    return this.cipherDecryptionKeys$(userId, true).pipe(map((keys) => keys?.orgKeys));\n  }\n\n  encryptedOrgKeys$(\n    userId: UserId,\n  ): Observable<Record<OrganizationId, EncryptedOrganizationKeyData>> {\n    return this.stateProvider.getUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS).state$;\n  }\n\n  cipherDecryptionKeys$(\n    userId: UserId,\n    legacySupport: boolean = false,\n  ): Observable<CipherDecryptionKeys | null> {\n    return this.userPrivateKeyHelper$(userId, legacySupport).pipe(\n      switchMap((userKeys) => {\n        if (userKeys == null) {\n          return of(null);\n        }\n\n        const userPrivateKey = userKeys.userPrivateKey;\n\n        if (userPrivateKey == null) {\n          // We can't do any org based decryption\n          return of({ userKey: userKeys.userKey, orgKeys: null });\n        }\n\n        return combineLatest([\n          this.stateProvider.getUser(userId, USER_ENCRYPTED_ORGANIZATION_KEYS).state$,\n          this.providerKeysHelper$(userId, userPrivateKey),\n        ]).pipe(\n          switchMap(async ([encryptedOrgKeys, providerKeys]) => {\n            const result: Record<OrganizationId, OrgKey> = {};\n            for (const orgId of Object.keys(encryptedOrgKeys ?? {}) as OrganizationId[]) {\n              if (result[orgId] != null) {\n                continue;\n              }\n              const encrypted = BaseEncryptedOrganizationKey.fromData(encryptedOrgKeys[orgId]);\n\n              let decrypted: OrgKey;\n\n              if (BaseEncryptedOrganizationKey.isProviderEncrypted(encrypted)) {\n                decrypted = await encrypted.decrypt(this.encryptService, providerKeys);\n              } else {\n                decrypted = await encrypted.decrypt(this.encryptService, userPrivateKey);\n              }\n\n              result[orgId] = decrypted;\n            }\n\n            return result;\n          }),\n          // Combine them back together\n          map((orgKeys) => ({ userKey: userKeys.userKey, orgKeys: orgKeys })),\n        );\n      }),\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ObservableInput, OperatorFunction, map } from \"rxjs\";\n\n/**\n * Converts a record of keys and values into a record preserving the original key and converting each value into an {@link ObservableInput}.\n * @param project A function to project a given key and value pair into an {@link ObservableInput}\n */\nexport function convertValues<TKey extends PropertyKey, TInput, TOutput>(\n  project: (key: TKey, value: TInput) => ObservableInput<TOutput>,\n): OperatorFunction<Record<TKey, TInput>, Record<TKey, ObservableInput<TOutput>>> {\n  return map((inputRecord) => {\n    if (inputRecord == null) {\n      return null;\n    }\n\n    // Can't use TKey in here, have to use `PropertyKey`\n    const result: Record<PropertyKey, ObservableInput<TOutput>> = {};\n    for (const [key, value] of Object.entries(inputRecord) as [TKey, TInput][]) {\n      result[key] = project(key, value);\n    }\n\n    return result;\n  });\n}\n","/**\n * A range with a default value.\n *\n * Enforces constraints to ensure min > default > max.\n */\nexport class RangeWithDefault {\n  constructor(\n    readonly min: number,\n    readonly max: number,\n    readonly defaultValue: number,\n  ) {\n    if (min > max) {\n      throw new Error(`${min} is greater than ${max}.`);\n    }\n\n    if (this.inRange(defaultValue) === false) {\n      throw new Error(\"Default value is not in range.\");\n    }\n  }\n\n  inRange(value: number): boolean {\n    return value >= this.min && value <= this.max;\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { RangeWithDefault } from \"../../../common/src/platform/misc/range-with-default\";\nimport { KdfType } from \"../enums/kdf-type.enum\";\n\n/**\n * Represents a type safe KDF configuration.\n */\nexport type KdfConfig = PBKDF2KdfConfig | Argon2KdfConfig;\n\n/**\n * Password-Based Key Derivation Function 2 (PBKDF2) KDF configuration.\n */\nexport class PBKDF2KdfConfig {\n  static ITERATIONS = new RangeWithDefault(600_000, 2_000_000, 600_000);\n  static PRELOGIN_ITERATIONS_MIN = 5000;\n  kdfType: KdfType.PBKDF2_SHA256 = KdfType.PBKDF2_SHA256;\n  iterations: number;\n\n  constructor(iterations?: number) {\n    this.iterations = iterations ?? PBKDF2KdfConfig.ITERATIONS.defaultValue;\n  }\n\n  /**\n   * Validates the PBKDF2 KDF configuration for updating the KDF config.\n   * A Valid PBKDF2 KDF configuration has KDF iterations between the 600_000 and 2_000_000.\n   */\n  validateKdfConfigForSetting(): void {\n    if (!PBKDF2KdfConfig.ITERATIONS.inRange(this.iterations)) {\n      throw new Error(\n        `PBKDF2 iterations must be between ${PBKDF2KdfConfig.ITERATIONS.min} and ${PBKDF2KdfConfig.ITERATIONS.max}`,\n      );\n    }\n  }\n\n  /**\n   * Validates the PBKDF2 KDF configuration for pre-login.\n   * A Valid PBKDF2 KDF configuration has KDF iterations between the 5000 and 2_000_000.\n   */\n  validateKdfConfigForPrelogin(): void {\n    if (PBKDF2KdfConfig.PRELOGIN_ITERATIONS_MIN > this.iterations) {\n      throw new Error(\n        `PBKDF2 iterations must be at least ${PBKDF2KdfConfig.PRELOGIN_ITERATIONS_MIN}, but was ${this.iterations}; possible pre-login downgrade attack detected.`,\n      );\n    }\n  }\n\n  static fromJSON(json: Jsonify<PBKDF2KdfConfig>): PBKDF2KdfConfig {\n    return new PBKDF2KdfConfig(json.iterations);\n  }\n}\n\n/**\n * Argon2 KDF configuration.\n */\nexport class Argon2KdfConfig {\n  static MEMORY = new RangeWithDefault(16, 1024, 64);\n  static PARALLELISM = new RangeWithDefault(1, 16, 4);\n  static ITERATIONS = new RangeWithDefault(2, 10, 3);\n\n  static PRELOGIN_MEMORY_MIN = 16;\n  static PRELOGIN_PARALLELISM_MIN = 1;\n  static PRELOGIN_ITERATIONS_MIN = 2;\n\n  kdfType: KdfType.Argon2id = KdfType.Argon2id;\n  iterations: number;\n  memory: number;\n  parallelism: number;\n\n  constructor(iterations?: number, memory?: number, parallelism?: number) {\n    this.iterations = iterations ?? Argon2KdfConfig.ITERATIONS.defaultValue;\n    this.memory = memory ?? Argon2KdfConfig.MEMORY.defaultValue;\n    this.parallelism = parallelism ?? Argon2KdfConfig.PARALLELISM.defaultValue;\n  }\n\n  /**\n   * Validates the Argon2 KDF configuration for updating the KDF config.\n   * A Valid Argon2 KDF configuration has iterations between 2 and 10, memory between 16mb and 1024mb, and parallelism between 1 and 16.\n   */\n  validateKdfConfigForSetting(): void {\n    if (!Argon2KdfConfig.ITERATIONS.inRange(this.iterations)) {\n      throw new Error(\n        `Argon2 iterations must be between ${Argon2KdfConfig.ITERATIONS.min} and ${Argon2KdfConfig.ITERATIONS.max}`,\n      );\n    }\n\n    if (!Argon2KdfConfig.MEMORY.inRange(this.memory)) {\n      throw new Error(\n        `Argon2 memory must be between ${Argon2KdfConfig.MEMORY.min} MiB and ${Argon2KdfConfig.MEMORY.max} MiB`,\n      );\n    }\n\n    if (!Argon2KdfConfig.PARALLELISM.inRange(this.parallelism)) {\n      throw new Error(\n        `Argon2 parallelism must be between ${Argon2KdfConfig.PARALLELISM.min} and ${Argon2KdfConfig.PARALLELISM.max}.`,\n      );\n    }\n  }\n\n  /**\n   * Validates the Argon2 KDF configuration for pre-login.\n   */\n  validateKdfConfigForPrelogin(): void {\n    if (Argon2KdfConfig.PRELOGIN_ITERATIONS_MIN > this.iterations) {\n      throw new Error(\n        `Argon2 iterations must be at least ${Argon2KdfConfig.PRELOGIN_ITERATIONS_MIN}, but was ${this.iterations}; possible pre-login downgrade attack detected.`,\n      );\n    }\n\n    if (Argon2KdfConfig.PRELOGIN_MEMORY_MIN > this.memory) {\n      throw new Error(\n        `Argon2 memory must be at least ${Argon2KdfConfig.PRELOGIN_MEMORY_MIN} MiB, but was ${this.memory} MiB; possible pre-login downgrade attack detected.`,\n      );\n    }\n\n    if (Argon2KdfConfig.PRELOGIN_PARALLELISM_MIN > this.parallelism) {\n      throw new Error(\n        `Argon2 parallelism must be at least ${Argon2KdfConfig.PRELOGIN_PARALLELISM_MIN}, but was ${this.parallelism}; possible pre-login downgrade attack detected.`,\n      );\n    }\n  }\n\n  static fromJSON(json: Jsonify<Argon2KdfConfig>): Argon2KdfConfig {\n    return new Argon2KdfConfig(json.iterations, json.memory, json.parallelism);\n  }\n}\n\nexport const DEFAULT_KDF_CONFIG = new PBKDF2KdfConfig(PBKDF2KdfConfig.ITERATIONS.defaultValue);\n","import { Observable } from \"rxjs\";\n\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { KdfConfig } from \"../models/kdf-config\";\n\nexport abstract class KdfConfigService {\n  abstract setKdfConfig(userId: UserId, KdfConfig: KdfConfig): Promise<void>;\n  abstract getKdfConfig(): Promise<KdfConfig>;\n  abstract getKdfConfig$(userId: UserId): Observable<KdfConfig>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, Observable } from \"rxjs\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { UserId } from \"@bitwarden/common/src/types/guid\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { KDF_CONFIG_DISK, StateProvider, UserKeyDefinition } from \"../../common/src/platform/state\";\n\nimport { KdfConfigService } from \"./abstractions/kdf-config.service\";\nimport { KdfType } from \"./enums/kdf-type.enum\";\nimport { Argon2KdfConfig, KdfConfig, PBKDF2KdfConfig } from \"./models/kdf-config\";\n\nexport const KDF_CONFIG = new UserKeyDefinition<KdfConfig>(KDF_CONFIG_DISK, \"kdfConfig\", {\n  deserializer: (kdfConfig: KdfConfig) => {\n    if (kdfConfig == null) {\n      return null;\n    }\n    return kdfConfig.kdfType === KdfType.PBKDF2_SHA256\n      ? PBKDF2KdfConfig.fromJSON(kdfConfig)\n      : Argon2KdfConfig.fromJSON(kdfConfig);\n  },\n  clearOn: [\"logout\"],\n});\n\nexport class DefaultKdfConfigService implements KdfConfigService {\n  constructor(private stateProvider: StateProvider) {}\n  async setKdfConfig(userId: UserId, kdfConfig: KdfConfig) {\n    if (!userId) {\n      throw new Error(\"userId cannot be null\");\n    }\n    if (kdfConfig === null) {\n      throw new Error(\"kdfConfig cannot be null\");\n    }\n    await this.stateProvider.setUserState(KDF_CONFIG, kdfConfig, userId);\n  }\n\n  async getKdfConfig(): Promise<KdfConfig> {\n    const userId = await firstValueFrom(this.stateProvider.activeUserId$);\n    const state = await firstValueFrom(this.stateProvider.getUser(userId, KDF_CONFIG).state$);\n    if (state === null) {\n      throw new Error(\"KdfConfig for active user account state is null\");\n    }\n    return state;\n  }\n\n  getKdfConfig$(userId: UserId): Observable<KdfConfig> {\n    return this.stateProvider.getUser(userId, KDF_CONFIG).state$;\n  }\n}\n","import { UserId } from \"@bitwarden/common/types/guid\";\n\nexport abstract class UserAsymmetricKeysRegenerationService {\n  /**\n   * Attempts to regenerate the user's asymmetric keys if they are invalid.\n   * Requires the PrivateKeyRegeneration feature flag to be enabled if not the method will do nothing.\n   * @param userId The user id.\n   */\n  abstract regenerateIfNeeded(userId: UserId): Promise<void>;\n}\n","import { combineLatest, firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { UserKey } from \"@bitwarden/common/types/key\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\n\nimport { KeyService } from \"../../abstractions/key.service\";\nimport { UserAsymmetricKeysRegenerationApiService } from \"../abstractions/user-asymmetric-key-regeneration-api.service\";\nimport { UserAsymmetricKeysRegenerationService } from \"../abstractions/user-asymmetric-key-regeneration.service\";\n\nexport class DefaultUserAsymmetricKeysRegenerationService\n  implements UserAsymmetricKeysRegenerationService\n{\n  constructor(\n    private keyService: KeyService,\n    private cipherService: CipherService,\n    private userAsymmetricKeysRegenerationApiService: UserAsymmetricKeysRegenerationApiService,\n    private logService: LogService,\n    private sdkService: SdkService,\n    private apiService: ApiService,\n    private configService: ConfigService,\n  ) {}\n\n  async regenerateIfNeeded(userId: UserId): Promise<void> {\n    try {\n      const privateKeyRegenerationFlag = await this.configService.getFeatureFlag(\n        FeatureFlag.PrivateKeyRegeneration,\n      );\n\n      if (privateKeyRegenerationFlag) {\n        const shouldRegenerate = await this.shouldRegenerate(userId);\n        if (shouldRegenerate) {\n          await this.regenerateUserAsymmetricKeys(userId);\n        }\n      }\n    } catch (error) {\n      this.logService.error(\n        \"[UserAsymmetricKeyRegeneration] An error occurred: \" +\n          error +\n          \" Skipping regeneration for the user.\",\n      );\n    }\n  }\n\n  private async shouldRegenerate(userId: UserId): Promise<boolean> {\n    const userKey = await firstValueFrom(this.keyService.userKey$(userId));\n\n    // For SSO logins from untrusted devices, the userKey will not be available, and the private key regeneration process should be skipped.\n    // In such cases, regeneration will occur on the following device login flow.\n    if (!userKey) {\n      this.logService.info(\n        \"[UserAsymmetricKeyRegeneration] User symmetric key unavailable, skipping regeneration for the user.\",\n      );\n      return false;\n    }\n\n    const [userKeyEncryptedPrivateKey, publicKeyResponse] = await firstValueFrom(\n      combineLatest([\n        this.keyService.userEncryptedPrivateKey$(userId),\n        this.apiService.getUserPublicKey(userId),\n      ]),\n    );\n\n    if (!userKeyEncryptedPrivateKey || !publicKeyResponse) {\n      this.logService.warning(\n        \"[UserAsymmetricKeyRegeneration] User's asymmetric key initialization data is unavailable, skipping regeneration.\",\n      );\n      return false;\n    }\n\n    const verificationResponse = await firstValueFrom(\n      this.sdkService.client$.pipe(\n        map((sdk) => {\n          if (sdk === undefined) {\n            throw new Error(\"SDK is undefined\");\n          }\n          return sdk.crypto().verify_asymmetric_keys({\n            userKey: userKey.keyB64,\n            userPublicKey: publicKeyResponse.publicKey,\n            userKeyEncryptedPrivateKey: userKeyEncryptedPrivateKey,\n          });\n        }),\n      ),\n    );\n\n    if (verificationResponse.privateKeyDecryptable) {\n      if (verificationResponse.validPrivateKey) {\n        // The private key is decryptable and valid. Should not regenerate.\n        return false;\n      } else {\n        // The private key is decryptable but not valid so we should regenerate it.\n        this.logService.info(\n          \"[UserAsymmetricKeyRegeneration] User's private key is decryptable but not a valid key, attempting regeneration.\",\n        );\n        return true;\n      }\n    }\n\n    // The private isn't decryptable, check to see if we can decrypt something with the userKey.\n    const userKeyCanDecrypt = await this.userKeyCanDecrypt(userKey);\n    if (userKeyCanDecrypt) {\n      this.logService.info(\n        \"[UserAsymmetricKeyRegeneration] User Asymmetric Key decryption failure detected, attempting regeneration.\",\n      );\n      return true;\n    }\n\n    this.logService.warning(\n      \"[UserAsymmetricKeyRegeneration] User Asymmetric Key decryption failure detected, but unable to determine User Symmetric Key validity, skipping regeneration.\",\n    );\n    return false;\n  }\n\n  private async regenerateUserAsymmetricKeys(userId: UserId): Promise<void> {\n    const userKey = await firstValueFrom(this.keyService.userKey$(userId));\n    const makeKeyPairResponse = await firstValueFrom(\n      this.sdkService.client$.pipe(\n        map((sdk) => {\n          if (sdk === undefined) {\n            throw new Error(\"SDK is undefined\");\n          }\n          return sdk.crypto().make_key_pair(userKey.keyB64);\n        }),\n      ),\n    );\n\n    try {\n      await this.userAsymmetricKeysRegenerationApiService.regenerateUserAsymmetricKeys(\n        makeKeyPairResponse.userPublicKey,\n        new EncString(makeKeyPairResponse.userKeyEncryptedPrivateKey),\n      );\n    } catch (error: any) {\n      if (error?.message === \"Key regeneration not supported for this user.\") {\n        this.logService.info(\n          \"[UserAsymmetricKeyRegeneration] Regeneration not supported for this user at this time.\",\n        );\n      } else {\n        this.logService.error(\n          \"[UserAsymmetricKeyRegeneration] Regeneration error when submitting the request to the server: \" +\n            error,\n        );\n      }\n      return;\n    }\n\n    await this.keyService.setPrivateKey(makeKeyPairResponse.userKeyEncryptedPrivateKey, userId);\n    this.logService.info(\n      \"[UserAsymmetricKeyRegeneration] User's asymmetric keys successfully regenerated.\",\n    );\n  }\n\n  private async userKeyCanDecrypt(userKey: UserKey): Promise<boolean> {\n    const ciphers = await this.cipherService.getAll();\n    const cipher = ciphers.find((cipher) => cipher.organizationId == null);\n\n    if (cipher != null) {\n      try {\n        await cipher.decrypt(userKey);\n        return true;\n      } catch (error) {\n        this.logService.error(\n          \"[UserAsymmetricKeyRegeneration] User Symmetric Key validation error: \" + error,\n        );\n        return false;\n      }\n    }\n    return false;\n  }\n}\n","import { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nexport abstract class UserAsymmetricKeysRegenerationApiService {\n  abstract regenerateUserAsymmetricKeys(\n    userPublicKey: string,\n    userKeyEncryptedUserPrivateKey: EncString,\n  ): Promise<void>;\n}\n","import { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\n\nimport { UserAsymmetricKeysRegenerationApiService } from \"../abstractions/user-asymmetric-key-regeneration-api.service\";\nimport { KeyRegenerationRequest } from \"../models/requests/key-regeneration.request\";\n\nexport class DefaultUserAsymmetricKeysRegenerationApiService\n  implements UserAsymmetricKeysRegenerationApiService\n{\n  constructor(private apiService: ApiService) {}\n\n  async regenerateUserAsymmetricKeys(\n    userPublicKey: string,\n    userKeyEncryptedUserPrivateKey: EncString,\n  ): Promise<void> {\n    const request: KeyRegenerationRequest = {\n      userPublicKey,\n      userKeyEncryptedUserPrivateKey,\n    };\n\n    await this.apiService.send(\n      \"POST\",\n      \"/accounts/key-management/regenerate-keys\",\n      request,\n      true,\n      true,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport const EXPORT_FORMATS = [\"csv\", \"json\", \"encrypted_json\"] as const;\nexport type ExportFormat = (typeof EXPORT_FORMATS)[number];\n\nexport abstract class VaultExportServiceAbstraction {\n  getExport: (format: ExportFormat, password: string) => Promise<string>;\n  getOrganizationExport: (\n    organizationId: string,\n    format: ExportFormat,\n    password: string,\n    onlyManagedCollections?: boolean,\n  ) => Promise<string>;\n  getFileName: (prefix?: string, extension?: string) => string;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nexport class ExportHelper {\n  static getFileName(prefix: string = null, extension = \"csv\"): string {\n    const now = new Date();\n    const dateString =\n      now.getFullYear() +\n      \"\" +\n      this.padNumber(now.getMonth() + 1, 2) +\n      \"\" +\n      this.padNumber(now.getDate(), 2) +\n      this.padNumber(now.getHours(), 2) +\n      \"\" +\n      this.padNumber(now.getMinutes(), 2) +\n      this.padNumber(now.getSeconds(), 2);\n\n    return \"bitwarden\" + (prefix ? \"_\" + prefix : \"\") + \"_export_\" + dateString + \".\" + extension;\n  }\n\n  private static padNumber(num: number, width: number, padCharacter = \"0\"): string {\n    const numString = num.toString();\n    return numString.length >= width\n      ? numString\n      : new Array(width - numString.length + 1).join(padCharacter) + numString;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { ExportHelper } from \"./export-helper\";\nimport { IndividualVaultExportServiceAbstraction } from \"./individual-vault-export.service.abstraction\";\nimport { OrganizationVaultExportServiceAbstraction } from \"./org-vault-export.service.abstraction\";\nimport { ExportFormat, VaultExportServiceAbstraction } from \"./vault-export.service.abstraction\";\n\nexport class VaultExportService implements VaultExportServiceAbstraction {\n  constructor(\n    private individualVaultExportService: IndividualVaultExportServiceAbstraction,\n    private organizationVaultExportService: OrganizationVaultExportServiceAbstraction,\n  ) {}\n\n  async getExport(format: ExportFormat = \"csv\", password: string): Promise<string> {\n    if (!Utils.isNullOrWhitespace(password)) {\n      if (format == \"csv\") {\n        throw new Error(\"CSV does not support password protected export\");\n      }\n\n      return this.individualVaultExportService.getPasswordProtectedExport(password);\n    }\n    return this.individualVaultExportService.getExport(format);\n  }\n\n  async getOrganizationExport(\n    organizationId: string,\n    format: ExportFormat,\n    password: string,\n    onlyManagedCollections = false,\n  ): Promise<string> {\n    if (!Utils.isNullOrWhitespace(password)) {\n      if (format == \"csv\") {\n        throw new Error(\"CSV does not support password protected export\");\n      }\n\n      return this.organizationVaultExportService.getPasswordProtectedExport(\n        organizationId,\n        password,\n        onlyManagedCollections,\n      );\n    }\n\n    return this.organizationVaultExportService.getOrganizationExport(\n      organizationId,\n      format,\n      onlyManagedCollections,\n    );\n  }\n\n  getFileName(prefix: string = null, extension = \"csv\"): string {\n    return ExportHelper.getFileName(prefix, extension);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ExportFormat } from \"./vault-export.service.abstraction\";\n\nexport abstract class OrganizationVaultExportServiceAbstraction {\n  getPasswordProtectedExport: (\n    organizationId: string,\n    password: string,\n    onlyManagedCollections: boolean,\n  ) => Promise<string>;\n  getOrganizationExport: (\n    organizationId: string,\n    format: ExportFormat,\n    onlyManagedCollections: boolean,\n  ) => Promise<string>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { KdfConfig, KdfConfigService, KdfType } from \"@bitwarden/key-management\";\n\nimport { BitwardenCsvExportType, BitwardenPasswordProtectedFileFormat } from \"../types\";\nexport class BaseVaultExportService {\n  constructor(\n    protected pinService: PinServiceAbstraction,\n    protected encryptService: EncryptService,\n    private cryptoFunctionService: CryptoFunctionService,\n    private kdfConfigService: KdfConfigService,\n  ) {}\n\n  protected async buildPasswordExport(clearText: string, password: string): Promise<string> {\n    const kdfConfig: KdfConfig = await this.kdfConfigService.getKdfConfig();\n\n    const salt = Utils.fromBufferToB64(await this.cryptoFunctionService.randomBytes(16));\n    const key = await this.pinService.makePinKey(password, salt, kdfConfig);\n\n    const encKeyValidation = await this.encryptService.encrypt(Utils.newGuid(), key);\n    const encText = await this.encryptService.encrypt(clearText, key);\n\n    const jsonDoc: BitwardenPasswordProtectedFileFormat = {\n      encrypted: true,\n      passwordProtected: true,\n      salt: salt,\n      kdfType: kdfConfig.kdfType,\n      kdfIterations: kdfConfig.iterations,\n      encKeyValidation_DO_NOT_EDIT: encKeyValidation.encryptedString,\n      data: encText.encryptedString,\n    };\n\n    if (kdfConfig.kdfType === KdfType.Argon2id) {\n      jsonDoc.kdfMemory = kdfConfig.memory;\n      jsonDoc.kdfParallelism = kdfConfig.parallelism;\n    }\n\n    return JSON.stringify(jsonDoc, null, \"  \");\n  }\n\n  protected buildCommonCipher(\n    cipher: BitwardenCsvExportType,\n    c: CipherView,\n  ): BitwardenCsvExportType {\n    cipher.type = null;\n    cipher.name = c.name;\n    cipher.notes = c.notes;\n    cipher.fields = null;\n    cipher.reprompt = c.reprompt;\n    // Login props\n    cipher.login_uri = null;\n    cipher.login_username = null;\n    cipher.login_password = null;\n    cipher.login_totp = null;\n\n    if (c.fields) {\n      c.fields.forEach((f) => {\n        if (!cipher.fields) {\n          cipher.fields = \"\";\n        } else {\n          cipher.fields += \"\\n\";\n        }\n\n        cipher.fields += (f.name || \"\") + \": \" + f.value;\n      });\n    }\n\n    switch (c.type) {\n      case CipherType.Login:\n        cipher.type = \"login\";\n        cipher.login_username = c.login.username;\n        cipher.login_password = c.login.password;\n        cipher.login_totp = c.login.totp;\n\n        if (c.login.uris) {\n          cipher.login_uri = [];\n          c.login.uris.forEach((u) => {\n            cipher.login_uri.push(u.uri);\n          });\n        }\n        break;\n      case CipherType.SecureNote:\n        cipher.type = \"note\";\n        break;\n      default:\n        return;\n    }\n\n    return cipher;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as papa from \"papaparse\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport {\n  CollectionService,\n  CollectionData,\n  Collection,\n  CollectionDetailsResponse,\n  CollectionView,\n} from \"@bitwarden/admin-console/common\";\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { CipherWithIdExport, CollectionWithIdExport } from \"@bitwarden/common/models/export\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherData } from \"@bitwarden/common/vault/models/data/cipher.data\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  BitwardenCsvOrgExportType,\n  BitwardenEncryptedOrgJsonExport,\n  BitwardenUnEncryptedOrgJsonExport,\n} from \"../types\";\n\nimport { BaseVaultExportService } from \"./base-vault-export.service\";\nimport { OrganizationVaultExportServiceAbstraction } from \"./org-vault-export.service.abstraction\";\nimport { ExportFormat } from \"./vault-export.service.abstraction\";\n\nexport class OrganizationVaultExportService\n  extends BaseVaultExportService\n  implements OrganizationVaultExportServiceAbstraction\n{\n  constructor(\n    private cipherService: CipherService,\n    private apiService: ApiService,\n    pinService: PinServiceAbstraction,\n    private keyService: KeyService,\n    encryptService: EncryptService,\n    cryptoFunctionService: CryptoFunctionService,\n    private collectionService: CollectionService,\n    kdfConfigService: KdfConfigService,\n    private accountService: AccountService,\n  ) {\n    super(pinService, encryptService, cryptoFunctionService, kdfConfigService);\n  }\n\n  async getPasswordProtectedExport(\n    organizationId: string,\n    password: string,\n    onlyManagedCollections: boolean,\n  ): Promise<string> {\n    const clearText = await this.getOrganizationExport(\n      organizationId,\n      \"json\",\n      onlyManagedCollections,\n    );\n\n    return this.buildPasswordExport(clearText, password);\n  }\n\n  async getOrganizationExport(\n    organizationId: string,\n    format: ExportFormat = \"csv\",\n    onlyManagedCollections: boolean,\n  ): Promise<string> {\n    if (Utils.isNullOrWhitespace(organizationId)) {\n      throw new Error(\"OrganizationId must be set\");\n    }\n\n    if (format === \"encrypted_json\") {\n      return onlyManagedCollections\n        ? this.getEncryptedManagedExport(organizationId)\n        : this.getOrganizationEncryptedExport(organizationId);\n    }\n\n    return onlyManagedCollections\n      ? this.getDecryptedManagedExport(organizationId, format)\n      : this.getOrganizationDecryptedExport(organizationId, format);\n  }\n\n  private async getOrganizationDecryptedExport(\n    organizationId: string,\n    format: \"json\" | \"csv\",\n  ): Promise<string> {\n    const decCollections: CollectionView[] = [];\n    const decCiphers: CipherView[] = [];\n    const promises = [];\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n\n    promises.push(\n      this.apiService.getOrganizationExport(organizationId).then((exportData) => {\n        const exportPromises: any = [];\n        if (exportData != null) {\n          if (exportData.collections != null && exportData.collections.length > 0) {\n            exportData.collections.forEach((c) => {\n              const collection = new Collection(new CollectionData(c as CollectionDetailsResponse));\n              exportPromises.push(\n                firstValueFrom(this.keyService.activeUserOrgKeys$)\n                  .then((keys) => collection.decrypt(keys[organizationId as OrganizationId]))\n                  .then((decCol) => {\n                    decCollections.push(decCol);\n                  }),\n              );\n            });\n          }\n          if (exportData.ciphers != null && exportData.ciphers.length > 0) {\n            exportData.ciphers\n              .filter((c) => c.deletedDate === null)\n              .forEach(async (c) => {\n                const cipher = new Cipher(new CipherData(c));\n                exportPromises.push(\n                  this.cipherService\n                    .getKeyForCipherKeyDecryption(cipher, activeUserId)\n                    .then((key) => cipher.decrypt(key))\n                    .then((decCipher) => {\n                      decCiphers.push(decCipher);\n                    }),\n                );\n              });\n          }\n        }\n        return Promise.all(exportPromises);\n      }),\n    );\n\n    await Promise.all(promises);\n\n    if (format === \"csv\") {\n      return this.buildCsvExport(decCollections, decCiphers);\n    }\n    return this.buildJsonExport(decCollections, decCiphers);\n  }\n\n  private async getOrganizationEncryptedExport(organizationId: string): Promise<string> {\n    const collections: Collection[] = [];\n    const ciphers: Cipher[] = [];\n    const promises = [];\n\n    promises.push(\n      this.apiService.getCollections(organizationId).then((c) => {\n        if (c != null && c.data != null && c.data.length > 0) {\n          c.data.forEach((r) => {\n            const collection = new Collection(new CollectionData(r as CollectionDetailsResponse));\n            collections.push(collection);\n          });\n        }\n      }),\n    );\n\n    promises.push(\n      this.apiService.getCiphersOrganization(organizationId).then((c) => {\n        if (c != null && c.data != null && c.data.length > 0) {\n          c.data\n            .filter((item) => item.deletedDate === null)\n            .forEach((item) => {\n              const cipher = new Cipher(new CipherData(item));\n              ciphers.push(cipher);\n            });\n        }\n      }),\n    );\n\n    await Promise.all(promises);\n\n    return this.BuildEncryptedExport(organizationId, collections, ciphers);\n  }\n\n  private async getDecryptedManagedExport(\n    organizationId: string,\n    format: \"json\" | \"csv\",\n  ): Promise<string> {\n    let decCiphers: CipherView[] = [];\n    let allDecCiphers: CipherView[] = [];\n    let decCollections: CollectionView[] = [];\n    const promises = [];\n\n    promises.push(\n      this.collectionService.getAllDecrypted().then(async (collections) => {\n        decCollections = collections.filter((c) => c.organizationId == organizationId && c.manage);\n      }),\n    );\n\n    promises.push(\n      this.cipherService.getAllDecrypted().then((ciphers) => {\n        allDecCiphers = ciphers;\n      }),\n    );\n    await Promise.all(promises);\n\n    decCiphers = allDecCiphers.filter(\n      (f) =>\n        f.deletedDate == null &&\n        f.organizationId == organizationId &&\n        decCollections.some((dC) => f.collectionIds.some((cId) => dC.id === cId)),\n    );\n\n    if (format === \"csv\") {\n      return this.buildCsvExport(decCollections, decCiphers);\n    }\n    return this.buildJsonExport(decCollections, decCiphers);\n  }\n\n  private async getEncryptedManagedExport(organizationId: string): Promise<string> {\n    let encCiphers: Cipher[] = [];\n    let allCiphers: Cipher[] = [];\n    let encCollections: Collection[] = [];\n    const promises = [];\n\n    promises.push(\n      this.collectionService.getAll().then((collections) => {\n        encCollections = collections.filter((c) => c.organizationId == organizationId && c.manage);\n      }),\n    );\n\n    promises.push(\n      this.cipherService.getAll().then((ciphers) => {\n        allCiphers = ciphers;\n      }),\n    );\n\n    await Promise.all(promises);\n\n    encCiphers = allCiphers.filter(\n      (f) =>\n        f.deletedDate == null &&\n        f.organizationId == organizationId &&\n        encCollections.some((eC) => f.collectionIds.some((cId) => eC.id === cId)),\n    );\n\n    return this.BuildEncryptedExport(organizationId, encCollections, encCiphers);\n  }\n\n  private async BuildEncryptedExport(\n    organizationId: string,\n    collections: Collection[],\n    ciphers: Cipher[],\n  ): Promise<string> {\n    const orgKey = await this.keyService.getOrgKey(organizationId);\n    const encKeyValidation = await this.encryptService.encrypt(Utils.newGuid(), orgKey);\n\n    const jsonDoc: BitwardenEncryptedOrgJsonExport = {\n      encrypted: true,\n      encKeyValidation_DO_NOT_EDIT: encKeyValidation.encryptedString,\n      collections: [],\n      items: [],\n    };\n\n    collections.forEach((c) => {\n      const collection = new CollectionWithIdExport();\n      collection.build(c);\n      jsonDoc.collections.push(collection);\n    });\n\n    ciphers.forEach((c) => {\n      const cipher = new CipherWithIdExport();\n      cipher.build(c);\n      jsonDoc.items.push(cipher);\n    });\n    return JSON.stringify(jsonDoc, null, \"  \");\n  }\n\n  private buildCsvExport(decCollections: CollectionView[], decCiphers: CipherView[]): string {\n    const collectionsMap = new Map<string, CollectionView>();\n    decCollections.forEach((c) => {\n      collectionsMap.set(c.id, c);\n    });\n\n    const exportCiphers: BitwardenCsvOrgExportType[] = [];\n    decCiphers.forEach((c) => {\n      // only export logins and secure notes\n      if (c.type !== CipherType.Login && c.type !== CipherType.SecureNote) {\n        return;\n      }\n\n      const cipher = {} as BitwardenCsvOrgExportType;\n      cipher.collections = [];\n      if (c.collectionIds != null) {\n        cipher.collections = c.collectionIds\n          .filter((id) => collectionsMap.has(id))\n          .map((id) => collectionsMap.get(id).name);\n      }\n      this.buildCommonCipher(cipher, c);\n      exportCiphers.push(cipher);\n    });\n\n    return papa.unparse(exportCiphers);\n  }\n\n  private buildJsonExport(decCollections: CollectionView[], decCiphers: CipherView[]): string {\n    const jsonDoc: BitwardenUnEncryptedOrgJsonExport = {\n      encrypted: false,\n      collections: [],\n      items: [],\n    };\n\n    decCollections.forEach((c) => {\n      const collection = new CollectionWithIdExport();\n      collection.build(c);\n      jsonDoc.collections.push(collection);\n    });\n\n    decCiphers.forEach((c) => {\n      const cipher = new CipherWithIdExport();\n      cipher.build(c);\n      jsonDoc.items.push(cipher);\n    });\n    return JSON.stringify(jsonDoc, null, \"  \");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ExportFormat } from \"./vault-export.service.abstraction\";\n\nexport abstract class IndividualVaultExportServiceAbstraction {\n  getExport: (format: ExportFormat) => Promise<string>;\n  getPasswordProtectedExport: (password: string) => Promise<string>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport * as papa from \"papaparse\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { PinServiceAbstraction } from \"@bitwarden/auth/common\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { CipherWithIdExport, FolderWithIdExport } from \"@bitwarden/common/models/export\";\nimport { CryptoFunctionService } from \"@bitwarden/common/platform/abstractions/crypto-function.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { Folder } from \"@bitwarden/common/vault/models/domain/folder\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { KdfConfigService, KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  BitwardenCsvIndividualExportType,\n  BitwardenEncryptedIndividualJsonExport,\n  BitwardenUnEncryptedIndividualJsonExport,\n} from \"../types\";\n\nimport { BaseVaultExportService } from \"./base-vault-export.service\";\nimport { IndividualVaultExportServiceAbstraction } from \"./individual-vault-export.service.abstraction\";\nimport { ExportFormat } from \"./vault-export.service.abstraction\";\n\nexport class IndividualVaultExportService\n  extends BaseVaultExportService\n  implements IndividualVaultExportServiceAbstraction\n{\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  constructor(\n    private folderService: FolderService,\n    private cipherService: CipherService,\n    pinService: PinServiceAbstraction,\n    private keyService: KeyService,\n    encryptService: EncryptService,\n    cryptoFunctionService: CryptoFunctionService,\n    kdfConfigService: KdfConfigService,\n    private accountService: AccountService,\n  ) {\n    super(pinService, encryptService, cryptoFunctionService, kdfConfigService);\n  }\n\n  async getExport(format: ExportFormat = \"csv\"): Promise<string> {\n    if (format === \"encrypted_json\") {\n      return this.getEncryptedExport();\n    }\n    return this.getDecryptedExport(format);\n  }\n\n  async getPasswordProtectedExport(password: string): Promise<string> {\n    const clearText = await this.getExport(\"json\");\n    return this.buildPasswordExport(clearText, password);\n  }\n\n  private async getDecryptedExport(format: \"json\" | \"csv\"): Promise<string> {\n    let decFolders: FolderView[] = [];\n    let decCiphers: CipherView[] = [];\n    const promises = [];\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n\n    promises.push(\n      firstValueFrom(this.folderService.folderViews$(activeUserId)).then((folders) => {\n        decFolders = folders;\n      }),\n    );\n\n    promises.push(\n      this.cipherService.getAllDecrypted().then((ciphers) => {\n        decCiphers = ciphers.filter((f) => f.deletedDate == null);\n      }),\n    );\n\n    await Promise.all(promises);\n\n    if (format === \"csv\") {\n      return this.buildCsvExport(decFolders, decCiphers);\n    }\n\n    return this.buildJsonExport(decFolders, decCiphers);\n  }\n\n  private async getEncryptedExport(): Promise<string> {\n    let folders: Folder[] = [];\n    let ciphers: Cipher[] = [];\n    const promises = [];\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n\n    promises.push(\n      firstValueFrom(this.folderService.folders$(activeUserId)).then((f) => {\n        folders = f;\n      }),\n    );\n\n    promises.push(\n      this.cipherService.getAll().then((c) => {\n        ciphers = c.filter((f) => f.deletedDate == null);\n      }),\n    );\n\n    await Promise.all(promises);\n\n    const userKey = await this.keyService.getUserKeyWithLegacySupport(\n      await firstValueFrom(this.activeUserId$),\n    );\n    const encKeyValidation = await this.encryptService.encrypt(Utils.newGuid(), userKey);\n\n    const jsonDoc: BitwardenEncryptedIndividualJsonExport = {\n      encrypted: true,\n      encKeyValidation_DO_NOT_EDIT: encKeyValidation.encryptedString,\n      folders: [],\n      items: [],\n    };\n\n    folders.forEach((f) => {\n      if (f.id == null) {\n        return;\n      }\n      const folder = new FolderWithIdExport();\n      folder.build(f);\n      jsonDoc.folders.push(folder);\n    });\n\n    ciphers.forEach((c) => {\n      if (c.organizationId != null) {\n        return;\n      }\n      const cipher = new CipherWithIdExport();\n      cipher.build(c);\n      cipher.collectionIds = null;\n      jsonDoc.items.push(cipher);\n    });\n\n    return JSON.stringify(jsonDoc, null, \"  \");\n  }\n\n  private buildCsvExport(decFolders: FolderView[], decCiphers: CipherView[]): string {\n    const foldersMap = new Map<string, FolderView>();\n    decFolders.forEach((f) => {\n      if (f.id != null) {\n        foldersMap.set(f.id, f);\n      }\n    });\n\n    const exportCiphers: BitwardenCsvIndividualExportType[] = [];\n    decCiphers.forEach((c) => {\n      // only export logins and secure notes\n      if (c.type !== CipherType.Login && c.type !== CipherType.SecureNote) {\n        return;\n      }\n      if (c.organizationId != null) {\n        return;\n      }\n\n      const cipher = {} as BitwardenCsvIndividualExportType;\n      cipher.folder =\n        c.folderId != null && foldersMap.has(c.folderId) ? foldersMap.get(c.folderId).name : null;\n      cipher.favorite = c.favorite ? 1 : null;\n      this.buildCommonCipher(cipher, c);\n      exportCiphers.push(cipher);\n    });\n\n    return papa.unparse(exportCiphers);\n  }\n\n  private buildJsonExport(decFolders: FolderView[], decCiphers: CipherView[]): string {\n    const jsonDoc: BitwardenUnEncryptedIndividualJsonExport = {\n      encrypted: false,\n      folders: [],\n      items: [],\n    };\n\n    decFolders.forEach((f) => {\n      if (f.id == null) {\n        return;\n      }\n      const folder = new FolderWithIdExport();\n      folder.build(f);\n      jsonDoc.folders.push(folder);\n    });\n\n    decCiphers.forEach((c) => {\n      if (c.organizationId != null) {\n        return;\n      }\n      const cipher = new CipherWithIdExport();\n      cipher.build(c);\n      cipher.collectionIds = null;\n      jsonDoc.items.push(cipher);\n    });\n\n    return JSON.stringify(jsonDoc, null, \"  \");\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { BehaviorSubject, map, skip, Subject, takeUntil, withLatestFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  CatchallGenerationOptions,\n  CredentialGeneratorService,\n  Generators,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\n/** Options group for catchall emails */\n@Component({\n  selector: \"tools-catchall-settings\",\n  templateUrl: \"catchall-settings.component.html\",\n})\nexport class CatchallSettingsComponent implements OnInit, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<CatchallGenerationOptions>();\n\n  /** The template's control bindings */\n  protected settings = this.formBuilder.group({\n    catchallDomain: [Generators.catchall.settings.initial.catchallDomain],\n  });\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n    const settings = await this.generatorService.settings(Generators.catchall, { singleUserId$ });\n\n    settings.pipe(takeUntil(this.destroyed$)).subscribe((s) => {\n      this.settings.patchValue(s, { emitEvent: false });\n    });\n\n    // the first emission is the current value; subsequent emissions are updates\n    settings.pipe(skip(1), takeUntil(this.destroyed$)).subscribe(this.onUpdated);\n\n    // now that outputs are set up, connect inputs\n    this.saveSettings\n      .pipe(\n        withLatestFrom(this.settings.valueChanges),\n        map(([, settings]) => settings),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(settings);\n  }\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","<form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n  <bit-form-field>\n    <bit-label>{{ \"domainName\" | i18n }}</bit-label>\n    <input\n      bitInput\n      formControlName=\"catchallDomain\"\n      type=\"text\"\n      (change)=\"save('catchallDomain')\"\n    />\n  </bit-form-field>\n</form>\n","<form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n  <bit-form-field *ngIf=\"displayDomain\">\n    <bit-label>{{ \"forwarderDomainName\" | i18n }}</bit-label>\n    <input\n      bitInput\n      formControlName=\"domain\"\n      type=\"text\"\n      placeholder=\"example.com\"\n      (change)=\"save('domain')\"\n    />\n    <bit-hint>{{ \"forwarderDomainNameHint\" | i18n }}</bit-hint>\n  </bit-form-field>\n  <bit-form-field *ngIf=\"displayToken\">\n    <bit-label>{{ \"apiKey\" | i18n }}</bit-label>\n    <input bitInput formControlName=\"token\" type=\"password\" (change)=\"save('password')\" />\n    <button\n      type=\"button\"\n      bitIconButton\n      bitSuffix\n      bitPasswordInputToggle\n      (change)=\"save('token')\"\n    ></button>\n  </bit-form-field>\n  <bit-form-field *ngIf=\"displayBaseUrl\" disableMargin>\n    <bit-label>{{ \"selfHostBaseUrl\" | i18n }}</bit-label>\n    <input bitInput formControlName=\"baseUrl\" type=\"text\" (change)=\"save('baseUrl')\" />\n  </bit-form-field>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Component,\n  EventEmitter,\n  Input,\n  OnChanges,\n  OnDestroy,\n  OnInit,\n  Output,\n  SimpleChanges,\n} from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport {\n  BehaviorSubject,\n  concatMap,\n  map,\n  ReplaySubject,\n  skip,\n  Subject,\n  switchAll,\n  takeUntil,\n  withLatestFrom,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  CredentialGeneratorConfiguration,\n  CredentialGeneratorService,\n  getForwarderConfiguration,\n  NoPolicy,\n  toCredentialGeneratorConfiguration,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\nconst Controls = Object.freeze({\n  domain: \"domain\",\n  token: \"token\",\n  baseUrl: \"baseUrl\",\n});\n\n/** Options group for forwarder integrations */\n@Component({\n  selector: \"tools-forwarder-settings\",\n  templateUrl: \"forwarder-settings.component.html\",\n})\nexport class ForwarderSettingsComponent implements OnInit, OnChanges, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  @Input({ required: true })\n  forwarder: IntegrationId;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<unknown>();\n\n  /** The template's control bindings */\n  protected settings = this.formBuilder.group({\n    [Controls.domain]: [\"\"],\n    [Controls.token]: [\"\"],\n    [Controls.baseUrl]: [\"\"],\n  });\n\n  private forwarderId$ = new ReplaySubject<IntegrationId>(1);\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n\n    const forwarder$ = new ReplaySubject<CredentialGeneratorConfiguration<any, NoPolicy>>(1);\n    this.forwarderId$\n      .pipe(\n        map((id) => getForwarderConfiguration(id)),\n        // type erasure necessary because the configuration properties are\n        // determined dynamically at runtime\n        // FIXME: this can be eliminated by unifying the forwarder settings types;\n        // see `ForwarderConfiguration<...>` for details.\n        map((forwarder) => toCredentialGeneratorConfiguration<any>(forwarder)),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe((forwarder) => {\n        this.displayDomain = forwarder.request.includes(\"domain\");\n        this.displayToken = forwarder.request.includes(\"token\");\n        this.displayBaseUrl = forwarder.request.includes(\"baseUrl\");\n\n        forwarder$.next(forwarder);\n      });\n\n    const settings$$ = forwarder$.pipe(\n      concatMap((forwarder) => this.generatorService.settings(forwarder, { singleUserId$ })),\n    );\n\n    // bind settings to the reactive form\n    settings$$.pipe(switchAll(), takeUntil(this.destroyed$)).subscribe((settings) => {\n      // skips reactive event emissions to break a subscription cycle\n      this.settings.patchValue(settings as any, { emitEvent: false });\n    });\n\n    // enable requested forwarder inputs\n    forwarder$.pipe(takeUntil(this.destroyed$)).subscribe((forwarder) => {\n      for (const name in Controls) {\n        const control = this.settings.get(name);\n        if (forwarder.request.includes(name as any)) {\n          control.enable({ emitEvent: false });\n        } else {\n          control.disable({ emitEvent: false });\n        }\n      }\n    });\n\n    // the first emission is the current value; subsequent emissions are updates\n    settings$$\n      .pipe(\n        map((settings$) => settings$.pipe(skip(1))),\n        switchAll(),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(this.onUpdated);\n\n    // now that outputs are set up, connect inputs\n    this.saveSettings\n      .pipe(withLatestFrom(this.settings.valueChanges, settings$$), takeUntil(this.destroyed$))\n      .subscribe(([, value, settings]) => {\n        settings.next(value);\n      });\n  }\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  ngOnChanges(changes: SimpleChanges): void {\n    this.refresh$.complete();\n    if (\"forwarder\" in changes) {\n      this.forwarderId$.next(this.forwarder);\n    }\n  }\n\n  protected displayDomain: boolean;\n  protected displayToken: boolean;\n  protected displayBaseUrl: boolean;\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly refresh$ = new Subject<void>();\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\n\nimport { EncString } from \"../../platform/models/domain/enc-string\";\n\n/** An encryption strategy that protects a type's secrets with\n *  organization-specific keys. This strategy is bound to a specific organization.\n */\nexport abstract class OrganizationEncryptor {\n  /** Identifies the organization bound to the encryptor. */\n  readonly organizationId: OrganizationId;\n\n  /** Protects secrets in `value` with an organization-specific key.\n   *  @param secret the object to protect. This object is mutated during encryption.\n   *  @returns a promise that resolves to a tuple. The tuple's first property contains\n   *    the encrypted secret and whose second property contains an object w/ disclosed\n   *    properties.\n   *   @throws If `value` is `null` or `undefined`, the promise rejects with an error.\n   */\n  abstract encrypt<Secret>(secret: Jsonify<Secret>): Promise<EncString>;\n\n  /** Combines protected secrets and disclosed data into a type that can be\n   *  rehydrated into a domain object.\n   *  @param secret an encrypted JSON payload containing encrypted secrets.\n   *  @returns a promise that resolves to the raw state. This state *is not* a\n   *    class. It contains only data that can be round-tripped through JSON,\n   *    and lacks members such as a prototype or bound functions.\n   *  @throws If `secret` or `disclosed` is `null` or `undefined`, the promise\n   *    rejects with an error.\n   */\n  abstract decrypt<Secret>(secret: EncString): Promise<Jsonify<Secret>>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\n\nimport { EncryptService } from \"../../platform/abstractions/encrypt.service\";\nimport { EncString } from \"../../platform/models/domain/enc-string\";\nimport { OrgKey } from \"../../types/key\";\nimport { DataPacker } from \"../state/data-packer.abstraction\";\n\nimport { OrganizationEncryptor } from \"./organization-encryptor.abstraction\";\n\n/** A classification strategy that protects a type's secrets by encrypting them\n *  with an `OrgKey`\n */\nexport class OrganizationKeyEncryptor extends OrganizationEncryptor {\n  /** Instantiates the encryptor\n   *  @param organizationId identifies the organization bound to the encryptor.\n   *  @param encryptService protects properties of `Secret`.\n   *  @param key the key instance protecting the data.\n   *  @param dataPacker packs and unpacks data classified as secrets.\n   */\n  constructor(\n    readonly organizationId: OrganizationId,\n    private readonly encryptService: EncryptService,\n    private readonly key: OrgKey,\n    private readonly dataPacker: DataPacker,\n  ) {\n    super();\n    this.assertHasValue(\"organizationId\", organizationId);\n    this.assertHasValue(\"key\", key);\n    this.assertHasValue(\"dataPacker\", dataPacker);\n    this.assertHasValue(\"encryptService\", encryptService);\n  }\n\n  async encrypt<Secret>(secret: Jsonify<Secret>): Promise<EncString> {\n    this.assertHasValue(\"secret\", secret);\n\n    let packed = this.dataPacker.pack(secret);\n    const encrypted = await this.encryptService.encrypt(packed, this.key);\n    packed = null;\n\n    return encrypted;\n  }\n\n  async decrypt<Secret>(secret: EncString): Promise<Jsonify<Secret>> {\n    this.assertHasValue(\"secret\", secret);\n\n    let decrypted = await this.encryptService.decryptToUtf8(secret, this.key);\n    const unpacked = this.dataPacker.unpack<Secret>(decrypted);\n    decrypted = null;\n\n    return unpacked;\n  }\n\n  private assertHasValue(name: string, value: any) {\n    if (value === undefined || value === null) {\n      throw new Error(`${name} cannot be null or undefined`);\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport {\n  OrganizationBound,\n  SingleOrganizationDependency,\n  SingleUserDependency,\n  UserBound,\n} from \"../dependencies\";\n\nimport { OrganizationEncryptor } from \"./organization-encryptor.abstraction\";\nimport { UserEncryptor } from \"./user-encryptor.abstraction\";\n\n/** Creates encryptors\n *  @deprecated this logic will soon be replaced with a design that provides for\n *    key rotation. Use it at your own risk\n */\nexport abstract class LegacyEncryptorProvider {\n  /** Retrieves an encryptor populated with the user's most recent key instance that\n   *  uses a padded data packer to encode data.\n   *  @param frameSize length of the padded data packer's frames.\n   *  @param dependencies.singleUserId$ identifies the user to which the encryptor is bound\n   *  @returns an observable that emits when the key becomes available and completes\n   *    when the key becomes unavailable.\n   */\n  userEncryptor$: (\n    frameSize: number,\n    dependencies: SingleUserDependency,\n  ) => Observable<UserBound<\"encryptor\", UserEncryptor>>;\n\n  /** Retrieves an encryptor populated with the organization's most recent key instance that\n   *  uses a padded data packer to encode data.\n   *  @param frameSize length of the padded data packer's frames.\n   *  @param dependencies.singleOrganizationId$ identifies the user/org combination\n   *   to which the encryptor is bound.\n   *  @returns an observable that emits when the key becomes available and completes\n   *    when the key becomes unavailable.\n   */\n  organizationEncryptor$: (\n    frameSize: number,\n    dependences: SingleOrganizationDependency,\n  ) => Observable<OrganizationBound<\"encryptor\", OrganizationEncryptor>>;\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { safeProvider } from \"@bitwarden/angular/platform/utils/safe-provider\";\nimport { SafeInjectionToken } from \"@bitwarden/angular/services/injection-tokens\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { KeyServiceLegacyEncryptorProvider } from \"@bitwarden/common/tools/cryptography/key-service-legacy-encryptor-provider\";\nimport { LegacyEncryptorProvider } from \"@bitwarden/common/tools/cryptography/legacy-encryptor-provider\";\nimport {\n  createRandomizer,\n  CredentialGeneratorService,\n  Randomizer,\n} from \"@bitwarden/generator-core\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nexport const RANDOMIZER = new SafeInjectionToken<Randomizer>(\"Randomizer\");\n\n/** Shared module containing generator component dependencies */\n@NgModule({\n  imports: [JslibModule],\n  providers: [\n    safeProvider({\n      provide: RANDOMIZER,\n      useFactory: createRandomizer,\n      deps: [KeyService],\n    }),\n    safeProvider({\n      provide: LegacyEncryptorProvider,\n      useClass: KeyServiceLegacyEncryptorProvider,\n      deps: [EncryptService, KeyService],\n    }),\n    safeProvider({\n      provide: CredentialGeneratorService,\n      useClass: CredentialGeneratorService,\n      deps: [\n        RANDOMIZER,\n        StateProvider,\n        PolicyService,\n        ApiService,\n        I18nService,\n        LegacyEncryptorProvider,\n        AccountService,\n      ],\n    }),\n  ],\n})\nexport class GeneratorServicesModule {\n  constructor() {}\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  connect,\n  dematerialize,\n  map,\n  materialize,\n  ReplaySubject,\n  skipWhile,\n  switchMap,\n  takeUntil,\n  takeWhile,\n} from \"rxjs\";\n\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { OrganizationId, UserId } from \"@bitwarden/common/types/guid\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport {\n  OrganizationBound,\n  SingleOrganizationDependency,\n  SingleUserDependency,\n  UserBound,\n} from \"../dependencies\";\nimport { anyComplete, errorOnChange } from \"../rx\";\nimport { PaddedDataPacker } from \"../state/padded-data-packer\";\n\nimport { LegacyEncryptorProvider } from \"./legacy-encryptor-provider\";\nimport { OrganizationEncryptor } from \"./organization-encryptor.abstraction\";\nimport { OrganizationKeyEncryptor } from \"./organization-key-encryptor\";\nimport { UserEncryptor } from \"./user-encryptor.abstraction\";\nimport { UserKeyEncryptor } from \"./user-key-encryptor\";\n\n/** Creates encryptors\n */\nexport class KeyServiceLegacyEncryptorProvider implements LegacyEncryptorProvider {\n  /** Instantiates the legacy encryptor provider.\n   *  @param encryptService injected into encryptors to perform encryption\n   *  @param keyService looks up keys for construction into an encryptor\n   */\n  constructor(\n    private readonly encryptService: EncryptService,\n    private readonly keyService: KeyService,\n  ) {}\n\n  userEncryptor$(frameSize: number, dependencies: SingleUserDependency) {\n    const packer = new PaddedDataPacker(frameSize);\n    const encryptor$ = dependencies.singleUserId$.pipe(\n      errorOnChange(\n        (userId) => userId,\n        (expectedUserId, actualUserId) => ({ expectedUserId, actualUserId }),\n      ),\n      connect((singleUserId$) => {\n        const singleUserId = new ReplaySubject<UserId>(1);\n        singleUserId$.subscribe(singleUserId);\n\n        return singleUserId.pipe(\n          switchMap((userId) =>\n            this.keyService.userKey$(userId).pipe(\n              // wait until the key becomes available\n              skipWhile((key) => !key),\n              // complete when the key becomes unavailable\n              takeWhile((key) => !!key),\n              map((key) => {\n                const encryptor = new UserKeyEncryptor(userId, this.encryptService, key, packer);\n\n                return { userId, encryptor } satisfies UserBound<\"encryptor\", UserEncryptor>;\n              }),\n              materialize(),\n            ),\n          ),\n          dematerialize(),\n          takeUntil(anyComplete(singleUserId)),\n        );\n      }),\n    );\n\n    return encryptor$;\n  }\n\n  organizationEncryptor$(frameSize: number, dependencies: SingleOrganizationDependency) {\n    const packer = new PaddedDataPacker(frameSize);\n    const encryptor$ = dependencies.singleOrganizationId$.pipe(\n      errorOnChange(\n        (pair) => pair.userId,\n        (expectedUserId, actualUserId) => ({ expectedUserId, actualUserId }),\n      ),\n      errorOnChange(\n        (pair) => pair.organizationId,\n        (expectedOrganizationId, actualOrganizationId) => ({\n          expectedOrganizationId,\n          actualOrganizationId,\n        }),\n      ),\n      connect((singleOrganizationId$) => {\n        const singleOrganizationId = new ReplaySubject<UserBound<\"organizationId\", OrganizationId>>(\n          1,\n        );\n        singleOrganizationId$.subscribe(singleOrganizationId);\n\n        return singleOrganizationId.pipe(\n          switchMap((pair) =>\n            this.keyService.orgKeys$(pair.userId).pipe(\n              // wait until the key becomes available\n              skipWhile((keys) => !keys),\n              // complete when the key becomes unavailable\n              takeWhile((keys) => !!keys),\n              map((keys) => {\n                const organizationId = pair.organizationId;\n                const key = keys[organizationId];\n                const encryptor = new OrganizationKeyEncryptor(\n                  organizationId,\n                  this.encryptService,\n                  key,\n                  packer,\n                );\n\n                return { organizationId, encryptor } satisfies OrganizationBound<\n                  \"encryptor\",\n                  OrganizationEncryptor\n                >;\n              }),\n              materialize(),\n            ),\n          ),\n          dematerialize(),\n          takeUntil(anyComplete(singleOrganizationId)),\n        );\n      }),\n    );\n\n    return encryptor$;\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { NgModule } from \"@angular/core\";\nimport { ReactiveFormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  CardComponent,\n  ColorPasswordModule,\n  CheckboxModule,\n  FormFieldModule,\n  IconButtonModule,\n  InputModule,\n  ItemModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  ToggleGroupModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CatchallSettingsComponent } from \"./catchall-settings.component\";\nimport { CredentialGeneratorComponent } from \"./credential-generator.component\";\nimport { ForwarderSettingsComponent } from \"./forwarder-settings.component\";\nimport { GeneratorServicesModule } from \"./generator-services.module\";\nimport { PassphraseSettingsComponent } from \"./passphrase-settings.component\";\nimport { PasswordGeneratorComponent } from \"./password-generator.component\";\nimport { PasswordSettingsComponent } from \"./password-settings.component\";\nimport { SubaddressSettingsComponent } from \"./subaddress-settings.component\";\nimport { UsernameGeneratorComponent } from \"./username-generator.component\";\nimport { UsernameSettingsComponent } from \"./username-settings.component\";\n\n/** Shared module containing generator component dependencies */\n@NgModule({\n  imports: [\n    CardComponent,\n    ColorPasswordModule,\n    CheckboxModule,\n    CommonModule,\n    FormFieldModule,\n    GeneratorServicesModule,\n    IconButtonModule,\n    InputModule,\n    ItemModule,\n    JslibModule,\n    ReactiveFormsModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    SelectModule,\n    ToggleGroupModule,\n    TypographyModule,\n  ],\n  declarations: [\n    CatchallSettingsComponent,\n    CredentialGeneratorComponent,\n    ForwarderSettingsComponent,\n    SubaddressSettingsComponent,\n    PasswordGeneratorComponent,\n    PassphraseSettingsComponent,\n    PasswordSettingsComponent,\n    UsernameGeneratorComponent,\n    UsernameSettingsComponent,\n  ],\n  exports: [CredentialGeneratorComponent, PasswordGeneratorComponent, UsernameGeneratorComponent],\n})\nexport class GeneratorModule {\n  constructor() {}\n}\n","<bit-item *ngFor=\"let credential of credentials$ | async\">\n  <bit-item-content>\n    <bit-color-password class=\"tw-font-mono\" [password]=\"credential.credential\" />\n    <div slot=\"secondary\">\n      {{ credential.generationDate | date: \"medium\" }}\n    </div>\n  </bit-item-content>\n  <ng-container slot=\"end\">\n    <bit-item-action>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        [appCopyClick]=\"credential.credential\"\n        [valueLabel]=\"getGeneratedValueText(credential)\"\n        [appA11yTitle]=\"getCopyText(credential)\"\n        showToast\n      >\n        {{ getCopyText(credential) }}\n      </button>\n    </bit-item-action>\n  </ng-container>\n</bit-item>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { RouterLink } from \"@angular/router\";\nimport { BehaviorSubject, distinctUntilChanged, map, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  ColorPasswordModule,\n  IconButtonModule,\n  ItemModule,\n  NoItemsModule,\n  SectionComponent,\n  SectionHeaderComponent,\n} from \"@bitwarden/components\";\nimport { CredentialGeneratorService } from \"@bitwarden/generator-core\";\nimport { GeneratedCredential, GeneratorHistoryService } from \"@bitwarden/generator-history\";\n\nimport { GeneratorModule } from \"./generator.module\";\n\n@Component({\n  standalone: true,\n  selector: \"bit-credential-generator-history\",\n  templateUrl: \"credential-generator-history.component.html\",\n  imports: [\n    ColorPasswordModule,\n    CommonModule,\n    IconButtonModule,\n    NoItemsModule,\n    JslibModule,\n    RouterLink,\n    ItemModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    GeneratorModule,\n  ],\n})\nexport class CredentialGeneratorHistoryComponent {\n  protected readonly userId$ = new BehaviorSubject<UserId>(null);\n  protected readonly credentials$ = new BehaviorSubject<GeneratedCredential[]>([]);\n\n  constructor(\n    private accountService: AccountService,\n    private generatorService: CredentialGeneratorService,\n    private history: GeneratorHistoryService,\n  ) {\n    this.accountService.activeAccount$\n      .pipe(\n        takeUntilDestroyed(),\n        map(({ id }) => id),\n        distinctUntilChanged(),\n      )\n      .subscribe(this.userId$);\n\n    this.userId$\n      .pipe(\n        takeUntilDestroyed(),\n        switchMap((id) => id && this.history.credentials$(id)),\n        map((credentials) => credentials.filter((c) => (c.credential ?? \"\") !== \"\")),\n      )\n      .subscribe(this.credentials$);\n  }\n\n  protected getCopyText(credential: GeneratedCredential) {\n    const info = this.generatorService.algorithm(credential.category);\n    return info.copy;\n  }\n\n  protected getGeneratedValueText(credential: GeneratedCredential) {\n    const info = this.generatorService.algorithm(credential.category);\n    return info.generatedValue;\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const NoCredentialsIcon = svgIcon`\n  <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"119\" height=\"114\" viewBox=\"0 0 119 114\" fill=\"none\">\n    <g clip-path=\"url(#clip0_201_7924)\">\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M35.2098 52.2486C35.9068 52.2486 36.4719 52.8137 36.4719 53.5107V58.2685C36.4719 58.9655 35.9068 59.5306 35.2098 59.5306C34.5128 59.5306 33.9478 58.9655 33.9478 58.2685V53.5107C33.9478 52.8137 34.5128 52.2486 35.2098 52.2486Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M40.9963 56.4125C41.2091 57.0762 40.8437 57.7868 40.18 57.9997L35.5951 59.4703C34.9314 59.6832 34.2208 59.3177 34.0079 58.654C33.795 57.9903 34.1605 57.2797 34.8242 57.0668L39.409 55.5962C40.0727 55.3833 40.7834 55.7487 40.9963 56.4125Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M34.471 57.2455C35.036 56.8374 35.8249 56.9647 36.233 57.5297L39.0445 61.4225C39.4526 61.9876 39.3254 62.7765 38.7603 63.1846C38.1952 63.5927 37.4063 63.4654 36.9982 62.9004L34.1868 59.0076C33.7787 58.4425 33.9059 57.6536 34.471 57.2455Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M35.94 57.2401C36.508 57.6441 36.6411 58.432 36.2371 59.0001L33.4689 62.8928C33.065 63.4609 32.277 63.5939 31.709 63.19C31.141 62.786 31.0079 61.9981 31.4119 61.43L34.1801 57.5373C34.584 56.9692 35.3719 56.8362 35.94 57.2401Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M29.4665 56.4091C29.6812 55.746 30.3929 55.3825 31.056 55.5972L35.5976 57.0679C36.2607 57.2826 36.6242 57.9942 36.4095 58.6573C36.1947 59.3205 35.4831 59.684 34.82 59.4692L30.2784 57.9986C29.6153 57.7839 29.2518 57.0723 29.4665 56.4091Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M50.6932 52.2487C51.3902 52.2487 51.9553 52.8137 51.9553 53.5107V58.2686C51.9553 58.9656 51.3902 59.5306 50.6932 59.5306C49.9962 59.5306 49.4312 58.9656 49.4312 58.2686V53.5107C49.4312 52.8137 49.9962 52.2487 50.6932 52.2487Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M56.4353 56.4088C56.6501 57.072 56.2866 57.7836 55.6234 57.9983L51.0819 59.4689C50.4187 59.6837 49.7071 59.3202 49.4924 58.657C49.2777 57.9939 49.6412 57.2823 50.3043 57.0676L54.8458 55.5969C55.509 55.3822 56.2206 55.7457 56.4353 56.4088Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M49.9544 57.2452C50.5194 56.8371 51.3083 56.9643 51.7164 57.5294L54.5279 61.4221C54.936 61.9872 54.8087 62.7761 54.2437 63.1842C53.6786 63.5923 52.8897 63.4651 52.4816 62.9L49.6702 59.0072C49.2621 58.4422 49.3893 57.6533 49.9544 57.2452Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M51.4331 57.2452C51.9982 57.6533 52.1254 58.4422 51.7173 59.0072L48.9059 62.9C48.4978 63.4651 47.7089 63.5923 47.1438 63.1842C46.5788 62.7761 46.4515 61.9872 46.8596 61.4221L49.6711 57.5294C50.0792 56.9643 50.8681 56.8371 51.4331 57.2452Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M44.9514 56.4088C45.1661 55.7457 45.8777 55.3822 46.5409 55.5969L51.0824 57.0676C51.7455 57.2823 52.109 57.9939 51.8943 58.657C51.6796 59.3202 50.968 59.6837 50.3048 59.4689L45.7633 57.9983C45.1001 57.7836 44.7366 57.072 44.9514 56.4088Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M60.5229 62.3772C60.5229 61.6802 61.088 61.1151 61.785 61.1151H70.7935C71.4905 61.1151 72.0556 61.6802 72.0556 62.3772C72.0556 63.0742 71.4905 63.6392 70.7935 63.6392H61.785C61.088 63.6392 60.5229 63.0742 60.5229 62.3772Z\" />\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M75.9663 62.3772C75.9663 61.6802 76.5314 61.1151 77.2284 61.1151H86.2369C86.9339 61.1151 87.4989 61.6802 87.4989 62.3772C87.4989 63.0742 86.9339 63.6392 86.2369 63.6392H77.2284C76.5314 63.6392 75.9663 63.0742 75.9663 62.3772Z\" />\n      <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M20.1396 57.9313C20.1396 50.6126 26.0726 44.6796 33.3914 44.6796H86.3982C93.7169 44.6796 99.6499 50.6126 99.6499 57.9313C99.6499 65.25 93.7169 71.183 86.3982 71.183H33.3914C26.0726 71.183 20.1396 65.25 20.1396 57.9313ZM33.3914 47.2037C27.4667 47.2037 22.6638 52.0066 22.6638 57.9313C22.6638 63.856 27.4667 68.6589 33.3914 68.6589H86.3982C92.3229 68.6589 97.1258 63.856 97.1258 57.9313C97.1258 52.0066 92.3229 47.2037 86.3982 47.2037H33.3914Z\"/>\n      <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M40.8279 11.8469C41.4764 12.1023 41.7952 12.835 41.5398 13.4836L37.3784 24.0525C37.123 24.701 36.3902 25.0198 35.7417 24.7644C35.0931 24.509 34.7744 23.7762 35.0298 23.1277L38.0204 15.5323C35.2016 16.9889 32.4865 18.7508 29.92 20.8232C9.44808 37.3546 6.25361 67.3517 22.785 87.8236C27.3496 93.4763 32.9382 97.8098 39.0683 100.775C39.6957 101.079 39.9583 101.834 39.6547 102.461C39.3512 103.089 38.5964 103.351 37.969 103.048C31.5107 99.9231 25.6247 95.3579 20.8212 89.4094C3.414 67.8529 6.77771 36.2666 28.3342 18.8594C31.1318 16.6003 34.0994 14.6905 37.1838 13.1248L29.3343 10.0341C28.6857 9.77875 28.367 9.04598 28.6223 8.39742C28.8777 7.74886 29.6105 7.43012 30.259 7.68548L40.8279 11.8469ZM84.1129 15.392C84.4739 14.7958 85.2499 14.6051 85.8462 14.9661C90.6935 17.901 95.1212 21.7125 98.8842 26.3725C116.291 47.929 112.928 79.5153 91.3711 96.9224C90.3117 97.7779 89.2278 98.5834 88.1224 99.339L96.3064 101.382C96.9827 101.551 97.394 102.236 97.2252 102.912C97.0564 103.588 96.3713 104 95.6951 103.831L84.6746 101.08C83.9984 100.911 83.587 100.226 83.7558 99.5498L86.5067 88.5294C86.6755 87.8531 87.3606 87.4417 88.0368 87.6105C88.7131 87.7794 89.1245 88.4644 88.9557 89.1407L86.9784 97.0621C87.9316 96.4005 88.8679 95.6994 89.7853 94.9586C110.257 78.4273 113.452 48.4302 96.9203 27.9583C93.3439 23.5293 89.1393 19.9108 84.5388 17.1253C83.9426 16.7643 83.7519 15.9883 84.1129 15.392Z\" />\n    </g>\n    <defs>\n      <clipPath id=\"clip0_201_7924\">\n        <rect width=\"119\" height=\"114\" fill=\"white\"/>\n      </clipPath>\n    </defs>\n  </svg>\n  `;\n","import { Component } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { IconModule, TypographyModule } from \"@bitwarden/components\";\n\nimport { NoCredentialsIcon } from \"./icons/no-credentials.icon\";\n\n@Component({\n  standalone: true,\n  selector: \"bit-empty-credential-history\",\n  templateUrl: \"empty-credential-history.component.html\",\n  imports: [JslibModule, IconModule, TypographyModule],\n})\nexport class EmptyCredentialHistoryComponent {\n  noCredentialsIcon = NoCredentialsIcon;\n\n  constructor() {}\n}\n","<div class=\"tw-flex tw-flex-col tw-h-full tw-justify-center\">\n  <div class=\"tw-text-center\">\n    <bit-icon [icon]=\"noCredentialsIcon\" aria-hidden=\"true\"></bit-icon>\n    <h2 bitTypography=\"h4\" class=\"tw-mt-3\">{{ \"nothingToShow\" | i18n }}</h2>\n    <div>{{ \"nothingGeneratedRecently\" | i18n }}</div>\n  </div>\n</div>\n","<bit-dialog #dialog background=\"alt\">\n  <span bitDialogTitle>{{ \"generatorHistory\" | i18n }}</span>\n  <ng-container bitDialogContent>\n    <bit-empty-credential-history *ngIf=\"!(hasHistory$ | async)\" style=\"display: contents\" />\n    <bit-credential-generator-history *ngIf=\"hasHistory$ | async\" />\n  </ng-container>\n  <ng-container bitDialogFooter>\n    <button\n      [disabled]=\"!(hasHistory$ | async)\"\n      bitButton\n      type=\"submit\"\n      buttonType=\"primary\"\n      (click)=\"clear()\"\n    >\n      {{ \"clearHistory\" | i18n }}\n    </button>\n  </ng-container>\n</bit-dialog>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { BehaviorSubject, distinctUntilChanged, firstValueFrom, map, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ButtonModule, DialogModule, DialogService } from \"@bitwarden/components\";\nimport { GeneratorHistoryService } from \"@bitwarden/generator-history\";\n\nimport { CredentialGeneratorHistoryComponent as CredentialGeneratorHistoryToolsComponent } from \"./credential-generator-history.component\";\nimport { EmptyCredentialHistoryComponent } from \"./empty-credential-history.component\";\n\n@Component({\n  templateUrl: \"credential-generator-history-dialog.component.html\",\n  standalone: true,\n  imports: [\n    ButtonModule,\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    CredentialGeneratorHistoryToolsComponent,\n    EmptyCredentialHistoryComponent,\n  ],\n})\nexport class CredentialGeneratorHistoryDialogComponent {\n  protected readonly hasHistory$ = new BehaviorSubject<boolean>(false);\n  protected readonly userId$ = new BehaviorSubject<UserId>(null);\n\n  constructor(\n    private accountService: AccountService,\n    private history: GeneratorHistoryService,\n    private dialogService: DialogService,\n  ) {\n    this.accountService.activeAccount$\n      .pipe(\n        takeUntilDestroyed(),\n        map(({ id }) => id),\n        distinctUntilChanged(),\n      )\n      .subscribe(this.userId$);\n\n    this.userId$\n      .pipe(\n        takeUntilDestroyed(),\n        switchMap((id) => id && this.history.credentials$(id)),\n        map((credentials) => credentials.length > 0),\n      )\n      .subscribe(this.hasHistory$);\n  }\n\n  clear = async () => {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"clearGeneratorHistoryTitle\" },\n      content: { key: \"cleargGeneratorHistoryDescription\" },\n      type: \"warning\",\n      acceptButtonText: { key: \"clearHistory\" },\n      cancelButtonText: { key: \"cancel\" },\n    });\n\n    if (confirmed) {\n      await this.history.clear(await firstValueFrom(this.userId$));\n    }\n  };\n}\n","<bit-section [disableMargin]=\"disableMargin\">\n  <bit-section-header *ngIf=\"showHeader\">\n    <h6 bitTypography=\"h6\">{{ \"options\" | i18n }}</h6>\n  </bit-section-header>\n  <form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n    <div class=\"tw-mb-4\">\n      <bit-card>\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"numWords\" | i18n }}</bit-label>\n          <input\n            bitInput\n            formControlName=\"numWords\"\n            id=\"num-words\"\n            type=\"number\"\n            (change)=\"save('numWords')\"\n          />\n          <bit-hint>{{ numWordsBoundariesHint$ | async }}</bit-hint>\n        </bit-form-field>\n      </bit-card>\n    </div>\n    <div>\n      <bit-card>\n        <bit-form-field>\n          <bit-label>{{ \"wordSeparator\" | i18n }}</bit-label>\n          <input\n            bitInput\n            formControlName=\"wordSeparator\"\n            id=\"word-separator\"\n            type=\"text\"\n            [maxlength]=\"wordSeparatorMaxLength\"\n            (change)=\"save('wordSeparator')\"\n          />\n        </bit-form-field>\n        <bit-form-control>\n          <input\n            bitCheckbox\n            formControlName=\"capitalize\"\n            id=\"capitalize\"\n            type=\"checkbox\"\n            (change)=\"save('capitalize')\"\n          />\n          <bit-label>{{ \"capitalize\" | i18n }}</bit-label>\n        </bit-form-control>\n        <bit-form-control [disableMargin]=\"!policyInEffect\">\n          <input\n            bitCheckbox\n            formControlName=\"includeNumber\"\n            id=\"include-number\"\n            type=\"checkbox\"\n            (change)=\"save('includeNumber')\"\n          />\n          <bit-label>{{ \"includeNumber\" | i18n }}</bit-label>\n        </bit-form-control>\n        <p *ngIf=\"policyInEffect\" bitTypography=\"helper\">{{ \"generatorPolicyInEffect\" | i18n }}</p>\n      </bit-card>\n    </div>\n  </form>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { OnInit, Input, Output, EventEmitter, Component, OnDestroy } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport {\n  BehaviorSubject,\n  skip,\n  takeUntil,\n  Subject,\n  map,\n  withLatestFrom,\n  ReplaySubject,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  Generators,\n  CredentialGeneratorService,\n  PassphraseGenerationOptions,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\nconst Controls = Object.freeze({\n  numWords: \"numWords\",\n  includeNumber: \"includeNumber\",\n  capitalize: \"capitalize\",\n  wordSeparator: \"wordSeparator\",\n});\n\n/** Options group for passphrases */\n@Component({\n  selector: \"tools-passphrase-settings\",\n  templateUrl: \"passphrase-settings.component.html\",\n})\nexport class PassphraseSettingsComponent implements OnInit, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param i18nService localize hints\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */\n  @Input()\n  showHeader: boolean = true;\n\n  /** Removes bottom margin from `bit-section` */\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<PassphraseGenerationOptions>();\n\n  protected settings = this.formBuilder.group({\n    [Controls.numWords]: [Generators.passphrase.settings.initial.numWords],\n    [Controls.wordSeparator]: [Generators.passphrase.settings.initial.wordSeparator],\n    [Controls.capitalize]: [Generators.passphrase.settings.initial.capitalize],\n    [Controls.includeNumber]: [Generators.passphrase.settings.initial.includeNumber],\n  });\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n    const settings = await this.generatorService.settings(Generators.passphrase, { singleUserId$ });\n\n    // skips reactive event emissions to break a subscription cycle\n    settings.withConstraints$\n      .pipe(takeUntil(this.destroyed$))\n      .subscribe(({ state, constraints }) => {\n        this.settings.patchValue(state, { emitEvent: false });\n\n        let boundariesHint = this.i18nService.t(\n          \"spinboxBoundariesHint\",\n          constraints.numWords.min?.toString(),\n          constraints.numWords.max?.toString(),\n        );\n        if (state.numWords <= (constraints.numWords.recommendation ?? 0)) {\n          boundariesHint += this.i18nService.t(\n            \"passphraseNumWordsRecommendationHint\",\n            constraints.numWords.recommendation?.toString(),\n          );\n        }\n        this.numWordsBoundariesHint.next(boundariesHint);\n      });\n\n    // the first emission is the current value; subsequent emissions are updates\n    settings.pipe(skip(1), takeUntil(this.destroyed$)).subscribe(this.onUpdated);\n\n    // explain policy & disable policy-overridden fields\n    this.generatorService\n      .policy$(Generators.passphrase, { userId$: singleUserId$ })\n      .pipe(takeUntil(this.destroyed$))\n      .subscribe(({ constraints }) => {\n        this.wordSeparatorMaxLength = constraints.wordSeparator.maxLength;\n        this.policyInEffect = constraints.policyInEffect;\n\n        this.toggleEnabled(Controls.capitalize, !constraints.capitalize?.readonly);\n        this.toggleEnabled(Controls.includeNumber, !constraints.includeNumber?.readonly);\n      });\n\n    // now that outputs are set up, connect inputs\n    this.saveSettings\n      .pipe(\n        withLatestFrom(this.settings.valueChanges),\n        map(([, settings]) => settings),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(settings);\n  }\n\n  /** attribute binding for wordSeparator[maxlength] */\n  protected wordSeparatorMaxLength: number;\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  /** display binding for enterprise policy notice */\n  protected policyInEffect: boolean;\n\n  private numWordsBoundariesHint = new ReplaySubject<string>(1);\n\n  /** display binding for min/max constraints of `numWords` */\n  protected numWordsBoundariesHint$ = this.numWordsBoundariesHint.asObservable();\n\n  private toggleEnabled(setting: keyof typeof Controls, enabled: boolean) {\n    if (enabled) {\n      this.settings.get(setting).enable({ emitEvent: false });\n    } else {\n      this.settings.get(setting).disable({ emitEvent: false });\n    }\n  }\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","<bit-section [disableMargin]=\"disableMargin\">\n  <bit-section-header *ngIf=\"showHeader\">\n    <h2 bitTypography=\"h6\">{{ \"options\" | i18n }}</h2>\n  </bit-section-header>\n  <form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n    <div class=\"tw-mb-4\">\n      <bit-card>\n        <bit-form-field disableMargin>\n          <bit-label>{{ \"length\" | i18n }}</bit-label>\n          <input bitInput formControlName=\"length\" type=\"number\" (change)=\"save('length')\" />\n          <bit-hint>{{ lengthBoundariesHint$ | async }}</bit-hint>\n        </bit-form-field>\n      </bit-card>\n    </div>\n    <div>\n      <bit-card>\n        <div class=\"tw-mb-4\">{{ \"include\" | i18n }}</div>\n        <div class=\"tw-flex tw-justify-between\">\n          <bit-form-control\n            class=\"tw-w-1/5\"\n            attr.aria-description=\"{{ 'uppercaseDescription' | i18n }}\"\n            title=\"{{ 'uppercaseDescription' | i18n }}\"\n          >\n            <input\n              bitCheckbox\n              type=\"checkbox\"\n              formControlName=\"uppercase\"\n              (change)=\"save('uppercase')\"\n            />\n            <bit-label>{{ \"uppercaseLabel\" | i18n }}</bit-label>\n          </bit-form-control>\n          <bit-form-control\n            class=\"tw-w-1/5\"\n            attr.aria-description=\"{{ 'lowercaseDescription' | i18n }}\"\n            title=\"{{ 'lowercaseDescription' | i18n }}\"\n          >\n            <input\n              bitCheckbox\n              type=\"checkbox\"\n              formControlName=\"lowercase\"\n              (change)=\"save('lowercase')\"\n            />\n            <bit-label>{{ \"lowercaseLabel\" | i18n }}</bit-label>\n          </bit-form-control>\n          <bit-form-control\n            class=\"tw-w-1/5\"\n            attr.aria-description=\"{{ 'numbersDescription' | i18n }}\"\n            title=\"{{ 'numbersDescription' | i18n }}\"\n          >\n            <input bitCheckbox type=\"checkbox\" formControlName=\"number\" (change)=\"save('number')\" />\n            <bit-label>{{ \"numbersLabel\" | i18n }}</bit-label>\n          </bit-form-control>\n          <bit-form-control\n            class=\"tw-w-2/5\"\n            attr.aria-description=\"{{ 'specialCharactersDescription' | i18n }}\"\n            title=\"{{ 'specialCharactersDescription' | i18n }}\"\n          >\n            <input\n              bitCheckbox\n              type=\"checkbox\"\n              formControlName=\"special\"\n              (change)=\"save('special')\"\n            />\n            <bit-label>{{ \"specialCharactersLabel\" | i18n }}</bit-label>\n          </bit-form-control>\n        </div>\n        <div class=\"tw-flex\">\n          <bit-form-field class=\"tw-w-full tw-basis-1/2 tw-mr-4\">\n            <bit-label>{{ \"minNumbers\" | i18n }}</bit-label>\n            <input\n              bitInput\n              type=\"number\"\n              formControlName=\"minNumber\"\n              (change)=\"save('minNumbers')\"\n            />\n          </bit-form-field>\n          <bit-form-field class=\"tw-w-full tw-basis-1/2\">\n            <bit-label>{{ \"minSpecial\" | i18n }}</bit-label>\n            <input\n              bitInput\n              type=\"number\"\n              formControlName=\"minSpecial\"\n              (change)=\"save('minSpecial')\"\n            />\n          </bit-form-field>\n        </div>\n        <bit-form-control [disableMargin]=\"!policyInEffect\">\n          <input\n            bitCheckbox\n            type=\"checkbox\"\n            formControlName=\"avoidAmbiguous\"\n            (change)=\"save('avoidAmbiguous')\"\n          />\n          <bit-label>{{ \"avoidAmbiguous\" | i18n }}</bit-label>\n        </bit-form-control>\n        <p *ngIf=\"policyInEffect\" bitTypography=\"helper\">{{ \"generatorPolicyInEffect\" | i18n }}</p>\n      </bit-card>\n    </div>\n  </form>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { OnInit, Input, Output, EventEmitter, Component, OnDestroy } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport {\n  BehaviorSubject,\n  takeUntil,\n  Subject,\n  map,\n  filter,\n  tap,\n  skip,\n  ReplaySubject,\n  withLatestFrom,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  Generators,\n  CredentialGeneratorService,\n  PasswordGenerationOptions,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\nconst Controls = Object.freeze({\n  length: \"length\",\n  uppercase: \"uppercase\",\n  lowercase: \"lowercase\",\n  number: \"number\",\n  special: \"special\",\n  minNumber: \"minNumber\",\n  minSpecial: \"minSpecial\",\n  avoidAmbiguous: \"avoidAmbiguous\",\n});\n\n/** Options group for passwords */\n@Component({\n  selector: \"tools-password-settings\",\n  templateUrl: \"password-settings.component.html\",\n})\nexport class PasswordSettingsComponent implements OnInit, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param i18nService localize hints\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the password component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** When `true`, an options header is displayed by the component. Otherwise, the header is hidden. */\n  @Input()\n  showHeader: boolean = true;\n\n  /** Number of milliseconds to wait before accepting user input. */\n  @Input()\n  waitMs: number = 100;\n\n  /** Removes bottom margin from `bit-section` */\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<PasswordGenerationOptions>();\n\n  protected settings = this.formBuilder.group({\n    [Controls.length]: [Generators.password.settings.initial.length],\n    [Controls.uppercase]: [Generators.password.settings.initial.uppercase],\n    [Controls.lowercase]: [Generators.password.settings.initial.lowercase],\n    [Controls.number]: [Generators.password.settings.initial.number],\n    [Controls.special]: [Generators.password.settings.initial.special],\n    [Controls.minNumber]: [Generators.password.settings.initial.minNumber],\n    [Controls.minSpecial]: [Generators.password.settings.initial.minSpecial],\n    [Controls.avoidAmbiguous]: [!Generators.password.settings.initial.ambiguous],\n  });\n\n  private get numbers() {\n    return this.settings.get(Controls.number);\n  }\n\n  private get special() {\n    return this.settings.get(Controls.special);\n  }\n\n  private get minNumber() {\n    return this.settings.get(Controls.minNumber);\n  }\n\n  private get minSpecial() {\n    return this.settings.get(Controls.minSpecial);\n  }\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n    const settings = await this.generatorService.settings(Generators.password, { singleUserId$ });\n\n    // bind settings to the UI\n    settings.withConstraints$\n      .pipe(\n        map(({ state, constraints }) => {\n          // interface is \"avoid\" while storage is \"include\"\n          const s: any = { ...state };\n          s.avoidAmbiguous = !s.ambiguous;\n          delete s.ambiguous;\n          return [s, constraints] as const;\n        }),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(([state, constraints]) => {\n        let boundariesHint = this.i18nService.t(\n          \"spinboxBoundariesHint\",\n          constraints.length.min?.toString(),\n          constraints.length.max?.toString(),\n        );\n        if (state.length <= (constraints.length.recommendation ?? 0)) {\n          boundariesHint += this.i18nService.t(\n            \"passwordLengthRecommendationHint\",\n            constraints.length.recommendation?.toString(),\n          );\n        }\n        this.lengthBoundariesHint.next(boundariesHint);\n\n        // skips reactive event emissions to break a subscription cycle\n        this.settings.patchValue(state, { emitEvent: false });\n      });\n\n    // explain policy & disable policy-overridden fields\n    this.generatorService\n      .policy$(Generators.password, { userId$: singleUserId$ })\n      .pipe(takeUntil(this.destroyed$))\n      .subscribe(({ constraints }) => {\n        this.policyInEffect = constraints.policyInEffect;\n\n        const toggles = [\n          [Controls.length, constraints.length.min < constraints.length.max],\n          [Controls.uppercase, !constraints.uppercase?.readonly],\n          [Controls.lowercase, !constraints.lowercase?.readonly],\n          [Controls.number, !constraints.number?.readonly],\n          [Controls.special, !constraints.special?.readonly],\n          [Controls.minNumber, constraints.minNumber.min < constraints.minNumber.max],\n          [Controls.minSpecial, constraints.minSpecial.min < constraints.minSpecial.max],\n        ] as [keyof typeof Controls, boolean][];\n\n        for (const [control, enabled] of toggles) {\n          this.toggleEnabled(control, enabled);\n        }\n      });\n\n    // cascade selections between checkboxes and spinboxes\n    // before the group saves their values\n    let lastMinNumber = 1;\n    this.numbers.valueChanges\n      .pipe(\n        filter((checked) => !(checked && this.minNumber.value > 0)),\n        map((checked) => (checked ? lastMinNumber : 0)),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe((value) => this.minNumber.setValue(value, { emitEvent: false }));\n\n    this.minNumber.valueChanges\n      .pipe(\n        map((value) => [value, value > 0] as const),\n        tap(([value, checkNumbers]) => (lastMinNumber = checkNumbers ? value : lastMinNumber)),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(([, checkNumbers]) => this.numbers.setValue(checkNumbers, { emitEvent: false }));\n\n    let lastMinSpecial = 1;\n    this.special.valueChanges\n      .pipe(\n        filter((checked) => !(checked && this.minSpecial.value > 0)),\n        map((checked) => (checked ? lastMinSpecial : 0)),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe((value) => this.minSpecial.setValue(value, { emitEvent: false }));\n\n    this.minSpecial.valueChanges\n      .pipe(\n        map((value) => [value, value > 0] as const),\n        tap(([value, checkSpecial]) => (lastMinSpecial = checkSpecial ? value : lastMinSpecial)),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(([, checkSpecial]) => this.special.setValue(checkSpecial, { emitEvent: false }));\n\n    // `onUpdated` depends on `settings` because the UserStateSubject is asynchronous;\n    // subscribing directly to `this.settings.valueChanges` introduces a race condition.\n    // skip the first emission because it's the initial value, not an update.\n    settings.pipe(skip(1), takeUntil(this.destroyed$)).subscribe(this.onUpdated);\n\n    // now that outputs are set up, connect inputs\n    this.saveSettings\n      .pipe(\n        withLatestFrom(this.settings.valueChanges),\n        map(([, settings]) => {\n          // interface is \"avoid\" while storage is \"include\"\n          const s: any = { ...settings };\n          s.ambiguous = !s.avoidAmbiguous;\n          delete s.avoidAmbiguous;\n          return s;\n        }),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(settings);\n  }\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  /** display binding for enterprise policy notice */\n  protected policyInEffect: boolean;\n\n  private lengthBoundariesHint = new ReplaySubject<string>(1);\n\n  /** display binding for min/max constraints of `length` */\n  protected lengthBoundariesHint$ = this.lengthBoundariesHint.asObservable();\n\n  private toggleEnabled(setting: keyof typeof Controls, enabled: boolean) {\n    if (enabled) {\n      this.settings.get(setting).enable({ emitEvent: false });\n    } else {\n      this.settings.get(setting).disable({ emitEvent: false });\n    }\n  }\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { BehaviorSubject, map, skip, Subject, takeUntil, withLatestFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  CredentialGeneratorService,\n  Generators,\n  SubaddressGenerationOptions,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\n/** Options group for plus-addressed emails */\n@Component({\n  selector: \"tools-subaddress-settings\",\n  templateUrl: \"subaddress-settings.component.html\",\n})\nexport class SubaddressSettingsComponent implements OnInit, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<SubaddressGenerationOptions>();\n\n  /** The template's control bindings */\n  protected settings = this.formBuilder.group({\n    subaddressEmail: [Generators.subaddress.settings.initial.subaddressEmail],\n  });\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n    const settings = await this.generatorService.settings(Generators.subaddress, { singleUserId$ });\n\n    settings.pipe(takeUntil(this.destroyed$)).subscribe((s) => {\n      this.settings.patchValue(s, { emitEvent: false });\n    });\n\n    // the first emission is the current value; subsequent emissions are updates\n    settings.pipe(skip(1), takeUntil(this.destroyed$)).subscribe(this.onUpdated);\n\n    this.saveSettings\n      .pipe(\n        withLatestFrom(this.settings.valueChanges),\n        map(([, settings]) => settings),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(settings);\n  }\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","<form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n  <bit-form-field>\n    <bit-label>{{ \"email\" | i18n }}</bit-label>\n    <input\n      bitInput\n      formControlName=\"subaddressEmail\"\n      type=\"text\"\n      (change)=\"save('subaddressEmail')\"\n    />\n  </bit-form-field>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport { BehaviorSubject, map, skip, Subject, takeUntil, withLatestFrom } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  CredentialGeneratorService,\n  EffUsernameGenerationOptions,\n  Generators,\n} from \"@bitwarden/generator-core\";\n\nimport { completeOnAccountSwitch } from \"./util\";\n\n/** Options group for usernames */\n@Component({\n  selector: \"tools-username-settings\",\n  templateUrl: \"username-settings.component.html\",\n})\nexport class UsernameSettingsComponent implements OnInit, OnDestroy {\n  /** Instantiates the component\n   *  @param accountService queries user availability\n   *  @param generatorService settings and policy logic\n   *  @param formBuilder reactive form controls\n   */\n  constructor(\n    private formBuilder: FormBuilder,\n    private generatorService: CredentialGeneratorService,\n    private accountService: AccountService,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Emits settings updates and completes if the settings become unavailable.\n   * @remarks this does not emit the initial settings. If you would like\n   *   to receive live settings updates including the initial update,\n   *   use `CredentialGeneratorService.settings$(...)` instead.\n   */\n  @Output()\n  readonly onUpdated = new EventEmitter<EffUsernameGenerationOptions>();\n\n  /** The template's control bindings */\n  protected settings = this.formBuilder.group({\n    wordCapitalize: [Generators.username.settings.initial.wordCapitalize],\n    wordIncludeNumber: [Generators.username.settings.initial.wordIncludeNumber],\n  });\n\n  async ngOnInit() {\n    const singleUserId$ = this.singleUserId$();\n    const settings = await this.generatorService.settings(Generators.username, { singleUserId$ });\n\n    settings.pipe(takeUntil(this.destroyed$)).subscribe((s) => {\n      this.settings.patchValue(s, { emitEvent: false });\n    });\n\n    // the first emission is the current value; subsequent emissions are updates\n    settings.pipe(skip(1), takeUntil(this.destroyed$)).subscribe(this.onUpdated);\n\n    this.saveSettings\n      .pipe(\n        withLatestFrom(this.settings.valueChanges),\n        map(([, settings]) => settings),\n        takeUntil(this.destroyed$),\n      )\n      .subscribe(settings);\n  }\n\n  private saveSettings = new Subject<string>();\n  save(site: string = \"component api call\") {\n    this.saveSettings.next(site);\n  }\n\n  private singleUserId$() {\n    // FIXME: this branch should probably scan for the user and make sure\n    // the account is unlocked\n    if (this.userId) {\n      return new BehaviorSubject(this.userId as UserId).asObservable();\n    }\n\n    return this.accountService.activeAccount$.pipe(\n      completeOnAccountSwitch(),\n      takeUntil(this.destroyed$),\n    );\n  }\n\n  private readonly destroyed$ = new Subject<void>();\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n}\n","<form class=\"box\" [formGroup]=\"settings\" class=\"tw-container\">\n  <bit-form-control>\n    <input\n      bitCheckbox\n      formControlName=\"wordCapitalize\"\n      type=\"checkbox\"\n      (change)=\"save('wordCapitalize')\"\n    />\n    <bit-label>{{ \"capitalize\" | i18n }}</bit-label>\n  </bit-form-control>\n  <bit-form-control>\n    <input\n      bitCheckbox\n      formControlName=\"wordIncludeNumber\"\n      type=\"checkbox\"\n      (change)=\"save('wordIncludeNumber')\"\n    />\n    <bit-label>{{ \"includeNumber\" | i18n }}</bit-label>\n  </bit-form-control>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ValidatorFn, Validators } from \"@angular/forms\";\nimport { distinctUntilChanged, map, pairwise, pipe, skipWhile, startWith, takeWhile } from \"rxjs\";\n\nimport { AnyConstraint, Constraints } from \"@bitwarden/common/tools/types\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CredentialGeneratorConfiguration } from \"@bitwarden/generator-core\";\n\nexport function completeOnAccountSwitch() {\n  return pipe(\n    map(({ id }: { id: UserId | null }) => id),\n    skipWhile((id) => !id),\n    startWith(null as UserId),\n    pairwise(),\n    takeWhile(([prev, next]) => (prev ?? next) === next),\n    map(([_, id]) => id),\n    distinctUntilChanged(),\n  );\n}\n\nexport function toValidators<Policy, Settings>(\n  target: keyof Settings,\n  configuration: CredentialGeneratorConfiguration<Settings, Policy>,\n  policy?: Constraints<Settings>,\n) {\n  const validators: Array<ValidatorFn> = [];\n\n  // widen the types to avoid typecheck issues\n  const config: AnyConstraint = configuration.settings.constraints[target];\n  const runtime: AnyConstraint = policy[target];\n\n  const required = getConstraint(\"required\", config, runtime) ?? false;\n  if (required) {\n    validators.push(Validators.required);\n  }\n\n  const maxLength = getConstraint(\"maxLength\", config, runtime);\n  if (maxLength !== undefined) {\n    validators.push(Validators.maxLength(maxLength));\n  }\n\n  const minLength = getConstraint(\"minLength\", config, runtime);\n  if (minLength !== undefined) {\n    validators.push(Validators.minLength(config.minLength));\n  }\n\n  const min = getConstraint(\"min\", config, runtime);\n  if (min !== undefined) {\n    validators.push(Validators.min(min));\n  }\n\n  const max = getConstraint(\"max\", config, runtime);\n  if (max !== undefined) {\n    validators.push(Validators.max(max));\n  }\n\n  return validators;\n}\n\nfunction getConstraint<Key extends keyof AnyConstraint>(\n  key: Key,\n  config: AnyConstraint,\n  policy?: AnyConstraint,\n) {\n  if (policy && key in policy) {\n    return policy[key] ?? config[key];\n  } else if (config && key in config) {\n    return config[key];\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Classifier } from \"@bitwarden/common/tools/state/classifier\";\n\nexport class PublicClassifier<Data> implements Classifier<Data, Data, Record<string, never>> {\n  constructor(private keys: (keyof Jsonify<Data>)[]) {}\n\n  classify(value: Data): { disclosed: Jsonify<Data>; secret: Jsonify<Record<string, never>> } {\n    const pickMe = JSON.parse(JSON.stringify(value));\n\n    const picked: Partial<Jsonify<Data>> = {};\n    for (const key of this.keys) {\n      picked[key] = pickMe[key];\n    }\n    const disclosed = picked as Jsonify<Data>;\n\n    return { disclosed, secret: null };\n  }\n\n  declassify(disclosed: Jsonify<Data>, _secret: Jsonify<Record<keyof Data, never>>) {\n    const result: Partial<Jsonify<Data>> = {};\n\n    for (const key of this.keys) {\n      result[key] = disclosed[key];\n    }\n\n    return result as Jsonify<Data>;\n  }\n}\n","import { BehaviorSubject, Observable } from \"rxjs\";\n\nimport {\n  Constraints,\n  DynamicStateConstraints,\n  StateConstraints,\n  SubjectConstraints,\n} from \"../types\";\n\n// The constraints type shares the properties of the state,\n// but never has any members\nconst EMPTY_CONSTRAINTS = new Proxy<any>(Object.freeze({}), {\n  get() {\n    return {};\n  },\n});\n\n/** A constraint that does nothing. */\nexport class IdentityConstraint<State extends object>\n  implements StateConstraints<State>, DynamicStateConstraints<State>\n{\n  /** Instantiate the identity constraint */\n  constructor() {}\n\n  readonly constraints: Readonly<Constraints<State>> = EMPTY_CONSTRAINTS;\n\n  calibrate() {\n    return this;\n  }\n\n  adjust(state: State) {\n    return state;\n  }\n\n  fix(state: State) {\n    return state;\n  }\n}\n\n/** Emits a constraint that does not alter the input state. */\nexport function unconstrained$<State extends object>(): Observable<SubjectConstraints<State>> {\n  const identity = new IdentityConstraint<State>();\n  const constraints$ = new BehaviorSubject(identity);\n\n  return constraints$;\n}\n","import { KeyService } from \"@bitwarden/key-management\";\n\nimport { Randomizer } from \"../abstractions\";\nimport { WordOptions } from \"../types\";\n\n/** A randomizer backed by a KeyService. */\nexport class KeyServiceRandomizer implements Randomizer {\n  /** instantiates the type.\n   * @param keyService generates random numbers\n   */\n  constructor(private keyService: KeyService) {}\n\n  async pick<Entry>(list: Array<Entry>): Promise<Entry> {\n    const length = list?.length ?? 0;\n    if (length <= 0) {\n      throw new Error(\"list must have at least one entry.\");\n    }\n\n    const index = await this.uniform(0, list.length - 1);\n    return list[index];\n  }\n\n  async pickWord(list: Array<string>, options?: WordOptions) {\n    let word = await this.pick(list);\n\n    if (options?.titleCase ?? false) {\n      word = word.charAt(0).toUpperCase() + word.slice(1);\n    }\n\n    if (options?.number ?? false) {\n      const num = await this.keyService.randomNumber(1, 9);\n      word = word + num.toString();\n    }\n\n    return word;\n  }\n\n  // ref: https://stackoverflow.com/a/12646864/1090359\n  async shuffle<T>(items: Array<T>, options?: { copy?: boolean }) {\n    const length = items?.length ?? 0;\n    if (length <= 0) {\n      throw new Error(\"items must have at least one entry.\");\n    }\n\n    const shuffled = (options?.copy ?? true) ? [...items] : items;\n\n    for (let i = shuffled.length - 1; i > 0; i--) {\n      const j = await this.uniform(0, i);\n      [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];\n    }\n\n    return shuffled;\n  }\n\n  async chars(length: number) {\n    let str = \"\";\n    const charSet = \"abcdefghijklmnopqrstuvwxyz1234567890\";\n    for (let i = 0; i < length; i++) {\n      const randomCharIndex = await this.uniform(0, charSet.length - 1);\n      str += charSet.charAt(randomCharIndex);\n    }\n    return str;\n  }\n\n  async uniform(min: number, max: number) {\n    return this.keyService.randomNumber(min, max);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\n\nimport { IntegrationMetadata } from \"./integration-metadata\";\nimport { ApiSettings, IntegrationRequest } from \"./rpc\";\n\n/** Utilities for processing integration settings */\nexport class IntegrationContext<Settings extends object> {\n  /** Instantiates an integration context\n   *  @param metadata - defines integration capabilities\n   *  @param i18n - localizes error messages\n   */\n  constructor(\n    readonly metadata: IntegrationMetadata,\n    protected settings: Settings,\n    protected i18n: I18nService,\n  ) {}\n\n  /** Lookup the integration's baseUrl\n   *  @returns the baseUrl for the API's integration point.\n   *   - By default this is defined by the metadata\n   *   - When a service allows self-hosting, this can be supplied by `settings`.\n   *  @throws a localized error message when a base URL is neither defined by the metadata or\n   *   supplied by an argument.\n   */\n  baseUrl(): string {\n    // normalize baseUrl\n    const setting =\n      (this.settings && \"baseUrl\" in this.settings\n        ? (this.settings.baseUrl as string)\n        : undefined) ?? \"\";\n    let result = \"\";\n\n    // look up definition\n    if (this.metadata.selfHost === \"always\") {\n      result = setting;\n    } else if (this.metadata.selfHost === \"never\" || setting.length <= 0) {\n      result = this.metadata.baseUrl ?? \"\";\n    } else {\n      result = setting;\n    }\n\n    // postconditions\n    if (result === \"\") {\n      const error = this.i18n.t(\"forwarderNoUrl\", this.metadata.name);\n      throw error;\n    }\n\n    return result;\n  }\n\n  /** look up a service API's authentication token\n   *  @param options.base64 when `true`, base64 encodes the result. Defaults to `false`.\n   *  @param options.suffix a string to append to the token. Defaults to empty.\n   *  @returns the user's authentication token\n   *  @throws a localized error message when the token is invalid.\n   *  @remarks the string is thrown for backwards compatibility\n   */\n  authenticationToken(\n    options: { base64?: boolean; suffix?: string } = null,\n  ): Settings extends ApiSettings ? string : never {\n    // normalize `token` then assert it has a value\n    let token = \"token\" in this.settings ? ((this.settings.token as string) ?? \"\") : \"\";\n    if (token === \"\") {\n      const error = this.i18n.t(\"forwaderInvalidToken\", this.metadata.name);\n      throw error;\n    }\n\n    // if a suffix exists, it needs to be included before encoding\n    token += options?.suffix ?? \"\";\n    if (options?.base64) {\n      token = Utils.fromUtf8ToB64(token);\n    }\n\n    return token;\n  }\n\n  /** look up the website the integration is working with.\n   *  @param request supplies information about the state of the extension site\n   *  @returns The website or an empty string if a website isn't available\n   *  @remarks `website` is usually supplied when generating a credential from the vault\n   */\n  website(request: IntegrationRequest) {\n    return request.website ?? \"\";\n  }\n\n  /** look up localized text indicating Bitwarden requested the forwarding address.\n   *  @param request supplies information about the state of the extension site\n   *  @returns localized text describing a generated forwarding address\n   */\n  generatedBy(request: IntegrationRequest) {\n    const website = this.website(request);\n\n    const descriptionId =\n      website === \"\" ? \"forwarderGeneratedBy\" : \"forwarderGeneratedByWithWebsite\";\n    const description = this.i18n.t(descriptionId, website);\n\n    return description;\n  }\n}\n","import { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { IntegrationContext } from \"@bitwarden/common/tools/integration/integration-context\";\nimport { ApiSettings } from \"@bitwarden/common/tools/integration/rpc\";\n\nimport { ForwarderConfiguration } from \"./forwarder-configuration\";\nimport { EmailDomainSettings, EmailPrefixSettings } from \"./settings\";\n\n/**\n * Surfaces contextual information to forwarder integrations.\n */\nexport class ForwarderContext<Settings extends ApiSettings> extends IntegrationContext<Settings> {\n  /** Instantiates the context.\n   * @param configuration of the forwarder this context assists\n   * @param settings loaded from the forwarder's state\n   * @param i18n localizes error handling\n   */\n  constructor(\n    readonly configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n    i18n: I18nService,\n  ) {\n    super(configuration, settings, i18n);\n  }\n\n  /** look up the domain part of an email address from the forwarder's settings.\n   *  @returns a domain part of an email address\n   *  @throws a localized error message when the domain isn't found.\n   *  @remarks the string is thrown for backwards compatibility\n   */\n  emailDomain(): Settings extends EmailDomainSettings ? string : never {\n    const domain = \"domain\" in this.settings ? (this.settings.domain ?? \"\") : \"\";\n    if (domain === \"\") {\n      const error = this.i18n.t(\"forwarderNoDomain\", this.configuration.name);\n      throw error;\n    }\n\n    return domain as any;\n  }\n\n  /** look up a prefix applied to the email address from the forwarder's settings.\n   *  @returns the prefix\n   *  @throws a localized error message when the prefix isn't found.\n   *  @remarks the string is thrown for backwards compatibility\n   */\n  emailPrefix(): Settings extends EmailPrefixSettings ? string : never {\n    const prefix = \"prefix\" in this.settings ? (this.settings.prefix ?? \"\") : \"\";\n    if (prefix === \"\") {\n      const error = this.i18n.t(\"forwarderNoPrefix\", this.configuration.name);\n      throw error;\n    }\n\n    return prefix as any;\n  }\n\n  /** look up a localized error message indicating an account id is required\n   *  but wasn't found.\n   *  @remarks this returns a string instead of throwing it so that the\n   *    user can decide upon control flow.\n   */\n  missingAccountIdCause() {\n    return this.i18n.t(\"forwarderNoAccountId\", this.configuration.name);\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { CredentialAlgorithm } from \"./generator-type\";\n\n/** A credential generation result */\nexport class GeneratedCredential {\n  /**\n   * Instantiates a generated credential\n   * @param credential The value of the generated credential (e.g. a password)\n   * @param category The kind of credential\n   * @param generationDate The date that the credential was generated.\n   *   Numeric values should are interpreted using {@link Date.valueOf}\n   *   semantics.\n   */\n  constructor(\n    readonly credential: string,\n    readonly category: CredentialAlgorithm,\n    generationDate: Date | number,\n  ) {\n    if (typeof generationDate === \"number\") {\n      this.generationDate = new Date(generationDate);\n    } else {\n      this.generationDate = generationDate;\n    }\n  }\n\n  /** The date that the credential was generated */\n  generationDate: Date;\n\n  /** Constructs a credential from its `toJSON` representation */\n  static fromJSON(jsonValue: Jsonify<GeneratedCredential>) {\n    return new GeneratedCredential(\n      jsonValue.credential,\n      jsonValue.category,\n      jsonValue.generationDate,\n    );\n  }\n\n  /** Serializes a credential to a JSON-compatible object */\n  toJSON() {\n    return {\n      credential: this.credential,\n      category: this.category,\n      generationDate: this.generationDate.valueOf(),\n    };\n  }\n}\n","/** Types of passwords that may be generated by the credential generator */\nexport const PasswordAlgorithms = Object.freeze([\"password\", \"passphrase\"] as const);\n\n/** Types of usernames that may be generated by the credential generator */\nexport const UsernameAlgorithms = Object.freeze([\"username\"] as const);\n\n/** Types of email addresses that may be generated by the credential generator */\nexport const EmailAlgorithms = Object.freeze([\"catchall\", \"subaddress\"] as const);\n\n/** All types of credentials that may be generated by the credential generator */\nexport const CredentialAlgorithms = Object.freeze([\n  ...PasswordAlgorithms,\n  ...UsernameAlgorithms,\n  ...EmailAlgorithms,\n] as const);\n","import { IntegrationId } from \"@bitwarden/common/tools/integration\";\n\nimport { EmailAlgorithms, PasswordAlgorithms, UsernameAlgorithms } from \"../data/generator-types\";\n\n/** A type of password that may be generated by the credential generator. */\nexport type PasswordAlgorithm = (typeof PasswordAlgorithms)[number];\n\n/** A type of username that may be generated by the credential generator. */\nexport type UsernameAlgorithm = (typeof UsernameAlgorithms)[number];\n\n/** A type of email address that may be generated by the credential generator. */\nexport type EmailAlgorithm = (typeof EmailAlgorithms)[number];\n\nexport type ForwarderIntegration = { forwarder: IntegrationId };\n\n/** Returns true when the input algorithm is a forwarder integration. */\nexport function isForwarderIntegration(\n  algorithm: CredentialAlgorithm,\n): algorithm is ForwarderIntegration {\n  return algorithm && typeof algorithm === \"object\" && \"forwarder\" in algorithm;\n}\n\nexport function isSameAlgorithm(lhs: CredentialAlgorithm, rhs: CredentialAlgorithm) {\n  if (lhs === rhs) {\n    return true;\n  } else if (isForwarderIntegration(lhs) && isForwarderIntegration(rhs)) {\n    return lhs.forwarder === rhs.forwarder;\n  } else {\n    return false;\n  }\n}\n\n/** A type of credential that may be generated by the credential generator. */\nexport type CredentialAlgorithm =\n  | PasswordAlgorithm\n  | UsernameAlgorithm\n  | EmailAlgorithm\n  | ForwarderIntegration;\n\n/** Compound credential types supported by the credential generator. */\nexport const CredentialCategories = Object.freeze({\n  /** Lists algorithms in the \"password\" credential category */\n  password: PasswordAlgorithms as Readonly<PasswordAlgorithm[]>,\n\n  /** Lists algorithms in the \"username\" credential category */\n  username: UsernameAlgorithms as Readonly<UsernameAlgorithm[]>,\n\n  /** Lists algorithms in the \"email\" credential category */\n  email: EmailAlgorithms as Readonly<(EmailAlgorithm | ForwarderIntegration)[]>,\n});\n\n/** Returns true when the input algorithm is a password algorithm. */\nexport function isPasswordAlgorithm(\n  algorithm: CredentialAlgorithm,\n): algorithm is PasswordAlgorithm {\n  return PasswordAlgorithms.includes(algorithm as any);\n}\n\n/** Returns true when the input algorithm is a username algorithm. */\nexport function isUsernameAlgorithm(\n  algorithm: CredentialAlgorithm,\n): algorithm is UsernameAlgorithm {\n  return UsernameAlgorithms.includes(algorithm as any);\n}\n\n/** Returns true when the input algorithm is an email algorithm. */\nexport function isEmailAlgorithm(algorithm: CredentialAlgorithm): algorithm is EmailAlgorithm {\n  return EmailAlgorithms.includes(algorithm as any) || isForwarderIntegration(algorithm);\n}\n\n/** A type of compound credential that may be generated by the credential generator. */\nexport type CredentialCategory = keyof typeof CredentialCategories;\n\n/** The kind of credential to generate using a compound configuration. */\n// FIXME: extend the preferences to include a preferred forwarder\nexport type CredentialPreference = {\n  [Key in CredentialCategory]: {\n    algorithm: (typeof CredentialCategories)[Key][number];\n    updated: Date;\n  };\n};\n","import { CharacterSet, CharacterSets } from \"./types\";\n\nfunction toCharacterSet(characters: string) {\n  const set = characters.split(\"\");\n\n  return Object.freeze(set as CharacterSet);\n}\n\nconst SpecialCharacters = toCharacterSet(\"!@#$%^&*\");\n\n/** Sets of Ascii characters used for password generation */\nexport const Ascii = Object.freeze({\n  /** The full set of characters available to the generator */\n  Full: Object.freeze({\n    Uppercase: toCharacterSet(\"ABCDEFGHIJKLMNOPQRSTUVWXYZ\"),\n    Lowercase: toCharacterSet(\"abcdefghijklmnopqrstuvwxyz\"),\n    Digit: toCharacterSet(\"0123456789\"),\n    Special: SpecialCharacters,\n  } as CharacterSets),\n\n  /** All characters available to the generator that are not ambiguous. */\n  Unmistakable: Object.freeze({\n    Uppercase: toCharacterSet(\"ABCDEFGHJKLMNPQRSTUVWXYZ\"),\n    Lowercase: toCharacterSet(\"abcdefghijkmnopqrstuvwxyz\"),\n    Digit: toCharacterSet(\"23456789\"),\n    Special: SpecialCharacters,\n  } as CharacterSets),\n});\n\n/** Splits an email into a username, subaddress, and domain named group.\n * Subaddress is optional.\n */\nexport const SUBADDRESS_PARSER = new RegExp(\n  \"(?<username>[^@+]+)(?<subaddress>\\\\+.+)?(?<domain>@.+)\",\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EFFLongWordList } from \"@bitwarden/common/platform/misc/wordlist\";\nimport { GenerationRequest } from \"@bitwarden/common/tools/types\";\n\nimport {\n  CatchallGenerationOptions,\n  CredentialGenerator,\n  GeneratedCredential,\n  SubaddressGenerationOptions,\n} from \"../types\";\n\nimport { Randomizer } from \"./abstractions\";\nimport { SUBADDRESS_PARSER } from \"./data\";\n\n/** Generation algorithms that produce randomized email addresses */\nexport class EmailRandomizer\n  implements\n    CredentialGenerator<CatchallGenerationOptions>,\n    CredentialGenerator<SubaddressGenerationOptions>\n{\n  /** Instantiates the email randomizer\n   *  @param random data source for random data\n   */\n  constructor(private random: Randomizer) {}\n\n  /** Appends a random set of characters as a subaddress\n   *  @param email the email address used to generate a subaddress. If this address\n   *    already contains a subaddress, the subaddress is extended.\n   *  @param options.length the number of characters to append to the subaddress. Defaults to 8. If\n   *    the length is <= 0, the function returns the input address.\n   *  @returns a promise that resolves with the generated email address. If the provided address\n   *    lacks a username (the part before the \"@\") or domain (the part after the \"@\"), the function\n   *    returns the input address.\n   */\n  async randomAsciiSubaddress(email: string, options?: { length?: number }) {\n    let result = email ?? \"\";\n\n    const subaddressLength = options?.length ?? 8;\n    if (subaddressLength < 1) {\n      return result;\n    }\n\n    const parsed = SUBADDRESS_PARSER.exec(result);\n    if (!parsed) {\n      return result;\n    }\n\n    let subaddress = parsed.groups.subaddress ?? \"+\";\n    subaddress += await this.random.chars(subaddressLength);\n    result = `${parsed.groups.username}${subaddress}${parsed.groups.domain}`;\n\n    return result;\n  }\n\n  /** Creates a catchall address composed of random characters\n   *  @param domain the domain part of the generated email address.\n   *  @param options.length the number of characters to include in the catchall\n   *    address. Defaults to 8.\n   *  @returns a promise that resolves with the generated email address. If the domain\n   *    is empty, resolves to null instead.\n   */\n  async randomAsciiCatchall(domain: string, options?: { length?: number }) {\n    const emailDomain = domain?.startsWith(\"@\") ? domain.substring(1, Infinity) : (domain ?? \"\");\n    if (emailDomain.length < 1) {\n      return null;\n    }\n\n    const length = options?.length ?? 8;\n    if (length < 1) {\n      return null;\n    }\n\n    const catchall = await this.random.chars(length);\n    const result = `${catchall}@${domain}`;\n\n    return result;\n  }\n\n  /** Creates a catchall address composed of random words\n   *  @param domain the domain part of the generated email address.\n   *  @param options.numberOfWords the number of words to include in the catchall\n   *    address. Defaults to 1.\n   *  @param options.words selects words from the provided wordlist. Defaults to\n   *    the EFF \"5-dice\" list.\n   *  @returns a promise that resolves with the generated email address.\n   */\n  async randomWordsCatchall(\n    domain: string,\n    options?: { numberOfWords?: number; words?: Array<string> },\n  ) {\n    const emailDomain = domain?.startsWith(\"@\") ? domain.substring(1, Infinity) : (domain ?? \"\");\n    if (emailDomain.length < 1) {\n      return null;\n    }\n\n    const numberOfWords = options?.numberOfWords ?? 1;\n    if (numberOfWords < 1) {\n      return null;\n    }\n\n    const wordList = options?.words ?? EFFLongWordList;\n    const words = [];\n    for (let i = 0; i < numberOfWords; i++) {\n      // camelCase the words for legibility\n      words[i] = await this.random.pickWord(wordList, { titleCase: i !== 0 });\n    }\n\n    const result = `${words.join(\"\")}@${domain}`;\n\n    return result;\n  }\n\n  generate(\n    request: GenerationRequest,\n    settings: CatchallGenerationOptions,\n  ): Promise<GeneratedCredential>;\n  generate(\n    request: GenerationRequest,\n    settings: SubaddressGenerationOptions,\n  ): Promise<GeneratedCredential>;\n  async generate(\n    _request: GenerationRequest,\n    settings: CatchallGenerationOptions | SubaddressGenerationOptions,\n  ) {\n    if (isCatchallGenerationOptions(settings)) {\n      const email = await this.randomAsciiCatchall(settings.catchallDomain);\n\n      return new GeneratedCredential(email, \"catchall\", Date.now());\n    } else if (isSubaddressGenerationOptions(settings)) {\n      const email = await this.randomAsciiSubaddress(settings.subaddressEmail);\n\n      return new GeneratedCredential(email, \"subaddress\", Date.now());\n    }\n\n    throw new Error(\"Invalid settings received by generator.\");\n  }\n}\n\nfunction isCatchallGenerationOptions(settings: any): settings is CatchallGenerationOptions {\n  return \"catchallDomain\" in (settings ?? {});\n}\n\nfunction isSubaddressGenerationOptions(settings: any): settings is SubaddressGenerationOptions {\n  return \"subaddressEmail\" in (settings ?? {});\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { SUBADDRESS_PARSER } from \"./data\";\n\n/** Generation algorithms that produce deterministic email addresses */\nexport class EmailCalculator {\n  /**\n   * Appends appendText to the subaddress of an email address.\n   * @param appendText  The calculation fails if this is shorter than 1 character\n   *   long, undefined, or null.\n   * @param email the email address to alter.\n   * @returns `email` with `appendText` added to its subaddress (the part\n   *   following the \"+\"). If there is no subaddress, a subaddress is created.\n   *   If the email address fails to parse, it is returned unaltered.\n   */\n  appendToSubaddress(appendText: string, email: string) {\n    let result = (email ?? \"\").trim();\n\n    const suffix = (appendText ?? \"\").trim();\n    if (suffix.length < 1) {\n      return result;\n    }\n\n    const parsed = SUBADDRESS_PARSER.exec(result);\n    if (!parsed) {\n      return result;\n    }\n\n    const subaddress = (parsed.groups.subaddress ?? \"+\") + suffix;\n    result = `${parsed.groups.username}${subaddress}${parsed.groups.domain}`;\n\n    return result;\n  }\n\n  /**\n   * Derives an email address from a username and domain name.\n   * @param username the username part of the email address. The calculation fails if this is\n   *   shorter than 1 character long, undefined, or null.\n   * @param domain the domain part of the email address. The calculation fails if this is empty,\n   *   undefined, or null.\n   * @returns an email address or `null` if the calculation fails.\n   */\n  concatenate(username: string, domain: string) {\n    const emailDomain = domain?.startsWith(\"@\") ? domain.substring(1, Infinity) : (domain ?? \"\");\n    if (emailDomain.length < 1) {\n      return null;\n    }\n\n    const emailWebsite = username ?? \"\";\n    if (emailWebsite.length < 1) {\n      return null;\n    }\n\n    const result = `${emailWebsite}@${emailDomain}`;\n\n    return result;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { BehaviorSubject, Observable } from \"rxjs\";\n\nimport {\n  SingleUserState,\n  StateProvider,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport {\n  DefaultPassphraseBoundaries,\n  DefaultPassphraseGenerationOptions,\n  DefaultPasswordGenerationOptions,\n} from \"./data\";\nimport { PassphraseGenerationOptions, PasswordGenerationOptions } from \"./types\";\n\n/** construct a method that outputs a copy of `defaultValue` as an observable. */\nexport function observe$PerUserId<Value>(\n  create: () => Partial<Value>,\n): (key: UserId) => Observable<Value> {\n  const _subjects = new Map<UserId, BehaviorSubject<Value>>();\n\n  return (key: UserId) => {\n    let value = _subjects.get(key);\n\n    if (value === undefined) {\n      const initialValue = create();\n      value = new BehaviorSubject({ ...initialValue } as Value);\n      _subjects.set(key, value);\n    }\n\n    return value.asObservable();\n  };\n}\n\n/** construct a method that caches user-specific states by userid. */\nexport function sharedByUserId<Value>(create: (userId: UserId) => SingleUserState<Value>) {\n  const _subjects = new Map<UserId, SingleUserState<Value>>();\n\n  return (key: UserId) => {\n    let value = _subjects.get(key);\n\n    if (value === undefined) {\n      value = create(key);\n      _subjects.set(key, value);\n    }\n\n    return value;\n  };\n}\n\n/** construct a method that loads a user-specific state from the provider. */\nexport function sharedStateByUserId<Value>(key: UserKeyDefinition<Value>, provider: StateProvider) {\n  return (id: UserId) => provider.getUser<Value>(id, key);\n}\n\n/** returns the sum of items in the list. */\nexport const sum = (...items: number[]) =>\n  (items ?? []).reduce((sum: number, current: number) => sum + (current ?? 0), 0);\n\n/* converts password generation option sets, which are defined by\n * an \"enabled\" and \"quantity\" parameter, to the password engine's\n * parameters, which represent disabled options as `undefined`\n * properties.\n */\nexport function optionsToRandomAsciiRequest(options: PasswordGenerationOptions) {\n  // helper for processing common option sets\n  function process(\n    // values read from the options\n    enabled: boolean,\n    quantity: number,\n    // value used if an option is missing\n    defaultEnabled: boolean,\n    defaultQuantity: number,\n  ) {\n    const isEnabled = enabled ?? defaultEnabled;\n    const actualQuantity = quantity ?? defaultQuantity;\n    const result = isEnabled ? actualQuantity : undefined;\n\n    return result;\n  }\n\n  const request = {\n    uppercase: process(\n      options.uppercase,\n      options.minUppercase,\n      DefaultPasswordGenerationOptions.uppercase,\n      DefaultPasswordGenerationOptions.minUppercase,\n    ),\n    lowercase: process(\n      options.lowercase,\n      options.minLowercase,\n      DefaultPasswordGenerationOptions.lowercase,\n      DefaultPasswordGenerationOptions.minLowercase,\n    ),\n    digits: process(\n      options.number,\n      options.minNumber,\n      DefaultPasswordGenerationOptions.number,\n      DefaultPasswordGenerationOptions.minNumber,\n    ),\n    special: process(\n      options.special,\n      options.minSpecial,\n      DefaultPasswordGenerationOptions.special,\n      DefaultPasswordGenerationOptions.minSpecial,\n    ),\n    ambiguous: options.ambiguous ?? DefaultPasswordGenerationOptions.ambiguous,\n    all: 0,\n  };\n\n  // engine represents character sets as \"include only\"; you assert how many all\n  // characters there can be rather than a total length. This conversion has\n  // the character classes win, so that the result is always consistent with policy\n  // minimums.\n  const required = sum(request.uppercase, request.lowercase, request.digits, request.special);\n  const remaining = (options.length ?? 0) - required;\n  request.all = Math.max(remaining, 0);\n\n  return request;\n}\n\n/* converts passphrase generation option sets to the eff word list request\n */\nexport function optionsToEffWordListRequest(options: PassphraseGenerationOptions) {\n  const requestWords = options.numWords ?? DefaultPassphraseGenerationOptions.numWords;\n  const request = {\n    numberOfWords: Math.max(requestWords, DefaultPassphraseBoundaries.numWords.min),\n    capitalize: options.capitalize ?? DefaultPassphraseGenerationOptions.capitalize,\n    number: options.includeNumber ?? DefaultPassphraseGenerationOptions.includeNumber,\n    separator: options.wordSeparator ?? DefaultPassphraseGenerationOptions.wordSeparator,\n  };\n\n  return request;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { EFFLongWordList } from \"@bitwarden/common/platform/misc/wordlist\";\nimport { GenerationRequest } from \"@bitwarden/common/tools/types\";\n\nimport {\n  CredentialGenerator,\n  GeneratedCredential,\n  PassphraseGenerationOptions,\n  PasswordGenerationOptions,\n} from \"../types\";\nimport { optionsToEffWordListRequest, optionsToRandomAsciiRequest } from \"../util\";\n\nimport { Randomizer } from \"./abstractions\";\nimport { Ascii } from \"./data\";\nimport { CharacterSet, EffWordListRequest, RandomAsciiRequest } from \"./types\";\n\n/** Generation algorithms that produce randomized secrets */\nexport class PasswordRandomizer\n  implements\n    CredentialGenerator<PassphraseGenerationOptions>,\n    CredentialGenerator<PasswordGenerationOptions>\n{\n  /** Instantiates the password randomizer\n   *  @param randomizer data source for random data\n   */\n  constructor(private randomizer: Randomizer) {}\n\n  /** create a password from ASCII codepoints\n   *  @param request refines the generated password\n   *  @returns a promise that completes with the generated password\n   */\n  async randomAscii(request: RandomAsciiRequest) {\n    // randomize character sets\n    const sets = toAsciiSets(request);\n    const shuffled = await this.randomizer.shuffle(sets);\n\n    // generate password\n    const generating = shuffled.flatMap((set) => this.randomizer.pick(set));\n    const generated = await Promise.all(generating);\n    const result = generated.join(\"\");\n\n    return result;\n  }\n\n  /** create a passphrase from the EFF's \"5 dice\" word list\n   *  @param request refines the generated passphrase\n   * @returns a promise that completes with the generated passphrase\n   */\n  async randomEffLongWords(request: EffWordListRequest) {\n    // select which word gets the number, if any\n    let luckyNumber = -1;\n    if (request.number) {\n      luckyNumber = await this.randomizer.uniform(0, request.numberOfWords - 1);\n    }\n\n    // generate the passphrase\n    const wordList = new Array(request.numberOfWords);\n    for (let i = 0; i < request.numberOfWords; i++) {\n      const word = await this.randomizer.pickWord(EFFLongWordList, {\n        titleCase: request.capitalize,\n        number: i === luckyNumber,\n      });\n\n      wordList[i] = word;\n    }\n\n    return wordList.join(request.separator);\n  }\n\n  generate(\n    request: GenerationRequest,\n    settings: PasswordGenerationOptions,\n  ): Promise<GeneratedCredential>;\n  generate(\n    request: GenerationRequest,\n    settings: PassphraseGenerationOptions,\n  ): Promise<GeneratedCredential>;\n  async generate(\n    _request: GenerationRequest,\n    settings: PasswordGenerationOptions | PassphraseGenerationOptions,\n  ) {\n    if (isPasswordGenerationOptions(settings)) {\n      const request = optionsToRandomAsciiRequest(settings);\n      const password = await this.randomAscii(request);\n\n      return new GeneratedCredential(password, \"password\", Date.now());\n    } else if (isPassphraseGenerationOptions(settings)) {\n      const request = optionsToEffWordListRequest(settings);\n      const passphrase = await this.randomEffLongWords(request);\n\n      return new GeneratedCredential(passphrase, \"passphrase\", Date.now());\n    }\n\n    throw new Error(\"Invalid settings received by generator.\");\n  }\n}\n\nfunction isPasswordGenerationOptions(settings: any): settings is PasswordGenerationOptions {\n  return \"length\" in (settings ?? {});\n}\n\nfunction isPassphraseGenerationOptions(settings: any): settings is PassphraseGenerationOptions {\n  return \"numWords\" in (settings ?? {});\n}\n\n// given a generator request, convert each of its `number | undefined` properties\n// to an array of character sets, one for each property. The transformation is\n// deterministic.\nfunction toAsciiSets(request: RandomAsciiRequest) {\n  // allocate an array and initialize each cell with a fixed value\n  function allocate<T>(size: number, value: T) {\n    const data = new Array(size > 0 ? size : 0);\n    data.fill(value, 0, size);\n    return data;\n  }\n\n  const allSet: CharacterSet = [];\n  const active = request.ambiguous ? Ascii.Full : Ascii.Unmistakable;\n  const parts: Array<CharacterSet> = [];\n\n  if (request.uppercase !== undefined) {\n    parts.push(...allocate(request.uppercase, active.Uppercase));\n    allSet.push(...active.Uppercase);\n  }\n\n  if (request.lowercase !== undefined) {\n    parts.push(...allocate(request.lowercase, active.Lowercase));\n    allSet.push(...active.Lowercase);\n  }\n\n  if (request.digits !== undefined) {\n    parts.push(...allocate(request.digits, active.Digit));\n    allSet.push(...active.Digit);\n  }\n\n  if (request.special !== undefined) {\n    parts.push(...allocate(request.special, active.Special));\n    allSet.push(...active.Special);\n  }\n\n  parts.push(...allocate(request.all, allSet));\n\n  return parts;\n}\n","import { EFFLongWordList } from \"@bitwarden/common/platform/misc/wordlist\";\nimport { GenerationRequest } from \"@bitwarden/common/tools/types\";\n\nimport { CredentialGenerator, EffUsernameGenerationOptions, GeneratedCredential } from \"../types\";\n\nimport { Randomizer } from \"./abstractions\";\nimport { WordsRequest } from \"./types\";\n\n/** The number of digits used when generating an Eff username with a number. */\nconst NUMBER_OF_DIGITS = 4;\n\n/** Generation algorithms that produce randomized usernames */\nexport class UsernameRandomizer implements CredentialGenerator<EffUsernameGenerationOptions> {\n  /** Instantiates the username randomizer\n   *  @param random data source for random data\n   */\n  constructor(private random: Randomizer) {}\n\n  /** Creates a username composed of random words\n   *  @param request parameters to which the generated username conforms\n   *  @returns a promise that resolves with the generated username.\n   */\n  async randomWords(request?: WordsRequest) {\n    const numberOfWords = request?.numberOfWords ?? 1;\n    if (numberOfWords < 1) {\n      return \"\";\n    }\n\n    const digits = Math.max(request?.digits ?? 0, 0);\n    let selectCase = (_: number) => false;\n    if (request?.casing === \"camelCase\") {\n      selectCase = (i: number) => i !== 0;\n    } else if (request?.casing === \"TitleCase\") {\n      selectCase = (_: number) => true;\n    }\n\n    const wordList = request?.words ?? EFFLongWordList;\n    const parts = [];\n    for (let i = 0; i < numberOfWords; i++) {\n      const word = await this.random.pickWord(wordList, { titleCase: selectCase(i) });\n      parts.push(word);\n    }\n\n    for (let i = 0; i < digits; i++) {\n      const digit = await this.random.uniform(0, 9);\n      parts.push(digit.toString());\n    }\n\n    const result = parts.join(\"\");\n\n    return result;\n  }\n\n  async generate(_request: GenerationRequest, settings: EffUsernameGenerationOptions) {\n    if (isEffUsernameGenerationOptions(settings)) {\n      const username = await this.randomWords({\n        digits: settings.wordIncludeNumber ? NUMBER_OF_DIGITS : 0,\n        casing: settings.wordCapitalize ? \"TitleCase\" : \"lowercase\",\n      });\n\n      return new GeneratedCredential(username, \"username\", Date.now());\n    }\n\n    throw new Error(\"Invalid settings received by generator.\");\n  }\n}\n\nfunction isEffUsernameGenerationOptions(settings: any): settings is EffUsernameGenerationOptions {\n  return \"wordIncludeNumber\" in (settings ?? {});\n}\n","import { IntegrationContext } from \"@bitwarden/common/tools/integration\";\nimport { JsonRpc, IntegrationRequest, ApiSettings } from \"@bitwarden/common/tools/integration/rpc\";\n\nimport { ForwarderConfiguration } from \"../forwarder-configuration\";\nimport { ForwarderContext } from \"../forwarder-context\";\n\nexport class CreateForwardingAddressRpc<\n  Settings extends ApiSettings,\n  Req extends IntegrationRequest = IntegrationRequest,\n> implements JsonRpc<Req, string>\n{\n  constructor(\n    readonly requestor: ForwarderConfiguration<Settings>,\n    readonly context: ForwarderContext<Settings>,\n  ) {}\n\n  private get createForwardingEmail() {\n    return this.requestor.forwarder.createForwardingEmail;\n  }\n\n  toRequest(req: Req) {\n    const url = this.createForwardingEmail.url(req, this.context);\n    const token = this.requestor.authenticate(req, this.context as IntegrationContext<Settings>);\n    const body = this.body(req);\n\n    const request = new Request(url, {\n      redirect: \"manual\",\n      cache: \"no-store\",\n      method: \"POST\",\n      headers: new Headers({\n        ...token,\n        \"Content-Type\": \"application/json\",\n        Accept: \"application/json\",\n      }),\n      body,\n    });\n\n    return request;\n  }\n\n  private body(req: Req) {\n    const toBody = this.createForwardingEmail.body;\n    if (!toBody) {\n      return undefined;\n    }\n\n    const body = toBody(req, this.context);\n    if (!body) {\n      return undefined;\n    }\n\n    return JSON.stringify(body);\n  }\n\n  hasJsonPayload(response: Response): boolean {\n    return this.createForwardingEmail.hasJsonPayload(response, this.context);\n  }\n\n  processJson(json: any): [string?, string?] {\n    return this.createForwardingEmail.processJson(json, this.context);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { IntegrationContext } from \"@bitwarden/common/tools/integration\";\nimport { JsonRpc, IntegrationRequest, ApiSettings } from \"@bitwarden/common/tools/integration/rpc\";\n\nimport { ForwarderConfiguration } from \"../forwarder-configuration\";\nimport { ForwarderContext } from \"../forwarder-context\";\n\nexport class GetAccountIdRpc<\n  Settings extends ApiSettings,\n  Req extends IntegrationRequest = IntegrationRequest,\n> implements JsonRpc<Req, string>\n{\n  constructor(\n    readonly requestor: ForwarderConfiguration<Settings>,\n    readonly context: ForwarderContext<Settings>,\n  ) {}\n\n  hasJsonPayload(response: Response) {\n    return this.requestor.forwarder.getAccountId.hasJsonPayload(response, this.context);\n  }\n\n  processJson(json: any) {\n    return this.requestor.forwarder.getAccountId.processJson(json, this.context);\n  }\n\n  toRequest(req: Req) {\n    const url = this.requestor.forwarder.getAccountId.url(req, this.context);\n    const token = this.requestor.authenticate(req, this.context as IntegrationContext<Settings>);\n\n    const request = new Request(url, {\n      redirect: \"manual\",\n      cache: \"no-store\",\n      method: \"GET\",\n      headers: new Headers({\n        ...token,\n        \"Content-Type\": \"application/json\",\n        Accept: \"application/json\",\n      }),\n    });\n\n    return request;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport {\n  ApiSettings,\n  IntegrationRequest,\n  RestClient,\n} from \"@bitwarden/common/tools/integration/rpc\";\nimport { GenerationRequest } from \"@bitwarden/common/tools/types\";\n\nimport { CredentialGenerator, GeneratedCredential } from \"../types\";\n\nimport { AccountRequest, ForwarderConfiguration } from \"./forwarder-configuration\";\nimport { ForwarderContext } from \"./forwarder-context\";\nimport { CreateForwardingAddressRpc, GetAccountIdRpc } from \"./rpc\";\n\n/** Generation algorithms that query an email forwarding service to\n *  create anonymized email addresses.\n */\nexport class Forwarder implements CredentialGenerator<ApiSettings> {\n  /** Instantiates the email forwarder engine\n   *  @param configuration The forwarder to query\n   *  @param client requests data from the forwarding service\n   *  @param i18nService localizes messages sent to the forwarding service\n   *   and user-addressable errors\n   */\n  constructor(\n    private configuration: ForwarderConfiguration<ApiSettings>,\n    private client: RestClient,\n    private i18nService: I18nService,\n  ) {}\n\n  async generate(request: GenerationRequest, settings: ApiSettings) {\n    const requestOptions: IntegrationRequest & AccountRequest = { website: request.website };\n\n    const getAccount = await this.getAccountId(this.configuration, settings);\n    if (getAccount) {\n      requestOptions.accountId = await this.client.fetchJson(getAccount, requestOptions);\n    }\n\n    const create = this.createForwardingAddress(this.configuration, settings);\n    const result = await this.client.fetchJson(create, requestOptions);\n    const id = { forwarder: this.configuration.id };\n\n    return new GeneratedCredential(result, id, Date.now());\n  }\n\n  private createContext<Settings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    return new ForwarderContext(configuration, settings, this.i18nService);\n  }\n\n  private createForwardingAddress<Settings extends ApiSettings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    const context = this.createContext(configuration, settings);\n    const rpc = new CreateForwardingAddressRpc<Settings>(configuration, context);\n    return rpc;\n  }\n\n  private getAccountId<Settings extends ApiSettings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    if (!configuration.forwarder.getAccountId) {\n      return null;\n    }\n\n    const context = this.createContext(configuration, settings);\n    const rpc = new GetAccountIdRpc<Settings>(configuration, context);\n\n    return rpc;\n  }\n}\n","import { PolicyEvaluator } from \"../abstractions\";\nimport { NoPolicy } from \"../types\";\n\n/** A policy evaluator that does not apply any policy */\nexport class DefaultPolicyEvaluator<PolicyTarget>\n  implements PolicyEvaluator<NoPolicy, PolicyTarget>\n{\n  /** {@link PolicyEvaluator.policy} */\n  get policy() {\n    return {};\n  }\n\n  /** {@link PolicyEvaluator.policyInEffect} */\n  get policyInEffect() {\n    return false;\n  }\n\n  /** {@link PolicyEvaluator.applyPolicy} */\n  applyPolicy(options: PolicyTarget) {\n    return options;\n  }\n\n  /** {@link PolicyEvaluator.sanitize} */\n  sanitize(options: PolicyTarget) {\n    return options;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Constraint } from \"@bitwarden/common/tools/types\";\n\nimport { sum } from \"../util\";\n\nconst Zero: Constraint<number> = { min: 0, max: 0 };\nconst AtLeastOne: Constraint<number> = { min: 1 };\nconst RequiresTrue: Constraint<boolean> = { requiredValue: true };\n\n/** Ensures the minimum and maximum bounds of a constraint are at least as large as the\n *  combined minimum bounds of `dependencies`.\n *  @param current the constraint extended by the combinator.\n *  @param dependencies the constraints summed to determine the bounds of `current`.\n *  @returns a copy of `current` with the new bounds applied.\n *\n */\nfunction atLeastSum(current: Constraint<number>, dependencies: Constraint<number>[]) {\n  // length must be at least as long as the required character set\n  const minConsistentLength = sum(...dependencies.map((c) => c?.min));\n  const minLength = Math.max(current?.min ?? 0, minConsistentLength);\n  const length = atLeast(minLength, current);\n\n  return length;\n}\n\n/** Extends a constraint with a readonly field.\n *  @param readonly Adds a readonly field when this is `true`.\n *  @param constraint the constraint extended by the combinator.\n *  @returns a copy of `constraint` with the readonly constraint applied as-needed.\n */\nfunction maybeReadonly(readonly: boolean, constraint?: Constraint<boolean>): Constraint<boolean> {\n  if (!readonly) {\n    return constraint;\n  }\n\n  const result: Constraint<boolean> = Object.assign({}, constraint ?? {});\n  result.readonly = true;\n\n  return result;\n}\n\n/** Conditionally enables a constraint.\n *  @param enabled the condition to evaluate\n *  @param constraint the condition to conditionally enable\n *  @returns `constraint` when `enabled` is true. Otherwise returns `undefined.\n */\nfunction maybe<T>(enabled: boolean, constraint: Constraint<T>): Constraint<T> {\n  return enabled ? constraint : undefined;\n}\n\n// copies `constraint`; ensures both bounds >= value\n/** Ensures the boundaries of a constraint are at least equal to the minimum.\n *  @param minimum the lower bound of the constraint. When this is `undefined` or `null`,\n *   the method returns `constraint`.\n *  @param constraint the constraint to evaluate. When this is `undefined` or `null`,\n *   the method creates a new constraint.\n *  @returns a copy of `constraint`. When `minimum` has a value, the returned constraint\n *   always includes a minimum bound. When `constraint` has a maximum defined, both\n *   its minimum and maximum are checked against `minimum`.\n */\nfunction atLeast(minimum: number, constraint?: Constraint<number>): Constraint<number> {\n  if (minimum === undefined || minimum === null) {\n    return constraint;\n  }\n\n  const atLeast = { ...(constraint ?? {}) };\n  atLeast.min = Math.max(atLeast.min ?? -Infinity, minimum);\n\n  if (\"max\" in atLeast) {\n    atLeast.max = Math.max(atLeast.max, minimum);\n  }\n\n  return atLeast;\n}\n\n/** Ensures a value falls within the minimum and maximum boundaries of a constraint.\n *  @param value the value to check. Nullish values are coerced to 0.\n *  @param constraint the constraint to evaluate against.\n *  @returns If the value is below the minimum constraint, the minimum bound is\n *   returned. If the value is above the maximum constraint, the maximum bound is\n *   returned. Otherwise, the value is returned.\n */\nfunction fitToBounds(value: number, constraint: Constraint<number>) {\n  if (!constraint) {\n    return value;\n  }\n\n  const { min, max } = constraint;\n\n  const withUpperBound = Math.min(value ?? 0, max ?? Infinity);\n  const withLowerBound = Math.max(withUpperBound, min ?? -Infinity);\n\n  return withLowerBound;\n}\n\n/** Fits the length of a string within the minimum and maximum length boundaries\n *  of a constraint.\n *  @param value the value to check. Nullish values are coerced to the empty string.\n *  @param constraint the constraint to evaluate against.\n *  @param options.fillString a string to fill values from. Defaults to a space.\n *   When fillString contains multiple characters, each is filled in order. The\n *   fill string repeats when it gets to the end of the string and there are\n *   more characters to fill.\n *  @returns If the value is below the required length, returns a copy padded\n *   by the fillString. If the value is above the required length, returns a copy\n *   padded to the maximum length.\n * */\nfunction fitLength(\n  value: string,\n  constraint: Constraint<string>,\n  options?: { fillString?: string },\n) {\n  if (!constraint) {\n    return value;\n  }\n\n  const { minLength, maxLength } = constraint;\n  const { fillString } = options ?? { fillString: \" \" };\n\n  const trimmed = (value ?? \"\").slice(0, maxLength ?? Infinity);\n  const result = trimmed.padEnd(minLength ?? trimmed.length, fillString);\n\n  return result;\n}\n\n/** Enforces a readonly field has a required value.\n *  @param value the value to check.\n *  @param constraint the constraint to evaluate against.\n *  @returns If the constraint's readonly field is `true`, returns the\n *   constraint's required value or `undefined` if none is specified.\n *   Otherwise returns the value.\n *  @remarks This method can be used to ensure a conditionally-calculated\n *   field becomes undefined. Simply specify `readonly` without a `requiredValue`\n *   then use `??` to perform the calculation.\n */\nfunction enforceConstant(value: boolean, constraint: Constraint<boolean>) {\n  if (constraint?.readonly) {\n    return constraint.requiredValue;\n  } else {\n    return value;\n  }\n}\n\n/** Conditionally create a readonly true value.\n *  @param enabled When true, create the value.\n *  @returns When enabled is true, a readonly constraint with a constant value\n *  of `true`. Otherwise returns `undefined`.\n */\nfunction readonlyTrueWhen(enabled: boolean) {\n  const readonlyValue = maybeReadonly(enabled, RequiresTrue);\n  const maybeReadonlyValue = maybe(enabled, readonlyValue);\n  return maybeReadonlyValue;\n}\n\nexport {\n  atLeast,\n  atLeastSum,\n  maybe,\n  maybeReadonly,\n  fitToBounds,\n  enforceConstant,\n  readonlyTrueWhen,\n  fitLength,\n  Zero,\n  AtLeastOne,\n  RequiresTrue,\n};\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyConstraints, StateConstraints } from \"@bitwarden/common/tools/types\";\n\nimport { DefaultPasswordGenerationOptions } from \"../data\";\nimport { PasswordGeneratorSettings } from \"../types\";\n\nimport { fitToBounds, enforceConstant } from \"./constraints\";\n\nexport class PasswordPolicyConstraints implements StateConstraints<PasswordGeneratorSettings> {\n  /** Creates a password policy constraints\n   *  @param constraints Constraints derived from the policy and application-defined defaults\n   */\n  constructor(readonly constraints: PolicyConstraints<PasswordGeneratorSettings>) {}\n\n  adjust(state: PasswordGeneratorSettings): PasswordGeneratorSettings {\n    // constrain values\n    const result: PasswordGeneratorSettings = {\n      ...(state ?? DefaultPasswordGenerationOptions),\n      length: fitToBounds(state.length, this.constraints.length),\n      lowercase: enforceConstant(state.lowercase, this.constraints.lowercase),\n      uppercase: enforceConstant(state.uppercase, this.constraints.uppercase),\n      number: enforceConstant(state.number, this.constraints.number),\n      special: enforceConstant(state.special, this.constraints.special),\n      minLowercase: fitToBounds(state.minLowercase, this.constraints.minLowercase),\n      minUppercase: fitToBounds(state.minUppercase, this.constraints.minUppercase),\n      minNumber: fitToBounds(state.minNumber, this.constraints.minNumber),\n      minSpecial: fitToBounds(state.minSpecial, this.constraints.minSpecial),\n    };\n\n    // ensure include flags are consistent with the constrained values\n    result.lowercase ||= state.minLowercase > 0;\n    result.uppercase ||= state.minUppercase > 0;\n    result.number ||= state.minNumber > 0;\n    result.special ||= state.minSpecial > 0;\n\n    // when all flags are disabled, enable a few\n    const anyEnabled = [result.lowercase, result.uppercase, result.number, result.special].some(\n      (flag) => flag,\n    );\n    if (!anyEnabled) {\n      result.lowercase = true;\n      result.uppercase = true;\n    }\n\n    return result;\n  }\n\n  fix(state: PasswordGeneratorSettings): PasswordGeneratorSettings {\n    return state;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Constraints,\n  DynamicStateConstraints,\n  PolicyConstraints,\n  StateConstraints,\n} from \"@bitwarden/common/tools/types\";\n\nimport { PasswordGeneratorPolicy, PasswordGeneratorSettings } from \"../types\";\n\nimport { atLeast, atLeastSum, maybe, readonlyTrueWhen, AtLeastOne, Zero } from \"./constraints\";\nimport { PasswordPolicyConstraints } from \"./password-policy-constraints\";\n\n/** Creates state constraints by blending policy and password settings. */\nexport class DynamicPasswordPolicyConstraints\n  implements DynamicStateConstraints<PasswordGeneratorSettings>\n{\n  /** Instantiates the object.\n   *  @param policy the password policy to enforce. This cannot be\n   *  `null` or `undefined`.\n   */\n  constructor(\n    policy: PasswordGeneratorPolicy,\n    readonly defaults: Constraints<PasswordGeneratorSettings>,\n  ) {\n    const minLowercase = maybe(policy.useLowercase, AtLeastOne);\n    const minUppercase = maybe(policy.useUppercase, AtLeastOne);\n\n    const minNumber = atLeast(\n      policy.numberCount || (policy.useNumbers && AtLeastOne.min),\n      defaults.minNumber,\n    );\n\n    const minSpecial = atLeast(\n      policy.specialCount || (policy.useSpecial && AtLeastOne.min),\n      defaults.minSpecial,\n    );\n\n    const baseLength = atLeast(policy.minLength, defaults.length);\n    const subLengths = [minLowercase, minUppercase, minNumber, minSpecial];\n    const length = atLeastSum(baseLength, subLengths);\n\n    this.constraints = Object.freeze({\n      policyInEffect: policyInEffect(policy, defaults),\n      lowercase: readonlyTrueWhen(policy.useLowercase),\n      uppercase: readonlyTrueWhen(policy.useUppercase),\n      number: readonlyTrueWhen(policy.useNumbers),\n      special: readonlyTrueWhen(policy.useSpecial),\n      length,\n      minLowercase,\n      minUppercase,\n      minNumber,\n      minSpecial,\n    });\n  }\n\n  /** Constraints derived from the policy and application-defined defaults;\n   *  @remarks these limits are absolute and should be transmitted to the UI\n   */\n  readonly constraints: PolicyConstraints<PasswordGeneratorSettings>;\n\n  calibrate(state: PasswordGeneratorSettings): StateConstraints<PasswordGeneratorSettings> {\n    // decide which constraints are active\n    const lowercase = state.lowercase || this.constraints.lowercase?.requiredValue || false;\n    const uppercase = state.uppercase || this.constraints.uppercase?.requiredValue || false;\n    const number = state.number || this.constraints.number?.requiredValue || false;\n    const special = state.special || this.constraints.special?.requiredValue || false;\n\n    // minimum constraints cannot `atLeast(state...) because doing so would force\n    // the constrained value to only increase\n    const constraints: PolicyConstraints<PasswordGeneratorSettings> = {\n      ...this.constraints,\n      minLowercase: maybe<number>(lowercase, this.constraints.minLowercase ?? AtLeastOne),\n      minUppercase: maybe<number>(uppercase, this.constraints.minUppercase ?? AtLeastOne),\n      minNumber: maybe<number>(number, this.constraints.minNumber) ?? Zero,\n      minSpecial: maybe<number>(special, this.constraints.minSpecial) ?? Zero,\n    };\n\n    // lower bound of length must always at least fit its sub-lengths\n    constraints.length = atLeastSum(this.constraints.length, [\n      atLeast(state.minNumber, constraints.minNumber),\n      atLeast(state.minSpecial, constraints.minSpecial),\n      atLeast(state.minLowercase, constraints.minLowercase),\n      atLeast(state.minUppercase, constraints.minUppercase),\n    ]);\n\n    const stateConstraints = new PasswordPolicyConstraints(constraints);\n    return stateConstraints;\n  }\n}\n\nfunction policyInEffect(\n  policy: PasswordGeneratorPolicy,\n  defaults: Constraints<PasswordGeneratorSettings>,\n): boolean {\n  const policies = [\n    policy.useUppercase,\n    policy.useLowercase,\n    policy.useNumbers,\n    policy.useSpecial,\n    policy.minLength > defaults.length.min,\n    policy.numberCount > defaults.minNumber.min,\n    policy.specialCount > defaults.minSpecial.min,\n  ];\n\n  return policies.includes(true);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Constraints } from \"@bitwarden/common/tools/types\";\n\nimport { PolicyEvaluator } from \"../abstractions\";\nimport { DefaultPassphraseGenerationOptions, DefaultPassphraseBoundaries } from \"../data\";\nimport { Boundary, PassphraseGenerationOptions, PassphraseGeneratorPolicy } from \"../types\";\n\n/** Enforces policy for passphrase generation options.\n */\nexport class PassphraseGeneratorOptionsEvaluator\n  implements\n    PolicyEvaluator<PassphraseGeneratorPolicy, PassphraseGenerationOptions>,\n    Constraints<PassphraseGenerationOptions>\n{\n  // This design is not ideal, but it is a step towards a more robust passphrase\n  // generator. Ideally, `sanitize` would be implemented on an options class,\n  // and `applyPolicy` would be implemented on a policy class, \"mise en place\".\n  //\n  // The current design of the passphrase generator, unfortunately, would require\n  // a substantial rewrite to make this feasible. Hopefully this change can be\n  // applied when the passphrase generator is ported to rust.\n\n  /** Policy applied by the evaluator.\n   */\n  readonly policy: PassphraseGeneratorPolicy;\n\n  /** Boundaries for the number of words allowed in the password.\n   */\n  readonly numWords: Boundary;\n\n  /** Instantiates the evaluator.\n   * @param policy The policy applied by the evaluator. When this conflicts with\n   *               the defaults, the policy takes precedence.\n   */\n  constructor(policy: PassphraseGeneratorPolicy) {\n    function createBoundary(value: number, defaultBoundary: Boundary): Boundary {\n      const boundary = {\n        min: Math.max(defaultBoundary.min, value),\n        max: Math.max(defaultBoundary.max, value),\n      };\n\n      return boundary;\n    }\n\n    this.policy = structuredClone(policy);\n    this.numWords = createBoundary(policy.minNumberWords, DefaultPassphraseBoundaries.numWords);\n  }\n\n  /** {@link PolicyEvaluator.policyInEffect} */\n  get policyInEffect(): boolean {\n    const policies = [\n      this.policy.capitalize,\n      this.policy.includeNumber,\n      this.policy.minNumberWords > DefaultPassphraseBoundaries.numWords.min,\n    ];\n\n    return policies.includes(true);\n  }\n\n  /** Apply policy to the input options.\n   *  @param options The options to build from. These options are not altered.\n   *  @returns A new password generation request with policy applied.\n   */\n  applyPolicy(options: PassphraseGenerationOptions): PassphraseGenerationOptions {\n    function fitToBounds(value: number, boundaries: Boundary) {\n      const { min, max } = boundaries;\n\n      const withUpperBound = Math.min(value ?? boundaries.min, max);\n      const withLowerBound = Math.max(withUpperBound, min);\n\n      return withLowerBound;\n    }\n\n    // apply policy overrides\n    const capitalize = this.policy.capitalize || options.capitalize || false;\n    const includeNumber = this.policy.includeNumber || options.includeNumber || false;\n\n    // apply boundaries\n    const numWords = fitToBounds(options.numWords, this.numWords);\n\n    return {\n      ...options,\n      numWords,\n      capitalize,\n      includeNumber,\n    };\n  }\n\n  /** Ensures internal options consistency.\n   *  @param options The options to cascade. These options are not altered.\n   *  @returns A passphrase generation request with cascade applied.\n   */\n  sanitize(options: PassphraseGenerationOptions): PassphraseGenerationOptions {\n    // ensure words are separated by a single character or the empty string\n    const wordSeparator =\n      options.wordSeparator === \"\"\n        ? \"\"\n        : (options.wordSeparator?.[0] ?? DefaultPassphraseGenerationOptions.wordSeparator);\n\n    return {\n      ...options,\n      wordSeparator,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Constraints, PolicyConstraints, StateConstraints } from \"@bitwarden/common/tools/types\";\n\nimport { DefaultPassphraseGenerationOptions } from \"../data\";\nimport { PassphraseGenerationOptions, PassphraseGeneratorPolicy } from \"../types\";\n\nimport { atLeast, enforceConstant, fitLength, fitToBounds, readonlyTrueWhen } from \"./constraints\";\n\nexport class PassphrasePolicyConstraints implements StateConstraints<PassphraseGenerationOptions> {\n  /** Creates a passphrase policy constraints\n   *  @param policy the password policy to enforce. This cannot be\n   *  `null` or `undefined`.\n   */\n  constructor(\n    readonly policy: PassphraseGeneratorPolicy,\n    readonly defaults: Constraints<PassphraseGenerationOptions>,\n  ) {\n    this.constraints = {\n      policyInEffect: policyInEffect(policy, defaults),\n      wordSeparator: { minLength: 0, maxLength: 1 },\n      capitalize: readonlyTrueWhen(policy.capitalize),\n      includeNumber: readonlyTrueWhen(policy.includeNumber),\n      numWords: atLeast(policy.minNumberWords, defaults.numWords),\n    };\n  }\n\n  constraints: Readonly<PolicyConstraints<PassphraseGenerationOptions>>;\n\n  adjust(state: PassphraseGenerationOptions): PassphraseGenerationOptions {\n    const result: PassphraseGenerationOptions = {\n      wordSeparator: fitLength(state.wordSeparator, this.constraints.wordSeparator, {\n        fillString: DefaultPassphraseGenerationOptions.wordSeparator,\n      }),\n      capitalize: enforceConstant(state.capitalize, this.constraints.capitalize),\n      includeNumber: enforceConstant(state.includeNumber, this.constraints.includeNumber),\n      numWords: fitToBounds(state.numWords, this.constraints.numWords),\n    };\n\n    return result;\n  }\n\n  fix(state: PassphraseGenerationOptions): PassphraseGenerationOptions {\n    return state;\n  }\n}\n\nfunction policyInEffect(\n  policy: PassphraseGeneratorPolicy,\n  defaults: Constraints<PassphraseGenerationOptions>,\n): boolean {\n  const policies = [\n    policy.capitalize,\n    policy.includeNumber,\n    policy.minNumberWords > defaults.numWords.min,\n  ];\n\n  return policies.includes(true);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Constraints } from \"@bitwarden/common/tools/types\";\n\nimport { PolicyEvaluator } from \"../abstractions\";\nimport { DefaultPasswordBoundaries } from \"../data\";\nimport { Boundary, PasswordGeneratorPolicy, PasswordGenerationOptions } from \"../types\";\n\n/** Enforces policy for password generation.\n */\nexport class PasswordGeneratorOptionsEvaluator\n  implements\n    PolicyEvaluator<PasswordGeneratorPolicy, PasswordGenerationOptions>,\n    Constraints<PasswordGenerationOptions>\n{\n  // Constraints<PasswordGenerationOptions> compatibility\n  get minNumber() {\n    return this.minDigits;\n  }\n\n  get minSpecial() {\n    return this.minSpecialCharacters;\n  }\n\n  // This design is not ideal, but it is a step towards a more robust password\n  // generator. Ideally, `sanitize` would be implemented on an options class,\n  // and `applyPolicy` would be implemented on a policy class, \"mise en place\".\n  //\n  // The current design of the password generator, unfortunately, would require\n  // a substantial rewrite to make this feasible. Hopefully this change can be\n  // applied when the password generator is ported to rust.\n\n  /** Boundaries for the password length. This is always large enough\n   * to accommodate the minimum number of digits and special characters.\n   */\n  readonly length: Boundary;\n\n  /** Boundaries for the minimum number of digits allowed in the password.\n   */\n  readonly minDigits: Boundary;\n\n  /** Boundaries for the minimum number of special characters allowed\n   *  in the password.\n   */\n  readonly minSpecialCharacters: Boundary;\n\n  /** Policy applied by the evaluator.\n   */\n  readonly policy: PasswordGeneratorPolicy;\n\n  /** Instantiates the evaluator.\n   * @param policy The policy applied by the evaluator. When this conflicts with\n   *               the defaults, the policy takes precedence.\n   */\n  constructor(policy: PasswordGeneratorPolicy) {\n    function createBoundary(value: number, defaultBoundary: Boundary): Boundary {\n      const boundary = {\n        min: Math.max(defaultBoundary.min, value),\n        max: Math.max(defaultBoundary.max, value),\n      };\n\n      return boundary;\n    }\n\n    this.policy = structuredClone(policy);\n    this.minDigits = createBoundary(policy.numberCount, DefaultPasswordBoundaries.minDigits);\n    this.minSpecialCharacters = createBoundary(\n      policy.specialCount,\n      DefaultPasswordBoundaries.minSpecialCharacters,\n    );\n\n    // the overall length should be at least as long as the sum of the minimums\n    const minConsistentLength = this.minDigits.min + this.minSpecialCharacters.min;\n    const minPolicyLength =\n      policy.minLength > 0 ? policy.minLength : DefaultPasswordBoundaries.length.min;\n    const minLength = Math.max(\n      minPolicyLength,\n      minConsistentLength,\n      DefaultPasswordBoundaries.length.min,\n    );\n\n    this.length = {\n      min: minLength,\n      max: Math.max(DefaultPasswordBoundaries.length.max, minLength),\n    };\n  }\n\n  /** {@link PolicyEvaluator.policyInEffect} */\n  get policyInEffect(): boolean {\n    const policies = [\n      this.policy.useUppercase,\n      this.policy.useLowercase,\n      this.policy.useNumbers,\n      this.policy.useSpecial,\n      this.policy.minLength > DefaultPasswordBoundaries.length.min,\n      this.policy.numberCount > DefaultPasswordBoundaries.minDigits.min,\n      this.policy.specialCount > DefaultPasswordBoundaries.minSpecialCharacters.min,\n    ];\n\n    return policies.includes(true);\n  }\n\n  /** {@link PolicyEvaluator.applyPolicy} */\n  applyPolicy(options: PasswordGenerationOptions): PasswordGenerationOptions {\n    function fitToBounds(value: number, boundaries: Boundary) {\n      const { min, max } = boundaries;\n\n      const withUpperBound = Math.min(value || 0, max);\n      const withLowerBound = Math.max(withUpperBound, min);\n\n      return withLowerBound;\n    }\n\n    // apply policy overrides\n    const uppercase = this.policy.useUppercase || options.uppercase || false;\n    const lowercase = this.policy.useLowercase || options.lowercase || false;\n\n    // these overrides can cascade numeric fields to boolean fields\n    const number = this.policy.useNumbers || options.number || options.minNumber > 0;\n    const special = this.policy.useSpecial || options.special || options.minSpecial > 0;\n\n    // apply boundaries; the boundaries can cascade boolean fields to numeric fields\n    const length = fitToBounds(options.length, this.length);\n    const minNumber = fitToBounds(options.minNumber, this.minDigits);\n    const minSpecial = fitToBounds(options.minSpecial, this.minSpecialCharacters);\n\n    return {\n      ...options,\n      length,\n      uppercase,\n      lowercase,\n      number,\n      minNumber,\n      special,\n      minSpecial,\n    };\n  }\n\n  /** {@link PolicyEvaluator.sanitize} */\n  sanitize(options: PasswordGenerationOptions): PasswordGenerationOptions {\n    function cascade(enabled: boolean, value: number): [boolean, number] {\n      const enabledResult = enabled ?? value > 0;\n      const valueResult = enabledResult ? value || 1 : 0;\n\n      return [enabledResult, valueResult];\n    }\n\n    const [lowercase, minLowercase] = cascade(options.lowercase, options.minLowercase);\n    const [uppercase, minUppercase] = cascade(options.uppercase, options.minUppercase);\n    const [number, minNumber] = cascade(options.number, options.minNumber);\n    const [special, minSpecial] = cascade(options.special, options.minSpecial);\n\n    // minimums can only increase the length\n    const minConsistentLength = minLowercase + minUppercase + minNumber + minSpecial;\n    const minLength = Math.max(minConsistentLength, this.length.min);\n    const length = Math.max(options.length ?? minLength, minLength);\n\n    return {\n      ...options,\n      length,\n      minLength,\n      lowercase,\n      minLowercase,\n      uppercase,\n      minUppercase,\n      number,\n      minNumber,\n      special,\n      minSpecial,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Constraints, StateConstraints } from \"@bitwarden/common/tools/types\";\n\nimport { CatchallGenerationOptions } from \"../types\";\n\n/** Parses the domain part of an email address\n */\nconst DOMAIN_PARSER = new RegExp(\"[^@]+@(?<domain>.+)\");\n\n/** A constraint that sets the catchall domain using a fixed email address */\nexport class CatchallConstraints implements StateConstraints<CatchallGenerationOptions> {\n  /** Creates a catchall constraints\n   * @param email - the email address containing the domain.\n   */\n  constructor(email: string) {\n    if (!email) {\n      this.domain = \"\";\n      return;\n    }\n\n    const parsed = DOMAIN_PARSER.exec(email);\n    if (parsed && parsed.groups?.domain) {\n      this.domain = parsed.groups.domain;\n    }\n  }\n  private domain: string;\n\n  constraints: Readonly<Constraints<CatchallGenerationOptions>> = {};\n\n  adjust(state: CatchallGenerationOptions) {\n    const currentDomain = (state.catchallDomain ?? \"\").trim();\n\n    if (currentDomain !== \"\") {\n      return state;\n    }\n\n    const options = { ...state };\n    options.catchallDomain = this.domain;\n\n    return options;\n  }\n\n  fix(state: CatchallGenerationOptions) {\n    return state;\n  }\n}\n","import { Constraints, StateConstraints } from \"@bitwarden/common/tools/types\";\n\nimport { SubaddressGenerationOptions } from \"../types\";\n\n/** A constraint that sets the subaddress email using a fixed email address */\nexport class SubaddressConstraints implements StateConstraints<SubaddressGenerationOptions> {\n  /** Creates a catchall constraints\n   * @param email - the email address containing the domain.\n   */\n  constructor(readonly email: string) {\n    if (!email) {\n      this.email = \"\";\n    }\n  }\n\n  constraints: Readonly<Constraints<SubaddressGenerationOptions>> = {};\n\n  adjust(state: SubaddressGenerationOptions) {\n    const currentDomain = (state.subaddressEmail ?? \"\").trim();\n\n    if (currentDomain !== \"\") {\n      return state;\n    }\n\n    const options = { ...state };\n    options.subaddressEmail = this.email;\n\n    return options;\n  }\n\n  fix(state: SubaddressGenerationOptions) {\n    return state;\n  }\n}\n","import { CatchallGenerationOptions } from \"../types\";\n\n/** The default options for catchall address generation. */\nexport const DefaultCatchallOptions: CatchallGenerationOptions = Object.freeze({\n  catchallType: \"random\",\n  catchallDomain: \"\",\n  website: null,\n});\n","import { EffUsernameGenerationOptions } from \"../types\";\n\n/** The default options for EFF long word generation. */\nexport const DefaultEffUsernameOptions: EffUsernameGenerationOptions = Object.freeze({\n  wordCapitalize: false,\n  wordIncludeNumber: false,\n  website: null,\n});\n","function initializeBoundaries() {\n  const numWords = Object.freeze({\n    min: 3,\n    max: 20,\n  });\n\n  return Object.freeze({\n    numWords,\n  });\n}\n\n/** Immutable default boundaries for passphrase generation.\n * These are used when the policy does not override a value.\n */\nexport const DefaultPassphraseBoundaries = initializeBoundaries();\n","import { PassphraseGenerationOptions } from \"../types\";\n\n/** The default options for passphrase generation. */\nexport const DefaultPassphraseGenerationOptions: Partial<PassphraseGenerationOptions> =\n  Object.freeze({\n    numWords: 6,\n    wordSeparator: \"-\",\n    capitalize: false,\n    includeNumber: false,\n  });\n","function initializeBoundaries() {\n  const length = Object.freeze({\n    min: 5,\n    max: 128,\n  });\n\n  const minDigits = Object.freeze({\n    min: 0,\n    max: 9,\n  });\n\n  const minSpecialCharacters = Object.freeze({\n    min: 0,\n    max: 9,\n  });\n\n  return Object.freeze({\n    length,\n    minDigits,\n    minSpecialCharacters,\n  });\n}\n\n/** Immutable default boundaries for password generation.\n * These are used when the policy does not override a value.\n */\nexport const DefaultPasswordBoundaries = initializeBoundaries();\n","import { PasswordGenerationOptions, PasswordGeneratorSettings } from \"../types\";\n\nimport { DefaultPasswordBoundaries } from \"./default-password-boundaries\";\n\n/** The default options for password generation. */\nexport const DefaultPasswordGenerationOptions: Partial<PasswordGenerationOptions> &\n  PasswordGeneratorSettings = Object.freeze({\n  length: 14,\n  minLength: DefaultPasswordBoundaries.length.min,\n  ambiguous: true,\n  uppercase: true,\n  minUppercase: 1,\n  lowercase: true,\n  minLowercase: 1,\n  number: true,\n  minNumber: 1,\n  special: false,\n  minSpecial: 0,\n});\n","import { SubaddressGenerationOptions } from \"../types\";\n\n/** The default options for email subaddress generation. */\nexport const DefaultSubaddressOptions: SubaddressGenerationOptions = Object.freeze({\n  subaddressType: \"random\",\n  subaddressEmail: \"\",\n  website: null,\n});\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { GENERATOR_DISK } from \"@bitwarden/common/platform/state\";\nimport { ApiSettings } from \"@bitwarden/common/tools/integration/rpc\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { IdentityConstraint } from \"@bitwarden/common/tools/state/identity-state-constraint\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport {\n  EmailRandomizer,\n  ForwarderConfiguration,\n  PasswordRandomizer,\n  UsernameRandomizer,\n} from \"../engine\";\nimport { Forwarder } from \"../engine/forwarder\";\nimport {\n  DefaultPolicyEvaluator,\n  DynamicPasswordPolicyConstraints,\n  PassphraseGeneratorOptionsEvaluator,\n  passphraseLeastPrivilege,\n  PassphrasePolicyConstraints,\n  PasswordGeneratorOptionsEvaluator,\n  passwordLeastPrivilege,\n} from \"../policies\";\nimport { CatchallConstraints } from \"../policies/catchall-constraints\";\nimport { SubaddressConstraints } from \"../policies/subaddress-constraints\";\nimport {\n  CatchallGenerationOptions,\n  CredentialGenerator,\n  CredentialGeneratorConfiguration,\n  EffUsernameGenerationOptions,\n  GeneratorDependencyProvider,\n  NoPolicy,\n  PassphraseGenerationOptions,\n  PassphraseGeneratorPolicy,\n  PasswordGenerationOptions,\n  PasswordGeneratorPolicy,\n  SubaddressGenerationOptions,\n} from \"../types\";\n\nimport { DefaultCatchallOptions } from \"./default-catchall-options\";\nimport { DefaultEffUsernameOptions } from \"./default-eff-username-options\";\nimport { DefaultPassphraseBoundaries } from \"./default-passphrase-boundaries\";\nimport { DefaultPassphraseGenerationOptions } from \"./default-passphrase-generation-options\";\nimport { DefaultPasswordBoundaries } from \"./default-password-boundaries\";\nimport { DefaultPasswordGenerationOptions } from \"./default-password-generation-options\";\nimport { DefaultSubaddressOptions } from \"./default-subaddress-generator-options\";\n\nconst PASSPHRASE: CredentialGeneratorConfiguration<\n  PassphraseGenerationOptions,\n  PassphraseGeneratorPolicy\n> = Object.freeze({\n  id: \"passphrase\",\n  category: \"password\",\n  nameKey: \"passphrase\",\n  generateKey: \"generatePassphrase\",\n  generatedValueKey: \"passphrase\",\n  copyKey: \"copyPassphrase\",\n  useGeneratedValueKey: \"useThisPassphrase\",\n  onlyOnRequest: false,\n  request: [],\n  engine: {\n    create(\n      dependencies: GeneratorDependencyProvider,\n    ): CredentialGenerator<PassphraseGenerationOptions> {\n      return new PasswordRandomizer(dependencies.randomizer);\n    },\n  },\n  settings: {\n    initial: DefaultPassphraseGenerationOptions,\n    constraints: {\n      numWords: {\n        min: DefaultPassphraseBoundaries.numWords.min,\n        max: DefaultPassphraseBoundaries.numWords.max,\n        recommendation: DefaultPassphraseGenerationOptions.numWords,\n      },\n      wordSeparator: { maxLength: 1 },\n    },\n    account: {\n      key: \"passphraseGeneratorSettings\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<PassphraseGenerationOptions>([\n        \"numWords\",\n        \"wordSeparator\",\n        \"capitalize\",\n        \"includeNumber\",\n      ]),\n      state: GENERATOR_DISK,\n      initial: DefaultPassphraseGenerationOptions,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<PassphraseGenerationOptions>,\n  },\n  policy: {\n    type: PolicyType.PasswordGenerator,\n    disabledValue: Object.freeze({\n      minNumberWords: 0,\n      capitalize: false,\n      includeNumber: false,\n    }),\n    combine: passphraseLeastPrivilege,\n    createEvaluator: (policy) => new PassphraseGeneratorOptionsEvaluator(policy),\n    toConstraints: (policy) =>\n      new PassphrasePolicyConstraints(policy, PASSPHRASE.settings.constraints),\n  },\n});\n\nconst PASSWORD: CredentialGeneratorConfiguration<\n  PasswordGenerationOptions,\n  PasswordGeneratorPolicy\n> = Object.freeze({\n  id: \"password\",\n  category: \"password\",\n  nameKey: \"password\",\n  generateKey: \"generatePassword\",\n  generatedValueKey: \"password\",\n  copyKey: \"copyPassword\",\n  useGeneratedValueKey: \"useThisPassword\",\n  onlyOnRequest: false,\n  request: [],\n  engine: {\n    create(\n      dependencies: GeneratorDependencyProvider,\n    ): CredentialGenerator<PasswordGenerationOptions> {\n      return new PasswordRandomizer(dependencies.randomizer);\n    },\n  },\n  settings: {\n    initial: DefaultPasswordGenerationOptions,\n    constraints: {\n      length: {\n        min: DefaultPasswordBoundaries.length.min,\n        max: DefaultPasswordBoundaries.length.max,\n        recommendation: DefaultPasswordGenerationOptions.length,\n      },\n      minNumber: {\n        min: DefaultPasswordBoundaries.minDigits.min,\n        max: DefaultPasswordBoundaries.minDigits.max,\n      },\n      minSpecial: {\n        min: DefaultPasswordBoundaries.minSpecialCharacters.min,\n        max: DefaultPasswordBoundaries.minSpecialCharacters.max,\n      },\n    },\n    account: {\n      key: \"passwordGeneratorSettings\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<PasswordGenerationOptions>([\n        \"length\",\n        \"ambiguous\",\n        \"uppercase\",\n        \"minUppercase\",\n        \"lowercase\",\n        \"minLowercase\",\n        \"number\",\n        \"minNumber\",\n        \"special\",\n        \"minSpecial\",\n      ]),\n      state: GENERATOR_DISK,\n      initial: DefaultPasswordGenerationOptions,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<PasswordGenerationOptions>,\n  },\n  policy: {\n    type: PolicyType.PasswordGenerator,\n    disabledValue: Object.freeze({\n      minLength: 0,\n      useUppercase: false,\n      useLowercase: false,\n      useNumbers: false,\n      numberCount: 0,\n      useSpecial: false,\n      specialCount: 0,\n    }),\n    combine: passwordLeastPrivilege,\n    createEvaluator: (policy) => new PasswordGeneratorOptionsEvaluator(policy),\n    toConstraints: (policy) =>\n      new DynamicPasswordPolicyConstraints(policy, PASSWORD.settings.constraints),\n  },\n});\n\nconst USERNAME: CredentialGeneratorConfiguration<EffUsernameGenerationOptions, NoPolicy> =\n  Object.freeze({\n    id: \"username\",\n    category: \"username\",\n    nameKey: \"randomWord\",\n    generateKey: \"generateUsername\",\n    generatedValueKey: \"username\",\n    copyKey: \"copyUsername\",\n    useGeneratedValueKey: \"useThisUsername\",\n    onlyOnRequest: false,\n    request: [],\n    engine: {\n      create(\n        dependencies: GeneratorDependencyProvider,\n      ): CredentialGenerator<EffUsernameGenerationOptions> {\n        return new UsernameRandomizer(dependencies.randomizer);\n      },\n    },\n    settings: {\n      initial: DefaultEffUsernameOptions,\n      constraints: {},\n      account: {\n        key: \"effUsernameGeneratorSettings\",\n        target: \"object\",\n        format: \"plain\",\n        classifier: new PublicClassifier<EffUsernameGenerationOptions>([\n          \"wordCapitalize\",\n          \"wordIncludeNumber\",\n        ]),\n        state: GENERATOR_DISK,\n        initial: DefaultEffUsernameOptions,\n        options: {\n          deserializer: (value) => value,\n          clearOn: [\"logout\"],\n        },\n      } satisfies ObjectKey<EffUsernameGenerationOptions>,\n    },\n    policy: {\n      type: PolicyType.PasswordGenerator,\n      disabledValue: {},\n      combine(_acc: NoPolicy, _policy: Policy) {\n        return {};\n      },\n      createEvaluator(_policy: NoPolicy) {\n        return new DefaultPolicyEvaluator<EffUsernameGenerationOptions>();\n      },\n      toConstraints(_policy: NoPolicy) {\n        return new IdentityConstraint<EffUsernameGenerationOptions>();\n      },\n    },\n  });\n\nconst CATCHALL: CredentialGeneratorConfiguration<CatchallGenerationOptions, NoPolicy> =\n  Object.freeze({\n    id: \"catchall\",\n    category: \"email\",\n    nameKey: \"catchallEmail\",\n    descriptionKey: \"catchallEmailDesc\",\n    generateKey: \"generateEmail\",\n    generatedValueKey: \"email\",\n    copyKey: \"copyEmail\",\n    useGeneratedValueKey: \"useThisEmail\",\n    onlyOnRequest: false,\n    request: [],\n    engine: {\n      create(\n        dependencies: GeneratorDependencyProvider,\n      ): CredentialGenerator<CatchallGenerationOptions> {\n        return new EmailRandomizer(dependencies.randomizer);\n      },\n    },\n    settings: {\n      initial: DefaultCatchallOptions,\n      constraints: { catchallDomain: { minLength: 1 } },\n      account: {\n        key: \"catchallGeneratorSettings\",\n        target: \"object\",\n        format: \"plain\",\n        classifier: new PublicClassifier<CatchallGenerationOptions>([\n          \"catchallType\",\n          \"catchallDomain\",\n        ]),\n        state: GENERATOR_DISK,\n        initial: {\n          catchallType: \"random\",\n          catchallDomain: \"\",\n        },\n        options: {\n          deserializer: (value) => value,\n          clearOn: [\"logout\"],\n        },\n      } satisfies ObjectKey<CatchallGenerationOptions>,\n    },\n    policy: {\n      type: PolicyType.PasswordGenerator,\n      disabledValue: {},\n      combine(_acc: NoPolicy, _policy: Policy) {\n        return {};\n      },\n      createEvaluator(_policy: NoPolicy) {\n        return new DefaultPolicyEvaluator<CatchallGenerationOptions>();\n      },\n      toConstraints(_policy: NoPolicy, email: string) {\n        return new CatchallConstraints(email);\n      },\n    },\n  });\n\nconst SUBADDRESS: CredentialGeneratorConfiguration<SubaddressGenerationOptions, NoPolicy> =\n  Object.freeze({\n    id: \"subaddress\",\n    category: \"email\",\n    nameKey: \"plusAddressedEmail\",\n    descriptionKey: \"plusAddressedEmailDesc\",\n    generateKey: \"generateEmail\",\n    generatedValueKey: \"email\",\n    copyKey: \"copyEmail\",\n    useGeneratedValueKey: \"useThisEmail\",\n    onlyOnRequest: false,\n    request: [],\n    engine: {\n      create(\n        dependencies: GeneratorDependencyProvider,\n      ): CredentialGenerator<SubaddressGenerationOptions> {\n        return new EmailRandomizer(dependencies.randomizer);\n      },\n    },\n    settings: {\n      initial: DefaultSubaddressOptions,\n      constraints: {},\n      account: {\n        key: \"subaddressGeneratorSettings\",\n        target: \"object\",\n        format: \"plain\",\n        classifier: new PublicClassifier<SubaddressGenerationOptions>([\n          \"subaddressType\",\n          \"subaddressEmail\",\n        ]),\n        state: GENERATOR_DISK,\n        initial: {\n          subaddressType: \"random\",\n          subaddressEmail: \"\",\n        },\n        options: {\n          deserializer: (value) => value,\n          clearOn: [\"logout\"],\n        },\n      } satisfies ObjectKey<SubaddressGenerationOptions>,\n    },\n    policy: {\n      type: PolicyType.PasswordGenerator,\n      disabledValue: {},\n      combine(_acc: NoPolicy, _policy: Policy) {\n        return {};\n      },\n      createEvaluator(_policy: NoPolicy) {\n        return new DefaultPolicyEvaluator<SubaddressGenerationOptions>();\n      },\n      toConstraints(_policy: NoPolicy, email: string) {\n        return new SubaddressConstraints(email);\n      },\n    },\n  });\n\nexport function toCredentialGeneratorConfiguration<Settings extends ApiSettings = ApiSettings>(\n  configuration: ForwarderConfiguration<Settings>,\n) {\n  const forwarder = Object.freeze({\n    id: { forwarder: configuration.id },\n    category: \"email\",\n    nameKey: configuration.name,\n    descriptionKey: \"forwardedEmailDesc\",\n    generateKey: \"generateEmail\",\n    generatedValueKey: \"email\",\n    copyKey: \"copyEmail\",\n    useGeneratedValueKey: \"useThisEmail\",\n    onlyOnRequest: true,\n    request: configuration.forwarder.request,\n    engine: {\n      create(dependencies: GeneratorDependencyProvider) {\n        // FIXME: figure out why `configuration` fails to typecheck\n        const config: any = configuration;\n        return new Forwarder(config, dependencies.client, dependencies.i18nService);\n      },\n    },\n    settings: {\n      initial: configuration.forwarder.defaultSettings,\n      constraints: configuration.forwarder.settingsConstraints,\n      account: configuration.forwarder.local.settings,\n    },\n    policy: {\n      type: PolicyType.PasswordGenerator,\n      disabledValue: {},\n      combine(_acc: NoPolicy, _policy: Policy) {\n        return {};\n      },\n      createEvaluator(_policy: NoPolicy) {\n        return new DefaultPolicyEvaluator<Settings>();\n      },\n      toConstraints(_policy: NoPolicy) {\n        return new IdentityConstraint<Settings>();\n      },\n    },\n  } satisfies CredentialGeneratorConfiguration<Settings, NoPolicy>);\n\n  return forwarder;\n}\n\n/** Generator configurations */\nexport const Generators = Object.freeze({\n  /** Passphrase generator configuration */\n  passphrase: PASSPHRASE,\n\n  /** Password generator configuration */\n  password: PASSWORD,\n\n  /** Username generator configuration */\n  username: USERNAME,\n\n  /** Catchall email generator configuration */\n  catchall: CATCHALL,\n\n  /** Email subaddress generator configuration */\n  subaddress: SUBADDRESS,\n});\n","import { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\n\nimport { PassphraseGeneratorPolicy } from \"../types\";\n\n/** Reduces a policy into an accumulator by accepting the most restrictive\n *  values from each policy.\n *  @param acc the accumulator\n *  @param policy the policy to reduce\n *  @returns the most restrictive values between the policy and accumulator.\n */\nexport function passphraseLeastPrivilege(\n  acc: PassphraseGeneratorPolicy,\n  policy: Policy,\n): PassphraseGeneratorPolicy {\n  if (policy.type !== PolicyType.PasswordGenerator) {\n    return acc;\n  }\n\n  return {\n    minNumberWords: Math.max(acc.minNumberWords, policy.data.minNumberWords ?? acc.minNumberWords),\n    capitalize: policy.data.capitalize || acc.capitalize,\n    includeNumber: policy.data.includeNumber || acc.includeNumber,\n  };\n}\n","import { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\n\nimport { PasswordGeneratorPolicy } from \"../types\";\n\n/** Reduces a policy into an accumulator by accepting the most restrictive\n *  values from each policy.\n *  @param acc the accumulator\n *  @param policy the policy to reduce\n *  @returns the most restrictive values between the policy and accumulator.\n */\nexport function passwordLeastPrivilege(acc: PasswordGeneratorPolicy, policy: Policy) {\n  if (policy.type !== PolicyType.PasswordGenerator || !policy.enabled) {\n    return acc;\n  }\n\n  return {\n    minLength: Math.max(acc.minLength, policy.data.minLength ?? acc.minLength),\n    useUppercase: policy.data.useUpper || acc.useUppercase,\n    useLowercase: policy.data.useLower || acc.useLowercase,\n    useNumbers: policy.data.useNumbers || acc.useNumbers,\n    numberCount: Math.max(acc.numberCount, policy.data.minNumbers ?? acc.numberCount),\n    useSpecial: policy.data.useSpecial || acc.useSpecial,\n    specialCount: Math.max(acc.specialCount, policy.data.minSpecial ?? acc.specialCount),\n  };\n}\n","import { CredentialPreference } from \"../types\";\n\nimport { EmailAlgorithms, PasswordAlgorithms, UsernameAlgorithms } from \"./generator-types\";\n\nexport const DefaultCredentialPreferences: CredentialPreference = Object.freeze({\n  email: Object.freeze({\n    algorithm: EmailAlgorithms[0],\n    updated: new Date(0),\n  }),\n  password: Object.freeze({\n    algorithm: PasswordAlgorithms[0],\n    updated: new Date(0),\n  }),\n  username: Object.freeze({\n    algorithm: UsernameAlgorithms[0],\n    updated: new Date(0),\n  }),\n});\n","import { EmailDomainOptions, SelfHostedApiOptions } from \"../types\";\n\nexport const DefaultAddyIoOptions: SelfHostedApiOptions & EmailDomainOptions = Object.freeze({\n  website: null,\n  baseUrl: \"https://app.addy.io\",\n  token: \"\",\n  domain: \"\",\n});\n","import { ApiOptions } from \"../types\";\n\nexport const DefaultDuckDuckGoOptions: ApiOptions = Object.freeze({\n  website: null,\n  token: \"\",\n});\n","import { ApiOptions, EmailPrefixOptions } from \"../types\";\n\nexport const DefaultFastmailOptions: ApiOptions & EmailPrefixOptions = Object.freeze({\n  website: \"\",\n  domain: \"\",\n  prefix: \"\",\n  token: \"\",\n});\n","import { ApiOptions, EmailDomainOptions } from \"../types\";\n\nexport const DefaultForwardEmailOptions: ApiOptions & EmailDomainOptions = Object.freeze({\n  website: null,\n  token: \"\",\n  domain: \"\",\n});\n","import { ApiOptions } from \"../types\";\n\nexport const DefaultFirefoxRelayOptions: ApiOptions = Object.freeze({\n  website: null,\n  token: \"\",\n});\n","import { ForwarderMetadata } from \"../types\";\n\n/** Metadata about an email forwarding service.\n *  @remarks This is used to populate the forwarder selection list\n *  and to identify forwarding services in error messages.\n */\nexport const Forwarders = Object.freeze({\n  /** For https://addy.io/ */\n  AddyIo: Object.freeze({\n    id: \"anonaddy\",\n    name: \"Addy.io\",\n    validForSelfHosted: true,\n  } as ForwarderMetadata),\n\n  /** For https://duckduckgo.com/email/ */\n  DuckDuckGo: Object.freeze({\n    id: \"duckduckgo\",\n    name: \"DuckDuckGo\",\n    validForSelfHosted: false,\n  } as ForwarderMetadata),\n\n  /** For https://www.fastmail.com. */\n  Fastmail: Object.freeze({\n    id: \"fastmail\",\n    name: \"Fastmail\",\n    validForSelfHosted: true,\n  } as ForwarderMetadata),\n\n  /** For https://relay.firefox.com/ */\n  FirefoxRelay: Object.freeze({\n    id: \"firefoxrelay\",\n    name: \"Firefox Relay\",\n    validForSelfHosted: false,\n  } as ForwarderMetadata),\n\n  /** For https://forwardemail.net/ */\n  ForwardEmail: Object.freeze({\n    id: \"forwardemail\",\n    name: \"Forward Email\",\n    validForSelfHosted: true,\n  } as ForwarderMetadata),\n\n  /** For https://simplelogin.io/ */\n  SimpleLogin: Object.freeze({\n    id: \"simplelogin\",\n    name: \"SimpleLogin\",\n    validForSelfHosted: true,\n  } as ForwarderMetadata),\n});\n","import { SelfHostedApiOptions } from \"../types\";\n\nexport const DefaultSimpleLoginOptions: SelfHostedApiOptions = Object.freeze({\n  website: null,\n  baseUrl: \"https://app.simplelogin.io\",\n  token: \"\",\n});\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Classifier } from \"@bitwarden/common/tools/state/classifier\";\n\nexport class PrivateClassifier<Data> implements Classifier<Data, Record<string, never>, Data> {\n  constructor(private keys: (keyof Jsonify<Data>)[] = undefined) {}\n\n  classify(value: Data): { disclosed: Jsonify<Record<string, never>>; secret: Jsonify<Data> } {\n    const pickMe = JSON.parse(JSON.stringify(value));\n    const keys: (keyof Jsonify<Data>)[] = this.keys ?? (Object.keys(pickMe) as any);\n\n    const picked: Partial<Jsonify<Data>> = {};\n    for (const key of keys) {\n      picked[key] = pickMe[key];\n    }\n    const secret = picked as Jsonify<Data>;\n\n    return { disclosed: null, secret };\n  }\n\n  declassify(_disclosed: Jsonify<Record<keyof Data, never>>, secret: Jsonify<Data>) {\n    const result: Partial<Jsonify<Data>> = {};\n    const keys: (keyof Jsonify<Data>)[] = this.keys ?? (Object.keys(secret) as any);\n\n    for (const key of keys) {\n      result[key] = secret[key];\n    }\n\n    return result as Jsonify<Data>;\n  }\n}\n","import {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport {\n  ApiSettings,\n  IntegrationRequest,\n  SelfHostedApiSettings,\n} from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport { ForwarderConfiguration, ForwarderContext, EmailDomainSettings } from \"../engine\";\nimport { CreateForwardingEmailRpcDef } from \"../engine/forwarder-configuration\";\nimport { EmailDomainOptions, SelfHostedApiOptions } from \"../types\";\n\n// integration types\nexport type AddyIoSettings = SelfHostedApiSettings & EmailDomainSettings;\nexport type AddyIoOptions = SelfHostedApiOptions & EmailDomainOptions;\nexport type AddyIoConfiguration = ForwarderConfiguration<AddyIoSettings>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  token: \"\",\n  domain: \"\",\n  baseUrl: \"\",\n});\n\n// supported RPC calls\nconst createForwardingEmail = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<AddyIoSettings>) {\n    return context.baseUrl() + \"/api/v1/aliases\";\n  },\n  body(request: IntegrationRequest, context: ForwarderContext<AddyIoSettings>) {\n    return {\n      domain: context.emailDomain(),\n      description: context.generatedBy(request),\n    };\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200 || response.status === 201;\n  },\n  processJson(json: any) {\n    return [json?.data?.email];\n  },\n} as CreateForwardingEmailRpcDef<AddyIoSettings>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  createForwardingEmail,\n  request: [\"token\", \"baseUrl\", \"domain\"],\n  settingsConstraints: {\n    token: { required: true },\n    domain: { required: true },\n    baseUrl: {},\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.AddyIo.local.settings\",\n      key: \"addyIoForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<AddyIoSettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<AddyIoSettings>,\n    import: {\n      key: \"forwarder.AddyIo.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<AddyIoSettings>([\"token\", \"baseUrl\", \"domain\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<AddyIoSettings, Record<string, never>, AddyIoSettings>,\n  },\n  settings: new UserKeyDefinition<AddyIoSettings>(GENERATOR_DISK, \"addyIoForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<AddyIoSettings>(GENERATOR_DISK, \"addyIoBuffer\", {\n    deserializer: (value) => value,\n    clearOn: [\"logout\"],\n  }),\n} as const);\n\nexport const AddyIo = Object.freeze({\n  // integration\n  id: \"anonaddy\" as IntegrationId,\n  name: \"Addy.io\",\n  extends: [\"forwarder\"],\n\n  // hosting\n  selfHost: \"maybe\",\n  baseUrl: \"https://app.addy.io\",\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authorization: \"Bearer \" + context.authenticationToken() };\n  },\n\n  // extensions\n  forwarder,\n} as AddyIoConfiguration);\n","import {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { ApiSettings, IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport { ForwarderConfiguration, ForwarderContext } from \"../engine\";\nimport { CreateForwardingEmailRpcDef } from \"../engine/forwarder-configuration\";\nimport { ApiOptions } from \"../types\";\n\n// integration types\nexport type DuckDuckGoSettings = ApiSettings;\nexport type DuckDuckGoOptions = ApiOptions;\nexport type DuckDuckGoConfiguration = ForwarderConfiguration<DuckDuckGoSettings>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  token: \"\",\n});\n\n// supported RPC calls\nconst createForwardingEmail = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<DuckDuckGoSettings>) {\n    return context.baseUrl() + \"/email/addresses\";\n  },\n  body(_request: IntegrationRequest, _context: ForwarderContext<DuckDuckGoSettings>) {\n    return undefined;\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200 || response.status === 201;\n  },\n  processJson(json: any) {\n    return [`${json.address}@duck.com`];\n  },\n} as CreateForwardingEmailRpcDef<DuckDuckGoSettings>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  createForwardingEmail,\n  request: [\"token\"],\n  settingsConstraints: {\n    token: { required: true },\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.DuckDuckGo.local.settings\",\n      key: \"duckDuckGoForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<DuckDuckGoSettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<DuckDuckGoSettings>,\n    import: {\n      key: \"forwarder.DuckDuckGo.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<DuckDuckGoSettings>([\"token\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<DuckDuckGoSettings, Record<string, never>, DuckDuckGoSettings>,\n  },\n  settings: new UserKeyDefinition<DuckDuckGoSettings>(GENERATOR_DISK, \"duckDuckGoForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<DuckDuckGoSettings>(GENERATOR_DISK, \"duckDuckGoBuffer\", {\n    deserializer: (value) => value,\n    clearOn: [\"logout\"],\n  }),\n} as const);\n\n// integration-wide configuration\nexport const DuckDuckGo = Object.freeze({\n  id: \"duckduckgo\" as IntegrationId,\n  name: \"DuckDuckGo\",\n  baseUrl: \"https://quack.duckduckgo.com/api\",\n  selfHost: \"never\",\n  extends: [\"forwarder\"],\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authorization: \"Bearer \" + context.authenticationToken() };\n  },\n  forwarder,\n} as DuckDuckGoConfiguration);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { ApiSettings, IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport {\n  ForwarderConfiguration,\n  ForwarderContext,\n  EmailDomainSettings,\n  AccountRequest,\n  EmailPrefixSettings,\n} from \"../engine\";\nimport { CreateForwardingEmailRpcDef, GetAccountIdRpcDef } from \"../engine/forwarder-configuration\";\nimport { ApiOptions, EmailPrefixOptions } from \"../types\";\n\n// integration types\nexport type FastmailSettings = ApiSettings & EmailPrefixSettings & EmailDomainSettings;\nexport type FastmailOptions = ApiOptions & EmailPrefixOptions & AccountRequest;\nexport type FastmailRequest = IntegrationRequest & AccountRequest;\nexport type FastmailConfiguration = ForwarderConfiguration<FastmailSettings, FastmailRequest>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  domain: \"\",\n  prefix: \"\",\n  token: \"\",\n});\n\n// supported RPC calls\nconst getAccountId = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<FastmailSettings>) {\n    // cannot use \"/.well-known/jmap\" because integration RPCs\n    // never follow redirects\n    return context.baseUrl() + \"/jmap/session\";\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200;\n  },\n  processJson(json: any, context: ForwarderContext<FastmailSettings>) {\n    const result = json.primaryAccounts?.[\"https://www.fastmail.com/dev/maskedemail\"] ?? undefined;\n\n    return [result, result ? undefined : context.missingAccountIdCause()];\n  },\n} as GetAccountIdRpcDef<FastmailSettings>);\n\nconst createForwardingEmail = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<FastmailSettings>) {\n    return context.baseUrl() + \"/jmap/api/\";\n  },\n  body(request: FastmailRequest, context: ForwarderContext<FastmailSettings>) {\n    const body = {\n      using: [\"https://www.fastmail.com/dev/maskedemail\", \"urn:ietf:params:jmap:core\"],\n      methodCalls: [\n        [\n          \"MaskedEmail/set\",\n          {\n            accountId: request.accountId,\n            create: {\n              \"new-masked-email\": {\n                state: \"enabled\",\n                description: \"\",\n                forDomain: context.website(request),\n                emailPrefix: \"\",\n              },\n            },\n          },\n          \"0\",\n        ],\n      ],\n    };\n\n    return body;\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200;\n  },\n  processJson(json: any): [string?, string?] {\n    if (\n      json.methodResponses != null &&\n      json.methodResponses.length > 0 &&\n      json.methodResponses[0].length > 0\n    ) {\n      if (json.methodResponses[0][0] === \"MaskedEmail/set\") {\n        if (json.methodResponses[0][1]?.created?.[\"new-masked-email\"] != null) {\n          const email: string = json.methodResponses[0][1]?.created?.[\"new-masked-email\"]?.email;\n          return [email];\n        }\n        if (json.methodResponses[0][1]?.notCreated?.[\"new-masked-email\"] != null) {\n          const errorDescription: string =\n            json.methodResponses[0][1]?.notCreated?.[\"new-masked-email\"]?.description;\n          return [undefined, errorDescription];\n        }\n      } else if (json.methodResponses[0][0] === \"error\") {\n        const errorDescription: string = json.methodResponses[0][1]?.description;\n        return [undefined, errorDescription];\n      }\n    }\n  },\n} as CreateForwardingEmailRpcDef<FastmailSettings, FastmailRequest>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  createForwardingEmail,\n  getAccountId,\n  request: [\"token\"],\n  settingsConstraints: {\n    token: { required: true },\n    domain: { required: true },\n    prefix: {},\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.Fastmail.local.settings\"\n      key: \"fastmailForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<FastmailSettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<FastmailSettings>,\n    import: {\n      key: \"forwarder.Fastmail.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<FastmailSettings>([\"token\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<FastmailSettings, Record<string, never>, FastmailSettings>,\n  },\n  settings: new UserKeyDefinition<FastmailSettings>(GENERATOR_DISK, \"fastmailForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<FastmailSettings>(GENERATOR_DISK, \"fastmailBuffer\", {\n    deserializer: (value) => value,\n    clearOn: [\"logout\"],\n  }),\n} as const);\n\n// integration-wide configuration\nexport const Fastmail = Object.freeze({\n  id: \"fastmail\" as IntegrationId,\n  name: \"Fastmail\",\n  baseUrl: \"https://api.fastmail.com\",\n  selfHost: \"maybe\",\n  extends: [\"forwarder\"],\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authorization: \"Bearer \" + context.authenticationToken() };\n  },\n  forwarder,\n} as FastmailConfiguration);\n","import {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { ApiSettings, IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport { ForwarderConfiguration, ForwarderContext } from \"../engine\";\nimport { CreateForwardingEmailRpcDef } from \"../engine/forwarder-configuration\";\nimport { ApiOptions } from \"../types\";\n\n// integration types\nexport type FirefoxRelaySettings = ApiSettings;\nexport type FirefoxRelayOptions = ApiOptions;\nexport type FirefoxRelayConfiguration = ForwarderConfiguration<FirefoxRelaySettings>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  token: \"\",\n} as FirefoxRelaySettings);\n\n// supported RPC calls\nconst createForwardingEmail = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<FirefoxRelaySettings>) {\n    return context.baseUrl() + \"/v1/relayaddresses/\";\n  },\n  body(request: IntegrationRequest, context: ForwarderContext<FirefoxRelaySettings>) {\n    return {\n      enabled: true,\n      generated_for: context.website(request),\n      description: context.generatedBy(request),\n    };\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200 || response.status === 201;\n  },\n  processJson(json: any) {\n    return [json.full_address];\n  },\n} as CreateForwardingEmailRpcDef<FirefoxRelaySettings>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  createForwardingEmail,\n  request: [\"token\"],\n  settingsConstraints: {\n    token: { required: true },\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.Firefox.local.settings\",\n      key: \"firefoxRelayForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<FirefoxRelaySettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<FirefoxRelaySettings>,\n    import: {\n      key: \"forwarder.Firefox.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<FirefoxRelaySettings>([\"token\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<FirefoxRelaySettings, Record<string, never>, FirefoxRelaySettings>,\n  },\n  settings: new UserKeyDefinition<FirefoxRelaySettings>(GENERATOR_DISK, \"firefoxRelayForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<FirefoxRelaySettings>(\n    GENERATOR_DISK,\n    \"firefoxRelayBuffer\",\n    {\n      deserializer: (value) => value,\n      clearOn: [\"logout\"],\n    },\n  ),\n} as const);\n\n// integration-wide configuration\nexport const FirefoxRelay = Object.freeze({\n  id: \"firefoxrelay\" as IntegrationId,\n  name: \"Firefox Relay\",\n  baseUrl: \"https://relay.firefox.com/api\",\n  selfHost: \"never\",\n  extends: [\"forwarder\"],\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authorization: \"Token \" + context.authenticationToken() };\n  },\n  forwarder,\n} as FirefoxRelayConfiguration);\n","import {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { ApiSettings, IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport { ForwarderConfiguration, ForwarderContext, EmailDomainSettings } from \"../engine\";\nimport { CreateForwardingEmailRpcDef } from \"../engine/forwarder-configuration\";\nimport { ApiOptions, EmailDomainOptions } from \"../types\";\n\n// integration types\nexport type ForwardEmailSettings = ApiSettings & EmailDomainSettings;\nexport type ForwardEmailOptions = ApiOptions & EmailDomainOptions;\nexport type ForwardEmailConfiguration = ForwarderConfiguration<ForwardEmailSettings>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  token: \"\",\n  domain: \"\",\n});\n\n// supported RPC calls\nconst createForwardingEmail = Object.freeze({\n  url(_request: IntegrationRequest, context: ForwarderContext<ForwardEmailSettings>) {\n    const domain = context.emailDomain();\n    return context.baseUrl() + `/v1/domains/${domain}/aliases`;\n  },\n  body(request: IntegrationRequest, context: ForwarderContext<ForwardEmailSettings>) {\n    return {\n      labels: context.website(request),\n      description: context.generatedBy(request),\n    };\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200 || response.status === 201;\n  },\n  processJson(json: any, context: ForwarderContext<ForwardEmailSettings>) {\n    const { name, domain } = json;\n    const domainPart = domain?.name ?? context.emailDomain();\n    return [`${name}@${domainPart}`];\n  },\n} as CreateForwardingEmailRpcDef<ForwardEmailSettings>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  request: [\"token\", \"domain\"],\n  settingsConstraints: {\n    token: { required: true },\n    domain: { required: true },\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.ForwardEmail.local.settings\",\n      key: \"forwardEmailForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<ForwardEmailSettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<ForwardEmailSettings>,\n    import: {\n      key: \"forwarder.ForwardEmail.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<ForwardEmailSettings>([\"token\", \"domain\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<ForwardEmailSettings, Record<string, never>, ForwardEmailSettings>,\n  },\n  settings: new UserKeyDefinition<ForwardEmailSettings>(GENERATOR_DISK, \"forwardEmailForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<ForwardEmailSettings>(\n    GENERATOR_DISK,\n    \"forwardEmailBuffer\",\n    {\n      deserializer: (value) => value,\n      clearOn: [\"logout\"],\n    },\n  ),\n  createForwardingEmail,\n} as const);\n\nexport const ForwardEmail = Object.freeze({\n  // integration metadata\n  id: \"forwardemail\" as IntegrationId,\n  name: \"Forward Email\",\n  extends: [\"forwarder\"],\n\n  // service provider\n  selfHost: \"never\",\n  baseUrl: \"https://api.forwardemail.net\",\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authorization: \"Basic \" + context.authenticationToken({ base64: true, suffix: \":\" }) };\n  },\n\n  // specialized configurations\n  forwarder,\n} as ForwardEmailConfiguration);\n","import {\n  GENERATOR_DISK,\n  GENERATOR_MEMORY,\n  UserKeyDefinition,\n} from \"@bitwarden/common/platform/state\";\nimport { IntegrationContext, IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport {\n  ApiSettings,\n  IntegrationRequest,\n  SelfHostedApiSettings,\n} from \"@bitwarden/common/tools/integration/rpc\";\nimport { PrivateClassifier } from \"@bitwarden/common/tools/private-classifier\";\nimport { PublicClassifier } from \"@bitwarden/common/tools/public-classifier\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { ObjectKey } from \"@bitwarden/common/tools/state/object-key\";\n\nimport { ForwarderConfiguration, ForwarderContext } from \"../engine\";\nimport { CreateForwardingEmailRpcDef } from \"../engine/forwarder-configuration\";\nimport { SelfHostedApiOptions } from \"../types\";\n\n// integration types\nexport type SimpleLoginSettings = SelfHostedApiSettings;\nexport type SimpleLoginOptions = SelfHostedApiOptions;\nexport type SimpleLoginConfiguration = ForwarderConfiguration<SimpleLoginSettings>;\n\n// default values\nconst defaultSettings = Object.freeze({\n  token: \"\",\n  domain: \"\",\n  baseUrl: \"\",\n});\n\n// supported RPC calls\nconst createForwardingEmail = Object.freeze({\n  url(request: IntegrationRequest, context: ForwarderContext<SimpleLoginSettings>) {\n    const endpoint = context.baseUrl() + \"/api/alias/random/new\";\n    const hostname = context.website(request);\n    const url = hostname !== \"\" ? `${endpoint}?hostname=${hostname}` : endpoint;\n\n    return url;\n  },\n  body(request: IntegrationRequest, context: ForwarderContext<SimpleLoginSettings>) {\n    return { note: context.generatedBy(request) };\n  },\n  hasJsonPayload(response: Response) {\n    return response.status === 200 || response.status === 201;\n  },\n  processJson(json: any) {\n    return [json?.alias];\n  },\n} as CreateForwardingEmailRpcDef<SimpleLoginSettings>);\n\n// forwarder configuration\nconst forwarder = Object.freeze({\n  defaultSettings,\n  createForwardingEmail,\n  request: [\"token\", \"baseUrl\"],\n  settingsConstraints: {\n    token: { required: true },\n  },\n  local: {\n    settings: {\n      // FIXME: integration should issue keys at runtime\n      // based on integrationId & extension metadata\n      // e.g. key: \"forwarder.SimpleLogin.local.settings\",\n      key: \"simpleLoginForwarder\",\n      target: \"object\",\n      format: \"secret-state\",\n      classifier: new PrivateClassifier<SimpleLoginSettings>(),\n      state: GENERATOR_DISK,\n      initial: defaultSettings,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\"],\n      },\n    } satisfies ObjectKey<SimpleLoginSettings>,\n    import: {\n      key: \"forwarder.SimpleLogin.local.import\",\n      target: \"object\",\n      format: \"plain\",\n      classifier: new PublicClassifier<SimpleLoginSettings>([\"token\", \"baseUrl\"]),\n      state: GENERATOR_MEMORY,\n      options: {\n        deserializer: (value) => value,\n        clearOn: [\"logout\", \"lock\"],\n      },\n    } satisfies ObjectKey<SimpleLoginSettings, Record<string, never>, SimpleLoginSettings>,\n  },\n  settings: new UserKeyDefinition<SimpleLoginSettings>(GENERATOR_DISK, \"simpleLoginForwarder\", {\n    deserializer: (value) => value,\n    clearOn: [],\n  }),\n  importBuffer: new BufferedKeyDefinition<SimpleLoginSettings>(\n    GENERATOR_DISK,\n    \"simpleLoginBuffer\",\n    {\n      deserializer: (value) => value,\n      clearOn: [\"logout\"],\n    },\n  ),\n} as const);\n\n// integration-wide configuration\nexport const SimpleLogin = Object.freeze({\n  id: \"simplelogin\" as IntegrationId,\n  name: \"SimpleLogin\",\n  selfHost: \"maybe\",\n  extends: [\"forwarder\"],\n  baseUrl: \"https://app.simplelogin.io\",\n  authenticate(_request: IntegrationRequest, context: IntegrationContext<ApiSettings>) {\n    return { Authentication: context.authenticationToken() };\n  },\n  forwarder,\n} as SimpleLoginConfiguration);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { ApiSettings } from \"@bitwarden/common/tools/integration/rpc\";\n\nimport { ForwarderConfiguration } from \"../engine\";\nimport { AddyIo } from \"../integration/addy-io\";\nimport { DuckDuckGo } from \"../integration/duck-duck-go\";\nimport { Fastmail } from \"../integration/fastmail\";\nimport { FirefoxRelay } from \"../integration/firefox-relay\";\nimport { ForwardEmail } from \"../integration/forward-email\";\nimport { SimpleLogin } from \"../integration/simple-login\";\n\n/** Fixed list of integrations available to the application\n *  @example\n *\n *  // Use `toCredentialGeneratorConfiguration(id :ForwarderIntegration)`\n *  // to convert an integration to a generator configuration\n *  const generator = toCredentialGeneratorConfiguration(Integrations.AddyIo);\n */\nexport const Integrations = Object.freeze({\n  AddyIo,\n  DuckDuckGo,\n  Fastmail,\n  FirefoxRelay,\n  ForwardEmail,\n  SimpleLogin,\n} as const);\n\nconst integrations = new Map(Object.values(Integrations).map((i) => [i.id, i]));\n\nexport function getForwarderConfiguration(id: IntegrationId): ForwarderConfiguration<ApiSettings> {\n  const maybeForwarder = integrations.get(id);\n\n  if (maybeForwarder && \"forwarder\" in maybeForwarder) {\n    return maybeForwarder as ForwarderConfiguration<ApiSettings>;\n  } else {\n    return null;\n  }\n}\n","import {\n  PassphraseGenerationOptions,\n  PassphraseGeneratorPolicy,\n  PasswordGenerationOptions,\n  PasswordGeneratorPolicy,\n  PolicyConfiguration,\n} from \"../types\";\n\nimport { Generators } from \"./generators\";\n\n/** Policy configurations\n *  @deprecated use Generator.*.policy instead\n */\nexport const Policies = Object.freeze({\n  Passphrase: Generators.passphrase.policy,\n  Password: Generators.password.policy,\n} satisfies {\n  /** Passphrase policy configuration */\n  Passphrase: PolicyConfiguration<PassphraseGeneratorPolicy, PassphraseGenerationOptions>;\n\n  /** Password policy configuration */\n  Password: PolicyConfiguration<PasswordGeneratorPolicy, PasswordGenerationOptions>;\n});\n","export const UsernameDigits = Object.freeze({\n  enabled: 4,\n  disabled: 0,\n});\n","// contains logic that constructs generator services dynamically given\n// a generator id.\n\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { Randomizer } from \"./abstractions\";\nimport { KeyServiceRandomizer } from \"./engine/key-service-randomizer\";\n\nexport function createRandomizer(keyService: KeyService): Randomizer {\n  return new KeyServiceRandomizer(keyService);\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { firstValueFrom, Observable } from \"rxjs\";\n\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { GeneratorStrategy, GeneratorService, PolicyEvaluator } from \"../abstractions\";\n\n/** {@link GeneratorServiceAbstraction} */\nexport class DefaultGeneratorService<Options, Policy> implements GeneratorService<Options, Policy> {\n  /** Instantiates the generator service\n   * @param strategy tailors the service to a specific generator type\n   *            (e.g. password, passphrase)\n   * @param policy provides the policy to enforce\n   */\n  constructor(\n    private strategy: GeneratorStrategy<Options, Policy>,\n    private policy: PolicyService,\n  ) {}\n\n  private _evaluators$ = new Map<UserId, Observable<PolicyEvaluator<Policy, Options>>>();\n\n  /** {@link GeneratorService.options$} */\n  options$(userId: UserId) {\n    return this.strategy.durableState(userId).state$;\n  }\n\n  /** {@link GeneratorService.defaults$} */\n  defaults$(userId: UserId) {\n    return this.strategy.defaults$(userId);\n  }\n\n  /** {@link GeneratorService.saveOptions} */\n  async saveOptions(userId: UserId, options: Options): Promise<void> {\n    await this.strategy.durableState(userId).update(() => options);\n  }\n\n  /** {@link GeneratorService.evaluator$} */\n  evaluator$(userId: UserId) {\n    let evaluator$ = this._evaluators$.get(userId);\n\n    if (!evaluator$) {\n      evaluator$ = this.createEvaluator(userId);\n      this._evaluators$.set(userId, evaluator$);\n    }\n\n    return evaluator$;\n  }\n\n  private createEvaluator(userId: UserId) {\n    const evaluator$ = this.policy.getAll$(this.strategy.policy, userId).pipe(\n      // create the evaluator from the policies\n      this.strategy.toEvaluator(),\n    );\n\n    return evaluator$;\n  }\n\n  /** {@link GeneratorService.enforcePolicy} */\n  async enforcePolicy(userId: UserId, options: Options): Promise<Options> {\n    const policy = await firstValueFrom(this.evaluator$(userId));\n    const evaluated = policy.applyPolicy(options);\n    const sanitized = policy.sanitize(evaluated);\n    return sanitized;\n  }\n\n  /** {@link GeneratorService.generate} */\n  async generate(options: Options): Promise<string> {\n    return await this.strategy.generate(options);\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\n/** Describes the structure of data stored by the SecretState's\n *  encrypted state. Notably, this interface ensures that `Disclosed`\n *  round trips through JSON serialization. It also preserves the\n *  Id.\n */\nexport type ClassifiedFormat<Id, Disclosed> = {\n  /** Identifies records. `null` when storing a `value` */\n  readonly id: Id | null;\n  /** Serialized {@link EncString} of the secret state's\n   *  secret-level classified data.\n   */\n  readonly secret: string;\n  /** serialized representation of the secret state's\n   * disclosed-level classified data.\n   */\n  readonly disclosed: Jsonify<Disclosed>;\n};\n\nexport function isClassifiedFormat<Id, Disclosed>(\n  value: any,\n): value is ClassifiedFormat<Id, Disclosed> {\n  return \"id\" in value && \"secret\" in value && \"disclosed\" in value;\n}\n","import { Observable } from \"rxjs\";\n\nimport { DynamicStateConstraints, StateConstraints, SubjectConstraints } from \"../types\";\n\n/** A pattern for types that depend upon a dynamic set of constraints.\n *\n * Consumers of this dependency should track the last-received state and\n * apply it when application state is received or emitted. If `constraints$`\n * emits an unrecoverable error, the consumer should continue using the\n * last-emitted constraints. If `constraints$` completes, the consumer should\n * continue using the last-emitted constraints.\n */\nexport type SubjectConstraintsDependency<State> = {\n  /** A stream that emits constraints when subscribed and when the\n   *  constraints change. The stream should not emit `null` or\n   *  `undefined`.\n   */\n  constraints$: Observable<SubjectConstraints<State>>;\n};\n\n/** Returns `true` if the input constraint is a `DynamicStateConstraints<T>`.\n *  Otherwise, returns false.\n *  @param constraints the constraint to evaluate.\n * */\nexport function isDynamic<State>(\n  constraints: StateConstraints<State> | DynamicStateConstraints<State>,\n): constraints is DynamicStateConstraints<State> {\n  return constraints && \"calibrate\" in constraints;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  Observer,\n  SubjectLike,\n  Unsubscribable,\n  ReplaySubject,\n  filter,\n  map,\n  takeUntil,\n  distinctUntilChanged,\n  BehaviorSubject,\n  Observable,\n  Subscription,\n  last,\n  concat,\n  combineLatestWith,\n  catchError,\n  EMPTY,\n  concatMap,\n  OperatorFunction,\n  pipe,\n  first,\n  withLatestFrom,\n  scan,\n  skip,\n} from \"rxjs\";\n\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { SingleUserState, UserKeyDefinition } from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { UserEncryptor } from \"../cryptography/user-encryptor.abstraction\";\nimport { UserBound } from \"../dependencies\";\nimport { anyComplete, errorOnChange, ready, withLatestReady } from \"../rx\";\nimport { Constraints, SubjectConstraints, WithConstraints } from \"../types\";\n\nimport { ClassifiedFormat, isClassifiedFormat } from \"./classified-format\";\nimport { unconstrained$ } from \"./identity-state-constraint\";\nimport { isObjectKey, ObjectKey, toUserKeyDefinition } from \"./object-key\";\nimport { isDynamic } from \"./state-constraints-dependency\";\nimport { UserStateSubjectDependencies } from \"./user-state-subject-dependencies\";\n\ntype Constrained<State> = { constraints: Readonly<Constraints<State>>; state: State };\n\n// FIXME: The subject should always repeat the value when it's own `next` method is called.\n//\n// Chrome StateService only calls `next` when the underlying values changes. When enforcing,\n// say, a minimum constraint, any value beneath the minimum becomes the minimum. This prevents\n// invalid data received in sequence from calling `next` because the state provider doesn't\n// emit.\n//\n// The hack is pretty simple. Insert arbitrary data into the saved data to ensure\n// that it *always* changes.\n//\n// Any real fix will be fairly complex because it needs to recognize *fast* when it\n// is waiting. Alternatively, the kludge could become a format properly fed by random noise.\n//\n// NOTE: this only matters for plaintext objects; encrypted fields change with every\n//   update b/c their IVs change.\nconst ALWAYS_UPDATE_KLUDGE = \"$^$ALWAYS_UPDATE_KLUDGE_PROPERTY$^$\";\n\n/**\n * Adapt a state provider to an rxjs subject.\n *\n * This subject buffers the last value it received in memory. The buffer is erased\n * if the subject receives a complete or error event. It does not persist the buffer.\n *\n * Warning! The user state subject has a synchronous interface, but subscriptions are\n * always asynchronous.\n *\n * @template State the state stored by the subject\n * @template Dependencies use-specific dependencies provided by the user.\n */\nexport class UserStateSubject<\n    State extends object,\n    Secret = State,\n    Disclosed = never,\n    Dependencies = null,\n  >\n  extends Observable<State>\n  implements SubjectLike<State>\n{\n  /**\n   * Instantiates the user state subject bound to a persistent backing store\n   * @param key identifies the persistent backing store\n   * @param getState creates a persistent backing store using a key\n   * @param context tailor the subject's behavior for a particular\n   *   purpose.\n   * @param dependencies.when$ blocks updates to the state subject until\n   *   this becomes true. When this occurs, only the last-received update\n   *   is applied. The blocked update is kept in memory. It does not persist\n   *   to disk.\n   * @param dependencies.singleUserId$ writes block until the singleUserId$\n   *   is available.\n   */\n  constructor(\n    private key: UserKeyDefinition<State> | ObjectKey<State, Secret, Disclosed>,\n    getState: (key: UserKeyDefinition<unknown>) => SingleUserState<unknown>,\n    private context: UserStateSubjectDependencies<State, Dependencies>,\n  ) {\n    super();\n\n    if (isObjectKey(this.key)) {\n      // classification and encryption only supported with `ObjectKey`\n      this.objectKey = this.key;\n      this.stateKey = toUserKeyDefinition(this.key);\n      this.state = getState(this.stateKey);\n    } else {\n      // raw state access granted with `UserKeyDefinition`\n      this.objectKey = null;\n      this.stateKey = this.key as UserKeyDefinition<State>;\n      this.state = getState(this.stateKey);\n    }\n\n    // normalize dependencies\n    const when$ = (this.context.when$ ?? new BehaviorSubject(true)).pipe(distinctUntilChanged());\n\n    // manage dependencies through replay subjects since `UserStateSubject`\n    // reads them in multiple places\n    const encryptor$ = new ReplaySubject<UserEncryptor>(1);\n    const { singleUserId$, singleUserEncryptor$ } = this.context;\n    this.encryptor(singleUserEncryptor$ ?? singleUserId$).subscribe(encryptor$);\n\n    const constraints$ = new ReplaySubject<SubjectConstraints<State>>(1);\n    (this.context.constraints$ ?? unconstrained$<State>())\n      .pipe(\n        // FIXME: this should probably log that an error occurred\n        catchError(() => EMPTY),\n      )\n      .subscribe(constraints$);\n\n    const dependencies$ = new ReplaySubject<Dependencies>(1);\n    if (this.context.dependencies$) {\n      this.context.dependencies$.subscribe(dependencies$);\n    } else {\n      dependencies$.next(null);\n    }\n\n    // wire output before input so that output normalizes the current state\n    // before any `next` value is processed\n    this.outputSubscription = this.state.state$\n      .pipe(this.declassify(encryptor$), this.adjust(combineLatestWith(constraints$)))\n      .subscribe(this.output);\n\n    const last$ = new ReplaySubject<State>(1);\n    this.output\n      .pipe(\n        last(),\n        map((o) => o.state),\n      )\n      .subscribe(last$);\n\n    // the update stream simulates the stateProvider's \"shouldUpdate\"\n    // functionality & applies policy\n    const updates$ = concat(\n      this.input.pipe(\n        this.when(when$),\n        this.adjust(withLatestReady(constraints$)),\n        this.prepareUpdate(this, dependencies$),\n      ),\n      // when the output subscription completes, its last-emitted value\n      // loops around to the input for finalization\n      last$.pipe(this.fix(constraints$), this.prepareUpdate(last$, dependencies$)),\n    );\n\n    // classification/encryption bound to the input subscription's lifetime\n    // to ensure that `fix` has access to the encryptor key\n    //\n    // FIXME: this should probably timeout when a lock occurs\n    this.inputSubscription = updates$\n      .pipe(this.classify(encryptor$), takeUntil(anyComplete([when$, this.input, encryptor$])))\n      .subscribe({\n        next: (state) => this.onNext(state),\n        error: (e: unknown) => this.onError(e),\n        complete: () => this.onComplete(),\n      });\n  }\n\n  private stateKey: UserKeyDefinition<unknown>;\n  private objectKey: ObjectKey<State, Secret, Disclosed>;\n\n  private encryptor(\n    singleUserEncryptor$: Observable<UserBound<\"encryptor\", UserEncryptor> | UserId>,\n  ): Observable<UserEncryptor> {\n    return singleUserEncryptor$.pipe(\n      // normalize inputs\n      map((maybe): UserBound<\"encryptor\", UserEncryptor> => {\n        if (typeof maybe === \"object\" && \"encryptor\" in maybe) {\n          return maybe;\n        } else if (typeof maybe === \"string\") {\n          return { encryptor: null, userId: maybe as UserId };\n        } else {\n          throw new Error(`Invalid encryptor input received for ${this.key.key}.`);\n        }\n      }),\n      // fail the stream if the state desyncs from the bound userId\n      errorOnChange(\n        ({ userId }) => userId,\n        (expectedUserId, actualUserId) => ({ expectedUserId, actualUserId }),\n      ),\n      // reduce emissions to when encryptor changes\n      map(({ encryptor }) => encryptor),\n      distinctUntilChanged(),\n    );\n  }\n\n  private when(when$: Observable<boolean>): OperatorFunction<State, State> {\n    return pipe(\n      combineLatestWith(when$.pipe(distinctUntilChanged())),\n      filter(([_, when]) => !!when),\n      map(([input]) => input),\n    );\n  }\n\n  private prepareUpdate(\n    init$: Observable<State>,\n    dependencies$: Observable<Dependencies>,\n  ): OperatorFunction<Constrained<State>, State> {\n    return (input$) =>\n      concat(\n        // `init$` becomes the accumulator for `scan`\n        init$.pipe(\n          first(),\n          map((init) => [init, null] as const),\n        ),\n        input$.pipe(\n          map((constrained) => constrained.state),\n          withLatestFrom(dependencies$),\n        ),\n      ).pipe(\n        // scan only emits values that can cause updates\n        scan(([prev], [pending, dependencies]) => {\n          const shouldUpdate = this.context.shouldUpdate?.(prev, pending, dependencies) ?? true;\n          if (shouldUpdate) {\n            // actual update\n            const next = this.context.nextValue?.(prev, pending, dependencies) ?? pending;\n            return [next, dependencies];\n          } else {\n            // false update\n            return [prev, null];\n          }\n        }),\n        // the first emission primes `scan`s aggregator\n        skip(1),\n        map(([state]) => state),\n\n        // clean up false updates\n        distinctUntilChanged(),\n      );\n  }\n\n  private adjust(\n    withConstraints: OperatorFunction<State, [State, SubjectConstraints<State>]>,\n  ): OperatorFunction<State, Constrained<State>> {\n    return pipe(\n      // how constraints are blended with incoming emissions varies:\n      // * `output` needs to emit when constraints update\n      // * `input` needs to wait until a message flows through the pipe\n      withConstraints,\n      map(([loadedState, constraints]) => {\n        // bypass nulls\n        if (!loadedState && !this.objectKey?.initial) {\n          return {\n            constraints: {} as Constraints<State>,\n            state: null,\n          } satisfies Constrained<State>;\n        }\n\n        const unconstrained = loadedState ?? structuredClone(this.objectKey.initial);\n        const calibration = isDynamic(constraints)\n          ? constraints.calibrate(unconstrained)\n          : constraints;\n        const adjusted = calibration.adjust(unconstrained);\n\n        return {\n          constraints: calibration.constraints,\n          state: adjusted,\n        };\n      }),\n    );\n  }\n\n  private fix(\n    constraints$: Observable<SubjectConstraints<State>>,\n  ): OperatorFunction<State, Constrained<State>> {\n    return pipe(\n      combineLatestWith(constraints$),\n      map(([loadedState, constraints]) => {\n        const calibration = isDynamic(constraints)\n          ? constraints.calibrate(loadedState)\n          : constraints;\n        const fixed = calibration.fix(loadedState);\n\n        return {\n          constraints: calibration.constraints,\n          state: fixed,\n        };\n      }),\n    );\n  }\n\n  private declassify(encryptor$: Observable<UserEncryptor>): OperatorFunction<unknown, State> {\n    // short-circuit if they key lacks encryption support\n    if (!this.objectKey || this.objectKey.format === \"plain\") {\n      return (input$) => input$ as Observable<State>;\n    }\n\n    // all other keys support encryption; enable encryptor support\n    return pipe(\n      this.mapToClassifiedFormat(),\n      combineLatestWith(encryptor$),\n      concatMap(async ([input, encryptor]) => {\n        // pass through null values\n        if (input === null || input === undefined) {\n          return null;\n        }\n\n        // decrypt classified data\n        const { secret, disclosed } = input;\n        const encrypted = EncString.fromJSON(secret);\n        const decryptedSecret = await encryptor.decrypt<Secret>(encrypted);\n\n        // assemble into proper state\n        const declassified = this.objectKey.classifier.declassify(disclosed, decryptedSecret);\n        const state = this.objectKey.options.deserializer(declassified);\n\n        return state;\n      }),\n    );\n  }\n\n  private mapToClassifiedFormat(): OperatorFunction<unknown, ClassifiedFormat<unknown, unknown>> {\n    // FIXME: warn when data is dropped in the console and/or report an error\n    //   through the observable; consider redirecting dropped data to a recovery\n    //   location\n\n    // user-state subject's default format is object-aware\n    if (this.objectKey && this.objectKey.format === \"classified\") {\n      return map((input) => {\n        if (!isClassifiedFormat(input)) {\n          return null;\n        }\n\n        return input;\n      });\n    }\n\n    // secret state's format wraps objects in an array\n    if (this.objectKey && this.objectKey.format === \"secret-state\") {\n      return map((input) => {\n        if (!Array.isArray(input)) {\n          return null;\n        }\n\n        const [unwrapped] = input;\n        if (!isClassifiedFormat(unwrapped)) {\n          return null;\n        }\n\n        return unwrapped;\n      });\n    }\n\n    throw new Error(`unsupported serialization format: ${this.objectKey.format}`);\n  }\n\n  private classify(encryptor$: Observable<UserEncryptor>): OperatorFunction<State, unknown> {\n    // short-circuit if they key lacks encryption support; `encryptor` is\n    // readied to preserve `dependencies.singleUserId$` emission contract\n    if (!this.objectKey || this.objectKey.format === \"plain\") {\n      return pipe(\n        ready(encryptor$),\n        map((input) => input as unknown),\n      );\n    }\n\n    // all other keys support encryption; enable encryptor support\n    return pipe(\n      withLatestReady(encryptor$),\n      concatMap(async ([input, encryptor]) => {\n        // fail fast if there's no value\n        if (input === null || input === undefined) {\n          return null;\n        }\n\n        // split data by classification level\n        const serialized = JSON.parse(JSON.stringify(input));\n        const classified = this.objectKey.classifier.classify(serialized);\n\n        // protect data\n        const encrypted = await encryptor.encrypt(classified.secret);\n        const secret = JSON.parse(JSON.stringify(encrypted));\n\n        // wrap result in classified format envelope for storage\n        const envelope = {\n          id: null as void,\n          secret,\n          disclosed: classified.disclosed,\n        } satisfies ClassifiedFormat<void, Disclosed>;\n\n        // deliberate type erasure; the type is restored during `declassify`\n        return envelope as ClassifiedFormat<unknown, unknown>;\n      }),\n      this.mapToStorageFormat(),\n    );\n  }\n\n  private mapToStorageFormat(): OperatorFunction<ClassifiedFormat<unknown, unknown>, unknown> {\n    // user-state subject's default format is object-aware\n    if (this.objectKey && this.objectKey.format === \"classified\") {\n      return map((input) => input as unknown);\n    }\n\n    // secret state's format wraps objects in an array\n    if (this.objectKey && this.objectKey.format === \"secret-state\") {\n      return map((input) => [input] as unknown);\n    }\n\n    throw new Error(`unsupported serialization format: ${this.objectKey.format}`);\n  }\n\n  /** The userId to which the subject is bound.\n   */\n  get userId() {\n    return this.state.userId;\n  }\n\n  next(value: State) {\n    this.input?.next(value);\n  }\n\n  error(err: any) {\n    this.input?.error(err);\n  }\n\n  complete() {\n    this.input?.complete();\n  }\n\n  /** Subscribe to the subject's event stream\n   * @param observer listening for events\n   * @returns the subscription\n   */\n  subscribe(observer?: Partial<Observer<State>> | ((value: State) => void) | null): Subscription {\n    return this.output.pipe(map((wc) => wc.state)).subscribe(observer);\n  }\n\n  // using subjects to ensure the right semantics are followed;\n  // if greater efficiency becomes desirable, consider implementing\n  // `SubjectLike` directly\n  private input = new ReplaySubject<State>(1);\n  private state: SingleUserState<unknown>;\n  private readonly output = new ReplaySubject<WithConstraints<State>>(1);\n\n  /** A stream containing settings and their last-applied constraints. */\n  get withConstraints$() {\n    return this.output.asObservable();\n  }\n\n  private inputSubscription: Unsubscribable;\n  private outputSubscription: Unsubscribable;\n\n  private counter = 0;\n\n  private onNext(value: unknown) {\n    this.state\n      .update(() => {\n        if (typeof value === \"object\") {\n          // related: ALWAYS_UPDATE_KLUDGE FIXME\n          const counter = this.counter++;\n          if (counter > Number.MAX_SAFE_INTEGER) {\n            this.counter = 0;\n          }\n\n          const kludge = value as any;\n          kludge[ALWAYS_UPDATE_KLUDGE] = counter;\n        }\n\n        return value;\n      })\n      .catch((e: any) => this.onError(e));\n  }\n\n  private onError(value: any) {\n    if (!this.isDisposed) {\n      this.output.error(value);\n    }\n\n    this.dispose();\n  }\n\n  private onComplete() {\n    if (!this.isDisposed) {\n      this.output.complete();\n    }\n\n    this.dispose();\n  }\n\n  private get isDisposed() {\n    return this.input === null;\n  }\n\n  private dispose() {\n    if (!this.isDisposed) {\n      // clean up internal subscriptions\n      this.inputSubscription?.unsubscribe();\n      this.outputSubscription?.unsubscribe();\n      this.inputSubscription = null;\n      this.outputSubscription = null;\n\n      // drop input to ensure its value is removed from memory\n      this.input = null;\n    }\n  }\n}\n","import { UserKeyDefinition, UserKeyDefinitionOptions } from \"../../platform/state\";\n// eslint-disable-next-line -- `StateDefinition` used as a type\nimport type { StateDefinition } from \"../../platform/state/state-definition\";\n\nimport { ClassifiedFormat } from \"./classified-format\";\nimport { Classifier } from \"./classifier\";\n\n/** Determines the format of persistent storage.\n *  `plain` storage is a plain-old javascript object. Use this type\n *    when you are performing your own encryption and decryption.\n *  `classified` uses the `ClassifiedFormat` type as its format.\n *  `secret-state` uses `Array<ClassifiedFormat>` with a length of 1.\n *  @remarks - CAUTION! If your on-disk data is not in a correct format,\n *   the storage system treats the data as corrupt and returns your initial\n *   value.\n */\nexport type ObjectStorageFormat = \"plain\" | \"classified\" | \"secret-state\";\n\n/** A key for storing JavaScript objects (`{ an: \"example\" }`)\n * in a UserStateSubject.\n */\n// FIXME: promote to class: `ObjectConfiguration<State, Secret, Disclosed>`.\n//        The class receives `encryptor`, `prepareNext`, `adjust`, and `fix`\n//        From `UserStateSubject`. `UserStateSubject` keeps `classify` and\n//        `declassify`. The class should also include serialization\n//        facilities (to be used in place of JSON.parse/stringify) in it's\n//        options. Also allow swap between \"classifier\" and \"classification\"; the\n//        latter is a list of properties/arguments to the specific classifier in-use.\nexport type ObjectKey<State, Secret = State, Disclosed = Record<string, never>> = {\n  target: \"object\";\n  key: string;\n  state: StateDefinition;\n  classifier: Classifier<State, Disclosed, Secret>;\n  format: ObjectStorageFormat;\n  options: UserKeyDefinitionOptions<State>;\n  initial?: State;\n};\n\nexport function isObjectKey(key: any): key is ObjectKey<unknown> {\n  return key.target === \"object\" && \"format\" in key && \"classifier\" in key;\n}\n\nexport function toUserKeyDefinition<State, Secret, Disclosed>(\n  key: ObjectKey<State, Secret, Disclosed>,\n) {\n  if (key.format === \"plain\") {\n    const plain = new UserKeyDefinition<State>(key.state, key.key, key.options);\n\n    return plain;\n  } else if (key.format === \"classified\") {\n    const classified = new UserKeyDefinition<ClassifiedFormat<void, Disclosed>>(\n      key.state,\n      key.key,\n      {\n        cleanupDelayMs: key.options.cleanupDelayMs,\n        deserializer: (jsonValue) => jsonValue as ClassifiedFormat<void, Disclosed>,\n        clearOn: key.options.clearOn,\n      },\n    );\n\n    return classified;\n  } else if (key.format === \"secret-state\") {\n    const classified = new UserKeyDefinition<[ClassifiedFormat<void, Disclosed>]>(\n      key.state,\n      key.key,\n      {\n        cleanupDelayMs: key.options.cleanupDelayMs,\n        deserializer: (jsonValue) => jsonValue as [ClassifiedFormat<void, Disclosed>],\n        clearOn: key.options.clearOn,\n      },\n    );\n\n    return classified;\n  } else {\n    throw new Error(`unknown format: ${key.format}`);\n  }\n}\n","import { map, pipe } from \"rxjs\";\n\nimport { reduceCollection, distinctIfShallowMatch } from \"@bitwarden/common/tools/rx\";\n\nimport { DefaultPolicyEvaluator } from \"./policies\";\nimport { PolicyConfiguration } from \"./types\";\n\n/** Maps an administrative console policy to a policy evaluator using the provided configuration.\n *  @param configuration the configuration that constructs the evaluator.\n */\nexport function mapPolicyToEvaluator<Policy, Evaluator>(\n  configuration: PolicyConfiguration<Policy, Evaluator>,\n) {\n  return pipe(\n    reduceCollection(configuration.combine, configuration.disabledValue),\n    distinctIfShallowMatch(),\n    map(configuration.createEvaluator),\n  );\n}\n\n/** Maps an administrative console policy to constraints using the provided configuration.\n *  @param configuration the configuration that constructs the constraints.\n */\nexport function mapPolicyToConstraints<Policy, Evaluator>(\n  configuration: PolicyConfiguration<Policy, Evaluator>,\n  email: string,\n) {\n  return pipe(\n    reduceCollection(configuration.combine, configuration.disabledValue),\n    distinctIfShallowMatch(),\n    map((policy) => configuration.toConstraints(policy, email)),\n  );\n}\n\n/** Constructs a method that maps a policy to the default (no-op) policy. */\nexport function newDefaultEvaluator<Target>() {\n  return () => {\n    return pipe(map((_) => new DefaultPolicyEvaluator<Target>()));\n  };\n}\n","import { GENERATOR_DISK, UserKeyDefinition } from \"@bitwarden/common/platform/state\";\n\nimport { DefaultCredentialPreferences } from \"../data\";\nimport { CredentialPreference } from \"../types\";\n\n/** plaintext password generation options */\nexport const PREFERENCES = new UserKeyDefinition<CredentialPreference>(\n  GENERATOR_DISK,\n  \"credentialPreferences\",\n  {\n    deserializer: (value) => {\n      const result = (value as any) ?? {};\n\n      for (const key in DefaultCredentialPreferences) {\n        // bind `key` to `category` to transmute the type\n        const category: keyof typeof DefaultCredentialPreferences = key as any;\n\n        const preference = result[category] ?? { ...DefaultCredentialPreferences[category] };\n        if (typeof preference.updated === \"string\") {\n          preference.updated = new Date(preference.updated);\n        }\n\n        result[category] = preference;\n      }\n\n      return result;\n    },\n    clearOn: [\"logout\"],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  BehaviorSubject,\n  combineLatest,\n  concat,\n  concatMap,\n  distinctUntilChanged,\n  endWith,\n  filter,\n  first,\n  firstValueFrom,\n  ignoreElements,\n  map,\n  Observable,\n  ReplaySubject,\n  share,\n  skipUntil,\n  switchMap,\n  takeUntil,\n  withLatestFrom,\n} from \"rxjs\";\nimport { Simplify } from \"type-fest\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { LegacyEncryptorProvider } from \"@bitwarden/common/tools/cryptography/legacy-encryptor-provider\";\nimport {\n  OnDependency,\n  SingleUserDependency,\n  UserDependency,\n} from \"@bitwarden/common/tools/dependencies\";\nimport { IntegrationId, IntegrationMetadata } from \"@bitwarden/common/tools/integration\";\nimport { RestClient } from \"@bitwarden/common/tools/integration/rpc\";\nimport { anyComplete } from \"@bitwarden/common/tools/rx\";\nimport { UserStateSubject } from \"@bitwarden/common/tools/state/user-state-subject\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { Randomizer } from \"../abstractions\";\nimport {\n  Generators,\n  getForwarderConfiguration,\n  Integrations,\n  toCredentialGeneratorConfiguration,\n} from \"../data\";\nimport { availableAlgorithms } from \"../policies/available-algorithms-policy\";\nimport { mapPolicyToConstraints } from \"../rx\";\nimport {\n  CredentialAlgorithm,\n  CredentialCategories,\n  CredentialCategory,\n  AlgorithmInfo,\n  CredentialPreference,\n  isForwarderIntegration,\n  ForwarderIntegration,\n} from \"../types\";\nimport {\n  CredentialGeneratorConfiguration as Configuration,\n  CredentialGeneratorInfo,\n  GeneratorDependencyProvider,\n} from \"../types/credential-generator-configuration\";\nimport { GeneratorConstraints } from \"../types/generator-constraints\";\n\nimport { PREFERENCES } from \"./credential-preferences\";\n\ntype Policy$Dependencies = UserDependency;\ntype Settings$Dependencies = Partial<UserDependency>;\ntype Generate$Dependencies = Simplify<Partial<OnDependency> & Partial<UserDependency>> & {\n  /** Emits the active website when subscribed.\n   *\n   *  The generator does not respond to emissions of this interface;\n   *  If it is provided, the generator blocks until a value becomes available.\n   *  When `website$` is omitted, the generator uses the empty string instead.\n   *  When `website$` completes, the generator completes.\n   *  When `website$` errors, the generator forwards the error.\n   */\n  website$?: Observable<string>;\n\n  integration$?: Observable<IntegrationId>;\n};\n\ntype Algorithms$Dependencies = Partial<UserDependency>;\n\nconst OPTIONS_FRAME_SIZE = 512;\n\nexport class CredentialGeneratorService {\n  constructor(\n    private readonly randomizer: Randomizer,\n    private readonly stateProvider: StateProvider,\n    private readonly policyService: PolicyService,\n    private readonly apiService: ApiService,\n    private readonly i18nService: I18nService,\n    private readonly encryptorProvider: LegacyEncryptorProvider,\n    private readonly accountService: AccountService,\n  ) {}\n\n  private getDependencyProvider(): GeneratorDependencyProvider {\n    return {\n      client: new RestClient(this.apiService, this.i18nService),\n      i18nService: this.i18nService,\n      randomizer: this.randomizer,\n    };\n  }\n\n  // FIXME: the rxjs methods of this service can be a lot more resilient if\n  // `Subjects` are introduced where sharing occurs\n\n  /** Generates a stream of credentials\n   * @param configuration determines which generator's settings are loaded\n   * @param dependencies.on$ when specified, a new credential is emitted when\n   *   this emits. Otherwise, a new credential is emitted when the settings\n   *   update.\n   */\n  generate$<Settings extends object, Policy>(\n    configuration: Readonly<Configuration<Settings, Policy>>,\n    dependencies?: Generate$Dependencies,\n  ) {\n    // instantiate the engine\n    const engine = configuration.engine.create(this.getDependencyProvider());\n\n    // stream blocks until all of these values are received\n    const website$ = dependencies?.website$ ?? new BehaviorSubject<string>(null);\n    const request$ = website$.pipe(map((website) => ({ website })));\n    const settings$ = this.settings$(configuration, dependencies);\n\n    // if on$ triggers before settings are loaded, trigger as soon\n    // as they become available.\n    let readyOn$: Observable<any> = null;\n    if (dependencies?.on$) {\n      const NO_EMISSIONS = {};\n      const ready$ = combineLatest([settings$, request$]).pipe(\n        first(null, NO_EMISSIONS),\n        filter((value) => value !== NO_EMISSIONS),\n        share(),\n      );\n      readyOn$ = concat(\n        dependencies.on$?.pipe(switchMap(() => ready$)),\n        dependencies.on$.pipe(skipUntil(ready$)),\n      );\n    }\n\n    // generation proper\n    const generate$ = (readyOn$ ?? settings$).pipe(\n      withLatestFrom(request$, settings$),\n      concatMap(([, request, settings]) => engine.generate(request, settings)),\n      takeUntil(anyComplete([request$, settings$])),\n    );\n\n    return generate$;\n  }\n\n  /** Emits metadata concerning the provided generation algorithms\n   *  @param category the category or categories of interest\n   *  @param dependences.userId$ when provided, the algorithms are filter to only\n   *   those matching the provided user's policy. Otherwise, emits the algorithms\n   *   available to the active user.\n   *  @returns An observable that emits algorithm metadata.\n   */\n  algorithms$(\n    category: CredentialCategory,\n    dependencies?: Algorithms$Dependencies,\n  ): Observable<AlgorithmInfo[]>;\n  algorithms$(\n    category: CredentialCategory[],\n    dependencies?: Algorithms$Dependencies,\n  ): Observable<AlgorithmInfo[]>;\n  algorithms$(\n    category: CredentialCategory | CredentialCategory[],\n    dependencies?: Algorithms$Dependencies,\n  ) {\n    // any cast required here because TypeScript fails to bind `category`\n    // to the union-typed overload of `algorithms`.\n    const algorithms = this.algorithms(category as any);\n\n    // fall back to default bindings\n    const userId$ = dependencies?.userId$ ?? this.stateProvider.activeUserId$;\n\n    // monitor completion\n    const completion$ = userId$.pipe(ignoreElements(), endWith(true));\n\n    // apply policy\n    const algorithms$ = userId$.pipe(\n      distinctUntilChanged(),\n      switchMap((userId) => {\n        // complete policy emissions otherwise `switchMap` holds `algorithms$` open indefinitely\n        const policies$ = this.policyService.getAll$(PolicyType.PasswordGenerator, userId).pipe(\n          map((p) => new Set(availableAlgorithms(p))),\n          takeUntil(completion$),\n        );\n        return policies$;\n      }),\n      map((available) => {\n        const filtered = algorithms.filter(\n          (c) => isForwarderIntegration(c.id) || available.has(c.id),\n        );\n        return filtered;\n      }),\n    );\n\n    return algorithms$;\n  }\n\n  /** Lists metadata for the algorithms in a credential category\n   *  @param category the category or categories of interest\n   *  @returns A list containing the requested metadata.\n   */\n  algorithms(category: CredentialCategory): AlgorithmInfo[];\n  algorithms(category: CredentialCategory[]): AlgorithmInfo[];\n  algorithms(category: CredentialCategory | CredentialCategory[]): AlgorithmInfo[] {\n    const categories: CredentialCategory[] = Array.isArray(category) ? category : [category];\n\n    const algorithms = categories\n      .flatMap((c) => CredentialCategories[c] as CredentialAlgorithm[])\n      .map((id) => this.algorithm(id))\n      .filter((info) => info !== null);\n\n    const forwarders = Object.keys(Integrations)\n      .map((key: keyof typeof Integrations) => {\n        const forwarder: ForwarderIntegration = { forwarder: Integrations[key].id };\n        return this.algorithm(forwarder);\n      })\n      .filter((forwarder) => categories.includes(forwarder.category));\n\n    return algorithms.concat(forwarders);\n  }\n\n  /** Look up the metadata for a specific generator algorithm\n   *  @param id identifies the algorithm\n   *  @returns the requested metadata, or `null` if the metadata wasn't found.\n   */\n  algorithm(id: CredentialAlgorithm): AlgorithmInfo {\n    let generator: CredentialGeneratorInfo = null;\n    let integration: IntegrationMetadata = null;\n\n    if (isForwarderIntegration(id)) {\n      const forwarderConfig = getForwarderConfiguration(id.forwarder);\n      integration = forwarderConfig;\n\n      if (forwarderConfig) {\n        generator = toCredentialGeneratorConfiguration(forwarderConfig);\n      }\n    } else {\n      generator = Generators[id];\n    }\n\n    if (!generator) {\n      throw new Error(`Invalid credential algorithm: ${JSON.stringify(id)}`);\n    }\n\n    const info: AlgorithmInfo = {\n      id: generator.id,\n      category: generator.category,\n      name: integration ? integration.name : this.i18nService.t(generator.nameKey),\n      generate: this.i18nService.t(generator.generateKey),\n      generatedValue: this.i18nService.t(generator.generatedValueKey),\n      copy: this.i18nService.t(generator.copyKey),\n      useGeneratedValue: this.i18nService.t(generator.useGeneratedValueKey),\n      onlyOnRequest: generator.onlyOnRequest,\n      request: generator.request,\n    };\n\n    if (generator.descriptionKey) {\n      info.description = this.i18nService.t(generator.descriptionKey);\n    }\n\n    return info;\n  }\n\n  /** Get the settings for the provided configuration\n   * @param configuration determines which generator's settings are loaded\n   * @param dependencies.userId$ identifies the user to which the settings are bound.\n   *   If this parameter is not provided, the observable follows the active user and\n   *   may not complete.\n   * @returns an observable that emits settings\n   * @remarks the observable enforces policies on the settings\n   */\n  settings$<Settings extends object, Policy>(\n    configuration: Configuration<Settings, Policy>,\n    dependencies?: Settings$Dependencies,\n  ) {\n    const userId$ = dependencies?.userId$ ?? this.stateProvider.activeUserId$;\n    const constraints$ = this.policy$(configuration, { userId$ });\n\n    const settings$ = userId$.pipe(\n      filter((userId) => !!userId),\n      distinctUntilChanged(),\n      switchMap((userId) => {\n        const singleUserId$ = new BehaviorSubject(userId);\n        const singleUserEncryptor$ = this.encryptorProvider.userEncryptor$(OPTIONS_FRAME_SIZE, {\n          singleUserId$,\n        });\n\n        const state$ = new UserStateSubject(\n          configuration.settings.account,\n          (key) => this.stateProvider.getUser(userId, key),\n          { constraints$, singleUserEncryptor$ },\n        );\n        return state$;\n      }),\n      map((settings) => settings ?? structuredClone(configuration.settings.initial)),\n      takeUntil(anyComplete(userId$)),\n    );\n\n    return settings$;\n  }\n\n  /** Get a subject bound to credential generator preferences.\n   *  @param dependencies.singleUserId$ identifies the user to which the preferences are bound\n   *  @returns a promise that resolves with the subject once `dependencies.singleUserId$`\n   *   becomes available.\n   *  @remarks Preferences determine which algorithms are used when generating a\n   *   credential from a credential category (e.g. `PassX` or `Username`). Preferences\n   *   should not be used to hold navigation history. Use @bitwarden/generator-navigation\n   *   instead.\n   */\n  async preferences(\n    dependencies: SingleUserDependency,\n  ): Promise<UserStateSubject<CredentialPreference>> {\n    const singleUserId$ = new ReplaySubject<UserId>(1);\n    dependencies.singleUserId$\n      .pipe(\n        filter((userId) => !!userId),\n        distinctUntilChanged(),\n      )\n      .subscribe(singleUserId$);\n    const singleUserEncryptor$ = this.encryptorProvider.userEncryptor$(OPTIONS_FRAME_SIZE, {\n      singleUserId$,\n    });\n    const userId = await firstValueFrom(singleUserId$);\n\n    // FIXME: enforce policy\n    const subject = new UserStateSubject(\n      PREFERENCES,\n      (key) => this.stateProvider.getUser(userId, key),\n      { singleUserEncryptor$ },\n    );\n\n    return subject;\n  }\n\n  /** Get a subject bound to a specific user's settings\n   * @param configuration determines which generator's settings are loaded\n   * @param dependencies.singleUserId$ identifies the user to which the settings are bound\n   * @returns a promise that resolves with the subject once\n   *  `dependencies.singleUserId$` becomes available.\n   * @remarks the subject enforces policy for the settings\n   */\n  async settings<Settings extends object, Policy>(\n    configuration: Readonly<Configuration<Settings, Policy>>,\n    dependencies: SingleUserDependency,\n  ) {\n    const singleUserId$ = new ReplaySubject<UserId>(1);\n    dependencies.singleUserId$\n      .pipe(\n        filter((userId) => !!userId),\n        distinctUntilChanged(),\n      )\n      .subscribe(singleUserId$);\n    const singleUserEncryptor$ = this.encryptorProvider.userEncryptor$(OPTIONS_FRAME_SIZE, {\n      singleUserId$,\n    });\n    const userId = await firstValueFrom(singleUserId$);\n\n    const constraints$ = this.policy$(configuration, { userId$: dependencies.singleUserId$ });\n\n    const subject = new UserStateSubject(\n      configuration.settings.account,\n      (key) => this.stateProvider.getUser(userId, key),\n      { constraints$, singleUserEncryptor$ },\n    );\n\n    return subject;\n  }\n\n  /** Get the policy constraints for the provided configuration\n   *  @param dependencies.userId$ determines which user's policy is loaded\n   *  @returns an observable that emits the policy once `dependencies.userId$`\n   *   and the policy become available.\n   */\n  policy$<Settings, Policy>(\n    configuration: Configuration<Settings, Policy>,\n    dependencies: Policy$Dependencies,\n  ): Observable<GeneratorConstraints<Settings>> {\n    const email$ = dependencies.userId$.pipe(\n      distinctUntilChanged(),\n      withLatestFrom(this.accountService.accounts$),\n      filter((accounts) => !!accounts),\n      map(([userId, accounts]) => {\n        if (userId in accounts) {\n          return { userId, email: accounts[userId].email };\n        }\n\n        return { userId, email: null };\n      }),\n    );\n\n    const constraints$ = email$.pipe(\n      switchMap(({ userId, email }) => {\n        // complete policy emissions otherwise `switchMap` holds `policies$` open indefinitely\n        const policies$ = this.policyService\n          .getAll$(configuration.policy.type, userId)\n          .pipe(\n            mapPolicyToConstraints(configuration.policy, email),\n            takeUntil(anyComplete(email$)),\n          );\n        return policies$;\n      }),\n    );\n\n    return constraints$;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\n\nimport { CredentialAlgorithm, EmailAlgorithms, PasswordAlgorithms, UsernameAlgorithms } from \"..\";\n\n/** Reduces policies to a set of available algorithms\n *  @param policies the policies to reduce\n *  @returns the resulting `AlgorithmAvailabilityPolicy`\n */\nexport function availableAlgorithms(policies: Policy[]): CredentialAlgorithm[] {\n  const overridePassword = policies\n    .filter((policy) => policy.type === PolicyType.PasswordGenerator && policy.enabled)\n    .reduce(\n      (type, policy) => (type === \"password\" ? type : (policy.data.overridePasswordType ?? type)),\n      null as CredentialAlgorithm,\n    );\n\n  const policy: CredentialAlgorithm[] = [...EmailAlgorithms, ...UsernameAlgorithms];\n  if (overridePassword) {\n    policy.push(overridePassword);\n  } else {\n    policy.push(...PasswordAlgorithms);\n  }\n\n  return policy;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { Policy as AdminPolicy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { SingleUserState } from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { PolicyEvaluator } from \"./policy-evaluator.abstraction\";\n\n/** Tailors the generator service to generate a specific kind of credentials */\nexport abstract class GeneratorStrategy<Options, Policy> {\n  /** Retrieve application state that persists across locks.\n   *  @param userId: identifies the user state to retrieve\n   *  @returns the strategy's durable user state\n   */\n  durableState: (userId: UserId) => SingleUserState<Options>;\n\n  /** Gets the default options. */\n  defaults$: (userId: UserId) => Observable<Options>;\n\n  /** Identifies the policy enforced by the generator. */\n  policy: PolicyType;\n\n  /** Operator function that converts a policy collection observable to a single\n   *   policy evaluator observable.\n   * @param policy The policy being evaluated.\n   * @returns the policy evaluator. If `policy` is is `null` or `undefined`,\n   * then the evaluator defaults to the application's limits.\n   * @throws when the policy's type does not match the generator's policy type.\n   */\n  toEvaluator: () => (\n    source: Observable<AdminPolicy[]>,\n  ) => Observable<PolicyEvaluator<Policy, Options>>;\n\n  /** Generates credentials from the given options.\n   * @param options The options used to generate the credentials.\n   * @returns a promise that resolves to the generated credentials.\n   */\n  generate: (options: Options) => Promise<string>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { Classifier } from \"@bitwarden/common/tools/state/classifier\";\n\n/** Classifies an object by excluding IntegrationRequest parameters.\n */\nexport class OptionsClassifier<\n  Settings,\n  Options extends IntegrationRequest & Settings = IntegrationRequest & Settings,\n> implements Classifier<Options, Record<string, never>, Settings>\n{\n  /** Partitions `secret` into its disclosed properties and secret properties.\n   *  @param value The object to partition\n   *  @returns an object that classifies secrets.\n   *    The `disclosed` member is new and contains disclosed properties.\n   *    The `secret` member is a copy of the secret parameter, including its\n   *    prototype, with all disclosed and excluded properties deleted.\n   */\n  classify(value: Options) {\n    const secret = JSON.parse(JSON.stringify(value));\n    delete secret.website;\n    const disclosed: Record<string, never> = {};\n    return { disclosed, secret };\n  }\n\n  /** Merges the properties of `secret` and `disclosed`. When `secret` and\n   *  `disclosed` contain the same property, the `secret` property overrides\n   *  the `disclosed` property.\n   *  @param disclosed an object whose disclosed properties are merged into\n   *    the output. Unknown properties are ignored.\n   *  @param secret an objects whose properties are merged into the output.\n   *    Excluded properties are ignored. Unknown properties are retained.\n   *  @returns a new object containing the merged data.\n   *\n   *  @remarks Declassified data is always jsonified--the purpose of classifying it is\n   *   to Jsonify it,\n   *   which causes type conversions.\n   */\n  declassify(_disclosed: Jsonify<Record<keyof Settings, never>>, secret: Jsonify<Settings>) {\n    const result = { ...(secret as any), website: null };\n    return result as Jsonify<Options>;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { filter, map } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SingleUserState, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { UserKeyEncryptor } from \"@bitwarden/common/tools/cryptography/user-key-encryptor\";\nimport {\n  ApiSettings,\n  IntegrationRequest,\n  RestClient,\n} from \"@bitwarden/common/tools/integration/rpc\";\nimport { BufferedState } from \"@bitwarden/common/tools/state/buffered-state\";\nimport { PaddedDataPacker } from \"@bitwarden/common/tools/state/padded-data-packer\";\nimport { SecretKeyDefinition } from \"@bitwarden/common/tools/state/secret-key-definition\";\nimport { SecretState } from \"@bitwarden/common/tools/state/secret-state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { ForwarderConfiguration, AccountRequest, ForwarderContext } from \"../engine\";\nimport { CreateForwardingAddressRpc } from \"../engine/rpc/create-forwarding-address\";\nimport { GetAccountIdRpc } from \"../engine/rpc/get-account-id\";\nimport { newDefaultEvaluator } from \"../rx\";\nimport { NoPolicy } from \"../types\";\nimport { observe$PerUserId, sharedByUserId } from \"../util\";\n\nimport { OptionsClassifier } from \"./options-classifier\";\n\nconst OPTIONS_FRAME_SIZE = 512;\n\n/** An email forwarding service configurable through an API. */\nexport class ForwarderGeneratorStrategy<\n  Settings extends ApiSettings,\n  Options extends Settings & IntegrationRequest = Settings & IntegrationRequest,\n> extends GeneratorStrategy<Options, NoPolicy> {\n  /** Initializes the generator strategy\n   *  @param encryptService protects sensitive forwarder options\n   *  @param keyService looks up the user key when protecting data.\n   *  @param stateProvider creates the durable state for options storage\n   */\n  constructor(\n    private readonly configuration: ForwarderConfiguration<Settings>,\n    private client: RestClient,\n    private i18nService: I18nService,\n    private readonly encryptService: EncryptService,\n    private readonly keyService: KeyService,\n    private stateProvider: StateProvider,\n  ) {\n    super();\n  }\n\n  // configuration\n  readonly policy = PolicyType.PasswordGenerator;\n  defaults$ = observe$PerUserId<Options>(\n    () => this.configuration.forwarder.defaultSettings as Options,\n  );\n  toEvaluator = newDefaultEvaluator<Options>();\n  durableState = sharedByUserId((userId) => this.getUserSecrets(userId));\n\n  private get key() {\n    return this.configuration.forwarder.settings;\n  }\n\n  private get rolloverKey() {\n    return this.configuration.forwarder.importBuffer;\n  }\n\n  generate = async (options: Options) => {\n    const requestOptions: IntegrationRequest & AccountRequest = { website: options.website };\n\n    const getAccount = await this.getAccountId(this.configuration, options);\n    if (getAccount) {\n      requestOptions.accountId = await this.client.fetchJson(getAccount, requestOptions);\n    }\n\n    const create = this.createForwardingAddress(this.configuration, options);\n    const result = await this.client.fetchJson(create, requestOptions);\n    return result;\n  };\n\n  // per-user encrypted state\n  private getUserSecrets(userId: UserId): SingleUserState<Options> {\n    // construct the encryptor\n    const packer = new PaddedDataPacker(OPTIONS_FRAME_SIZE);\n    const encryptor$ = this.keyService.userKey$(userId).pipe(\n      map((key) => (key ? new UserKeyEncryptor(userId, this.encryptService, key, packer) : null)),\n      filter((encryptor) => !!encryptor),\n    );\n\n    // always exclude request properties\n    const classifier = new OptionsClassifier<Settings, Options>();\n\n    // Derive the secret key definition\n    const key = SecretKeyDefinition.value<Options, Record<string, never>, Settings>(\n      this.key.stateDefinition,\n      this.key.key,\n      classifier,\n      {\n        deserializer: (d: Jsonify<Options>) => this.key.deserializer(d as any) as any,\n        cleanupDelayMs: this.key.cleanupDelayMs,\n        clearOn: this.key.clearOn,\n      },\n    );\n\n    // the type parameter is explicit because type inference fails for `Omit<Options, \"website\">`\n    const secretState = SecretState.from<Options, void, Options, Record<string, never>, Settings>(\n      userId,\n      key,\n      this.stateProvider,\n      encryptor$,\n    );\n\n    // rollover should occur once the user key is available for decryption\n    const canDecrypt$ = this.keyService.userKey$(userId).pipe(map((key) => key !== null));\n    const rolloverState = new BufferedState(\n      this.stateProvider,\n      this.rolloverKey,\n      secretState,\n      canDecrypt$,\n    );\n\n    // cast through unknown required because there's no way to prove to\n    // the compiler that `OptionsClassifier` runs within the buffer wrapping\n    // the secret state.\n    return rolloverState as unknown as SingleUserState<Options>;\n  }\n\n  private createContext<Settings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    return new ForwarderContext(configuration, settings, this.i18nService);\n  }\n\n  private createForwardingAddress<Settings extends ApiSettings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    const context = this.createContext(configuration, settings);\n    const rpc = new CreateForwardingAddressRpc<Settings>(configuration, context);\n    return rpc;\n  }\n\n  private getAccountId<Settings extends ApiSettings>(\n    configuration: ForwarderConfiguration<Settings>,\n    settings: Settings,\n  ) {\n    if (!configuration.forwarder.getAccountId) {\n      return null;\n    }\n\n    const context = this.createContext(configuration, settings);\n    const rpc = new GetAccountIdRpc<Settings>(configuration, context);\n\n    return rpc;\n  }\n}\n","import { GENERATOR_DISK, UserKeyDefinition } from \"@bitwarden/common/platform/state\";\n\nimport {\n  PassphraseGenerationOptions,\n  PasswordGenerationOptions,\n  CatchallGenerationOptions,\n  EffUsernameGenerationOptions,\n  SubaddressGenerationOptions,\n} from \"../types\";\n\n/** plaintext password generation options */\nexport const PASSWORD_SETTINGS = new UserKeyDefinition<PasswordGenerationOptions>(\n  GENERATOR_DISK,\n  \"passwordGeneratorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n\n/** plaintext passphrase generation options */\nexport const PASSPHRASE_SETTINGS = new UserKeyDefinition<PassphraseGenerationOptions>(\n  GENERATOR_DISK,\n  \"passphraseGeneratorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n\n/** plaintext username generation options */\nexport const EFF_USERNAME_SETTINGS = new UserKeyDefinition<EffUsernameGenerationOptions>(\n  GENERATOR_DISK,\n  \"effUsernameGeneratorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n\n/** plaintext configuration for a domain catch-all address. */\nexport const CATCHALL_SETTINGS = new UserKeyDefinition<CatchallGenerationOptions>(\n  GENERATOR_DISK,\n  \"catchallGeneratorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n\n/** plaintext configuration for an email subaddress. */\nexport const SUBADDRESS_SETTINGS = new UserKeyDefinition<SubaddressGenerationOptions>(\n  GENERATOR_DISK,\n  \"subaddressGeneratorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [],\n  },\n);\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { DefaultPassphraseGenerationOptions, Policies } from \"../data\";\nimport { PasswordRandomizer } from \"../engine\";\nimport { mapPolicyToEvaluator } from \"../rx\";\nimport { PassphraseGenerationOptions, PassphraseGeneratorPolicy } from \"../types\";\nimport { observe$PerUserId, optionsToEffWordListRequest, sharedStateByUserId } from \"../util\";\n\nimport { PASSPHRASE_SETTINGS } from \"./storage\";\n\n/** Generates passphrases composed of random words */\nexport class PassphraseGeneratorStrategy\n  implements GeneratorStrategy<PassphraseGenerationOptions, PassphraseGeneratorPolicy>\n{\n  /** instantiates the password generator strategy.\n   *  @param legacy generates the passphrase\n   *  @param stateProvider provides durable state\n   */\n  constructor(\n    private randomizer: PasswordRandomizer,\n    private stateProvider: StateProvider,\n  ) {}\n\n  // configuration\n  durableState = sharedStateByUserId(PASSPHRASE_SETTINGS, this.stateProvider);\n  defaults$ = observe$PerUserId(() => DefaultPassphraseGenerationOptions);\n  readonly policy = PolicyType.PasswordGenerator;\n  toEvaluator() {\n    return mapPolicyToEvaluator(Policies.Passphrase);\n  }\n\n  // algorithm\n  async generate(options: PassphraseGenerationOptions): Promise<string> {\n    const request = optionsToEffWordListRequest(options);\n\n    return this.randomizer.randomEffLongWords(request);\n  }\n}\n","import { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { Policies, DefaultPasswordGenerationOptions } from \"../data\";\nimport { PasswordRandomizer } from \"../engine\";\nimport { mapPolicyToEvaluator } from \"../rx\";\nimport { PasswordGenerationOptions, PasswordGeneratorPolicy } from \"../types\";\nimport { observe$PerUserId, optionsToRandomAsciiRequest, sharedStateByUserId } from \"../util\";\n\nimport { PASSWORD_SETTINGS } from \"./storage\";\n\n/** Generates passwords composed of random characters */\nexport class PasswordGeneratorStrategy\n  implements GeneratorStrategy<PasswordGenerationOptions, PasswordGeneratorPolicy>\n{\n  /** instantiates the password generator strategy.\n   *  @param legacy generates the password\n   */\n  constructor(\n    private randomizer: PasswordRandomizer,\n    private stateProvider: StateProvider,\n  ) {}\n\n  // configuration\n  durableState = sharedStateByUserId(PASSWORD_SETTINGS, this.stateProvider);\n  defaults$ = observe$PerUserId(() => DefaultPasswordGenerationOptions);\n  readonly policy = PolicyType.PasswordGenerator;\n  toEvaluator() {\n    return mapPolicyToEvaluator(Policies.Password);\n  }\n\n  // algorithm\n  async generate(options: PasswordGenerationOptions): Promise<string> {\n    const request = optionsToRandomAsciiRequest(options);\n    const result = await this.randomizer.randomAscii(request);\n\n    return result;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { DefaultCatchallOptions } from \"../data\";\nimport { EmailCalculator, EmailRandomizer } from \"../engine\";\nimport { newDefaultEvaluator } from \"../rx\";\nimport { NoPolicy, CatchallGenerationOptions } from \"../types\";\nimport { observe$PerUserId, sharedStateByUserId } from \"../util\";\n\nimport { CATCHALL_SETTINGS } from \"./storage\";\n\n/** Strategy for creating usernames using a catchall email address */\nexport class CatchallGeneratorStrategy\n  implements GeneratorStrategy<CatchallGenerationOptions, NoPolicy>\n{\n  /** Instantiates the generation strategy\n   *  @param usernameService generates a catchall address for a domain\n   */\n  constructor(\n    private emailCalculator: EmailCalculator,\n    private emailRandomizer: EmailRandomizer,\n    private stateProvider: StateProvider,\n    private defaultOptions: CatchallGenerationOptions = DefaultCatchallOptions,\n  ) {}\n\n  // configuration\n  durableState = sharedStateByUserId(CATCHALL_SETTINGS, this.stateProvider);\n  defaults$ = observe$PerUserId(() => this.defaultOptions);\n  toEvaluator = newDefaultEvaluator<CatchallGenerationOptions>();\n  readonly policy = PolicyType.PasswordGenerator;\n\n  // algorithm\n  async generate(options: CatchallGenerationOptions) {\n    if (options.catchallType == null) {\n      options.catchallType = \"random\";\n    }\n\n    if (options.catchallType === \"website-name\") {\n      return await this.emailCalculator.concatenate(options.website, options.catchallDomain);\n    }\n\n    return this.emailRandomizer.randomAsciiCatchall(options.catchallDomain);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { DefaultSubaddressOptions } from \"../data\";\nimport { EmailCalculator, EmailRandomizer } from \"../engine\";\nimport { newDefaultEvaluator } from \"../rx\";\nimport { SubaddressGenerationOptions, NoPolicy } from \"../types\";\nimport { observe$PerUserId, sharedStateByUserId } from \"../util\";\n\nimport { SUBADDRESS_SETTINGS } from \"./storage\";\n\n/** Strategy for creating an email subaddress\n *  @remarks The subaddress is the part following the `+`.\n *  For example, if the email address is `jd+xyz@domain.io`,\n *  the subaddress is `xyz`.\n */\nexport class SubaddressGeneratorStrategy\n  implements GeneratorStrategy<SubaddressGenerationOptions, NoPolicy>\n{\n  /** Instantiates the generation strategy\n   *  @param usernameService generates an email subaddress from an email address\n   */\n  constructor(\n    private emailCalculator: EmailCalculator,\n    private emailRandomizer: EmailRandomizer,\n    private stateProvider: StateProvider,\n    private defaultOptions: SubaddressGenerationOptions = DefaultSubaddressOptions,\n  ) {}\n\n  // configuration\n  durableState = sharedStateByUserId(SUBADDRESS_SETTINGS, this.stateProvider);\n  defaults$ = observe$PerUserId(() => this.defaultOptions);\n  toEvaluator = newDefaultEvaluator<SubaddressGenerationOptions>();\n  readonly policy = PolicyType.PasswordGenerator;\n\n  // algorithm\n  async generate(options: SubaddressGenerationOptions) {\n    if (options.subaddressType == null) {\n      options.subaddressType = \"random\";\n    }\n\n    if (options.subaddressType === \"website-name\") {\n      return this.emailCalculator.appendToSubaddress(options.website, options.subaddressEmail);\n    }\n\n    return this.emailRandomizer.randomAsciiSubaddress(options.subaddressEmail);\n  }\n}\n","import { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorStrategy } from \"../abstractions\";\nimport { DefaultEffUsernameOptions, UsernameDigits } from \"../data\";\nimport { UsernameRandomizer } from \"../engine\";\nimport { newDefaultEvaluator } from \"../rx\";\nimport { EffUsernameGenerationOptions, NoPolicy } from \"../types\";\nimport { observe$PerUserId, sharedStateByUserId } from \"../util\";\n\nimport { EFF_USERNAME_SETTINGS } from \"./storage\";\n\n/** Strategy for creating usernames from the EFF wordlist */\nexport class EffUsernameGeneratorStrategy\n  implements GeneratorStrategy<EffUsernameGenerationOptions, NoPolicy>\n{\n  /** Instantiates the generation strategy\n   *  @param usernameService generates a username from EFF word list\n   */\n  constructor(\n    private randomizer: UsernameRandomizer,\n    private stateProvider: StateProvider,\n    private defaultOptions: EffUsernameGenerationOptions = DefaultEffUsernameOptions,\n  ) {}\n\n  // configuration\n  durableState = sharedStateByUserId(EFF_USERNAME_SETTINGS, this.stateProvider);\n  defaults$ = observe$PerUserId(() => this.defaultOptions);\n  toEvaluator = newDefaultEvaluator<EffUsernameGenerationOptions>();\n  readonly policy = PolicyType.PasswordGenerator;\n\n  // algorithm\n  async generate(options: EffUsernameGenerationOptions) {\n    const casing =\n      (options.wordCapitalize ?? DefaultEffUsernameOptions.wordCapitalize)\n        ? \"TitleCase\"\n        : \"lowercase\";\n    const digits =\n      (options.wordIncludeNumber ?? DefaultEffUsernameOptions.wordIncludeNumber)\n        ? UsernameDigits.enabled\n        : UsernameDigits.disabled;\n    const word = await this.randomizer.randomWords({ numberOfWords: 1, casing, digits });\n    return word;\n  }\n}\n","export class GeneratedPasswordHistory {\n  password: string;\n  date: number;\n\n  constructor(password: string, date: number) {\n    this.password = password;\n    this.date = date;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CredentialAlgorithm } from \"@bitwarden/generator-core\";\n\nimport { GeneratedCredential } from \"./generated-credential\";\n\n/** Tracks the history of password generations.\n *  Each user gets their own store.\n */\nexport abstract class GeneratorHistoryService {\n  /** Tracks a new credential. When an item with the same `credential` value\n   *  is found, this method does nothing. When the total number of items exceeds\n   *  {@link HistoryServiceOptions.maxTotal}, then the oldest items exceeding the total\n   *  are deleted.\n   *  @param userId identifies the user storing the credential.\n   *  @param credential stored by the history service.\n   *  @param date when the credential was generated. If this is omitted, then the generator\n   *    uses the date the credential was added to the store instead.\n   *  @returns a promise that completes with the added credential. If the credential\n   *    wasn't added, then the promise completes with `null`.\n   *  @remarks this service is not suitable for use with vault items/ciphers. It models only\n   *    a history of an individually generated credential, while a vault item's history\n   *    may contain several credentials that are better modelled as atomic versions of the\n   *    vault item itself.\n   */\n  track: (\n    userId: UserId,\n    credential: string,\n    category: CredentialAlgorithm,\n    date?: Date,\n  ) => Promise<GeneratedCredential | null>;\n\n  /** Removes a matching credential from the history service.\n   *  @param userId identifies the user taking the credential.\n   *  @param credential to match in the history service.\n   *  @returns A promise that completes with the credential read. If the credential wasn't found,\n   *    the promise completes with null.\n   *  @remarks this can be used to extract an entry when a credential is stored in the vault.\n   */\n  take: (userId: UserId, credential: string) => Promise<GeneratedCredential | null>;\n\n  /** Deletes a user's credential history.\n   *  @param userId identifies the user taking the credential.\n   *  @returns A promise that completes when the history is cleared.\n   */\n  clear: (userId: UserId) => Promise<GeneratedCredential[]>;\n\n  /** Lists all credentials for a user.\n   *  @param userId identifies the user listing the credential.\n   *  @remarks This field is eventually consistent with `track` and `take` operations.\n   *    It is not guaranteed to immediately reflect those changes.\n   */\n  credentials$: (userId: UserId) => Observable<GeneratedCredential[]>;\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { CredentialAlgorithm } from \"@bitwarden/generator-core\";\n\n/** A credential generation result */\nexport class GeneratedCredential {\n  /**\n   * Instantiates a generated credential\n   * @param credential The value of the generated credential (e.g. a password)\n   * @param category The kind of credential\n   * @param generationDate The date that the credential was generated.\n   *   Numeric values should are interpreted using {@link Date.valueOf}\n   *   semantics.\n   */\n  constructor(\n    readonly credential: string,\n    readonly category: CredentialAlgorithm,\n    generationDate: Date | number,\n  ) {\n    if (typeof generationDate === \"number\") {\n      this.generationDate = new Date(generationDate);\n    } else {\n      this.generationDate = generationDate;\n    }\n  }\n\n  /** The date that the credential was generated */\n  generationDate: Date;\n\n  /** Constructs a credential from its `toJSON` representation */\n  static fromJSON(jsonValue: Jsonify<GeneratedCredential>) {\n    return new GeneratedCredential(\n      jsonValue.credential,\n      jsonValue.category,\n      jsonValue.generationDate,\n    );\n  }\n\n  /** Serializes a credential to a JSON-compatible object */\n  toJSON() {\n    return {\n      credential: this.credential,\n      category: this.category,\n      generationDate: this.generationDate.valueOf(),\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Jsonify } from \"type-fest\";\n\nimport { Classifier } from \"./classifier\";\n\n/** Classifies an object's JSON-serializable data by property into\n *  3 categories:\n *  * Disclosed data MAY be stored in plaintext.\n *  * Excluded data MUST NOT be saved.\n *  * The remaining data is secret and MUST be stored using encryption.\n *\n *  This type should not be used to classify functions.\n *  Data that cannot be serialized by JSON.stringify() should\n *  be excluded.\n */\nexport class SecretClassifier<Plaintext extends object, Disclosed, Secret>\n  implements Classifier<Plaintext, Disclosed, Secret>\n{\n  private constructor(\n    disclosed: readonly (keyof Jsonify<Disclosed> & keyof Jsonify<Plaintext>)[],\n    excluded: readonly (keyof Plaintext)[],\n  ) {\n    this.disclosed = disclosed;\n    this.excluded = excluded;\n  }\n\n  /** lists the disclosed properties. */\n  readonly disclosed: readonly (keyof Jsonify<Disclosed> & keyof Jsonify<Plaintext>)[];\n\n  /** lists the excluded properties. */\n  readonly excluded: readonly (keyof Plaintext)[];\n\n  /** Creates a classifier where all properties are secret.\n   *  @type {T} The type of secret being classified.\n   */\n  static allSecret<T extends object>() {\n    const disclosed = Object.freeze([]);\n    const excluded = Object.freeze([]);\n    return new SecretClassifier<T, Record<keyof T, never>, T>(disclosed, excluded);\n  }\n\n  /** Classify a property as disclosed.\n   *  @type {PropertyName} Available secrets to disclose.\n   *  @param disclose The property name to disclose.\n   *  @returns a new classifier\n   */\n  disclose<const PropertyName extends keyof Jsonify<Secret>>(disclose: PropertyName) {\n    // move the property from the secret type to the disclose type\n    type NewDisclosed = Disclosed | Record<PropertyName, Jsonify<Secret>[PropertyName]>;\n    type NewSecret = Omit<Secret, PropertyName>;\n\n    // update the fluent interface\n    const newDisclosed = [...this.disclosed, disclose] as (keyof Jsonify<NewDisclosed> &\n      keyof Jsonify<Plaintext>)[];\n    const classifier = new SecretClassifier<Plaintext, NewDisclosed, NewSecret>(\n      // since `NewDisclosed` is opaque to the type checker, it's necessary\n      // to assert the type of the array here.\n      Object.freeze(newDisclosed),\n      this.excluded,\n    );\n\n    return classifier;\n  }\n\n  /** Classify a property as excluded.\n   *  @type {PropertyName} Available secrets to exclude.\n   *  @param exclude The property name to exclude.\n   *  @returns a new classifier\n   */\n  exclude<const PropertyName extends keyof Secret>(excludedPropertyName: PropertyName) {\n    // remove the property from the secret type\n    type NewConfidential = Omit<Secret, PropertyName>;\n\n    // update the fluent interface\n    const newExcluded = [...this.excluded, excludedPropertyName] as (keyof Plaintext)[];\n    const classifier = new SecretClassifier<Plaintext, Disclosed, NewConfidential>(\n      this.disclosed,\n      Object.freeze(newExcluded),\n    );\n\n    return classifier;\n  }\n\n  /** Partitions `secret` into its disclosed properties and secret properties.\n   *  @param value The object to partition\n   *  @returns an object that classifies secrets.\n   *    The `disclosed` member is new and contains disclosed properties.\n   *    The `secret` member is a copy of the secret parameter, including its\n   *    prototype, with all disclosed and excluded properties deleted.\n   */\n  classify(value: Plaintext): { disclosed: Jsonify<Disclosed>; secret: Jsonify<Secret> } {\n    // need to JSONify during classification because the prototype is almost guaranteed\n    // to be invalid when this  method deletes arbitrary properties.\n    const secret = JSON.parse(JSON.stringify(value)) as Record<keyof Plaintext, unknown>;\n\n    for (const excludedProp of this.excluded) {\n      delete secret[excludedProp];\n    }\n\n    const disclosed: Record<PropertyKey, unknown> = {};\n    for (const disclosedProp of this.disclosed) {\n      // disclosedProp is known to be a subset of the keys of `Plaintext`, so these\n      // type assertions are accurate.\n      // FIXME: prove it to the compiler\n      disclosed[disclosedProp] = secret[disclosedProp as keyof Plaintext];\n      delete secret[disclosedProp as keyof Plaintext];\n    }\n\n    return {\n      disclosed: disclosed as Jsonify<Disclosed>,\n      secret: secret as Jsonify<Secret>,\n    };\n  }\n\n  /** Merges the properties of `secret` and `disclosed`. When `secret` and\n   *  `disclosed` contain the same property, the `secret` property overrides\n   *  the `disclosed` property.\n   *  @param disclosed an object whose disclosed properties are merged into\n   *    the output. Unknown properties are ignored.\n   *  @param secret an objects whose properties are merged into the output.\n   *    Excluded properties are ignored. Unknown properties are retained.\n   *  @returns a new object containing the merged data.\n   */\n  // Declassified data is always jsonified--the purpose of classifying it is to Jsonify it,\n  // which causes type conversions.\n  declassify(disclosed: Jsonify<Disclosed>, secret: Jsonify<Secret>): Jsonify<Plaintext> {\n    // removed unknown keys from `disclosed` to prevent any old edit\n    // of plaintext data from being laundered though declassification.\n    const cleaned = {} as Partial<Jsonify<Disclosed>>;\n    for (const disclosedProp of this.disclosed) {\n      cleaned[disclosedProp] = disclosed[disclosedProp];\n    }\n\n    // merge decrypted into cleaned so that secret data clobbers public data\n    const merged: any = Object.assign(cleaned, secret);\n\n    // delete excluded props\n    for (const excludedProp of this.excluded) {\n      delete merged[excludedProp];\n    }\n\n    return merged as Jsonify<Plaintext>;\n  }\n}\n","import { Jsonify } from \"type-fest\";\n\nimport { GENERATOR_DISK } from \"@bitwarden/common/platform/state\";\nimport { BufferedKeyDefinition } from \"@bitwarden/common/tools/state/buffered-key-definition\";\nimport { SecretClassifier } from \"@bitwarden/common/tools/state/secret-classifier\";\nimport { SecretKeyDefinition } from \"@bitwarden/common/tools/state/secret-key-definition\";\n\nimport { GeneratedCredential } from \"./generated-credential\";\nimport { GeneratedPasswordHistory } from \"./generated-password-history\";\nimport { LegacyPasswordHistoryDecryptor } from \"./legacy-password-history-decryptor\";\n\n/** encrypted password generation history */\nexport const GENERATOR_HISTORY = SecretKeyDefinition.array(\n  GENERATOR_DISK,\n  \"localGeneratorHistory\",\n  SecretClassifier.allSecret<GeneratedCredential>(),\n  {\n    deserializer: GeneratedCredential.fromJSON,\n    clearOn: [\"logout\"],\n  },\n);\n\n/** encrypted password generation history subject to migration */\nexport const GENERATOR_HISTORY_BUFFER = new BufferedKeyDefinition<\n  GeneratedPasswordHistory[],\n  GeneratedCredential[],\n  LegacyPasswordHistoryDecryptor\n>(GENERATOR_DISK, \"localGeneratorHistoryBuffer\", {\n  deserializer(history) {\n    const items = history as Jsonify<GeneratedPasswordHistory>[];\n    return items?.map((h) => new GeneratedPasswordHistory(h.password, h.date));\n  },\n  async isValid(history) {\n    return history.length ? true : false;\n  },\n  async map(history, decryptor) {\n    const credentials = await decryptor.decrypt(history);\n    const mapped = credentials.map((c) => new GeneratedCredential(c.password, \"password\", c.date));\n    return mapped;\n  },\n  clearOn: [\"logout\"],\n});\n","import { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { EncString } from \"@bitwarden/common/platform/models/domain/enc-string\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { GeneratedPasswordHistory } from \"./generated-password-history\";\n\n/** Strategy that decrypts a password history */\nexport class LegacyPasswordHistoryDecryptor {\n  constructor(\n    private userId: UserId,\n    private keyService: KeyService,\n    private encryptService: EncryptService,\n  ) {}\n\n  /** Decrypts a password history. */\n  async decrypt(history: GeneratedPasswordHistory[]): Promise<GeneratedPasswordHistory[]> {\n    const key = await this.keyService.getUserKey(this.userId);\n\n    const promises = (history ?? []).map(async (item) => {\n      const encrypted = new EncString(item.password);\n      const decrypted = await this.encryptService.decryptToUtf8(encrypted, key);\n      return new GeneratedPasswordHistory(decrypted, item.date);\n    });\n\n    const decrypted = await Promise.all(promises);\n\n    return decrypted;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { filter, map } from \"rxjs\";\n\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { SingleUserState, StateProvider } from \"@bitwarden/common/platform/state\";\nimport { UserKeyEncryptor } from \"@bitwarden/common/tools/cryptography/user-key-encryptor\";\nimport { BufferedState } from \"@bitwarden/common/tools/state/buffered-state\";\nimport { PaddedDataPacker } from \"@bitwarden/common/tools/state/padded-data-packer\";\nimport { SecretState } from \"@bitwarden/common/tools/state/secret-state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { CredentialAlgorithm } from \"@bitwarden/generator-core\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { GeneratedCredential } from \"./generated-credential\";\nimport { GeneratorHistoryService } from \"./generator-history.abstraction\";\nimport { GENERATOR_HISTORY, GENERATOR_HISTORY_BUFFER } from \"./key-definitions\";\nimport { LegacyPasswordHistoryDecryptor } from \"./legacy-password-history-decryptor\";\nimport { HistoryServiceOptions } from \"./options\";\n\nconst OPTIONS_FRAME_SIZE = 2048;\n\n/** Tracks the history of password generations local to a device.\n *  {@link GeneratorHistoryService}\n */\nexport class LocalGeneratorHistoryService extends GeneratorHistoryService {\n  constructor(\n    private readonly encryptService: EncryptService,\n    private readonly keyService: KeyService,\n    private readonly stateProvider: StateProvider,\n    private readonly options: HistoryServiceOptions = { maxTotal: 200 },\n  ) {\n    super();\n  }\n\n  private _credentialStates = new Map<UserId, SingleUserState<GeneratedCredential[]>>();\n\n  /** {@link GeneratorHistoryService.track} */\n  track = async (\n    userId: UserId,\n    credential: string,\n    category: CredentialAlgorithm,\n    date?: Date,\n  ) => {\n    const state = this.getCredentialState(userId);\n    let result: GeneratedCredential = null;\n\n    await state.update(\n      (credentials) => {\n        credentials = credentials ?? [];\n\n        // add the result\n        result = new GeneratedCredential(credential, category, date ?? Date.now());\n        credentials.unshift(result);\n\n        // trim history\n        const removeAt = Math.max(0, this.options.maxTotal);\n        credentials.splice(removeAt, Infinity);\n\n        return credentials;\n      },\n      {\n        shouldUpdate: (credentials) =>\n          !(credentials?.some((f) => f.credential === credential) ?? false),\n      },\n    );\n\n    return result;\n  };\n\n  /** {@link GeneratorHistoryService.take} */\n  take = async (userId: UserId, credential: string) => {\n    const state = this.getCredentialState(userId);\n    let credentialIndex: number;\n    let result: GeneratedCredential = null;\n\n    await state.update(\n      (credentials) => {\n        credentials = credentials ?? [];\n\n        [result] = credentials.splice(credentialIndex, 1);\n        return credentials;\n      },\n      {\n        shouldUpdate: (credentials) => {\n          credentialIndex = credentials?.findIndex((f) => f.credential === credential) ?? -1;\n          return credentialIndex >= 0;\n        },\n      },\n    );\n\n    return result;\n  };\n\n  /** {@link GeneratorHistoryService.take} */\n  clear = async (userId: UserId) => {\n    const state = this.getCredentialState(userId);\n    const result = (await state.update(() => null)) ?? [];\n    return result;\n  };\n\n  /** {@link GeneratorHistoryService.credentials$} */\n  credentials$ = (userId: UserId) => {\n    return this.getCredentialState(userId).state$.pipe(map((credentials) => credentials ?? []));\n  };\n\n  private getCredentialState(userId: UserId) {\n    let state = this._credentialStates.get(userId);\n\n    if (!state) {\n      state = this.createSecretState(userId);\n      this._credentialStates.set(userId, state);\n    }\n\n    return state;\n  }\n\n  private createSecretState(userId: UserId): SingleUserState<GeneratedCredential[]> {\n    // construct the encryptor\n    const packer = new PaddedDataPacker(OPTIONS_FRAME_SIZE);\n    const encryptor$ = this.keyService.userKey$(userId).pipe(\n      map((key) => (key ? new UserKeyEncryptor(userId, this.encryptService, key, packer) : null)),\n      filter((encryptor) => !!encryptor),\n    );\n\n    // construct the durable state\n    const state = SecretState.from<\n      GeneratedCredential[],\n      number,\n      GeneratedCredential,\n      Record<keyof GeneratedCredential, never>,\n      GeneratedCredential\n    >(userId, GENERATOR_HISTORY, this.stateProvider, encryptor$);\n\n    // decryptor is just an algorithm, but it can't run until the key is available;\n    // providing it via an observable makes running it early impossible\n    const decryptor = new LegacyPasswordHistoryDecryptor(\n      userId,\n      this.keyService,\n      this.encryptService,\n    );\n    const decryptor$ = this.keyService.userKey$(userId).pipe(map((key) => key && decryptor));\n\n    // move data from the old password history once decryptor is available\n    const buffer = new BufferedState(\n      this.stateProvider,\n      GENERATOR_HISTORY_BUFFER,\n      state,\n      decryptor$,\n    );\n\n    return buffer;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { PasswordGeneratorPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/password-generator-policy-options\";\nimport { GeneratedPasswordHistory } from \"@bitwarden/generator-history\";\n\nimport { PasswordGeneratorOptions } from \"./password-generator-options\";\n\n/** @deprecated Use {@link GeneratorService} with a password or passphrase {@link GeneratorStrategy} instead. */\nexport abstract class PasswordGenerationServiceAbstraction {\n  generatePassword: (options: PasswordGeneratorOptions) => Promise<string>;\n  generatePassphrase: (options: PasswordGeneratorOptions) => Promise<string>;\n  getOptions: () => Promise<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;\n  getOptions$: () => Observable<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;\n  enforcePasswordGeneratorPoliciesOnOptions: (\n    options: PasswordGeneratorOptions,\n  ) => Promise<[PasswordGeneratorOptions, PasswordGeneratorPolicyOptions]>;\n  saveOptions: (options: PasswordGeneratorOptions) => Promise<void>;\n  getHistory: () => Promise<GeneratedPasswordHistory[]>;\n  addHistory: (password: string) => Promise<void>;\n  clear: (userId?: string) => Promise<GeneratedPasswordHistory[]>;\n}\n","import { GeneratorNavigation } from \"./generator-navigation\";\n\n/** The default options for password generation. */\nexport const DefaultGeneratorNavigation: Partial<GeneratorNavigation> = Object.freeze({\n  type: \"password\",\n  username: \"word\",\n  forwarder: \"\",\n});\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PasswordAlgorithms, PolicyEvaluator } from \"@bitwarden/generator-core\";\n\nimport { DefaultGeneratorNavigation } from \"./default-generator-navigation\";\nimport { GeneratorNavigation } from \"./generator-navigation\";\nimport { GeneratorNavigationPolicy } from \"./generator-navigation-policy\";\n\n/** Enforces policy for generator navigation options.\n */\nexport class GeneratorNavigationEvaluator\n  implements PolicyEvaluator<GeneratorNavigationPolicy, GeneratorNavigation>\n{\n  /** Instantiates the evaluator.\n   * @param policy The policy applied by the evaluator. When this conflicts with\n   *               the defaults, the policy takes precedence.\n   */\n  constructor(readonly policy: GeneratorNavigationPolicy) {}\n\n  /** {@link PolicyEvaluator.policyInEffect} */\n  get policyInEffect(): boolean {\n    return PasswordAlgorithms.includes(this.policy?.overridePasswordType);\n  }\n\n  /** Apply policy to the input options.\n   *  @param options The options to build from. These options are not altered.\n   *  @returns A new password generation request with policy applied.\n   */\n  applyPolicy(options: GeneratorNavigation): GeneratorNavigation {\n    const result = { ...options };\n\n    if (this.policyInEffect) {\n      result.type = this.policy.overridePasswordType ?? result.type;\n    }\n\n    return result;\n  }\n\n  /** Ensures internal options consistency.\n   *  @param options The options to cascade. These options are not altered.\n   *  @returns A passphrase generation request with cascade applied.\n   */\n  sanitize(options: GeneratorNavigation): GeneratorNavigation {\n    return {\n      ...options,\n      type: options.type ?? DefaultGeneratorNavigation.type,\n    };\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\n// FIXME: use index.ts imports once policy abstractions and models\n// implement ADR-0002\nimport { Policy } from \"@bitwarden/common/admin-console/models/domain/policy\";\nimport { PasswordType } from \"@bitwarden/generator-core\";\n\n/** Policy settings affecting password generator navigation */\nexport type GeneratorNavigationPolicy = {\n  /** The type of generator that should be shown by default when opening\n   *  the password generator.\n   */\n  overridePasswordType?: PasswordType;\n};\n\n/** Reduces a policy into an accumulator by preferring the password generator\n *  type to other generator types.\n *  @param acc the accumulator\n *  @param policy the policy to reduce\n *  @returns the resulting `GeneratorNavigationPolicy`\n */\nexport function preferPassword(\n  acc: GeneratorNavigationPolicy,\n  policy: Policy,\n): GeneratorNavigationPolicy {\n  const isEnabled = policy.type === PolicyType.PasswordGenerator && policy.enabled;\n  if (!isEnabled) {\n    return acc;\n  }\n\n  const isOverridable = acc.overridePasswordType !== \"password\" && policy.data.overridePasswordType;\n  const result = isOverridable\n    ? { ...acc, overridePasswordType: policy.data.overridePasswordType }\n    : acc;\n\n  return result;\n}\n\n/** The default options for password generation policy. */\nexport const DisabledGeneratorNavigationPolicy: GeneratorNavigationPolicy = Object.freeze({\n  overridePasswordType: null,\n});\n","import { GENERATOR_DISK, UserKeyDefinition } from \"@bitwarden/common/platform/state\";\n\nimport { GeneratorNavigation } from \"./generator-navigation\";\n\n/** plaintext password generation options */\nexport const GENERATOR_SETTINGS = new UserKeyDefinition<GeneratorNavigation>(\n  GENERATOR_DISK,\n  \"generatorSettings\",\n  {\n    deserializer: (value) => value,\n    clearOn: [\"logout\"],\n  },\n);\n","import { BehaviorSubject, Observable, firstValueFrom, map } from \"rxjs\";\n\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { distinctIfShallowMatch, reduceCollection } from \"@bitwarden/common/tools/rx\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\nimport { DefaultGeneratorNavigation } from \"./default-generator-navigation\";\nimport { GeneratorNavigation } from \"./generator-navigation\";\nimport { GeneratorNavigationEvaluator } from \"./generator-navigation-evaluator\";\nimport { DisabledGeneratorNavigationPolicy, preferPassword } from \"./generator-navigation-policy\";\nimport { GeneratorNavigationService } from \"./generator-navigation.service.abstraction\";\nimport { GENERATOR_SETTINGS } from \"./key-definitions\";\n\nexport class DefaultGeneratorNavigationService implements GeneratorNavigationService {\n  /** instantiates the password generator strategy.\n   * @param stateProvider provides durable state\n   * @param policy provides the policy to enforce\n   */\n  constructor(\n    private readonly stateProvider: StateProvider,\n    private readonly policy: PolicyService,\n  ) {}\n\n  /** An observable monitoring the options saved to disk.\n   *  The observable updates when the options are saved.\n   *   @param userId: Identifies the user making the request\n   */\n  options$(userId: UserId): Observable<GeneratorNavigation> {\n    return this.stateProvider.getUserState$(GENERATOR_SETTINGS, userId);\n  }\n\n  /** Gets the default options. */\n  defaults$(userId: UserId): Observable<GeneratorNavigation> {\n    return new BehaviorSubject({ ...DefaultGeneratorNavigation });\n  }\n\n  /** An observable monitoring the options used to enforce policy.\n   *  The observable updates when the policy changes.\n   *  @param userId: Identifies the user making the request\n   */\n  evaluator$(userId: UserId) {\n    const evaluator$ = this.policy.getAll$(PolicyType.PasswordGenerator, userId).pipe(\n      reduceCollection(preferPassword, DisabledGeneratorNavigationPolicy),\n      distinctIfShallowMatch(),\n      map((policy) => new GeneratorNavigationEvaluator(policy)),\n    );\n\n    return evaluator$;\n  }\n\n  /** Enforces the policy on the given options\n   * @param userId: Identifies the user making the request\n   * @param options the options to enforce the policy on\n   * @returns a new instance of the options with the policy enforced\n   */\n  async enforcePolicy(userId: UserId, options: GeneratorNavigation) {\n    const evaluator = await firstValueFrom(this.evaluator$(userId));\n    const applied = evaluator.applyPolicy(options);\n    const sanitized = evaluator.sanitize(applied);\n    return sanitized;\n  }\n\n  /** Saves the navigation options to disk.\n   * @param userId: Identifies the user making the request\n   * @param options the options to save\n   * @returns a promise that resolves when the options are saved\n   */\n  async saveOptions(userId: UserId, options: GeneratorNavigation): Promise<void> {\n    await this.stateProvider.setUserState(GENERATOR_SETTINGS, options, userId);\n  }\n}\n","import Domain from \"../../../platform/models/domain/domain-base\";\n\n/** Enterprise policy for the password generator.\n * @see PolicyType.PasswordGenerator\n */\nexport class PasswordGeneratorPolicyOptions extends Domain {\n  /** The default kind of credential to generate */\n  overridePasswordType: \"password\" | \"passphrase\" | \"\" = \"\";\n\n  /** The minimum length of generated passwords.\n   *  When this is less than or equal to zero, it is ignored.\n   *  If this is less than the total number of characters required by\n   *  the policy's other settings, then it is ignored.\n   *  This field is not used for passphrases.\n   */\n  minLength = 0;\n\n  /** When this is true, an uppercase character must be part of\n   *  the generated password.\n   *  This field is not used for passphrases.\n   */\n  useUppercase = false;\n\n  /** When this is true, a lowercase character must be part of\n   *  the generated password. This field is not used for passphrases.\n   */\n  useLowercase = false;\n\n  /** When this is true, at least one digit must be part of the generated\n   *  password. This field is not used for passphrases.\n   */\n  useNumbers = false;\n\n  /** The quantity of digits to include in the generated password.\n   *  When this is less than or equal to zero, it is ignored.\n   *  This field is not used for passphrases.\n   */\n  numberCount = 0;\n\n  /** When this is true, at least one digit must be part of the generated\n   *  password. This field is not used for passphrases.\n   */\n  useSpecial = false;\n\n  /** The quantity of special characters to include in the generated\n   *  password. When this is less than or equal to zero, it is ignored.\n   *  This field is not used for passphrases.\n   */\n  specialCount = 0;\n\n  /** The minimum number of words required by generated passphrases.\n   *  This field is not used for passwords.\n   */\n  minNumberWords = 0;\n\n  /** When this is true, the first letter of each word in the passphrase\n   *  is capitalized. This field is not used for passwords.\n   */\n  capitalize = false;\n\n  /** When this is true, a number is included within the passphrase.\n   *  This field is not used for passwords.\n   */\n  includeNumber = false;\n\n  /** Checks whether the policy affects the password generator.\n   * @returns True if at least one password or passphrase requirement has been set.\n   * If it returns False, then no requirements have been set and the policy should\n   * not be enforced.\n   */\n  inEffect() {\n    return (\n      this.overridePasswordType ||\n      this.minLength > 0 ||\n      this.numberCount > 0 ||\n      this.specialCount > 0 ||\n      this.useUppercase ||\n      this.useLowercase ||\n      this.useNumbers ||\n      this.useSpecial ||\n      this.minNumberWords > 0 ||\n      this.capitalize ||\n      this.includeNumber\n    );\n  }\n\n  /** Creates a copy of the policy.\n   */\n  clone() {\n    const policy = new PasswordGeneratorPolicyOptions();\n    Object.assign(policy, this);\n    return policy;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport {\n  concatMap,\n  zip,\n  map,\n  firstValueFrom,\n  combineLatest,\n  pairwise,\n  of,\n  concat,\n  Observable,\n  filter,\n  timeout,\n} from \"rxjs\";\n\nimport { PasswordGeneratorPolicyOptions } from \"@bitwarden/common/admin-console/models/domain/password-generator-policy-options\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport {\n  GeneratorService,\n  PassphraseGenerationOptions,\n  PassphraseGeneratorPolicy,\n  PasswordGenerationOptions,\n  PasswordGeneratorPolicy,\n  PolicyEvaluator,\n} from \"@bitwarden/generator-core\";\nimport {\n  GeneratedCredential,\n  GeneratorHistoryService,\n  GeneratedPasswordHistory,\n} from \"@bitwarden/generator-history\";\nimport {\n  GeneratorNavigationService,\n  GeneratorNavigation,\n  GeneratorNavigationPolicy,\n} from \"@bitwarden/generator-navigation\";\n\nimport { PasswordGenerationServiceAbstraction } from \"./password-generation.service.abstraction\";\nimport { PasswordGeneratorOptions } from \"./password-generator-options\";\n\ntype MappedOptions = {\n  generator: GeneratorNavigation;\n  password: PasswordGenerationOptions;\n  passphrase: PassphraseGenerationOptions;\n  policyUpdated: boolean;\n};\n\n/** Adapts the generator 2.0 design to 1.0 angular services. */\nexport class LegacyPasswordGenerationService implements PasswordGenerationServiceAbstraction {\n  constructor(\n    private readonly accountService: AccountService,\n    private readonly navigation: GeneratorNavigationService,\n    private readonly passwords: GeneratorService<\n      PasswordGenerationOptions,\n      PasswordGeneratorPolicy\n    >,\n    private readonly passphrases: GeneratorService<\n      PassphraseGenerationOptions,\n      PassphraseGeneratorPolicy\n    >,\n    private readonly history: GeneratorHistoryService,\n  ) {}\n\n  generatePassword(options: PasswordGeneratorOptions) {\n    if (options.type === \"password\") {\n      return this.passwords.generate(options);\n    } else {\n      return this.passphrases.generate(options);\n    }\n  }\n\n  generatePassphrase(options: PasswordGeneratorOptions) {\n    return this.passphrases.generate(options);\n  }\n\n  private getRawOptions$() {\n    // give the typechecker a nudge to avoid \"implicit any\" errors\n    type RawOptionsIntermediateType = [\n      PasswordGenerationOptions,\n      PasswordGenerationOptions,\n      [PolicyEvaluator<PasswordGeneratorPolicy, PasswordGenerationOptions>, number],\n      PassphraseGenerationOptions,\n      PassphraseGenerationOptions,\n      [PolicyEvaluator<PassphraseGeneratorPolicy, PassphraseGenerationOptions>, number],\n      GeneratorNavigation,\n      GeneratorNavigation,\n      [PolicyEvaluator<GeneratorNavigationPolicy, GeneratorNavigation>, number],\n    ];\n\n    function withSequenceNumber<T>(observable$: Observable<T>) {\n      return observable$.pipe(map((evaluator, i) => [evaluator, i] as const));\n    }\n\n    // initial array ensures that destructuring never fails; sequence numbers\n    // set to `-1` so that the first update reflects that the policy changed from\n    // \"unknown\" to \"whatever was provided by the service\". This needs to be called\n    // each time the active user changes or the `concat` will block.\n    function initial$() {\n      const initial: RawOptionsIntermediateType = [\n        null,\n        null,\n        [null, -1],\n        null,\n        null,\n        [null, -1],\n        null,\n        null,\n        [null, -1],\n      ];\n\n      return of(initial);\n    }\n\n    function intermediatePairsToRawOptions([previous, current]: [\n      RawOptionsIntermediateType,\n      RawOptionsIntermediateType,\n    ]) {\n      const [, , [, passwordPrevious], , , [, passphrasePrevious], , , [, generatorPrevious]] =\n        previous;\n      const [\n        passwordOptions,\n        passwordDefaults,\n        [passwordEvaluator, passwordCurrent],\n        passphraseOptions,\n        passphraseDefaults,\n        [passphraseEvaluator, passphraseCurrent],\n        generatorOptions,\n        generatorDefaults,\n        [generatorEvaluator, generatorCurrent],\n      ] = current;\n\n      // when any of the sequence numbers change, the emission occurs as the result of\n      // a policy update\n      const policyEmitted =\n        passwordPrevious < passwordCurrent ||\n        passphrasePrevious < passphraseCurrent ||\n        generatorPrevious < generatorCurrent;\n\n      const result = [\n        passwordOptions,\n        passwordDefaults,\n        passwordEvaluator,\n        passphraseOptions,\n        passphraseDefaults,\n        passphraseEvaluator,\n        generatorOptions,\n        generatorDefaults,\n        generatorEvaluator,\n        policyEmitted,\n      ] as const;\n\n      return result;\n    }\n\n    // look upon my works, ye mighty, and despair!\n    const rawOptions$ = this.accountService.activeAccount$.pipe(\n      concatMap((activeUser) =>\n        concat(\n          initial$(),\n          combineLatest([\n            this.passwords.options$(activeUser.id),\n            this.passwords.defaults$(activeUser.id),\n            withSequenceNumber(this.passwords.evaluator$(activeUser.id)),\n            this.passphrases.options$(activeUser.id),\n            this.passphrases.defaults$(activeUser.id),\n            withSequenceNumber(this.passphrases.evaluator$(activeUser.id)),\n            this.navigation.options$(activeUser.id),\n            this.navigation.defaults$(activeUser.id),\n            withSequenceNumber(this.navigation.evaluator$(activeUser.id)),\n          ]),\n        ),\n      ),\n      pairwise(),\n      map(intermediatePairsToRawOptions),\n    );\n\n    return rawOptions$;\n  }\n\n  getOptions$() {\n    const options$ = this.getRawOptions$().pipe(\n      map(\n        ([\n          passwordOptions,\n          passwordDefaults,\n          passwordEvaluator,\n          passphraseOptions,\n          passphraseDefaults,\n          passphraseEvaluator,\n          generatorOptions,\n          generatorDefaults,\n          generatorEvaluator,\n          policyUpdated,\n        ]) => {\n          const passwordOptionsWithPolicy = passwordEvaluator.applyPolicy(\n            passwordOptions ?? passwordDefaults,\n          );\n          const passphraseOptionsWithPolicy = passphraseEvaluator.applyPolicy(\n            passphraseOptions ?? passphraseDefaults,\n          );\n          const generatorOptionsWithPolicy = generatorEvaluator.applyPolicy(\n            generatorOptions ?? generatorDefaults,\n          );\n\n          const options = this.toPasswordGeneratorOptions({\n            password: passwordEvaluator.sanitize(passwordOptionsWithPolicy),\n            passphrase: passphraseEvaluator.sanitize(passphraseOptionsWithPolicy),\n            generator: generatorEvaluator.sanitize(generatorOptionsWithPolicy),\n            policyUpdated,\n          });\n\n          const policy = Object.assign(\n            new PasswordGeneratorPolicyOptions(),\n            passwordEvaluator.policy,\n            passphraseEvaluator.policy,\n            generatorEvaluator.policy,\n          );\n\n          return [options, policy] as [PasswordGeneratorOptions, PasswordGeneratorPolicyOptions];\n        },\n      ),\n    );\n\n    return options$;\n  }\n\n  async getOptions() {\n    return await firstValueFrom(this.getOptions$());\n  }\n\n  async enforcePasswordGeneratorPoliciesOnOptions(options: PasswordGeneratorOptions) {\n    const options$ = this.accountService.activeAccount$.pipe(\n      concatMap((activeUser) =>\n        zip(\n          this.passwords.evaluator$(activeUser.id),\n          this.passphrases.evaluator$(activeUser.id),\n          this.navigation.evaluator$(activeUser.id),\n        ),\n      ),\n      map(([passwordEvaluator, passphraseEvaluator, navigationEvaluator]) => {\n        const policy = Object.assign(\n          new PasswordGeneratorPolicyOptions(),\n          passwordEvaluator.policy,\n          passphraseEvaluator.policy,\n          navigationEvaluator.policy,\n        );\n\n        const navigationApplied = navigationEvaluator.applyPolicy(options);\n        const navigationSanitized = {\n          ...options,\n          ...navigationEvaluator.sanitize(navigationApplied),\n        };\n        if (navigationSanitized.type === \"password\") {\n          const applied = passwordEvaluator.applyPolicy(navigationSanitized);\n          const sanitized = passwordEvaluator.sanitize(applied);\n          return [sanitized, policy];\n        } else {\n          const applied = passphraseEvaluator.applyPolicy(navigationSanitized);\n          const sanitized = passphraseEvaluator.sanitize(applied);\n          return [sanitized, policy];\n        }\n      }),\n    );\n\n    const [sanitized, policy] = await firstValueFrom(options$);\n    return [\n      // callers assume this function updates the options parameter\n      Object.assign(options, sanitized),\n      policy,\n    ] as [PasswordGeneratorOptions, PasswordGeneratorPolicyOptions];\n  }\n\n  async saveOptions(options: PasswordGeneratorOptions) {\n    const stored = this.toStoredOptions(options);\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n\n    // generator settings needs to preserve whether password or passphrase is selected,\n    // so `navigationOptions` is mutated.\n    const navigationOptions$ = zip(\n      this.navigation.options$(activeAccount.id),\n      this.navigation.defaults$(activeAccount.id),\n    ).pipe(map(([options, defaults]) => options ?? defaults));\n    let navigationOptions = await firstValueFrom(navigationOptions$);\n    navigationOptions = Object.assign(navigationOptions, stored.generator);\n    await this.navigation.saveOptions(activeAccount.id, navigationOptions);\n\n    // overwrite all other settings with latest values\n    await this.passwords.saveOptions(activeAccount.id, stored.password);\n    await this.passphrases.saveOptions(activeAccount.id, stored.passphrase);\n  }\n\n  private toStoredOptions(options: PasswordGeneratorOptions): MappedOptions {\n    return {\n      generator: {\n        type: options.type,\n      },\n      password: {\n        length: options.length,\n        minLength: options.minLength,\n        ambiguous: options.ambiguous,\n        uppercase: options.uppercase,\n        minUppercase: options.minUppercase,\n        lowercase: options.lowercase,\n        minLowercase: options.minLowercase,\n        number: options.number,\n        minNumber: options.minNumber,\n        special: options.special,\n        minSpecial: options.minSpecial,\n      },\n      passphrase: {\n        numWords: options.numWords,\n        wordSeparator: options.wordSeparator,\n        capitalize: options.capitalize,\n        includeNumber: options.includeNumber,\n      },\n      policyUpdated: false,\n    };\n  }\n\n  private toPasswordGeneratorOptions(options: MappedOptions): PasswordGeneratorOptions {\n    return {\n      type: options.generator.type,\n      length: options.password.length,\n      minLength: options.password.minLength,\n      ambiguous: options.password.ambiguous,\n      uppercase: options.password.uppercase,\n      minUppercase: options.password.minUppercase,\n      lowercase: options.password.lowercase,\n      minLowercase: options.password.minLowercase,\n      number: options.password.number,\n      minNumber: options.password.minNumber,\n      special: options.password.special,\n      minSpecial: options.password.minSpecial,\n      numWords: options.passphrase.numWords,\n      wordSeparator: options.passphrase.wordSeparator,\n      capitalize: options.passphrase.capitalize,\n      includeNumber: options.passphrase.includeNumber,\n      policyUpdated: options.policyUpdated,\n    };\n  }\n\n  getHistory() {\n    const history = this.accountService.activeAccount$.pipe(\n      concatMap((account) => this.history.credentials$(account.id)),\n      timeout({\n        // timeout after 1 second\n        each: 1000,\n        with() {\n          return [];\n        },\n      }),\n      map((history) => history.map(toGeneratedPasswordHistory)),\n    );\n\n    return firstValueFrom(history);\n  }\n\n  async addHistory(password: string) {\n    const account = await firstValueFrom(this.accountService.activeAccount$);\n    if (account?.id) {\n      // legacy service doesn't distinguish credential types\n      await this.history.track(account.id, password, \"password\");\n    }\n  }\n\n  clear() {\n    const history$ = this.accountService.activeAccount$.pipe(\n      filter((account) => !!account?.id),\n      concatMap((account) => this.history.clear(account.id)),\n      timeout({\n        // timeout after 1 second\n        each: 1000,\n        with() {\n          return [];\n        },\n      }),\n      map((history) => history.map(toGeneratedPasswordHistory)),\n    );\n\n    return firstValueFrom(history$);\n  }\n}\n\nfunction toGeneratedPasswordHistory(value: GeneratedCredential) {\n  return new GeneratedPasswordHistory(value.credential, value.generationDate.valueOf());\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { engine, services, strategies } from \"@bitwarden/generator-core\";\nimport { LocalGeneratorHistoryService } from \"@bitwarden/generator-history\";\nimport { DefaultGeneratorNavigationService } from \"@bitwarden/generator-navigation\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { LegacyPasswordGenerationService } from \"./legacy-password-generation.service\";\nimport { PasswordGenerationServiceAbstraction } from \"./password-generation.service.abstraction\";\n\nconst { PassphraseGeneratorStrategy, PasswordGeneratorStrategy } = strategies;\nconst { KeyServiceRandomizer, PasswordRandomizer } = engine;\n\nconst DefaultGeneratorService = services.DefaultGeneratorService;\n\nexport function legacyPasswordGenerationServiceFactory(\n  encryptService: EncryptService,\n  keyService: KeyService,\n  policyService: PolicyService,\n  accountService: AccountService,\n  stateProvider: StateProvider,\n): PasswordGenerationServiceAbstraction {\n  const randomizer = new KeyServiceRandomizer(keyService);\n  const passwordRandomizer = new PasswordRandomizer(randomizer);\n\n  const passwords = new DefaultGeneratorService(\n    new PasswordGeneratorStrategy(passwordRandomizer, stateProvider),\n    policyService,\n  );\n\n  const passphrases = new DefaultGeneratorService(\n    new PassphraseGeneratorStrategy(passwordRandomizer, stateProvider),\n    policyService,\n  );\n\n  const navigation = new DefaultGeneratorNavigationService(stateProvider, policyService);\n\n  const history = new LocalGeneratorHistoryService(encryptService, keyService, stateProvider);\n\n  return new LegacyPasswordGenerationService(\n    accountService,\n    navigation,\n    passwords,\n    passphrases,\n    history,\n  );\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { Observable } from \"rxjs\";\n\nimport { UsernameGeneratorOptions } from \"./username-generation-options\";\n\n/** @deprecated Use {@link GeneratorService} with a username {@link GeneratorStrategy} instead. */\nexport abstract class UsernameGenerationServiceAbstraction {\n  generateUsername: (options: UsernameGeneratorOptions) => Promise<string>;\n  generateWord: (options: UsernameGeneratorOptions) => Promise<string>;\n  generateSubaddress: (options: UsernameGeneratorOptions) => Promise<string>;\n  generateCatchall: (options: UsernameGeneratorOptions) => Promise<string>;\n  generateForwarded: (options: UsernameGeneratorOptions) => Promise<string>;\n  getOptions: () => Promise<UsernameGeneratorOptions>;\n  getOptions$: () => Observable<UsernameGeneratorOptions>;\n  saveOptions: (options: UsernameGeneratorOptions) => Promise<void>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { zip, firstValueFrom, map, concatMap, combineLatest } from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { IntegrationRequest } from \"@bitwarden/common/tools/integration/rpc\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  ApiOptions,\n  EmailDomainOptions,\n  EmailPrefixOptions,\n  SelfHostedApiOptions,\n  NoPolicy,\n  GeneratorService,\n  CatchallGenerationOptions,\n  EffUsernameGenerationOptions,\n  Forwarders,\n  SubaddressGenerationOptions,\n  UsernameGeneratorType,\n  ForwarderId,\n} from \"@bitwarden/generator-core\";\nimport { GeneratorNavigationService, GeneratorNavigation } from \"@bitwarden/generator-navigation\";\n\nimport { UsernameGeneratorOptions } from \"./username-generation-options\";\nimport { UsernameGenerationServiceAbstraction } from \"./username-generation.service.abstraction\";\n\ntype MappedOptions = {\n  generator: GeneratorNavigation;\n  algorithms: {\n    catchall: CatchallGenerationOptions;\n    effUsername: EffUsernameGenerationOptions;\n    subaddress: SubaddressGenerationOptions;\n  };\n  forwarders: {\n    addyIo: SelfHostedApiOptions & EmailDomainOptions & IntegrationRequest;\n    duckDuckGo: ApiOptions & IntegrationRequest;\n    fastmail: ApiOptions & EmailPrefixOptions & IntegrationRequest;\n    firefoxRelay: ApiOptions & IntegrationRequest;\n    forwardEmail: ApiOptions & EmailDomainOptions & IntegrationRequest;\n    simpleLogin: SelfHostedApiOptions & IntegrationRequest;\n  };\n};\n\n/** Adapts the generator 2.0 design to 1.0 angular services. */\nexport class LegacyUsernameGenerationService implements UsernameGenerationServiceAbstraction {\n  constructor(\n    private readonly accountService: AccountService,\n    private readonly navigation: GeneratorNavigationService,\n    private readonly catchall: GeneratorService<CatchallGenerationOptions, NoPolicy>,\n    private readonly effUsername: GeneratorService<EffUsernameGenerationOptions, NoPolicy>,\n    private readonly subaddress: GeneratorService<SubaddressGenerationOptions, NoPolicy>,\n    private readonly addyIo: GeneratorService<SelfHostedApiOptions & EmailDomainOptions, NoPolicy>,\n    private readonly duckDuckGo: GeneratorService<ApiOptions, NoPolicy>,\n    private readonly fastmail: GeneratorService<ApiOptions & EmailPrefixOptions, NoPolicy>,\n    private readonly firefoxRelay: GeneratorService<ApiOptions, NoPolicy>,\n    private readonly forwardEmail: GeneratorService<ApiOptions & EmailDomainOptions, NoPolicy>,\n    private readonly simpleLogin: GeneratorService<SelfHostedApiOptions, NoPolicy>,\n  ) {}\n\n  generateUsername(options: UsernameGeneratorOptions) {\n    if (options.type === \"catchall\") {\n      return this.generateCatchall(options);\n    } else if (options.type === \"subaddress\") {\n      return this.generateSubaddress(options);\n    } else if (options.type === \"forwarded\") {\n      return this.generateForwarded(options);\n    } else {\n      return this.generateWord(options);\n    }\n  }\n\n  generateWord(options: UsernameGeneratorOptions) {\n    return this.effUsername.generate(options);\n  }\n\n  generateSubaddress(options: UsernameGeneratorOptions) {\n    return this.subaddress.generate(options);\n  }\n\n  generateCatchall(options: UsernameGeneratorOptions) {\n    return this.catchall.generate(options);\n  }\n\n  generateForwarded(options: UsernameGeneratorOptions) {\n    if (!options.forwardedService) {\n      return null;\n    }\n\n    const stored = this.toStoredOptions(options);\n    switch (options.forwardedService) {\n      case Forwarders.AddyIo.id:\n        return this.addyIo.generate(stored.forwarders.addyIo);\n      case Forwarders.DuckDuckGo.id:\n        return this.duckDuckGo.generate(stored.forwarders.duckDuckGo);\n      case Forwarders.Fastmail.id:\n        return this.fastmail.generate(stored.forwarders.fastmail);\n      case Forwarders.FirefoxRelay.id:\n        return this.firefoxRelay.generate(stored.forwarders.firefoxRelay);\n      case Forwarders.ForwardEmail.id:\n        return this.forwardEmail.generate(stored.forwarders.forwardEmail);\n      case Forwarders.SimpleLogin.id:\n        return this.simpleLogin.generate(stored.forwarders.simpleLogin);\n    }\n  }\n\n  getOptions$() {\n    // look upon my works, ye mighty, and despair!\n    const options$ = this.accountService.activeAccount$.pipe(\n      concatMap((account) =>\n        combineLatest([\n          this.navigation.options$(account.id),\n          this.navigation.defaults$(account.id),\n          this.catchall.options$(account.id),\n          this.catchall.defaults$(account.id),\n          this.effUsername.options$(account.id),\n          this.effUsername.defaults$(account.id),\n          this.subaddress.options$(account.id),\n          this.subaddress.defaults$(account.id),\n          this.addyIo.options$(account.id),\n          this.addyIo.defaults$(account.id),\n          this.duckDuckGo.options$(account.id),\n          this.duckDuckGo.defaults$(account.id),\n          this.fastmail.options$(account.id),\n          this.fastmail.defaults$(account.id),\n          this.firefoxRelay.options$(account.id),\n          this.firefoxRelay.defaults$(account.id),\n          this.forwardEmail.options$(account.id),\n          this.forwardEmail.defaults$(account.id),\n          this.simpleLogin.options$(account.id),\n          this.simpleLogin.defaults$(account.id),\n        ]),\n      ),\n      map(\n        ([\n          generatorOptions,\n          generatorDefaults,\n          catchallOptions,\n          catchallDefaults,\n          effUsernameOptions,\n          effUsernameDefaults,\n          subaddressOptions,\n          subaddressDefaults,\n          addyIoOptions,\n          addyIoDefaults,\n          duckDuckGoOptions,\n          duckDuckGoDefaults,\n          fastmailOptions,\n          fastmailDefaults,\n          firefoxRelayOptions,\n          firefoxRelayDefaults,\n          forwardEmailOptions,\n          forwardEmailDefaults,\n          simpleLoginOptions,\n          simpleLoginDefaults,\n        ]) =>\n          this.toUsernameOptions({\n            generator: generatorOptions ?? generatorDefaults,\n            algorithms: {\n              catchall: catchallOptions ?? catchallDefaults,\n              effUsername: effUsernameOptions ?? effUsernameDefaults,\n              subaddress: subaddressOptions ?? subaddressDefaults,\n            },\n            forwarders: {\n              addyIo: addyIoOptions ?? addyIoDefaults,\n              duckDuckGo: duckDuckGoOptions ?? duckDuckGoDefaults,\n              fastmail: fastmailOptions ?? fastmailDefaults,\n              firefoxRelay: firefoxRelayOptions ?? firefoxRelayDefaults,\n              forwardEmail: forwardEmailOptions ?? forwardEmailDefaults,\n              simpleLogin: simpleLoginOptions ?? simpleLoginDefaults,\n            },\n          }),\n      ),\n    );\n\n    return options$;\n  }\n\n  getOptions() {\n    return firstValueFrom(this.getOptions$());\n  }\n\n  async saveOptions(options: UsernameGeneratorOptions) {\n    const stored = this.toStoredOptions(options);\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n\n    const saved = await this.saveGeneratorOptions(activeAccount.id, options.type, stored);\n    if (!saved) {\n      await this.saveForwarderOptions(activeAccount.id, options.forwardedService, stored);\n    }\n\n    // run navigation options 2nd so that navigation options update doesn't race the `saved options`\n    // update in Firefox.\n    await this.saveNavigationOptions(activeAccount.id, stored);\n  }\n\n  private async saveNavigationOptions(account: UserId, options: MappedOptions) {\n    // generator settings needs to preserve whether password or passphrase is selected,\n    // so `navigationOptions` is mutated.\n    const navigationOptions$ = zip(\n      this.navigation.options$(account),\n      this.navigation.defaults$(account),\n    ).pipe(map(([options, defaults]) => options ?? defaults));\n\n    let navigationOptions = await firstValueFrom(navigationOptions$);\n    navigationOptions = Object.assign(navigationOptions, options.generator);\n    await this.navigation.saveOptions(account, navigationOptions);\n  }\n\n  private async saveGeneratorOptions(\n    account: UserId,\n    type: UsernameGeneratorType,\n    options: MappedOptions,\n  ) {\n    switch (type) {\n      case \"word\":\n        await this.effUsername.saveOptions(account, options.algorithms.effUsername);\n        return true;\n      case \"subaddress\":\n        await this.subaddress.saveOptions(account, options.algorithms.subaddress);\n        return true;\n      case \"catchall\":\n        await this.catchall.saveOptions(account, options.algorithms.catchall);\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  private async saveForwarderOptions(\n    account: UserId,\n    forwarder: ForwarderId | \"\",\n    options: MappedOptions,\n  ) {\n    switch (forwarder) {\n      case \"anonaddy\":\n        await this.addyIo.saveOptions(account, options.forwarders.addyIo);\n        return true;\n      case \"duckduckgo\":\n        await this.duckDuckGo.saveOptions(account, options.forwarders.duckDuckGo);\n        return true;\n      case \"fastmail\":\n        await this.fastmail.saveOptions(account, options.forwarders.fastmail);\n        return true;\n      case \"firefoxrelay\":\n        await this.firefoxRelay.saveOptions(account, options.forwarders.firefoxRelay);\n        return true;\n      case \"forwardemail\":\n        await this.forwardEmail.saveOptions(account, options.forwarders.forwardEmail);\n        return true;\n      case \"simplelogin\":\n        await this.simpleLogin.saveOptions(account, options.forwarders.simpleLogin);\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  private toStoredOptions(options: UsernameGeneratorOptions) {\n    const forwarders = {\n      addyIo: {\n        baseUrl: options.forwardedAnonAddyBaseUrl,\n        token: options.forwardedAnonAddyApiToken,\n        domain: options.forwardedAnonAddyDomain,\n        website: options.website,\n      },\n      duckDuckGo: {\n        token: options.forwardedDuckDuckGoToken,\n        website: options.website,\n      },\n      fastmail: {\n        token: options.forwardedFastmailApiToken,\n        website: options.website,\n      },\n      firefoxRelay: {\n        token: options.forwardedFirefoxApiToken,\n        website: options.website,\n      },\n      forwardEmail: {\n        token: options.forwardedForwardEmailApiToken,\n        domain: options.forwardedForwardEmailDomain,\n        website: options.website,\n      },\n      simpleLogin: {\n        token: options.forwardedSimpleLoginApiKey,\n        baseUrl: options.forwardedSimpleLoginBaseUrl,\n        website: options.website,\n      },\n    };\n\n    const generator = {\n      username: options.type,\n      forwarder: options.forwardedService,\n    };\n\n    const algorithms = {\n      effUsername: {\n        wordCapitalize: options.wordCapitalize,\n        wordIncludeNumber: options.wordIncludeNumber,\n        website: options.website,\n      },\n      subaddress: {\n        subaddressType: options.subaddressType,\n        subaddressEmail: options.subaddressEmail,\n        website: options.website,\n      },\n      catchall: {\n        catchallType: options.catchallType,\n        catchallDomain: options.catchallDomain,\n        website: options.website,\n      },\n    };\n\n    return { generator, algorithms, forwarders } as MappedOptions;\n  }\n\n  private toUsernameOptions(options: MappedOptions) {\n    return {\n      type: options.generator.username,\n      wordCapitalize: options.algorithms.effUsername.wordCapitalize,\n      wordIncludeNumber: options.algorithms.effUsername.wordIncludeNumber,\n      subaddressType: options.algorithms.subaddress.subaddressType,\n      subaddressEmail: options.algorithms.subaddress.subaddressEmail,\n      catchallType: options.algorithms.catchall.catchallType,\n      catchallDomain: options.algorithms.catchall.catchallDomain,\n      forwardedService: options.generator.forwarder,\n      forwardedAnonAddyApiToken: options.forwarders.addyIo.token,\n      forwardedAnonAddyDomain: options.forwarders.addyIo.domain,\n      forwardedAnonAddyBaseUrl: options.forwarders.addyIo.baseUrl,\n      forwardedDuckDuckGoToken: options.forwarders.duckDuckGo.token,\n      forwardedFirefoxApiToken: options.forwarders.firefoxRelay.token,\n      forwardedFastmailApiToken: options.forwarders.fastmail.token,\n      forwardedForwardEmailApiToken: options.forwarders.forwardEmail.token,\n      forwardedForwardEmailDomain: options.forwarders.forwardEmail.domain,\n      forwardedSimpleLoginApiKey: options.forwarders.simpleLogin.token,\n      forwardedSimpleLoginBaseUrl: options.forwarders.simpleLogin.baseUrl,\n    } as UsernameGeneratorOptions;\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { RestClient } from \"@bitwarden/common/tools/integration/rpc\";\nimport { engine, services, strategies, Integrations } from \"@bitwarden/generator-core\";\nimport { DefaultGeneratorNavigationService } from \"@bitwarden/generator-navigation\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { LegacyUsernameGenerationService } from \"./legacy-username-generation.service\";\nimport { UsernameGenerationServiceAbstraction } from \"./username-generation.service.abstraction\";\n\nconst { KeyServiceRandomizer, UsernameRandomizer, EmailRandomizer, EmailCalculator } = engine;\nconst DefaultGeneratorService = services.DefaultGeneratorService;\nconst {\n  CatchallGeneratorStrategy,\n  SubaddressGeneratorStrategy,\n  EffUsernameGeneratorStrategy,\n  ForwarderGeneratorStrategy,\n} = strategies;\n\nexport function legacyUsernameGenerationServiceFactory(\n  apiService: ApiService,\n  i18nService: I18nService,\n  keyService: KeyService,\n  encryptService: EncryptService,\n  policyService: PolicyService,\n  accountService: AccountService,\n  stateProvider: StateProvider,\n): UsernameGenerationServiceAbstraction {\n  const randomizer = new KeyServiceRandomizer(keyService);\n  const restClient = new RestClient(apiService, i18nService);\n  const usernameRandomizer = new UsernameRandomizer(randomizer);\n  const emailRandomizer = new EmailRandomizer(randomizer);\n  const emailCalculator = new EmailCalculator();\n\n  const effUsername = new DefaultGeneratorService(\n    new EffUsernameGeneratorStrategy(usernameRandomizer, stateProvider),\n    policyService,\n  );\n\n  const subaddress = new DefaultGeneratorService(\n    new SubaddressGeneratorStrategy(emailCalculator, emailRandomizer, stateProvider),\n    policyService,\n  );\n\n  const catchall = new DefaultGeneratorService(\n    new CatchallGeneratorStrategy(emailCalculator, emailRandomizer, stateProvider),\n    policyService,\n  );\n\n  const addyIo = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.AddyIo,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const duckDuckGo = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.DuckDuckGo,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const fastmail = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.Fastmail,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const firefoxRelay = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.FirefoxRelay,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const forwardEmail = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.ForwardEmail,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const simpleLogin = new DefaultGeneratorService(\n    new ForwarderGeneratorStrategy(\n      Integrations.SimpleLogin,\n      restClient,\n      i18nService,\n      encryptService,\n      keyService,\n      stateProvider,\n    ),\n    policyService,\n  );\n\n  const navigation = new DefaultGeneratorNavigationService(stateProvider, policyService);\n\n  return new LegacyUsernameGenerationService(\n    accountService,\n    navigation,\n    catchall,\n    effUsername,\n    subaddress,\n    addyIo,\n    duckDuckGo,\n    fastmail,\n    firefoxRelay,\n    forwardEmail,\n    simpleLogin,\n  );\n}\n","/**\n * Service responsible for generating random passwords and usernames.\n */\nexport abstract class CipherFormGenerationService {\n  /**\n   * Generates a random password. Called when the user clicks the \"Generate Password\" button in the UI.\n   */\n  abstract generatePassword(): Promise<string | null>;\n\n  /**\n   * Generates a random username. Called when the user clicks the \"Generate Username\" button in the UI.\n   */\n  abstract generateUsername(): Promise<string | null>;\n}\n","import { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { CipherFormConfig } from \"./cipher-form-config.service\";\n\n/**\n * Service to save the cipher using the correct endpoint(s) and encapsulating the logic for decrypting the cipher.\n *\n * This service should only be used internally by the CipherFormComponent.\n */\nexport abstract class CipherFormService {\n  /**\n   * Helper to decrypt a cipher and avoid the need to call the cipher service directly.\n   * (useful for mocking tests/storybook).\n   */\n  abstract decryptCipher(cipher: Cipher): Promise<CipherView>;\n\n  /**\n   * Saves the new or modified cipher with the server.\n   */\n  abstract saveCipher(cipher: CipherView, config: CipherFormConfig): Promise<CipherView>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CipherFormConfig } from \"@bitwarden/vault\";\n\nimport { AdditionalOptionsSectionComponent } from \"./components/additional-options/additional-options-section.component\";\nimport { AutofillOptionsComponent } from \"./components/autofill-options/autofill-options.component\";\nimport { CardDetailsSectionComponent } from \"./components/card-details-section/card-details-section.component\";\nimport { CustomFieldsComponent } from \"./components/custom-fields/custom-fields.component\";\nimport { IdentitySectionComponent } from \"./components/identity/identity.component\";\nimport { ItemDetailsSectionComponent } from \"./components/item-details/item-details-section.component\";\nimport { LoginDetailsSectionComponent } from \"./components/login-details-section/login-details-section.component\";\nimport { SshKeySectionComponent } from \"./components/sshkey-section/sshkey-section.component\";\n\n/**\n * The complete form for a cipher. Includes all the sub-forms from their respective section components.\n * TODO: Add additional form sections as they are implemented.\n */\nexport type CipherForm = {\n  itemDetails?: ItemDetailsSectionComponent[\"itemDetailsForm\"];\n  additionalOptions?: AdditionalOptionsSectionComponent[\"additionalOptionsForm\"];\n  loginDetails?: LoginDetailsSectionComponent[\"loginDetailsForm\"];\n  autoFillOptions?: AutofillOptionsComponent[\"autofillOptionsForm\"];\n  cardDetails?: CardDetailsSectionComponent[\"cardDetailsForm\"];\n  identityDetails?: IdentitySectionComponent[\"identityForm\"];\n  sshKeyDetails?: SshKeySectionComponent[\"sshKeyForm\"];\n  customFields?: CustomFieldsComponent[\"customFieldsForm\"];\n};\n\n/**\n * A container for the {@link CipherForm} that allows for registration of child form groups and patching of the cipher\n * to be updated/created. Child form components inject this container in order to register themselves with the parent form\n * and access configuration options.\n *\n * This is an alternative to passing the form groups down through the component tree via @Inputs() and form updates via\n * @Outputs(). It allows child forms to define their own structure and validation rules, while still being able to\n * update the parent cipher.\n */\nexport abstract class CipherFormContainer {\n  /**\n   * The configuration for the cipher form.\n   */\n  readonly config: CipherFormConfig;\n\n  /**\n   * The original cipher that is being edited/cloned. Used to pre-populate the form and compare changes.\n   */\n  readonly originalCipherView: CipherView | null;\n\n  abstract registerChildForm<K extends keyof CipherForm>(\n    name: K,\n    group: Exclude<CipherForm[K], undefined>,\n  ): void;\n\n  /**\n   * Method to update the cipherView with the new values. This method should be called by the child form components\n   * @param updateFn - A function that takes the current cipherView and returns the updated cipherView\n   */\n  abstract patchCipher(updateFn: (current: CipherView) => CipherView): void;\n}\n","<form [formGroup]=\"customFieldForm\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ (variant === \"add\" ? \"addField\" : \"editField\") | i18n }}\n    </span>\n    <div bitDialogContent>\n      <bit-form-field *ngIf=\"variant === 'add'\">\n        <bit-label>{{ \"fieldType\" | i18n }}</bit-label>\n        <bit-select id=\"fieldType\" formControlName=\"type\">\n          <bit-option\n            *ngFor=\"let type of fieldTypeOptions\"\n            [value]=\"type.value\"\n            [label]=\"type.name\"\n          ></bit-option>\n        </bit-select>\n        <bit-hint>\n          {{ getTypeHint() }}\n        </bit-hint>\n      </bit-form-field>\n\n      <bit-form-field disableMargin>\n        <bit-label>{{ \"fieldLabel\" | i18n }}</bit-label>\n        <input bitInput id=\"fieldLabel\" formControlName=\"label\" type=\"text\" />\n        <bit-hint *ngIf=\"customFieldForm.value.type === FieldType.Linked\">\n          {{ \"linkedLabelHelpText\" | i18n }}\n        </bit-hint>\n      </bit-form-field>\n    </div>\n    <div bitDialogFooter class=\"tw-flex tw-gap-2 tw-w-full\">\n      <button bitButton buttonType=\"primary\" type=\"submit\" [disabled]=\"customFieldForm.invalid\">\n        {{ (variant === \"add\" ? \"add\" : \"save\") | i18n }}\n      </button>\n      <button bitButton bitDialogClose buttonType=\"secondary\" type=\"button\">\n        {{ \"cancel\" | i18n }}\n      </button>\n\n      <button\n        *ngIf=\"variant === 'edit'\"\n        type=\"button\"\n        buttonType=\"danger\"\n        class=\"tw-ml-auto\"\n        bitIconButton=\"bwi-trash\"\n        [appA11yTitle]=\"'deleteCustomField' | i18n: customFieldForm.value.label\"\n        (click)=\"removeField()\"\n      ></button>\n    </div>\n  </bit-dialog>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DIALOG_DATA } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Inject } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType, FieldType } from \"@bitwarden/common/vault/enums\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  FormFieldModule,\n  IconButtonModule,\n  SelectModule,\n} from \"@bitwarden/components\";\n\nexport type AddEditCustomFieldDialogData = {\n  addField: (type: FieldType, label: string) => void;\n  updateLabel: (index: number, label: string) => void;\n  removeField: (index: number) => void;\n  /** Type of cipher */\n  cipherType: CipherType;\n  /** When provided, dialog will display edit label variants */\n  editLabelConfig?: { index: number; label: string };\n};\n\n@Component({\n  standalone: true,\n  selector: \"vault-add-edit-custom-field-dialog\",\n  templateUrl: \"./add-edit-custom-field-dialog.component.html\",\n  imports: [\n    CommonModule,\n    JslibModule,\n    DialogModule,\n    ButtonModule,\n    FormFieldModule,\n    SelectModule,\n    ReactiveFormsModule,\n    IconButtonModule,\n    AsyncActionsModule,\n  ],\n})\nexport class AddEditCustomFieldDialogComponent {\n  variant: \"add\" | \"edit\";\n\n  customFieldForm = this.formBuilder.group({\n    type: FieldType.Text,\n    label: [\"\", Validators.required],\n  });\n\n  fieldTypeOptions = [\n    { name: this.i18nService.t(\"cfTypeText\"), value: FieldType.Text },\n    { name: this.i18nService.t(\"cfTypeHidden\"), value: FieldType.Hidden },\n    { name: this.i18nService.t(\"cfTypeCheckbox\"), value: FieldType.Boolean },\n    { name: this.i18nService.t(\"cfTypeLinked\"), value: FieldType.Linked },\n  ];\n\n  FieldType = FieldType;\n\n  constructor(\n    @Inject(DIALOG_DATA) private data: AddEditCustomFieldDialogData,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n  ) {\n    this.variant = data.editLabelConfig ? \"edit\" : \"add\";\n\n    this.fieldTypeOptions = this.fieldTypeOptions.filter((option) => {\n      // Filter out the Linked field type for Secure Notes\n      if (this.data.cipherType === CipherType.SecureNote) {\n        return option.value !== FieldType.Linked;\n      }\n\n      return true;\n    });\n\n    if (this.variant === \"edit\") {\n      this.customFieldForm.controls.label.setValue(data.editLabelConfig.label);\n      this.customFieldForm.controls.type.disable();\n    }\n  }\n\n  getTypeHint(): string {\n    switch (this.customFieldForm.get(\"type\")?.value) {\n      case FieldType.Text:\n        return this.i18nService.t(\"textHelpText\");\n      case FieldType.Hidden:\n        return this.i18nService.t(\"hiddenHelpText\");\n      case FieldType.Boolean:\n        return this.i18nService.t(\"checkBoxHelpText\");\n      case FieldType.Linked:\n        return this.i18nService.t(\"linkedHelpText\");\n      default:\n        return \"\";\n    }\n  }\n\n  /** Direct the form submission to the proper action */\n  submit = () => {\n    if (this.variant === \"add\") {\n      this.addField();\n    } else {\n      this.updateLabel();\n    }\n  };\n\n  /** Invoke the `addField` callback with the custom field details */\n  addField() {\n    if (this.customFieldForm.invalid) {\n      return;\n    }\n\n    const { type, label } = this.customFieldForm.value;\n    this.data.addField(type, label);\n  }\n\n  /** Invoke the `updateLabel` callback with the new label */\n  updateLabel() {\n    if (this.customFieldForm.invalid) {\n      return;\n    }\n\n    const { label } = this.customFieldForm.value;\n    this.data.updateLabel(this.data.editLabelConfig.index, label);\n  }\n\n  /** Invoke the `removeField` callback */\n  removeField() {\n    this.data.removeField(this.data.editLabelConfig.index);\n  }\n}\n","<bit-section *ngIf=\"hasCustomFields\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"customFields\" | i18n }}</h2>\n  </bit-section-header>\n  <form [formGroup]=\"customFieldsForm\">\n    <bit-card\n      formArrayName=\"fields\"\n      cdkDropList\n      (cdkDropListDropped)=\"drop($event)\"\n      data-testid=\"custom-fields\"\n    >\n      <div\n        *ngFor=\"let field of fields.controls; let i = index\"\n        [formGroupName]=\"i\"\n        class=\"tw-flex tw-p-3 -tw-mx-3 tw-gap-4 tw-bg-background tw-rounded-lg first:-tw-mt-3 last-of-type:tw-mb-0\"\n        [ngClass]=\"{\n          'tw-items-center': field.value.type === FieldType.Boolean,\n        }\"\n        [attr.data-testid]=\"field.value.name + '-entry'\"\n        cdkDrag\n        #customFieldRow\n      >\n        <!-- Text Field -->\n        <bit-form-field *ngIf=\"field.value.type === FieldType.Text\" class=\"tw-flex-1\" disableMargin>\n          <bit-label>{{ field.value.name }}</bit-label>\n          <input bitInput formControlName=\"value\" data-testid=\"custom-text-field\" />\n        </bit-form-field>\n\n        <!-- Hidden Field -->\n        <bit-form-field\n          *ngIf=\"field.value.type === FieldType.Hidden\"\n          class=\"tw-flex-1\"\n          disableMargin\n        >\n          <bit-label>{{ field.value.name }}</bit-label>\n          <input\n            bitInput\n            formControlName=\"value\"\n            type=\"password\"\n            data-testid=\"custom-hidden-field\"\n            class=\"tw-font-mono\"\n          />\n          <button\n            type=\"button\"\n            bitIconButton\n            bitSuffix\n            bitPasswordInputToggle\n            data-testid=\"visibility-for-custom-hidden-field\"\n            [disabled]=\"!canViewPasswords(i)\"\n            (toggledChange)=\"logHiddenEvent($event)\"\n          ></button>\n        </bit-form-field>\n\n        <!-- Boolean Field -->\n        <bit-form-control\n          *ngIf=\"field.value.type === FieldType.Boolean\"\n          class=\"tw-flex-1\"\n          disableMargin\n        >\n          <input\n            bitCheckbox\n            formControlName=\"value\"\n            type=\"checkbox\"\n            data-testid=\"custom-boolean-field\"\n          />\n          <bit-label>{{ field.value.name }}</bit-label>\n        </bit-form-control>\n\n        <!-- Linked Field -->\n        <bit-form-field\n          *ngIf=\"field.value.type === FieldType.Linked\"\n          class=\"tw-flex-1\"\n          disableMargin\n        >\n          <bit-label>{{ field.value.name }}</bit-label>\n          <bit-select formControlName=\"linkedId\" data-testid=\"custom-linked-field\">\n            <bit-option\n              *ngFor=\"let option of linkedFieldOptions\"\n              [value]=\"option.value\"\n              [label]=\"option.name\"\n            ></bit-option>\n          </bit-select>\n        </bit-form-field>\n\n        <button\n          type=\"button\"\n          (click)=\"openAddEditCustomFieldDialog({ index: i, label: field.value.name })\"\n          [appA11yTitle]=\"'editFieldLabel' | i18n: field.value.name\"\n          bitIconButton=\"bwi-pencil-square\"\n          class=\"tw-self-end\"\n          data-testid=\"edit-custom-field-button\"\n          *ngIf=\"!isPartialEdit\"\n        ></button>\n\n        <button\n          type=\"button\"\n          bitIconButton=\"bwi-hamburger\"\n          class=\"tw-self-end\"\n          cdkDragHandle\n          [appA11yTitle]=\"'reorderToggleButton' | i18n: field.value.name\"\n          (keydown)=\"handleKeyDown($event, field.value.name, i)\"\n          data-testid=\"reorder-toggle-button\"\n          *ngIf=\"!isPartialEdit\"\n        ></button>\n      </div>\n\n      <button\n        type=\"button\"\n        bitLink\n        linkType=\"primary\"\n        (click)=\"openAddEditCustomFieldDialog()\"\n        *ngIf=\"!isPartialEdit\"\n      >\n        <i class=\"bwi bwi-plus tw-font-bold\" aria-hidden=\"true\"></i>\n        {{ \"addField\" | i18n }}\n      </button>\n    </bit-card>\n  </form>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LiveAnnouncer } from \"@angular/cdk/a11y\";\nimport { DialogRef } from \"@angular/cdk/dialog\";\nimport { CdkDragDrop, DragDropModule, moveItemInArray } from \"@angular/cdk/drag-drop\";\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterViewInit,\n  Component,\n  DestroyRef,\n  ElementRef,\n  EventEmitter,\n  inject,\n  OnInit,\n  Output,\n  QueryList,\n  ViewChildren,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormArray, FormBuilder, FormsModule, ReactiveFormsModule } from \"@angular/forms\";\nimport { Subject, zip } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType, FieldType, LinkedIdType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { FieldView } from \"@bitwarden/common/vault/models/view/field.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport {\n  CardComponent,\n  CheckboxModule,\n  DialogService,\n  FormFieldModule,\n  IconButtonModule,\n  LinkModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\nimport {\n  AddEditCustomFieldDialogComponent,\n  AddEditCustomFieldDialogData,\n} from \"./add-edit-custom-field-dialog/add-edit-custom-field-dialog.component\";\n\n/** Attributes associated with each individual FormGroup within the FormArray */\nexport type CustomField = {\n  type: FieldType;\n  name: string;\n  value: string | boolean | null;\n  linkedId: LinkedIdType;\n  /**\n   * `newField` is set to true when the custom field is created.\n   *\n   * This is applicable when the user is adding a new field but\n   * the `viewPassword` property on the cipher is false. The\n   * user will still need the ability to set the value of the field\n   * they just created.\n   *\n   * See {@link CustomFieldsComponent.canViewPasswords} for implementation.\n   */\n  newField: boolean;\n};\n\n@Component({\n  standalone: true,\n  selector: \"vault-custom-fields\",\n  templateUrl: \"./custom-fields.component.html\",\n  imports: [\n    JslibModule,\n    CommonModule,\n    FormsModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    CardComponent,\n    IconButtonModule,\n    CheckboxModule,\n    SelectModule,\n    DragDropModule,\n    LinkModule,\n  ],\n})\nexport class CustomFieldsComponent implements OnInit, AfterViewInit {\n  @Output() numberOfFieldsChange = new EventEmitter<number>();\n\n  @ViewChildren(\"customFieldRow\") customFieldRows: QueryList<ElementRef<HTMLDivElement>>;\n\n  customFieldsForm = this.formBuilder.group({\n    fields: new FormArray([]),\n  });\n\n  /** Reference to the add field dialog */\n  dialogRef: DialogRef;\n\n  /** Options for Linked Fields */\n  linkedFieldOptions: { name: string; value: LinkedIdType }[] = [];\n\n  /** True when edit/reorder toggles should be hidden based on partial-edit */\n  isPartialEdit: boolean;\n\n  /** True when there are custom fields available */\n  hasCustomFields = false;\n\n  /** Emits when a new custom field should be focused */\n  private focusOnNewInput$ = new Subject<void>();\n\n  destroyed$: DestroyRef;\n  FieldType = FieldType;\n\n  constructor(\n    private dialogService: DialogService,\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private liveAnnouncer: LiveAnnouncer,\n    private eventCollectionService: EventCollectionService,\n  ) {\n    this.destroyed$ = inject(DestroyRef);\n    this.cipherFormContainer.registerChildForm(\"customFields\", this.customFieldsForm);\n\n    this.customFieldsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((values) => {\n      this.updateCipher(values.fields);\n    });\n  }\n\n  /** Fields form array, referenced via a getter to avoid type-casting in multiple places  */\n  get fields(): FormArray {\n    return this.customFieldsForm.controls.fields as FormArray;\n  }\n\n  ngOnInit() {\n    const linkedFieldsOptionsForCipher = this.getLinkedFieldsOptionsForCipher();\n    const optionsArray = Array.from(linkedFieldsOptionsForCipher?.entries() ?? []);\n    optionsArray.sort((a, b) => a[1].sortPosition - b[1].sortPosition);\n\n    // Populate options for linked custom fields\n    this.linkedFieldOptions = optionsArray.map(([id, linkedFieldOption]) => ({\n      name: this.i18nService.t(linkedFieldOption.i18nKey),\n      value: id,\n    }));\n\n    // Populate the form with the existing fields\n    this.cipherFormContainer.originalCipherView?.fields?.forEach((field) => {\n      let value: string | boolean = field.value;\n\n      if (field.type === FieldType.Boolean) {\n        value = field.value === \"true\" ? true : false;\n      }\n\n      this.fields.push(\n        this.formBuilder.group<CustomField>({\n          type: field.type,\n          name: field.name,\n          value: value,\n          linkedId: field.linkedId,\n          newField: false,\n        }),\n      );\n    });\n\n    // Disable the form if in partial-edit mode\n    // Must happen after the initial fields are populated\n    if (this.cipherFormContainer.config.mode === \"partial-edit\") {\n      this.isPartialEdit = true;\n      this.customFieldsForm.disable();\n    }\n  }\n\n  ngAfterViewInit(): void {\n    // Focus on the new input field when it is added\n    // This is done after the view is initialized to ensure the input is rendered\n    zip(this.focusOnNewInput$, this.customFieldRows.changes)\n      .pipe(takeUntilDestroyed(this.destroyed$))\n      .subscribe(() => {\n        const mostRecentRow = this.customFieldRows.last.nativeElement;\n        const input = mostRecentRow.querySelector<HTMLInputElement>(\"input\");\n        const label = mostRecentRow.querySelector<HTMLLabelElement>(\"label\").textContent.trim();\n\n        // Focus the input after the announcement element is added to the DOM,\n        // this should stop the announcement from being cut off by the \"focus\" event.\n        void this.liveAnnouncer\n          .announce(this.i18nService.t(\"fieldAdded\", label), \"polite\")\n          .then(() => {\n            input.focus();\n          });\n      });\n  }\n\n  /** Opens the add/edit custom field dialog */\n  openAddEditCustomFieldDialog(editLabelConfig?: AddEditCustomFieldDialogData[\"editLabelConfig\"]) {\n    this.dialogRef = this.dialogService.open<unknown, AddEditCustomFieldDialogData>(\n      AddEditCustomFieldDialogComponent,\n      {\n        data: {\n          addField: this.addField.bind(this),\n          updateLabel: this.updateLabel.bind(this),\n          removeField: this.removeField.bind(this),\n          cipherType: this.cipherFormContainer.config.cipherType,\n          editLabelConfig,\n        },\n      },\n    );\n  }\n\n  /** Returns true when the user has permission to view passwords for the individual cipher */\n  canViewPasswords(index: number) {\n    if (this.cipherFormContainer.originalCipherView === null) {\n      return true;\n    }\n\n    return (\n      this.cipherFormContainer.originalCipherView.viewPassword ||\n      this.fields.at(index).value.newField\n    );\n  }\n\n  /** Updates label for an individual field */\n  updateLabel(index: number, label: string) {\n    this.fields.at(index).patchValue({ name: label });\n    this.dialogRef?.close();\n  }\n\n  /** Removes an individual field at a specific index */\n  removeField(index: number) {\n    this.fields.removeAt(index);\n    this.dialogRef?.close();\n  }\n\n  /** Adds a new field to the form */\n  addField(type: FieldType, label: string) {\n    this.dialogRef?.close();\n\n    let value = null;\n    let linkedId = null;\n\n    if (type === FieldType.Boolean) {\n      // Default to false for boolean fields\n      value = false;\n    }\n\n    if (type === FieldType.Linked && this.linkedFieldOptions.length > 0) {\n      // Default to the first linked field option\n      linkedId = this.linkedFieldOptions[0].value;\n    }\n\n    this.fields.push(\n      this.formBuilder.group<CustomField>({\n        type,\n        name: label,\n        value,\n        linkedId,\n        newField: true,\n      }),\n    );\n\n    // Trigger focus on the new input field\n    this.focusOnNewInput$.next();\n  }\n\n  /** Reorder the controls to match the new order after a \"drop\" event */\n  drop(event: CdkDragDrop<HTMLDivElement>) {\n    // Alter the order of the fields array in place\n    moveItemInArray(this.fields.controls, event.previousIndex, event.currentIndex);\n\n    this.updateCipher(this.fields.controls.map((control) => control.value));\n  }\n\n  /** Move a custom field up or down in the list order */\n  async handleKeyDown(event: KeyboardEvent, label: string, index: number) {\n    if (event.key === \"ArrowUp\" && index !== 0) {\n      event.preventDefault();\n\n      const currentIndex = index - 1;\n      this.drop({ previousIndex: index, currentIndex } as CdkDragDrop<HTMLDivElement>);\n      await this.liveAnnouncer.announce(\n        this.i18nService.t(\"reorderFieldUp\", label, currentIndex + 1, this.fields.length),\n        \"assertive\",\n      );\n\n      // Refocus the button after the reorder\n      // Angular re-renders the list when moving an item up which causes the focus to be lost\n      // Wait for the next tick to ensure the button is rendered before focusing\n      setTimeout(() => {\n        (event.target as HTMLButtonElement).focus();\n      });\n    }\n\n    if (event.key === \"ArrowDown\" && index !== this.fields.length - 1) {\n      event.preventDefault();\n\n      const currentIndex = index + 1;\n      this.drop({ previousIndex: index, currentIndex } as CdkDragDrop<HTMLDivElement>);\n      await this.liveAnnouncer.announce(\n        this.i18nService.t(\"reorderFieldDown\", label, currentIndex + 1, this.fields.length),\n        \"assertive\",\n      );\n    }\n  }\n\n  async logHiddenEvent(hiddenFieldVisible: boolean) {\n    const { mode, originalCipher } = this.cipherFormContainer.config;\n\n    const isEdit = [\"edit\", \"partial-edit\"].includes(mode);\n\n    if (hiddenFieldVisible && isEdit) {\n      await this.eventCollectionService.collect(\n        EventType.Cipher_ClientToggledHiddenFieldVisible,\n        originalCipher.id,\n        false,\n        originalCipher.organizationId,\n      );\n    }\n  }\n\n  /**\n   * Returns the linked field options for the current cipher type\n   *\n   * Note: Note ciphers do not have linked fields\n   */\n  private getLinkedFieldsOptionsForCipher() {\n    switch (this.cipherFormContainer.config.cipherType) {\n      case CipherType.Login:\n        return LoginView.prototype.linkedFieldOptions;\n      case CipherType.Card:\n        return CardView.prototype.linkedFieldOptions;\n      case CipherType.Identity:\n        return IdentityView.prototype.linkedFieldOptions;\n      default:\n        return null;\n    }\n  }\n\n  /** Create `FieldView` from the form objects and update the cipher */\n  private updateCipher(fields: CustomField[]) {\n    const newFields = fields.map((field: CustomField) => {\n      let value: string;\n\n      if (typeof field.value === \"number\") {\n        value = `${field.value}`;\n      } else if (typeof field.value === \"boolean\") {\n        value = field.value ? \"true\" : \"false\";\n      } else {\n        value = field.value;\n      }\n\n      const fieldView = new FieldView();\n      fieldView.type = field.type;\n      fieldView.name = field.name;\n      fieldView.value = value;\n      fieldView.linkedId = field.linkedId;\n      return fieldView;\n    });\n\n    this.hasCustomFields = newFields.length > 0;\n\n    this.numberOfFieldsChange.emit(newFields.length);\n\n    this.cipherFormContainer.patchCipher((cipher) => {\n      cipher.fields = newFields;\n      return cipher;\n    });\n  }\n}\n","<bit-section [formGroup]=\"additionalOptionsForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"additionalOptions\" | i18n }}</h2>\n  </bit-section-header>\n\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"notes\" | i18n }}</bit-label>\n      <textarea bitInput rows=\"5\" formControlName=\"notes\"></textarea>\n    </bit-form-field>\n    <bit-form-control\n      *ngIf=\"passwordRepromptEnabled$ | async\"\n      [disableMargin]=\"hasCustomFields || isPartialEdit\"\n    >\n      <input type=\"checkbox\" bitCheckbox formControlName=\"reprompt\" />\n      <bit-label>{{ \"passwordPrompt\" | i18n }}</bit-label>\n    </bit-form-control>\n\n    <button\n      bitLink\n      type=\"button\"\n      linkType=\"primary\"\n      *ngIf=\"!hasCustomFields && !isPartialEdit\"\n      (click)=\"addCustomField()\"\n    >\n      <i class=\"bwi bwi-plus tw-font-bold\" aria-hidden=\"true\"></i>\n      {{ \"addField\" | i18n }}\n    </button>\n  </bit-card>\n</bit-section>\n\n<vault-custom-fields (numberOfFieldsChange)=\"handleCustomFieldChange($event)\"></vault-custom-fields>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { ChangeDetectorRef, Component, OnInit, ViewChild } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { shareReplay } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums\";\nimport {\n  CardComponent,\n  CheckboxModule,\n  FormFieldModule,\n  LinkModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { PasswordRepromptService } from \"../../../services/password-reprompt.service\";\nimport { CipherFormContainer } from \"../../cipher-form-container\";\nimport { CustomFieldsComponent } from \"../custom-fields/custom-fields.component\";\n\n@Component({\n  selector: \"vault-additional-options-section\",\n  templateUrl: \"./additional-options-section.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    JslibModule,\n    CardComponent,\n    FormFieldModule,\n    ReactiveFormsModule,\n    CheckboxModule,\n    CommonModule,\n    CustomFieldsComponent,\n    LinkModule,\n  ],\n})\nexport class AdditionalOptionsSectionComponent implements OnInit {\n  @ViewChild(CustomFieldsComponent) customFieldsComponent: CustomFieldsComponent;\n\n  additionalOptionsForm = this.formBuilder.group({\n    notes: [null as string],\n    reprompt: [false],\n  });\n\n  passwordRepromptEnabled$ = this.passwordRepromptService.enabled$.pipe(\n    shareReplay({ refCount: false, bufferSize: 1 }),\n  );\n\n  /** When false when the add field button should be displayed in the Additional Options section  */\n  hasCustomFields = false;\n\n  /** True when the form is in `partial-edit` mode */\n  isPartialEdit = false;\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private passwordRepromptService: PasswordRepromptService,\n    private changeDetectorRef: ChangeDetectorRef,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"additionalOptions\", this.additionalOptionsForm);\n\n    this.additionalOptionsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.cipherFormContainer.patchCipher((cipher) => {\n        cipher.notes = value.notes;\n        cipher.reprompt = value.reprompt ? CipherRepromptType.Password : CipherRepromptType.None;\n        return cipher;\n      });\n    });\n  }\n\n  ngOnInit() {\n    if (this.cipherFormContainer.originalCipherView) {\n      this.additionalOptionsForm.patchValue({\n        notes: this.cipherFormContainer.originalCipherView.notes,\n        reprompt:\n          this.cipherFormContainer.originalCipherView.reprompt === CipherRepromptType.Password,\n      });\n    }\n\n    if (this.cipherFormContainer.config.mode === \"partial-edit\") {\n      this.additionalOptionsForm.disable();\n      this.isPartialEdit = true;\n    }\n  }\n\n  /** Opens the add custom field dialog */\n  addCustomField() {\n    this.customFieldsComponent.openAddEditCustomFieldDialog();\n  }\n\n  /** Update the local state when the number of fields changes */\n  handleCustomFieldChange(numberOfCustomFields: number) {\n    this.hasCustomFields = numberOfCustomFields > 0;\n\n    // The event that triggers `handleCustomFieldChange` can occur within\n    // the CustomFieldComponent `ngOnInit` lifecycle hook, so we need to\n    // manually trigger change detection to update the view.\n    this.changeDetectorRef.detectChanges();\n  }\n}\n","<bit-section [formGroup]=\"cardDetailsForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">\n      {{ getSectionHeading() }}\n    </h2>\n  </bit-section-header>\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"cardholderName\" | i18n }}</bit-label>\n      <input id=\"cardholderName\" bitInput formControlName=\"cardholderName\" />\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"number\" | i18n }}</bit-label>\n      <input\n        id=\"cardNumber\"\n        bitInput\n        formControlName=\"number\"\n        type=\"password\"\n        class=\"tw-font-mono\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        data-testid=\"visibility-for-card-number\"\n        (toggledChange)=\"logCardEvent($event, EventType.Cipher_ClientToggledCardNumberVisible)\"\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"brand\" | i18n }}</bit-label>\n      <bit-select id=\"cardBrand\" formControlName=\"brand\">\n        <bit-option\n          *ngFor=\"let brand of cardBrands\"\n          [value]=\"brand.value\"\n          [label]=\"brand.name\"\n        ></bit-option>\n      </bit-select>\n    </bit-form-field>\n\n    <div class=\"tw-flex tw-flex-wrap tw-gap-1\">\n      <bit-form-field class=\"tw-flex-1\">\n        <bit-label>{{ \"expirationMonth\" | i18n }}</bit-label>\n        <bit-select id=\"cardExpMonth\" formControlName=\"expMonth\">\n          <bit-option\n            *ngFor=\"let month of expirationMonths\"\n            [value]=\"month.value\"\n            [label]=\"month.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n\n      <bit-form-field class=\"tw-flex-1\">\n        <bit-label>{{ \"expirationYear\" | i18n }}</bit-label>\n        <input id=\"cardExpYear\" bitInput formControlName=\"expYear\" type=\"number\" />\n      </bit-form-field>\n    </div>\n\n    <bit-form-field disableMargin>\n      <bit-label>{{ \"securityCode\" | i18n }}</bit-label>\n      <input id=\"cardCode\" bitInput formControlName=\"code\" type=\"password\" class=\"tw-font-mono\" />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        data-testid=\"visibility-for-card-code\"\n        (toggledChange)=\"logCardEvent($event, EventType.Cipher_ClientToggledCardCodeVisible)\"\n      ></button>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { normalizeExpiryYearFormat } from \"@bitwarden/common/autofill/utils\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\n@Component({\n  selector: \"vault-card-details-section\",\n  templateUrl: \"./card-details-section.component.html\",\n  standalone: true,\n  imports: [\n    CardComponent,\n    SectionComponent,\n    TypographyModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SelectModule,\n    SectionHeaderComponent,\n    IconButtonModule,\n    JslibModule,\n    CommonModule,\n  ],\n})\nexport class CardDetailsSectionComponent implements OnInit {\n  /** The original cipher */\n  @Input() originalCipherView: CipherView;\n\n  /** True when all fields should be disabled */\n  @Input() disabled: boolean;\n\n  /**\n   * All form fields associated with the card details\n   *\n   * Note: `as` is used to assert the type of the form control,\n   * leaving as just null gets inferred as `unknown`\n   */\n  cardDetailsForm = this.formBuilder.group({\n    cardholderName: null as string | null,\n    number: null as string | null,\n    brand: null as string | null,\n    expMonth: null as string | null,\n    expYear: null as string | number | null,\n    code: null as string | null,\n  });\n\n  /** Available Card Brands */\n  readonly cardBrands = [\n    { name: \"-- \" + this.i18nService.t(\"select\") + \" --\", value: null },\n    { name: \"Visa\", value: \"Visa\" },\n    { name: \"Mastercard\", value: \"Mastercard\" },\n    { name: \"American Express\", value: \"Amex\" },\n    { name: \"Discover\", value: \"Discover\" },\n    { name: \"Diners Club\", value: \"Diners Club\" },\n    { name: \"JCB\", value: \"JCB\" },\n    { name: \"Maestro\", value: \"Maestro\" },\n    { name: \"UnionPay\", value: \"UnionPay\" },\n    { name: \"RuPay\", value: \"RuPay\" },\n    { name: this.i18nService.t(\"other\"), value: \"Other\" },\n  ];\n\n  /** Available expiration months */\n  readonly expirationMonths = [\n    { name: \"-- \" + this.i18nService.t(\"select\") + \" --\", value: null },\n    { name: \"01 - \" + this.i18nService.t(\"january\"), value: \"1\" },\n    { name: \"02 - \" + this.i18nService.t(\"february\"), value: \"2\" },\n    { name: \"03 - \" + this.i18nService.t(\"march\"), value: \"3\" },\n    { name: \"04 - \" + this.i18nService.t(\"april\"), value: \"4\" },\n    { name: \"05 - \" + this.i18nService.t(\"may\"), value: \"5\" },\n    { name: \"06 - \" + this.i18nService.t(\"june\"), value: \"6\" },\n    { name: \"07 - \" + this.i18nService.t(\"july\"), value: \"7\" },\n    { name: \"08 - \" + this.i18nService.t(\"august\"), value: \"8\" },\n    { name: \"09 - \" + this.i18nService.t(\"september\"), value: \"9\" },\n    { name: \"10 - \" + this.i18nService.t(\"october\"), value: \"10\" },\n    { name: \"11 - \" + this.i18nService.t(\"november\"), value: \"11\" },\n    { name: \"12 - \" + this.i18nService.t(\"december\"), value: \"12\" },\n  ];\n\n  EventType = EventType;\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private eventCollectionService: EventCollectionService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"cardDetails\", this.cardDetailsForm);\n\n    this.cardDetailsForm.valueChanges\n      .pipe(takeUntilDestroyed())\n      .subscribe(({ cardholderName, number, brand, expMonth, expYear, code }) => {\n        this.cipherFormContainer.patchCipher((cipher) => {\n          const expirationYear = normalizeExpiryYearFormat(expYear);\n\n          Object.assign(cipher.card, {\n            cardholderName,\n            number,\n            brand,\n            expMonth,\n            expYear: expirationYear,\n            code,\n          });\n\n          return cipher;\n        });\n      });\n\n    this.cardDetailsForm.controls.number.valueChanges\n      .pipe(takeUntilDestroyed())\n      .subscribe((number) => {\n        const brand = CardView.getCardBrandByPatterns(number);\n\n        if (brand) {\n          this.cardDetailsForm.controls.brand.setValue(brand);\n        }\n      });\n  }\n\n  ngOnInit() {\n    if (this.originalCipherView?.card) {\n      this.setInitialValues();\n    }\n\n    if (this.disabled) {\n      this.cardDetailsForm.disable();\n    }\n  }\n\n  /** Get the section heading based on the card brand */\n  getSectionHeading(): string {\n    const { brand } = this.cardDetailsForm.value;\n\n    if (brand && brand !== \"Other\") {\n      return this.i18nService.t(\"cardBrandDetails\", brand);\n    }\n\n    return this.i18nService.t(\"cardDetails\");\n  }\n\n  async logCardEvent(hiddenFieldVisible: boolean, event: EventType) {\n    const { mode, originalCipher } = this.cipherFormContainer.config;\n\n    const isEdit = [\"edit\", \"partial-edit\"].includes(mode);\n\n    if (hiddenFieldVisible && isEdit) {\n      await this.eventCollectionService.collect(\n        event,\n        originalCipher.id,\n        false,\n        originalCipher.organizationId,\n      );\n    }\n  }\n\n  /** Set form initial form values from the current cipher */\n  private setInitialValues() {\n    const { cardholderName, number, brand, expMonth, expYear, code } = this.originalCipherView.card;\n\n    this.cardDetailsForm.setValue({\n      cardholderName: cardholderName,\n      number: number,\n      brand: brand,\n      expMonth: expMonth,\n      expYear: expYear,\n      code: code,\n    });\n  }\n}\n","<form [formGroup]=\"identityForm\">\n  <bit-section>\n    <bit-section-header>\n      <h2 bitTypography=\"h6\">{{ \"personalDetails\" | i18n }}</h2>\n    </bit-section-header>\n    <bit-card>\n      <bit-form-field>\n        <bit-label>\n          {{ \"title\" | i18n }}\n        </bit-label>\n        <bit-select formControlName=\"title\">\n          <bit-option\n            *ngFor=\"let title of identityTitleOptions\"\n            [value]=\"title.value\"\n            [label]=\"title.name\"\n          >\n          </bit-option>\n        </bit-select>\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"firstName\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"firstName\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"middleName\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"middleName\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"lastName\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"lastName\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"username\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"username\" />\n      </bit-form-field>\n      <bit-form-field disableMargin>\n        <bit-label>\n          {{ \"company\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"company\" />\n      </bit-form-field>\n    </bit-card>\n  </bit-section>\n  <bit-section>\n    <bit-section-header>\n      <h2 bitTypography=\"h6\">{{ \"identification\" | i18n }}</h2>\n    </bit-section-header>\n    <bit-card>\n      <bit-form-field>\n        <bit-label>\n          {{ \"ssn\" | i18n }}\n        </bit-label>\n        <input formControlName=\"ssn\" bitInput type=\"password\" />\n        <button\n          type=\"button\"\n          bitIconButton\n          bitSuffix\n          bitPasswordInputToggle\n          data-testid=\"visibility-for-ssn\"\n        ></button>\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"passportNumber\" | i18n }}\n        </bit-label>\n        <input formControlName=\"passportNumber\" bitInput type=\"password\" />\n        <button\n          type=\"button\"\n          bitIconButton\n          bitSuffix\n          bitPasswordInputToggle\n          data-testid=\"visibility-for-passport-number\"\n        ></button>\n      </bit-form-field>\n      <bit-form-field disableMargin>\n        <bit-label>\n          {{ \"licenseNumber\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"licenseNumber\" />\n      </bit-form-field>\n    </bit-card>\n  </bit-section>\n  <bit-section>\n    <bit-section-header>\n      <h2 bitTypography=\"h6\">{{ \"contactInfo\" | i18n }}</h2>\n    </bit-section-header>\n    <bit-card>\n      <bit-form-field>\n        <bit-label>\n          {{ \"email\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"email\" />\n      </bit-form-field>\n      <bit-form-field disableMargin>\n        <bit-label>\n          {{ \"phone\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"phone\" />\n      </bit-form-field>\n    </bit-card>\n  </bit-section>\n  <bit-section>\n    <bit-section-header>\n      <h2 bitTypography=\"h6\">{{ \"address\" | i18n }}</h2>\n    </bit-section-header>\n    <bit-card>\n      <bit-form-field>\n        <bit-label>\n          {{ \"address1\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"address1\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"address2\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"address2\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"address3\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"address3\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"cityTown\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"city\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"stateProvince\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"state\" />\n      </bit-form-field>\n      <bit-form-field>\n        <bit-label>\n          {{ \"zipPostalCode\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"postalCode\" />\n      </bit-form-field>\n      <bit-form-field disableMargin>\n        <bit-label>\n          {{ \"country\" | i18n }}\n        </bit-label>\n        <input bitInput formControlName=\"country\" />\n      </bit-form-field>\n    </bit-card>\n  </bit-section>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport {\n  ButtonModule,\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\n@Component({\n  standalone: true,\n  selector: \"vault-identity-section\",\n  templateUrl: \"./identity.component.html\",\n  imports: [\n    CommonModule,\n    ButtonModule,\n    JslibModule,\n    ReactiveFormsModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    CardComponent,\n    FormFieldModule,\n    IconButtonModule,\n    SelectModule,\n    TypographyModule,\n  ],\n})\nexport class IdentitySectionComponent implements OnInit {\n  @Input() originalCipherView: CipherView;\n  @Input() disabled: boolean;\n  identityTitleOptions = [\n    { name: \"-- \" + this.i18nService.t(\"select\") + \" --\", value: null },\n    { name: this.i18nService.t(\"mr\"), value: this.i18nService.t(\"mr\") },\n    { name: this.i18nService.t(\"mrs\"), value: this.i18nService.t(\"mrs\") },\n    { name: this.i18nService.t(\"ms\"), value: this.i18nService.t(\"ms\") },\n    { name: this.i18nService.t(\"mx\"), value: this.i18nService.t(\"mx\") },\n    { name: this.i18nService.t(\"dr\"), value: this.i18nService.t(\"dr\") },\n  ];\n\n  protected identityForm = this.formBuilder.group({\n    title: [null],\n    firstName: [\"\"],\n    middleName: [\"\"],\n    lastName: [\"\"],\n    username: [\"\"],\n    company: [\"\"],\n    ssn: [\"\"],\n    passportNumber: [\"\"],\n    licenseNumber: [\"\"],\n    email: [\"\"],\n    phone: [\"\"],\n    address1: [\"\"],\n    address2: [\"\"],\n    address3: [\"\"],\n    city: [\"\"],\n    state: [\"\"],\n    postalCode: [\"\"],\n    country: [\"\"],\n  });\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"identityDetails\", this.identityForm);\n    this.identityForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      const data = new IdentityView();\n      data.title = value.title;\n      data.firstName = value.firstName;\n      data.middleName = value.middleName;\n      data.lastName = value.lastName;\n      data.username = value.username;\n      data.company = value.company;\n      data.ssn = value.ssn;\n      data.passportNumber = value.passportNumber;\n      data.licenseNumber = value.licenseNumber;\n      data.email = value.email;\n      data.phone = value.phone;\n      data.address1 = value.address1;\n      data.address2 = value.address2;\n      data.address3 = value.address3;\n      data.city = value.city;\n      data.state = value.state;\n      data.postalCode = value.postalCode;\n      data.country = value.country;\n\n      this.cipherFormContainer.patchCipher((cipher) => {\n        cipher.identity = data;\n        return cipher;\n      });\n    });\n  }\n\n  ngOnInit() {\n    // If true will disable all inputs\n    if (this.disabled) {\n      this.identityForm.disable();\n    }\n\n    if (this.originalCipherView && this.originalCipherView.id) {\n      this.populateFormData();\n    } else {\n      this.identityForm.patchValue({\n        username: this.cipherFormContainer.config.initialValues?.username || \"\",\n      });\n    }\n  }\n\n  populateFormData() {\n    const { identity } = this.originalCipherView;\n    this.identityForm.setValue({\n      title: identity.title,\n      firstName: identity.firstName,\n      middleName: identity.middleName,\n      lastName: identity.lastName,\n      username: this.cipherFormContainer.config.initialValues?.username ?? identity.username,\n      company: identity.company,\n      ssn: identity.ssn,\n      passportNumber: identity.passportNumber,\n      licenseNumber: identity.licenseNumber,\n      email: identity.email,\n      phone: identity.phone,\n      address1: identity.address1,\n      address2: identity.address2,\n      address3: identity.address3,\n      city: identity.city,\n      state: identity.state,\n      postalCode: identity.postalCode,\n      country: identity.country,\n    });\n  }\n}\n","<bit-section [formGroup]=\"itemDetailsForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"itemDetails\" | i18n }}</h2>\n    <button\n      *ngIf=\"!config.hideIndividualVaultFields\"\n      slot=\"end\"\n      type=\"button\"\n      size=\"small\"\n      [bitIconButton]=\"favoriteIcon\"\n      role=\"checkbox\"\n      [attr.aria-checked]=\"itemDetailsForm.value.favorite\"\n      [appA11yTitle]=\"'favorite' | i18n\"\n      (click)=\"toggleFavorite()\"\n    ></button>\n  </bit-section-header>\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"itemName\" | i18n }}</bit-label>\n      <input bitInput formControlName=\"name\" />\n    </bit-form-field>\n    <div class=\"tw-grid tw-grid-cols-2 tw-gap-1\">\n      <bit-form-field\n        *ngIf=\"showOwnership\"\n        [disableMargin]=\"!showCollectionsControl\"\n        [class.tw-col-span-2]=\"config.hideIndividualVaultFields\"\n      >\n        <bit-label>{{ \"owner\" | i18n }}</bit-label>\n        <bit-select formControlName=\"organizationId\">\n          <bit-option\n            *ngIf=\"showPersonalOwnerOption\"\n            [value]=\"null\"\n            [label]=\"userEmail$ | async\"\n          ></bit-option>\n          <bit-option\n            *ngFor=\"let org of config.organizations\"\n            [value]=\"org.id\"\n            [label]=\"org.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n      <bit-form-field\n        [class.tw-col-span-2]=\"!showOwnership\"\n        [disableMargin]=\"!showCollectionsControl\"\n        *ngIf=\"!config.hideIndividualVaultFields\"\n      >\n        <bit-label>{{ \"folder\" | i18n }}</bit-label>\n        <bit-select formControlName=\"folderId\">\n          <bit-option\n            *ngFor=\"let folder of config.folders\"\n            [value]=\"folder.id\"\n            [label]=\"folder.name\"\n          ></bit-option>\n        </bit-select>\n      </bit-form-field>\n    </div>\n    <ng-container *ngIf=\"showCollectionsControl\">\n      <bit-form-field class=\"tw-w-full\" disableMargin>\n        <bit-label>{{ \"collections\" | i18n }}</bit-label>\n        <bit-multi-select\n          class=\"tw-w-full\"\n          formControlName=\"collectionIds\"\n          [baseItems]=\"collectionOptions\"\n        ></bit-multi-select>\n        <bit-hint *ngIf=\"readOnlyCollections.length > 0\" data-testid=\"view-only-hint\">\n          {{ \"cannotRemoveViewOnlyCollections\" | i18n: readOnlyCollections.join(\", \") }}\n        </bit-hint>\n      </bit-form-field>\n    </ng-container>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule, NgClass } from \"@angular/common\";\nimport { Component, DestroyRef, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, FormControl, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { concatMap, map } from \"rxjs\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CollectionId, OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectItemView,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport {\n  CipherFormConfig,\n  OptionalInitialValues,\n} from \"../../abstractions/cipher-form-config.service\";\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\n@Component({\n  selector: \"vault-item-details-section\",\n  templateUrl: \"./item-details-section.component.html\",\n  standalone: true,\n  imports: [\n    CardComponent,\n    SectionComponent,\n    TypographyModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SelectModule,\n    SectionHeaderComponent,\n    IconButtonModule,\n    NgClass,\n    JslibModule,\n    CommonModule,\n  ],\n})\nexport class ItemDetailsSectionComponent implements OnInit {\n  itemDetailsForm = this.formBuilder.group({\n    name: [\"\", [Validators.required]],\n    organizationId: [null],\n    folderId: [null],\n    collectionIds: new FormControl([], [Validators.required]),\n    favorite: [false],\n  });\n\n  /**\n   * Collection options available for the selected organization.\n   * @protected\n   */\n  protected collectionOptions: SelectItemView[] = [];\n\n  /**\n   * Collections that are already assigned to the cipher and are read-only. These cannot be removed.\n   * @protected\n   */\n  protected readOnlyCollections: string[] = [];\n\n  protected showCollectionsControl: boolean;\n\n  /** The email address associated with the active account */\n  protected userEmail$ = this.accountService.activeAccount$.pipe(map((account) => account.email));\n\n  @Input({ required: true })\n  config: CipherFormConfig;\n\n  @Input()\n  originalCipherView: CipherView;\n  /**\n   * Whether the form is in partial edit mode. Only the folder and favorite controls are available.\n   */\n  get partialEdit(): boolean {\n    return this.config.mode === \"partial-edit\";\n  }\n\n  get organizations(): Organization[] {\n    return this.config.organizations;\n  }\n\n  get allowPersonalOwnership() {\n    return this.config.allowPersonalOwnership;\n  }\n\n  get collections(): CollectionView[] {\n    return this.config.collections;\n  }\n\n  get initialValues(): OptionalInitialValues | undefined {\n    return this.config.initialValues;\n  }\n\n  /**\n   * Show the personal ownership option in the Owner dropdown when:\n   * - Personal ownership is allowed\n   * - The `organizationId` control is disabled. This avoids the scenario\n   * where a the dropdown is empty because the user personally owns the cipher\n   * but cannot edit the ownership.\n   */\n  get showPersonalOwnerOption() {\n    return this.allowPersonalOwnership || !this.itemDetailsForm.controls.organizationId.enabled;\n  }\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private destroyRef: DestroyRef,\n    private accountService: AccountService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"itemDetails\", this.itemDetailsForm);\n    this.itemDetailsForm.valueChanges\n      .pipe(\n        takeUntilDestroyed(),\n        // getRawValue() because organizationId can be disabled for edit mode\n        map(() => this.itemDetailsForm.getRawValue()),\n      )\n      .subscribe((value) => {\n        this.cipherFormContainer.patchCipher((cipher) => {\n          Object.assign(cipher, {\n            name: value.name,\n            organizationId: value.organizationId,\n            folderId: value.folderId,\n            collectionIds: value.collectionIds?.map((c) => c.id) || [],\n            favorite: value.favorite,\n          } as CipherView);\n          return cipher;\n        });\n      });\n  }\n\n  get favoriteIcon() {\n    return this.itemDetailsForm.controls.favorite.value ? \"bwi-star-f\" : \"bwi-star\";\n  }\n\n  toggleFavorite() {\n    this.itemDetailsForm.controls.favorite.setValue(!this.itemDetailsForm.controls.favorite.value);\n  }\n\n  get allowOwnershipChange() {\n    // Do not allow ownership change in edit mode.\n    if (this.config.mode === \"edit\") {\n      return false;\n    }\n\n    // If personal ownership is allowed and there is at least one organization, allow ownership change.\n    if (this.allowPersonalOwnership) {\n      return this.organizations.length > 0;\n    }\n\n    // Personal ownership is not allowed, only allow ownership change if there is more than one organization.\n    return this.organizations.length > 1;\n  }\n\n  get showOwnership() {\n    // Show ownership field when editing with available orgs\n    const isEditingWithOrgs = this.organizations.length > 0 && this.config.mode === \"edit\";\n\n    // When in admin console, ownership should not be shown unless cloning\n    const isAdminConsoleEdit = this.config.isAdminConsole && this.config.mode !== \"clone\";\n\n    return this.allowOwnershipChange || (isEditingWithOrgs && !isAdminConsoleEdit);\n  }\n\n  get defaultOwner() {\n    return this.allowPersonalOwnership ? null : this.organizations[0].id;\n  }\n\n  async ngOnInit() {\n    if (!this.allowPersonalOwnership && this.organizations.length === 0) {\n      throw new Error(\"No organizations available for ownership.\");\n    }\n\n    if (this.originalCipherView) {\n      await this.initFromExistingCipher();\n    } else {\n      this.itemDetailsForm.setValue({\n        name: this.initialValues?.name || \"\",\n        organizationId: this.initialValues?.organizationId || this.defaultOwner,\n        folderId: this.initialValues?.folderId || null,\n        collectionIds: [],\n        favorite: false,\n      });\n      await this.updateCollectionOptions(this.initialValues?.collectionIds || []);\n    }\n\n    if (!this.allowOwnershipChange) {\n      this.itemDetailsForm.controls.organizationId.disable();\n    }\n\n    this.itemDetailsForm.controls.organizationId.valueChanges\n      .pipe(\n        takeUntilDestroyed(this.destroyRef),\n        concatMap(async () => {\n          await this.updateCollectionOptions();\n        }),\n      )\n      .subscribe();\n  }\n\n  private async initFromExistingCipher() {\n    this.itemDetailsForm.setValue({\n      name: this.initialValues?.name ?? this.originalCipherView.name,\n      organizationId: this.originalCipherView.organizationId, // We do not allow changing ownership of an existing cipher.\n      folderId: this.initialValues?.folderId ?? this.originalCipherView.folderId,\n      collectionIds: [],\n      favorite: this.originalCipherView.favorite,\n    });\n\n    // Configure form for clone mode.\n    if (this.config.mode === \"clone\") {\n      this.itemDetailsForm.controls.name.setValue(\n        this.originalCipherView.name + \" - \" + this.i18nService.t(\"clone\"),\n      );\n\n      if (!this.allowPersonalOwnership && this.originalCipherView.organizationId == null) {\n        this.itemDetailsForm.controls.organizationId.setValue(this.defaultOwner);\n      }\n    }\n\n    await this.updateCollectionOptions(\n      this.initialValues?.collectionIds ??\n        (this.originalCipherView.collectionIds as CollectionId[]),\n    );\n\n    if (this.partialEdit) {\n      this.itemDetailsForm.disable();\n      this.itemDetailsForm.controls.favorite.enable();\n      this.itemDetailsForm.controls.folderId.enable();\n    } else if (this.config.mode === \"edit\") {\n      this.readOnlyCollections = this.collections\n        .filter(\n          // When the configuration is set up for admins, they can alter read only collections\n          (c) =>\n            c.readOnly &&\n            !this.config.admin &&\n            this.originalCipherView.collectionIds.includes(c.id as CollectionId),\n        )\n        .map((c) => c.name);\n    }\n  }\n\n  /**\n   * Updates the collection options based on the selected organization.\n   * @param startingSelection - Optional starting selection of collectionIds to be automatically selected.\n   * @private\n   */\n  private async updateCollectionOptions(startingSelection: CollectionId[] = []) {\n    const orgId = this.itemDetailsForm.controls.organizationId.value as OrganizationId;\n    const collectionsControl = this.itemDetailsForm.controls.collectionIds;\n\n    // No organization selected, disable/hide the collections control.\n    if (orgId == null) {\n      this.collectionOptions = [];\n      collectionsControl.reset();\n      collectionsControl.disable();\n      this.showCollectionsControl = false;\n      return;\n    } else {\n      collectionsControl.enable();\n      this.showCollectionsControl = true;\n    }\n\n    this.collectionOptions = this.collections\n      .filter((c) => {\n        // The collection belongs to the organization\n        if (c.organizationId !== orgId) {\n          return false;\n        }\n\n        // When in partial edit mode, show all org collections because the control is disabled.\n        if (this.partialEdit) {\n          return true;\n        }\n\n        // When viewing as an admin, all collections should be shown, even readonly. (AC Only)\n        if (this.config.admin) {\n          return true;\n        }\n\n        // Non-admins can only select assigned collections that are not read only. (Non-AC)\n        return c.assigned && !c.readOnly;\n      })\n      .map((c) => ({\n        id: c.id,\n        name: c.name,\n        listName: c.name,\n        labelName: c.name,\n      }));\n\n    collectionsControl.reset();\n    collectionsControl.enable();\n    this.showCollectionsControl = true;\n\n    // If there is only one collection, select it by default.\n    if (this.collectionOptions.length === 1) {\n      collectionsControl.setValue(this.collectionOptions);\n      return;\n    }\n\n    if (startingSelection.length > 0) {\n      collectionsControl.setValue(\n        this.collectionOptions.filter((c) => startingSelection.includes(c.id as CollectionId)),\n      );\n    }\n  }\n}\n","<ng-container [formGroup]=\"uriForm\">\n  <bit-form-field [class.!tw-mb-1]=\"showMatchDetection\">\n    <bit-label>{{ uriLabel }}</bit-label>\n    <input bitInput formControlName=\"uri\" #uriInput />\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-cog\"\n      bitSuffix\n      [appA11yTitle]=\"toggleTitle\"\n      (click)=\"toggleMatchDetection()\"\n      data-testid=\"toggle-match-detection-button\"\n    ></button>\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-minus-circle\"\n      buttonType=\"danger\"\n      bitSuffix\n      [appA11yTitle]=\"'deleteWebsite' | i18n\"\n      *ngIf=\"canRemove\"\n      (click)=\"removeUri()\"\n      data-testid=\"remove-uri-button\"\n    ></button>\n  </bit-form-field>\n\n  <bit-form-field *ngIf=\"showMatchDetection\" class=\"!tw-mb-5\">\n    <bit-label>{{ \"matchDetection\" | i18n }}</bit-label>\n    <bit-select formControlName=\"matchDetection\" #matchDetectionSelect>\n      <bit-option\n        *ngFor=\"let o of uriMatchOptions\"\n        [label]=\"o.label\"\n        [value]=\"o.value\"\n      ></bit-option>\n    </bit-select>\n  </bit-form-field>\n</ng-container>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgForOf, NgIf } from \"@angular/common\";\nimport {\n  Component,\n  ElementRef,\n  EventEmitter,\n  forwardRef,\n  Input,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport {\n  ControlValueAccessor,\n  FormBuilder,\n  NG_VALUE_ACCESSOR,\n  ReactiveFormsModule,\n} from \"@angular/forms\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  UriMatchStrategy,\n  UriMatchStrategySetting,\n} from \"@bitwarden/common/models/domain/domain-service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport {\n  FormFieldModule,\n  IconButtonModule,\n  SelectComponent,\n  SelectModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  selector: \"vault-autofill-uri-option\",\n  templateUrl: \"./uri-option.component.html\",\n  standalone: true,\n  providers: [\n    {\n      provide: NG_VALUE_ACCESSOR,\n      useExisting: forwardRef(() => UriOptionComponent),\n      multi: true,\n    },\n  ],\n  imports: [\n    FormFieldModule,\n    ReactiveFormsModule,\n    IconButtonModule,\n    JslibModule,\n    SelectModule,\n    NgForOf,\n    NgIf,\n  ],\n})\nexport class UriOptionComponent implements ControlValueAccessor {\n  @ViewChild(\"uriInput\")\n  private inputElement: ElementRef<HTMLInputElement>;\n\n  @ViewChild(\"matchDetectionSelect\")\n  private matchDetectionSelect: SelectComponent<UriMatchStrategySetting>;\n\n  protected uriForm = this.formBuilder.group({\n    uri: [null as string],\n    matchDetection: [null as UriMatchStrategySetting],\n  });\n\n  protected uriMatchOptions: { label: string; value: UriMatchStrategySetting }[] = [\n    { label: this.i18nService.t(\"default\"), value: null },\n    { label: this.i18nService.t(\"baseDomain\"), value: UriMatchStrategy.Domain },\n    { label: this.i18nService.t(\"host\"), value: UriMatchStrategy.Host },\n    { label: this.i18nService.t(\"startsWith\"), value: UriMatchStrategy.StartsWith },\n    { label: this.i18nService.t(\"regEx\"), value: UriMatchStrategy.RegularExpression },\n    { label: this.i18nService.t(\"exact\"), value: UriMatchStrategy.Exact },\n    { label: this.i18nService.t(\"never\"), value: UriMatchStrategy.Never },\n  ];\n\n  /**\n   * Whether the URI can be removed from the form. If false, the remove button will be hidden.\n   */\n  @Input({ required: true })\n  canRemove: boolean;\n\n  /**\n   * The user's current default match detection strategy. Will be displayed in () after \"Default\"\n   */\n  @Input({ required: true })\n  set defaultMatchDetection(value: UriMatchStrategySetting) {\n    // The default selection has a value of `null` avoid showing \"Default (Default)\"\n    if (value === null) {\n      return;\n    }\n\n    this.uriMatchOptions[0].label = this.i18nService.t(\n      \"defaultLabel\",\n      this.uriMatchOptions.find((o) => o.value === value)?.label,\n    );\n  }\n\n  /**\n   * The index of the URI in the form. Used to render the correct label.\n   */\n  @Input({ required: true }) index: number;\n\n  /**\n   * Emits when the remove button is clicked and URI should be removed from the form.\n   */\n  @Output()\n  remove = new EventEmitter<void>();\n\n  protected showMatchDetection = false;\n\n  protected toggleMatchDetection() {\n    this.showMatchDetection = !this.showMatchDetection;\n    if (this.showMatchDetection) {\n      setTimeout(() => this.matchDetectionSelect?.select?.focus(), 0);\n    }\n  }\n\n  protected get uriLabel() {\n    return this.index === 0\n      ? this.i18nService.t(\"websiteUri\")\n      : this.i18nService.t(\"websiteUriCount\", this.index + 1);\n  }\n\n  protected get toggleTitle() {\n    return this.showMatchDetection\n      ? this.i18nService.t(\"hideMatchDetection\", this.uriForm.value.uri)\n      : this.i18nService.t(\"showMatchDetection\", this.uriForm.value.uri);\n  }\n\n  // NG_VALUE_ACCESSOR implementation\n  private onChange: any = () => {};\n  private onTouched: any = () => {};\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n  ) {\n    this.uriForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.onChange(value);\n    });\n\n    this.uriForm.statusChanges.pipe(takeUntilDestroyed()).subscribe(() => {\n      this.onTouched();\n    });\n  }\n\n  focusInput() {\n    if (this.inputElement?.nativeElement) {\n      this.inputElement.nativeElement.focus();\n    }\n  }\n\n  removeUri() {\n    this.remove.emit();\n  }\n\n  // NG_VALUE_ACCESSOR implementation\n  writeValue(value: { uri: string; matchDetection: UriMatchStrategySetting | null }): void {\n    if (value) {\n      this.uriForm.setValue(\n        {\n          uri: value.uri ?? \"\",\n          matchDetection: value.matchDetection ?? null,\n        },\n        { emitEvent: false },\n      );\n    }\n  }\n\n  registerOnChange(fn: () => void): void {\n    this.onChange = fn;\n  }\n\n  registerOnTouched(fn: any): void {\n    this.onTouched = fn;\n  }\n\n  setDisabledState?(isDisabled: boolean): void {\n    isDisabled ? this.uriForm.disable() : this.uriForm.enable();\n  }\n}\n","<bit-section [formGroup]=\"autofillOptionsForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">\n      {{ \"autofillOptions\" | i18n }}\n    </h2>\n  </bit-section-header>\n\n  <bit-card>\n    <ng-container formArrayName=\"uris\">\n      <vault-autofill-uri-option\n        *ngFor=\"let uri of uriControls; let i = index\"\n        [formControlName]=\"i\"\n        (remove)=\"removeUri(i)\"\n        [canRemove]=\"uriControls.length > 1\"\n        [defaultMatchDetection]=\"defaultMatchDetection$ | async\"\n        [index]=\"i\"\n      ></vault-autofill-uri-option>\n    </ng-container>\n\n    <button\n      type=\"button\"\n      bitLink\n      linkType=\"primary\"\n      [class.tw-mb-6]=\"autofillOnPageLoadEnabled$ | async\"\n      (click)=\"addUri({ uri: null, matchDetection: null }, true)\"\n      *ngIf=\"autofillOptionsForm.enabled\"\n    >\n      <i class=\"bwi bwi-plus tw-font-bold\" aria-hidden=\"true\"></i>\n      {{ \"addWebsite\" | i18n }}\n    </button>\n\n    <bit-form-field *ngIf=\"autofillOnPageLoadEnabled$ | async\" disableMargin>\n      <bit-label>{{ \"autoFillOnPageLoad\" | i18n }}</bit-label>\n      <bit-select formControlName=\"autofillOnPageLoad\" [items]=\"autofillOptions\"></bit-select>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { LiveAnnouncer } from \"@angular/cdk/a11y\";\nimport { AsyncPipe, NgForOf, NgIf } from \"@angular/common\";\nimport { Component, OnInit, QueryList, ViewChildren } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { filter, Subject, switchMap, take } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AutofillSettingsServiceAbstraction } from \"@bitwarden/common/autofill/services/autofill-settings.service\";\nimport { DomainSettingsService } from \"@bitwarden/common/autofill/services/domain-settings.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { UriMatchStrategySetting } from \"@bitwarden/common/models/domain/domain-service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { LoginUriView } from \"@bitwarden/common/vault/models/view/login-uri.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  LinkModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\nimport { UriOptionComponent } from \"./uri-option.component\";\n\ninterface UriField {\n  uri: string;\n  matchDetection: UriMatchStrategySetting;\n}\n\n@Component({\n  selector: \"vault-autofill-options\",\n  templateUrl: \"./autofill-options.component.html\",\n  standalone: true,\n  imports: [\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    JslibModule,\n    CardComponent,\n    ReactiveFormsModule,\n    NgForOf,\n    FormFieldModule,\n    SelectModule,\n    IconButtonModule,\n    UriOptionComponent,\n    LinkModule,\n    NgIf,\n    AsyncPipe,\n  ],\n})\nexport class AutofillOptionsComponent implements OnInit {\n  /**\n   * List of rendered UriOptionComponents. Used for focusing newly added Uri inputs.\n   */\n  @ViewChildren(UriOptionComponent)\n  protected uriOptions: QueryList<UriOptionComponent>;\n\n  autofillOptionsForm = this.formBuilder.group({\n    uris: this.formBuilder.array<UriField>([]),\n    autofillOnPageLoad: [null as boolean],\n  });\n\n  protected get uriControls() {\n    return this.autofillOptionsForm.controls.uris.controls;\n  }\n\n  protected defaultMatchDetection$ = this.domainSettingsService.defaultUriMatchStrategy$.pipe(\n    // The default match detection should only be shown when used on the browser\n    filter(() => this.platformUtilsService.getClientType() == ClientType.Browser),\n  );\n  protected autofillOnPageLoadEnabled$ = this.autofillSettingsService.autofillOnPageLoad$;\n\n  protected autofillOptions: { label: string; value: boolean | null }[] = [\n    { label: this.i18nService.t(\"default\"), value: null },\n    { label: this.i18nService.t(\"yes\"), value: true },\n    { label: this.i18nService.t(\"no\"), value: false },\n  ];\n\n  /**\n   * Emits when a new URI input is added to the form and should be focused.\n   */\n  private focusOnNewInput$ = new Subject<void>();\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private liveAnnouncer: LiveAnnouncer,\n    private domainSettingsService: DomainSettingsService,\n    private autofillSettingsService: AutofillSettingsServiceAbstraction,\n    private platformUtilsService: PlatformUtilsService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"autoFillOptions\", this.autofillOptionsForm);\n\n    this.autofillOptionsForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      this.cipherFormContainer.patchCipher((cipher) => {\n        cipher.login.uris = value.uris.map((uri: UriField) =>\n          Object.assign(new LoginUriView(), {\n            uri: uri.uri,\n            match: uri.matchDetection,\n          } as LoginUriView),\n        );\n        cipher.login.autofillOnPageLoad = value.autofillOnPageLoad;\n        return cipher;\n      });\n    });\n\n    this.updateDefaultAutofillLabel();\n\n    this.focusOnNewInput$\n      .pipe(\n        takeUntilDestroyed(),\n        // Wait for the new URI input to be added to the DOM\n        switchMap(() => this.uriOptions.changes.pipe(take(1))),\n        // Announce the new URI input before focusing it\n        switchMap(() => this.liveAnnouncer.announce(this.i18nService.t(\"websiteAdded\"), \"polite\")),\n      )\n      .subscribe(() => {\n        this.uriOptions?.last?.focusInput();\n      });\n  }\n\n  ngOnInit() {\n    if (this.cipherFormContainer.originalCipherView?.login) {\n      this.initFromExistingCipher(this.cipherFormContainer.originalCipherView.login);\n    } else {\n      this.initNewCipher();\n    }\n\n    if (this.cipherFormContainer.config.mode === \"partial-edit\") {\n      this.autofillOptionsForm.disable();\n    }\n  }\n\n  private initFromExistingCipher(existingLogin: LoginView) {\n    existingLogin.uris?.forEach((uri) => {\n      this.addUri({\n        uri: uri.uri,\n        matchDetection: uri.match,\n      });\n    });\n    this.autofillOptionsForm.patchValue({\n      autofillOnPageLoad: existingLogin.autofillOnPageLoad,\n    });\n\n    if (this.cipherFormContainer.config.initialValues?.loginUri) {\n      // Avoid adding the same uri again if it already exists\n      if (\n        existingLogin.uris?.findIndex(\n          (uri) => uri.uri === this.cipherFormContainer.config.initialValues.loginUri,\n        ) === -1\n      ) {\n        this.addUri({\n          uri: this.cipherFormContainer.config.initialValues.loginUri,\n          matchDetection: null,\n        });\n      }\n    }\n  }\n\n  private initNewCipher() {\n    this.addUri({\n      uri: this.cipherFormContainer.config.initialValues?.loginUri ?? null,\n      matchDetection: null,\n    });\n    this.autofillOptionsForm.patchValue({\n      autofillOnPageLoad: null,\n    });\n  }\n\n  private updateDefaultAutofillLabel() {\n    this.autofillSettingsService.autofillOnPageLoadDefault$\n      .pipe(takeUntilDestroyed())\n      .subscribe((value: boolean) => {\n        const defaultOption = this.autofillOptions.find((o) => o.value === value);\n\n        if (!defaultOption) {\n          return;\n        }\n\n        this.autofillOptions[0].label = this.i18nService.t(\"defaultLabel\", defaultOption.label);\n        // Trigger change detection to update the label in the template\n        this.autofillOptions = [...this.autofillOptions];\n      });\n  }\n\n  /**\n   * Adds a new URI input to the form.\n   * @param uriFieldValue The initial value for the new URI input.\n   * @param focusNewInput If true, the new URI input will be focused after being added.\n   */\n  addUri(uriFieldValue: UriField = { uri: null, matchDetection: null }, focusNewInput = false) {\n    this.autofillOptionsForm.controls.uris.push(this.formBuilder.control(uriFieldValue));\n\n    if (focusNewInput) {\n      this.focusOnNewInput$.next();\n    }\n  }\n\n  removeUri(i: number) {\n    this.autofillOptionsForm.controls.uris.removeAt(i);\n  }\n}\n","/**\n * Service to capture TOTP secret from a client application.\n */\nexport abstract class TotpCaptureService {\n  /**\n   * Captures a TOTP secret and returns it as a string. Returns null if no TOTP secret was found.\n   */\n  abstract captureTotpSecret(): Promise<string | null>;\n  /**\n   * Returns whether the TOTP secret can be captured from the current tab.\n   * Only available in the browser extension and when not in a popout window.\n   */\n  abstract canCaptureTotp(window: Window): boolean;\n}\n","<bit-section [formGroup]=\"loginDetailsForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">\n      {{ \"loginCredentials\" | i18n }}\n    </h2>\n  </bit-section-header>\n\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"username\" | i18n }}</bit-label>\n      <input bitInput formControlName=\"username\" />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-generate\"\n        bitSuffix\n        *ngIf=\"loginDetailsForm.controls.username.enabled\"\n        data-testid=\"generate-username-button\"\n        [appA11yTitle]=\"'generateUsername' | i18n\"\n        [bitAction]=\"generateUsername\"\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"password\" | i18n }}</bit-label>\n      <input bitInput formControlName=\"password\" type=\"password\" class=\"tw-font-mono\" />\n      <bit-hint *ngIf=\"loginDetailsForm.controls.password.enabled\">\n        <ng-container *ngIf=\"newPasswordGenerated\">\n          {{ \"securePasswordGenerated\" | i18n }}\n        </ng-container>\n        <ng-container *ngIf=\"!newPasswordGenerated\">\n          <span class=\"tw-sr-only\">\n            {{ \"useGeneratorHelpTextPartOne\" | i18n }} {{ \"useGeneratorHelpTextPartTwo\" | i18n }}\n          </span>\n          <span aria-hidden=\"true\">\n            {{ \"useGeneratorHelpTextPartOne\" | i18n }}\n            <i class=\"bwi bwi-generate\" aria-hidden=\"true\"></i>\n            {{ \"useGeneratorHelpTextPartTwo\" | i18n }}\n          </span>\n        </ng-container>\n      </bit-hint>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-check-circle\"\n        bitSuffix\n        *ngIf=\"\n          loginDetailsForm.controls.password.enabled &&\n          loginDetailsForm.controls.password.value?.length > 0\n        \"\n        data-testid=\"check-password-button\"\n        [appA11yTitle]=\"'checkPassword' | i18n\"\n        [bitAction]=\"checkPassword\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        *ngIf=\"viewHiddenFields\"\n        data-testid=\"toggle-password-visibility\"\n        bitPasswordInputToggle\n        (toggledChange)=\"logVisibleEvent($event, EventType.Cipher_ClientToggledPasswordVisible)\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-generate\"\n        bitSuffix\n        *ngIf=\"loginDetailsForm.controls.password.enabled\"\n        data-testid=\"generate-password-button\"\n        [appA11yTitle]=\"'generatePassword' | i18n\"\n        [bitAction]=\"generatePassword\"\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field *ngIf=\"hasPasskey\">\n      <bit-label>{{ \"typePasskey\" | i18n }}</bit-label>\n      <input\n        bitInput\n        disabled\n        [value]=\"fido2CredentialCreationDateValue\"\n        data-testid=\"passkey-field\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-minus-circle\"\n        buttonType=\"danger\"\n        bitSuffix\n        *ngIf=\"loginDetailsForm.enabled && viewHiddenFields\"\n        [bitAction]=\"removePasskey\"\n        data-testid=\"remove-passkey-button\"\n        [appA11yTitle]=\"'removePasskey' | i18n\"\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field disableMargin>\n      <bit-label>\n        {{ \"authenticatorKey\" | i18n }}\n        <button\n          bitLink\n          type=\"button\"\n          [bitPopoverTriggerFor]=\"totpPopover\"\n          [appA11yTitle]=\"'learnMoreAboutAuthenticators' | i18n\"\n          slot=\"end\"\n        >\n          <i class=\"bwi bwi-sm bwi-question-circle\" aria-hidden=\"true\"></i>\n        </button>\n        <bit-popover #totpPopover [title]=\"'totpHelperTitle' | i18n\">\n          <p>{{ (canCaptureTotp ? \"totpHelperWithCapture\" : \"totpHelper\") | i18n }}</p>\n        </bit-popover>\n      </bit-label>\n      <input bitInput formControlName=\"totp\" type=\"password\" class=\"tw-font-mono\" />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        *ngIf=\"viewHiddenFields\"\n        data-testid=\"toggle-totp-visibility\"\n        bitPasswordInputToggle\n        (toggledChange)=\"logVisibleEvent($event, EventType.Cipher_ClientToggledTOTPSeedVisible)\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-camera\"\n        bitSuffix\n        *ngIf=\"canCaptureTotp\"\n        data-testid=\"capture-totp-button\"\n        [bitAction]=\"captureTotp\"\n        [appA11yTitle]=\"'totpCapture' | i18n\"\n      ></button>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n\n<vault-autofill-options></vault-autofill-options>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { DatePipe, NgIf } from \"@angular/common\";\nimport { Component, inject, OnInit, Optional } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AuditService } from \"@bitwarden/common/abstractions/audit.service\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { Fido2CredentialView } from \"@bitwarden/common/vault/models/view/fido2-credential.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport {\n  AsyncActionsModule,\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  LinkModule,\n  PopoverModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormGenerationService } from \"../../abstractions/cipher-form-generation.service\";\nimport { TotpCaptureService } from \"../../abstractions/totp-capture.service\";\nimport { CipherFormContainer } from \"../../cipher-form-container\";\nimport { AutofillOptionsComponent } from \"../autofill-options/autofill-options.component\";\n\n@Component({\n  selector: \"vault-login-details-section\",\n  templateUrl: \"./login-details-section.component.html\",\n  standalone: true,\n  imports: [\n    SectionComponent,\n    ReactiveFormsModule,\n    SectionHeaderComponent,\n    TypographyModule,\n    JslibModule,\n    CardComponent,\n    FormFieldModule,\n    IconButtonModule,\n    AsyncActionsModule,\n    NgIf,\n    PopoverModule,\n    AutofillOptionsComponent,\n    LinkModule,\n  ],\n})\nexport class LoginDetailsSectionComponent implements OnInit {\n  EventType = EventType;\n  loginDetailsForm = this.formBuilder.group({\n    username: [\"\"],\n    password: [\"\"],\n    totp: [\"\"],\n  });\n\n  /**\n   * Flag indicating whether a new password has been generated for the current form.\n   */\n  newPasswordGenerated: boolean;\n\n  /**\n   * Whether the TOTP field can be captured from the current tab. Only available in the browser extension and\n   * when not in a popout window.\n   */\n  get canCaptureTotp() {\n    return (\n      !!this.totpCaptureService?.canCaptureTotp(window) &&\n      this.loginDetailsForm.controls.totp.enabled\n    );\n  }\n\n  private datePipe = inject(DatePipe);\n\n  /**\n   * A local reference to the Fido2 credentials for an existing login being edited.\n   * These cannot be created in the form and thus have no form control.\n   * @private\n   */\n  private existingFido2Credentials?: Fido2CredentialView[];\n\n  get hasPasskey(): boolean {\n    return this.existingFido2Credentials != null && this.existingFido2Credentials.length > 0;\n  }\n\n  get fido2CredentialCreationDateValue(): string {\n    const dateCreated = this.i18nService.t(\"dateCreated\");\n    const creationDate = this.datePipe.transform(\n      this.existingFido2Credentials?.[0]?.creationDate,\n      \"short\",\n    );\n    return `${dateCreated} ${creationDate}`;\n  }\n\n  get viewHiddenFields() {\n    if (this.cipherFormContainer.originalCipherView) {\n      return this.cipherFormContainer.originalCipherView.viewPassword;\n    }\n    return true;\n  }\n\n  get initialValues() {\n    return this.cipherFormContainer.config.initialValues;\n  }\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private generationService: CipherFormGenerationService,\n    private auditService: AuditService,\n    private toastService: ToastService,\n    private eventCollectionService: EventCollectionService,\n    @Optional() private totpCaptureService?: TotpCaptureService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"loginDetails\", this.loginDetailsForm);\n\n    this.loginDetailsForm.valueChanges\n      .pipe(\n        takeUntilDestroyed(),\n        // getRawValue() is used as fields can be disabled when passwords are hidden\n        map(() => this.loginDetailsForm.getRawValue()),\n      )\n      .subscribe((value) => {\n        this.cipherFormContainer.patchCipher((cipher) => {\n          Object.assign(cipher.login, {\n            username: value.username,\n            password: value.password,\n            totp: value.totp?.trim(),\n          } as LoginView);\n\n          return cipher;\n        });\n      });\n  }\n\n  async ngOnInit() {\n    if (this.cipherFormContainer.originalCipherView?.login) {\n      this.initFromExistingCipher(this.cipherFormContainer.originalCipherView.login);\n    } else {\n      await this.initNewCipher();\n    }\n\n    if (this.cipherFormContainer.config.mode === \"partial-edit\") {\n      this.loginDetailsForm.disable();\n    }\n  }\n\n  private initFromExistingCipher(existingLogin: LoginView) {\n    this.loginDetailsForm.patchValue({\n      username: this.initialValues?.username ?? existingLogin.username,\n      password: this.initialValues?.password ?? existingLogin.password,\n      totp: existingLogin.totp,\n    });\n\n    this.existingFido2Credentials = existingLogin.fido2Credentials;\n\n    if (!this.viewHiddenFields) {\n      this.loginDetailsForm.controls.password.disable();\n      this.loginDetailsForm.controls.totp.disable();\n    }\n  }\n\n  private async initNewCipher() {\n    this.loginDetailsForm.patchValue({\n      username: this.initialValues?.username || \"\",\n      password: this.initialValues?.password || \"\",\n    });\n  }\n\n  /** Logs the givin event when in edit mode */\n  logVisibleEvent = async (passwordVisible: boolean, event: EventType) => {\n    const { mode, originalCipher } = this.cipherFormContainer.config;\n\n    const isEdit = [\"edit\", \"partial-edit\"].includes(mode);\n\n    if (!passwordVisible || !isEdit || !originalCipher) {\n      return;\n    }\n\n    await this.eventCollectionService.collect(\n      event,\n      originalCipher.id,\n      false,\n      originalCipher.organizationId,\n    );\n  };\n\n  captureTotp = async () => {\n    if (!this.canCaptureTotp) {\n      return;\n    }\n    try {\n      const totp = await this.totpCaptureService.captureTotpSecret();\n      if (totp) {\n        this.loginDetailsForm.controls.totp.patchValue(totp);\n        this.toastService.showToast({\n          variant: \"success\",\n          title: null,\n          message: this.i18nService.t(\"totpCaptureSuccess\"),\n        });\n      }\n    } catch {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"totpCaptureError\"),\n      });\n    }\n  };\n\n  removePasskey = async () => {\n    // Fido2Credentials do not have a form control, so update directly\n    this.existingFido2Credentials = null;\n    this.cipherFormContainer.patchCipher((cipher) => {\n      cipher.login.fido2Credentials = null;\n      return cipher;\n    });\n  };\n\n  /**\n   * Generate a new password and update the form.\n   * TODO: Browser extension needs a means to cache the current form so values are not lost upon navigating to the generator.\n   */\n  generatePassword = async () => {\n    const newPassword = await this.generationService.generatePassword();\n\n    if (newPassword) {\n      this.loginDetailsForm.controls.password.patchValue(newPassword);\n      this.newPasswordGenerated = true;\n    }\n  };\n\n  /**\n   * Generate a new username and update the form.\n   * TODO: Browser extension needs a means to cache the current form so values are not lost upon navigating to the generator.\n   */\n  generateUsername = async () => {\n    const newUsername = await this.generationService.generateUsername();\n    if (newUsername) {\n      this.loginDetailsForm.controls.username.patchValue(newUsername);\n    }\n  };\n\n  /**\n   * Checks if the password has been exposed in a data breach using the AuditService.\n   */\n  checkPassword = async () => {\n    const password = this.loginDetailsForm.controls.password.value;\n\n    if (password == null || password === \"\") {\n      return;\n    }\n\n    const matches = await this.auditService.passwordLeaked(password);\n\n    if (matches > 0) {\n      this.toastService.showToast({\n        variant: \"warning\",\n        title: null,\n        message: this.i18nService.t(\"passwordExposed\", matches.toString()),\n      });\n    } else {\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"passwordSafe\"),\n      });\n    }\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, ReactiveFormsModule } from \"@angular/forms\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { SdkService } from \"@bitwarden/common/platform/abstractions/sdk/sdk.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { SshKeyView } from \"@bitwarden/common/vault/models/view/ssh-key.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  SelectModule,\n  TypographyModule,\n} from \"@bitwarden/components\";\nimport { generate_ssh_key } from \"@bitwarden/sdk-internal\";\n\nimport { CipherFormContainer } from \"../../cipher-form-container\";\n\n@Component({\n  selector: \"vault-sshkey-section\",\n  templateUrl: \"./sshkey-section.component.html\",\n  standalone: true,\n  imports: [\n    CardComponent,\n    SectionComponent,\n    TypographyModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SelectModule,\n    SectionHeaderComponent,\n    IconButtonModule,\n    JslibModule,\n    CommonModule,\n  ],\n})\nexport class SshKeySectionComponent implements OnInit {\n  /** The original cipher */\n  @Input() originalCipherView: CipherView;\n\n  /** True when all fields should be disabled */\n  @Input() disabled: boolean;\n\n  /**\n   * All form fields associated with the ssh key\n   *\n   * Note: `as` is used to assert the type of the form control,\n   * leaving as just null gets inferred as `unknown`\n   */\n  sshKeyForm = this.formBuilder.group({\n    privateKey: [\"\"],\n    publicKey: [\"\"],\n    keyFingerprint: [\"\"],\n  });\n\n  constructor(\n    private cipherFormContainer: CipherFormContainer,\n    private formBuilder: FormBuilder,\n    private i18nService: I18nService,\n    private sdkService: SdkService,\n  ) {\n    this.cipherFormContainer.registerChildForm(\"sshKeyDetails\", this.sshKeyForm);\n    this.sshKeyForm.valueChanges.pipe(takeUntilDestroyed()).subscribe((value) => {\n      const data = new SshKeyView();\n      data.privateKey = value.privateKey;\n      data.publicKey = value.publicKey;\n      data.keyFingerprint = value.keyFingerprint;\n      this.cipherFormContainer.patchCipher((cipher) => {\n        cipher.sshKey = data;\n        return cipher;\n      });\n    });\n  }\n\n  async ngOnInit() {\n    if (this.originalCipherView?.sshKey) {\n      this.setInitialValues();\n    } else {\n      await this.generateSshKey();\n    }\n\n    this.sshKeyForm.disable();\n  }\n\n  /** Set form initial form values from the current cipher */\n  private setInitialValues() {\n    const { privateKey, publicKey, keyFingerprint } = this.originalCipherView.sshKey;\n\n    this.sshKeyForm.setValue({\n      privateKey,\n      publicKey,\n      keyFingerprint,\n    });\n  }\n\n  private async generateSshKey() {\n    await firstValueFrom(this.sdkService.client$);\n    const sshKey = generate_ssh_key(\"Ed25519\");\n    this.sshKeyForm.setValue({\n      privateKey: sshKey.private_key,\n      publicKey: sshKey.public_key,\n      keyFingerprint: sshKey.key_fingerprint,\n    });\n  }\n}\n","<bit-section [formGroup]=\"sshKeyForm\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">\n      {{ \"typeSshKey\" | i18n }}\n    </h2>\n  </bit-section-header>\n  <bit-card>\n    <bit-form-field>\n      <bit-label>{{ \"sshPrivateKey\" | i18n }}</bit-label>\n      <input id=\"privateKey\" bitInput formControlName=\"privateKey\" type=\"password\" />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        data-testid=\"toggle-privateKey-visibility\"\n        bitPasswordInputToggle\n      ></button>\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"sshPublicKey\" | i18n }}</bit-label>\n      <input id=\"publicKey\" bitInput formControlName=\"publicKey\" />\n    </bit-form-field>\n\n    <bit-form-field>\n      <bit-label>{{ \"sshFingerprint\" | i18n }}</bit-label>\n      <input id=\"keyFingerprint\" bitInput formControlName=\"keyFingerprint\" />\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","<form [id]=\"formId\" [formGroup]=\"cipherForm\" [bitSubmit]=\"submit\">\n  <!-- TODO: Should we show a loading spinner here? Or emit a ready event for the container to handle loading state -->\n  <ng-container *ngIf=\"!loading\">\n    <vault-item-details-section\n      [config]=\"config\"\n      [originalCipherView]=\"originalCipherView\"\n    ></vault-item-details-section>\n\n    <vault-login-details-section\n      *ngIf=\"config.cipherType === CipherType.Login\"\n    ></vault-login-details-section>\n\n    <vault-identity-section\n      *ngIf=\"config.cipherType === CipherType.Identity\"\n      [disabled]=\"config.mode === 'partial-edit'\"\n      [originalCipherView]=\"originalCipherView\"\n    ></vault-identity-section>\n\n    <vault-card-details-section\n      *ngIf=\"config.cipherType === CipherType.Card\"\n      [originalCipherView]=\"originalCipherView\"\n      [disabled]=\"config.mode === 'partial-edit'\"\n    ></vault-card-details-section>\n\n    <vault-sshkey-section\n      *ngIf=\"config.cipherType === CipherType.SshKey\"\n      [disabled]=\"config.mode === 'partial-edit'\"\n      [originalCipherView]=\"originalCipherView\"\n    ></vault-sshkey-section>\n\n    <vault-additional-options-section></vault-additional-options-section>\n\n    <!-- Attachments are only available for existing ciphers -->\n    <ng-container *ngIf=\"config.mode == 'edit'\">\n      <ng-content select=\"[slot=attachment-button]\"></ng-content>\n    </ng-container>\n  </ng-container>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { NgIf } from \"@angular/common\";\nimport {\n  AfterViewInit,\n  ChangeDetectorRef,\n  Component,\n  DestroyRef,\n  EventEmitter,\n  forwardRef,\n  inject,\n  Input,\n  OnChanges,\n  OnInit,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { FormBuilder, FormGroup, ReactiveFormsModule } from \"@angular/forms\";\nimport { Subject } from \"rxjs\";\n\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType, SecureNoteType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  AsyncActionsModule,\n  BitSubmitDirective,\n  ButtonComponent,\n  CardComponent,\n  FormFieldModule,\n  ItemModule,\n  SectionComponent,\n  SelectModule,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { CipherFormConfig } from \"../abstractions/cipher-form-config.service\";\nimport { CipherFormService } from \"../abstractions/cipher-form.service\";\nimport { CipherForm, CipherFormContainer } from \"../cipher-form-container\";\n\nimport { AdditionalOptionsSectionComponent } from \"./additional-options/additional-options-section.component\";\nimport { CardDetailsSectionComponent } from \"./card-details-section/card-details-section.component\";\nimport { IdentitySectionComponent } from \"./identity/identity.component\";\nimport { ItemDetailsSectionComponent } from \"./item-details/item-details-section.component\";\nimport { LoginDetailsSectionComponent } from \"./login-details-section/login-details-section.component\";\nimport { SshKeySectionComponent } from \"./sshkey-section/sshkey-section.component\";\n\n@Component({\n  selector: \"vault-cipher-form\",\n  templateUrl: \"./cipher-form.component.html\",\n  standalone: true,\n  providers: [\n    {\n      provide: CipherFormContainer,\n      useExisting: forwardRef(() => CipherFormComponent),\n    },\n  ],\n  imports: [\n    AsyncActionsModule,\n    CardComponent,\n    SectionComponent,\n    TypographyModule,\n    ItemModule,\n    FormFieldModule,\n    ReactiveFormsModule,\n    SelectModule,\n    ItemDetailsSectionComponent,\n    CardDetailsSectionComponent,\n    IdentitySectionComponent,\n    SshKeySectionComponent,\n    NgIf,\n    AdditionalOptionsSectionComponent,\n    LoginDetailsSectionComponent,\n  ],\n})\nexport class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, CipherFormContainer {\n  @ViewChild(BitSubmitDirective)\n  private bitSubmit: BitSubmitDirective;\n  private destroyRef = inject(DestroyRef);\n  private _firstInitialized = false;\n\n  /**\n   * The form ID to use for the form. Used to connect it to a submit button.\n   */\n  @Input({ required: true }) formId: string;\n\n  /**\n   * The configuration for the add/edit form. Used to determine which controls are shown and what values are available.\n   */\n  @Input({ required: true }) config: CipherFormConfig;\n\n  /**\n   * Optional submit button that will be disabled or marked as loading when the form is submitting.\n   */\n  @Input()\n  submitBtn?: ButtonComponent;\n\n  /**\n   * Optional function to call before submitting the form. If the function returns false, the form will not be submitted.\n   */\n  @Input()\n  beforeSubmit: () => Promise<boolean>;\n\n  /**\n   * Event emitted when the cipher is saved successfully.\n   */\n  @Output() cipherSaved = new EventEmitter<CipherView>();\n\n  private formReadySubject = new Subject<void>();\n\n  @Output() formReady = this.formReadySubject.asObservable();\n\n  /**\n   * The original cipher being edited or cloned. Null for add mode.\n   */\n  originalCipherView: CipherView | null;\n\n  /**\n   * The form group for the cipher. Starts empty and is populated by child components via the `registerChildForm` method.\n   * @protected\n   */\n  protected cipherForm = this.formBuilder.group<CipherForm>({});\n\n  /**\n   * The value of the updated cipher. Starts as a new cipher (or clone of originalCipher) and is updated\n   * by child components via the `patchCipher` method.\n   * @protected\n   */\n  protected updatedCipherView: CipherView | null;\n\n  protected loading: boolean = true;\n\n  CipherType = CipherType;\n\n  ngAfterViewInit(): void {\n    if (this.submitBtn) {\n      this.bitSubmit.loading$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((loading) => {\n        this.submitBtn.loading = loading;\n      });\n\n      this.bitSubmit.disabled$.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((disabled) => {\n        this.submitBtn.disabled = disabled;\n      });\n    }\n  }\n\n  /**\n   * Registers a child form group with the parent form group. Used by child components to add their form groups to\n   * the parent form for validation.\n   * @param name - The name of the form group.\n   * @param group - The form group to add.\n   */\n  registerChildForm<K extends keyof CipherForm>(\n    name: K,\n    group: Exclude<CipherForm[K], undefined>,\n  ): void {\n    this.cipherForm.setControl(name, group);\n  }\n\n  /**\n   * Method to update the cipherView with the new values. This method should be called by the child form components\n   * @param updateFn - A function that takes the current cipherView and returns the updated cipherView\n   */\n  patchCipher(updateFn: (current: CipherView) => CipherView): void {\n    this.updatedCipherView = updateFn(this.updatedCipherView);\n  }\n\n  /**\n   * We need to re-initialize the form when the config is updated.\n   */\n  async ngOnChanges() {\n    // Avoid re-initializing the form on the first change detection cycle.\n    if (this._firstInitialized) {\n      await this.init();\n    }\n  }\n\n  async ngOnInit() {\n    await this.init();\n    this._firstInitialized = true;\n  }\n\n  async init() {\n    this.loading = true;\n\n    // Force change detection so that all child components are destroyed and re-created\n    this.changeDetectorRef.detectChanges();\n\n    this.updatedCipherView = new CipherView();\n    this.originalCipherView = null;\n    this.cipherForm = this.formBuilder.group<CipherForm>({});\n\n    if (this.config == null) {\n      return;\n    }\n\n    if (this.config.mode !== \"add\") {\n      if (this.config.originalCipher == null) {\n        throw new Error(\"Original cipher is required for edit or clone mode\");\n      }\n\n      this.originalCipherView = await this.addEditFormService.decryptCipher(\n        this.config.originalCipher,\n      );\n\n      // decryptCipher again to ensure we have a separate instance of CipherView\n      this.updatedCipherView = await this.addEditFormService.decryptCipher(\n        this.config.originalCipher,\n      );\n\n      if (this.config.mode === \"clone\") {\n        this.updatedCipherView.id = null;\n      }\n    } else {\n      this.updatedCipherView.type = this.config.cipherType;\n\n      if (this.config.cipherType === CipherType.SecureNote) {\n        this.updatedCipherView.secureNote.type = SecureNoteType.Generic;\n      }\n    }\n\n    this.loading = false;\n    this.formReadySubject.next();\n  }\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private addEditFormService: CipherFormService,\n    private toastService: ToastService,\n    private i18nService: I18nService,\n    private changeDetectorRef: ChangeDetectorRef,\n  ) {}\n\n  /**\n   * Counts the number of invalid fields in a form group.\n   * @param formGroup - The form group to count the invalid fields in.\n   * @returns The number of invalid fields in the form group.\n   */\n  private countInvalidFields(formGroup: FormGroup): number {\n    return Object.values(formGroup.controls).reduce((count, control) => {\n      if (control instanceof FormGroup) {\n        return count + this.countInvalidFields(control);\n      }\n      return count + (control.invalid ? 1 : 0);\n    }, 0);\n  }\n\n  submit = async () => {\n    if (this.cipherForm.invalid) {\n      this.cipherForm.markAllAsTouched();\n\n      const invalidFieldsCount = this.countInvalidFields(this.cipherForm);\n      if (invalidFieldsCount > 0) {\n        this.toastService.showToast({\n          variant: \"error\",\n          title: null,\n          message:\n            invalidFieldsCount === 1\n              ? this.i18nService.t(\"singleFieldNeedsAttention\")\n              : this.i18nService.t(\"multipleFieldsNeedAttention\", invalidFieldsCount),\n        });\n      }\n      return;\n    }\n\n    if (this.beforeSubmit) {\n      const shouldSubmit = await this.beforeSubmit();\n      if (!shouldSubmit) {\n        return;\n      }\n    }\n\n    const savedCipher = await this.addEditFormService.saveCipher(\n      this.updatedCipherView,\n      this.config,\n    );\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\n        this.config.mode === \"edit\" || this.config.mode === \"partial-edit\"\n          ? \"editedItem\"\n          : \"addedItem\",\n      ),\n    });\n\n    this.cipherSaved.emit(savedCipher);\n  };\n}\n","import { Directive, HostListener, Input } from \"@angular/core\";\n\n@Directive({\n  selector: \"[appTextDrag]\",\n  standalone: true,\n  host: {\n    draggable: \"true\",\n    class: \"tw-cursor-move\",\n  },\n})\nexport class TextDragDirective {\n  @Input({\n    alias: \"appTextDrag\",\n    required: true,\n  })\n  data = \"\";\n\n  @HostListener(\"dragstart\", [\"$event\"])\n  onDragStart(event: DragEvent) {\n    event.dataTransfer?.setData(\"text\", this.data);\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport {\n  IconButtonModule,\n  CardComponent,\n  InputModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  FormFieldModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-additional-options\",\n  templateUrl: \"additional-options.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    IconButtonModule,\n    InputModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    FormFieldModule,\n  ],\n})\nexport class AdditionalOptionsComponent {\n  @Input() notes: string = \"\";\n}\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"additionalOptions\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card class=\"[&_bit-form-field:last-of-type]:tw-mb-0\">\n    <bit-form-field disableReadOnlyBorder>\n      <bit-label [appTextDrag]=\"notes\">{{ \"note\" | i18n }}</bit-label>\n      <textarea readonly id=\"notes\" bitInput rows=\"5\" aria-readonly=\"true\">{{ notes }}</textarea>\n      <button\n        bitSuffix\n        bitIconButton=\"bwi-clone\"\n        size=\"small\"\n        type=\"button\"\n        [appCopyClick]=\"notes\"\n        showToast\n        [valueLabel]=\"'note' | i18n\"\n        [appA11yTitle]=\"'copyNotes' | i18n\"\n      ></button>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"attachments\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-item-group>\n    <bit-item *ngFor=\"let attachment of cipher.attachments\">\n      <bit-item-content>\n        <span data-testid=\"file-name\" [title]=\"attachment.fileName\">{{ attachment.fileName }}</span>\n        <span slot=\"secondary\" data-testid=\"file-size\">{{ attachment.sizeName }}</span>\n      </bit-item-content>\n      <ng-container slot=\"end\">\n        <bit-item-action>\n          <app-download-attachment\n            [cipher]=\"cipher\"\n            [attachment]=\"attachment\"\n            [checkPwReprompt]=\"true\"\n          ></app-download-attachment>\n        </bit-item-action>\n      </ng-container>\n    </bit-item>\n  </bit-item-group>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { NEVER, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  ItemModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\nimport { DownloadAttachmentComponent } from \"../../components/download-attachment/download-attachment.component\";\n\n@Component({\n  selector: \"app-attachments-v2-view\",\n  templateUrl: \"attachments-v2-view.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    ItemModule,\n    IconButtonModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    DownloadAttachmentComponent,\n  ],\n})\nexport class AttachmentsV2ViewComponent {\n  @Input() cipher: CipherView;\n\n  canAccessPremium: boolean;\n  orgKey: OrgKey;\n\n  constructor(\n    private keyService: KeyService,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private stateProvider: StateProvider,\n    private accountService: AccountService,\n  ) {\n    this.subscribeToHasPremiumCheck();\n    this.subscribeToOrgKey();\n  }\n\n  subscribeToHasPremiumCheck() {\n    this.accountService.activeAccount$\n      .pipe(\n        switchMap((account) =>\n          this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n        ),\n        takeUntilDestroyed(),\n      )\n      .subscribe((hasPremium) => {\n        this.canAccessPremium = hasPremium;\n      });\n  }\n\n  subscribeToOrgKey() {\n    this.stateProvider.activeUserId$\n      .pipe(\n        switchMap((userId) => (userId != null ? this.keyService.orgKeys$(userId) : NEVER)),\n        takeUntilDestroyed(),\n      )\n      .subscribe((data: Record<OrganizationId, OrgKey> | null) => {\n        if (data) {\n          this.orgKey = data[this.cipher.organizationId as OrganizationId];\n        }\n      });\n  }\n}\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"autofillOptions\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card>\n    <ng-container *ngFor=\"let login of loginUris; let last = last\">\n      <bit-form-field\n        [disableMargin]=\"last\"\n        [disableReadOnlyBorder]=\"last\"\n        data-testid=\"autofill-view-list\"\n      >\n        <bit-label>\n          {{ \"website\" | i18n }}\n        </bit-label>\n        <input\n          readonly\n          bitInput\n          type=\"text\"\n          [value]=\"login.hostOrUri\"\n          aria-readonly=\"true\"\n          data-testid=\"login-website\"\n        />\n        <button\n          bitIconButton=\"bwi-external-link\"\n          bitSuffix\n          type=\"button\"\n          (click)=\"openWebsite(login.launchUri)\"\n          data-testid=\"launch-website\"\n          [attr.aria-label]=\"('launch' | i18n) + ' ' + login.hostOrUri\"\n        ></button>\n        <button\n          bitIconButton=\"bwi-clone\"\n          bitSuffix\n          type=\"button\"\n          [appCopyClick]=\"login.launchUri\"\n          [valueLabel]=\"'website' | i18n\"\n          showToast\n          [appA11yTitle]=\"'copyWebsite' | i18n\"\n          data-testid=\"copy-website\"\n        ></button>\n      </bit-form-field>\n    </ng-container>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { LoginUriView } from \"@bitwarden/common/vault/models/view/login-uri.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-autofill-options-view\",\n  templateUrl: \"autofill-options-view.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    FormFieldModule,\n    IconButtonModule,\n  ],\n})\nexport class AutofillOptionsViewComponent {\n  @Input() loginUris: LoginUriView[];\n  @Input() cipherId: string;\n\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private cipherService: CipherService,\n  ) {}\n\n  async openWebsite(selectedUri: string) {\n    await this.cipherService.updateLastLaunchedDate(this.cipherId);\n    this.platformUtilsService.launchUri(selectedUri);\n  }\n}\n","import { AfterViewInit, Component, ContentChildren, QueryList } from \"@angular/core\";\n\nimport { CardComponent, BitFormFieldComponent } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"read-only-cipher-card\",\n  templateUrl: \"./read-only-cipher-card.component.html\",\n  standalone: true,\n  imports: [CardComponent],\n})\n/**\n * A thin wrapper around the `bit-card` component that disables the bottom border for the last form field.\n */\nexport class ReadOnlyCipherCardComponent implements AfterViewInit {\n  @ContentChildren(BitFormFieldComponent) formFields?: QueryList<BitFormFieldComponent>;\n\n  ngAfterViewInit(): void {\n    // Disable the bottom border for the last form field\n    if (this.formFields?.last) {\n      // Delay model update until next change detection cycle\n      setTimeout(() => {\n        if (this.formFields) {\n          this.formFields.last.disableReadOnlyBorder = true;\n        }\n      });\n    }\n  }\n}\n","<bit-card class=\"[&_bit-form-field:last-of-type]:tw-mb-0\">\n  <ng-content></ng-content>\n</bit-card>\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ setSectionTitle }}</h2>\n  </bit-section-header>\n  <read-only-cipher-card>\n    <bit-form-field *ngIf=\"card.cardholderName\">\n      <bit-label [appTextDrag]=\"card.cardholderName\">{{ \"cardholderName\" | i18n }}</bit-label>\n      <input\n        id=\"cardholderName\"\n        readonly\n        bitInput\n        type=\"text\"\n        [value]=\"card.cardholderName\"\n        aria-readonly=\"true\"\n        data-testid=\"cardholder-name\"\n      />\n    </bit-form-field>\n    <bit-form-field *ngIf=\"card.number\">\n      <bit-label [appTextDrag]=\"card.number\">{{ \"number\" | i18n }}</bit-label>\n      <input\n        id=\"cardNumber\"\n        readonly\n        bitInput\n        type=\"password\"\n        [value]=\"card.number | creditCardNumber: cipher.card.brand\"\n        aria-readonly=\"true\"\n        data-testid=\"cardholder-number\"\n        class=\"tw-font-mono\"\n      />\n      <button\n        bitSuffix\n        type=\"button\"\n        bitIconButton\n        bitPasswordInputToggle\n        data-testid=\"toggle-number\"\n        (toggledChange)=\"logCardEvent($event, EventType.Cipher_ClientToggledCardNumberVisible)\"\n      ></button>\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"card.number\"\n        showToast\n        [valueLabel]=\"'number' | i18n\"\n        [appA11yTitle]=\"'copyNumber' | i18n\"\n        data-testid=\"copy-number\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"card.expiration\">\n      <bit-label [appTextDrag]=\"card.expiration\">{{ \"expiration\" | i18n }}</bit-label>\n      <input\n        id=\"expiration\"\n        readonly\n        bitInput\n        type=\"text\"\n        [value]=\"card.expiration\"\n        aria-readonly=\"true\"\n        data-testid=\"cardholder-expiration\"\n      />\n    </bit-form-field>\n    <bit-form-field *ngIf=\"card.code\">\n      <bit-label [appTextDrag]=\"card.code\">{{ \"securityCode\" | i18n }}</bit-label>\n      <input\n        id=\"securityCode\"\n        readonly\n        bitInput\n        type=\"password\"\n        [value]=\"card.code\"\n        aria-readonly=\"true\"\n        data-testid=\"cardholder-code\"\n        class=\"tw-font-mono\"\n      />\n      <button\n        bitSuffix\n        type=\"button\"\n        bitIconButton\n        bitPasswordInputToggle\n        data-testid=\"toggle-code\"\n        (toggledChange)=\"logCardEvent($event, EventType.Cipher_ClientToggledCardCodeVisible)\"\n      ></button>\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"card.code\"\n        showToast\n        [valueLabel]=\"'securityCode' | i18n\"\n        [appA11yTitle]=\"'copySecurityCode' | i18n\"\n        data-testid=\"copy-code\"\n        (click)=\"logCardEvent(true, EventType.Cipher_ClientCopiedCardCode)\"\n      ></button>\n    </bit-form-field>\n  </read-only-cipher-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  CardComponent,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  FormFieldModule,\n  IconButtonModule,\n} from \"@bitwarden/components\";\n\nimport { ReadOnlyCipherCardComponent } from \"../read-only-cipher-card/read-only-cipher-card.component\";\n\n@Component({\n  selector: \"app-card-details-view\",\n  templateUrl: \"card-details-view.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    FormFieldModule,\n    IconButtonModule,\n    ReadOnlyCipherCardComponent,\n  ],\n})\nexport class CardDetailsComponent {\n  @Input() cipher: CipherView;\n  EventType = EventType;\n\n  constructor(\n    private i18nService: I18nService,\n    private eventCollectionService: EventCollectionService,\n  ) {}\n\n  get card() {\n    return this.cipher.card;\n  }\n\n  get setSectionTitle() {\n    if (this.card.brand && this.card.brand !== \"Other\") {\n      return this.i18nService.t(\"cardBrandDetails\", this.card.brand);\n    }\n    return this.i18nService.t(\"cardDetails\");\n  }\n\n  async logCardEvent(conditional: boolean, event: EventType) {\n    if (conditional) {\n      await this.eventCollectionService.collect(\n        event,\n        this.cipher.id,\n        false,\n        this.cipher.organizationId,\n      );\n    }\n  }\n}\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"customFields\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card>\n    <div\n      class=\"tw-border-secondary-300 [&_bit-form-field:last-of-type]:tw-mb-0\"\n      *ngFor=\"let field of cipher.fields; let last = last\"\n      [ngClass]=\"{ 'tw-mb-4': !last }\"\n      data-testid=\"custom-field\"\n    >\n      <bit-form-field *ngIf=\"field.type === fieldType.Text\" [disableReadOnlyBorder]=\"last\">\n        <bit-label [appTextDrag]=\"field.value\">{{ field.name }}</bit-label>\n        <input readonly bitInput type=\"text\" [value]=\"field.value\" aria-readonly=\"true\" />\n        <button\n          bitIconButton=\"bwi-clone\"\n          bitSuffix\n          type=\"button\"\n          [appCopyClick]=\"field.value\"\n          showToast\n          [valueLabel]=\"field.name\"\n          [appA11yTitle]=\"'copyCustomField' | i18n: field.name\"\n          data-testid=\"copy-custom-field\"\n        ></button>\n      </bit-form-field>\n      <bit-form-field *ngIf=\"field.type === fieldType.Hidden\" [disableReadOnlyBorder]=\"last\">\n        <bit-label [appTextDrag]=\"field.value\">{{ field.name }}</bit-label>\n        <input\n          readonly\n          bitInput\n          type=\"password\"\n          [value]=\"field.value\"\n          aria-readonly=\"true\"\n          class=\"tw-font-mono\"\n        />\n        <button\n          bitSuffix\n          type=\"button\"\n          bitIconButton\n          bitPasswordInputToggle\n          (toggledChange)=\"logHiddenEvent($event)\"\n        ></button>\n        <button\n          bitIconButton=\"bwi-clone\"\n          bitSuffix\n          type=\"button\"\n          [appCopyClick]=\"field.value\"\n          showToast\n          [valueLabel]=\"field.name\"\n          [appA11yTitle]=\"'copyCustomField' | i18n: field.name\"\n          (click)=\"logCopyEvent()\"\n        ></button>\n      </bit-form-field>\n      <bit-form-control *ngIf=\"field.type === fieldType.Boolean\">\n        <input\n          bitCheckbox\n          type=\"checkbox\"\n          [checked]=\"field.value === 'true'\"\n          aria-readonly=\"true\"\n          disabled\n        />\n        <bit-label [appTextDrag]=\"field.value\">\n          {{ field.name }}\n        </bit-label>\n      </bit-form-control>\n      <bit-form-field *ngIf=\"field.type === fieldType.Linked\" [disableReadOnlyBorder]=\"last\">\n        <bit-label> {{ \"cfTypeLinked\" | i18n }}: {{ field.name }} </bit-label>\n        <input\n          readonly\n          bitInput\n          type=\"text\"\n          [value]=\"getLinkedType(field.linkedId)\"\n          aria-readonly=\"true\"\n        />\n      </bit-form-field>\n    </div>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherType, FieldType, LinkedIdType } from \"@bitwarden/common/vault/enums\";\nimport { CardView } from \"@bitwarden/common/vault/models/view/card.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { IdentityView } from \"@bitwarden/common/vault/models/view/identity.view\";\nimport { LoginView } from \"@bitwarden/common/vault/models/view/login.view\";\nimport {\n  CardComponent,\n  IconButtonModule,\n  FormFieldModule,\n  InputModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  CheckboxModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-custom-fields-v2\",\n  templateUrl: \"custom-fields-v2.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    IconButtonModule,\n    FormFieldModule,\n    InputModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    CheckboxModule,\n  ],\n})\nexport class CustomFieldV2Component implements OnInit {\n  @Input() cipher: CipherView;\n  fieldType = FieldType;\n  fieldOptions: any;\n\n  constructor(\n    private i18nService: I18nService,\n    private eventCollectionService: EventCollectionService,\n  ) {}\n\n  ngOnInit(): void {\n    this.fieldOptions = this.getLinkedFieldsOptionsForCipher();\n  }\n\n  getLinkedType(linkedId: LinkedIdType) {\n    const linkedType = this.fieldOptions.get(linkedId);\n    return this.i18nService.t(linkedType.i18nKey);\n  }\n\n  async logHiddenEvent(hiddenFieldVisible: boolean) {\n    if (hiddenFieldVisible) {\n      await this.eventCollectionService.collect(\n        EventType.Cipher_ClientToggledHiddenFieldVisible,\n        this.cipher.id,\n        false,\n        this.cipher.organizationId,\n      );\n    }\n  }\n\n  async logCopyEvent() {\n    await this.eventCollectionService.collect(\n      EventType.Cipher_ClientCopiedHiddenField,\n      this.cipher.id,\n      false,\n      this.cipher.organizationId,\n    );\n  }\n\n  private getLinkedFieldsOptionsForCipher() {\n    switch (this.cipher.type) {\n      case CipherType.Login:\n        return LoginView.prototype.linkedFieldOptions;\n      case CipherType.Card:\n        return CardView.prototype.linkedFieldOptions;\n      case CipherType.Identity:\n        return IdentityView.prototype.linkedFieldOptions;\n      default:\n        return null;\n    }\n  }\n}\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"itemDetails\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card>\n    <bit-form-field\n      [disableMargin]=\"!cipher.collectionIds?.length && !showOwnership && !cipher.folderId\"\n      [disableReadOnlyBorder]=\"!cipher.collectionIds?.length && !showOwnership && !cipher.folderId\"\n    >\n      <bit-label [appTextDrag]=\"cipher.name\">\n        {{ \"itemName\" | i18n }}\n      </bit-label>\n      <input\n        readonly\n        id=\"itemName\"\n        bitInput\n        type=\"text\"\n        [value]=\"cipher.name\"\n        aria-readonly=\"true\"\n        data-testid=\"item-name\"\n      />\n    </bit-form-field>\n\n    <ul\n      [attr.aria-label]=\"'itemLocation' | i18n\"\n      *ngIf=\"cipher.collectionIds?.length || showOwnership || cipher.folderId\"\n      class=\"tw-mb-0 tw-pl-0\"\n    >\n      <li\n        *ngIf=\"showOwnership && organization\"\n        class=\"tw-flex tw-items-center tw-list-none\"\n        [ngClass]=\"{ 'tw-mb-3': cipher.collectionIds }\"\n        bitTypography=\"body2\"\n        [attr.aria-label]=\"('owner' | i18n) + organization.name\"\n        data-testid=\"owner\"\n      >\n        <i\n          appOrgIcon\n          [tierType]=\"organization.productTierType\"\n          [size]=\"'large'\"\n          [title]=\"'owner' | i18n\"\n        ></i>\n        <span aria-hidden=\"true\" class=\"tw-pl-1.5\">\n          {{ organization.name }}\n        </span>\n      </li>\n      <li\n        class=\"tw-list-none\"\n        *ngIf=\"cipher.collectionIds && collections\"\n        [attr.aria-label]=\"'collection' | i18n\"\n      >\n        <ul data-testid=\"collections\" [ngClass]=\"{ 'tw-mb-0': !cipher.folderId }\" class=\"tw-pl-0\">\n          <li\n            *ngFor=\"let collection of collections; let last = last\"\n            class=\"tw-flex tw-items-center tw-list-none\"\n            bitTypography=\"body2\"\n            [ngClass]=\"{ 'tw-mb-3': last && cipher.folderId }\"\n            [attr.aria-label]=\"collection.name\"\n          >\n            <i\n              class=\"bwi bwi-collection bwi-lg\"\n              aria-hidden=\"true\"\n              [title]=\"'collection' | i18n\"\n            ></i>\n            <span aria-hidden=\"true\" class=\"tw-pl-1.5\">\n              {{ collection.name }}\n            </span>\n          </li>\n        </ul>\n      </li>\n      <li\n        *ngIf=\"cipher.folderId && folder\"\n        bitTypography=\"body2\"\n        class=\"tw-flex tw-items-center tw-list-none\"\n        [attr.aria-label]=\"('folder' | i18n) + folder.name\"\n        data-testid=\"folder\"\n      >\n        <i class=\"bwi bwi-folder bwi-lg\" aria-hidden=\"true\" [title]=\"'folder' | i18n\"></i>\n        <span aria-hidden=\"true\" class=\"tw-pl-1.5\">{{ folder.name }} </span>\n      </li>\n    </ul>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport {\n  CardComponent,\n  FormFieldModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { OrgIconDirective } from \"../../components/org-icon.directive\";\n\n@Component({\n  selector: \"app-item-details-v2\",\n  templateUrl: \"item-details-v2.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    OrgIconDirective,\n    FormFieldModule,\n  ],\n})\nexport class ItemDetailsV2Component {\n  @Input() cipher: CipherView;\n  @Input() organization?: Organization;\n  @Input() collections?: CollectionView[];\n  @Input() folder?: FolderView;\n  @Input() hideOwner?: boolean = false;\n\n  get showOwnership() {\n    return this.cipher.organizationId && this.organization && !this.hideOwner;\n  }\n}\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"itemHistory\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card>\n    <p class=\"tw-mb-1 tw-text-xs tw-text-muted tw-select-none\">\n      <span class=\"tw-font-bold\">{{ \"lastEdited\" | i18n }}:</span>\n      {{ cipher.revisionDate | date: \"medium\" }}\n    </p>\n    <p\n      class=\"tw-text-xs tw-text-muted tw-select-none\"\n      [ngClass]=\"{\n        'tw-mb-1 ': cipher.hasPasswordHistory && isLogin,\n        'tw-mb-0': !cipher.hasPasswordHistory || !isLogin,\n      }\"\n    >\n      <span class=\"tw-font-bold\">{{ \"dateCreated\" | i18n }}:</span>\n      {{ cipher.creationDate | date: \"medium\" }}\n    </p>\n    <p\n      *ngIf=\"cipher.hasPasswordHistory && isLogin\"\n      class=\"tw-text-xs tw-text-muted tw-select-none\"\n      [ngClass]=\"{ 'tw-mb-3': cipher.hasPasswordHistory }\"\n    >\n      <span class=\"tw-font-bold\">{{ \"datePasswordUpdated\" | i18n }}:</span>\n      {{ cipher.passwordRevisionDisplayDate | date: \"medium\" }}\n    </p>\n    <button\n      *ngIf=\"cipher.hasPasswordHistory && isLogin\"\n      (click)=\"viewPasswordHistory()\"\n      bitTypography=\"body2\"\n      bitLink\n      type=\"button\"\n    >\n      {{ \"passwordHistory\" | i18n }}\n    </button>\n  </bit-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { RouterModule } from \"@angular/router\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ViewPasswordHistoryService } from \"@bitwarden/common/vault/abstractions/view-password-history.service\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  CardComponent,\n  LinkModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\n@Component({\n  selector: \"app-item-history-v2\",\n  templateUrl: \"item-history-v2.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    RouterModule,\n    CardComponent,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    LinkModule,\n  ],\n})\nexport class ItemHistoryV2Component {\n  @Input() cipher: CipherView;\n\n  constructor(private viewPasswordHistoryService: ViewPasswordHistoryService) {}\n\n  get isLogin() {\n    return this.cipher.type === CipherType.Login;\n  }\n\n  /**\n   * View the password history for the cipher.\n   */\n  async viewPasswordHistory() {\n    await this.viewPasswordHistoryService.viewPasswordHistory(this.cipher);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, OnInit, Output } from \"@angular/core\";\n\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { TypographyModule } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"[bitTotpCountdown]\",\n  templateUrl: \"totp-countdown.component.html\",\n  standalone: true,\n  imports: [CommonModule, TypographyModule],\n})\nexport class BitTotpCountdownComponent implements OnInit {\n  @Input() cipher: CipherView;\n  @Output() sendCopyCode = new EventEmitter();\n\n  totpCode: string;\n  totpCodeFormatted: string;\n  totpDash: number;\n  totpSec: number;\n  totpLow: boolean;\n  private totpInterval: any;\n\n  constructor(protected totpService: TotpService) {}\n\n  async ngOnInit() {\n    await this.totpUpdateCode();\n    const interval = this.totpService.getTimeInterval(this.cipher.login.totp);\n    await this.totpTick(interval);\n\n    this.totpInterval = setInterval(async () => {\n      await this.totpTick(interval);\n    }, 1000);\n  }\n\n  private async totpUpdateCode() {\n    if (this.cipher.login.totp == null) {\n      this.clearTotp();\n      return;\n    }\n\n    this.totpCode = await this.totpService.getCode(this.cipher.login.totp);\n    if (this.totpCode != null) {\n      if (this.totpCode.length > 4) {\n        this.totpCodeFormatted = this.formatTotpCode();\n        this.sendCopyCode.emit({\n          totpCode: this.totpCode,\n          totpCodeFormatted: this.totpCodeFormatted,\n        });\n      } else {\n        this.totpCodeFormatted = this.totpCode;\n      }\n    } else {\n      this.totpCodeFormatted = null;\n      this.sendCopyCode.emit({ totpCode: null, totpCodeFormatted: null });\n      this.clearTotp();\n    }\n  }\n\n  private async totpTick(intervalSeconds: number) {\n    const epoch = Math.round(new Date().getTime() / 1000.0);\n    const mod = epoch % intervalSeconds;\n\n    this.totpSec = intervalSeconds - mod;\n    this.totpDash = +(Math.round(((60 / intervalSeconds) * mod + \"e+2\") as any) + \"e-2\");\n    this.totpLow = this.totpSec <= 7;\n    if (mod === 0) {\n      await this.totpUpdateCode();\n    }\n  }\n\n  private formatTotpCode(): string {\n    const half = Math.floor(this.totpCode.length / 2);\n    return this.totpCode.substring(0, half) + \" \" + this.totpCode.substring(half);\n  }\n\n  private clearTotp() {\n    if (this.totpInterval) {\n      clearInterval(this.totpInterval);\n    }\n  }\n}\n","<div class=\"tw-flex tw-items-center tw-justify-center totp-v2\">\n  <span class=\"tw-relative tw-flex tw-justify-center tw-items-center\" aria-hidden=\"true\">\n    <span\n      class=\"tw-absolute\"\n      [ngClass]=\"{ 'tw-text-main': !totpLow, 'tw-text-danger': totpLow }\"\n      bitTypography=\"helper\"\n      >{{ totpSec }}</span\n    >\n    <svg class=\"tw-w-7 tw-h-7\" transform=\"rotate(-90)\">\n      <g>\n        <circle\n          class=\"tw-fill-none\"\n          [ngClass]=\"{ 'tw-stroke-text-main': !totpLow, 'tw-stroke-danger-600': totpLow }\"\n          r=\"9.5\"\n          cy=\"14\"\n          cx=\"14\"\n          stroke-width=\"2\"\n          stroke-dasharray=\"60\"\n          [ngStyle]=\"{ 'stroke-dashoffset.px': totpDash }\"\n        ></circle>\n        <circle\n          class=\"tw-fill-none\"\n          [ngClass]=\"{ 'tw-stroke-text-main': !totpLow, 'tw-stroke-danger-600': totpLow }\"\n          r=\"11\"\n          cy=\"14\"\n          cx=\"14\"\n          stroke-width=\"1\"\n          stroke-dasharray=\"71\"\n          stroke-dashoffset=\"0\"\n        ></circle>\n      </g>\n    </svg>\n  </span>\n</div>\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"loginCredentials\" | i18n }}</h2>\n  </bit-section-header>\n  <read-only-cipher-card>\n    <bit-form-field *ngIf=\"cipher.login.username\">\n      <bit-label [appTextDrag]=\"cipher.login.username\">\n        {{ \"username\" | i18n }}\n      </bit-label>\n      <input\n        id=\"userName\"\n        readonly\n        bitInput\n        type=\"text\"\n        [value]=\"cipher.login.username\"\n        aria-readonly=\"true\"\n        data-testid=\"login-username\"\n      />\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"cipher.login.username\"\n        [valueLabel]=\"'username' | i18n\"\n        showToast\n        [appA11yTitle]=\"'copyUsername' | i18n\"\n        data-testid=\"copy-username\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.login.password\">\n      <bit-label [appTextDrag]=\"cipher.login.password\" id=\"password-label\">\n        {{ \"password\" | i18n }}\n      </bit-label>\n      <input\n        id=\"password\"\n        [ngClass]=\"{ 'tw-hidden': passwordRevealed }\"\n        readonly\n        bitInput\n        type=\"password\"\n        [value]=\"cipher.login.password\"\n        aria-readonly=\"true\"\n        data-testid=\"login-password\"\n      />\n      <!-- Use a wrapping span to \"recreate\" a readonly input as close as possible -->\n      <span\n        *ngIf=\"passwordRevealed\"\n        role=\"textbox\"\n        tabindex=\"0\"\n        data-testid=\"login-password-color\"\n        aria-readonly=\"true\"\n        [attr.aria-label]=\"cipher.login.password\"\n        aria-labelledby=\"password-label\"\n      >\n        <bit-color-password\n          class=\"tw-font-mono\"\n          [password]=\"cipher.login.password\"\n        ></bit-color-password>\n      </span>\n      <button\n        *ngIf=\"cipher.viewPassword && passwordRevealed\"\n        bitIconButton=\"bwi-numbered-list\"\n        bitSuffix\n        type=\"button\"\n        data-testid=\"toggle-password-count\"\n        [appA11yTitle]=\"(showPasswordCount ? 'hideCharacterCount' : 'showCharacterCount') | i18n\"\n        [attr.aria-expanded]=\"showPasswordCount\"\n        appStopClick\n        (click)=\"togglePasswordCount()\"\n      ></button>\n      <button\n        *ngIf=\"cipher.viewPassword\"\n        bitSuffix\n        type=\"button\"\n        bitIconButton\n        bitPasswordInputToggle\n        data-testid=\"toggle-password\"\n        (toggledChange)=\"pwToggleValue($event)\"\n      ></button>\n      <button\n        *ngIf=\"cipher.viewPassword\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"cipher.login.password\"\n        [valueLabel]=\"'password' | i18n\"\n        showToast\n        [appA11yTitle]=\"'copyPassword' | i18n\"\n        data-testid=\"copy-password\"\n        (click)=\"logCopyEvent()\"\n      ></button>\n    </bit-form-field>\n    <div\n      *ngIf=\"showPasswordCount && passwordRevealed\"\n      [ngClass]=\"{ 'tw-mt-3': !cipher.login.totp, 'tw-mb-2': true }\"\n    >\n      <bit-color-password\n        [password]=\"cipher.login.password\"\n        [showCount]=\"true\"\n      ></bit-color-password>\n    </div>\n    <bit-form-field *ngIf=\"cipher.login?.fido2Credentials?.length > 0\">\n      <bit-label [appTextDrag]=\"fido2CredentialCreationDateValue\"\n        >{{ \"typePasskey\" | i18n }}\n      </bit-label>\n      <input\n        id=\"fido\"\n        readonly\n        bitInput\n        type=\"text\"\n        [value]=\"fido2CredentialCreationDateValue\"\n        aria-readonly=\"true\"\n        data-testid=\"login-passkey\"\n      />\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.login.totp\">\n      <bit-label [appTextDrag]=\"totpCodeCopyObj?.totpCode\"\n        >{{ \"verificationCodeTotp\" | i18n }}\n        <span\n          *ngIf=\"!(isPremium$ | async)\"\n          bitBadge\n          variant=\"success\"\n          class=\"tw-ml-2 tw-cursor-pointer\"\n          (click)=\"getPremium(cipher.organizationId)\"\n          slot=\"end\"\n        >\n          {{ \"premium\" | i18n }}\n        </span>\n      </bit-label>\n      <input\n        id=\"totp\"\n        readonly\n        bitInput\n        [type]=\"!(isPremium$ | async) ? 'password' : 'text'\"\n        [value]=\"totpCodeCopyObj?.totpCodeFormatted || '*** ***'\"\n        aria-readonly=\"true\"\n        data-testid=\"login-totp\"\n        class=\"tw-font-mono\"\n      />\n      <div\n        *ngIf=\"isPremium$ | async\"\n        bitTotpCountdown\n        [cipher]=\"cipher\"\n        bitSuffix\n        (sendCopyCode)=\"setTotpCopyCode($event)\"\n      ></div>\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"totpCodeCopyObj?.totpCode\"\n        [valueLabel]=\"'verificationCodeTotp' | i18n\"\n        showToast\n        [appA11yTitle]=\"'copyVerificationCode' | i18n\"\n        data-testid=\"copy-totp\"\n        [disabled]=\"!(isPremium$ | async)\"\n        class=\"disabled:tw-cursor-default\"\n      ></button>\n    </bit-form-field>\n  </read-only-cipher-card>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule, DatePipe } from \"@angular/common\";\nimport { Component, inject, Input } from \"@angular/core\";\nimport { Observable, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  FormFieldModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  IconButtonModule,\n  BadgeModule,\n  ColorPasswordModule,\n} from \"@bitwarden/components\";\n\n// FIXME: remove `src` and fix import\n// eslint-disable-next-line no-restricted-imports\nimport { PremiumUpgradePromptService } from \"../../../../../libs/common/src/vault/abstractions/premium-upgrade-prompt.service\";\nimport { BitTotpCountdownComponent } from \"../../components/totp-countdown/totp-countdown.component\";\nimport { ReadOnlyCipherCardComponent } from \"../read-only-cipher-card/read-only-cipher-card.component\";\n\ntype TotpCodeValues = {\n  totpCode: string;\n  totpCodeFormatted?: string;\n};\n\n@Component({\n  selector: \"app-login-credentials-view\",\n  templateUrl: \"login-credentials-view.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    FormFieldModule,\n    IconButtonModule,\n    BadgeModule,\n    ColorPasswordModule,\n    BitTotpCountdownComponent,\n    ReadOnlyCipherCardComponent,\n  ],\n})\nexport class LoginCredentialsViewComponent {\n  @Input() cipher: CipherView;\n\n  isPremium$: Observable<boolean> = this.accountService.activeAccount$.pipe(\n    switchMap((account) =>\n      this.billingAccountProfileStateService.hasPremiumFromAnySource$(account.id),\n    ),\n  );\n  showPasswordCount: boolean = false;\n  passwordRevealed: boolean = false;\n  totpCodeCopyObj: TotpCodeValues;\n  private datePipe = inject(DatePipe);\n\n  constructor(\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private i18nService: I18nService,\n    private premiumUpgradeService: PremiumUpgradePromptService,\n    private eventCollectionService: EventCollectionService,\n    private accountService: AccountService,\n  ) {}\n\n  get fido2CredentialCreationDateValue(): string {\n    const dateCreated = this.i18nService.t(\"dateCreated\");\n    const creationDate = this.datePipe.transform(\n      this.cipher.login.fido2Credentials[0]?.creationDate,\n      \"short\",\n    );\n    return `${dateCreated} ${creationDate}`;\n  }\n\n  async getPremium(organizationId?: string) {\n    await this.premiumUpgradeService.promptForPremium(organizationId);\n  }\n\n  async pwToggleValue(passwordVisible: boolean) {\n    this.passwordRevealed = passwordVisible;\n\n    if (passwordVisible) {\n      await this.eventCollectionService.collect(\n        EventType.Cipher_ClientToggledPasswordVisible,\n        this.cipher.id,\n        false,\n        this.cipher.organizationId,\n      );\n    }\n  }\n\n  togglePasswordCount() {\n    this.showPasswordCount = !this.showPasswordCount;\n  }\n\n  setTotpCopyCode(e: TotpCodeValues) {\n    this.totpCodeCopyObj = e;\n  }\n\n  async logCopyEvent() {\n    await this.eventCollectionService.collect(\n      EventType.Cipher_ClientCopiedPassword,\n      this.cipher.id,\n      false,\n      this.cipher.organizationId,\n    );\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { SshKeyView } from \"@bitwarden/common/vault/models/view/ssh-key.view\";\nimport {\n  CardComponent,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n  FormFieldModule,\n  IconButtonModule,\n} from \"@bitwarden/components\";\n\nimport { OrgIconDirective } from \"../../components/org-icon.directive\";\n\n@Component({\n  selector: \"app-sshkey-view\",\n  templateUrl: \"sshkey-view.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    CardComponent,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    OrgIconDirective,\n    FormFieldModule,\n    IconButtonModule,\n  ],\n})\nexport class SshKeyViewComponent {\n  @Input() sshKey: SshKeyView;\n}\n","<bit-section *ngIf=\"showPersonalDetails\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"personalDetails\" | i18n }}</h2>\n  </bit-section-header>\n\n  <read-only-cipher-card>\n    <bit-form-field *ngIf=\"cipher.identity.fullName\">\n      <bit-label [appTextDrag]=\"cipher.identity.fullName\">{{ \"name\" | i18n }}</bit-label>\n      <input\n        bitInput\n        id=\"fullName\"\n        [value]=\"cipher.identity.fullName\"\n        readonly\n        data-testid=\"name\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyName' | i18n\"\n        [appCopyClick]=\"cipher.identity.fullName\"\n        showToast\n        [valueLabel]=\"'name' | i18n\"\n        data-testid=\"copy-name\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.identity.username\">\n      <bit-label [appTextDrag]=\"cipher.identity.username\">{{ \"username\" | i18n }}</bit-label>\n      <input\n        bitInput\n        id=\"username\"\n        [value]=\"cipher.identity.username\"\n        readonly\n        data-testid=\"username\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyUsername' | i18n\"\n        [appCopyClick]=\"cipher.identity.username\"\n        showToast\n        [valueLabel]=\"'username' | i18n\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.identity.company\">\n      <bit-label [appTextDrag]=\"cipher.identity.company\">{{ \"company\" | i18n }}</bit-label>\n      <input\n        bitInput\n        id=\"company\"\n        [value]=\"cipher.identity.company\"\n        readonly\n        data-testid=\"company\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyCompany' | i18n\"\n        [appCopyClick]=\"cipher.identity.company\"\n        showToast\n        [valueLabel]=\"'company' | i18n\"\n        data-testid=\"copy-company\"\n      ></button>\n    </bit-form-field>\n  </read-only-cipher-card>\n</bit-section>\n\n<bit-section *ngIf=\"showIdentificationDetails\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"identification\" | i18n }}</h2>\n  </bit-section-header>\n\n  <read-only-cipher-card>\n    <bit-form-field *ngIf=\"cipher.identity.ssn\">\n      <bit-label [appTextDrag]=\"cipher.identity.ssn\">{{ \"ssn\" | i18n }}</bit-label>\n      <input\n        bitInput\n        id=\"ssn\"\n        type=\"password\"\n        [value]=\"cipher.identity.ssn\"\n        readonly\n        data-testid=\"ssn\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        data-testid=\"ssn-toggle\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copySSN' | i18n\"\n        [appCopyClick]=\"cipher.identity.ssn\"\n        showToast\n        [valueLabel]=\"'ssn' | i18n\"\n        data-testid=\"copy-ssn\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.identity.passportNumber\">\n      <bit-label [appTextDrag]=\"cipher.identity.passportNumber\">{{\n        \"passportNumber\" | i18n\n      }}</bit-label>\n      <input\n        id=\"passportNumber\"\n        bitInput\n        type=\"password\"\n        [value]=\"cipher.identity.passportNumber\"\n        readonly\n        data-testid=\"passport\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton\n        bitSuffix\n        bitPasswordInputToggle\n        data-testid=\"passport-toggle\"\n      ></button>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyPassportNumber' | i18n\"\n        [appCopyClick]=\"cipher.identity.passportNumber\"\n        showToast\n        [valueLabel]=\"'passportNumber' | i18n\"\n        data-testid=\"copy-passport\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.identity.licenseNumber\">\n      <bit-label [appTextDrag]=\"cipher.identity.licenseNumber\">{{\n        \"licenseNumber\" | i18n\n      }}</bit-label>\n      <input\n        bitInput\n        id=\"licenseNumber\"\n        [value]=\"cipher.identity.licenseNumber\"\n        readonly\n        data-testid=\"license\"\n      />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyLicenseNumber' | i18n\"\n        [appCopyClick]=\"cipher.identity.licenseNumber\"\n        showToast\n        [valueLabel]=\"'licenseNumber' | i18n\"\n        data-testid=\"copy-license\"\n      ></button>\n    </bit-form-field>\n  </read-only-cipher-card>\n</bit-section>\n\n<bit-section *ngIf=\"showContactDetails\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"contactInfo\" | i18n }}</h2>\n  </bit-section-header>\n\n  <read-only-cipher-card>\n    <bit-form-field *ngIf=\"cipher.identity.email\">\n      <bit-label [appTextDrag]=\"cipher.identity.email\">{{ \"email\" | i18n }}</bit-label>\n      <input bitInput id=\"email\" [value]=\"cipher.identity.email\" readonly data-testid=\"email\" />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyEmail' | i18n\"\n        [appCopyClick]=\"cipher.identity.email\"\n        showToast\n        [valueLabel]=\"'email' | i18n\"\n        data-testid=\"copy-email\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"cipher.identity.phone\">\n      <bit-label [appTextDrag]=\"cipher.identity.phone\">{{ \"phone\" | i18n }}</bit-label>\n      <input bitInput id=\"phone\" [value]=\"cipher.identity.phone\" readonly data-testid=\"phone\" />\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyPhone' | i18n\"\n        [appCopyClick]=\"cipher.identity.phone\"\n        showToast\n        [valueLabel]=\"'phone' | i18n\"\n        data-testid=\"copy-phone\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field *ngIf=\"addressFields\">\n      <bit-label [appTextDrag]=\"addressFields\">{{ \"address\" | i18n }}</bit-label>\n      <textarea\n        bitInput\n        id=\"address\"\n        class=\"tw-resize-none\"\n        [value]=\"addressFields\"\n        [rows]=\"addressRows\"\n        readonly\n        data-testid=\"address\"\n      ></textarea>\n      <button\n        type=\"button\"\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        [appA11yTitle]=\"'copyAddress' | i18n\"\n        [appCopyClick]=\"addressFields\"\n        showToast\n        [valueLabel]=\"'address' | i18n\"\n        data-testid=\"copy-address\"\n      ></button>\n    </bit-form-field>\n  </read-only-cipher-card>\n</bit-section>\n","<bit-section>\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"typeSshKey\" | i18n }}</h2>\n  </bit-section-header>\n  <bit-card class=\"[&_bit-form-field:last-of-type]:tw-mb-0\">\n    <bit-form-field>\n      <bit-label>{{ \"sshPrivateKey\" | i18n }}</bit-label>\n      <input readonly bitInput [value]=\"sshKey.privateKey\" aria-readonly=\"true\" type=\"password\" />\n      <button\n        bitSuffix\n        type=\"button\"\n        bitIconButton\n        bitPasswordInputToggle\n        data-testid=\"toggle-privateKey\"\n      ></button>\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"sshKey.privateKey\"\n        showToast\n        [appA11yTitle]=\"'copyValue' | i18n\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field>\n      <bit-label>{{ \"sshPublicKey\" | i18n }}</bit-label>\n      <input readonly bitInput [value]=\"sshKey.publicKey\" aria-readonly=\"true\" />\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"sshKey.publicKey\"\n        showToast\n        [appA11yTitle]=\"'copyValue' | i18n\"\n      ></button>\n    </bit-form-field>\n    <bit-form-field>\n      <bit-label>{{ \"sshFingerprint\" | i18n }}</bit-label>\n      <input readonly bitInput [value]=\"sshKey.keyFingerprint\" aria-readonly=\"true\" />\n      <button\n        bitIconButton=\"bwi-clone\"\n        bitSuffix\n        type=\"button\"\n        [appCopyClick]=\"sshKey.keyFingerprint\"\n        showToast\n        [appA11yTitle]=\"'copyValue' | i18n\"\n      ></button>\n    </bit-form-field>\n  </bit-card>\n</bit-section>\n","import { NgIf } from \"@angular/common\";\nimport { Component, Input, OnInit } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  FormFieldModule,\n  IconButtonModule,\n  SectionComponent,\n  SectionHeaderComponent,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { ReadOnlyCipherCardComponent } from \"../read-only-cipher-card/read-only-cipher-card.component\";\n\n@Component({\n  standalone: true,\n  selector: \"app-view-identity-sections\",\n  templateUrl: \"./view-identity-sections.component.html\",\n  imports: [\n    NgIf,\n    JslibModule,\n    SectionComponent,\n    SectionHeaderComponent,\n    TypographyModule,\n    FormFieldModule,\n    IconButtonModule,\n    ReadOnlyCipherCardComponent,\n  ],\n})\nexport class ViewIdentitySectionsComponent implements OnInit {\n  @Input({ required: true }) cipher: CipherView | null = null;\n\n  showPersonalDetails: boolean = false;\n  showIdentificationDetails: boolean = false;\n  showContactDetails: boolean = false;\n\n  ngOnInit(): void {\n    this.showPersonalDetails = this.hasPersonalDetails();\n    this.showIdentificationDetails = this.hasIdentificationDetails();\n    this.showContactDetails = this.hasContactDetails();\n  }\n\n  /** Returns all populated address fields */\n  get addressFields(): string {\n    if (!this.cipher) {\n      return \"\";\n    }\n\n    const { address1, address2, address3, fullAddressPart2, country } = this.cipher.identity;\n    return [address1, address2, address3, fullAddressPart2, country].filter(Boolean).join(\"\\n\");\n  }\n\n  /** Returns the number of \"rows\" that should be assigned to the address textarea */\n  get addressRows(): number {\n    return this.addressFields.split(\"\\n\").length;\n  }\n\n  /** Returns true when any of the \"personal detail\" attributes are populated */\n  private hasPersonalDetails(): boolean {\n    if (!this.cipher) {\n      return false;\n    }\n\n    const { username, company, fullName } = this.cipher.identity;\n    return Boolean(fullName || username || company);\n  }\n\n  /** Returns true when any of the \"identification detail\" attributes are populated */\n  private hasIdentificationDetails(): boolean {\n    if (!this.cipher) {\n      return false;\n    }\n\n    const { ssn, passportNumber, licenseNumber } = this.cipher.identity;\n    return Boolean(ssn || passportNumber || licenseNumber);\n  }\n\n  /** Returns true when any of the \"contact detail\" attributes are populated */\n  private hasContactDetails(): boolean {\n    if (!this.cipher) {\n      return false;\n    }\n\n    const { email, phone } = this.cipher.identity;\n\n    return Boolean(email || phone || this.addressFields);\n  }\n}\n","<ng-container *ngIf=\"!!cipher\">\n  <bit-callout *ngIf=\"cardIsExpired\" type=\"info\" [title]=\"'cardExpiredTitle' | i18n\">\n    {{ \"cardExpiredMessage\" | i18n }}\n  </bit-callout>\n\n  <!-- HELPER TEXT -->\n  <p\n    class=\"tw-text-sm tw-text-muted\"\n    bitTypography=\"helper\"\n    *ngIf=\"cipher?.isDeleted && !cipher?.edit\"\n  >\n    {{ \"noEditPermissions\" | i18n }}\n  </p>\n\n  <!-- ITEM DETAILS -->\n  <app-item-details-v2\n    [cipher]=\"cipher\"\n    [organization]=\"organization$ | async\"\n    [collections]=\"collections\"\n    [folder]=\"folder$ | async\"\n    [hideOwner]=\"isAdminConsole\"\n  >\n  </app-item-details-v2>\n\n  <!-- LOGIN CREDENTIALS -->\n  <app-login-credentials-view *ngIf=\"hasLogin\" [cipher]=\"cipher\"></app-login-credentials-view>\n\n  <!-- AUTOFILL OPTIONS -->\n  <app-autofill-options-view\n    *ngIf=\"hasAutofill\"\n    [loginUris]=\"cipher.login.uris\"\n    [cipherId]=\"cipher.id\"\n  >\n  </app-autofill-options-view>\n\n  <!-- CARD DETAILS -->\n  <app-card-details-view *ngIf=\"hasCard\" [cipher]=\"cipher\"></app-card-details-view>\n\n  <!-- IDENTITY SECTIONS -->\n  <app-view-identity-sections *ngIf=\"cipher.identity\" [cipher]=\"cipher\">\n  </app-view-identity-sections>\n\n  <!-- SshKEY SECTIONS -->\n  <app-sshkey-view *ngIf=\"hasSshKey\" [sshKey]=\"cipher.sshKey\"></app-sshkey-view>\n\n  <!-- ADDITIONAL OPTIONS -->\n  <ng-container *ngIf=\"cipher.notes\">\n    <app-additional-options [notes]=\"cipher.notes\"> </app-additional-options>\n  </ng-container>\n\n  <!-- CUSTOM FIELDS -->\n  <ng-container *ngIf=\"cipher.fields\">\n    <app-custom-fields-v2 [cipher]=\"cipher\"> </app-custom-fields-v2>\n  </ng-container>\n\n  <!-- ATTACHMENTS SECTION -->\n  <ng-container *ngIf=\"cipher.attachments\">\n    <app-attachments-v2-view [cipher]=\"cipher\"> </app-attachments-v2-view>\n  </ng-container>\n\n  <!-- ITEM HISTORY SECTION -->\n  <app-item-history-v2 [cipher]=\"cipher\"> </app-item-history-v2>\n</ng-container>\n","import { CommonModule } from \"@angular/common\";\nimport { Component, Input, OnChanges, OnDestroy } from \"@angular/core\";\nimport { firstValueFrom, map, Observable, Subject, takeUntil } from \"rxjs\";\n\nimport { CollectionService, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { isCardExpired } from \"@bitwarden/common/autofill/utils\";\nimport { CollectionId } from \"@bitwarden/common/types/guid\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\nimport { CalloutModule, SearchModule } from \"@bitwarden/components\";\n\nimport { AdditionalOptionsComponent } from \"./additional-options/additional-options.component\";\nimport { AttachmentsV2ViewComponent } from \"./attachments/attachments-v2-view.component\";\nimport { AutofillOptionsViewComponent } from \"./autofill-options/autofill-options-view.component\";\nimport { CardDetailsComponent } from \"./card-details/card-details-view.component\";\nimport { CustomFieldV2Component } from \"./custom-fields/custom-fields-v2.component\";\nimport { ItemDetailsV2Component } from \"./item-details/item-details-v2.component\";\nimport { ItemHistoryV2Component } from \"./item-history/item-history-v2.component\";\nimport { LoginCredentialsViewComponent } from \"./login-credentials/login-credentials-view.component\";\nimport { SshKeyViewComponent } from \"./sshkey-sections/sshkey-view.component\";\nimport { ViewIdentitySectionsComponent } from \"./view-identity-sections/view-identity-sections.component\";\n\n@Component({\n  selector: \"app-cipher-view\",\n  templateUrl: \"cipher-view.component.html\",\n  standalone: true,\n  imports: [\n    CalloutModule,\n    CommonModule,\n    SearchModule,\n    JslibModule,\n    ItemDetailsV2Component,\n    AdditionalOptionsComponent,\n    AttachmentsV2ViewComponent,\n    ItemHistoryV2Component,\n    CustomFieldV2Component,\n    CardDetailsComponent,\n    SshKeyViewComponent,\n    ViewIdentitySectionsComponent,\n    LoginCredentialsViewComponent,\n    AutofillOptionsViewComponent,\n  ],\n})\nexport class CipherViewComponent implements OnChanges, OnDestroy {\n  @Input({ required: true }) cipher: CipherView | null = null;\n\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  /**\n   * Optional list of collections the cipher is assigned to. If none are provided, they will be fetched using the\n   * `CipherService` and the `collectionIds` property of the cipher.\n   */\n  @Input() collections?: CollectionView[];\n\n  /** Should be set to true when the component is used within the Admin Console */\n  @Input() isAdminConsole?: boolean = false;\n\n  organization$: Observable<Organization | undefined> | undefined;\n  folder$: Observable<FolderView | undefined> | undefined;\n  private destroyed$: Subject<void> = new Subject();\n  cardIsExpired: boolean = false;\n\n  constructor(\n    private organizationService: OrganizationService,\n    private collectionService: CollectionService,\n    private folderService: FolderService,\n    private accountService: AccountService,\n  ) {}\n\n  async ngOnChanges() {\n    if (this.cipher == null) {\n      return;\n    }\n\n    await this.loadCipherData();\n\n    this.cardIsExpired = isCardExpired(this.cipher.card);\n  }\n\n  ngOnDestroy(): void {\n    this.destroyed$.next();\n    this.destroyed$.complete();\n  }\n\n  get hasCard() {\n    if (!this.cipher) {\n      return false;\n    }\n\n    const { cardholderName, code, expMonth, expYear, number } = this.cipher.card;\n    return cardholderName || code || expMonth || expYear || number;\n  }\n\n  get hasLogin() {\n    if (!this.cipher) {\n      return false;\n    }\n\n    const { username, password, totp } = this.cipher.login;\n    return username || password || totp;\n  }\n\n  get hasAutofill() {\n    const uris = this.cipher?.login?.uris.length ?? 0;\n\n    return uris > 0;\n  }\n\n  get hasSshKey() {\n    return !!this.cipher?.sshKey?.privateKey;\n  }\n\n  async loadCipherData() {\n    if (!this.cipher) {\n      return;\n    }\n\n    // Load collections if not provided and the cipher has collectionIds\n    if (\n      this.cipher.collectionIds &&\n      this.cipher.collectionIds.length > 0 &&\n      (!this.collections || this.collections.length === 0)\n    ) {\n      this.collections = await firstValueFrom(\n        this.collectionService.decryptedCollectionViews$(\n          this.cipher.collectionIds as CollectionId[],\n        ),\n      );\n    }\n\n    if (this.cipher.organizationId) {\n      this.organization$ = this.organizationService\n        .get$(this.cipher.organizationId)\n        .pipe(takeUntil(this.destroyed$));\n    }\n\n    if (this.cipher.folderId) {\n      const activeUserId = await firstValueFrom(this.activeUserId$);\n\n      if (!activeUserId) {\n        return;\n      }\n\n      this.folder$ = this.folderService\n        .getDecrypted$(this.cipher.folderId, activeUserId)\n        .pipe(takeUntil(this.destroyed$));\n    }\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { Component, Input } from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { NEVER, switchMap } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { ErrorResponse } from \"@bitwarden/common/models/response/error.response\";\nimport { EncryptService } from \"@bitwarden/common/platform/abstractions/encrypt.service\";\nimport { FileDownloadService } from \"@bitwarden/common/platform/abstractions/file-download/file-download.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { EncArrayBuffer } from \"@bitwarden/common/platform/models/domain/enc-array-buffer\";\nimport { StateProvider } from \"@bitwarden/common/platform/state\";\nimport { OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { OrgKey } from \"@bitwarden/common/types/key\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { AsyncActionsModule, IconButtonModule, ToastService } from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n@Component({\n  standalone: true,\n  selector: \"app-download-attachment\",\n  templateUrl: \"./download-attachment.component.html\",\n  imports: [AsyncActionsModule, CommonModule, JslibModule, IconButtonModule],\n})\nexport class DownloadAttachmentComponent {\n  /** Attachment to download */\n  @Input({ required: true }) attachment: AttachmentView;\n\n  /** The cipher associated with the attachment */\n  @Input({ required: true }) cipher: CipherView;\n\n  // When in view mode, we will want to check for the master password reprompt\n  @Input() checkPwReprompt?: boolean = false;\n\n  /** The organization key if the cipher is associated with one */\n  private orgKey: OrgKey | null = null;\n\n  constructor(\n    private i18nService: I18nService,\n    private apiService: ApiService,\n    private fileDownloadService: FileDownloadService,\n    private toastService: ToastService,\n    private encryptService: EncryptService,\n    private stateProvider: StateProvider,\n    private keyService: KeyService,\n  ) {\n    this.stateProvider.activeUserId$\n      .pipe(\n        switchMap((userId) => (userId !== null ? this.keyService.orgKeys$(userId) : NEVER)),\n        takeUntilDestroyed(),\n      )\n      .subscribe((data: Record<OrganizationId, OrgKey> | null) => {\n        if (data) {\n          this.orgKey = data[this.cipher.organizationId as OrganizationId];\n        }\n      });\n  }\n\n  /** Download the attachment */\n  download = async () => {\n    let url: string;\n\n    try {\n      const attachmentDownloadResponse = await this.apiService.getAttachmentData(\n        this.cipher.id,\n        this.attachment.id,\n      );\n      url = attachmentDownloadResponse.url;\n    } catch (e) {\n      if (e instanceof ErrorResponse && (e as ErrorResponse).statusCode === 404) {\n        url = this.attachment.url;\n      } else if (e instanceof ErrorResponse) {\n        throw new Error((e as ErrorResponse).getSingleMessage());\n      } else {\n        throw e;\n      }\n    }\n\n    const response = await fetch(new Request(url, { cache: \"no-store\" }));\n    if (response.status !== 200) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n      return;\n    }\n\n    try {\n      const encBuf = await EncArrayBuffer.fromResponse(response);\n      const key = this.attachment.key != null ? this.attachment.key : this.orgKey;\n      const decBuf = await this.encryptService.decryptToBytes(encBuf, key);\n      this.fileDownloadService.download({\n        fileName: this.attachment.fileName,\n        blobData: decBuf,\n      });\n    } catch (e) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: null,\n        message: this.i18nService.t(\"errorOccurred\"),\n      });\n    }\n  };\n}\n","<button\n  [bitAction]=\"download\"\n  bitIconButton=\"bwi-download\"\n  buttonType=\"main\"\n  size=\"small\"\n  type=\"button\"\n  [appA11yTitle]=\"'downloadAttachmentName' | i18n: attachment.fileName\"\n></button>\n","import { Directive, ElementRef, HostBinding, Input, Renderer2 } from \"@angular/core\";\n\nimport { ProductTierType } from \"@bitwarden/common/billing/enums\";\n\nexport type OrgIconSize = \"default\" | \"small\" | \"large\";\n\n@Directive({\n  standalone: true,\n  selector: \"[appOrgIcon]\",\n})\nexport class OrgIconDirective {\n  @Input({ required: true }) tierType!: ProductTierType;\n  @Input() size?: OrgIconSize = \"default\";\n\n  constructor(\n    private el: ElementRef,\n    private renderer: Renderer2,\n  ) {\n    this.renderer.setAttribute(this.el.nativeElement, \"aria-hidden\", \"true\");\n  }\n\n  get iconSize(): \"bwi-sm\" | \"bwi-lg\" | \"\" {\n    switch (this.size) {\n      case \"small\":\n        return \"bwi-sm\";\n      case \"large\":\n        return \"bwi-lg\";\n      default:\n        return \"\";\n    }\n  }\n\n  get orgIcon(): string {\n    switch (this.tierType) {\n      case ProductTierType.Free:\n      case ProductTierType.Families:\n        return \"bwi-family\";\n      case ProductTierType.Teams:\n      case ProductTierType.Enterprise:\n      case ProductTierType.TeamsStarter:\n        return \"bwi-business\";\n      default:\n        return \"\";\n    }\n  }\n\n  @HostBinding(\"class\") get classList() {\n    return [\"bwi\", this.iconSize, this.orgIcon];\n  }\n}\n","import { Injectable } from \"@angular/core\";\nimport { firstValueFrom } from \"rxjs\";\n\nimport { EventCollectionService } from \"@bitwarden/common/abstractions/event/event-collection.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { BillingAccountProfileStateService } from \"@bitwarden/common/billing/abstractions/account/billing-account-profile-state.service\";\nimport { EventType } from \"@bitwarden/common/enums\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { TotpService } from \"@bitwarden/common/vault/abstractions/totp.service\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { ToastService } from \"@bitwarden/components\";\nimport { PasswordRepromptService } from \"@bitwarden/vault\";\n\n/**\n * The types of fields that can be copied from a cipher.\n */\nexport type CopyAction =\n  | \"username\"\n  | \"password\"\n  | \"totp\"\n  | \"cardNumber\"\n  | \"securityCode\"\n  | \"email\"\n  | \"phone\"\n  | \"address\"\n  | \"secureNote\"\n  | \"hiddenField\"\n  | \"privateKey\"\n  | \"publicKey\"\n  | \"keyFingerprint\";\n\ntype CopyActionInfo = {\n  /**\n   * The i18n key for the type of field being copied. Will be used to display a toast message.\n   */\n  typeI18nKey: string;\n\n  /**\n   * Whether the field is protected and requires password re-prompting before being copied.\n   */\n  protected: boolean;\n\n  /**\n   * Optional event to collect when the field is copied.\n   */\n  event?: EventType;\n};\n\nconst CopyActions: Record<CopyAction, CopyActionInfo> = {\n  username: { typeI18nKey: \"username\", protected: false },\n  password: {\n    typeI18nKey: \"password\",\n    protected: true,\n    event: EventType.Cipher_ClientCopiedPassword,\n  },\n  totp: { typeI18nKey: \"verificationCodeTotp\", protected: true },\n  cardNumber: { typeI18nKey: \"number\", protected: true },\n  securityCode: {\n    typeI18nKey: \"securityCode\",\n    protected: true,\n    event: EventType.Cipher_ClientCopiedCardCode,\n  },\n  email: { typeI18nKey: \"email\", protected: true },\n  phone: { typeI18nKey: \"phone\", protected: true },\n  address: { typeI18nKey: \"address\", protected: true },\n  secureNote: { typeI18nKey: \"note\", protected: true },\n  privateKey: { typeI18nKey: \"sshPrivateKey\", protected: true },\n  publicKey: { typeI18nKey: \"sshPublicKey\", protected: true },\n  keyFingerprint: { typeI18nKey: \"sshFingerprint\", protected: true },\n  hiddenField: {\n    typeI18nKey: \"value\",\n    protected: true,\n    event: EventType.Cipher_ClientCopiedHiddenField,\n  },\n};\n\n@Injectable({\n  providedIn: \"root\",\n})\nexport class CopyCipherFieldService {\n  constructor(\n    private platformUtilsService: PlatformUtilsService,\n    private toastService: ToastService,\n    private eventCollectionService: EventCollectionService,\n    private passwordRepromptService: PasswordRepromptService,\n    private totpService: TotpService,\n    private i18nService: I18nService,\n    private billingAccountProfileStateService: BillingAccountProfileStateService,\n    private accountService: AccountService,\n  ) {}\n\n  /**\n   * Copy a field value from a cipher to the clipboard.\n   * @param valueToCopy The value to copy.\n   * @param actionType The type of field being copied.\n   * @param cipher The cipher containing the field to copy.\n   * @param skipReprompt Whether to skip password re-prompting.\n   *\n   * @returns Whether the field was copied successfully.\n   */\n  async copy(\n    valueToCopy: string,\n    actionType: CopyAction,\n    cipher: CipherView,\n    skipReprompt: boolean = false,\n  ): Promise<boolean> {\n    const action = CopyActions[actionType];\n    if (\n      !skipReprompt &&\n      cipher.reprompt !== CipherRepromptType.None &&\n      action.protected &&\n      !(await this.passwordRepromptService.showPasswordPrompt())\n    ) {\n      return false;\n    }\n\n    if (valueToCopy == null) {\n      return false;\n    }\n\n    if (actionType === \"totp\") {\n      if (!(await this.totpAllowed(cipher))) {\n        return false;\n      }\n      valueToCopy = await this.totpService.getCode(valueToCopy);\n    }\n\n    this.platformUtilsService.copyToClipboard(valueToCopy);\n    this.toastService.showToast({\n      variant: \"success\",\n      message: this.i18nService.t(\"valueCopied\", this.i18nService.t(action.typeI18nKey)),\n      title: \"\",\n    });\n\n    if (action.event !== undefined) {\n      await this.eventCollectionService.collect(\n        action.event,\n        cipher.id,\n        false,\n        cipher.organizationId,\n      );\n    }\n\n    return true;\n  }\n\n  /**\n   * Determines if TOTP generation is allowed for a cipher and user.\n   */\n  async totpAllowed(cipher: CipherView): Promise<boolean> {\n    const activeAccount = await firstValueFrom(this.accountService.activeAccount$);\n    if (!activeAccount?.id) {\n      return false;\n    }\n    return (\n      (cipher?.login?.hasTotp ?? false) &&\n      (cipher.organizationUseTotp ||\n        (await firstValueFrom(\n          this.billingAccountProfileStateService.hasPremiumFromAnySource$(activeAccount.id),\n        )))\n    );\n  }\n}\n","import { Directive, HostBinding, HostListener, Input, OnChanges, Optional } from \"@angular/core\";\n\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { MenuItemDirective } from \"@bitwarden/components\";\nimport { CopyAction, CopyCipherFieldService } from \"@bitwarden/vault\";\n\n/**\n * Directive to copy a specific field from a cipher on click. Uses the `CopyCipherFieldService` to\n * handle the copying of the field and any necessary password re-prompting or totp generation.\n *\n * Automatically disables the host element if the field to copy is not available or null.\n *\n * If the host element is a menu item, it will be hidden when disabled.\n *\n * @example\n * ```html\n * <button appCopyField=\"username\" [cipher]=\"cipher\">Copy Username</button>\n * ```\n */\n@Directive({\n  standalone: true,\n  selector: \"[appCopyField]\",\n})\nexport class CopyCipherFieldDirective implements OnChanges {\n  @Input({\n    alias: \"appCopyField\",\n    required: true,\n  })\n  action!: Exclude<CopyAction, \"hiddenField\">;\n\n  @Input({ required: true }) cipher!: CipherView;\n\n  constructor(\n    private copyCipherFieldService: CopyCipherFieldService,\n    @Optional() private menuItemDirective?: MenuItemDirective,\n  ) {}\n\n  @HostBinding(\"attr.disabled\")\n  protected disabled: boolean | null = null;\n\n  /**\n   * Hide the element if it is disabled and is a menu item.\n   * @private\n   */\n  @HostBinding(\"class.tw-hidden\")\n  private get hidden() {\n    return this.disabled && this.menuItemDirective;\n  }\n\n  @HostListener(\"click\")\n  async copy() {\n    const value = this.getValueToCopy();\n    await this.copyCipherFieldService.copy(value ?? \"\", this.action, this.cipher);\n  }\n\n  async ngOnChanges() {\n    await this.updateDisabledState();\n  }\n\n  private async updateDisabledState() {\n    this.disabled =\n      !this.cipher ||\n      !this.getValueToCopy() ||\n      (this.action === \"totp\" && !(await this.copyCipherFieldService.totpAllowed(this.cipher)))\n        ? true\n        : null;\n\n    // If the directive is used on a menu item, update the menu item to prevent keyboard navigation\n    if (this.menuItemDirective) {\n      this.menuItemDirective.disabled = this.disabled ?? false;\n    }\n  }\n\n  private getValueToCopy() {\n    switch (this.action) {\n      case \"username\":\n        return this.cipher.login?.username || this.cipher.identity?.username;\n      case \"password\":\n        return this.cipher.login?.password;\n      case \"totp\":\n        return this.cipher.login?.totp;\n      case \"cardNumber\":\n        return this.cipher.card?.number;\n      case \"securityCode\":\n        return this.cipher.card?.code;\n      case \"email\":\n        return this.cipher.identity?.email;\n      case \"phone\":\n        return this.cipher.identity?.phone;\n      case \"address\":\n        return this.cipher.identity?.fullAddressForCopy;\n      case \"secureNote\":\n        return this.cipher.notes;\n      case \"privateKey\":\n        return this.cipher.sshKey?.privateKey;\n      case \"publicKey\":\n        return this.cipher.sshKey?.publicKey;\n      case \"keyFingerprint\":\n        return this.cipher.sshKey?.keyFingerprint;\n      default:\n        return null;\n    }\n  }\n}\n","import { Directive, Input, OnDestroy, TemplateRef, ViewContainerRef } from \"@angular/core\";\nimport { Subject, takeUntil } from \"rxjs\";\n\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { CipherAuthorizationService } from \"@bitwarden/common/vault/services/cipher-authorization.service\";\n\n/**\n * Only shows the element if the user can delete the cipher.\n */\n@Directive({\n  selector: \"[appCanDeleteCipher]\",\n  standalone: true,\n})\nexport class CanDeleteCipherDirective implements OnDestroy {\n  private destroy$ = new Subject<void>();\n\n  @Input(\"appCanDeleteCipher\") set cipher(cipher: CipherView) {\n    this.viewContainer.clear();\n\n    this.cipherAuthorizationService\n      .canDeleteCipher$(cipher)\n      .pipe(takeUntil(this.destroy$))\n      .subscribe((canDelete: boolean) => {\n        if (canDelete) {\n          this.viewContainer.createEmbeddedView(this.templateRef);\n        } else {\n          this.viewContainer.clear();\n        }\n      });\n  }\n\n  constructor(\n    private templateRef: TemplateRef<any>,\n    private viewContainer: ViewContainerRef,\n    private cipherAuthorizationService: CipherAuthorizationService,\n  ) {}\n\n  ngOnDestroy() {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n}\n","import { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogService,\n  IconButtonModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\n@Component({\n  standalone: true,\n  selector: \"app-delete-attachment\",\n  templateUrl: \"./delete-attachment.component.html\",\n  imports: [AsyncActionsModule, CommonModule, JslibModule, ButtonModule, IconButtonModule],\n})\nexport class DeleteAttachmentComponent {\n  /** Id of the cipher associated with the attachment */\n  @Input({ required: true }) cipherId!: string;\n\n  /** The attachment that is can be deleted */\n  @Input({ required: true }) attachment!: AttachmentView;\n\n  /** Emits when the attachment is successfully deleted */\n  @Output() onDeletionSuccess = new EventEmitter<void>();\n\n  constructor(\n    private toastService: ToastService,\n    private i18nService: I18nService,\n    private cipherService: CipherService,\n    private logService: LogService,\n    private dialogService: DialogService,\n  ) {}\n\n  delete = async () => {\n    const confirmed = await this.dialogService.openSimpleDialog({\n      title: { key: \"deleteAttachment\" },\n      content: { key: \"permanentlyDeleteAttachmentConfirmation\" },\n      type: \"warning\",\n    });\n\n    if (!confirmed) {\n      return;\n    }\n\n    try {\n      await this.cipherService.deleteAttachmentWithServer(this.cipherId, this.attachment.id);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: \"\",\n        message: this.i18nService.t(\"deletedAttachment\"),\n      });\n\n      this.onDeletionSuccess.emit();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  };\n}\n","<button\n  bitIconButton=\"bwi-trash\"\n  buttonType=\"danger\"\n  size=\"small\"\n  type=\"button\"\n  class=\"tw-border-transparent\"\n  [appA11yTitle]=\"'deleteAttachmentName' | i18n: attachment.fileName\"\n  [bitAction]=\"delete\"\n></button>\n","<h2 class=\"tw-sr-only\" id=\"attachments\">{{ \"attachments\" | i18n }}</h2>\n\n<ul *ngIf=\"cipher?.attachments\" aria-labelledby=\"attachments\" class=\"tw-list-none tw-pl-0\">\n  <li *ngFor=\"let attachment of cipher.attachments\">\n    <bit-item>\n      <bit-item-content>\n        <span data-testid=\"file-name\" [title]=\"attachment.fileName\">{{ attachment.fileName }}</span>\n        <span slot=\"secondary\" data-testid=\"file-size\">{{ attachment.sizeName }}</span>\n      </bit-item-content>\n      <ng-container slot=\"end\">\n        <bit-item-action>\n          <app-download-attachment\n            [cipher]=\"cipher\"\n            [attachment]=\"attachment\"\n          ></app-download-attachment>\n        </bit-item-action>\n        <bit-item-action>\n          <app-delete-attachment\n            [cipherId]=\"cipher.id\"\n            [attachment]=\"attachment\"\n            (onDeletionSuccess)=\"removeAttachment(attachment)\"\n          ></app-delete-attachment>\n        </bit-item-action>\n      </ng-container>\n    </bit-item>\n  </li>\n</ul>\n\n<form [id]=\"attachmentFormId\" [formGroup]=\"attachmentForm\" [bitSubmit]=\"submit\">\n  <bit-card>\n    <label for=\"file\" bitTypography=\"body2\" class=\"tw-block tw-text-muted tw-px-1 tw-pb-1.5\">\n      {{ \"addAttachment\" | i18n }}\n    </label>\n    <div class=\"tw-relative\">\n      <!-- Input elements are notoriously difficult to style, --->\n      <!-- The native `<input>` will be used for screen readers -->\n      <!-- Visual & keyboard users will interact with the styled button element -->\n      <input\n        #fileInput\n        class=\"tw-sr-only\"\n        type=\"file\"\n        id=\"file\"\n        name=\"file\"\n        aria-describedby=\"fileHelp\"\n        tabindex=\"-1\"\n        required\n        (change)=\"onFileChange($event)\"\n      />\n      <div class=\"tw-flex tw-gap-2 tw-items-center\" aria-hidden=\"true\">\n        <button\n          bitButton\n          buttonType=\"secondary\"\n          type=\"button\"\n          (click)=\"fileInput.click()\"\n          class=\"tw-whitespace-nowrap\"\n        >\n          {{ \"chooseFile\" | i18n }}\n        </button>\n        <p bitTypography=\"body2\" class=\"tw-text-muted tw-mb-0\">\n          {{\n            this.attachmentForm.controls.file?.value\n              ? this.attachmentForm.controls.file.value.name\n              : (\"noFileChosen\" | i18n)\n          }}\n        </p>\n      </div>\n    </div>\n    <p id=\"fileHelp\" bitTypography=\"helper\" class=\"tw-text-muted tw-px-1 tw-pt-1 tw-mb-0\">\n      {{ \"maxFileSizeSansPunctuation\" | i18n }}\n    </p>\n  </bit-card>\n</form>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterViewInit,\n  Component,\n  DestroyRef,\n  ElementRef,\n  EventEmitter,\n  Input,\n  OnInit,\n  Output,\n  ViewChild,\n  inject,\n} from \"@angular/core\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport {\n  FormBuilder,\n  FormControl,\n  FormGroup,\n  ReactiveFormsModule,\n  Validators,\n} from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { CipherId, UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { AttachmentView } from \"@bitwarden/common/vault/models/view/attachment.view\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  AsyncActionsModule,\n  BitSubmitDirective,\n  ButtonComponent,\n  ButtonModule,\n  CardComponent,\n  ItemModule,\n  ToastService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nimport { DownloadAttachmentComponent } from \"../../../components/download-attachment/download-attachment.component\";\n\nimport { DeleteAttachmentComponent } from \"./delete-attachment/delete-attachment.component\";\n\ntype CipherAttachmentForm = FormGroup<{\n  file: FormControl<File | null>;\n}>;\n\n@Component({\n  standalone: true,\n  selector: \"app-cipher-attachments\",\n  templateUrl: \"./cipher-attachments.component.html\",\n  imports: [\n    AsyncActionsModule,\n    ButtonModule,\n    CommonModule,\n    ItemModule,\n    JslibModule,\n    ReactiveFormsModule,\n    TypographyModule,\n    CardComponent,\n    DeleteAttachmentComponent,\n    DownloadAttachmentComponent,\n  ],\n})\nexport class CipherAttachmentsComponent implements OnInit, AfterViewInit {\n  /** `id` associated with the form element */\n  static attachmentFormID = \"attachmentForm\";\n\n  /** Reference to the file HTMLInputElement */\n  @ViewChild(\"fileInput\", { read: ElementRef }) private fileInput: ElementRef<HTMLInputElement>;\n\n  /** Reference to the BitSubmitDirective */\n  @ViewChild(BitSubmitDirective) bitSubmit: BitSubmitDirective;\n\n  /** The `id` of the cipher in context */\n  @Input({ required: true }) cipherId: CipherId;\n\n  /** An optional submit button, whose loading/disabled state will be tied to the form state. */\n  @Input() submitBtn?: ButtonComponent;\n\n  /** Emits after a file has been successfully uploaded */\n  @Output() onUploadSuccess = new EventEmitter<void>();\n\n  /** Emits after a file has been successfully removed */\n  @Output() onRemoveSuccess = new EventEmitter<void>();\n\n  cipher: CipherView;\n\n  attachmentForm: CipherAttachmentForm = this.formBuilder.group({\n    file: new FormControl<File>(null, [Validators.required]),\n  });\n\n  private cipherDomain: Cipher;\n  private activeUserId: UserId;\n  private destroy$ = inject(DestroyRef);\n\n  constructor(\n    private cipherService: CipherService,\n    private i18nService: I18nService,\n    private formBuilder: FormBuilder,\n    private logService: LogService,\n    private toastService: ToastService,\n    private accountService: AccountService,\n  ) {\n    this.attachmentForm.statusChanges.pipe(takeUntilDestroyed()).subscribe((status) => {\n      if (!this.submitBtn) {\n        return;\n      }\n\n      this.submitBtn.disabled = status !== \"VALID\";\n    });\n  }\n\n  async ngOnInit(): Promise<void> {\n    this.cipherDomain = await this.cipherService.get(this.cipherId);\n    this.activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    this.cipher = await this.cipherDomain.decrypt(\n      await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain, this.activeUserId),\n    );\n\n    // Update the initial state of the submit button\n    if (this.submitBtn) {\n      this.submitBtn.disabled = !this.attachmentForm.valid;\n    }\n  }\n\n  ngAfterViewInit(): void {\n    this.bitSubmit.loading$.pipe(takeUntilDestroyed(this.destroy$)).subscribe((loading) => {\n      if (!this.submitBtn) {\n        return;\n      }\n\n      this.submitBtn.loading = loading;\n    });\n\n    this.bitSubmit.disabled$.pipe(takeUntilDestroyed(this.destroy$)).subscribe((disabled) => {\n      if (!this.submitBtn) {\n        return;\n      }\n\n      this.submitBtn.disabled = disabled;\n    });\n  }\n\n  /** Reference the `id` via the static property */\n  get attachmentFormId(): string {\n    return CipherAttachmentsComponent.attachmentFormID;\n  }\n\n  /** Updates the form value when a file is selected */\n  onFileChange(event: Event): void {\n    const fileInputEl = event.target as HTMLInputElement;\n\n    if (fileInputEl.files && fileInputEl.files.length > 0) {\n      this.attachmentForm.controls.file.setValue(fileInputEl.files[0]);\n    }\n  }\n\n  /** Save the attachments to the cipher */\n  submit = async () => {\n    const file = this.attachmentForm.value.file;\n    if (file === null) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"selectFile\"),\n      });\n      return;\n    }\n\n    if (file.size > 524288000) {\n      // 500 MB\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"maxFileSize\"),\n      });\n      return;\n    }\n\n    try {\n      this.cipherDomain = await this.cipherService.saveAttachmentWithServer(\n        this.cipherDomain,\n        file,\n        this.activeUserId,\n      );\n\n      // re-decrypt the cipher to update the attachments\n      this.cipher = await this.cipherDomain.decrypt(\n        await this.cipherService.getKeyForCipherKeyDecryption(this.cipherDomain, this.activeUserId),\n      );\n\n      // Reset reactive form and input element\n      this.fileInput.nativeElement.value = \"\";\n      this.attachmentForm.controls.file.setValue(null);\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"attachmentSaved\"),\n      });\n\n      this.onUploadSuccess.emit();\n    } catch (e) {\n      this.logService.error(e);\n    }\n  };\n\n  /** Removes the attachment from the cipher */\n  removeAttachment(attachment: AttachmentView) {\n    const index = this.cipher.attachments.indexOf(attachment);\n\n    if (index > -1) {\n      this.cipher.attachments.splice(index, 1);\n    }\n\n    this.onRemoveSuccess.emit();\n  }\n}\n","import { Injectable } from \"@angular/core\";\n\nimport {\n  PasswordGenerationServiceAbstraction,\n  UsernameGenerationServiceAbstraction,\n} from \"@bitwarden/generator-legacy\";\n\nimport { CipherFormGenerationService } from \"../abstractions/cipher-form-generation.service\";\n\n@Injectable()\nexport class DefaultCipherFormGenerationService implements CipherFormGenerationService {\n  constructor(\n    private passwordGenerationService: PasswordGenerationServiceAbstraction,\n    private usernameGenerationService: UsernameGenerationServiceAbstraction,\n  ) {}\n\n  async generatePassword(): Promise<string> {\n    const [options] = await this.passwordGenerationService.getOptions();\n    return await this.passwordGenerationService.generatePassword(options);\n  }\n\n  async generateUsername(): Promise<string> {\n    const options = await this.usernameGenerationService.getOptions();\n    return await this.usernameGenerationService.generateUsername(options);\n  }\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject, Injectable } from \"@angular/core\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { ApiService } from \"@bitwarden/common/abstractions/api.service\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\n\nimport { CipherFormConfig } from \"../abstractions/cipher-form-config.service\";\nimport { CipherFormService } from \"../abstractions/cipher-form.service\";\n\nfunction isSetEqual(a: Set<string>, b: Set<string>) {\n  return a.size === b.size && [...a].every((value) => b.has(value));\n}\n\n@Injectable()\nexport class DefaultCipherFormService implements CipherFormService {\n  private cipherService: CipherService = inject(CipherService);\n  private accountService: AccountService = inject(AccountService);\n  private apiService: ApiService = inject(ApiService);\n\n  async decryptCipher(cipher: Cipher): Promise<CipherView> {\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    return await cipher.decrypt(\n      await this.cipherService.getKeyForCipherKeyDecryption(cipher, activeUserId),\n    );\n  }\n\n  async saveCipher(cipher: CipherView, config: CipherFormConfig): Promise<CipherView> {\n    // Passing the original cipher is important here as it is responsible for appending to password history\n    const activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n    const encryptedCipher = await this.cipherService.encrypt(\n      cipher,\n      activeUserId,\n      null,\n      null,\n      config.originalCipher ?? null,\n    );\n\n    let savedCipher: Cipher;\n\n    // Creating a new cipher\n    if (cipher.id == null) {\n      savedCipher = await this.cipherService.createWithServer(encryptedCipher, config.admin);\n      return await savedCipher.decrypt(\n        await this.cipherService.getKeyForCipherKeyDecryption(savedCipher, activeUserId),\n      );\n    }\n\n    if (config.originalCipher == null) {\n      throw new Error(\"Original cipher is required for updating an existing cipher\");\n    }\n\n    // Updating an existing cipher\n\n    const originalCollectionIds = new Set(config.originalCipher.collectionIds ?? []);\n    const newCollectionIds = new Set(cipher.collectionIds ?? []);\n\n    // If the collectionIds are the same, update the cipher normally\n    if (isSetEqual(originalCollectionIds, newCollectionIds)) {\n      savedCipher = await this.cipherService.updateWithServer(encryptedCipher, config.admin);\n    } else {\n      // Updating a cipher with collection changes is not supported with a single request currently\n      // First update the cipher with the original collectionIds\n      encryptedCipher.collectionIds = config.originalCipher.collectionIds;\n      await this.cipherService.updateWithServer(\n        encryptedCipher,\n        config.admin || originalCollectionIds.size === 0,\n      );\n\n      // Then save the new collection changes separately\n      encryptedCipher.collectionIds = cipher.collectionIds;\n\n      if (config.admin || originalCollectionIds.size === 0) {\n        // When using an admin config or the cipher was unassigned, update collections as an admin\n        savedCipher = await this.cipherService.saveCollectionsWithServerAdmin(encryptedCipher);\n      } else {\n        savedCipher = await this.cipherService.saveCollectionsWithServer(encryptedCipher);\n      }\n    }\n\n    // Its possible the cipher was made no longer available due to collection assignment changes\n    // e.g. The cipher was moved to a collection that the user no longer has access to\n    if (savedCipher == null) {\n      return null;\n    }\n\n    return await savedCipher.decrypt(\n      await this.cipherService.getKeyForCipherKeyDecryption(savedCipher, activeUserId),\n    );\n  }\n}\n","import { NgModule } from \"@angular/core\";\n\nimport { CipherFormGenerationService } from \"./abstractions/cipher-form-generation.service\";\nimport { CipherFormService } from \"./abstractions/cipher-form.service\";\nimport { CipherFormComponent } from \"./components/cipher-form.component\";\nimport { DefaultCipherFormGenerationService } from \"./services/default-cipher-form-generation.service\";\nimport { DefaultCipherFormService } from \"./services/default-cipher-form.service\";\n\n@NgModule({\n  imports: [CipherFormComponent],\n  providers: [\n    {\n      provide: CipherFormService,\n      useClass: DefaultCipherFormService,\n    },\n    {\n      provide: CipherFormGenerationService,\n      useClass: DefaultCipherFormGenerationService,\n    },\n  ],\n  exports: [CipherFormComponent],\n})\nexport class CipherFormModule {}\n","import { CollectionView } from \"@bitwarden/admin-console/common\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { CipherId, CollectionId, OrganizationId } from \"@bitwarden/common/types/guid\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\nimport { FolderView } from \"@bitwarden/common/vault/models/view/folder.view\";\n\n/**\n * The mode of the add/edit form.\n * - `add` - The form is creating a new cipher.\n * - `edit` - The form is editing an existing cipher.\n * - `partial-edit` - The form is editing an existing cipher, but only the favorite/folder fields\n * - `clone` - The form is creating a new cipher that is a clone of an existing cipher.\n */\nexport type CipherFormMode = \"add\" | \"edit\" | \"partial-edit\" | \"clone\";\n\n/**\n * Optional initial values for the form.\n */\nexport type OptionalInitialValues = {\n  folderId?: string;\n  organizationId?: OrganizationId;\n  collectionIds?: CollectionId[];\n  loginUri?: string;\n  username?: string;\n  password?: string;\n  name?: string;\n};\n\n/**\n * Base configuration object for the cipher form. Includes all common fields.\n */\ntype BaseCipherFormConfig = {\n  /**\n   * The mode of the form.\n   */\n  mode: CipherFormMode;\n\n  /**\n   * The type of cipher to create/edit.\n   */\n  cipherType: CipherType;\n\n  /**\n   * Flag to indicate the form should submit to admin endpoints that have different permission checks. If the\n   * user is not an admin or performing an action that requires admin permissions, this should be false.\n   */\n  admin: boolean;\n\n  /**\n   * Flag to indicate if the user is allowed to create ciphers in their own Vault. If false, configuration must\n   * supply a list of organizations that the user can create ciphers in.\n   */\n  allowPersonalOwnership: boolean;\n\n  /**\n   * The original cipher that is being edited or cloned. This can be undefined when creating a new cipher.\n   */\n  originalCipher?: Cipher;\n\n  /**\n   * Optional initial values for the form when opening the cipher form.\n   * Useful when creating a new cipher in a filtered view or modifying a cipher with values from another source (e.g. the notification bar in Browser)\n   */\n  initialValues?: OptionalInitialValues;\n\n  /**\n   * The list of collections that the user has visibility to. This list should include read-only collections as they\n   * can still be displayed in the component for reference.\n   */\n  collections: CollectionView[];\n\n  /**\n   * The list of folders for the current user. Should include the \"No Folder\" option with a `null` id.\n   */\n  folders: FolderView[];\n\n  /**\n   * List of organizations that the user can create ciphers for.\n   */\n  organizations?: Organization[];\n\n  /** Hides the fields that are only applicable to individuals, useful in the Admin Console where folders aren't applicable */\n  hideIndividualVaultFields?: true;\n\n  /** True when the config is built within the context of the Admin Console */\n  isAdminConsole?: true;\n};\n\n/**\n * Configuration object for the cipher form when editing/cloning an existing cipher.\n */\ntype ExistingCipherConfig = BaseCipherFormConfig & {\n  mode: \"edit\" | \"partial-edit\" | \"clone\";\n  originalCipher: Cipher;\n};\n\n/**\n * Configuration object for the cipher form when creating a completely new cipher.\n */\ntype CreateNewCipherConfig = BaseCipherFormConfig & {\n  mode: \"add\";\n};\n\ntype CombinedAddEditConfig = ExistingCipherConfig | CreateNewCipherConfig;\n\n/**\n * Configuration object for the cipher form when personal ownership is allowed.\n */\ntype PersonalOwnershipAllowed = CombinedAddEditConfig & {\n  allowPersonalOwnership: true;\n};\n\n/**\n * Configuration object for the cipher form when personal ownership is not allowed.\n * Organizations must be provided.\n */\ntype PersonalOwnershipNotAllowed = CombinedAddEditConfig & {\n  allowPersonalOwnership: false;\n  organizations: Organization[];\n};\n\n/**\n * Configuration object for the cipher form.\n * Determines the behavior of the form and the controls that are displayed/enabled.\n */\nexport type CipherFormConfig = PersonalOwnershipAllowed | PersonalOwnershipNotAllowed;\n\n/**\n * Service responsible for building the configuration object for the cipher form.\n */\nexport abstract class CipherFormConfigService {\n  /**\n   * Builds the configuration for the cipher form using the specified mode, cipherId, and cipherType.\n   * The other configuration fields will be fetched from their respective services.\n   * @param mode\n   * @param cipherId\n   * @param cipherType\n   */\n  abstract buildConfig(\n    mode: CipherFormMode,\n    cipherId?: CipherId,\n    cipherType?: CipherType,\n  ): Promise<CipherFormConfig>;\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { inject, Injectable } from \"@angular/core\";\nimport { combineLatest, filter, firstValueFrom, map, switchMap } from \"rxjs\";\n\nimport { CollectionService } from \"@bitwarden/admin-console/common\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { PolicyService } from \"@bitwarden/common/admin-console/abstractions/policy/policy.service.abstraction\";\nimport { OrganizationUserStatusType, PolicyType } from \"@bitwarden/common/admin-console/enums\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { CipherId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { FolderService } from \"@bitwarden/common/vault/abstractions/folder/folder.service.abstraction\";\nimport { CipherType } from \"@bitwarden/common/vault/enums\";\nimport { Cipher } from \"@bitwarden/common/vault/models/domain/cipher\";\n\nimport {\n  CipherFormConfig,\n  CipherFormConfigService,\n  CipherFormMode,\n} from \"../abstractions/cipher-form-config.service\";\n\n/**\n * Default implementation of the `CipherFormConfigService`. This service should suffice for most use cases, however\n * the admin console may need to provide a custom implementation to support admin/custom users who have access to\n * collections that are not part of their normal sync data.\n */\n@Injectable()\nexport class DefaultCipherFormConfigService implements CipherFormConfigService {\n  private policyService: PolicyService = inject(PolicyService);\n  private organizationService: OrganizationService = inject(OrganizationService);\n  private cipherService: CipherService = inject(CipherService);\n  private folderService: FolderService = inject(FolderService);\n  private collectionService: CollectionService = inject(CollectionService);\n  private accountService = inject(AccountService);\n\n  private activeUserId$ = this.accountService.activeAccount$.pipe(map((a) => a?.id));\n\n  async buildConfig(\n    mode: CipherFormMode,\n    cipherId?: CipherId,\n    cipherType?: CipherType,\n  ): Promise<CipherFormConfig> {\n    const activeUserId = await firstValueFrom(this.activeUserId$);\n\n    const [organizations, collections, allowPersonalOwnership, folders, cipher] =\n      await firstValueFrom(\n        combineLatest([\n          this.organizations$,\n          this.collectionService.encryptedCollections$.pipe(\n            switchMap((c) =>\n              this.collectionService.decryptedCollections$.pipe(\n                filter((d) => d.length === c.length), // Ensure all collections have been decrypted\n              ),\n            ),\n          ),\n          this.allowPersonalOwnership$,\n          this.folderService.folders$(activeUserId).pipe(\n            switchMap((f) =>\n              this.folderService.folderViews$(activeUserId).pipe(\n                filter((d) => d.length - 1 === f.length), // -1 for \"No Folder\" in folderViews$\n              ),\n            ),\n          ),\n          this.getCipher(cipherId),\n        ]),\n      );\n\n    return {\n      mode,\n      cipherType: cipher?.type ?? cipherType ?? CipherType.Login,\n      admin: false,\n      allowPersonalOwnership,\n      originalCipher: cipher,\n      collections,\n      organizations,\n      folders,\n    };\n  }\n\n  private organizations$ = this.organizationService.organizations$.pipe(\n    map((orgs) =>\n      orgs.filter(\n        (o) => o.isMember && o.enabled && o.status === OrganizationUserStatusType.Confirmed,\n      ),\n    ),\n  );\n\n  private allowPersonalOwnership$ = this.policyService\n    .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)\n    .pipe(map((p) => !p));\n\n  private getCipher(id?: CipherId): Promise<Cipher | null> {\n    if (id == null) {\n      return Promise.resolve(null);\n    }\n    return this.cipherService.get(id);\n  }\n}\n","<bit-toggle-group\n  fullWidth\n  class=\"tw-mb-4\"\n  [selected]=\"credentialType$ | async\"\n  (selectedChange)=\"onCredentialTypeChanged($event)\"\n  attr.aria-label=\"{{ 'type' | i18n }}\"\n>\n  <bit-toggle *ngFor=\"let option of passwordOptions$ | async\" [value]=\"option.value\">\n    {{ option.label }}\n  </bit-toggle>\n</bit-toggle-group>\n<bit-card class=\"tw-flex tw-justify-between tw-mb-4\">\n  <div class=\"tw-grow tw-flex tw-items-center\">\n    <bit-color-password class=\"tw-font-mono\" [password]=\"value$ | async\"></bit-color-password>\n  </div>\n  <div class=\"tw-flex tw-items-center tw-space-x-1\">\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-generate\"\n      buttonType=\"main\"\n      (click)=\"generate('user request')\"\n      [appA11yTitle]=\"credentialTypeGenerateLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    >\n      {{ credentialTypeGenerateLabel$ | async }}\n    </button>\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-clone\"\n      buttonType=\"main\"\n      showToast\n      [appA11yTitle]=\"credentialTypeCopyLabel$ | async\"\n      [appCopyClick]=\"value$ | async\"\n      [valueLabel]=\"credentialTypeLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    ></button>\n  </div>\n</bit-card>\n<tools-password-settings\n  class=\"tw-mt-6\"\n  *ngIf=\"(algorithm$ | async)?.id === 'password'\"\n  [userId]=\"this.userId$ | async\"\n  [disableMargin]=\"disableMargin\"\n  (onUpdated)=\"generate('password settings')\"\n/>\n<tools-passphrase-settings\n  class=\"tw-mt-6\"\n  *ngIf=\"(algorithm$ | async)?.id === 'passphrase'\"\n  [userId]=\"this.userId$ | async\"\n  (onUpdated)=\"generate('passphrase settings')\"\n  [disableMargin]=\"disableMargin\"\n/>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { Component, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport {\n  BehaviorSubject,\n  catchError,\n  distinctUntilChanged,\n  filter,\n  map,\n  ReplaySubject,\n  Subject,\n  switchMap,\n  takeUntil,\n  withLatestFrom,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService, Option } from \"@bitwarden/components\";\nimport {\n  CredentialGeneratorService,\n  Generators,\n  GeneratedCredential,\n  CredentialAlgorithm,\n  isPasswordAlgorithm,\n  AlgorithmInfo,\n  isSameAlgorithm,\n} from \"@bitwarden/generator-core\";\nimport { GeneratorHistoryService } from \"@bitwarden/generator-history\";\n\n/** Options group for passwords */\n@Component({\n  selector: \"tools-password-generator\",\n  templateUrl: \"password-generator.component.html\",\n})\nexport class PasswordGeneratorComponent implements OnInit, OnDestroy {\n  constructor(\n    private generatorService: CredentialGeneratorService,\n    private generatorHistoryService: GeneratorHistoryService,\n    private toastService: ToastService,\n    private logService: LogService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n    private zone: NgZone,\n  ) {}\n\n  /** Binds the component to a specific user's settings.\n   *  When this input is not provided, the form binds to the active\n   *  user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Removes bottom margin, passed to downstream components */\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n\n  /** tracks the currently selected credential type */\n  protected credentialType$ = new BehaviorSubject<CredentialAlgorithm>(null);\n\n  /** Emits the last generated value. */\n  protected readonly value$ = new BehaviorSubject<string>(\"\");\n\n  /** Emits when the userId changes */\n  protected readonly userId$ = new BehaviorSubject<UserId>(null);\n\n  /** Emits when a new credential is requested */\n  private readonly generate$ = new Subject<string>();\n\n  /** Request a new value from the generator\n   * @param requestor a label used to trace generation request\n   *  origin in the debugger.\n   */\n  protected async generate(requestor: string) {\n    this.generate$.next(requestor);\n  }\n\n  /** Tracks changes to the selected credential type\n   * @param type the new credential type\n   */\n  protected onCredentialTypeChanged(type: CredentialAlgorithm) {\n    // break subscription cycle\n    if (this.credentialType$.value !== type) {\n      this.zone.run(() => {\n        this.credentialType$.next(type);\n      });\n    }\n  }\n\n  /** Emits credentials created from a generation request. */\n  @Output()\n  readonly onGenerated = new EventEmitter<GeneratedCredential>();\n\n  /** emits algorithm info when the selected algorithm changes */\n  @Output()\n  readonly onAlgorithm = new EventEmitter<AlgorithmInfo>();\n\n  async ngOnInit() {\n    if (this.userId) {\n      this.userId$.next(this.userId);\n    } else {\n      this.accountService.activeAccount$\n        .pipe(\n          map((acct) => acct.id),\n          distinctUntilChanged(),\n          takeUntil(this.destroyed),\n        )\n        .subscribe(this.userId$);\n    }\n\n    this.generatorService\n      .algorithms$(\"password\", { userId$: this.userId$ })\n      .pipe(\n        map((algorithms) => this.toOptions(algorithms)),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(this.passwordOptions$);\n\n    // wire up the generator\n    this.algorithm$\n      .pipe(\n        filter((algorithm) => !!algorithm),\n        switchMap((algorithm) => this.typeToGenerator$(algorithm.id)),\n        catchError((error: unknown, generator) => {\n          if (typeof error === \"string\") {\n            this.toastService.showToast({\n              message: error,\n              variant: \"error\",\n              title: \"\",\n            });\n          } else {\n            this.logService.error(error);\n          }\n\n          // continue with origin stream\n          return generator;\n        }),\n        withLatestFrom(this.userId$),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([generated, userId]) => {\n        this.generatorHistoryService\n          .track(userId, generated.credential, generated.category, generated.generationDate)\n          .catch((e: unknown) => {\n            this.logService.error(e);\n          });\n\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.onGenerated.next(generated);\n          this.value$.next(generated.credential);\n        });\n      });\n\n    // assume the last-visible generator algorithm is the user's preferred one\n    const preferences = await this.generatorService.preferences({ singleUserId$: this.userId$ });\n    this.credentialType$\n      .pipe(\n        filter((type) => !!type),\n        withLatestFrom(preferences),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([algorithm, preference]) => {\n        if (isPasswordAlgorithm(algorithm)) {\n          preference.password.algorithm = algorithm;\n          preference.password.updated = new Date();\n        } else {\n          return;\n        }\n\n        preferences.next(preference);\n      });\n\n    // update active algorithm\n    preferences\n      .pipe(\n        map(({ password }) => this.generatorService.algorithm(password.algorithm)),\n        distinctUntilChanged((prev, next) => isSameAlgorithm(prev?.id, next?.id)),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((algorithm) => {\n        // update navigation\n        this.onCredentialTypeChanged(algorithm.id);\n\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.algorithm$.next(algorithm);\n          this.onAlgorithm.next(algorithm);\n        });\n      });\n\n    // generate on load unless the generator prohibits it\n    this.algorithm$.pipe(takeUntil(this.destroyed)).subscribe((a) => {\n      this.zone.run(() => {\n        if (!a || a.onlyOnRequest) {\n          this.value$.next(\"-\");\n        } else {\n          this.generate(\"autogenerate\").catch((e: unknown) => this.logService.error(e));\n        }\n      });\n    });\n  }\n\n  private typeToGenerator$(type: CredentialAlgorithm) {\n    const dependencies = {\n      on$: this.generate$,\n      userId$: this.userId$,\n    };\n\n    switch (type) {\n      case \"password\":\n        return this.generatorService.generate$(Generators.password, dependencies);\n\n      case \"passphrase\":\n        return this.generatorService.generate$(Generators.passphrase, dependencies);\n      default:\n        throw new Error(`Invalid generator type: \"${type}\"`);\n    }\n  }\n\n  /** Lists the credential types supported by the component. */\n  protected passwordOptions$ = new BehaviorSubject<Option<CredentialAlgorithm>[]>([]);\n\n  /** tracks the currently selected credential type */\n  protected algorithm$ = new ReplaySubject<AlgorithmInfo>(1);\n\n  /**\n   * Emits the copy button aria-label respective of the selected credential type\n   */\n  protected credentialTypeCopyLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ copy }) => copy),\n  );\n\n  /**\n   * Emits the generate button aria-label respective of the selected credential type\n   */\n  protected credentialTypeGenerateLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generate }) => generate),\n  );\n\n  /**\n   * Emits the copy credential toast respective of the selected credential type\n   */\n  protected credentialTypeLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generatedValue }) => generatedValue),\n  );\n\n  private toOptions(algorithms: AlgorithmInfo[]) {\n    const options: Option<CredentialAlgorithm>[] = algorithms.map((algorithm) => ({\n      value: algorithm.id,\n      label: algorithm.name,\n    }));\n\n    return options;\n  }\n\n  private readonly destroyed = new Subject<void>();\n  ngOnDestroy(): void {\n    // tear down subscriptions\n    this.destroyed.complete();\n\n    // finalize subjects\n    this.generate$.complete();\n    this.value$.complete();\n\n    // finalize component bindings\n    this.onGenerated.complete();\n  }\n}\n","<bit-card class=\"tw-flex tw-justify-between tw-mb-4\">\n  <div class=\"tw-grow tw-flex tw-items-center\">\n    <bit-color-password class=\"tw-font-mono\" [password]=\"value$ | async\"></bit-color-password>\n  </div>\n  <div class=\"tw-flex tw-items-center tw-space-x-1\">\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-generate\"\n      buttonType=\"main\"\n      (click)=\"generate('user request')\"\n      [appA11yTitle]=\"credentialTypeGenerateLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    >\n      {{ credentialTypeGenerateLabel$ | async }}\n    </button>\n    <button\n      type=\"button\"\n      bitIconButton=\"bwi-clone\"\n      buttonType=\"main\"\n      showToast\n      [appA11yTitle]=\"credentialTypeCopyLabel$ | async\"\n      [appCopyClick]=\"value$ | async\"\n      [valueLabel]=\"credentialTypeLabel$ | async\"\n      [disabled]=\"!(algorithm$ | async)\"\n    >\n      {{ credentialTypeCopyLabel$ | async }}\n    </button>\n  </div>\n</bit-card>\n<bit-section [disableMargin]=\"disableMargin\">\n  <bit-section-header>\n    <h2 bitTypography=\"h6\">{{ \"options\" | i18n }}</h2>\n  </bit-section-header>\n  <div [ngClass]=\"{ 'tw-mb-4': !disableMargin }\">\n    <bit-card>\n      <form class=\"box\" [formGroup]=\"username\" class=\"tw-container\">\n        <bit-form-field>\n          <bit-label>{{ \"type\" | i18n }}</bit-label>\n          <bit-select\n            [items]=\"typeOptions$ | async\"\n            formControlName=\"nav\"\n            data-testid=\"username-type\"\n          >\n          </bit-select>\n          <bit-hint *ngIf=\"!!(credentialTypeHint$ | async)\">{{\n            credentialTypeHint$ | async\n          }}</bit-hint>\n        </bit-form-field>\n      </form>\n      <form *ngIf=\"showForwarder$ | async\" [formGroup]=\"forwarder\" class=\"box tw-container\">\n        <bit-form-field>\n          <bit-label>{{ \"service\" | i18n }}</bit-label>\n          <bit-select\n            [items]=\"forwarderOptions$ | async\"\n            formControlName=\"nav\"\n            data-testid=\"email-forwarding-service\"\n          >\n          </bit-select>\n        </bit-form-field>\n      </form>\n      <tools-catchall-settings\n        *ngIf=\"(algorithm$ | async)?.id === 'catchall'\"\n        [userId]=\"this.userId$ | async\"\n        (onUpdated)=\"generate('catchall settings')\"\n      />\n      <tools-forwarder-settings\n        *ngIf=\"!!(forwarderId$ | async)\"\n        [forwarder]=\"forwarderId$ | async\"\n        [userId]=\"this.userId$ | async\"\n      />\n      <tools-subaddress-settings\n        *ngIf=\"(algorithm$ | async)?.id === 'subaddress'\"\n        [userId]=\"this.userId$ | async\"\n        (onUpdated)=\"generate('subaddress settings')\"\n      />\n      <tools-username-settings\n        *ngIf=\"(algorithm$ | async)?.id === 'username'\"\n        [userId]=\"this.userId$ | async\"\n        (onUpdated)=\"generate('username settings')\"\n      />\n    </bit-card>\n  </div>\n</bit-section>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { Component, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from \"@angular/core\";\nimport { FormBuilder } from \"@angular/forms\";\nimport {\n  BehaviorSubject,\n  catchError,\n  combineLatest,\n  combineLatestWith,\n  distinctUntilChanged,\n  filter,\n  map,\n  ReplaySubject,\n  Subject,\n  switchMap,\n  takeUntil,\n  withLatestFrom,\n} from \"rxjs\";\n\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { LogService } from \"@bitwarden/common/platform/abstractions/log.service\";\nimport { IntegrationId } from \"@bitwarden/common/tools/integration\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ToastService, Option } from \"@bitwarden/components\";\nimport {\n  AlgorithmInfo,\n  CredentialAlgorithm,\n  CredentialGeneratorService,\n  GeneratedCredential,\n  Generators,\n  getForwarderConfiguration,\n  isEmailAlgorithm,\n  isForwarderIntegration,\n  isSameAlgorithm,\n  isUsernameAlgorithm,\n  toCredentialGeneratorConfiguration,\n} from \"@bitwarden/generator-core\";\nimport { GeneratorHistoryService } from \"@bitwarden/generator-history\";\n\n// constants used to identify navigation selections that are not\n// generator algorithms\nconst FORWARDER = \"forwarder\";\nconst NONE_SELECTED = \"none\";\n\n/** Component that generates usernames and emails */\n@Component({\n  selector: \"tools-username-generator\",\n  templateUrl: \"username-generator.component.html\",\n})\nexport class UsernameGeneratorComponent implements OnInit, OnDestroy {\n  /** Instantiates the username generator\n   *  @param generatorService generates credentials; stores preferences\n   *  @param i18nService localizes generator algorithm descriptions\n   *  @param accountService discovers the active user when one is not provided\n   *  @param zone detects generator settings updates originating from the generator services\n   *  @param formBuilder binds reactive form\n   */\n  constructor(\n    private generatorService: CredentialGeneratorService,\n    private generatorHistoryService: GeneratorHistoryService,\n    private toastService: ToastService,\n    private logService: LogService,\n    private i18nService: I18nService,\n    private accountService: AccountService,\n    private zone: NgZone,\n    private formBuilder: FormBuilder,\n  ) {}\n\n  /** Binds the component to a specific user's settings. When this input is not provided,\n   * the form binds to the active user\n   */\n  @Input()\n  userId: UserId | null;\n\n  /** Emits credentials created from a generation request. */\n  @Output()\n  readonly onGenerated = new EventEmitter<GeneratedCredential>();\n\n  /** emits algorithm info when the selected algorithm changes */\n  @Output()\n  readonly onAlgorithm = new EventEmitter<AlgorithmInfo>();\n\n  /** Removes bottom margin from internal elements */\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n\n  /** Tracks the selected generation algorithm */\n  protected username = this.formBuilder.group({\n    nav: [null as string],\n  });\n\n  protected forwarder = this.formBuilder.group({\n    nav: [null as string],\n  });\n\n  async ngOnInit() {\n    if (this.userId) {\n      this.userId$.next(this.userId);\n    } else {\n      this.accountService.activeAccount$\n        .pipe(\n          map((acct) => acct.id),\n          distinctUntilChanged(),\n          takeUntil(this.destroyed),\n        )\n        .subscribe(this.userId$);\n    }\n\n    this.generatorService\n      .algorithms$([\"email\", \"username\"], { userId$: this.userId$ })\n      .pipe(\n        map((algorithms) => {\n          const usernames = algorithms.filter((a) => !isForwarderIntegration(a.id));\n          const usernameOptions = this.toOptions(usernames);\n          usernameOptions.push({ value: FORWARDER, label: this.i18nService.t(\"forwardedEmail\") });\n\n          const forwarders = algorithms.filter((a) => isForwarderIntegration(a.id));\n          const forwarderOptions = this.toOptions(forwarders);\n          forwarderOptions.unshift({ value: NONE_SELECTED, label: this.i18nService.t(\"select\") });\n\n          return [usernameOptions, forwarderOptions] as const;\n        }),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([usernames, forwarders]) => {\n        this.typeOptions$.next(usernames);\n        this.forwarderOptions$.next(forwarders);\n      });\n\n    this.algorithm$\n      .pipe(\n        map((a) => a?.description),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((hint) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.credentialTypeHint$.next(hint);\n        });\n      });\n\n    // wire up the generator\n    this.algorithm$\n      .pipe(\n        filter((algorithm) => !!algorithm),\n        switchMap((algorithm) => this.typeToGenerator$(algorithm.id)),\n        catchError((error: unknown, generator) => {\n          if (typeof error === \"string\") {\n            this.toastService.showToast({\n              message: error,\n              variant: \"error\",\n              title: \"\",\n            });\n          } else {\n            this.logService.error(error);\n          }\n\n          // continue with origin stream\n          return generator;\n        }),\n        withLatestFrom(this.userId$),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([generated, userId]) => {\n        this.generatorHistoryService\n          .track(userId, generated.credential, generated.category, generated.generationDate)\n          .catch((e: unknown) => {\n            this.logService.error(e);\n          });\n\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.onGenerated.next(generated);\n          this.value$.next(generated.credential);\n        });\n      });\n\n    // normalize cascade selections; introduce subjects to allow changes\n    // from user selections and changes from preference updates to\n    // update the template\n    type CascadeValue = { nav: string; algorithm?: CredentialAlgorithm };\n    const activeIdentifier$ = new Subject<CascadeValue>();\n    const activeForwarder$ = new Subject<CascadeValue>();\n\n    this.username.valueChanges\n      .pipe(\n        map(\n          (username): CascadeValue =>\n            username.nav === FORWARDER\n              ? { nav: username.nav }\n              : { nav: username.nav, algorithm: JSON.parse(username.nav) },\n        ),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(activeIdentifier$);\n\n    this.forwarder.valueChanges\n      .pipe(\n        map(\n          (forwarder): CascadeValue =>\n            forwarder.nav === NONE_SELECTED\n              ? { nav: forwarder.nav }\n              : { nav: forwarder.nav, algorithm: JSON.parse(forwarder.nav) },\n        ),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(activeForwarder$);\n\n    // update forwarder cascade visibility\n    combineLatest([activeIdentifier$, activeForwarder$])\n      .pipe(\n        map(([username, forwarder]) => {\n          const showForwarder = !username.algorithm;\n          const forwarderId =\n            showForwarder && isForwarderIntegration(forwarder.algorithm)\n              ? forwarder.algorithm.forwarder\n              : null;\n          return [showForwarder, forwarderId] as const;\n        }),\n        distinctUntilChanged((prev, next) => prev[0] === next[0] && prev[1] === next[1]),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([showForwarder, forwarderId]) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.showForwarder$.next(showForwarder);\n          this.forwarderId$.next(forwarderId);\n        });\n      });\n\n    // update active algorithm\n    combineLatest([activeIdentifier$, activeForwarder$])\n      .pipe(\n        map(([username, forwarder]) => {\n          const selection = username.algorithm ?? forwarder.algorithm;\n          if (selection) {\n            return this.generatorService.algorithm(selection);\n          } else {\n            return null;\n          }\n        }),\n        distinctUntilChanged((prev, next) => isSameAlgorithm(prev?.id, next?.id)),\n        takeUntil(this.destroyed),\n      )\n      .subscribe((algorithm) => {\n        // update subjects within the angular zone so that the\n        // template bindings refresh immediately\n        this.zone.run(() => {\n          this.algorithm$.next(algorithm);\n          this.onAlgorithm.next(algorithm);\n        });\n      });\n\n    // assume the last-visible generator algorithm is the user's preferred one\n    const preferences = await this.generatorService.preferences({ singleUserId$: this.userId$ });\n    this.algorithm$\n      .pipe(\n        filter((algorithm) => !!algorithm),\n        withLatestFrom(preferences),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(([algorithm, preference]) => {\n        if (isEmailAlgorithm(algorithm.id)) {\n          preference.email.algorithm = algorithm.id;\n          preference.email.updated = new Date();\n        } else if (isUsernameAlgorithm(algorithm.id)) {\n          preference.username.algorithm = algorithm.id;\n          preference.username.updated = new Date();\n        } else {\n          return;\n        }\n\n        preferences.next(preference);\n      });\n\n    preferences\n      .pipe(\n        map(({ email, username }) => {\n          const forwarderPref = isForwarderIntegration(email.algorithm) ? email : null;\n          const usernamePref = email.updated > username.updated ? email : username;\n\n          // inject drilldown flags\n          const forwarderNav = !forwarderPref\n            ? NONE_SELECTED\n            : JSON.stringify(forwarderPref.algorithm);\n          const userNav = forwarderPref ? FORWARDER : JSON.stringify(usernamePref.algorithm);\n\n          // construct cascade metadata\n          const cascade = {\n            username: {\n              selection: { nav: userNav },\n              active: {\n                nav: userNav,\n                algorithm: forwarderPref ? null : usernamePref.algorithm,\n              },\n            },\n            forwarder: {\n              selection: { nav: forwarderNav },\n              active: {\n                nav: forwarderNav,\n                algorithm: forwarderPref?.algorithm,\n              },\n            },\n          };\n\n          return cascade;\n        }),\n        takeUntil(this.destroyed),\n      )\n      .subscribe(({ username, forwarder }) => {\n        // update navigation; break subscription loop\n        this.username.setValue(username.selection, { emitEvent: false });\n        this.forwarder.setValue(forwarder.selection, { emitEvent: false });\n\n        // update cascade visibility\n        activeIdentifier$.next(username.active);\n        activeForwarder$.next(forwarder.active);\n      });\n\n    // automatically regenerate when the algorithm switches if the algorithm\n    // allows it; otherwise set a placeholder\n    this.algorithm$.pipe(takeUntil(this.destroyed)).subscribe((a) => {\n      this.zone.run(() => {\n        if (!a || a.onlyOnRequest) {\n          this.value$.next(\"-\");\n        } else {\n          this.generate(\"autogenerate\").catch((e: unknown) => this.logService.error(e));\n        }\n      });\n    });\n  }\n\n  private typeToGenerator$(type: CredentialAlgorithm) {\n    const dependencies = {\n      on$: this.generate$,\n      userId$: this.userId$,\n    };\n\n    switch (type) {\n      case \"catchall\":\n        return this.generatorService.generate$(Generators.catchall, dependencies);\n\n      case \"subaddress\":\n        return this.generatorService.generate$(Generators.subaddress, dependencies);\n\n      case \"username\":\n        return this.generatorService.generate$(Generators.username, dependencies);\n    }\n\n    if (isForwarderIntegration(type)) {\n      const forwarder = getForwarderConfiguration(type.forwarder);\n      const configuration = toCredentialGeneratorConfiguration(forwarder);\n      return this.generatorService.generate$(configuration, dependencies);\n    }\n\n    throw new Error(`Invalid generator type: \"${type}\"`);\n  }\n\n  /** Lists the credential types supported by the component. */\n  protected typeOptions$ = new BehaviorSubject<Option<string>[]>([]);\n\n  /** Tracks the currently selected forwarder. */\n  protected forwarderId$ = new BehaviorSubject<IntegrationId>(null);\n\n  /** Lists the credential types supported by the component. */\n  protected forwarderOptions$ = new BehaviorSubject<Option<string>[]>([]);\n\n  /** Tracks forwarder control visibility */\n  protected showForwarder$ = new BehaviorSubject<boolean>(false);\n\n  /** tracks the currently selected credential type */\n  protected algorithm$ = new ReplaySubject<AlgorithmInfo>(1);\n\n  protected showAlgorithm$ = this.algorithm$.pipe(\n    combineLatestWith(this.showForwarder$),\n    map(([algorithm, showForwarder]) => (showForwarder ? null : algorithm)),\n  );\n\n  /**\n   * Emits the copy button aria-label respective of the selected credential type\n   */\n  protected credentialTypeCopyLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ copy }) => copy),\n  );\n\n  /**\n   * Emits the generate button aria-label respective of the selected credential type\n   */\n  protected credentialTypeGenerateLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generate }) => generate),\n  );\n\n  /**\n   * Emits the copy credential toast respective of the selected credential type\n   */\n  protected credentialTypeLabel$ = this.algorithm$.pipe(\n    filter((algorithm) => !!algorithm),\n    map(({ generatedValue }) => generatedValue),\n  );\n\n  /** Emits hint key for the currently selected credential type */\n  protected credentialTypeHint$ = new ReplaySubject<string>(1);\n\n  /** Emits the last generated value. */\n  protected readonly value$ = new BehaviorSubject<string>(\"\");\n\n  /** Emits when the userId changes */\n  protected readonly userId$ = new BehaviorSubject<UserId>(null);\n\n  /** Emits when a new credential is requested */\n  private readonly generate$ = new Subject<string>();\n\n  /** Request a new value from the generator\n   * @param requestor a label used to trace generation request\n   *  origin in the debugger.\n   */\n  protected async generate(requestor: string) {\n    this.generate$.next(requestor);\n  }\n\n  private toOptions(algorithms: AlgorithmInfo[]) {\n    const options: Option<string>[] = algorithms.map((algorithm) => ({\n      value: JSON.stringify(algorithm.id),\n      label: algorithm.name,\n    }));\n\n    return options;\n  }\n\n  private readonly destroyed = new Subject<void>();\n  ngOnDestroy() {\n    this.destroyed.next();\n    this.destroyed.complete();\n\n    // finalize subjects\n    this.generate$.complete();\n    this.value$.complete();\n\n    // finalize component bindings\n    this.onGenerated.complete();\n  }\n}\n","<tools-password-generator\n  *ngIf=\"type === 'password'\"\n  [disableMargin]=\"disableMargin\"\n  (onGenerated)=\"onCredentialGenerated($event)\"\n  (onAlgorithm)=\"algorithm($event)\"\n></tools-password-generator>\n<tools-username-generator\n  *ngIf=\"type === 'username'\"\n  [disableMargin]=\"disableMargin\"\n  (onGenerated)=\"onCredentialGenerated($event)\"\n  (onAlgorithm)=\"algorithm($event)\"\n></tools-username-generator>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { coerceBooleanProperty } from \"@angular/cdk/coercion\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, EventEmitter, Input, Output } from \"@angular/core\";\n\nimport { GeneratorModule } from \"@bitwarden/generator-components\";\nimport { AlgorithmInfo, GeneratedCredential } from \"@bitwarden/generator-core\";\n\n/**\n * Renders a password or username generator UI and emits the most recently generated value.\n * Used by the cipher form to be shown in a dialog/modal when generating cipher passwords/usernames.\n */\n@Component({\n  selector: \"vault-cipher-form-generator\",\n  templateUrl: \"./cipher-form-generator.component.html\",\n  standalone: true,\n  imports: [CommonModule, GeneratorModule],\n})\nexport class CipherFormGeneratorComponent {\n  @Input()\n  algorithm: (selected: AlgorithmInfo) => void;\n\n  /**\n   * The type of generator form to show.\n   */\n  @Input({ required: true })\n  type: \"password\" | \"username\";\n\n  /** Removes bottom margin of internal sections */\n  @Input({ transform: coerceBooleanProperty }) disableMargin = false;\n\n  /**\n   * Emits an event when a new value is generated.\n   */\n  @Output()\n  valueGenerated = new EventEmitter<string>();\n\n  /** Event handler for both generation components */\n  onCredentialGenerated = (generatedCred: GeneratedCredential) => {\n    this.valueGenerated.emit(generatedCred.credential);\n  };\n}\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport {\n  AfterViewInit,\n  Component,\n  EventEmitter,\n  Input,\n  OnDestroy,\n  OnInit,\n  Output,\n  ViewChild,\n} from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport {\n  combineLatest,\n  firstValueFrom,\n  map,\n  Observable,\n  shareReplay,\n  Subject,\n  switchMap,\n  takeUntil,\n  tap,\n} from \"rxjs\";\n\nimport { CollectionService, CollectionView } from \"@bitwarden/admin-console/common\";\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { OrganizationService } from \"@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction\";\nimport { OrganizationUserStatusType } from \"@bitwarden/common/admin-console/enums\";\nimport { Organization } from \"@bitwarden/common/admin-console/models/domain/organization\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { CipherId, CollectionId, OrganizationId, UserId } from \"@bitwarden/common/types/guid\";\nimport { CipherService } from \"@bitwarden/common/vault/abstractions/cipher.service\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport {\n  AsyncActionsModule,\n  BitSubmitDirective,\n  ButtonComponent,\n  ButtonModule,\n  DialogModule,\n  FormFieldModule,\n  MultiSelectModule,\n  SelectItemView,\n  SelectModule,\n  ToastService,\n} from \"@bitwarden/components\";\n\nexport interface CollectionAssignmentParams {\n  organizationId: OrganizationId;\n\n  /**\n   * The ciphers to be assigned to the collections selected in the dialog.\n   */\n  ciphers: CipherView[];\n\n  /**\n   * The collections available to assign the ciphers to.\n   */\n  availableCollections: CollectionView[];\n\n  /**\n   * The currently filtered collection. Selected by default. If the user deselects it in the dialog then it will be\n   * removed from the ciphers upon submission.\n   */\n  activeCollection?: CollectionView;\n\n  /**\n   * Flag indicating if the user is performing the action as an admin on a SINGLE cipher. When true,\n   * the `/admin` endpoint will be used to update the cipher's collections. Required when updating\n   * ciphers an Admin does not normally have access to or for Unassigned ciphers.\n   *\n   * The bulk method already handles admin actions internally.\n   */\n  isSingleCipherAdmin?: boolean;\n}\n\nexport enum CollectionAssignmentResult {\n  Saved = \"saved\",\n  Canceled = \"canceled\",\n}\n\nconst MY_VAULT_ID = \"MyVault\";\n\n@Component({\n  selector: \"assign-collections\",\n  templateUrl: \"assign-collections.component.html\",\n  standalone: true,\n  imports: [\n    CommonModule,\n    JslibModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    MultiSelectModule,\n    SelectModule,\n    ReactiveFormsModule,\n    ButtonModule,\n    DialogModule,\n  ],\n})\nexport class AssignCollectionsComponent implements OnInit, OnDestroy, AfterViewInit {\n  @ViewChild(BitSubmitDirective)\n  private bitSubmit: BitSubmitDirective;\n\n  @Input() params: CollectionAssignmentParams;\n\n  /**\n   * Submit button instance that will be disabled or marked as loading when the form is submitting.\n   */\n  @Input() submitBtn?: ButtonComponent;\n\n  @Output()\n  editableItemCountChange = new EventEmitter<number>();\n\n  @Output() onCollectionAssign = new EventEmitter<CollectionAssignmentResult>();\n\n  formGroup = this.formBuilder.group({\n    selectedOrg: [null],\n    collections: [<SelectItemView[]>[], [Validators.required]],\n  });\n\n  protected totalItemCount: number;\n  protected editableItemCount: number;\n  protected readonlyItemCount: number;\n  protected personalItemsCount: number;\n  protected availableCollections: SelectItemView[] = [];\n  protected orgName: string;\n  protected showOrgSelector: boolean = false;\n\n  protected organizations$: Observable<Organization[]> =\n    this.organizationService.organizations$.pipe(\n      map((orgs) =>\n        orgs\n          .filter((o) => o.enabled && o.status === OrganizationUserStatusType.Confirmed)\n          .sort((a, b) => a.name.localeCompare(b.name)),\n      ),\n      tap((orgs) => {\n        if (orgs.length > 0 && this.showOrgSelector) {\n          // Using setTimeout to defer the patchValue call until the next event loop cycle\n          setTimeout(() => {\n            this.formGroup.patchValue({ selectedOrg: orgs[0].id });\n            this.setFormValidators();\n\n            // Disable the org selector if there is only one organization\n            if (orgs.length === 1) {\n              this.formGroup.controls.selectedOrg.disable();\n            }\n          });\n        }\n      }),\n    );\n\n  protected transferWarningText = (orgName: string, itemsCount: number) => {\n    const haveOrgName = !!orgName;\n\n    if (itemsCount > 1 && haveOrgName) {\n      return this.i18nService.t(\"personalItemsWithOrgTransferWarningPlural\", itemsCount, orgName);\n    }\n    if (itemsCount > 1 && !haveOrgName) {\n      return this.i18nService.t(\"personalItemsTransferWarningPlural\", itemsCount);\n    }\n    if (itemsCount === 1 && haveOrgName) {\n      return this.i18nService.t(\"personalItemWithOrgTransferWarningSingular\", orgName);\n    }\n    return this.i18nService.t(\"personalItemTransferWarningSingular\");\n  };\n\n  private editableItems: CipherView[] = [];\n  // Get the selected organization ID. If the user has not selected an organization from the form,\n  // fallback to use the organization ID from the params.\n  private get selectedOrgId(): OrganizationId {\n    return this.formGroup.getRawValue().selectedOrg || this.params.organizationId;\n  }\n  private activeUserId: UserId;\n  private destroy$ = new Subject<void>();\n\n  constructor(\n    private cipherService: CipherService,\n    private i18nService: I18nService,\n    private organizationService: OrganizationService,\n    private collectionService: CollectionService,\n    private formBuilder: FormBuilder,\n    private toastService: ToastService,\n    private accountService: AccountService,\n  ) {}\n\n  async ngOnInit() {\n    this.activeUserId = await firstValueFrom(\n      this.accountService.activeAccount$.pipe(map((a) => a?.id)),\n    );\n\n    const onlyPersonalItems = this.params.ciphers.every((c) => c.organizationId == null);\n\n    if (this.selectedOrgId === MY_VAULT_ID || onlyPersonalItems) {\n      this.showOrgSelector = true;\n    }\n\n    await this.initializeItems(this.selectedOrgId);\n\n    if (this.selectedOrgId && this.selectedOrgId !== MY_VAULT_ID) {\n      await this.handleOrganizationCiphers();\n    }\n\n    this.setupFormSubscriptions();\n  }\n\n  ngAfterViewInit(): void {\n    this.bitSubmit.loading$.pipe(takeUntil(this.destroy$)).subscribe((loading) => {\n      if (!this.submitBtn) {\n        return;\n      }\n\n      this.submitBtn.loading = loading;\n    });\n\n    this.bitSubmit.disabled$.pipe(takeUntil(this.destroy$)).subscribe((disabled) => {\n      if (!this.submitBtn) {\n        return;\n      }\n\n      this.submitBtn.disabled = disabled;\n    });\n  }\n\n  ngOnDestroy(): void {\n    this.destroy$.next();\n    this.destroy$.complete();\n  }\n\n  selectCollections(items: SelectItemView[]) {\n    const currentCollections = this.formGroup.controls.collections.value as SelectItemView[];\n    const updatedCollections = [...currentCollections, ...items].sort(this.sortItems);\n    this.formGroup.patchValue({ collections: updatedCollections });\n  }\n\n  submit = async () => {\n    this.formGroup.markAllAsTouched();\n\n    if (this.formGroup.invalid) {\n      return;\n    }\n\n    // Retrieve ciphers that belong to an organization\n    const cipherIds = this.editableItems\n      .filter((i) => i.organizationId)\n      .map((i) => i.id as CipherId);\n\n    // Move personal items to the organization\n    if (this.personalItemsCount > 0) {\n      await this.moveToOrganization(\n        this.selectedOrgId,\n        this.params.ciphers.filter((c) => c.organizationId == null),\n        this.formGroup.controls.collections.value.map((i) => i.id as CollectionId),\n      );\n    }\n\n    if (cipherIds.length > 0) {\n      const isSingleOrgCipher = cipherIds.length === 1 && this.personalItemsCount === 0;\n\n      // Update assigned collections for single org cipher or bulk update collections for multiple org ciphers\n      await (isSingleOrgCipher\n        ? this.updateAssignedCollections(this.editableItems[0])\n        : this.bulkUpdateCollections(cipherIds));\n\n      this.toastService.showToast({\n        variant: \"success\",\n        title: null,\n        message: this.i18nService.t(\"successfullyAssignedCollections\"),\n      });\n    }\n\n    this.onCollectionAssign.emit(CollectionAssignmentResult.Saved);\n  };\n\n  private sortItems = (a: SelectItemView, b: SelectItemView) =>\n    this.i18nService.collator.compare(a.labelName, b.labelName);\n\n  private async handleOrganizationCiphers() {\n    // If no ciphers are editable, cancel the operation\n    if (this.editableItemCount == 0) {\n      this.toastService.showToast({\n        variant: \"error\",\n        title: this.i18nService.t(\"errorOccurred\"),\n        message: this.i18nService.t(\"nothingSelected\"),\n      });\n      this.onCollectionAssign.emit(CollectionAssignmentResult.Canceled);\n\n      return;\n    }\n\n    this.availableCollections = this.params.availableCollections.map((c) => ({\n      icon: \"bwi-collection\",\n      id: c.id,\n      labelName: c.name,\n      listName: c.name,\n    }));\n\n    // Select assigned collections for a single cipher.\n    this.selectCollectionsAssignedToSingleCipher();\n\n    // If the active collection is set, select it by default\n    if (this.params.activeCollection) {\n      this.selectCollections([\n        {\n          icon: \"bwi-collection\",\n          id: this.params.activeCollection.id,\n          labelName: this.params.activeCollection.name,\n          listName: this.params.activeCollection.name,\n        },\n      ]);\n    }\n  }\n\n  /**\n   * Selects the collections that are assigned to a single cipher,\n   * excluding the active collection.\n   */\n  private selectCollectionsAssignedToSingleCipher() {\n    if (this.params.ciphers.length !== 1) {\n      return;\n    }\n\n    const assignedCollectionIds = this.params.ciphers[0].collectionIds;\n\n    // Filter the available collections to select only those that are associated with the ciphers, excluding the active collection\n    const assignedCollections = this.availableCollections\n      .filter(\n        (collection) =>\n          assignedCollectionIds.includes(collection.id) &&\n          collection.id !== this.params.activeCollection?.id,\n      )\n      .map((collection) => ({\n        icon: \"bwi-collection\",\n        id: collection.id,\n        labelName: collection.labelName,\n        listName: collection.listName,\n      }));\n\n    if (assignedCollections.length > 0) {\n      this.selectCollections(assignedCollections);\n    }\n  }\n\n  private async initializeItems(organizationId: OrganizationId) {\n    this.totalItemCount = this.params.ciphers.length;\n\n    // If organizationId is not present or organizationId is MyVault, then all ciphers are considered personal items\n    if (!organizationId || organizationId === MY_VAULT_ID) {\n      this.editableItems = this.params.ciphers;\n      this.editableItemCount = this.params.ciphers.length;\n      this.personalItemsCount = this.params.ciphers.length;\n      this.editableItemCountChange.emit(this.editableItemCount);\n      return;\n    }\n\n    const org = await this.organizationService.get(organizationId);\n    this.orgName = org.name;\n\n    this.editableItems = org.canEditAllCiphers\n      ? this.params.ciphers\n      : this.params.ciphers.filter((c) => c.edit);\n\n    this.editableItemCount = this.editableItems.length;\n    // TODO: https://bitwarden.atlassian.net/browse/PM-9307,\n    // clean up editableItemCountChange when the org vault is updated to filter editable ciphers\n    this.editableItemCountChange.emit(this.editableItemCount);\n    this.personalItemsCount = this.params.ciphers.filter((c) => c.organizationId == null).length;\n    this.readonlyItemCount = this.totalItemCount - this.editableItemCount;\n  }\n\n  private setFormValidators() {\n    const selectedOrgControl = this.formGroup.get(\"selectedOrg\");\n    selectedOrgControl?.setValidators([Validators.required]);\n    selectedOrgControl?.updateValueAndValidity();\n  }\n\n  /**\n   * Sets up form subscriptions for selected organizations.\n   */\n  private setupFormSubscriptions() {\n    // Listen to changes in selected organization and update collections\n    this.formGroup.controls.selectedOrg.valueChanges\n      .pipe(\n        tap(() => {\n          this.formGroup.controls.collections.setValue([], { emitEvent: false });\n        }),\n        switchMap((orgId) => {\n          return this.getCollectionsForOrganization(orgId as OrganizationId);\n        }),\n        takeUntil(this.destroy$),\n      )\n      .subscribe((collections) => {\n        this.availableCollections = collections.map((c) => ({\n          icon: \"bwi-collection\",\n          id: c.id,\n          labelName: c.name,\n          listName: c.name,\n        }));\n      });\n  }\n\n  /**\n   * Retrieves the collections for the organization with the given ID.\n   * @param orgId\n   * @returns An observable of the collections for the organization.\n   */\n  private getCollectionsForOrganization(orgId: OrganizationId): Observable<CollectionView[]> {\n    return combineLatest([\n      this.collectionService.decryptedCollections$,\n      this.organizationService.organizations$,\n    ]).pipe(\n      map(([collections, organizations]) => {\n        const org = organizations.find((o) => o.id === orgId);\n        this.orgName = org.name;\n\n        return collections.filter((c) => {\n          return c.organizationId === orgId && !c.readOnly;\n        });\n      }),\n      shareReplay({ refCount: true, bufferSize: 1 }),\n    );\n  }\n\n  private async moveToOrganization(\n    organizationId: OrganizationId,\n    shareableCiphers: CipherView[],\n    selectedCollectionIds: CollectionId[],\n  ) {\n    await this.cipherService.shareManyWithServer(\n      shareableCiphers,\n      organizationId,\n      selectedCollectionIds,\n      this.activeUserId,\n    );\n\n    this.toastService.showToast({\n      variant: \"success\",\n      title: null,\n      message: this.i18nService.t(\n        shareableCiphers.length === 1 ? \"itemMovedToOrg\" : \"itemsMovedToOrg\",\n        this.orgName ?? this.i18nService.t(\"organization\"),\n      ),\n    });\n  }\n\n  private async bulkUpdateCollections(cipherIds: CipherId[]) {\n    if (this.formGroup.controls.collections.value.length > 0) {\n      await this.cipherService.bulkUpdateCollectionsWithServer(\n        this.selectedOrgId,\n        cipherIds,\n        this.formGroup.controls.collections.value.map((i) => i.id as CollectionId),\n        false,\n      );\n    }\n\n    if (\n      this.params.activeCollection != null &&\n      this.formGroup.controls.collections.value.find(\n        (c) => c.id === this.params.activeCollection.id,\n      ) == null\n    ) {\n      await this.cipherService.bulkUpdateCollectionsWithServer(\n        this.selectedOrgId,\n        cipherIds,\n        [this.params.activeCollection.id as CollectionId],\n        true,\n      );\n    }\n  }\n\n  private async updateAssignedCollections(cipherView: CipherView) {\n    const { collections } = this.formGroup.getRawValue();\n    cipherView.collectionIds = collections.map((i) => i.id as CollectionId);\n    const cipher = await this.cipherService.encrypt(cipherView, this.activeUserId);\n    if (this.params.isSingleCipherAdmin) {\n      await this.cipherService.saveCollectionsWithServerAdmin(cipher);\n    } else {\n      await this.cipherService.saveCollectionsWithServer(cipher);\n    }\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\" id=\"assign_collections_form\">\n  <p>\n    {{\n      (personalItemsCount === 1\n        ? \"bulkCollectionAssignmentDialogDescriptionSingular\"\n        : \"bulkCollectionAssignmentDialogDescriptionPlural\"\n      ) | i18n\n    }}\n  </p>\n\n  <ul class=\"tw-list-disc tw-pl-5 tw-space-y-2 tw-break-words\">\n    <li *ngIf=\"readonlyItemCount > 0\">\n      <p>\n        {{ \"bulkCollectionAssignmentWarning\" | i18n: totalItemCount : readonlyItemCount }}\n      </p>\n    </li>\n    <li *ngIf=\"personalItemsCount > 0\">\n      <p>\n        {{ transferWarningText(orgName, personalItemsCount) }}\n      </p>\n    </li>\n  </ul>\n\n  <div class=\"tw-flex\" *ngIf=\"showOrgSelector\">\n    <bit-form-field class=\"tw-grow tw-max-w-full\">\n      <bit-label>{{ \"moveToOrganization\" | i18n }}</bit-label>\n      <bit-select formControlName=\"selectedOrg\">\n        <bit-option\n          *ngFor=\"let org of organizations$ | async\"\n          icon=\"bwi-business\"\n          [value]=\"org.id\"\n          [label]=\"org.name\"\n        >\n        </bit-option>\n      </bit-select>\n    </bit-form-field>\n  </div>\n\n  <div class=\"tw-flex\">\n    <bit-form-field class=\"tw-grow tw-max-w-full\">\n      <bit-label>{{ \"selectCollectionsToAssign\" | i18n }}</bit-label>\n      <bit-multi-select\n        class=\"tw-w-full\"\n        formControlName=\"collections\"\n        [baseItems]=\"availableCollections\"\n      ></bit-multi-select>\n    </bit-form-field>\n  </div>\n</form>\n","<div *ngIf=\"history && history.length\">\n  <bit-item *ngFor=\"let h of history\">\n    <div class=\"tw-pl-3 tw-py-2\">\n      <bit-color-password\n        class=\"tw-text-base\"\n        [password]=\"h.password\"\n        [showCount]=\"false\"\n      ></bit-color-password>\n      <div class=\"tw-text-sm tw-text-muted\">{{ h.lastUsedDate | date: \"medium\" }}</div>\n    </div>\n    <ng-container slot=\"end\">\n      <bit-item-action>\n        <button\n          type=\"button\"\n          bitIconButton=\"bwi-clone\"\n          [appA11yTitle]=\"'copyPassword' | i18n\"\n          appStopClick\n          [appCopyClick]=\"h.password\"\n          [valueLabel]=\"'password' | i18n\"\n          showToast\n        ></button>\n      </bit-item-action>\n    </ng-container>\n  </bit-item>\n</div>\n<div class=\"no-items\" *ngIf=\"!history?.length\">\n  <p>{{ \"noPasswordsInList\" | i18n }}</p>\n</div>\n","// FIXME: Update this file to be type safe and remove this and next line\n// @ts-strict-ignore\nimport { CommonModule } from \"@angular/common\";\nimport { OnInit, Component, Input } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { PasswordHistoryView } from \"@bitwarden/common/vault/models/view/password-history.view\";\nimport { ItemModule, ColorPasswordModule, IconButtonModule } from \"@bitwarden/components\";\n\n@Component({\n  selector: \"vault-password-history-view\",\n  templateUrl: \"./password-history-view.component.html\",\n  standalone: true,\n  imports: [CommonModule, ItemModule, ColorPasswordModule, IconButtonModule, JslibModule],\n})\nexport class PasswordHistoryViewComponent implements OnInit {\n  /**\n   * Optional cipher view. When included `cipherId` is ignored.\n   */\n  @Input({ required: true }) cipher: CipherView;\n\n  /** The password history for the cipher. */\n  history: PasswordHistoryView[] = [];\n\n  ngOnInit() {\n    this.history = this.cipher.passwordHistory == null ? [] : this.cipher.passwordHistory;\n  }\n}\n","import { LiveAnnouncer } from \"@angular/cdk/a11y\";\nimport { CommonModule } from \"@angular/common\";\nimport { AfterViewInit, Component, OnInit } from \"@angular/core\";\nimport { FormBuilder, FormControl, ReactiveFormsModule } from \"@angular/forms\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, Observable } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { Account, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  CardComponent,\n  FormFieldModule,\n  RadioButtonModule,\n  TypographyModule,\n  LinkModule,\n} from \"@bitwarden/components\";\n\nimport {\n  NewDeviceVerificationNotice,\n  NewDeviceVerificationNoticeService,\n} from \"./../../services/new-device-verification-notice.service\";\n\n@Component({\n  standalone: true,\n  selector: \"app-new-device-verification-notice-page-one\",\n  templateUrl: \"./new-device-verification-notice-page-one.component.html\",\n  imports: [\n    CardComponent,\n    CommonModule,\n    JslibModule,\n    TypographyModule,\n    ButtonModule,\n    RadioButtonModule,\n    FormFieldModule,\n    AsyncActionsModule,\n    ReactiveFormsModule,\n    LinkModule,\n  ],\n})\nexport class NewDeviceVerificationNoticePageOneComponent implements OnInit, AfterViewInit {\n  protected formGroup = this.formBuilder.group({\n    hasEmailAccess: new FormControl(0),\n  });\n  protected isDesktop: boolean;\n  readonly currentAcct$: Observable<Account | null> = this.accountService.activeAccount$;\n  protected currentEmail: string = \"\";\n  private currentUserId: UserId | null = null;\n\n  constructor(\n    private formBuilder: FormBuilder,\n    private router: Router,\n    private accountService: AccountService,\n    private newDeviceVerificationNoticeService: NewDeviceVerificationNoticeService,\n    private platformUtilsService: PlatformUtilsService,\n    private configService: ConfigService,\n    private liveAnnouncer: LiveAnnouncer,\n    private i18nService: I18nService,\n  ) {\n    this.isDesktop = this.platformUtilsService.getClientType() === ClientType.Desktop;\n  }\n\n  async ngOnInit() {\n    const currentAcct = await firstValueFrom(this.currentAcct$);\n    if (!currentAcct) {\n      return;\n    }\n    this.currentEmail = currentAcct.email;\n    this.currentUserId = currentAcct.id;\n  }\n\n  ngAfterViewInit() {\n    void this.liveAnnouncer.announce(this.i18nService.t(\"importantNotice\"), \"polite\");\n  }\n\n  submit = async () => {\n    const doesNotHaveEmailAccess = this.formGroup.controls.hasEmailAccess.value === 0;\n\n    if (doesNotHaveEmailAccess) {\n      await this.router.navigate([\"new-device-notice/setup\"]);\n      return;\n    }\n\n    const tempNoticeFlag = await this.configService.getFeatureFlag(\n      FeatureFlag.NewDeviceVerificationTemporaryDismiss,\n    );\n    const permNoticeFlag = await this.configService.getFeatureFlag(\n      FeatureFlag.NewDeviceVerificationPermanentDismiss,\n    );\n\n    let newNoticeState: NewDeviceVerificationNotice | null = null;\n\n    // When the temporary flag is enabled, only update the `last_dismissal`\n    if (tempNoticeFlag) {\n      newNoticeState = {\n        last_dismissal: new Date(),\n        permanent_dismissal: false,\n      };\n    } else if (permNoticeFlag) {\n      // When the per flag is enabled, only update the `last_dismissal`\n      newNoticeState = {\n        last_dismissal: new Date(),\n        permanent_dismissal: true,\n      };\n    }\n\n    // This shouldn't occur as the user shouldn't get here unless one of the flags is active.\n    if (newNoticeState) {\n      await this.newDeviceVerificationNoticeService.updateNewDeviceVerificationNoticeState(\n        this.currentUserId!,\n        newNoticeState,\n      );\n    }\n\n    await this.router.navigate([\"/vault\"]);\n  };\n\n  navigateToNewDeviceVerificationHelp(event: Event) {\n    event.preventDefault();\n\n    this.platformUtilsService.launchUri(\"https://bitwarden.com/help/new-device-verification/\");\n  }\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <p class=\"tw-text-center\" bitTypography=\"body1\">\n    {{ \"newDeviceVerificationNoticeContentPage1\" | i18n }}\n    <a bitLink (click)=\"navigateToNewDeviceVerificationHelp($event)\" href=\"#\">\n      {{ \"learnMore\" | i18n }}.\n    </a>\n  </p>\n\n  <bit-card\n    class=\"tw-pb-0\"\n    [ngClass]=\"{\n      'tw-flex tw-flex-col tw-items-center !tw-rounded-b-none': isDesktop,\n      'md:tw-flex md:tw-flex-col md:tw-items-center md:!tw-rounded-b-none': !isDesktop,\n    }\"\n  >\n    <p bitTypography=\"body2\" class=\"text-muted md:tw-w-9/12\">\n      {{ \"newDeviceVerificationNoticePageOneFormContent\" | i18n: this.currentEmail }}\n    </p>\n\n    <bit-radio-group formControlName=\"hasEmailAccess\" class=\"md:tw-w-9/12\">\n      <bit-radio-button id=\"option_A\" [value]=\"0\">\n        <bit-label>{{ \"newDeviceVerificationNoticePageOneEmailAccessNo\" | i18n }}</bit-label>\n      </bit-radio-button>\n      <bit-radio-button id=\"option_B\" [value]=\"1\">\n        <bit-label>{{ \"newDeviceVerificationNoticePageOneEmailAccessYes\" | i18n }}</bit-label>\n      </bit-radio-button>\n    </bit-radio-group>\n  </bit-card>\n\n  <button bitButton type=\"submit\" buttonType=\"primary\" class=\"tw-w-full tw-mt-4\">\n    {{ \"continue\" | i18n }}\n  </button>\n</form>\n","<p class=\"tw-text-center\" bitTypography=\"body1\">\n  {{ \"newDeviceVerificationNoticeContentPage2\" | i18n }}\n</p>\n\n<a\n  href=\"#\"\n  bitButton\n  (click)=\"navigateToTwoStepLogin($event)\"\n  buttonType=\"primary\"\n  class=\"tw-w-full tw-mt-4\"\n  data-testid=\"two-factor\"\n>\n  {{ \"turnOnTwoStepLogin\" | i18n }}\n  <i\n    class=\"bwi bwi-external-link bwi-lg bwi-fw\"\n    aria-hidden=\"true\"\n    [ngClass]=\"{ 'md:tw-hidden': !isDesktop }\"\n  >\n  </i>\n</a>\n<a\n  href=\"#\"\n  bitButton\n  (click)=\"navigateToChangeAcctEmail($event)\"\n  buttonType=\"secondary\"\n  class=\"tw-w-full tw-mt-4\"\n  data-testid=\"change-email\"\n>\n  {{ \"changeAcctEmail\" | i18n }}\n  <i\n    class=\"bwi bwi-external-link bwi-lg bwi-fw\"\n    aria-hidden=\"true\"\n    [ngClass]=\"{ 'md:tw-hidden': !isDesktop }\"\n  ></i>\n</a>\n\n<div class=\"tw-flex tw-justify-center tw-mt-6\" *ngIf=\"!permanentFlagEnabled\">\n  <a\n    bitLink\n    linkType=\"primary\"\n    (click)=\"remindMeLaterSelect()\"\n    data-testid=\"remind-me-later\"\n    href=\"#\"\n    appStopClick\n  >\n    {{ \"remindMeLater\" | i18n }}\n  </a>\n</div>\n","import { LiveAnnouncer } from \"@angular/cdk/a11y\";\nimport { CommonModule } from \"@angular/common\";\nimport { AfterViewInit, Component, OnInit } from \"@angular/core\";\nimport { Router } from \"@angular/router\";\nimport { firstValueFrom, Observable } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { Account, AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { ClientType } from \"@bitwarden/common/enums\";\nimport { FeatureFlag } from \"@bitwarden/common/enums/feature-flag.enum\";\nimport { ConfigService } from \"@bitwarden/common/platform/abstractions/config/config.service\";\nimport {\n  Environment,\n  EnvironmentService,\n} from \"@bitwarden/common/platform/abstractions/environment.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\nimport { ButtonModule, LinkModule, TypographyModule } from \"@bitwarden/components\";\n\nimport { NewDeviceVerificationNoticeService } from \"../../services/new-device-verification-notice.service\";\n\n@Component({\n  standalone: true,\n  selector: \"app-new-device-verification-notice-page-two\",\n  templateUrl: \"./new-device-verification-notice-page-two.component.html\",\n  imports: [CommonModule, JslibModule, TypographyModule, ButtonModule, LinkModule],\n})\nexport class NewDeviceVerificationNoticePageTwoComponent implements OnInit, AfterViewInit {\n  protected isWeb: boolean;\n  protected isDesktop: boolean;\n  protected permanentFlagEnabled = false;\n  readonly currentAcct$: Observable<Account | null> = this.accountService.activeAccount$;\n  private currentUserId: UserId | null = null;\n  private env$: Observable<Environment> = this.environmentService.environment$;\n\n  constructor(\n    private newDeviceVerificationNoticeService: NewDeviceVerificationNoticeService,\n    private router: Router,\n    private accountService: AccountService,\n    private platformUtilsService: PlatformUtilsService,\n    private environmentService: EnvironmentService,\n    private configService: ConfigService,\n    private liveAnnouncer: LiveAnnouncer,\n    private i18nService: I18nService,\n  ) {\n    this.isWeb = this.platformUtilsService.getClientType() === ClientType.Web;\n    this.isDesktop = this.platformUtilsService.getClientType() === ClientType.Desktop;\n  }\n\n  async ngOnInit() {\n    this.permanentFlagEnabled = await this.configService.getFeatureFlag(\n      FeatureFlag.NewDeviceVerificationPermanentDismiss,\n    );\n\n    const currentAcct = await firstValueFrom(this.currentAcct$);\n    if (!currentAcct) {\n      return;\n    }\n    this.currentUserId = currentAcct.id;\n  }\n\n  ngAfterViewInit() {\n    void this.liveAnnouncer.announce(this.i18nService.t(\"setupTwoStepLogin\"), \"polite\");\n  }\n\n  async navigateToTwoStepLogin(event: Event) {\n    event.preventDefault();\n\n    const env = await firstValueFrom(this.env$);\n    const url = env.getWebVaultUrl();\n\n    if (this.isWeb) {\n      await this.router.navigate([\"/settings/security/two-factor\"], {\n        queryParams: { fromNewDeviceVerification: true },\n      });\n    } else {\n      this.platformUtilsService.launchUri(\n        url + \"/#/settings/security/two-factor/?fromNewDeviceVerification=true\",\n      );\n    }\n  }\n\n  async navigateToChangeAcctEmail(event: Event) {\n    event.preventDefault();\n\n    const env = await firstValueFrom(this.env$);\n    const url = env.getWebVaultUrl();\n    if (this.isWeb) {\n      await this.router.navigate([\"/settings/account\"], {\n        queryParams: { fromNewDeviceVerification: true },\n      });\n    } else {\n      this.platformUtilsService.launchUri(\n        url + \"/#/settings/account/?fromNewDeviceVerification=true\",\n      );\n    }\n  }\n\n  async remindMeLaterSelect() {\n    await this.newDeviceVerificationNoticeService.updateNewDeviceVerificationNoticeState(\n      this.currentUserId!,\n      {\n        last_dismissal: new Date(),\n        permanent_dismissal: false,\n      },\n    );\n\n    await this.router.navigate([\"/vault\"]);\n  }\n}\n","<bit-simple-dialog>\n  <i\n    bitDialogIcon\n    class=\"bwi tw-text-3xl bwi-exclamation-triangle tw-text-warning\"\n    aria-hidden=\"true\"\n  ></i>\n  <span bitDialogTitle>{{ \"decryptionError\" | i18n }}</span>\n  <div bitDialogContent>\n    <p>\n      {{ \"couldNotDecryptVaultItemsBelow\" | i18n }}\n      <a bitLink href=\"#\" (click)=\"openContactSupport($event)\">{{\n        \"contactCSToAvoidDataLossPart1\" | i18n\n      }}</a>\n      {{ \"contactCSToAvoidDataLossPart2\" | i18n }}\n    </p>\n    <ul class=\"tw-list-none tw-pl-0\">\n      <li\n        *ngFor=\"let id of params.cipherIds\"\n        class=\"tw-text-code tw-font-mono tw-py-0.5\"\n        (click)=\"selectText(listItem)\"\n        #listItem\n      >\n        {{ id }}\n      </li>\n    </ul>\n  </div>\n  <ng-container bitDialogFooter>\n    <button type=\"button\" bitButton buttonType=\"primary\" (click)=\"dialogRef.close(false)\">\n      {{ \"close\" | i18n }}\n    </button>\n  </ng-container>\n</bit-simple-dialog>\n","import { DIALOG_DATA, DialogRef } from \"@angular/cdk/dialog\";\nimport { CommonModule } from \"@angular/common\";\nimport { Component, inject } from \"@angular/core\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport { CipherId } from \"@bitwarden/common/types/guid\";\nimport {\n  AnchorLinkDirective,\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  DialogService,\n  TypographyModule,\n} from \"@bitwarden/components\";\n\nexport type DecryptionFailureDialogParams = {\n  cipherIds: CipherId[];\n};\n\n@Component({\n  standalone: true,\n  selector: \"vault-decryption-failure-dialog\",\n  templateUrl: \"./decryption-failure-dialog.component.html\",\n  imports: [\n    DialogModule,\n    CommonModule,\n    TypographyModule,\n    JslibModule,\n    AsyncActionsModule,\n    ButtonModule,\n    AnchorLinkDirective,\n  ],\n})\nexport class DecryptionFailureDialogComponent {\n  protected dialogRef = inject(DialogRef);\n  protected params = inject<DecryptionFailureDialogParams>(DIALOG_DATA);\n  protected platformUtilsService = inject(PlatformUtilsService);\n\n  selectText(element: HTMLElement) {\n    const selection = window.getSelection();\n    if (selection == null) {\n      return;\n    }\n    selection.removeAllRanges();\n    const range = document.createRange();\n    range.selectNodeContents(element);\n    selection.addRange(range);\n  }\n\n  openContactSupport(event: Event) {\n    event.preventDefault();\n    this.platformUtilsService.launchUri(\"https://bitwarden.com/contact\");\n  }\n\n  static open(dialogService: DialogService, params: DecryptionFailureDialogParams) {\n    return dialogService.open(DecryptionFailureDialogComponent, { data: params });\n  }\n}\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const DeactivatedOrg = svgIcon`\n<svg width=\"138\" height=\"118\" viewBox=\"0 0 138 118\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <g clip-path=\"url(#clip0_2929_17380)\">\n    <path class=\"tw-stroke-art-primary\" d=\"M80.0852 15.889V11.7504C80.0852 9.75243 78.6181 8.18262 76.7509 8.18262H53.1445C51.2773 8.18262 49.8102 9.75243 49.8102 11.7504V16.0317\"  stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M73.3568 7.06126V3.568C73.3568 1.75668 71.8648 0.333496 69.9658 0.333496H59.9285C58.0295 0.333496 56.5374 1.75668 56.5374 3.568V7.06126\"  stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M41.9611 29.8517V20.5736C41.9611 18.658 43.4441 17.1528 45.3315 17.1528H84.5637C86.4511 17.1528 87.9341 18.658 87.9341 20.5736V83.2728\"  stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M12.8074 103.493V32.9262C12.8074 31.0004 14.3311 29.4873 16.2703 29.4873H56.4389C58.3781 29.4873 59.9018 31.0004 59.9018 32.9262V103.493\"  stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M36.3545 39.5791V94.5225\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M47.5677 39.5791V94.5225\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M78.9634 26.1235V37.3365\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M78.9634 45.1851V56.398\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M78.9634 64.2476V75.4605\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M78.9634 83.3091V94.522\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M69.9932 26.1235V37.3365\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M69.9932 45.1851V56.398\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M69.9932 64.2476V75.4605\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M69.9932 83.3091V94.522\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M24.0202 39.5791V94.5225\"  stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-stroke-art-primary\" d=\"M0.473145 104.614H75.3408\"  stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n    <path class=\"tw-fill-danger-600\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M121.425 111.921L99.1265 73.2989C98.3006 71.8685 96.236 71.8685 95.4101 73.2989L73.1119 111.921C72.286 113.351 73.3183 115.139 74.97 115.139H119.567C121.218 115.139 122.251 113.351 121.425 111.921ZM101.604 71.8685C99.6771 68.5308 94.8595 68.5308 92.9325 71.8685L70.6343 110.49C68.7073 113.828 71.116 118 74.97 118H119.567C123.421 118 125.829 113.828 123.902 110.49L101.604 71.8685Z\"/>\n    <path class=\"tw-fill-danger-600\" d=\"M98.2704 84.3848C98.8321 84.3848 99.2836 84.8473 99.2701 85.4088L98.8811 101.584C98.8681 102.127 98.4243 102.56 97.8814 102.56H96.6544C96.1118 102.56 95.6682 102.127 95.6547 101.585L95.254 85.4095C95.24 84.8477 95.6917 84.3848 96.2537 84.3848H98.2704Z\" />\n    <circle class=\"tw-fill-danger-600\" cx=\"97.2682\" cy=\"106.556\" r=\"2.14565\" />\n  </g>\n  <defs>\n    <clipPath id=\"clip0_2929_17380\">\n      <rect width=\"138\" height=\"118\" class=\"tw-fill-danger-600\"/>\n    </clipPath>\n  </defs>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const NoFolders = svgIcon`\n<svg width=\"147\" height=\"91\" viewBox=\"0 0 147 91\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n  <path class=\"tw-stroke-art-accent\" d=\"M64.8263 1.09473V9.90589\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M42.1936 6.09082L46.6564 13.7215\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M53.8507 2.4209L55.4006 11.0982\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M76.1821 2.50293L73.8719 11.0139\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M87.4594 6.09082L82.9966 13.7215\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M100.358 89.3406H28.3419C26.1377 89.3406 24.3422 87.8759 24.3422 86.0715V24.5211C24.3422 22.7167 26.127 21.252 28.3419 21.252H61.6082C63.8124 21.252 65.608 22.7167 65.608 24.5211V28.5013C65.608 30.5073 67.3928 32.1313 69.6077 32.1313H82.105\" stroke-width=\"2.5\" stroke-miterlimit=\"10\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M82.344 41.7686H40.1042C37.9646 41.7686 36.1475 42.7663 35.8465 44.1036L26.3203 86.2411C25.9547 87.8757 27.9653 89.3404 30.5781 89.3404H107.906C110.045 89.3404 111.862 88.3427 112.163 87.0053L116.904 62.5844\" stroke-width=\"2.5\" stroke-miterlimit=\"10\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M28.1209 36.6897V27.0451C28.1209 25.9523 29.0068 25.0664 30.0996 25.0664H40.7775\" stroke-width=\"1.25\" stroke-linecap=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M105.433 64.0751C119.875 65.725 132.919 55.3558 134.569 40.9147C136.219 26.4737 125.849 13.4294 111.408 11.7794C96.9673 10.1295 83.923 20.4988 82.2731 34.9398C80.6232 49.3809 90.9924 62.4252 105.433 64.0751Z\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <path class=\"tw-stroke-art-accent\" d=\"M105.834 60.5706C118.253 61.9895 129.484 52.9549 130.92 40.3912M85.9456 35.2528C87.381 22.6891 98.6125 13.6544 111.032 15.0734\" stroke-width=\"1.25\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M122.014 60.6246L125.553 65.0773L138.676 81.5851C139.806 83.0073 141.876 83.2437 143.298 82.1132L143.558 81.906C144.98 80.7755 145.217 78.7062 144.086 77.2841L130.964 60.7762L127.424 56.3235\" stroke-width=\"2.19854\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <path class=\"tw-stroke-art-primary\" d=\"M101.309 31.3349C101.309 31.3349 101.415 28.8033 103.894 26.6553C105.382 25.3511 107.153 25.0059 108.747 24.9675C110.199 24.9291 111.51 25.1976 112.254 25.6196C113.6 26.31 116.186 27.9594 116.186 31.5267C116.186 35.2858 113.919 36.9735 111.368 38.8531C108.818 40.7326 109.185 43.1796 109.185 45.2509\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n  <path class=\"tw-fill-art-primary\" d=\"M109.191 51.7764C110.02 51.7764 110.691 51.1049 110.691 50.2764C110.691 49.448 110.02 48.7764 109.191 48.7764C108.363 48.7764 107.691 49.448 107.691 50.2764C107.691 51.1049 108.363 51.7764 109.191 51.7764Z\" />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const Vault = svgIcon`\n<svg fill=\"none\" width=\"100\" height=\"90\" viewBox=\"0 0 100 90\" xmlns=\"http://www.w3.org/2000/svg\">\n<g>\n<path d=\"m73.446 81.044h17.001v3.4685c0 2.7615-2.2385 5-5 5h-7.0011c-2.7615 0-5-2.2385-5-5v-3.4685zm2 2v1.4685c0 1.6569 1.3431 3 3 3h7.0011c1.6569 0 3-1.3431 3-3v-1.4685h-13.001z\" clip-rule=\"evenodd\" class=\"tw-fill-art-accent\" fill-rule=\"evenodd\"/>\n<path d=\"m10.108 81.044h17.001v3.4685c0 2.7615-2.2385 5-5 5h-7.0011c-2.7614 0-5-2.2385-5-5v-3.4685zm2 2v1.4685c0 1.6569 1.3431 3 3 3h7.0011c1.6569 0 3-1.3431 3-3v-1.4685h-13.001z\" clip-rule=\"evenodd\" class=\"tw-fill-art-accent\" fill-rule=\"evenodd\"/>\n<path d=\"m4.2281 2.4304c-1.1655 0-2.1208 0.95235-2.1208 2.1402v74.318c0 1.1878 0.95534 2.1402 2.1208 2.1402h91.544c1.1655 0 2.1208-0.9524 2.1208-2.1402v-74.318c0-1.1878-0.9553-2.1402-2.1208-2.1402h-91.544zm-4.1208 2.1402c0-2.2807 1.8391-4.1402 4.1208-4.1402h91.544c2.2817 0 4.1208 1.8595 4.1208 4.1402v74.318c0 2.2807-1.8391 4.1402-4.1208 4.1402h-91.544c-2.2817 0-4.1208-1.8595-4.1208-4.1402v-74.318z\" clip-rule=\"evenodd\" class=\"tw-fill-art-primary\" fill-rule=\"evenodd\"/>\n<path d=\"m89.258 21.816c-0.7304 0-1.3307 0.5963-1.3307 1.3421v9.3686c0 0.7459 0.6003 1.3422 1.3307 1.3422 0.7303 0 1.3307-0.5963 1.3307-1.3422v-9.3686c0-0.7458-0.6004-1.3421-1.3307-1.3421zm-3.3307 1.3421c0-1.8412 1.4866-3.3421 3.3307-3.3421s3.3307 1.5009 3.3307 3.3421v9.3686c0 1.8412-1.4866 3.3422-3.3307 3.3422s-3.3307-1.501-3.3307-3.3422v-9.3686z\" clip-rule=\"evenodd\" class=\"tw-fill-art-accent\" fill-rule=\"evenodd\"/>\n<path d=\"m89.258 45.237c-0.7304 0-1.3307 0.5962-1.3307 1.3421v9.3686c0 0.7459 0.6003 1.3422 1.3307 1.3422 0.7303 0 1.3307-0.5963 1.3307-1.3422v-9.3686c0-0.7459-0.6004-1.3421-1.3307-1.3421zm-3.3307 1.3421c0-1.8412 1.4866-3.3421 3.3307-3.3421s3.3307 1.5009 3.3307 3.3421v9.3686c0 1.8412-1.4866 3.3422-3.3307 3.3422s-3.3307-1.501-3.3307-3.3422v-9.3686z\" clip-rule=\"evenodd\" class=\"tw-fill-art-accent\" fill-rule=\"evenodd\"/>\n<path d=\"m33.443 25.468c0-0.5523 0.4477-1 1-1 1.4163 0 2.6668 1.0953 2.6668 2.5705v21.595c0 1.4752-1.2505 2.5705-2.6668 2.5705-0.5523 0-1-0.4477-1-1s0.4477-1 1-1c0.4255 0 0.6668-0.3103 0.6668-0.5705v-21.595c0-0.2602-0.2413-0.5705-0.6668-0.5705-0.5523 0-1-0.4477-1-1z\" clip-rule=\"evenodd\" class=\"tw-fill-art-accent\" fill-rule=\"evenodd\"/>\n<path d=\"m60.556 48.551c-3.2028 0-5.7978-3.1022-5.7978-6.9179 0-3.8156 2.595-6.9114 5.7978-6.9114 3.2029 0 5.7913 3.1022 5.7913 6.9114 0 3.8093-2.5949 6.9179-5.7913 6.9179zm0-14.791c-3.6408 0-6.6018 3.529-6.6018 7.8733 0 4.3444 2.961 7.8798 6.6018 7.8798s6.5953-3.529 6.5953-7.8798c0-4.3507-2.961-7.8733-6.5953-7.8733z\" class=\"tw-fill-art-accent\"/>\n<path d=\"m60.556 26.027c-0.4379 0-0.804 0.4267-0.804 0.9555l-0.0201 3.257c-2.0247 0.2075-3.8681 1.1748-5.3381 2.6521l-1.9561-2.2909c-0.156-0.1901-0.3638-0.2856-0.5654-0.2866h0.0033-0.0065 0.0032c-0.2015 1e-3 -0.4028 0.0965-0.5588 0.2866-0.3138 0.3695-0.3138 0.9746 0 1.3441l1.9348 2.3123 0.0034 0.0042c-1.2532 1.7574-2.0625 3.9789-2.2323 6.4166h0.7647c0.0488 0 0.0966 0.0053 0.143 0.0154-0.0465-0.01-0.0942-0.0152-0.143-0.0152h-3.497c-0.438 0-0.804 0.4268-0.804 0.9491 0 0.5224 0.366 0.9555 0.804 0.9555h2.7323c0.1698 2.4381 0.986 4.66 2.2331 6.4175l-0.0028 0.0034-1.9297 2.3187c-0.3138 0.3694-0.3138 0.9746 0 1.344 0.1568 0.1848 0.3595 0.2803 0.5621 0.2803s0.4118-0.0955 0.5687-0.2803l1.9282-2.3123 1e-4 -1e-4c1.4757 1.4954 3.3361 2.4695 5.3729 2.6684v3.2622c0 0.5287 0.3661 0.9555 0.804 0.9555 0.438 0 0.7975-0.4268 0.7975-0.9555l0.0212-3.263c2.0293-0.2066 3.8833-1.1701 5.3555-2.6581l0.0028 0.0033 1.9282 2.306c0.1569 0.1847 0.3661 0.2803 0.5687 0.2803s0.4118-0.0956 0.5687-0.2803c0.3137-0.3695 0.3137-0.9746 0-1.3441l-1.9269-2.3334c1.2466-1.7626 2.0628-3.9762 2.2337-6.4125h2.7195c0.438 0 0.804-0.4268 0.804-0.9555s-0.366-0.9491-0.804-0.9491l-2.7198-0.0166c-0.1709-2.4276-0.9825-4.634-2.2222-6.3932l1.9157-2.3235c0.3137-0.3695 0.3137-0.9746 0-1.3441-0.1569-0.1911-0.3661-0.2866-0.5687-0.2866s-0.4118 0.0955-0.5687 0.2866l-1.9222 2.2988c-1.4756-1.4884-3.3591-2.454-5.3855-2.665v-3.252c0-0.5288-0.353-0.9555-0.7975-0.9555zm6.72 8.9311c0.0201-0.02 0.0396-0.0413 0.0584-0.0642l0.0144-0.0173-0.021 0.0239c-0.0167 0.0203-0.034 0.0395-0.0518 0.0576zm1.2545 6.6691c-0.0028-0.0609-0.0032-0.1186-0.0013-0.1732-0.0775-5.1648-3.6205-9.3364-7.9594-9.3438l-0.0138 1e-4 -0.0114-1e-4c-4.3862 0.0089-7.9565 4.2734-7.9565 9.5168 0 5.2239 3.5479 9.4824 7.9117 9.5229 0.0178-9e-4 0.036-0.0014 0.0546-0.0014 0.0194 0 0.0385 5e-4 0.0572 0.0015 4.3591-0.0317 7.9116-4.2849 7.9189-9.5068v-0.016zm-13.411 7.6696c0.0205-0.0858 0.0307-0.174 0.0307-0.2615 0-0.242-0.0784-0.4904-0.2353-0.6752-0.1503-0.1911-0.3595-0.2803-0.5621-0.2803l-0.0114 1e-4h0.0113c0.2026 0 0.4118 0.0892 0.5621 0.2803 0.1569 0.1847 0.2353 0.4332 0.2353 0.6752 0 0.0874-0.0102 0.1757-0.0306 0.2614zm-2.5382-7.6696c0-0.0236-7e-4 -0.0471-0.0021-0.0702 0.0014 0.0231 0.0022 0.0465 0.0022 0.07 0 0.0175-4e-4 0.0349-0.0012 0.0521 7e-4 -0.0172 0.0011-0.0345 0.0011-0.0519z\" clip-rule=\"evenodd\" class=\"tw-fill-art-primary\" fill-rule=\"evenodd\"/>\n<path d=\"m25.442 10.125c0-1.2133 1.0146-2.1704 2.2154-2.1008l58.262 3.4199c1.1054 0.0669 1.9723 0.9842 1.9723 2.1009v7.3296h2v-7.3296c0-2.1736-1.6899-3.9673-3.853-4.0974l-58.264-3.42c-2.1001-0.12216-3.8976 1.356-4.264 3.347h-8.7578c-2.2641 0-4.0891 1.845-4.0891 4.1081v55.945c0 2.2631 1.825 4.1081 4.0891 4.1081h8.7036c0.1798 2.1936 2.0771 3.8865 4.3187 3.7561l58.264-3.4201c2.1631-0.1301 3.853-1.9237 3.853-4.0973v-11.184h-2v11.184c0 1.117-0.8674 2.0344-1.9731 2.1009l-58.261 3.4199c-1.2008 0.0696-2.2155-0.8875-2.2155-2.1009v-63.07zm-2 61.411v-60.162h-8.6897c-1.148 0-2.0891 0.9381-2.0891 2.1081v55.945c0 1.1701 0.9411 2.1081 2.0891 2.1081h8.6897zm64.449-36.67v9.4289h2v-9.4289h-2z\" clip-rule=\"evenodd\" class=\"tw-fill-art-primary\" fill-rule=\"evenodd\"/>\n</g>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const EmptyTrash = svgIcon`\n<svg width=\"174\" height=\"100\" viewBox=\"0 0 174 100\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M113.938 95.7919L121.802 25.2171C121.882 24.4997 121.32 23.8721 120.599 23.8721H52.8158C52.0939 23.8721 51.5324 24.4997 51.6123 25.2171L59.4759 95.7919C59.5442 96.405 60.0625 96.8687 60.6794 96.8687H112.735C113.352 96.8687 113.87 96.405 113.938 95.7919Z\" fill=\"none\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M70.9462 38.4568C71.1965 38.44 71.4141 38.6291 71.4323 38.8793L74.2991 78.3031C74.3173 78.5532 74.1292 78.7696 73.879 78.7865C73.6288 78.8033 73.4112 78.6142 73.393 78.364L70.5261 38.9402C70.5079 38.6901 70.696 38.4737 70.9462 38.4568Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M87.4314 38.4082C87.6822 38.4082 87.8855 38.6115 87.8855 38.8623L87.8855 78.3824C87.8855 78.6332 87.6822 78.8365 87.4314 78.8365C87.1806 78.8365 86.9773 78.6332 86.9773 78.3824L86.9773 38.8623C86.9773 38.6115 87.1806 38.4082 87.4314 38.4082Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M103.917 38.4572C104.167 38.474 104.355 38.6905 104.337 38.9406L101.47 78.3644C101.452 78.6145 101.234 78.8037 100.984 78.7868C100.734 78.77 100.546 78.5536 100.564 78.3035L103.431 38.8797C103.449 38.6295 103.667 38.4404 103.917 38.4572Z\"/>\n<path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M52.8159 24.7803C52.6354 24.7803 52.4951 24.9372 52.515 25.1165L59.3506 86.4648H76.54C76.7908 86.4648 76.9941 86.6682 76.9941 86.9189C76.9941 87.1697 76.7908 87.373 76.54 87.373H59.4518L60.3786 95.6913C60.3957 95.8446 60.5252 95.9605 60.6795 95.9605H112.735C112.889 95.9605 113.019 95.8446 113.036 95.6913L120.353 30.0186L58.2399 30.0186C57.9891 30.0186 57.7858 29.8152 57.7858 29.5645C57.7858 29.3137 57.9891 29.1104 58.2399 29.1104L120.455 29.1104L120.9 25.1165C120.919 24.9372 120.779 24.7803 120.599 24.7803H52.8159ZM50.7098 25.3177C50.5699 24.0621 51.5526 22.9639 52.8159 22.9639H120.599C121.862 22.9639 122.845 24.0622 122.705 25.3177L114.841 95.8924C114.722 96.9654 113.815 97.7769 112.735 97.7769H60.6795C59.5999 97.7769 58.6929 96.9654 58.5734 95.8924L50.7098 25.3177Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M88.4499 0.527344C88.9515 0.527344 89.3581 0.933958 89.3581 1.43554V11.2051C89.3581 11.7067 88.9515 12.1133 88.4499 12.1133C87.9484 12.1133 87.5417 11.7067 87.5417 11.2051V1.43554C87.5417 0.933958 87.9484 0.527344 88.4499 0.527344Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M56.8137 6.2397C57.2694 6.03014 57.8774 6.18948 58.1718 6.59559L64.3048 15.0563C64.5992 15.4624 64.4684 15.9615 64.0127 16.1711C63.557 16.3806 62.9489 16.2213 62.6545 15.8152L56.5215 7.35447C56.2272 6.94836 56.358 6.44926 56.8137 6.2397Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M73.1704 2.01822C73.6671 1.94846 74.1576 2.28892 74.266 2.77864L76.396 12.3998C76.5044 12.8895 76.1896 13.3431 75.6929 13.4129C75.1962 13.4826 74.7057 13.1422 74.5973 12.6524L72.4673 3.03126C72.3589 2.54153 72.6737 2.08798 73.1704 2.01822Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M104.344 2.13682C104.835 2.24151 105.103 2.71177 104.943 3.18717L101.768 12.6239C101.609 13.0993 101.081 13.3998 100.591 13.2951C100.1 13.1904 99.8321 12.7202 99.9921 12.2448L103.167 2.80806C103.327 2.33266 103.854 2.03213 104.344 2.13682Z\"/>\n<path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M120.085 6.23979C120.541 6.44935 120.672 6.94845 120.378 7.35456L114.245 15.8153C113.95 16.2214 113.342 16.3807 112.886 16.1712C112.431 15.9616 112.3 15.4625 112.594 15.0564L118.727 6.59568C119.022 6.18957 119.63 6.03023 120.085 6.23979Z\"/>\n<path d=\"M129.384 27.2001L124.272 27.9646C123.505 28.0793 123.059 28.8635 123.353 29.579L150.626 95.9087C150.908 96.5946 151.738 96.888 152.38 96.5285L156.79 94.0573C157.31 93.766 157.526 93.1391 157.297 92.5833L130.726 27.9604C130.509 27.4321 129.95 27.1155 129.384 27.2001Z\" fill=\"none\"/>\n<path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M144.4 49.2028C145.911 49.8345 146.573 50.261 147.061 50.8557C147.593 51.504 147.976 52.4111 148.726 54.2353L151.93 62.0272C152.68 63.8513 153.045 64.7652 153.118 65.587C153.185 66.3407 153.004 67.0854 152.349 68.5355C152.26 68.732 152.174 68.9115 152.09 69.0865C151.969 69.3389 151.852 69.5821 151.738 69.8536C151.527 70.3581 151.273 71.0631 150.824 72.4643C150.693 72.8741 150.581 73.2651 150.49 73.6452L139.404 46.6825C139.741 46.9012 140.101 47.1138 140.489 47.3276C141.814 48.0582 142.501 48.408 143.015 48.6385C143.292 48.7625 143.55 48.864 143.818 48.9693C144.004 49.0424 144.195 49.1173 144.4 49.2028ZM134.933 40.574C134.938 40.5882 134.943 40.6024 134.949 40.6166C134.99 40.7164 135.031 40.8147 135.072 40.9115L151.431 80.6977C151.47 80.7949 151.51 80.8934 151.551 80.9931C151.557 81.0072 151.563 81.0211 151.569 81.0349L156.449 92.9041C156.507 93.043 156.453 93.1998 156.323 93.2726L151.912 95.7438C151.752 95.8337 151.544 95.7603 151.474 95.5888L124.201 29.2592C124.127 29.0803 124.239 28.8843 124.431 28.8556L129.543 28.0911C129.685 28.0699 129.824 28.1491 129.879 28.2812L134.933 40.574ZM136.764 40.2619C137.429 41.8455 137.981 42.8653 138.622 43.6471C139.287 44.4581 140.092 45.0652 141.355 45.7612C142.672 46.4872 143.303 46.8056 143.742 47.0027C144.006 47.1212 144.177 47.1875 144.389 47.2695C144.566 47.338 144.771 47.4175 145.082 47.5476C146.656 48.2055 147.682 48.778 148.476 49.7453C149.205 50.6349 149.689 51.8128 150.366 53.4594L150.422 53.5946L153.626 61.3866L153.681 61.5218C154.359 63.1683 154.843 64.3461 154.943 65.4735C155.051 66.6995 154.708 67.7893 154.026 69.2998C153.891 69.5983 153.797 69.7904 153.717 69.9561L153.717 69.9563C153.621 70.1545 153.543 70.3148 153.434 70.5741C153.253 71.0054 153.019 71.6508 152.572 73.0431C152.144 74.3778 151.988 75.3479 152.079 76.3759C152.166 77.3668 152.489 78.4733 153.13 80.066L158.145 92.2635C158.545 93.2361 158.168 94.3331 157.258 94.8429L152.847 97.3142C151.724 97.9433 150.271 97.4298 149.778 96.2295L122.505 29.8998C121.99 28.6476 122.771 27.2752 124.113 27.0746L129.225 26.3101C130.216 26.162 131.194 26.716 131.574 27.6406L136.764 40.2619Z\"/>\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const ExclamationTriangle = svgIcon`\n<svg width=\"120\" height=\"100\" viewBox=\"0 0 120 100\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n<path d=\"M91.0871 85.1224H28.913C27.5592 85.1349 26.2271 84.7737 25.0549 84.0713C23.8828 83.3688 22.914 82.3578 22.248 81.1386C21.5868 79.9571 21.2405 78.6149 21.2502 77.2502C21.2599 75.8855 21.6207 74.5484 22.2964 73.3768L53.3835 18.7683C54.0665 17.5817 55.0352 16.6008 56.1953 15.9184C57.3554 15.2361 58.6656 14.8773 60 14.8773C61.3345 14.8773 62.6447 15.2361 63.8048 15.9184C64.9649 16.6008 65.9336 17.5817 66.6166 18.7683L97.7036 73.3768C98.3793 74.5484 98.7426 75.8855 98.7499 77.2502C98.7571 78.6149 98.4132 79.9571 97.7521 81.1386C97.0861 82.3578 96.1173 83.3713 94.9451 84.0713C93.773 84.7712 92.4409 85.1349 91.0871 85.1224ZM60 19.8972C59.5084 19.8896 59.0216 20.0176 58.5929 20.2659C58.1643 20.5143 57.8058 20.878 57.554 21.3171L26.4717 75.9256C26.2344 76.3371 26.1085 76.8087 26.1085 77.2878C26.1085 77.767 26.2344 78.2386 26.4717 78.65C26.7188 79.0991 27.0772 79.4704 27.5107 79.7263C27.9442 79.9821 28.4359 80.1126 28.9324 80.1051H91.0871C91.586 80.1126 92.0776 79.9821 92.5087 79.7263C92.9398 79.4704 93.3007 79.0991 93.5477 78.65C93.7851 78.2386 93.911 77.767 93.911 77.2878C93.911 76.8087 93.7851 76.3371 93.5477 75.9256L62.4461 21.3171C62.1943 20.878 61.8358 20.5168 61.4071 20.2659C60.9785 20.0151 60.4917 19.8896 60 19.8972ZM60 62.8705C59.3582 62.8705 58.7407 62.6071 58.2878 62.1355C57.8349 61.6639 57.5782 61.0267 57.5782 60.3619V37.4177C57.5782 36.7529 57.8325 36.1132 58.2878 35.644C58.7431 35.1749 59.3582 34.909 60 34.909C60.6418 34.909 61.2594 35.1724 61.7123 35.644C62.1652 36.1157 62.4219 36.7529 62.4219 37.4177V60.3619C62.4219 61.0267 62.1676 61.6664 61.7123 62.1355C61.257 62.6046 60.6418 62.8705 60 62.8705ZM60 75.2734C61.5864 75.2734 62.8724 73.9413 62.8724 72.2981C62.8724 70.6549 61.5864 69.3228 60 69.3228C58.4137 69.3228 57.1277 70.6549 57.1277 72.2981C57.1277 73.9413 58.4137 75.2734 60 75.2734Z\" class=\"tw-fill-warning-600\" />\n</svg>\n`;\n","import { svgIcon } from \"@bitwarden/components\";\n\nexport const UserLock = svgIcon`\n    <svg width=\"120\" height=\"100\" viewBox=\"0 0 120 100\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M0 19.6127C0 14.9806 3.71508 11.2256 8.29787 11.2256H89.5153C94.098 11.2256 97.8131 14.9806 97.8131 19.6127V28.0844H95.2599V19.6127C95.2599 16.4059 92.688 13.8062 89.5153 13.8062H8.29787C5.12517 13.8062 2.55319 16.4059 2.55319 19.6127V68.6449C2.55319 71.8518 5.12517 74.4514 8.29787 74.4514H16.2389V77.032H8.29787C3.71509 77.032 0 73.277 0 68.6449V19.6127ZM50.9015 74.4514H63.2653V77.032H50.9015V74.4514Z\" />\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M88.7235 60.2578C97.5366 60.2578 104.681 53.0366 104.681 44.1287C104.681 35.2209 97.5366 27.9997 88.7235 27.9997C79.9105 27.9997 72.7661 35.2209 72.7661 44.1287C72.7661 53.0366 79.9105 60.2578 88.7235 60.2578ZM88.7235 62.8384C98.9467 62.8384 107.234 54.4618 107.234 44.1287C107.234 33.7957 98.9467 25.4191 88.7235 25.4191C78.5004 25.4191 70.2129 33.7957 70.2129 44.1287C70.2129 54.4618 78.5004 62.8384 88.7235 62.8384Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M33.8298 46.0642C28.7286 46.0642 24.2553 51.0589 24.2553 57.6771H21.7021C21.7021 50.0428 26.9452 43.4835 33.8298 43.4835C40.7144 43.4835 45.9575 50.0428 45.9575 57.6771H43.4043C43.4043 51.0589 38.931 46.0642 33.8298 46.0642Z\" />\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M60.8742 88.6448H115.299C116.596 88.6448 117.089 88.3032 117.227 88.1603C117.3 88.0845 117.558 87.7852 117.396 86.7815C115.225 73.2724 103.259 62.8383 88.7118 62.8383C74.1651 62.8383 62.1986 73.2724 60.0274 86.7815C59.9451 87.2938 60.0532 87.888 60.2785 88.2731C60.379 88.445 60.4746 88.5285 60.5381 88.5682C60.5886 88.5998 60.6806 88.6448 60.8742 88.6448ZM60.8742 91.2254H115.299C118.653 91.2254 120.416 89.4793 119.916 86.3677C117.539 71.5724 104.473 60.2577 88.7118 60.2577C72.9505 60.2577 59.8851 71.5724 57.5073 86.3677C57.1687 88.4743 58.2526 91.2254 60.8742 91.2254Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M44.6808 58.9675H22.9787C20.1585 58.9675 17.8723 61.2783 17.8723 64.1288V79.6126C17.8723 82.4631 20.1585 84.7739 22.9787 84.7739H44.6808C47.501 84.7739 49.7872 82.4631 49.7872 79.6126V64.1288C49.7872 61.2783 47.501 58.9675 44.6808 58.9675ZM22.9787 56.3868C18.7484 56.3868 15.3191 59.853 15.3191 64.1288V79.6126C15.3191 83.8884 18.7484 87.3546 22.9787 87.3546H44.6808C48.9111 87.3546 52.3404 83.8884 52.3404 79.6126V64.1288C52.3404 59.853 48.9111 56.3868 44.6808 56.3868H22.9787Z\"/>\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M33.8301 71.8707C34.5351 71.8707 35.1067 72.4484 35.1067 73.1611L35.1067 77.6923C35.1067 78.4049 34.5351 78.9826 33.8301 78.9826C33.125 78.9826 32.5535 78.4049 32.5535 77.6923L32.5535 73.1611C32.5535 72.4484 33.125 71.8707 33.8301 71.8707Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M78.315 18.3374C77.6099 18.3374 77.0384 17.7597 77.0384 17.0471V16.5436C77.0384 15.831 77.6099 15.2533 78.315 15.2533C79.02 15.2533 79.5916 15.831 79.5916 16.5436V17.0471C79.5916 17.7597 79.02 18.3374 78.315 18.3374Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M33.8299 74.3097C32.4198 74.3097 31.2767 73.1543 31.2767 71.729V71.2256C31.2767 69.8003 32.4198 68.6449 33.8299 68.6449C35.24 68.6449 36.3831 69.8003 36.3831 71.2256V71.729C36.3831 73.1543 35.24 74.3097 33.8299 74.3097Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M84.2903 18.3374C83.5853 18.3374 83.0137 17.7597 83.0137 17.0471V16.5436C83.0137 15.831 83.5853 15.2533 84.2903 15.2533C84.9953 15.2533 85.5669 15.831 85.5669 16.5436V17.0471C85.5669 17.7597 84.9953 18.3374 84.2903 18.3374Z\" />\n    <path class=\"tw-fill-art-accent\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M90.2644 18.3374C89.5594 18.3374 88.9878 17.7597 88.9878 17.0471V16.5436C88.9878 15.831 89.5594 15.2533 90.2644 15.2533C90.9695 15.2533 91.541 15.831 91.541 16.5436V17.0471C91.541 17.7597 90.9695 18.3374 90.2644 18.3374Z\"/>\n    <path class=\"tw-fill-art-primary\" fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M95.7422 22.0817H0.638428V20.7914H95.7422V22.0817Z\" />\n    </svg>\n`;\n","import { Injectable } from \"@angular/core\";\nimport { Observable } from \"rxjs\";\nimport { Jsonify } from \"type-fest\";\n\nimport {\n  StateProvider,\n  UserKeyDefinition,\n  NEW_DEVICE_VERIFICATION_NOTICE,\n  SingleUserState,\n} from \"@bitwarden/common/platform/state\";\nimport { UserId } from \"@bitwarden/common/types/guid\";\n\n// This service checks when to show New Device Verification Notice to Users\n// It will be a two phase approach and the values below will work with two different feature flags\n// If a user dismisses the notice, use \"last_dismissal\" to wait 7 days before re-prompting\n// permanent_dismissal will be checked if the user should never see the notice again\nexport class NewDeviceVerificationNotice {\n  last_dismissal: Date | null = null;\n  permanent_dismissal: boolean | null = null;\n\n  constructor(obj: Partial<NewDeviceVerificationNotice>) {\n    if (obj == null) {\n      return;\n    }\n    this.last_dismissal = obj.last_dismissal || null;\n    this.permanent_dismissal = obj.permanent_dismissal || null;\n  }\n\n  static fromJSON(obj: Jsonify<NewDeviceVerificationNotice>) {\n    return Object.assign(new NewDeviceVerificationNotice({}), obj);\n  }\n}\n\nexport const NEW_DEVICE_VERIFICATION_NOTICE_KEY =\n  new UserKeyDefinition<NewDeviceVerificationNotice>(\n    NEW_DEVICE_VERIFICATION_NOTICE,\n    \"noticeState\",\n    {\n      deserializer: (obj: Jsonify<NewDeviceVerificationNotice>) =>\n        NewDeviceVerificationNotice.fromJSON(obj),\n      clearOn: [],\n    },\n  );\n\n@Injectable()\nexport class NewDeviceVerificationNoticeService {\n  constructor(private stateProvider: StateProvider) {}\n\n  private noticeState(userId: UserId): SingleUserState<NewDeviceVerificationNotice> {\n    return this.stateProvider.getUser(userId, NEW_DEVICE_VERIFICATION_NOTICE_KEY);\n  }\n\n  noticeState$(userId: UserId): Observable<NewDeviceVerificationNotice | null> {\n    return this.noticeState(userId).state$;\n  }\n\n  async updateNewDeviceVerificationNoticeState(\n    userId: UserId,\n    newState: NewDeviceVerificationNotice,\n  ): Promise<void> {\n    await this.noticeState(userId).update(() => {\n      return { ...newState };\n    });\n  }\n}\n","import { DialogRef } from \"@angular/cdk/dialog\";\nimport { Component } from \"@angular/core\";\nimport { FormBuilder, ReactiveFormsModule, Validators } from \"@angular/forms\";\nimport { firstValueFrom, map } from \"rxjs\";\n\nimport { JslibModule } from \"@bitwarden/angular/jslib.module\";\nimport { AccountService } from \"@bitwarden/common/auth/abstractions/account.service\";\nimport { I18nService } from \"@bitwarden/common/platform/abstractions/i18n.service\";\nimport { PlatformUtilsService } from \"@bitwarden/common/platform/abstractions/platform-utils.service\";\nimport {\n  AsyncActionsModule,\n  ButtonModule,\n  DialogModule,\n  FormFieldModule,\n  IconButtonModule,\n} from \"@bitwarden/components\";\nimport { KeyService } from \"@bitwarden/key-management\";\n\n/**\n * Used to verify the user's Master Password for the \"Master Password Re-prompt\" feature only.\n * See UserVerificationComponent for any other situation where you need to verify the user's identity.\n */\n@Component({\n  standalone: true,\n  selector: \"vault-password-reprompt\",\n  imports: [\n    JslibModule,\n    AsyncActionsModule,\n    ButtonModule,\n    DialogModule,\n    FormFieldModule,\n    IconButtonModule,\n    ReactiveFormsModule,\n  ],\n  templateUrl: \"password-reprompt.component.html\",\n})\nexport class PasswordRepromptComponent {\n  formGroup = this.formBuilder.group({\n    masterPassword: [\"\", { validators: [Validators.required], updateOn: \"submit\" }],\n  });\n\n  constructor(\n    protected keyService: KeyService,\n    protected platformUtilsService: PlatformUtilsService,\n    protected i18nService: I18nService,\n    protected formBuilder: FormBuilder,\n    protected dialogRef: DialogRef,\n    protected accountService: AccountService,\n  ) {}\n\n  submit = async () => {\n    // Exit early when a master password is not provided.\n    // The form field required error will be shown to users in these cases.\n    if (!this.formGroup.value.masterPassword) {\n      return;\n    }\n\n    const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));\n\n    if (userId == null) {\n      throw new Error(\"An active user is expected while doing password reprompt.\");\n    }\n\n    const storedMasterKey = await this.keyService.getOrDeriveMasterKey(\n      this.formGroup.value.masterPassword,\n      userId,\n    );\n    if (\n      !(await this.keyService.compareKeyHash(\n        this.formGroup.value.masterPassword,\n        storedMasterKey,\n        userId,\n      ))\n    ) {\n      this.platformUtilsService.showToast(\n        \"error\",\n        this.i18nService.t(\"errorOccurred\"),\n        this.i18nService.t(\"invalidMasterPassword\"),\n      );\n      return;\n    }\n\n    this.dialogRef.close(true);\n  };\n}\n","<form [formGroup]=\"formGroup\" [bitSubmit]=\"submit\">\n  <bit-dialog>\n    <span bitDialogTitle>\n      {{ \"passwordConfirmation\" | i18n }}\n    </span>\n    <ng-container bitDialogContent>\n      {{ \"passwordConfirmationDesc\" | i18n }}\n\n      <bit-form-field disableMargin class=\"tw-mt-6\">\n        <bit-label>{{ \"masterPass\" | i18n }}</bit-label>\n        <input\n          bitInput\n          appAutofocus\n          id=\"masterPassword\"\n          type=\"password\"\n          formControlName=\"masterPassword\"\n        />\n        <button type=\"button\" bitSuffix bitIconButton bitPasswordInputToggle></button>\n      </bit-form-field>\n    </ng-container>\n\n    <ng-container bitDialogFooter>\n      <button bitButton buttonType=\"primary\" bitFormButton type=\"submit\">\n        <span>{{ \"ok\" | i18n }}</span>\n      </button>\n      <button bitButton buttonType=\"secondary\" bitDialogClose type=\"button\">\n        {{ \"cancel\" | i18n }}\n      </button>\n    </ng-container>\n  </bit-dialog>\n</form>\n","import { Injectable } from \"@angular/core\";\nimport { firstValueFrom, lastValueFrom } from \"rxjs\";\n\nimport { UserVerificationService } from \"@bitwarden/common/auth/abstractions/user-verification/user-verification.service.abstraction\";\nimport { Utils } from \"@bitwarden/common/platform/misc/utils\";\nimport { CipherRepromptType } from \"@bitwarden/common/vault/enums\";\nimport { CipherView } from \"@bitwarden/common/vault/models/view/cipher.view\";\nimport { DialogService } from \"@bitwarden/components\";\n\nimport { PasswordRepromptComponent } from \"../components/password-reprompt.component\";\n\n/**\n * Used to verify the user's Master Password for the \"Master Password Re-prompt\" feature only.\n * See UserVerificationService for any other situation where you need to verify the user's identity.\n */\n@Injectable()\nexport class PasswordRepromptService {\n  constructor(\n    private dialogService: DialogService,\n    private userVerificationService: UserVerificationService,\n  ) {}\n\n  enabled$ = Utils.asyncToObservable(() =>\n    this.userVerificationService.hasMasterPasswordAndMasterKeyHash(),\n  );\n\n  protectedFields() {\n    return [\"TOTP\", \"Password\", \"H_Field\", \"Card Number\", \"Security Code\"];\n  }\n\n  async passwordRepromptCheck(cipher: CipherView) {\n    if (cipher.reprompt === CipherRepromptType.None) {\n      return true;\n    }\n\n    return await this.showPasswordPrompt();\n  }\n\n  async showPasswordPrompt() {\n    if (!(await this.enabled())) {\n      return true;\n    }\n\n    const dialog = this.dialogService.open<boolean>(PasswordRepromptComponent, {\n      ariaModal: true,\n    });\n\n    const result = await lastValueFrom(dialog.closed);\n\n    return result === true;\n  }\n\n  enabled() {\n    return firstValueFrom(this.enabled$);\n  }\n}\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\tloaded: false,\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Flag the module as loaded\n\tmodule.loaded = true;\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n// expose the module cache\n__webpack_require__.c = __webpack_module_cache__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + (chunkId === 357 ? \"encrypt-worker\" : chunkId) + \".\" + {\"64\":\"17e0ba738bb50077c946\",\"173\":\"f2f4733f506e57eda013\",\"331\":\"d84ee91694cb3518c3c8\",\"357\":\"6f09472bb5c19382e0d4\",\"502\":\"501483e1ee39a5aad8a2\",\"505\":\"6ef417c6186ca430555b\",\"506\":\"21bb9e8f747672eeb22b\",\"531\":\"71bfd0fc2a16f0acc44c\",\"568\":\"bb5c4e695e816fcaf464\",\"573\":\"27b951b69d1a788dbc42\",\"619\":\"7806410f60f455355680\",\"677\":\"199e72def6c74f356843\",\"680\":\"f006df0033be5030ef16\",\"782\":\"6eddaf3c9f8cc7fbf299\",\"807\":\"ed1e3a79eb4208955bd9\",\"825\":\"89c101434f08c1d5dfa0\",\"887\":\"4fa1b5784a38bed10538\",\"960\":\"2f15ac4af5b4718887c5\",\"982\":\"74e3b99c39e6db3490fb\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.hmd = (module) => {\n\tmodule = Object.create(module);\n\tif (!module.children) module.children = [];\n\tObject.defineProperty(module, 'exports', {\n\t\tenumerable: true,\n\t\tset: () => {\n\t\t\tthrow new Error('ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: ' + module.id);\n\t\t}\n\t});\n\treturn module;\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nmd = (module) => {\n\tmodule.paths = [];\n\tif (!module.children) module.children = [];\n\treturn module;\n};","__webpack_require__.v = (exports, wasmModuleId, wasmModuleHash, importsObj) => {\n\n\tvar req = fetch(__webpack_require__.p + \"\" + wasmModuleHash + \".module.wasm\");\n\tvar fallback = () => (req\n\t\t.then((x) => (x.arrayBuffer()))\n\t\t.then((bytes) => (WebAssembly.instantiate(bytes, importsObj)))\n\t\t.then((res) => (Object.assign(exports, res.instance.exports))));\n\treturn req.then((res) => {\n\t\tif (typeof WebAssembly.instantiateStreaming === \"function\") {\n\n\t\t\treturn WebAssembly.instantiateStreaming(res, importsObj)\n\t\t\t\t.then(\n\t\t\t\t\t(res) => (Object.assign(exports, res.instance.exports)),\n\t\t\t\t\t(e) => {\n\t\t\t\t\t\tif(res.headers.get(\"Content-Type\") !== \"application/wasm\") {\n\t\t\t\t\t\t\tconsole.warn(\"`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n\", e);\n\t\t\t\t\t\t\treturn fallback();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthrow e;\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t}\n\t\treturn fallback();\n\t});\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl + \"../\";","__webpack_require__.b = document.baseURI || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t84: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunk_bitwarden_web_vault\"] = self[\"webpackChunk_bitwarden_web_vault\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// module cache are used so entry inlining is disabled\n// startup\n// Load entry module and return exports\nvar __webpack_exports__ = __webpack_require__.O(undefined, [245], () => (__webpack_require__(92995)))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n"],"names":["deferred","leafPrototypes","getProto","inProgress","dataWebpackPrefix","PolicyListService","policies","addPolicies","this","push","getPolicies","CoreOrganizationModule","GroupDetailsView","collections","fromResponse","response","view","Object","assign","map","c","GroupView","GroupRequest","users","OrganizationGroupBulkRequest","constructor","ids","GroupResponse","super","id","getResponseProperty","organizationId","name","externalId","GroupDetailsResponse","GroupApiService","apiService","configService","get","orgId","groupId","r","send","getAll","data","gr","getAllDetails","InternalGroupApiService","deleteMany","groupIds","save","group","request","members","readOnly","hidePasswords","manage","undefined","postGroup","putGroup","OrganizationUserAdminView","groups","userId","type","status","permissions","resetPasswordEnrolled","accessSecretsManager","hasMasterPassword","managedByOrganization","UserAdminService","organizationUserApiService","organizationUserId","userResponse","getOrganizationUser","includeGroups","user","putOrganizationUser","invite","emails","postOrganizationUserInvite","OrganizationUserView","groupNames","collectionNames","OrganizationCreateModule","OrganizationInformationComponent","accountService","nameOnly","createOrganization","isProvider","acceptingSponsorship","changedBusinessOwned","ngOnInit","formGroup","controls","billingEmail","value","activeAccount","activeAccount$","email","setValue","toggle","handleUnpaidSubscription","OrgSwitcherComponent","route","dialogService","organizationService","trialFlowService","billingApiService","organizations$","pipe","orgs","filter","org","sort","a","b","localeCompare","activeOrganization$","combineLatest","paramMap","params","find","open","openChange","hideNewButton","event","stopPropagation","emit","metaData","getOrganizationBillingMetadata","handleUnpaidSubscriptionDialog","AdminConsoleLogo","OrganizationLayoutComponent","platformUtilsService","policyService","providerService","logo","orgFilter","document","body","classList","remove","organization$","p","switchMap","objects","o","getById","canAccessExport$","getFeatureFlag$","PM11360RemoveProviderExportPermission","removeProviderExport","canAccessExport","showPaymentAndHistory$","isSelfHost","canViewBillingHistory","canEditPaymentMethods","hideNewOrgButton$","policyAppliesToActiveUser$","SingleOrg","provider$","organization","get$","providerId","organizationIsUnmanaged$","provider","hasProvider","providerStatus","Billable","integrationPageEnabled$","PM14505AdminConsoleIntegrationPage","featureFlagEnabled","canAccessIntegrations","domainVerificationNavigationTextKey","getFeatureFlag","AccountDeprovisioning","canShowVaultTab","canShowSettingsTab","canShowMembersTab","canShowGroupsTab","canShowReportsTab","canShowBillingTab","getReportTabLabel","useEvents","OrganizationVerifyDeleteRecoverRequest","token","VerifyRecoverDeleteOrgComponent","router","i18nService","toastService","loading","submit","deleteUsingToken","showToast","variant","title","t","message","navigate","qParams","firstValueFrom","queryParams","OrganizationUserResetPasswordService","keyService","encryptService","organizationApiService","buildRecoveryKey","userKey","orgKeys","getKeys","Error","publicKey","fromB64ToArray","getUserKey","rsaEncrypt","key","encryptedString","resetMasterPassword","newMasterPassword","orgUserId","getOrganizationUserResetPasswordDetails","orgSymKey","getOrgKey","decPrivateKey","decryptToBytes","encryptedPrivateKey","decValue","rsaDecrypt","resetPasswordKey","existingUserKey","kdfConfig","kdf","PBKDF2_SHA256","kdfIterations","kdfMemory","kdfParallelism","newMasterKey","makeMasterKey","trim","toLowerCase","newMasterKeyHash","hashMasterKey","newUserKey","encryptUserKeyWithMasterKey","newMasterPasswordHash","putOrganizationUserResetPassword","getRotatedData","originalUserKey","allOrgs","requests","encryptedKey","masterPasswordHash","PoliciesModule","PolicyRequest","BasePolicy","display","BasePolicyComponent","enabled","policyResponse","loadData","patchValue","buildRequestData","buildRequest","policy","Promise","resolve","DisableSendPolicy","description","DisableSend","component","DisableSendPolicyComponent","MasterPasswordPolicy","MasterPassword","MasterPasswordPolicyComponent","formBuilder","MinPasswordLength","minimumPasswordLength","minComplexity","minLength","min","requireUpper","requireLower","requireNumbers","requireSpecial","enforceOnLogin","showKeyConnectorInfo","passwordScores","keyConnectorEnabled","PasswordGeneratorPolicy","PasswordGenerator","PasswordGeneratorPolicyComponent","showPasswordPolicies$","showPasswordPolicies","asObservable","showPassphrasePolicies$","showPassphrasePolicies","minLengthMin","password","settings","constraints","length","minLengthMax","max","minNumbersMin","minNumber","minNumbersMax","minSpecialMin","minSpecial","minSpecialMax","minNumberWordsMin","passphrase","numWords","minNumberWordsMax","overridePasswordType","useUpper","useLower","useNumbers","useSpecial","minNumbers","minNumberWords","capitalize","includeNumber","BehaviorSubject","overridePasswordTypeOptions","PASSWORD_POLICY_VALUE","valueChanges","isEnabled","subscribe","PASSPHRASE_POLICY_VALUE","enabledValue","d","PersonalOwnershipPolicy","PersonalOwnership","PersonalOwnershipPolicyComponent","RequireSsoPolicy","RequireSso","RequireSsoPolicyComponent","useSso","ResetPasswordPolicy","ResetPassword","ResetPasswordPolicyComponent","useResetPassword","autoEnrollEnabled","SendOptionsPolicy","SendOptions","SendOptionsPolicyComponent","disableHideEmail","SingleOrgPolicy","SingleOrgPolicyComponent","accountDeprovisioningEnabled$","isAccountDeprovisioningEnabled","canToggleState","disable","TwoFactorAuthenticationPolicy","TwoFactorAuthentication","TwoFactorAuthenticationPolicyComponent","PolicyEditDialogResult","PolicyEditComponent","policyApiService","cdr","dialogRef","policyType","policyComponent","e","putPolicy","close","Saved","ngAfterViewInit","load","policyFormRef","createComponent","instance","saveDisabled$","statusChanges","detectChanges","getPolicy","statusCode","Enabled","config","edit","PoliciesComponent","policyListService","policiesEnabledMap","Map","parent","first","policyId","policyIdFromEvents","orgPolicy","orgPolicies","i","forEach","op","set","lastValueFrom","closed","DeleteOrganizationDialogResult","CountBasedLocalizationKey","getKey","count","singular","plural","OrganizationContentSummaryItem","localizationKey","localizationKeyOptions","OrganizationContentSummary","totalItemCount","itemCountByType","DeleteOrganizationDialogComponent","userVerificationService","cipherService","destroy$","Subject","deleteOrganizationRequestType","organizationContentSummary","secret","required","then","delete","Deleted","ngOnDestroy","next","complete","requestType","getAllFromApiForOrganization","takeUntil","ciphers","buildOrganizationContentSummary","loaded","organizationItems","item","deletedDate","cipherType","iterateEnum","getOrganizationItemCountByType","getOrganizationItemLocalizationKeysByType","items","openDeleteOrganizationDialog","findSortedIndex","sortedArray","val","compareFn","low","high","mid","Math","floor","FormSelectionList","controlFactory","allItems","selectedItems","deselectedItems","formArray","selectItems","initialValue","selectItem","deselectItems","deselectItem","deselectAll","clear","index","findIndex","selectedOption","slice","sortedInsertIndex","newControl","insert","deselectedOption","removeAt","populateItems","selectedItem","forEachControlItem","fn","at","UserTypePipe","transform","unknownText","Owner","Admin","User","Custom","handleBlur","selectionList","PermissionMode","AccessSelectorComponent","selected","getRawValue","concat","m","readonly","icon","itemIcon","permissionMode","_permissionMode","updateAllRowControlDisableStates","updateRowControlDisableState","controlRow","enable","Edit","permission","permissionControl","control","initialPermission","fg","_itemComparator","bind","itemType","View","Hidden","hideMultiSelect","registerOnChange","notifyOnChange","registerOnTouched","notifyOnTouch","setDisabledState","isDisabled","disabled","Readonly","writeValue","pauseChangeNotification","Array","isArray","permissionList","v","Collection","Group","Member","permissionLabelId","perm","labelId","canEditItemPermission","collator","compare","listName","labelName","Number","provide","useExisting","multi","CollectionPermission","AccessItemType","getPermissionList","ViewExceptPass","EditExceptPass","Manage","convertToPermission","convertToSelectionView","hidePassword","includes","mapGroupToAccessItemView","mapUserToAccessItemView","role","AccessSelectorModule","WebLoginComponentService","acceptOrganizationInviteService","logService","routerService","cryptoFunctionService","environmentService","passwordGenerationService","ssoLoginService","clientType","getClientType","getOrgPolicies","orgInvite","getOrganizationInvite","getPoliciesByToken","error","resetPasswordPolicy","getResetPasswordPolicyOptions","isPolicyAndAutoEnrollEnabled","enforcedPasswordPolicyOptions","masterPasswordPolicyOptions$","WebLoginDecryptionOptionsService","messagingService","handleCreateUserSuccess","getAndClearLoginRedirectUrl","clearOrganizationInvitation","WebauthnRotateCredentialRequest","encryptedPublicKey","encryptedUserKey","fromRotateableKeyset","keyset","CredentialCreateOptionsView","options","PendingWebauthnLoginCredentialView","createOptions","deviceResponse","supportsPrf","WebauthnLoginCredentialView","prfStatus","RotateableKeySetService","createKeySet","externalKey","makeKeyPair","rawPublicKey","encrypt","rotateKeySet","keySet","oldUserKey","newEncryptedPublicKey","newEncryptedUserKey","EnableCredentialEncryptionRequest","SaveCredentialRequest","WebauthnLoginAuthenticatorResponseRequest","credential","rawId","fromBufferToB64","extensions","WebauthnLoginAttestationResponseRequest","AuthenticatorAttestationResponse","attestationObject","fromBufferToUrlB64","clientDataJson","clientDataJSON","WebauthnLoginCredentialCreateOptionsResponse","WebauthnLoginCredentialResponse","getRotateableKeyset","isSerializedEncString","hasPrfKeyset","WebAuthnLoginAdminApiService","getCredentialCreateOptions","getCredentialAssertionOptions","saveCredential","getCredentials","deleteCredential","credentialId","updateCredential","WebauthnLoginAdminService","rotateableKeySetService","webAuthnLoginPrfKeyService","navigatorCredentials","_refresh$","_loading$","credentials$","tap","fetchCredentials$","shareReplay","bufferSize","refCount","loading$","navigator","credentials","getCredentialAssertOptions","verification","getCredentialAttestationOptions","createCredential","credentialOptions","nativeOptions","prf","create","PublicKeyCredential","Boolean","getClientExtensionResults","pendingCredential","challenge","allowCredentials","rpId","rp","timeout","userVerification","authenticatorSelection","eval","getLoginWithPrfSalt","prfResult","results","symmetricPrfKey","createSymmetricKeyFromPrf","prfKeySet","refresh","enableCredentialEncryption","assertionOptions","prfKey","getCredentials$","getCredential$","from","all","rotatedKeyset","MaxCredentialCount","WebSetPasswordJitService","A","setPassword","WebRegistrationFinishService","accountApiService","acceptOrgInviteService","getOrgNameFromOrgInvite","organizationName","getMasterPasswordPolicyOptsFromOrgInvite","buildRegisterRequest","passwordInputResult","userAsymmetricKeys","emailVerificationToken","orgSponsoredFreeFamilyPlanToken","acceptEmergencyAccessInviteToken","emergencyAccessId","providerInviteToken","providerUserId","registerRequest","orgInviteToken","acceptEmergencyAccessId","EmergencyAccessModule","EmergencyAccessStatusType","EmergencyAccessGranteeDetailsResponse","granteeId","waitTimeDays","creationDate","avatarColor","EmergencyAccessGrantorDetailsResponse","grantorId","EmergencyAccessTakeoverResponse","keyEncrypted","EmergencyAccessViewResponse","EmergencyAccessApiService","getEmergencyAccessTrusted","getEmergencyAccessGranted","getEmergencyAccess","getEmergencyGrantorPolicies","putEmergencyAccess","deleteEmergencyAccess","postEmergencyAccessInvite","postEmergencyAccessReinvite","postEmergencyAccessAccept","postEmergencyAccessConfirm","postEmergencyAccessInitiate","postEmergencyAccessApprove","postEmergencyAccessReject","postEmergencyAccessTakeover","postEmergencyAccessPassword","postEmergencyAccessView","EmergencyAccessAcceptRequest","EmergencyAccessConfirmRequest","EmergencyAccessInviteRequest","EmergencyAccessPasswordRequest","EmergencyAccessUpdateRequest","EmergencyAccessWithIdRequest","EmergencyAccessService","emergencyAccessApiService","bulkEncryptService","getGrantorPolicies","P","reinvite","update","accept","confirm","debug","getFingerprint","join","encryptKey","requestAccess","approve","reject","getViewOnlyCiphers","activeUserPrivateKey","getPrivateKey","grantorKeyBuffer","grantorUserKey","PM4154_BulkEncryptionService","decryptItems","getLocaleSortingFunction","takeover","masterPassword","takeoverResponse","Argon2id","masterKey","masterKeyHash","encKey","existingEmergencyAccess","allowedStatuses","Set","Confirmed","RecoveryInitiated","RecoveryApproved","filteredAccesses","has","details","publicKeyResponse","getUserPublicKey","updateRequest","deepLinkGuard","routerState","authService","currentUrl","url","transientPreviousUrl","getPreviousUrl","getAuthStatus","Unlocked","persistedPreLoginUrl","isNullOrEmpty","navigateByUrl","isValidUrl","persistLoginRedirectUrl","toLocaleLowerCase","AcceptOrganizationInviteModule","WebauthnLoginSettingsModule","AuthSettingsModule","AuthModule","ORGANIZATION_INVITE","deserializer","fromJSON","AcceptOrganizationInviteService","globalStateProvider","orgNameSubject","orgName$","orgName","replace","organizationInvitationState","state$","setOrganizationInvitation","validateAndAcceptInvite","initOrganization","acceptAndInitOrganization","masterPasswordPolicyCheckRequired","logOut","prepareAcceptAndInitRequest","postOrganizationUserAcceptInit","refreshIdentityToken","encryptedOrgKey","orgKey","makeOrgKey","orgPublicKey","encryptedOrgPrivateKey","collection","keys","collectionName","prepareAcceptRequest","postOrganizationUserAccept","resetPasswordEnrollRequired","result","hasMasterPasswordPolicy","some","storedInvite","policyCache","OrganizationInvite","json","fromParams","orgSsoIdentifier","orgUserHasExistingUser","RegisterFormModule","DangerZoneComponent","UpdateProfileRequest","culture","SelectableAvatarComponent","border","select","onFire","color","setSelection","ChangeAvatarDialogComponent","avatarService","defaultColorPalette","customColorSelected","customColor$","customTextColor$","validateHexColor","currentSelection","setAvatarColor","profile","debounceTime","pickTextColorBasedOnBgColor","avatarColor$","showCustomPicker","colorPickerElement","nativeElement","click","generateAvatarColor","stringToColor","toString","x","selectedColorIndex","ProfileComponent","openChangeAvatar","putProfile","getProfile","fingerprintMaterial","managingOrganization$","organizations","userIsManagedByOrganization","of","ApiKeyComponent","invalid","markAllAsTouched","postKey","entityId","clientSecret","apiKey","clientId","keyType","UpdateTwoFactorDuoRequest","TwoFactorSetupDuoComponent","onChangeStatus","Duo","host","componentName","disableMethod","onClose","authResponse","auth","processResponse","OrganizationDuo","buildRequestModel","putTwoFactorOrganizationDuo","putTwoFactorDuo","onUpdated","TwoFactorSetupMethodBaseComponent","twoFactorProviderType","authed","hashedSecret","verificationType","enableFunction","promise","openSimpleDialog","content","putTwoFactorOrganizationDisable","putTwoFactorDisable","requestClass","print","TwoFactorRecoveryComponent","w","window","write","code","Date","onafterprint","formatString","s","toUpperCase","DisableTwoFactorAuthenticatorRequest","UpdateTwoFactorAuthenticatorRequest","launchExternalUrl","launchBitwardenUrl","validateTokenControl","TwoFactorSetupAuthenticatorComponent","Authenticator","qrScriptError","qrScript","createElement","src","async","appendChild","removeChild","markAsTouched","userVerificationToken","putTwoFactorAuthenticator","deleteTwoFactorAuthenticator","waitForQRiousToLoadOrError","catch","createQRCode","QRious","onload","onerror","element","getElementById","encodeRFC3986URIComponent","encodeURIComponent","size","hostname","URL","acceptButtonText","launchUri","UpdateTwoFactorEmailRequest","TwoFactorSetupEmailComponent","Email","disableEmail","sendEmail","emailPromise","postTwoFactorEmailSetup","sentEmail","putTwoFactorEmail","UpdateTwoFactorWebAuthnDeleteRequest","UpdateTwoFactorWebAuthnRequest","TwoFactorSetupWebAuthnComponent","ngZone","WebAuthn","keyIdAvailable","keysConfiguredCount","webAuthnResponse","readKey","challengePromise","getTwoFactorWebAuthnChallenge","readDevice","putTwoFactorWebAuthn","removePromise","deleteTwoFactorWebAuthn","webAuthnChallenge","console","log","resetWebAuthn","run","webAuthnListening","err","webAuthnError","listening","k","configured","migrated","UpdateTwoFactorYubikeyOtpRequest","TwoFactorSetupYubiKeyComponent","keysFormControl","formKeys","anyKeyHasNfcFormControl","anyKeyHasNfc","Yubikey","array","refreshFormArrayData","fb","existingKey","key1","key2","key3","key4","key5","nfc","putTwoFactorYubiKey","pos","padRight","str","character","recoveryCode","TwoFactorSetupComponent","modalService","billingAccountProfileStateService","providers","showPolicyWarning","tabbedHeader","canAccessPremium$","account","hasPremiumFromAnySource$","hasOwnProperty","filterProvider","premium","policyAppliesToActiveUser","twoFactorAuthPolicyAppliesToActiveUser","getTwoFactorProviders","p2","evaluatePolicies","callTwoFactorVerifyDialog","twoFactorVerifyDialogRef","twoFactorSetupSubscription","unsubscribe","authComp","componentInstance","updateStatus","duoComp","emailComp","webAuthnComp","recoverComp","premiumRequired","openModal","ref","modal","childComponent","openViewRef","isEnterpriseOrg","productTierType","Enterprise","TwoFactorVerifyComponent","onAuthed","invalidSecret","formPromise","otp","apiCall","dialogTitle","getTwoFactorRecover","getTwoFactorOrganizationDuo","getTwoFactorDuo","getTwoFactorEmail","getTwoFactorWebAuthn","getTwoFactorAuthenticator","getTwoFactorYubiKey","UserVerificationModule","modalRef","confirmDescription","confirmButtonText","modalTitle","verifyUser","success","UserVerificationPromptComponent","_invalidSecret","invalidSecretChange","updateValueAndValidity","emitEvent","disableRequestOTP","sentCode","requestOTP","hasMasterPasswordAndMasterKeyHash","processChanges","obj","onChange","OTP","isNullOrWhitespace","UserVerificationComponent","opacity","selectPlan","onKeydown","onFocus","toggleShowPayment","taxInformationChanged","toggleTotalOpened","ChangePlanDialogResultType","PlanCardState","openChangePlanDialog","dialogConfig","ChangePlanDialogComponent","productTier","_productTier","product","plan","_plan","dialogParams","syncService","taxService","organizationBillingService","showFree","showCancel","estimatedTax","Free","onSuccess","onCanceled","onTrialBillingSuccess","discountPercentage","ResultType","selfHosted","productTypes","singleOrgPolicyAppliesToActiveUser","isInTrialFlow","discount","businessOwned","premiumAccessAddon","additionalSeats","clientOwnerEmail","selectedInterval","planIntervals","showPayment","totalOpened","currentFocusIndex","isCardStateDisabled","focusedIndex","isSubscriptionCanceled","taxComponent","validate","restartSubscription","updateOrganization","fullSync","subLabelText","billingSubLabelText","doSubmit","deprecateStripeSourcesAPI","AC2476_DeprecateStripeSourcesAPI","currentPlanName","resolvePlanName","sub","subscription","getSubscription","dialogHeaderName","resolveHeaderName","currentPlan","selectedPlan","accountCredit","paymentSource","getOrganizationPaymentMethod","billing","getBilling","plans","getPlans","passwordManagerPlans","PasswordManager","secretsManagerPlans","SecretsManager","Teams","upgradedPlan","FamiliesAnnually","upgradeSortOrder","upgradeFlowPrefillForm","changedProduct","planCards","discountPercentageFromSub","isSecretsManagerTrial","customerDiscount","percentOff","setInitialPlanSelection","taxInfo","getTaxInfo","taxInformation","refreshSalesTax","cancelled","selectableProducts","getPlanByType","secretsManagerTrialDiscount","appliesTo","isPaymentSourceEmpty","productId","planTypeChanged","updateInterval","getPlanIntervals","Annually","Monthly","optimizedNgForRender","getPlanCardContainerClasses","cardState","Disabled","Selected","Families","NotSelected","upgradeRequiresPaymentMethod","isFreeTier","shouldHideFree","hasNoPaymentSource","selectedSecretsManagerPlan","selectedPlanInterval","isAnnual","familyPlan","basePrice","businessOwnedIsChecked","canBeUsedByBusiness","TeamsStarter","planIsEnabled","useSecretsManager","familyPlanIndex","splice","planA","planB","displaySortOrder","selectablePlans","selectedProductTierType","storageGb","maxStorageGb","passwordManagerSeatTotal","hasAdditionalSeatsOption","seatPrice","abs","seats","secretsManagerSeatTotal","additionalStorageTotal","hasAdditionalStorageOption","additionalStoragePricePerGb","additionalStoragePriceMonthly","additionalServiceAccountTotal","hasAdditionalServiceAccountOption","additionalServiceAccount","additionalPricePerServiceAccount","passwordManagerSubtotal","subTotal","hasPremiumAccessOption","premiumAccessOptionPrice","secretsManagerSubtotal","smSeats","passwordManagerSeats","baseSeats","total","teamsStarterPlanIsAvailable","additionalServiceAccounts","baseServiceAccount","smServiceAccounts","setPlanType","handlePremiumAddonAccess","handleAdditionalSeats","planType","selectedPlanHasAdditionalSeatsOption","changedCountry","paymentV2Component","showBankAccount","country","BankAccount","Card","paymentComponent","hideBank","method","changeMethod","paymentMethod","subscribeToSecretsManager","secretsManagerSeats","tokenize","createPaymentToken","payment","getBillingInformationFromTaxInfoComponent","baseStorageGb","additionalStorageGb","billingAddressCountry","billingAddressPostalCode","postalCode","buildSecretsManagerRequest","tokenizedPaymentSource","updatePaymentMethodRequest","From","updateOrganizationPaymentMethod","tokenResult","paymentRequest","paymentToken","paymentMethodType","updatePayment","hasPublicAndPrivateKeys","orgShareKey","upgrade","paymentIntentClientSecret","handleStripeCardPayment","price","text","taxId","addressLine1","line1","addressLine2","line2","city","state","additionalSmSeats","TeamsAnnually","legacyYear","calculateTotalAppliedDiscount","paymentSourceClasses","Check","PayPal","cardElements","querySelectorAll","newIndex","direction","isCardDisabled","preventDefault","setTimeout","card","contains","focus","manageSelectableProduct","passwordManager","additionalStorage","secretsManager","additionalMachineAccounts","previewOrganizationInvoice","invoice","taxAmount","canUpdatePaymentInformation","ProviderOrganizationCreateRequest","organizationCreateRequest","OrganizationSelfHostingLicenseUploaderComponent","tokenService","onLicenseFileUploaded","collectionCt","fd","FormData","append","formValue","file","createLicense","updateKeys","hintFileName","onLicenseFileSelectedChanged","setSelectedFile","onTaxInformationChanged","cancel","changedOwnedBusiness","TeamsMonthly2020","TeamsAnnually2020","EnterpriseAnnually2020","EnterpriseMonthly2020","OrganizationPlansComponent","providerApiService","useLicenseUploaderComponent$","PM11901_RefactorSelfHostingLicenseUploader","secretsManagerSubscription","selfHostedForm","singleOrgPolicyBlock","createCloudHosted","addValidators","maxLength","preSelectedProductTier","secretsManagerForm","isProviderQualifiedFor2020Plan","targetDate","seatPriceMonthly","formValues","planOffersSecretsManager","userSeats","freeTrial","trialPeriodDays","paymentDesc","handleAdditionalStorage","selectedPlanHasAdditionalStorageOption","handleSecretsManagerForm","fileInputEl","target","selectedFile","files","showTaxIdField","totalAmount","initiationPath","providerRequest","providerKey","getProviderKey","postProviderCreateOrganization","createSelfHosted","FreeFamiliesPolicyService","enterpriseOrgStatus","isFreeFamilyPolicyEnabled","belongToOneEnterpriseOrgs","belongToMultipleEnterpriseOrgs","showFreeFamilies$","isFreeFamilyFlagEnabled$","isFreeFamilyFlagEnabled","getFreeFamiliesVisibility$","canManageSponsorships$","checkEnterpriseOrganizationsAndFetchPolicy","orgStatus","canManageSponsorships","shouldShowFreeFamilyLink","fetchEnterpriseOrganizationPolicy","evaluateEnterpriseOrganizations","getOrganizationIdForOneEnterprise","getAll$","FreeFamiliesSponsorshipPolicy","enterpriseOrganizations","DisableFreeFamiliesSponsorship","TrialFlowService","checkForOrgsWithUpcomingPaymentIssues","organizationSubscription","trialEndDate","displayBanner","isOwner","trialRemainingDays","calculateTrialRemainingDays","remainingDays","getFreeTrialMessage","shownBanner","today","timeDifference","getTime","ceil","organizationBillingMetadata","isSubscriptionUnpaid","promptForPaymentNavigation","navigateToPaymentMethod","isCanceled","isUnpaid","resellerManagedOrgAlert","ResellerManagedOrgAlert","placeholders","providerName","cancelButtonText","changePlan","launchPaymentModalAutomatically","reference","Closed","AddCreditDialogResult","AddCreditDialogComponent","ppLoading","DialogResult","creditAmount","ppButtonFormRef","BitPay","Added","req","credit","amount","creditAmountNumber","returnUrl","bitPayUrl","postBitPayInvoice","payPalConfig","ppButtonFormAction","buttonAction","ppButtonBusinessId","businessId","ppButtonCustomField","subject","region","cloudRegion$","location","href","formatAmount","floatAmount","parseFloat","round","toFixed","openAddCreditDialog","AdjustPaymentDialogV2ResultType","AdjustPaymentDialogV2Component","PaymentMethodType","taxInfoComponent","updatePremiumUserPaymentMethod","Submitted","postAccountPayment","initialPaymentMethod","dialogHeader","AdjustPaymentDialogResult","AdjustPaymentDialogComponent","Adjusted","currentType","openAdjustPaymentDialog","AdjustStorageDialogResult","AdjustStorageDialogComponent","activatedRoute","storageAdjustment","storageGbAdjustment","add","paymentFailed","postAccountStorage","updateStorage","action","relativeTo","storageGbPrice","interval","adjustedStorageTotal","openAdjustStorageDialog","BillingSharedModule","VerifyBankRequest","changePayment","PaymentMethodComponent","firstLoaded","verifyBankForm","amount1","amount2","forOrganization","billingPromise","organizationSubscriptionPromise","organizationPromise","determineOrgsWithUpcomingPaymentIssues","getUserBillingPayment","subPromise","getUserSubscription","replaceState","path","addCredit","verifyBank","getCurrentNavigation","extras","redundantState","getState","prototype","call","freeTrialData","isCreditBalance","balance","creditOrBalance","PaymentLabelV2","extensionRefreshFlag","ExtensionRefresh","BillingServicesModule","BraintreeService","createDropin","braintree","dropin","authorization","container","containerId","paymentOptionPriority","paypal","flow","buttonStyle","label","shape","tagline","loadBraintree","autoCreateDropin","script","head","requestPaymentMethod","payload","nonce","unloadBraintree","scripts","indexOf","stylesheet","querySelector","StripeService","loadStripe","elementIds","autoMount","window$","stripe","Stripe","elements","isExtensionRefresh","getElementOptions","mountElements","cardNumber","getElement","cardExpiry","cardCvc","mount","setupBankAccountPaymentMethod","accountHolderName","routingNumber","accountNumber","accountHolderType","confirmUsBankAccountSetup","payment_method","us_bank_account","routing_number","account_number","account_holder_type","billing_details","setupIntent","setupCardPaymentMethod","confirmCardSetup","unloadStripe","iFrame","style","base","fontFamily","fontSize","fontSmoothing","classes","empty","fontWeight","placeholder","getComputedStyle","documentElement","getPropertyValue","borderColor","PaymentV2Component","braintreeService","stripeService","showAccountCredit","showPayPal","submitted","bankInformation","onSubmit","onPaymentMethodChange","usingStripe","createSetupIntent","usingBankAccount","valid","usingCard","usingPayPal","usingAccountCredit","Credit","PaymentComponent","_method","paymentForm","themingService","showMethods","showOptions","hidePaypal","hideCredit","trialFlow","bank","account_holder_name","currency","btInstance","stripeElements","stripeCardNumberElement","stripeCardExpiryElement","stripeCardCvcElement","stripeScript","setStripeElement","btScript","StripeElementStyle","StripeElementClasses","subscribeToTheme","el","btStylesheet","createErr","postSetupPayment","handleCardSetup","createToken","successCallback","handleCardPayment","paymentIntent","theme$","AbstractSelfHostingLicenseUploaderComponent","form","getEmailVerified","SecretsManagerLogo","secretsManagerSubscribeFormFactory","SecretsManagerSubscribeComponent","showSubmitButton","discountPrice","active","startWith","planName","serviceAccountsIncluded","monthlyCostPerServiceAccount","maxUsers","maxSeats","maxProjects","monthlyCostPerUser","TaxInfoComponent","countryChanged","taxFormGroup","countryList","getCountries","isTaxSupported","isCountrySupported","isSupported","finally","submitTaxInfo","updateTaxInfo","putTaxInfo","VerifyBankAccountRequest","descriptorCode","VerifyBankAccountComponent","BaseAcceptComponent","platformUtilService","registerRouteService","requiredParameters","failedShortMessage","failedMessage","registerRoute$","errorMessage","activeAccountStatus$","LoggedOut","authedHandler","unauthedHandler","DynamicAvatarComponent","color$","EnvironmentSelectorModule","OrgDomainServiceAbstraction","OrgDomainInternalServiceAbstraction","SsoType","MemberDecryptionType","OpenIdConnectRedirectBehavior","Saml2BindingType","Saml2NameIdFormat","Saml2SigningBehavior","BillingResponse","BillingSourceResponse","cardBrand","needsVerification","BillingInvoiceResponse","pdfUrl","number","paid","date","BillingTransactionResponse","createdDate","refunded","partiallyRefunded","refundedAmount","BillingHistoryResponse","invoices","transactions","hasNoHistory","ApiKeyResponse","revisionDate","SsoConfigApi","fromView","api","configType","memberDecryptionType","keyConnectorUrl","OpenIdConnect","authority","openId","metadataAddress","redirectBehavior","getClaimsFromUserInfoEndpoint","additionalScopes","additionalUserIdClaimTypes","additionalEmailClaimTypes","additionalNameClaimTypes","acrValues","expectedReturnAcrValue","Saml2","spUniqueEntityId","saml","spNameIdFormat","spOutboundSigningAlgorithm","spSigningBehavior","spMinIncomingSigningAlgorithm","spWantAssertionsSigned","spValidateCertificates","idpEntityId","idpBindingType","idpSingleSignOnServiceUrl","idpSingleLogoutServiceUrl","idpX509PublicCert","idpOutboundSigningAlgorithm","idpAllowUnsolicitedAuthnResponse","idpWantAuthnRequestsSigned","idpDisableOutboundLogoutRequests","idpAllowOutboundLogoutRequests","OrganizationSsoResponse","identifier","urls","SsoUrls","callbackPath","signedOutCallbackPath","spEntityId","spEntityIdStatic","spMetadataUrl","spAcsUrl","PaymentResponse","userProfile","TaxInfoResponse","taxIdType","OrganizationApiKeyInformationResponse","OrganizationAutoEnrollStatusResponse","resetPasswordEnabled","KeysResponse","privateKey","OrganizationKeysResponse","ORGANIZATIONS","record","clearOn","mapToBooleanHasAnyOrganizations","mapToSingleOrganization","OrganizationDomainSsoDetailsResponse","organizationIdentifier","ssoAvailable","domainName","verifiedDate","OrganizationDomainResponse","txt","nextRunDate","jobRunCount","lastCheckedDate","VerifiedOrganizationDomainSsoDetailsResponse","OrganizationDomainSsoDetailsRequest","AUTO_CONFIRM_FINGERPRINTS","ResetPasswordPolicyOptions","policyRecordToArray","policiesMap","values","f","POLICIES","policyData","ProviderResponse","businessName","Provider","canAccess","isProviderAdmin","canCreateOrganizations","canManageUsers","canAccessEventLogs","ProviderAdmin","PROVIDERS","mapToSingleProvider","UserVerificationApiServiceAbstraction","WebAuthnLoginApiServiceAbstraction","ACCOUNT_ACCOUNTS","accountInfo","ACCOUNT_ACTIVE_ACCOUNT_ID","ACCOUNT_ACTIVITY","activity","LOGGED_OUT_INFO","emailVerified","NotificationResponse","contextId","SyncCipherCreate","SyncCipherDelete","SyncCipherUpdate","SyncLoginDelete","SyncCipherNotification","SyncFolderCreate","SyncFolderDelete","SyncFolderUpdate","SyncFolderNotification","SyncVault","SyncCiphers","SyncOrganizations","SyncOrgKeys","SyncSettings","LogOut","UserNotification","SyncSendCreate","SyncSendUpdate","SyncSendDelete","SyncSendNotification","AuthRequest","AuthRequestResponse","AuthRequestPushNotification","SyncOrganizationStatusChanged","OrganizationStatusPushNotification","SyncOrganizationCollectionSettingChanged","OrganizationCollectionSettingChangedPushNotification","collectionIds","limitCollectionCreation","limitCollectionDeletion","UpdateAvatarRequest","AVATAR_COLOR","UpdateDevicesTrustRequest","DeviceKeysUpdateRequest","DEVICE_KEY","deviceKey","cleanupDelayMs","enableRetrievalLogging","enableUpdateLogging","SHOULD_TRUST_DEVICE","shouldTrustDevice","DeviceResponse","isTrusted","devicePendingAuthRequest","ProtectedDeviceResponse","TrustedDeviceKeysRequest","KeyConnectorUserKeyRequest","SetKeyConnectorKeyRequest","orgIdentifier","kdfType","iterations","memory","parallelism","USES_KEY_CONNECTOR","usesKeyConnector","CONVERT_ACCOUNT_TO_KEY_CONNECTOR","convertAccountToKeyConnector","MASTER_KEY","MASTER_KEY_HASH","MASTER_KEY_ENCRYPTED_USER_KEY","FORCE_SET_PASSWORD_REASON","reason","CODE_VERIFIER","codeVerifier","SSO_STATE","USER_ORGANIZATION_SSO_IDENTIFIER","GLOBAL_ORGANIZATION_SSO_IDENTIFIER","SSO_EMAIL","SetTokensResult","accessToken","refreshToken","clientIdSecretPair","ACCESS_TOKEN_DISK","ACCESS_TOKEN_MEMORY","REFRESH_TOKEN_DISK","REFRESH_TOKEN_MEMORY","EMAIL_TWO_FACTOR_TOKEN_RECORD_DISK_LOCAL","emailTwoFactorTokenRecord","API_KEY_CLIENT_ID_DISK","apiKeyClientId","API_KEY_CLIENT_ID_MEMORY","API_KEY_CLIENT_SECRET_DISK","apiKeyClientSecret","API_KEY_CLIENT_SECRET_MEMORY","SECURITY_STAMP_MEMORY","securityStamp","TokenStorageLocation","VerifyOTPRequest","WebAuthnLoginCredentialAssertionView","ENABLE_BADGE_COUNTER","BILLING_ACCOUNT_PROFILE_KEY_DEFINITION","billingAccountProfile","ProviderOrganizationResponse","userCount","occupiedSeats","remainingSeats","ProviderOrganizationOrganizationDetailsResponse","PaymentSourceResponse","PaymentMethodResponse","subscriptionStatus","OrganizationBillingMetadataResponse","isEligibleForSelfHost","isManaged","isOnSecretsManagerStandalone","hasSubscription","hasOpenInvoice","invoiceDueDate","parseDate","invoiceCreatedDate","subPeriodEndDate","dateString","SubscriptionSuspensionResponse","suspensionDate","unpaidPeriodEndDate","gracePeriod","ProviderSubscriptionResponse","currentPeriodEndDate","collectionMethod","ProviderPlanResponse","cancelAt","suspension","providerType","seatMinimum","assignedSeats","purchasedSeats","cost","cadence","PreviewInvoiceResponse","effectiveTaxRate","taxableBaseAmount","ConfigApiServiceAbstraction","FileUploadService","KeyGenerationService","SdkClientFactory","AbstractStorageService","AccountFactory","accountConstructor","args","GlobalStateFactory","globalStateConstructor","StateFactory","globalStateFactory","accountFactory","createGlobal","createAccount","MessageListener","messageStream","allMessages$","messages$","commandDefinition","msg","command","EMPTY","Symbol","SubjectMessageSender","messagesSubject","getCommand","getFlags","envFlags","JSON","parse","flagEnabled","flag","flags","GlobalState","AppIdService","storageService","getAppId","info","getEnsuredValue","getAnonymousAppId","newGuid","ServerSettings","disableUserRegistration","ServerConfigResponse","featureStates","version","gitHash","server","ThirdPartyServerConfigResponse","environment","EnvironmentServerConfigResponse","cloudRegion","vault","identity","notifications","sso","ServerConfig","serverConfigData","utcDate","getAgeInMilliseconds","isValid","ServerConfigData","serverConfigResponse","ThirdPartyServerConfigData","toISOString","EnvironmentServerConfigData","USER_SERVER_CONFIG","GLOBAL_SERVER_CONFIGURATIONS","DefaultConfigService","configApiService","stateProvider","failedFetchFallbackSubject","userId$","activeUserId$","authStatus$","authStatusFor$","serverConfig$","environment$","authStatus","globalConfigFor$","getApiUrl","userConfigFor$","rec","existingConfig","olderThanRetrievalInterval","renewConfig","mergeWith","US","serverSettings$","serverConfig","getFeatureFlagValue","userCachedFeatureFlag$","getUser","checkServerMeetsVersionRequirement$","minimumRequiredServerVersion","SemVer","ensureConfigFetched","handle","clearTimeout","newConfig","setCloudRegion","getGlobal","configs","setUserState","apiUrl","classInitializers","Cipher","CipherView","getClassInitializer","className","EncryptedObject","EncryptServiceImplementation","logMacFailures","plainValue","plainBuf","fromUtf8ToArray","encObj","aesEncrypt","iv","mac","encType","encryptToBytes","encValue","macLen","byteLength","encBytes","Uint8Array","decryptToUtf8","encString","decryptContext","resolveLegacyKey","macKey","encryptionType","fastParams","aesDecryptFastParameters","computedMac","hmacFast","macData","compareFast","logMacFailed","aesDecryptFast","mode","parameters","encThing","macBytes","ivBytes","dataBytes","hmac","aesDecrypt","encrypted","Rsa2048_OaepSha1_B64","algorithm","Rsa2048_OaepSha1_HmacSha256_B64","Rsa2048_OaepSha256_B64","Rsa2048_OaepSha256_HmacSha256_B64","decrypt","hash","hashArray","randomBytes","AesCbc128_HmacSha256_B64","AesCbc256_B64","EnvironmentState","GLOBAL_ENVIRONMENT_KEY","USER_ENVIRONMENT_KEY","GLOBAL_CLOUD_REGION_KEY","USER_CLOUD_REGION_KEY","PRODUCTION_REGIONS","domain","icons","webVault","events","scim","EU","DEFAULT_REGION","DEFAULT_REGION_CONFIG","DefaultEnvironmentService","additionalRegionConfigs","activeAccountId$","globalState","globalCloudRegionState","account$","distinctUntilChanged","oldUserId","newUserId","buildEnvironment","cloudWebVaultUrl$","getRegionConfig","availableRegions","setEnvironment","SelfHosted","isEmpty","formatUrl","keyConnector","regionConfig","CloudEnvironment","SelfHostedEnvironment","getEnvironment$","activeUserId","getEnvironment","seedUserEnvironment","global","startsWith","u","UrlEnvironment","getRegion","getUrls","hasBaseUrl","getWebVaultUrl","getUrl","getEventsUrl","getIconsUrl","getIdentityUrl","getKeyConnectorUrl","getNotificationsUrl","getScimUrl","getSendUrl","isCloud","baseSuffix","getHostname","getHost","AzureFileUploadService","upload","renewalCallback","buffer","azureUploadBlob","azureUploadBlocks","urlObject","headers","Headers","toUTCString","searchParams","Request","cache","blobResponse","nativeFetch","baseUrl","blockSize","getMaxBlockSize","blockIndex","numBlocks","blocksStaged","renewUrlIfNecessary","blockUrl","blockId","encodedBlockId","start","blockData","blockHeaders","blockRequest","blockResponse","blockListUrl","blockListXml","expiry","isNaN","setTime","now","utfBlockId","fromUtf8ToB64","blockIdList","xml","Version","year","month","day","parts","split","parseInt","compareTo","BitwardenFileUploadService","encryptedFileName","encryptedFileData","isBrowser","blob","Blob","isNode","Buffer","filename","contentType","MigrationBuilder","migrations","migrate","addMigrator","rollback","helper","reduce","migrator","runMigrator","newMigration","shouldMigrate","toVersion","updateVersion","IRREVERSIBLE","Migrator","fromVersion","startVersion","currentVersion","endVersion","USER_EVER_HAD_USER_KEY","stateDefinition","EverHadUserKeyMigrator","accounts","getAccounts","everHadUserKey","setToUser","migrateAccount","getFromUser","rollbackAccount","USER_ENCRYPTED_ORGANIZATION_KEYS","OrganizationKeyMigrator","organizationKeys","ENVIRONMENT_STATE","REGION_KEY","URLS_KEY","MoveEnvironmentStateToProviders","legacyGlobal","setToGlobal","environmentUrls","legacyAccounts","updatedLegacyGlobal","globalRegion","getFromGlobal","globalUrls","updatedAccount","userRegion","userUrls","rollbackUser","USER_ENCRYPTED_PROVIDER_KEYS","ProviderKeyMigrator","providerKeys","CLIENT_KEY_HALF","MoveBiometricClientKeyHalfToStateProviders","biometricEncryptionClientKeyHalf","userKeyHalf","USER_ENCRYPTED_FOLDERS","FolderMigrator","folders","LAST_SYNC_KEY","LastSyncMigrator","lastSync","USER_ENABLE_PASSKEYS","EnablePasskeysMigrator","enablePasskeys","globalEnablePasskeys","autofillSettingsStateDefinition","AutofillSettingsKeyMigrator","autoFillOverlayVisibility","updateAccount","accountSettings","autoFillOnPageLoadDefault","enableAutoFillOnPageLoad","dismissedAutoFillOnPageLoadCallout","disableAutoTotpCopy","activateAutoFillOnPageLoadFromPolicy","inlineMenuVisibility","autoCopyTotp","REQUIRE_PASSWORD_ON_START","RequirePasswordOnStartMigrator","requirePasswordOnStart","requirePassword","USER_ENCRYPTED_PRIVATE_KEY","PrivateKeyMigrator","USER_ENCRYPTED_COLLECTIONS","CollectionMigrator","COLLAPSED_GROUPINGS","CollapsedGroupingsMigrator","collapsedGroupings","DISMISSED_BIOMETRIC_REQUIRE_PASSWORD_ON_START_CALLOUT","PROMPT_AUTOMATICALLY","MoveBiometricPromptsToStateProviders","dismissedBiometricRequirePasswordOnStartCallout","disableAutoBiometricsPrompt","userDismissed","userPromptAutomatically","SM_ONBOARDING_TASKS","SmOnboardingTasksMigrator","smOnboardingTasks","autofillSettingsLocalStateDefinition","ClearClipboardDelayMigrator","clearClipboard","clearClipboardDelay","RevertLastSyncMigrator","enableBadgeCounterKeyDefinition","BadgeSettingsMigrator","disableBadgeCounter","enableBadgeCounter","BIOMETRIC_UNLOCK_ENABLED","MoveBiometricUnlockToStateProviders","biometricUnlock","UserNotificationSettingsKeyMigrator","disableAddLoginNotification","disableChangedPasswordNotification","enableAddedLoginPrompt","enableChangedPasswordPrompt","PolicyType","POLICIES_KEY","PolicyMigrator","enableContextMenuKeyDefinition","EnableContextMenuMigrator","disableContextMenuItem","enableContextMenu","LOCALE_KEY","PreferredLanguageMigrator","locale","APP_ID_STORAGE_KEY","ANONYMOUS_APP_ID_STORAGE_KEY","AppIdMigrator","appId","anonymousAppId","defaultUriMatchStrategyDefinition","equivalentDomainsDefinition","neverDomainsDefinition","DomainSettingsMigrator","neverDomains","defaultUriMatch","equivalentDomains","defaultUriMatchStrategy","THEME_SELECTION","MoveThemeToStateProviderMigrator","legacyGlobalState","theme","removeFromGlobal","vaultSettingsStateDefinition","VaultSettingsKeyMigrator","dontShowCardsCurrentTab","dontShowIdentitiesCurrentTab","showCardsCurrentTab","showIdentitiesCurrentTab","AVATAR_COLOR_KEY","AvatarColorMigrator","userAvatarColor","TOKEN_STATE_DEF_LIKE","TokenServiceStateProviderMigrator","globalData","globalTwoFactorToken","existingAccessToken","tokens","existingRefreshToken","existingApiKeyClientId","existingApiKeyClientSecret","twoFactorToken","migratedTwoFactorToken","updatedLegacyAccount","migratedAccessToken","migratedRefreshToken","migratedApiKeyClientId","migratedApiKeyClientSecret","MoveBillingAccountProfileMigrator","hasPremiumPersonally","hasPremiumFromOrganization","RemoveEverBeenUnlockedMigrator","everBeenUnlocked","removeEverBeenUnlocked","stateVersion","OrganizationUserStatusType","OrganizationUserType","ProviderType","ProductType","USER_ORGANIZATIONS","OrganizationMigrator","EVENT_COLLECTION","EventCollectionMigrator","eventCollection","ShowFaviconDefinition","EnableFaviconMigrator","disableFavicon","showFavicons","AutoConfirmFingerPrintsMigrator","autoConfirmFingerPrints","USER_DECRYPTION_OPTIONS","UserDecryptionOptionsMigrator","decryptionOptions","ENVIRONMENT_REGION","ENVIRONMENT_URLS","ENVIRONMENT_ENVIRONMENT","MergeEnvironmentState","removeFromUser","PROMPT_CANCELLED","DeleteBiometricPromptCancelledData","DESKTOP_SETTINGS_STATE","WINDOW_KEY","CLOSE_TO_TRAY_KEY","MINIMIZE_TO_TRAY_KEY","START_TO_TRAY_KEY","TRAY_ENABLED_KEY","OPEN_AT_LOGIN_KEY","ALWAYS_SHOW_DOCK_KEY","ALWAYS_ON_TOP_KEY","MoveDesktopSettingsMigrator","updatedGlobal","enableCloseToTray","enableMinimizeToTray","enableStartToTray","enableTray","openAtLogin","alwaysShowDock","enableAlwaysOnTop","DDG_KEY","MoveDdgToStateProviderMigrator","enableDuckDuckGoBrowserIntegration","enableDdg","AccountServerConfigMigrator","AddKeyTypeToOrgKeysMigrator","encryptedOrgKeys","newOrgKeys","entries","updateOrgKey","usesKeyConnectorKeyDefinition","convertAccountToKeyConnectorKeyDefinition","KeyConnectorMigrator","STORED_EMAIL","RememberedEmailMigrator","rememberedEmail","globalStoredEmail","DeleteInstalledVersion","installedVersion","DeviceTrustServiceStateProviderMigrator","existingDeviceKey","existingShouldTrustDevice","trustDeviceChoiceForDecryption","migratedDeviceKey","migratedShouldTrustDevice","SendType","ENCRYPTED_SENDS","SendMigrator","sends","FORCE_SET_PASSWORD_REASON_DEFINITION","MASTER_KEY_HASH_DEFINITION","MASTER_KEY_ENCRYPTED_USER_KEY_DEFINITION","MoveMasterKeyStateToProviderMigrator","forceSetPasswordReason","keyHash","masterKeyEncryptedUserKey","ADMIN_AUTH_REQUEST_KEY","ACCEPT_AUTH_REQUESTS_KEY","AuthRequestMigrator","existingAdminAuthRequest","adminAuthRequest","existingApproveLoginRequests","approveLoginRequests","migratedAdminAuthRequest","migratedAcceptAuthRequest","CIPHERS_DISK_LOCAL","CIPHERS_DISK","CipherServiceMigrator","localData","REFRESH_TOKEN_MIGRATED_TO_SECURE_STORAGE","RemoveRefreshTokenMigratedFlagMigrator","KdfType","kdfConfigKeyDefinition","KdfConfigMigrator","RemoveLegacyEtmKeyMigrator","legacyEtmKey","KnownAccountsMigrator","migrateAuthenticatedAccounts","migrateActiveAccountId","migrateAccountActivity","userIds","getKnownUserIds","activeAccountId","accountActivity","toStore","agg","authenticatedAccounts","accountsToStore","stored","dateMs","stringify","PIN_STATE","PIN_KEY_ENCRYPTED_USER_KEY_PERSISTENT","USER_KEY_ENCRYPTED_PIN","OLD_PIN_KEY_ENCRYPTED_MASTER_KEY","PinStateMigrator","pinKeyEncryptedUserKey","protectedPin","pinProtected","accountPinKeyEncryptedUserKeyPersistent","accountUserKeyEncryptedPin","accountOldPinKeyEncryptedMasterKey","VAULT_TIMEOUT_SETTINGS_STATE_DEF_LIKE","VAULT_TIMEOUT","VAULT_TIMEOUT_ACTION","vaultTimeoutTypeMigrateRecord","null","vaultTimeoutTypeRollbackRecord","never","onRestart","onLocked","onSleep","onIdle","ClientType","VaultTimeoutSettingsServiceStateProviderMigrator","existingVaultTimeout","vaultTimeout","Cli","newVaultTimeout","existingVaultTimeoutAction","vaultTimeoutAction","migratedVaultTimeout","migratedVaultTimeoutAction","NAVIGATION","PASSWORD","PASSPHRASE","PasswordOptionsMigrator","legacyOptions","passwordGenerationOptions","converted","ambiguous","uppercase","minUppercase","lowercase","minLowercase","special","generator","wordSeparator","convertSettings","existing","updated","storeSettings","deleteSettings","HISTORY","GeneratorHistoryMigrator","passwordGenerationHistory","CATCHALL","EFF_USERNAME","SUBADDRESS","ADDY_IO","DUCK_DUCK_GO","FASTMAIL","FIREFOX_RELAY","FORWARD_EMAIL","SIMPLE_LOGIN","ForwarderOptionsMigrator","usernameGenerationOptions","forwarders","addyIo","forwardedAnonAddyBaseUrl","forwardedAnonAddyApiToken","forwardedAnonAddyDomain","duckDuckGo","forwardedDuckDuckGoToken","fastmail","forwardedFastmailApiToken","firefoxRelay","forwardedFirefoxApiToken","forwardEmail","forwardedForwardEmailApiToken","forwardedForwardEmailDomain","simpleLogin","forwardedSimpleLoginApiKey","forwardedSimpleLoginBaseUrl","username","forwarder","forwardedService","algorithms","effUsername","wordCapitalize","wordIncludeNumber","subaddress","subaddressType","subaddressEmail","catchall","catchallType","catchallDomain","DESKTOP_SETTINGS_DISK","BROWSER_INTEGRATION_ENABLED","BROWSER_INTEGRATION_FINGERPRINT_ENABLED","MINIMIZE_ON_COPY","MoveFinalDesktopSettingsMigrator","enableBrowserIntegrationValue","enableBrowserIntegration","enableBrowserIntegrationFingerprintValue","enableBrowserIntegrationFingerprint","minimizeOnCopyToClipboardValue","minimizeOnCopyToClipboard","browserIntegrationEnabledValue","browserIntegrationFingerprintEnabled","SHOW_BANNER","RemoveUnassignedItemsBannerDismissed","MoveLastSyncDate","MoveBiometricAutoPromptToAccount","noAutoPromptBiometrics","MoveStateVersionMigrator","MoveBrowserSettingsToGlobal","tryAddSetting","accountSelector","globalSetter","hasValue","globalNeverDomainsValue","accumulator","normalizedNeverDomains","targetGlobalState","MinVersionMigrator","MIN_VERSION","MigrationBuilderService","build","migrationBuilderCache","with","MigrationHelper","keyDefinition","getGlobalKey","knownAccountUserIdsBuilderPre60","globalKeyBuilder","knownAccountUserIdsBuilder","userKeyBuilderPre9","userKeyBuilder","globalKeyBuilderPre9","MigrationRunner","diskStorage","migrationBuilderService","migrationHelper","migrationBuilder","waitForCompletion","isReady","wait","time","nextTime","waitForMigrations","State","globals","accountDeserializer","buildAccountMapFromJSON","jsonAccounts","partialKeys","DDG_SHARED_KEY","StorageServiceProvider","diskStorageService","memoryStorageService","defaultLocation","overrides","UserAutoUnlockKeyService","setUserKeyInMemoryIfAutoUserKeySet","autoUserKey","getUserKeyFromStorage","Auto","setUserKey","DefaultActiveUserState","singleUserStateProvider","combinedState$","_userId","configureState","throwError","fullName","DefaultDerivedState","parentState$","deriveDefinition","dependencies","forcedValueSubject","storageKey","derivedState$","concatMap","derivedStateOrPromise","derive","merge","share","connector","ReplaySubject","resetOnRefCountZero","timer","forceValue","DEFAULT_OPTIONS","shouldUpdate","combineLatestWith","msTimeout","getStoredValue","storage","valuesRequireDeserialization","jsonValue","StateBase","storageUpdate$","updates$","storageUpdate","updateType","defer","populateOptionsWithDefault","updatePromise","internalUpdate","currentState","getStateForUpdate","combinedDependencies","newState","doStorageSave","oldState","DefaultGlobalState","chosenLocation","DefaultSingleUserState","stateEventRegistrarService","buildKey","registerEvents","ProviderData","SendFileData","fileName","sizeName","SendTextData","hidden","SendData","accessId","notes","maxAccessCount","accessCount","expirationDate","deletionDate","hideEmail","Text","File","FolderData","caches","sequentialize","cacheKey","propertyKey","descriptor","originalMethod","getCache","argsCacheKey","onFinally","apply","LAST_SYNC_DATE","CoreSyncService","stateService","folderService","folderApiService","messageSender","collectionService","sendService","sendApiService","syncInProgress","getLastSync","lastSync$","activeUserLastSync$","setLastSync","syncUpsertFolder","notification","isEdit","syncStarted","Locked","localFolder","remoteFolder","upsert","folderId","syncCompleted","syncDeleteFolder","syncUpsertCipher","getIsAuthenticated","localCipher","checkCollections","remoteCipher","getFullCipherDetails","cipherId","syncDeleteCipher","syncUpsertSend","localSend","remoteSend","getSend","sendId","syncDeleteSend","successfully","DefaultSyncService","masterPasswordService","domainSettingsService","keyConnectorService","userDecryptionOptionsService","logoutCallback","forceSync","allowThrowOnError","needsSync","needsSyncing","getSync","syncProfile","syncFolders","syncCollections","syncCiphers","syncSends","syncSettings","domains","syncPolicies","getAccountRevisionDate","stamp","getSecurityStamp","setMasterKeyEncryptedUserKey","setPrivateKey","setProviderKeys","setOrgKeys","providerOrganizations","setSyncAvatarColor","setSecurityStamp","setAccountEmailVerified","setHasPremium","premiumPersonally","premiumFromOrganization","setUsesKeyConnector","setForceSetPasswordReasonIfNeeded","syncProfileOrganizations","userNeedsMigration","setConvertAccountRequired","removeConvertAccountRequired","profileResponse","forcePasswordReset","setForceSetPasswordReason","AdminForcePasswordReset","userDecryptionOptions","userDecryptionOptionsById$","hasManageResetPasswordPermission","isAdmin","manageResetPassword","trustedDeviceOption","TdeUserWithoutPasswordHasPasswordResetPermission","isMember","isProviderUser","eqDomains","globalEquivalentDomains","setEquivalentDomains","OrganizationConnectionResponse","rawConfig","OrganizationExportResponse","OrganizationSponsorshipSyncStatusResponse","lastSyncDate","PreValidateSponsorshipResponse","isTokenValid","ProviderUserBulkPublicKeyResponse","ProviderUserBulkResponse","ProviderUserResponse","ProviderUserUserDetailsResponse","requestDeviceType","requestIpAddress","requestApproved","responseDate","requestDate","requestDateUTC","UTC","getUTCFullYear","getUTCMonth","getDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","dateNow","dateNowUTC","isExpired","isAnswered","DeviceVerificationResponse","isDeviceVerificationSectionEnabled","unknownDeviceVerificationEnabled","KeyConnectorUserKeyResponse","PreloginResponse","RegisterResponse","captchaBypassToken","SsoPreValidateResponse","TwoFactorAuthenticatorResponse","TwoFactorDuoResponse","TwoFactorEmailResponse","TwoFactorProviderResponse","TwoFactorRecoverResponse","TwoFactorYubiKeyResponse","BillingPaymentResponse","TaxRateResponse","rate","CollectionBulkDeleteRequest","BreachAccountResponse","addedDate","breachDate","dataClasses","isActive","isVerified","logoPath","modifiedDate","pwnCount","EventResponse","collectionId","providerOrganizationId","actingUserId","deviceType","ipAddress","installationId","systemUser","secretId","serviceAccountId","UserKeyResponse","AttachmentUploadDataResponse","attachmentId","fileUploadType","cipherResponse","cipherMiniResponse","OptionalCipherResponse","unavailable","cipher","AuditService","passwordLeaked","hashBytes","fromBufferToHex","hashStart","substr","hashEnding","match","breachedAccounts","getHibpBreach","limit","throttleKey","allThrottles","throttles","getThrottles","argsThrottleKey","queue","exec","EventData","EventRequest","LUNR_SEARCH_INDEX","LUNR_SEARCH_INDEXED_ENTITY_ID","LUNR_SEARCH_INDEXING","SearchService","searchIndexState","getActive","index$","searchIndex","lunr","Index","searchIndexEntityIdState","indexedEntityId$","searchIsIndexingState","searchIsIndexing$","indexing","immediateSearchLocales","defaultSearchableMinLength","searchableMinLength","locale$","registeredPipeline","Pipeline","registerFunction","normalizeAccentsPipelineFunction","clearIndex","isSearchable","query","normalizeSearchQuery","getIndexForSearch","indexCiphers","indexedEntityId","getIsIndexing","setIsIndexing","setIndexedEntityIdForSearch","builder","Builder","pipeline","field","boost","extractor","subTitle","Login","login","uriExtractor","fieldExtractor","attachmentExtractor","setIndexForSearch","toJSON","searchCiphers","every","searchCiphersBasic","ciphersMap","searchResults","search","soWild","Query","wildcard","LEADING","TRAILING","q","tokenizer","term","fields","deleted","isDeleted","hasUris","uris","loginUri","uri","searchSends","sendsMatched","lowPriorityMatched","joined","hasFields","hasAttachments","attachments","lastIndexOf","RegularExpression","protocolIndex","queryIndex","substring","searchableFields","metadata","normalize","VaultTimeoutService","searchService","vaultTimeoutSettingsService","stateEventRunnerService","taskSchedulerService","biometricService","lockedCallback","loggedOutCallback","inited","registerTaskHandler","vaultTimeoutCheckInterval","checkVaultTimeout","init","checkOnInterval","startCheck","setInterval","isViewOpen","accountActivity$","userIdString","shouldLock","executeTimeoutAction","lock","setShouldAutopromptNow","availableVaultTimeoutActions$","Lock","currentUserId","lockingUserId","lockPromise","clearActiveUserCache","clearDecryptedFolderState","clearMasterKey","setUserKeyAutoUnlock","setCryptoMasterKeyAuto","clearCache","handleEvent","lastActive","getVaultTimeoutByUserId$","vaultTimeoutSeconds","getVaultTimeoutActionByUserId$","SendRequest","fileLength","SendAccessResponse","creatorIdentifier","SendFileDownloadDataResponse","SendFileUploadDataResponse","sendResponse","SEND_USER_ENCRYPTED","SEND_USER_DECRYPTED","SendWithIdRequest","CipherFileUploadService","SortedCiphersCache","comparator","sortedCiphersByUrl","timeouts","isCached","addCiphers","Ciphers","resetTimer","getLastUsed","getLastLaunched","getNext","updateLastUsedIndex","lastUsedIndex","lastLaunched","y","valueOf","getNextIndex","CipherBulkMoveRequest","CipherBulkRestoreRequest","CipherWithIdRequest","CipherBulkShareRequest","CipherBulkUpdateCollectionsRequest","cipherIds","removeCollections","CipherCollectionsRequest","CipherCreateRequest","CipherPartialRequest","favorite","CipherShareRequest","ENCRYPTED_CIPHERS","DECRYPTED_CIPHERS","FAILED_DECRYPTED_CIPHERS","LOCAL_DATA_KEY","ADD_EDIT_CIPHER_INFO_KEY","addEditCipherInfo","CIPHER_KEY_ENC_MIN_SERVER_VER","CipherService","autofillSettingsService","cipherFileUploadService","sortedCiphersCache","sortCiphersByLastUsed","forceCipherViews$","localDataState","encryptedCiphersState","decryptedCiphersState","failedToDecryptCiphersState","addEditCipherInfoState","localData$","ciphers$","cipherViews$","getAllDecrypted","failedToDecryptCiphers$","addEditCipherInfo$","setDecryptedCipherCache","setDecryptedCiphers","setFailedDecryptedCiphers","cipherViews","clearDecryptedCiphersState","model","keyForCipherEncryption","keyForCipherKeyDecryption","originalCipher","updateModelfromExistingCipher","adjustPasswordHistoryLength","reprompt","getCipherKeyEncryptionEnabled","userOrOrgKey","getKeyForCipherKeyDecryption","encryptCipherWithCipherKey","encryptCipher","encryptAttachments","attachmentsModel","promises","encAttachments","attachment","encryptObjProperty","encryptFields","fieldsModel","self","encFields","encField","encryptField","fieldModel","linkedId","encryptPasswordHistories","phModels","encPhs","ph","encPh","encryptPasswordHistory","phModel","lastUsedDate","decCiphers","getDecryptedCiphers","reindexCiphers","newDecCiphers","failedCiphers","decryptCiphers","cipherDecryptionKeys$","grouped","groupedCiphers","flat","acc","decryptionFailure","getUserId","getAllDecryptedForGrouping","groupingId","folder","getAllDecryptedForUrl","includeOtherTypes","defaultMatch","filterCiphersForUrl","getUrlEquivalentDomains","defaultUriMatchStrategy$","cipherIsLogin","matchesUri","getAllDecryptedCiphersOfType","sortCiphersByLastUsedThenName","getCiphersOrganization","decryptOrganizationCiphersResponse","getManyFromApiForOrganization","cr","getLastUsedForUrl","autofillOnPageLoad","getCipherForUrl","getLastLaunchedForUrl","getNextCipherForUrl","getNextCardCipher","getNextIdentityCipher","Identity","updateLastUsedIndexForUrl","updateLastUsedDate","ciphersLocalData","decryptedCipherCache","cached","updateLastLaunchedDate","currentTime","saveNeverDomain","neverDomains$","setNeverDomains","createWithServer","orgAdmin","postCipherAdmin","postCipherCreate","postCipher","updateWithServer","putCipherAdmin","putCipher","putPartialCipher","shareWithServer","attachmentPromises","shareAttachmentWithServer","encCipher","encryptSharedCipher","putShareCipher","shareManyWithServer","encCiphers","putShareCiphers","toCipherData","saveAttachmentWithServer","unencryptedFile","admin","reader","FileReader","readAsArrayBuffer","evt","cData","saveAttachmentRawWithServer","cipherKeyEncryptionEnabled","cipherEncKey","encFileName","dataEncKey","makeDataEncKey","encData","saveCollectionsWithServer","putCipherCollections","saveCollectionsWithServerAdmin","putCipherCollectionsAdmin","bulkUpdateCollectionsWithServer","cid","updateEncryptedCipherState","current","clearEncryptedCiphersState","moveManyWithServer","putMoveCiphers","deleteWithServer","asAdmin","deleteCipherAdmin","deleteCipher","deleteManyWithServer","deleteManyCiphersAdmin","deleteManyCiphers","deleteAttachment","deleteAttachmentWithServer","deleteCipherAttachment","getSingleMessage","aLastUsed","bLastUsed","bothNotNull","aName","bName","softDelete","setDeletedDate","softDeleteWithServer","putDeleteCipherAdmin","putDeleteCipher","softDeleteManyWithServer","putDeleteManyCiphersAdmin","putDeleteManyCiphers","restore","clearDeletedDate","restoreWithServer","putRestoreCipherAdmin","putRestoreCipher","restoreManyWithServer","putRestoreManyCiphersAdmin","putRestoreManyCiphers","restores","getUserKeyWithLegacySupport","setAddEditCipherInfo","encryptedCiphers","userCiphers","encryptedCipher","existingCipher","passwordHistory","passwordRevisionDate","existingHiddenFields","hiddenFields","ef","matchedField","attachmentView","attachmentResponse","encBuf","decBuf","filepath","postShareCipherAttachment","prop","theProp","theObj","modelProp","encryptCipherData","totp","uriHash","uriChecksum","fido2Credentials","viewKey","domainKey","keyAlgorithm","keyCurve","keyValue","rpName","userHandle","userName","userDisplayName","origin","counter","String","discoverable","SecureNote","secureNote","S","cardholderName","brand","expMonth","expYear","firstName","middleName","lastName","address1","address2","address3","company","phone","ssn","passportNumber","licenseNumber","SshKey","sshKey","keyFingerprint","getAutofillOnPageLoadDefault","autofillOnPageLoadDefault$","lastUsed","autofillOnPageLoadDefault","clearSortedCiphers","keyForCipherKeyEncryption","decryptedCipherKey","makeCipherKey","featureEnabled","CipherKeyEncryption","meetsServerVersion","FOLDER_ENCRYPTED_FOLDERS","FOLDER_DECRYPTED_FOLDERS","B32Chars","SteamChars","SHOW_CARDS_CURRENT_TAB","SHOW_IDENTITIES_CURRENT_TAB","CLICK_ITEMS_AUTOFILL_VAULT_VIEW","LoggingErrorHandler","injector","handleError","NoopViewCacheService","signal","AngularThemingService","createSystemThemeFromWindow","getSystemThemeFromWindow","fromEvent","matchMedia","matches","Dark","Light","themeStateService","systemTheme$","selectedTheme$","configuredTheme","System","applyThemeChangesTo","Nord","SolarizedDark","safeProviders","useValue","useFactory","translationLocale","deps","supportsSecureStorage","language","logoutReason","useClass","authStatuses$","accounts$","statuses","isGuid","getInMemoryUserKeyFor$","hasAccessToken$","hasAccessToken","callback","K","azureFileUploadService","bitwardenFileUploadService","uploadData","fileUploadMethods","Direct","postDirect","Azure","renewFileUploadUrl","fileUploadService","fileSize","adminRequest","uploadDataResponse","postCipherAttachment","generateMethods","legacyServerAttachmentFileUpload","generatePostDirectCallback","generateRenewFileUploadUrlCallback","generateRollbackCallback","postAttachmentFile","renewResponse","renewAttachmentUploadUrl","deleteCipherAttachmentAdmin","postCipherAttachmentAdminLegacy","postCipherAttachmentLegacy","folderViewCache","forceFolderViews","folders$","encryptedFoldersState","folderViews$","observable","folderData","decryptFolders","getDecrypted$","getAllFromState","getFromState","getAllDecryptedFromState","setDecryptedFolders","updates","cId","encryptedFolders","encryptedFolder","decrypted","userKey$","decryptFolderPromises","decryptWithKey","decryptedFolders","getSortFunction","noneFolder","postFolder","putFolder","deleteFolder","deleteAll","deleteAccount","verificationRequest","registerSendVerificationEmail","env","registerVerificationEmailClicked","registerFinish","accountsState","activeAccountIdState","sortedUserIds$","nextUpAccount$","sortedUserIds","nextId","addAccount","accountData","setAccountActivity","setAccountName","setAccountInfo","setAccountEmail","clean","removeAccountActivity","switchAccount","updateActivity","_","lastActivity","oldActivity","newAccountInfo","oldAccountInfo","putAvatar","getUserAvatarColor$","getCode","period","alg","digits","keyB32","isOtpAuth","isSteamAuth","getQueryParams","digitParams","periodParam","algParam","epoch","timeHex","leftPad","decToHex","timeBytes","fromHexToArray","keyBytes","b32ToBytes","sign","offset","binary","fullCode","trunc","pow","getTimeInterval","l","b32ToHex","cleanedInput","bits","hex","byteIndex","charAt","chunk","signature","platformSupportsSecureStorage","secureStorageService","keyGenerationService","accessTokenKeySecureStorageKey","refreshTokenSecureStorageKey","initializeState","disk","emailTwoFactorTokenRecordGlobalState","activeUserIdGlobalState","setTokens","clientIdClientSecret","getUserIdFromAccessToken","newAccessToken","_setAccessToken","newTokens","setRefreshToken","setClientId","setClientSecret","getAccessTokenKey","accessTokenKeyB64","getSecureStorageOptions","createAndSaveAccessTokenKey","newAccessTokenKey","createKey","clearAccessTokenKey","getOrCreateAccessTokenKey","accessTokenKey","encryptAccessToken","decryptAccessToken","encryptedAccessToken","determineStorageLocation","SecureStorage","decryptedAccessToken","Disk","Memory","setAccessToken","clearAccessToken","getAccessToken","accessTokenMemory","getStateValueByUserIdAndKeyDef","accessTokenDisk","encryptedAccessTokenEncString","decryptedRefreshToken","saveStringToSecureStorage","refreshTokenSecureStorage","getStringFromSecureStorage","getRefreshToken","refreshTokenMemory","refreshTokenDisk","clearRefreshToken","storageLocation","getClientId","apiKeyClientIdMemory","clearClientId","getClientSecret","apiKeyClientSecretMemory","clearClientSecret","setTwoFactorToken","getTwoFactorToken","clearTwoFactorToken","clearTokens","decodeAccessToken","tokenOrUserId","getTokenExpirationDate","decoded","exp","setUTCSeconds","tokenSecondsRemaining","offsetSeconds","msRemaining","tokenNeedsRefresh","minutes","getEmail","email_verified","getName","getIssuer","iss","getIsExternal","amr","useSecureStorage","Never","bitLength","aesGenerateKey","createKeyWithPurpose","purpose","salt","bytes","fromBufferToUtf8","material","hkdf","derivedKey","deriveKeyFromMaterial","deriveKeyFromPassword","ITERATIONS","defaultValue","pbkdf2","MEMORY","PARALLELISM","saltHash","argon2","stretchKey","newKey","hkdfExpand","appIdService","refreshAccessTokenErrorCallback","customUserAgent","isWebClient","isDesktopClient","device","getDevice","IEBrowser","ChromeBrowser","EdgeBrowser","FirefoxBrowser","OperaBrowser","SafariBrowser","UnknownBrowser","VivaldiBrowser","WindowsDesktop","MacOsDesktop","LinuxDesktop","WindowsCLI","MacOsCLI","LinuxCLI","postIdentityToken","Accept","alterIdentityTokenHeaders","identityToken","toIdentityToken","fetch","qsStringify","responseJson","isJsonResponse","TwoFactorProviders2","HCaptcha_SiteKey","postAuthRequest","postAdminAuthRequest","getAuthResponse","accessCode","getAuthRequest","putAuthRequest","getAuthRequests","getLastAuthRequest","activeRequests","postPrelogin","postEmailToken","postEmail","postPassword","postSetKeyConnectorKey","postSecurityStamp","postPasswordHint","postRegister","postPremium","postReinstatePremium","postAccountLicense","postAccountKeys","postAccountVerifyEmail","postAccountVerifyEmailToken","postAccountRecoverDelete","postAccountRecoverDeleteToken","postAccountKdf","deleteSsoUser","getSsoUserIdentifier","postUserApiKey","postUserRotateApiKey","putUpdateTempPassword","putUpdateTdeOffboardingPassword","postConvertToKeyConnector","getUserBillingHistory","getCipher","getCipherAdmin","postPurgeCiphers","getAttachmentData","getCollectionAccessDetails","getUserCollections","getCollections","getManyCollectionsWithAccessDetails","getCollectionUsers","dr","postCollection","putCollection","putCollectionUsers","deleteCollection","deleteManyCollections","deleteCollectionUser","getGroupUsers","deleteGroupUser","getTaxRates","getSettingsDomains","putSettingsDomains","getTwoFactorOrganizationProviders","btoa","AttestationObject","postTwoFactorRecover","postTwoFactorEmail","getDeviceVerificationSettings","putDeviceVerificationSettings","getCloudCommunicationsEnabled","getOrganizationConnection","createOrganizationConnection","updateOrganizationConnection","organizationConnectionId","deleteOrganizationConnection","getProviderUsers","getProviderUser","postProviderUserInvite","postProviderUserReinvite","postManyProviderUserReinvite","postProviderUserBulkConfirm","deleteManyProviderUsers","postProviderUserAccept","postProviderUserConfirm","postProviderUsersPublicKey","putProviderUser","deleteProviderUser","getProviderClients","postProviderAddOrganization","deleteProviderOrganization","getEvents","end","addEventParameters","getEventsCipher","getEventsOrganization","getEventsOrganizationUser","getEventsProvider","getEventsProviderUser","postEventsCollect","authHeader","Authorization","getMasterKeyFromKeyConnector","getActiveBearerToken","postUserKeyToKeyConnector","getKeyConnectorAlive","getOrganizationExport","getApplicationVersionNumber","preValidateSso","postCreateSponsorship","sponsoredOrgId","getSponsorshipSyncStatus","deleteRevokeSponsorship","sponsoringOrganizationId","deleteRemoveSponsorship","sponsoringOrgId","postPreValidateSponsorshipToken","sponsorshipToken","postRedeemSponsorship","postResendSponsorshipOffer","refreshAccessToken","refreshApiToken","decodedToken","grant_type","client_id","refresh_token","tokenResponse","deviceRequest","tokenRequest","hasResponse","alterHeaders","pathParts","requestUrl","normalizePath","requestHeaders","requestBody","buildHeadersAndBody","requestInit","responseType","responseIsJson","responseIsCsv","tokenError","isTextResponse","Message","typeHeader","sendKeySalt","sendKeyPurpose","sends$","encryptedState$","sendViews$","decryptSends","fileData","cryptoKey","passwordKey","keyB64","ArrayBuffer","encryptFileData","parseFile","oldSends","newSends","oldSend","newSend","allPropertiesSame","getEncryptedSends","decSends","getDecryptedSends","hasUserKey","setDecryptedSends","currentSends","setEncryptedSends","toRotatedKeyRequestMap","rotateUserKey","sendKey","decryptSendPromises","decryptedSends","activeUserEncryptedState","activeUserDecryptedState","decryptedState$","postSendAccess","getSendFileDownloadData","getSends","postSend","postFileTypeSend","renewSendFileUploadUrl","fileId","postSendFile","postSendFileLegacy","putSend","putSendRemovePassword","deleteSend","sendData","removePassword","legacyServerSendFileUpload","messageListener","subscriptions","messageCallback","pinService","biometricStateService","defaultVaultTimeout","setVaultTimeoutOptions","setVaultTimeout","setVaultTimeoutAction","refreshAdditionalKeys","getAvailableVaultTimeoutActions","canLock","availableVaultTimeoutActions","isBiometricLockSet","biometricUnlockPromise","biometricUnlockEnabled$","getBiometricUnlockEnabled","getUserState$","getMaxVaultTimeoutPolicyByUserId$","currentVaultTimeout","maxVaultTimeoutPolicy","determineVaultTimeout","catchError","maxVaultTimeoutPolicyData","currentVaultTimeoutAction","determineVaultTimeoutAction","MaximumVaultTimeout","availableActions","userHasMasterPassword","isPinSet","clearPinKeys","hasMasterPassword$","codeVerifierState","ssoState","orgSsoIdentifierState","ssoEmailState","activeUserOrgSsoIdentifierState","getCodeVerifier","setCodeVerifier","getSsoState","setSsoState","getOrganizationSsoIdentifier","setOrganizationSsoIdentifier","getSsoEmail","setSsoEmail","getActiveUserOrganizationSsoIdentifier","setActiveUserOrganizationSsoIdentifier","stateFactory","migrationRunner","hasBeenInited","isRecoveredSession","initOptions","runMigrations","setState","createGlobals","initAccountState","updateState","syncAccountFromDisk","diskAccount","getAccountFromDisk","scaffoldNewAccountStorage","reconcileOptions","defaultInMemoryOptions","deAuthenticateAccount","removeAccountFromDisk","removeAccountFromMemory","getUserKeyAutoUnlock","keySuffix","defaultSecureStorageOptions","saveSecureStorageKey","getUserKeyBiometric","hasUserKeyBiometric","setUserKeyBiometric","getCryptoMasterKeyB64","setCryptoMasterKeyB64","getDuckDuckGoSharedKey","setDuckDuckGoSharedKey","setEnableDuckDuckGoBrowserIntegration","getGlobals","defaultOnDiskOptions","saveGlobals","getEncryptedCryptoSymmetricKey","getAccount","cryptoSymmetricKey","useMemory","getGlobalsFromMemory","useDisk","getGlobalsFromDisk","saveGlobalsToMemory","saveGlobalsToDisk","getAccountFromMemory","htmlStorageLocation","Local","Both","saveAccount","saveAccountToMemory","saveAccountToDisk","deepClone","scaffoldNewAccountLocalStorage","scaffoldNewAccountSessionStorage","scaffoldNewAccountMemoryStorage","defaultOnDiskLocalOptions","defaultOnDiskMemoryOptions","requestedOptions","defaultOptions","Session","getActiveUserIdFromStorage","removeAccountFromLocalStorage","storedAccount","resetAccount","removeAccountFromSessionStorage","removeAccountFromSecureStorage","stateUpdater","updatedState","connected","inactive","isSyncingOnReconnect","notificationsReconnectTimeout","reconnect","signalrConnection","off","stop","withUrl","accessTokenFactory","skipNegotiation","transport","WebSockets","withHubProtocol","on","processNotification","onclose","isAuthedAndUnlocked","updateConnection","sync","reconnectFromActivity","disconnectFromInactivity","isAuthenticated","payloadUserId","UserId","myUserId","notificationId","reconnectTimerSubscription","random","globalContext","crypto","subtle","wasmSupported","checkIfWasmSupported","wcLen","passwordBuf","toBuf","pbkdf2Params","toWebCryptoAlgorithm","impKey","importKey","deriveBits","passwordArr","saltArr","pass","mem","hashLen","ArgonType","unloadRuntime","ikm","outputByteSize","hkdfParams","prk","infoBuf","infoArr","runningOkmLength","previousT","n","okm","md","md5","valueBytes","toByteString","fromByteStringToArray","digest","valueBuf","signingAlgorithm","mac1","mac2","arr1","arr2","getBytes","rand","Uint32Array","createBuffer","putInt32","meta","encKeyByteString","macKeyByteString","decode64","encKeyB64","macKeyB64","decipher","createDecipher","toWebCryptoAesMode","dataBuffer","finish","output","rsaParams","rsaExtractPublicKey","impPrivateKey","jwkPrivateKey","exportKey","jwkPublicKeyParams","kty","ext","impPublicKey","aesParams","generateKey","rawKey","rsaGenerateKeyPair","modulusLength","publicExponent","keyPair","arr","getRandomValues","buf","encodeUtf8","fromBufferToByteString","WebAssembly","instantiate","module","Module","Instance","clear$","worker","Worker","restartTimeout","postMessage","jsonItem","initializerKey","initializer","defaultIfEmpty","terminate","workers","getDecryptedItemsFromWorkers","hardwareConcurrency","numberOfWorkers","itemsPerWorker","itemsForWorker","decryptedItems","eventUploadsInterval","uploadEvents","takeEvents","taken","eventUploadService","orgIds$","collectMany","eventType","uploadImmediately","eventStore","events$","currentEvents","newEvents","collect","cipher$","orgIds","zip","User_ClientExportedVault","activeUserPolicyState","activeUserPolicies$","policies$","filteredPolicies$","enforcedPolicyFilter","policyAppliesToUser","orgDict","fromEntries","Accepted","usePolicies","isExemptFromPolicy","obsPolicies","enforcedOptions","filteredPolicies","currentPolicy","evaluateMasterPassword","passwordStrength","newPassword","enforcedPolicyOptions","toLocaleUpperCase","test","resetPasswordPolicyOptions","canManagePolicies","fromListResponse","getMasterPasswordPolicyResponseForOrgUser","getMasterPasswordPolicyOptsForOrgUser","masterPasswordPolicyResponse","masterPasswordPolicy","NotFound","masterKey$","masterKeyHash$","forceSetPasswordReason$","None","getMasterKeyEncryptedUserKey","setMasterKey","setMasterKeyHash","clearMasterKeyHash","decryptUserKeyWithMasterKey","deprecatedKey","decUserKey","AesCbc256_HmacSha256_B64","warning","usesKeyConnectorState","convertAccountToKeyConnectorState","getUsesKeyConnector","loggedInUsingSso","requiredByOrganization","getManagingOrganization","userIsNotUsingKeyConnector","migrateUser","keyConnectorRequest","handleKeyConnectorError","setMasterKeyFromUrl","masterKeyResponse","keyArr","convertNewSsoUserToKeyConnector","legacyKeyConnectorUrl","makeUserKey","pubKey","privKey","keyConnectorOption","setPasswordRequest","getConvertAccountRequired","userVerificationApiService","kdfConfigService","biometricsService","getAvailableVerificationOptions","isPinDecryptionAvailable","biometricsStatus","getBiometricsStatus","client","pin","biometrics","Available","alreadyHashed","validateSecretInput","getKdfConfig","verificationHasSecret","verifyUserByOTP","verifyUserByMasterPassword","PIN","verifyUserByPIN","Biometrics","verifyUserByBiometrics","postAccountVerifyOTP","policyOptions","compareKeyHash","serverKeyHash","ServerAuthorization","postAccountVerifyPassword","localKeyHash","LocalAuthorization","decryptUserKeyWithPin","authenticateWithBiometrics","postAccountRequestOTP","getOrganizationsFromState$","memberOrganizations$","familySponsorshipAvailable$","familySponsorshipAvailable","hasOrganizations","stateFor","existingOrganizations","mapOrganizationRecordToArray","enrollIfRequired","organizationSsoIdentifier","orgAutoEnrollStatusResponse","getAutoEnrollStatus","enroll","orgKeyResponse","resetRequest","putOrganizationUserResetPasswordEnrollment","providers$","take","mapProviderRecordToArray","getFormValidationErrors","errors","controlErrors","keyError","controlName","errorName","getBillingHistory","getLicense","createWithoutPayment","updatePasswordManagerSeats","updateSecretsManagerSubscription","updateSeats","reinstate","leave","updateLicense","importDirectory","getOrCreateApiKey","getApiKeyInformation","organizationApiKeyType","rotateApiKey","getSso","updateSso","selfHostedSyncLicense","updateCollectionManagement","getBillingInvoices","startAfter","URLSearchParams","queryString","getBillingTransactions","authRequestService","createHubConnection","anonHubConnection","HubConnectionBuilder","MessagePackHubProtocol","ProcessNotification","stopHubConnection","sendAuthRequestPushNotification","showError","defaultErrorMessage","validationErrors","getAllMessages","_orgDomains$","orgDomains$","orgDomainId","getValue","orgDomain","copyDnsTxt","dnsTxt","copyToClipboard","orgDomains","existingOrgDomains","existingOrgDomain","orgDomainIds","orgDomainService","getAllByOrgId","resultOrgDomain","getByOrgIdAndOrgDomainId","post","orgDomainReq","verify","getClaimedOrgDomainByEmail","getVerifiedOrgDomainsByEmail","getKnownDevice","deviceIdentifier","fromUtf8ToUrlB64","getDeviceByIdentifier","getDevices","updateTrustedDeviceKeys","devicePublicKeyEncryptedUserKey","userKeyEncryptedDevicePublicKey","deviceKeyEncryptedDevicePrivateKey","updateTrust","updateDevicesTrustRequestModel","getDeviceKeys","secretVerificationRequest","postDeviceTrustLoss","deactivateDevice","deviceId","devicesApiService","getDevices$","deviceResponses","getDeviceByIdentifier$","isDeviceKnownForUser$","updateTrustedDeviceKeys$","deactivateDevice$","getCurrentDevice$","deviceKeySecureStorageKey","supportsDeviceTrust$","userDecryptionOptions$","getShouldTrustDevice","setShouldTrustDevice","trustDeviceIfRequired","trustDevice","makeDeviceKey","devicePublicKey","devicePrivateKey","setDeviceKey","rotateDevicesTrust","getDeviceKey","currentDeviceKeys","decryptedDevicePublicKey","encryptedNewUserKey","encryptedDevicePublicKey","currentDeviceUpdateRequest","trustRequest","currentDevice","otherDevices","deviceKeyB64","decryptUserKeyWithDeviceKey","encryptedDevicePrivateKey","recordDeviceTrustLoss","webAuthnLoginApiService","loginStrategyService","assertCredential","credentialAssertionOptions","logIn","assertion","storageServiceProvider","globalStateCache","defaultStorageLocation","storageLocationOverrides","buildCacheKey","existingGlobalState","newGlobalState","existingUserState","newUserState","existingDerivedState","newDerivedState","buildDerivedState","activeUserStateProvider","derivedStateProvider","getDerived","userKeyDefinition","getUserStateOrDefault$","getPaymentSource","purchaseSubscription","makeOrganizationKeys","setOrganizationKeys","setOrganizationInformation","setPlanInformation","setPaymentInformation","purchaseSubscriptionNoPaymentMethod","startFree","encryptedCollectionName","prohibitsAdditionalSeats","FamiliesAnnually2019","TeamsStarter2023","information","billingInformation","taxIdNumber","billingAddressLine1","billingAddressLine2","billingAddressCity","billingAddressState","isFromSecretsManagerTrial","secretsManagerServiceAccounts","enableBadgeCounterState","enableBadgeCounter$","setEnableBadgeCounter","newValue","enablePasskeysState","enablePasskeys$","showCardsCurrentTabState","showCardsCurrentTab$","showIdentitiesCurrentTabState","showIdentitiesCurrentTab$","clickItemsToAutofillVaultViewState","clickItemsToAutofillVaultView$","setShowCardsCurrentTab","setShowIdentitiesCurrentTab","setClickItemsToAutofillVaultView","setEnablePasskeys","cancelOrganizationSubscription","cancelPremiumUserSubscription","createProviderClientOrganization","getPath","execute","getProviderClientInvoiceReport","invoiceId","getProviderClientOrganizations","getProviderInvoices","getProviderSubscription","updateOrganizationTaxInformation","updateProviderClientOrganization","updateProviderTaxInformation","verifyOrganizationBankAccount","previewIndividualInvoice","hasPremiumFromAnyOrganization$","hasPremiumFromAnyOrganization","hasPremiumPersonally$","canViewSubscription$","hasPremiumFromOrg","cloudAndBillingHistory","buildOrganizationManagementPreference","getKeyFromState","setKeyInStateFn","postProviderSetup","getProvider","putProvider","providerRecoverDeleteToken","deleteProvider","sdkClientFactory","userAgent","sdkClientCache","client$","toSettings","createSdkClient","LogLevel","Info","version$","userClient$","kdfParams$","getKdfConfig$","privateKey$","userEncryptedPrivateKey$","orgKeys$","encryptedOrgKeys$","kdfParams","Observable","subscriber","initializeClient","createAndInitializeClient","free","finalize","initialize_user_crypto","decryptedKey","decrypted_user_key","pBKDF2","argon2id","initialize_org_crypto","identityUrl","toDevice","Android","iOS","ChromeExtension","FirefoxExtension","OperaExtension","EdgeExtension","AndroidAmazon","UWP","VivaldiExtension","SafariExtension","Server","JslibServicesModule","MemoryStorageService","store","updatesSubject","structuredClone","WindowStorageService","getItem","setItem","removeItem","WebSsoComponentService","setDocumentCookies","cookie","HtmlStorageService","localStorage","sessionStorage","TranslationService","systemLanguage","localesDirectory","getLocalesJson","supportedTranslationLocales","defaultLocale","localeNames","defaultMessages","localeMessages","Intl","Collator","numeric","sensitivity","loadMessages","p1","p3","translate","messagesObj","formattedLocale","locales","placeProp","replaceToken","replaceContent","RegExp","translationLocaleState","userSetLocale$","setLocale","storedLocale","SupportedTranslationLocales","WebBiometricsService","PlatformUnsupported","unlockWithBiometricsForUser","getBiometricsStatusForUser","getShouldAutopromptNow","WebCloudEnvironment","WebMigrationHelper","Web","diskLocalStorageService","accountCandidate","supported","EventService","getDefaultDateFilters","getFullYear","getMonth","setDate","toDateTimeLocalString","formatDateFilters","filterStart","filterEnd","getEventInfo","ev","EventOptions","appInfo","getAppInfo","humanReadableMessage","getEventMessage","appIcon","appName","humanReadableMsg","User_LoggedIn","User_ChangedPassword","User_Updated2fa","User_Disabled2fa","User_Recovered2fa","User_FailedLogIn","User_FailedLogIn2fa","User_UpdatedTempPassword","User_MigratedKeyToKeyConnector","User_RequestedDeviceApproval","User_TdeOffboardingPasswordSet","Cipher_Created","formatCipherId","getShortId","Cipher_Updated","Cipher_Deleted","Cipher_SoftDeleted","Cipher_Restored","Cipher_AttachmentCreated","Cipher_AttachmentDeleted","Cipher_Shared","Cipher_ClientViewed","Cipher_ClientToggledPasswordVisible","Cipher_ClientToggledHiddenFieldVisible","Cipher_ClientToggledCardNumberVisible","Cipher_ClientToggledCardCodeVisible","Cipher_ClientCopiedHiddenField","Cipher_ClientCopiedPassword","Cipher_ClientCopiedCardCode","Cipher_ClientAutofilled","Cipher_UpdatedCollections","Collection_Created","formatCollectionId","Collection_Updated","Collection_Deleted","Group_Created","formatGroupId","Group_Updated","Group_Deleted","OrganizationUser_Invited","formatOrgUserId","OrganizationUser_Confirmed","OrganizationUser_Updated","OrganizationUser_Removed","OrganizationUser_UpdatedGroups","OrganizationUser_UnlinkedSso","OrganizationUser_ResetPassword_Enroll","OrganizationUser_ResetPassword_Withdraw","OrganizationUser_AdminResetPassword","OrganizationUser_ResetSsoLink","OrganizationUser_FirstSsoLogin","OrganizationUser_Revoked","OrganizationUser_Restored","OrganizationUser_ApprovedAuthRequest","OrganizationUser_RejectedAuthRequest","OrganizationUser_Deleted","OrganizationUser_Left","Organization_Updated","Organization_PurgedVault","Organization_ClientExportedVault","Organization_VaultAccessed","Organization_EnabledSso","Organization_DisabledSso","Organization_EnabledKeyConnector","Organization_DisabledKeyConnector","Organization_SponsorshipsSynced","Organization_CollectionManagementUpdated","formatOrganizationId","Policy_Updated","formatPolicyId","ProviderUser_Invited","formatProviderUserId","ProviderUser_Confirmed","ProviderUser_Updated","ProviderUser_Removed","ProviderOrganization_Created","formatProviderOrganizationId","ProviderOrganization_Added","ProviderOrganization_Removed","ProviderOrganization_VaultAccessed","OrganizationDomain_Added","OrganizationDomain_Removed","OrganizationDomain_Verified","OrganizationDomain_NotVerified","Secret_Retrieved","formatSecretId","shortId","cipherInfo","makeAnchor","setAttribute","outerHTML","innerHTML","pad","getHours","getMinutes","num","norm","ContainerService","attachToGlobal","bitwardenContainerService","getKeyService","getEncryptService","VersionService","sdkService","applyVersionToWindow","__version","getApplicationVersion","sdk","InitService","win","notificationsService","vaultTimeoutService","twoFactorService","userAutoUnlockKeyService","versionService","ENV_URLS","ModalService","B","modalOpen","setupHandlers","onCreated","modals","show","shown","isMobileBrowser","FileDownloadBuilder","blobOptions","_request","fileType","blobData","downloadMethod","fileNameLower","endsWith","WebFileDownloadService","download","isSafari","rel","createObjectURL","isDev","initService","filePath","localesResult","useAngularDecorators","diskLocalStorage","envUrls","currentHostname","chosenRegionConfig","routeAndParams","getBiometricsError","isWindowVisible","getBiometricsUnlockBtnText","getAvailableUnlockOptions$","startProcessReload","reload","cancelProcessReload","CoreModule","parentModule","DEEP_LINK_REDIRECT_URL","RouterService","titleService","previousUrl","deepLinkRedirectUrlState","child","firstChild","titleId","snapshot","rawTitle","updateUrl","doNotSaveUrl","newTitle","setTitle","setPreviousUrl","WebPlatformUtilsService","browserCache","chrome","getDeviceString","isFirefox","isChrome","isEdge","isOpera","isVivaldi","isMacAppStore","sameWindow","supportsWebAuthn","supportsDuo","doc","queryCommandSupported","textarea","textContent","position","copyEl","execCommand","warn","readFromClipboard","getAutofillKeyboardShortcut","UserKeyRotationApiService","postUserKeyUpdate","UserKeyRotationModule","UpdateKeyRequest","emergencyAccessKeys","resetPasswordKeys","webauthnKeys","UserKeyRotationService","emergencyAccessService","resetPasswordService","deviceTrustService","webauthnLoginAdminService","rotateUserKeyAndEncryptedData","newEncUserKey","isMasterKey","encryptPrivateKey","rotatedCiphers","rotatedFolders","rotatedSends","rotatedEmergencyAccessKeys","rotatedResetPasswordKeys","rotatedWebauthnKeys","userPrivateKeyWithLegacySupport$","ProductSwitcherContentComponent","productSwitcherService","products$","ProductSwitcherComponent","changeDetector","buttonType","HeaderModule","logout","WebHeaderComponent","routeData$","canLock$","actions","ProductSwitcherModule","ProductSwitcherService","i18n","syncCompleted$","triggerProductUpdate$","rest","routeOrg","organizationIdViaPath","smOrg","canAccessSecretsManager","acOrg","products","pm","appRoute","marketingRoute","external","sm","otherProductOverrides","supportingText","ac","bento","other","pollUntilSynced","clearInterval","BillingFreeFamiliesNavItemComponent","freeFamiliesPolicyService","PasswordManagerLogo","UserLayoutComponent","showSubscription$","hasFamilySponsorshipAvailable$","showSponsoredFamilies$","WebLayoutComponent","WebLayoutModule","toggleWidth","ToggleWidthComponent","minWidth","NavigationProductSwitcherComponent","accessibleProducts$","moreProducts$","WebSideNavComponent","AccountFingerprintComponent","generatedFingerprint","publicKeyBuffer","fingerprint","ChangeKdfModule","LooseComponentsModule","AvatarModule","BadgeListModule","TabsModule","T","SharedModule","M","hasPremiumGuard","_route","_state","userHasPremium","createUrlTree","BreachReportComponent","auditService","validators","updateOn","checkedUsername","ReportBreach","ReportExposedPasswords","ReportInactiveTwoFactor","MemberAccess","ReportReusedPasswords","ReportUnsecuredWebsites","ReportWeakPasswords","ReportType","reports","ExposedPasswords","ReusedPasswords","WeakPasswords","UnsecuredWebsites","Inactive2fa","DataBreach","MemberAccessReport","ReportsSharedModule","ReportsHomeComponent","reportRequiresPremium","RequiresPremium","ReportsLayoutComponent","homepage","routes","canActivate","children","pathMatch","U","ReportsRoutingModule","forChild","ReportsModule","CipherReportComponent","passwordRepromptService","isAdminConsoleActive","hasLoaded","allCiphers","dataSource","filterStatus","showFilterToggle","vaultMsg","filterOrgStatus$","destroyed$","filterId","getCount","orgFilterStatus","cipherCount","filterOrgToggle","currentFilterStatus","setCiphers","selectCipher","repromptCipher","cipherAddEditModalRef","comp","onSavedCipher","onDeletedCipher","onRestoredCipher","showPasswordPrompt","getAllCiphers","filterCiphersByOrg","ciphersList","ciph","ExposedPasswordsReportComponent","exposedPasswordCiphers","viewPassword","exposedCount","row","exposedXTimes","column","canManageCipher","InactiveTwoFactorReportComponent","services","cipherDocs","load2fa","inactive2faCiphers","docs","getDomain","service","serviceData","documentation","additionalDomain","ReusedPasswordsReportComponent","ciphersWithPasswords","passwordUseMap","reusedPasswordCiphers","UnsecuredWebsitesReportComponent","allCollections","unsecuredCiphers","cipherContainsUnsecured","canView","WeakPasswordsReportComponent","passwordStrengthService","weakPasswordCiphers","findWeakPasswords","userInput","isUserNameNotEmpty","atPosition","getPasswordStrength","score","scoreValue","scoreKey","reportValue","badgeVariant","ReportVariant","ReportCardComponent","requiresPremium","ReportListComponent","AssignCollectionsWebComponent","onCollectionAssign","CollectionDialogTabType","CollectionDialogAction","CollectionDialogComponent","groupService","collectionAdminService","changeDetectorRef","characters","nestOptions","accessItems","showOrgSelector","char","forbiddenCharacters","access","selectedOrg","showDeleteButton","showAddAccessWarning","dialogReadonly","accessTabError","hasError","tabIndex","Access","collectionView","savedCollection","editMode","initialTab","loadOrg","canCreateNewCollections","groups$","useGroups","getAllMiniUserDetails","readonlyPermission","g","limitNestedCollections","parentName","nameParts","parseName","canViewAllCollections","deletedParentName","unshift","accessSelections","collectionDetails","selection","mapToAccessSelections","canDelete","parentCollectionId","currentOrgUserId","initialSelection","allowAdminAccessToAllCollectionItems","removeValidators","validateCanManagePermission","handleFormGroupReadonly","handleAddAccessWarning","Canceled","isAddAccessCollection","managePermissionRequired","openCollectionDialog","CollectionDialogModule","NotPremiumDirective","templateRef","viewContainer","createEmbeddedView","PremiumBadgeComponent","WebVaultGeneratorDialogAction","WebVaultGeneratorDialogComponent","isPassword","selectButtonText","generatedValue","selectValue","onValueGenerated","WebCipherFormGenerationService","generatePassword","generateUsername","onFormReady","onCipherSaved","openAttachmentsDialog","VaultItemDialogResult","VaultItemDialogComponent","loadingForm","loadForm","formReady","disableEdit","disableForm","showDelete","formConfig","showCipherView","premiumUpgradeService","cipherAuthorizationService","eventCollectionService","_cipherModified","_originalFormMode","_formReadySubject","performingInitialLoad","canAccessAttachments$","promptForPremium","Removed","Uploaded","switchToEdit","changeMode","updateTitle","getDecryptedCipherView","canDeleteCipher$","activeCollectionId","isAdminConsoleAction","cipherView","initialValues","isAdminConsole","cipherData","partOne","dialogContent","parentElement","scrollTop","itemId","queryParamsHandling","replaceUrl","cipherIsUnassigned","isUnassigned","canEditAllCiphers","bulkMoveToFolder","bulkEditCollectionAccess","assignToCollections","bulkRestore","bulkDelete","RowHeightClass","VaultItemsComponent","RowHeight","showAdminActions","allOrganizations","allGroups","showBulkEditCollectionAccess","showBulkAddToCollections","showPermissionsColumn","_ciphers","_collections","onEvent","editableItems","sortByName","collectionCompare","prioritizeCollections","compareNames","sortByGroups","getFirstGroupName","getGroupName","aGroupName","bGroupName","sortByPermissions","getPermissionPriority","getCollectionPermission","getCipherPermission","NoAccess","priorityA","priorityB","refreshItems","showExtraColumn","showCollections","showGroups","showOwner","isAllSelected","isSelected","bulkMoveAllowed","showBulkMove","hasPersonalItems","uniqueCipherOrgIds","getUniqueOrganizationIds","canManageCollectionCiphers","canManageCollection","canDeleteCollections","canDeleteCollection","userCanDeleteAccess","disableMenu","showAssignToCollections","bulkAssignToCollectionsAllowed","canEditCollection","canEdit","canViewCollectionInfo","toggleAll","canClone","vaultItem","viewingOrgVault","editAnyCollection","orgCollections","canEditCipher","canEditUnmanagedCollections","activeCollection","canEditOrManageAllCiphers","collectionNotSelected","allCiphersHaveEditAccess","flatMap","canEditUnassignedCiphers","assigned","filteredCollections","GetCollectionNameFromIdPipe","CollectionNameBadgeComponent","shownCollections","showXMore","xMoreCount","copy","clone","VaultCipherRowComponent","extensionRefreshEnabled","checkedToggled","CipherType","permissionPriority","clickAction","showTotpCopyButton","hasTotp","organizationUseTotp","showPremiumFeatures","showFixOldAttachments","hasOldAttachments","showAttachments","showClone","cloneable","showEventLogs","isNotDeletedLoginCipher","permissionText","labels","highestPerm","showCopyPassword","showCopyTotp","showLaunchUri","canLaunch","showCheckbox","GroupNameBadgeComponent","ngOnChanges","selectedGroups","VaultCollectionRowComponent","Unassigned","collectionGroups","showAddAccess","unmanaged","permissionTooltip","VaultItemsModule","addFieldType","linkedFieldOptions","fieldType","addFieldTypeOptions","addFieldLinkedTypeOption","Linked","changes","thisCipherType","setLinkedFieldOptions","firstChange","resetCipherLinkedFields","addField","newField","removeField","toggleFieldValue","showValue","trackByFunction","drop","previousIndex","currentIndex","linkedFieldOption","i18nKey","TrueFalseValueDirective","elementRef","renderer","trueValue","falseValue","propagateChange","onHostChange","checked","setProperty","AddEditCustomFieldsComponent","fido2CredentialCreationDateValue","datePipe","cloneMode","onCancelled","onEditAttachments","onShareCipher","onEditCollections","onGeneratePassword","onGenerateUsername","showPassword","showPrivateKey","showTotpSeed","showCardNumber","showCardCode","ownershipOptions","currentDate","allowPersonal","canUseReprompt","typeOptions","cardBrandOptions","cardExpMonthOptions","identityTitleOptions","uriMatchOptions","Domain","Host","StartsWith","Exact","autofillOnPageLoadOptions","personalOwnershipPolicyAppliesToActiveUser","writeableCollections","loadCollections","SSHKeyVaultItem","myEmail","defaultOwnerId","loadedAddEditCipherInfo","loadAddEditCipherInfo","loadCipher","Generic","organizationChanged","cipherOrg","hasFido2Credentials","previousCipherId","generateSshKey","saveCipher","addUri","removeUri","removePasskey","onCardNumberChange","getCardBrandByPatterns","getCardExpMonthDisplay","editCollections","deletePromise","restorePromise","restoreCipher","togglePassword","toggleTotpSeed","Cipher_ClientToggledTOTPSeedVisible","toggleCardNumber","toggleCardCode","togglePrivateKey","toggleUriOptions","loginUriMatchChanged","useTotp","checkPassword","checkPasswordPromise","repromptChanged","Password","loadedSavedInfo","typeI18nKey","aType","copyOptions","showNotification","generate_ssh_key","private_key","public_key","key_fingerprint","typeChange","togglePasswordCount","upgradeOrganization","launch","viewHistory","toggleFavorite","AddEditComponent","totpService","showRevisionDate","hasPasswordHistory","viewingPasswordHistory","viewOnly","showPasswordCount","cardIsExpired","passwordRevisionDisplayDate","cleanUp","canAccessPremium","showTotp","totpUpdateCode","totpTick","totpInterval","confirmed","getOptions","showGetPremium","totpCode","half","totpCodeFormatted","allowOwnershipAssignment","intervalSeconds","mod","totpSec","totpDash","totpLow","AttachmentDialogResult","uploadSuccessful","removalSuccessful","AttachmentsV2Component","attachmentFormId","attachmentFormID","BulkDeleteDialogResult","openBulkDeleteDialog","BulkDeleteDialogComponent","permanent","deletePromises","unassignedCiphers","deleteCiphersAdmin","deleteCiphers","deleteCollections","deleteRequest","orgCollectionIds","OrganizationBadgeModule","EllipsisPipe","completeWords","ellipsis","OrganizationNameBadgeComponent","isMe","textColor","organizationIdLink","GetOrgNameFromIdPipe","PipesModule","EnrollMasterPasswordReset","calloutOptions","verificationFn","userAction","verificationSuccess","LinkSsoDirective","returnUri","redirectUri","onClick","$event","ngAfterContentInit","toggleResetPasswordEnrollment","unlinkSso","OrganizationOptionsComponent","hideMenu","showLeaveOrgOption","resetPasswordPolicies$","managingOrg$","resetPasswordPolicies","managingOrg","showSsoOptions","allowEnrollmentChanges","actionPromise","onSearchTextChanged","VaultFilterComponent","filtersList","filters","searchPlaceholder","activeFilter","isFavorites","selectedFolderNode","node","selectedCollectionNode","vaultFilterService","onEditFolder","searchText","searchTextChanged","isLoaded","applyOrganizationFilter","orgNode","resetOrganization","selectedOrganizationNode","setOrganizationFilter","expandOrgFilter","applyTypeFilter","filterNode","resetFilter","selectedCipherTypeNode","applyFolderFilter","folderNode","applyCollectionFilter","collectionNode","editFolder","buildAllFilters","getDefaultFilter","typeFilter","data$","builderFilter","organizationFilter","addOrganizationFilter","addTypeFilter","folderFilter","addFolderFilter","collectionFilter","addCollectionFilter","trashFilter","addTrashFilter","singleOrgPolicy","personalVaultPolicy","addAction","organizationTree$","header","showHeader","isSelectable","divider","excludeTypes","allTypeFilters","buildTypeTree","folderTree$","collectionTree$","VaultFilterService","RoutedVaultFilterBridge","routedFilter","legacyFilter","bridgeService","collectionBreadcrumbs","isCollectionSelected","isUnassignedCollectionSelected","isMyVaultSelected","organizationIdParamType","cipherStatus","cipherTypeId","buildFilter","RoutedVaultFilterBridgeService","routedVaultFilterService","legacyVaultFilterService","activeFilter$","filter$","cipherTypeTree$","collectionTree","folderTree","organizationTree","cipherTypeTree","getTreeNodeObject","createLegacyFilterForAdminConsole","createLegacyFilterForEndUser","commands","createRoute","RoutedVaultFilterService","onDestroy","queryParamMap","unsafeType","NestingDelimiter","personalOwnershipPolicy","buildOrganizationTree","_organizationFilter","filteredFolders$","filterFolders","buildFolderTree","filteredCollections$","decryptedCollections$","filterCollections","buildCollectionTree","buildCipherTypeTree","collapsedGroupingsState","collapsedFilterNodes$","getCollectionNodeFromTree","setCollapsedFilterNodes","collapsedFilterNodes","getCollapsedFilterNodes","getOrganizationFilter","clearOrganizationFilter","headNode","getOrganizationFilterHead","myVaultNode","getOrganizationFilterMyVault","orgNodes","orgCopy","myVault","hideOptions","storedCollections","getCollectionFilterHead","nodes","collectionCopy","nestedTraverse","storedFolders","orgCiphers","oc","getFolderFilterHead","folderCopy","onFilterSelect","toggleCollapse","onEdit","VaultFilterSectionComponent","injectors","section","headerNode","headerInfo","isOrganizationFilter","isAllVaultsSelected","isNodeSelected","collectionStatus","editInfo","addInfo","showAddLink","onAdd","optionsInfo","isCollapsed","createInjector","inject","sectionNode","OptionsInput","createFilterFunction","All","itemTypes","isRoutedVaultFilterItemType","VaultFilter","reverse","cipherPassesFilter","VaultFilterSharedModule","ViewCipherDialogResult","ViewComponent","cipherTypeString","getCipherViewTypeString","Edited","firstCipherCheck","CollectionBadgeModule","GroupBadgeModule","WebVaultPremiumUpgradePromptService","dialog","upgradeConfirmed","PremiumUpgrade","PasswordHistoryComponent","WebViewPasswordHistoryService","viewPasswordHistory","PurgeVaultComponent","getNestedCollectionTree","clonedCollections","cloneCollection","cloned","BroadcasterSubscriptionId","AppComponent","broadcasterService","processReloadService","idleTimer","isIdle","lang","runOutsideAngular","onmousemove","recordActivity","onmousedown","ontouchstart","onclick","onscroll","onkeypress","redirect","_showToast","updatedOrganization","logoutPromise","authenticationStatus","clearKeys","idleStateChanged","TwoFactorTimeoutComponent","unauthUiRefreshSwap","defaultComponent","refreshedComponent","altOptions","UnauthenticatedExtensionUIRefresh","VaultProfileService","profileCreatedDate","profile2FAEnabled","getProfileCreationDate","fetchAndCacheProfile","getProfileTwoFactorEnabled","twoFactorEnabled","isMoreThan7DaysAgo","inputDate","differenceInMS","AcceptFamilySponsorshipComponent","register","registerRoute","OrganizationSponsorshipRedeemRequest","FamiliesForEnterpriseSetupComponent","organizationPlansComponent","onOrganizationCreateSuccess","validationService","badToken","showNewOrganization","_selectedFamilyOrganizationId","_destroy","selectedFamilyOrganizationId","preValidateSponsorshipResponse","existingFamilyOrganizations$","planSponsorshipType","FamiliesForEnterprise","sponsoredOrganizationId","CreateOrganizationComponent","orgPlansComponent","EnterpriseAnnually","loginEmailService","successRoute","loginEmail$","onSuccessfulSubmit","HintComponent","emailFormControl","superSubmit","BaseLoginDecryptionOptionsComponentV1","rememberDevice","rememberDeviceForm","devicesService","passwordResetEnrollmentService","email$","setupRememberDeviceValueChanges","setRememberDeviceDefaultValue","hasAdminApproval","loadUntrustedDeviceData","loadNewUserData","rememberDeviceFromState","autoEnrollStatus$","autoEnrollStatus","NewUser","userEmail","showApproveFromOtherDeviceBtn","hasLoginApprovingDevice","showReqAdminApprovalBtn","showApproveWithMasterPasswordBtn","ExistingUserUntrustedDevice","approveFromOtherDevice","setLoginEmail","requestAdminApproval","approveWithMasterPassword","createUser","initAccount","keysRequest","LoginDecryptionOptionsComponentV1","createUserAction","IFrameComponent","webVaultUrl","iframeId","errorCallback","infoCallback","parseFunction","parseMessage","connectorLink","sendMessage","iframe","contentWindow","base64Encode","fromCharCode","cleanup","removeEventListener","createParams","initComponent","addEventListener","validMessage","CaptchaIFrame","parsedMessage","height","width","siteKey","CaptchaProtectedComponent","captchaSiteKey","captchaToken","setupCaptcha","captcha","showCaptcha","handleCaptchaRequired","loggedEmail","formValidationErrorService","webAuthnLoginService","validatedEmail","paramEmailSet","originalMinimumPasswordLength","rememberEmail","twoFactorRoute","forcePasswordResetRoute","loadEmailSettings","queryParamsEmail","errorText","getErrorToastMessage","saveEmailSettings","handleMigrateEncryptionKey","requiresTwoFactor","onSuccessfulLoginTwoFactorNavigate","onSuccessfulLoginForceResetNavigate","clearValues","onSuccessfulLogin","onSuccessfulLoginNavigate","isStable","onStable","startAuthRequestLogin","clearValidators","launchSsoBrowser","ssoRedirectUri","passwordOptions","numbers","ssoCodeVerifier","codeVerifierHash","codeChallenge","webUrl","validateEmail","toggleValidateEmail","getLoginWithDevice","markAsUntouched","masterPasswordInput","reset","getRememberEmail","storedEmail","storedEmail$","setRememberEmail","requiresEncryptionKeyMigration","shift","errorTag","showLoginWithDevice","goToRegister","LoginComponentV1","showResetPasswordAutoEnrollWarning","submitForm","submitFormHelper","goAfterLogIn","initPasswordPolicies","strengthResult","masterPasswordScore","policiesData","fromPolicy","goToHint","anonymousHubService","showResendNotification","adminApprovalRoute","StateEnum","StandardAuthRequest","resendTimeout","authRequestPushNotification$","verifyAndHandleApprovedAuthReq","userAuthNStatus","paths","fragment","matrixParams","AdminAuthRequest","adminAuthReqStorable","getAdminAuthRequest","handleExistingAdminAuthRequest","adminAuthReqResponse","handleExistingAdminAuthReqDeletedOrDenied","derivedPublicKeyArrayBuffer","fingerprintPhrase","getFingerprintPhrase","handleApprovedAdminAuthRequest","authRequestKeyPair","clearAdminAuthRequest","buildAuthRequest","authRequestType","authRequestKeyPairArray","authRequest","reqResponse","AdminApproval","setAdminAuthRequest","AuthenticateAndUnlock","requestId","authReqResponse","loginAuthResult","loginViaAuthRequestStrategy","handlePostLoginNavigation","errorRoute","setKeysAfterDecryptingSharedMasterKeyAndHash","setUserKeyAfterDecryptingSharedUserKey","handleSuccessfulLoginNavigation","buildAuthRequestLoginCredentials","decryptPubKeyEncryptedMasterKeyAndHash","decryptPubKeyEncryptedUserKey","loginResponse","LoginViaAuthRequestComponentV1","BaseLoginViaWebAuthnComponent","loginSuccessHandlerService","authenticate","retry","authResult","CreatePasskeyFailedIcon","CreatePasskeyIcon","LoginViaWebAuthnComponent","Icons","AcceptOrganizationComponent","navigateInviteAcceptance","fromOrgInvite","DeleteRecoverRequest","RecoverDeleteComponent","recoverDeleteForm","TwoFactorRecoveryRequest","RecoverTwoFactorComponent","makePreloginKey","continuing","leaving","convert","RemovePasswordComponent","minimumLength","strongPassword","setupSubmitActions","newProtectedUserKey","performSubmitActions","masterPasswordRetype","passwordStrengthResult","weakPassword","leakedPassword","getStrengthResult","getPasswordScoreText","syncLoading","hint","resetPasswordAutoEnroll","ForceSetPasswordReason","orgSsoId","masterPasswordPolicyOptions","newKeyPair","existingUserPrivateKey","userPrivateKey$","existingUserPublicKey","userPublicKey$","existingUserPublicKeyB64","onSetPasswordSuccess","onSuccessfulChangePassword","confirmField","userDecryptionOpts","setUserDecryptionOptions","setKdfConfig","localMasterKeyHash","PasswordStrengthComponent","updatePasswordStrength","masterPasswordScoreColor","masterPasswordScoreText","showText","passwordScoreColor","scoreWidth","masterPasswordStrengthTimeout","setPasswordScoreText","SetPasswordComponent","DeauthorizeSessionsComponent","DeleteAccountDialogComponent","deleteForm","EmailTokenRequest","EmailRequest","ChangeEmailComponent","tokenSent","showTwoFactorEmailWarning","step1","newEmail","step1Value","getOrDeriveMasterKey","activateStep2","twoFactorProviders","AccountComponent","purgeVault","isAccountDeprovisioningEnabled$","userIsManagedByOrganization$","showChangeEmail$","showPurgeVault$","showDeleteAccount$","deauthorizeSessions","deauthModalRef","EmergencyAccessType","GranteeEmergencyAccess","EmergencyAccessConfirmDialogResult","EmergencyAccessConfirmComponent","organizationManagementPreferencesService","confirmForm","dontAskAgain","EmergencyAccessAddEditDialogResult","EmergencyAccessAddEditComponent","emergencyAccessType","addEditForm","waitTime","waitTimes","emergencyAccess","EmergencyAccessTakeoverResultType","EmergencyAccessTakeoverComponent","takeoverForm","Done","EmergencyAccessComponent","userNamePipe","emergencyAccessStatusType","isOrganizationOwner","trustedContacts","grantedContacts","contact","updateUser","autoConfirm","removeGrantee","removeGrantor","fileDownloadService","onUploadedAttachment","onDeletedAttachment","onReuploadedAttachment","reuploadPromises","fileEl","saveCipherAttachment","cipherDomain","downloading","canAccessAttachments","reuploadCipherAttachment","foundAttachment","a2","reupload","EmergencyAccessAttachmentsComponent","EmergencyAddEditCipherComponent","EmergencyViewDialogComponent","viewAttachments","EmergencyAccessViewComponent","attachmentsModalRef","PasswordRequest","ChangePasswordComponent","keyRotationService","checkForBreaches","characterMinimumMessage","rotateUserKeyClicked","masterPasswordHint","currentMasterPassword","newLocalKeyHash","updateKey","managePendingAuthRequest","DeviceManagementComponent","tableId","asyncActionLoading","columnConfig","headerClass","sortable","devices","displayName","getHumanReadableDeviceType","loginStatus","getLoginStatus","firstLogin","trusted","hasPendingAuthRequest","getDeviceIcon","defaultIcon","desktop","mobile","cli","extension","category","isCurrentDevice","platform","removeDevice","KdfRequest","ChangeKdfConfirmationComponent","makeKeyAndSaveAsync","validateKdfConfigForSetting","ChangeKdfComponent","kdfOptions","PBKDF2_ITERATIONS","ARGON2_ITERATIONS","ARGON2_MEMORY","ARGON2_PARALLELISM","setFormControlValues","updateKdfConfig","setFormValidators","setValidators","isPBKDF2","isArgon2","openConfirmationModal","SecurityKeysComponent","showChangeKdf","viewUserApiKey","scope","grantType","apiKeyTitle","apiKeyWarning","apiKeyDescription","rotateUserApiKey","isRotation","SecurityComponent","showChangePassword","redirectTo","SecurityRoutingModule","SsoComponentV1","identifierFormControl","orgDomainApiService","autoSubmit","getPrototypeOf","loggingIn","VerifiedSsoDomainEndpoint","handleGetClaimedDomainByEmailError","storedIdentifier","errorResponse","SubscriptionCadence","SubscriptionProduct","stepBack","TrialBillingStepComponent","subscriptionProduct","steppedBack","organizationCreated","annualCadence","Annual","monthlyCadence","productTypeToPlanTypeMap","EnterpriseMonthly","TeamsMonthly","applicablePlans","isApplicable","annualPlan","findPlanFor","monthlyPlan","touched","planDescription","getPlanDescription","getPriceFor","planResponse","organizationInfo","productType","hasCorrectProductType","notDisabledOrLegacy","VerticalStep","subLabel","applyBorder","addSubLabelSpacing","VerticalStepContentComponent","onSelectStep","selectStep","selectStepByIndex","VerticalStepperComponent","activeClass","isNextButtonHidden","steps","selectedIndex","isStepDisabled","completed","ConfirmationDetailsComponent","Product","handlePasswordSubmit","previousStep","createdOrganization","verticalStepChange","orgNameEntrySubmit","CompleteTrialInitiationComponent","registrationFinishService","stepperProductTypes","useTrialStepper","submitting","validProducts","orgInfoSubLabel","orgLabel","billingSubLabel","orgInfoFormGroup","trialPaymentOptional$","TrialPaymentOptional","fromEmail","productTierParam","productTierValue","showPasswordManagerStepper","showSecretsManagerStepper","planTypeDisplay","setupFamilySponsorship","planInfoLabel","previouslySelectedIndex","createOrganizationOnTrial","conditionallyCreateOrganization","verticalStepper","trialInitiationPath","getPlanType","previous","isSecretsManagerFree","trialOrganizationType","finishRegistration","freeTrialTextResolver","onlyPasswordManager","onlySecretsManager","ReferenceEventRequest","RegisterRequest","referenceData","captchaResponse","RegisterComponent","createdAccount","showTerms","showErrorSummary","confirmMasterPassword","validateInputsDoesntMatch","acceptPolicies","acceptPoliciesValidation","validator","validateFormInputsMatch","accountCreated","registerResponse","registerAccount","successful","captchaRequired","validateRegistration","passwordWeak","passwordLeak","modifyRegisterRequest","RegisterFormComponent","referenceDataValue","queryParamEmail","EnvironmentSelectorComponent","showRegionSelector","currentRegion","LogoBadgesComponent","EnterpriseContentComponent","LogoForbesComponent","LogoUSNewsComponent","TeamsContentComponent","LogoCompanyTestimonialComponent","DefaultContentComponent","Enterprise1ContentComponent","Enterprise2ContentComponent","Teams1ContentComponent","Teams2ContentComponent","Teams3ContentComponent","LogoCnetComponent","CnetEnterpriseContentComponent","CnetIndividualContentComponent","CnetTeamsContentComponent","AbmEnterpriseContentComponent","AbmTeamsContentComponent","SecretsManagerTrialComponent","queryParameters","organizationTypeQueryParameter","freeOrganization","stepSelectionChange","navigateToOrgVault","navigateToOrgInvite","ValidOrgParams","ValidLayoutParams","TrialInitiationComponent","referenceDataId","referenceId","pop","regex","session","titleCasePipe","layout","accountCreateOnly","trialFlowOrgs","teams","teamsStarter","enterprise","families","routeFlowOrgs","individual","layouts","enableTrialPayment$","orgDisplayName","billingSuccess","freeTrialText","translationKey","TwoFactorAuthAuthenticatorComponent","TwoFactorAuthEmailComponent","twoFactorEmail","tokenValue","providerData","getProviders","doToast","getMasterPasswordHash","ssoEmail2FaSessionToken","getSsoEmail2FaSessionToken","authRequestAccessCode","getAccessCode","authRequestId","getAuthRequestId","WebAuthnIFrame","webAuthnNewTab","btnText","allow","authWebAuthn","TwoFactorAuthWebAuthnComponent","webAuthnReady","webAuthnSupported","webAuthn","Browser","cleanupWebAuthn","TwoFactorAuthYubikeyComponent","duoFramelessUrl","duoResultListenerInitialized","setupDuoResultListener","AuthUrl","launchDuoFrameless","TwoFactorOptionsDialogResult","choose","TwoFactorOptionsComponent","onProviderSelected","onRecoverSelected","areIconsDisabled","getSupportedProviders","recover","Recover","launchDuo","remember","selectedProviderType","actionButtonText","loginRoute","trustedDeviceEncRoute","changePasswordRoute","authing","needsLock","getDefaultProvider","updateUIToProviderData","logInTwoFactor","handleLoginResponse","selectOtherTwofactorMethod","duoComponent","isForcePasswordResetRequired","handleForcePasswordReset","isTrustedDeviceEncEnabled","handleTrustedDeviceEncryptionEnabled","handleChangePasswordRequired","handleSuccessfulLogin","onSuccessfulLoginTde","navigateViaCallbackOrRoute","onSuccessfulLoginTdeNavigate","WeakMasterPassword","currentAuthType$","authType","Sso","UserApiKey","TwoFactorAuthDuoComponent","handleDuoResultMessage","duoResultChannel","BroadcastChannel","TwoFactorAuthComponent","isDuoProvider","twoFactorTimeoutRoute","twoFactorTimeout$","expired","TwoFactorComponent","anotherMethod","UpdatePasswordComponent","UpdateTdeOffboardingPasswordRequest","UpdateTempPasswordRequest","requireCurrentPassword","masterPasswordWarningText","TdeOffboarding","newPasswordHash","updateTempPassword","updatePassword","updateTdeOffboardingPassword","UpdateTempPasswordComponent","VerifyEmailRequest","VerifyEmailTokenComponent","VerifyDeleteRecoverRequest","VerifyRecoverDeleteComponent","InputStripSpacesDirective","ngControl","onInput","resendEmail","SponsoringOrgRowComponent","sponsoringOrg","isSelfHosted","sponsorshipRemoved","statusMessage","statusClass","setStatus","familySponsorshipToDelete","familySponsorshipValidUntil","familySponsorshipLastSyncDate","isFreeFamilyPolicyEnabled$","revokeSponsorship","doRevokeSponsorship","familySponsorshipFriendlyName","toDelete","validUntil","forceReload","SponsoredFamiliesComponent","sponsorshipForm","selectedSponsorshipOrgId","sponsoredEmail","sponsorshipEmail","friendlyName","resetForm","asyncValidators","notAllowedValueAsync","preventAccessToFreeFamiliesPage","availableSponsorshipOrgs$","isPolicyEnabled","anyOrgsAvailable$","activeSponsorshipOrgs$","anyActiveSponsorships$","sponsorshipEmailControl","setErrors","valueGetter","caseInsensitive","notAllowedValue","controlValue","FrontendLayoutComponent","LoginModule","SecretsManagerTrialFreeStepperComponent","subLabels","referenceEventRequest","navigateToMembers","navigateToSecretsManager","SecretsManagerTrialPaidStepperComponent","createOrganizationLoading","createAccountLabel","ReviewBlurbComponent","SecretsManagerContentComponent","headline","paidPrimaryPoints","paidCalloutHeadline","paidCallouts","freePrimaryPoints","freeCalloutHeadline","freeCallouts","primaryPoints","calloutHeadline","callouts","VerticalStepperModule","TrialInitiationModule","SendAccessView","SendAccess","buildDomainModel","decryptObj","SendAccessRequest","ExpiredSendIcon","NoSendsIcon","SendFormService","SendFormContainer","SendOptionsComponent","hasPassword","originalSendView","shouldShowCount","sendOptionsForm","viewsLeft","sendFormContainer","generatorService","passwordRemoved","generatedCredential","generate$","registerChildForm","patchSend","areSendsAllowed","onFileSelected","SendFileDetailsComponent","sendFileDetailsForm","FileSendType","SendTextDetailsComponent","sendTextDetailsForm","DatePreset","SendDetailsComponent","TextSendType","sendLink","customDeletionDateOption","datePresetOptions","sendDetailsForm","selectedDeletionDatePreset","SevenDays","formattedDeletionDate","setupDeletionDatePresets","urlB64Key","defaultSelections","OneHour","OneDay","TwoDays","ThreeDays","FourteenDays","ThirtyDays","selectedValue","milliseconds","SendFormComponent","submitBtn","bitSubmit","destroyRef","disabled$","sendForm","setControl","updateFn","updatedSendView","_firstInitialized","originalSend","addEditFormService","decryptSend","sendType","onSendCreated","onSendUpdated","sendView","saveSend","DefaultSendFormService","SendFormModule","DefaultSendFormConfigService","areSendsEnabled$","buildConfig","NewSendDropdownComponent","hideIcon","hasNoPremium","buildRouterLink","buildQueryParams","isNew","copySendLink","SendListItemsContainerComponent","link","INITIAL_FILTERS","SendListFiltersService","filterForm","filters$","filterFunction$","sendTypes","resetFilterForm","convertToChipSelectOption","SendItemsService","sendListFiltersService","_searchText$","_sendsLoading$","latestSearchText$","_sendList$","filteredAndSortedSends$","filterFunction","hasFilterApplied$","emptyList$","noFilteredResults$","applyFilter","newSearchText","SendSearchComponent","sendListItemService","searchText$","subscribeToLatestSearchText","subscribeToApplyFilter","viewOption","selectOption","ChipSelectComponent","focusVisibleWithin","menuWidth","childParentMap","_options","initializeRootTree","onFocusIn","onFocusOut","fullWidth","placeholderText","placeholderIcon","setOrResetRenderedOptions","renderedOptions","getParent","rootTree","handleMenuClosed","option","_event","stopImmediatePropagation","findOption","tree","markParents","root","menuItems","menu","keyManager","setFirstItemActive","setMenuWidth","chipWidth","chipSelectButton","getBoundingClientRect","firstMenuItemWidth","notifyOnTouched","onBlur","SendListFiltersComponent","SendAccessFileComponent","decKey","downloadData","accessRequest","SendAccessPasswordComponent","setPasswordEvent","toggleText","SendAccessTextComponent","_send","sendText","maskedText","copyText","AccessComponent","layoutWrapperDataService","passwordRequired","expiredSendIcon","keyArray","fromUrlB64ToArray","passwordHash","sendAccess","makeSendKey","setAnonLayoutWrapperData","pageSubtitle","VaultFilterModule","OssModule","RequestSMAccessRequest","SmLandingApiService","requestSMAccessFromAdmins","RequestSMAccessComponent","smLandingApiService","requestAccessForm","requestAccessEmailContents","selectedOrganization","OrganizationId","EmailContent","navigateToCreateOrganizationPage","SMLandingComponent","learnMoreUrl","imageSrc","showSecretsManagerInformation","showGiveMembersAccessInstructions","enabledOrganizations","handleEnabledOrganizations","tryItNowUrl","adminPlusNeedsInstructionsToEnableSM","ownerNeedsToEnableSM","showHowToEnableSMForMembers","UpdateDomainsRequest","toggleExcluded","customize","DomainRulesComponent","custom","customDomain","customDomainValues","excludedGlobalEquivalentDomains","excluded","d2","patch","patchValues","globalDomain","indexTrackBy","PreferencesComponent","VaultTimeoutAction","enableFavicons","activeAcct","setShowFavicons","setSelectedTheme","startingLocale","vaultTimeoutOptions","OnRestart","localeOptions","themeOptions","vaultTimeoutPolicyCallout","hours","initialFormValues","showFavicons$","generate","IDENTIFIER","FORWARDER","NONE_SELECTED","CredentialGeneratorComponent","generatorHistoryService","zone","onGenerated","root$","nav","rootOptions$","usernameOptions$","forwarderOptions$","forwarderId$","showForwarder$","algorithm$","showAlgorithm$","showForwarder","credentialTypeCopyLabel$","credentialTypeGenerateLabel$","credentialTypeLabel$","credentialTypeHint$","category$","value$","destroyed","onRootChanged","acct","algorithms$","usernames","usernameOptions","toOptions","forwarderOptions","typeToGenerator$","withLatestFrom","generated","track","generationDate","activeRoot$","activeIdentifier$","activeForwarder$","prev","forwarderId","preferences","singleUserId$","preference","setPreference","forwarderPref","usernamePref","forwarderNav","userNav","rootNav","onlyOnRequest","on$","configuration","requestor","openHistoryDialog","H","passTypeOptions","_passTypeOptions","usernameGenerationService","comingFromAddEdit","onSelected","website","avoidAmbiguous","usernameWebsite","isInitialized$","_passwordOptionsMinLengthForReader","passwordOptionsMinLengthForReader$","_password","usernameTypeOptions","desc","subaddressOptions","catchallOptions","forwardOptions","validForSelfHosted","addHistory","cascadeOptions","navigationType","accountEmail","overrideType","policyValue","_value","_policyValue","getOptions$","passwordPolicy","regenerateWithoutButtonPress","regenerate","skipWhile","initialized","websiteOption","typeChanged","savePasswordOptions","regeneratePassword","regenerateUsername","sliderChanged","onPasswordOptionsMinNumberInput","setPasswordOptionsNumber","onPasswordOptionsMinSpecialInput","setPasswordOptionsSpecial","sliderInput","normalizePasswordOptions","restoreType","saveOptions","saveUsernameOptions","usernameGeneratingPromise","toggleOptions","enforcePasswordGeneratorPoliciesOnOptions","history","getHistory","CopyTextDirective","onCopy","Desktop","PasswordGeneratorHistoryComponent","lengthChanged","minNumberChanged","minSpecialChanged","GeneratorComponent","SendAccessExplainerComponent","filteredSends","_filteredSends","disableSend","refreshing","searchPending","hasSearched","mergeMap","onSuccessfulLoad","selectAll","searchTimeout","applyTextSearch","onSuccessfulRemovePassword","onSuccessfulDelete","clearSelections","selectedAll","selectType","selectedType","onSavedSend","onDeletedSend","deletionDatePresets","expirationDatePresets","copyLink","alertShown","textHidden","fileContents","defaultExpirationDateTime","defaultDeletionDateTime","selectedExpirationDatePreset","sendLinkBaseUrl","isDateTimeLocalSupported","datePreset","hasPremiumFromAnySource","decryptedSend","updateFormValues","encryptSend","encSend","uploadPromise","handleCopyLinkToClipboard","copyLinkToClipboard","loadSend","formattedExpirationDate","togglePasswordVisible","copySuccess","clearExpiration","submitAndClose","deleteAndClose","editSend","addSend","SendComponent","noItemIcon","closeAll","BulkDialogsModule","AttachmentsComponent","BulkMoveDialogResult","BulkMoveDialogComponent","nullValidator","Moved","onSavedFolder","onDeletedFolder","FolderAddEditDialogResult","FolderAddEditComponent","accountSerivce","openFolderAddEditDialog","VerifyEmailComponent","onVerified","onDismiss","verifyEmail","VisibleVaultBanner","PREMIUM_BANNER_REPROMPT_KEY","bannerReprompt","BANNERS_DISMISSED_DISK_KEY","bannersDismissed","VaultBannersService","shouldShowPremiumBanner$","premiumBannerState","premiumSources$","dismissedState","shouldShowPremiumBanner","nextPromptDate","shouldShowUpdateBrowserBanner","outdatedBrowser","alreadyDismissed","getBannerDismissedState","OutdatedBrowser","shouldShowVerifyEmailBanner","VerifyEmail","shouldShowLowKDFBanner","hasLowKDF","isLowKdfIteration","KDFSettings","dismissBanner","banner","Premium","dismissPremiumBanner","sessionBannerState","numberOfDismissals","setHours","setMonth","nextYear","VaultBannersComponent","vaultBannerService","visibleBanners","organizationsPaymentStatus","premiumBannerVisible$","determineVisibleBanners","showBrowserOutdated","showVerifyEmail","showLowKdf","freeTrialMessage","trackBy","editCollection","addCollection","addCipher","addFolder","VaultHeaderComponent","onAddCipher","onAddCollection","onAddFolder","onEditCollection","onDeleteCollection","activeOrganizationId","activeOrganization","showBreadcrumbs","treeNode","tab","VaultOnboardingMessages","OnboardingModule","VaultOnboardingService","VAULT_ONBOARDING_KEY","jsonData","vaultOnboardingState","vaultOnboardingState$","setVaultOnboardingTasks","OnboardingTaskComponent","handleClick","OnboardingComponent","dismiss","visible","amountCompleted","tasks","task","barWidth","hideOnboarding","emitToAddCipher","navigateToExtension","VaultOnboardingComponent","vaultOnboardingService","onboardingReleaseDate","showOnboarding","onboardingTasks$","setOnboardingTasks","setInstallExtLink","individualVaultPolicyCheck","checkForBrowserExtension","currentTasks","updatedTasks","importData","installExtension","getMessages","checkCreationDate","profileCreationDate","isNewAccount","saveCompletedTasks","freshStart","vaultTasks","isIndividualPolicyVault","extensionUrl","VaultComponent","routedVaultFilterBridgeService","searchPipe","cipherFormConfigService","trashCleanupWarning","processingEvent","canCreateCollections","refresh$","hasSubscription$","unpaidSubscriptionDialog$","organizationMetaData","organizationsPaymentStatus$","ownerOrgs","firstSetup$","getCipherIdFromParams","cloneCipher","viewCipher","editCipher","allCollections$","nestedCollections$","currentSearchText$","collections$","collectionsToReturn","selectedCollection","getTreeNodeObjectFromList","selectedCollection$","vaultItemDialogRef","viewCipherById","editCipherId","onVaultItemsEvent","editCipherAttachments","handleDeleteEvent","bulkMove","bulkAssignToCollections","filterComponent","filterSearchText","go","canEditAttachments","madeAttachmentChanges","onClosed","openVaultItemDialog","V","addCipherV2","selectedColId","cipherFormConfig","organizationIdFromCollection","editCipherIdV2","onClosedPromise","showMissingPermissionsError","availableCollections","selectedCipherIds","deleteCipherWithServer","canDeleteCiphers","protectedFields","favorites","VaultRoutingModule","VaultModule","EmailVerification","loadComponent","MigrateFromLegacyEncryptionComponent","pageIcon","pageTitle","outlet","showReadonlyHostname","titleAreaMaxWidth","TwoFactorComponentRefactor","twofactorRefactorSwap","AcceptEmergencyComponent","maxWidth","newDeviceVerificationNoticeService","vaultProfileService","tempNoticeFlag","NewDeviceVerificationTemporaryDismiss","permNoticeFlag","NewDeviceVerificationPermanentDismiss","currentAcct$","currentAcct","has2FAEnabled","hasATwoFactorProviderEnabled","requiresSSO","isSSORequired","isProfileLessThanWeekOld","profileIsLessThanWeekOld","userItems$","noticeState$","userItems","last_dismissal","permanent_dismissal","loadChildren","IndividualBillingModule","ImportWebComponent","ExportWebComponent","GeneratorToolsModernization","generatorSwap","OrganizationModule","OssRoutingModule","forRoot","useHash","paramsInheritanceStrategy","WildcardRoutingModule","AppModule","bootstrapModule","preserveWhitespaces","OrganizationUserApiService","OrganizationUserBulkRequest","OrganizationUserResponse","OrganizationUserUserDetailsResponse","OrganizationUserDetailsResponse","OrganizationUserResetPasswordDetailsResponse","OrganizationUserBulkResponse","OrganizationUserBulkPublicKeyResponse","OrganizationUserUserMiniResponse","DefaultOrganizationUserApiService","getOrganizationUserGroups","getAllUsers","includeCollections","getManyOrganizationUserAccountRecoveryDetails","postOrganizationUserReinvite","postManyOrganizationUserReinvite","postOrganizationUserConfirm","postOrganizationUsersPublicKey","postOrganizationUserBulkConfirm","putOrganizationUserBulkEnableSecretsManager","removeOrganizationUser","removeManyOrganizationUsers","revokeOrganizationUser","revokeManyOrganizationUsers","restoreOrganizationUser","restoreManyOrganizationUsers","deleteOrganizationUser","deleteManyOrganizationUsers","OrganizationUserAcceptInitRequest","OrganizationUserAcceptRequest","OrganizationUserBulkConfirmRequest","OrganizationUserConfirmRequest","OrganizationUserInviteRequest","OrganizationUserResetPasswordRequest","OrganizationUserResetPasswordEnrollmentRequest","OrganizationUserResetPasswordWithIdRequest","OrganizationUserUpdateRequest","CollectionAdminService","CollectionService","BulkCollectionAccessRequest","CollectionAccessSelectionView","CollectionView","CollectionResponse","CollectionDetailsResponse","CollectionAccessDetailsResponse","canEditItems","CollectionAdminView","canEditAnyCollection","canDeleteAnyCollection","canEditUserAccess","manageUsers","canEditGroupAccess","manageGroups","isUnassignedCollection","CollectionData","CollectionRequest","CollectionWithIdRequest","DefaultCollectionAdminService","collectionResponse","decryptMany","bulkAssignAccess","anyResponse","isCollectionAccessDetailsResponse","ENCRYPTED_COLLECTION_DATA_KEY","DECRYPTED_COLLECTION_DATA_KEY","DefaultCollectionService","decryptedCollectionViews$","encryptedCollectionDataState","encryptedCollections$","encryptedCollectionsWithKeys","collectionData","decryptedCollectionDataState","decCollections","activeUserOrgKeys$","cs","getAllNested","getNested","toUpdate","SsoComponent","checkState","ssoOrganizationIdentifier","getOrgIdentifierFromState","includeUserIdentifier","initiateSsoFormPromise","authorizeUrl","buildAuthorizeUrl","userIdentifier","handleTwoFactorRequired","handleLoginError","isTdeOffboarding","onSuccessfulLoginChangePasswordNavigate","stateSplit","checkStateSplit","EmailIcon","RecoveryCodeIcon","TOTPIcon","WebAuthnIcon","TwoFactorIconComponent","authGuard","promptBiometric","lockGuard","activatedRouteSnapshot","routerStateSnapshot","activeUser","isLegacyUser","tdeEnabled","everHadUserKey$","defaultRoutes","loggedIn","loggedOut","locked","notDecrypted","redirectGuard","tdeDecryptionRequiredGuard","unauthGuardFn","unauthGuard","InputsFieldMatch","matchTo","inputsMatchError","validateInputsMatch","inputsDoesntMatchError","fieldMatchTo","fieldCtrl","fieldMatchToCtrl","compareInputs","validationGoal","controlNameA","controlNameB","showErrorOn","controlA","controlB","controlThatShowsError","controlValuesMatch","fail","inputMatchError","errorsObj","isEmptyObj","AddAccountCreditDialogResultType","AddAccountCreditDialogComponent","getBitPayInvoiceRequest","payPalForm","payPalCustomField","customField","runExport","InvoicesComponent","getClientInvoiceReport","getClientInvoiceReportName","expandInvoiceStatus","dueDate","getInvoices","partnerTrustIcon","NoInvoicesComponent","ManageTaxInformationComponent","taxInformationUpdated","countries","getTaxInformation","dirty","DeprecatedCalloutComponent","useAlertRole","calloutStyle","enforcedPolicyMessage","getPasswordScoreAlertDisplay","A11yTitleDirective","appA11yTitle","setAttributes","originalTitle","getAttribute","originalAriaLabel","ApiActionDirective","appApiAction","CopyClickDirective","toastVariant","valueToCopy","valueLabel","InputVerbatimDirective","appInputVerbatim","condition","disableComplete","hasAttribute","StopClickDirective","StopPropDirective","variants","bgColor","ToastComponent","progressWidth","iconClass","messageArray","BitwardenToastrComponent","ToastModule","ngModule","default","BitwardenToastrGlobalConfig","toastComponent","tapToDismiss","timeOut","extendedTimeOut","maxOpened","autoDismiss","progressBar","FingerprintPipe","JslibModule","closeButton","numberFormats","Visa","cardLength","blocks","Mastercard","Maestro","Discover","JCB","UnionPay","Amex","Other","CreditCardNumberPipe","creditCardNumber","rules","matchingRule","chunks","PluralizePipe","SearchPipe","prop1","prop2","prop3","propValue","UserNamePipe","FormValidationErrorsService","canAccessFeature","featureFlag","requiredFlagValue","redirectUrlOnDisabled","I18nPipe","AbstractThemingService","safeProvider","SafeInjectionToken","WINDOW","OBSERVABLE_MEMORY_STORAGE","OBSERVABLE_DISK_STORAGE","OBSERVABLE_DISK_LOCAL_STORAGE","MEMORY_STORAGE","SECURE_STORAGE","STATE_FACTORY","LOGOUT_CALLBACK","LOCKED_CALLBACK","SUPPORTS_SECURE_STORAGE","LOCALES_DIRECTORY","SYSTEM_LANGUAGE","LOG_MAC_FAILURES","SYSTEM_THEME_OBSERVABLE","DEFAULT_VAULT_TIMEOUT","INTRAPROCESS_MESSAGING_SUBJECT","CLIENT_TYPE","REFRESH_ACCESS_TOKEN_ERROR_CALLBACK","ENV_ADDITIONAL_REGIONS","ModalRef","_onCreated","_onClose","_onClosed","_onShow","_onShown","onShow","onShown","lastResult","created","toPromise","DynamicModalComponent","cd","focusTrapFactory","loadChildComponent","childComponentType","setComponentParameters","componentRef","focusTrap","focusFirstTabbableElementWhenReady","componentType","modalContentRef","destroy","getFocus","autoFocusEl","ModalInjector","_parentInjector","_additionalTokens","notFoundValue","modalList","modalCount","topModal","viewContainerRef","modalComponentRef","openInternal","hostView","createModalComponent","backdrop","modalEl","dialogEl","zIndex","prepend","closeElement","WeakMap","PasswordStrengthV2Component","passwordStrengthScore","passwordScoreTextWithColor","passwordStrengthTimeout","passwordScore","componentRouteSwap","altComponent","shouldSwapFn","defaultRoute","selectedAltOptions","canMatch","FallbackSrcDirective","tryFallback","onError","appFallbackSrc","IconComponent","iconsUrl","showFavicon","iconsServerUrl","image","fallbackImage","cardIcons","RuPay","hostnameUri","isWebsite","imageEnabled","buildCipherIcon","BitwardenLogo","BitwardenShield","DevicesIcon","LockIcon","UserLockIcon","UserVerificationBiometricsIcon","WaveIcon","VaultIcon","RegistrationUserAddIcon","RegistrationLockAltIcon","SsoKeyIcon","TwoFactorTimeoutIcon","RegistrationCheckEmailIcon","RegistrationExpiredLinkIcon","AnonLayoutComponent","hideLogo","hideFooter","hideYearAndVersion","currentValue","AnonLayoutWrapperDataService","AnonLayoutWrapperComponent","anonLayoutWrapperDataService","setAnonLayoutWrapperDataFromRouteData","listenForPageDataChanges","listenForServiceDataChanges","resetPageData","firstChildRouteData","handleStringOrTranslation","anonLayoutWrapperData$","DefaultAnonLayoutWrapperDataService","anonLayoutWrapperDataSubject","FingerprintDialogComponent","LoginComponentService","backButtonClicked","LoginUiState","LoginComponent","loginComponentService","enforcedMasterPasswordOptions","isKnownDevice","loginUiState","EMAIL_ENTRY","deferFocus","MASTER_PASSWORD_ENTRY","handleAuthResult","handleSubmitError","handlePopState","toggleLoginUiState","continue","listenForUnauthUiRefreshFlagChanges","defaultOnInit","desktopOnInit","uniqueQueryParams","BadRequest","evaluatePassword","launchSsoBrowserWindow","requirePasswordChange","onlySelf","showBackButton","masterPasswordInputRef","onEmailInput","emailInput","isLoginWithPasskeySupported","continuePressed","pushState","focusInput","paramEmailIsSet","qParamsEmail","windowIsFocused","shouldShowBackButton","back","handleSsoClick","LoginSecondaryContentComponent","serverSettingsService","isUserRegistrationDisabled$","DefaultLoginComponentService","LoginDecryptionOptionsService","LoginDecryptionOptionsComponent","rememberDeviceControl","loginDecryptionOptionsService","canApproveFromOtherDevice","canRequestAdminApproval","canApproveWithMasterPassword","newUserOrgId","handleCreateUserSuccessNavigation","observeAndPersistRememberDeviceValueChanges","setRememberDeviceDefaultValueFromState","loadExistingUserUntrustedDeviceData","handleMissingEmail","DefaultLoginDecryptionOptionsService","Flow","startStandardAuthRequestLogin","matchOptions","LoginViaAuthRequestComponent","authRequestApiService","showResendNotificationTimeoutSeconds","backToRoute","initAdminAuthRequestFlow","initStandardAuthRequestFlow","startAdminAuthRequestLogin","authRequestResponse","adminAuthRequestStorable","adminAuthRequestResponse","decryptViaApprovedAuthRequest","handleAuthenticatedFlows","handleUnauthenticatedFlows","authRequestLoginCredentials","PasswordHintComponent","validateEmailOrShowToast","RegisterSendVerificationEmailRequest","receiveMarketingEmails","SelfHostedEnvConfigDialogComponent","disableClose","notificationsUrl","atLeastOneUrlIsRequired","showCustomEnv","onSelectClosed","RegistrationEnvSelectorComponent","selectedRegion","selectedRegionChange","ServerEnvironmentType","availableRegionConfigs","hideEnvSelector","isDesktopOrBrowserExtension","initSelectedRegionAndListenForEnvChanges","listenForSelectedRegionChanges","availableRegionConfig","selectedRegionFromEnv","pairwise","prevSelectedRegion","handleSelfHostedEnvConfigDialogResult","RegistrationStartState","handleSelectedRegionChange","goBack","DEFAULT_MARKETING_EMAILS_PREF_BY_REGION","RegistrationStartComponent","registrationStartStateChange","USER_DATA_ENTRY","emailReadonly","validateForm","sanitizedName","CHECK_EMAIL","listenForQueryParamChanges","setReceiveMarketingEmailsByRegion","regionKey","RegisterVerificationEmailClickedRequest","RegistrationFinishService","handlePasswordFormSubmit","RegistrationFinishComponent","handleQueryParams","initEmailVerificationFlow","initOrgInviteFlowIfPresent","initRegistrationWithEmailVerificationDisabledFlow","authenticationResult","setDefaultPageTitleAndSubtitle","handleRegisterVerificationEmailClickedError","RegistrationLinkExpiredComponent","routeData","RegistrationStartSecondaryComponent","RegisterFinishRequest","userSymmetricKey","DefaultRegistrationFinishService","userAsymmetricKeysRequest","registerFinishRequest","SetPasswordJitService","SetPasswordJitComponent","setPasswordJitService","DefaultSetPasswordJitService","protectedUserKey","makeProtectedUserKey","makeKeyPairAndRequest","updateAccountDecryptionProperties","handleResetPasswordAutoEnroll","UserVerificationDialogComponent","verificationForm","dialogOptions","ActiveClientVerificationOption","activeClientVerificationOption","noAvailableClientVerificationMethods","Pin","dialogResult","handleActiveClientVerificationOptionChange","handleBiometricsVerificationResultChange","biometricsVerificationResult","SsoComponentService","ssoComponentService","submitSso","isValidSsoClientType","hasCodeOrStateParams","handleCodeAndStateParams","hasRequiredSsoParams","initializeIdentifierFromEmailOrStorage","setRequiredSsoVariables","closeWindow","DefaultSsoComponentService","RequestTimeUpdate","LoginApprovalComponent","loginApprovalComponentService","denyLogin","retrieveAuthRequestAndRespond","approveLogin","updateTimeText","showLoginRequestedAlertIfWindowNotVisible","approveOrDenyAuthRequest","showResultToast","diffInMinutes","requestTimeText","DefaultLoginApprovalComponentService","InputPasswordComponent","onPasswordFormSubmit","btnBlock","minHintLength","maxHintLength","minPasswordLength","minPasswordMsg","confirmedPassword","minPasswordLengthMsg","getPasswordStrengthScore","passwordIsBreached","PasswordCalloutComponent","verifyUserViaBiometrics","UserVerificationFormInputComponent","_activeClientVerificationOptionSubject","hasMultipleClientVerificationOptions","optionsCount","userVerificationOptions","getInvalidSecretErrorMessage","activeClientVerificationOptionChange","biometricsVerificationResultChange","activeClientVerificationOption$","biometricsVerificationFailed","sentInitialCode","setDefaultActiveClientVerificationOption","setupClientVerificationOptionChangeHandler","processSecretChanges","biometricsResult","determineVerificationWithSecretType","VaultTimeoutInputComponent","showCustom","CUSTOM_VALUE","exceedsMinimumTimeout","customTimeInMinutes","MIN_CUSTOM_MINUTES","exceedsMaximumTimeout","vaultTimeoutPolicyMinutes","vaultTimeoutPolicyHours","filteredVaultTimeoutOptions","vaultTimeoutPolicy","applyVaultTimeoutPolicy","getVaultTimeout","canLockVault$","onTouched","policyError","minTimeoutError","registerOnValidatorChange","validatorChange","vaultTimeoutOption","AuthRequestApiService","LoginEmailServiceAbstraction","LoginStrategyServiceAbstraction","UserDecryptionOptionsServiceAbstraction","InternalUserDecryptionOptionsServiceAbstraction","PinServiceAbstraction","AuthRequestServiceAbstraction","LoginApprovalComponentServiceAbstraction","LoginSuccessHandlerService","RotateableKeySet","PasswordLoginCredentials","twoFactor","SsoLoginCredentials","redirectUrl","AuthRequestLoginCredentials","decryptedUserKey","decryptedMasterKey","decryptedMasterKeyHash","WebAuthnLoginCredentials","KeyConnectorUserDecryptionOption","TrustedDeviceUserDecryptionOption","UserDecryptionOptions","responseOptions","usingKeyConnector","PIN_KEY_ENCRYPTED_USER_KEY_EPHEMERAL","PinService","getPinKeyEncryptedUserKeyPersistent","validateUserId","setPinKeyEncryptedUserKeyPersistent","clearPinKeyEncryptedUserKeyPersistent","getPinKeyEncryptedUserKeyEphemeral","setPinKeyEncryptedUserKeyEphemeral","clearPinKeyEncryptedUserKeyEphemeral","createPinKeyEncryptedUserKey","pinKey","makePinKey","storePinKeyEncryptedUserKey","storeAsEphemeral","getUserKeyEncryptedPin","setUserKeyEncryptedPin","userKeyEncryptedPin","clearUserKeyEncryptedPin","createUserKeyEncryptedPin","getOldPinKeyEncryptedMasterKey","clearOldPinKeyEncryptedMasterKey","getPinLockType","aUserKeyEncryptedPinIsSet","aPinKeyEncryptedUserKeyPersistentIsSet","anOldPinKeyEncryptedMasterKeyIsSet","pinLockType","pinKeyEncryptedUserKeyEphemeral","requireMasterPasswordOnClientRestart","oldPinKeyEncryptedMasterKey","getPinKeyEncryptedKeys","decryptAndMigrateOldPinKeyEncryptedMasterKey","decryptUserKey","validatePin","decryptMasterKeyWithPin","encUserKey","oldPinKeyEncryptedMasterKeyString","decryptedPin","LOGIN_EMAIL","LoginEmailService","loginEmailState","storedEmailState","addingAccount$","addingAccount","PreloginRequest","PasswordTokenRequest","AuthResult","requiresCaptcha","LoginStrategy","KdfConfigService","setTwoFactor","startLogIn","clearSelectedProvider","processTwoFactorResponse","processCaptchaResponse","processTokenResponse","buildDeviceRequest","buildTwoFactor","userProvidedTwoFactor","storedTwoFactorToken","Remember","saveAccountInformation","accountInformation","verifyAccountAdded","encryptionKeyMigrationRequired","createKeyPairForOldAccount","twoFactorProviders2","setProviders","ssoEmail2faSessionToken","userEnteredEmail","expectedUserId","AuthRequestLoginStrategyData","authRequestCredentials","AuthRequestLoginStrategy","sharedDeps","accessCode$","authRequestId$","setAuthRequestAccessCode","trySetUserKeyWithMasterKey","exportCache","PasswordLoginStrategyData","forcePasswordResetReason","PasswordLoginStrategy","serverMasterKeyHash$","localMasterKeyHash$","serverMasterKeyHash","identityResponse","getMasterPasswordPolicyOptionsFromResponse","SsoTokenRequest","code_verifier","redirect_uri","SsoLoginStrategyData","SsoLoginStrategy","orgId$","ssoEmail2FaSessionToken$","ssoAuthResult","shouldSetMasterKeyFromKeyConnector","trySetUserKeyWithApprovedAdminRequestIfExists","trySetUserKeyWithDeviceKey","encDevicePrivateKey","UserApiLoginStrategyData","UserApiLoginStrategy","apiUseKeyConnector","userApiKey","WebAuthnLoginTokenRequest","WebAuthnLoginStrategyData","WebAuthnLoginStrategy","idTokenResponse","webAuthnPrfOption","CURRENT_LOGIN_STRATEGY_KEY","CACHE_EXPIRATION_KEY","AUTH_REQUEST_PUSH_NOTIFICATION_KEY","CACHE_KEY","sessionTimeoutLength","LoginStrategyService","twoFactorTimeoutSubject","currentAuthnTypeState","loginStrategyCacheState","loginStrategyCacheExpirationState","authRequestPushNotificationState","loginStrategySessionTimeout","loginStrategy$","initializeLoginStrategy","strategy","ownedCredentials","startSessionTimeout","isSessionValid","preloginResponse","validateKdfConfigForPrelogin","clearSessionTimeout","sessionTimeoutSubscription","expiration","source","UserDecryptionOptionsService","userDecryptionOptionsState","PasswordlessAuthRequest","AuthRequestService","authRequestPushNotificationSubject","authRequestSerialized","encryptedMasterKeyHash","keyToEncrypt","authReqPrivateKey","pubKeyEncryptedUserKey","decryptedUserKeyBytes","pubKeyEncryptedMasterKey","pubKeyEncryptedMasterKeyHash","decryptedMasterKeyArrayBuffer","decryptedMasterKeyHashArrayBuffer","DefaultAuthRequestApiService","RegisterRouteService","emailVerificationEnabled","DefaultLoginSuccessHandlerService","userAsymmetricKeysRegenerationService","regenerateIfNeeded","decodeJwtTokenToJson","jwtToken","encodedPayload","decodedPayloadJSON","fromUrlB64ToUtf8","decodingError","jsonError","ApiService","EventCollectionService","EventUploadService","NotificationsService","VaultTimeoutSettingsService","OrgDomainApiServiceAbstraction","OrganizationManagementPreference","setFn","OrganizationManagementPreferencesService","OrganizationApiServiceAbstraction","canAccessVaultTab","canAccessSettingsTab","canManageSso","canManageScim","canAccessImport","canManageDeviceApprovals","canAccessMembersTab","canManageUsersPassword","canAccessGroupsTab","canManageGroups","canAccessReportingTab","canAccessReports","canAccessBillingTab","canAccessOrgAdmin","OrganizationService","InternalOrganizationServiceAbstraction","PolicyApiServiceAbstraction","PolicyService","InternalPolicyService","ProviderService","ProviderApiServiceAbstraction","OrganizationApiKeyType","OrganizationConnectionType","ProviderUserStatusType","ProviderUserType","ScimProviderType","ProviderStatusType","PermissionsApi","accessEventLogs","accessImportExport","accessReports","createNewCollections","deleteAnyCollection","manageCiphers","manageSso","managePolicies","manageScim","OrganizationData","useDirectory","use2fa","useApi","useKeyConnector","useScim","useCustomPermissions","usePasswordManager","useActivateAutofillPolicy","selfHost","usersGetPremium","maxCollections","ssoBound","useRiskInsights","PolicyData","MasterPasswordPolicyOptions","Organization","canManageDomainVerification","isExemptFromPolicies","canViewSubscription","canEditSubscription","hasBillableProvider","Msp","MultiOrganizationEnterprise","hasReseller","Reseller","isFreeOrg","Policy","OrganizationCreateRequest","OrganizationKeysRequest","OrganizationUpgradeRequest","SelectionReadOnlyRequest","OrganizationResponse","businessAddress1","businessAddress2","businessAddress3","businessCountry","businessTaxNumber","maxAutoscaleSeats","maxAutoscaleSmSeats","maxAutoscaleSmServiceAccounts","PolicyResponse","ProfileOrganizationResponse","familySponsorshipLastSyncDateString","familySponsorshipValidUntilString","SelectionReadOnlyResponse","AccountApiService","accountInfoEqual","AccountService","InternalAccountService","AnonymousHubService","AuthService","AvatarService","DeviceTrustServiceAbstraction","DevicesApiServiceAbstraction","DevicesServiceAbstraction","DeviceView","KeyConnectorService","MasterPasswordServiceAbstraction","InternalMasterPasswordServiceAbstraction","PasswordResetEnrollmentServiceAbstraction","SsoLoginServiceAbstraction","TokenService","TwoFactorService","UserVerificationService","WebAuthnLoginPrfKeyServiceAbstraction","WebAuthnLoginServiceAbstraction","AuthRequestType","AuthenticationStatus","AuthenticationType","TwoFactorProviderType","VerificationType","AdminAuthRequestStorable","privateKeyBuffer","DeviceRequest","pushToken","TokenTwoFactorRequest","TokenRequest","deviceName","twoFactorProvider","twoFactorRemember","UserApiTokenRequest","client_secret","PasswordHintRequest","SecretVerificationRequest","SetPasswordRequest","TwoFactorEmailRequest","TwoFactorProviderRequest","IdentityCaptchaResponse","KeyConnectorUserDecryptionOptionResponse","TrustedDeviceUserDecryptionOptionResponse","EncryptedPrivateKey","EncryptedUserKey","WebAuthnPrfDecryptionOptionResponse","UserDecryptionOptionsResponse","TrustedDeviceOption","KeyConnectorOption","WebAuthnPrfOption","IdentityTokenResponse","access_token","expiresIn","expires_in","tokenType","token_type","IdentityTwoFactorResponse","MasterPasswordPolicyResponse","TwoFactorWebAuthnResponse","KeyResponse","ChallengeResponse","attestation","excludeCredentials","pubKeyCredParams","WebAuthnLoginCredentialAssertionOptionsView","TwoFactorProviders","priority","SELECTED_PROVIDER","providersState","selectedState","recordToMap","selected$","providerPriority","setSelectedProvider","clearProviders","WebAuthnLoginResponseRequest","WebAuthnLoginAssertionResponseRequest","AuthenticatorAssertionResponse","authenticatorData","AssertionOptionsResponse","CredentialAssertionOptionsResponse","ClearClipboardDelay","TenSeconds","TwentySeconds","ThirtySeconds","OneMinute","TwoMinutes","FiveMinutes","AutofillOverlayVisibility","Off","OnButtonClick","OnFieldFocus","ExpiryDateDelimitersPattern","AUTOFILL_ON_PAGE_LOAD","AUTOFILL_ON_PAGE_LOAD_DEFAULT","AUTOFILL_ON_PAGE_LOAD_CALLOUT_DISMISSED","AUTOFILL_ON_PAGE_LOAD_POLICY_TOAST_HAS_DISPLAYED","AUTO_COPY_TOTP","INLINE_MENU_VISIBILITY","SHOW_INLINE_MENU_IDENTITIES","SHOW_INLINE_MENU_CARDS","ENABLE_CONTEXT_MENU","CLEAR_CLIPBOARD_DELAY","AutofillSettingsServiceAbstraction","AutofillSettingsService","autofillOnPageLoadState","autofillOnPageLoad$","autofillOnPageLoadDefaultState","autofillOnPageLoadCalloutIsDismissedState","autofillOnPageLoadCalloutIsDismissed$","activateAutofillOnPageLoadFromPolicy$","ActivateAutofill","autofillOnPageLoadPolicyToastHasDisplayedState","autofillOnPageLoadPolicyToastHasDisplayed$","autoCopyTotpState","autoCopyTotp$","inlineMenuVisibilityState","inlineMenuVisibility$","showInlineMenuIdentitiesState","showInlineMenuIdentities$","showInlineMenuCardsState","showInlineMenuCards$","enableContextMenuState","enableContextMenu$","clearClipboardDelayState","clearClipboardDelay$","setAutofillOnPageLoad","setAutofillOnPageLoadDefault","setAutofillOnPageLoadCalloutIsDismissed","setAutofillOnPageLoadPolicyToastHasDisplayed","setAutoCopyTotp","setInlineMenuVisibility","setShowInlineMenuIdentities","setShowInlineMenuCards","setEnableContextMenu","setClearClipboardDelay","SHOW_FAVICONS","NEVER_DOMAINS","BLOCKED_INTERACTIONS_URIS","EQUIVALENT_DOMAINS","DEFAULT_URI_MATCH_STRATEGY","DomainSettingsService","DefaultDomainSettingsService","showFaviconsState","neverDomainsState","blockedInteractionsUrisState","blockedInteractionsUris$","BlockBrowserInjectionsByDomain","featureIsEnabled","disabledUris","equivalentDomainsState","equivalentDomains$","defaultUriMatchStrategyState","setBlockedInteractionsUris","setDefaultUriMatchStrategy","equivalents","ed","normalizeExpiryYearFormat","yearInput","yearInputIsEmpty","expirationYear","paddedYear","isCardExpired","cipherCard","normalizedYear","parsedYear","NaN","expiryYearIsBeforeCurrentYear","expiryYearIsAfterCurrentYear","parsedMonthInteger","AccountBillingApiServiceAbstraction","BillingAccountProfileStateService","BillingApiServiceAbstraction","OrganizationBillingServiceAbstraction","OrganizationBillingApiServiceAbstraction","TaxServiceAbstraction","PlanSponsorshipType","PlanType","TransactionType","BitwardenProductType","ProductTierType","PlanInterval","isNotSelfUpgradable","TaxInformation","BitPayInvoiceRequest","TaxInfoUpdateRequest","ExpandedTaxInfoUpdateRequest","OrganizationNoPaymentMethodCreateRequest","PaymentRequest","UpdatePaymentMethodRequest","InvoicesResponse","InvoiceResponse","OrganizationSubscriptionResponse","storageName","upcomingInvoice","BillingCustomerDiscount","expirationWithoutGracePeriod","PlanResponse","nameLocalizationKey","descriptionLocalizationKey","hasSelfHost","hasPolicies","hasGroups","hasDirectory","hasEvents","has2fa","hasApi","hasSso","hasResetPassword","PasswordManagerPlanFeaturesResponse","SecretsManagerPlanFeaturesResponse","stripeSeatPlanId","maxAdditionalSeats","stripeServiceAccountPlanId","maxServiceAccount","maxAdditionalServiceAccounts","stripePlanId","stripeProviderPortalSeatPlanId","stripeStoragePlanId","stripePremiumAccessPlanId","providerPortalSeatPrice","maxAdditionalStorage","SubscriptionResponse","license","BillingSubscriptionResponse","BillingSubscriptionUpcomingInvoiceResponse","trialStartDate","periodStartDate","periodEndDate","cancelledDate","cancelAtEndDate","BillingSubscriptionItemResponse","quantity","sponsoredSubscriptionItem","addonSubscriptionItem","DeviceType","DeviceTypeMetadata","SDK","FeatureFlag","FALSE","DefaultFeatureFlagValue","BrowserFilelessImport","ItemShare","AC1795_UpdatedSubscriptionStatusSection","PersistPopupView","UseTreeWalkerApiForPageDetailsCollection","InlineMenuFieldQualification","InlineMenuPositioningImprovements","ProviderClientVaultPrivacyBanner","VaultBulkManagementAction","IdpAutoSubmitLogin","GenerateIdentityFillScriptRefactor","EnableNewCardCombinedExpiryAutofill","DelayFido2PageScriptInitWithinMv2","SSHAgent","NotificationBarAddLoginImprovements","CriticalApps","SecurityTasks","InlineMenuTotp","MacOsNativeCredentialSync","PM12443RemovePagingLogic","PrivateKeyRegeneration","HttpStatusCode","EventSystemUser","EventType","IntegrationType","NativeMessagingVersion","NotificationType","ProcessReloadServiceAbstraction","UriMatchStrategy","safeGetString","CardExport","template","toView","toDomain","FieldExport","IdentityExport","Fido2CredentialExport","LoginUriExport","LoginExport","PasswordHistoryExport","SecureNoteExport","SshKeyExport","CipherExport","CipherWithIdExport","CollectionExport","CollectionWithIdExport","FolderExport","FolderWithIdExport","KeysRequest","StorageRequest","BaseResponse","propertyName","exactName","otherCasePropertyName","GlobalDomainResponse","DomainsResponse","ErrorResponse","errorModel","responseErrorModel","messages","prefix","lastSep","ListResponse","continuationToken","ProfileProviderOrganizationResponse","ProfileProviderResponse","ProfileResponse","BroadcasterService","BulkEncryptService","ConfigService","CryptoFunctionService","EncryptService","Region","EnvironmentService","FileDownloadService","I18nService","LogService","PlatformUtilsService","SdkService","StateService","ValidationService","EncryptionType","encryptionTypeToString","EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE","FileUploadType","HashPurpose","HtmlStorageLocation","KeySuffixOptions","LogLevelType","StorageLocation","ThemeType","ThemeTypes","MultiMessageSender","innerMessageSenders","MessageSender","combine","messageSenders","compareValues","value1","value2","CanLaunchWhitelist","SafeUrls","nodeURL","Utils","process","release","isMobile","isAppleMobileBrowser","isAppleMobile","binaryString","atob","charCodeAt","fromUrlB64ToB64","strUtf8","unescape","fromB64toUrlB64","b64Str","hexStringToArrayBuffer","hexString","arrayBuffer","uint8Array","hexByte","byteValue","urlB64Str","fromB64ToUtf8","utfStr","decodeURIComponent","escape","guidRegex","uriString","validHosts","parseResult","allowPrivateDomains","isIp","pair","isPromise","nameOf","getUrlObject","camelToPascalCase","threshold","svgTextFill","bgColorHexNums","getContainerService","mapToRecord","destination","denormalizedPath","vendor","opera","delay","ms","asyncToObservable","daysRemaining","diffTime","hasProtocol","regexpEmojiPresentation","DomainMatchBlacklist","EFFLongWordList","EncryptionPair","decryptedFromJson","encryptedFromJson","AccountKeys","initRecordEncryptionPairsFromJSON","decObj","AccountProfile","Account","dataObj","notEncList","objProp","buildDataModel","notEncStringList","viewModel","objectContext","mapProp","decryptObjWithKey","encryptedProperties","decryptProperty","decryptTrace","EncArrayBuffer","ENC_TYPE_LENGTH","throwDecryptionError","fromB64","b64","DECRYPT_ERROR","EncString","encryptedStringOrType","initFromData","initFromEncryptedString","encPieces","parseEncryptedString","headerPieces","context","decryptedValue","getKeyForDecryption","cryptoService","SymmetricCryptoKey","fromString","TaskSchedulerService","DefaultTaskSchedulerService","taskHandlers","taskName","delayInMs","validateRegisteredTask","timeoutHandle","globalThis","triggerTask","Subscription","intervalInMs","_initialDelayInMs","intervalHandle","handler","unregisterTaskHandler","_periodInMinutes","ScheduledTaskNames","generatePasswordClearClipboardTimeout","systemClearClipboardTimeout","fido2ClientAbortTimeout","scheduleNextSyncInterval","ConsoleLogService","timersMap","optionalParams","Debug","Warning","level","InitializerKey","DefaultServerSettingsService","getSettings$","elementDeserializer","valueDeserializer","DeriveDefinition","uniqueDerivationName","definition","isFromDeriveDefinition","fromWithUserId","deserialize","serialized","clearOnCleanup","DerivedStateProvider","StateProvider","GlobalStateProvider","SingleUserStateProvider","ActiveUserStateProvider","KeyDefinition","errorKeyName","StateDefinition","ORGANIZATIONS_DISK","POLICIES_DISK","PROVIDERS_DISK","ORGANIZATION_MANAGEMENT_PREFERENCES_DISK","web","BILLING_DISK","ACCOUNT_DISK","AUTH_REQUEST_DISK_LOCAL","AVATAR_DISK","DEVICE_TRUST_DISK_LOCAL","browser","KDF_CONFIG_DISK","KEY_CONNECTOR_DISK","LOGIN_EMAIL_DISK","LOGIN_EMAIL_MEMORY","LOGIN_STRATEGY_MEMORY","MASTER_PASSWORD_DISK","MASTER_PASSWORD_MEMORY","PIN_DISK","PIN_MEMORY","ROUTER_DISK","SSO_DISK","TOKEN_DISK","TOKEN_DISK_LOCAL","TOKEN_MEMORY","TWO_FACTOR_MEMORY","USER_DECRYPTION_OPTIONS_DISK","ORGANIZATION_INVITE_DISK","VAULT_TIMEOUT_SETTINGS_DISK_LOCAL","BADGE_SETTINGS_DISK","DOMAIN_SETTINGS_DISK","AUTOFILL_SETTINGS_DISK","AUTOFILL_SETTINGS_DISK_LOCAL","BIOMETRIC_SETTINGS_DISK","CLEAR_EVENT_DISK","CONFIG_DISK","CRYPTO_DISK","CRYPTO_MEMORY","ENVIRONMENT_DISK","ENVIRONMENT_MEMORY","SYNC_DISK","THEMING_DISK","TRANSLATION_DISK","GENERATOR_DISK","GENERATOR_MEMORY","EVENT_COLLECTION_DISK","SEND_DISK","SEND_MEMORY","COLLECTION_DATA","FOLDER_DISK","FOLDER_MEMORY","VAULT_FILTER_DISK","VAULT_ONBOARDING","VAULT_SETTINGS_DISK","VAULT_SEARCH_MEMORY","CIPHERS_MEMORY","PREMIUM_BANNER_DISK_LOCAL","BANNERS_DISMISSED_DISK","NEW_DEVICE_VERIFICATION_NOTICE","STATE_LOCK_EVENT","STATE_LOGOUT_EVENT","StateEventRegistrarService","stateEventStateMap","clearEvent","eventState","newEvent","existingTickets","currentTickets","StateEventRunnerService","stateEventMap","tickets","failures","ticket","ticketStorageKey","storageKeyFor","USER_KEY_DEFINITION_MARKER","UserKeyDefinition","SyncService","SyncResponse","ThemeStateService","DefaultThemeStateService","defaultTheme","selectedThemeState","currentTheme","UserEncryptor","UserKeyEncryptor","dataPacker","assertHasValue","packed","pack","unpacked","unpack","RestClient","fetchJson","rpc","toRequest","errorKey","commonError","detectCommonErrors","hasJsonPayload","processJson","tryGetErrorMessage","tryFindErrorAsJson","tryFindErrorAsText","statusText","parsed","PasswordStrengthServiceAbstraction","PasswordStrengthService","userInputs","globalUserInputs","emailToUserInputs","finalUserInputs","expectedAndActualValue","expectedValue","actualValue","errorOnChange","extract","expected","actual","reduceCollection","distinctIfShallowMatch","isDistinct","anyComplete","watch$","completes$","w$","ready","watching$","source$","withLatestReady","watch","SendFileApi","SendTextApi","SendFile","SendText","Send","sendKeyEncryptionKey","SendResponse","SendFileView","SendTextView","SendView","maxAccessCountReached","pendingDelete","SEND_KDF_ITERATIONS","SendApiService","SendService","InternalSendService","BufferedKeyDefinition","toKeyDefinition","shouldOverwrite","dependency","input","BufferedState","dependency$","bufferedState","hasValue$","overwriteDependency$","overwrite$","overwriteOutput","output$","bufferedState$","buffered","normalized","DataPacker","DATA_PACKING","freeze","padding","hasInvalidPadding","PaddedDataPacker","frameSize","separatorLength","payloadLength","paddingLength","repeat","frameEndIndex","dataStartIndex","dataEndIndex","paddingStartIndex","SecretKeyDefinition","classifier","deconstruct","reconstruct","toEncryptedStateKey","inner","SecretState","$encryptor","encryptedState","encryptor","declassifyAll","encryptor$","declassifyItem","disclosed","declassified","declassify","decryptTasks","classifyItem","classified","classify","classifyAll","classifyTasks","latestClassified","latestCombined","latestEncryptor","latest","combined","latestDeclassified","updatedDeclassified","updatedClassified","VaultTimeoutStringType","OnLocked","OnSleep","OnIdle","FolderApiServiceAbstraction","FolderService","InternalFolderService","PremiumUpgradePromptService","TotpService","ViewPasswordHistoryService","CipherRepromptType","FieldType","LoginLinkedId","CardLinkedId","IdentityLinkedId","SecureNoteType","LinkedMetadata","attributes","_i18nKey","sortPosition","CardApi","Fido2CredentialApi","FieldApi","IdentityApi","LoginUriApi","LoginApi","SecureNoteApi","SshKeyApi","AttachmentData","CardData","CipherData","Fido2CredentialData","FieldData","IdentityData","LoginUriData","LoginData","PasswordHistoryData","SecureNoteData","SshKeyData","Attachment","decryptAttachmentKey","toAttachmentData","toCardData","bypassValidation","decAttachment","decField","decPh","toLoginData","toSecureNoteData","toIdentityData","toSshKeyData","toFieldData","toPasswordHistoryData","Fido2Credential","toFido2CredentialData","Field","Folder","LoginUri","validateChecksum","clearTextUri","localChecksum","toLoginUriData","TreeNode","CipherBulkDeleteRequest","AttachmentRequest","CipherRequest","lastKnownRevisionDate","keyApi","attachments2","attachmentRequest","FolderWithIdRequest","FolderRequest","AttachmentResponse","PasswordHistoryResponse","CipherResponse","h","FolderResponse","AttachmentView","CardView","_brand","_number","_subTitle","maskedCode","maskedNumber","cardNum","re","CardholderName","ExpMonth","ExpYear","Code","Brand","linkedFieldValue","linkedFieldI18nKey","Fido2CredentialView","FieldView","showCount","maskedValue","FolderView","IdentityView","_firstName","_lastName","fullAddress","address","fullAddressPart2","addressPart2","fullAddressForCopy","Title","MiddleName","Address1","Address2","Address3","City","PostalCode","Country","Company","Phone","Ssn","Username","PassportNumber","LicenseNumber","FirstName","LastName","FullName","ItemView","LoginUriView","_uri","_domain","_hostname","_host","_canLaunch","hostnameOrUri","hostOrUri","targetUri","matchType","targetDomain","matchDomains","matchesDomain","urlHost","domainUrlHost","LoginView","maskedPassword","PasswordHistoryView","SecureNoteView","SshKeyView","maskedPrivateKey","lines","maskLine","line","ServiceUtils","nodeTree","partIndex","delimiter","partName","newPartName","CipherAuthorizationService","DefaultCipherAuthorizationService","allowedCollections","canCloneCipher$","A11yCellDirective","getFocusTarget","focusTarget","focusableChild","AsyncActionsModule","BitActionDirective","buttonComponent","BitSubmitDirective","formGroupDirective","_disabled$","allowDisabledFormSubmit","ngSubmit","awaitable","BitFormButtonDirective","submitDirective","actionDirective","SizeClasses","xlarge","large","small","xsmall","AvatarComponent","sanitizer","svgCharCount","svgFontSize","svgFontWeight","svgSize","chars","upperCaseText","svg","getFirstLetters","unicodeSafeSubstring","hexColor","createSvgElement","charObj","createTextElement","html","svgHtml","bypassSecurityTrustResourceUrl","svgTag","backgroundColor","textTag","BadgeListComponent","filteredItems","isFiltered","truncate","maxItems","_maxItems","styles","primary","secondary","danger","hoverStyles","BadgeComponent","hasHoverEffects","maxWidthClass","titleAttr","nodeName","BadgeModule","BannerComponent","bannerType","showClose","bannerClass","BannerModule","BreadcrumbComponent","BreadcrumbsComponent","breadcrumbs","breadcrumbList","toArray","beforeOverflow","hasOverflow","overflow","afterOverflow","BreadcrumbsModule","focusRing","buttonStyles","unstyled","ButtonComponent","_block","block","disabledAttr","ButtonModule","defaultI18n","CalloutComponent","calloutClass","CalloutModule","CardComponent","CheckboxComponent","inputClasses","maskImage","indeterminateImage","_disabled","_required","hasValidator","requiredTrue","CheckboxModule","CharacterType","ColorPasswordComponent","characterStyles","Emoji","Letter","Special","passwordArray","getCharacterClass","charType","getCharacterType","charClass","ColorPasswordModule","ContainerComponent","fadeIn","DialogModule","DEFAULT_ICON","DEFAULT_COLOR","SimpleConfigurableDialogComponent","iconClasses","simpleDialogOpts","showCancelButton","acceptAction","localizeText","translation","defaultKey","CustomBlockScrollStrategy","attach","detach","DialogService","_overlay","_injector","_defaultOptions","_parentDialog","_overlayContainer","scrollStrategy","_destroy$","backDropClasses","defaultScrollStrategy","componentOrTemplateRef","backdropClass","simpleDialogOptions","openSimpleDialogRef","DialogComponent","background","dialogSize","_disablePadding","disablePadding","DialogCloseDirective","DialogTitleContainerDirective","simple","containerInstance","_ariaLabelledByQueue","IconDirective","SimpleDialogComponent","hasIcon","BitFormControlAbstraction","FormControlComponent","inline","_inline","disableMargin","_disableMargin","formControl","displayError","FormControlModule","BitHintComponent","BitLabel","parentFormControl","isInsideFormControl","BitErrorSummary","errorCount","getErrorCount","errorString","untouched","BitFormFieldControl","BitErrorComponent","requiredLength","BitFormFieldComponent","disableReadOnlyBorder","prefixHasChildren","suffixHasChildren","defaultContentIsFocused","inputBorderClasses","shouldFocusBorderAppear","groupClasses","ngAfterContentChecked","ariaDescribedBy","prefixContainer","childElementCount","suffixContainer","FormFieldModule","BitPasswordInputToggleDirective","toggled","toggledChange","button","formField","spellcheck","BitPrefixDirective","iconButtonComponent","BitSuffixDirective","contrast","main","muted","light","sizes","BitIconButtonComponent","IconButtonModule","BitIconComponent","innerHtml","domSanitizer","bypassSecurityTrustHtml","IconModule","Icon","isIcon","DynamicContentNotAllowedError","svgIcon","strings","Search","AutofocusDirective","appAutofocus","autofocus","focusableElement","BitInputDirective","parentFormField","standaloneInputClasses","ariaInvalid","labelForId","showErrorsWhenDisabled","hasPrefix","hasSuffix","setSelectionRange","InputModule","ItemActionComponent","ItemContentComponent","endSlotHasChildren","endSlot","ItemGroupComponent","A11yRowDirective","cells","viewCells","contentCells","ItemComponent","ItemModule","sideNavService","LayoutComponent","mainContentId","focusMainContent","linkStyles","commonStyles","LinkDirective","linkType","AnchorLinkDirective","ButtonLinkDirective","LinkModule","MenuDividerComponent","MenuItemDirective","MenuTriggerForDirective","hasPopup","ariaRole","overlay","isOpen","defaultMenuConfig","panelClass","hasBackdrop","scrollStrategies","reposition","positionStrategy","flexibleConnectedTo","withPositions","originX","originY","overlayX","overlayY","withLockedPosition","withFlexibleDimensions","withPush","toggleMenu","destroyMenu","openMenu","disposeAll","overlayRef","templatePortal","closedEventsSub","getClosedEvents","keyDownEventsSub","keydownEvents","detachments","escKey","backdropClick","menuClosed","dispose","MenuComponent","withWrap","skipPredicate","MenuModule","MultiSelectComponent","removeSelectedItems","searchInputId","onItemsConfirmed","keyDown","valueAccessor","loadingText","onDropdownClosed","updatedBaseItems","baseItems","_ariaDescribedBy","searchInput","MultiSelectModule","NavBaseComponent","routerLinkActiveOptions","treeDepth","hideActiveStyles","mainContentClicked","NavDividerComponent","handleMainContentClicked","NavGroupComponent","parentHideActiveStyles","parentNavGroup","contentId","hideIfEmpty","setOpen","initNestedStyles","nestedNavComponents","navGroupOrItem","setIsActive","NavGroupAbstraction","NavItemComponent","_isActive","showActiveStyles","forceActiveStyles","focusVisibleWithin$","fvwStyles$","NavLogoComponent","closedIcon","NavigationModule","handleKeyDown","SideNavComponent","setClose","toggleButton","SideNavService","_open$","open$","isOverlay$","media","isSmallScreen","mediaQuery","list","NoItemsComponent","NoItemsModule","OVERLAY_OFFSET_PX","defaultPositions","offsetX","offsetY","PopoverTriggerForDirective","positions","preferredPosition","defaultPopoverConfig","popoverOpen","togglePopover","closePopover","openPopover","popover","destroyPopover","popoverClosed","PopoverComponent","PopoverModule","BackgroundClasses","ProgressComponent","displayText","outerBarStyles","innerBarStyles","ProgressModule","RadioInputComponent","RadioButtonComponent","groupComponent","inputId","groupDisabled","onInputChange","RadioButtonModule","RadioGroupComponent","_name","SearchComponent","inputType","onTouch","SearchModule","SectionHeaderComponent","SectionComponent","OptionComponent","SelectComponent","findSelectedOption","SelectModule","ButtonLikeAbstraction","FocusableElement","CellDirective","RowDirective","alignContent","alignmentClass","SortableComponent","_default","table","setActive","ariaSort","defaultDirection","bitSortable","TableDataSource","_filter","_renderData","_renderChangesSubscription","_data","_sort","filterData","connect","updateChangeSubscription","disconnect","filteredData","orderedData","orderData","simpleStringFilter","sortData","sortingDataAccessor","sortHeaderId","numberValue","MAX_SAFE_INTEGER","directionModifier","valueA","valueB","valueAType","valueBType","comparatorResult","dataStr","currentTerm","transformedFilter","BitRowDef","TableScrollComponent","headerHeight","headerObserver","ResizeObserver","contentRect","observe","TableBodyDirective","TableComponent","_initialized","tableClass","dataStream","rows$","TableModule","TabHeaderComponent","TabListContainerDirective","TabListItemDirective","baseClassList","activeClassList","disabledClassList","textColorClassList","TabBodyComponent","preserveContent","_active","_firstRender","tabContent","selectTab","TabGroupComponent","_selectedIndex","_indexToSelect","selectedIndexChange","selectedTabChange","_groupId","getTabContentId","getTabLabelId","indexToSelect","_clampTabIndex","isFirstRun","tabs","setActiveItem","tabLabels","withHorizontalOrientation","withHomeAndEnd","selectedTab","TabLabelDirective","TabComponent","_contentPortal","_viewContainerRef","textLabel","implicitContent","TabLinkComponent","onKeyDown","tabItem","routerLinkActive","_tabNavBar","routerLinkMatchOptions","isActiveChange","updateActiveLink","TabNavBarComponent","updateActiveItem","calculateToastTimeout","paragraph","word","ToastService","toastrService","toastrConfig","ToggleGroupComponent","selectedChange","onInputInteraction","ToggleGroupModule","ToggleComponent","bitBadgeContainerHasChidlren","labelTitle","labelClasses","bitBadgeContainer","labelText","labelContent","innerText","h1","h2","h3","h4","h5","h6","body1","body2","margins","TypographyDirective","_margin","noMargin","bitTypography","TypographyModule","functionToObservable","func","ImportApiServiceAbstraction","ImportApiService","postImportCiphers","postImportOrganizationCiphers","ImportServiceAbstraction","ImportCiphersRequest","folderRelationships","ImportOrganizationCiphersRequest","collectionRelationships","KvpRequest","newLineRegex","passwordFieldNames","usernameFieldNames","notesFieldNames","uriFieldNames","parseCsvOptions","encoding","skipEmptyLines","parseXml","validateNoExternalEntities","DOMParser","parseFromString","parseCsv","parseOptions","splitNewLine","parseSingleRowCsv","rowData","parsedRow","makeUriArray","fixUri","returnArr","nameFromUrl","getValueOrDefault","setCardExpiration","expiryRegex","expiryMatch","moveFoldersToCollections","querySelectorDirectChild","parentEl","els","querySelectorAllDirectChild","parentNode","initLoginCipher","cleanupCipher","processKvp","processFolder","folderName","addRelationship","folderIndex","convertToNoteIfNeeded","processFullName","AscendoCsvImporter","fieldLower","AvastCsvImporter","AvastJsonImporter","logins","custName","note","pwd","loginName","cards","holderName","cvv","AviraCsvImporter","secondary_username","BlackBerryCsvImporter","grouping","fav","extra","ChromeCsvImporter","androidPatternRegex","BitwardenCsvImporter","col","collectionIndex","delimPosition","login_totp","login_username","login_password","login_uri","BitwardenJsonImporter","parseEncrypted","parseDecrypted","encKeyValidation_DO_NOT_EDIT","keyForDecryption","encKeyValidation","groupingsMap","parseCollections","parseFolders","folderView","BitwardenPasswordProtectedImporter","promptForPassword_callback","parsedData","passwordProtected","cannotParseFile","clearTextData","jdoc","BlurCsvImporter","OfficialProps","ButtercupCsvImporter","processingCustomFields","ClipperzHtmlImporter","entry","property","actionType","labelLower","CodebookCsvImporter","Category","Favorite","Entry","Note","TOTP","Website","_mappedCredentialsColumns","_mappedPersonalInfoAsIdentityColumns","_mappedSecureNoteColumns","DashlaneCsvImporter","parsePersonalInformationRecordAsIdentity","rowKeys","parseCredentialsRecord","parsePaymentRecord","parseIdRecord","parsePersonalInformationRecord","parseSecureNoteRecords","otpUrl","otpSecret","importUnmappedFields","account_name","mappedValues","cc_number","expiration_month","expiration_year","account_holder","first_name","middle_name","last_name","item_name","dataRow","phone_number","HandledResults","DashlaneJsonImporter","ADDRESS","processAddress","AUTHENTIFIANT","processAuth","BANKSTATEMENT","processNote","IDCARD","PAYMENTMEANS_CREDITCARD","processCard","IDENTITY","processIdentity","secondaryLogin","pseudo","addressName","addressFull","zipcode","owner","nameProperty","EncryptrCsvImporter","Label","Notes","CVV","Expiry","expParts","EnpassCsvImporter","firstRow","containsField","fieldValue","fieldName","fieldNameLower","androidUrlRegex","EnpassJsonImporter","foldersMap","foldersIndexMap","flattenFolderTree","template_type","processLogin","cleanedValue","sensitive","uuid","parent_uuid","titlePrefix","FirefoxCsvImporter","FskEntryTypesEnum","FSecureFskImporter","parseEntry","handleLoginEntry","CreditCard","handleCreditCardEntry","creditNumber","creditCvv","creditExpiry","GnomeJsonImporter","keyRing","display_name","username_value","attr","NotesHeader","ApplicationsHeader","WebsitesHeader","Delimiter","KasperskyTxtImporter","notesData","applicationsData","websitesData","workingData","parseDataCategory","applications","websites","nameKey","itemComment","itemCommentKey","colonIndex","KeePass2XmlImporter","KeePassFileNode","RootNode","rootGroup","traverse","isRootNode","groupPrefixName","groupName","nameEl","cipherIndex","entryString","valueEl","keyEl","attrs","ProtectInMemory","KeePassXCsvImporter","KeeperCsvImporter","LastPassCsvImporter","hasFolder","buildBaseCipher","parseSecureNote","parseCard","parseIdentity","ccnum","cardCipher","profilename","firstname","lastname","ccname","cccsc","ccexp","ccexpParts","middlename","extraParts","processedNote","typeParts","mappedData","parseSecureNoteMapping","monthString","processingNotes","extraPart","LogMeOnceCsvImporter","MeldiumCsvImporter","DisplayName","UserName","Url","MSecureCsvImporter","splitValueRetainingLastPart","mappedBaseColumns","_mappedUserAccountColumns","_mappedCreditCardColumns","_mappedIdentityColumns","_mappedIdCardColumns","_mappedTwoFaColumns","_mappedUserNoteColumns","MykiCsvImporter","nickname","additionalInfo","twofaSecret","authToken","cardName","exp_month","exp_year","firstAddressLine","secondAddressLine","zipCode","idType","idName","idCountry","idNumber","_mappedColumns","NetwrixPasswordSecureCsvImporter","Organisationseinheit","Informationen","Beschreibung","Benutzername","Passwort","Internetseite","NordPassCsvImporter","recordType","evaluateType","custom_fields","customFieldsParsed","additional_urls","additionalUrlsParsed","cardholdername","cardnumber","cvc","expirydate","full_name","CategoryEnum","LoginFieldTypeEnum","OnePassword1PifImporter","trashed","processStandardItem","processWinOpVaultItem","overview","URLs","parsePasswordHistory","notesPlain","parseFields","sections","openContents","faveIndex","typeName","secureContents","maxSize","designationKey","valueKey","fieldDesignation","street","OnePassword1PuxImporter","vaults","categoryUuid","Database","WirelessRouter","API_Credential","SoftwareLicense","EmailAccount","MedicalRecord","DriversLicense","OutdoorLicense","Membership","Passport","RewardsProgram","SocialSecurityNumber","favIndex","processOverview","processLoginFields","processDetails","processSections","tags","inputString","loginFields","loginField","designation","CheckBox","parseSectionFields","sectionTitle","anyField","getFieldName","extractValue","fillLogin","fillApiCredentials","fillCreditCard","fillBankAccount","fillIdentity","fillDriversLicense","fillOutdoorLicense","fillMembership","fillPassport","fillRewardsProgram","fillSSN","email_address","guarded","monthYear","historyItems","CipherImportContext","importRecord","lowerProperty","IgnoredProperties","OnePasswordCsvImporter","loginPropertyParsers","setLoginUsername","setLoginPassword","setLoginUris","creditCardPropertyParsers","setCreditCardNumber","setCreditCardVerification","setCreditCardCardholderName","setCreditCardExpiry","identityPropertyParsers","setIdentityFirstName","setIdentityInitial","setIdentityLastName","setIdentityUserName","setIdentityEmail","setIdentityPhone","setIdentityCompany","quoteChar","escapeChar","getProp","setNotes","setCipherType","altUsername","setKnownLoginValue","setKnownCreditCardValue","setKnownIdentityValue","setUnknownValue","getPropByRegexp","regexp","matchingKeys","getPropIncluding","includesMap","readableDate","OnePasswordMacCsvImporter","OnePasswordWinCsvImporter","setIdentityAddress","expSplit","PadlockCsvImporter","tag","PassKeepCsvImporter","PasskyJsonImporter","passkyExport","passwords","PassmanJsonImporter","field_type","PasspackCsvImporter","tagsJson","Tags","tagJson","__parsed_extra","fieldsJson","extraFields","fieldJson","PasswordAgentCsvImporter","newVersion","altFormat","PasswordBossJsonImporter","login_url","identifiers","valObj","expDate","cf","PasswordDragonXmlImporter","records","categoryText","accountName","tagName","PasswordSafeXmlImporter","passwordSafe","notesDelimiter","groupText","PasswordWalletTxtImporter","dutchHeaderTranslations","Titel","Gebruikersnaam","Wachtwoord","Gewijzigd","Gemaakt","Beschrijving","germanHeaderTranslations","Konto","translateIntoEnglishHeaders","PasswordXPCsvImporter","transformHeader","currentFolderName","Description","processNames","fullname","mappedFirstName","mappedMiddleName","mappedLastName","ProtonPassItemState","ProtonPassJsonImporter","mappedIdentityItemKeys","identityItemExtraFieldsKeys","processIdentityItemUnmappedAndExtraFields","identityItem","extraField","extraSections","extraSection","sectionFields","TRASHED","pinned","loginContent","itemUsername","itemEmail","totpUri","creditCardContent","verificationNumber","identityContent","phoneNumber","socialSecurityNumber","county","streetAddress","stateOrProvince","zipOrPostalCode","countryOrRegion","PsonoJsonImporter","WEBSITE_mappedValues","APP_PWD_mappedValues","BOOKMARK_mappedValues","NOTES_mappedValues","TOTP_mappedValues","ENV_VARIABLES_mappedValues","GPG_mappedValues","psonoExport","handleItemParsing","folderHasItems","folderHasSubfolders","parsePsonoItem","parseWebsiteLogins","parseApplicationPasswords","parseEnvironmentVariables","parseTOTP","parseBookmarks","parseNotes","website_password_title","website_password_notes","website_password_username","website_password_password","website_password_url","website_password_auto_submit","website_password_url_filter","application_password_title","application_password_notes","application_password_username","application_password_password","bookmark_title","bookmark_notes","bookmark_url","note_title","note_notes","totp_title","totp_notes","totp_code","environment_variables_title","environment_variables_notes","environment_variables_variables","KvPair","parseGPG","mail_gpg_own_key_title","mail_gpg_own_key_public","mail_gpg_own_key_name","mail_gpg_own_key_email","mail_gpg_own_key_private","RememBearCsvImporter","trash","cardholder","expiryMonth","expMonthNumber","expiryYear","expYearNumber","RoboFormCsvImporter","Name","Pwd","Rf_fields","SafariCsvImporter","OTPAuth","SafeInCloudXmlImporter","labelEl","cardEl","labelIdEl","fieldEl","notesEl","candidates","choice","SaferPassCsvImporter","SecureSafeCsvImporter","urlField","Comment","SplashIdCsvImporter","parseFieldsToNotes","startIndex","StickyPasswordXmlImporter","loginNodes","loginNode","accountId","usernameText","passwordText","titleText","linkText","notesText","accountLogin","buildGroupText","PropertiesToIgnore","TrueKeyCsvImporter","memo","kind","expiryDate","document_content","UpmCsvImporter","YotiCsvImporter","ZohoVaultCsvImporter","parseData","SecretData","CustomData","featuredImportOptions","regularImportOptions","ImportService","importApiService","getImportOptions","import","importer","selectedImportTarget","canAccessImportExport","importResult","SyntaxError","halfway","last","badData","setImportTarget","handleOrganizationalImport","handleIndividualImport","handleServerError","getImporter","format","getImporterInstance","importTarget","noCollectionRelationShips","cipherPos","relationships","noFolderRelationShips","newFolderName","ImportCollectionServiceAbstraction","UnlockOption","LockComponentService","unlockViaBiometrics","clientTypeToSuccessRouteRecord","LockComponent","activeUnlockOption","_activeUnlockOptionBSubject","lockComponentService","unlockOptions","activeUnlockOption$","invalidPinAttempts","biometricAsked","defaultUnlockOptionSetForUser","unlockingViaBiometrics","unlockViaPin","unlockViaMasterPassword","listenForActiveUnlockOptionChanges","listenForActiveAccountChanges","listenForUnlockOptionsChanges","biometricUnlockBtnText","buildPinForm","buildMasterPasswordForm","handleActiveAccountChange","resetDataOnActiveAccountChange","hasUserKeyInMemory","setEmailAsPageSubtitle","setDefaultActiveUnlockOption","handleBiometricsUnlockEnabled","autoPromptBiometrics","promptAutomatically$","desktopAutoPromptBiometrics","lastProcessReload","getLastProcessReload","setUserPromptCancelled","setUserKeyAndContinue","biometricTranslatedErrorDesc","biometricErrorDescTranslationKey","validateMasterPassword","masterPasswordVerificationResponse","passwordValid","evaluatePasswordAfterUnlock","doContinue","resetUserPromptCancelled","onWindowHidden","promptCancelled$","biometricsAvailable","showBiometrics","NotEnabledLocally","biometricUnavailabilityReason","UnlockNeeded","HardwareUnavailable","AutoSetupNeeded","ManualSetupNeeded","NotEnabledInConnectedDesktopApp","DesktopDisconnected","ENCRYPTED_CLIENT_KEY_HALF","DISMISSED_REQUIRE_PASSWORD_ON_START_CALLOUT","FINGERPRINT_VALIDATED","LAST_PROCESS_RELOAD","BiometricsStatus","BiometricsCommands","BiometricStateService","DefaultBiometricStateService","biometricUnlockEnabledState","requirePasswordOnStartState","requirePasswordOnStart$","encryptedClientKeyHalfState","encryptedClientKeyHalf$","encryptedClientKeyHalfToEncString","dismissedRequirePasswordOnStartCalloutState","dismissedRequirePasswordOnStartCallout$","promptCancelledState","promptAutomaticallyState","fingerprintValidatedState","fingerprintValidated$","lastProcessReloadState","lastProcessReload$","setBiometricUnlockEnabled","setRequirePasswordOnStart","currentActiveId","removeEncryptedClientKeyHalf","setEncryptedClientKeyHalf","encryptedKeyHalf","getRequirePasswordOnStart","getEncryptedClientKeyHalf","setDismissedRequirePasswordOnStartCallout","resetAllPromptCancelled","setPromptAutomatically","prompt","setFingerprintValidated","validated","updateLastProcessReload","BiometricsService","supportsBiometric","UserPrivateKeyDecryptionFailedError","KeyService","BaseEncryptedOrganizationKey","fromData","EncryptedOrganizationKey","ProviderEncryptedOrganizationKey","isProviderEncrypted","toData","encryptedOrganizationKey","USER_KEY","DefaultKeyService","activeUserEverHadUserKey","storeAdditionalKeys","setUserKeys","encPrivateKey","decryptPrivateKey","validateUserKey","getKeyFromStorage","clearAllStoredUserKeys","hasUserKeyStored","buildProtectedSymmetricKey","clearUserKey","clearStoredUserKey","clearDeprecatedKeys","userKeyMasterKey","resolvedUserId","KdfConfig","hashPurpose","storedPasswordHash","providerOrgs","encOrgKeyData","newSymKey","clearOrgKeys","encProviderKeys","providerKeys$","clearProviderKeys","shareKey","userFingerprint","hashPhrase","clearKeyPair","keyMaterial","randomNumber","rval","range","bitsNeeded","log2","bytesNeeded","mask","byteArray","derivePublicKey","shouldStoreKey","noPreExistingPersistentKey","minimumEntropy","entropyPerWord","hashArr","phrase","hashNumber","remainder","divide","encryptionKey","protectedSymKey","stretchedEncryptionKey","userKeyWithLegacySupport$","pk","userPrivateKeyHelper$","userPrivateKey","legacySupport","providerKeysHelper$","project","inputRecord","encryptedProviderKeys","forkJoin","userKeys","RangeWithDefault","inRange","PBKDF2KdfConfig","PRELOGIN_ITERATIONS_MIN","Argon2KdfConfig","PRELOGIN_MEMORY_MIN","PRELOGIN_PARALLELISM_MIN","DEFAULT_KDF_CONFIG","KDF_CONFIG","DefaultKdfConfigService","UserAsymmetricKeysRegenerationService","DefaultUserAsymmetricKeysRegenerationService","userAsymmetricKeysRegenerationApiService","shouldRegenerate","regenerateUserAsymmetricKeys","userKeyEncryptedPrivateKey","verificationResponse","verify_asymmetric_keys","userPublicKey","privateKeyDecryptable","validPrivateKey","userKeyCanDecrypt","makeKeyPairResponse","make_key_pair","UserAsymmetricKeysRegenerationApiService","DefaultUserAsymmetricKeysRegenerationApiService","userKeyEncryptedUserPrivateKey","VaultExportServiceAbstraction","ExportHelper","getFileName","padNumber","getSeconds","padCharacter","numString","VaultExportService","individualVaultExportService","organizationVaultExportService","getExport","getPasswordProtectedExport","onlyManagedCollections","OrganizationVaultExportServiceAbstraction","BaseVaultExportService","buildPasswordExport","clearText","encText","jsonDoc","buildCommonCipher","OrganizationVaultExportService","getEncryptedManagedExport","getOrganizationEncryptedExport","getDecryptedManagedExport","getOrganizationDecryptedExport","exportData","exportPromises","decCol","decCipher","buildCsvExport","buildJsonExport","BuildEncryptedExport","allDecCiphers","dC","encCollections","eC","collectionsMap","exportCiphers","IndividualVaultExportServiceAbstraction","IndividualVaultExportService","getEncryptedExport","getDecryptedExport","decFolders","CatchallSettingsComponent","initial","saveSettings","site","Controls","ForwarderSettingsComponent","forwarder$","displayDomain","displayToken","displayBaseUrl","settings$$","settings$","OrganizationEncryptor","OrganizationKeyEncryptor","LegacyEncryptorProvider","RANDOMIZER","GeneratorServicesModule","userEncryptor$","packer","actualUserId","singleUserId","takeWhile","materialize","dematerialize","organizationEncryptor$","singleOrganizationId$","expectedOrganizationId","actualOrganizationId","singleOrganizationId","GeneratorModule","CredentialGeneratorHistoryComponent","getCopyText","getGeneratedValueText","NoCredentialsIcon","EmptyCredentialHistoryComponent","noCredentialsIcon","CredentialGeneratorHistoryDialogComponent","hasHistory$","PassphraseSettingsComponent","numWordsBoundariesHint","numWordsBoundariesHint$","withConstraints$","boundariesHint","recommendation","policy$","wordSeparatorMaxLength","policyInEffect","toggleEnabled","setting","PasswordSettingsComponent","waitMs","lengthBoundariesHint","lengthBoundariesHint$","toggles","lastMinNumber","checkNumbers","lastMinSpecial","checkSpecial","SubaddressSettingsComponent","UsernameSettingsComponent","completeOnAccountSwitch","PublicClassifier","pickMe","picked","_secret","EMPTY_CONSTRAINTS","Proxy","IdentityConstraint","calibrate","adjust","fix","KeyServiceRandomizer","pick","uniform","pickWord","titleCase","shuffle","shuffled","j","charSet","randomCharIndex","IntegrationContext","authenticationToken","suffix","base64","generatedBy","descriptionId","ForwarderContext","emailDomain","emailPrefix","missingAccountIdCause","GeneratedCredential","PasswordAlgorithms","UsernameAlgorithms","EmailAlgorithms","isForwarderIntegration","isSameAlgorithm","lhs","rhs","CredentialCategories","isPasswordAlgorithm","isUsernameAlgorithm","isEmailAlgorithm","toCharacterSet","SpecialCharacters","Ascii","Full","Uppercase","Lowercase","Digit","Unmistakable","SUBADDRESS_PARSER","EmailRandomizer","randomAsciiSubaddress","subaddressLength","randomAsciiCatchall","Infinity","randomWordsCatchall","numberOfWords","wordList","words","isCatchallGenerationOptions","isSubaddressGenerationOptions","EmailCalculator","appendToSubaddress","appendText","concatenate","emailWebsite","observe$PerUserId","_subjects","sharedStateByUserId","sum","optionsToRandomAsciiRequest","defaultEnabled","defaultQuantity","DefaultPasswordGenerationOptions","remaining","optionsToEffWordListRequest","requestWords","DefaultPassphraseGenerationOptions","DefaultPassphraseBoundaries","separator","PasswordRandomizer","randomizer","randomAscii","sets","allocate","fill","allSet","toAsciiSets","generating","randomEffLongWords","luckyNumber","isPasswordGenerationOptions","isPassphraseGenerationOptions","UsernameRandomizer","randomWords","selectCase","casing","digit","isEffUsernameGenerationOptions","CreateForwardingAddressRpc","createForwardingEmail","toBody","GetAccountIdRpc","getAccountId","Forwarder","requestOptions","createForwardingAddress","createContext","DefaultPolicyEvaluator","applyPolicy","sanitize","Zero","AtLeastOne","RequiresTrue","requiredValue","atLeastSum","minConsistentLength","atLeast","maybe","constraint","minimum","fitToBounds","withUpperBound","fitLength","fillString","trimmed","padEnd","enforceConstant","readonlyTrueWhen","maybeReadonly","PasswordPolicyConstraints","DynamicPasswordPolicyConstraints","defaults","useLowercase","useUppercase","numberCount","specialCount","PassphraseGeneratorOptionsEvaluator","defaultBoundary","boundaries","PassphrasePolicyConstraints","PasswordGeneratorOptionsEvaluator","minDigits","minSpecialCharacters","createBoundary","DefaultPasswordBoundaries","minPolicyLength","cascade","enabledResult","DOMAIN_PARSER","CatchallConstraints","SubaddressConstraints","DefaultCatchallOptions","DefaultEffUsernameOptions","initializeBoundaries","DefaultSubaddressOptions","generatedValueKey","copyKey","useGeneratedValueKey","engine","disabledValue","createEvaluator","toConstraints","USERNAME","_acc","_policy","descriptionKey","toCredentialGeneratorConfiguration","defaultSettings","settingsConstraints","local","Generators","DefaultCredentialPreferences","Forwarders","AddyIo","DuckDuckGo","Fastmail","FirefoxRelay","ForwardEmail","SimpleLogin","PrivateClassifier","_disclosed","importBuffer","extends","_context","primaryAccounts","using","methodCalls","forDomain","methodResponses","notCreated","generated_for","full_address","endpoint","alias","Authentication","Integrations","integrations","getForwarderConfiguration","maybeForwarder","Policies","Passphrase","UsernameDigits","createRandomizer","DefaultGeneratorService","_evaluators$","options$","durableState","defaults$","evaluator$","toEvaluator","enforcePolicy","evaluated","isClassifiedFormat","isDynamic","UserStateSubject","isObjectKey","objectKey","stateKey","toUserKeyDefinition","when$","singleUserEncryptor$","constraints$","unconstrained$","dependencies$","outputSubscription","last$","when","prepareUpdate","inputSubscription","onNext","onComplete","init$","input$","constrained","scan","pending","nextValue","skip","withConstraints","loadedState","unconstrained","calibration","adjusted","fixed","mapToClassifiedFormat","decryptedSecret","unwrapped","mapToStorageFormat","observer","wc","isDisposed","mapPolicyToEvaluator","newDefaultEvaluator","PREFERENCES","CredentialGeneratorService","encryptorProvider","getDependencyProvider","request$","website$","readyOn$","NO_EMISSIONS","ready$","skipUntil","completion$","ignoreElements","endWith","overridePassword","availableAlgorithms","available","categories","integration","forwarderConfig","useGeneratedValue","mapPolicyToConstraints","GeneratorStrategy","OptionsClassifier","ForwarderGeneratorStrategy","sharedByUserId","getUserSecrets","rolloverKey","secretState","canDecrypt$","PASSWORD_SETTINGS","PASSPHRASE_SETTINGS","EFF_USERNAME_SETTINGS","CATCHALL_SETTINGS","SUBADDRESS_SETTINGS","PassphraseGeneratorStrategy","PasswordGeneratorStrategy","CatchallGeneratorStrategy","emailCalculator","emailRandomizer","SubaddressGeneratorStrategy","EffUsernameGeneratorStrategy","GeneratedPasswordHistory","GeneratorHistoryService","SecretClassifier","allSecret","disclose","newDisclosed","exclude","excludedPropertyName","newExcluded","excludedProp","disclosedProp","cleaned","merged","GENERATOR_HISTORY","GENERATOR_HISTORY_BUFFER","decryptor","LegacyPasswordHistoryDecryptor","LocalGeneratorHistoryService","maxTotal","_credentialStates","getCredentialState","credentialIndex","createSecretState","decryptor$","PasswordGenerationServiceAbstraction","DefaultGeneratorNavigation","GeneratorNavigationEvaluator","preferPassword","DisabledGeneratorNavigationPolicy","GENERATOR_SETTINGS","DefaultGeneratorNavigationService","evaluator","applied","PasswordGeneratorPolicyOptions","inEffect","LegacyPasswordGenerationService","navigation","passphrases","generatePassphrase","getRawOptions$","withSequenceNumber","observable$","passwordPrevious","passphrasePrevious","generatorPrevious","passwordDefaults","passwordEvaluator","passwordCurrent","passphraseOptions","passphraseDefaults","passphraseEvaluator","passphraseCurrent","generatorOptions","generatorDefaults","generatorEvaluator","generatorCurrent","policyUpdated","passwordOptionsWithPolicy","passphraseOptionsWithPolicy","generatorOptionsWithPolicy","toPasswordGeneratorOptions","navigationEvaluator","navigationApplied","navigationSanitized","sanitized","toStoredOptions","navigationOptions$","navigationOptions","each","toGeneratedPasswordHistory","history$","legacyPasswordGenerationServiceFactory","passwordRandomizer","UsernameGenerationServiceAbstraction","LegacyUsernameGenerationService","generateCatchall","generateSubaddress","generateForwarded","generateWord","catchallDefaults","effUsernameOptions","effUsernameDefaults","subaddressDefaults","addyIoOptions","addyIoDefaults","duckDuckGoOptions","duckDuckGoDefaults","fastmailOptions","fastmailDefaults","firefoxRelayOptions","firefoxRelayDefaults","forwardEmailOptions","forwardEmailDefaults","simpleLoginOptions","simpleLoginDefaults","toUsernameOptions","saveGeneratorOptions","saveForwarderOptions","saveNavigationOptions","legacyUsernameGenerationServiceFactory","restClient","usernameRandomizer","CipherFormGenerationService","CipherFormService","CipherFormContainer","AddEditCustomFieldDialogComponent","customFieldForm","fieldTypeOptions","updateLabel","editLabelConfig","getTypeHint","logHiddenEvent","openAddEditCustomFieldDialog","CustomFieldsComponent","cipherFormContainer","liveAnnouncer","numberOfFieldsChange","customFieldsForm","hasCustomFields","focusOnNewInput$","updateCipher","linkedFieldsOptionsForCipher","getLinkedFieldsOptionsForCipher","optionsArray","originalCipherView","isPartialEdit","customFieldRows","mostRecentRow","announce","canViewPasswords","hiddenFieldVisible","newFields","fieldView","patchCipher","addCustomField","AdditionalOptionsSectionComponent","additionalOptionsForm","passwordRepromptEnabled$","enabled$","customFieldsComponent","handleCustomFieldChange","numberOfCustomFields","CardDetailsSectionComponent","cardDetailsForm","cardBrands","expirationMonths","setInitialValues","getSectionHeading","logCardEvent","IdentitySectionComponent","identityForm","populateFormData","ItemDetailsSectionComponent","partialEdit","allowPersonalOwnership","showPersonalOwnerOption","itemDetailsForm","collectionOptions","readOnlyCollections","userEmail$","favoriteIcon","allowOwnershipChange","showOwnership","isEditingWithOrgs","isAdminConsoleEdit","defaultOwner","initFromExistingCipher","updateCollectionOptions","startingSelection","collectionsControl","showCollectionsControl","UriOptionComponent","defaultMatchDetection","toggleMatchDetection","showMatchDetection","matchDetectionSelect","uriLabel","toggleTitle","uriForm","matchDetection","inputElement","AutofillOptionsComponent","uriControls","autofillOptionsForm","defaultMatchDetection$","autofillOnPageLoadEnabled$","autofillOptions","updateDefaultAutofillLabel","uriOptions","initNewCipher","existingLogin","defaultOption","uriFieldValue","focusNewInput","TotpCaptureService","logVisibleEvent","LoginDetailsSectionComponent","canCaptureTotp","totpCaptureService","loginDetailsForm","hasPasskey","existingFido2Credentials","viewHiddenFields","generationService","passwordVisible","captureTotp","captureTotpSecret","newPasswordGenerated","newUsername","SshKeySectionComponent","sshKeyForm","CipherFormComponent","cipherForm","updatedCipherView","decryptCipher","formReadySubject","cipherSaved","invalidFieldsCount","countInvalidFields","beforeSubmit","savedCipher","TextDragDirective","onDragStart","dataTransfer","setData","AdditionalOptionsComponent","AttachmentsV2ViewComponent","subscribeToHasPremiumCheck","subscribeToOrgKey","hasPremium","openWebsite","AutofillOptionsViewComponent","selectedUri","ReadOnlyCipherCardComponent","formFields","CardDetailsComponent","setSectionTitle","conditional","logCopyEvent","CustomFieldV2Component","fieldOptions","getLinkedType","linkedType","ItemDetailsV2Component","hideOwner","ItemHistoryV2Component","viewPasswordHistoryService","isLogin","BitTotpCountdownComponent","sendCopyCode","formatTotpCode","clearTotp","pwToggleValue","getPremium","setTotpCopyCode","LoginCredentialsViewComponent","isPremium$","passwordRevealed","totpCodeCopyObj","SshKeyViewComponent","ViewIdentitySectionsComponent","showPersonalDetails","showIdentificationDetails","showContactDetails","hasPersonalDetails","hasIdentificationDetails","hasContactDetails","addressFields","addressRows","CipherViewComponent","loadCipherData","hasCard","hasLogin","hasAutofill","hasSshKey","folder$","DownloadAttachmentComponent","checkPwReprompt","OrgIconDirective","iconSize","orgIcon","tierType","CopyActions","protected","securityCode","hiddenField","CopyCipherFieldService","skipReprompt","totpAllowed","CopyCipherFieldDirective","copyCipherFieldService","menuItemDirective","getValueToCopy","updateDisabledState","CanDeleteCipherDirective","DeleteAttachmentComponent","onDeletionSuccess","removeAttachment","CipherAttachmentsComponent","onUploadSuccess","onRemoveSuccess","attachmentForm","fileInput","onFileChange","DefaultCipherFormGenerationService","DefaultCipherFormService","originalCollectionIds","newCollectionIds","CipherFormModule","CipherFormConfigService","DefaultCipherFormConfigService","allowPersonalOwnership$","PasswordGeneratorComponent","credentialType$","onAlgorithm","passwordOptions$","onCredentialTypeChanged","UsernameGeneratorComponent","typeOptions$","onCredentialGenerated","CipherFormGeneratorComponent","valueGenerated","generatedCred","CollectionAssignmentResult","MY_VAULT_ID","AssignCollectionsComponent","selectedOrgId","editableItemCountChange","transferWarningText","itemsCount","haveOrgName","personalItemsCount","moveToOrganization","isSingleOrgCipher","updateAssignedCollections","bulkUpdateCollections","sortItems","onlyPersonalItems","initializeItems","handleOrganizationCiphers","setupFormSubscriptions","selectCollections","updatedCollections","editableItemCount","selectCollectionsAssignedToSingleCipher","assignedCollectionIds","assignedCollections","readonlyItemCount","selectedOrgControl","getCollectionsForOrganization","shareableCiphers","selectedCollectionIds","isSingleCipherAdmin","PasswordHistoryViewComponent","NewDeviceVerificationNoticePageOneComponent","hasEmailAccess","currentEmail","newNoticeState","updateNewDeviceVerificationNoticeState","isDesktop","navigateToNewDeviceVerificationHelp","remindMeLaterSelect","NewDeviceVerificationNoticePageTwoComponent","permanentFlagEnabled","env$","isWeb","navigateToTwoStepLogin","fromNewDeviceVerification","navigateToChangeAcctEmail","selectText","DecryptionFailureDialogComponent","getSelection","removeAllRanges","createRange","selectNodeContents","addRange","openContactSupport","ExclamationTriangle","UserLock","NewDeviceVerificationNotice","NEW_DEVICE_VERIFICATION_NOTICE_KEY","NewDeviceVerificationNoticeService","noticeState","PasswordRepromptComponent","storedMasterKey","PasswordRepromptService","passwordRepromptCheck","ariaModal","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","exports","__webpack_modules__","O","chunkIds","notFulfilled","fulfilled","getter","__esModule","ns","def","getOwnPropertyNames","defineProperty","enumerable","chunkId","miniCssF","Function","hmd","done","needAttach","getElementsByTagName","charset","nc","onScriptComplete","doneFns","toStringTag","nmd","wasmModuleId","wasmModuleHash","importsObj","fallback","res","instantiateStreaming","scriptUrl","importScripts","currentScript","baseURI","installedChunks","installedChunkData","errorType","realSrc","webpackJsonpCallback","parentChunkLoadingFunction","moreModules","runtime","chunkLoadingGlobal","__webpack_exports__"],"sourceRoot":""}