@bitwarden/cli 2025.11.0 → 2025.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/bw.js CHANGED
@@ -6,7 +6,7 @@
6
6
  /***/ 330:
7
7
  /***/ ((module) => {
8
8
 
9
- module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.11.0","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"git+https://github.com/bitwarden/clients.git"},"license":"SEE LICENSE IN LICENSE.txt","scripts":{"clean":"rimraf dist","build:oss":"webpack","build:oss:debug":"npm run build:oss && node --inspect ./build/bw.js","build:oss:watch":"webpack --watch","build:oss:prod":"cross-env NODE_ENV=production webpack","build:oss:prod:watch":"cross-env NODE_ENV=production webpack --watch","debug":"node --inspect ./build/bw.js","publish:npm":"npm run build:oss:prod && npm publish --access public","build:bit":"webpack -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:debug":"npm run build:bit && node --inspect ./build/bw.js","build:bit:watch":"webpack --watch -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:prod":"cross-env NODE_ENV=production npm run build:bit","build:bit:prod:watch":"cross-env NODE_ENV=production npm run build:bit:watch","dist:oss:win":"npm run build:oss:prod && npm run clean && npm run package:oss:win","dist:oss:mac":"npm run build:oss:prod && npm run clean && npm run package:oss:mac","dist:oss:mac-arm64":"npm run build:oss:prod && npm run clean && npm run package:oss:mac-arm64","dist:oss:lin":"npm run build:oss:prod && npm run clean && npm run package:oss:lin","dist:oss:lin-arm64":"npm run build:oss:prod && npm run clean && npm run package:oss:lin-arm64","dist:bit:win":"npm run build:bit:prod && npm run clean && npm run package:bit:win","dist:bit:mac":"npm run build:bit:prod && npm run clean && npm run package:bit:mac","dist:bit:mac-arm64":"npm run build:bit:prod && npm run clean && npm run package:bit:mac-arm64","dist:bit:lin":"npm run build:bit:prod && npm run clean && npm run package:bit:lin","dist:bit:lin-arm64":"npm run build:bit:prod && npm run clean && npm run package:bit:lin-arm64","package:oss:win":"pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe","package:oss:mac":"pkg . --targets macos-x64 --output ./dist/oss/macos/bw","package:oss:mac-arm64":"pkg . --targets macos-arm64 --output ./dist/oss/macos-arm64/bw","package:oss:lin":"pkg . --targets linux-x64 --output ./dist/oss/linux/bw","package:oss:lin-arm64":"pkg . --targets linux-arm64 --output ./dist/oss/linux-arm64/bw","package:bit:win":"pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe","package:bit:mac":"pkg . --targets macos-x64 --output ./dist/bit/macos/bw","package:bit:mac-arm64":"pkg . --targets macos-arm64 --output ./dist/bit/macos-arm64/bw","package:bit:lin":"pkg . --targets linux-x64 --output ./dist/bit/linux/bw","package:bit:lin-arm64":"pkg . --targets linux-arm64 --output ./dist/bit/linux-arm64/bw","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":["./build/**/*"]},"dependencies":{"@koa/multer":"4.0.0","@koa/router":"14.0.0","big-integer":"1.6.52","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"14.0.0","core-js":"3.45.0","form-data":"4.0.4","https-proxy-agent":"7.0.6","inquirer":"8.2.6","jsdom":"26.1.0","jszip":"3.10.1","koa":"2.16.1","koa-bodyparser":"4.4.1","koa-json":"2.0.2","lowdb":"1.0.0","lunr":"2.3.9","multer":"2.0.2","node-fetch":"2.6.12","node-forge":"1.3.1","open":"10.1.2","papaparse":"5.5.3","proper-lockfile":"4.1.2","rxjs":"7.8.1","semver":"7.7.2","tldts":"7.0.1","zxcvbn":"4.4.2"}}');
9
+ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description":"A secure and free password manager for all of your devices.","version":"2025.12.0","keywords":["bitwarden","password","vault","password manager","cli"],"author":"Bitwarden Inc. <hello@bitwarden.com> (https://bitwarden.com)","homepage":"https://bitwarden.com","repository":{"type":"git","url":"git+https://github.com/bitwarden/clients.git"},"license":"SEE LICENSE IN LICENSE.txt","scripts":{"clean":"rimraf dist","build:oss":"webpack","build:oss:debug":"npm run build:oss && node --inspect ./build/bw.js","build:oss:watch":"webpack --watch","build:oss:prod":"cross-env NODE_ENV=production webpack","build:oss:prod:watch":"cross-env NODE_ENV=production webpack --watch","debug":"node --inspect ./build/bw.js","publish:npm":"npm run build:oss:prod && npm publish --access public","build:bit":"webpack -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:debug":"npm run build:bit && node --inspect ./build/bw.js","build:bit:watch":"webpack --watch -c ../../bitwarden_license/bit-cli/webpack.config.js","build:bit:prod":"cross-env NODE_ENV=production npm run build:bit","build:bit:prod:watch":"cross-env NODE_ENV=production npm run build:bit:watch","dist:oss:win":"npm run build:oss:prod && npm run clean && npm run package:oss:win","dist:oss:mac":"npm run build:oss:prod && npm run clean && npm run package:oss:mac","dist:oss:mac-arm64":"npm run build:oss:prod && npm run clean && npm run package:oss:mac-arm64","dist:oss:lin":"npm run build:oss:prod && npm run clean && npm run package:oss:lin","dist:oss:lin-arm64":"npm run build:oss:prod && npm run clean && npm run package:oss:lin-arm64","dist:bit:win":"npm run build:bit:prod && npm run clean && npm run package:bit:win","dist:bit:mac":"npm run build:bit:prod && npm run clean && npm run package:bit:mac","dist:bit:mac-arm64":"npm run build:bit:prod && npm run clean && npm run package:bit:mac-arm64","dist:bit:lin":"npm run build:bit:prod && npm run clean && npm run package:bit:lin","dist:bit:lin-arm64":"npm run build:bit:prod && npm run clean && npm run package:bit:lin-arm64","package:oss:win":"pkg . --targets win-x64 --output ./dist/oss/windows/bw.exe","package:oss:mac":"pkg . --targets macos-x64 --output ./dist/oss/macos/bw","package:oss:mac-arm64":"pkg . --targets macos-arm64 --output ./dist/oss/macos-arm64/bw","package:oss:lin":"pkg . --targets linux-x64 --output ./dist/oss/linux/bw","package:oss:lin-arm64":"pkg . --targets linux-arm64 --output ./dist/oss/linux-arm64/bw","package:bit:win":"pkg . --targets win-x64 --output ./dist/bit/windows/bw.exe","package:bit:mac":"pkg . --targets macos-x64 --output ./dist/bit/macos/bw","package:bit:mac-arm64":"pkg . --targets macos-arm64 --output ./dist/bit/macos-arm64/bw","package:bit:lin":"pkg . --targets linux-x64 --output ./dist/bit/linux/bw","package:bit:lin-arm64":"pkg . --targets linux-arm64 --output ./dist/bit/linux-arm64/bw","test":"jest","test:watch":"jest --watch","test:watch:all":"jest --watchAll"},"bin":{"bw":"build/bw.js"},"pkg":{"assets":["./build/**/*"]},"dependencies":{"@koa/multer":"4.0.0","@koa/router":"14.0.0","big-integer":"1.6.52","browser-hrtime":"1.1.8","chalk":"4.1.2","commander":"14.0.0","core-js":"3.45.0","form-data":"4.0.4","https-proxy-agent":"7.0.6","inquirer":"8.2.6","jsdom":"26.1.0","jszip":"3.10.1","koa":"2.16.3","koa-bodyparser":"4.4.1","koa-json":"2.0.2","lowdb":"1.0.0","lunr":"2.3.9","multer":"2.0.2","node-fetch":"2.6.12","node-forge":"1.3.2","open":"10.1.2","papaparse":"5.5.3","proper-lockfile":"4.1.2","rxjs":"7.8.1","semver":"7.7.3","tldts":"7.0.18","zxcvbn":"4.4.2"}}');
10
10
 
11
11
  /***/ }),
12
12
 
@@ -14,6 +14,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
14
14
  /***/ ((module, __webpack_exports__, __webpack_require__) => {
15
15
 
16
16
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17
+ /* harmony export */ $As: () => (/* binding */ __wbg_list_056c98609a1fb3ef),
17
18
  /* harmony export */ $Pc: () => (/* binding */ __wbg_new_8a6f238a6ece86ea),
18
19
  /* harmony export */ $yx: () => (/* binding */ __wbg___wbindgen_jsval_eq_6b13ab83478b1c50),
19
20
  /* harmony export */ Ajz: () => (/* binding */ __wbg_instanceof_ArrayBuffer_70beb1189ca63b38),
@@ -21,7 +22,6 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
21
22
  /* harmony export */ BI1: () => (/* binding */ __wbg_error_3e929987fcd3e155),
22
23
  /* harmony export */ BZb: () => (/* binding */ __wbindgen_object_clone_ref),
23
24
  /* harmony export */ BiA: () => (/* binding */ __wbg_target_1447f5d3a6fa6fe0),
24
- /* harmony export */ BrH: () => (/* binding */ __wbg_get_access_token_fb7908159e830dff),
25
25
  /* harmony export */ BtZ: () => (/* binding */ __wbg_length_cdd215e10d9dd507),
26
26
  /* harmony export */ C$D: () => (/* binding */ __wbg_info_68cd5b51ef7e5137),
27
27
  /* harmony export */ CAO: () => (/* binding */ __wbg_set_907fb406c34a251d),
@@ -39,24 +39,27 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
39
39
  /* harmony export */ Eip: () => (/* binding */ __wbg___wbindgen_is_object_c818261d21f283a4),
40
40
  /* harmony export */ Fxh: () => (/* binding */ __wbg_msCrypto_a61aeb35a24c1329),
41
41
  /* harmony export */ GPN: () => (/* binding */ __wbg_get_with_ref_key_1dc361bd10053bfe),
42
- /* harmony export */ GW_: () => (/* binding */ __wbg_get_905bbb36d78e816c),
43
42
  /* harmony export */ Geh: () => (/* binding */ init_sdk),
43
+ /* harmony export */ GgR: () => (/* binding */ __wbg_list_78accfdd0a91ad5f),
44
44
  /* harmony export */ GvV: () => (/* binding */ __wbg_append_b577eb3a177bc0fa),
45
45
  /* harmony export */ H4N: () => (/* binding */ __wbg___wbindgen_throw_b855445ff6a94295),
46
46
  /* harmony export */ HYJ: () => (/* binding */ __wbg_instanceof_WorkerGlobalScope_e31f49b6d33fcadd),
47
47
  /* harmony export */ HpL: () => (/* binding */ __wbg_new_5a79be3ab53b8aa5),
48
48
  /* harmony export */ HvI: () => (/* binding */ __wbg_ipcclientsubscription_new),
49
- /* harmony export */ I6p: () => (/* binding */ __wbindgen_cast_98de615b9dbdc064),
50
49
  /* harmony export */ I8U: () => (/* binding */ __wbg_instanceof_Uint8Array_20c8e73002f7af98),
51
50
  /* harmony export */ IEs: () => (/* binding */ PureCrypto),
52
51
  /* harmony export */ ISg: () => (/* binding */ __wbg_warn_8f5b5437666d0885),
53
52
  /* harmony export */ IZ7: () => (/* binding */ __wbg_randomFillSync_ac0988aba3254290),
54
53
  /* harmony export */ Ia5: () => (/* binding */ __wbg_get_7bed016f185add81),
54
+ /* harmony export */ Ilo: () => (/* binding */ __wbg_set_c2abbebe8b9ebee1),
55
55
  /* harmony export */ Ip3: () => (/* binding */ __wbg_set_variant_d1d41b778dfe9c17),
56
56
  /* harmony export */ ItQ: () => (/* binding */ __wbg_new_a7442b4b19c1a356),
57
+ /* harmony export */ Iv: () => (/* binding */ __wbg_get_ab3c82eecdf4bc91),
57
58
  /* harmony export */ Iwk: () => (/* binding */ __wbg_next_2c826fe5dfec6b6a),
59
+ /* harmony export */ Iy7: () => (/* binding */ __wbg_remove_7648970db543e157),
60
+ /* harmony export */ J5t: () => (/* binding */ __wbg_error_a7f8fbb0523dae15),
61
+ /* harmony export */ JME: () => (/* binding */ __wbg_warn_1d74dddbe2fd1dbb),
58
62
  /* harmony export */ JeQ: () => (/* binding */ __wbg_resolve_caf97c30b83f7053),
59
- /* harmony export */ JjT: () => (/* binding */ __wbindgen_cast_f31034722c398fdb),
60
63
  /* harmony export */ KTv: () => (/* binding */ __wbg_length_69bca3cb64fc8748),
61
64
  /* harmony export */ KwY: () => (/* binding */ __wbg_versions_c01dfd4722a88165),
62
65
  /* harmony export */ Lpo: () => (/* binding */ __wbg_abort_3b256cd5ad0ac232),
@@ -65,8 +68,10 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
65
68
  /* harmony export */ MVt: () => (/* binding */ __wbg_static_accessor_SELF_6fdf4b64710cc91b),
66
69
  /* harmony export */ MXC: () => (/* binding */ __wbg_abort_e7eb059f72f9ed0c),
67
70
  /* harmony export */ MpJ: () => (/* binding */ __wbg_entries_e171b586f8f6bdbf),
71
+ /* harmony export */ MtL: () => (/* binding */ __wbg_mark_05056c522bddc362),
68
72
  /* harmony export */ N0M: () => (/* binding */ __wbg_new_1acc0b6eea89d040),
69
73
  /* harmony export */ NJs: () => (/* binding */ __wbg_set_3f1d0b984ed272ed),
74
+ /* harmony export */ Nke: () => (/* binding */ __wbg_remove_2d6d9bd3eaac392b),
70
75
  /* harmony export */ O0Z: () => (/* binding */ __wbg_new_3c3d849046688a66),
71
76
  /* harmony export */ Oyk: () => (/* binding */ __wbg_String_8f0eb39a4a4c2f66),
72
77
  /* harmony export */ PQG: () => (/* binding */ __wbg_append_45ddba58b0706f62),
@@ -75,14 +80,13 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
75
80
  /* harmony export */ PrK: () => (/* binding */ __wbg_instanceof_Window_4846dbb3de56c84c),
76
81
  /* harmony export */ Q4Q: () => (/* binding */ __wbindgen_cast_cb9088102bce6b30),
77
82
  /* harmony export */ QGd: () => (/* binding */ __wbg_set_mode_52ef73cfa79639cb),
78
- /* harmony export */ RAF: () => (/* binding */ __wbg_folder_1f9f19453de069bd),
83
+ /* harmony export */ REh: () => (/* binding */ __wbindgen_cast_1e9dc1058b799ead),
79
84
  /* harmony export */ RLo: () => (/* binding */ __wbg_set_onerror_dc82fea584ffccaa),
80
85
  /* harmony export */ RS6: () => (/* binding */ __wbg_push_df81a39d04db858c),
81
86
  /* harmony export */ RV8: () => (/* binding */ __wbg___wbindgen_is_function_ee8a6c5833c90377),
82
87
  /* harmony export */ Rg: () => (/* binding */ __wbindgen_cast_9ae0607507abb057),
83
88
  /* harmony export */ Rhw: () => (/* binding */ __wbg___wbindgen_debug_string_df47ffb5e35e6763),
84
89
  /* harmony export */ Rto: () => (/* binding */ __wbg_name_3a33ad25b892b2dd),
85
- /* harmony export */ S4O: () => (/* binding */ __wbindgen_cast_91244c1b651c8ba8),
86
90
  /* harmony export */ SE3: () => (/* binding */ __wbg_append_892c5e2d5bdd60ac),
87
91
  /* harmony export */ S_8: () => (/* binding */ __wbg_new_68651c719dcda04e),
88
92
  /* harmony export */ SaD: () => (/* binding */ __wbg_set_c213c871859d6500),
@@ -94,19 +98,19 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
94
98
  /* harmony export */ V1r: () => (/* binding */ __wbg___wbindgen_is_string_fbb76cb2940daafd),
95
99
  /* harmony export */ VB8: () => (/* binding */ __wbg_then_4f46f6544e6b4a28),
96
100
  /* harmony export */ VO6: () => (/* binding */ __wbg___wbindgen_is_undefined_2d472862bd29a478),
97
- /* harmony export */ VsI: () => (/* binding */ __wbg_list_3ff9e942e0036bfb),
98
101
  /* harmony export */ W53: () => (/* binding */ __wbg_signal_4db5aa055bf9eb9a),
99
102
  /* harmony export */ WYM: () => (/* binding */ __wbg_error_7534b8e9a36f1ab4),
100
103
  /* harmony export */ WmO: () => (/* binding */ __wbg_then_70d05cf780a18d77),
101
104
  /* harmony export */ Wy_: () => (/* binding */ __wbg_instanceof_IdbRequest_26754883a3cc8f81),
102
105
  /* harmony export */ XKx: () => (/* binding */ __wbg_addEventListener_dc3da056b615f634),
106
+ /* harmony export */ XXv: () => (/* binding */ __wbindgen_cast_6b441f2e42512d6e),
107
+ /* harmony export */ YV2: () => (/* binding */ __wbg_info_e674a11f4f50cc0c),
103
108
  /* harmony export */ YVq: () => (/* binding */ __wbg_append_cb0bba4cf263a60b),
104
- /* harmony export */ Yse: () => (/* binding */ __wbindgen_cast_e904f2c9fda6146b),
105
109
  /* harmony export */ ZI_: () => (/* binding */ __wbg___wbindgen_jsval_loose_eq_b664b38a2f582147),
106
110
  /* harmony export */ ZT8: () => (/* binding */ __wbg_error_d8b22cf4e59a6791),
111
+ /* harmony export */ Z_s: () => (/* binding */ __wbg_cipher_1cdb0d79866a6837),
107
112
  /* harmony export */ _5w: () => (/* binding */ __wbg_result_25e75004b82b9830),
108
113
  /* harmony export */ _RG: () => (/* binding */ __wbg_static_accessor_WINDOW_b45bfc5a37f6cfa2),
109
- /* harmony export */ _ud: () => (/* binding */ __wbg_get_eb8ca7ea2e1397a3),
110
114
  /* harmony export */ a5H: () => (/* binding */ __wbg_getTime_14776bfb48a1bff9),
111
115
  /* harmony export */ aht: () => (/* binding */ __wbg_clearTimeout_b1115618e821c3b2),
112
116
  /* harmony export */ azX: () => (/* binding */ __wbindgen_cast_5fea77eff9dd275c),
@@ -115,25 +119,30 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
115
119
  /* harmony export */ bcK: () => (/* binding */ __wbg_set_headers_6926da238cd32ee4),
116
120
  /* harmony export */ bkt: () => (/* binding */ __wbindgen_object_drop_ref),
117
121
  /* harmony export */ bz7: () => (/* binding */ __wbg_setTimeout_ca12ead8b48245e2),
122
+ /* harmony export */ cEh: () => (/* binding */ __wbg_folder_bf0beccb0458352a),
123
+ /* harmony export */ cPU: () => (/* binding */ PasswordManagerClient),
118
124
  /* harmony export */ cXT: () => (/* binding */ __wbg_headers_b87d7eaba61c3278),
119
- /* harmony export */ clC: () => (/* binding */ __wbg_set_9006732dd4d65e3c),
120
125
  /* harmony export */ ctP: () => (/* binding */ __wbg_indexedDB_62bfbbd55ec74b14),
121
126
  /* harmony export */ dC$: () => (/* binding */ __wbg_instanceof_IdbDatabase_fcf75ffeeec3ec8c),
122
127
  /* harmony export */ dEp: () => (/* binding */ __wbg_instanceof_IdbOpenDbRequest_08e4929084e51476),
123
- /* harmony export */ dQr: () => (/* binding */ __wbg_remove_dc431ea3d4bc3b57),
128
+ /* harmony export */ d_O: () => (/* binding */ __wbg_measure_7728846525e2cced),
124
129
  /* harmony export */ eD1: () => (/* binding */ __wbg_value_692627309814bb8c),
130
+ /* harmony export */ eLG: () => (/* binding */ __wbg_mark_24a1a597f4f00679),
131
+ /* harmony export */ eaJ: () => (/* binding */ __wbg_create_f2b6bfa66a83e88e),
125
132
  /* harmony export */ ekg: () => (/* binding */ __wbg_set_type_63fa4c18251f6545),
133
+ /* harmony export */ fRO: () => (/* binding */ __wbg_set_7f395f02ecd2904e),
134
+ /* harmony export */ fWr: () => (/* binding */ __wbg_measure_0b7379f5cfacac6d),
126
135
  /* harmony export */ faW: () => (/* binding */ __wbg_new_e17d9f43105b08be),
127
136
  /* harmony export */ fgh: () => (/* binding */ __wbg_static_accessor_performance_da77b3a901a72934),
128
137
  /* harmony export */ g4C: () => (/* binding */ __wbg_text_dc33c15c17bdfb52),
129
138
  /* harmony export */ gN5: () => (/* binding */ __wbg_set_name_c0e2d6f348c746f4),
130
139
  /* harmony export */ gR3: () => (/* binding */ __wbg_new_with_str_and_init_0ae7728b6ec367b1),
131
- /* harmony export */ gae: () => (/* binding */ BitwardenClient),
132
140
  /* harmony export */ gkX: () => (/* binding */ isCryptoError),
133
141
  /* harmony export */ hEI: () => (/* binding */ __wbg_new_6f694bb0585846e0),
134
142
  /* harmony export */ hGK: () => (/* binding */ __wbg___wbindgen_is_bigint_cb320707dcd35f0b),
135
143
  /* harmony export */ hkC: () => (/* binding */ __wbg_new_no_args_ee98eee5275000a4),
136
144
  /* harmony export */ iSd: () => (/* binding */ __wbg_queueMicrotask_9d76cacb20c84d58),
145
+ /* harmony export */ ibl: () => (/* binding */ __wbindgen_cast_daac1d8e48fc3ba0),
137
146
  /* harmony export */ iqP: () => (/* binding */ __wbindgen_cast_ef90a087adb7475d),
138
147
  /* harmony export */ jQA: () => (/* binding */ __wbg_set_onsuccess_f367d002b462109e),
139
148
  /* harmony export */ jkw: () => (/* binding */ __wbg_url_b36d2a5008eb056f),
@@ -147,7 +156,9 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
147
156
  /* harmony export */ m9z: () => (/* binding */ __wbg_indexedDB_8b464318fe56681e),
148
157
  /* harmony export */ mEh: () => (/* binding */ __wbg_require_60cc747a6bc5215a),
149
158
  /* harmony export */ n0P: () => (/* binding */ __wbg_status_de7eed5a7a5bfd5d),
159
+ /* harmony export */ nJv: () => (/* binding */ __wbindgen_cast_d87bfd09ab1288e4),
150
160
  /* harmony export */ oKC: () => (/* binding */ __wbg___wbindgen_string_get_e4f06c90489ad01b),
161
+ /* harmony export */ og0: () => (/* binding */ __wbg_performance_121b9855d716e029),
151
162
  /* harmony export */ okU: () => (/* binding */ __wbg_has_787fafc980c3ccdb),
152
163
  /* harmony export */ okn: () => (/* binding */ __wbg___wbindgen_number_get_a20bf9b85341449d),
153
164
  /* harmony export */ oul: () => (/* binding */ __wbg_set_onupgradeneeded_0a519a73284a1418),
@@ -158,39 +169,38 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@bitwarden/cli","description"
158
169
  /* harmony export */ ps7: () => (/* binding */ __wbg_Error_e83987f665cf5504),
159
170
  /* harmony export */ px3: () => (/* binding */ __wbg_new_0_f9740686d739025c),
160
171
  /* harmony export */ q$k: () => (/* binding */ __wbg_static_accessor_GLOBAL_THIS_8b530f326a9e48ac),
172
+ /* harmony export */ q83: () => (/* binding */ __wbg_debug_f4b0c59db649db48),
161
173
  /* harmony export */ q8u: () => (/* binding */ __wbg___wbindgen_bigint_get_as_i64_f3ebc5a755000afd),
162
174
  /* harmony export */ qqE: () => (/* binding */ __wbg_set_body_3c365989753d61f4),
163
175
  /* harmony export */ qsA: () => (/* binding */ __wbg_preventDefault_1f362670ce7ef430),
164
- /* harmony export */ r7_: () => (/* binding */ __wbg_list_bdb6eec69b7ea3d2),
176
+ /* harmony export */ rlX: () => (/* binding */ __wbindgen_cast_c5e8bf91c85dc4ef),
165
177
  /* harmony export */ rqp: () => (/* binding */ __wbg_new_with_length_01aa0dc35aa13543),
166
178
  /* harmony export */ s5K: () => (/* binding */ __wbg_getRandomValues_38097e921c2494c3),
167
179
  /* harmony export */ sGC: () => (/* binding */ __wbg_new_from_slice_92f4d78ca282a2d2),
168
- /* harmony export */ sHQ: () => (/* binding */ __wbindgen_cast_36265b4dca1d434b),
169
180
  /* harmony export */ sPv: () => (/* binding */ __wbg_isArray_96e0af9891d0945d),
170
181
  /* harmony export */ sTy: () => (/* binding */ __wbg_createObjectStore_283a43a822bf49ca),
171
182
  /* harmony export */ sdu: () => (/* binding */ __wbindgen_cast_7a6d185652cd8149),
183
+ /* harmony export */ tY3: () => (/* binding */ __wbg_get_access_token_418fcb38cdc8413d),
172
184
  /* harmony export */ tff: () => (/* binding */ __wbg_collectionviewnodeitem_new),
173
185
  /* harmony export */ typ: () => (/* binding */ __wbg_getRandomValues_b8f5dbd5f3995a9e),
174
186
  /* harmony export */ tys: () => (/* binding */ __wbg_call_525440f72fbfc0ea),
175
187
  /* harmony export */ u4f: () => (/* binding */ __wbg_done_2042aa2670fb1db1),
188
+ /* harmony export */ uK7: () => (/* binding */ __wbg_get_1b7efe6c2c00e86d),
176
189
  /* harmony export */ uVl: () => (/* binding */ __wbg_now_f5ba683d8ce2c571),
177
- /* harmony export */ uy1: () => (/* binding */ __wbg_log_45eb3a49e7cdcb64),
178
- /* harmony export */ vBs: () => (/* binding */ __wbg_remove_33695adbdbc52a3e),
179
190
  /* harmony export */ vUh: () => (/* binding */ __wbg_new_f24b6d53abe5bc82),
180
191
  /* harmony export */ vh6: () => (/* binding */ __wbg_set_credentials_f621cd2d85c0c228),
192
+ /* harmony export */ wBj: () => (/* binding */ __wbg_set_5235cc0f26ed539b),
181
193
  /* harmony export */ x$X: () => (/* binding */ __wbg_stack_0ed75d68575b0f3c),
182
194
  /* harmony export */ x2q: () => (/* binding */ __wbg_process_dc0fbacc7c1c06f7),
183
195
  /* harmony export */ xFA: () => (/* binding */ __wbg_instanceof_Response_f4f3e87e07f3135c),
184
196
  /* harmony export */ xhx: () => (/* binding */ __wbg_fetch_f8ba0e29a9d6de0d),
185
- /* harmony export */ xiV: () => (/* binding */ __wbg_cipher_90da44fade4d7231),
186
197
  /* harmony export */ xiq: () => (/* binding */ __wbg_getFullYear_8240d5a15191feae),
187
198
  /* harmony export */ yM2: () => (/* binding */ __wbg_new_with_u8_array_sequence_and_options_0c1d0bd56d93d25a),
188
- /* harmony export */ yY_: () => (/* binding */ __wbg_set_33fa6c07f568d210),
189
199
  /* harmony export */ yle: () => (/* binding */ __wbindgen_cast_d6cd19b81560fd6e),
190
200
  /* harmony export */ ymW: () => (/* binding */ __wbg_new_2531773dac38ebb3),
191
201
  /* harmony export */ you: () => (/* binding */ __wbg_fetch_3afbdcc7ddbf16fe)
192
202
  /* harmony export */ });
193
- /* unused harmony exports set_log_level, generate_ssh_key, import_ssh_key, isTestError, isCollectionDecryptError, isMasterPasswordError, isDeriveKeyConnectorError, isEnrollAdminPasswordResetError, isCryptoClientError, isStatefulCryptoError, isEncryptionSettingsError, isExportError, isUsernameError, isPasswordError, ipcRegisterDiscoverHandler, ipcRequestDiscover, isChannelError, isDeserializeError, isRequestError, isTypedReceiveError, isReceiveError, isSubscribeError, isSshKeyExportError, isSshKeyImportError, isKeyGenerationError, isDatabaseError, isStateRegistryError, isCallError, isDecryptError, isEncryptError, isTotpError, isGetFolderError, isEditFolderError, isCreateFolderError, isCipherRiskError, isGetCipherError, isEditCipherError, isCreateCipherError, isCipherError, isDecryptFileError, isEncryptFileError, CardLinkedIdType, CipherRepromptType, CipherType, IdentityLinkedIdType, LogLevel, LoginLinkedIdType, SecureNoteType, UriMatchType, AttachmentsClient, AuthClient, CipherRiskClient, CiphersClient, CollectionViewNodeItem, CollectionViewTree, CollectionsClient, CommercialPasswordManagerClient, CommercialVaultClient, CryptoClient, ExporterClient, FoldersClient, GeneratorClient, IdentityClient, IncomingMessage, IpcClient, IpcClientSubscription, IpcCommunicationBackend, OutgoingMessage, PlatformClient, SendAccessClient, StateClient, TotpClient, VaultClient */
203
+ /* unused harmony exports generate_ssh_key, import_ssh_key, isTestError, isCollectionDecryptError, isMasterPasswordError, isDeriveKeyConnectorError, isEnrollAdminPasswordResetError, isCryptoClientError, isStatefulCryptoError, isEncryptionSettingsError, isExportError, isUsernameError, isPasswordError, ipcRegisterDiscoverHandler, ipcRequestDiscover, isChannelError, isDeserializeError, isRequestError, isTypedReceiveError, isReceiveError, isSubscribeError, isSshKeyExportError, isSshKeyImportError, isKeyGenerationError, isDatabaseError, isStateRegistryError, isCallError, isDecryptError, isEncryptError, isTotpError, isGetFolderError, isEditFolderError, isCreateFolderError, isCipherRiskError, isGetCipherError, isEditCipherError, isCreateCipherError, isCipherError, isDecryptFileError, isEncryptFileError, CardLinkedIdType, CipherRepromptType, CipherType, IdentityLinkedIdType, LogLevel, LoginLinkedIdType, RsaError, SecureNoteType, UriMatchType, AttachmentsClient, AuthClient, CipherRiskClient, CiphersClient, CollectionViewNodeItem, CollectionViewTree, CollectionsClient, CommercialPasswordManagerClient, CommercialVaultClient, CryptoClient, ExporterClient, FoldersClient, GeneratorClient, IdentityClient, IncomingMessage, IpcClient, IpcClientSubscription, IpcCommunicationBackend, OutgoingMessage, PlatformClient, SendAccessClient, StateClient, TotpClient, VaultClient */
194
204
  /* module decorator */ module = __webpack_require__.hmd(module);
195
205
  let wasm;
196
206
  function __wbg_set_wasm(val) {
@@ -450,13 +460,6 @@ function getArrayJsValueFromWasm0(ptr, len) {
450
460
  }
451
461
  return result;
452
462
  }
453
- /**
454
- * @param {LogLevel} level
455
- */
456
- function set_log_level(level) {
457
- wasm.set_log_level(level);
458
- }
459
-
460
463
  /**
461
464
  * @param {LogLevel | null} [log_level]
462
465
  */
@@ -1069,22 +1072,10 @@ function isEncryptFileError(error) {
1069
1072
  }
1070
1073
  }
1071
1074
 
1072
- function wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1) {
1073
- wasm.wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01(arg0, arg1);
1074
- }
1075
-
1076
- function wasm_bindgen__convert__closures_____invoke__h4f8d9ba9b5b9a009(arg0, arg1, arg2) {
1077
- wasm.wasm_bindgen__convert__closures_____invoke__h4f8d9ba9b5b9a009(
1078
- arg0,
1079
- arg1,
1080
- addHeapObject(arg2),
1081
- );
1082
- }
1083
-
1084
- function wasm_bindgen__convert__closures_____invoke__hf869d8564f5adb52(arg0, arg1, arg2) {
1075
+ function wasm_bindgen__convert__closures_____invoke__hbc1220c6b5cbd1c8(arg0, arg1, arg2) {
1085
1076
  try {
1086
1077
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1087
- wasm.wasm_bindgen__convert__closures_____invoke__hf869d8564f5adb52(
1078
+ wasm.wasm_bindgen__convert__closures_____invoke__hbc1220c6b5cbd1c8(
1088
1079
  retptr,
1089
1080
  arg0,
1090
1081
  arg1,
@@ -1100,8 +1091,20 @@ function wasm_bindgen__convert__closures_____invoke__hf869d8564f5adb52(arg0, arg
1100
1091
  }
1101
1092
  }
1102
1093
 
1103
- function wasm_bindgen__convert__closures_____invoke__h4096c3b930b983e7(arg0, arg1, arg2, arg3) {
1104
- wasm.wasm_bindgen__convert__closures_____invoke__h4096c3b930b983e7(
1094
+ function wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1) {
1095
+ wasm.wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e(arg0, arg1);
1096
+ }
1097
+
1098
+ function wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(arg0, arg1, arg2) {
1099
+ wasm.wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5(
1100
+ arg0,
1101
+ arg1,
1102
+ addHeapObject(arg2),
1103
+ );
1104
+ }
1105
+
1106
+ function wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(arg0, arg1, arg2, arg3) {
1107
+ wasm.wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
1105
1108
  arg0,
1106
1109
  arg1,
1107
1110
  addHeapObject(arg2),
@@ -1243,6 +1246,19 @@ const LoginLinkedIdType = Object.freeze({
1243
1246
  Password: 101,
1244
1247
  101: "Password",
1245
1248
  });
1249
+ /**
1250
+ * @enum {0 | 1 | 2 | 3}
1251
+ */
1252
+ const RsaError = Object.freeze({
1253
+ Decryption: 0,
1254
+ 0: "Decryption",
1255
+ Encryption: 1,
1256
+ 1: "Encryption",
1257
+ KeyParse: 2,
1258
+ 2: "KeyParse",
1259
+ KeySerialize: 3,
1260
+ 3: "KeySerialize",
1261
+ });
1246
1262
  /**
1247
1263
  * @enum {0}
1248
1264
  */
@@ -1379,171 +1395,6 @@ class AuthClient {
1379
1395
  }
1380
1396
  if (Symbol.dispose) AuthClient.prototype[Symbol.dispose] = AuthClient.prototype.free;
1381
1397
 
1382
- const BitwardenClientFinalization =
1383
- typeof FinalizationRegistry === "undefined"
1384
- ? { register: () => {}, unregister: () => {} }
1385
- : new FinalizationRegistry((ptr) => wasm.__wbg_bitwardenclient_free(ptr >>> 0, 1));
1386
- /**
1387
- * The main entry point for the Bitwarden SDK in WebAssembly environments
1388
- */
1389
- class BitwardenClient {
1390
- __destroy_into_raw() {
1391
- const ptr = this.__wbg_ptr;
1392
- this.__wbg_ptr = 0;
1393
- BitwardenClientFinalization.unregister(this);
1394
- return ptr;
1395
- }
1396
-
1397
- free() {
1398
- const ptr = this.__destroy_into_raw();
1399
- wasm.__wbg_bitwardenclient_free(ptr, 0);
1400
- }
1401
- /**
1402
- * Initialize a new instance of the SDK client
1403
- * @param {any} token_provider
1404
- * @param {ClientSettings | null} [settings]
1405
- */
1406
- constructor(token_provider, settings) {
1407
- const ret = wasm.bitwardenclient_new(
1408
- addHeapObject(token_provider),
1409
- isLikeNone(settings) ? 0 : addHeapObject(settings),
1410
- );
1411
- this.__wbg_ptr = ret >>> 0;
1412
- BitwardenClientFinalization.register(this, this.__wbg_ptr, this);
1413
- return this;
1414
- }
1415
- /**
1416
- * Test method, echoes back the input
1417
- * @param {string} msg
1418
- * @returns {string}
1419
- */
1420
- echo(msg) {
1421
- let deferred2_0;
1422
- let deferred2_1;
1423
- try {
1424
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1425
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1426
- const len0 = WASM_VECTOR_LEN;
1427
- wasm.bitwardenclient_echo(retptr, this.__wbg_ptr, ptr0, len0);
1428
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1429
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1430
- deferred2_0 = r0;
1431
- deferred2_1 = r1;
1432
- return getStringFromWasm0(r0, r1);
1433
- } finally {
1434
- wasm.__wbindgen_add_to_stack_pointer(16);
1435
- wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
1436
- }
1437
- }
1438
- /**
1439
- * Returns the current SDK version
1440
- * @returns {string}
1441
- */
1442
- version() {
1443
- let deferred1_0;
1444
- let deferred1_1;
1445
- try {
1446
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1447
- wasm.bitwardenclient_version(retptr, this.__wbg_ptr);
1448
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1449
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1450
- deferred1_0 = r0;
1451
- deferred1_1 = r1;
1452
- return getStringFromWasm0(r0, r1);
1453
- } finally {
1454
- wasm.__wbindgen_add_to_stack_pointer(16);
1455
- wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
1456
- }
1457
- }
1458
- /**
1459
- * Test method, always throws an error
1460
- * @param {string} msg
1461
- */
1462
- throw(msg) {
1463
- try {
1464
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1465
- const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1466
- const len0 = WASM_VECTOR_LEN;
1467
- wasm.bitwardenclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
1468
- var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1469
- var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1470
- if (r1) {
1471
- throw takeObject(r0);
1472
- }
1473
- } finally {
1474
- wasm.__wbindgen_add_to_stack_pointer(16);
1475
- }
1476
- }
1477
- /**
1478
- * Test method, calls http endpoint
1479
- * @param {string} url
1480
- * @returns {Promise<string>}
1481
- */
1482
- http_get(url) {
1483
- const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1484
- const len0 = WASM_VECTOR_LEN;
1485
- const ret = wasm.bitwardenclient_http_get(this.__wbg_ptr, ptr0, len0);
1486
- return takeObject(ret);
1487
- }
1488
- /**
1489
- * Auth related operations.
1490
- * @returns {AuthClient}
1491
- */
1492
- auth() {
1493
- const ret = wasm.bitwardenclient_auth(this.__wbg_ptr);
1494
- return AuthClient.__wrap(ret);
1495
- }
1496
- /**
1497
- * Bitwarden licensed operations.
1498
- * @returns {CommercialPasswordManagerClient}
1499
- */
1500
- commercial() {
1501
- const ret = wasm.bitwardenclient_commercial(this.__wbg_ptr);
1502
- return CommercialPasswordManagerClient.__wrap(ret);
1503
- }
1504
- /**
1505
- * Crypto related operations.
1506
- * @returns {CryptoClient}
1507
- */
1508
- crypto() {
1509
- const ret = wasm.bitwardenclient_crypto(this.__wbg_ptr);
1510
- return CryptoClient.__wrap(ret);
1511
- }
1512
- /**
1513
- * Vault item related operations.
1514
- * @returns {VaultClient}
1515
- */
1516
- vault() {
1517
- const ret = wasm.bitwardenclient_vault(this.__wbg_ptr);
1518
- return VaultClient.__wrap(ret);
1519
- }
1520
- /**
1521
- * Constructs a specific client for platform-specific functionality
1522
- * @returns {PlatformClient}
1523
- */
1524
- platform() {
1525
- const ret = wasm.bitwardenclient_platform(this.__wbg_ptr);
1526
- return PlatformClient.__wrap(ret);
1527
- }
1528
- /**
1529
- * Constructs a specific client for generating passwords and passphrases
1530
- * @returns {GeneratorClient}
1531
- */
1532
- generator() {
1533
- const ret = wasm.bitwardenclient_generator(this.__wbg_ptr);
1534
- return GeneratorClient.__wrap(ret);
1535
- }
1536
- /**
1537
- * Exporter related operations.
1538
- * @returns {ExporterClient}
1539
- */
1540
- exporters() {
1541
- const ret = wasm.bitwardenclient_exporters(this.__wbg_ptr);
1542
- return ExporterClient.__wrap(ret);
1543
- }
1544
- }
1545
- if (Symbol.dispose) BitwardenClient.prototype[Symbol.dispose] = BitwardenClient.prototype.free;
1546
-
1547
1398
  const CipherRiskClientFinalization =
1548
1399
  typeof FinalizationRegistry === "undefined"
1549
1400
  ? { register: () => {}, unregister: () => {} }
@@ -3108,6 +2959,14 @@ const IpcClientFinalization =
3108
2959
  * [IpcClient] documentation.
3109
2960
  */
3110
2961
  class IpcClient {
2962
+ static __wrap(ptr) {
2963
+ ptr = ptr >>> 0;
2964
+ const obj = Object.create(IpcClient.prototype);
2965
+ obj.__wbg_ptr = ptr;
2966
+ IpcClientFinalization.register(obj, obj.__wbg_ptr, obj);
2967
+ return obj;
2968
+ }
2969
+
3111
2970
  __destroy_into_raw() {
3112
2971
  const ptr = this.__wbg_ptr;
3113
2972
  this.__wbg_ptr = 0;
@@ -3120,14 +2979,30 @@ class IpcClient {
3120
2979
  wasm.__wbg_ipcclient_free(ptr, 0);
3121
2980
  }
3122
2981
  /**
2982
+ * Create a new `IpcClient` instance with an in-memory session repository for saving
2983
+ * sessions within the SDK.
3123
2984
  * @param {IpcCommunicationBackend} communication_provider
2985
+ * @returns {IpcClient}
3124
2986
  */
3125
- constructor(communication_provider) {
2987
+ static newWithSdkInMemorySessions(communication_provider) {
3126
2988
  _assertClass(communication_provider, IpcCommunicationBackend);
3127
- const ret = wasm.ipcclient_new(communication_provider.__wbg_ptr);
3128
- this.__wbg_ptr = ret >>> 0;
3129
- IpcClientFinalization.register(this, this.__wbg_ptr, this);
3130
- return this;
2989
+ const ret = wasm.ipcclient_newWithSdkInMemorySessions(communication_provider.__wbg_ptr);
2990
+ return IpcClient.__wrap(ret);
2991
+ }
2992
+ /**
2993
+ * Create a new `IpcClient` instance with a client-managed session repository for saving
2994
+ * sessions using State Provider.
2995
+ * @param {IpcCommunicationBackend} communication_provider
2996
+ * @param {IpcSessionRepository} session_repository
2997
+ * @returns {IpcClient}
2998
+ */
2999
+ static newWithClientManagedSessions(communication_provider, session_repository) {
3000
+ _assertClass(communication_provider, IpcCommunicationBackend);
3001
+ const ret = wasm.ipcclient_newWithClientManagedSessions(
3002
+ communication_provider.__wbg_ptr,
3003
+ addHeapObject(session_repository),
3004
+ );
3005
+ return IpcClient.__wrap(ret);
3131
3006
  }
3132
3007
  /**
3133
3008
  * @returns {Promise<void>}
@@ -3401,6 +3276,172 @@ class OutgoingMessage {
3401
3276
  }
3402
3277
  if (Symbol.dispose) OutgoingMessage.prototype[Symbol.dispose] = OutgoingMessage.prototype.free;
3403
3278
 
3279
+ const PasswordManagerClientFinalization =
3280
+ typeof FinalizationRegistry === "undefined"
3281
+ ? { register: () => {}, unregister: () => {} }
3282
+ : new FinalizationRegistry((ptr) => wasm.__wbg_passwordmanagerclient_free(ptr >>> 0, 1));
3283
+ /**
3284
+ * The main entry point for the Bitwarden SDK in WebAssembly environments
3285
+ */
3286
+ class PasswordManagerClient {
3287
+ __destroy_into_raw() {
3288
+ const ptr = this.__wbg_ptr;
3289
+ this.__wbg_ptr = 0;
3290
+ PasswordManagerClientFinalization.unregister(this);
3291
+ return ptr;
3292
+ }
3293
+
3294
+ free() {
3295
+ const ptr = this.__destroy_into_raw();
3296
+ wasm.__wbg_passwordmanagerclient_free(ptr, 0);
3297
+ }
3298
+ /**
3299
+ * Initialize a new instance of the SDK client
3300
+ * @param {any} token_provider
3301
+ * @param {ClientSettings | null} [settings]
3302
+ */
3303
+ constructor(token_provider, settings) {
3304
+ const ret = wasm.passwordmanagerclient_new(
3305
+ addHeapObject(token_provider),
3306
+ isLikeNone(settings) ? 0 : addHeapObject(settings),
3307
+ );
3308
+ this.__wbg_ptr = ret >>> 0;
3309
+ PasswordManagerClientFinalization.register(this, this.__wbg_ptr, this);
3310
+ return this;
3311
+ }
3312
+ /**
3313
+ * Test method, echoes back the input
3314
+ * @param {string} msg
3315
+ * @returns {string}
3316
+ */
3317
+ echo(msg) {
3318
+ let deferred2_0;
3319
+ let deferred2_1;
3320
+ try {
3321
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3322
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3323
+ const len0 = WASM_VECTOR_LEN;
3324
+ wasm.passwordmanagerclient_echo(retptr, this.__wbg_ptr, ptr0, len0);
3325
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3326
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3327
+ deferred2_0 = r0;
3328
+ deferred2_1 = r1;
3329
+ return getStringFromWasm0(r0, r1);
3330
+ } finally {
3331
+ wasm.__wbindgen_add_to_stack_pointer(16);
3332
+ wasm.__wbindgen_free(deferred2_0, deferred2_1, 1);
3333
+ }
3334
+ }
3335
+ /**
3336
+ * Returns the current SDK version
3337
+ * @returns {string}
3338
+ */
3339
+ version() {
3340
+ let deferred1_0;
3341
+ let deferred1_1;
3342
+ try {
3343
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3344
+ wasm.passwordmanagerclient_version(retptr, this.__wbg_ptr);
3345
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3346
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3347
+ deferred1_0 = r0;
3348
+ deferred1_1 = r1;
3349
+ return getStringFromWasm0(r0, r1);
3350
+ } finally {
3351
+ wasm.__wbindgen_add_to_stack_pointer(16);
3352
+ wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
3353
+ }
3354
+ }
3355
+ /**
3356
+ * Test method, always throws an error
3357
+ * @param {string} msg
3358
+ */
3359
+ throw(msg) {
3360
+ try {
3361
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
3362
+ const ptr0 = passStringToWasm0(msg, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3363
+ const len0 = WASM_VECTOR_LEN;
3364
+ wasm.passwordmanagerclient_throw(retptr, this.__wbg_ptr, ptr0, len0);
3365
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
3366
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
3367
+ if (r1) {
3368
+ throw takeObject(r0);
3369
+ }
3370
+ } finally {
3371
+ wasm.__wbindgen_add_to_stack_pointer(16);
3372
+ }
3373
+ }
3374
+ /**
3375
+ * Test method, calls http endpoint
3376
+ * @param {string} url
3377
+ * @returns {Promise<string>}
3378
+ */
3379
+ http_get(url) {
3380
+ const ptr0 = passStringToWasm0(url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
3381
+ const len0 = WASM_VECTOR_LEN;
3382
+ const ret = wasm.passwordmanagerclient_http_get(this.__wbg_ptr, ptr0, len0);
3383
+ return takeObject(ret);
3384
+ }
3385
+ /**
3386
+ * Auth related operations.
3387
+ * @returns {AuthClient}
3388
+ */
3389
+ auth() {
3390
+ const ret = wasm.passwordmanagerclient_auth(this.__wbg_ptr);
3391
+ return AuthClient.__wrap(ret);
3392
+ }
3393
+ /**
3394
+ * Bitwarden licensed operations.
3395
+ * @returns {CommercialPasswordManagerClient}
3396
+ */
3397
+ commercial() {
3398
+ const ret = wasm.passwordmanagerclient_commercial(this.__wbg_ptr);
3399
+ return CommercialPasswordManagerClient.__wrap(ret);
3400
+ }
3401
+ /**
3402
+ * Crypto related operations.
3403
+ * @returns {CryptoClient}
3404
+ */
3405
+ crypto() {
3406
+ const ret = wasm.passwordmanagerclient_crypto(this.__wbg_ptr);
3407
+ return CryptoClient.__wrap(ret);
3408
+ }
3409
+ /**
3410
+ * Vault item related operations.
3411
+ * @returns {VaultClient}
3412
+ */
3413
+ vault() {
3414
+ const ret = wasm.passwordmanagerclient_vault(this.__wbg_ptr);
3415
+ return VaultClient.__wrap(ret);
3416
+ }
3417
+ /**
3418
+ * Constructs a specific client for platform-specific functionality
3419
+ * @returns {PlatformClient}
3420
+ */
3421
+ platform() {
3422
+ const ret = wasm.passwordmanagerclient_platform(this.__wbg_ptr);
3423
+ return PlatformClient.__wrap(ret);
3424
+ }
3425
+ /**
3426
+ * Constructs a specific client for generating passwords and passphrases
3427
+ * @returns {GeneratorClient}
3428
+ */
3429
+ generator() {
3430
+ const ret = wasm.passwordmanagerclient_generator(this.__wbg_ptr);
3431
+ return GeneratorClient.__wrap(ret);
3432
+ }
3433
+ /**
3434
+ * Exporter related operations.
3435
+ * @returns {ExporterClient}
3436
+ */
3437
+ exporters() {
3438
+ const ret = wasm.passwordmanagerclient_exporters(this.__wbg_ptr);
3439
+ return ExporterClient.__wrap(ret);
3440
+ }
3441
+ }
3442
+ if (Symbol.dispose)
3443
+ PasswordManagerClient.prototype[Symbol.dispose] = PasswordManagerClient.prototype.free;
3444
+
3404
3445
  const PlatformClientFinalization =
3405
3446
  typeof FinalizationRegistry === "undefined"
3406
3447
  ? { register: () => {}, unregister: () => {} }
@@ -3430,7 +3471,7 @@ class PlatformClient {
3430
3471
  * @returns {StateClient}
3431
3472
  */
3432
3473
  state() {
3433
- const ret = wasm.bitwardenclient_platform(this.__wbg_ptr);
3474
+ const ret = wasm.passwordmanagerclient_platform(this.__wbg_ptr);
3434
3475
  return StateClient.__wrap(ret);
3435
3476
  }
3436
3477
  /**
@@ -4266,6 +4307,110 @@ class PureCrypto {
4266
4307
  wasm.__wbindgen_add_to_stack_pointer(16);
4267
4308
  }
4268
4309
  }
4310
+ /**
4311
+ * Given a decrypted private RSA key PKCS8 DER this
4312
+ * returns the corresponding public RSA key in DER format.
4313
+ * @param {Uint8Array} private_key
4314
+ * @returns {Uint8Array}
4315
+ */
4316
+ static rsa_extract_public_key(private_key) {
4317
+ try {
4318
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4319
+ const ptr0 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);
4320
+ const len0 = WASM_VECTOR_LEN;
4321
+ wasm.purecrypto_rsa_extract_public_key(retptr, ptr0, len0);
4322
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4323
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4324
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4325
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4326
+ if (r3) {
4327
+ throw takeObject(r2);
4328
+ }
4329
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
4330
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4331
+ return v2;
4332
+ } finally {
4333
+ wasm.__wbindgen_add_to_stack_pointer(16);
4334
+ }
4335
+ }
4336
+ /**
4337
+ * Generates a new RSA key pair and returns the private key
4338
+ * @returns {Uint8Array}
4339
+ */
4340
+ static rsa_generate_keypair() {
4341
+ try {
4342
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4343
+ wasm.purecrypto_rsa_generate_keypair(retptr);
4344
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4345
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4346
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4347
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4348
+ if (r3) {
4349
+ throw takeObject(r2);
4350
+ }
4351
+ var v1 = getArrayU8FromWasm0(r0, r1).slice();
4352
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4353
+ return v1;
4354
+ } finally {
4355
+ wasm.__wbindgen_add_to_stack_pointer(16);
4356
+ }
4357
+ }
4358
+ /**
4359
+ * Decrypts data using RSAES-OAEP with SHA-1
4360
+ * @param {Uint8Array} encrypted_data
4361
+ * @param {Uint8Array} private_key
4362
+ * @returns {Uint8Array}
4363
+ */
4364
+ static rsa_decrypt_data(encrypted_data, private_key) {
4365
+ try {
4366
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4367
+ const ptr0 = passArray8ToWasm0(encrypted_data, wasm.__wbindgen_malloc);
4368
+ const len0 = WASM_VECTOR_LEN;
4369
+ const ptr1 = passArray8ToWasm0(private_key, wasm.__wbindgen_malloc);
4370
+ const len1 = WASM_VECTOR_LEN;
4371
+ wasm.purecrypto_rsa_decrypt_data(retptr, ptr0, len0, ptr1, len1);
4372
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4373
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4374
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4375
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4376
+ if (r3) {
4377
+ throw takeObject(r2);
4378
+ }
4379
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
4380
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4381
+ return v3;
4382
+ } finally {
4383
+ wasm.__wbindgen_add_to_stack_pointer(16);
4384
+ }
4385
+ }
4386
+ /**
4387
+ * Encrypts data using RSAES-OAEP with SHA-1
4388
+ * @param {Uint8Array} plain_data
4389
+ * @param {Uint8Array} public_key
4390
+ * @returns {Uint8Array}
4391
+ */
4392
+ static rsa_encrypt_data(plain_data, public_key) {
4393
+ try {
4394
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
4395
+ const ptr0 = passArray8ToWasm0(plain_data, wasm.__wbindgen_malloc);
4396
+ const len0 = WASM_VECTOR_LEN;
4397
+ const ptr1 = passArray8ToWasm0(public_key, wasm.__wbindgen_malloc);
4398
+ const len1 = WASM_VECTOR_LEN;
4399
+ wasm.purecrypto_rsa_encrypt_data(retptr, ptr0, len0, ptr1, len1);
4400
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
4401
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
4402
+ var r2 = getDataViewMemory0().getInt32(retptr + 4 * 2, true);
4403
+ var r3 = getDataViewMemory0().getInt32(retptr + 4 * 3, true);
4404
+ if (r3) {
4405
+ throw takeObject(r2);
4406
+ }
4407
+ var v3 = getArrayU8FromWasm0(r0, r1).slice();
4408
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
4409
+ return v3;
4410
+ } finally {
4411
+ wasm.__wbindgen_add_to_stack_pointer(16);
4412
+ }
4413
+ }
4269
4414
  }
4270
4415
  if (Symbol.dispose) PureCrypto.prototype[Symbol.dispose] = PureCrypto.prototype.free;
4271
4416
 
@@ -4683,7 +4828,7 @@ function __wbg_call_e762c39fa8ea36bf() {
4683
4828
  }, arguments);
4684
4829
  }
4685
4830
 
4686
- function __wbg_cipher_90da44fade4d7231(arg0) {
4831
+ function __wbg_cipher_1cdb0d79866a6837(arg0) {
4687
4832
  const ret = getObject(arg0).cipher;
4688
4833
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4689
4834
  }
@@ -4705,6 +4850,11 @@ function __wbg_createObjectStore_283a43a822bf49ca() {
4705
4850
  }, arguments);
4706
4851
  }
4707
4852
 
4853
+ function __wbg_create_f2b6bfa66a83e88e(arg0) {
4854
+ const ret = Object.create(getObject(arg0));
4855
+ return addHeapObject(ret);
4856
+ }
4857
+
4708
4858
  function __wbg_crypto_574e78ad8b13b65f(arg0) {
4709
4859
  const ret = getObject(arg0).crypto;
4710
4860
  return addHeapObject(ret);
@@ -4714,6 +4864,10 @@ function __wbg_debug_e55e1461940eb14d(arg0, arg1, arg2, arg3) {
4714
4864
  console.debug(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
4715
4865
  }
4716
4866
 
4867
+ function __wbg_debug_f4b0c59db649db48(arg0) {
4868
+ console.debug(getObject(arg0));
4869
+ }
4870
+
4717
4871
  function __wbg_deleteObjectStore_444a266b213fafcf() {
4718
4872
  return handleError(function (arg0, arg1, arg2) {
4719
4873
  getObject(arg0).deleteObjectStore(getStringFromWasm0(arg1, arg2));
@@ -4749,6 +4903,10 @@ function __wbg_error_7534b8e9a36f1ab4(arg0, arg1) {
4749
4903
  }
4750
4904
  }
4751
4905
 
4906
+ function __wbg_error_a7f8fbb0523dae15(arg0) {
4907
+ console.error(getObject(arg0));
4908
+ }
4909
+
4752
4910
  function __wbg_error_d8b22cf4e59a6791(arg0, arg1, arg2, arg3) {
4753
4911
  console.error(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
4754
4912
  }
@@ -4763,7 +4921,7 @@ function __wbg_fetch_f8ba0e29a9d6de0d(arg0, arg1) {
4763
4921
  return addHeapObject(ret);
4764
4922
  }
4765
4923
 
4766
- function __wbg_folder_1f9f19453de069bd(arg0) {
4924
+ function __wbg_folder_bf0beccb0458352a(arg0) {
4767
4925
  const ret = getObject(arg0).folder;
4768
4926
  return isLikeNone(ret) ? 0 : addHeapObject(ret);
4769
4927
  }
@@ -4790,12 +4948,7 @@ function __wbg_getTime_14776bfb48a1bff9(arg0) {
4790
4948
  return ret;
4791
4949
  }
4792
4950
 
4793
- function __wbg_get_7bed016f185add81(arg0, arg1) {
4794
- const ret = getObject(arg0)[arg1 >>> 0];
4795
- return addHeapObject(ret);
4796
- }
4797
-
4798
- function __wbg_get_905bbb36d78e816c() {
4951
+ function __wbg_get_1b7efe6c2c00e86d() {
4799
4952
  return handleError(function (arg0, arg1, arg2) {
4800
4953
  let deferred0_0;
4801
4954
  let deferred0_1;
@@ -4810,12 +4963,12 @@ function __wbg_get_905bbb36d78e816c() {
4810
4963
  }, arguments);
4811
4964
  }
4812
4965
 
4813
- function __wbg_get_access_token_fb7908159e830dff(arg0) {
4814
- const ret = getObject(arg0).get_access_token();
4966
+ function __wbg_get_7bed016f185add81(arg0, arg1) {
4967
+ const ret = getObject(arg0)[arg1 >>> 0];
4815
4968
  return addHeapObject(ret);
4816
4969
  }
4817
4970
 
4818
- function __wbg_get_eb8ca7ea2e1397a3() {
4971
+ function __wbg_get_ab3c82eecdf4bc91() {
4819
4972
  return handleError(function (arg0, arg1, arg2) {
4820
4973
  let deferred0_0;
4821
4974
  let deferred0_1;
@@ -4830,6 +4983,11 @@ function __wbg_get_eb8ca7ea2e1397a3() {
4830
4983
  }, arguments);
4831
4984
  }
4832
4985
 
4986
+ function __wbg_get_access_token_418fcb38cdc8413d(arg0) {
4987
+ const ret = getObject(arg0).get_access_token();
4988
+ return addHeapObject(ret);
4989
+ }
4990
+
4833
4991
  function __wbg_get_efcb449f58ec27c2() {
4834
4992
  return handleError(function (arg0, arg1) {
4835
4993
  const ret = Reflect.get(getObject(arg0), getObject(arg1));
@@ -4877,6 +5035,10 @@ function __wbg_info_68cd5b51ef7e5137(arg0, arg1, arg2, arg3) {
4877
5035
  console.info(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
4878
5036
  }
4879
5037
 
5038
+ function __wbg_info_e674a11f4f50cc0c(arg0) {
5039
+ console.info(getObject(arg0));
5040
+ }
5041
+
4880
5042
  function __wbg_instanceof_ArrayBuffer_70beb1189ca63b38(arg0) {
4881
5043
  let result;
4882
5044
  try {
@@ -5017,22 +5179,46 @@ function __wbg_length_cdd215e10d9dd507(arg0) {
5017
5179
  return ret;
5018
5180
  }
5019
5181
 
5020
- function __wbg_list_3ff9e942e0036bfb() {
5182
+ function __wbg_list_056c98609a1fb3ef() {
5021
5183
  return handleError(function (arg0) {
5022
5184
  const ret = getObject(arg0).list();
5023
5185
  return addHeapObject(ret);
5024
5186
  }, arguments);
5025
5187
  }
5026
5188
 
5027
- function __wbg_list_bdb6eec69b7ea3d2() {
5189
+ function __wbg_list_78accfdd0a91ad5f() {
5028
5190
  return handleError(function (arg0) {
5029
5191
  const ret = getObject(arg0).list();
5030
5192
  return addHeapObject(ret);
5031
5193
  }, arguments);
5032
5194
  }
5033
5195
 
5034
- function __wbg_log_45eb3a49e7cdcb64(arg0, arg1, arg2, arg3) {
5035
- console.log(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
5196
+ function __wbg_mark_05056c522bddc362() {
5197
+ return handleError(function (arg0, arg1, arg2) {
5198
+ getObject(arg0).mark(getStringFromWasm0(arg1, arg2));
5199
+ }, arguments);
5200
+ }
5201
+
5202
+ function __wbg_mark_24a1a597f4f00679() {
5203
+ return handleError(function (arg0, arg1, arg2, arg3) {
5204
+ getObject(arg0).mark(getStringFromWasm0(arg1, arg2), getObject(arg3));
5205
+ }, arguments);
5206
+ }
5207
+
5208
+ function __wbg_measure_0b7379f5cfacac6d() {
5209
+ return handleError(function (arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
5210
+ getObject(arg0).measure(
5211
+ getStringFromWasm0(arg1, arg2),
5212
+ getStringFromWasm0(arg3, arg4),
5213
+ getStringFromWasm0(arg5, arg6),
5214
+ );
5215
+ }, arguments);
5216
+ }
5217
+
5218
+ function __wbg_measure_7728846525e2cced() {
5219
+ return handleError(function (arg0, arg1, arg2, arg3) {
5220
+ getObject(arg0).measure(getStringFromWasm0(arg1, arg2), getObject(arg3));
5221
+ }, arguments);
5036
5222
  }
5037
5223
 
5038
5224
  function __wbg_msCrypto_a61aeb35a24c1329(arg0) {
@@ -5072,7 +5258,7 @@ function __wbg_new_3c3d849046688a66(arg0, arg1) {
5072
5258
  const a = state0.a;
5073
5259
  state0.a = 0;
5074
5260
  try {
5075
- return wasm_bindgen__convert__closures_____invoke__h4096c3b930b983e7(
5261
+ return wasm_bindgen__convert__closures_____invoke__h43dfd80678632d6f(
5076
5262
  a,
5077
5263
  state0.b,
5078
5264
  arg0,
@@ -5206,6 +5392,11 @@ function __wbg_parse_2a704d6b78abb2b8() {
5206
5392
  }, arguments);
5207
5393
  }
5208
5394
 
5395
+ function __wbg_performance_121b9855d716e029() {
5396
+ const ret = globalThis.performance;
5397
+ return addHeapObject(ret);
5398
+ }
5399
+
5209
5400
  function __wbg_preventDefault_1f362670ce7ef430(arg0) {
5210
5401
  getObject(arg0).preventDefault();
5211
5402
  }
@@ -5239,7 +5430,7 @@ function __wbg_randomFillSync_ac0988aba3254290() {
5239
5430
  }, arguments);
5240
5431
  }
5241
5432
 
5242
- function __wbg_remove_33695adbdbc52a3e() {
5433
+ function __wbg_remove_2d6d9bd3eaac392b() {
5243
5434
  return handleError(function (arg0, arg1, arg2) {
5244
5435
  let deferred0_0;
5245
5436
  let deferred0_1;
@@ -5254,7 +5445,7 @@ function __wbg_remove_33695adbdbc52a3e() {
5254
5445
  }, arguments);
5255
5446
  }
5256
5447
 
5257
- function __wbg_remove_dc431ea3d4bc3b57() {
5448
+ function __wbg_remove_7648970db543e157() {
5258
5449
  return handleError(function (arg0, arg1, arg2) {
5259
5450
  let deferred0_0;
5260
5451
  let deferred0_1;
@@ -5300,7 +5491,11 @@ function __wbg_setTimeout_ca12ead8b48245e2(arg0, arg1) {
5300
5491
  return addHeapObject(ret);
5301
5492
  }
5302
5493
 
5303
- function __wbg_set_33fa6c07f568d210() {
5494
+ function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5495
+ getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5496
+ }
5497
+
5498
+ function __wbg_set_5235cc0f26ed539b() {
5304
5499
  return handleError(function (arg0, arg1, arg2, arg3) {
5305
5500
  let deferred0_0;
5306
5501
  let deferred0_1;
@@ -5315,11 +5510,7 @@ function __wbg_set_33fa6c07f568d210() {
5315
5510
  }, arguments);
5316
5511
  }
5317
5512
 
5318
- function __wbg_set_3f1d0b984ed272ed(arg0, arg1, arg2) {
5319
- getObject(arg0)[takeObject(arg1)] = takeObject(arg2);
5320
- }
5321
-
5322
- function __wbg_set_9006732dd4d65e3c() {
5513
+ function __wbg_set_7f395f02ecd2904e() {
5323
5514
  return handleError(function (arg0, arg1, arg2, arg3) {
5324
5515
  let deferred0_0;
5325
5516
  let deferred0_1;
@@ -5347,6 +5538,13 @@ function __wbg_set_c213c871859d6500(arg0, arg1, arg2) {
5347
5538
  getObject(arg0)[arg1 >>> 0] = takeObject(arg2);
5348
5539
  }
5349
5540
 
5541
+ function __wbg_set_c2abbebe8b9ebee1() {
5542
+ return handleError(function (arg0, arg1, arg2) {
5543
+ const ret = Reflect.set(getObject(arg0), getObject(arg1), getObject(arg2));
5544
+ return ret;
5545
+ }, arguments);
5546
+ }
5547
+
5350
5548
  function __wbg_set_credentials_f621cd2d85c0c228(arg0, arg1) {
5351
5549
  getObject(arg0).credentials = __wbindgen_enum_RequestCredentials[arg1];
5352
5550
  }
@@ -5507,27 +5705,31 @@ function __wbg_versions_c01dfd4722a88165(arg0) {
5507
5705
  return addHeapObject(ret);
5508
5706
  }
5509
5707
 
5510
- function __wbg_warn_8f5b5437666d0885(arg0, arg1, arg2, arg3) {
5511
- console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
5708
+ function __wbg_warn_1d74dddbe2fd1dbb(arg0) {
5709
+ console.warn(getObject(arg0));
5512
5710
  }
5513
5711
 
5514
- function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
5515
- // Cast intrinsic for `Ref(String) -> Externref`.
5516
- const ret = getStringFromWasm0(arg0, arg1);
5517
- return addHeapObject(ret);
5712
+ function __wbg_warn_8f5b5437666d0885(arg0, arg1, arg2, arg3) {
5713
+ console.warn(getObject(arg0), getObject(arg1), getObject(arg2), getObject(arg3));
5518
5714
  }
5519
5715
 
5520
- function __wbindgen_cast_36265b4dca1d434b(arg0, arg1) {
5521
- // Cast intrinsic for `Closure(Closure { dtor_idx: 268, function: Function { arguments: [], shim_idx: 269, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5716
+ function __wbindgen_cast_1e9dc1058b799ead(arg0, arg1) {
5717
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 42, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5522
5718
  const ret = makeMutClosure(
5523
5719
  arg0,
5524
5720
  arg1,
5525
- wasm.wasm_bindgen__closure__destroy__h04ff7fddf688fec6,
5526
- wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01,
5721
+ wasm.wasm_bindgen__closure__destroy__h6cdc1ac3a8dcb5bd,
5722
+ wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5,
5527
5723
  );
5528
5724
  return addHeapObject(ret);
5529
5725
  }
5530
5726
 
5727
+ function __wbindgen_cast_2241b6af4c4b2941(arg0, arg1) {
5728
+ // Cast intrinsic for `Ref(String) -> Externref`.
5729
+ const ret = getStringFromWasm0(arg0, arg1);
5730
+ return addHeapObject(ret);
5731
+ }
5732
+
5531
5733
  function __wbindgen_cast_4625c577ab2ec9ee(arg0) {
5532
5734
  // Cast intrinsic for `U64 -> Externref`.
5533
5735
  const ret = BigInt.asUintN(64, arg0);
@@ -5542,6 +5744,17 @@ function __wbindgen_cast_5fea77eff9dd275c(arg0, arg1) {
5542
5744
  return addHeapObject(ret);
5543
5745
  }
5544
5746
 
5747
+ function __wbindgen_cast_6b441f2e42512d6e(arg0, arg1) {
5748
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 545, function: Function { arguments: [], shim_idx: 299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5749
+ const ret = makeMutClosure(
5750
+ arg0,
5751
+ arg1,
5752
+ wasm.wasm_bindgen__closure__destroy__hfcb631b72e5e985c,
5753
+ wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e,
5754
+ );
5755
+ return addHeapObject(ret);
5756
+ }
5757
+
5545
5758
  function __wbindgen_cast_7a6d185652cd8149(arg0, arg1) {
5546
5759
  var v0 = getArrayJsValueFromWasm0(arg0, arg1).slice();
5547
5760
  wasm.__wbindgen_free(arg0, arg1 * 4, 4);
@@ -5550,34 +5763,23 @@ function __wbindgen_cast_7a6d185652cd8149(arg0, arg1) {
5550
5763
  return addHeapObject(ret);
5551
5764
  }
5552
5765
 
5553
- function __wbindgen_cast_91244c1b651c8ba8(arg0, arg1) {
5554
- // Cast intrinsic for `Closure(Closure { dtor_idx: 5, function: Function { arguments: [NamedExternref("IDBVersionChangeEvent")], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5555
- const ret = makeMutClosure(
5556
- arg0,
5557
- arg1,
5558
- wasm.wasm_bindgen__closure__destroy__h7b7f88151484c167,
5559
- wasm_bindgen__convert__closures_____invoke__h4f8d9ba9b5b9a009,
5560
- );
5766
+ function __wbindgen_cast_9ae0607507abb057(arg0) {
5767
+ // Cast intrinsic for `I64 -> Externref`.
5768
+ const ret = arg0;
5561
5769
  return addHeapObject(ret);
5562
5770
  }
5563
5771
 
5564
- function __wbindgen_cast_98de615b9dbdc064(arg0, arg1) {
5565
- // Cast intrinsic for `Closure(Closure { dtor_idx: 268, function: Function { arguments: [Externref], shim_idx: 6, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5772
+ function __wbindgen_cast_c5e8bf91c85dc4ef(arg0, arg1) {
5773
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 298, function: Function { arguments: [Externref], shim_idx: 42, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5566
5774
  const ret = makeMutClosure(
5567
5775
  arg0,
5568
5776
  arg1,
5569
- wasm.wasm_bindgen__closure__destroy__h04ff7fddf688fec6,
5570
- wasm_bindgen__convert__closures_____invoke__h4f8d9ba9b5b9a009,
5777
+ wasm.wasm_bindgen__closure__destroy__h5bf455f3385c4f71,
5778
+ wasm_bindgen__convert__closures_____invoke__hdc41283f124c06e5,
5571
5779
  );
5572
5780
  return addHeapObject(ret);
5573
5781
  }
5574
5782
 
5575
- function __wbindgen_cast_9ae0607507abb057(arg0) {
5576
- // Cast intrinsic for `I64 -> Externref`.
5577
- const ret = arg0;
5578
- return addHeapObject(ret);
5579
- }
5580
-
5581
5783
  function __wbindgen_cast_cb9088102bce6b30(arg0, arg1) {
5582
5784
  // Cast intrinsic for `Ref(Slice(U8)) -> NamedExternref("Uint8Array")`.
5583
5785
  const ret = getArrayU8FromWasm0(arg0, arg1);
@@ -5590,13 +5792,24 @@ function __wbindgen_cast_d6cd19b81560fd6e(arg0) {
5590
5792
  return addHeapObject(ret);
5591
5793
  }
5592
5794
 
5593
- function __wbindgen_cast_e904f2c9fda6146b(arg0, arg1) {
5594
- // Cast intrinsic for `Closure(Closure { dtor_idx: 5, function: Function { arguments: [NamedExternref("Event")], shim_idx: 8, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5795
+ function __wbindgen_cast_d87bfd09ab1288e4(arg0, arg1) {
5796
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 298, function: Function { arguments: [], shim_idx: 299, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5797
+ const ret = makeMutClosure(
5798
+ arg0,
5799
+ arg1,
5800
+ wasm.wasm_bindgen__closure__destroy__h5bf455f3385c4f71,
5801
+ wasm_bindgen__convert__closures_____invoke__h092300064b8afb1e,
5802
+ );
5803
+ return addHeapObject(ret);
5804
+ }
5805
+
5806
+ function __wbindgen_cast_daac1d8e48fc3ba0(arg0, arg1) {
5807
+ // Cast intrinsic for `Closure(Closure { dtor_idx: 41, function: Function { arguments: [NamedExternref("Event")], shim_idx: 44, ret: Result(Unit), inner_ret: Some(Result(Unit)) }, mutable: true }) -> Externref`.
5595
5808
  const ret = makeMutClosure(
5596
5809
  arg0,
5597
5810
  arg1,
5598
- wasm.wasm_bindgen__closure__destroy__h7b7f88151484c167,
5599
- wasm_bindgen__convert__closures_____invoke__hf869d8564f5adb52,
5811
+ wasm.wasm_bindgen__closure__destroy__h6cdc1ac3a8dcb5bd,
5812
+ wasm_bindgen__convert__closures_____invoke__hbc1220c6b5cbd1c8,
5600
5813
  );
5601
5814
  return addHeapObject(ret);
5602
5815
  }
@@ -5609,17 +5822,6 @@ function __wbindgen_cast_ef90a087adb7475d(arg0, arg1) {
5609
5822
  return addHeapObject(ret);
5610
5823
  }
5611
5824
 
5612
- function __wbindgen_cast_f31034722c398fdb(arg0, arg1) {
5613
- // Cast intrinsic for `Closure(Closure { dtor_idx: 520, function: Function { arguments: [], shim_idx: 269, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
5614
- const ret = makeMutClosure(
5615
- arg0,
5616
- arg1,
5617
- wasm.wasm_bindgen__closure__destroy__h1cce7ce4a094839d,
5618
- wasm_bindgen__convert__closures_____invoke__h76c71c1158b6af01,
5619
- );
5620
- return addHeapObject(ret);
5621
- }
5622
-
5623
5825
  function __wbindgen_object_clone_ref(arg0) {
5624
5826
  const ret = getObject(arg0);
5625
5827
  return addHeapObject(ret);
@@ -5755,8 +5957,8 @@ module.exports = require("url");
5755
5957
  /******/
5756
5958
  /******/ return new Promise(function (resolve, reject) {
5757
5959
  /******/ try {
5758
- /******/ var { readFile } = require('fs');
5759
- /******/ var { join } = require('path');
5960
+ /******/ var { readFile } = require("node:fs");
5961
+ /******/ var { join } = require("node:path");
5760
5962
  /******/
5761
5963
  /******/ readFile(join(__dirname, "" + wasmModuleHash + ".module.wasm"), function(err, buffer){
5762
5964
  /******/ if (err) return reject(err);
@@ -5804,7 +6006,10 @@ module.exports = require("url");
5804
6006
  /******/ // "1" is the signal for "already loaded"
5805
6007
  /******/ if(!installedChunks[chunkId]) {
5806
6008
  /******/ if(true) { // all chunks have JS
5807
- /******/ installChunk(require("./" + __webpack_require__.u(chunkId)));
6009
+ /******/ var installedChunk = require("./" + __webpack_require__.u(chunkId));
6010
+ /******/ if (!installedChunks[chunkId]) {
6011
+ /******/ installChunk(installedChunk);
6012
+ /******/ }
5808
6013
  /******/ } else installedChunks[chunkId] = 1;
5809
6014
  /******/ }
5810
6015
  /******/ };
@@ -5896,8 +6101,8 @@ var feature_flag_enum_FeatureFlag;
5896
6101
  /* Admin Console Team */
5897
6102
  FeatureFlag["CreateDefaultLocation"] = "pm-19467-create-default-location";
5898
6103
  FeatureFlag["AutoConfirm"] = "pm-19934-auto-confirm-organization-users";
6104
+ FeatureFlag["BlockClaimedDomainAccountCreation"] = "pm-28297-block-uninvited-claimed-domain-registration";
5899
6105
  /* Auth */
5900
- FeatureFlag["PM22110_DisableAlternateLoginMethods"] = "pm-22110-disable-alternate-login-methods";
5901
6106
  FeatureFlag["PM23801_PrefetchPasswordPrelogin"] = "pm-23801-prefetch-password-prelogin";
5902
6107
  /* Autofill */
5903
6108
  FeatureFlag["MacOsNativeCredentialSync"] = "macos-native-credential-sync";
@@ -5919,7 +6124,6 @@ var feature_flag_enum_FeatureFlag;
5919
6124
  FeatureFlag["EnrollAeadOnKeyRotation"] = "enroll-aead-on-key-rotation";
5920
6125
  FeatureFlag["ForceUpdateKDFSettings"] = "pm-18021-force-update-kdf-settings";
5921
6126
  FeatureFlag["PM25174_DisableType0Decryption"] = "pm-25174-disable-type-0-decryption";
5922
- FeatureFlag["WindowsBiometricsV2"] = "pm-25373-windows-biometrics-v2";
5923
6127
  FeatureFlag["LinuxBiometricsV2"] = "pm-26340-linux-biometrics-v2";
5924
6128
  FeatureFlag["UnlockWithMasterPasswordUnlockData"] = "pm-23246-unlock-with-master-password-unlock-data";
5925
6129
  FeatureFlag["NoLogoutOnKdfChange"] = "pm-23995-no-logout-on-kdf-change";
@@ -5940,12 +6144,15 @@ var feature_flag_enum_FeatureFlag;
5940
6144
  FeatureFlag["AutofillConfirmation"] = "pm-25083-autofill-confirm-from-search";
5941
6145
  FeatureFlag["RiskInsightsForPremium"] = "pm-23904-risk-insights-for-premium";
5942
6146
  FeatureFlag["VaultLoadingSkeletons"] = "pm-25081-vault-skeleton-loaders";
6147
+ FeatureFlag["BrowserPremiumSpotlight"] = "pm-23384-browser-premium-spotlight";
5943
6148
  /* Platform */
5944
6149
  FeatureFlag["IpcChannelFramework"] = "ipc-channel-framework";
5945
6150
  FeatureFlag["InactiveUserServerNotification"] = "pm-25130-receive-push-notifications-for-inactive-users";
5946
6151
  FeatureFlag["PushNotificationsWhenLocked"] = "pm-19388-push-notifications-when-locked";
5947
6152
  /* Innovation */
5948
6153
  FeatureFlag["PM19148_InnovationArchive"] = "pm-19148-innovation-archive";
6154
+ /* UIF */
6155
+ FeatureFlag["RouterFocusManagement"] = "router-focus-management";
5949
6156
  })(feature_flag_enum_FeatureFlag || (feature_flag_enum_FeatureFlag = {}));
5950
6157
  // Helper to ensure the value is treated as a boolean.
5951
6158
  const FALSE = false;
@@ -5961,6 +6168,7 @@ const DefaultFeatureFlagValue = {
5961
6168
  /* Admin Console Team */
5962
6169
  [feature_flag_enum_FeatureFlag.CreateDefaultLocation]: FALSE,
5963
6170
  [feature_flag_enum_FeatureFlag.AutoConfirm]: FALSE,
6171
+ [feature_flag_enum_FeatureFlag.BlockClaimedDomainAccountCreation]: FALSE,
5964
6172
  /* Autofill */
5965
6173
  [feature_flag_enum_FeatureFlag.MacOsNativeCredentialSync]: FALSE,
5966
6174
  [feature_flag_enum_FeatureFlag.WindowsDesktopAutotype]: FALSE,
@@ -5980,8 +6188,8 @@ const DefaultFeatureFlagValue = {
5980
6188
  [feature_flag_enum_FeatureFlag.AutofillConfirmation]: FALSE,
5981
6189
  [feature_flag_enum_FeatureFlag.RiskInsightsForPremium]: FALSE,
5982
6190
  [feature_flag_enum_FeatureFlag.VaultLoadingSkeletons]: FALSE,
6191
+ [feature_flag_enum_FeatureFlag.BrowserPremiumSpotlight]: FALSE,
5983
6192
  /* Auth */
5984
- [feature_flag_enum_FeatureFlag.PM22110_DisableAlternateLoginMethods]: FALSE,
5985
6193
  [feature_flag_enum_FeatureFlag.PM23801_PrefetchPasswordPrelogin]: FALSE,
5986
6194
  /* Billing */
5987
6195
  [feature_flag_enum_FeatureFlag.TrialPaymentOptional]: FALSE,
@@ -6000,7 +6208,6 @@ const DefaultFeatureFlagValue = {
6000
6208
  [feature_flag_enum_FeatureFlag.EnrollAeadOnKeyRotation]: FALSE,
6001
6209
  [feature_flag_enum_FeatureFlag.ForceUpdateKDFSettings]: FALSE,
6002
6210
  [feature_flag_enum_FeatureFlag.PM25174_DisableType0Decryption]: FALSE,
6003
- [feature_flag_enum_FeatureFlag.WindowsBiometricsV2]: FALSE,
6004
6211
  [feature_flag_enum_FeatureFlag.LinuxBiometricsV2]: FALSE,
6005
6212
  [feature_flag_enum_FeatureFlag.UnlockWithMasterPasswordUnlockData]: FALSE,
6006
6213
  [feature_flag_enum_FeatureFlag.NoLogoutOnKdfChange]: FALSE,
@@ -6011,6 +6218,8 @@ const DefaultFeatureFlagValue = {
6011
6218
  [feature_flag_enum_FeatureFlag.PushNotificationsWhenLocked]: FALSE,
6012
6219
  /* Innovation */
6013
6220
  [feature_flag_enum_FeatureFlag.PM19148_InnovationArchive]: FALSE,
6221
+ /* UIF */
6222
+ [feature_flag_enum_FeatureFlag.RouterFocusManagement]: FALSE,
6014
6223
  };
6015
6224
  function getFeatureFlagValue(serverConfig, flag) {
6016
6225
  if ((serverConfig === null || serverConfig === void 0 ? void 0 : serverConfig.featureStates) == null || serverConfig.featureStates[flag] == null) {
@@ -6521,6 +6730,48 @@ class utils_Utils {
6521
6730
  static normalizePath(denormalizedPath) {
6522
6731
  return external_path_namespaceObject.normalize(decodeURIComponent(denormalizedPath)).replace(/^(\.\.(\/|\\|$))+/, "");
6523
6732
  }
6733
+ /**
6734
+ * Validates an url checking against invalid patterns
6735
+ * @param url
6736
+ * @returns true if invalid patterns found, false if safe
6737
+ */
6738
+ static invalidUrlPatterns(url) {
6739
+ const invalidUrlPatterns = ["..", "%2e", "\\", "%5c"];
6740
+ const decodedUrl = decodeURIComponent(url.toLocaleLowerCase());
6741
+ // Check URL for invalidUrl patterns across entire URL
6742
+ if (invalidUrlPatterns.some((p) => decodedUrl.includes(p))) {
6743
+ return true;
6744
+ }
6745
+ // Check for additional invalid patterns inside URL params
6746
+ if (decodedUrl.includes("?")) {
6747
+ const hasInvalidParams = this.validateQueryParameters(decodedUrl);
6748
+ if (hasInvalidParams) {
6749
+ return true;
6750
+ }
6751
+ }
6752
+ return false;
6753
+ }
6754
+ /**
6755
+ * Validates query parameters for additional invalid patterns
6756
+ * @param url - The URL containing query parameters
6757
+ * @returns true if invalid patterns found, false if safe
6758
+ */
6759
+ static validateQueryParameters(url) {
6760
+ try {
6761
+ let queryString;
6762
+ if (url.includes("?")) {
6763
+ queryString = url.split("?")[1];
6764
+ }
6765
+ else {
6766
+ return false;
6767
+ }
6768
+ const paramInvalidPatterns = ["/", "%2f", "#", "%23"];
6769
+ return paramInvalidPatterns.some((p) => queryString.includes(p));
6770
+ }
6771
+ catch (error) {
6772
+ throw new Error(`Error validating query parameters: ${error}`);
6773
+ }
6774
+ }
6524
6775
  static isMobile(win) {
6525
6776
  let mobile = false;
6526
6777
  ((a) => {
@@ -6956,6 +7207,7 @@ const CRYPTO_MEMORY = new StateDefinition("crypto", "memory");
6956
7207
  const DESKTOP_SETTINGS_DISK = new StateDefinition("desktopSettings", "disk");
6957
7208
  const ENVIRONMENT_DISK = new StateDefinition("environment", "disk");
6958
7209
  const ENVIRONMENT_MEMORY = new StateDefinition("environment", "memory");
7210
+ const IPC_MEMORY = new StateDefinition("interProcessCommunication", "memory");
6959
7211
  const POPUP_VIEW_MEMORY = new StateDefinition("popupView", "memory", {
6960
7212
  browser: "memory-large-object",
6961
7213
  });
@@ -15126,6 +15378,7 @@ var policy_type_enum_PolicyType;
15126
15378
  PolicyType[PolicyType["UriMatchDefaults"] = 16] = "UriMatchDefaults";
15127
15379
  PolicyType[PolicyType["AutotypeDefaultSetting"] = 17] = "AutotypeDefaultSetting";
15128
15380
  PolicyType[PolicyType["AutoConfirm"] = 18] = "AutoConfirm";
15381
+ PolicyType[PolicyType["BlockClaimedDomainAccountCreation"] = 19] = "BlockClaimedDomainAccountCreation";
15129
15382
  })(policy_type_enum_PolicyType || (policy_type_enum_PolicyType = {}));
15130
15383
 
15131
15384
  ;// ../../libs/common/src/admin-console/enums/provider-type.enum.ts
@@ -15825,13 +16078,18 @@ class VaultTimeoutSettingsService {
15825
16078
  }
15826
16079
  userHasMasterPassword(userId) {
15827
16080
  return vault_timeout_settings_service_awaiter(this, void 0, void 0, function* () {
16081
+ let resolvedUserId;
15828
16082
  if (userId) {
15829
- const decryptionOptions = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.userDecryptionOptionsById$(userId));
15830
- return !!(decryptionOptions === null || decryptionOptions === void 0 ? void 0 : decryptionOptions.hasMasterPassword);
16083
+ resolvedUserId = userId;
15831
16084
  }
15832
16085
  else {
15833
- return yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.hasMasterPassword$);
16086
+ const activeAccount = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.accountService.activeAccount$);
16087
+ if (!activeAccount) {
16088
+ return false; // No account, can't have master password
16089
+ }
16090
+ resolvedUserId = activeAccount.id;
15834
16091
  }
16092
+ return yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.hasMasterPasswordById$(resolvedUserId));
15835
16093
  });
15836
16094
  }
15837
16095
  }
@@ -24533,7 +24791,10 @@ class DefaultKeyService {
24533
24791
  result[orgId] = orgKey;
24534
24792
  }
24535
24793
  return result;
24536
- })));
24794
+ })), (0,external_rxjs_namespaceObject.catchError)((err) => {
24795
+ this.logService.error(`Failed to get encrypted organization keys for user ${userId}`, err);
24796
+ return (0,external_rxjs_namespaceObject.of)({});
24797
+ }));
24537
24798
  }));
24538
24799
  }
24539
24800
  cipherDecryptionKeys$(userId) {
@@ -25225,7 +25486,10 @@ class KdfConfigResponse extends BaseResponse {
25225
25486
  // eslint-disable-next-line no-restricted-imports
25226
25487
 
25227
25488
  /**
25228
- * The data required to unlock with the master password.
25489
+ * Encapsulates the data needed to unlock a vault using a master password.
25490
+ * It contains the masterKeyWrappedUserKey along with the KDF settings and salt used to derive the master key.
25491
+ * It is currently backwards compatible to master-key based unlock, but this will not be the case in the future.
25492
+ * Features relating to master-password-based unlock should use this abstraction.
25229
25493
  */
25230
25494
  class MasterPasswordUnlockData {
25231
25495
  constructor(salt, kdf, masterKeyWrappedUserKey) {
@@ -25574,7 +25838,7 @@ class LoginStrategy {
25574
25838
  yield this.verifyAccountAdded(userId);
25575
25839
  // We must set user decryption options before retrieving vault timeout settings
25576
25840
  // as the user decryption options help determine the available timeout actions.
25577
- yield this.userDecryptionOptionsService.setUserDecryptionOptions(UserDecryptionOptions.fromResponse(tokenResponse));
25841
+ yield this.userDecryptionOptionsService.setUserDecryptionOptionsById(userId, UserDecryptionOptions.fromResponse(tokenResponse));
25578
25842
  if (((_c = tokenResponse.userDecryptionOptions) === null || _c === void 0 ? void 0 : _c.masterPasswordUnlock) != null) {
25579
25843
  const masterPasswordUnlockData = tokenResponse.userDecryptionOptions.masterPasswordUnlock.toMasterPasswordUnlockData();
25580
25844
  yield this.masterPasswordService.setMasterPasswordUnlockData(masterPasswordUnlockData, userId);
@@ -26936,7 +27200,7 @@ class SsoLoginStrategy extends LoginStrategy {
26936
27200
  return false;
26937
27201
  }
26938
27202
  // Check for TDE-related conditions
26939
- const userDecryptionOptions = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.userDecryptionOptions$);
27203
+ const userDecryptionOptions = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.userDecryptionOptionsById$(userId));
26940
27204
  if (!userDecryptionOptions) {
26941
27205
  return false;
26942
27206
  }
@@ -27689,8 +27953,6 @@ var user_decryption_options_service_awaiter = (undefined && undefined.__awaiter)
27689
27953
  step((generator = generator.apply(thisArg, _arguments || [])).next());
27690
27954
  });
27691
27955
  };
27692
- // FIXME: Update this file to be type safe and remove this and next line
27693
- // @ts-strict-ignore
27694
27956
 
27695
27957
 
27696
27958
 
@@ -27699,18 +27961,22 @@ const user_decryption_options_service_USER_DECRYPTION_OPTIONS = new UserKeyDefin
27699
27961
  clearOn: ["logout"],
27700
27962
  });
27701
27963
  class UserDecryptionOptionsService {
27702
- constructor(stateProvider) {
27703
- this.stateProvider = stateProvider;
27704
- this.userDecryptionOptionsState = this.stateProvider.getActive(user_decryption_options_service_USER_DECRYPTION_OPTIONS);
27705
- this.userDecryptionOptions$ = this.userDecryptionOptionsState.state$;
27706
- this.hasMasterPassword$ = this.userDecryptionOptions$.pipe((0,external_rxjs_namespaceObject.map)((options) => { var _a; return (_a = options === null || options === void 0 ? void 0 : options.hasMasterPassword) !== null && _a !== void 0 ? _a : false; }));
27964
+ constructor(singleUserStateProvider) {
27965
+ this.singleUserStateProvider = singleUserStateProvider;
27707
27966
  }
27708
27967
  userDecryptionOptionsById$(userId) {
27709
- return this.stateProvider.getUser(userId, user_decryption_options_service_USER_DECRYPTION_OPTIONS).state$;
27968
+ return this.singleUserStateProvider
27969
+ .get(userId, user_decryption_options_service_USER_DECRYPTION_OPTIONS)
27970
+ .state$.pipe((0,external_rxjs_namespaceObject.filter)((options) => options != null));
27971
+ }
27972
+ hasMasterPasswordById$(userId) {
27973
+ return this.userDecryptionOptionsById$(userId).pipe((0,external_rxjs_namespaceObject.map)((options) => { var _a; return (_a = options.hasMasterPassword) !== null && _a !== void 0 ? _a : false; }));
27710
27974
  }
27711
- setUserDecryptionOptions(userDecryptionOptions) {
27975
+ setUserDecryptionOptionsById(userId, userDecryptionOptions) {
27712
27976
  return user_decryption_options_service_awaiter(this, void 0, void 0, function* () {
27713
- yield this.userDecryptionOptionsState.update((_) => userDecryptionOptions);
27977
+ yield this.singleUserStateProvider
27978
+ .get(userId, user_decryption_options_service_USER_DECRYPTION_OPTIONS)
27979
+ .update((_) => userDecryptionOptions);
27714
27980
  });
27715
27981
  }
27716
27982
  }
@@ -28214,7 +28480,6 @@ var default_login_success_handler_service_awaiter = (undefined && undefined.__aw
28214
28480
  step((generator = generator.apply(thisArg, _arguments || [])).next());
28215
28481
  });
28216
28482
  };
28217
-
28218
28483
  class DefaultLoginSuccessHandlerService {
28219
28484
  constructor(configService, loginEmailService, ssoLoginService, syncService, userAsymmetricKeysRegenerationService, logService) {
28220
28485
  this.configService = configService;
@@ -28229,16 +28494,13 @@ class DefaultLoginSuccessHandlerService {
28229
28494
  yield this.syncService.fullSync(true, { skipTokenRefresh: true });
28230
28495
  yield this.userAsymmetricKeysRegenerationService.regenerateIfNeeded(userId);
28231
28496
  yield this.loginEmailService.clearLoginEmail();
28232
- const disableAlternateLoginMethodsFlagEnabled = yield this.configService.getFeatureFlag(FeatureFlag.PM22110_DisableAlternateLoginMethods);
28233
- if (disableAlternateLoginMethodsFlagEnabled) {
28234
- const ssoLoginEmail = yield this.ssoLoginService.getSsoEmail();
28235
- if (!ssoLoginEmail) {
28236
- this.logService.error("SSO login email not found.");
28237
- return;
28238
- }
28239
- yield this.ssoLoginService.updateSsoRequiredCache(ssoLoginEmail, userId);
28240
- yield this.ssoLoginService.clearSsoEmail();
28497
+ const ssoLoginEmail = yield this.ssoLoginService.getSsoEmail();
28498
+ if (!ssoLoginEmail) {
28499
+ this.logService.error("SSO login email not found.");
28500
+ return;
28241
28501
  }
28502
+ yield this.ssoLoginService.updateSsoRequiredCache(ssoLoginEmail, userId);
28503
+ yield this.ssoLoginService.clearSsoEmail();
28242
28504
  });
28243
28505
  }
28244
28506
  }
@@ -29129,6 +29391,17 @@ function canAccessReportingTab(org) {
29129
29391
  function canAccessBillingTab(org) {
29130
29392
  return org.isOwner;
29131
29393
  }
29394
+ /**
29395
+ * Access Intelligence is only available to:
29396
+ * - Enterprise organizations
29397
+ * - Users in those organizations with report access
29398
+ *
29399
+ * @param org The organization to verify access
29400
+ * @returns If true can access the Access Intelligence feature
29401
+ */
29402
+ function canAccessAccessIntelligence(org) {
29403
+ return org.canUseAccessIntelligence && org.canAccessReports;
29404
+ }
29132
29405
  function canAccessOrgAdmin(org) {
29133
29406
  // Admin console can only be accessed by Owners for disabled organizations
29134
29407
  if (!org.enabled && !org.isOwner) {
@@ -37452,13 +37725,13 @@ class Program extends BaseProgram {
37452
37725
  }
37453
37726
 
37454
37727
  ;// ../../libs/common/src/tools/send/enums/send-type.ts
37455
- // FIXME: update to use a const object instead of a typescript enum
37456
- // eslint-disable-next-line @bitwarden/platform/no-enums
37457
- var send_type_SendType;
37458
- (function (SendType) {
37459
- SendType[SendType["Text"] = 0] = "Text";
37460
- SendType[SendType["File"] = 1] = "File";
37461
- })(send_type_SendType || (send_type_SendType = {}));
37728
+ /** A type of Send. */
37729
+ const send_type_SendType = Object.freeze({
37730
+ /** Send contains plain text. */
37731
+ Text: 0,
37732
+ /** Send contains a file. */
37733
+ File: 1,
37734
+ });
37462
37735
 
37463
37736
  ;// ../../libs/common/src/tools/send/models/view/send-text.view.ts
37464
37737
  class SendTextView {
@@ -39232,6 +39505,7 @@ const toCipherType = (value) => {
39232
39505
 
39233
39506
  ;// ../../libs/common/src/platform/abstractions/sdk/sdk.service.ts
39234
39507
 
39508
+
39235
39509
  class UserNotLoggedInError extends Error {
39236
39510
  constructor(userId) {
39237
39511
  super(`User (${userId}) is not logged in`);
@@ -39242,6 +39516,62 @@ class InvalidUuid extends Error {
39242
39516
  super(`Invalid UUID: ${uuid}`);
39243
39517
  }
39244
39518
  }
39519
+ function toSdkDevice(device) {
39520
+ switch (device) {
39521
+ case DeviceType.Android:
39522
+ return "Android";
39523
+ case DeviceType.iOS:
39524
+ return "iOS";
39525
+ case DeviceType.ChromeExtension:
39526
+ return "ChromeExtension";
39527
+ case DeviceType.FirefoxExtension:
39528
+ return "FirefoxExtension";
39529
+ case DeviceType.OperaExtension:
39530
+ return "OperaExtension";
39531
+ case DeviceType.EdgeExtension:
39532
+ return "EdgeExtension";
39533
+ case DeviceType.WindowsDesktop:
39534
+ return "WindowsDesktop";
39535
+ case DeviceType.MacOsDesktop:
39536
+ return "MacOsDesktop";
39537
+ case DeviceType.LinuxDesktop:
39538
+ return "LinuxDesktop";
39539
+ case DeviceType.ChromeBrowser:
39540
+ return "ChromeBrowser";
39541
+ case DeviceType.FirefoxBrowser:
39542
+ return "FirefoxBrowser";
39543
+ case DeviceType.OperaBrowser:
39544
+ return "OperaBrowser";
39545
+ case DeviceType.EdgeBrowser:
39546
+ return "EdgeBrowser";
39547
+ case DeviceType.IEBrowser:
39548
+ return "IEBrowser";
39549
+ case DeviceType.UnknownBrowser:
39550
+ return "UnknownBrowser";
39551
+ case DeviceType.AndroidAmazon:
39552
+ return "AndroidAmazon";
39553
+ case DeviceType.UWP:
39554
+ return "UWP";
39555
+ case DeviceType.SafariBrowser:
39556
+ return "SafariBrowser";
39557
+ case DeviceType.VivaldiBrowser:
39558
+ return "VivaldiBrowser";
39559
+ case DeviceType.VivaldiExtension:
39560
+ return "VivaldiExtension";
39561
+ case DeviceType.SafariExtension:
39562
+ return "SafariExtension";
39563
+ case DeviceType.Server:
39564
+ return "Server";
39565
+ case DeviceType.WindowsCLI:
39566
+ return "WindowsCLI";
39567
+ case DeviceType.MacOsCLI:
39568
+ return "MacOsCLI";
39569
+ case DeviceType.LinuxCLI:
39570
+ return "LinuxCLI";
39571
+ default:
39572
+ return "SDK";
39573
+ }
39574
+ }
39245
39575
  /**
39246
39576
  * Converts a string to UUID. Will throw an error if the UUID is non valid.
39247
39577
  */
@@ -40445,16 +40775,16 @@ class IdentityView extends ItemView {
40445
40775
  this.middleName != null ||
40446
40776
  this.lastName != null) {
40447
40777
  let name = "";
40448
- if (this.title != null) {
40778
+ if (!utils_Utils.isNullOrWhitespace(this.title)) {
40449
40779
  name += this.title + " ";
40450
40780
  }
40451
- if (this.firstName != null) {
40781
+ if (!utils_Utils.isNullOrWhitespace(this.firstName)) {
40452
40782
  name += this.firstName + " ";
40453
40783
  }
40454
- if (this.middleName != null) {
40784
+ if (!utils_Utils.isNullOrWhitespace(this.middleName)) {
40455
40785
  name += this.middleName + " ";
40456
40786
  }
40457
- if (this.lastName != null) {
40787
+ if (!utils_Utils.isNullOrWhitespace(this.lastName)) {
40458
40788
  name += this.lastName;
40459
40789
  }
40460
40790
  return name.trim();
@@ -40479,14 +40809,17 @@ class IdentityView extends ItemView {
40479
40809
  return address;
40480
40810
  }
40481
40811
  get fullAddressPart2() {
40482
- if (this.city == null && this.state == null && this.postalCode == null) {
40812
+ const hasCity = !utils_Utils.isNullOrWhitespace(this.city);
40813
+ const hasState = !utils_Utils.isNullOrWhitespace(this.state);
40814
+ const hasPostalCode = !utils_Utils.isNullOrWhitespace(this.postalCode);
40815
+ if (!hasCity && !hasState && !hasPostalCode) {
40483
40816
  return undefined;
40484
40817
  }
40485
- const city = this.city || "-";
40818
+ const city = hasCity ? this.city : "-";
40486
40819
  const state = this.state;
40487
- const postalCode = this.postalCode || "-";
40820
+ const postalCode = hasPostalCode ? this.postalCode : "-";
40488
40821
  let addressPart2 = city;
40489
- if (!utils_Utils.isNullOrWhitespace(state)) {
40822
+ if (hasState) {
40490
40823
  addressPart2 += ", " + state;
40491
40824
  }
40492
40825
  addressPart2 += ", " + postalCode;
@@ -42883,7 +43216,9 @@ class Cipher extends domain_base_Domain {
42883
43216
  creationDate: this.creationDate.toISOString(),
42884
43217
  deletedDate: (_f = this.deletedDate) === null || _f === void 0 ? void 0 : _f.toISOString(),
42885
43218
  archivedDate: (_g = this.archivedDate) === null || _g === void 0 ? void 0 : _g.toISOString(),
42886
- reprompt: this.reprompt,
43219
+ reprompt: this.reprompt === CipherRepromptType.Password
43220
+ ? CipherRepromptType.Password
43221
+ : CipherRepromptType.None,
42887
43222
  // Initialize all cipher-type-specific properties as undefined
42888
43223
  login: undefined,
42889
43224
  identity: undefined,
@@ -49215,6 +49550,11 @@ class Organization {
49215
49550
  get canManageUsersPassword() {
49216
49551
  return this.isAdmin || this.permissions.manageResetPassword;
49217
49552
  }
49553
+ get canEnableAutoConfirmPolicy() {
49554
+ return ((this.canManageUsers || this.canManagePolicies) &&
49555
+ this.useAutomaticUserConfirmation &&
49556
+ !this.isProviderUser);
49557
+ }
49218
49558
  get canManageDeviceApprovals() {
49219
49559
  return ((this.isAdmin || this.permissions.manageResetPassword) &&
49220
49560
  this.useSso &&
@@ -49276,6 +49616,9 @@ class Organization {
49276
49616
  this.permissions.manageGroups ||
49277
49617
  this.permissions.accessEventLogs));
49278
49618
  }
49619
+ get canUseAccessIntelligence() {
49620
+ return this.productTierType === ProductTierType.Enterprise;
49621
+ }
49279
49622
  }
49280
49623
 
49281
49624
  ;// ../../libs/common/src/admin-console/models/data/organization.data.ts
@@ -51963,189 +52306,6 @@ class TokenService {
51963
52306
  }
51964
52307
  }
51965
52308
 
51966
- ;// ../../libs/common/src/auth/services/two-factor.service.ts
51967
- var two_factor_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
51968
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
51969
- return new (P || (P = Promise))(function (resolve, reject) {
51970
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
51971
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
51972
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
51973
- step((generator = generator.apply(thisArg, _arguments || [])).next());
51974
- });
51975
- };
51976
- // FIXME: Update this file to be type safe and remove this and next line
51977
- // @ts-strict-ignore
51978
-
51979
-
51980
-
51981
-
51982
- const TwoFactorProviders = {
51983
- [TwoFactorProviderType.Authenticator]: {
51984
- type: TwoFactorProviderType.Authenticator,
51985
- name: null,
51986
- description: null,
51987
- priority: 1,
51988
- sort: 2,
51989
- premium: false,
51990
- },
51991
- [TwoFactorProviderType.Yubikey]: {
51992
- type: TwoFactorProviderType.Yubikey,
51993
- name: null,
51994
- description: null,
51995
- priority: 3,
51996
- sort: 4,
51997
- premium: true,
51998
- },
51999
- [TwoFactorProviderType.Duo]: {
52000
- type: TwoFactorProviderType.Duo,
52001
- name: "Duo",
52002
- description: null,
52003
- priority: 2,
52004
- sort: 5,
52005
- premium: true,
52006
- },
52007
- [TwoFactorProviderType.OrganizationDuo]: {
52008
- type: TwoFactorProviderType.OrganizationDuo,
52009
- name: "Duo (Organization)",
52010
- description: null,
52011
- priority: 10,
52012
- sort: 6,
52013
- premium: false,
52014
- },
52015
- [TwoFactorProviderType.Email]: {
52016
- type: TwoFactorProviderType.Email,
52017
- name: null,
52018
- description: null,
52019
- priority: 0,
52020
- sort: 1,
52021
- premium: false,
52022
- },
52023
- [TwoFactorProviderType.WebAuthn]: {
52024
- type: TwoFactorProviderType.WebAuthn,
52025
- name: null,
52026
- description: null,
52027
- priority: 4,
52028
- sort: 3,
52029
- premium: false,
52030
- },
52031
- };
52032
- // Memory storage as only required during authentication process
52033
- const two_factor_service_PROVIDERS = KeyDefinition.record(TWO_FACTOR_MEMORY, "providers", {
52034
- deserializer: (obj) => obj,
52035
- });
52036
- // Memory storage as only required during authentication process
52037
- const SELECTED_PROVIDER = new KeyDefinition(TWO_FACTOR_MEMORY, "selected", {
52038
- deserializer: (obj) => obj,
52039
- });
52040
- class TwoFactorService {
52041
- constructor(i18nService, platformUtilsService, globalStateProvider) {
52042
- this.i18nService = i18nService;
52043
- this.platformUtilsService = platformUtilsService;
52044
- this.globalStateProvider = globalStateProvider;
52045
- this.providersState = this.globalStateProvider.get(two_factor_service_PROVIDERS);
52046
- this.selectedState = this.globalStateProvider.get(SELECTED_PROVIDER);
52047
- this.providers$ = this.providersState.state$.pipe((0,external_rxjs_namespaceObject.map)((providers) => utils_Utils.recordToMap(providers)));
52048
- this.selected$ = this.selectedState.state$;
52049
- }
52050
- init() {
52051
- TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t("emailTitle");
52052
- TwoFactorProviders[TwoFactorProviderType.Email].description = this.i18nService.t("emailDescV2");
52053
- TwoFactorProviders[TwoFactorProviderType.Authenticator].name =
52054
- this.i18nService.t("authenticatorAppTitle");
52055
- TwoFactorProviders[TwoFactorProviderType.Authenticator].description =
52056
- this.i18nService.t("authenticatorAppDescV2");
52057
- TwoFactorProviders[TwoFactorProviderType.Duo].description = this.i18nService.t("duoDescV2");
52058
- TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].name =
52059
- "Duo (" + this.i18nService.t("organization") + ")";
52060
- TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].description =
52061
- this.i18nService.t("duoOrganizationDesc");
52062
- TwoFactorProviders[TwoFactorProviderType.WebAuthn].name = this.i18nService.t("webAuthnTitle");
52063
- TwoFactorProviders[TwoFactorProviderType.WebAuthn].description =
52064
- this.i18nService.t("webAuthnDesc");
52065
- TwoFactorProviders[TwoFactorProviderType.Yubikey].name = this.i18nService.t("yubiKeyTitleV2");
52066
- TwoFactorProviders[TwoFactorProviderType.Yubikey].description =
52067
- this.i18nService.t("yubiKeyDesc");
52068
- }
52069
- getSupportedProviders(win) {
52070
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52071
- const data = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
52072
- const providers = [];
52073
- if (data == null) {
52074
- return providers;
52075
- }
52076
- if (data.has(TwoFactorProviderType.OrganizationDuo) &&
52077
- this.platformUtilsService.supportsDuo()) {
52078
- providers.push(TwoFactorProviders[TwoFactorProviderType.OrganizationDuo]);
52079
- }
52080
- if (data.has(TwoFactorProviderType.Authenticator)) {
52081
- providers.push(TwoFactorProviders[TwoFactorProviderType.Authenticator]);
52082
- }
52083
- if (data.has(TwoFactorProviderType.Yubikey)) {
52084
- providers.push(TwoFactorProviders[TwoFactorProviderType.Yubikey]);
52085
- }
52086
- if (data.has(TwoFactorProviderType.Duo) && this.platformUtilsService.supportsDuo()) {
52087
- providers.push(TwoFactorProviders[TwoFactorProviderType.Duo]);
52088
- }
52089
- if (data.has(TwoFactorProviderType.WebAuthn) &&
52090
- this.platformUtilsService.supportsWebAuthn(win)) {
52091
- providers.push(TwoFactorProviders[TwoFactorProviderType.WebAuthn]);
52092
- }
52093
- if (data.has(TwoFactorProviderType.Email)) {
52094
- providers.push(TwoFactorProviders[TwoFactorProviderType.Email]);
52095
- }
52096
- return providers;
52097
- });
52098
- }
52099
- getDefaultProvider(webAuthnSupported) {
52100
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52101
- const data = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
52102
- const selected = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.selected$);
52103
- if (data == null) {
52104
- return null;
52105
- }
52106
- if (selected != null && data.has(selected)) {
52107
- return selected;
52108
- }
52109
- let providerType = null;
52110
- let providerPriority = -1;
52111
- data.forEach((_value, type) => {
52112
- const provider = TwoFactorProviders[type];
52113
- if (provider != null && provider.priority > providerPriority) {
52114
- if (type === TwoFactorProviderType.WebAuthn && !webAuthnSupported) {
52115
- return;
52116
- }
52117
- providerType = type;
52118
- providerPriority = provider.priority;
52119
- }
52120
- });
52121
- return providerType;
52122
- });
52123
- }
52124
- setSelectedProvider(type) {
52125
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52126
- yield this.selectedState.update(() => type);
52127
- });
52128
- }
52129
- clearSelectedProvider() {
52130
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52131
- yield this.selectedState.update(() => null);
52132
- });
52133
- }
52134
- setProviders(response) {
52135
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52136
- yield this.providersState.update(() => response.twoFactorProviders2);
52137
- });
52138
- }
52139
- clearProviders() {
52140
- return two_factor_service_awaiter(this, void 0, void 0, function* () {
52141
- yield this.providersState.update(() => null);
52142
- });
52143
- }
52144
- getProviders() {
52145
- return (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
52146
- }
52147
- }
52148
-
52149
52309
  ;// ../../libs/common/src/auth/services/user-verification/user-verification-api.service.ts
52150
52310
  var user_verification_api_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
52151
52311
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -52392,13 +52552,15 @@ class UserVerificationService {
52392
52552
  }
52393
52553
  hasMasterPassword(userId) {
52394
52554
  return user_verification_service_awaiter(this, void 0, void 0, function* () {
52395
- if (userId) {
52396
- const decryptionOptions = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.userDecryptionOptionsById$(userId));
52397
- if ((decryptionOptions === null || decryptionOptions === void 0 ? void 0 : decryptionOptions.hasMasterPassword) != undefined) {
52398
- return decryptionOptions.hasMasterPassword;
52399
- }
52555
+ var _a;
52556
+ const resolvedUserId = userId !== null && userId !== void 0 ? userId : (_a = (yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.accountService.activeAccount$))) === null || _a === void 0 ? void 0 : _a.id;
52557
+ if (!resolvedUserId) {
52558
+ return false;
52400
52559
  }
52401
- return yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.hasMasterPassword$);
52560
+ // Ideally, this method would accept a UserId over string. To avoid scope creep in PM-26413, we are
52561
+ // doing the cast here. Future work should be done to make this type-safe, and should be considered
52562
+ // as part of PM-27009.
52563
+ return yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.userDecryptionOptionsService.hasMasterPasswordById$(resolvedUserId));
52402
52564
  });
52403
52565
  }
52404
52566
  hasMasterPasswordAndMasterKeyHash(userId) {
@@ -52423,6 +52585,93 @@ class UserVerificationService {
52423
52585
  }
52424
52586
  }
52425
52587
 
52588
+ ;// ../../libs/common/src/auth/two-factor/abstractions/two-factor.service.ts
52589
+
52590
+
52591
+ /**
52592
+ * Registry of all supported two-factor authentication providers with their metadata.
52593
+ * Strings (name, description) are initialized as null and populated with localized
52594
+ * translations when {@link TwoFactorService.init} is called during application startup.
52595
+ *
52596
+ * @remarks
52597
+ * This constant is mutated during initialization. Components should not access it before
52598
+ * the service's init() method has been called.
52599
+ *
52600
+ * @example
52601
+ * ```typescript
52602
+ * // During app init
52603
+ * twoFactorService.init();
52604
+ *
52605
+ * // In components
52606
+ * const authenticator = TwoFactorProviders[TwoFactorProviderType.Authenticator];
52607
+ * console.log(authenticator.name); // "Authenticator App" (localized)
52608
+ * ```
52609
+ */
52610
+ const TwoFactorProviders = {
52611
+ [TwoFactorProviderType.Authenticator]: {
52612
+ type: TwoFactorProviderType.Authenticator,
52613
+ name: null,
52614
+ description: null,
52615
+ priority: 1,
52616
+ sort: 2,
52617
+ premium: false,
52618
+ },
52619
+ [TwoFactorProviderType.Yubikey]: {
52620
+ type: TwoFactorProviderType.Yubikey,
52621
+ name: null,
52622
+ description: null,
52623
+ priority: 3,
52624
+ sort: 4,
52625
+ premium: true,
52626
+ },
52627
+ [TwoFactorProviderType.Duo]: {
52628
+ type: TwoFactorProviderType.Duo,
52629
+ name: "Duo",
52630
+ description: null,
52631
+ priority: 2,
52632
+ sort: 5,
52633
+ premium: true,
52634
+ },
52635
+ [TwoFactorProviderType.OrganizationDuo]: {
52636
+ type: TwoFactorProviderType.OrganizationDuo,
52637
+ name: "Duo (Organization)",
52638
+ description: null,
52639
+ priority: 10,
52640
+ sort: 6,
52641
+ premium: false,
52642
+ },
52643
+ [TwoFactorProviderType.Email]: {
52644
+ type: TwoFactorProviderType.Email,
52645
+ name: null,
52646
+ description: null,
52647
+ priority: 0,
52648
+ sort: 1,
52649
+ premium: false,
52650
+ },
52651
+ [TwoFactorProviderType.WebAuthn]: {
52652
+ type: TwoFactorProviderType.WebAuthn,
52653
+ name: null,
52654
+ description: null,
52655
+ priority: 4,
52656
+ sort: 3,
52657
+ premium: false,
52658
+ },
52659
+ };
52660
+ // Memory storage as only required during authentication process
52661
+ const two_factor_service_PROVIDERS = KeyDefinition.record(TWO_FACTOR_MEMORY, "providers", {
52662
+ deserializer: (obj) => obj,
52663
+ });
52664
+ // Memory storage as only required during authentication process
52665
+ const SELECTED_PROVIDER = new KeyDefinition(TWO_FACTOR_MEMORY, "selected", {
52666
+ deserializer: (obj) => obj,
52667
+ });
52668
+ class TwoFactorService {
52669
+ }
52670
+
52671
+ ;// ../../libs/common/src/auth/two-factor/abstractions/index.ts
52672
+
52673
+
52674
+
52426
52675
  ;// ../../libs/common/src/auth/models/response/two-factor-authenticator.response.ts
52427
52676
 
52428
52677
  class TwoFactorAuthenticatorResponse extends BaseResponse {
@@ -52529,7 +52778,7 @@ class TwoFactorYubiKeyResponse extends BaseResponse {
52529
52778
  }
52530
52779
  }
52531
52780
 
52532
- ;// ../../libs/common/src/auth/two-factor/default-two-factor-api.service.ts
52781
+ ;// ../../libs/common/src/auth/two-factor/services/default-two-factor-api.service.ts
52533
52782
  var default_two_factor_api_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
52534
52783
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52535
52784
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -52704,6 +52953,202 @@ class DefaultTwoFactorApiService {
52704
52953
  }
52705
52954
  }
52706
52955
 
52956
+ ;// ../../libs/common/src/auth/two-factor/services/default-two-factor.service.ts
52957
+ var default_two_factor_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
52958
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
52959
+ return new (P || (P = Promise))(function (resolve, reject) {
52960
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
52961
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
52962
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
52963
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
52964
+ });
52965
+ };
52966
+ // FIXME: Update this file to be type safe and remove this and next line
52967
+ // @ts-strict-ignore
52968
+
52969
+
52970
+
52971
+
52972
+ class DefaultTwoFactorService {
52973
+ constructor(i18nService, platformUtilsService, globalStateProvider, twoFactorApiService) {
52974
+ this.i18nService = i18nService;
52975
+ this.platformUtilsService = platformUtilsService;
52976
+ this.globalStateProvider = globalStateProvider;
52977
+ this.twoFactorApiService = twoFactorApiService;
52978
+ this.providersState = this.globalStateProvider.get(two_factor_service_PROVIDERS);
52979
+ this.selectedState = this.globalStateProvider.get(SELECTED_PROVIDER);
52980
+ this.providers$ = this.providersState.state$.pipe((0,external_rxjs_namespaceObject.map)((providers) => utils_Utils.recordToMap(providers)));
52981
+ this.selected$ = this.selectedState.state$;
52982
+ }
52983
+ init() {
52984
+ TwoFactorProviders[TwoFactorProviderType.Email].name = this.i18nService.t("emailTitle");
52985
+ TwoFactorProviders[TwoFactorProviderType.Email].description = this.i18nService.t("emailDescV2");
52986
+ TwoFactorProviders[TwoFactorProviderType.Authenticator].name =
52987
+ this.i18nService.t("authenticatorAppTitle");
52988
+ TwoFactorProviders[TwoFactorProviderType.Authenticator].description =
52989
+ this.i18nService.t("authenticatorAppDescV2");
52990
+ TwoFactorProviders[TwoFactorProviderType.Duo].description = this.i18nService.t("duoDescV2");
52991
+ TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].name =
52992
+ "Duo (" + this.i18nService.t("organization") + ")";
52993
+ TwoFactorProviders[TwoFactorProviderType.OrganizationDuo].description =
52994
+ this.i18nService.t("duoOrganizationDesc");
52995
+ TwoFactorProviders[TwoFactorProviderType.WebAuthn].name = this.i18nService.t("webAuthnTitle");
52996
+ TwoFactorProviders[TwoFactorProviderType.WebAuthn].description =
52997
+ this.i18nService.t("webAuthnDesc");
52998
+ TwoFactorProviders[TwoFactorProviderType.Yubikey].name = this.i18nService.t("yubiKeyTitleV2");
52999
+ TwoFactorProviders[TwoFactorProviderType.Yubikey].description =
53000
+ this.i18nService.t("yubiKeyDesc");
53001
+ }
53002
+ getSupportedProviders(win) {
53003
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53004
+ const data = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
53005
+ const providers = [];
53006
+ if (data == null) {
53007
+ return providers;
53008
+ }
53009
+ if (data.has(TwoFactorProviderType.OrganizationDuo) &&
53010
+ this.platformUtilsService.supportsDuo()) {
53011
+ providers.push(TwoFactorProviders[TwoFactorProviderType.OrganizationDuo]);
53012
+ }
53013
+ if (data.has(TwoFactorProviderType.Authenticator)) {
53014
+ providers.push(TwoFactorProviders[TwoFactorProviderType.Authenticator]);
53015
+ }
53016
+ if (data.has(TwoFactorProviderType.Yubikey)) {
53017
+ providers.push(TwoFactorProviders[TwoFactorProviderType.Yubikey]);
53018
+ }
53019
+ if (data.has(TwoFactorProviderType.Duo) && this.platformUtilsService.supportsDuo()) {
53020
+ providers.push(TwoFactorProviders[TwoFactorProviderType.Duo]);
53021
+ }
53022
+ if (data.has(TwoFactorProviderType.WebAuthn) &&
53023
+ this.platformUtilsService.supportsWebAuthn(win)) {
53024
+ providers.push(TwoFactorProviders[TwoFactorProviderType.WebAuthn]);
53025
+ }
53026
+ if (data.has(TwoFactorProviderType.Email)) {
53027
+ providers.push(TwoFactorProviders[TwoFactorProviderType.Email]);
53028
+ }
53029
+ return providers;
53030
+ });
53031
+ }
53032
+ getDefaultProvider(webAuthnSupported) {
53033
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53034
+ const data = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
53035
+ const selected = yield (0,external_rxjs_namespaceObject.firstValueFrom)(this.selected$);
53036
+ if (data == null) {
53037
+ return null;
53038
+ }
53039
+ if (selected != null && data.has(selected)) {
53040
+ return selected;
53041
+ }
53042
+ let providerType = null;
53043
+ let providerPriority = -1;
53044
+ data.forEach((_value, type) => {
53045
+ const provider = TwoFactorProviders[type];
53046
+ if (provider != null && provider.priority > providerPriority) {
53047
+ if (type === TwoFactorProviderType.WebAuthn && !webAuthnSupported) {
53048
+ return;
53049
+ }
53050
+ providerType = type;
53051
+ providerPriority = provider.priority;
53052
+ }
53053
+ });
53054
+ return providerType;
53055
+ });
53056
+ }
53057
+ setSelectedProvider(type) {
53058
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53059
+ yield this.selectedState.update(() => type);
53060
+ });
53061
+ }
53062
+ clearSelectedProvider() {
53063
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53064
+ yield this.selectedState.update(() => null);
53065
+ });
53066
+ }
53067
+ setProviders(response) {
53068
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53069
+ yield this.providersState.update(() => response.twoFactorProviders2);
53070
+ });
53071
+ }
53072
+ clearProviders() {
53073
+ return default_two_factor_service_awaiter(this, void 0, void 0, function* () {
53074
+ yield this.providersState.update(() => null);
53075
+ });
53076
+ }
53077
+ getProviders() {
53078
+ return (0,external_rxjs_namespaceObject.firstValueFrom)(this.providers$);
53079
+ }
53080
+ getEnabledTwoFactorProviders() {
53081
+ return this.twoFactorApiService.getTwoFactorProviders();
53082
+ }
53083
+ getTwoFactorOrganizationProviders(organizationId) {
53084
+ return this.twoFactorApiService.getTwoFactorOrganizationProviders(organizationId);
53085
+ }
53086
+ getTwoFactorAuthenticator(request) {
53087
+ return this.twoFactorApiService.getTwoFactorAuthenticator(request);
53088
+ }
53089
+ getTwoFactorEmail(request) {
53090
+ return this.twoFactorApiService.getTwoFactorEmail(request);
53091
+ }
53092
+ getTwoFactorDuo(request) {
53093
+ return this.twoFactorApiService.getTwoFactorDuo(request);
53094
+ }
53095
+ getTwoFactorOrganizationDuo(organizationId, request) {
53096
+ return this.twoFactorApiService.getTwoFactorOrganizationDuo(organizationId, request);
53097
+ }
53098
+ getTwoFactorYubiKey(request) {
53099
+ return this.twoFactorApiService.getTwoFactorYubiKey(request);
53100
+ }
53101
+ getTwoFactorWebAuthn(request) {
53102
+ return this.twoFactorApiService.getTwoFactorWebAuthn(request);
53103
+ }
53104
+ getTwoFactorWebAuthnChallenge(request) {
53105
+ return this.twoFactorApiService.getTwoFactorWebAuthnChallenge(request);
53106
+ }
53107
+ getTwoFactorRecover(request) {
53108
+ return this.twoFactorApiService.getTwoFactorRecover(request);
53109
+ }
53110
+ putTwoFactorAuthenticator(request) {
53111
+ return this.twoFactorApiService.putTwoFactorAuthenticator(request);
53112
+ }
53113
+ deleteTwoFactorAuthenticator(request) {
53114
+ return this.twoFactorApiService.deleteTwoFactorAuthenticator(request);
53115
+ }
53116
+ putTwoFactorEmail(request) {
53117
+ return this.twoFactorApiService.putTwoFactorEmail(request);
53118
+ }
53119
+ putTwoFactorDuo(request) {
53120
+ return this.twoFactorApiService.putTwoFactorDuo(request);
53121
+ }
53122
+ putTwoFactorOrganizationDuo(organizationId, request) {
53123
+ return this.twoFactorApiService.putTwoFactorOrganizationDuo(organizationId, request);
53124
+ }
53125
+ putTwoFactorYubiKey(request) {
53126
+ return this.twoFactorApiService.putTwoFactorYubiKey(request);
53127
+ }
53128
+ putTwoFactorWebAuthn(request) {
53129
+ return this.twoFactorApiService.putTwoFactorWebAuthn(request);
53130
+ }
53131
+ deleteTwoFactorWebAuthn(request) {
53132
+ return this.twoFactorApiService.deleteTwoFactorWebAuthn(request);
53133
+ }
53134
+ putTwoFactorDisable(request) {
53135
+ return this.twoFactorApiService.putTwoFactorDisable(request);
53136
+ }
53137
+ putTwoFactorOrganizationDisable(organizationId, request) {
53138
+ return this.twoFactorApiService.putTwoFactorOrganizationDisable(organizationId, request);
53139
+ }
53140
+ postTwoFactorEmailSetup(request) {
53141
+ return this.twoFactorApiService.postTwoFactorEmailSetup(request);
53142
+ }
53143
+ postTwoFactorEmail(request) {
53144
+ return this.twoFactorApiService.postTwoFactorEmail(request);
53145
+ }
53146
+ }
53147
+
53148
+ ;// ../../libs/common/src/auth/two-factor/services/index.ts
53149
+
53150
+
53151
+
52707
53152
  ;// ../../libs/common/src/auth/two-factor/index.ts
52708
53153
 
52709
53154
 
@@ -53491,7 +53936,7 @@ const device_trust_service_implementation_SHOULD_TRUST_DEVICE = new UserKeyDefin
53491
53936
  clearOn: [], // Need to preserve the user setting, so we can't clear it automatically during lock or logout
53492
53937
  });
53493
53938
  class DeviceTrustService {
53494
- constructor(keyGenerationService, cryptoFunctionService, keyService, encryptService, appIdService, devicesApiService, i18nService, platformUtilsService, stateProvider, secureStorageService, userDecryptionOptionsService, logService, configService) {
53939
+ constructor(keyGenerationService, cryptoFunctionService, keyService, encryptService, appIdService, devicesApiService, i18nService, platformUtilsService, stateProvider, secureStorageService, userDecryptionOptionsService, logService, configService, accountService) {
53495
53940
  this.keyGenerationService = keyGenerationService;
53496
53941
  this.cryptoFunctionService = cryptoFunctionService;
53497
53942
  this.keyService = keyService;
@@ -53505,13 +53950,19 @@ class DeviceTrustService {
53505
53950
  this.userDecryptionOptionsService = userDecryptionOptionsService;
53506
53951
  this.logService = logService;
53507
53952
  this.configService = configService;
53953
+ this.accountService = accountService;
53508
53954
  this.platformSupportsSecureStorage = this.platformUtilsService.supportsSecureStorage();
53509
53955
  this.deviceKeySecureStorageKey = "_deviceKey";
53510
53956
  // Observable emission is used to trigger a toast in consuming components
53511
53957
  this.deviceTrustedSubject = new external_rxjs_namespaceObject.Subject();
53512
53958
  this.deviceTrusted$ = this.deviceTrustedSubject.asObservable();
53513
- this.supportsDeviceTrust$ = this.userDecryptionOptionsService.userDecryptionOptions$.pipe((0,external_rxjs_namespaceObject.map)((options) => {
53514
- return (options === null || options === void 0 ? void 0 : options.trustedDeviceOption) != null;
53959
+ this.supportsDeviceTrust$ = this.accountService.activeAccount$.pipe((0,external_rxjs_namespaceObject.switchMap)((account) => {
53960
+ if (account == null) {
53961
+ return [false];
53962
+ }
53963
+ return this.userDecryptionOptionsService.userDecryptionOptionsById$(account.id).pipe((0,external_rxjs_namespaceObject.map)((options) => {
53964
+ return (options === null || options === void 0 ? void 0 : options.trustedDeviceOption) != null;
53965
+ }));
53515
53966
  }));
53516
53967
  }
53517
53968
  supportsDeviceTrustByUserId$(userId) {
@@ -55062,8 +55513,10 @@ function devFlagEnabled(flag) {
55062
55513
  if (true) {
55063
55514
  return false;
55064
55515
  }
55065
- const devFlags = getFlags(process.env.DEV_FLAGS);
55066
- return (devFlags === null || devFlags === void 0 ? void 0 : devFlags[flag]) == null ? false : !!devFlags[flag];
55516
+ // removed by dead control flow
55517
+
55518
+ // removed by dead control flow
55519
+
55067
55520
  }
55068
55521
  /**
55069
55522
  * Gets the value of a dev flag from environment.
@@ -56055,13 +56508,13 @@ var default_sdk_client_factory_awaiter = (undefined && undefined.__awaiter) || f
56055
56508
  */
56056
56509
  class DefaultSdkClientFactory {
56057
56510
  /**
56058
- * Initializes a Bitwarden client. Assumes the SDK is already loaded.
56059
- * @param args Bitwarden client constructor parameters
56060
- * @returns A BitwardenClient
56511
+ * Initializes a Password Manager client. Assumes the SDK is already loaded.
56512
+ * @param args Password Manager client constructor parameters
56513
+ * @returns A PasswordManagerClient
56061
56514
  */
56062
56515
  createSdkClient(...args) {
56063
56516
  return default_sdk_client_factory_awaiter(this, void 0, void 0, function* () {
56064
- return Promise.resolve(new bitwarden_wasm_internal_bg/* BitwardenClient */.gae(...args));
56517
+ return Promise.resolve(new bitwarden_wasm_internal_bg/* PasswordManagerClient */.cPU(...args));
56065
56518
  });
56066
56519
  }
56067
56520
  }
@@ -56286,7 +56739,6 @@ var default_sdk_service_awaiter = (undefined && undefined.__awaiter) || function
56286
56739
 
56287
56740
 
56288
56741
 
56289
-
56290
56742
  // A symbol that represents an overridden client that is explicitly set to undefined,
56291
56743
  // blocking the creation of an internal client for that user.
56292
56744
  const UnsetClient = Symbol("UnsetClient");
@@ -56457,66 +56909,10 @@ class DefaultSdkService {
56457
56909
  return {
56458
56910
  apiUrl: env.getApiUrl(),
56459
56911
  identityUrl: env.getIdentityUrl(),
56460
- deviceType: this.toDevice(this.platformUtilsService.getDevice()),
56912
+ deviceType: toSdkDevice(this.platformUtilsService.getDevice()),
56461
56913
  userAgent: (_a = this.userAgent) !== null && _a !== void 0 ? _a : navigator.userAgent,
56462
56914
  };
56463
56915
  }
56464
- toDevice(device) {
56465
- switch (device) {
56466
- case DeviceType.Android:
56467
- return "Android";
56468
- case DeviceType.iOS:
56469
- return "iOS";
56470
- case DeviceType.ChromeExtension:
56471
- return "ChromeExtension";
56472
- case DeviceType.FirefoxExtension:
56473
- return "FirefoxExtension";
56474
- case DeviceType.OperaExtension:
56475
- return "OperaExtension";
56476
- case DeviceType.EdgeExtension:
56477
- return "EdgeExtension";
56478
- case DeviceType.WindowsDesktop:
56479
- return "WindowsDesktop";
56480
- case DeviceType.MacOsDesktop:
56481
- return "MacOsDesktop";
56482
- case DeviceType.LinuxDesktop:
56483
- return "LinuxDesktop";
56484
- case DeviceType.ChromeBrowser:
56485
- return "ChromeBrowser";
56486
- case DeviceType.FirefoxBrowser:
56487
- return "FirefoxBrowser";
56488
- case DeviceType.OperaBrowser:
56489
- return "OperaBrowser";
56490
- case DeviceType.EdgeBrowser:
56491
- return "EdgeBrowser";
56492
- case DeviceType.IEBrowser:
56493
- return "IEBrowser";
56494
- case DeviceType.UnknownBrowser:
56495
- return "UnknownBrowser";
56496
- case DeviceType.AndroidAmazon:
56497
- return "AndroidAmazon";
56498
- case DeviceType.UWP:
56499
- return "UWP";
56500
- case DeviceType.SafariBrowser:
56501
- return "SafariBrowser";
56502
- case DeviceType.VivaldiBrowser:
56503
- return "VivaldiBrowser";
56504
- case DeviceType.VivaldiExtension:
56505
- return "VivaldiExtension";
56506
- case DeviceType.SafariExtension:
56507
- return "SafariExtension";
56508
- case DeviceType.Server:
56509
- return "Server";
56510
- case DeviceType.WindowsCLI:
56511
- return "WindowsCLI";
56512
- case DeviceType.MacOsCLI:
56513
- return "MacOsCLI";
56514
- case DeviceType.LinuxCLI:
56515
- return "LinuxCLI";
56516
- default:
56517
- return "SDK";
56518
- }
56519
- }
56520
56916
  }
56521
56917
 
56522
56918
  ;// ../../libs/common/src/platform/services/sdk/noop-sdk-client-factory.ts
@@ -59807,6 +60203,7 @@ class CipherService {
59807
60203
  * Usage of the {@link CipherViewLike} type is recommended to ensure both `CipherView` and `CipherListView` are supported.
59808
60204
  */
59809
60205
  this.cipherListViews$ = perUserCache$((userId) => {
60206
+ let decryptStartTime;
59810
60207
  return this.configService.getFeatureFlag$(feature_flag_enum_FeatureFlag.PM22134SdkCipherListView).pipe((0,external_rxjs_namespaceObject.switchMap)((useSdk) => {
59811
60208
  if (!useSdk) {
59812
60209
  return this.cipherViews$(userId);
@@ -59815,11 +60212,15 @@ class CipherService {
59815
60212
  this.encryptedCiphersState(userId).state$,
59816
60213
  this.localData$(userId),
59817
60214
  this.keyService.cipherDecryptionKeys$(userId, true),
59818
- ]).pipe((0,external_rxjs_namespaceObject.filter)(([cipherDataState, _, keys]) => cipherDataState != null && keys != null), (0,external_rxjs_namespaceObject.map)(([cipherDataState, localData]) => Object.values(cipherDataState).map((cipherData) => new Cipher(cipherData, localData === null || localData === void 0 ? void 0 : localData[cipherData.id]))), (0,external_rxjs_namespaceObject.switchMap)((ciphers) => cipher_service_awaiter(this, void 0, void 0, function* () {
60215
+ ]).pipe((0,external_rxjs_namespaceObject.filter)(([cipherDataState, _, keys]) => cipherDataState != null && keys != null), (0,external_rxjs_namespaceObject.map)(([cipherDataState, localData]) => Object.values(cipherDataState).map((cipherData) => new Cipher(cipherData, localData === null || localData === void 0 ? void 0 : localData[cipherData.id]))), (0,external_rxjs_namespaceObject.tap)(() => {
60216
+ decryptStartTime = performance.now();
60217
+ }), (0,external_rxjs_namespaceObject.switchMap)((ciphers) => cipher_service_awaiter(this, void 0, void 0, function* () {
59819
60218
  const [decrypted, failures] = yield this.decryptCiphersWithSdk(ciphers, userId, false);
59820
60219
  yield this.setFailedDecryptedCiphers(failures, userId);
59821
60220
  return decrypted;
59822
- })));
60221
+ })), (0,external_rxjs_namespaceObject.tap)((decrypted) => {
60222
+ this.logService.measure(decryptStartTime, "Vault", "CipherService", "listView decrypt complete", [["Items", decrypted.length]]);
60223
+ }));
59823
60224
  }));
59824
60225
  });
59825
60226
  /**
@@ -62434,6 +62835,10 @@ class SearchService {
62434
62835
  this.immediateSearchLocales = ["zh-CN", "zh-TW", "ja", "ko", "vi"];
62435
62836
  this.defaultSearchableMinLength = 2;
62436
62837
  this.searchableMinLength = this.defaultSearchableMinLength;
62838
+ this._isCipherSearching$ = new external_rxjs_namespaceObject.BehaviorSubject(false);
62839
+ this.isCipherSearching$ = this._isCipherSearching$.asObservable();
62840
+ this._isSendSearching$ = new external_rxjs_namespaceObject.BehaviorSubject(false);
62841
+ this.isSendSearching$ = this._isSendSearching$.asObservable();
62437
62842
  this.index$ = perUserCache$((userId) => {
62438
62843
  return this.searchIndexState(userId).state$.pipe((0,external_rxjs_namespaceObject.map)((searchIndex) => {
62439
62844
  let index = null;
@@ -62549,6 +62954,7 @@ class SearchService {
62549
62954
  }
62550
62955
  searchCiphers(userId_1, query_1) {
62551
62956
  return search_service_awaiter(this, arguments, void 0, function* (userId, query, filter = null, ciphers) {
62957
+ this._isCipherSearching$.next(true);
62552
62958
  const results = [];
62553
62959
  const searchStartTime = performance.now();
62554
62960
  if (query != null) {
@@ -62567,6 +62973,7 @@ class SearchService {
62567
62973
  ciphers = ciphers.filter(filter);
62568
62974
  }
62569
62975
  if (!(yield this.isSearchable(userId, query))) {
62976
+ this._isCipherSearching$.next(false);
62570
62977
  return ciphers;
62571
62978
  }
62572
62979
  if (yield this.getIsIndexing(userId)) {
@@ -62580,6 +62987,7 @@ class SearchService {
62580
62987
  // Fall back to basic search if index is not available
62581
62988
  const basicResults = this.searchCiphersBasic(ciphers, query);
62582
62989
  this.logService.measure(searchStartTime, "Vault", "SearchService", "basic search complete");
62990
+ this._isCipherSearching$.next(false);
62583
62991
  return basicResults;
62584
62992
  }
62585
62993
  const ciphersMap = new Map();
@@ -62614,6 +63022,7 @@ class SearchService {
62614
63022
  });
62615
63023
  }
62616
63024
  this.logService.measure(searchStartTime, "Vault", "SearchService", "search complete");
63025
+ this._isCipherSearching$.next(false);
62617
63026
  return results;
62618
63027
  });
62619
63028
  }
@@ -62646,8 +63055,10 @@ class SearchService {
62646
63055
  });
62647
63056
  }
62648
63057
  searchSends(sends, query) {
63058
+ this._isSendSearching$.next(true);
62649
63059
  query = SearchService.normalizeSearchQuery(query.trim().toLocaleLowerCase());
62650
63060
  if (query === null) {
63061
+ this._isSendSearching$.next(false);
62651
63062
  return sends;
62652
63063
  }
62653
63064
  const sendsMatched = [];
@@ -62673,6 +63084,7 @@ class SearchService {
62673
63084
  lowPriorityMatched.push(s);
62674
63085
  }
62675
63086
  });
63087
+ this._isSendSearching$.next(false);
62676
63088
  return sendsMatched.concat(lowPriorityMatched);
62677
63089
  }
62678
63090
  getIndexForSearch(userId) {
@@ -72142,6 +72554,11 @@ class CliPlatformUtilsService {
72142
72554
  getAutofillKeyboardShortcut() {
72143
72555
  return null;
72144
72556
  }
72557
+ packageType() {
72558
+ return cli_platform_utils_service_awaiter(this, void 0, void 0, function* () {
72559
+ return null;
72560
+ });
72561
+ }
72145
72562
  }
72146
72563
 
72147
72564
  ;// ../../node_modules/@bitwarden/commercial-sdk-internal/index.js
@@ -73802,6 +74219,10 @@ class ApiService {
73802
74219
  }
73803
74220
  request.headers.set("Bitwarden-Client-Name", this.platformUtilsService.getClientType());
73804
74221
  request.headers.set("Bitwarden-Client-Version", yield this.platformUtilsService.getApplicationVersionNumber());
74222
+ const packageType = yield this.platformUtilsService.packageType();
74223
+ if (packageType != null) {
74224
+ request.headers.set("Bitwarden-Package-Type", packageType);
74225
+ }
73805
74226
  return this.nativeFetch(request);
73806
74227
  });
73807
74228
  }
@@ -73976,8 +74397,14 @@ class ApiService {
73976
74397
  ? this.environmentService.environment$
73977
74398
  : this.environmentService.getEnvironment$(userId));
73978
74399
  apiUrl = utils_Utils.isNullOrWhitespace(apiUrl) ? env.getApiUrl() : apiUrl;
73979
- // Prevent directory traversal from malicious paths
73980
74400
  const pathParts = path.split("?");
74401
+ // Check for path traversal patterns from any URL.
74402
+ const fullUrlPath = apiUrl + pathParts[0] + (pathParts.length > 1 ? `?${pathParts[1]}` : "");
74403
+ const isInvalidUrl = utils_Utils.invalidUrlPatterns(fullUrlPath);
74404
+ if (isInvalidUrl) {
74405
+ throw new Error("The request URL contains dangerous patterns.");
74406
+ }
74407
+ // Prevent directory traversal from malicious paths
73981
74408
  const requestUrl = apiUrl + utils_Utils.normalizePath(pathParts[0]) + (pathParts.length > 1 ? `?${pathParts[1]}` : "");
73982
74409
  const [requestHeaders, requestBody] = yield this.buildHeadersAndBody(userId, hasResponse, body, alterHeaders);
73983
74410
  const requestInit = {
@@ -74380,7 +74807,6 @@ var service_container_awaiter = (undefined && undefined.__awaiter) || function (
74380
74807
 
74381
74808
 
74382
74809
 
74383
-
74384
74810
 
74385
74811
 
74386
74812
  // eslint-disable-next-line no-restricted-imports -- Needed for service construction
@@ -74503,7 +74929,7 @@ class service_container_ServiceContainer {
74503
74929
  this.platformUtilsService.getDeviceString().toUpperCase() +
74504
74930
  ")";
74505
74931
  this.biometricStateService = new DefaultBiometricStateService(this.stateProvider);
74506
- this.userDecryptionOptionsService = new UserDecryptionOptionsService(this.stateProvider);
74932
+ this.userDecryptionOptionsService = new UserDecryptionOptionsService(this.singleUserStateProvider);
74507
74933
  this.ssoUrlService = new SsoUrlService();
74508
74934
  this.organizationService = new DefaultOrganizationService(this.stateProvider);
74509
74935
  this.policyService = new DefaultPolicyService(this.stateProvider, this.organizationService);
@@ -74528,7 +74954,7 @@ class service_container_ServiceContainer {
74528
74954
  this.providerService = new ProviderService(this.stateProvider);
74529
74955
  this.policyApiService = new PolicyApiService(this.policyService, this.apiService, this.accountService);
74530
74956
  this.keyConnectorService = new KeyConnectorService(this.accountService, this.masterPasswordService, this.keyService, this.apiService, this.tokenService, this.logService, this.organizationService, this.keyGenerationService, logoutCallback, this.stateProvider);
74531
- this.twoFactorService = new TwoFactorService(this.i18nService, this.platformUtilsService, this.globalStateProvider);
74957
+ this.twoFactorService = new DefaultTwoFactorService(this.i18nService, this.platformUtilsService, this.globalStateProvider, this.twoFactorApiService);
74532
74958
  const sdkClientFactory = flags_flagEnabled("sdk")
74533
74959
  ? new DefaultSdkClientFactory()
74534
74960
  : new NoopSdkClientFactory();
@@ -74541,7 +74967,7 @@ class service_container_ServiceContainer {
74541
74967
  this.billingAccountProfileStateService = new DefaultBillingAccountProfileStateService(this.stateProvider, this.platformUtilsService, this.apiService);
74542
74968
  this.taskSchedulerService = new DefaultTaskSchedulerService(this.logService);
74543
74969
  this.devicesApiService = new DevicesApiServiceImplementation(this.apiService);
74544
- this.deviceTrustService = new DeviceTrustService(this.keyGenerationService, this.cryptoFunctionService, this.keyService, this.encryptService, this.appIdService, this.devicesApiService, this.i18nService, this.platformUtilsService, this.stateProvider, this.secureStorageService, this.userDecryptionOptionsService, this.logService, this.configService);
74970
+ this.deviceTrustService = new DeviceTrustService(this.keyGenerationService, this.cryptoFunctionService, this.keyService, this.encryptService, this.appIdService, this.devicesApiService, this.i18nService, this.platformUtilsService, this.stateProvider, this.secureStorageService, this.userDecryptionOptionsService, this.logService, this.configService, this.accountService);
74545
74971
  this.loginStrategyService = new LoginStrategyService(this.accountService, this.masterPasswordService, this.keyService, this.apiService, this.tokenService, this.appIdService, this.platformUtilsService, this.messagingService, this.logService, this.keyConnectorService, this.environmentService, this.stateService, this.twoFactorService, this.i18nService, this.encryptService, this.passwordStrengthService, this.policyService, this.deviceTrustService, this.authRequestService, this.userDecryptionOptionsService, this.globalStateProvider, this.billingAccountProfileStateService, this.vaultTimeoutSettingsService, this.kdfConfigService, this.taskSchedulerService, this.configService);
74546
74972
  this.restrictedItemTypesService = new RestrictedItemTypesService(this.accountService, this.organizationService, this.policyService);
74547
74973
  this.cliRestrictedItemTypesService = new CliRestrictedItemTypesService(this.restrictedItemTypesService);